vendor.js 1.6 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 100:
  53. /*!****************************************************!*\
  54. !*** ./node_modules/process-nextick-args/index.js ***!
  55. \****************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. "use strict";
  59. /* WEBPACK VAR INJECTION */(function(process) {
  60. if (typeof process === 'undefined' ||
  61. !process.version ||
  62. process.version.indexOf('v0.') === 0 ||
  63. process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  64. module.exports = { nextTick: nextTick };
  65. } else {
  66. module.exports = process
  67. }
  68. function nextTick(fn, arg1, arg2, arg3) {
  69. if (typeof fn !== 'function') {
  70. throw new TypeError('"callback" argument must be a function');
  71. }
  72. var len = arguments.length;
  73. var args, i;
  74. switch (len) {
  75. case 0:
  76. case 1:
  77. return process.nextTick(fn);
  78. case 2:
  79. return process.nextTick(function afterTickOne() {
  80. fn.call(null, arg1);
  81. });
  82. case 3:
  83. return process.nextTick(function afterTickTwo() {
  84. fn.call(null, arg1, arg2);
  85. });
  86. case 4:
  87. return process.nextTick(function afterTickThree() {
  88. fn.call(null, arg1, arg2, arg3);
  89. });
  90. default:
  91. args = new Array(len - 1);
  92. i = 0;
  93. while (i < args.length) {
  94. args[i++] = arguments[i];
  95. }
  96. return process.nextTick(function afterTick() {
  97. fn.apply(null, args);
  98. });
  99. }
  100. }
  101. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 87)))
  102. /***/ }),
  103. /***/ 101:
  104. /*!***************************************!*\
  105. !*** ./node_modules/events/events.js ***!
  106. \***************************************/
  107. /*! no static exports found */
  108. /***/ (function(module, exports, __webpack_require__) {
  109. "use strict";
  110. // Copyright Joyent, Inc. and other Node contributors.
  111. //
  112. // Permission is hereby granted, free of charge, to any person obtaining a
  113. // copy of this software and associated documentation files (the
  114. // "Software"), to deal in the Software without restriction, including
  115. // without limitation the rights to use, copy, modify, merge, publish,
  116. // distribute, sublicense, and/or sell copies of the Software, and to permit
  117. // persons to whom the Software is furnished to do so, subject to the
  118. // following conditions:
  119. //
  120. // The above copyright notice and this permission notice shall be included
  121. // in all copies or substantial portions of the Software.
  122. //
  123. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  124. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  125. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  126. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  127. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  128. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  129. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  130. var R = typeof Reflect === 'object' ? Reflect : null
  131. var ReflectApply = R && typeof R.apply === 'function'
  132. ? R.apply
  133. : function ReflectApply(target, receiver, args) {
  134. return Function.prototype.apply.call(target, receiver, args);
  135. }
  136. var ReflectOwnKeys
  137. if (R && typeof R.ownKeys === 'function') {
  138. ReflectOwnKeys = R.ownKeys
  139. } else if (Object.getOwnPropertySymbols) {
  140. ReflectOwnKeys = function ReflectOwnKeys(target) {
  141. return Object.getOwnPropertyNames(target)
  142. .concat(Object.getOwnPropertySymbols(target));
  143. };
  144. } else {
  145. ReflectOwnKeys = function ReflectOwnKeys(target) {
  146. return Object.getOwnPropertyNames(target);
  147. };
  148. }
  149. function ProcessEmitWarning(warning) {
  150. if (console && console.warn) console.warn(warning);
  151. }
  152. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  153. return value !== value;
  154. }
  155. function EventEmitter() {
  156. EventEmitter.init.call(this);
  157. }
  158. module.exports = EventEmitter;
  159. module.exports.once = once;
  160. // Backwards-compat with node 0.10.x
  161. EventEmitter.EventEmitter = EventEmitter;
  162. EventEmitter.prototype._events = undefined;
  163. EventEmitter.prototype._eventsCount = 0;
  164. EventEmitter.prototype._maxListeners = undefined;
  165. // By default EventEmitters will print a warning if more than 10 listeners are
  166. // added to it. This is a useful default which helps finding memory leaks.
  167. var defaultMaxListeners = 10;
  168. function checkListener(listener) {
  169. if (typeof listener !== 'function') {
  170. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  171. }
  172. }
  173. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  174. enumerable: true,
  175. get: function() {
  176. return defaultMaxListeners;
  177. },
  178. set: function(arg) {
  179. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  180. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  181. }
  182. defaultMaxListeners = arg;
  183. }
  184. });
  185. EventEmitter.init = function() {
  186. if (this._events === undefined ||
  187. this._events === Object.getPrototypeOf(this)._events) {
  188. this._events = Object.create(null);
  189. this._eventsCount = 0;
  190. }
  191. this._maxListeners = this._maxListeners || undefined;
  192. };
  193. // Obviously not all Emitters should be limited to 10. This function allows
  194. // that to be increased. Set to zero for unlimited.
  195. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  196. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  197. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  198. }
  199. this._maxListeners = n;
  200. return this;
  201. };
  202. function _getMaxListeners(that) {
  203. if (that._maxListeners === undefined)
  204. return EventEmitter.defaultMaxListeners;
  205. return that._maxListeners;
  206. }
  207. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  208. return _getMaxListeners(this);
  209. };
  210. EventEmitter.prototype.emit = function emit(type) {
  211. var args = [];
  212. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  213. var doError = (type === 'error');
  214. var events = this._events;
  215. if (events !== undefined)
  216. doError = (doError && events.error === undefined);
  217. else if (!doError)
  218. return false;
  219. // If there is no 'error' event listener then throw.
  220. if (doError) {
  221. var er;
  222. if (args.length > 0)
  223. er = args[0];
  224. if (er instanceof Error) {
  225. // Note: The comments on the `throw` lines are intentional, they show
  226. // up in Node's output if this results in an unhandled exception.
  227. throw er; // Unhandled 'error' event
  228. }
  229. // At least give some kind of context to the user
  230. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  231. err.context = er;
  232. throw err; // Unhandled 'error' event
  233. }
  234. var handler = events[type];
  235. if (handler === undefined)
  236. return false;
  237. if (typeof handler === 'function') {
  238. ReflectApply(handler, this, args);
  239. } else {
  240. var len = handler.length;
  241. var listeners = arrayClone(handler, len);
  242. for (var i = 0; i < len; ++i)
  243. ReflectApply(listeners[i], this, args);
  244. }
  245. return true;
  246. };
  247. function _addListener(target, type, listener, prepend) {
  248. var m;
  249. var events;
  250. var existing;
  251. checkListener(listener);
  252. events = target._events;
  253. if (events === undefined) {
  254. events = target._events = Object.create(null);
  255. target._eventsCount = 0;
  256. } else {
  257. // To avoid recursion in the case that type === "newListener"! Before
  258. // adding it to the listeners, first emit "newListener".
  259. if (events.newListener !== undefined) {
  260. target.emit('newListener', type,
  261. listener.listener ? listener.listener : listener);
  262. // Re-assign `events` because a newListener handler could have caused the
  263. // this._events to be assigned to a new object
  264. events = target._events;
  265. }
  266. existing = events[type];
  267. }
  268. if (existing === undefined) {
  269. // Optimize the case of one listener. Don't need the extra array object.
  270. existing = events[type] = listener;
  271. ++target._eventsCount;
  272. } else {
  273. if (typeof existing === 'function') {
  274. // Adding the second element, need to change to array.
  275. existing = events[type] =
  276. prepend ? [listener, existing] : [existing, listener];
  277. // If we've already got an array, just append.
  278. } else if (prepend) {
  279. existing.unshift(listener);
  280. } else {
  281. existing.push(listener);
  282. }
  283. // Check for listener leak
  284. m = _getMaxListeners(target);
  285. if (m > 0 && existing.length > m && !existing.warned) {
  286. existing.warned = true;
  287. // No error code for this since it is a Warning
  288. // eslint-disable-next-line no-restricted-syntax
  289. var w = new Error('Possible EventEmitter memory leak detected. ' +
  290. existing.length + ' ' + String(type) + ' listeners ' +
  291. 'added. Use emitter.setMaxListeners() to ' +
  292. 'increase limit');
  293. w.name = 'MaxListenersExceededWarning';
  294. w.emitter = target;
  295. w.type = type;
  296. w.count = existing.length;
  297. ProcessEmitWarning(w);
  298. }
  299. }
  300. return target;
  301. }
  302. EventEmitter.prototype.addListener = function addListener(type, listener) {
  303. return _addListener(this, type, listener, false);
  304. };
  305. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  306. EventEmitter.prototype.prependListener =
  307. function prependListener(type, listener) {
  308. return _addListener(this, type, listener, true);
  309. };
  310. function onceWrapper() {
  311. if (!this.fired) {
  312. this.target.removeListener(this.type, this.wrapFn);
  313. this.fired = true;
  314. if (arguments.length === 0)
  315. return this.listener.call(this.target);
  316. return this.listener.apply(this.target, arguments);
  317. }
  318. }
  319. function _onceWrap(target, type, listener) {
  320. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  321. var wrapped = onceWrapper.bind(state);
  322. wrapped.listener = listener;
  323. state.wrapFn = wrapped;
  324. return wrapped;
  325. }
  326. EventEmitter.prototype.once = function once(type, listener) {
  327. checkListener(listener);
  328. this.on(type, _onceWrap(this, type, listener));
  329. return this;
  330. };
  331. EventEmitter.prototype.prependOnceListener =
  332. function prependOnceListener(type, listener) {
  333. checkListener(listener);
  334. this.prependListener(type, _onceWrap(this, type, listener));
  335. return this;
  336. };
  337. // Emits a 'removeListener' event if and only if the listener was removed.
  338. EventEmitter.prototype.removeListener =
  339. function removeListener(type, listener) {
  340. var list, events, position, i, originalListener;
  341. checkListener(listener);
  342. events = this._events;
  343. if (events === undefined)
  344. return this;
  345. list = events[type];
  346. if (list === undefined)
  347. return this;
  348. if (list === listener || list.listener === listener) {
  349. if (--this._eventsCount === 0)
  350. this._events = Object.create(null);
  351. else {
  352. delete events[type];
  353. if (events.removeListener)
  354. this.emit('removeListener', type, list.listener || listener);
  355. }
  356. } else if (typeof list !== 'function') {
  357. position = -1;
  358. for (i = list.length - 1; i >= 0; i--) {
  359. if (list[i] === listener || list[i].listener === listener) {
  360. originalListener = list[i].listener;
  361. position = i;
  362. break;
  363. }
  364. }
  365. if (position < 0)
  366. return this;
  367. if (position === 0)
  368. list.shift();
  369. else {
  370. spliceOne(list, position);
  371. }
  372. if (list.length === 1)
  373. events[type] = list[0];
  374. if (events.removeListener !== undefined)
  375. this.emit('removeListener', type, originalListener || listener);
  376. }
  377. return this;
  378. };
  379. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  380. EventEmitter.prototype.removeAllListeners =
  381. function removeAllListeners(type) {
  382. var listeners, events, i;
  383. events = this._events;
  384. if (events === undefined)
  385. return this;
  386. // not listening for removeListener, no need to emit
  387. if (events.removeListener === undefined) {
  388. if (arguments.length === 0) {
  389. this._events = Object.create(null);
  390. this._eventsCount = 0;
  391. } else if (events[type] !== undefined) {
  392. if (--this._eventsCount === 0)
  393. this._events = Object.create(null);
  394. else
  395. delete events[type];
  396. }
  397. return this;
  398. }
  399. // emit removeListener for all listeners on all events
  400. if (arguments.length === 0) {
  401. var keys = Object.keys(events);
  402. var key;
  403. for (i = 0; i < keys.length; ++i) {
  404. key = keys[i];
  405. if (key === 'removeListener') continue;
  406. this.removeAllListeners(key);
  407. }
  408. this.removeAllListeners('removeListener');
  409. this._events = Object.create(null);
  410. this._eventsCount = 0;
  411. return this;
  412. }
  413. listeners = events[type];
  414. if (typeof listeners === 'function') {
  415. this.removeListener(type, listeners);
  416. } else if (listeners !== undefined) {
  417. // LIFO order
  418. for (i = listeners.length - 1; i >= 0; i--) {
  419. this.removeListener(type, listeners[i]);
  420. }
  421. }
  422. return this;
  423. };
  424. function _listeners(target, type, unwrap) {
  425. var events = target._events;
  426. if (events === undefined)
  427. return [];
  428. var evlistener = events[type];
  429. if (evlistener === undefined)
  430. return [];
  431. if (typeof evlistener === 'function')
  432. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  433. return unwrap ?
  434. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  435. }
  436. EventEmitter.prototype.listeners = function listeners(type) {
  437. return _listeners(this, type, true);
  438. };
  439. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  440. return _listeners(this, type, false);
  441. };
  442. EventEmitter.listenerCount = function(emitter, type) {
  443. if (typeof emitter.listenerCount === 'function') {
  444. return emitter.listenerCount(type);
  445. } else {
  446. return listenerCount.call(emitter, type);
  447. }
  448. };
  449. EventEmitter.prototype.listenerCount = listenerCount;
  450. function listenerCount(type) {
  451. var events = this._events;
  452. if (events !== undefined) {
  453. var evlistener = events[type];
  454. if (typeof evlistener === 'function') {
  455. return 1;
  456. } else if (evlistener !== undefined) {
  457. return evlistener.length;
  458. }
  459. }
  460. return 0;
  461. }
  462. EventEmitter.prototype.eventNames = function eventNames() {
  463. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  464. };
  465. function arrayClone(arr, n) {
  466. var copy = new Array(n);
  467. for (var i = 0; i < n; ++i)
  468. copy[i] = arr[i];
  469. return copy;
  470. }
  471. function spliceOne(list, index) {
  472. for (; index + 1 < list.length; index++)
  473. list[index] = list[index + 1];
  474. list.pop();
  475. }
  476. function unwrapListeners(arr) {
  477. var ret = new Array(arr.length);
  478. for (var i = 0; i < ret.length; ++i) {
  479. ret[i] = arr[i].listener || arr[i];
  480. }
  481. return ret;
  482. }
  483. function once(emitter, name) {
  484. return new Promise(function (resolve, reject) {
  485. function errorListener(err) {
  486. emitter.removeListener(name, resolver);
  487. reject(err);
  488. }
  489. function resolver() {
  490. if (typeof emitter.removeListener === 'function') {
  491. emitter.removeListener('error', errorListener);
  492. }
  493. resolve([].slice.call(arguments));
  494. };
  495. eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
  496. if (name !== 'error') {
  497. addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
  498. }
  499. });
  500. }
  501. function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
  502. if (typeof emitter.on === 'function') {
  503. eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
  504. }
  505. }
  506. function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
  507. if (typeof emitter.on === 'function') {
  508. if (flags.once) {
  509. emitter.once(name, listener);
  510. } else {
  511. emitter.on(name, listener);
  512. }
  513. } else if (typeof emitter.addEventListener === 'function') {
  514. // EventTarget does not have `error` event semantics like Node
  515. // EventEmitters, we do not listen for `error` events here.
  516. emitter.addEventListener(name, function wrapListener(arg) {
  517. // IE does not have builtin `{ once: true }` support so we
  518. // have to do it manually.
  519. if (flags.once) {
  520. emitter.removeEventListener(name, wrapListener);
  521. }
  522. listener(arg);
  523. });
  524. } else {
  525. throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
  526. }
  527. }
  528. /***/ }),
  529. /***/ 102:
  530. /*!*****************************************************************************!*\
  531. !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!
  532. \*****************************************************************************/
  533. /*! no static exports found */
  534. /***/ (function(module, exports, __webpack_require__) {
  535. module.exports = __webpack_require__(/*! events */ 101).EventEmitter;
  536. /***/ }),
  537. /***/ 103:
  538. /*!***********************************************!*\
  539. !*** ./node_modules/core-util-is/lib/util.js ***!
  540. \***********************************************/
  541. /*! no static exports found */
  542. /***/ (function(module, exports, __webpack_require__) {
  543. // Copyright Joyent, Inc. and other Node contributors.
  544. //
  545. // Permission is hereby granted, free of charge, to any person obtaining a
  546. // copy of this software and associated documentation files (the
  547. // "Software"), to deal in the Software without restriction, including
  548. // without limitation the rights to use, copy, modify, merge, publish,
  549. // distribute, sublicense, and/or sell copies of the Software, and to permit
  550. // persons to whom the Software is furnished to do so, subject to the
  551. // following conditions:
  552. //
  553. // The above copyright notice and this permission notice shall be included
  554. // in all copies or substantial portions of the Software.
  555. //
  556. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  557. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  558. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  559. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  560. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  561. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  562. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  563. // NOTE: These type checking functions intentionally don't use `instanceof`
  564. // because it is fragile and can be easily faked with `Object.create()`.
  565. function isArray(arg) {
  566. if (Array.isArray) {
  567. return Array.isArray(arg);
  568. }
  569. return objectToString(arg) === '[object Array]';
  570. }
  571. exports.isArray = isArray;
  572. function isBoolean(arg) {
  573. return typeof arg === 'boolean';
  574. }
  575. exports.isBoolean = isBoolean;
  576. function isNull(arg) {
  577. return arg === null;
  578. }
  579. exports.isNull = isNull;
  580. function isNullOrUndefined(arg) {
  581. return arg == null;
  582. }
  583. exports.isNullOrUndefined = isNullOrUndefined;
  584. function isNumber(arg) {
  585. return typeof arg === 'number';
  586. }
  587. exports.isNumber = isNumber;
  588. function isString(arg) {
  589. return typeof arg === 'string';
  590. }
  591. exports.isString = isString;
  592. function isSymbol(arg) {
  593. return typeof arg === 'symbol';
  594. }
  595. exports.isSymbol = isSymbol;
  596. function isUndefined(arg) {
  597. return arg === void 0;
  598. }
  599. exports.isUndefined = isUndefined;
  600. function isRegExp(re) {
  601. return objectToString(re) === '[object RegExp]';
  602. }
  603. exports.isRegExp = isRegExp;
  604. function isObject(arg) {
  605. return typeof arg === 'object' && arg !== null;
  606. }
  607. exports.isObject = isObject;
  608. function isDate(d) {
  609. return objectToString(d) === '[object Date]';
  610. }
  611. exports.isDate = isDate;
  612. function isError(e) {
  613. return (objectToString(e) === '[object Error]' || e instanceof Error);
  614. }
  615. exports.isError = isError;
  616. function isFunction(arg) {
  617. return typeof arg === 'function';
  618. }
  619. exports.isFunction = isFunction;
  620. function isPrimitive(arg) {
  621. return arg === null ||
  622. typeof arg === 'boolean' ||
  623. typeof arg === 'number' ||
  624. typeof arg === 'string' ||
  625. typeof arg === 'symbol' || // ES6 symbol
  626. typeof arg === 'undefined';
  627. }
  628. exports.isPrimitive = isPrimitive;
  629. exports.isBuffer = __webpack_require__(/*! buffer */ 90).Buffer.isBuffer;
  630. function objectToString(o) {
  631. return Object.prototype.toString.call(o);
  632. }
  633. /***/ }),
  634. /***/ 104:
  635. /*!**********************!*\
  636. !*** util (ignored) ***!
  637. \**********************/
  638. /*! no static exports found */
  639. /***/ (function(module, exports) {
  640. /* (ignored) */
  641. /***/ }),
  642. /***/ 105:
  643. /*!*************************************************************************!*\
  644. !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***!
  645. \*************************************************************************/
  646. /*! no static exports found */
  647. /***/ (function(module, exports, __webpack_require__) {
  648. "use strict";
  649. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  650. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer;
  651. var util = __webpack_require__(/*! util */ 106);
  652. function copyBuffer(src, target, offset) {
  653. src.copy(target, offset);
  654. }
  655. module.exports = function () {
  656. function BufferList() {
  657. _classCallCheck(this, BufferList);
  658. this.head = null;
  659. this.tail = null;
  660. this.length = 0;
  661. }
  662. BufferList.prototype.push = function push(v) {
  663. var entry = { data: v, next: null };
  664. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  665. this.tail = entry;
  666. ++this.length;
  667. };
  668. BufferList.prototype.unshift = function unshift(v) {
  669. var entry = { data: v, next: this.head };
  670. if (this.length === 0) this.tail = entry;
  671. this.head = entry;
  672. ++this.length;
  673. };
  674. BufferList.prototype.shift = function shift() {
  675. if (this.length === 0) return;
  676. var ret = this.head.data;
  677. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  678. --this.length;
  679. return ret;
  680. };
  681. BufferList.prototype.clear = function clear() {
  682. this.head = this.tail = null;
  683. this.length = 0;
  684. };
  685. BufferList.prototype.join = function join(s) {
  686. if (this.length === 0) return '';
  687. var p = this.head;
  688. var ret = '' + p.data;
  689. while (p = p.next) {
  690. ret += s + p.data;
  691. }return ret;
  692. };
  693. BufferList.prototype.concat = function concat(n) {
  694. if (this.length === 0) return Buffer.alloc(0);
  695. if (this.length === 1) return this.head.data;
  696. var ret = Buffer.allocUnsafe(n >>> 0);
  697. var p = this.head;
  698. var i = 0;
  699. while (p) {
  700. copyBuffer(p.data, ret, i);
  701. i += p.data.length;
  702. p = p.next;
  703. }
  704. return ret;
  705. };
  706. return BufferList;
  707. }();
  708. if (util && util.inspect && util.inspect.custom) {
  709. module.exports.prototype[util.inspect.custom] = function () {
  710. var obj = util.inspect({ length: this.length });
  711. return this.constructor.name + ' ' + obj;
  712. };
  713. }
  714. /***/ }),
  715. /***/ 106:
  716. /*!**********************!*\
  717. !*** util (ignored) ***!
  718. \**********************/
  719. /*! no static exports found */
  720. /***/ (function(module, exports) {
  721. /* (ignored) */
  722. /***/ }),
  723. /***/ 107:
  724. /*!**********************************************************************!*\
  725. !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***!
  726. \**********************************************************************/
  727. /*! no static exports found */
  728. /***/ (function(module, exports, __webpack_require__) {
  729. "use strict";
  730. /*<replacement>*/
  731. var pna = __webpack_require__(/*! process-nextick-args */ 100);
  732. /*</replacement>*/
  733. // undocumented cb() API, needed for core, not for public API
  734. function destroy(err, cb) {
  735. var _this = this;
  736. var readableDestroyed = this._readableState && this._readableState.destroyed;
  737. var writableDestroyed = this._writableState && this._writableState.destroyed;
  738. if (readableDestroyed || writableDestroyed) {
  739. if (cb) {
  740. cb(err);
  741. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  742. pna.nextTick(emitErrorNT, this, err);
  743. }
  744. return this;
  745. }
  746. // we set destroyed to true before firing error callbacks in order
  747. // to make it re-entrance safe in case destroy() is called within callbacks
  748. if (this._readableState) {
  749. this._readableState.destroyed = true;
  750. }
  751. // if this is a duplex stream mark the writable part as destroyed as well
  752. if (this._writableState) {
  753. this._writableState.destroyed = true;
  754. }
  755. this._destroy(err || null, function (err) {
  756. if (!cb && err) {
  757. pna.nextTick(emitErrorNT, _this, err);
  758. if (_this._writableState) {
  759. _this._writableState.errorEmitted = true;
  760. }
  761. } else if (cb) {
  762. cb(err);
  763. }
  764. });
  765. return this;
  766. }
  767. function undestroy() {
  768. if (this._readableState) {
  769. this._readableState.destroyed = false;
  770. this._readableState.reading = false;
  771. this._readableState.ended = false;
  772. this._readableState.endEmitted = false;
  773. }
  774. if (this._writableState) {
  775. this._writableState.destroyed = false;
  776. this._writableState.ended = false;
  777. this._writableState.ending = false;
  778. this._writableState.finished = false;
  779. this._writableState.errorEmitted = false;
  780. }
  781. }
  782. function emitErrorNT(self, err) {
  783. self.emit('error', err);
  784. }
  785. module.exports = {
  786. destroy: destroy,
  787. undestroy: undestroy
  788. };
  789. /***/ }),
  790. /***/ 1070:
  791. /*!***************************************************************************!*\
  792. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/util/async-validator.js ***!
  793. \***************************************************************************/
  794. /*! no static exports found */
  795. /***/ (function(module, exports, __webpack_require__) {
  796. "use strict";
  797. /* WEBPACK VAR INJECTION */(function(process) {
  798. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  799. Object.defineProperty(exports, "__esModule", {
  800. value: true
  801. });
  802. exports.default = void 0;
  803. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  804. function _extends() {
  805. _extends = Object.assign || function (target) {
  806. for (var i = 1; i < arguments.length; i++) {
  807. var source = arguments[i];
  808. for (var key in source) {
  809. if (Object.prototype.hasOwnProperty.call(source, key)) {
  810. target[key] = source[key];
  811. }
  812. }
  813. }
  814. return target;
  815. };
  816. return _extends.apply(this, arguments);
  817. }
  818. /* eslint no-console:0 */
  819. var formatRegExp = /%[sdj%]/g;
  820. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  821. if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  822. warning = function warning(type, errors) {
  823. if (typeof console !== 'undefined' && console.warn) {
  824. if (errors.every(function (e) {
  825. return typeof e === 'string';
  826. })) {
  827. console.warn(type, errors);
  828. }
  829. }
  830. };
  831. }
  832. function convertFieldsError(errors) {
  833. if (!errors || !errors.length) return null;
  834. var fields = {};
  835. errors.forEach(function (error) {
  836. var field = error.field;
  837. fields[field] = fields[field] || [];
  838. fields[field].push(error);
  839. });
  840. return fields;
  841. }
  842. function format() {
  843. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  844. args[_key] = arguments[_key];
  845. }
  846. var i = 1;
  847. var f = args[0];
  848. var len = args.length;
  849. if (typeof f === 'function') {
  850. return f.apply(null, args.slice(1));
  851. }
  852. if (typeof f === 'string') {
  853. var str = String(f).replace(formatRegExp, function (x) {
  854. if (x === '%%') {
  855. return '%';
  856. }
  857. if (i >= len) {
  858. return x;
  859. }
  860. switch (x) {
  861. case '%s':
  862. return String(args[i++]);
  863. case '%d':
  864. return Number(args[i++]);
  865. case '%j':
  866. try {
  867. return JSON.stringify(args[i++]);
  868. } catch (_) {
  869. return '[Circular]';
  870. }
  871. break;
  872. default:
  873. return x;
  874. }
  875. });
  876. for (var arg = args[i]; i < len; arg = args[++i]) {
  877. str += " " + arg;
  878. }
  879. return str;
  880. }
  881. return f;
  882. }
  883. function isNativeStringType(type) {
  884. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  885. }
  886. function isEmptyValue(value, type) {
  887. if (value === undefined || value === null) {
  888. return true;
  889. }
  890. if (type === 'array' && Array.isArray(value) && !value.length) {
  891. return true;
  892. }
  893. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  894. return true;
  895. }
  896. return false;
  897. }
  898. function asyncParallelArray(arr, func, callback) {
  899. var results = [];
  900. var total = 0;
  901. var arrLength = arr.length;
  902. function count(errors) {
  903. results.push.apply(results, errors);
  904. total++;
  905. if (total === arrLength) {
  906. callback(results);
  907. }
  908. }
  909. arr.forEach(function (a) {
  910. func(a, count);
  911. });
  912. }
  913. function asyncSerialArray(arr, func, callback) {
  914. var index = 0;
  915. var arrLength = arr.length;
  916. function next(errors) {
  917. if (errors && errors.length) {
  918. callback(errors);
  919. return;
  920. }
  921. var original = index;
  922. index = index + 1;
  923. if (original < arrLength) {
  924. func(arr[original], next);
  925. } else {
  926. callback([]);
  927. }
  928. }
  929. next([]);
  930. }
  931. function flattenObjArr(objArr) {
  932. var ret = [];
  933. Object.keys(objArr).forEach(function (k) {
  934. ret.push.apply(ret, objArr[k]);
  935. });
  936. return ret;
  937. }
  938. function asyncMap(objArr, option, func, callback) {
  939. if (option.first) {
  940. var _pending = new Promise(function (resolve, reject) {
  941. var next = function next(errors) {
  942. callback(errors);
  943. return errors.length ? reject({
  944. errors: errors,
  945. fields: convertFieldsError(errors)
  946. }) : resolve();
  947. };
  948. var flattenArr = flattenObjArr(objArr);
  949. asyncSerialArray(flattenArr, func, next);
  950. });
  951. _pending["catch"](function (e) {
  952. return e;
  953. });
  954. return _pending;
  955. }
  956. var firstFields = option.firstFields || [];
  957. if (firstFields === true) {
  958. firstFields = Object.keys(objArr);
  959. }
  960. var objArrKeys = Object.keys(objArr);
  961. var objArrLength = objArrKeys.length;
  962. var total = 0;
  963. var results = [];
  964. var pending = new Promise(function (resolve, reject) {
  965. var next = function next(errors) {
  966. results.push.apply(results, errors);
  967. total++;
  968. if (total === objArrLength) {
  969. callback(results);
  970. return results.length ? reject({
  971. errors: results,
  972. fields: convertFieldsError(results)
  973. }) : resolve();
  974. }
  975. };
  976. if (!objArrKeys.length) {
  977. callback(results);
  978. resolve();
  979. }
  980. objArrKeys.forEach(function (key) {
  981. var arr = objArr[key];
  982. if (firstFields.indexOf(key) !== -1) {
  983. asyncSerialArray(arr, func, next);
  984. } else {
  985. asyncParallelArray(arr, func, next);
  986. }
  987. });
  988. });
  989. pending["catch"](function (e) {
  990. return e;
  991. });
  992. return pending;
  993. }
  994. function complementError(rule) {
  995. return function (oe) {
  996. if (oe && oe.message) {
  997. oe.field = oe.field || rule.fullField;
  998. return oe;
  999. }
  1000. return {
  1001. message: typeof oe === 'function' ? oe() : oe,
  1002. field: oe.field || rule.fullField
  1003. };
  1004. };
  1005. }
  1006. function deepMerge(target, source) {
  1007. if (source) {
  1008. for (var s in source) {
  1009. if (source.hasOwnProperty(s)) {
  1010. var value = source[s];
  1011. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  1012. target[s] = _extends({}, target[s], {}, value);
  1013. } else {
  1014. target[s] = value;
  1015. }
  1016. }
  1017. }
  1018. }
  1019. return target;
  1020. }
  1021. /**
  1022. * Rule for validating required fields.
  1023. *
  1024. * @param rule The validation rule.
  1025. * @param value The value of the field on the source object.
  1026. * @param source The source object being validated.
  1027. * @param errors An array of errors that this rule may add
  1028. * validation errors to.
  1029. * @param options The validation options.
  1030. * @param options.messages The validation messages.
  1031. */
  1032. function required(rule, value, source, errors, options, type) {
  1033. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  1034. errors.push(format(options.messages.required, rule.fullField));
  1035. }
  1036. }
  1037. /**
  1038. * Rule for validating whitespace.
  1039. *
  1040. * @param rule The validation rule.
  1041. * @param value The value of the field on the source object.
  1042. * @param source The source object being validated.
  1043. * @param errors An array of errors that this rule may add
  1044. * validation errors to.
  1045. * @param options The validation options.
  1046. * @param options.messages The validation messages.
  1047. */
  1048. function whitespace(rule, value, source, errors, options) {
  1049. if (/^\s+$/.test(value) || value === '') {
  1050. errors.push(format(options.messages.whitespace, rule.fullField));
  1051. }
  1052. }
  1053. /* eslint max-len:0 */
  1054. var pattern = {
  1055. // http://emailregex.com/
  1056. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  1057. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  1058. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  1059. };
  1060. var types = {
  1061. integer: function integer(value) {
  1062. return types.number(value) && parseInt(value, 10) === value;
  1063. },
  1064. "float": function float(value) {
  1065. return types.number(value) && !types.integer(value);
  1066. },
  1067. array: function array(value) {
  1068. return Array.isArray(value);
  1069. },
  1070. regexp: function regexp(value) {
  1071. if (value instanceof RegExp) {
  1072. return true;
  1073. }
  1074. try {
  1075. return !!new RegExp(value);
  1076. } catch (e) {
  1077. return false;
  1078. }
  1079. },
  1080. date: function date(value) {
  1081. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  1082. },
  1083. number: function number(value) {
  1084. if (isNaN(value)) {
  1085. return false;
  1086. }
  1087. // 修改源码,将字符串数值先转为数值
  1088. return typeof +value === 'number';
  1089. },
  1090. object: function object(value) {
  1091. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  1092. },
  1093. method: function method(value) {
  1094. return typeof value === 'function';
  1095. },
  1096. email: function email(value) {
  1097. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  1098. },
  1099. url: function url(value) {
  1100. return typeof value === 'string' && !!value.match(pattern.url);
  1101. },
  1102. hex: function hex(value) {
  1103. return typeof value === 'string' && !!value.match(pattern.hex);
  1104. }
  1105. };
  1106. /**
  1107. * Rule for validating the type of a value.
  1108. *
  1109. * @param rule The validation rule.
  1110. * @param value The value of the field on the source object.
  1111. * @param source The source object being validated.
  1112. * @param errors An array of errors that this rule may add
  1113. * validation errors to.
  1114. * @param options The validation options.
  1115. * @param options.messages The validation messages.
  1116. */
  1117. function type(rule, value, source, errors, options) {
  1118. if (rule.required && value === undefined) {
  1119. required(rule, value, source, errors, options);
  1120. return;
  1121. }
  1122. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  1123. var ruleType = rule.type;
  1124. if (custom.indexOf(ruleType) > -1) {
  1125. if (!types[ruleType](value)) {
  1126. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  1127. } // straight typeof check
  1128. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  1129. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  1130. }
  1131. }
  1132. /**
  1133. * Rule for validating minimum and maximum allowed values.
  1134. *
  1135. * @param rule The validation rule.
  1136. * @param value The value of the field on the source object.
  1137. * @param source The source object being validated.
  1138. * @param errors An array of errors that this rule may add
  1139. * validation errors to.
  1140. * @param options The validation options.
  1141. * @param options.messages The validation messages.
  1142. */
  1143. function range(rule, value, source, errors, options) {
  1144. var len = typeof rule.len === 'number';
  1145. var min = typeof rule.min === 'number';
  1146. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  1147. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  1148. var val = value;
  1149. var key = null;
  1150. var num = typeof value === 'number';
  1151. var str = typeof value === 'string';
  1152. var arr = Array.isArray(value);
  1153. if (num) {
  1154. key = 'number';
  1155. } else if (str) {
  1156. key = 'string';
  1157. } else if (arr) {
  1158. key = 'array';
  1159. } // if the value is not of a supported type for range validation
  1160. // the validation rule rule should use the
  1161. // type property to also test for a particular type
  1162. if (!key) {
  1163. return false;
  1164. }
  1165. if (arr) {
  1166. val = value.length;
  1167. }
  1168. if (str) {
  1169. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  1170. val = value.replace(spRegexp, '_').length;
  1171. }
  1172. if (len) {
  1173. if (val !== rule.len) {
  1174. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  1175. }
  1176. } else if (min && !max && val < rule.min) {
  1177. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  1178. } else if (max && !min && val > rule.max) {
  1179. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  1180. } else if (min && max && (val < rule.min || val > rule.max)) {
  1181. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  1182. }
  1183. }
  1184. var ENUM = 'enum';
  1185. /**
  1186. * Rule for validating a value exists in an enumerable list.
  1187. *
  1188. * @param rule The validation rule.
  1189. * @param value The value of the field on the source object.
  1190. * @param source The source object being validated.
  1191. * @param errors An array of errors that this rule may add
  1192. * validation errors to.
  1193. * @param options The validation options.
  1194. * @param options.messages The validation messages.
  1195. */
  1196. function enumerable(rule, value, source, errors, options) {
  1197. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  1198. if (rule[ENUM].indexOf(value) === -1) {
  1199. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  1200. }
  1201. }
  1202. /**
  1203. * Rule for validating a regular expression pattern.
  1204. *
  1205. * @param rule The validation rule.
  1206. * @param value The value of the field on the source object.
  1207. * @param source The source object being validated.
  1208. * @param errors An array of errors that this rule may add
  1209. * validation errors to.
  1210. * @param options The validation options.
  1211. * @param options.messages The validation messages.
  1212. */
  1213. function pattern$1(rule, value, source, errors, options) {
  1214. if (rule.pattern) {
  1215. if (rule.pattern instanceof RegExp) {
  1216. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  1217. // flag is accidentally set to `true`, which in a validation scenario
  1218. // is not necessary and the result might be misleading
  1219. rule.pattern.lastIndex = 0;
  1220. if (!rule.pattern.test(value)) {
  1221. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  1222. }
  1223. } else if (typeof rule.pattern === 'string') {
  1224. var _pattern = new RegExp(rule.pattern);
  1225. if (!_pattern.test(value)) {
  1226. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  1227. }
  1228. }
  1229. }
  1230. }
  1231. var rules = {
  1232. required: required,
  1233. whitespace: whitespace,
  1234. type: type,
  1235. range: range,
  1236. "enum": enumerable,
  1237. pattern: pattern$1
  1238. };
  1239. /**
  1240. * Performs validation for string types.
  1241. *
  1242. * @param rule The validation rule.
  1243. * @param value The value of the field on the source object.
  1244. * @param callback The callback function.
  1245. * @param source The source object being validated.
  1246. * @param options The validation options.
  1247. * @param options.messages The validation messages.
  1248. */
  1249. function string(rule, value, callback, source, options) {
  1250. var errors = [];
  1251. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1252. if (validate) {
  1253. if (isEmptyValue(value, 'string') && !rule.required) {
  1254. return callback();
  1255. }
  1256. rules.required(rule, value, source, errors, options, 'string');
  1257. if (!isEmptyValue(value, 'string')) {
  1258. rules.type(rule, value, source, errors, options);
  1259. rules.range(rule, value, source, errors, options);
  1260. rules.pattern(rule, value, source, errors, options);
  1261. if (rule.whitespace === true) {
  1262. rules.whitespace(rule, value, source, errors, options);
  1263. }
  1264. }
  1265. }
  1266. callback(errors);
  1267. }
  1268. /**
  1269. * Validates a function.
  1270. *
  1271. * @param rule The validation rule.
  1272. * @param value The value of the field on the source object.
  1273. * @param callback The callback function.
  1274. * @param source The source object being validated.
  1275. * @param options The validation options.
  1276. * @param options.messages The validation messages.
  1277. */
  1278. function method(rule, value, callback, source, options) {
  1279. var errors = [];
  1280. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1281. if (validate) {
  1282. if (isEmptyValue(value) && !rule.required) {
  1283. return callback();
  1284. }
  1285. rules.required(rule, value, source, errors, options);
  1286. if (value !== undefined) {
  1287. rules.type(rule, value, source, errors, options);
  1288. }
  1289. }
  1290. callback(errors);
  1291. }
  1292. /**
  1293. * Validates a number.
  1294. *
  1295. * @param rule The validation rule.
  1296. * @param value The value of the field on the source object.
  1297. * @param callback The callback function.
  1298. * @param source The source object being validated.
  1299. * @param options The validation options.
  1300. * @param options.messages The validation messages.
  1301. */
  1302. function number(rule, value, callback, source, options) {
  1303. var errors = [];
  1304. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1305. if (validate) {
  1306. if (value === '') {
  1307. value = undefined;
  1308. }
  1309. if (isEmptyValue(value) && !rule.required) {
  1310. return callback();
  1311. }
  1312. rules.required(rule, value, source, errors, options);
  1313. if (value !== undefined) {
  1314. rules.type(rule, value, source, errors, options);
  1315. rules.range(rule, value, source, errors, options);
  1316. }
  1317. }
  1318. callback(errors);
  1319. }
  1320. /**
  1321. * Validates a boolean.
  1322. *
  1323. * @param rule The validation rule.
  1324. * @param value The value of the field on the source object.
  1325. * @param callback The callback function.
  1326. * @param source The source object being validated.
  1327. * @param options The validation options.
  1328. * @param options.messages The validation messages.
  1329. */
  1330. function _boolean(rule, value, callback, source, options) {
  1331. var errors = [];
  1332. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1333. if (validate) {
  1334. if (isEmptyValue(value) && !rule.required) {
  1335. return callback();
  1336. }
  1337. rules.required(rule, value, source, errors, options);
  1338. if (value !== undefined) {
  1339. rules.type(rule, value, source, errors, options);
  1340. }
  1341. }
  1342. callback(errors);
  1343. }
  1344. /**
  1345. * Validates the regular expression type.
  1346. *
  1347. * @param rule The validation rule.
  1348. * @param value The value of the field on the source object.
  1349. * @param callback The callback function.
  1350. * @param source The source object being validated.
  1351. * @param options The validation options.
  1352. * @param options.messages The validation messages.
  1353. */
  1354. function regexp(rule, value, callback, source, options) {
  1355. var errors = [];
  1356. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1357. if (validate) {
  1358. if (isEmptyValue(value) && !rule.required) {
  1359. return callback();
  1360. }
  1361. rules.required(rule, value, source, errors, options);
  1362. if (!isEmptyValue(value)) {
  1363. rules.type(rule, value, source, errors, options);
  1364. }
  1365. }
  1366. callback(errors);
  1367. }
  1368. /**
  1369. * Validates a number is an integer.
  1370. *
  1371. * @param rule The validation rule.
  1372. * @param value The value of the field on the source object.
  1373. * @param callback The callback function.
  1374. * @param source The source object being validated.
  1375. * @param options The validation options.
  1376. * @param options.messages The validation messages.
  1377. */
  1378. function integer(rule, value, callback, source, options) {
  1379. var errors = [];
  1380. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1381. if (validate) {
  1382. if (isEmptyValue(value) && !rule.required) {
  1383. return callback();
  1384. }
  1385. rules.required(rule, value, source, errors, options);
  1386. if (value !== undefined) {
  1387. rules.type(rule, value, source, errors, options);
  1388. rules.range(rule, value, source, errors, options);
  1389. }
  1390. }
  1391. callback(errors);
  1392. }
  1393. /**
  1394. * Validates a number is a floating point number.
  1395. *
  1396. * @param rule The validation rule.
  1397. * @param value The value of the field on the source object.
  1398. * @param callback The callback function.
  1399. * @param source The source object being validated.
  1400. * @param options The validation options.
  1401. * @param options.messages The validation messages.
  1402. */
  1403. function floatFn(rule, value, callback, source, options) {
  1404. var errors = [];
  1405. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1406. if (validate) {
  1407. if (isEmptyValue(value) && !rule.required) {
  1408. return callback();
  1409. }
  1410. rules.required(rule, value, source, errors, options);
  1411. if (value !== undefined) {
  1412. rules.type(rule, value, source, errors, options);
  1413. rules.range(rule, value, source, errors, options);
  1414. }
  1415. }
  1416. callback(errors);
  1417. }
  1418. /**
  1419. * Validates an array.
  1420. *
  1421. * @param rule The validation rule.
  1422. * @param value The value of the field on the source object.
  1423. * @param callback The callback function.
  1424. * @param source The source object being validated.
  1425. * @param options The validation options.
  1426. * @param options.messages The validation messages.
  1427. */
  1428. function array(rule, value, callback, source, options) {
  1429. var errors = [];
  1430. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1431. if (validate) {
  1432. if (isEmptyValue(value, 'array') && !rule.required) {
  1433. return callback();
  1434. }
  1435. rules.required(rule, value, source, errors, options, 'array');
  1436. if (!isEmptyValue(value, 'array')) {
  1437. rules.type(rule, value, source, errors, options);
  1438. rules.range(rule, value, source, errors, options);
  1439. }
  1440. }
  1441. callback(errors);
  1442. }
  1443. /**
  1444. * Validates an object.
  1445. *
  1446. * @param rule The validation rule.
  1447. * @param value The value of the field on the source object.
  1448. * @param callback The callback function.
  1449. * @param source The source object being validated.
  1450. * @param options The validation options.
  1451. * @param options.messages The validation messages.
  1452. */
  1453. function object(rule, value, callback, source, options) {
  1454. var errors = [];
  1455. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1456. if (validate) {
  1457. if (isEmptyValue(value) && !rule.required) {
  1458. return callback();
  1459. }
  1460. rules.required(rule, value, source, errors, options);
  1461. if (value !== undefined) {
  1462. rules.type(rule, value, source, errors, options);
  1463. }
  1464. }
  1465. callback(errors);
  1466. }
  1467. var ENUM$1 = 'enum';
  1468. /**
  1469. * Validates an enumerable list.
  1470. *
  1471. * @param rule The validation rule.
  1472. * @param value The value of the field on the source object.
  1473. * @param callback The callback function.
  1474. * @param source The source object being validated.
  1475. * @param options The validation options.
  1476. * @param options.messages The validation messages.
  1477. */
  1478. function enumerable$1(rule, value, callback, source, options) {
  1479. var errors = [];
  1480. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1481. if (validate) {
  1482. if (isEmptyValue(value) && !rule.required) {
  1483. return callback();
  1484. }
  1485. rules.required(rule, value, source, errors, options);
  1486. if (value !== undefined) {
  1487. rules[ENUM$1](rule, value, source, errors, options);
  1488. }
  1489. }
  1490. callback(errors);
  1491. }
  1492. /**
  1493. * Validates a regular expression pattern.
  1494. *
  1495. * Performs validation when a rule only contains
  1496. * a pattern property but is not declared as a string type.
  1497. *
  1498. * @param rule The validation rule.
  1499. * @param value The value of the field on the source object.
  1500. * @param callback The callback function.
  1501. * @param source The source object being validated.
  1502. * @param options The validation options.
  1503. * @param options.messages The validation messages.
  1504. */
  1505. function pattern$2(rule, value, callback, source, options) {
  1506. var errors = [];
  1507. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1508. if (validate) {
  1509. if (isEmptyValue(value, 'string') && !rule.required) {
  1510. return callback();
  1511. }
  1512. rules.required(rule, value, source, errors, options);
  1513. if (!isEmptyValue(value, 'string')) {
  1514. rules.pattern(rule, value, source, errors, options);
  1515. }
  1516. }
  1517. callback(errors);
  1518. }
  1519. function date(rule, value, callback, source, options) {
  1520. var errors = [];
  1521. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1522. if (validate) {
  1523. if (isEmptyValue(value) && !rule.required) {
  1524. return callback();
  1525. }
  1526. rules.required(rule, value, source, errors, options);
  1527. if (!isEmptyValue(value)) {
  1528. var dateObject;
  1529. if (typeof value === 'number') {
  1530. dateObject = new Date(value);
  1531. } else {
  1532. dateObject = value;
  1533. }
  1534. rules.type(rule, dateObject, source, errors, options);
  1535. if (dateObject) {
  1536. rules.range(rule, dateObject.getTime(), source, errors, options);
  1537. }
  1538. }
  1539. }
  1540. callback(errors);
  1541. }
  1542. function required$1(rule, value, callback, source, options) {
  1543. var errors = [];
  1544. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  1545. rules.required(rule, value, source, errors, options, type);
  1546. callback(errors);
  1547. }
  1548. function type$1(rule, value, callback, source, options) {
  1549. var ruleType = rule.type;
  1550. var errors = [];
  1551. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1552. if (validate) {
  1553. if (isEmptyValue(value, ruleType) && !rule.required) {
  1554. return callback();
  1555. }
  1556. rules.required(rule, value, source, errors, options, ruleType);
  1557. if (!isEmptyValue(value, ruleType)) {
  1558. rules.type(rule, value, source, errors, options);
  1559. }
  1560. }
  1561. callback(errors);
  1562. }
  1563. /**
  1564. * Performs validation for any type.
  1565. *
  1566. * @param rule The validation rule.
  1567. * @param value The value of the field on the source object.
  1568. * @param callback The callback function.
  1569. * @param source The source object being validated.
  1570. * @param options The validation options.
  1571. * @param options.messages The validation messages.
  1572. */
  1573. function any(rule, value, callback, source, options) {
  1574. var errors = [];
  1575. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1576. if (validate) {
  1577. if (isEmptyValue(value) && !rule.required) {
  1578. return callback();
  1579. }
  1580. rules.required(rule, value, source, errors, options);
  1581. }
  1582. callback(errors);
  1583. }
  1584. var validators = {
  1585. string: string,
  1586. method: method,
  1587. number: number,
  1588. "boolean": _boolean,
  1589. regexp: regexp,
  1590. integer: integer,
  1591. "float": floatFn,
  1592. array: array,
  1593. object: object,
  1594. "enum": enumerable$1,
  1595. pattern: pattern$2,
  1596. date: date,
  1597. url: type$1,
  1598. hex: type$1,
  1599. email: type$1,
  1600. required: required$1,
  1601. any: any
  1602. };
  1603. function newMessages() {
  1604. return {
  1605. "default": 'Validation error on field %s',
  1606. required: '%s is required',
  1607. "enum": '%s must be one of %s',
  1608. whitespace: '%s cannot be empty',
  1609. date: {
  1610. format: '%s date %s is invalid for format %s',
  1611. parse: '%s date could not be parsed, %s is invalid ',
  1612. invalid: '%s date %s is invalid'
  1613. },
  1614. types: {
  1615. string: '%s is not a %s',
  1616. method: '%s is not a %s (function)',
  1617. array: '%s is not an %s',
  1618. object: '%s is not an %s',
  1619. number: '%s is not a %s',
  1620. date: '%s is not a %s',
  1621. "boolean": '%s is not a %s',
  1622. integer: '%s is not an %s',
  1623. "float": '%s is not a %s',
  1624. regexp: '%s is not a valid %s',
  1625. email: '%s is not a valid %s',
  1626. url: '%s is not a valid %s',
  1627. hex: '%s is not a valid %s'
  1628. },
  1629. string: {
  1630. len: '%s must be exactly %s characters',
  1631. min: '%s must be at least %s characters',
  1632. max: '%s cannot be longer than %s characters',
  1633. range: '%s must be between %s and %s characters'
  1634. },
  1635. number: {
  1636. len: '%s must equal %s',
  1637. min: '%s cannot be less than %s',
  1638. max: '%s cannot be greater than %s',
  1639. range: '%s must be between %s and %s'
  1640. },
  1641. array: {
  1642. len: '%s must be exactly %s in length',
  1643. min: '%s cannot be less than %s in length',
  1644. max: '%s cannot be greater than %s in length',
  1645. range: '%s must be between %s and %s in length'
  1646. },
  1647. pattern: {
  1648. mismatch: '%s value %s does not match pattern %s'
  1649. },
  1650. clone: function clone() {
  1651. var cloned = JSON.parse(JSON.stringify(this));
  1652. cloned.clone = this.clone;
  1653. return cloned;
  1654. }
  1655. };
  1656. }
  1657. var messages = newMessages();
  1658. /**
  1659. * Encapsulates a validation schema.
  1660. *
  1661. * @param descriptor An object declaring validation rules
  1662. * for this schema.
  1663. */
  1664. function Schema(descriptor) {
  1665. this.rules = null;
  1666. this._messages = messages;
  1667. this.define(descriptor);
  1668. }
  1669. Schema.prototype = {
  1670. messages: function messages(_messages) {
  1671. if (_messages) {
  1672. this._messages = deepMerge(newMessages(), _messages);
  1673. }
  1674. return this._messages;
  1675. },
  1676. define: function define(rules) {
  1677. if (!rules) {
  1678. throw new Error('Cannot configure a schema with no rules');
  1679. }
  1680. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  1681. throw new Error('Rules must be an object');
  1682. }
  1683. this.rules = {};
  1684. var z;
  1685. var item;
  1686. for (z in rules) {
  1687. if (rules.hasOwnProperty(z)) {
  1688. item = rules[z];
  1689. this.rules[z] = Array.isArray(item) ? item : [item];
  1690. }
  1691. }
  1692. },
  1693. validate: function validate(source_, o, oc) {
  1694. var _this = this;
  1695. if (o === void 0) {
  1696. o = {};
  1697. }
  1698. if (oc === void 0) {
  1699. oc = function oc() {};
  1700. }
  1701. var source = source_;
  1702. var options = o;
  1703. var callback = oc;
  1704. if (typeof options === 'function') {
  1705. callback = options;
  1706. options = {};
  1707. }
  1708. if (!this.rules || Object.keys(this.rules).length === 0) {
  1709. if (callback) {
  1710. callback();
  1711. }
  1712. return Promise.resolve();
  1713. }
  1714. function complete(results) {
  1715. var i;
  1716. var errors = [];
  1717. var fields = {};
  1718. function add(e) {
  1719. if (Array.isArray(e)) {
  1720. var _errors;
  1721. errors = (_errors = errors).concat.apply(_errors, e);
  1722. } else {
  1723. errors.push(e);
  1724. }
  1725. }
  1726. for (i = 0; i < results.length; i++) {
  1727. add(results[i]);
  1728. }
  1729. if (!errors.length) {
  1730. errors = null;
  1731. fields = null;
  1732. } else {
  1733. fields = convertFieldsError(errors);
  1734. }
  1735. callback(errors, fields);
  1736. }
  1737. if (options.messages) {
  1738. var messages$1 = this.messages();
  1739. if (messages$1 === messages) {
  1740. messages$1 = newMessages();
  1741. }
  1742. deepMerge(messages$1, options.messages);
  1743. options.messages = messages$1;
  1744. } else {
  1745. options.messages = this.messages();
  1746. }
  1747. var arr;
  1748. var value;
  1749. var series = {};
  1750. var keys = options.keys || Object.keys(this.rules);
  1751. keys.forEach(function (z) {
  1752. arr = _this.rules[z];
  1753. value = source[z];
  1754. arr.forEach(function (r) {
  1755. var rule = r;
  1756. if (typeof rule.transform === 'function') {
  1757. if (source === source_) {
  1758. source = _extends({}, source);
  1759. }
  1760. value = source[z] = rule.transform(value);
  1761. }
  1762. if (typeof rule === 'function') {
  1763. rule = {
  1764. validator: rule
  1765. };
  1766. } else {
  1767. rule = _extends({}, rule);
  1768. }
  1769. rule.validator = _this.getValidationMethod(rule);
  1770. rule.field = z;
  1771. rule.fullField = rule.fullField || z;
  1772. rule.type = _this.getType(rule);
  1773. if (!rule.validator) {
  1774. return;
  1775. }
  1776. series[z] = series[z] || [];
  1777. series[z].push({
  1778. rule: rule,
  1779. value: value,
  1780. source: source,
  1781. field: z
  1782. });
  1783. });
  1784. });
  1785. var errorFields = {};
  1786. return asyncMap(series, options, function (data, doIt) {
  1787. var rule = data.rule;
  1788. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  1789. deep = deep && (rule.required || !rule.required && data.value);
  1790. rule.field = data.field;
  1791. function addFullfield(key, schema) {
  1792. return _extends({}, schema, {
  1793. fullField: rule.fullField + "." + key
  1794. });
  1795. }
  1796. function cb(e) {
  1797. if (e === void 0) {
  1798. e = [];
  1799. }
  1800. var errors = e;
  1801. if (!Array.isArray(errors)) {
  1802. errors = [errors];
  1803. }
  1804. if (!options.suppressWarning && errors.length) {
  1805. Schema.warning('async-validator:', errors);
  1806. }
  1807. if (errors.length && rule.message) {
  1808. errors = [].concat(rule.message);
  1809. }
  1810. errors = errors.map(complementError(rule));
  1811. if (options.first && errors.length) {
  1812. errorFields[rule.field] = 1;
  1813. return doIt(errors);
  1814. }
  1815. if (!deep) {
  1816. doIt(errors);
  1817. } else {
  1818. // if rule is required but the target object
  1819. // does not exist fail at the rule level and don't
  1820. // go deeper
  1821. if (rule.required && !data.value) {
  1822. if (rule.message) {
  1823. errors = [].concat(rule.message).map(complementError(rule));
  1824. } else if (options.error) {
  1825. errors = [options.error(rule, format(options.messages.required, rule.field))];
  1826. } else {
  1827. errors = [];
  1828. }
  1829. return doIt(errors);
  1830. }
  1831. var fieldsSchema = {};
  1832. if (rule.defaultField) {
  1833. for (var k in data.value) {
  1834. if (data.value.hasOwnProperty(k)) {
  1835. fieldsSchema[k] = rule.defaultField;
  1836. }
  1837. }
  1838. }
  1839. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  1840. for (var f in fieldsSchema) {
  1841. if (fieldsSchema.hasOwnProperty(f)) {
  1842. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  1843. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  1844. }
  1845. }
  1846. var schema = new Schema(fieldsSchema);
  1847. schema.messages(options.messages);
  1848. if (data.rule.options) {
  1849. data.rule.options.messages = options.messages;
  1850. data.rule.options.error = options.error;
  1851. }
  1852. schema.validate(data.value, data.rule.options || options, function (errs) {
  1853. var finalErrors = [];
  1854. if (errors && errors.length) {
  1855. finalErrors.push.apply(finalErrors, errors);
  1856. }
  1857. if (errs && errs.length) {
  1858. finalErrors.push.apply(finalErrors, errs);
  1859. }
  1860. doIt(finalErrors.length ? finalErrors : null);
  1861. });
  1862. }
  1863. }
  1864. var res;
  1865. if (rule.asyncValidator) {
  1866. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  1867. } else if (rule.validator) {
  1868. res = rule.validator(rule, data.value, cb, data.source, options);
  1869. if (res === true) {
  1870. cb();
  1871. } else if (res === false) {
  1872. cb(rule.message || rule.field + " fails");
  1873. } else if (res instanceof Array) {
  1874. cb(res);
  1875. } else if (res instanceof Error) {
  1876. cb(res.message);
  1877. }
  1878. }
  1879. if (res && res.then) {
  1880. res.then(function () {
  1881. return cb();
  1882. }, function (e) {
  1883. return cb(e);
  1884. });
  1885. }
  1886. }, function (results) {
  1887. complete(results);
  1888. });
  1889. },
  1890. getType: function getType(rule) {
  1891. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  1892. rule.type = 'pattern';
  1893. }
  1894. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  1895. throw new Error(format('Unknown rule type %s', rule.type));
  1896. }
  1897. return rule.type || 'string';
  1898. },
  1899. getValidationMethod: function getValidationMethod(rule) {
  1900. if (typeof rule.validator === 'function') {
  1901. return rule.validator;
  1902. }
  1903. var keys = Object.keys(rule);
  1904. var messageIndex = keys.indexOf('message');
  1905. if (messageIndex !== -1) {
  1906. keys.splice(messageIndex, 1);
  1907. }
  1908. if (keys.length === 1 && keys[0] === 'required') {
  1909. return validators.required;
  1910. }
  1911. return validators[this.getType(rule)] || false;
  1912. }
  1913. };
  1914. Schema.register = function register(type, validator) {
  1915. if (typeof validator !== 'function') {
  1916. throw new Error('Cannot register a validator by type, validator is not a function');
  1917. }
  1918. validators[type] = validator;
  1919. };
  1920. Schema.warning = warning;
  1921. Schema.messages = messages;
  1922. var _default = Schema;
  1923. exports.default = _default;
  1924. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 87)))
  1925. /***/ }),
  1926. /***/ 108:
  1927. /*!************************************************************!*\
  1928. !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***!
  1929. \************************************************************/
  1930. /*! no static exports found */
  1931. /***/ (function(module, exports, __webpack_require__) {
  1932. "use strict";
  1933. // Copyright Joyent, Inc. and other Node contributors.
  1934. //
  1935. // Permission is hereby granted, free of charge, to any person obtaining a
  1936. // copy of this software and associated documentation files (the
  1937. // "Software"), to deal in the Software without restriction, including
  1938. // without limitation the rights to use, copy, modify, merge, publish,
  1939. // distribute, sublicense, and/or sell copies of the Software, and to permit
  1940. // persons to whom the Software is furnished to do so, subject to the
  1941. // following conditions:
  1942. //
  1943. // The above copyright notice and this permission notice shall be included
  1944. // in all copies or substantial portions of the Software.
  1945. //
  1946. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  1947. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  1948. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  1949. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  1950. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  1951. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  1952. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  1953. // a duplex stream is just a stream that is both readable and writable.
  1954. // Since JS doesn't have multiple prototypal inheritance, this class
  1955. // prototypally inherits from Readable, and then parasitically from
  1956. // Writable.
  1957. /*<replacement>*/
  1958. var pna = __webpack_require__(/*! process-nextick-args */ 100);
  1959. /*</replacement>*/
  1960. /*<replacement>*/
  1961. var objectKeys = Object.keys || function (obj) {
  1962. var keys = [];
  1963. for (var key in obj) {
  1964. keys.push(key);
  1965. }return keys;
  1966. };
  1967. /*</replacement>*/
  1968. module.exports = Duplex;
  1969. /*<replacement>*/
  1970. var util = Object.create(__webpack_require__(/*! core-util-is */ 103));
  1971. util.inherits = __webpack_require__(/*! inherits */ 95);
  1972. /*</replacement>*/
  1973. var Readable = __webpack_require__(/*! ./_stream_readable */ 99);
  1974. var Writable = __webpack_require__(/*! ./_stream_writable */ 109);
  1975. util.inherits(Duplex, Readable);
  1976. {
  1977. // avoid scope creep, the keys array can then be collected
  1978. var keys = objectKeys(Writable.prototype);
  1979. for (var v = 0; v < keys.length; v++) {
  1980. var method = keys[v];
  1981. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  1982. }
  1983. }
  1984. function Duplex(options) {
  1985. if (!(this instanceof Duplex)) return new Duplex(options);
  1986. Readable.call(this, options);
  1987. Writable.call(this, options);
  1988. if (options && options.readable === false) this.readable = false;
  1989. if (options && options.writable === false) this.writable = false;
  1990. this.allowHalfOpen = true;
  1991. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  1992. this.once('end', onend);
  1993. }
  1994. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  1995. // making it explicit this property is not enumerable
  1996. // because otherwise some prototype manipulation in
  1997. // userland will fail
  1998. enumerable: false,
  1999. get: function () {
  2000. return this._writableState.highWaterMark;
  2001. }
  2002. });
  2003. // the no-half-open enforcer
  2004. function onend() {
  2005. // if we allow half-open state, or if the writable side ended,
  2006. // then we're ok.
  2007. if (this.allowHalfOpen || this._writableState.ended) return;
  2008. // no more data can be written.
  2009. // But allow more writes to happen in this tick.
  2010. pna.nextTick(onEndNT, this);
  2011. }
  2012. function onEndNT(self) {
  2013. self.end();
  2014. }
  2015. Object.defineProperty(Duplex.prototype, 'destroyed', {
  2016. get: function () {
  2017. if (this._readableState === undefined || this._writableState === undefined) {
  2018. return false;
  2019. }
  2020. return this._readableState.destroyed && this._writableState.destroyed;
  2021. },
  2022. set: function (value) {
  2023. // we ignore the value if the stream
  2024. // has not been initialized yet
  2025. if (this._readableState === undefined || this._writableState === undefined) {
  2026. return;
  2027. }
  2028. // backward compatibility, the user is explicitly
  2029. // managing destroyed
  2030. this._readableState.destroyed = value;
  2031. this._writableState.destroyed = value;
  2032. }
  2033. });
  2034. Duplex.prototype._destroy = function (err, cb) {
  2035. this.push(null);
  2036. this.end();
  2037. pna.nextTick(cb, err);
  2038. };
  2039. /***/ }),
  2040. /***/ 109:
  2041. /*!**************************************************************!*\
  2042. !*** ./node_modules/readable-stream/lib/_stream_writable.js ***!
  2043. \**************************************************************/
  2044. /*! no static exports found */
  2045. /***/ (function(module, exports, __webpack_require__) {
  2046. "use strict";
  2047. /* WEBPACK VAR INJECTION */(function(process, global) {// Copyright Joyent, Inc. and other Node contributors.
  2048. //
  2049. // Permission is hereby granted, free of charge, to any person obtaining a
  2050. // copy of this software and associated documentation files (the
  2051. // "Software"), to deal in the Software without restriction, including
  2052. // without limitation the rights to use, copy, modify, merge, publish,
  2053. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2054. // persons to whom the Software is furnished to do so, subject to the
  2055. // following conditions:
  2056. //
  2057. // The above copyright notice and this permission notice shall be included
  2058. // in all copies or substantial portions of the Software.
  2059. //
  2060. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2061. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2062. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2063. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2064. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2065. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2066. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2067. // A bit simpler than readable streams.
  2068. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  2069. // the drain event emission and buffering.
  2070. /*<replacement>*/
  2071. var pna = __webpack_require__(/*! process-nextick-args */ 100);
  2072. /*</replacement>*/
  2073. module.exports = Writable;
  2074. /* <replacement> */
  2075. function WriteReq(chunk, encoding, cb) {
  2076. this.chunk = chunk;
  2077. this.encoding = encoding;
  2078. this.callback = cb;
  2079. this.next = null;
  2080. }
  2081. // It seems a linked list but it is not
  2082. // there will be only 2 of these for each stream
  2083. function CorkedRequest(state) {
  2084. var _this = this;
  2085. this.next = null;
  2086. this.entry = null;
  2087. this.finish = function () {
  2088. onCorkedFinish(_this, state);
  2089. };
  2090. }
  2091. /* </replacement> */
  2092. /*<replacement>*/
  2093. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
  2094. /*</replacement>*/
  2095. /*<replacement>*/
  2096. var Duplex;
  2097. /*</replacement>*/
  2098. Writable.WritableState = WritableState;
  2099. /*<replacement>*/
  2100. var util = Object.create(__webpack_require__(/*! core-util-is */ 103));
  2101. util.inherits = __webpack_require__(/*! inherits */ 95);
  2102. /*</replacement>*/
  2103. /*<replacement>*/
  2104. var internalUtil = {
  2105. deprecate: __webpack_require__(/*! util-deprecate */ 110)
  2106. };
  2107. /*</replacement>*/
  2108. /*<replacement>*/
  2109. var Stream = __webpack_require__(/*! ./internal/streams/stream */ 102);
  2110. /*</replacement>*/
  2111. /*<replacement>*/
  2112. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer;
  2113. var OurUint8Array = global.Uint8Array || function () {};
  2114. function _uint8ArrayToBuffer(chunk) {
  2115. return Buffer.from(chunk);
  2116. }
  2117. function _isUint8Array(obj) {
  2118. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  2119. }
  2120. /*</replacement>*/
  2121. var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 107);
  2122. util.inherits(Writable, Stream);
  2123. function nop() {}
  2124. function WritableState(options, stream) {
  2125. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 108);
  2126. options = options || {};
  2127. // Duplex streams are both readable and writable, but share
  2128. // the same options object.
  2129. // However, some cases require setting options to different
  2130. // values for the readable and the writable sides of the duplex stream.
  2131. // These options can be provided separately as readableXXX and writableXXX.
  2132. var isDuplex = stream instanceof Duplex;
  2133. // object stream flag to indicate whether or not this stream
  2134. // contains buffers or objects.
  2135. this.objectMode = !!options.objectMode;
  2136. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
  2137. // the point at which write() starts returning false
  2138. // Note: 0 is a valid value, means that we always return false if
  2139. // the entire buffer is not flushed immediately on write()
  2140. var hwm = options.highWaterMark;
  2141. var writableHwm = options.writableHighWaterMark;
  2142. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  2143. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
  2144. // cast to ints.
  2145. this.highWaterMark = Math.floor(this.highWaterMark);
  2146. // if _final has been called
  2147. this.finalCalled = false;
  2148. // drain event flag.
  2149. this.needDrain = false;
  2150. // at the start of calling end()
  2151. this.ending = false;
  2152. // when end() has been called, and returned
  2153. this.ended = false;
  2154. // when 'finish' is emitted
  2155. this.finished = false;
  2156. // has it been destroyed
  2157. this.destroyed = false;
  2158. // should we decode strings into buffers before passing to _write?
  2159. // this is here so that some node-core streams can optimize string
  2160. // handling at a lower level.
  2161. var noDecode = options.decodeStrings === false;
  2162. this.decodeStrings = !noDecode;
  2163. // Crypto is kind of old and crusty. Historically, its default string
  2164. // encoding is 'binary' so we have to make this configurable.
  2165. // Everything else in the universe uses 'utf8', though.
  2166. this.defaultEncoding = options.defaultEncoding || 'utf8';
  2167. // not an actual buffer we keep track of, but a measurement
  2168. // of how much we're waiting to get pushed to some underlying
  2169. // socket or file.
  2170. this.length = 0;
  2171. // a flag to see when we're in the middle of a write.
  2172. this.writing = false;
  2173. // when true all writes will be buffered until .uncork() call
  2174. this.corked = 0;
  2175. // a flag to be able to tell if the onwrite cb is called immediately,
  2176. // or on a later tick. We set this to true at first, because any
  2177. // actions that shouldn't happen until "later" should generally also
  2178. // not happen before the first write call.
  2179. this.sync = true;
  2180. // a flag to know if we're processing previously buffered items, which
  2181. // may call the _write() callback in the same tick, so that we don't
  2182. // end up in an overlapped onwrite situation.
  2183. this.bufferProcessing = false;
  2184. // the callback that's passed to _write(chunk,cb)
  2185. this.onwrite = function (er) {
  2186. onwrite(stream, er);
  2187. };
  2188. // the callback that the user supplies to write(chunk,encoding,cb)
  2189. this.writecb = null;
  2190. // the amount that is being written when _write is called.
  2191. this.writelen = 0;
  2192. this.bufferedRequest = null;
  2193. this.lastBufferedRequest = null;
  2194. // number of pending user-supplied write callbacks
  2195. // this must be 0 before 'finish' can be emitted
  2196. this.pendingcb = 0;
  2197. // emit prefinish if the only thing we're waiting for is _write cbs
  2198. // This is relevant for synchronous Transform streams
  2199. this.prefinished = false;
  2200. // True if the error was already emitted and should not be thrown again
  2201. this.errorEmitted = false;
  2202. // count buffered requests
  2203. this.bufferedRequestCount = 0;
  2204. // allocate the first CorkedRequest, there is always
  2205. // one allocated and free to use, and we maintain at most two
  2206. this.corkedRequestsFree = new CorkedRequest(this);
  2207. }
  2208. WritableState.prototype.getBuffer = function getBuffer() {
  2209. var current = this.bufferedRequest;
  2210. var out = [];
  2211. while (current) {
  2212. out.push(current);
  2213. current = current.next;
  2214. }
  2215. return out;
  2216. };
  2217. (function () {
  2218. try {
  2219. Object.defineProperty(WritableState.prototype, 'buffer', {
  2220. get: internalUtil.deprecate(function () {
  2221. return this.getBuffer();
  2222. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  2223. });
  2224. } catch (_) {}
  2225. })();
  2226. // Test _writableState for inheritance to account for Duplex streams,
  2227. // whose prototype chain only points to Readable.
  2228. var realHasInstance;
  2229. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  2230. realHasInstance = Function.prototype[Symbol.hasInstance];
  2231. Object.defineProperty(Writable, Symbol.hasInstance, {
  2232. value: function (object) {
  2233. if (realHasInstance.call(this, object)) return true;
  2234. if (this !== Writable) return false;
  2235. return object && object._writableState instanceof WritableState;
  2236. }
  2237. });
  2238. } else {
  2239. realHasInstance = function (object) {
  2240. return object instanceof this;
  2241. };
  2242. }
  2243. function Writable(options) {
  2244. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 108);
  2245. // Writable ctor is applied to Duplexes, too.
  2246. // `realHasInstance` is necessary because using plain `instanceof`
  2247. // would return false, as no `_writableState` property is attached.
  2248. // Trying to use the custom `instanceof` for Writable here will also break the
  2249. // Node.js LazyTransform implementation, which has a non-trivial getter for
  2250. // `_writableState` that would lead to infinite recursion.
  2251. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  2252. return new Writable(options);
  2253. }
  2254. this._writableState = new WritableState(options, this);
  2255. // legacy.
  2256. this.writable = true;
  2257. if (options) {
  2258. if (typeof options.write === 'function') this._write = options.write;
  2259. if (typeof options.writev === 'function') this._writev = options.writev;
  2260. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  2261. if (typeof options.final === 'function') this._final = options.final;
  2262. }
  2263. Stream.call(this);
  2264. }
  2265. // Otherwise people can pipe Writable streams, which is just wrong.
  2266. Writable.prototype.pipe = function () {
  2267. this.emit('error', new Error('Cannot pipe, not readable'));
  2268. };
  2269. function writeAfterEnd(stream, cb) {
  2270. var er = new Error('write after end');
  2271. // TODO: defer error events consistently everywhere, not just the cb
  2272. stream.emit('error', er);
  2273. pna.nextTick(cb, er);
  2274. }
  2275. // Checks that a user-supplied chunk is valid, especially for the particular
  2276. // mode the stream is in. Currently this means that `null` is never accepted
  2277. // and undefined/non-string values are only allowed in object mode.
  2278. function validChunk(stream, state, chunk, cb) {
  2279. var valid = true;
  2280. var er = false;
  2281. if (chunk === null) {
  2282. er = new TypeError('May not write null values to stream');
  2283. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  2284. er = new TypeError('Invalid non-string/buffer chunk');
  2285. }
  2286. if (er) {
  2287. stream.emit('error', er);
  2288. pna.nextTick(cb, er);
  2289. valid = false;
  2290. }
  2291. return valid;
  2292. }
  2293. Writable.prototype.write = function (chunk, encoding, cb) {
  2294. var state = this._writableState;
  2295. var ret = false;
  2296. var isBuf = !state.objectMode && _isUint8Array(chunk);
  2297. if (isBuf && !Buffer.isBuffer(chunk)) {
  2298. chunk = _uint8ArrayToBuffer(chunk);
  2299. }
  2300. if (typeof encoding === 'function') {
  2301. cb = encoding;
  2302. encoding = null;
  2303. }
  2304. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  2305. if (typeof cb !== 'function') cb = nop;
  2306. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  2307. state.pendingcb++;
  2308. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  2309. }
  2310. return ret;
  2311. };
  2312. Writable.prototype.cork = function () {
  2313. var state = this._writableState;
  2314. state.corked++;
  2315. };
  2316. Writable.prototype.uncork = function () {
  2317. var state = this._writableState;
  2318. if (state.corked) {
  2319. state.corked--;
  2320. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  2321. }
  2322. };
  2323. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  2324. // node::ParseEncoding() requires lower case.
  2325. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  2326. 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);
  2327. this._writableState.defaultEncoding = encoding;
  2328. return this;
  2329. };
  2330. function decodeChunk(state, chunk, encoding) {
  2331. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  2332. chunk = Buffer.from(chunk, encoding);
  2333. }
  2334. return chunk;
  2335. }
  2336. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  2337. // making it explicit this property is not enumerable
  2338. // because otherwise some prototype manipulation in
  2339. // userland will fail
  2340. enumerable: false,
  2341. get: function () {
  2342. return this._writableState.highWaterMark;
  2343. }
  2344. });
  2345. // if we're already writing something, then just put this
  2346. // in the queue, and wait our turn. Otherwise, call _write
  2347. // If we return false, then we need a drain event, so set that flag.
  2348. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  2349. if (!isBuf) {
  2350. var newChunk = decodeChunk(state, chunk, encoding);
  2351. if (chunk !== newChunk) {
  2352. isBuf = true;
  2353. encoding = 'buffer';
  2354. chunk = newChunk;
  2355. }
  2356. }
  2357. var len = state.objectMode ? 1 : chunk.length;
  2358. state.length += len;
  2359. var ret = state.length < state.highWaterMark;
  2360. // we must ensure that previous needDrain will not be reset to false.
  2361. if (!ret) state.needDrain = true;
  2362. if (state.writing || state.corked) {
  2363. var last = state.lastBufferedRequest;
  2364. state.lastBufferedRequest = {
  2365. chunk: chunk,
  2366. encoding: encoding,
  2367. isBuf: isBuf,
  2368. callback: cb,
  2369. next: null
  2370. };
  2371. if (last) {
  2372. last.next = state.lastBufferedRequest;
  2373. } else {
  2374. state.bufferedRequest = state.lastBufferedRequest;
  2375. }
  2376. state.bufferedRequestCount += 1;
  2377. } else {
  2378. doWrite(stream, state, false, len, chunk, encoding, cb);
  2379. }
  2380. return ret;
  2381. }
  2382. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  2383. state.writelen = len;
  2384. state.writecb = cb;
  2385. state.writing = true;
  2386. state.sync = true;
  2387. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  2388. state.sync = false;
  2389. }
  2390. function onwriteError(stream, state, sync, er, cb) {
  2391. --state.pendingcb;
  2392. if (sync) {
  2393. // defer the callback if we are being called synchronously
  2394. // to avoid piling up things on the stack
  2395. pna.nextTick(cb, er);
  2396. // this can emit finish, and it will always happen
  2397. // after error
  2398. pna.nextTick(finishMaybe, stream, state);
  2399. stream._writableState.errorEmitted = true;
  2400. stream.emit('error', er);
  2401. } else {
  2402. // the caller expect this to happen before if
  2403. // it is async
  2404. cb(er);
  2405. stream._writableState.errorEmitted = true;
  2406. stream.emit('error', er);
  2407. // this can emit finish, but finish must
  2408. // always follow error
  2409. finishMaybe(stream, state);
  2410. }
  2411. }
  2412. function onwriteStateUpdate(state) {
  2413. state.writing = false;
  2414. state.writecb = null;
  2415. state.length -= state.writelen;
  2416. state.writelen = 0;
  2417. }
  2418. function onwrite(stream, er) {
  2419. var state = stream._writableState;
  2420. var sync = state.sync;
  2421. var cb = state.writecb;
  2422. onwriteStateUpdate(state);
  2423. if (er) onwriteError(stream, state, sync, er, cb);else {
  2424. // Check if we're actually ready to finish, but don't emit yet
  2425. var finished = needFinish(state);
  2426. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  2427. clearBuffer(stream, state);
  2428. }
  2429. if (sync) {
  2430. /*<replacement>*/
  2431. asyncWrite(afterWrite, stream, state, finished, cb);
  2432. /*</replacement>*/
  2433. } else {
  2434. afterWrite(stream, state, finished, cb);
  2435. }
  2436. }
  2437. }
  2438. function afterWrite(stream, state, finished, cb) {
  2439. if (!finished) onwriteDrain(stream, state);
  2440. state.pendingcb--;
  2441. cb();
  2442. finishMaybe(stream, state);
  2443. }
  2444. // Must force callback to be called on nextTick, so that we don't
  2445. // emit 'drain' before the write() consumer gets the 'false' return
  2446. // value, and has a chance to attach a 'drain' listener.
  2447. function onwriteDrain(stream, state) {
  2448. if (state.length === 0 && state.needDrain) {
  2449. state.needDrain = false;
  2450. stream.emit('drain');
  2451. }
  2452. }
  2453. // if there's something in the buffer waiting, then process it
  2454. function clearBuffer(stream, state) {
  2455. state.bufferProcessing = true;
  2456. var entry = state.bufferedRequest;
  2457. if (stream._writev && entry && entry.next) {
  2458. // Fast case, write everything using _writev()
  2459. var l = state.bufferedRequestCount;
  2460. var buffer = new Array(l);
  2461. var holder = state.corkedRequestsFree;
  2462. holder.entry = entry;
  2463. var count = 0;
  2464. var allBuffers = true;
  2465. while (entry) {
  2466. buffer[count] = entry;
  2467. if (!entry.isBuf) allBuffers = false;
  2468. entry = entry.next;
  2469. count += 1;
  2470. }
  2471. buffer.allBuffers = allBuffers;
  2472. doWrite(stream, state, true, state.length, buffer, '', holder.finish);
  2473. // doWrite is almost always async, defer these to save a bit of time
  2474. // as the hot path ends with doWrite
  2475. state.pendingcb++;
  2476. state.lastBufferedRequest = null;
  2477. if (holder.next) {
  2478. state.corkedRequestsFree = holder.next;
  2479. holder.next = null;
  2480. } else {
  2481. state.corkedRequestsFree = new CorkedRequest(state);
  2482. }
  2483. state.bufferedRequestCount = 0;
  2484. } else {
  2485. // Slow case, write chunks one-by-one
  2486. while (entry) {
  2487. var chunk = entry.chunk;
  2488. var encoding = entry.encoding;
  2489. var cb = entry.callback;
  2490. var len = state.objectMode ? 1 : chunk.length;
  2491. doWrite(stream, state, false, len, chunk, encoding, cb);
  2492. entry = entry.next;
  2493. state.bufferedRequestCount--;
  2494. // if we didn't call the onwrite immediately, then
  2495. // it means that we need to wait until it does.
  2496. // also, that means that the chunk and cb are currently
  2497. // being processed, so move the buffer counter past them.
  2498. if (state.writing) {
  2499. break;
  2500. }
  2501. }
  2502. if (entry === null) state.lastBufferedRequest = null;
  2503. }
  2504. state.bufferedRequest = entry;
  2505. state.bufferProcessing = false;
  2506. }
  2507. Writable.prototype._write = function (chunk, encoding, cb) {
  2508. cb(new Error('_write() is not implemented'));
  2509. };
  2510. Writable.prototype._writev = null;
  2511. Writable.prototype.end = function (chunk, encoding, cb) {
  2512. var state = this._writableState;
  2513. if (typeof chunk === 'function') {
  2514. cb = chunk;
  2515. chunk = null;
  2516. encoding = null;
  2517. } else if (typeof encoding === 'function') {
  2518. cb = encoding;
  2519. encoding = null;
  2520. }
  2521. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
  2522. // .end() fully uncorks
  2523. if (state.corked) {
  2524. state.corked = 1;
  2525. this.uncork();
  2526. }
  2527. // ignore unnecessary end() calls.
  2528. if (!state.ending && !state.finished) endWritable(this, state, cb);
  2529. };
  2530. function needFinish(state) {
  2531. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  2532. }
  2533. function callFinal(stream, state) {
  2534. stream._final(function (err) {
  2535. state.pendingcb--;
  2536. if (err) {
  2537. stream.emit('error', err);
  2538. }
  2539. state.prefinished = true;
  2540. stream.emit('prefinish');
  2541. finishMaybe(stream, state);
  2542. });
  2543. }
  2544. function prefinish(stream, state) {
  2545. if (!state.prefinished && !state.finalCalled) {
  2546. if (typeof stream._final === 'function') {
  2547. state.pendingcb++;
  2548. state.finalCalled = true;
  2549. pna.nextTick(callFinal, stream, state);
  2550. } else {
  2551. state.prefinished = true;
  2552. stream.emit('prefinish');
  2553. }
  2554. }
  2555. }
  2556. function finishMaybe(stream, state) {
  2557. var need = needFinish(state);
  2558. if (need) {
  2559. prefinish(stream, state);
  2560. if (state.pendingcb === 0) {
  2561. state.finished = true;
  2562. stream.emit('finish');
  2563. }
  2564. }
  2565. return need;
  2566. }
  2567. function endWritable(stream, state, cb) {
  2568. state.ending = true;
  2569. finishMaybe(stream, state);
  2570. if (cb) {
  2571. if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  2572. }
  2573. state.ended = true;
  2574. stream.writable = false;
  2575. }
  2576. function onCorkedFinish(corkReq, state, err) {
  2577. var entry = corkReq.entry;
  2578. corkReq.entry = null;
  2579. while (entry) {
  2580. var cb = entry.callback;
  2581. state.pendingcb--;
  2582. cb(err);
  2583. entry = entry.next;
  2584. }
  2585. if (state.corkedRequestsFree) {
  2586. state.corkedRequestsFree.next = corkReq;
  2587. } else {
  2588. state.corkedRequestsFree = corkReq;
  2589. }
  2590. }
  2591. Object.defineProperty(Writable.prototype, 'destroyed', {
  2592. get: function () {
  2593. if (this._writableState === undefined) {
  2594. return false;
  2595. }
  2596. return this._writableState.destroyed;
  2597. },
  2598. set: function (value) {
  2599. // we ignore the value if the stream
  2600. // has not been initialized yet
  2601. if (!this._writableState) {
  2602. return;
  2603. }
  2604. // backward compatibility, the user is explicitly
  2605. // managing destroyed
  2606. this._writableState.destroyed = value;
  2607. }
  2608. });
  2609. Writable.prototype.destroy = destroyImpl.destroy;
  2610. Writable.prototype._undestroy = destroyImpl.undestroy;
  2611. Writable.prototype._destroy = function (err, cb) {
  2612. this.end();
  2613. cb(err);
  2614. };
  2615. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ 87), __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  2616. /***/ }),
  2617. /***/ 1099:
  2618. /*!*******************************************************************!*\
  2619. !*** E:/yunfei/product1/bigDataApp/components/uni-icons/icons.js ***!
  2620. \*******************************************************************/
  2621. /*! no static exports found */
  2622. /***/ (function(module, exports, __webpack_require__) {
  2623. "use strict";
  2624. Object.defineProperty(exports, "__esModule", {
  2625. value: true
  2626. });
  2627. exports.default = void 0;
  2628. var _default = {
  2629. 'contact': "\uE100",
  2630. 'person': "\uE101",
  2631. 'personadd': "\uE102",
  2632. 'contact-filled': "\uE130",
  2633. 'person-filled': "\uE131",
  2634. 'personadd-filled': "\uE132",
  2635. 'phone': "\uE200",
  2636. 'email': "\uE201",
  2637. 'chatbubble': "\uE202",
  2638. 'chatboxes': "\uE203",
  2639. 'phone-filled': "\uE230",
  2640. 'email-filled': "\uE231",
  2641. 'chatbubble-filled': "\uE232",
  2642. 'chatboxes-filled': "\uE233",
  2643. 'weibo': "\uE260",
  2644. 'weixin': "\uE261",
  2645. 'pengyouquan': "\uE262",
  2646. 'chat': "\uE263",
  2647. 'qq': "\uE264",
  2648. 'videocam': "\uE300",
  2649. 'camera': "\uE301",
  2650. 'mic': "\uE302",
  2651. 'location': "\uE303",
  2652. 'mic-filled': "\uE332",
  2653. 'speech': "\uE332",
  2654. 'location-filled': "\uE333",
  2655. 'micoff': "\uE360",
  2656. 'image': "\uE363",
  2657. 'map': "\uE364",
  2658. 'compose': "\uE400",
  2659. 'trash': "\uE401",
  2660. 'upload': "\uE402",
  2661. 'download': "\uE403",
  2662. 'close': "\uE404",
  2663. 'redo': "\uE405",
  2664. 'undo': "\uE406",
  2665. 'refresh': "\uE407",
  2666. 'star': "\uE408",
  2667. 'plus': "\uE409",
  2668. 'minus': "\uE410",
  2669. 'circle': "\uE411",
  2670. 'checkbox': "\uE411",
  2671. 'close-filled': "\uE434",
  2672. 'clear': "\uE434",
  2673. 'refresh-filled': "\uE437",
  2674. 'star-filled': "\uE438",
  2675. 'plus-filled': "\uE439",
  2676. 'minus-filled': "\uE440",
  2677. 'circle-filled': "\uE441",
  2678. 'checkbox-filled': "\uE442",
  2679. 'closeempty': "\uE460",
  2680. 'refreshempty': "\uE461",
  2681. 'reload': "\uE462",
  2682. 'starhalf': "\uE463",
  2683. 'spinner': "\uE464",
  2684. 'spinner-cycle': "\uE465",
  2685. 'search': "\uE466",
  2686. 'plusempty': "\uE468",
  2687. 'forward': "\uE470",
  2688. 'back': "\uE471",
  2689. 'left-nav': "\uE471",
  2690. 'checkmarkempty': "\uE472",
  2691. 'home': "\uE500",
  2692. 'navigate': "\uE501",
  2693. 'gear': "\uE502",
  2694. 'paperplane': "\uE503",
  2695. 'info': "\uE504",
  2696. 'help': "\uE505",
  2697. 'locked': "\uE506",
  2698. 'more': "\uE507",
  2699. 'flag': "\uE508",
  2700. 'home-filled': "\uE530",
  2701. 'gear-filled': "\uE532",
  2702. 'info-filled': "\uE534",
  2703. 'help-filled': "\uE535",
  2704. 'more-filled': "\uE537",
  2705. 'settings': "\uE560",
  2706. 'list': "\uE562",
  2707. 'bars': "\uE563",
  2708. 'loop': "\uE565",
  2709. 'paperclip': "\uE567",
  2710. 'eye': "\uE568",
  2711. 'arrowup': "\uE580",
  2712. 'arrowdown': "\uE581",
  2713. 'arrowleft': "\uE582",
  2714. 'arrowright': "\uE583",
  2715. 'arrowthinup': "\uE584",
  2716. 'arrowthindown': "\uE585",
  2717. 'arrowthinleft': "\uE586",
  2718. 'arrowthinright': "\uE587",
  2719. 'pulldown': "\uE588",
  2720. 'closefill': "\uE589",
  2721. 'sound': "\uE590",
  2722. 'scan': "\uE612"
  2723. };
  2724. exports.default = _default;
  2725. /***/ }),
  2726. /***/ 11:
  2727. /*!***************************************************************!*\
  2728. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2729. \***************************************************************/
  2730. /*! no static exports found */
  2731. /***/ (function(module, exports, __webpack_require__) {
  2732. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2733. function _defineProperty(obj, key, value) {
  2734. key = toPropertyKey(key);
  2735. if (key in obj) {
  2736. Object.defineProperty(obj, key, {
  2737. value: value,
  2738. enumerable: true,
  2739. configurable: true,
  2740. writable: true
  2741. });
  2742. } else {
  2743. obj[key] = value;
  2744. }
  2745. return obj;
  2746. }
  2747. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2748. /***/ }),
  2749. /***/ 110:
  2750. /*!************************************************!*\
  2751. !*** ./node_modules/util-deprecate/browser.js ***!
  2752. \************************************************/
  2753. /*! no static exports found */
  2754. /***/ (function(module, exports, __webpack_require__) {
  2755. /* WEBPACK VAR INJECTION */(function(global) {
  2756. /**
  2757. * Module exports.
  2758. */
  2759. module.exports = deprecate;
  2760. /**
  2761. * Mark that a method should not be used.
  2762. * Returns a modified function which warns once by default.
  2763. *
  2764. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  2765. *
  2766. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  2767. * will throw an Error when invoked.
  2768. *
  2769. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  2770. * will invoke `console.trace()` instead of `console.error()`.
  2771. *
  2772. * @param {Function} fn - the function to deprecate
  2773. * @param {String} msg - the string to print to the console when `fn` is invoked
  2774. * @returns {Function} a new "deprecated" version of `fn`
  2775. * @api public
  2776. */
  2777. function deprecate (fn, msg) {
  2778. if (config('noDeprecation')) {
  2779. return fn;
  2780. }
  2781. var warned = false;
  2782. function deprecated() {
  2783. if (!warned) {
  2784. if (config('throwDeprecation')) {
  2785. throw new Error(msg);
  2786. } else if (config('traceDeprecation')) {
  2787. console.trace(msg);
  2788. } else {
  2789. console.warn(msg);
  2790. }
  2791. warned = true;
  2792. }
  2793. return fn.apply(this, arguments);
  2794. }
  2795. return deprecated;
  2796. }
  2797. /**
  2798. * Checks `localStorage` for boolean values for the given `name`.
  2799. *
  2800. * @param {String} name
  2801. * @returns {Boolean}
  2802. * @api private
  2803. */
  2804. function config (name) {
  2805. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  2806. try {
  2807. if (!global.localStorage) return false;
  2808. } catch (_) {
  2809. return false;
  2810. }
  2811. var val = global.localStorage[name];
  2812. if (null == val) return false;
  2813. return String(val).toLowerCase() === 'true';
  2814. }
  2815. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  2816. /***/ }),
  2817. /***/ 111:
  2818. /*!***********************************************************!*\
  2819. !*** ./node_modules/string_decoder/lib/string_decoder.js ***!
  2820. \***********************************************************/
  2821. /*! no static exports found */
  2822. /***/ (function(module, exports, __webpack_require__) {
  2823. "use strict";
  2824. // Copyright Joyent, Inc. and other Node contributors.
  2825. //
  2826. // Permission is hereby granted, free of charge, to any person obtaining a
  2827. // copy of this software and associated documentation files (the
  2828. // "Software"), to deal in the Software without restriction, including
  2829. // without limitation the rights to use, copy, modify, merge, publish,
  2830. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2831. // persons to whom the Software is furnished to do so, subject to the
  2832. // following conditions:
  2833. //
  2834. // The above copyright notice and this permission notice shall be included
  2835. // in all copies or substantial portions of the Software.
  2836. //
  2837. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2838. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2839. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2840. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2841. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2842. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2843. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2844. /*<replacement>*/
  2845. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer;
  2846. /*</replacement>*/
  2847. var isEncoding = Buffer.isEncoding || function (encoding) {
  2848. encoding = '' + encoding;
  2849. switch (encoding && encoding.toLowerCase()) {
  2850. case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
  2851. return true;
  2852. default:
  2853. return false;
  2854. }
  2855. };
  2856. function _normalizeEncoding(enc) {
  2857. if (!enc) return 'utf8';
  2858. var retried;
  2859. while (true) {
  2860. switch (enc) {
  2861. case 'utf8':
  2862. case 'utf-8':
  2863. return 'utf8';
  2864. case 'ucs2':
  2865. case 'ucs-2':
  2866. case 'utf16le':
  2867. case 'utf-16le':
  2868. return 'utf16le';
  2869. case 'latin1':
  2870. case 'binary':
  2871. return 'latin1';
  2872. case 'base64':
  2873. case 'ascii':
  2874. case 'hex':
  2875. return enc;
  2876. default:
  2877. if (retried) return; // undefined
  2878. enc = ('' + enc).toLowerCase();
  2879. retried = true;
  2880. }
  2881. }
  2882. };
  2883. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  2884. // modules monkey-patch it to support additional encodings
  2885. function normalizeEncoding(enc) {
  2886. var nenc = _normalizeEncoding(enc);
  2887. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  2888. return nenc || enc;
  2889. }
  2890. // StringDecoder provides an interface for efficiently splitting a series of
  2891. // buffers into a series of JS strings without breaking apart multi-byte
  2892. // characters.
  2893. exports.StringDecoder = StringDecoder;
  2894. function StringDecoder(encoding) {
  2895. this.encoding = normalizeEncoding(encoding);
  2896. var nb;
  2897. switch (this.encoding) {
  2898. case 'utf16le':
  2899. this.text = utf16Text;
  2900. this.end = utf16End;
  2901. nb = 4;
  2902. break;
  2903. case 'utf8':
  2904. this.fillLast = utf8FillLast;
  2905. nb = 4;
  2906. break;
  2907. case 'base64':
  2908. this.text = base64Text;
  2909. this.end = base64End;
  2910. nb = 3;
  2911. break;
  2912. default:
  2913. this.write = simpleWrite;
  2914. this.end = simpleEnd;
  2915. return;
  2916. }
  2917. this.lastNeed = 0;
  2918. this.lastTotal = 0;
  2919. this.lastChar = Buffer.allocUnsafe(nb);
  2920. }
  2921. StringDecoder.prototype.write = function (buf) {
  2922. if (buf.length === 0) return '';
  2923. var r;
  2924. var i;
  2925. if (this.lastNeed) {
  2926. r = this.fillLast(buf);
  2927. if (r === undefined) return '';
  2928. i = this.lastNeed;
  2929. this.lastNeed = 0;
  2930. } else {
  2931. i = 0;
  2932. }
  2933. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  2934. return r || '';
  2935. };
  2936. StringDecoder.prototype.end = utf8End;
  2937. // Returns only complete characters in a Buffer
  2938. StringDecoder.prototype.text = utf8Text;
  2939. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  2940. StringDecoder.prototype.fillLast = function (buf) {
  2941. if (this.lastNeed <= buf.length) {
  2942. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  2943. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  2944. }
  2945. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  2946. this.lastNeed -= buf.length;
  2947. };
  2948. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  2949. // continuation byte. If an invalid byte is detected, -2 is returned.
  2950. function utf8CheckByte(byte) {
  2951. 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;
  2952. return byte >> 6 === 0x02 ? -1 : -2;
  2953. }
  2954. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  2955. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  2956. // needed to complete the UTF-8 character (if applicable) are returned.
  2957. function utf8CheckIncomplete(self, buf, i) {
  2958. var j = buf.length - 1;
  2959. if (j < i) return 0;
  2960. var nb = utf8CheckByte(buf[j]);
  2961. if (nb >= 0) {
  2962. if (nb > 0) self.lastNeed = nb - 1;
  2963. return nb;
  2964. }
  2965. if (--j < i || nb === -2) return 0;
  2966. nb = utf8CheckByte(buf[j]);
  2967. if (nb >= 0) {
  2968. if (nb > 0) self.lastNeed = nb - 2;
  2969. return nb;
  2970. }
  2971. if (--j < i || nb === -2) return 0;
  2972. nb = utf8CheckByte(buf[j]);
  2973. if (nb >= 0) {
  2974. if (nb > 0) {
  2975. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  2976. }
  2977. return nb;
  2978. }
  2979. return 0;
  2980. }
  2981. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  2982. // needed or are available. If we see a non-continuation byte where we expect
  2983. // one, we "replace" the validated continuation bytes we've seen so far with
  2984. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  2985. // behavior. The continuation byte check is included three times in the case
  2986. // where all of the continuation bytes for a character exist in the same buffer.
  2987. // It is also done this way as a slight performance increase instead of using a
  2988. // loop.
  2989. function utf8CheckExtraBytes(self, buf, p) {
  2990. if ((buf[0] & 0xC0) !== 0x80) {
  2991. self.lastNeed = 0;
  2992. return '\ufffd';
  2993. }
  2994. if (self.lastNeed > 1 && buf.length > 1) {
  2995. if ((buf[1] & 0xC0) !== 0x80) {
  2996. self.lastNeed = 1;
  2997. return '\ufffd';
  2998. }
  2999. if (self.lastNeed > 2 && buf.length > 2) {
  3000. if ((buf[2] & 0xC0) !== 0x80) {
  3001. self.lastNeed = 2;
  3002. return '\ufffd';
  3003. }
  3004. }
  3005. }
  3006. }
  3007. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  3008. function utf8FillLast(buf) {
  3009. var p = this.lastTotal - this.lastNeed;
  3010. var r = utf8CheckExtraBytes(this, buf, p);
  3011. if (r !== undefined) return r;
  3012. if (this.lastNeed <= buf.length) {
  3013. buf.copy(this.lastChar, p, 0, this.lastNeed);
  3014. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  3015. }
  3016. buf.copy(this.lastChar, p, 0, buf.length);
  3017. this.lastNeed -= buf.length;
  3018. }
  3019. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  3020. // partial character, the character's bytes are buffered until the required
  3021. // number of bytes are available.
  3022. function utf8Text(buf, i) {
  3023. var total = utf8CheckIncomplete(this, buf, i);
  3024. if (!this.lastNeed) return buf.toString('utf8', i);
  3025. this.lastTotal = total;
  3026. var end = buf.length - (total - this.lastNeed);
  3027. buf.copy(this.lastChar, 0, end);
  3028. return buf.toString('utf8', i, end);
  3029. }
  3030. // For UTF-8, a replacement character is added when ending on a partial
  3031. // character.
  3032. function utf8End(buf) {
  3033. var r = buf && buf.length ? this.write(buf) : '';
  3034. if (this.lastNeed) return r + '\ufffd';
  3035. return r;
  3036. }
  3037. // UTF-16LE typically needs two bytes per character, but even if we have an even
  3038. // number of bytes available, we need to check if we end on a leading/high
  3039. // surrogate. In that case, we need to wait for the next two bytes in order to
  3040. // decode the last character properly.
  3041. function utf16Text(buf, i) {
  3042. if ((buf.length - i) % 2 === 0) {
  3043. var r = buf.toString('utf16le', i);
  3044. if (r) {
  3045. var c = r.charCodeAt(r.length - 1);
  3046. if (c >= 0xD800 && c <= 0xDBFF) {
  3047. this.lastNeed = 2;
  3048. this.lastTotal = 4;
  3049. this.lastChar[0] = buf[buf.length - 2];
  3050. this.lastChar[1] = buf[buf.length - 1];
  3051. return r.slice(0, -1);
  3052. }
  3053. }
  3054. return r;
  3055. }
  3056. this.lastNeed = 1;
  3057. this.lastTotal = 2;
  3058. this.lastChar[0] = buf[buf.length - 1];
  3059. return buf.toString('utf16le', i, buf.length - 1);
  3060. }
  3061. // For UTF-16LE we do not explicitly append special replacement characters if we
  3062. // end on a partial character, we simply let v8 handle that.
  3063. function utf16End(buf) {
  3064. var r = buf && buf.length ? this.write(buf) : '';
  3065. if (this.lastNeed) {
  3066. var end = this.lastTotal - this.lastNeed;
  3067. return r + this.lastChar.toString('utf16le', 0, end);
  3068. }
  3069. return r;
  3070. }
  3071. function base64Text(buf, i) {
  3072. var n = (buf.length - i) % 3;
  3073. if (n === 0) return buf.toString('base64', i);
  3074. this.lastNeed = 3 - n;
  3075. this.lastTotal = 3;
  3076. if (n === 1) {
  3077. this.lastChar[0] = buf[buf.length - 1];
  3078. } else {
  3079. this.lastChar[0] = buf[buf.length - 2];
  3080. this.lastChar[1] = buf[buf.length - 1];
  3081. }
  3082. return buf.toString('base64', i, buf.length - n);
  3083. }
  3084. function base64End(buf) {
  3085. var r = buf && buf.length ? this.write(buf) : '';
  3086. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  3087. return r;
  3088. }
  3089. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  3090. function simpleWrite(buf) {
  3091. return buf.toString(this.encoding);
  3092. }
  3093. function simpleEnd(buf) {
  3094. return buf && buf.length ? this.write(buf) : '';
  3095. }
  3096. /***/ }),
  3097. /***/ 112:
  3098. /*!***************************************************************!*\
  3099. !*** ./node_modules/readable-stream/lib/_stream_transform.js ***!
  3100. \***************************************************************/
  3101. /*! no static exports found */
  3102. /***/ (function(module, exports, __webpack_require__) {
  3103. "use strict";
  3104. // Copyright Joyent, Inc. and other Node contributors.
  3105. //
  3106. // Permission is hereby granted, free of charge, to any person obtaining a
  3107. // copy of this software and associated documentation files (the
  3108. // "Software"), to deal in the Software without restriction, including
  3109. // without limitation the rights to use, copy, modify, merge, publish,
  3110. // distribute, sublicense, and/or sell copies of the Software, and to permit
  3111. // persons to whom the Software is furnished to do so, subject to the
  3112. // following conditions:
  3113. //
  3114. // The above copyright notice and this permission notice shall be included
  3115. // in all copies or substantial portions of the Software.
  3116. //
  3117. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  3118. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3119. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  3120. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  3121. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  3122. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  3123. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  3124. // a transform stream is a readable/writable stream where you do
  3125. // something with the data. Sometimes it's called a "filter",
  3126. // but that's not a great name for it, since that implies a thing where
  3127. // some bits pass through, and others are simply ignored. (That would
  3128. // be a valid example of a transform, of course.)
  3129. //
  3130. // While the output is causally related to the input, it's not a
  3131. // necessarily symmetric or synchronous transformation. For example,
  3132. // a zlib stream might take multiple plain-text writes(), and then
  3133. // emit a single compressed chunk some time in the future.
  3134. //
  3135. // Here's how this works:
  3136. //
  3137. // The Transform stream has all the aspects of the readable and writable
  3138. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  3139. // internally, and returns false if there's a lot of pending writes
  3140. // buffered up. When you call read(), that calls _read(n) until
  3141. // there's enough pending readable data buffered up.
  3142. //
  3143. // In a transform stream, the written data is placed in a buffer. When
  3144. // _read(n) is called, it transforms the queued up data, calling the
  3145. // buffered _write cb's as it consumes chunks. If consuming a single
  3146. // written chunk would result in multiple output chunks, then the first
  3147. // outputted bit calls the readcb, and subsequent chunks just go into
  3148. // the read buffer, and will cause it to emit 'readable' if necessary.
  3149. //
  3150. // This way, back-pressure is actually determined by the reading side,
  3151. // since _read has to be called to start processing a new chunk. However,
  3152. // a pathological inflate type of transform can cause excessive buffering
  3153. // here. For example, imagine a stream where every byte of input is
  3154. // interpreted as an integer from 0-255, and then results in that many
  3155. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  3156. // 1kb of data being output. In this case, you could write a very small
  3157. // amount of input, and end up with a very large amount of output. In
  3158. // such a pathological inflating mechanism, there'd be no way to tell
  3159. // the system to stop doing the transform. A single 4MB write could
  3160. // cause the system to run out of memory.
  3161. //
  3162. // However, even in such a pathological case, only a single written chunk
  3163. // would be consumed, and then the rest would wait (un-transformed) until
  3164. // the results of the previous transformed chunk were consumed.
  3165. module.exports = Transform;
  3166. var Duplex = __webpack_require__(/*! ./_stream_duplex */ 108);
  3167. /*<replacement>*/
  3168. var util = Object.create(__webpack_require__(/*! core-util-is */ 103));
  3169. util.inherits = __webpack_require__(/*! inherits */ 95);
  3170. /*</replacement>*/
  3171. util.inherits(Transform, Duplex);
  3172. function afterTransform(er, data) {
  3173. var ts = this._transformState;
  3174. ts.transforming = false;
  3175. var cb = ts.writecb;
  3176. if (!cb) {
  3177. return this.emit('error', new Error('write callback called multiple times'));
  3178. }
  3179. ts.writechunk = null;
  3180. ts.writecb = null;
  3181. if (data != null) // single equals check for both `null` and `undefined`
  3182. this.push(data);
  3183. cb(er);
  3184. var rs = this._readableState;
  3185. rs.reading = false;
  3186. if (rs.needReadable || rs.length < rs.highWaterMark) {
  3187. this._read(rs.highWaterMark);
  3188. }
  3189. }
  3190. function Transform(options) {
  3191. if (!(this instanceof Transform)) return new Transform(options);
  3192. Duplex.call(this, options);
  3193. this._transformState = {
  3194. afterTransform: afterTransform.bind(this),
  3195. needTransform: false,
  3196. transforming: false,
  3197. writecb: null,
  3198. writechunk: null,
  3199. writeencoding: null
  3200. };
  3201. // start out asking for a readable event once data is transformed.
  3202. this._readableState.needReadable = true;
  3203. // we have implemented the _read method, and done the other things
  3204. // that Readable wants before the first _read call, so unset the
  3205. // sync guard flag.
  3206. this._readableState.sync = false;
  3207. if (options) {
  3208. if (typeof options.transform === 'function') this._transform = options.transform;
  3209. if (typeof options.flush === 'function') this._flush = options.flush;
  3210. }
  3211. // When the writable side finishes, then flush out anything remaining.
  3212. this.on('prefinish', prefinish);
  3213. }
  3214. function prefinish() {
  3215. var _this = this;
  3216. if (typeof this._flush === 'function') {
  3217. this._flush(function (er, data) {
  3218. done(_this, er, data);
  3219. });
  3220. } else {
  3221. done(this, null, null);
  3222. }
  3223. }
  3224. Transform.prototype.push = function (chunk, encoding) {
  3225. this._transformState.needTransform = false;
  3226. return Duplex.prototype.push.call(this, chunk, encoding);
  3227. };
  3228. // This is the part where you do stuff!
  3229. // override this function in implementation classes.
  3230. // 'chunk' is an input chunk.
  3231. //
  3232. // Call `push(newChunk)` to pass along transformed output
  3233. // to the readable side. You may call 'push' zero or more times.
  3234. //
  3235. // Call `cb(err)` when you are done with this chunk. If you pass
  3236. // an error, then that'll put the hurt on the whole operation. If you
  3237. // never call cb(), then you'll never get another chunk.
  3238. Transform.prototype._transform = function (chunk, encoding, cb) {
  3239. throw new Error('_transform() is not implemented');
  3240. };
  3241. Transform.prototype._write = function (chunk, encoding, cb) {
  3242. var ts = this._transformState;
  3243. ts.writecb = cb;
  3244. ts.writechunk = chunk;
  3245. ts.writeencoding = encoding;
  3246. if (!ts.transforming) {
  3247. var rs = this._readableState;
  3248. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  3249. }
  3250. };
  3251. // Doesn't matter what the args are here.
  3252. // _transform does all the work.
  3253. // That we got here means that the readable side wants more data.
  3254. Transform.prototype._read = function (n) {
  3255. var ts = this._transformState;
  3256. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  3257. ts.transforming = true;
  3258. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  3259. } else {
  3260. // mark that we need a transform, so that any data that comes in
  3261. // will get processed, now that we've asked for it.
  3262. ts.needTransform = true;
  3263. }
  3264. };
  3265. Transform.prototype._destroy = function (err, cb) {
  3266. var _this2 = this;
  3267. Duplex.prototype._destroy.call(this, err, function (err2) {
  3268. cb(err2);
  3269. _this2.emit('close');
  3270. });
  3271. };
  3272. function done(stream, er, data) {
  3273. if (er) return stream.emit('error', er);
  3274. if (data != null) // single equals check for both `null` and `undefined`
  3275. stream.push(data);
  3276. // if there's nothing in the write buffer, then that means
  3277. // that nothing more will ever be provided
  3278. if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
  3279. if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
  3280. return stream.push(null);
  3281. }
  3282. /***/ }),
  3283. /***/ 1121:
  3284. /*!********************************************************************!*\
  3285. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/util/province.js ***!
  3286. \********************************************************************/
  3287. /*! no static exports found */
  3288. /***/ (function(module, exports, __webpack_require__) {
  3289. "use strict";
  3290. Object.defineProperty(exports, "__esModule", {
  3291. value: true
  3292. });
  3293. exports.default = void 0;
  3294. var provinceData = [{
  3295. "label": "北京市",
  3296. "value": "11"
  3297. }, {
  3298. "label": "天津市",
  3299. "value": "12"
  3300. }, {
  3301. "label": "河北省",
  3302. "value": "13"
  3303. }, {
  3304. "label": "山西省",
  3305. "value": "14"
  3306. }, {
  3307. "label": "内蒙古自治区",
  3308. "value": "15"
  3309. }, {
  3310. "label": "辽宁省",
  3311. "value": "21"
  3312. }, {
  3313. "label": "吉林省",
  3314. "value": "22"
  3315. }, {
  3316. "label": "黑龙江省",
  3317. "value": "23"
  3318. }, {
  3319. "label": "上海市",
  3320. "value": "31"
  3321. }, {
  3322. "label": "江苏省",
  3323. "value": "32"
  3324. }, {
  3325. "label": "浙江省",
  3326. "value": "33"
  3327. }, {
  3328. "label": "安徽省",
  3329. "value": "34"
  3330. }, {
  3331. "label": "福建省",
  3332. "value": "35"
  3333. }, {
  3334. "label": "江西省",
  3335. "value": "36"
  3336. }, {
  3337. "label": "山东省",
  3338. "value": "37"
  3339. }, {
  3340. "label": "河南省",
  3341. "value": "41"
  3342. }, {
  3343. "label": "湖北省",
  3344. "value": "42"
  3345. }, {
  3346. "label": "湖南省",
  3347. "value": "43"
  3348. }, {
  3349. "label": "广东省",
  3350. "value": "44"
  3351. }, {
  3352. "label": "广西壮族自治区",
  3353. "value": "45"
  3354. }, {
  3355. "label": "海南省",
  3356. "value": "46"
  3357. }, {
  3358. "label": "重庆市",
  3359. "value": "50"
  3360. }, {
  3361. "label": "四川省",
  3362. "value": "51"
  3363. }, {
  3364. "label": "贵州省",
  3365. "value": "52"
  3366. }, {
  3367. "label": "云南省",
  3368. "value": "53"
  3369. }, {
  3370. "label": "西藏自治区",
  3371. "value": "54"
  3372. }, {
  3373. "label": "陕西省",
  3374. "value": "61"
  3375. }, {
  3376. "label": "甘肃省",
  3377. "value": "62"
  3378. }, {
  3379. "label": "青海省",
  3380. "value": "63"
  3381. }, {
  3382. "label": "宁夏回族自治区",
  3383. "value": "64"
  3384. }, {
  3385. "label": "新疆维吾尔自治区",
  3386. "value": "65"
  3387. }, {
  3388. "label": "台湾",
  3389. "value": "66"
  3390. }, {
  3391. "label": "香港",
  3392. "value": "67"
  3393. }, {
  3394. "label": "澳门",
  3395. "value": "68"
  3396. }];
  3397. var _default = provinceData;
  3398. exports.default = _default;
  3399. /***/ }),
  3400. /***/ 1122:
  3401. /*!****************************************************************!*\
  3402. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/util/city.js ***!
  3403. \****************************************************************/
  3404. /*! no static exports found */
  3405. /***/ (function(module, exports, __webpack_require__) {
  3406. "use strict";
  3407. Object.defineProperty(exports, "__esModule", {
  3408. value: true
  3409. });
  3410. exports.default = void 0;
  3411. var cityData = [[{
  3412. "label": "市辖区",
  3413. "value": "1101"
  3414. }], [{
  3415. "label": "市辖区",
  3416. "value": "1201"
  3417. }], [{
  3418. "label": "石家庄市",
  3419. "value": "1301"
  3420. }, {
  3421. "label": "唐山市",
  3422. "value": "1302"
  3423. }, {
  3424. "label": "秦皇岛市",
  3425. "value": "1303"
  3426. }, {
  3427. "label": "邯郸市",
  3428. "value": "1304"
  3429. }, {
  3430. "label": "邢台市",
  3431. "value": "1305"
  3432. }, {
  3433. "label": "保定市",
  3434. "value": "1306"
  3435. }, {
  3436. "label": "张家口市",
  3437. "value": "1307"
  3438. }, {
  3439. "label": "承德市",
  3440. "value": "1308"
  3441. }, {
  3442. "label": "沧州市",
  3443. "value": "1309"
  3444. }, {
  3445. "label": "廊坊市",
  3446. "value": "1310"
  3447. }, {
  3448. "label": "衡水市",
  3449. "value": "1311"
  3450. }], [{
  3451. "label": "太原市",
  3452. "value": "1401"
  3453. }, {
  3454. "label": "大同市",
  3455. "value": "1402"
  3456. }, {
  3457. "label": "阳泉市",
  3458. "value": "1403"
  3459. }, {
  3460. "label": "长治市",
  3461. "value": "1404"
  3462. }, {
  3463. "label": "晋城市",
  3464. "value": "1405"
  3465. }, {
  3466. "label": "朔州市",
  3467. "value": "1406"
  3468. }, {
  3469. "label": "晋中市",
  3470. "value": "1407"
  3471. }, {
  3472. "label": "运城市",
  3473. "value": "1408"
  3474. }, {
  3475. "label": "忻州市",
  3476. "value": "1409"
  3477. }, {
  3478. "label": "临汾市",
  3479. "value": "1410"
  3480. }, {
  3481. "label": "吕梁市",
  3482. "value": "1411"
  3483. }], [{
  3484. "label": "呼和浩特市",
  3485. "value": "1501"
  3486. }, {
  3487. "label": "包头市",
  3488. "value": "1502"
  3489. }, {
  3490. "label": "乌海市",
  3491. "value": "1503"
  3492. }, {
  3493. "label": "赤峰市",
  3494. "value": "1504"
  3495. }, {
  3496. "label": "通辽市",
  3497. "value": "1505"
  3498. }, {
  3499. "label": "鄂尔多斯市",
  3500. "value": "1506"
  3501. }, {
  3502. "label": "呼伦贝尔市",
  3503. "value": "1507"
  3504. }, {
  3505. "label": "巴彦淖尔市",
  3506. "value": "1508"
  3507. }, {
  3508. "label": "乌兰察布市",
  3509. "value": "1509"
  3510. }, {
  3511. "label": "兴安盟",
  3512. "value": "1522"
  3513. }, {
  3514. "label": "锡林郭勒盟",
  3515. "value": "1525"
  3516. }, {
  3517. "label": "阿拉善盟",
  3518. "value": "1529"
  3519. }], [{
  3520. "label": "沈阳市",
  3521. "value": "2101"
  3522. }, {
  3523. "label": "大连市",
  3524. "value": "2102"
  3525. }, {
  3526. "label": "鞍山市",
  3527. "value": "2103"
  3528. }, {
  3529. "label": "抚顺市",
  3530. "value": "2104"
  3531. }, {
  3532. "label": "本溪市",
  3533. "value": "2105"
  3534. }, {
  3535. "label": "丹东市",
  3536. "value": "2106"
  3537. }, {
  3538. "label": "锦州市",
  3539. "value": "2107"
  3540. }, {
  3541. "label": "营口市",
  3542. "value": "2108"
  3543. }, {
  3544. "label": "阜新市",
  3545. "value": "2109"
  3546. }, {
  3547. "label": "辽阳市",
  3548. "value": "2110"
  3549. }, {
  3550. "label": "盘锦市",
  3551. "value": "2111"
  3552. }, {
  3553. "label": "铁岭市",
  3554. "value": "2112"
  3555. }, {
  3556. "label": "朝阳市",
  3557. "value": "2113"
  3558. }, {
  3559. "label": "葫芦岛市",
  3560. "value": "2114"
  3561. }], [{
  3562. "label": "长春市",
  3563. "value": "2201"
  3564. }, {
  3565. "label": "吉林市",
  3566. "value": "2202"
  3567. }, {
  3568. "label": "四平市",
  3569. "value": "2203"
  3570. }, {
  3571. "label": "辽源市",
  3572. "value": "2204"
  3573. }, {
  3574. "label": "通化市",
  3575. "value": "2205"
  3576. }, {
  3577. "label": "白山市",
  3578. "value": "2206"
  3579. }, {
  3580. "label": "松原市",
  3581. "value": "2207"
  3582. }, {
  3583. "label": "白城市",
  3584. "value": "2208"
  3585. }, {
  3586. "label": "延边朝鲜族自治州",
  3587. "value": "2224"
  3588. }], [{
  3589. "label": "哈尔滨市",
  3590. "value": "2301"
  3591. }, {
  3592. "label": "齐齐哈尔市",
  3593. "value": "2302"
  3594. }, {
  3595. "label": "鸡西市",
  3596. "value": "2303"
  3597. }, {
  3598. "label": "鹤岗市",
  3599. "value": "2304"
  3600. }, {
  3601. "label": "双鸭山市",
  3602. "value": "2305"
  3603. }, {
  3604. "label": "大庆市",
  3605. "value": "2306"
  3606. }, {
  3607. "label": "伊春市",
  3608. "value": "2307"
  3609. }, {
  3610. "label": "佳木斯市",
  3611. "value": "2308"
  3612. }, {
  3613. "label": "七台河市",
  3614. "value": "2309"
  3615. }, {
  3616. "label": "牡丹江市",
  3617. "value": "2310"
  3618. }, {
  3619. "label": "黑河市",
  3620. "value": "2311"
  3621. }, {
  3622. "label": "绥化市",
  3623. "value": "2312"
  3624. }, {
  3625. "label": "大兴安岭地区",
  3626. "value": "2327"
  3627. }], [{
  3628. "label": "市辖区",
  3629. "value": "3101"
  3630. }], [{
  3631. "label": "南京市",
  3632. "value": "3201"
  3633. }, {
  3634. "label": "无锡市",
  3635. "value": "3202"
  3636. }, {
  3637. "label": "徐州市",
  3638. "value": "3203"
  3639. }, {
  3640. "label": "常州市",
  3641. "value": "3204"
  3642. }, {
  3643. "label": "苏州市",
  3644. "value": "3205"
  3645. }, {
  3646. "label": "南通市",
  3647. "value": "3206"
  3648. }, {
  3649. "label": "连云港市",
  3650. "value": "3207"
  3651. }, {
  3652. "label": "淮安市",
  3653. "value": "3208"
  3654. }, {
  3655. "label": "盐城市",
  3656. "value": "3209"
  3657. }, {
  3658. "label": "扬州市",
  3659. "value": "3210"
  3660. }, {
  3661. "label": "镇江市",
  3662. "value": "3211"
  3663. }, {
  3664. "label": "泰州市",
  3665. "value": "3212"
  3666. }, {
  3667. "label": "宿迁市",
  3668. "value": "3213"
  3669. }], [{
  3670. "label": "杭州市",
  3671. "value": "3301"
  3672. }, {
  3673. "label": "宁波市",
  3674. "value": "3302"
  3675. }, {
  3676. "label": "温州市",
  3677. "value": "3303"
  3678. }, {
  3679. "label": "嘉兴市",
  3680. "value": "3304"
  3681. }, {
  3682. "label": "湖州市",
  3683. "value": "3305"
  3684. }, {
  3685. "label": "绍兴市",
  3686. "value": "3306"
  3687. }, {
  3688. "label": "金华市",
  3689. "value": "3307"
  3690. }, {
  3691. "label": "衢州市",
  3692. "value": "3308"
  3693. }, {
  3694. "label": "舟山市",
  3695. "value": "3309"
  3696. }, {
  3697. "label": "台州市",
  3698. "value": "3310"
  3699. }, {
  3700. "label": "丽水市",
  3701. "value": "3311"
  3702. }], [{
  3703. "label": "合肥市",
  3704. "value": "3401"
  3705. }, {
  3706. "label": "芜湖市",
  3707. "value": "3402"
  3708. }, {
  3709. "label": "蚌埠市",
  3710. "value": "3403"
  3711. }, {
  3712. "label": "淮南市",
  3713. "value": "3404"
  3714. }, {
  3715. "label": "马鞍山市",
  3716. "value": "3405"
  3717. }, {
  3718. "label": "淮北市",
  3719. "value": "3406"
  3720. }, {
  3721. "label": "铜陵市",
  3722. "value": "3407"
  3723. }, {
  3724. "label": "安庆市",
  3725. "value": "3408"
  3726. }, {
  3727. "label": "黄山市",
  3728. "value": "3410"
  3729. }, {
  3730. "label": "滁州市",
  3731. "value": "3411"
  3732. }, {
  3733. "label": "阜阳市",
  3734. "value": "3412"
  3735. }, {
  3736. "label": "宿州市",
  3737. "value": "3413"
  3738. }, {
  3739. "label": "六安市",
  3740. "value": "3415"
  3741. }, {
  3742. "label": "亳州市",
  3743. "value": "3416"
  3744. }, {
  3745. "label": "池州市",
  3746. "value": "3417"
  3747. }, {
  3748. "label": "宣城市",
  3749. "value": "3418"
  3750. }], [{
  3751. "label": "福州市",
  3752. "value": "3501"
  3753. }, {
  3754. "label": "厦门市",
  3755. "value": "3502"
  3756. }, {
  3757. "label": "莆田市",
  3758. "value": "3503"
  3759. }, {
  3760. "label": "三明市",
  3761. "value": "3504"
  3762. }, {
  3763. "label": "泉州市",
  3764. "value": "3505"
  3765. }, {
  3766. "label": "漳州市",
  3767. "value": "3506"
  3768. }, {
  3769. "label": "南平市",
  3770. "value": "3507"
  3771. }, {
  3772. "label": "龙岩市",
  3773. "value": "3508"
  3774. }, {
  3775. "label": "宁德市",
  3776. "value": "3509"
  3777. }], [{
  3778. "label": "南昌市",
  3779. "value": "3601"
  3780. }, {
  3781. "label": "景德镇市",
  3782. "value": "3602"
  3783. }, {
  3784. "label": "萍乡市",
  3785. "value": "3603"
  3786. }, {
  3787. "label": "九江市",
  3788. "value": "3604"
  3789. }, {
  3790. "label": "新余市",
  3791. "value": "3605"
  3792. }, {
  3793. "label": "鹰潭市",
  3794. "value": "3606"
  3795. }, {
  3796. "label": "赣州市",
  3797. "value": "3607"
  3798. }, {
  3799. "label": "吉安市",
  3800. "value": "3608"
  3801. }, {
  3802. "label": "宜春市",
  3803. "value": "3609"
  3804. }, {
  3805. "label": "抚州市",
  3806. "value": "3610"
  3807. }, {
  3808. "label": "上饶市",
  3809. "value": "3611"
  3810. }], [{
  3811. "label": "济南市",
  3812. "value": "3701"
  3813. }, {
  3814. "label": "青岛市",
  3815. "value": "3702"
  3816. }, {
  3817. "label": "淄博市",
  3818. "value": "3703"
  3819. }, {
  3820. "label": "枣庄市",
  3821. "value": "3704"
  3822. }, {
  3823. "label": "东营市",
  3824. "value": "3705"
  3825. }, {
  3826. "label": "烟台市",
  3827. "value": "3706"
  3828. }, {
  3829. "label": "潍坊市",
  3830. "value": "3707"
  3831. }, {
  3832. "label": "济宁市",
  3833. "value": "3708"
  3834. }, {
  3835. "label": "泰安市",
  3836. "value": "3709"
  3837. }, {
  3838. "label": "威海市",
  3839. "value": "3710"
  3840. }, {
  3841. "label": "日照市",
  3842. "value": "3711"
  3843. }, {
  3844. "label": "莱芜市",
  3845. "value": "3712"
  3846. }, {
  3847. "label": "临沂市",
  3848. "value": "3713"
  3849. }, {
  3850. "label": "德州市",
  3851. "value": "3714"
  3852. }, {
  3853. "label": "聊城市",
  3854. "value": "3715"
  3855. }, {
  3856. "label": "滨州市",
  3857. "value": "3716"
  3858. }, {
  3859. "label": "菏泽市",
  3860. "value": "3717"
  3861. }], [{
  3862. "label": "郑州市",
  3863. "value": "4101"
  3864. }, {
  3865. "label": "开封市",
  3866. "value": "4102"
  3867. }, {
  3868. "label": "洛阳市",
  3869. "value": "4103"
  3870. }, {
  3871. "label": "平顶山市",
  3872. "value": "4104"
  3873. }, {
  3874. "label": "安阳市",
  3875. "value": "4105"
  3876. }, {
  3877. "label": "鹤壁市",
  3878. "value": "4106"
  3879. }, {
  3880. "label": "新乡市",
  3881. "value": "4107"
  3882. }, {
  3883. "label": "焦作市",
  3884. "value": "4108"
  3885. }, {
  3886. "label": "濮阳市",
  3887. "value": "4109"
  3888. }, {
  3889. "label": "许昌市",
  3890. "value": "4110"
  3891. }, {
  3892. "label": "漯河市",
  3893. "value": "4111"
  3894. }, {
  3895. "label": "三门峡市",
  3896. "value": "4112"
  3897. }, {
  3898. "label": "南阳市",
  3899. "value": "4113"
  3900. }, {
  3901. "label": "商丘市",
  3902. "value": "4114"
  3903. }, {
  3904. "label": "信阳市",
  3905. "value": "4115"
  3906. }, {
  3907. "label": "周口市",
  3908. "value": "4116"
  3909. }, {
  3910. "label": "驻马店市",
  3911. "value": "4117"
  3912. }, {
  3913. "label": "省直辖县级行政区划",
  3914. "value": "4190"
  3915. }], [{
  3916. "label": "武汉市",
  3917. "value": "4201"
  3918. }, {
  3919. "label": "黄石市",
  3920. "value": "4202"
  3921. }, {
  3922. "label": "十堰市",
  3923. "value": "4203"
  3924. }, {
  3925. "label": "宜昌市",
  3926. "value": "4205"
  3927. }, {
  3928. "label": "襄阳市",
  3929. "value": "4206"
  3930. }, {
  3931. "label": "鄂州市",
  3932. "value": "4207"
  3933. }, {
  3934. "label": "荆门市",
  3935. "value": "4208"
  3936. }, {
  3937. "label": "孝感市",
  3938. "value": "4209"
  3939. }, {
  3940. "label": "荆州市",
  3941. "value": "4210"
  3942. }, {
  3943. "label": "黄冈市",
  3944. "value": "4211"
  3945. }, {
  3946. "label": "咸宁市",
  3947. "value": "4212"
  3948. }, {
  3949. "label": "随州市",
  3950. "value": "4213"
  3951. }, {
  3952. "label": "恩施土家族苗族自治州",
  3953. "value": "4228"
  3954. }, {
  3955. "label": "省直辖县级行政区划",
  3956. "value": "4290"
  3957. }], [{
  3958. "label": "长沙市",
  3959. "value": "4301"
  3960. }, {
  3961. "label": "株洲市",
  3962. "value": "4302"
  3963. }, {
  3964. "label": "湘潭市",
  3965. "value": "4303"
  3966. }, {
  3967. "label": "衡阳市",
  3968. "value": "4304"
  3969. }, {
  3970. "label": "邵阳市",
  3971. "value": "4305"
  3972. }, {
  3973. "label": "岳阳市",
  3974. "value": "4306"
  3975. }, {
  3976. "label": "常德市",
  3977. "value": "4307"
  3978. }, {
  3979. "label": "张家界市",
  3980. "value": "4308"
  3981. }, {
  3982. "label": "益阳市",
  3983. "value": "4309"
  3984. }, {
  3985. "label": "郴州市",
  3986. "value": "4310"
  3987. }, {
  3988. "label": "永州市",
  3989. "value": "4311"
  3990. }, {
  3991. "label": "怀化市",
  3992. "value": "4312"
  3993. }, {
  3994. "label": "娄底市",
  3995. "value": "4313"
  3996. }, {
  3997. "label": "湘西土家族苗族自治州",
  3998. "value": "4331"
  3999. }], [{
  4000. "label": "广州市",
  4001. "value": "4401"
  4002. }, {
  4003. "label": "韶关市",
  4004. "value": "4402"
  4005. }, {
  4006. "label": "深圳市",
  4007. "value": "4403"
  4008. }, {
  4009. "label": "珠海市",
  4010. "value": "4404"
  4011. }, {
  4012. "label": "汕头市",
  4013. "value": "4405"
  4014. }, {
  4015. "label": "佛山市",
  4016. "value": "4406"
  4017. }, {
  4018. "label": "江门市",
  4019. "value": "4407"
  4020. }, {
  4021. "label": "湛江市",
  4022. "value": "4408"
  4023. }, {
  4024. "label": "茂名市",
  4025. "value": "4409"
  4026. }, {
  4027. "label": "肇庆市",
  4028. "value": "4412"
  4029. }, {
  4030. "label": "惠州市",
  4031. "value": "4413"
  4032. }, {
  4033. "label": "梅州市",
  4034. "value": "4414"
  4035. }, {
  4036. "label": "汕尾市",
  4037. "value": "4415"
  4038. }, {
  4039. "label": "河源市",
  4040. "value": "4416"
  4041. }, {
  4042. "label": "阳江市",
  4043. "value": "4417"
  4044. }, {
  4045. "label": "清远市",
  4046. "value": "4418"
  4047. }, {
  4048. "label": "东莞市",
  4049. "value": "4419"
  4050. }, {
  4051. "label": "中山市",
  4052. "value": "4420"
  4053. }, {
  4054. "label": "潮州市",
  4055. "value": "4451"
  4056. }, {
  4057. "label": "揭阳市",
  4058. "value": "4452"
  4059. }, {
  4060. "label": "云浮市",
  4061. "value": "4453"
  4062. }], [{
  4063. "label": "南宁市",
  4064. "value": "4501"
  4065. }, {
  4066. "label": "柳州市",
  4067. "value": "4502"
  4068. }, {
  4069. "label": "桂林市",
  4070. "value": "4503"
  4071. }, {
  4072. "label": "梧州市",
  4073. "value": "4504"
  4074. }, {
  4075. "label": "北海市",
  4076. "value": "4505"
  4077. }, {
  4078. "label": "防城港市",
  4079. "value": "4506"
  4080. }, {
  4081. "label": "钦州市",
  4082. "value": "4507"
  4083. }, {
  4084. "label": "贵港市",
  4085. "value": "4508"
  4086. }, {
  4087. "label": "玉林市",
  4088. "value": "4509"
  4089. }, {
  4090. "label": "百色市",
  4091. "value": "4510"
  4092. }, {
  4093. "label": "贺州市",
  4094. "value": "4511"
  4095. }, {
  4096. "label": "河池市",
  4097. "value": "4512"
  4098. }, {
  4099. "label": "来宾市",
  4100. "value": "4513"
  4101. }, {
  4102. "label": "崇左市",
  4103. "value": "4514"
  4104. }], [{
  4105. "label": "海口市",
  4106. "value": "4601"
  4107. }, {
  4108. "label": "三亚市",
  4109. "value": "4602"
  4110. }, {
  4111. "label": "三沙市",
  4112. "value": "4603"
  4113. }, {
  4114. "label": "儋州市",
  4115. "value": "4604"
  4116. }, {
  4117. "label": "省直辖县级行政区划",
  4118. "value": "4690"
  4119. }], [{
  4120. "label": "市辖区",
  4121. "value": "5001"
  4122. }, {
  4123. "label": "县",
  4124. "value": "5002"
  4125. }], [{
  4126. "label": "成都市",
  4127. "value": "5101"
  4128. }, {
  4129. "label": "自贡市",
  4130. "value": "5103"
  4131. }, {
  4132. "label": "攀枝花市",
  4133. "value": "5104"
  4134. }, {
  4135. "label": "泸州市",
  4136. "value": "5105"
  4137. }, {
  4138. "label": "德阳市",
  4139. "value": "5106"
  4140. }, {
  4141. "label": "绵阳市",
  4142. "value": "5107"
  4143. }, {
  4144. "label": "广元市",
  4145. "value": "5108"
  4146. }, {
  4147. "label": "遂宁市",
  4148. "value": "5109"
  4149. }, {
  4150. "label": "内江市",
  4151. "value": "5110"
  4152. }, {
  4153. "label": "乐山市",
  4154. "value": "5111"
  4155. }, {
  4156. "label": "南充市",
  4157. "value": "5113"
  4158. }, {
  4159. "label": "眉山市",
  4160. "value": "5114"
  4161. }, {
  4162. "label": "宜宾市",
  4163. "value": "5115"
  4164. }, {
  4165. "label": "广安市",
  4166. "value": "5116"
  4167. }, {
  4168. "label": "达州市",
  4169. "value": "5117"
  4170. }, {
  4171. "label": "雅安市",
  4172. "value": "5118"
  4173. }, {
  4174. "label": "巴中市",
  4175. "value": "5119"
  4176. }, {
  4177. "label": "资阳市",
  4178. "value": "5120"
  4179. }, {
  4180. "label": "阿坝藏族羌族自治州",
  4181. "value": "5132"
  4182. }, {
  4183. "label": "甘孜藏族自治州",
  4184. "value": "5133"
  4185. }, {
  4186. "label": "凉山彝族自治州",
  4187. "value": "5134"
  4188. }], [{
  4189. "label": "贵阳市",
  4190. "value": "5201"
  4191. }, {
  4192. "label": "六盘水市",
  4193. "value": "5202"
  4194. }, {
  4195. "label": "遵义市",
  4196. "value": "5203"
  4197. }, {
  4198. "label": "安顺市",
  4199. "value": "5204"
  4200. }, {
  4201. "label": "毕节市",
  4202. "value": "5205"
  4203. }, {
  4204. "label": "铜仁市",
  4205. "value": "5206"
  4206. }, {
  4207. "label": "黔西南布依族苗族自治州",
  4208. "value": "5223"
  4209. }, {
  4210. "label": "黔东南苗族侗族自治州",
  4211. "value": "5226"
  4212. }, {
  4213. "label": "黔南布依族苗族自治州",
  4214. "value": "5227"
  4215. }], [{
  4216. "label": "昆明市",
  4217. "value": "5301"
  4218. }, {
  4219. "label": "曲靖市",
  4220. "value": "5303"
  4221. }, {
  4222. "label": "玉溪市",
  4223. "value": "5304"
  4224. }, {
  4225. "label": "保山市",
  4226. "value": "5305"
  4227. }, {
  4228. "label": "昭通市",
  4229. "value": "5306"
  4230. }, {
  4231. "label": "丽江市",
  4232. "value": "5307"
  4233. }, {
  4234. "label": "普洱市",
  4235. "value": "5308"
  4236. }, {
  4237. "label": "临沧市",
  4238. "value": "5309"
  4239. }, {
  4240. "label": "楚雄彝族自治州",
  4241. "value": "5323"
  4242. }, {
  4243. "label": "红河哈尼族彝族自治州",
  4244. "value": "5325"
  4245. }, {
  4246. "label": "文山壮族苗族自治州",
  4247. "value": "5326"
  4248. }, {
  4249. "label": "西双版纳傣族自治州",
  4250. "value": "5328"
  4251. }, {
  4252. "label": "大理白族自治州",
  4253. "value": "5329"
  4254. }, {
  4255. "label": "德宏傣族景颇族自治州",
  4256. "value": "5331"
  4257. }, {
  4258. "label": "怒江傈僳族自治州",
  4259. "value": "5333"
  4260. }, {
  4261. "label": "迪庆藏族自治州",
  4262. "value": "5334"
  4263. }], [{
  4264. "label": "拉萨市",
  4265. "value": "5401"
  4266. }, {
  4267. "label": "日喀则市",
  4268. "value": "5402"
  4269. }, {
  4270. "label": "昌都市",
  4271. "value": "5403"
  4272. }, {
  4273. "label": "林芝市",
  4274. "value": "5404"
  4275. }, {
  4276. "label": "山南市",
  4277. "value": "5405"
  4278. }, {
  4279. "label": "那曲地区",
  4280. "value": "5424"
  4281. }, {
  4282. "label": "阿里地区",
  4283. "value": "5425"
  4284. }], [{
  4285. "label": "西安市",
  4286. "value": "6101"
  4287. }, {
  4288. "label": "铜川市",
  4289. "value": "6102"
  4290. }, {
  4291. "label": "宝鸡市",
  4292. "value": "6103"
  4293. }, {
  4294. "label": "咸阳市",
  4295. "value": "6104"
  4296. }, {
  4297. "label": "渭南市",
  4298. "value": "6105"
  4299. }, {
  4300. "label": "延安市",
  4301. "value": "6106"
  4302. }, {
  4303. "label": "汉中市",
  4304. "value": "6107"
  4305. }, {
  4306. "label": "榆林市",
  4307. "value": "6108"
  4308. }, {
  4309. "label": "安康市",
  4310. "value": "6109"
  4311. }, {
  4312. "label": "商洛市",
  4313. "value": "6110"
  4314. }], [{
  4315. "label": "兰州市",
  4316. "value": "6201"
  4317. }, {
  4318. "label": "嘉峪关市",
  4319. "value": "6202"
  4320. }, {
  4321. "label": "金昌市",
  4322. "value": "6203"
  4323. }, {
  4324. "label": "白银市",
  4325. "value": "6204"
  4326. }, {
  4327. "label": "天水市",
  4328. "value": "6205"
  4329. }, {
  4330. "label": "武威市",
  4331. "value": "6206"
  4332. }, {
  4333. "label": "张掖市",
  4334. "value": "6207"
  4335. }, {
  4336. "label": "平凉市",
  4337. "value": "6208"
  4338. }, {
  4339. "label": "酒泉市",
  4340. "value": "6209"
  4341. }, {
  4342. "label": "庆阳市",
  4343. "value": "6210"
  4344. }, {
  4345. "label": "定西市",
  4346. "value": "6211"
  4347. }, {
  4348. "label": "陇南市",
  4349. "value": "6212"
  4350. }, {
  4351. "label": "临夏回族自治州",
  4352. "value": "6229"
  4353. }, {
  4354. "label": "甘南藏族自治州",
  4355. "value": "6230"
  4356. }], [{
  4357. "label": "西宁市",
  4358. "value": "6301"
  4359. }, {
  4360. "label": "海东市",
  4361. "value": "6302"
  4362. }, {
  4363. "label": "海北藏族自治州",
  4364. "value": "6322"
  4365. }, {
  4366. "label": "黄南藏族自治州",
  4367. "value": "6323"
  4368. }, {
  4369. "label": "海南藏族自治州",
  4370. "value": "6325"
  4371. }, {
  4372. "label": "果洛藏族自治州",
  4373. "value": "6326"
  4374. }, {
  4375. "label": "玉树藏族自治州",
  4376. "value": "6327"
  4377. }, {
  4378. "label": "海西蒙古族藏族自治州",
  4379. "value": "6328"
  4380. }], [{
  4381. "label": "银川市",
  4382. "value": "6401"
  4383. }, {
  4384. "label": "石嘴山市",
  4385. "value": "6402"
  4386. }, {
  4387. "label": "吴忠市",
  4388. "value": "6403"
  4389. }, {
  4390. "label": "固原市",
  4391. "value": "6404"
  4392. }, {
  4393. "label": "中卫市",
  4394. "value": "6405"
  4395. }], [{
  4396. "label": "乌鲁木齐市",
  4397. "value": "6501"
  4398. }, {
  4399. "label": "克拉玛依市",
  4400. "value": "6502"
  4401. }, {
  4402. "label": "吐鲁番市",
  4403. "value": "6504"
  4404. }, {
  4405. "label": "哈密市",
  4406. "value": "6505"
  4407. }, {
  4408. "label": "昌吉回族自治州",
  4409. "value": "6523"
  4410. }, {
  4411. "label": "博尔塔拉蒙古自治州",
  4412. "value": "6527"
  4413. }, {
  4414. "label": "巴音郭楞蒙古自治州",
  4415. "value": "6528"
  4416. }, {
  4417. "label": "阿克苏地区",
  4418. "value": "6529"
  4419. }, {
  4420. "label": "克孜勒苏柯尔克孜自治州",
  4421. "value": "6530"
  4422. }, {
  4423. "label": "喀什地区",
  4424. "value": "6531"
  4425. }, {
  4426. "label": "和田地区",
  4427. "value": "6532"
  4428. }, {
  4429. "label": "伊犁哈萨克自治州",
  4430. "value": "6540"
  4431. }, {
  4432. "label": "塔城地区",
  4433. "value": "6542"
  4434. }, {
  4435. "label": "阿勒泰地区",
  4436. "value": "6543"
  4437. }, {
  4438. "label": "自治区直辖县级行政区划",
  4439. "value": "6590"
  4440. }], [{
  4441. "label": "台北",
  4442. "value": "6601"
  4443. }, {
  4444. "label": "高雄",
  4445. "value": "6602"
  4446. }, {
  4447. "label": "基隆",
  4448. "value": "6603"
  4449. }, {
  4450. "label": "台中",
  4451. "value": "6604"
  4452. }, {
  4453. "label": "台南",
  4454. "value": "6605"
  4455. }, {
  4456. "label": "新竹",
  4457. "value": "6606"
  4458. }, {
  4459. "label": "嘉义",
  4460. "value": "6607"
  4461. }, {
  4462. "label": "宜兰",
  4463. "value": "6608"
  4464. }, {
  4465. "label": "桃园",
  4466. "value": "6609"
  4467. }, {
  4468. "label": "苗栗",
  4469. "value": "6610"
  4470. }, {
  4471. "label": "彰化",
  4472. "value": "6611"
  4473. }, {
  4474. "label": "南投",
  4475. "value": "6612"
  4476. }, {
  4477. "label": "云林",
  4478. "value": "6613"
  4479. }, {
  4480. "label": "屏东",
  4481. "value": "6614"
  4482. }, {
  4483. "label": "台东",
  4484. "value": "6615"
  4485. }, {
  4486. "label": "花莲",
  4487. "value": "6616"
  4488. }, {
  4489. "label": "澎湖",
  4490. "value": "6617"
  4491. }], [{
  4492. "label": "香港岛",
  4493. "value": "6701"
  4494. }, {
  4495. "label": "九龙",
  4496. "value": "6702"
  4497. }, {
  4498. "label": "新界",
  4499. "value": "6703"
  4500. }], [{
  4501. "label": "澳门半岛",
  4502. "value": "6801"
  4503. }, {
  4504. "label": "氹仔岛",
  4505. "value": "6802"
  4506. }, {
  4507. "label": "路环岛",
  4508. "value": "6803"
  4509. }, {
  4510. "label": "路氹城",
  4511. "value": "6804"
  4512. }]];
  4513. var _default = cityData;
  4514. exports.default = _default;
  4515. /***/ }),
  4516. /***/ 1123:
  4517. /*!****************************************************************!*\
  4518. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/util/area.js ***!
  4519. \****************************************************************/
  4520. /*! no static exports found */
  4521. /***/ (function(module, exports, __webpack_require__) {
  4522. "use strict";
  4523. Object.defineProperty(exports, "__esModule", {
  4524. value: true
  4525. });
  4526. exports.default = void 0;
  4527. var areaData = [[[{
  4528. "label": "东城区",
  4529. "value": "110101"
  4530. }, {
  4531. "label": "西城区",
  4532. "value": "110102"
  4533. }, {
  4534. "label": "朝阳区",
  4535. "value": "110105"
  4536. }, {
  4537. "label": "丰台区",
  4538. "value": "110106"
  4539. }, {
  4540. "label": "石景山区",
  4541. "value": "110107"
  4542. }, {
  4543. "label": "海淀区",
  4544. "value": "110108"
  4545. }, {
  4546. "label": "门头沟区",
  4547. "value": "110109"
  4548. }, {
  4549. "label": "房山区",
  4550. "value": "110111"
  4551. }, {
  4552. "label": "通州区",
  4553. "value": "110112"
  4554. }, {
  4555. "label": "顺义区",
  4556. "value": "110113"
  4557. }, {
  4558. "label": "昌平区",
  4559. "value": "110114"
  4560. }, {
  4561. "label": "大兴区",
  4562. "value": "110115"
  4563. }, {
  4564. "label": "怀柔区",
  4565. "value": "110116"
  4566. }, {
  4567. "label": "平谷区",
  4568. "value": "110117"
  4569. }, {
  4570. "label": "密云区",
  4571. "value": "110118"
  4572. }, {
  4573. "label": "延庆区",
  4574. "value": "110119"
  4575. }]], [[{
  4576. "label": "和平区",
  4577. "value": "120101"
  4578. }, {
  4579. "label": "河东区",
  4580. "value": "120102"
  4581. }, {
  4582. "label": "河西区",
  4583. "value": "120103"
  4584. }, {
  4585. "label": "南开区",
  4586. "value": "120104"
  4587. }, {
  4588. "label": "河北区",
  4589. "value": "120105"
  4590. }, {
  4591. "label": "红桥区",
  4592. "value": "120106"
  4593. }, {
  4594. "label": "东丽区",
  4595. "value": "120110"
  4596. }, {
  4597. "label": "西青区",
  4598. "value": "120111"
  4599. }, {
  4600. "label": "津南区",
  4601. "value": "120112"
  4602. }, {
  4603. "label": "北辰区",
  4604. "value": "120113"
  4605. }, {
  4606. "label": "武清区",
  4607. "value": "120114"
  4608. }, {
  4609. "label": "宝坻区",
  4610. "value": "120115"
  4611. }, {
  4612. "label": "滨海新区",
  4613. "value": "120116"
  4614. }, {
  4615. "label": "宁河区",
  4616. "value": "120117"
  4617. }, {
  4618. "label": "静海区",
  4619. "value": "120118"
  4620. }, {
  4621. "label": "蓟州区",
  4622. "value": "120119"
  4623. }]], [[{
  4624. "label": "长安区",
  4625. "value": "130102"
  4626. }, {
  4627. "label": "桥西区",
  4628. "value": "130104"
  4629. }, {
  4630. "label": "新华区",
  4631. "value": "130105"
  4632. }, {
  4633. "label": "井陉矿区",
  4634. "value": "130107"
  4635. }, {
  4636. "label": "裕华区",
  4637. "value": "130108"
  4638. }, {
  4639. "label": "藁城区",
  4640. "value": "130109"
  4641. }, {
  4642. "label": "鹿泉区",
  4643. "value": "130110"
  4644. }, {
  4645. "label": "栾城区",
  4646. "value": "130111"
  4647. }, {
  4648. "label": "井陉县",
  4649. "value": "130121"
  4650. }, {
  4651. "label": "正定县",
  4652. "value": "130123"
  4653. }, {
  4654. "label": "行唐县",
  4655. "value": "130125"
  4656. }, {
  4657. "label": "灵寿县",
  4658. "value": "130126"
  4659. }, {
  4660. "label": "高邑县",
  4661. "value": "130127"
  4662. }, {
  4663. "label": "深泽县",
  4664. "value": "130128"
  4665. }, {
  4666. "label": "赞皇县",
  4667. "value": "130129"
  4668. }, {
  4669. "label": "无极县",
  4670. "value": "130130"
  4671. }, {
  4672. "label": "平山县",
  4673. "value": "130131"
  4674. }, {
  4675. "label": "元氏县",
  4676. "value": "130132"
  4677. }, {
  4678. "label": "赵县",
  4679. "value": "130133"
  4680. }, {
  4681. "label": "石家庄高新技术产业开发区",
  4682. "value": "130171"
  4683. }, {
  4684. "label": "石家庄循环化工园区",
  4685. "value": "130172"
  4686. }, {
  4687. "label": "辛集市",
  4688. "value": "130181"
  4689. }, {
  4690. "label": "晋州市",
  4691. "value": "130183"
  4692. }, {
  4693. "label": "新乐市",
  4694. "value": "130184"
  4695. }], [{
  4696. "label": "路南区",
  4697. "value": "130202"
  4698. }, {
  4699. "label": "路北区",
  4700. "value": "130203"
  4701. }, {
  4702. "label": "古冶区",
  4703. "value": "130204"
  4704. }, {
  4705. "label": "开平区",
  4706. "value": "130205"
  4707. }, {
  4708. "label": "丰南区",
  4709. "value": "130207"
  4710. }, {
  4711. "label": "丰润区",
  4712. "value": "130208"
  4713. }, {
  4714. "label": "曹妃甸区",
  4715. "value": "130209"
  4716. }, {
  4717. "label": "滦县",
  4718. "value": "130223"
  4719. }, {
  4720. "label": "滦南县",
  4721. "value": "130224"
  4722. }, {
  4723. "label": "乐亭县",
  4724. "value": "130225"
  4725. }, {
  4726. "label": "迁西县",
  4727. "value": "130227"
  4728. }, {
  4729. "label": "玉田县",
  4730. "value": "130229"
  4731. }, {
  4732. "label": "唐山市芦台经济技术开发区",
  4733. "value": "130271"
  4734. }, {
  4735. "label": "唐山市汉沽管理区",
  4736. "value": "130272"
  4737. }, {
  4738. "label": "唐山高新技术产业开发区",
  4739. "value": "130273"
  4740. }, {
  4741. "label": "河北唐山海港经济开发区",
  4742. "value": "130274"
  4743. }, {
  4744. "label": "遵化市",
  4745. "value": "130281"
  4746. }, {
  4747. "label": "迁安市",
  4748. "value": "130283"
  4749. }], [{
  4750. "label": "海港区",
  4751. "value": "130302"
  4752. }, {
  4753. "label": "山海关区",
  4754. "value": "130303"
  4755. }, {
  4756. "label": "北戴河区",
  4757. "value": "130304"
  4758. }, {
  4759. "label": "抚宁区",
  4760. "value": "130306"
  4761. }, {
  4762. "label": "青龙满族自治县",
  4763. "value": "130321"
  4764. }, {
  4765. "label": "昌黎县",
  4766. "value": "130322"
  4767. }, {
  4768. "label": "卢龙县",
  4769. "value": "130324"
  4770. }, {
  4771. "label": "秦皇岛市经济技术开发区",
  4772. "value": "130371"
  4773. }, {
  4774. "label": "北戴河新区",
  4775. "value": "130372"
  4776. }], [{
  4777. "label": "邯山区",
  4778. "value": "130402"
  4779. }, {
  4780. "label": "丛台区",
  4781. "value": "130403"
  4782. }, {
  4783. "label": "复兴区",
  4784. "value": "130404"
  4785. }, {
  4786. "label": "峰峰矿区",
  4787. "value": "130406"
  4788. }, {
  4789. "label": "肥乡区",
  4790. "value": "130407"
  4791. }, {
  4792. "label": "永年区",
  4793. "value": "130408"
  4794. }, {
  4795. "label": "临漳县",
  4796. "value": "130423"
  4797. }, {
  4798. "label": "成安县",
  4799. "value": "130424"
  4800. }, {
  4801. "label": "大名县",
  4802. "value": "130425"
  4803. }, {
  4804. "label": "涉县",
  4805. "value": "130426"
  4806. }, {
  4807. "label": "磁县",
  4808. "value": "130427"
  4809. }, {
  4810. "label": "邱县",
  4811. "value": "130430"
  4812. }, {
  4813. "label": "鸡泽县",
  4814. "value": "130431"
  4815. }, {
  4816. "label": "广平县",
  4817. "value": "130432"
  4818. }, {
  4819. "label": "馆陶县",
  4820. "value": "130433"
  4821. }, {
  4822. "label": "魏县",
  4823. "value": "130434"
  4824. }, {
  4825. "label": "曲周县",
  4826. "value": "130435"
  4827. }, {
  4828. "label": "邯郸经济技术开发区",
  4829. "value": "130471"
  4830. }, {
  4831. "label": "邯郸冀南新区",
  4832. "value": "130473"
  4833. }, {
  4834. "label": "武安市",
  4835. "value": "130481"
  4836. }], [{
  4837. "label": "桥东区",
  4838. "value": "130502"
  4839. }, {
  4840. "label": "桥西区",
  4841. "value": "130503"
  4842. }, {
  4843. "label": "邢台县",
  4844. "value": "130521"
  4845. }, {
  4846. "label": "临城县",
  4847. "value": "130522"
  4848. }, {
  4849. "label": "内丘县",
  4850. "value": "130523"
  4851. }, {
  4852. "label": "柏乡县",
  4853. "value": "130524"
  4854. }, {
  4855. "label": "隆尧县",
  4856. "value": "130525"
  4857. }, {
  4858. "label": "任县",
  4859. "value": "130526"
  4860. }, {
  4861. "label": "南和县",
  4862. "value": "130527"
  4863. }, {
  4864. "label": "宁晋县",
  4865. "value": "130528"
  4866. }, {
  4867. "label": "巨鹿县",
  4868. "value": "130529"
  4869. }, {
  4870. "label": "新河县",
  4871. "value": "130530"
  4872. }, {
  4873. "label": "广宗县",
  4874. "value": "130531"
  4875. }, {
  4876. "label": "平乡县",
  4877. "value": "130532"
  4878. }, {
  4879. "label": "威县",
  4880. "value": "130533"
  4881. }, {
  4882. "label": "清河县",
  4883. "value": "130534"
  4884. }, {
  4885. "label": "临西县",
  4886. "value": "130535"
  4887. }, {
  4888. "label": "河北邢台经济开发区",
  4889. "value": "130571"
  4890. }, {
  4891. "label": "南宫市",
  4892. "value": "130581"
  4893. }, {
  4894. "label": "沙河市",
  4895. "value": "130582"
  4896. }], [{
  4897. "label": "竞秀区",
  4898. "value": "130602"
  4899. }, {
  4900. "label": "莲池区",
  4901. "value": "130606"
  4902. }, {
  4903. "label": "满城区",
  4904. "value": "130607"
  4905. }, {
  4906. "label": "清苑区",
  4907. "value": "130608"
  4908. }, {
  4909. "label": "徐水区",
  4910. "value": "130609"
  4911. }, {
  4912. "label": "涞水县",
  4913. "value": "130623"
  4914. }, {
  4915. "label": "阜平县",
  4916. "value": "130624"
  4917. }, {
  4918. "label": "定兴县",
  4919. "value": "130626"
  4920. }, {
  4921. "label": "唐县",
  4922. "value": "130627"
  4923. }, {
  4924. "label": "高阳县",
  4925. "value": "130628"
  4926. }, {
  4927. "label": "容城县",
  4928. "value": "130629"
  4929. }, {
  4930. "label": "涞源县",
  4931. "value": "130630"
  4932. }, {
  4933. "label": "望都县",
  4934. "value": "130631"
  4935. }, {
  4936. "label": "安新县",
  4937. "value": "130632"
  4938. }, {
  4939. "label": "易县",
  4940. "value": "130633"
  4941. }, {
  4942. "label": "曲阳县",
  4943. "value": "130634"
  4944. }, {
  4945. "label": "蠡县",
  4946. "value": "130635"
  4947. }, {
  4948. "label": "顺平县",
  4949. "value": "130636"
  4950. }, {
  4951. "label": "博野县",
  4952. "value": "130637"
  4953. }, {
  4954. "label": "雄县",
  4955. "value": "130638"
  4956. }, {
  4957. "label": "保定高新技术产业开发区",
  4958. "value": "130671"
  4959. }, {
  4960. "label": "保定白沟新城",
  4961. "value": "130672"
  4962. }, {
  4963. "label": "涿州市",
  4964. "value": "130681"
  4965. }, {
  4966. "label": "定州市",
  4967. "value": "130682"
  4968. }, {
  4969. "label": "安国市",
  4970. "value": "130683"
  4971. }, {
  4972. "label": "高碑店市",
  4973. "value": "130684"
  4974. }], [{
  4975. "label": "桥东区",
  4976. "value": "130702"
  4977. }, {
  4978. "label": "桥西区",
  4979. "value": "130703"
  4980. }, {
  4981. "label": "宣化区",
  4982. "value": "130705"
  4983. }, {
  4984. "label": "下花园区",
  4985. "value": "130706"
  4986. }, {
  4987. "label": "万全区",
  4988. "value": "130708"
  4989. }, {
  4990. "label": "崇礼区",
  4991. "value": "130709"
  4992. }, {
  4993. "label": "张北县",
  4994. "value": "130722"
  4995. }, {
  4996. "label": "康保县",
  4997. "value": "130723"
  4998. }, {
  4999. "label": "沽源县",
  5000. "value": "130724"
  5001. }, {
  5002. "label": "尚义县",
  5003. "value": "130725"
  5004. }, {
  5005. "label": "蔚县",
  5006. "value": "130726"
  5007. }, {
  5008. "label": "阳原县",
  5009. "value": "130727"
  5010. }, {
  5011. "label": "怀安县",
  5012. "value": "130728"
  5013. }, {
  5014. "label": "怀来县",
  5015. "value": "130730"
  5016. }, {
  5017. "label": "涿鹿县",
  5018. "value": "130731"
  5019. }, {
  5020. "label": "赤城县",
  5021. "value": "130732"
  5022. }, {
  5023. "label": "张家口市高新技术产业开发区",
  5024. "value": "130771"
  5025. }, {
  5026. "label": "张家口市察北管理区",
  5027. "value": "130772"
  5028. }, {
  5029. "label": "张家口市塞北管理区",
  5030. "value": "130773"
  5031. }], [{
  5032. "label": "双桥区",
  5033. "value": "130802"
  5034. }, {
  5035. "label": "双滦区",
  5036. "value": "130803"
  5037. }, {
  5038. "label": "鹰手营子矿区",
  5039. "value": "130804"
  5040. }, {
  5041. "label": "承德县",
  5042. "value": "130821"
  5043. }, {
  5044. "label": "兴隆县",
  5045. "value": "130822"
  5046. }, {
  5047. "label": "滦平县",
  5048. "value": "130824"
  5049. }, {
  5050. "label": "隆化县",
  5051. "value": "130825"
  5052. }, {
  5053. "label": "丰宁满族自治县",
  5054. "value": "130826"
  5055. }, {
  5056. "label": "宽城满族自治县",
  5057. "value": "130827"
  5058. }, {
  5059. "label": "围场满族蒙古族自治县",
  5060. "value": "130828"
  5061. }, {
  5062. "label": "承德高新技术产业开发区",
  5063. "value": "130871"
  5064. }, {
  5065. "label": "平泉市",
  5066. "value": "130881"
  5067. }], [{
  5068. "label": "新华区",
  5069. "value": "130902"
  5070. }, {
  5071. "label": "运河区",
  5072. "value": "130903"
  5073. }, {
  5074. "label": "沧县",
  5075. "value": "130921"
  5076. }, {
  5077. "label": "青县",
  5078. "value": "130922"
  5079. }, {
  5080. "label": "东光县",
  5081. "value": "130923"
  5082. }, {
  5083. "label": "海兴县",
  5084. "value": "130924"
  5085. }, {
  5086. "label": "盐山县",
  5087. "value": "130925"
  5088. }, {
  5089. "label": "肃宁县",
  5090. "value": "130926"
  5091. }, {
  5092. "label": "南皮县",
  5093. "value": "130927"
  5094. }, {
  5095. "label": "吴桥县",
  5096. "value": "130928"
  5097. }, {
  5098. "label": "献县",
  5099. "value": "130929"
  5100. }, {
  5101. "label": "孟村回族自治县",
  5102. "value": "130930"
  5103. }, {
  5104. "label": "河北沧州经济开发区",
  5105. "value": "130971"
  5106. }, {
  5107. "label": "沧州高新技术产业开发区",
  5108. "value": "130972"
  5109. }, {
  5110. "label": "沧州渤海新区",
  5111. "value": "130973"
  5112. }, {
  5113. "label": "泊头市",
  5114. "value": "130981"
  5115. }, {
  5116. "label": "任丘市",
  5117. "value": "130982"
  5118. }, {
  5119. "label": "黄骅市",
  5120. "value": "130983"
  5121. }, {
  5122. "label": "河间市",
  5123. "value": "130984"
  5124. }], [{
  5125. "label": "安次区",
  5126. "value": "131002"
  5127. }, {
  5128. "label": "广阳区",
  5129. "value": "131003"
  5130. }, {
  5131. "label": "固安县",
  5132. "value": "131022"
  5133. }, {
  5134. "label": "永清县",
  5135. "value": "131023"
  5136. }, {
  5137. "label": "香河县",
  5138. "value": "131024"
  5139. }, {
  5140. "label": "大城县",
  5141. "value": "131025"
  5142. }, {
  5143. "label": "文安县",
  5144. "value": "131026"
  5145. }, {
  5146. "label": "大厂回族自治县",
  5147. "value": "131028"
  5148. }, {
  5149. "label": "廊坊经济技术开发区",
  5150. "value": "131071"
  5151. }, {
  5152. "label": "霸州市",
  5153. "value": "131081"
  5154. }, {
  5155. "label": "三河市",
  5156. "value": "131082"
  5157. }], [{
  5158. "label": "桃城区",
  5159. "value": "131102"
  5160. }, {
  5161. "label": "冀州区",
  5162. "value": "131103"
  5163. }, {
  5164. "label": "枣强县",
  5165. "value": "131121"
  5166. }, {
  5167. "label": "武邑县",
  5168. "value": "131122"
  5169. }, {
  5170. "label": "武强县",
  5171. "value": "131123"
  5172. }, {
  5173. "label": "饶阳县",
  5174. "value": "131124"
  5175. }, {
  5176. "label": "安平县",
  5177. "value": "131125"
  5178. }, {
  5179. "label": "故城县",
  5180. "value": "131126"
  5181. }, {
  5182. "label": "景县",
  5183. "value": "131127"
  5184. }, {
  5185. "label": "阜城县",
  5186. "value": "131128"
  5187. }, {
  5188. "label": "河北衡水经济开发区",
  5189. "value": "131171"
  5190. }, {
  5191. "label": "衡水滨湖新区",
  5192. "value": "131172"
  5193. }, {
  5194. "label": "深州市",
  5195. "value": "131182"
  5196. }]], [[{
  5197. "label": "小店区",
  5198. "value": "140105"
  5199. }, {
  5200. "label": "迎泽区",
  5201. "value": "140106"
  5202. }, {
  5203. "label": "杏花岭区",
  5204. "value": "140107"
  5205. }, {
  5206. "label": "尖草坪区",
  5207. "value": "140108"
  5208. }, {
  5209. "label": "万柏林区",
  5210. "value": "140109"
  5211. }, {
  5212. "label": "晋源区",
  5213. "value": "140110"
  5214. }, {
  5215. "label": "清徐县",
  5216. "value": "140121"
  5217. }, {
  5218. "label": "阳曲县",
  5219. "value": "140122"
  5220. }, {
  5221. "label": "娄烦县",
  5222. "value": "140123"
  5223. }, {
  5224. "label": "山西转型综合改革示范区",
  5225. "value": "140171"
  5226. }, {
  5227. "label": "古交市",
  5228. "value": "140181"
  5229. }], [{
  5230. "label": "城区",
  5231. "value": "140202"
  5232. }, {
  5233. "label": "矿区",
  5234. "value": "140203"
  5235. }, {
  5236. "label": "南郊区",
  5237. "value": "140211"
  5238. }, {
  5239. "label": "新荣区",
  5240. "value": "140212"
  5241. }, {
  5242. "label": "阳高县",
  5243. "value": "140221"
  5244. }, {
  5245. "label": "天镇县",
  5246. "value": "140222"
  5247. }, {
  5248. "label": "广灵县",
  5249. "value": "140223"
  5250. }, {
  5251. "label": "灵丘县",
  5252. "value": "140224"
  5253. }, {
  5254. "label": "浑源县",
  5255. "value": "140225"
  5256. }, {
  5257. "label": "左云县",
  5258. "value": "140226"
  5259. }, {
  5260. "label": "大同县",
  5261. "value": "140227"
  5262. }, {
  5263. "label": "山西大同经济开发区",
  5264. "value": "140271"
  5265. }], [{
  5266. "label": "城区",
  5267. "value": "140302"
  5268. }, {
  5269. "label": "矿区",
  5270. "value": "140303"
  5271. }, {
  5272. "label": "郊区",
  5273. "value": "140311"
  5274. }, {
  5275. "label": "平定县",
  5276. "value": "140321"
  5277. }, {
  5278. "label": "盂县",
  5279. "value": "140322"
  5280. }, {
  5281. "label": "山西阳泉经济开发区",
  5282. "value": "140371"
  5283. }], [{
  5284. "label": "城区",
  5285. "value": "140402"
  5286. }, {
  5287. "label": "郊区",
  5288. "value": "140411"
  5289. }, {
  5290. "label": "长治县",
  5291. "value": "140421"
  5292. }, {
  5293. "label": "襄垣县",
  5294. "value": "140423"
  5295. }, {
  5296. "label": "屯留县",
  5297. "value": "140424"
  5298. }, {
  5299. "label": "平顺县",
  5300. "value": "140425"
  5301. }, {
  5302. "label": "黎城县",
  5303. "value": "140426"
  5304. }, {
  5305. "label": "壶关县",
  5306. "value": "140427"
  5307. }, {
  5308. "label": "长子县",
  5309. "value": "140428"
  5310. }, {
  5311. "label": "武乡县",
  5312. "value": "140429"
  5313. }, {
  5314. "label": "沁县",
  5315. "value": "140430"
  5316. }, {
  5317. "label": "沁源县",
  5318. "value": "140431"
  5319. }, {
  5320. "label": "山西长治高新技术产业园区",
  5321. "value": "140471"
  5322. }, {
  5323. "label": "潞城市",
  5324. "value": "140481"
  5325. }], [{
  5326. "label": "城区",
  5327. "value": "140502"
  5328. }, {
  5329. "label": "沁水县",
  5330. "value": "140521"
  5331. }, {
  5332. "label": "阳城县",
  5333. "value": "140522"
  5334. }, {
  5335. "label": "陵川县",
  5336. "value": "140524"
  5337. }, {
  5338. "label": "泽州县",
  5339. "value": "140525"
  5340. }, {
  5341. "label": "高平市",
  5342. "value": "140581"
  5343. }], [{
  5344. "label": "朔城区",
  5345. "value": "140602"
  5346. }, {
  5347. "label": "平鲁区",
  5348. "value": "140603"
  5349. }, {
  5350. "label": "山阴县",
  5351. "value": "140621"
  5352. }, {
  5353. "label": "应县",
  5354. "value": "140622"
  5355. }, {
  5356. "label": "右玉县",
  5357. "value": "140623"
  5358. }, {
  5359. "label": "怀仁县",
  5360. "value": "140624"
  5361. }, {
  5362. "label": "山西朔州经济开发区",
  5363. "value": "140671"
  5364. }], [{
  5365. "label": "榆次区",
  5366. "value": "140702"
  5367. }, {
  5368. "label": "榆社县",
  5369. "value": "140721"
  5370. }, {
  5371. "label": "左权县",
  5372. "value": "140722"
  5373. }, {
  5374. "label": "和顺县",
  5375. "value": "140723"
  5376. }, {
  5377. "label": "昔阳县",
  5378. "value": "140724"
  5379. }, {
  5380. "label": "寿阳县",
  5381. "value": "140725"
  5382. }, {
  5383. "label": "太谷县",
  5384. "value": "140726"
  5385. }, {
  5386. "label": "祁县",
  5387. "value": "140727"
  5388. }, {
  5389. "label": "平遥县",
  5390. "value": "140728"
  5391. }, {
  5392. "label": "灵石县",
  5393. "value": "140729"
  5394. }, {
  5395. "label": "介休市",
  5396. "value": "140781"
  5397. }], [{
  5398. "label": "盐湖区",
  5399. "value": "140802"
  5400. }, {
  5401. "label": "临猗县",
  5402. "value": "140821"
  5403. }, {
  5404. "label": "万荣县",
  5405. "value": "140822"
  5406. }, {
  5407. "label": "闻喜县",
  5408. "value": "140823"
  5409. }, {
  5410. "label": "稷山县",
  5411. "value": "140824"
  5412. }, {
  5413. "label": "新绛县",
  5414. "value": "140825"
  5415. }, {
  5416. "label": "绛县",
  5417. "value": "140826"
  5418. }, {
  5419. "label": "垣曲县",
  5420. "value": "140827"
  5421. }, {
  5422. "label": "夏县",
  5423. "value": "140828"
  5424. }, {
  5425. "label": "平陆县",
  5426. "value": "140829"
  5427. }, {
  5428. "label": "芮城县",
  5429. "value": "140830"
  5430. }, {
  5431. "label": "永济市",
  5432. "value": "140881"
  5433. }, {
  5434. "label": "河津市",
  5435. "value": "140882"
  5436. }], [{
  5437. "label": "忻府区",
  5438. "value": "140902"
  5439. }, {
  5440. "label": "定襄县",
  5441. "value": "140921"
  5442. }, {
  5443. "label": "五台县",
  5444. "value": "140922"
  5445. }, {
  5446. "label": "代县",
  5447. "value": "140923"
  5448. }, {
  5449. "label": "繁峙县",
  5450. "value": "140924"
  5451. }, {
  5452. "label": "宁武县",
  5453. "value": "140925"
  5454. }, {
  5455. "label": "静乐县",
  5456. "value": "140926"
  5457. }, {
  5458. "label": "神池县",
  5459. "value": "140927"
  5460. }, {
  5461. "label": "五寨县",
  5462. "value": "140928"
  5463. }, {
  5464. "label": "岢岚县",
  5465. "value": "140929"
  5466. }, {
  5467. "label": "河曲县",
  5468. "value": "140930"
  5469. }, {
  5470. "label": "保德县",
  5471. "value": "140931"
  5472. }, {
  5473. "label": "偏关县",
  5474. "value": "140932"
  5475. }, {
  5476. "label": "五台山风景名胜区",
  5477. "value": "140971"
  5478. }, {
  5479. "label": "原平市",
  5480. "value": "140981"
  5481. }], [{
  5482. "label": "尧都区",
  5483. "value": "141002"
  5484. }, {
  5485. "label": "曲沃县",
  5486. "value": "141021"
  5487. }, {
  5488. "label": "翼城县",
  5489. "value": "141022"
  5490. }, {
  5491. "label": "襄汾县",
  5492. "value": "141023"
  5493. }, {
  5494. "label": "洪洞县",
  5495. "value": "141024"
  5496. }, {
  5497. "label": "古县",
  5498. "value": "141025"
  5499. }, {
  5500. "label": "安泽县",
  5501. "value": "141026"
  5502. }, {
  5503. "label": "浮山县",
  5504. "value": "141027"
  5505. }, {
  5506. "label": "吉县",
  5507. "value": "141028"
  5508. }, {
  5509. "label": "乡宁县",
  5510. "value": "141029"
  5511. }, {
  5512. "label": "大宁县",
  5513. "value": "141030"
  5514. }, {
  5515. "label": "隰县",
  5516. "value": "141031"
  5517. }, {
  5518. "label": "永和县",
  5519. "value": "141032"
  5520. }, {
  5521. "label": "蒲县",
  5522. "value": "141033"
  5523. }, {
  5524. "label": "汾西县",
  5525. "value": "141034"
  5526. }, {
  5527. "label": "侯马市",
  5528. "value": "141081"
  5529. }, {
  5530. "label": "霍州市",
  5531. "value": "141082"
  5532. }], [{
  5533. "label": "离石区",
  5534. "value": "141102"
  5535. }, {
  5536. "label": "文水县",
  5537. "value": "141121"
  5538. }, {
  5539. "label": "交城县",
  5540. "value": "141122"
  5541. }, {
  5542. "label": "兴县",
  5543. "value": "141123"
  5544. }, {
  5545. "label": "临县",
  5546. "value": "141124"
  5547. }, {
  5548. "label": "柳林县",
  5549. "value": "141125"
  5550. }, {
  5551. "label": "石楼县",
  5552. "value": "141126"
  5553. }, {
  5554. "label": "岚县",
  5555. "value": "141127"
  5556. }, {
  5557. "label": "方山县",
  5558. "value": "141128"
  5559. }, {
  5560. "label": "中阳县",
  5561. "value": "141129"
  5562. }, {
  5563. "label": "交口县",
  5564. "value": "141130"
  5565. }, {
  5566. "label": "孝义市",
  5567. "value": "141181"
  5568. }, {
  5569. "label": "汾阳市",
  5570. "value": "141182"
  5571. }]], [[{
  5572. "label": "新城区",
  5573. "value": "150102"
  5574. }, {
  5575. "label": "回民区",
  5576. "value": "150103"
  5577. }, {
  5578. "label": "玉泉区",
  5579. "value": "150104"
  5580. }, {
  5581. "label": "赛罕区",
  5582. "value": "150105"
  5583. }, {
  5584. "label": "土默特左旗",
  5585. "value": "150121"
  5586. }, {
  5587. "label": "托克托县",
  5588. "value": "150122"
  5589. }, {
  5590. "label": "和林格尔县",
  5591. "value": "150123"
  5592. }, {
  5593. "label": "清水河县",
  5594. "value": "150124"
  5595. }, {
  5596. "label": "武川县",
  5597. "value": "150125"
  5598. }, {
  5599. "label": "呼和浩特金海工业园区",
  5600. "value": "150171"
  5601. }, {
  5602. "label": "呼和浩特经济技术开发区",
  5603. "value": "150172"
  5604. }], [{
  5605. "label": "东河区",
  5606. "value": "150202"
  5607. }, {
  5608. "label": "昆都仑区",
  5609. "value": "150203"
  5610. }, {
  5611. "label": "青山区",
  5612. "value": "150204"
  5613. }, {
  5614. "label": "石拐区",
  5615. "value": "150205"
  5616. }, {
  5617. "label": "白云鄂博矿区",
  5618. "value": "150206"
  5619. }, {
  5620. "label": "九原区",
  5621. "value": "150207"
  5622. }, {
  5623. "label": "土默特右旗",
  5624. "value": "150221"
  5625. }, {
  5626. "label": "固阳县",
  5627. "value": "150222"
  5628. }, {
  5629. "label": "达尔罕茂明安联合旗",
  5630. "value": "150223"
  5631. }, {
  5632. "label": "包头稀土高新技术产业开发区",
  5633. "value": "150271"
  5634. }], [{
  5635. "label": "海勃湾区",
  5636. "value": "150302"
  5637. }, {
  5638. "label": "海南区",
  5639. "value": "150303"
  5640. }, {
  5641. "label": "乌达区",
  5642. "value": "150304"
  5643. }], [{
  5644. "label": "红山区",
  5645. "value": "150402"
  5646. }, {
  5647. "label": "元宝山区",
  5648. "value": "150403"
  5649. }, {
  5650. "label": "松山区",
  5651. "value": "150404"
  5652. }, {
  5653. "label": "阿鲁科尔沁旗",
  5654. "value": "150421"
  5655. }, {
  5656. "label": "巴林左旗",
  5657. "value": "150422"
  5658. }, {
  5659. "label": "巴林右旗",
  5660. "value": "150423"
  5661. }, {
  5662. "label": "林西县",
  5663. "value": "150424"
  5664. }, {
  5665. "label": "克什克腾旗",
  5666. "value": "150425"
  5667. }, {
  5668. "label": "翁牛特旗",
  5669. "value": "150426"
  5670. }, {
  5671. "label": "喀喇沁旗",
  5672. "value": "150428"
  5673. }, {
  5674. "label": "宁城县",
  5675. "value": "150429"
  5676. }, {
  5677. "label": "敖汉旗",
  5678. "value": "150430"
  5679. }], [{
  5680. "label": "科尔沁区",
  5681. "value": "150502"
  5682. }, {
  5683. "label": "科尔沁左翼中旗",
  5684. "value": "150521"
  5685. }, {
  5686. "label": "科尔沁左翼后旗",
  5687. "value": "150522"
  5688. }, {
  5689. "label": "开鲁县",
  5690. "value": "150523"
  5691. }, {
  5692. "label": "库伦旗",
  5693. "value": "150524"
  5694. }, {
  5695. "label": "奈曼旗",
  5696. "value": "150525"
  5697. }, {
  5698. "label": "扎鲁特旗",
  5699. "value": "150526"
  5700. }, {
  5701. "label": "通辽经济技术开发区",
  5702. "value": "150571"
  5703. }, {
  5704. "label": "霍林郭勒市",
  5705. "value": "150581"
  5706. }], [{
  5707. "label": "东胜区",
  5708. "value": "150602"
  5709. }, {
  5710. "label": "康巴什区",
  5711. "value": "150603"
  5712. }, {
  5713. "label": "达拉特旗",
  5714. "value": "150621"
  5715. }, {
  5716. "label": "准格尔旗",
  5717. "value": "150622"
  5718. }, {
  5719. "label": "鄂托克前旗",
  5720. "value": "150623"
  5721. }, {
  5722. "label": "鄂托克旗",
  5723. "value": "150624"
  5724. }, {
  5725. "label": "杭锦旗",
  5726. "value": "150625"
  5727. }, {
  5728. "label": "乌审旗",
  5729. "value": "150626"
  5730. }, {
  5731. "label": "伊金霍洛旗",
  5732. "value": "150627"
  5733. }], [{
  5734. "label": "海拉尔区",
  5735. "value": "150702"
  5736. }, {
  5737. "label": "扎赉诺尔区",
  5738. "value": "150703"
  5739. }, {
  5740. "label": "阿荣旗",
  5741. "value": "150721"
  5742. }, {
  5743. "label": "莫力达瓦达斡尔族自治旗",
  5744. "value": "150722"
  5745. }, {
  5746. "label": "鄂伦春自治旗",
  5747. "value": "150723"
  5748. }, {
  5749. "label": "鄂温克族自治旗",
  5750. "value": "150724"
  5751. }, {
  5752. "label": "陈巴尔虎旗",
  5753. "value": "150725"
  5754. }, {
  5755. "label": "新巴尔虎左旗",
  5756. "value": "150726"
  5757. }, {
  5758. "label": "新巴尔虎右旗",
  5759. "value": "150727"
  5760. }, {
  5761. "label": "满洲里市",
  5762. "value": "150781"
  5763. }, {
  5764. "label": "牙克石市",
  5765. "value": "150782"
  5766. }, {
  5767. "label": "扎兰屯市",
  5768. "value": "150783"
  5769. }, {
  5770. "label": "额尔古纳市",
  5771. "value": "150784"
  5772. }, {
  5773. "label": "根河市",
  5774. "value": "150785"
  5775. }], [{
  5776. "label": "临河区",
  5777. "value": "150802"
  5778. }, {
  5779. "label": "五原县",
  5780. "value": "150821"
  5781. }, {
  5782. "label": "磴口县",
  5783. "value": "150822"
  5784. }, {
  5785. "label": "乌拉特前旗",
  5786. "value": "150823"
  5787. }, {
  5788. "label": "乌拉特中旗",
  5789. "value": "150824"
  5790. }, {
  5791. "label": "乌拉特后旗",
  5792. "value": "150825"
  5793. }, {
  5794. "label": "杭锦后旗",
  5795. "value": "150826"
  5796. }], [{
  5797. "label": "集宁区",
  5798. "value": "150902"
  5799. }, {
  5800. "label": "卓资县",
  5801. "value": "150921"
  5802. }, {
  5803. "label": "化德县",
  5804. "value": "150922"
  5805. }, {
  5806. "label": "商都县",
  5807. "value": "150923"
  5808. }, {
  5809. "label": "兴和县",
  5810. "value": "150924"
  5811. }, {
  5812. "label": "凉城县",
  5813. "value": "150925"
  5814. }, {
  5815. "label": "察哈尔右翼前旗",
  5816. "value": "150926"
  5817. }, {
  5818. "label": "察哈尔右翼中旗",
  5819. "value": "150927"
  5820. }, {
  5821. "label": "察哈尔右翼后旗",
  5822. "value": "150928"
  5823. }, {
  5824. "label": "四子王旗",
  5825. "value": "150929"
  5826. }, {
  5827. "label": "丰镇市",
  5828. "value": "150981"
  5829. }], [{
  5830. "label": "乌兰浩特市",
  5831. "value": "152201"
  5832. }, {
  5833. "label": "阿尔山市",
  5834. "value": "152202"
  5835. }, {
  5836. "label": "科尔沁右翼前旗",
  5837. "value": "152221"
  5838. }, {
  5839. "label": "科尔沁右翼中旗",
  5840. "value": "152222"
  5841. }, {
  5842. "label": "扎赉特旗",
  5843. "value": "152223"
  5844. }, {
  5845. "label": "突泉县",
  5846. "value": "152224"
  5847. }], [{
  5848. "label": "二连浩特市",
  5849. "value": "152501"
  5850. }, {
  5851. "label": "锡林浩特市",
  5852. "value": "152502"
  5853. }, {
  5854. "label": "阿巴嘎旗",
  5855. "value": "152522"
  5856. }, {
  5857. "label": "苏尼特左旗",
  5858. "value": "152523"
  5859. }, {
  5860. "label": "苏尼特右旗",
  5861. "value": "152524"
  5862. }, {
  5863. "label": "东乌珠穆沁旗",
  5864. "value": "152525"
  5865. }, {
  5866. "label": "西乌珠穆沁旗",
  5867. "value": "152526"
  5868. }, {
  5869. "label": "太仆寺旗",
  5870. "value": "152527"
  5871. }, {
  5872. "label": "镶黄旗",
  5873. "value": "152528"
  5874. }, {
  5875. "label": "正镶白旗",
  5876. "value": "152529"
  5877. }, {
  5878. "label": "正蓝旗",
  5879. "value": "152530"
  5880. }, {
  5881. "label": "多伦县",
  5882. "value": "152531"
  5883. }, {
  5884. "label": "乌拉盖管委会",
  5885. "value": "152571"
  5886. }], [{
  5887. "label": "阿拉善左旗",
  5888. "value": "152921"
  5889. }, {
  5890. "label": "阿拉善右旗",
  5891. "value": "152922"
  5892. }, {
  5893. "label": "额济纳旗",
  5894. "value": "152923"
  5895. }, {
  5896. "label": "内蒙古阿拉善经济开发区",
  5897. "value": "152971"
  5898. }]], [[{
  5899. "label": "和平区",
  5900. "value": "210102"
  5901. }, {
  5902. "label": "沈河区",
  5903. "value": "210103"
  5904. }, {
  5905. "label": "大东区",
  5906. "value": "210104"
  5907. }, {
  5908. "label": "皇姑区",
  5909. "value": "210105"
  5910. }, {
  5911. "label": "铁西区",
  5912. "value": "210106"
  5913. }, {
  5914. "label": "苏家屯区",
  5915. "value": "210111"
  5916. }, {
  5917. "label": "浑南区",
  5918. "value": "210112"
  5919. }, {
  5920. "label": "沈北新区",
  5921. "value": "210113"
  5922. }, {
  5923. "label": "于洪区",
  5924. "value": "210114"
  5925. }, {
  5926. "label": "辽中区",
  5927. "value": "210115"
  5928. }, {
  5929. "label": "康平县",
  5930. "value": "210123"
  5931. }, {
  5932. "label": "法库县",
  5933. "value": "210124"
  5934. }, {
  5935. "label": "新民市",
  5936. "value": "210181"
  5937. }], [{
  5938. "label": "中山区",
  5939. "value": "210202"
  5940. }, {
  5941. "label": "西岗区",
  5942. "value": "210203"
  5943. }, {
  5944. "label": "沙河口区",
  5945. "value": "210204"
  5946. }, {
  5947. "label": "甘井子区",
  5948. "value": "210211"
  5949. }, {
  5950. "label": "旅顺口区",
  5951. "value": "210212"
  5952. }, {
  5953. "label": "金州区",
  5954. "value": "210213"
  5955. }, {
  5956. "label": "普兰店区",
  5957. "value": "210214"
  5958. }, {
  5959. "label": "长海县",
  5960. "value": "210224"
  5961. }, {
  5962. "label": "瓦房店市",
  5963. "value": "210281"
  5964. }, {
  5965. "label": "庄河市",
  5966. "value": "210283"
  5967. }], [{
  5968. "label": "铁东区",
  5969. "value": "210302"
  5970. }, {
  5971. "label": "铁西区",
  5972. "value": "210303"
  5973. }, {
  5974. "label": "立山区",
  5975. "value": "210304"
  5976. }, {
  5977. "label": "千山区",
  5978. "value": "210311"
  5979. }, {
  5980. "label": "台安县",
  5981. "value": "210321"
  5982. }, {
  5983. "label": "岫岩满族自治县",
  5984. "value": "210323"
  5985. }, {
  5986. "label": "海城市",
  5987. "value": "210381"
  5988. }], [{
  5989. "label": "新抚区",
  5990. "value": "210402"
  5991. }, {
  5992. "label": "东洲区",
  5993. "value": "210403"
  5994. }, {
  5995. "label": "望花区",
  5996. "value": "210404"
  5997. }, {
  5998. "label": "顺城区",
  5999. "value": "210411"
  6000. }, {
  6001. "label": "抚顺县",
  6002. "value": "210421"
  6003. }, {
  6004. "label": "新宾满族自治县",
  6005. "value": "210422"
  6006. }, {
  6007. "label": "清原满族自治县",
  6008. "value": "210423"
  6009. }], [{
  6010. "label": "平山区",
  6011. "value": "210502"
  6012. }, {
  6013. "label": "溪湖区",
  6014. "value": "210503"
  6015. }, {
  6016. "label": "明山区",
  6017. "value": "210504"
  6018. }, {
  6019. "label": "南芬区",
  6020. "value": "210505"
  6021. }, {
  6022. "label": "本溪满族自治县",
  6023. "value": "210521"
  6024. }, {
  6025. "label": "桓仁满族自治县",
  6026. "value": "210522"
  6027. }], [{
  6028. "label": "元宝区",
  6029. "value": "210602"
  6030. }, {
  6031. "label": "振兴区",
  6032. "value": "210603"
  6033. }, {
  6034. "label": "振安区",
  6035. "value": "210604"
  6036. }, {
  6037. "label": "宽甸满族自治县",
  6038. "value": "210624"
  6039. }, {
  6040. "label": "东港市",
  6041. "value": "210681"
  6042. }, {
  6043. "label": "凤城市",
  6044. "value": "210682"
  6045. }], [{
  6046. "label": "古塔区",
  6047. "value": "210702"
  6048. }, {
  6049. "label": "凌河区",
  6050. "value": "210703"
  6051. }, {
  6052. "label": "太和区",
  6053. "value": "210711"
  6054. }, {
  6055. "label": "黑山县",
  6056. "value": "210726"
  6057. }, {
  6058. "label": "义县",
  6059. "value": "210727"
  6060. }, {
  6061. "label": "凌海市",
  6062. "value": "210781"
  6063. }, {
  6064. "label": "北镇市",
  6065. "value": "210782"
  6066. }], [{
  6067. "label": "站前区",
  6068. "value": "210802"
  6069. }, {
  6070. "label": "西市区",
  6071. "value": "210803"
  6072. }, {
  6073. "label": "鲅鱼圈区",
  6074. "value": "210804"
  6075. }, {
  6076. "label": "老边区",
  6077. "value": "210811"
  6078. }, {
  6079. "label": "盖州市",
  6080. "value": "210881"
  6081. }, {
  6082. "label": "大石桥市",
  6083. "value": "210882"
  6084. }], [{
  6085. "label": "海州区",
  6086. "value": "210902"
  6087. }, {
  6088. "label": "新邱区",
  6089. "value": "210903"
  6090. }, {
  6091. "label": "太平区",
  6092. "value": "210904"
  6093. }, {
  6094. "label": "清河门区",
  6095. "value": "210905"
  6096. }, {
  6097. "label": "细河区",
  6098. "value": "210911"
  6099. }, {
  6100. "label": "阜新蒙古族自治县",
  6101. "value": "210921"
  6102. }, {
  6103. "label": "彰武县",
  6104. "value": "210922"
  6105. }], [{
  6106. "label": "白塔区",
  6107. "value": "211002"
  6108. }, {
  6109. "label": "文圣区",
  6110. "value": "211003"
  6111. }, {
  6112. "label": "宏伟区",
  6113. "value": "211004"
  6114. }, {
  6115. "label": "弓长岭区",
  6116. "value": "211005"
  6117. }, {
  6118. "label": "太子河区",
  6119. "value": "211011"
  6120. }, {
  6121. "label": "辽阳县",
  6122. "value": "211021"
  6123. }, {
  6124. "label": "灯塔市",
  6125. "value": "211081"
  6126. }], [{
  6127. "label": "双台子区",
  6128. "value": "211102"
  6129. }, {
  6130. "label": "兴隆台区",
  6131. "value": "211103"
  6132. }, {
  6133. "label": "大洼区",
  6134. "value": "211104"
  6135. }, {
  6136. "label": "盘山县",
  6137. "value": "211122"
  6138. }], [{
  6139. "label": "银州区",
  6140. "value": "211202"
  6141. }, {
  6142. "label": "清河区",
  6143. "value": "211204"
  6144. }, {
  6145. "label": "铁岭县",
  6146. "value": "211221"
  6147. }, {
  6148. "label": "西丰县",
  6149. "value": "211223"
  6150. }, {
  6151. "label": "昌图县",
  6152. "value": "211224"
  6153. }, {
  6154. "label": "调兵山市",
  6155. "value": "211281"
  6156. }, {
  6157. "label": "开原市",
  6158. "value": "211282"
  6159. }], [{
  6160. "label": "双塔区",
  6161. "value": "211302"
  6162. }, {
  6163. "label": "龙城区",
  6164. "value": "211303"
  6165. }, {
  6166. "label": "朝阳县",
  6167. "value": "211321"
  6168. }, {
  6169. "label": "建平县",
  6170. "value": "211322"
  6171. }, {
  6172. "label": "喀喇沁左翼蒙古族自治县",
  6173. "value": "211324"
  6174. }, {
  6175. "label": "北票市",
  6176. "value": "211381"
  6177. }, {
  6178. "label": "凌源市",
  6179. "value": "211382"
  6180. }], [{
  6181. "label": "连山区",
  6182. "value": "211402"
  6183. }, {
  6184. "label": "龙港区",
  6185. "value": "211403"
  6186. }, {
  6187. "label": "南票区",
  6188. "value": "211404"
  6189. }, {
  6190. "label": "绥中县",
  6191. "value": "211421"
  6192. }, {
  6193. "label": "建昌县",
  6194. "value": "211422"
  6195. }, {
  6196. "label": "兴城市",
  6197. "value": "211481"
  6198. }]], [[{
  6199. "label": "南关区",
  6200. "value": "220102"
  6201. }, {
  6202. "label": "宽城区",
  6203. "value": "220103"
  6204. }, {
  6205. "label": "朝阳区",
  6206. "value": "220104"
  6207. }, {
  6208. "label": "二道区",
  6209. "value": "220105"
  6210. }, {
  6211. "label": "绿园区",
  6212. "value": "220106"
  6213. }, {
  6214. "label": "双阳区",
  6215. "value": "220112"
  6216. }, {
  6217. "label": "九台区",
  6218. "value": "220113"
  6219. }, {
  6220. "label": "农安县",
  6221. "value": "220122"
  6222. }, {
  6223. "label": "长春经济技术开发区",
  6224. "value": "220171"
  6225. }, {
  6226. "label": "长春净月高新技术产业开发区",
  6227. "value": "220172"
  6228. }, {
  6229. "label": "长春高新技术产业开发区",
  6230. "value": "220173"
  6231. }, {
  6232. "label": "长春汽车经济技术开发区",
  6233. "value": "220174"
  6234. }, {
  6235. "label": "榆树市",
  6236. "value": "220182"
  6237. }, {
  6238. "label": "德惠市",
  6239. "value": "220183"
  6240. }], [{
  6241. "label": "昌邑区",
  6242. "value": "220202"
  6243. }, {
  6244. "label": "龙潭区",
  6245. "value": "220203"
  6246. }, {
  6247. "label": "船营区",
  6248. "value": "220204"
  6249. }, {
  6250. "label": "丰满区",
  6251. "value": "220211"
  6252. }, {
  6253. "label": "永吉县",
  6254. "value": "220221"
  6255. }, {
  6256. "label": "吉林经济开发区",
  6257. "value": "220271"
  6258. }, {
  6259. "label": "吉林高新技术产业开发区",
  6260. "value": "220272"
  6261. }, {
  6262. "label": "吉林中国新加坡食品区",
  6263. "value": "220273"
  6264. }, {
  6265. "label": "蛟河市",
  6266. "value": "220281"
  6267. }, {
  6268. "label": "桦甸市",
  6269. "value": "220282"
  6270. }, {
  6271. "label": "舒兰市",
  6272. "value": "220283"
  6273. }, {
  6274. "label": "磐石市",
  6275. "value": "220284"
  6276. }], [{
  6277. "label": "铁西区",
  6278. "value": "220302"
  6279. }, {
  6280. "label": "铁东区",
  6281. "value": "220303"
  6282. }, {
  6283. "label": "梨树县",
  6284. "value": "220322"
  6285. }, {
  6286. "label": "伊通满族自治县",
  6287. "value": "220323"
  6288. }, {
  6289. "label": "公主岭市",
  6290. "value": "220381"
  6291. }, {
  6292. "label": "双辽市",
  6293. "value": "220382"
  6294. }], [{
  6295. "label": "龙山区",
  6296. "value": "220402"
  6297. }, {
  6298. "label": "西安区",
  6299. "value": "220403"
  6300. }, {
  6301. "label": "东丰县",
  6302. "value": "220421"
  6303. }, {
  6304. "label": "东辽县",
  6305. "value": "220422"
  6306. }], [{
  6307. "label": "东昌区",
  6308. "value": "220502"
  6309. }, {
  6310. "label": "二道江区",
  6311. "value": "220503"
  6312. }, {
  6313. "label": "通化县",
  6314. "value": "220521"
  6315. }, {
  6316. "label": "辉南县",
  6317. "value": "220523"
  6318. }, {
  6319. "label": "柳河县",
  6320. "value": "220524"
  6321. }, {
  6322. "label": "梅河口市",
  6323. "value": "220581"
  6324. }, {
  6325. "label": "集安市",
  6326. "value": "220582"
  6327. }], [{
  6328. "label": "浑江区",
  6329. "value": "220602"
  6330. }, {
  6331. "label": "江源区",
  6332. "value": "220605"
  6333. }, {
  6334. "label": "抚松县",
  6335. "value": "220621"
  6336. }, {
  6337. "label": "靖宇县",
  6338. "value": "220622"
  6339. }, {
  6340. "label": "长白朝鲜族自治县",
  6341. "value": "220623"
  6342. }, {
  6343. "label": "临江市",
  6344. "value": "220681"
  6345. }], [{
  6346. "label": "宁江区",
  6347. "value": "220702"
  6348. }, {
  6349. "label": "前郭尔罗斯蒙古族自治县",
  6350. "value": "220721"
  6351. }, {
  6352. "label": "长岭县",
  6353. "value": "220722"
  6354. }, {
  6355. "label": "乾安县",
  6356. "value": "220723"
  6357. }, {
  6358. "label": "吉林松原经济开发区",
  6359. "value": "220771"
  6360. }, {
  6361. "label": "扶余市",
  6362. "value": "220781"
  6363. }], [{
  6364. "label": "洮北区",
  6365. "value": "220802"
  6366. }, {
  6367. "label": "镇赉县",
  6368. "value": "220821"
  6369. }, {
  6370. "label": "通榆县",
  6371. "value": "220822"
  6372. }, {
  6373. "label": "吉林白城经济开发区",
  6374. "value": "220871"
  6375. }, {
  6376. "label": "洮南市",
  6377. "value": "220881"
  6378. }, {
  6379. "label": "大安市",
  6380. "value": "220882"
  6381. }], [{
  6382. "label": "延吉市",
  6383. "value": "222401"
  6384. }, {
  6385. "label": "图们市",
  6386. "value": "222402"
  6387. }, {
  6388. "label": "敦化市",
  6389. "value": "222403"
  6390. }, {
  6391. "label": "珲春市",
  6392. "value": "222404"
  6393. }, {
  6394. "label": "龙井市",
  6395. "value": "222405"
  6396. }, {
  6397. "label": "和龙市",
  6398. "value": "222406"
  6399. }, {
  6400. "label": "汪清县",
  6401. "value": "222424"
  6402. }, {
  6403. "label": "安图县",
  6404. "value": "222426"
  6405. }]], [[{
  6406. "label": "道里区",
  6407. "value": "230102"
  6408. }, {
  6409. "label": "南岗区",
  6410. "value": "230103"
  6411. }, {
  6412. "label": "道外区",
  6413. "value": "230104"
  6414. }, {
  6415. "label": "平房区",
  6416. "value": "230108"
  6417. }, {
  6418. "label": "松北区",
  6419. "value": "230109"
  6420. }, {
  6421. "label": "香坊区",
  6422. "value": "230110"
  6423. }, {
  6424. "label": "呼兰区",
  6425. "value": "230111"
  6426. }, {
  6427. "label": "阿城区",
  6428. "value": "230112"
  6429. }, {
  6430. "label": "双城区",
  6431. "value": "230113"
  6432. }, {
  6433. "label": "依兰县",
  6434. "value": "230123"
  6435. }, {
  6436. "label": "方正县",
  6437. "value": "230124"
  6438. }, {
  6439. "label": "宾县",
  6440. "value": "230125"
  6441. }, {
  6442. "label": "巴彦县",
  6443. "value": "230126"
  6444. }, {
  6445. "label": "木兰县",
  6446. "value": "230127"
  6447. }, {
  6448. "label": "通河县",
  6449. "value": "230128"
  6450. }, {
  6451. "label": "延寿县",
  6452. "value": "230129"
  6453. }, {
  6454. "label": "尚志市",
  6455. "value": "230183"
  6456. }, {
  6457. "label": "五常市",
  6458. "value": "230184"
  6459. }], [{
  6460. "label": "龙沙区",
  6461. "value": "230202"
  6462. }, {
  6463. "label": "建华区",
  6464. "value": "230203"
  6465. }, {
  6466. "label": "铁锋区",
  6467. "value": "230204"
  6468. }, {
  6469. "label": "昂昂溪区",
  6470. "value": "230205"
  6471. }, {
  6472. "label": "富拉尔基区",
  6473. "value": "230206"
  6474. }, {
  6475. "label": "碾子山区",
  6476. "value": "230207"
  6477. }, {
  6478. "label": "梅里斯达斡尔族区",
  6479. "value": "230208"
  6480. }, {
  6481. "label": "龙江县",
  6482. "value": "230221"
  6483. }, {
  6484. "label": "依安县",
  6485. "value": "230223"
  6486. }, {
  6487. "label": "泰来县",
  6488. "value": "230224"
  6489. }, {
  6490. "label": "甘南县",
  6491. "value": "230225"
  6492. }, {
  6493. "label": "富裕县",
  6494. "value": "230227"
  6495. }, {
  6496. "label": "克山县",
  6497. "value": "230229"
  6498. }, {
  6499. "label": "克东县",
  6500. "value": "230230"
  6501. }, {
  6502. "label": "拜泉县",
  6503. "value": "230231"
  6504. }, {
  6505. "label": "讷河市",
  6506. "value": "230281"
  6507. }], [{
  6508. "label": "鸡冠区",
  6509. "value": "230302"
  6510. }, {
  6511. "label": "恒山区",
  6512. "value": "230303"
  6513. }, {
  6514. "label": "滴道区",
  6515. "value": "230304"
  6516. }, {
  6517. "label": "梨树区",
  6518. "value": "230305"
  6519. }, {
  6520. "label": "城子河区",
  6521. "value": "230306"
  6522. }, {
  6523. "label": "麻山区",
  6524. "value": "230307"
  6525. }, {
  6526. "label": "鸡东县",
  6527. "value": "230321"
  6528. }, {
  6529. "label": "虎林市",
  6530. "value": "230381"
  6531. }, {
  6532. "label": "密山市",
  6533. "value": "230382"
  6534. }], [{
  6535. "label": "向阳区",
  6536. "value": "230402"
  6537. }, {
  6538. "label": "工农区",
  6539. "value": "230403"
  6540. }, {
  6541. "label": "南山区",
  6542. "value": "230404"
  6543. }, {
  6544. "label": "兴安区",
  6545. "value": "230405"
  6546. }, {
  6547. "label": "东山区",
  6548. "value": "230406"
  6549. }, {
  6550. "label": "兴山区",
  6551. "value": "230407"
  6552. }, {
  6553. "label": "萝北县",
  6554. "value": "230421"
  6555. }, {
  6556. "label": "绥滨县",
  6557. "value": "230422"
  6558. }], [{
  6559. "label": "尖山区",
  6560. "value": "230502"
  6561. }, {
  6562. "label": "岭东区",
  6563. "value": "230503"
  6564. }, {
  6565. "label": "四方台区",
  6566. "value": "230505"
  6567. }, {
  6568. "label": "宝山区",
  6569. "value": "230506"
  6570. }, {
  6571. "label": "集贤县",
  6572. "value": "230521"
  6573. }, {
  6574. "label": "友谊县",
  6575. "value": "230522"
  6576. }, {
  6577. "label": "宝清县",
  6578. "value": "230523"
  6579. }, {
  6580. "label": "饶河县",
  6581. "value": "230524"
  6582. }], [{
  6583. "label": "萨尔图区",
  6584. "value": "230602"
  6585. }, {
  6586. "label": "龙凤区",
  6587. "value": "230603"
  6588. }, {
  6589. "label": "让胡路区",
  6590. "value": "230604"
  6591. }, {
  6592. "label": "红岗区",
  6593. "value": "230605"
  6594. }, {
  6595. "label": "大同区",
  6596. "value": "230606"
  6597. }, {
  6598. "label": "肇州县",
  6599. "value": "230621"
  6600. }, {
  6601. "label": "肇源县",
  6602. "value": "230622"
  6603. }, {
  6604. "label": "林甸县",
  6605. "value": "230623"
  6606. }, {
  6607. "label": "杜尔伯特蒙古族自治县",
  6608. "value": "230624"
  6609. }, {
  6610. "label": "大庆高新技术产业开发区",
  6611. "value": "230671"
  6612. }], [{
  6613. "label": "伊春区",
  6614. "value": "230702"
  6615. }, {
  6616. "label": "南岔区",
  6617. "value": "230703"
  6618. }, {
  6619. "label": "友好区",
  6620. "value": "230704"
  6621. }, {
  6622. "label": "西林区",
  6623. "value": "230705"
  6624. }, {
  6625. "label": "翠峦区",
  6626. "value": "230706"
  6627. }, {
  6628. "label": "新青区",
  6629. "value": "230707"
  6630. }, {
  6631. "label": "美溪区",
  6632. "value": "230708"
  6633. }, {
  6634. "label": "金山屯区",
  6635. "value": "230709"
  6636. }, {
  6637. "label": "五营区",
  6638. "value": "230710"
  6639. }, {
  6640. "label": "乌马河区",
  6641. "value": "230711"
  6642. }, {
  6643. "label": "汤旺河区",
  6644. "value": "230712"
  6645. }, {
  6646. "label": "带岭区",
  6647. "value": "230713"
  6648. }, {
  6649. "label": "乌伊岭区",
  6650. "value": "230714"
  6651. }, {
  6652. "label": "红星区",
  6653. "value": "230715"
  6654. }, {
  6655. "label": "上甘岭区",
  6656. "value": "230716"
  6657. }, {
  6658. "label": "嘉荫县",
  6659. "value": "230722"
  6660. }, {
  6661. "label": "铁力市",
  6662. "value": "230781"
  6663. }], [{
  6664. "label": "向阳区",
  6665. "value": "230803"
  6666. }, {
  6667. "label": "前进区",
  6668. "value": "230804"
  6669. }, {
  6670. "label": "东风区",
  6671. "value": "230805"
  6672. }, {
  6673. "label": "郊区",
  6674. "value": "230811"
  6675. }, {
  6676. "label": "桦南县",
  6677. "value": "230822"
  6678. }, {
  6679. "label": "桦川县",
  6680. "value": "230826"
  6681. }, {
  6682. "label": "汤原县",
  6683. "value": "230828"
  6684. }, {
  6685. "label": "同江市",
  6686. "value": "230881"
  6687. }, {
  6688. "label": "富锦市",
  6689. "value": "230882"
  6690. }, {
  6691. "label": "抚远市",
  6692. "value": "230883"
  6693. }], [{
  6694. "label": "新兴区",
  6695. "value": "230902"
  6696. }, {
  6697. "label": "桃山区",
  6698. "value": "230903"
  6699. }, {
  6700. "label": "茄子河区",
  6701. "value": "230904"
  6702. }, {
  6703. "label": "勃利县",
  6704. "value": "230921"
  6705. }], [{
  6706. "label": "东安区",
  6707. "value": "231002"
  6708. }, {
  6709. "label": "阳明区",
  6710. "value": "231003"
  6711. }, {
  6712. "label": "爱民区",
  6713. "value": "231004"
  6714. }, {
  6715. "label": "西安区",
  6716. "value": "231005"
  6717. }, {
  6718. "label": "林口县",
  6719. "value": "231025"
  6720. }, {
  6721. "label": "牡丹江经济技术开发区",
  6722. "value": "231071"
  6723. }, {
  6724. "label": "绥芬河市",
  6725. "value": "231081"
  6726. }, {
  6727. "label": "海林市",
  6728. "value": "231083"
  6729. }, {
  6730. "label": "宁安市",
  6731. "value": "231084"
  6732. }, {
  6733. "label": "穆棱市",
  6734. "value": "231085"
  6735. }, {
  6736. "label": "东宁市",
  6737. "value": "231086"
  6738. }], [{
  6739. "label": "爱辉区",
  6740. "value": "231102"
  6741. }, {
  6742. "label": "嫩江县",
  6743. "value": "231121"
  6744. }, {
  6745. "label": "逊克县",
  6746. "value": "231123"
  6747. }, {
  6748. "label": "孙吴县",
  6749. "value": "231124"
  6750. }, {
  6751. "label": "北安市",
  6752. "value": "231181"
  6753. }, {
  6754. "label": "五大连池市",
  6755. "value": "231182"
  6756. }], [{
  6757. "label": "北林区",
  6758. "value": "231202"
  6759. }, {
  6760. "label": "望奎县",
  6761. "value": "231221"
  6762. }, {
  6763. "label": "兰西县",
  6764. "value": "231222"
  6765. }, {
  6766. "label": "青冈县",
  6767. "value": "231223"
  6768. }, {
  6769. "label": "庆安县",
  6770. "value": "231224"
  6771. }, {
  6772. "label": "明水县",
  6773. "value": "231225"
  6774. }, {
  6775. "label": "绥棱县",
  6776. "value": "231226"
  6777. }, {
  6778. "label": "安达市",
  6779. "value": "231281"
  6780. }, {
  6781. "label": "肇东市",
  6782. "value": "231282"
  6783. }, {
  6784. "label": "海伦市",
  6785. "value": "231283"
  6786. }], [{
  6787. "label": "加格达奇区",
  6788. "value": "232701"
  6789. }, {
  6790. "label": "松岭区",
  6791. "value": "232702"
  6792. }, {
  6793. "label": "新林区",
  6794. "value": "232703"
  6795. }, {
  6796. "label": "呼中区",
  6797. "value": "232704"
  6798. }, {
  6799. "label": "呼玛县",
  6800. "value": "232721"
  6801. }, {
  6802. "label": "塔河县",
  6803. "value": "232722"
  6804. }, {
  6805. "label": "漠河县",
  6806. "value": "232723"
  6807. }]], [[{
  6808. "label": "黄浦区",
  6809. "value": "310101"
  6810. }, {
  6811. "label": "徐汇区",
  6812. "value": "310104"
  6813. }, {
  6814. "label": "长宁区",
  6815. "value": "310105"
  6816. }, {
  6817. "label": "静安区",
  6818. "value": "310106"
  6819. }, {
  6820. "label": "普陀区",
  6821. "value": "310107"
  6822. }, {
  6823. "label": "虹口区",
  6824. "value": "310109"
  6825. }, {
  6826. "label": "杨浦区",
  6827. "value": "310110"
  6828. }, {
  6829. "label": "闵行区",
  6830. "value": "310112"
  6831. }, {
  6832. "label": "宝山区",
  6833. "value": "310113"
  6834. }, {
  6835. "label": "嘉定区",
  6836. "value": "310114"
  6837. }, {
  6838. "label": "浦东新区",
  6839. "value": "310115"
  6840. }, {
  6841. "label": "金山区",
  6842. "value": "310116"
  6843. }, {
  6844. "label": "松江区",
  6845. "value": "310117"
  6846. }, {
  6847. "label": "青浦区",
  6848. "value": "310118"
  6849. }, {
  6850. "label": "奉贤区",
  6851. "value": "310120"
  6852. }, {
  6853. "label": "崇明区",
  6854. "value": "310151"
  6855. }]], [[{
  6856. "label": "玄武区",
  6857. "value": "320102"
  6858. }, {
  6859. "label": "秦淮区",
  6860. "value": "320104"
  6861. }, {
  6862. "label": "建邺区",
  6863. "value": "320105"
  6864. }, {
  6865. "label": "鼓楼区",
  6866. "value": "320106"
  6867. }, {
  6868. "label": "浦口区",
  6869. "value": "320111"
  6870. }, {
  6871. "label": "栖霞区",
  6872. "value": "320113"
  6873. }, {
  6874. "label": "雨花台区",
  6875. "value": "320114"
  6876. }, {
  6877. "label": "江宁区",
  6878. "value": "320115"
  6879. }, {
  6880. "label": "六合区",
  6881. "value": "320116"
  6882. }, {
  6883. "label": "溧水区",
  6884. "value": "320117"
  6885. }, {
  6886. "label": "高淳区",
  6887. "value": "320118"
  6888. }], [{
  6889. "label": "锡山区",
  6890. "value": "320205"
  6891. }, {
  6892. "label": "惠山区",
  6893. "value": "320206"
  6894. }, {
  6895. "label": "滨湖区",
  6896. "value": "320211"
  6897. }, {
  6898. "label": "梁溪区",
  6899. "value": "320213"
  6900. }, {
  6901. "label": "新吴区",
  6902. "value": "320214"
  6903. }, {
  6904. "label": "江阴市",
  6905. "value": "320281"
  6906. }, {
  6907. "label": "宜兴市",
  6908. "value": "320282"
  6909. }], [{
  6910. "label": "鼓楼区",
  6911. "value": "320302"
  6912. }, {
  6913. "label": "云龙区",
  6914. "value": "320303"
  6915. }, {
  6916. "label": "贾汪区",
  6917. "value": "320305"
  6918. }, {
  6919. "label": "泉山区",
  6920. "value": "320311"
  6921. }, {
  6922. "label": "铜山区",
  6923. "value": "320312"
  6924. }, {
  6925. "label": "丰县",
  6926. "value": "320321"
  6927. }, {
  6928. "label": "沛县",
  6929. "value": "320322"
  6930. }, {
  6931. "label": "睢宁县",
  6932. "value": "320324"
  6933. }, {
  6934. "label": "徐州经济技术开发区",
  6935. "value": "320371"
  6936. }, {
  6937. "label": "新沂市",
  6938. "value": "320381"
  6939. }, {
  6940. "label": "邳州市",
  6941. "value": "320382"
  6942. }], [{
  6943. "label": "天宁区",
  6944. "value": "320402"
  6945. }, {
  6946. "label": "钟楼区",
  6947. "value": "320404"
  6948. }, {
  6949. "label": "新北区",
  6950. "value": "320411"
  6951. }, {
  6952. "label": "武进区",
  6953. "value": "320412"
  6954. }, {
  6955. "label": "金坛区",
  6956. "value": "320413"
  6957. }, {
  6958. "label": "溧阳市",
  6959. "value": "320481"
  6960. }], [{
  6961. "label": "虎丘区",
  6962. "value": "320505"
  6963. }, {
  6964. "label": "吴中区",
  6965. "value": "320506"
  6966. }, {
  6967. "label": "相城区",
  6968. "value": "320507"
  6969. }, {
  6970. "label": "姑苏区",
  6971. "value": "320508"
  6972. }, {
  6973. "label": "吴江区",
  6974. "value": "320509"
  6975. }, {
  6976. "label": "苏州工业园区",
  6977. "value": "320571"
  6978. }, {
  6979. "label": "常熟市",
  6980. "value": "320581"
  6981. }, {
  6982. "label": "张家港市",
  6983. "value": "320582"
  6984. }, {
  6985. "label": "昆山市",
  6986. "value": "320583"
  6987. }, {
  6988. "label": "太仓市",
  6989. "value": "320585"
  6990. }], [{
  6991. "label": "崇川区",
  6992. "value": "320602"
  6993. }, {
  6994. "label": "港闸区",
  6995. "value": "320611"
  6996. }, {
  6997. "label": "通州区",
  6998. "value": "320612"
  6999. }, {
  7000. "label": "海安县",
  7001. "value": "320621"
  7002. }, {
  7003. "label": "如东县",
  7004. "value": "320623"
  7005. }, {
  7006. "label": "南通经济技术开发区",
  7007. "value": "320671"
  7008. }, {
  7009. "label": "启东市",
  7010. "value": "320681"
  7011. }, {
  7012. "label": "如皋市",
  7013. "value": "320682"
  7014. }, {
  7015. "label": "海门市",
  7016. "value": "320684"
  7017. }], [{
  7018. "label": "连云区",
  7019. "value": "320703"
  7020. }, {
  7021. "label": "海州区",
  7022. "value": "320706"
  7023. }, {
  7024. "label": "赣榆区",
  7025. "value": "320707"
  7026. }, {
  7027. "label": "东海县",
  7028. "value": "320722"
  7029. }, {
  7030. "label": "灌云县",
  7031. "value": "320723"
  7032. }, {
  7033. "label": "灌南县",
  7034. "value": "320724"
  7035. }, {
  7036. "label": "连云港经济技术开发区",
  7037. "value": "320771"
  7038. }, {
  7039. "label": "连云港高新技术产业开发区",
  7040. "value": "320772"
  7041. }], [{
  7042. "label": "淮安区",
  7043. "value": "320803"
  7044. }, {
  7045. "label": "淮阴区",
  7046. "value": "320804"
  7047. }, {
  7048. "label": "清江浦区",
  7049. "value": "320812"
  7050. }, {
  7051. "label": "洪泽区",
  7052. "value": "320813"
  7053. }, {
  7054. "label": "涟水县",
  7055. "value": "320826"
  7056. }, {
  7057. "label": "盱眙县",
  7058. "value": "320830"
  7059. }, {
  7060. "label": "金湖县",
  7061. "value": "320831"
  7062. }, {
  7063. "label": "淮安经济技术开发区",
  7064. "value": "320871"
  7065. }], [{
  7066. "label": "亭湖区",
  7067. "value": "320902"
  7068. }, {
  7069. "label": "盐都区",
  7070. "value": "320903"
  7071. }, {
  7072. "label": "大丰区",
  7073. "value": "320904"
  7074. }, {
  7075. "label": "响水县",
  7076. "value": "320921"
  7077. }, {
  7078. "label": "滨海县",
  7079. "value": "320922"
  7080. }, {
  7081. "label": "阜宁县",
  7082. "value": "320923"
  7083. }, {
  7084. "label": "射阳县",
  7085. "value": "320924"
  7086. }, {
  7087. "label": "建湖县",
  7088. "value": "320925"
  7089. }, {
  7090. "label": "盐城经济技术开发区",
  7091. "value": "320971"
  7092. }, {
  7093. "label": "东台市",
  7094. "value": "320981"
  7095. }], [{
  7096. "label": "广陵区",
  7097. "value": "321002"
  7098. }, {
  7099. "label": "邗江区",
  7100. "value": "321003"
  7101. }, {
  7102. "label": "江都区",
  7103. "value": "321012"
  7104. }, {
  7105. "label": "宝应县",
  7106. "value": "321023"
  7107. }, {
  7108. "label": "扬州经济技术开发区",
  7109. "value": "321071"
  7110. }, {
  7111. "label": "仪征市",
  7112. "value": "321081"
  7113. }, {
  7114. "label": "高邮市",
  7115. "value": "321084"
  7116. }], [{
  7117. "label": "京口区",
  7118. "value": "321102"
  7119. }, {
  7120. "label": "润州区",
  7121. "value": "321111"
  7122. }, {
  7123. "label": "丹徒区",
  7124. "value": "321112"
  7125. }, {
  7126. "label": "镇江新区",
  7127. "value": "321171"
  7128. }, {
  7129. "label": "丹阳市",
  7130. "value": "321181"
  7131. }, {
  7132. "label": "扬中市",
  7133. "value": "321182"
  7134. }, {
  7135. "label": "句容市",
  7136. "value": "321183"
  7137. }], [{
  7138. "label": "海陵区",
  7139. "value": "321202"
  7140. }, {
  7141. "label": "高港区",
  7142. "value": "321203"
  7143. }, {
  7144. "label": "姜堰区",
  7145. "value": "321204"
  7146. }, {
  7147. "label": "泰州医药高新技术产业开发区",
  7148. "value": "321271"
  7149. }, {
  7150. "label": "兴化市",
  7151. "value": "321281"
  7152. }, {
  7153. "label": "靖江市",
  7154. "value": "321282"
  7155. }, {
  7156. "label": "泰兴市",
  7157. "value": "321283"
  7158. }], [{
  7159. "label": "宿城区",
  7160. "value": "321302"
  7161. }, {
  7162. "label": "宿豫区",
  7163. "value": "321311"
  7164. }, {
  7165. "label": "沭阳县",
  7166. "value": "321322"
  7167. }, {
  7168. "label": "泗阳县",
  7169. "value": "321323"
  7170. }, {
  7171. "label": "泗洪县",
  7172. "value": "321324"
  7173. }, {
  7174. "label": "宿迁经济技术开发区",
  7175. "value": "321371"
  7176. }]], [[{
  7177. "label": "上城区",
  7178. "value": "330102"
  7179. }, {
  7180. "label": "下城区",
  7181. "value": "330103"
  7182. }, {
  7183. "label": "江干区",
  7184. "value": "330104"
  7185. }, {
  7186. "label": "拱墅区",
  7187. "value": "330105"
  7188. }, {
  7189. "label": "西湖区",
  7190. "value": "330106"
  7191. }, {
  7192. "label": "滨江区",
  7193. "value": "330108"
  7194. }, {
  7195. "label": "萧山区",
  7196. "value": "330109"
  7197. }, {
  7198. "label": "余杭区",
  7199. "value": "330110"
  7200. }, {
  7201. "label": "富阳区",
  7202. "value": "330111"
  7203. }, {
  7204. "label": "临安区",
  7205. "value": "330112"
  7206. }, {
  7207. "label": "桐庐县",
  7208. "value": "330122"
  7209. }, {
  7210. "label": "淳安县",
  7211. "value": "330127"
  7212. }, {
  7213. "label": "建德市",
  7214. "value": "330182"
  7215. }], [{
  7216. "label": "海曙区",
  7217. "value": "330203"
  7218. }, {
  7219. "label": "江北区",
  7220. "value": "330205"
  7221. }, {
  7222. "label": "北仑区",
  7223. "value": "330206"
  7224. }, {
  7225. "label": "镇海区",
  7226. "value": "330211"
  7227. }, {
  7228. "label": "鄞州区",
  7229. "value": "330212"
  7230. }, {
  7231. "label": "奉化区",
  7232. "value": "330213"
  7233. }, {
  7234. "label": "象山县",
  7235. "value": "330225"
  7236. }, {
  7237. "label": "宁海县",
  7238. "value": "330226"
  7239. }, {
  7240. "label": "余姚市",
  7241. "value": "330281"
  7242. }, {
  7243. "label": "慈溪市",
  7244. "value": "330282"
  7245. }], [{
  7246. "label": "鹿城区",
  7247. "value": "330302"
  7248. }, {
  7249. "label": "龙湾区",
  7250. "value": "330303"
  7251. }, {
  7252. "label": "瓯海区",
  7253. "value": "330304"
  7254. }, {
  7255. "label": "洞头区",
  7256. "value": "330305"
  7257. }, {
  7258. "label": "永嘉县",
  7259. "value": "330324"
  7260. }, {
  7261. "label": "平阳县",
  7262. "value": "330326"
  7263. }, {
  7264. "label": "苍南县",
  7265. "value": "330327"
  7266. }, {
  7267. "label": "文成县",
  7268. "value": "330328"
  7269. }, {
  7270. "label": "泰顺县",
  7271. "value": "330329"
  7272. }, {
  7273. "label": "温州经济技术开发区",
  7274. "value": "330371"
  7275. }, {
  7276. "label": "瑞安市",
  7277. "value": "330381"
  7278. }, {
  7279. "label": "乐清市",
  7280. "value": "330382"
  7281. }], [{
  7282. "label": "南湖区",
  7283. "value": "330402"
  7284. }, {
  7285. "label": "秀洲区",
  7286. "value": "330411"
  7287. }, {
  7288. "label": "嘉善县",
  7289. "value": "330421"
  7290. }, {
  7291. "label": "海盐县",
  7292. "value": "330424"
  7293. }, {
  7294. "label": "海宁市",
  7295. "value": "330481"
  7296. }, {
  7297. "label": "平湖市",
  7298. "value": "330482"
  7299. }, {
  7300. "label": "桐乡市",
  7301. "value": "330483"
  7302. }], [{
  7303. "label": "吴兴区",
  7304. "value": "330502"
  7305. }, {
  7306. "label": "南浔区",
  7307. "value": "330503"
  7308. }, {
  7309. "label": "德清县",
  7310. "value": "330521"
  7311. }, {
  7312. "label": "长兴县",
  7313. "value": "330522"
  7314. }, {
  7315. "label": "安吉县",
  7316. "value": "330523"
  7317. }], [{
  7318. "label": "越城区",
  7319. "value": "330602"
  7320. }, {
  7321. "label": "柯桥区",
  7322. "value": "330603"
  7323. }, {
  7324. "label": "上虞区",
  7325. "value": "330604"
  7326. }, {
  7327. "label": "新昌县",
  7328. "value": "330624"
  7329. }, {
  7330. "label": "诸暨市",
  7331. "value": "330681"
  7332. }, {
  7333. "label": "嵊州市",
  7334. "value": "330683"
  7335. }], [{
  7336. "label": "婺城区",
  7337. "value": "330702"
  7338. }, {
  7339. "label": "金东区",
  7340. "value": "330703"
  7341. }, {
  7342. "label": "武义县",
  7343. "value": "330723"
  7344. }, {
  7345. "label": "浦江县",
  7346. "value": "330726"
  7347. }, {
  7348. "label": "磐安县",
  7349. "value": "330727"
  7350. }, {
  7351. "label": "兰溪市",
  7352. "value": "330781"
  7353. }, {
  7354. "label": "义乌市",
  7355. "value": "330782"
  7356. }, {
  7357. "label": "东阳市",
  7358. "value": "330783"
  7359. }, {
  7360. "label": "永康市",
  7361. "value": "330784"
  7362. }], [{
  7363. "label": "柯城区",
  7364. "value": "330802"
  7365. }, {
  7366. "label": "衢江区",
  7367. "value": "330803"
  7368. }, {
  7369. "label": "常山县",
  7370. "value": "330822"
  7371. }, {
  7372. "label": "开化县",
  7373. "value": "330824"
  7374. }, {
  7375. "label": "龙游县",
  7376. "value": "330825"
  7377. }, {
  7378. "label": "江山市",
  7379. "value": "330881"
  7380. }], [{
  7381. "label": "定海区",
  7382. "value": "330902"
  7383. }, {
  7384. "label": "普陀区",
  7385. "value": "330903"
  7386. }, {
  7387. "label": "岱山县",
  7388. "value": "330921"
  7389. }, {
  7390. "label": "嵊泗县",
  7391. "value": "330922"
  7392. }], [{
  7393. "label": "椒江区",
  7394. "value": "331002"
  7395. }, {
  7396. "label": "黄岩区",
  7397. "value": "331003"
  7398. }, {
  7399. "label": "路桥区",
  7400. "value": "331004"
  7401. }, {
  7402. "label": "三门县",
  7403. "value": "331022"
  7404. }, {
  7405. "label": "天台县",
  7406. "value": "331023"
  7407. }, {
  7408. "label": "仙居县",
  7409. "value": "331024"
  7410. }, {
  7411. "label": "温岭市",
  7412. "value": "331081"
  7413. }, {
  7414. "label": "临海市",
  7415. "value": "331082"
  7416. }, {
  7417. "label": "玉环市",
  7418. "value": "331083"
  7419. }], [{
  7420. "label": "莲都区",
  7421. "value": "331102"
  7422. }, {
  7423. "label": "青田县",
  7424. "value": "331121"
  7425. }, {
  7426. "label": "缙云县",
  7427. "value": "331122"
  7428. }, {
  7429. "label": "遂昌县",
  7430. "value": "331123"
  7431. }, {
  7432. "label": "松阳县",
  7433. "value": "331124"
  7434. }, {
  7435. "label": "云和县",
  7436. "value": "331125"
  7437. }, {
  7438. "label": "庆元县",
  7439. "value": "331126"
  7440. }, {
  7441. "label": "景宁畲族自治县",
  7442. "value": "331127"
  7443. }, {
  7444. "label": "龙泉市",
  7445. "value": "331181"
  7446. }]], [[{
  7447. "label": "瑶海区",
  7448. "value": "340102"
  7449. }, {
  7450. "label": "庐阳区",
  7451. "value": "340103"
  7452. }, {
  7453. "label": "蜀山区",
  7454. "value": "340104"
  7455. }, {
  7456. "label": "包河区",
  7457. "value": "340111"
  7458. }, {
  7459. "label": "长丰县",
  7460. "value": "340121"
  7461. }, {
  7462. "label": "肥东县",
  7463. "value": "340122"
  7464. }, {
  7465. "label": "肥西县",
  7466. "value": "340123"
  7467. }, {
  7468. "label": "庐江县",
  7469. "value": "340124"
  7470. }, {
  7471. "label": "合肥高新技术产业开发区",
  7472. "value": "340171"
  7473. }, {
  7474. "label": "合肥经济技术开发区",
  7475. "value": "340172"
  7476. }, {
  7477. "label": "合肥新站高新技术产业开发区",
  7478. "value": "340173"
  7479. }, {
  7480. "label": "巢湖市",
  7481. "value": "340181"
  7482. }], [{
  7483. "label": "镜湖区",
  7484. "value": "340202"
  7485. }, {
  7486. "label": "弋江区",
  7487. "value": "340203"
  7488. }, {
  7489. "label": "鸠江区",
  7490. "value": "340207"
  7491. }, {
  7492. "label": "三山区",
  7493. "value": "340208"
  7494. }, {
  7495. "label": "芜湖县",
  7496. "value": "340221"
  7497. }, {
  7498. "label": "繁昌县",
  7499. "value": "340222"
  7500. }, {
  7501. "label": "南陵县",
  7502. "value": "340223"
  7503. }, {
  7504. "label": "无为县",
  7505. "value": "340225"
  7506. }, {
  7507. "label": "芜湖经济技术开发区",
  7508. "value": "340271"
  7509. }, {
  7510. "label": "安徽芜湖长江大桥经济开发区",
  7511. "value": "340272"
  7512. }], [{
  7513. "label": "龙子湖区",
  7514. "value": "340302"
  7515. }, {
  7516. "label": "蚌山区",
  7517. "value": "340303"
  7518. }, {
  7519. "label": "禹会区",
  7520. "value": "340304"
  7521. }, {
  7522. "label": "淮上区",
  7523. "value": "340311"
  7524. }, {
  7525. "label": "怀远县",
  7526. "value": "340321"
  7527. }, {
  7528. "label": "五河县",
  7529. "value": "340322"
  7530. }, {
  7531. "label": "固镇县",
  7532. "value": "340323"
  7533. }, {
  7534. "label": "蚌埠市高新技术开发区",
  7535. "value": "340371"
  7536. }, {
  7537. "label": "蚌埠市经济开发区",
  7538. "value": "340372"
  7539. }], [{
  7540. "label": "大通区",
  7541. "value": "340402"
  7542. }, {
  7543. "label": "田家庵区",
  7544. "value": "340403"
  7545. }, {
  7546. "label": "谢家集区",
  7547. "value": "340404"
  7548. }, {
  7549. "label": "八公山区",
  7550. "value": "340405"
  7551. }, {
  7552. "label": "潘集区",
  7553. "value": "340406"
  7554. }, {
  7555. "label": "凤台县",
  7556. "value": "340421"
  7557. }, {
  7558. "label": "寿县",
  7559. "value": "340422"
  7560. }], [{
  7561. "label": "花山区",
  7562. "value": "340503"
  7563. }, {
  7564. "label": "雨山区",
  7565. "value": "340504"
  7566. }, {
  7567. "label": "博望区",
  7568. "value": "340506"
  7569. }, {
  7570. "label": "当涂县",
  7571. "value": "340521"
  7572. }, {
  7573. "label": "含山县",
  7574. "value": "340522"
  7575. }, {
  7576. "label": "和县",
  7577. "value": "340523"
  7578. }], [{
  7579. "label": "杜集区",
  7580. "value": "340602"
  7581. }, {
  7582. "label": "相山区",
  7583. "value": "340603"
  7584. }, {
  7585. "label": "烈山区",
  7586. "value": "340604"
  7587. }, {
  7588. "label": "濉溪县",
  7589. "value": "340621"
  7590. }], [{
  7591. "label": "铜官区",
  7592. "value": "340705"
  7593. }, {
  7594. "label": "义安区",
  7595. "value": "340706"
  7596. }, {
  7597. "label": "郊区",
  7598. "value": "340711"
  7599. }, {
  7600. "label": "枞阳县",
  7601. "value": "340722"
  7602. }], [{
  7603. "label": "迎江区",
  7604. "value": "340802"
  7605. }, {
  7606. "label": "大观区",
  7607. "value": "340803"
  7608. }, {
  7609. "label": "宜秀区",
  7610. "value": "340811"
  7611. }, {
  7612. "label": "怀宁县",
  7613. "value": "340822"
  7614. }, {
  7615. "label": "潜山县",
  7616. "value": "340824"
  7617. }, {
  7618. "label": "太湖县",
  7619. "value": "340825"
  7620. }, {
  7621. "label": "宿松县",
  7622. "value": "340826"
  7623. }, {
  7624. "label": "望江县",
  7625. "value": "340827"
  7626. }, {
  7627. "label": "岳西县",
  7628. "value": "340828"
  7629. }, {
  7630. "label": "安徽安庆经济开发区",
  7631. "value": "340871"
  7632. }, {
  7633. "label": "桐城市",
  7634. "value": "340881"
  7635. }], [{
  7636. "label": "屯溪区",
  7637. "value": "341002"
  7638. }, {
  7639. "label": "黄山区",
  7640. "value": "341003"
  7641. }, {
  7642. "label": "徽州区",
  7643. "value": "341004"
  7644. }, {
  7645. "label": "歙县",
  7646. "value": "341021"
  7647. }, {
  7648. "label": "休宁县",
  7649. "value": "341022"
  7650. }, {
  7651. "label": "黟县",
  7652. "value": "341023"
  7653. }, {
  7654. "label": "祁门县",
  7655. "value": "341024"
  7656. }], [{
  7657. "label": "琅琊区",
  7658. "value": "341102"
  7659. }, {
  7660. "label": "南谯区",
  7661. "value": "341103"
  7662. }, {
  7663. "label": "来安县",
  7664. "value": "341122"
  7665. }, {
  7666. "label": "全椒县",
  7667. "value": "341124"
  7668. }, {
  7669. "label": "定远县",
  7670. "value": "341125"
  7671. }, {
  7672. "label": "凤阳县",
  7673. "value": "341126"
  7674. }, {
  7675. "label": "苏滁现代产业园",
  7676. "value": "341171"
  7677. }, {
  7678. "label": "滁州经济技术开发区",
  7679. "value": "341172"
  7680. }, {
  7681. "label": "天长市",
  7682. "value": "341181"
  7683. }, {
  7684. "label": "明光市",
  7685. "value": "341182"
  7686. }], [{
  7687. "label": "颍州区",
  7688. "value": "341202"
  7689. }, {
  7690. "label": "颍东区",
  7691. "value": "341203"
  7692. }, {
  7693. "label": "颍泉区",
  7694. "value": "341204"
  7695. }, {
  7696. "label": "临泉县",
  7697. "value": "341221"
  7698. }, {
  7699. "label": "太和县",
  7700. "value": "341222"
  7701. }, {
  7702. "label": "阜南县",
  7703. "value": "341225"
  7704. }, {
  7705. "label": "颍上县",
  7706. "value": "341226"
  7707. }, {
  7708. "label": "阜阳合肥现代产业园区",
  7709. "value": "341271"
  7710. }, {
  7711. "label": "阜阳经济技术开发区",
  7712. "value": "341272"
  7713. }, {
  7714. "label": "界首市",
  7715. "value": "341282"
  7716. }], [{
  7717. "label": "埇桥区",
  7718. "value": "341302"
  7719. }, {
  7720. "label": "砀山县",
  7721. "value": "341321"
  7722. }, {
  7723. "label": "萧县",
  7724. "value": "341322"
  7725. }, {
  7726. "label": "灵璧县",
  7727. "value": "341323"
  7728. }, {
  7729. "label": "泗县",
  7730. "value": "341324"
  7731. }, {
  7732. "label": "宿州马鞍山现代产业园区",
  7733. "value": "341371"
  7734. }, {
  7735. "label": "宿州经济技术开发区",
  7736. "value": "341372"
  7737. }], [{
  7738. "label": "金安区",
  7739. "value": "341502"
  7740. }, {
  7741. "label": "裕安区",
  7742. "value": "341503"
  7743. }, {
  7744. "label": "叶集区",
  7745. "value": "341504"
  7746. }, {
  7747. "label": "霍邱县",
  7748. "value": "341522"
  7749. }, {
  7750. "label": "舒城县",
  7751. "value": "341523"
  7752. }, {
  7753. "label": "金寨县",
  7754. "value": "341524"
  7755. }, {
  7756. "label": "霍山县",
  7757. "value": "341525"
  7758. }], [{
  7759. "label": "谯城区",
  7760. "value": "341602"
  7761. }, {
  7762. "label": "涡阳县",
  7763. "value": "341621"
  7764. }, {
  7765. "label": "蒙城县",
  7766. "value": "341622"
  7767. }, {
  7768. "label": "利辛县",
  7769. "value": "341623"
  7770. }], [{
  7771. "label": "贵池区",
  7772. "value": "341702"
  7773. }, {
  7774. "label": "东至县",
  7775. "value": "341721"
  7776. }, {
  7777. "label": "石台县",
  7778. "value": "341722"
  7779. }, {
  7780. "label": "青阳县",
  7781. "value": "341723"
  7782. }], [{
  7783. "label": "宣州区",
  7784. "value": "341802"
  7785. }, {
  7786. "label": "郎溪县",
  7787. "value": "341821"
  7788. }, {
  7789. "label": "广德县",
  7790. "value": "341822"
  7791. }, {
  7792. "label": "泾县",
  7793. "value": "341823"
  7794. }, {
  7795. "label": "绩溪县",
  7796. "value": "341824"
  7797. }, {
  7798. "label": "旌德县",
  7799. "value": "341825"
  7800. }, {
  7801. "label": "宣城市经济开发区",
  7802. "value": "341871"
  7803. }, {
  7804. "label": "宁国市",
  7805. "value": "341881"
  7806. }]], [[{
  7807. "label": "鼓楼区",
  7808. "value": "350102"
  7809. }, {
  7810. "label": "台江区",
  7811. "value": "350103"
  7812. }, {
  7813. "label": "仓山区",
  7814. "value": "350104"
  7815. }, {
  7816. "label": "马尾区",
  7817. "value": "350105"
  7818. }, {
  7819. "label": "晋安区",
  7820. "value": "350111"
  7821. }, {
  7822. "label": "闽侯县",
  7823. "value": "350121"
  7824. }, {
  7825. "label": "连江县",
  7826. "value": "350122"
  7827. }, {
  7828. "label": "罗源县",
  7829. "value": "350123"
  7830. }, {
  7831. "label": "闽清县",
  7832. "value": "350124"
  7833. }, {
  7834. "label": "永泰县",
  7835. "value": "350125"
  7836. }, {
  7837. "label": "平潭县",
  7838. "value": "350128"
  7839. }, {
  7840. "label": "福清市",
  7841. "value": "350181"
  7842. }, {
  7843. "label": "长乐市",
  7844. "value": "350182"
  7845. }], [{
  7846. "label": "思明区",
  7847. "value": "350203"
  7848. }, {
  7849. "label": "海沧区",
  7850. "value": "350205"
  7851. }, {
  7852. "label": "湖里区",
  7853. "value": "350206"
  7854. }, {
  7855. "label": "集美区",
  7856. "value": "350211"
  7857. }, {
  7858. "label": "同安区",
  7859. "value": "350212"
  7860. }, {
  7861. "label": "翔安区",
  7862. "value": "350213"
  7863. }], [{
  7864. "label": "城厢区",
  7865. "value": "350302"
  7866. }, {
  7867. "label": "涵江区",
  7868. "value": "350303"
  7869. }, {
  7870. "label": "荔城区",
  7871. "value": "350304"
  7872. }, {
  7873. "label": "秀屿区",
  7874. "value": "350305"
  7875. }, {
  7876. "label": "仙游县",
  7877. "value": "350322"
  7878. }], [{
  7879. "label": "梅列区",
  7880. "value": "350402"
  7881. }, {
  7882. "label": "三元区",
  7883. "value": "350403"
  7884. }, {
  7885. "label": "明溪县",
  7886. "value": "350421"
  7887. }, {
  7888. "label": "清流县",
  7889. "value": "350423"
  7890. }, {
  7891. "label": "宁化县",
  7892. "value": "350424"
  7893. }, {
  7894. "label": "大田县",
  7895. "value": "350425"
  7896. }, {
  7897. "label": "尤溪县",
  7898. "value": "350426"
  7899. }, {
  7900. "label": "沙县",
  7901. "value": "350427"
  7902. }, {
  7903. "label": "将乐县",
  7904. "value": "350428"
  7905. }, {
  7906. "label": "泰宁县",
  7907. "value": "350429"
  7908. }, {
  7909. "label": "建宁县",
  7910. "value": "350430"
  7911. }, {
  7912. "label": "永安市",
  7913. "value": "350481"
  7914. }], [{
  7915. "label": "鲤城区",
  7916. "value": "350502"
  7917. }, {
  7918. "label": "丰泽区",
  7919. "value": "350503"
  7920. }, {
  7921. "label": "洛江区",
  7922. "value": "350504"
  7923. }, {
  7924. "label": "泉港区",
  7925. "value": "350505"
  7926. }, {
  7927. "label": "惠安县",
  7928. "value": "350521"
  7929. }, {
  7930. "label": "安溪县",
  7931. "value": "350524"
  7932. }, {
  7933. "label": "永春县",
  7934. "value": "350525"
  7935. }, {
  7936. "label": "德化县",
  7937. "value": "350526"
  7938. }, {
  7939. "label": "金门县",
  7940. "value": "350527"
  7941. }, {
  7942. "label": "石狮市",
  7943. "value": "350581"
  7944. }, {
  7945. "label": "晋江市",
  7946. "value": "350582"
  7947. }, {
  7948. "label": "南安市",
  7949. "value": "350583"
  7950. }], [{
  7951. "label": "芗城区",
  7952. "value": "350602"
  7953. }, {
  7954. "label": "龙文区",
  7955. "value": "350603"
  7956. }, {
  7957. "label": "云霄县",
  7958. "value": "350622"
  7959. }, {
  7960. "label": "漳浦县",
  7961. "value": "350623"
  7962. }, {
  7963. "label": "诏安县",
  7964. "value": "350624"
  7965. }, {
  7966. "label": "长泰县",
  7967. "value": "350625"
  7968. }, {
  7969. "label": "东山县",
  7970. "value": "350626"
  7971. }, {
  7972. "label": "南靖县",
  7973. "value": "350627"
  7974. }, {
  7975. "label": "平和县",
  7976. "value": "350628"
  7977. }, {
  7978. "label": "华安县",
  7979. "value": "350629"
  7980. }, {
  7981. "label": "龙海市",
  7982. "value": "350681"
  7983. }], [{
  7984. "label": "延平区",
  7985. "value": "350702"
  7986. }, {
  7987. "label": "建阳区",
  7988. "value": "350703"
  7989. }, {
  7990. "label": "顺昌县",
  7991. "value": "350721"
  7992. }, {
  7993. "label": "浦城县",
  7994. "value": "350722"
  7995. }, {
  7996. "label": "光泽县",
  7997. "value": "350723"
  7998. }, {
  7999. "label": "松溪县",
  8000. "value": "350724"
  8001. }, {
  8002. "label": "政和县",
  8003. "value": "350725"
  8004. }, {
  8005. "label": "邵武市",
  8006. "value": "350781"
  8007. }, {
  8008. "label": "武夷山市",
  8009. "value": "350782"
  8010. }, {
  8011. "label": "建瓯市",
  8012. "value": "350783"
  8013. }], [{
  8014. "label": "新罗区",
  8015. "value": "350802"
  8016. }, {
  8017. "label": "永定区",
  8018. "value": "350803"
  8019. }, {
  8020. "label": "长汀县",
  8021. "value": "350821"
  8022. }, {
  8023. "label": "上杭县",
  8024. "value": "350823"
  8025. }, {
  8026. "label": "武平县",
  8027. "value": "350824"
  8028. }, {
  8029. "label": "连城县",
  8030. "value": "350825"
  8031. }, {
  8032. "label": "漳平市",
  8033. "value": "350881"
  8034. }], [{
  8035. "label": "蕉城区",
  8036. "value": "350902"
  8037. }, {
  8038. "label": "霞浦县",
  8039. "value": "350921"
  8040. }, {
  8041. "label": "古田县",
  8042. "value": "350922"
  8043. }, {
  8044. "label": "屏南县",
  8045. "value": "350923"
  8046. }, {
  8047. "label": "寿宁县",
  8048. "value": "350924"
  8049. }, {
  8050. "label": "周宁县",
  8051. "value": "350925"
  8052. }, {
  8053. "label": "柘荣县",
  8054. "value": "350926"
  8055. }, {
  8056. "label": "福安市",
  8057. "value": "350981"
  8058. }, {
  8059. "label": "福鼎市",
  8060. "value": "350982"
  8061. }]], [[{
  8062. "label": "东湖区",
  8063. "value": "360102"
  8064. }, {
  8065. "label": "西湖区",
  8066. "value": "360103"
  8067. }, {
  8068. "label": "青云谱区",
  8069. "value": "360104"
  8070. }, {
  8071. "label": "湾里区",
  8072. "value": "360105"
  8073. }, {
  8074. "label": "青山湖区",
  8075. "value": "360111"
  8076. }, {
  8077. "label": "新建区",
  8078. "value": "360112"
  8079. }, {
  8080. "label": "南昌县",
  8081. "value": "360121"
  8082. }, {
  8083. "label": "安义县",
  8084. "value": "360123"
  8085. }, {
  8086. "label": "进贤县",
  8087. "value": "360124"
  8088. }], [{
  8089. "label": "昌江区",
  8090. "value": "360202"
  8091. }, {
  8092. "label": "珠山区",
  8093. "value": "360203"
  8094. }, {
  8095. "label": "浮梁县",
  8096. "value": "360222"
  8097. }, {
  8098. "label": "乐平市",
  8099. "value": "360281"
  8100. }], [{
  8101. "label": "安源区",
  8102. "value": "360302"
  8103. }, {
  8104. "label": "湘东区",
  8105. "value": "360313"
  8106. }, {
  8107. "label": "莲花县",
  8108. "value": "360321"
  8109. }, {
  8110. "label": "上栗县",
  8111. "value": "360322"
  8112. }, {
  8113. "label": "芦溪县",
  8114. "value": "360323"
  8115. }], [{
  8116. "label": "濂溪区",
  8117. "value": "360402"
  8118. }, {
  8119. "label": "浔阳区",
  8120. "value": "360403"
  8121. }, {
  8122. "label": "柴桑区",
  8123. "value": "360404"
  8124. }, {
  8125. "label": "武宁县",
  8126. "value": "360423"
  8127. }, {
  8128. "label": "修水县",
  8129. "value": "360424"
  8130. }, {
  8131. "label": "永修县",
  8132. "value": "360425"
  8133. }, {
  8134. "label": "德安县",
  8135. "value": "360426"
  8136. }, {
  8137. "label": "都昌县",
  8138. "value": "360428"
  8139. }, {
  8140. "label": "湖口县",
  8141. "value": "360429"
  8142. }, {
  8143. "label": "彭泽县",
  8144. "value": "360430"
  8145. }, {
  8146. "label": "瑞昌市",
  8147. "value": "360481"
  8148. }, {
  8149. "label": "共青城市",
  8150. "value": "360482"
  8151. }, {
  8152. "label": "庐山市",
  8153. "value": "360483"
  8154. }], [{
  8155. "label": "渝水区",
  8156. "value": "360502"
  8157. }, {
  8158. "label": "分宜县",
  8159. "value": "360521"
  8160. }], [{
  8161. "label": "月湖区",
  8162. "value": "360602"
  8163. }, {
  8164. "label": "余江县",
  8165. "value": "360622"
  8166. }, {
  8167. "label": "贵溪市",
  8168. "value": "360681"
  8169. }], [{
  8170. "label": "章贡区",
  8171. "value": "360702"
  8172. }, {
  8173. "label": "南康区",
  8174. "value": "360703"
  8175. }, {
  8176. "label": "赣县区",
  8177. "value": "360704"
  8178. }, {
  8179. "label": "信丰县",
  8180. "value": "360722"
  8181. }, {
  8182. "label": "大余县",
  8183. "value": "360723"
  8184. }, {
  8185. "label": "上犹县",
  8186. "value": "360724"
  8187. }, {
  8188. "label": "崇义县",
  8189. "value": "360725"
  8190. }, {
  8191. "label": "安远县",
  8192. "value": "360726"
  8193. }, {
  8194. "label": "龙南县",
  8195. "value": "360727"
  8196. }, {
  8197. "label": "定南县",
  8198. "value": "360728"
  8199. }, {
  8200. "label": "全南县",
  8201. "value": "360729"
  8202. }, {
  8203. "label": "宁都县",
  8204. "value": "360730"
  8205. }, {
  8206. "label": "于都县",
  8207. "value": "360731"
  8208. }, {
  8209. "label": "兴国县",
  8210. "value": "360732"
  8211. }, {
  8212. "label": "会昌县",
  8213. "value": "360733"
  8214. }, {
  8215. "label": "寻乌县",
  8216. "value": "360734"
  8217. }, {
  8218. "label": "石城县",
  8219. "value": "360735"
  8220. }, {
  8221. "label": "瑞金市",
  8222. "value": "360781"
  8223. }], [{
  8224. "label": "吉州区",
  8225. "value": "360802"
  8226. }, {
  8227. "label": "青原区",
  8228. "value": "360803"
  8229. }, {
  8230. "label": "吉安县",
  8231. "value": "360821"
  8232. }, {
  8233. "label": "吉水县",
  8234. "value": "360822"
  8235. }, {
  8236. "label": "峡江县",
  8237. "value": "360823"
  8238. }, {
  8239. "label": "新干县",
  8240. "value": "360824"
  8241. }, {
  8242. "label": "永丰县",
  8243. "value": "360825"
  8244. }, {
  8245. "label": "泰和县",
  8246. "value": "360826"
  8247. }, {
  8248. "label": "遂川县",
  8249. "value": "360827"
  8250. }, {
  8251. "label": "万安县",
  8252. "value": "360828"
  8253. }, {
  8254. "label": "安福县",
  8255. "value": "360829"
  8256. }, {
  8257. "label": "永新县",
  8258. "value": "360830"
  8259. }, {
  8260. "label": "井冈山市",
  8261. "value": "360881"
  8262. }], [{
  8263. "label": "袁州区",
  8264. "value": "360902"
  8265. }, {
  8266. "label": "奉新县",
  8267. "value": "360921"
  8268. }, {
  8269. "label": "万载县",
  8270. "value": "360922"
  8271. }, {
  8272. "label": "上高县",
  8273. "value": "360923"
  8274. }, {
  8275. "label": "宜丰县",
  8276. "value": "360924"
  8277. }, {
  8278. "label": "靖安县",
  8279. "value": "360925"
  8280. }, {
  8281. "label": "铜鼓县",
  8282. "value": "360926"
  8283. }, {
  8284. "label": "丰城市",
  8285. "value": "360981"
  8286. }, {
  8287. "label": "樟树市",
  8288. "value": "360982"
  8289. }, {
  8290. "label": "高安市",
  8291. "value": "360983"
  8292. }], [{
  8293. "label": "临川区",
  8294. "value": "361002"
  8295. }, {
  8296. "label": "东乡区",
  8297. "value": "361003"
  8298. }, {
  8299. "label": "南城县",
  8300. "value": "361021"
  8301. }, {
  8302. "label": "黎川县",
  8303. "value": "361022"
  8304. }, {
  8305. "label": "南丰县",
  8306. "value": "361023"
  8307. }, {
  8308. "label": "崇仁县",
  8309. "value": "361024"
  8310. }, {
  8311. "label": "乐安县",
  8312. "value": "361025"
  8313. }, {
  8314. "label": "宜黄县",
  8315. "value": "361026"
  8316. }, {
  8317. "label": "金溪县",
  8318. "value": "361027"
  8319. }, {
  8320. "label": "资溪县",
  8321. "value": "361028"
  8322. }, {
  8323. "label": "广昌县",
  8324. "value": "361030"
  8325. }], [{
  8326. "label": "信州区",
  8327. "value": "361102"
  8328. }, {
  8329. "label": "广丰区",
  8330. "value": "361103"
  8331. }, {
  8332. "label": "上饶县",
  8333. "value": "361121"
  8334. }, {
  8335. "label": "玉山县",
  8336. "value": "361123"
  8337. }, {
  8338. "label": "铅山县",
  8339. "value": "361124"
  8340. }, {
  8341. "label": "横峰县",
  8342. "value": "361125"
  8343. }, {
  8344. "label": "弋阳县",
  8345. "value": "361126"
  8346. }, {
  8347. "label": "余干县",
  8348. "value": "361127"
  8349. }, {
  8350. "label": "鄱阳县",
  8351. "value": "361128"
  8352. }, {
  8353. "label": "万年县",
  8354. "value": "361129"
  8355. }, {
  8356. "label": "婺源县",
  8357. "value": "361130"
  8358. }, {
  8359. "label": "德兴市",
  8360. "value": "361181"
  8361. }]], [[{
  8362. "label": "历下区",
  8363. "value": "370102"
  8364. }, {
  8365. "label": "市中区",
  8366. "value": "370103"
  8367. }, {
  8368. "label": "槐荫区",
  8369. "value": "370104"
  8370. }, {
  8371. "label": "天桥区",
  8372. "value": "370105"
  8373. }, {
  8374. "label": "历城区",
  8375. "value": "370112"
  8376. }, {
  8377. "label": "长清区",
  8378. "value": "370113"
  8379. }, {
  8380. "label": "章丘区",
  8381. "value": "370114"
  8382. }, {
  8383. "label": "平阴县",
  8384. "value": "370124"
  8385. }, {
  8386. "label": "济阳县",
  8387. "value": "370125"
  8388. }, {
  8389. "label": "商河县",
  8390. "value": "370126"
  8391. }, {
  8392. "label": "济南高新技术产业开发区",
  8393. "value": "370171"
  8394. }], [{
  8395. "label": "市南区",
  8396. "value": "370202"
  8397. }, {
  8398. "label": "市北区",
  8399. "value": "370203"
  8400. }, {
  8401. "label": "黄岛区",
  8402. "value": "370211"
  8403. }, {
  8404. "label": "崂山区",
  8405. "value": "370212"
  8406. }, {
  8407. "label": "李沧区",
  8408. "value": "370213"
  8409. }, {
  8410. "label": "城阳区",
  8411. "value": "370214"
  8412. }, {
  8413. "label": "即墨区",
  8414. "value": "370215"
  8415. }, {
  8416. "label": "青岛高新技术产业开发区",
  8417. "value": "370271"
  8418. }, {
  8419. "label": "胶州市",
  8420. "value": "370281"
  8421. }, {
  8422. "label": "平度市",
  8423. "value": "370283"
  8424. }, {
  8425. "label": "莱西市",
  8426. "value": "370285"
  8427. }], [{
  8428. "label": "淄川区",
  8429. "value": "370302"
  8430. }, {
  8431. "label": "张店区",
  8432. "value": "370303"
  8433. }, {
  8434. "label": "博山区",
  8435. "value": "370304"
  8436. }, {
  8437. "label": "临淄区",
  8438. "value": "370305"
  8439. }, {
  8440. "label": "周村区",
  8441. "value": "370306"
  8442. }, {
  8443. "label": "桓台县",
  8444. "value": "370321"
  8445. }, {
  8446. "label": "高青县",
  8447. "value": "370322"
  8448. }, {
  8449. "label": "沂源县",
  8450. "value": "370323"
  8451. }], [{
  8452. "label": "市中区",
  8453. "value": "370402"
  8454. }, {
  8455. "label": "薛城区",
  8456. "value": "370403"
  8457. }, {
  8458. "label": "峄城区",
  8459. "value": "370404"
  8460. }, {
  8461. "label": "台儿庄区",
  8462. "value": "370405"
  8463. }, {
  8464. "label": "山亭区",
  8465. "value": "370406"
  8466. }, {
  8467. "label": "滕州市",
  8468. "value": "370481"
  8469. }], [{
  8470. "label": "东营区",
  8471. "value": "370502"
  8472. }, {
  8473. "label": "河口区",
  8474. "value": "370503"
  8475. }, {
  8476. "label": "垦利区",
  8477. "value": "370505"
  8478. }, {
  8479. "label": "利津县",
  8480. "value": "370522"
  8481. }, {
  8482. "label": "广饶县",
  8483. "value": "370523"
  8484. }, {
  8485. "label": "东营经济技术开发区",
  8486. "value": "370571"
  8487. }, {
  8488. "label": "东营港经济开发区",
  8489. "value": "370572"
  8490. }], [{
  8491. "label": "芝罘区",
  8492. "value": "370602"
  8493. }, {
  8494. "label": "福山区",
  8495. "value": "370611"
  8496. }, {
  8497. "label": "牟平区",
  8498. "value": "370612"
  8499. }, {
  8500. "label": "莱山区",
  8501. "value": "370613"
  8502. }, {
  8503. "label": "长岛县",
  8504. "value": "370634"
  8505. }, {
  8506. "label": "烟台高新技术产业开发区",
  8507. "value": "370671"
  8508. }, {
  8509. "label": "烟台经济技术开发区",
  8510. "value": "370672"
  8511. }, {
  8512. "label": "龙口市",
  8513. "value": "370681"
  8514. }, {
  8515. "label": "莱阳市",
  8516. "value": "370682"
  8517. }, {
  8518. "label": "莱州市",
  8519. "value": "370683"
  8520. }, {
  8521. "label": "蓬莱市",
  8522. "value": "370684"
  8523. }, {
  8524. "label": "招远市",
  8525. "value": "370685"
  8526. }, {
  8527. "label": "栖霞市",
  8528. "value": "370686"
  8529. }, {
  8530. "label": "海阳市",
  8531. "value": "370687"
  8532. }], [{
  8533. "label": "潍城区",
  8534. "value": "370702"
  8535. }, {
  8536. "label": "寒亭区",
  8537. "value": "370703"
  8538. }, {
  8539. "label": "坊子区",
  8540. "value": "370704"
  8541. }, {
  8542. "label": "奎文区",
  8543. "value": "370705"
  8544. }, {
  8545. "label": "临朐县",
  8546. "value": "370724"
  8547. }, {
  8548. "label": "昌乐县",
  8549. "value": "370725"
  8550. }, {
  8551. "label": "潍坊滨海经济技术开发区",
  8552. "value": "370772"
  8553. }, {
  8554. "label": "青州市",
  8555. "value": "370781"
  8556. }, {
  8557. "label": "诸城市",
  8558. "value": "370782"
  8559. }, {
  8560. "label": "寿光市",
  8561. "value": "370783"
  8562. }, {
  8563. "label": "安丘市",
  8564. "value": "370784"
  8565. }, {
  8566. "label": "高密市",
  8567. "value": "370785"
  8568. }, {
  8569. "label": "昌邑市",
  8570. "value": "370786"
  8571. }], [{
  8572. "label": "任城区",
  8573. "value": "370811"
  8574. }, {
  8575. "label": "兖州区",
  8576. "value": "370812"
  8577. }, {
  8578. "label": "微山县",
  8579. "value": "370826"
  8580. }, {
  8581. "label": "鱼台县",
  8582. "value": "370827"
  8583. }, {
  8584. "label": "金乡县",
  8585. "value": "370828"
  8586. }, {
  8587. "label": "嘉祥县",
  8588. "value": "370829"
  8589. }, {
  8590. "label": "汶上县",
  8591. "value": "370830"
  8592. }, {
  8593. "label": "泗水县",
  8594. "value": "370831"
  8595. }, {
  8596. "label": "梁山县",
  8597. "value": "370832"
  8598. }, {
  8599. "label": "济宁高新技术产业开发区",
  8600. "value": "370871"
  8601. }, {
  8602. "label": "曲阜市",
  8603. "value": "370881"
  8604. }, {
  8605. "label": "邹城市",
  8606. "value": "370883"
  8607. }], [{
  8608. "label": "泰山区",
  8609. "value": "370902"
  8610. }, {
  8611. "label": "岱岳区",
  8612. "value": "370911"
  8613. }, {
  8614. "label": "宁阳县",
  8615. "value": "370921"
  8616. }, {
  8617. "label": "东平县",
  8618. "value": "370923"
  8619. }, {
  8620. "label": "新泰市",
  8621. "value": "370982"
  8622. }, {
  8623. "label": "肥城市",
  8624. "value": "370983"
  8625. }], [{
  8626. "label": "环翠区",
  8627. "value": "371002"
  8628. }, {
  8629. "label": "文登区",
  8630. "value": "371003"
  8631. }, {
  8632. "label": "威海火炬高技术产业开发区",
  8633. "value": "371071"
  8634. }, {
  8635. "label": "威海经济技术开发区",
  8636. "value": "371072"
  8637. }, {
  8638. "label": "威海临港经济技术开发区",
  8639. "value": "371073"
  8640. }, {
  8641. "label": "荣成市",
  8642. "value": "371082"
  8643. }, {
  8644. "label": "乳山市",
  8645. "value": "371083"
  8646. }], [{
  8647. "label": "东港区",
  8648. "value": "371102"
  8649. }, {
  8650. "label": "岚山区",
  8651. "value": "371103"
  8652. }, {
  8653. "label": "五莲县",
  8654. "value": "371121"
  8655. }, {
  8656. "label": "莒县",
  8657. "value": "371122"
  8658. }, {
  8659. "label": "日照经济技术开发区",
  8660. "value": "371171"
  8661. }, {
  8662. "label": "日照国际海洋城",
  8663. "value": "371172"
  8664. }], [{
  8665. "label": "莱城区",
  8666. "value": "371202"
  8667. }, {
  8668. "label": "钢城区",
  8669. "value": "371203"
  8670. }], [{
  8671. "label": "兰山区",
  8672. "value": "371302"
  8673. }, {
  8674. "label": "罗庄区",
  8675. "value": "371311"
  8676. }, {
  8677. "label": "河东区",
  8678. "value": "371312"
  8679. }, {
  8680. "label": "沂南县",
  8681. "value": "371321"
  8682. }, {
  8683. "label": "郯城县",
  8684. "value": "371322"
  8685. }, {
  8686. "label": "沂水县",
  8687. "value": "371323"
  8688. }, {
  8689. "label": "兰陵县",
  8690. "value": "371324"
  8691. }, {
  8692. "label": "费县",
  8693. "value": "371325"
  8694. }, {
  8695. "label": "平邑县",
  8696. "value": "371326"
  8697. }, {
  8698. "label": "莒南县",
  8699. "value": "371327"
  8700. }, {
  8701. "label": "蒙阴县",
  8702. "value": "371328"
  8703. }, {
  8704. "label": "临沭县",
  8705. "value": "371329"
  8706. }, {
  8707. "label": "临沂高新技术产业开发区",
  8708. "value": "371371"
  8709. }, {
  8710. "label": "临沂经济技术开发区",
  8711. "value": "371372"
  8712. }, {
  8713. "label": "临沂临港经济开发区",
  8714. "value": "371373"
  8715. }], [{
  8716. "label": "德城区",
  8717. "value": "371402"
  8718. }, {
  8719. "label": "陵城区",
  8720. "value": "371403"
  8721. }, {
  8722. "label": "宁津县",
  8723. "value": "371422"
  8724. }, {
  8725. "label": "庆云县",
  8726. "value": "371423"
  8727. }, {
  8728. "label": "临邑县",
  8729. "value": "371424"
  8730. }, {
  8731. "label": "齐河县",
  8732. "value": "371425"
  8733. }, {
  8734. "label": "平原县",
  8735. "value": "371426"
  8736. }, {
  8737. "label": "夏津县",
  8738. "value": "371427"
  8739. }, {
  8740. "label": "武城县",
  8741. "value": "371428"
  8742. }, {
  8743. "label": "德州经济技术开发区",
  8744. "value": "371471"
  8745. }, {
  8746. "label": "德州运河经济开发区",
  8747. "value": "371472"
  8748. }, {
  8749. "label": "乐陵市",
  8750. "value": "371481"
  8751. }, {
  8752. "label": "禹城市",
  8753. "value": "371482"
  8754. }], [{
  8755. "label": "东昌府区",
  8756. "value": "371502"
  8757. }, {
  8758. "label": "阳谷县",
  8759. "value": "371521"
  8760. }, {
  8761. "label": "莘县",
  8762. "value": "371522"
  8763. }, {
  8764. "label": "茌平县",
  8765. "value": "371523"
  8766. }, {
  8767. "label": "东阿县",
  8768. "value": "371524"
  8769. }, {
  8770. "label": "冠县",
  8771. "value": "371525"
  8772. }, {
  8773. "label": "高唐县",
  8774. "value": "371526"
  8775. }, {
  8776. "label": "临清市",
  8777. "value": "371581"
  8778. }], [{
  8779. "label": "滨城区",
  8780. "value": "371602"
  8781. }, {
  8782. "label": "沾化区",
  8783. "value": "371603"
  8784. }, {
  8785. "label": "惠民县",
  8786. "value": "371621"
  8787. }, {
  8788. "label": "阳信县",
  8789. "value": "371622"
  8790. }, {
  8791. "label": "无棣县",
  8792. "value": "371623"
  8793. }, {
  8794. "label": "博兴县",
  8795. "value": "371625"
  8796. }, {
  8797. "label": "邹平县",
  8798. "value": "371626"
  8799. }], [{
  8800. "label": "牡丹区",
  8801. "value": "371702"
  8802. }, {
  8803. "label": "定陶区",
  8804. "value": "371703"
  8805. }, {
  8806. "label": "曹县",
  8807. "value": "371721"
  8808. }, {
  8809. "label": "单县",
  8810. "value": "371722"
  8811. }, {
  8812. "label": "成武县",
  8813. "value": "371723"
  8814. }, {
  8815. "label": "巨野县",
  8816. "value": "371724"
  8817. }, {
  8818. "label": "郓城县",
  8819. "value": "371725"
  8820. }, {
  8821. "label": "鄄城县",
  8822. "value": "371726"
  8823. }, {
  8824. "label": "东明县",
  8825. "value": "371728"
  8826. }, {
  8827. "label": "菏泽经济技术开发区",
  8828. "value": "371771"
  8829. }, {
  8830. "label": "菏泽高新技术开发区",
  8831. "value": "371772"
  8832. }]], [[{
  8833. "label": "中原区",
  8834. "value": "410102"
  8835. }, {
  8836. "label": "二七区",
  8837. "value": "410103"
  8838. }, {
  8839. "label": "管城回族区",
  8840. "value": "410104"
  8841. }, {
  8842. "label": "金水区",
  8843. "value": "410105"
  8844. }, {
  8845. "label": "上街区",
  8846. "value": "410106"
  8847. }, {
  8848. "label": "惠济区",
  8849. "value": "410108"
  8850. }, {
  8851. "label": "中牟县",
  8852. "value": "410122"
  8853. }, {
  8854. "label": "郑州经济技术开发区",
  8855. "value": "410171"
  8856. }, {
  8857. "label": "郑州高新技术产业开发区",
  8858. "value": "410172"
  8859. }, {
  8860. "label": "郑州航空港经济综合实验区",
  8861. "value": "410173"
  8862. }, {
  8863. "label": "巩义市",
  8864. "value": "410181"
  8865. }, {
  8866. "label": "荥阳市",
  8867. "value": "410182"
  8868. }, {
  8869. "label": "新密市",
  8870. "value": "410183"
  8871. }, {
  8872. "label": "新郑市",
  8873. "value": "410184"
  8874. }, {
  8875. "label": "登封市",
  8876. "value": "410185"
  8877. }], [{
  8878. "label": "龙亭区",
  8879. "value": "410202"
  8880. }, {
  8881. "label": "顺河回族区",
  8882. "value": "410203"
  8883. }, {
  8884. "label": "鼓楼区",
  8885. "value": "410204"
  8886. }, {
  8887. "label": "禹王台区",
  8888. "value": "410205"
  8889. }, {
  8890. "label": "祥符区",
  8891. "value": "410212"
  8892. }, {
  8893. "label": "杞县",
  8894. "value": "410221"
  8895. }, {
  8896. "label": "通许县",
  8897. "value": "410222"
  8898. }, {
  8899. "label": "尉氏县",
  8900. "value": "410223"
  8901. }, {
  8902. "label": "兰考县",
  8903. "value": "410225"
  8904. }], [{
  8905. "label": "老城区",
  8906. "value": "410302"
  8907. }, {
  8908. "label": "西工区",
  8909. "value": "410303"
  8910. }, {
  8911. "label": "瀍河回族区",
  8912. "value": "410304"
  8913. }, {
  8914. "label": "涧西区",
  8915. "value": "410305"
  8916. }, {
  8917. "label": "吉利区",
  8918. "value": "410306"
  8919. }, {
  8920. "label": "洛龙区",
  8921. "value": "410311"
  8922. }, {
  8923. "label": "孟津县",
  8924. "value": "410322"
  8925. }, {
  8926. "label": "新安县",
  8927. "value": "410323"
  8928. }, {
  8929. "label": "栾川县",
  8930. "value": "410324"
  8931. }, {
  8932. "label": "嵩县",
  8933. "value": "410325"
  8934. }, {
  8935. "label": "汝阳县",
  8936. "value": "410326"
  8937. }, {
  8938. "label": "宜阳县",
  8939. "value": "410327"
  8940. }, {
  8941. "label": "洛宁县",
  8942. "value": "410328"
  8943. }, {
  8944. "label": "伊川县",
  8945. "value": "410329"
  8946. }, {
  8947. "label": "洛阳高新技术产业开发区",
  8948. "value": "410371"
  8949. }, {
  8950. "label": "偃师市",
  8951. "value": "410381"
  8952. }], [{
  8953. "label": "新华区",
  8954. "value": "410402"
  8955. }, {
  8956. "label": "卫东区",
  8957. "value": "410403"
  8958. }, {
  8959. "label": "石龙区",
  8960. "value": "410404"
  8961. }, {
  8962. "label": "湛河区",
  8963. "value": "410411"
  8964. }, {
  8965. "label": "宝丰县",
  8966. "value": "410421"
  8967. }, {
  8968. "label": "叶县",
  8969. "value": "410422"
  8970. }, {
  8971. "label": "鲁山县",
  8972. "value": "410423"
  8973. }, {
  8974. "label": "郏县",
  8975. "value": "410425"
  8976. }, {
  8977. "label": "平顶山高新技术产业开发区",
  8978. "value": "410471"
  8979. }, {
  8980. "label": "平顶山市新城区",
  8981. "value": "410472"
  8982. }, {
  8983. "label": "舞钢市",
  8984. "value": "410481"
  8985. }, {
  8986. "label": "汝州市",
  8987. "value": "410482"
  8988. }], [{
  8989. "label": "文峰区",
  8990. "value": "410502"
  8991. }, {
  8992. "label": "北关区",
  8993. "value": "410503"
  8994. }, {
  8995. "label": "殷都区",
  8996. "value": "410505"
  8997. }, {
  8998. "label": "龙安区",
  8999. "value": "410506"
  9000. }, {
  9001. "label": "安阳县",
  9002. "value": "410522"
  9003. }, {
  9004. "label": "汤阴县",
  9005. "value": "410523"
  9006. }, {
  9007. "label": "滑县",
  9008. "value": "410526"
  9009. }, {
  9010. "label": "内黄县",
  9011. "value": "410527"
  9012. }, {
  9013. "label": "安阳高新技术产业开发区",
  9014. "value": "410571"
  9015. }, {
  9016. "label": "林州市",
  9017. "value": "410581"
  9018. }], [{
  9019. "label": "鹤山区",
  9020. "value": "410602"
  9021. }, {
  9022. "label": "山城区",
  9023. "value": "410603"
  9024. }, {
  9025. "label": "淇滨区",
  9026. "value": "410611"
  9027. }, {
  9028. "label": "浚县",
  9029. "value": "410621"
  9030. }, {
  9031. "label": "淇县",
  9032. "value": "410622"
  9033. }, {
  9034. "label": "鹤壁经济技术开发区",
  9035. "value": "410671"
  9036. }], [{
  9037. "label": "红旗区",
  9038. "value": "410702"
  9039. }, {
  9040. "label": "卫滨区",
  9041. "value": "410703"
  9042. }, {
  9043. "label": "凤泉区",
  9044. "value": "410704"
  9045. }, {
  9046. "label": "牧野区",
  9047. "value": "410711"
  9048. }, {
  9049. "label": "新乡县",
  9050. "value": "410721"
  9051. }, {
  9052. "label": "获嘉县",
  9053. "value": "410724"
  9054. }, {
  9055. "label": "原阳县",
  9056. "value": "410725"
  9057. }, {
  9058. "label": "延津县",
  9059. "value": "410726"
  9060. }, {
  9061. "label": "封丘县",
  9062. "value": "410727"
  9063. }, {
  9064. "label": "长垣县",
  9065. "value": "410728"
  9066. }, {
  9067. "label": "新乡高新技术产业开发区",
  9068. "value": "410771"
  9069. }, {
  9070. "label": "新乡经济技术开发区",
  9071. "value": "410772"
  9072. }, {
  9073. "label": "新乡市平原城乡一体化示范区",
  9074. "value": "410773"
  9075. }, {
  9076. "label": "卫辉市",
  9077. "value": "410781"
  9078. }, {
  9079. "label": "辉县市",
  9080. "value": "410782"
  9081. }], [{
  9082. "label": "解放区",
  9083. "value": "410802"
  9084. }, {
  9085. "label": "中站区",
  9086. "value": "410803"
  9087. }, {
  9088. "label": "马村区",
  9089. "value": "410804"
  9090. }, {
  9091. "label": "山阳区",
  9092. "value": "410811"
  9093. }, {
  9094. "label": "修武县",
  9095. "value": "410821"
  9096. }, {
  9097. "label": "博爱县",
  9098. "value": "410822"
  9099. }, {
  9100. "label": "武陟县",
  9101. "value": "410823"
  9102. }, {
  9103. "label": "温县",
  9104. "value": "410825"
  9105. }, {
  9106. "label": "焦作城乡一体化示范区",
  9107. "value": "410871"
  9108. }, {
  9109. "label": "沁阳市",
  9110. "value": "410882"
  9111. }, {
  9112. "label": "孟州市",
  9113. "value": "410883"
  9114. }], [{
  9115. "label": "华龙区",
  9116. "value": "410902"
  9117. }, {
  9118. "label": "清丰县",
  9119. "value": "410922"
  9120. }, {
  9121. "label": "南乐县",
  9122. "value": "410923"
  9123. }, {
  9124. "label": "范县",
  9125. "value": "410926"
  9126. }, {
  9127. "label": "台前县",
  9128. "value": "410927"
  9129. }, {
  9130. "label": "濮阳县",
  9131. "value": "410928"
  9132. }, {
  9133. "label": "河南濮阳工业园区",
  9134. "value": "410971"
  9135. }, {
  9136. "label": "濮阳经济技术开发区",
  9137. "value": "410972"
  9138. }], [{
  9139. "label": "魏都区",
  9140. "value": "411002"
  9141. }, {
  9142. "label": "建安区",
  9143. "value": "411003"
  9144. }, {
  9145. "label": "鄢陵县",
  9146. "value": "411024"
  9147. }, {
  9148. "label": "襄城县",
  9149. "value": "411025"
  9150. }, {
  9151. "label": "许昌经济技术开发区",
  9152. "value": "411071"
  9153. }, {
  9154. "label": "禹州市",
  9155. "value": "411081"
  9156. }, {
  9157. "label": "长葛市",
  9158. "value": "411082"
  9159. }], [{
  9160. "label": "源汇区",
  9161. "value": "411102"
  9162. }, {
  9163. "label": "郾城区",
  9164. "value": "411103"
  9165. }, {
  9166. "label": "召陵区",
  9167. "value": "411104"
  9168. }, {
  9169. "label": "舞阳县",
  9170. "value": "411121"
  9171. }, {
  9172. "label": "临颍县",
  9173. "value": "411122"
  9174. }, {
  9175. "label": "漯河经济技术开发区",
  9176. "value": "411171"
  9177. }], [{
  9178. "label": "湖滨区",
  9179. "value": "411202"
  9180. }, {
  9181. "label": "陕州区",
  9182. "value": "411203"
  9183. }, {
  9184. "label": "渑池县",
  9185. "value": "411221"
  9186. }, {
  9187. "label": "卢氏县",
  9188. "value": "411224"
  9189. }, {
  9190. "label": "河南三门峡经济开发区",
  9191. "value": "411271"
  9192. }, {
  9193. "label": "义马市",
  9194. "value": "411281"
  9195. }, {
  9196. "label": "灵宝市",
  9197. "value": "411282"
  9198. }], [{
  9199. "label": "宛城区",
  9200. "value": "411302"
  9201. }, {
  9202. "label": "卧龙区",
  9203. "value": "411303"
  9204. }, {
  9205. "label": "南召县",
  9206. "value": "411321"
  9207. }, {
  9208. "label": "方城县",
  9209. "value": "411322"
  9210. }, {
  9211. "label": "西峡县",
  9212. "value": "411323"
  9213. }, {
  9214. "label": "镇平县",
  9215. "value": "411324"
  9216. }, {
  9217. "label": "内乡县",
  9218. "value": "411325"
  9219. }, {
  9220. "label": "淅川县",
  9221. "value": "411326"
  9222. }, {
  9223. "label": "社旗县",
  9224. "value": "411327"
  9225. }, {
  9226. "label": "唐河县",
  9227. "value": "411328"
  9228. }, {
  9229. "label": "新野县",
  9230. "value": "411329"
  9231. }, {
  9232. "label": "桐柏县",
  9233. "value": "411330"
  9234. }, {
  9235. "label": "南阳高新技术产业开发区",
  9236. "value": "411371"
  9237. }, {
  9238. "label": "南阳市城乡一体化示范区",
  9239. "value": "411372"
  9240. }, {
  9241. "label": "邓州市",
  9242. "value": "411381"
  9243. }], [{
  9244. "label": "梁园区",
  9245. "value": "411402"
  9246. }, {
  9247. "label": "睢阳区",
  9248. "value": "411403"
  9249. }, {
  9250. "label": "民权县",
  9251. "value": "411421"
  9252. }, {
  9253. "label": "睢县",
  9254. "value": "411422"
  9255. }, {
  9256. "label": "宁陵县",
  9257. "value": "411423"
  9258. }, {
  9259. "label": "柘城县",
  9260. "value": "411424"
  9261. }, {
  9262. "label": "虞城县",
  9263. "value": "411425"
  9264. }, {
  9265. "label": "夏邑县",
  9266. "value": "411426"
  9267. }, {
  9268. "label": "豫东综合物流产业聚集区",
  9269. "value": "411471"
  9270. }, {
  9271. "label": "河南商丘经济开发区",
  9272. "value": "411472"
  9273. }, {
  9274. "label": "永城市",
  9275. "value": "411481"
  9276. }], [{
  9277. "label": "浉河区",
  9278. "value": "411502"
  9279. }, {
  9280. "label": "平桥区",
  9281. "value": "411503"
  9282. }, {
  9283. "label": "罗山县",
  9284. "value": "411521"
  9285. }, {
  9286. "label": "光山县",
  9287. "value": "411522"
  9288. }, {
  9289. "label": "新县",
  9290. "value": "411523"
  9291. }, {
  9292. "label": "商城县",
  9293. "value": "411524"
  9294. }, {
  9295. "label": "固始县",
  9296. "value": "411525"
  9297. }, {
  9298. "label": "潢川县",
  9299. "value": "411526"
  9300. }, {
  9301. "label": "淮滨县",
  9302. "value": "411527"
  9303. }, {
  9304. "label": "息县",
  9305. "value": "411528"
  9306. }, {
  9307. "label": "信阳高新技术产业开发区",
  9308. "value": "411571"
  9309. }], [{
  9310. "label": "川汇区",
  9311. "value": "411602"
  9312. }, {
  9313. "label": "扶沟县",
  9314. "value": "411621"
  9315. }, {
  9316. "label": "西华县",
  9317. "value": "411622"
  9318. }, {
  9319. "label": "商水县",
  9320. "value": "411623"
  9321. }, {
  9322. "label": "沈丘县",
  9323. "value": "411624"
  9324. }, {
  9325. "label": "郸城县",
  9326. "value": "411625"
  9327. }, {
  9328. "label": "淮阳县",
  9329. "value": "411626"
  9330. }, {
  9331. "label": "太康县",
  9332. "value": "411627"
  9333. }, {
  9334. "label": "鹿邑县",
  9335. "value": "411628"
  9336. }, {
  9337. "label": "河南周口经济开发区",
  9338. "value": "411671"
  9339. }, {
  9340. "label": "项城市",
  9341. "value": "411681"
  9342. }], [{
  9343. "label": "驿城区",
  9344. "value": "411702"
  9345. }, {
  9346. "label": "西平县",
  9347. "value": "411721"
  9348. }, {
  9349. "label": "上蔡县",
  9350. "value": "411722"
  9351. }, {
  9352. "label": "平舆县",
  9353. "value": "411723"
  9354. }, {
  9355. "label": "正阳县",
  9356. "value": "411724"
  9357. }, {
  9358. "label": "确山县",
  9359. "value": "411725"
  9360. }, {
  9361. "label": "泌阳县",
  9362. "value": "411726"
  9363. }, {
  9364. "label": "汝南县",
  9365. "value": "411727"
  9366. }, {
  9367. "label": "遂平县",
  9368. "value": "411728"
  9369. }, {
  9370. "label": "新蔡县",
  9371. "value": "411729"
  9372. }, {
  9373. "label": "河南驻马店经济开发区",
  9374. "value": "411771"
  9375. }], [{
  9376. "label": "济源市",
  9377. "value": "419001"
  9378. }]], [[{
  9379. "label": "江岸区",
  9380. "value": "420102"
  9381. }, {
  9382. "label": "江汉区",
  9383. "value": "420103"
  9384. }, {
  9385. "label": "硚口区",
  9386. "value": "420104"
  9387. }, {
  9388. "label": "汉阳区",
  9389. "value": "420105"
  9390. }, {
  9391. "label": "武昌区",
  9392. "value": "420106"
  9393. }, {
  9394. "label": "青山区",
  9395. "value": "420107"
  9396. }, {
  9397. "label": "洪山区",
  9398. "value": "420111"
  9399. }, {
  9400. "label": "东西湖区",
  9401. "value": "420112"
  9402. }, {
  9403. "label": "汉南区",
  9404. "value": "420113"
  9405. }, {
  9406. "label": "蔡甸区",
  9407. "value": "420114"
  9408. }, {
  9409. "label": "江夏区",
  9410. "value": "420115"
  9411. }, {
  9412. "label": "黄陂区",
  9413. "value": "420116"
  9414. }, {
  9415. "label": "新洲区",
  9416. "value": "420117"
  9417. }], [{
  9418. "label": "黄石港区",
  9419. "value": "420202"
  9420. }, {
  9421. "label": "西塞山区",
  9422. "value": "420203"
  9423. }, {
  9424. "label": "下陆区",
  9425. "value": "420204"
  9426. }, {
  9427. "label": "铁山区",
  9428. "value": "420205"
  9429. }, {
  9430. "label": "阳新县",
  9431. "value": "420222"
  9432. }, {
  9433. "label": "大冶市",
  9434. "value": "420281"
  9435. }], [{
  9436. "label": "茅箭区",
  9437. "value": "420302"
  9438. }, {
  9439. "label": "张湾区",
  9440. "value": "420303"
  9441. }, {
  9442. "label": "郧阳区",
  9443. "value": "420304"
  9444. }, {
  9445. "label": "郧西县",
  9446. "value": "420322"
  9447. }, {
  9448. "label": "竹山县",
  9449. "value": "420323"
  9450. }, {
  9451. "label": "竹溪县",
  9452. "value": "420324"
  9453. }, {
  9454. "label": "房县",
  9455. "value": "420325"
  9456. }, {
  9457. "label": "丹江口市",
  9458. "value": "420381"
  9459. }], [{
  9460. "label": "西陵区",
  9461. "value": "420502"
  9462. }, {
  9463. "label": "伍家岗区",
  9464. "value": "420503"
  9465. }, {
  9466. "label": "点军区",
  9467. "value": "420504"
  9468. }, {
  9469. "label": "猇亭区",
  9470. "value": "420505"
  9471. }, {
  9472. "label": "夷陵区",
  9473. "value": "420506"
  9474. }, {
  9475. "label": "远安县",
  9476. "value": "420525"
  9477. }, {
  9478. "label": "兴山县",
  9479. "value": "420526"
  9480. }, {
  9481. "label": "秭归县",
  9482. "value": "420527"
  9483. }, {
  9484. "label": "长阳土家族自治县",
  9485. "value": "420528"
  9486. }, {
  9487. "label": "五峰土家族自治县",
  9488. "value": "420529"
  9489. }, {
  9490. "label": "宜都市",
  9491. "value": "420581"
  9492. }, {
  9493. "label": "当阳市",
  9494. "value": "420582"
  9495. }, {
  9496. "label": "枝江市",
  9497. "value": "420583"
  9498. }], [{
  9499. "label": "襄城区",
  9500. "value": "420602"
  9501. }, {
  9502. "label": "樊城区",
  9503. "value": "420606"
  9504. }, {
  9505. "label": "襄州区",
  9506. "value": "420607"
  9507. }, {
  9508. "label": "南漳县",
  9509. "value": "420624"
  9510. }, {
  9511. "label": "谷城县",
  9512. "value": "420625"
  9513. }, {
  9514. "label": "保康县",
  9515. "value": "420626"
  9516. }, {
  9517. "label": "老河口市",
  9518. "value": "420682"
  9519. }, {
  9520. "label": "枣阳市",
  9521. "value": "420683"
  9522. }, {
  9523. "label": "宜城市",
  9524. "value": "420684"
  9525. }], [{
  9526. "label": "梁子湖区",
  9527. "value": "420702"
  9528. }, {
  9529. "label": "华容区",
  9530. "value": "420703"
  9531. }, {
  9532. "label": "鄂城区",
  9533. "value": "420704"
  9534. }], [{
  9535. "label": "东宝区",
  9536. "value": "420802"
  9537. }, {
  9538. "label": "掇刀区",
  9539. "value": "420804"
  9540. }, {
  9541. "label": "京山县",
  9542. "value": "420821"
  9543. }, {
  9544. "label": "沙洋县",
  9545. "value": "420822"
  9546. }, {
  9547. "label": "钟祥市",
  9548. "value": "420881"
  9549. }], [{
  9550. "label": "孝南区",
  9551. "value": "420902"
  9552. }, {
  9553. "label": "孝昌县",
  9554. "value": "420921"
  9555. }, {
  9556. "label": "大悟县",
  9557. "value": "420922"
  9558. }, {
  9559. "label": "云梦县",
  9560. "value": "420923"
  9561. }, {
  9562. "label": "应城市",
  9563. "value": "420981"
  9564. }, {
  9565. "label": "安陆市",
  9566. "value": "420982"
  9567. }, {
  9568. "label": "汉川市",
  9569. "value": "420984"
  9570. }], [{
  9571. "label": "沙市区",
  9572. "value": "421002"
  9573. }, {
  9574. "label": "荆州区",
  9575. "value": "421003"
  9576. }, {
  9577. "label": "公安县",
  9578. "value": "421022"
  9579. }, {
  9580. "label": "监利县",
  9581. "value": "421023"
  9582. }, {
  9583. "label": "江陵县",
  9584. "value": "421024"
  9585. }, {
  9586. "label": "荆州经济技术开发区",
  9587. "value": "421071"
  9588. }, {
  9589. "label": "石首市",
  9590. "value": "421081"
  9591. }, {
  9592. "label": "洪湖市",
  9593. "value": "421083"
  9594. }, {
  9595. "label": "松滋市",
  9596. "value": "421087"
  9597. }], [{
  9598. "label": "黄州区",
  9599. "value": "421102"
  9600. }, {
  9601. "label": "团风县",
  9602. "value": "421121"
  9603. }, {
  9604. "label": "红安县",
  9605. "value": "421122"
  9606. }, {
  9607. "label": "罗田县",
  9608. "value": "421123"
  9609. }, {
  9610. "label": "英山县",
  9611. "value": "421124"
  9612. }, {
  9613. "label": "浠水县",
  9614. "value": "421125"
  9615. }, {
  9616. "label": "蕲春县",
  9617. "value": "421126"
  9618. }, {
  9619. "label": "黄梅县",
  9620. "value": "421127"
  9621. }, {
  9622. "label": "龙感湖管理区",
  9623. "value": "421171"
  9624. }, {
  9625. "label": "麻城市",
  9626. "value": "421181"
  9627. }, {
  9628. "label": "武穴市",
  9629. "value": "421182"
  9630. }], [{
  9631. "label": "咸安区",
  9632. "value": "421202"
  9633. }, {
  9634. "label": "嘉鱼县",
  9635. "value": "421221"
  9636. }, {
  9637. "label": "通城县",
  9638. "value": "421222"
  9639. }, {
  9640. "label": "崇阳县",
  9641. "value": "421223"
  9642. }, {
  9643. "label": "通山县",
  9644. "value": "421224"
  9645. }, {
  9646. "label": "赤壁市",
  9647. "value": "421281"
  9648. }], [{
  9649. "label": "曾都区",
  9650. "value": "421303"
  9651. }, {
  9652. "label": "随县",
  9653. "value": "421321"
  9654. }, {
  9655. "label": "广水市",
  9656. "value": "421381"
  9657. }], [{
  9658. "label": "恩施市",
  9659. "value": "422801"
  9660. }, {
  9661. "label": "利川市",
  9662. "value": "422802"
  9663. }, {
  9664. "label": "建始县",
  9665. "value": "422822"
  9666. }, {
  9667. "label": "巴东县",
  9668. "value": "422823"
  9669. }, {
  9670. "label": "宣恩县",
  9671. "value": "422825"
  9672. }, {
  9673. "label": "咸丰县",
  9674. "value": "422826"
  9675. }, {
  9676. "label": "来凤县",
  9677. "value": "422827"
  9678. }, {
  9679. "label": "鹤峰县",
  9680. "value": "422828"
  9681. }], [{
  9682. "label": "仙桃市",
  9683. "value": "429004"
  9684. }, {
  9685. "label": "潜江市",
  9686. "value": "429005"
  9687. }, {
  9688. "label": "天门市",
  9689. "value": "429006"
  9690. }, {
  9691. "label": "神农架林区",
  9692. "value": "429021"
  9693. }]], [[{
  9694. "label": "芙蓉区",
  9695. "value": "430102"
  9696. }, {
  9697. "label": "天心区",
  9698. "value": "430103"
  9699. }, {
  9700. "label": "岳麓区",
  9701. "value": "430104"
  9702. }, {
  9703. "label": "开福区",
  9704. "value": "430105"
  9705. }, {
  9706. "label": "雨花区",
  9707. "value": "430111"
  9708. }, {
  9709. "label": "望城区",
  9710. "value": "430112"
  9711. }, {
  9712. "label": "长沙县",
  9713. "value": "430121"
  9714. }, {
  9715. "label": "浏阳市",
  9716. "value": "430181"
  9717. }, {
  9718. "label": "宁乡市",
  9719. "value": "430182"
  9720. }], [{
  9721. "label": "荷塘区",
  9722. "value": "430202"
  9723. }, {
  9724. "label": "芦淞区",
  9725. "value": "430203"
  9726. }, {
  9727. "label": "石峰区",
  9728. "value": "430204"
  9729. }, {
  9730. "label": "天元区",
  9731. "value": "430211"
  9732. }, {
  9733. "label": "株洲县",
  9734. "value": "430221"
  9735. }, {
  9736. "label": "攸县",
  9737. "value": "430223"
  9738. }, {
  9739. "label": "茶陵县",
  9740. "value": "430224"
  9741. }, {
  9742. "label": "炎陵县",
  9743. "value": "430225"
  9744. }, {
  9745. "label": "云龙示范区",
  9746. "value": "430271"
  9747. }, {
  9748. "label": "醴陵市",
  9749. "value": "430281"
  9750. }], [{
  9751. "label": "雨湖区",
  9752. "value": "430302"
  9753. }, {
  9754. "label": "岳塘区",
  9755. "value": "430304"
  9756. }, {
  9757. "label": "湘潭县",
  9758. "value": "430321"
  9759. }, {
  9760. "label": "湖南湘潭高新技术产业园区",
  9761. "value": "430371"
  9762. }, {
  9763. "label": "湘潭昭山示范区",
  9764. "value": "430372"
  9765. }, {
  9766. "label": "湘潭九华示范区",
  9767. "value": "430373"
  9768. }, {
  9769. "label": "湘乡市",
  9770. "value": "430381"
  9771. }, {
  9772. "label": "韶山市",
  9773. "value": "430382"
  9774. }], [{
  9775. "label": "珠晖区",
  9776. "value": "430405"
  9777. }, {
  9778. "label": "雁峰区",
  9779. "value": "430406"
  9780. }, {
  9781. "label": "石鼓区",
  9782. "value": "430407"
  9783. }, {
  9784. "label": "蒸湘区",
  9785. "value": "430408"
  9786. }, {
  9787. "label": "南岳区",
  9788. "value": "430412"
  9789. }, {
  9790. "label": "衡阳县",
  9791. "value": "430421"
  9792. }, {
  9793. "label": "衡南县",
  9794. "value": "430422"
  9795. }, {
  9796. "label": "衡山县",
  9797. "value": "430423"
  9798. }, {
  9799. "label": "衡东县",
  9800. "value": "430424"
  9801. }, {
  9802. "label": "祁东县",
  9803. "value": "430426"
  9804. }, {
  9805. "label": "衡阳综合保税区",
  9806. "value": "430471"
  9807. }, {
  9808. "label": "湖南衡阳高新技术产业园区",
  9809. "value": "430472"
  9810. }, {
  9811. "label": "湖南衡阳松木经济开发区",
  9812. "value": "430473"
  9813. }, {
  9814. "label": "耒阳市",
  9815. "value": "430481"
  9816. }, {
  9817. "label": "常宁市",
  9818. "value": "430482"
  9819. }], [{
  9820. "label": "双清区",
  9821. "value": "430502"
  9822. }, {
  9823. "label": "大祥区",
  9824. "value": "430503"
  9825. }, {
  9826. "label": "北塔区",
  9827. "value": "430511"
  9828. }, {
  9829. "label": "邵东县",
  9830. "value": "430521"
  9831. }, {
  9832. "label": "新邵县",
  9833. "value": "430522"
  9834. }, {
  9835. "label": "邵阳县",
  9836. "value": "430523"
  9837. }, {
  9838. "label": "隆回县",
  9839. "value": "430524"
  9840. }, {
  9841. "label": "洞口县",
  9842. "value": "430525"
  9843. }, {
  9844. "label": "绥宁县",
  9845. "value": "430527"
  9846. }, {
  9847. "label": "新宁县",
  9848. "value": "430528"
  9849. }, {
  9850. "label": "城步苗族自治县",
  9851. "value": "430529"
  9852. }, {
  9853. "label": "武冈市",
  9854. "value": "430581"
  9855. }], [{
  9856. "label": "岳阳楼区",
  9857. "value": "430602"
  9858. }, {
  9859. "label": "云溪区",
  9860. "value": "430603"
  9861. }, {
  9862. "label": "君山区",
  9863. "value": "430611"
  9864. }, {
  9865. "label": "岳阳县",
  9866. "value": "430621"
  9867. }, {
  9868. "label": "华容县",
  9869. "value": "430623"
  9870. }, {
  9871. "label": "湘阴县",
  9872. "value": "430624"
  9873. }, {
  9874. "label": "平江县",
  9875. "value": "430626"
  9876. }, {
  9877. "label": "岳阳市屈原管理区",
  9878. "value": "430671"
  9879. }, {
  9880. "label": "汨罗市",
  9881. "value": "430681"
  9882. }, {
  9883. "label": "临湘市",
  9884. "value": "430682"
  9885. }], [{
  9886. "label": "武陵区",
  9887. "value": "430702"
  9888. }, {
  9889. "label": "鼎城区",
  9890. "value": "430703"
  9891. }, {
  9892. "label": "安乡县",
  9893. "value": "430721"
  9894. }, {
  9895. "label": "汉寿县",
  9896. "value": "430722"
  9897. }, {
  9898. "label": "澧县",
  9899. "value": "430723"
  9900. }, {
  9901. "label": "临澧县",
  9902. "value": "430724"
  9903. }, {
  9904. "label": "桃源县",
  9905. "value": "430725"
  9906. }, {
  9907. "label": "石门县",
  9908. "value": "430726"
  9909. }, {
  9910. "label": "常德市西洞庭管理区",
  9911. "value": "430771"
  9912. }, {
  9913. "label": "津市市",
  9914. "value": "430781"
  9915. }], [{
  9916. "label": "永定区",
  9917. "value": "430802"
  9918. }, {
  9919. "label": "武陵源区",
  9920. "value": "430811"
  9921. }, {
  9922. "label": "慈利县",
  9923. "value": "430821"
  9924. }, {
  9925. "label": "桑植县",
  9926. "value": "430822"
  9927. }], [{
  9928. "label": "资阳区",
  9929. "value": "430902"
  9930. }, {
  9931. "label": "赫山区",
  9932. "value": "430903"
  9933. }, {
  9934. "label": "南县",
  9935. "value": "430921"
  9936. }, {
  9937. "label": "桃江县",
  9938. "value": "430922"
  9939. }, {
  9940. "label": "安化县",
  9941. "value": "430923"
  9942. }, {
  9943. "label": "益阳市大通湖管理区",
  9944. "value": "430971"
  9945. }, {
  9946. "label": "湖南益阳高新技术产业园区",
  9947. "value": "430972"
  9948. }, {
  9949. "label": "沅江市",
  9950. "value": "430981"
  9951. }], [{
  9952. "label": "北湖区",
  9953. "value": "431002"
  9954. }, {
  9955. "label": "苏仙区",
  9956. "value": "431003"
  9957. }, {
  9958. "label": "桂阳县",
  9959. "value": "431021"
  9960. }, {
  9961. "label": "宜章县",
  9962. "value": "431022"
  9963. }, {
  9964. "label": "永兴县",
  9965. "value": "431023"
  9966. }, {
  9967. "label": "嘉禾县",
  9968. "value": "431024"
  9969. }, {
  9970. "label": "临武县",
  9971. "value": "431025"
  9972. }, {
  9973. "label": "汝城县",
  9974. "value": "431026"
  9975. }, {
  9976. "label": "桂东县",
  9977. "value": "431027"
  9978. }, {
  9979. "label": "安仁县",
  9980. "value": "431028"
  9981. }, {
  9982. "label": "资兴市",
  9983. "value": "431081"
  9984. }], [{
  9985. "label": "零陵区",
  9986. "value": "431102"
  9987. }, {
  9988. "label": "冷水滩区",
  9989. "value": "431103"
  9990. }, {
  9991. "label": "祁阳县",
  9992. "value": "431121"
  9993. }, {
  9994. "label": "东安县",
  9995. "value": "431122"
  9996. }, {
  9997. "label": "双牌县",
  9998. "value": "431123"
  9999. }, {
  10000. "label": "道县",
  10001. "value": "431124"
  10002. }, {
  10003. "label": "江永县",
  10004. "value": "431125"
  10005. }, {
  10006. "label": "宁远县",
  10007. "value": "431126"
  10008. }, {
  10009. "label": "蓝山县",
  10010. "value": "431127"
  10011. }, {
  10012. "label": "新田县",
  10013. "value": "431128"
  10014. }, {
  10015. "label": "江华瑶族自治县",
  10016. "value": "431129"
  10017. }, {
  10018. "label": "永州经济技术开发区",
  10019. "value": "431171"
  10020. }, {
  10021. "label": "永州市金洞管理区",
  10022. "value": "431172"
  10023. }, {
  10024. "label": "永州市回龙圩管理区",
  10025. "value": "431173"
  10026. }], [{
  10027. "label": "鹤城区",
  10028. "value": "431202"
  10029. }, {
  10030. "label": "中方县",
  10031. "value": "431221"
  10032. }, {
  10033. "label": "沅陵县",
  10034. "value": "431222"
  10035. }, {
  10036. "label": "辰溪县",
  10037. "value": "431223"
  10038. }, {
  10039. "label": "溆浦县",
  10040. "value": "431224"
  10041. }, {
  10042. "label": "会同县",
  10043. "value": "431225"
  10044. }, {
  10045. "label": "麻阳苗族自治县",
  10046. "value": "431226"
  10047. }, {
  10048. "label": "新晃侗族自治县",
  10049. "value": "431227"
  10050. }, {
  10051. "label": "芷江侗族自治县",
  10052. "value": "431228"
  10053. }, {
  10054. "label": "靖州苗族侗族自治县",
  10055. "value": "431229"
  10056. }, {
  10057. "label": "通道侗族自治县",
  10058. "value": "431230"
  10059. }, {
  10060. "label": "怀化市洪江管理区",
  10061. "value": "431271"
  10062. }, {
  10063. "label": "洪江市",
  10064. "value": "431281"
  10065. }], [{
  10066. "label": "娄星区",
  10067. "value": "431302"
  10068. }, {
  10069. "label": "双峰县",
  10070. "value": "431321"
  10071. }, {
  10072. "label": "新化县",
  10073. "value": "431322"
  10074. }, {
  10075. "label": "冷水江市",
  10076. "value": "431381"
  10077. }, {
  10078. "label": "涟源市",
  10079. "value": "431382"
  10080. }], [{
  10081. "label": "吉首市",
  10082. "value": "433101"
  10083. }, {
  10084. "label": "泸溪县",
  10085. "value": "433122"
  10086. }, {
  10087. "label": "凤凰县",
  10088. "value": "433123"
  10089. }, {
  10090. "label": "花垣县",
  10091. "value": "433124"
  10092. }, {
  10093. "label": "保靖县",
  10094. "value": "433125"
  10095. }, {
  10096. "label": "古丈县",
  10097. "value": "433126"
  10098. }, {
  10099. "label": "永顺县",
  10100. "value": "433127"
  10101. }, {
  10102. "label": "龙山县",
  10103. "value": "433130"
  10104. }, {
  10105. "label": "湖南吉首经济开发区",
  10106. "value": "433172"
  10107. }, {
  10108. "label": "湖南永顺经济开发区",
  10109. "value": "433173"
  10110. }]], [[{
  10111. "label": "荔湾区",
  10112. "value": "440103"
  10113. }, {
  10114. "label": "越秀区",
  10115. "value": "440104"
  10116. }, {
  10117. "label": "海珠区",
  10118. "value": "440105"
  10119. }, {
  10120. "label": "天河区",
  10121. "value": "440106"
  10122. }, {
  10123. "label": "白云区",
  10124. "value": "440111"
  10125. }, {
  10126. "label": "黄埔区",
  10127. "value": "440112"
  10128. }, {
  10129. "label": "番禺区",
  10130. "value": "440113"
  10131. }, {
  10132. "label": "花都区",
  10133. "value": "440114"
  10134. }, {
  10135. "label": "南沙区",
  10136. "value": "440115"
  10137. }, {
  10138. "label": "从化区",
  10139. "value": "440117"
  10140. }, {
  10141. "label": "增城区",
  10142. "value": "440118"
  10143. }], [{
  10144. "label": "武江区",
  10145. "value": "440203"
  10146. }, {
  10147. "label": "浈江区",
  10148. "value": "440204"
  10149. }, {
  10150. "label": "曲江区",
  10151. "value": "440205"
  10152. }, {
  10153. "label": "始兴县",
  10154. "value": "440222"
  10155. }, {
  10156. "label": "仁化县",
  10157. "value": "440224"
  10158. }, {
  10159. "label": "翁源县",
  10160. "value": "440229"
  10161. }, {
  10162. "label": "乳源瑶族自治县",
  10163. "value": "440232"
  10164. }, {
  10165. "label": "新丰县",
  10166. "value": "440233"
  10167. }, {
  10168. "label": "乐昌市",
  10169. "value": "440281"
  10170. }, {
  10171. "label": "南雄市",
  10172. "value": "440282"
  10173. }], [{
  10174. "label": "罗湖区",
  10175. "value": "440303"
  10176. }, {
  10177. "label": "福田区",
  10178. "value": "440304"
  10179. }, {
  10180. "label": "南山区",
  10181. "value": "440305"
  10182. }, {
  10183. "label": "宝安区",
  10184. "value": "440306"
  10185. }, {
  10186. "label": "龙岗区",
  10187. "value": "440307"
  10188. }, {
  10189. "label": "盐田区",
  10190. "value": "440308"
  10191. }, {
  10192. "label": "龙华区",
  10193. "value": "440309"
  10194. }, {
  10195. "label": "坪山区",
  10196. "value": "440310"
  10197. }], [{
  10198. "label": "香洲区",
  10199. "value": "440402"
  10200. }, {
  10201. "label": "斗门区",
  10202. "value": "440403"
  10203. }, {
  10204. "label": "金湾区",
  10205. "value": "440404"
  10206. }], [{
  10207. "label": "龙湖区",
  10208. "value": "440507"
  10209. }, {
  10210. "label": "金平区",
  10211. "value": "440511"
  10212. }, {
  10213. "label": "濠江区",
  10214. "value": "440512"
  10215. }, {
  10216. "label": "潮阳区",
  10217. "value": "440513"
  10218. }, {
  10219. "label": "潮南区",
  10220. "value": "440514"
  10221. }, {
  10222. "label": "澄海区",
  10223. "value": "440515"
  10224. }, {
  10225. "label": "南澳县",
  10226. "value": "440523"
  10227. }], [{
  10228. "label": "禅城区",
  10229. "value": "440604"
  10230. }, {
  10231. "label": "南海区",
  10232. "value": "440605"
  10233. }, {
  10234. "label": "顺德区",
  10235. "value": "440606"
  10236. }, {
  10237. "label": "三水区",
  10238. "value": "440607"
  10239. }, {
  10240. "label": "高明区",
  10241. "value": "440608"
  10242. }], [{
  10243. "label": "蓬江区",
  10244. "value": "440703"
  10245. }, {
  10246. "label": "江海区",
  10247. "value": "440704"
  10248. }, {
  10249. "label": "新会区",
  10250. "value": "440705"
  10251. }, {
  10252. "label": "台山市",
  10253. "value": "440781"
  10254. }, {
  10255. "label": "开平市",
  10256. "value": "440783"
  10257. }, {
  10258. "label": "鹤山市",
  10259. "value": "440784"
  10260. }, {
  10261. "label": "恩平市",
  10262. "value": "440785"
  10263. }], [{
  10264. "label": "赤坎区",
  10265. "value": "440802"
  10266. }, {
  10267. "label": "霞山区",
  10268. "value": "440803"
  10269. }, {
  10270. "label": "坡头区",
  10271. "value": "440804"
  10272. }, {
  10273. "label": "麻章区",
  10274. "value": "440811"
  10275. }, {
  10276. "label": "遂溪县",
  10277. "value": "440823"
  10278. }, {
  10279. "label": "徐闻县",
  10280. "value": "440825"
  10281. }, {
  10282. "label": "廉江市",
  10283. "value": "440881"
  10284. }, {
  10285. "label": "雷州市",
  10286. "value": "440882"
  10287. }, {
  10288. "label": "吴川市",
  10289. "value": "440883"
  10290. }], [{
  10291. "label": "茂南区",
  10292. "value": "440902"
  10293. }, {
  10294. "label": "电白区",
  10295. "value": "440904"
  10296. }, {
  10297. "label": "高州市",
  10298. "value": "440981"
  10299. }, {
  10300. "label": "化州市",
  10301. "value": "440982"
  10302. }, {
  10303. "label": "信宜市",
  10304. "value": "440983"
  10305. }], [{
  10306. "label": "端州区",
  10307. "value": "441202"
  10308. }, {
  10309. "label": "鼎湖区",
  10310. "value": "441203"
  10311. }, {
  10312. "label": "高要区",
  10313. "value": "441204"
  10314. }, {
  10315. "label": "广宁县",
  10316. "value": "441223"
  10317. }, {
  10318. "label": "怀集县",
  10319. "value": "441224"
  10320. }, {
  10321. "label": "封开县",
  10322. "value": "441225"
  10323. }, {
  10324. "label": "德庆县",
  10325. "value": "441226"
  10326. }, {
  10327. "label": "四会市",
  10328. "value": "441284"
  10329. }], [{
  10330. "label": "惠城区",
  10331. "value": "441302"
  10332. }, {
  10333. "label": "惠阳区",
  10334. "value": "441303"
  10335. }, {
  10336. "label": "博罗县",
  10337. "value": "441322"
  10338. }, {
  10339. "label": "惠东县",
  10340. "value": "441323"
  10341. }, {
  10342. "label": "龙门县",
  10343. "value": "441324"
  10344. }], [{
  10345. "label": "梅江区",
  10346. "value": "441402"
  10347. }, {
  10348. "label": "梅县区",
  10349. "value": "441403"
  10350. }, {
  10351. "label": "大埔县",
  10352. "value": "441422"
  10353. }, {
  10354. "label": "丰顺县",
  10355. "value": "441423"
  10356. }, {
  10357. "label": "五华县",
  10358. "value": "441424"
  10359. }, {
  10360. "label": "平远县",
  10361. "value": "441426"
  10362. }, {
  10363. "label": "蕉岭县",
  10364. "value": "441427"
  10365. }, {
  10366. "label": "兴宁市",
  10367. "value": "441481"
  10368. }], [{
  10369. "label": "城区",
  10370. "value": "441502"
  10371. }, {
  10372. "label": "海丰县",
  10373. "value": "441521"
  10374. }, {
  10375. "label": "陆河县",
  10376. "value": "441523"
  10377. }, {
  10378. "label": "陆丰市",
  10379. "value": "441581"
  10380. }], [{
  10381. "label": "源城区",
  10382. "value": "441602"
  10383. }, {
  10384. "label": "紫金县",
  10385. "value": "441621"
  10386. }, {
  10387. "label": "龙川县",
  10388. "value": "441622"
  10389. }, {
  10390. "label": "连平县",
  10391. "value": "441623"
  10392. }, {
  10393. "label": "和平县",
  10394. "value": "441624"
  10395. }, {
  10396. "label": "东源县",
  10397. "value": "441625"
  10398. }], [{
  10399. "label": "江城区",
  10400. "value": "441702"
  10401. }, {
  10402. "label": "阳东区",
  10403. "value": "441704"
  10404. }, {
  10405. "label": "阳西县",
  10406. "value": "441721"
  10407. }, {
  10408. "label": "阳春市",
  10409. "value": "441781"
  10410. }], [{
  10411. "label": "清城区",
  10412. "value": "441802"
  10413. }, {
  10414. "label": "清新区",
  10415. "value": "441803"
  10416. }, {
  10417. "label": "佛冈县",
  10418. "value": "441821"
  10419. }, {
  10420. "label": "阳山县",
  10421. "value": "441823"
  10422. }, {
  10423. "label": "连山壮族瑶族自治县",
  10424. "value": "441825"
  10425. }, {
  10426. "label": "连南瑶族自治县",
  10427. "value": "441826"
  10428. }, {
  10429. "label": "英德市",
  10430. "value": "441881"
  10431. }, {
  10432. "label": "连州市",
  10433. "value": "441882"
  10434. }], [{
  10435. "label": "东莞市",
  10436. "value": "441900"
  10437. }], [{
  10438. "label": "中山市",
  10439. "value": "442000"
  10440. }], [{
  10441. "label": "湘桥区",
  10442. "value": "445102"
  10443. }, {
  10444. "label": "潮安区",
  10445. "value": "445103"
  10446. }, {
  10447. "label": "饶平县",
  10448. "value": "445122"
  10449. }], [{
  10450. "label": "榕城区",
  10451. "value": "445202"
  10452. }, {
  10453. "label": "揭东区",
  10454. "value": "445203"
  10455. }, {
  10456. "label": "揭西县",
  10457. "value": "445222"
  10458. }, {
  10459. "label": "惠来县",
  10460. "value": "445224"
  10461. }, {
  10462. "label": "普宁市",
  10463. "value": "445281"
  10464. }], [{
  10465. "label": "云城区",
  10466. "value": "445302"
  10467. }, {
  10468. "label": "云安区",
  10469. "value": "445303"
  10470. }, {
  10471. "label": "新兴县",
  10472. "value": "445321"
  10473. }, {
  10474. "label": "郁南县",
  10475. "value": "445322"
  10476. }, {
  10477. "label": "罗定市",
  10478. "value": "445381"
  10479. }]], [[{
  10480. "label": "兴宁区",
  10481. "value": "450102"
  10482. }, {
  10483. "label": "青秀区",
  10484. "value": "450103"
  10485. }, {
  10486. "label": "江南区",
  10487. "value": "450105"
  10488. }, {
  10489. "label": "西乡塘区",
  10490. "value": "450107"
  10491. }, {
  10492. "label": "良庆区",
  10493. "value": "450108"
  10494. }, {
  10495. "label": "邕宁区",
  10496. "value": "450109"
  10497. }, {
  10498. "label": "武鸣区",
  10499. "value": "450110"
  10500. }, {
  10501. "label": "隆安县",
  10502. "value": "450123"
  10503. }, {
  10504. "label": "马山县",
  10505. "value": "450124"
  10506. }, {
  10507. "label": "上林县",
  10508. "value": "450125"
  10509. }, {
  10510. "label": "宾阳县",
  10511. "value": "450126"
  10512. }, {
  10513. "label": "横县",
  10514. "value": "450127"
  10515. }], [{
  10516. "label": "城中区",
  10517. "value": "450202"
  10518. }, {
  10519. "label": "鱼峰区",
  10520. "value": "450203"
  10521. }, {
  10522. "label": "柳南区",
  10523. "value": "450204"
  10524. }, {
  10525. "label": "柳北区",
  10526. "value": "450205"
  10527. }, {
  10528. "label": "柳江区",
  10529. "value": "450206"
  10530. }, {
  10531. "label": "柳城县",
  10532. "value": "450222"
  10533. }, {
  10534. "label": "鹿寨县",
  10535. "value": "450223"
  10536. }, {
  10537. "label": "融安县",
  10538. "value": "450224"
  10539. }, {
  10540. "label": "融水苗族自治县",
  10541. "value": "450225"
  10542. }, {
  10543. "label": "三江侗族自治县",
  10544. "value": "450226"
  10545. }], [{
  10546. "label": "秀峰区",
  10547. "value": "450302"
  10548. }, {
  10549. "label": "叠彩区",
  10550. "value": "450303"
  10551. }, {
  10552. "label": "象山区",
  10553. "value": "450304"
  10554. }, {
  10555. "label": "七星区",
  10556. "value": "450305"
  10557. }, {
  10558. "label": "雁山区",
  10559. "value": "450311"
  10560. }, {
  10561. "label": "临桂区",
  10562. "value": "450312"
  10563. }, {
  10564. "label": "阳朔县",
  10565. "value": "450321"
  10566. }, {
  10567. "label": "灵川县",
  10568. "value": "450323"
  10569. }, {
  10570. "label": "全州县",
  10571. "value": "450324"
  10572. }, {
  10573. "label": "兴安县",
  10574. "value": "450325"
  10575. }, {
  10576. "label": "永福县",
  10577. "value": "450326"
  10578. }, {
  10579. "label": "灌阳县",
  10580. "value": "450327"
  10581. }, {
  10582. "label": "龙胜各族自治县",
  10583. "value": "450328"
  10584. }, {
  10585. "label": "资源县",
  10586. "value": "450329"
  10587. }, {
  10588. "label": "平乐县",
  10589. "value": "450330"
  10590. }, {
  10591. "label": "荔浦县",
  10592. "value": "450331"
  10593. }, {
  10594. "label": "恭城瑶族自治县",
  10595. "value": "450332"
  10596. }], [{
  10597. "label": "万秀区",
  10598. "value": "450403"
  10599. }, {
  10600. "label": "长洲区",
  10601. "value": "450405"
  10602. }, {
  10603. "label": "龙圩区",
  10604. "value": "450406"
  10605. }, {
  10606. "label": "苍梧县",
  10607. "value": "450421"
  10608. }, {
  10609. "label": "藤县",
  10610. "value": "450422"
  10611. }, {
  10612. "label": "蒙山县",
  10613. "value": "450423"
  10614. }, {
  10615. "label": "岑溪市",
  10616. "value": "450481"
  10617. }], [{
  10618. "label": "海城区",
  10619. "value": "450502"
  10620. }, {
  10621. "label": "银海区",
  10622. "value": "450503"
  10623. }, {
  10624. "label": "铁山港区",
  10625. "value": "450512"
  10626. }, {
  10627. "label": "合浦县",
  10628. "value": "450521"
  10629. }], [{
  10630. "label": "港口区",
  10631. "value": "450602"
  10632. }, {
  10633. "label": "防城区",
  10634. "value": "450603"
  10635. }, {
  10636. "label": "上思县",
  10637. "value": "450621"
  10638. }, {
  10639. "label": "东兴市",
  10640. "value": "450681"
  10641. }], [{
  10642. "label": "钦南区",
  10643. "value": "450702"
  10644. }, {
  10645. "label": "钦北区",
  10646. "value": "450703"
  10647. }, {
  10648. "label": "灵山县",
  10649. "value": "450721"
  10650. }, {
  10651. "label": "浦北县",
  10652. "value": "450722"
  10653. }], [{
  10654. "label": "港北区",
  10655. "value": "450802"
  10656. }, {
  10657. "label": "港南区",
  10658. "value": "450803"
  10659. }, {
  10660. "label": "覃塘区",
  10661. "value": "450804"
  10662. }, {
  10663. "label": "平南县",
  10664. "value": "450821"
  10665. }, {
  10666. "label": "桂平市",
  10667. "value": "450881"
  10668. }], [{
  10669. "label": "玉州区",
  10670. "value": "450902"
  10671. }, {
  10672. "label": "福绵区",
  10673. "value": "450903"
  10674. }, {
  10675. "label": "容县",
  10676. "value": "450921"
  10677. }, {
  10678. "label": "陆川县",
  10679. "value": "450922"
  10680. }, {
  10681. "label": "博白县",
  10682. "value": "450923"
  10683. }, {
  10684. "label": "兴业县",
  10685. "value": "450924"
  10686. }, {
  10687. "label": "北流市",
  10688. "value": "450981"
  10689. }], [{
  10690. "label": "右江区",
  10691. "value": "451002"
  10692. }, {
  10693. "label": "田阳县",
  10694. "value": "451021"
  10695. }, {
  10696. "label": "田东县",
  10697. "value": "451022"
  10698. }, {
  10699. "label": "平果县",
  10700. "value": "451023"
  10701. }, {
  10702. "label": "德保县",
  10703. "value": "451024"
  10704. }, {
  10705. "label": "那坡县",
  10706. "value": "451026"
  10707. }, {
  10708. "label": "凌云县",
  10709. "value": "451027"
  10710. }, {
  10711. "label": "乐业县",
  10712. "value": "451028"
  10713. }, {
  10714. "label": "田林县",
  10715. "value": "451029"
  10716. }, {
  10717. "label": "西林县",
  10718. "value": "451030"
  10719. }, {
  10720. "label": "隆林各族自治县",
  10721. "value": "451031"
  10722. }, {
  10723. "label": "靖西市",
  10724. "value": "451081"
  10725. }], [{
  10726. "label": "八步区",
  10727. "value": "451102"
  10728. }, {
  10729. "label": "平桂区",
  10730. "value": "451103"
  10731. }, {
  10732. "label": "昭平县",
  10733. "value": "451121"
  10734. }, {
  10735. "label": "钟山县",
  10736. "value": "451122"
  10737. }, {
  10738. "label": "富川瑶族自治县",
  10739. "value": "451123"
  10740. }], [{
  10741. "label": "金城江区",
  10742. "value": "451202"
  10743. }, {
  10744. "label": "宜州区",
  10745. "value": "451203"
  10746. }, {
  10747. "label": "南丹县",
  10748. "value": "451221"
  10749. }, {
  10750. "label": "天峨县",
  10751. "value": "451222"
  10752. }, {
  10753. "label": "凤山县",
  10754. "value": "451223"
  10755. }, {
  10756. "label": "东兰县",
  10757. "value": "451224"
  10758. }, {
  10759. "label": "罗城仫佬族自治县",
  10760. "value": "451225"
  10761. }, {
  10762. "label": "环江毛南族自治县",
  10763. "value": "451226"
  10764. }, {
  10765. "label": "巴马瑶族自治县",
  10766. "value": "451227"
  10767. }, {
  10768. "label": "都安瑶族自治县",
  10769. "value": "451228"
  10770. }, {
  10771. "label": "大化瑶族自治县",
  10772. "value": "451229"
  10773. }], [{
  10774. "label": "兴宾区",
  10775. "value": "451302"
  10776. }, {
  10777. "label": "忻城县",
  10778. "value": "451321"
  10779. }, {
  10780. "label": "象州县",
  10781. "value": "451322"
  10782. }, {
  10783. "label": "武宣县",
  10784. "value": "451323"
  10785. }, {
  10786. "label": "金秀瑶族自治县",
  10787. "value": "451324"
  10788. }, {
  10789. "label": "合山市",
  10790. "value": "451381"
  10791. }], [{
  10792. "label": "江州区",
  10793. "value": "451402"
  10794. }, {
  10795. "label": "扶绥县",
  10796. "value": "451421"
  10797. }, {
  10798. "label": "宁明县",
  10799. "value": "451422"
  10800. }, {
  10801. "label": "龙州县",
  10802. "value": "451423"
  10803. }, {
  10804. "label": "大新县",
  10805. "value": "451424"
  10806. }, {
  10807. "label": "天等县",
  10808. "value": "451425"
  10809. }, {
  10810. "label": "凭祥市",
  10811. "value": "451481"
  10812. }]], [[{
  10813. "label": "秀英区",
  10814. "value": "460105"
  10815. }, {
  10816. "label": "龙华区",
  10817. "value": "460106"
  10818. }, {
  10819. "label": "琼山区",
  10820. "value": "460107"
  10821. }, {
  10822. "label": "美兰区",
  10823. "value": "460108"
  10824. }], [{
  10825. "label": "海棠区",
  10826. "value": "460202"
  10827. }, {
  10828. "label": "吉阳区",
  10829. "value": "460203"
  10830. }, {
  10831. "label": "天涯区",
  10832. "value": "460204"
  10833. }, {
  10834. "label": "崖州区",
  10835. "value": "460205"
  10836. }], [{
  10837. "label": "西沙群岛",
  10838. "value": "460321"
  10839. }, {
  10840. "label": "南沙群岛",
  10841. "value": "460322"
  10842. }, {
  10843. "label": "中沙群岛的岛礁及其海域",
  10844. "value": "460323"
  10845. }], [{
  10846. "label": "儋州市",
  10847. "value": "460400"
  10848. }], [{
  10849. "label": "五指山市",
  10850. "value": "469001"
  10851. }, {
  10852. "label": "琼海市",
  10853. "value": "469002"
  10854. }, {
  10855. "label": "文昌市",
  10856. "value": "469005"
  10857. }, {
  10858. "label": "万宁市",
  10859. "value": "469006"
  10860. }, {
  10861. "label": "东方市",
  10862. "value": "469007"
  10863. }, {
  10864. "label": "定安县",
  10865. "value": "469021"
  10866. }, {
  10867. "label": "屯昌县",
  10868. "value": "469022"
  10869. }, {
  10870. "label": "澄迈县",
  10871. "value": "469023"
  10872. }, {
  10873. "label": "临高县",
  10874. "value": "469024"
  10875. }, {
  10876. "label": "白沙黎族自治县",
  10877. "value": "469025"
  10878. }, {
  10879. "label": "昌江黎族自治县",
  10880. "value": "469026"
  10881. }, {
  10882. "label": "乐东黎族自治县",
  10883. "value": "469027"
  10884. }, {
  10885. "label": "陵水黎族自治县",
  10886. "value": "469028"
  10887. }, {
  10888. "label": "保亭黎族苗族自治县",
  10889. "value": "469029"
  10890. }, {
  10891. "label": "琼中黎族苗族自治县",
  10892. "value": "469030"
  10893. }]], [[{
  10894. "label": "万州区",
  10895. "value": "500101"
  10896. }, {
  10897. "label": "涪陵区",
  10898. "value": "500102"
  10899. }, {
  10900. "label": "渝中区",
  10901. "value": "500103"
  10902. }, {
  10903. "label": "大渡口区",
  10904. "value": "500104"
  10905. }, {
  10906. "label": "江北区",
  10907. "value": "500105"
  10908. }, {
  10909. "label": "沙坪坝区",
  10910. "value": "500106"
  10911. }, {
  10912. "label": "九龙坡区",
  10913. "value": "500107"
  10914. }, {
  10915. "label": "南岸区",
  10916. "value": "500108"
  10917. }, {
  10918. "label": "北碚区",
  10919. "value": "500109"
  10920. }, {
  10921. "label": "綦江区",
  10922. "value": "500110"
  10923. }, {
  10924. "label": "大足区",
  10925. "value": "500111"
  10926. }, {
  10927. "label": "渝北区",
  10928. "value": "500112"
  10929. }, {
  10930. "label": "巴南区",
  10931. "value": "500113"
  10932. }, {
  10933. "label": "黔江区",
  10934. "value": "500114"
  10935. }, {
  10936. "label": "长寿区",
  10937. "value": "500115"
  10938. }, {
  10939. "label": "江津区",
  10940. "value": "500116"
  10941. }, {
  10942. "label": "合川区",
  10943. "value": "500117"
  10944. }, {
  10945. "label": "永川区",
  10946. "value": "500118"
  10947. }, {
  10948. "label": "南川区",
  10949. "value": "500119"
  10950. }, {
  10951. "label": "璧山区",
  10952. "value": "500120"
  10953. }, {
  10954. "label": "铜梁区",
  10955. "value": "500151"
  10956. }, {
  10957. "label": "潼南区",
  10958. "value": "500152"
  10959. }, {
  10960. "label": "荣昌区",
  10961. "value": "500153"
  10962. }, {
  10963. "label": "开州区",
  10964. "value": "500154"
  10965. }, {
  10966. "label": "梁平区",
  10967. "value": "500155"
  10968. }, {
  10969. "label": "武隆区",
  10970. "value": "500156"
  10971. }], [{
  10972. "label": "城口县",
  10973. "value": "500229"
  10974. }, {
  10975. "label": "丰都县",
  10976. "value": "500230"
  10977. }, {
  10978. "label": "垫江县",
  10979. "value": "500231"
  10980. }, {
  10981. "label": "忠县",
  10982. "value": "500233"
  10983. }, {
  10984. "label": "云阳县",
  10985. "value": "500235"
  10986. }, {
  10987. "label": "奉节县",
  10988. "value": "500236"
  10989. }, {
  10990. "label": "巫山县",
  10991. "value": "500237"
  10992. }, {
  10993. "label": "巫溪县",
  10994. "value": "500238"
  10995. }, {
  10996. "label": "石柱土家族自治县",
  10997. "value": "500240"
  10998. }, {
  10999. "label": "秀山土家族苗族自治县",
  11000. "value": "500241"
  11001. }, {
  11002. "label": "酉阳土家族苗族自治县",
  11003. "value": "500242"
  11004. }, {
  11005. "label": "彭水苗族土家族自治县",
  11006. "value": "500243"
  11007. }]], [[{
  11008. "label": "锦江区",
  11009. "value": "510104"
  11010. }, {
  11011. "label": "青羊区",
  11012. "value": "510105"
  11013. }, {
  11014. "label": "金牛区",
  11015. "value": "510106"
  11016. }, {
  11017. "label": "武侯区",
  11018. "value": "510107"
  11019. }, {
  11020. "label": "成华区",
  11021. "value": "510108"
  11022. }, {
  11023. "label": "龙泉驿区",
  11024. "value": "510112"
  11025. }, {
  11026. "label": "青白江区",
  11027. "value": "510113"
  11028. }, {
  11029. "label": "新都区",
  11030. "value": "510114"
  11031. }, {
  11032. "label": "温江区",
  11033. "value": "510115"
  11034. }, {
  11035. "label": "双流区",
  11036. "value": "510116"
  11037. }, {
  11038. "label": "郫都区",
  11039. "value": "510117"
  11040. }, {
  11041. "label": "金堂县",
  11042. "value": "510121"
  11043. }, {
  11044. "label": "大邑县",
  11045. "value": "510129"
  11046. }, {
  11047. "label": "蒲江县",
  11048. "value": "510131"
  11049. }, {
  11050. "label": "新津县",
  11051. "value": "510132"
  11052. }, {
  11053. "label": "都江堰市",
  11054. "value": "510181"
  11055. }, {
  11056. "label": "彭州市",
  11057. "value": "510182"
  11058. }, {
  11059. "label": "邛崃市",
  11060. "value": "510183"
  11061. }, {
  11062. "label": "崇州市",
  11063. "value": "510184"
  11064. }, {
  11065. "label": "简阳市",
  11066. "value": "510185"
  11067. }], [{
  11068. "label": "自流井区",
  11069. "value": "510302"
  11070. }, {
  11071. "label": "贡井区",
  11072. "value": "510303"
  11073. }, {
  11074. "label": "大安区",
  11075. "value": "510304"
  11076. }, {
  11077. "label": "沿滩区",
  11078. "value": "510311"
  11079. }, {
  11080. "label": "荣县",
  11081. "value": "510321"
  11082. }, {
  11083. "label": "富顺县",
  11084. "value": "510322"
  11085. }], [{
  11086. "label": "东区",
  11087. "value": "510402"
  11088. }, {
  11089. "label": "西区",
  11090. "value": "510403"
  11091. }, {
  11092. "label": "仁和区",
  11093. "value": "510411"
  11094. }, {
  11095. "label": "米易县",
  11096. "value": "510421"
  11097. }, {
  11098. "label": "盐边县",
  11099. "value": "510422"
  11100. }], [{
  11101. "label": "江阳区",
  11102. "value": "510502"
  11103. }, {
  11104. "label": "纳溪区",
  11105. "value": "510503"
  11106. }, {
  11107. "label": "龙马潭区",
  11108. "value": "510504"
  11109. }, {
  11110. "label": "泸县",
  11111. "value": "510521"
  11112. }, {
  11113. "label": "合江县",
  11114. "value": "510522"
  11115. }, {
  11116. "label": "叙永县",
  11117. "value": "510524"
  11118. }, {
  11119. "label": "古蔺县",
  11120. "value": "510525"
  11121. }], [{
  11122. "label": "旌阳区",
  11123. "value": "510603"
  11124. }, {
  11125. "label": "罗江区",
  11126. "value": "510604"
  11127. }, {
  11128. "label": "中江县",
  11129. "value": "510623"
  11130. }, {
  11131. "label": "广汉市",
  11132. "value": "510681"
  11133. }, {
  11134. "label": "什邡市",
  11135. "value": "510682"
  11136. }, {
  11137. "label": "绵竹市",
  11138. "value": "510683"
  11139. }], [{
  11140. "label": "涪城区",
  11141. "value": "510703"
  11142. }, {
  11143. "label": "游仙区",
  11144. "value": "510704"
  11145. }, {
  11146. "label": "安州区",
  11147. "value": "510705"
  11148. }, {
  11149. "label": "三台县",
  11150. "value": "510722"
  11151. }, {
  11152. "label": "盐亭县",
  11153. "value": "510723"
  11154. }, {
  11155. "label": "梓潼县",
  11156. "value": "510725"
  11157. }, {
  11158. "label": "北川羌族自治县",
  11159. "value": "510726"
  11160. }, {
  11161. "label": "平武县",
  11162. "value": "510727"
  11163. }, {
  11164. "label": "江油市",
  11165. "value": "510781"
  11166. }], [{
  11167. "label": "利州区",
  11168. "value": "510802"
  11169. }, {
  11170. "label": "昭化区",
  11171. "value": "510811"
  11172. }, {
  11173. "label": "朝天区",
  11174. "value": "510812"
  11175. }, {
  11176. "label": "旺苍县",
  11177. "value": "510821"
  11178. }, {
  11179. "label": "青川县",
  11180. "value": "510822"
  11181. }, {
  11182. "label": "剑阁县",
  11183. "value": "510823"
  11184. }, {
  11185. "label": "苍溪县",
  11186. "value": "510824"
  11187. }], [{
  11188. "label": "船山区",
  11189. "value": "510903"
  11190. }, {
  11191. "label": "安居区",
  11192. "value": "510904"
  11193. }, {
  11194. "label": "蓬溪县",
  11195. "value": "510921"
  11196. }, {
  11197. "label": "射洪县",
  11198. "value": "510922"
  11199. }, {
  11200. "label": "大英县",
  11201. "value": "510923"
  11202. }], [{
  11203. "label": "市中区",
  11204. "value": "511002"
  11205. }, {
  11206. "label": "东兴区",
  11207. "value": "511011"
  11208. }, {
  11209. "label": "威远县",
  11210. "value": "511024"
  11211. }, {
  11212. "label": "资中县",
  11213. "value": "511025"
  11214. }, {
  11215. "label": "内江经济开发区",
  11216. "value": "511071"
  11217. }, {
  11218. "label": "隆昌市",
  11219. "value": "511083"
  11220. }], [{
  11221. "label": "市中区",
  11222. "value": "511102"
  11223. }, {
  11224. "label": "沙湾区",
  11225. "value": "511111"
  11226. }, {
  11227. "label": "五通桥区",
  11228. "value": "511112"
  11229. }, {
  11230. "label": "金口河区",
  11231. "value": "511113"
  11232. }, {
  11233. "label": "犍为县",
  11234. "value": "511123"
  11235. }, {
  11236. "label": "井研县",
  11237. "value": "511124"
  11238. }, {
  11239. "label": "夹江县",
  11240. "value": "511126"
  11241. }, {
  11242. "label": "沐川县",
  11243. "value": "511129"
  11244. }, {
  11245. "label": "峨边彝族自治县",
  11246. "value": "511132"
  11247. }, {
  11248. "label": "马边彝族自治县",
  11249. "value": "511133"
  11250. }, {
  11251. "label": "峨眉山市",
  11252. "value": "511181"
  11253. }], [{
  11254. "label": "顺庆区",
  11255. "value": "511302"
  11256. }, {
  11257. "label": "高坪区",
  11258. "value": "511303"
  11259. }, {
  11260. "label": "嘉陵区",
  11261. "value": "511304"
  11262. }, {
  11263. "label": "南部县",
  11264. "value": "511321"
  11265. }, {
  11266. "label": "营山县",
  11267. "value": "511322"
  11268. }, {
  11269. "label": "蓬安县",
  11270. "value": "511323"
  11271. }, {
  11272. "label": "仪陇县",
  11273. "value": "511324"
  11274. }, {
  11275. "label": "西充县",
  11276. "value": "511325"
  11277. }, {
  11278. "label": "阆中市",
  11279. "value": "511381"
  11280. }], [{
  11281. "label": "东坡区",
  11282. "value": "511402"
  11283. }, {
  11284. "label": "彭山区",
  11285. "value": "511403"
  11286. }, {
  11287. "label": "仁寿县",
  11288. "value": "511421"
  11289. }, {
  11290. "label": "洪雅县",
  11291. "value": "511423"
  11292. }, {
  11293. "label": "丹棱县",
  11294. "value": "511424"
  11295. }, {
  11296. "label": "青神县",
  11297. "value": "511425"
  11298. }], [{
  11299. "label": "翠屏区",
  11300. "value": "511502"
  11301. }, {
  11302. "label": "南溪区",
  11303. "value": "511503"
  11304. }, {
  11305. "label": "宜宾县",
  11306. "value": "511521"
  11307. }, {
  11308. "label": "江安县",
  11309. "value": "511523"
  11310. }, {
  11311. "label": "长宁县",
  11312. "value": "511524"
  11313. }, {
  11314. "label": "高县",
  11315. "value": "511525"
  11316. }, {
  11317. "label": "珙县",
  11318. "value": "511526"
  11319. }, {
  11320. "label": "筠连县",
  11321. "value": "511527"
  11322. }, {
  11323. "label": "兴文县",
  11324. "value": "511528"
  11325. }, {
  11326. "label": "屏山县",
  11327. "value": "511529"
  11328. }], [{
  11329. "label": "广安区",
  11330. "value": "511602"
  11331. }, {
  11332. "label": "前锋区",
  11333. "value": "511603"
  11334. }, {
  11335. "label": "岳池县",
  11336. "value": "511621"
  11337. }, {
  11338. "label": "武胜县",
  11339. "value": "511622"
  11340. }, {
  11341. "label": "邻水县",
  11342. "value": "511623"
  11343. }, {
  11344. "label": "华蓥市",
  11345. "value": "511681"
  11346. }], [{
  11347. "label": "通川区",
  11348. "value": "511702"
  11349. }, {
  11350. "label": "达川区",
  11351. "value": "511703"
  11352. }, {
  11353. "label": "宣汉县",
  11354. "value": "511722"
  11355. }, {
  11356. "label": "开江县",
  11357. "value": "511723"
  11358. }, {
  11359. "label": "大竹县",
  11360. "value": "511724"
  11361. }, {
  11362. "label": "渠县",
  11363. "value": "511725"
  11364. }, {
  11365. "label": "达州经济开发区",
  11366. "value": "511771"
  11367. }, {
  11368. "label": "万源市",
  11369. "value": "511781"
  11370. }], [{
  11371. "label": "雨城区",
  11372. "value": "511802"
  11373. }, {
  11374. "label": "名山区",
  11375. "value": "511803"
  11376. }, {
  11377. "label": "荥经县",
  11378. "value": "511822"
  11379. }, {
  11380. "label": "汉源县",
  11381. "value": "511823"
  11382. }, {
  11383. "label": "石棉县",
  11384. "value": "511824"
  11385. }, {
  11386. "label": "天全县",
  11387. "value": "511825"
  11388. }, {
  11389. "label": "芦山县",
  11390. "value": "511826"
  11391. }, {
  11392. "label": "宝兴县",
  11393. "value": "511827"
  11394. }], [{
  11395. "label": "巴州区",
  11396. "value": "511902"
  11397. }, {
  11398. "label": "恩阳区",
  11399. "value": "511903"
  11400. }, {
  11401. "label": "通江县",
  11402. "value": "511921"
  11403. }, {
  11404. "label": "南江县",
  11405. "value": "511922"
  11406. }, {
  11407. "label": "平昌县",
  11408. "value": "511923"
  11409. }, {
  11410. "label": "巴中经济开发区",
  11411. "value": "511971"
  11412. }], [{
  11413. "label": "雁江区",
  11414. "value": "512002"
  11415. }, {
  11416. "label": "安岳县",
  11417. "value": "512021"
  11418. }, {
  11419. "label": "乐至县",
  11420. "value": "512022"
  11421. }], [{
  11422. "label": "马尔康市",
  11423. "value": "513201"
  11424. }, {
  11425. "label": "汶川县",
  11426. "value": "513221"
  11427. }, {
  11428. "label": "理县",
  11429. "value": "513222"
  11430. }, {
  11431. "label": "茂县",
  11432. "value": "513223"
  11433. }, {
  11434. "label": "松潘县",
  11435. "value": "513224"
  11436. }, {
  11437. "label": "九寨沟县",
  11438. "value": "513225"
  11439. }, {
  11440. "label": "金川县",
  11441. "value": "513226"
  11442. }, {
  11443. "label": "小金县",
  11444. "value": "513227"
  11445. }, {
  11446. "label": "黑水县",
  11447. "value": "513228"
  11448. }, {
  11449. "label": "壤塘县",
  11450. "value": "513230"
  11451. }, {
  11452. "label": "阿坝县",
  11453. "value": "513231"
  11454. }, {
  11455. "label": "若尔盖县",
  11456. "value": "513232"
  11457. }, {
  11458. "label": "红原县",
  11459. "value": "513233"
  11460. }], [{
  11461. "label": "康定市",
  11462. "value": "513301"
  11463. }, {
  11464. "label": "泸定县",
  11465. "value": "513322"
  11466. }, {
  11467. "label": "丹巴县",
  11468. "value": "513323"
  11469. }, {
  11470. "label": "九龙县",
  11471. "value": "513324"
  11472. }, {
  11473. "label": "雅江县",
  11474. "value": "513325"
  11475. }, {
  11476. "label": "道孚县",
  11477. "value": "513326"
  11478. }, {
  11479. "label": "炉霍县",
  11480. "value": "513327"
  11481. }, {
  11482. "label": "甘孜县",
  11483. "value": "513328"
  11484. }, {
  11485. "label": "新龙县",
  11486. "value": "513329"
  11487. }, {
  11488. "label": "德格县",
  11489. "value": "513330"
  11490. }, {
  11491. "label": "白玉县",
  11492. "value": "513331"
  11493. }, {
  11494. "label": "石渠县",
  11495. "value": "513332"
  11496. }, {
  11497. "label": "色达县",
  11498. "value": "513333"
  11499. }, {
  11500. "label": "理塘县",
  11501. "value": "513334"
  11502. }, {
  11503. "label": "巴塘县",
  11504. "value": "513335"
  11505. }, {
  11506. "label": "乡城县",
  11507. "value": "513336"
  11508. }, {
  11509. "label": "稻城县",
  11510. "value": "513337"
  11511. }, {
  11512. "label": "得荣县",
  11513. "value": "513338"
  11514. }], [{
  11515. "label": "西昌市",
  11516. "value": "513401"
  11517. }, {
  11518. "label": "木里藏族自治县",
  11519. "value": "513422"
  11520. }, {
  11521. "label": "盐源县",
  11522. "value": "513423"
  11523. }, {
  11524. "label": "德昌县",
  11525. "value": "513424"
  11526. }, {
  11527. "label": "会理县",
  11528. "value": "513425"
  11529. }, {
  11530. "label": "会东县",
  11531. "value": "513426"
  11532. }, {
  11533. "label": "宁南县",
  11534. "value": "513427"
  11535. }, {
  11536. "label": "普格县",
  11537. "value": "513428"
  11538. }, {
  11539. "label": "布拖县",
  11540. "value": "513429"
  11541. }, {
  11542. "label": "金阳县",
  11543. "value": "513430"
  11544. }, {
  11545. "label": "昭觉县",
  11546. "value": "513431"
  11547. }, {
  11548. "label": "喜德县",
  11549. "value": "513432"
  11550. }, {
  11551. "label": "冕宁县",
  11552. "value": "513433"
  11553. }, {
  11554. "label": "越西县",
  11555. "value": "513434"
  11556. }, {
  11557. "label": "甘洛县",
  11558. "value": "513435"
  11559. }, {
  11560. "label": "美姑县",
  11561. "value": "513436"
  11562. }, {
  11563. "label": "雷波县",
  11564. "value": "513437"
  11565. }]], [[{
  11566. "label": "南明区",
  11567. "value": "520102"
  11568. }, {
  11569. "label": "云岩区",
  11570. "value": "520103"
  11571. }, {
  11572. "label": "花溪区",
  11573. "value": "520111"
  11574. }, {
  11575. "label": "乌当区",
  11576. "value": "520112"
  11577. }, {
  11578. "label": "白云区",
  11579. "value": "520113"
  11580. }, {
  11581. "label": "观山湖区",
  11582. "value": "520115"
  11583. }, {
  11584. "label": "开阳县",
  11585. "value": "520121"
  11586. }, {
  11587. "label": "息烽县",
  11588. "value": "520122"
  11589. }, {
  11590. "label": "修文县",
  11591. "value": "520123"
  11592. }, {
  11593. "label": "清镇市",
  11594. "value": "520181"
  11595. }], [{
  11596. "label": "钟山区",
  11597. "value": "520201"
  11598. }, {
  11599. "label": "六枝特区",
  11600. "value": "520203"
  11601. }, {
  11602. "label": "水城县",
  11603. "value": "520221"
  11604. }, {
  11605. "label": "盘州市",
  11606. "value": "520281"
  11607. }], [{
  11608. "label": "红花岗区",
  11609. "value": "520302"
  11610. }, {
  11611. "label": "汇川区",
  11612. "value": "520303"
  11613. }, {
  11614. "label": "播州区",
  11615. "value": "520304"
  11616. }, {
  11617. "label": "桐梓县",
  11618. "value": "520322"
  11619. }, {
  11620. "label": "绥阳县",
  11621. "value": "520323"
  11622. }, {
  11623. "label": "正安县",
  11624. "value": "520324"
  11625. }, {
  11626. "label": "道真仡佬族苗族自治县",
  11627. "value": "520325"
  11628. }, {
  11629. "label": "务川仡佬族苗族自治县",
  11630. "value": "520326"
  11631. }, {
  11632. "label": "凤冈县",
  11633. "value": "520327"
  11634. }, {
  11635. "label": "湄潭县",
  11636. "value": "520328"
  11637. }, {
  11638. "label": "余庆县",
  11639. "value": "520329"
  11640. }, {
  11641. "label": "习水县",
  11642. "value": "520330"
  11643. }, {
  11644. "label": "赤水市",
  11645. "value": "520381"
  11646. }, {
  11647. "label": "仁怀市",
  11648. "value": "520382"
  11649. }], [{
  11650. "label": "西秀区",
  11651. "value": "520402"
  11652. }, {
  11653. "label": "平坝区",
  11654. "value": "520403"
  11655. }, {
  11656. "label": "普定县",
  11657. "value": "520422"
  11658. }, {
  11659. "label": "镇宁布依族苗族自治县",
  11660. "value": "520423"
  11661. }, {
  11662. "label": "关岭布依族苗族自治县",
  11663. "value": "520424"
  11664. }, {
  11665. "label": "紫云苗族布依族自治县",
  11666. "value": "520425"
  11667. }], [{
  11668. "label": "七星关区",
  11669. "value": "520502"
  11670. }, {
  11671. "label": "大方县",
  11672. "value": "520521"
  11673. }, {
  11674. "label": "黔西县",
  11675. "value": "520522"
  11676. }, {
  11677. "label": "金沙县",
  11678. "value": "520523"
  11679. }, {
  11680. "label": "织金县",
  11681. "value": "520524"
  11682. }, {
  11683. "label": "纳雍县",
  11684. "value": "520525"
  11685. }, {
  11686. "label": "威宁彝族回族苗族自治县",
  11687. "value": "520526"
  11688. }, {
  11689. "label": "赫章县",
  11690. "value": "520527"
  11691. }], [{
  11692. "label": "碧江区",
  11693. "value": "520602"
  11694. }, {
  11695. "label": "万山区",
  11696. "value": "520603"
  11697. }, {
  11698. "label": "江口县",
  11699. "value": "520621"
  11700. }, {
  11701. "label": "玉屏侗族自治县",
  11702. "value": "520622"
  11703. }, {
  11704. "label": "石阡县",
  11705. "value": "520623"
  11706. }, {
  11707. "label": "思南县",
  11708. "value": "520624"
  11709. }, {
  11710. "label": "印江土家族苗族自治县",
  11711. "value": "520625"
  11712. }, {
  11713. "label": "德江县",
  11714. "value": "520626"
  11715. }, {
  11716. "label": "沿河土家族自治县",
  11717. "value": "520627"
  11718. }, {
  11719. "label": "松桃苗族自治县",
  11720. "value": "520628"
  11721. }], [{
  11722. "label": "兴义市",
  11723. "value": "522301"
  11724. }, {
  11725. "label": "兴仁县",
  11726. "value": "522322"
  11727. }, {
  11728. "label": "普安县",
  11729. "value": "522323"
  11730. }, {
  11731. "label": "晴隆县",
  11732. "value": "522324"
  11733. }, {
  11734. "label": "贞丰县",
  11735. "value": "522325"
  11736. }, {
  11737. "label": "望谟县",
  11738. "value": "522326"
  11739. }, {
  11740. "label": "册亨县",
  11741. "value": "522327"
  11742. }, {
  11743. "label": "安龙县",
  11744. "value": "522328"
  11745. }], [{
  11746. "label": "凯里市",
  11747. "value": "522601"
  11748. }, {
  11749. "label": "黄平县",
  11750. "value": "522622"
  11751. }, {
  11752. "label": "施秉县",
  11753. "value": "522623"
  11754. }, {
  11755. "label": "三穗县",
  11756. "value": "522624"
  11757. }, {
  11758. "label": "镇远县",
  11759. "value": "522625"
  11760. }, {
  11761. "label": "岑巩县",
  11762. "value": "522626"
  11763. }, {
  11764. "label": "天柱县",
  11765. "value": "522627"
  11766. }, {
  11767. "label": "锦屏县",
  11768. "value": "522628"
  11769. }, {
  11770. "label": "剑河县",
  11771. "value": "522629"
  11772. }, {
  11773. "label": "台江县",
  11774. "value": "522630"
  11775. }, {
  11776. "label": "黎平县",
  11777. "value": "522631"
  11778. }, {
  11779. "label": "榕江县",
  11780. "value": "522632"
  11781. }, {
  11782. "label": "从江县",
  11783. "value": "522633"
  11784. }, {
  11785. "label": "雷山县",
  11786. "value": "522634"
  11787. }, {
  11788. "label": "麻江县",
  11789. "value": "522635"
  11790. }, {
  11791. "label": "丹寨县",
  11792. "value": "522636"
  11793. }], [{
  11794. "label": "都匀市",
  11795. "value": "522701"
  11796. }, {
  11797. "label": "福泉市",
  11798. "value": "522702"
  11799. }, {
  11800. "label": "荔波县",
  11801. "value": "522722"
  11802. }, {
  11803. "label": "贵定县",
  11804. "value": "522723"
  11805. }, {
  11806. "label": "瓮安县",
  11807. "value": "522725"
  11808. }, {
  11809. "label": "独山县",
  11810. "value": "522726"
  11811. }, {
  11812. "label": "平塘县",
  11813. "value": "522727"
  11814. }, {
  11815. "label": "罗甸县",
  11816. "value": "522728"
  11817. }, {
  11818. "label": "长顺县",
  11819. "value": "522729"
  11820. }, {
  11821. "label": "龙里县",
  11822. "value": "522730"
  11823. }, {
  11824. "label": "惠水县",
  11825. "value": "522731"
  11826. }, {
  11827. "label": "三都水族自治县",
  11828. "value": "522732"
  11829. }]], [[{
  11830. "label": "五华区",
  11831. "value": "530102"
  11832. }, {
  11833. "label": "盘龙区",
  11834. "value": "530103"
  11835. }, {
  11836. "label": "官渡区",
  11837. "value": "530111"
  11838. }, {
  11839. "label": "西山区",
  11840. "value": "530112"
  11841. }, {
  11842. "label": "东川区",
  11843. "value": "530113"
  11844. }, {
  11845. "label": "呈贡区",
  11846. "value": "530114"
  11847. }, {
  11848. "label": "晋宁区",
  11849. "value": "530115"
  11850. }, {
  11851. "label": "富民县",
  11852. "value": "530124"
  11853. }, {
  11854. "label": "宜良县",
  11855. "value": "530125"
  11856. }, {
  11857. "label": "石林彝族自治县",
  11858. "value": "530126"
  11859. }, {
  11860. "label": "嵩明县",
  11861. "value": "530127"
  11862. }, {
  11863. "label": "禄劝彝族苗族自治县",
  11864. "value": "530128"
  11865. }, {
  11866. "label": "寻甸回族彝族自治县",
  11867. "value": "530129"
  11868. }, {
  11869. "label": "安宁市",
  11870. "value": "530181"
  11871. }], [{
  11872. "label": "麒麟区",
  11873. "value": "530302"
  11874. }, {
  11875. "label": "沾益区",
  11876. "value": "530303"
  11877. }, {
  11878. "label": "马龙县",
  11879. "value": "530321"
  11880. }, {
  11881. "label": "陆良县",
  11882. "value": "530322"
  11883. }, {
  11884. "label": "师宗县",
  11885. "value": "530323"
  11886. }, {
  11887. "label": "罗平县",
  11888. "value": "530324"
  11889. }, {
  11890. "label": "富源县",
  11891. "value": "530325"
  11892. }, {
  11893. "label": "会泽县",
  11894. "value": "530326"
  11895. }, {
  11896. "label": "宣威市",
  11897. "value": "530381"
  11898. }], [{
  11899. "label": "红塔区",
  11900. "value": "530402"
  11901. }, {
  11902. "label": "江川区",
  11903. "value": "530403"
  11904. }, {
  11905. "label": "澄江县",
  11906. "value": "530422"
  11907. }, {
  11908. "label": "通海县",
  11909. "value": "530423"
  11910. }, {
  11911. "label": "华宁县",
  11912. "value": "530424"
  11913. }, {
  11914. "label": "易门县",
  11915. "value": "530425"
  11916. }, {
  11917. "label": "峨山彝族自治县",
  11918. "value": "530426"
  11919. }, {
  11920. "label": "新平彝族傣族自治县",
  11921. "value": "530427"
  11922. }, {
  11923. "label": "元江哈尼族彝族傣族自治县",
  11924. "value": "530428"
  11925. }], [{
  11926. "label": "隆阳区",
  11927. "value": "530502"
  11928. }, {
  11929. "label": "施甸县",
  11930. "value": "530521"
  11931. }, {
  11932. "label": "龙陵县",
  11933. "value": "530523"
  11934. }, {
  11935. "label": "昌宁县",
  11936. "value": "530524"
  11937. }, {
  11938. "label": "腾冲市",
  11939. "value": "530581"
  11940. }], [{
  11941. "label": "昭阳区",
  11942. "value": "530602"
  11943. }, {
  11944. "label": "鲁甸县",
  11945. "value": "530621"
  11946. }, {
  11947. "label": "巧家县",
  11948. "value": "530622"
  11949. }, {
  11950. "label": "盐津县",
  11951. "value": "530623"
  11952. }, {
  11953. "label": "大关县",
  11954. "value": "530624"
  11955. }, {
  11956. "label": "永善县",
  11957. "value": "530625"
  11958. }, {
  11959. "label": "绥江县",
  11960. "value": "530626"
  11961. }, {
  11962. "label": "镇雄县",
  11963. "value": "530627"
  11964. }, {
  11965. "label": "彝良县",
  11966. "value": "530628"
  11967. }, {
  11968. "label": "威信县",
  11969. "value": "530629"
  11970. }, {
  11971. "label": "水富县",
  11972. "value": "530630"
  11973. }], [{
  11974. "label": "古城区",
  11975. "value": "530702"
  11976. }, {
  11977. "label": "玉龙纳西族自治县",
  11978. "value": "530721"
  11979. }, {
  11980. "label": "永胜县",
  11981. "value": "530722"
  11982. }, {
  11983. "label": "华坪县",
  11984. "value": "530723"
  11985. }, {
  11986. "label": "宁蒗彝族自治县",
  11987. "value": "530724"
  11988. }], [{
  11989. "label": "思茅区",
  11990. "value": "530802"
  11991. }, {
  11992. "label": "宁洱哈尼族彝族自治县",
  11993. "value": "530821"
  11994. }, {
  11995. "label": "墨江哈尼族自治县",
  11996. "value": "530822"
  11997. }, {
  11998. "label": "景东彝族自治县",
  11999. "value": "530823"
  12000. }, {
  12001. "label": "景谷傣族彝族自治县",
  12002. "value": "530824"
  12003. }, {
  12004. "label": "镇沅彝族哈尼族拉祜族自治县",
  12005. "value": "530825"
  12006. }, {
  12007. "label": "江城哈尼族彝族自治县",
  12008. "value": "530826"
  12009. }, {
  12010. "label": "孟连傣族拉祜族佤族自治县",
  12011. "value": "530827"
  12012. }, {
  12013. "label": "澜沧拉祜族自治县",
  12014. "value": "530828"
  12015. }, {
  12016. "label": "西盟佤族自治县",
  12017. "value": "530829"
  12018. }], [{
  12019. "label": "临翔区",
  12020. "value": "530902"
  12021. }, {
  12022. "label": "凤庆县",
  12023. "value": "530921"
  12024. }, {
  12025. "label": "云县",
  12026. "value": "530922"
  12027. }, {
  12028. "label": "永德县",
  12029. "value": "530923"
  12030. }, {
  12031. "label": "镇康县",
  12032. "value": "530924"
  12033. }, {
  12034. "label": "双江拉祜族佤族布朗族傣族自治县",
  12035. "value": "530925"
  12036. }, {
  12037. "label": "耿马傣族佤族自治县",
  12038. "value": "530926"
  12039. }, {
  12040. "label": "沧源佤族自治县",
  12041. "value": "530927"
  12042. }], [{
  12043. "label": "楚雄市",
  12044. "value": "532301"
  12045. }, {
  12046. "label": "双柏县",
  12047. "value": "532322"
  12048. }, {
  12049. "label": "牟定县",
  12050. "value": "532323"
  12051. }, {
  12052. "label": "南华县",
  12053. "value": "532324"
  12054. }, {
  12055. "label": "姚安县",
  12056. "value": "532325"
  12057. }, {
  12058. "label": "大姚县",
  12059. "value": "532326"
  12060. }, {
  12061. "label": "永仁县",
  12062. "value": "532327"
  12063. }, {
  12064. "label": "元谋县",
  12065. "value": "532328"
  12066. }, {
  12067. "label": "武定县",
  12068. "value": "532329"
  12069. }, {
  12070. "label": "禄丰县",
  12071. "value": "532331"
  12072. }], [{
  12073. "label": "个旧市",
  12074. "value": "532501"
  12075. }, {
  12076. "label": "开远市",
  12077. "value": "532502"
  12078. }, {
  12079. "label": "蒙自市",
  12080. "value": "532503"
  12081. }, {
  12082. "label": "弥勒市",
  12083. "value": "532504"
  12084. }, {
  12085. "label": "屏边苗族自治县",
  12086. "value": "532523"
  12087. }, {
  12088. "label": "建水县",
  12089. "value": "532524"
  12090. }, {
  12091. "label": "石屏县",
  12092. "value": "532525"
  12093. }, {
  12094. "label": "泸西县",
  12095. "value": "532527"
  12096. }, {
  12097. "label": "元阳县",
  12098. "value": "532528"
  12099. }, {
  12100. "label": "红河县",
  12101. "value": "532529"
  12102. }, {
  12103. "label": "金平苗族瑶族傣族自治县",
  12104. "value": "532530"
  12105. }, {
  12106. "label": "绿春县",
  12107. "value": "532531"
  12108. }, {
  12109. "label": "河口瑶族自治县",
  12110. "value": "532532"
  12111. }], [{
  12112. "label": "文山市",
  12113. "value": "532601"
  12114. }, {
  12115. "label": "砚山县",
  12116. "value": "532622"
  12117. }, {
  12118. "label": "西畴县",
  12119. "value": "532623"
  12120. }, {
  12121. "label": "麻栗坡县",
  12122. "value": "532624"
  12123. }, {
  12124. "label": "马关县",
  12125. "value": "532625"
  12126. }, {
  12127. "label": "丘北县",
  12128. "value": "532626"
  12129. }, {
  12130. "label": "广南县",
  12131. "value": "532627"
  12132. }, {
  12133. "label": "富宁县",
  12134. "value": "532628"
  12135. }], [{
  12136. "label": "景洪市",
  12137. "value": "532801"
  12138. }, {
  12139. "label": "勐海县",
  12140. "value": "532822"
  12141. }, {
  12142. "label": "勐腊县",
  12143. "value": "532823"
  12144. }], [{
  12145. "label": "大理市",
  12146. "value": "532901"
  12147. }, {
  12148. "label": "漾濞彝族自治县",
  12149. "value": "532922"
  12150. }, {
  12151. "label": "祥云县",
  12152. "value": "532923"
  12153. }, {
  12154. "label": "宾川县",
  12155. "value": "532924"
  12156. }, {
  12157. "label": "弥渡县",
  12158. "value": "532925"
  12159. }, {
  12160. "label": "南涧彝族自治县",
  12161. "value": "532926"
  12162. }, {
  12163. "label": "巍山彝族回族自治县",
  12164. "value": "532927"
  12165. }, {
  12166. "label": "永平县",
  12167. "value": "532928"
  12168. }, {
  12169. "label": "云龙县",
  12170. "value": "532929"
  12171. }, {
  12172. "label": "洱源县",
  12173. "value": "532930"
  12174. }, {
  12175. "label": "剑川县",
  12176. "value": "532931"
  12177. }, {
  12178. "label": "鹤庆县",
  12179. "value": "532932"
  12180. }], [{
  12181. "label": "瑞丽市",
  12182. "value": "533102"
  12183. }, {
  12184. "label": "芒市",
  12185. "value": "533103"
  12186. }, {
  12187. "label": "梁河县",
  12188. "value": "533122"
  12189. }, {
  12190. "label": "盈江县",
  12191. "value": "533123"
  12192. }, {
  12193. "label": "陇川县",
  12194. "value": "533124"
  12195. }], [{
  12196. "label": "泸水市",
  12197. "value": "533301"
  12198. }, {
  12199. "label": "福贡县",
  12200. "value": "533323"
  12201. }, {
  12202. "label": "贡山独龙族怒族自治县",
  12203. "value": "533324"
  12204. }, {
  12205. "label": "兰坪白族普米族自治县",
  12206. "value": "533325"
  12207. }], [{
  12208. "label": "香格里拉市",
  12209. "value": "533401"
  12210. }, {
  12211. "label": "德钦县",
  12212. "value": "533422"
  12213. }, {
  12214. "label": "维西傈僳族自治县",
  12215. "value": "533423"
  12216. }]], [[{
  12217. "label": "城关区",
  12218. "value": "540102"
  12219. }, {
  12220. "label": "堆龙德庆区",
  12221. "value": "540103"
  12222. }, {
  12223. "label": "林周县",
  12224. "value": "540121"
  12225. }, {
  12226. "label": "当雄县",
  12227. "value": "540122"
  12228. }, {
  12229. "label": "尼木县",
  12230. "value": "540123"
  12231. }, {
  12232. "label": "曲水县",
  12233. "value": "540124"
  12234. }, {
  12235. "label": "达孜县",
  12236. "value": "540126"
  12237. }, {
  12238. "label": "墨竹工卡县",
  12239. "value": "540127"
  12240. }, {
  12241. "label": "格尔木藏青工业园区",
  12242. "value": "540171"
  12243. }, {
  12244. "label": "拉萨经济技术开发区",
  12245. "value": "540172"
  12246. }, {
  12247. "label": "西藏文化旅游创意园区",
  12248. "value": "540173"
  12249. }, {
  12250. "label": "达孜工业园区",
  12251. "value": "540174"
  12252. }], [{
  12253. "label": "桑珠孜区",
  12254. "value": "540202"
  12255. }, {
  12256. "label": "南木林县",
  12257. "value": "540221"
  12258. }, {
  12259. "label": "江孜县",
  12260. "value": "540222"
  12261. }, {
  12262. "label": "定日县",
  12263. "value": "540223"
  12264. }, {
  12265. "label": "萨迦县",
  12266. "value": "540224"
  12267. }, {
  12268. "label": "拉孜县",
  12269. "value": "540225"
  12270. }, {
  12271. "label": "昂仁县",
  12272. "value": "540226"
  12273. }, {
  12274. "label": "谢通门县",
  12275. "value": "540227"
  12276. }, {
  12277. "label": "白朗县",
  12278. "value": "540228"
  12279. }, {
  12280. "label": "仁布县",
  12281. "value": "540229"
  12282. }, {
  12283. "label": "康马县",
  12284. "value": "540230"
  12285. }, {
  12286. "label": "定结县",
  12287. "value": "540231"
  12288. }, {
  12289. "label": "仲巴县",
  12290. "value": "540232"
  12291. }, {
  12292. "label": "亚东县",
  12293. "value": "540233"
  12294. }, {
  12295. "label": "吉隆县",
  12296. "value": "540234"
  12297. }, {
  12298. "label": "聂拉木县",
  12299. "value": "540235"
  12300. }, {
  12301. "label": "萨嘎县",
  12302. "value": "540236"
  12303. }, {
  12304. "label": "岗巴县",
  12305. "value": "540237"
  12306. }], [{
  12307. "label": "卡若区",
  12308. "value": "540302"
  12309. }, {
  12310. "label": "江达县",
  12311. "value": "540321"
  12312. }, {
  12313. "label": "贡觉县",
  12314. "value": "540322"
  12315. }, {
  12316. "label": "类乌齐县",
  12317. "value": "540323"
  12318. }, {
  12319. "label": "丁青县",
  12320. "value": "540324"
  12321. }, {
  12322. "label": "察雅县",
  12323. "value": "540325"
  12324. }, {
  12325. "label": "八宿县",
  12326. "value": "540326"
  12327. }, {
  12328. "label": "左贡县",
  12329. "value": "540327"
  12330. }, {
  12331. "label": "芒康县",
  12332. "value": "540328"
  12333. }, {
  12334. "label": "洛隆县",
  12335. "value": "540329"
  12336. }, {
  12337. "label": "边坝县",
  12338. "value": "540330"
  12339. }], [{
  12340. "label": "巴宜区",
  12341. "value": "540402"
  12342. }, {
  12343. "label": "工布江达县",
  12344. "value": "540421"
  12345. }, {
  12346. "label": "米林县",
  12347. "value": "540422"
  12348. }, {
  12349. "label": "墨脱县",
  12350. "value": "540423"
  12351. }, {
  12352. "label": "波密县",
  12353. "value": "540424"
  12354. }, {
  12355. "label": "察隅县",
  12356. "value": "540425"
  12357. }, {
  12358. "label": "朗县",
  12359. "value": "540426"
  12360. }], [{
  12361. "label": "乃东区",
  12362. "value": "540502"
  12363. }, {
  12364. "label": "扎囊县",
  12365. "value": "540521"
  12366. }, {
  12367. "label": "贡嘎县",
  12368. "value": "540522"
  12369. }, {
  12370. "label": "桑日县",
  12371. "value": "540523"
  12372. }, {
  12373. "label": "琼结县",
  12374. "value": "540524"
  12375. }, {
  12376. "label": "曲松县",
  12377. "value": "540525"
  12378. }, {
  12379. "label": "措美县",
  12380. "value": "540526"
  12381. }, {
  12382. "label": "洛扎县",
  12383. "value": "540527"
  12384. }, {
  12385. "label": "加查县",
  12386. "value": "540528"
  12387. }, {
  12388. "label": "隆子县",
  12389. "value": "540529"
  12390. }, {
  12391. "label": "错那县",
  12392. "value": "540530"
  12393. }, {
  12394. "label": "浪卡子县",
  12395. "value": "540531"
  12396. }], [{
  12397. "label": "那曲县",
  12398. "value": "542421"
  12399. }, {
  12400. "label": "嘉黎县",
  12401. "value": "542422"
  12402. }, {
  12403. "label": "比如县",
  12404. "value": "542423"
  12405. }, {
  12406. "label": "聂荣县",
  12407. "value": "542424"
  12408. }, {
  12409. "label": "安多县",
  12410. "value": "542425"
  12411. }, {
  12412. "label": "申扎县",
  12413. "value": "542426"
  12414. }, {
  12415. "label": "索县",
  12416. "value": "542427"
  12417. }, {
  12418. "label": "班戈县",
  12419. "value": "542428"
  12420. }, {
  12421. "label": "巴青县",
  12422. "value": "542429"
  12423. }, {
  12424. "label": "尼玛县",
  12425. "value": "542430"
  12426. }, {
  12427. "label": "双湖县",
  12428. "value": "542431"
  12429. }], [{
  12430. "label": "普兰县",
  12431. "value": "542521"
  12432. }, {
  12433. "label": "札达县",
  12434. "value": "542522"
  12435. }, {
  12436. "label": "噶尔县",
  12437. "value": "542523"
  12438. }, {
  12439. "label": "日土县",
  12440. "value": "542524"
  12441. }, {
  12442. "label": "革吉县",
  12443. "value": "542525"
  12444. }, {
  12445. "label": "改则县",
  12446. "value": "542526"
  12447. }, {
  12448. "label": "措勤县",
  12449. "value": "542527"
  12450. }]], [[{
  12451. "label": "新城区",
  12452. "value": "610102"
  12453. }, {
  12454. "label": "碑林区",
  12455. "value": "610103"
  12456. }, {
  12457. "label": "莲湖区",
  12458. "value": "610104"
  12459. }, {
  12460. "label": "灞桥区",
  12461. "value": "610111"
  12462. }, {
  12463. "label": "未央区",
  12464. "value": "610112"
  12465. }, {
  12466. "label": "雁塔区",
  12467. "value": "610113"
  12468. }, {
  12469. "label": "阎良区",
  12470. "value": "610114"
  12471. }, {
  12472. "label": "临潼区",
  12473. "value": "610115"
  12474. }, {
  12475. "label": "长安区",
  12476. "value": "610116"
  12477. }, {
  12478. "label": "高陵区",
  12479. "value": "610117"
  12480. }, {
  12481. "label": "鄠邑区",
  12482. "value": "610118"
  12483. }, {
  12484. "label": "蓝田县",
  12485. "value": "610122"
  12486. }, {
  12487. "label": "周至县",
  12488. "value": "610124"
  12489. }], [{
  12490. "label": "王益区",
  12491. "value": "610202"
  12492. }, {
  12493. "label": "印台区",
  12494. "value": "610203"
  12495. }, {
  12496. "label": "耀州区",
  12497. "value": "610204"
  12498. }, {
  12499. "label": "宜君县",
  12500. "value": "610222"
  12501. }], [{
  12502. "label": "渭滨区",
  12503. "value": "610302"
  12504. }, {
  12505. "label": "金台区",
  12506. "value": "610303"
  12507. }, {
  12508. "label": "陈仓区",
  12509. "value": "610304"
  12510. }, {
  12511. "label": "凤翔县",
  12512. "value": "610322"
  12513. }, {
  12514. "label": "岐山县",
  12515. "value": "610323"
  12516. }, {
  12517. "label": "扶风县",
  12518. "value": "610324"
  12519. }, {
  12520. "label": "眉县",
  12521. "value": "610326"
  12522. }, {
  12523. "label": "陇县",
  12524. "value": "610327"
  12525. }, {
  12526. "label": "千阳县",
  12527. "value": "610328"
  12528. }, {
  12529. "label": "麟游县",
  12530. "value": "610329"
  12531. }, {
  12532. "label": "凤县",
  12533. "value": "610330"
  12534. }, {
  12535. "label": "太白县",
  12536. "value": "610331"
  12537. }], [{
  12538. "label": "秦都区",
  12539. "value": "610402"
  12540. }, {
  12541. "label": "杨陵区",
  12542. "value": "610403"
  12543. }, {
  12544. "label": "渭城区",
  12545. "value": "610404"
  12546. }, {
  12547. "label": "三原县",
  12548. "value": "610422"
  12549. }, {
  12550. "label": "泾阳县",
  12551. "value": "610423"
  12552. }, {
  12553. "label": "乾县",
  12554. "value": "610424"
  12555. }, {
  12556. "label": "礼泉县",
  12557. "value": "610425"
  12558. }, {
  12559. "label": "永寿县",
  12560. "value": "610426"
  12561. }, {
  12562. "label": "彬县",
  12563. "value": "610427"
  12564. }, {
  12565. "label": "长武县",
  12566. "value": "610428"
  12567. }, {
  12568. "label": "旬邑县",
  12569. "value": "610429"
  12570. }, {
  12571. "label": "淳化县",
  12572. "value": "610430"
  12573. }, {
  12574. "label": "武功县",
  12575. "value": "610431"
  12576. }, {
  12577. "label": "兴平市",
  12578. "value": "610481"
  12579. }], [{
  12580. "label": "临渭区",
  12581. "value": "610502"
  12582. }, {
  12583. "label": "华州区",
  12584. "value": "610503"
  12585. }, {
  12586. "label": "潼关县",
  12587. "value": "610522"
  12588. }, {
  12589. "label": "大荔县",
  12590. "value": "610523"
  12591. }, {
  12592. "label": "合阳县",
  12593. "value": "610524"
  12594. }, {
  12595. "label": "澄城县",
  12596. "value": "610525"
  12597. }, {
  12598. "label": "蒲城县",
  12599. "value": "610526"
  12600. }, {
  12601. "label": "白水县",
  12602. "value": "610527"
  12603. }, {
  12604. "label": "富平县",
  12605. "value": "610528"
  12606. }, {
  12607. "label": "韩城市",
  12608. "value": "610581"
  12609. }, {
  12610. "label": "华阴市",
  12611. "value": "610582"
  12612. }], [{
  12613. "label": "宝塔区",
  12614. "value": "610602"
  12615. }, {
  12616. "label": "安塞区",
  12617. "value": "610603"
  12618. }, {
  12619. "label": "延长县",
  12620. "value": "610621"
  12621. }, {
  12622. "label": "延川县",
  12623. "value": "610622"
  12624. }, {
  12625. "label": "子长县",
  12626. "value": "610623"
  12627. }, {
  12628. "label": "志丹县",
  12629. "value": "610625"
  12630. }, {
  12631. "label": "吴起县",
  12632. "value": "610626"
  12633. }, {
  12634. "label": "甘泉县",
  12635. "value": "610627"
  12636. }, {
  12637. "label": "富县",
  12638. "value": "610628"
  12639. }, {
  12640. "label": "洛川县",
  12641. "value": "610629"
  12642. }, {
  12643. "label": "宜川县",
  12644. "value": "610630"
  12645. }, {
  12646. "label": "黄龙县",
  12647. "value": "610631"
  12648. }, {
  12649. "label": "黄陵县",
  12650. "value": "610632"
  12651. }], [{
  12652. "label": "汉台区",
  12653. "value": "610702"
  12654. }, {
  12655. "label": "南郑区",
  12656. "value": "610703"
  12657. }, {
  12658. "label": "城固县",
  12659. "value": "610722"
  12660. }, {
  12661. "label": "洋县",
  12662. "value": "610723"
  12663. }, {
  12664. "label": "西乡县",
  12665. "value": "610724"
  12666. }, {
  12667. "label": "勉县",
  12668. "value": "610725"
  12669. }, {
  12670. "label": "宁强县",
  12671. "value": "610726"
  12672. }, {
  12673. "label": "略阳县",
  12674. "value": "610727"
  12675. }, {
  12676. "label": "镇巴县",
  12677. "value": "610728"
  12678. }, {
  12679. "label": "留坝县",
  12680. "value": "610729"
  12681. }, {
  12682. "label": "佛坪县",
  12683. "value": "610730"
  12684. }], [{
  12685. "label": "榆阳区",
  12686. "value": "610802"
  12687. }, {
  12688. "label": "横山区",
  12689. "value": "610803"
  12690. }, {
  12691. "label": "府谷县",
  12692. "value": "610822"
  12693. }, {
  12694. "label": "靖边县",
  12695. "value": "610824"
  12696. }, {
  12697. "label": "定边县",
  12698. "value": "610825"
  12699. }, {
  12700. "label": "绥德县",
  12701. "value": "610826"
  12702. }, {
  12703. "label": "米脂县",
  12704. "value": "610827"
  12705. }, {
  12706. "label": "佳县",
  12707. "value": "610828"
  12708. }, {
  12709. "label": "吴堡县",
  12710. "value": "610829"
  12711. }, {
  12712. "label": "清涧县",
  12713. "value": "610830"
  12714. }, {
  12715. "label": "子洲县",
  12716. "value": "610831"
  12717. }, {
  12718. "label": "神木市",
  12719. "value": "610881"
  12720. }], [{
  12721. "label": "汉滨区",
  12722. "value": "610902"
  12723. }, {
  12724. "label": "汉阴县",
  12725. "value": "610921"
  12726. }, {
  12727. "label": "石泉县",
  12728. "value": "610922"
  12729. }, {
  12730. "label": "宁陕县",
  12731. "value": "610923"
  12732. }, {
  12733. "label": "紫阳县",
  12734. "value": "610924"
  12735. }, {
  12736. "label": "岚皋县",
  12737. "value": "610925"
  12738. }, {
  12739. "label": "平利县",
  12740. "value": "610926"
  12741. }, {
  12742. "label": "镇坪县",
  12743. "value": "610927"
  12744. }, {
  12745. "label": "旬阳县",
  12746. "value": "610928"
  12747. }, {
  12748. "label": "白河县",
  12749. "value": "610929"
  12750. }], [{
  12751. "label": "商州区",
  12752. "value": "611002"
  12753. }, {
  12754. "label": "洛南县",
  12755. "value": "611021"
  12756. }, {
  12757. "label": "丹凤县",
  12758. "value": "611022"
  12759. }, {
  12760. "label": "商南县",
  12761. "value": "611023"
  12762. }, {
  12763. "label": "山阳县",
  12764. "value": "611024"
  12765. }, {
  12766. "label": "镇安县",
  12767. "value": "611025"
  12768. }, {
  12769. "label": "柞水县",
  12770. "value": "611026"
  12771. }]], [[{
  12772. "label": "城关区",
  12773. "value": "620102"
  12774. }, {
  12775. "label": "七里河区",
  12776. "value": "620103"
  12777. }, {
  12778. "label": "西固区",
  12779. "value": "620104"
  12780. }, {
  12781. "label": "安宁区",
  12782. "value": "620105"
  12783. }, {
  12784. "label": "红古区",
  12785. "value": "620111"
  12786. }, {
  12787. "label": "永登县",
  12788. "value": "620121"
  12789. }, {
  12790. "label": "皋兰县",
  12791. "value": "620122"
  12792. }, {
  12793. "label": "榆中县",
  12794. "value": "620123"
  12795. }, {
  12796. "label": "兰州新区",
  12797. "value": "620171"
  12798. }], [{
  12799. "label": "嘉峪关市",
  12800. "value": "620201"
  12801. }], [{
  12802. "label": "金川区",
  12803. "value": "620302"
  12804. }, {
  12805. "label": "永昌县",
  12806. "value": "620321"
  12807. }], [{
  12808. "label": "白银区",
  12809. "value": "620402"
  12810. }, {
  12811. "label": "平川区",
  12812. "value": "620403"
  12813. }, {
  12814. "label": "靖远县",
  12815. "value": "620421"
  12816. }, {
  12817. "label": "会宁县",
  12818. "value": "620422"
  12819. }, {
  12820. "label": "景泰县",
  12821. "value": "620423"
  12822. }], [{
  12823. "label": "秦州区",
  12824. "value": "620502"
  12825. }, {
  12826. "label": "麦积区",
  12827. "value": "620503"
  12828. }, {
  12829. "label": "清水县",
  12830. "value": "620521"
  12831. }, {
  12832. "label": "秦安县",
  12833. "value": "620522"
  12834. }, {
  12835. "label": "甘谷县",
  12836. "value": "620523"
  12837. }, {
  12838. "label": "武山县",
  12839. "value": "620524"
  12840. }, {
  12841. "label": "张家川回族自治县",
  12842. "value": "620525"
  12843. }], [{
  12844. "label": "凉州区",
  12845. "value": "620602"
  12846. }, {
  12847. "label": "民勤县",
  12848. "value": "620621"
  12849. }, {
  12850. "label": "古浪县",
  12851. "value": "620622"
  12852. }, {
  12853. "label": "天祝藏族自治县",
  12854. "value": "620623"
  12855. }], [{
  12856. "label": "甘州区",
  12857. "value": "620702"
  12858. }, {
  12859. "label": "肃南裕固族自治县",
  12860. "value": "620721"
  12861. }, {
  12862. "label": "民乐县",
  12863. "value": "620722"
  12864. }, {
  12865. "label": "临泽县",
  12866. "value": "620723"
  12867. }, {
  12868. "label": "高台县",
  12869. "value": "620724"
  12870. }, {
  12871. "label": "山丹县",
  12872. "value": "620725"
  12873. }], [{
  12874. "label": "崆峒区",
  12875. "value": "620802"
  12876. }, {
  12877. "label": "泾川县",
  12878. "value": "620821"
  12879. }, {
  12880. "label": "灵台县",
  12881. "value": "620822"
  12882. }, {
  12883. "label": "崇信县",
  12884. "value": "620823"
  12885. }, {
  12886. "label": "华亭县",
  12887. "value": "620824"
  12888. }, {
  12889. "label": "庄浪县",
  12890. "value": "620825"
  12891. }, {
  12892. "label": "静宁县",
  12893. "value": "620826"
  12894. }, {
  12895. "label": "平凉工业园区",
  12896. "value": "620871"
  12897. }], [{
  12898. "label": "肃州区",
  12899. "value": "620902"
  12900. }, {
  12901. "label": "金塔县",
  12902. "value": "620921"
  12903. }, {
  12904. "label": "瓜州县",
  12905. "value": "620922"
  12906. }, {
  12907. "label": "肃北蒙古族自治县",
  12908. "value": "620923"
  12909. }, {
  12910. "label": "阿克塞哈萨克族自治县",
  12911. "value": "620924"
  12912. }, {
  12913. "label": "玉门市",
  12914. "value": "620981"
  12915. }, {
  12916. "label": "敦煌市",
  12917. "value": "620982"
  12918. }], [{
  12919. "label": "西峰区",
  12920. "value": "621002"
  12921. }, {
  12922. "label": "庆城县",
  12923. "value": "621021"
  12924. }, {
  12925. "label": "环县",
  12926. "value": "621022"
  12927. }, {
  12928. "label": "华池县",
  12929. "value": "621023"
  12930. }, {
  12931. "label": "合水县",
  12932. "value": "621024"
  12933. }, {
  12934. "label": "正宁县",
  12935. "value": "621025"
  12936. }, {
  12937. "label": "宁县",
  12938. "value": "621026"
  12939. }, {
  12940. "label": "镇原县",
  12941. "value": "621027"
  12942. }], [{
  12943. "label": "安定区",
  12944. "value": "621102"
  12945. }, {
  12946. "label": "通渭县",
  12947. "value": "621121"
  12948. }, {
  12949. "label": "陇西县",
  12950. "value": "621122"
  12951. }, {
  12952. "label": "渭源县",
  12953. "value": "621123"
  12954. }, {
  12955. "label": "临洮县",
  12956. "value": "621124"
  12957. }, {
  12958. "label": "漳县",
  12959. "value": "621125"
  12960. }, {
  12961. "label": "岷县",
  12962. "value": "621126"
  12963. }], [{
  12964. "label": "武都区",
  12965. "value": "621202"
  12966. }, {
  12967. "label": "成县",
  12968. "value": "621221"
  12969. }, {
  12970. "label": "文县",
  12971. "value": "621222"
  12972. }, {
  12973. "label": "宕昌县",
  12974. "value": "621223"
  12975. }, {
  12976. "label": "康县",
  12977. "value": "621224"
  12978. }, {
  12979. "label": "西和县",
  12980. "value": "621225"
  12981. }, {
  12982. "label": "礼县",
  12983. "value": "621226"
  12984. }, {
  12985. "label": "徽县",
  12986. "value": "621227"
  12987. }, {
  12988. "label": "两当县",
  12989. "value": "621228"
  12990. }], [{
  12991. "label": "临夏市",
  12992. "value": "622901"
  12993. }, {
  12994. "label": "临夏县",
  12995. "value": "622921"
  12996. }, {
  12997. "label": "康乐县",
  12998. "value": "622922"
  12999. }, {
  13000. "label": "永靖县",
  13001. "value": "622923"
  13002. }, {
  13003. "label": "广河县",
  13004. "value": "622924"
  13005. }, {
  13006. "label": "和政县",
  13007. "value": "622925"
  13008. }, {
  13009. "label": "东乡族自治县",
  13010. "value": "622926"
  13011. }, {
  13012. "label": "积石山保安族东乡族撒拉族自治县",
  13013. "value": "622927"
  13014. }], [{
  13015. "label": "合作市",
  13016. "value": "623001"
  13017. }, {
  13018. "label": "临潭县",
  13019. "value": "623021"
  13020. }, {
  13021. "label": "卓尼县",
  13022. "value": "623022"
  13023. }, {
  13024. "label": "舟曲县",
  13025. "value": "623023"
  13026. }, {
  13027. "label": "迭部县",
  13028. "value": "623024"
  13029. }, {
  13030. "label": "玛曲县",
  13031. "value": "623025"
  13032. }, {
  13033. "label": "碌曲县",
  13034. "value": "623026"
  13035. }, {
  13036. "label": "夏河县",
  13037. "value": "623027"
  13038. }]], [[{
  13039. "label": "城东区",
  13040. "value": "630102"
  13041. }, {
  13042. "label": "城中区",
  13043. "value": "630103"
  13044. }, {
  13045. "label": "城西区",
  13046. "value": "630104"
  13047. }, {
  13048. "label": "城北区",
  13049. "value": "630105"
  13050. }, {
  13051. "label": "大通回族土族自治县",
  13052. "value": "630121"
  13053. }, {
  13054. "label": "湟中县",
  13055. "value": "630122"
  13056. }, {
  13057. "label": "湟源县",
  13058. "value": "630123"
  13059. }], [{
  13060. "label": "乐都区",
  13061. "value": "630202"
  13062. }, {
  13063. "label": "平安区",
  13064. "value": "630203"
  13065. }, {
  13066. "label": "民和回族土族自治县",
  13067. "value": "630222"
  13068. }, {
  13069. "label": "互助土族自治县",
  13070. "value": "630223"
  13071. }, {
  13072. "label": "化隆回族自治县",
  13073. "value": "630224"
  13074. }, {
  13075. "label": "循化撒拉族自治县",
  13076. "value": "630225"
  13077. }], [{
  13078. "label": "门源回族自治县",
  13079. "value": "632221"
  13080. }, {
  13081. "label": "祁连县",
  13082. "value": "632222"
  13083. }, {
  13084. "label": "海晏县",
  13085. "value": "632223"
  13086. }, {
  13087. "label": "刚察县",
  13088. "value": "632224"
  13089. }], [{
  13090. "label": "同仁县",
  13091. "value": "632321"
  13092. }, {
  13093. "label": "尖扎县",
  13094. "value": "632322"
  13095. }, {
  13096. "label": "泽库县",
  13097. "value": "632323"
  13098. }, {
  13099. "label": "河南蒙古族自治县",
  13100. "value": "632324"
  13101. }], [{
  13102. "label": "共和县",
  13103. "value": "632521"
  13104. }, {
  13105. "label": "同德县",
  13106. "value": "632522"
  13107. }, {
  13108. "label": "贵德县",
  13109. "value": "632523"
  13110. }, {
  13111. "label": "兴海县",
  13112. "value": "632524"
  13113. }, {
  13114. "label": "贵南县",
  13115. "value": "632525"
  13116. }], [{
  13117. "label": "玛沁县",
  13118. "value": "632621"
  13119. }, {
  13120. "label": "班玛县",
  13121. "value": "632622"
  13122. }, {
  13123. "label": "甘德县",
  13124. "value": "632623"
  13125. }, {
  13126. "label": "达日县",
  13127. "value": "632624"
  13128. }, {
  13129. "label": "久治县",
  13130. "value": "632625"
  13131. }, {
  13132. "label": "玛多县",
  13133. "value": "632626"
  13134. }], [{
  13135. "label": "玉树市",
  13136. "value": "632701"
  13137. }, {
  13138. "label": "杂多县",
  13139. "value": "632722"
  13140. }, {
  13141. "label": "称多县",
  13142. "value": "632723"
  13143. }, {
  13144. "label": "治多县",
  13145. "value": "632724"
  13146. }, {
  13147. "label": "囊谦县",
  13148. "value": "632725"
  13149. }, {
  13150. "label": "曲麻莱县",
  13151. "value": "632726"
  13152. }], [{
  13153. "label": "格尔木市",
  13154. "value": "632801"
  13155. }, {
  13156. "label": "德令哈市",
  13157. "value": "632802"
  13158. }, {
  13159. "label": "乌兰县",
  13160. "value": "632821"
  13161. }, {
  13162. "label": "都兰县",
  13163. "value": "632822"
  13164. }, {
  13165. "label": "天峻县",
  13166. "value": "632823"
  13167. }, {
  13168. "label": "大柴旦行政委员会",
  13169. "value": "632857"
  13170. }, {
  13171. "label": "冷湖行政委员会",
  13172. "value": "632858"
  13173. }, {
  13174. "label": "茫崖行政委员会",
  13175. "value": "632859"
  13176. }]], [[{
  13177. "label": "兴庆区",
  13178. "value": "640104"
  13179. }, {
  13180. "label": "西夏区",
  13181. "value": "640105"
  13182. }, {
  13183. "label": "金凤区",
  13184. "value": "640106"
  13185. }, {
  13186. "label": "永宁县",
  13187. "value": "640121"
  13188. }, {
  13189. "label": "贺兰县",
  13190. "value": "640122"
  13191. }, {
  13192. "label": "灵武市",
  13193. "value": "640181"
  13194. }], [{
  13195. "label": "大武口区",
  13196. "value": "640202"
  13197. }, {
  13198. "label": "惠农区",
  13199. "value": "640205"
  13200. }, {
  13201. "label": "平罗县",
  13202. "value": "640221"
  13203. }], [{
  13204. "label": "利通区",
  13205. "value": "640302"
  13206. }, {
  13207. "label": "红寺堡区",
  13208. "value": "640303"
  13209. }, {
  13210. "label": "盐池县",
  13211. "value": "640323"
  13212. }, {
  13213. "label": "同心县",
  13214. "value": "640324"
  13215. }, {
  13216. "label": "青铜峡市",
  13217. "value": "640381"
  13218. }], [{
  13219. "label": "原州区",
  13220. "value": "640402"
  13221. }, {
  13222. "label": "西吉县",
  13223. "value": "640422"
  13224. }, {
  13225. "label": "隆德县",
  13226. "value": "640423"
  13227. }, {
  13228. "label": "泾源县",
  13229. "value": "640424"
  13230. }, {
  13231. "label": "彭阳县",
  13232. "value": "640425"
  13233. }], [{
  13234. "label": "沙坡头区",
  13235. "value": "640502"
  13236. }, {
  13237. "label": "中宁县",
  13238. "value": "640521"
  13239. }, {
  13240. "label": "海原县",
  13241. "value": "640522"
  13242. }]], [[{
  13243. "label": "天山区",
  13244. "value": "650102"
  13245. }, {
  13246. "label": "沙依巴克区",
  13247. "value": "650103"
  13248. }, {
  13249. "label": "新市区",
  13250. "value": "650104"
  13251. }, {
  13252. "label": "水磨沟区",
  13253. "value": "650105"
  13254. }, {
  13255. "label": "头屯河区",
  13256. "value": "650106"
  13257. }, {
  13258. "label": "达坂城区",
  13259. "value": "650107"
  13260. }, {
  13261. "label": "米东区",
  13262. "value": "650109"
  13263. }, {
  13264. "label": "乌鲁木齐县",
  13265. "value": "650121"
  13266. }, {
  13267. "label": "乌鲁木齐经济技术开发区",
  13268. "value": "650171"
  13269. }, {
  13270. "label": "乌鲁木齐高新技术产业开发区",
  13271. "value": "650172"
  13272. }], [{
  13273. "label": "独山子区",
  13274. "value": "650202"
  13275. }, {
  13276. "label": "克拉玛依区",
  13277. "value": "650203"
  13278. }, {
  13279. "label": "白碱滩区",
  13280. "value": "650204"
  13281. }, {
  13282. "label": "乌尔禾区",
  13283. "value": "650205"
  13284. }], [{
  13285. "label": "高昌区",
  13286. "value": "650402"
  13287. }, {
  13288. "label": "鄯善县",
  13289. "value": "650421"
  13290. }, {
  13291. "label": "托克逊县",
  13292. "value": "650422"
  13293. }], [{
  13294. "label": "伊州区",
  13295. "value": "650502"
  13296. }, {
  13297. "label": "巴里坤哈萨克自治县",
  13298. "value": "650521"
  13299. }, {
  13300. "label": "伊吾县",
  13301. "value": "650522"
  13302. }], [{
  13303. "label": "昌吉市",
  13304. "value": "652301"
  13305. }, {
  13306. "label": "阜康市",
  13307. "value": "652302"
  13308. }, {
  13309. "label": "呼图壁县",
  13310. "value": "652323"
  13311. }, {
  13312. "label": "玛纳斯县",
  13313. "value": "652324"
  13314. }, {
  13315. "label": "奇台县",
  13316. "value": "652325"
  13317. }, {
  13318. "label": "吉木萨尔县",
  13319. "value": "652327"
  13320. }, {
  13321. "label": "木垒哈萨克自治县",
  13322. "value": "652328"
  13323. }], [{
  13324. "label": "博乐市",
  13325. "value": "652701"
  13326. }, {
  13327. "label": "阿拉山口市",
  13328. "value": "652702"
  13329. }, {
  13330. "label": "精河县",
  13331. "value": "652722"
  13332. }, {
  13333. "label": "温泉县",
  13334. "value": "652723"
  13335. }], [{
  13336. "label": "库尔勒市",
  13337. "value": "652801"
  13338. }, {
  13339. "label": "轮台县",
  13340. "value": "652822"
  13341. }, {
  13342. "label": "尉犁县",
  13343. "value": "652823"
  13344. }, {
  13345. "label": "若羌县",
  13346. "value": "652824"
  13347. }, {
  13348. "label": "且末县",
  13349. "value": "652825"
  13350. }, {
  13351. "label": "焉耆回族自治县",
  13352. "value": "652826"
  13353. }, {
  13354. "label": "和静县",
  13355. "value": "652827"
  13356. }, {
  13357. "label": "和硕县",
  13358. "value": "652828"
  13359. }, {
  13360. "label": "博湖县",
  13361. "value": "652829"
  13362. }, {
  13363. "label": "库尔勒经济技术开发区",
  13364. "value": "652871"
  13365. }], [{
  13366. "label": "阿克苏市",
  13367. "value": "652901"
  13368. }, {
  13369. "label": "温宿县",
  13370. "value": "652922"
  13371. }, {
  13372. "label": "库车县",
  13373. "value": "652923"
  13374. }, {
  13375. "label": "沙雅县",
  13376. "value": "652924"
  13377. }, {
  13378. "label": "新和县",
  13379. "value": "652925"
  13380. }, {
  13381. "label": "拜城县",
  13382. "value": "652926"
  13383. }, {
  13384. "label": "乌什县",
  13385. "value": "652927"
  13386. }, {
  13387. "label": "阿瓦提县",
  13388. "value": "652928"
  13389. }, {
  13390. "label": "柯坪县",
  13391. "value": "652929"
  13392. }], [{
  13393. "label": "阿图什市",
  13394. "value": "653001"
  13395. }, {
  13396. "label": "阿克陶县",
  13397. "value": "653022"
  13398. }, {
  13399. "label": "阿合奇县",
  13400. "value": "653023"
  13401. }, {
  13402. "label": "乌恰县",
  13403. "value": "653024"
  13404. }], [{
  13405. "label": "喀什市",
  13406. "value": "653101"
  13407. }, {
  13408. "label": "疏附县",
  13409. "value": "653121"
  13410. }, {
  13411. "label": "疏勒县",
  13412. "value": "653122"
  13413. }, {
  13414. "label": "英吉沙县",
  13415. "value": "653123"
  13416. }, {
  13417. "label": "泽普县",
  13418. "value": "653124"
  13419. }, {
  13420. "label": "莎车县",
  13421. "value": "653125"
  13422. }, {
  13423. "label": "叶城县",
  13424. "value": "653126"
  13425. }, {
  13426. "label": "麦盖提县",
  13427. "value": "653127"
  13428. }, {
  13429. "label": "岳普湖县",
  13430. "value": "653128"
  13431. }, {
  13432. "label": "伽师县",
  13433. "value": "653129"
  13434. }, {
  13435. "label": "巴楚县",
  13436. "value": "653130"
  13437. }, {
  13438. "label": "塔什库尔干塔吉克自治县",
  13439. "value": "653131"
  13440. }], [{
  13441. "label": "和田市",
  13442. "value": "653201"
  13443. }, {
  13444. "label": "和田县",
  13445. "value": "653221"
  13446. }, {
  13447. "label": "墨玉县",
  13448. "value": "653222"
  13449. }, {
  13450. "label": "皮山县",
  13451. "value": "653223"
  13452. }, {
  13453. "label": "洛浦县",
  13454. "value": "653224"
  13455. }, {
  13456. "label": "策勒县",
  13457. "value": "653225"
  13458. }, {
  13459. "label": "于田县",
  13460. "value": "653226"
  13461. }, {
  13462. "label": "民丰县",
  13463. "value": "653227"
  13464. }], [{
  13465. "label": "伊宁市",
  13466. "value": "654002"
  13467. }, {
  13468. "label": "奎屯市",
  13469. "value": "654003"
  13470. }, {
  13471. "label": "霍尔果斯市",
  13472. "value": "654004"
  13473. }, {
  13474. "label": "伊宁县",
  13475. "value": "654021"
  13476. }, {
  13477. "label": "察布查尔锡伯自治县",
  13478. "value": "654022"
  13479. }, {
  13480. "label": "霍城县",
  13481. "value": "654023"
  13482. }, {
  13483. "label": "巩留县",
  13484. "value": "654024"
  13485. }, {
  13486. "label": "新源县",
  13487. "value": "654025"
  13488. }, {
  13489. "label": "昭苏县",
  13490. "value": "654026"
  13491. }, {
  13492. "label": "特克斯县",
  13493. "value": "654027"
  13494. }, {
  13495. "label": "尼勒克县",
  13496. "value": "654028"
  13497. }], [{
  13498. "label": "塔城市",
  13499. "value": "654201"
  13500. }, {
  13501. "label": "乌苏市",
  13502. "value": "654202"
  13503. }, {
  13504. "label": "额敏县",
  13505. "value": "654221"
  13506. }, {
  13507. "label": "沙湾县",
  13508. "value": "654223"
  13509. }, {
  13510. "label": "托里县",
  13511. "value": "654224"
  13512. }, {
  13513. "label": "裕民县",
  13514. "value": "654225"
  13515. }, {
  13516. "label": "和布克赛尔蒙古自治县",
  13517. "value": "654226"
  13518. }], [{
  13519. "label": "阿勒泰市",
  13520. "value": "654301"
  13521. }, {
  13522. "label": "布尔津县",
  13523. "value": "654321"
  13524. }, {
  13525. "label": "富蕴县",
  13526. "value": "654322"
  13527. }, {
  13528. "label": "福海县",
  13529. "value": "654323"
  13530. }, {
  13531. "label": "哈巴河县",
  13532. "value": "654324"
  13533. }, {
  13534. "label": "青河县",
  13535. "value": "654325"
  13536. }, {
  13537. "label": "吉木乃县",
  13538. "value": "654326"
  13539. }], [{
  13540. "label": "石河子市",
  13541. "value": "659001"
  13542. }, {
  13543. "label": "阿拉尔市",
  13544. "value": "659002"
  13545. }, {
  13546. "label": "图木舒克市",
  13547. "value": "659003"
  13548. }, {
  13549. "label": "五家渠市",
  13550. "value": "659004"
  13551. }, {
  13552. "label": "铁门关市",
  13553. "value": "659006"
  13554. }]], [[{
  13555. "label": "台北",
  13556. "value": "660101"
  13557. }], [{
  13558. "label": "高雄",
  13559. "value": "660201"
  13560. }], [{
  13561. "label": "基隆",
  13562. "value": "660301"
  13563. }], [{
  13564. "label": "台中",
  13565. "value": "660401"
  13566. }], [{
  13567. "label": "台南",
  13568. "value": "660501"
  13569. }], [{
  13570. "label": "新竹",
  13571. "value": "660601"
  13572. }], [{
  13573. "label": "嘉义",
  13574. "value": "660701"
  13575. }], [{
  13576. "label": "宜兰",
  13577. "value": "660801"
  13578. }], [{
  13579. "label": "桃园",
  13580. "value": "660901"
  13581. }], [{
  13582. "label": "苗栗",
  13583. "value": "661001"
  13584. }], [{
  13585. "label": "彰化",
  13586. "value": "661101"
  13587. }], [{
  13588. "label": "南投",
  13589. "value": "661201"
  13590. }], [{
  13591. "label": "云林",
  13592. "value": "661301"
  13593. }], [{
  13594. "label": "屏东",
  13595. "value": "661401"
  13596. }], [{
  13597. "label": "台东",
  13598. "value": "661501"
  13599. }], [{
  13600. "label": "花莲",
  13601. "value": "661601"
  13602. }], [{
  13603. "label": "澎湖",
  13604. "value": "661701"
  13605. }]], [[{
  13606. "label": "香港岛",
  13607. "value": "670101"
  13608. }], [{
  13609. "label": "九龙",
  13610. "value": "670201"
  13611. }], [{
  13612. "label": "新界",
  13613. "value": "670301"
  13614. }]], [[{
  13615. "label": "澳门半岛",
  13616. "value": "680101"
  13617. }], [{
  13618. "label": "氹仔岛",
  13619. "value": "680201"
  13620. }], [{
  13621. "label": "路环岛",
  13622. "value": "680301"
  13623. }], [{
  13624. "label": "路氹城",
  13625. "value": "680401"
  13626. }]]];
  13627. var _default = areaData;
  13628. exports.default = _default;
  13629. /***/ }),
  13630. /***/ 113:
  13631. /*!*****************************************************************!*\
  13632. !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***!
  13633. \*****************************************************************/
  13634. /*! no static exports found */
  13635. /***/ (function(module, exports, __webpack_require__) {
  13636. "use strict";
  13637. // Copyright Joyent, Inc. and other Node contributors.
  13638. //
  13639. // Permission is hereby granted, free of charge, to any person obtaining a
  13640. // copy of this software and associated documentation files (the
  13641. // "Software"), to deal in the Software without restriction, including
  13642. // without limitation the rights to use, copy, modify, merge, publish,
  13643. // distribute, sublicense, and/or sell copies of the Software, and to permit
  13644. // persons to whom the Software is furnished to do so, subject to the
  13645. // following conditions:
  13646. //
  13647. // The above copyright notice and this permission notice shall be included
  13648. // in all copies or substantial portions of the Software.
  13649. //
  13650. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  13651. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  13652. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  13653. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  13654. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  13655. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  13656. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  13657. // a passthrough stream.
  13658. // basically just the most minimal sort of Transform stream.
  13659. // Every written chunk gets output as-is.
  13660. module.exports = PassThrough;
  13661. var Transform = __webpack_require__(/*! ./_stream_transform */ 112);
  13662. /*<replacement>*/
  13663. var util = Object.create(__webpack_require__(/*! core-util-is */ 103));
  13664. util.inherits = __webpack_require__(/*! inherits */ 95);
  13665. /*</replacement>*/
  13666. util.inherits(PassThrough, Transform);
  13667. function PassThrough(options) {
  13668. if (!(this instanceof PassThrough)) return new PassThrough(options);
  13669. Transform.call(this, options);
  13670. }
  13671. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  13672. cb(null, chunk);
  13673. };
  13674. /***/ }),
  13675. /***/ 1131:
  13676. /*!*******************************************************************************!*\
  13677. !*** E:/yunfei/product1/bigDataApp/components/bazaar-city_list/citylist.json ***!
  13678. \*******************************************************************************/
  13679. /*! exports provided: hotcity, city, default */
  13680. /***/ (function(module) {
  13681. module.exports = JSON.parse("{\"hotcity\":{\"title\":\"热门城市\",\"lists\":[\"上海\",\"北京\",\"广州\",\"深圳\",\"武汉\",\"天津\",\"西安\",\"南京\",\"杭州\",\"成都\",\"重庆\"]},\"city\":[{\"title\":\"A\",\"lists\":[\"阿坝\",\"阿拉善\",\"阿里\",\"安康\",\"安庆\",\"鞍山\",\"安顺\",\"安阳\",\"澳门\"]},{\"title\":\"B\",\"lists\":[\"北京\",\"白银\",\"保定\",\"宝鸡\",\"保山\",\"包头\",\"巴中\",\"北海\",\"蚌埠\",\"本溪\",\"毕节\",\"滨州\",\"百色\",\"亳州\"]},{\"title\":\"C\",\"lists\":[\"重庆\",\"成都\",\"长沙\",\"长春\",\"沧州\",\"常德\",\"昌都\",\"长治\",\"常州\",\"巢湖\",\"潮州\",\"承德\",\"郴州\",\"赤峰\",\"池州\",\"崇左\",\"楚雄\",\"滁州\",\"朝阳\"]},{\"title\":\"D\",\"lists\":[\"大连\",\"东莞\",\"大理\",\"丹东\",\"大庆\",\"大同\",\"大兴安岭\",\"德宏\",\"德阳\",\"德州\",\"定西\",\"迪庆\",\"东营\"]},{\"title\":\"E\",\"lists\":[\"鄂尔多斯\",\"恩施\",\"鄂州\"]},{\"title\":\"F\",\"lists\":[\"福州\",\"防城港\",\"佛山\",\"抚顺\",\"抚州\",\"阜新\",\"阜阳\"]},{\"title\":\"G\",\"lists\":[\"广州\",\"桂林\",\"贵阳\",\"甘南\",\"赣州\",\"甘孜\",\"广安\",\"广元\",\"贵港\",\"果洛\"]},{\"title\":\"H\",\"lists\":[\"杭州\",\"哈尔滨\",\"合肥\",\"海口\",\"呼和浩特\",\"海北\",\"海东\",\"海南\",\"海西\",\"邯郸\",\"汉中\",\"鹤壁\",\"河池\",\"鹤岗\",\"黑河\",\"衡水\",\"衡阳\",\"河源\",\"贺州\",\"红河\",\"淮安\",\"淮北\",\"怀化\",\"淮南\",\"黄冈\",\"黄南\",\"黄山\",\"黄石\",\"惠州\",\"葫芦岛\",\"呼伦贝尔\",\"湖州\",\"菏泽\"]},{\"title\":\"J\",\"lists\":[\"济南\",\"佳木斯\",\"吉安\",\"江门\",\"焦作\",\"嘉兴\",\"嘉峪关\",\"揭阳\",\"吉林\",\"金昌\",\"晋城\",\"景德镇\",\"荆门\",\"荆州\",\"金华\",\"济宁\",\"晋中\",\"锦州\",\"九江\",\"酒泉\"]},{\"title\":\"K\",\"lists\":[\"昆明\",\"开封\"]},{\"title\":\"L\",\"lists\":[\"兰州\",\"拉萨\",\"来宾\",\"莱芜\",\"廊坊\",\"乐山\",\"凉山\",\"连云港\",\"聊城\",\"辽阳\",\"辽源\",\"丽江\",\"临沧\",\"临汾\",\"临夏\",\"临沂\",\"林芝\",\"丽水\",\"六安\",\"六盘水\",\"柳州\",\"陇南\",\"龙岩\",\"娄底\",\"漯河\",\"洛阳\",\"泸州\",\"吕梁\"]},{\"title\":\"M\",\"lists\":[\"马鞍山\",\"茂名\",\"眉山\",\"梅州\",\"绵阳\",\"牡丹江\"]},{\"title\":\"N\",\"lists\":[\"南京\",\"南昌\",\"南宁\",\"宁波\",\"南充\",\"南平\",\"南通\",\"南阳\",\"那曲\",\"内江\",\"宁德\",\"怒江\"]},{\"title\":\"P\",\"lists\":[\"盘锦\",\"攀枝花\",\"平顶山\",\"平凉\",\"萍乡\",\"莆田\",\"濮阳\"]},{\"title\":\"Q\",\"lists\":[\"青岛\",\"黔东南\",\"黔南\",\"黔西南\",\"庆阳\",\"清远\",\"秦皇岛\",\"钦州\",\"齐齐哈尔\",\"泉州\",\"曲靖\",\"衢州\"]},{\"title\":\"R\",\"lists\":[\"日喀则\",\"日照\"]},{\"title\":\"S\",\"lists\":[\"上海\",\"深圳\",\"苏州\",\"沈阳\",\"石家庄\",\"三门峡\",\"三明\",\"三亚\",\"商洛\",\"商丘\",\"上饶\",\"山南\",\"汕头\",\"汕尾\",\"韶关\",\"绍兴\",\"邵阳\",\"十堰\",\"朔州\",\"四平\",\"绥化\",\"遂宁\",\"随州\",\"宿迁\",\"宿州\"]},{\"title\":\"T\",\"lists\":[\"天津\",\"太原\",\"泰安\",\"泰州\",\"台州\",\"唐山\",\"天水\",\"铁岭\",\"铜川\",\"通化\",\"通辽\",\"铜陵\",\"铜仁\",\"台湾\"]},{\"title\":\"W\",\"lists\":[\"武汉\",\"乌鲁木齐\",\"无锡\",\"威海\",\"潍坊\",\"文山\",\"温州\",\"乌海\",\"芜湖\",\"乌兰察布\",\"武威\",\"梧州\"]},{\"title\":\"X\",\"lists\":[\"厦门\",\"西安\",\"西宁\",\"襄樊\",\"湘潭\",\"湘西\",\"咸宁\",\"咸阳\",\"孝感\",\"邢台\",\"新乡\",\"信阳\",\"新余\",\"忻州\",\"西双版纳\",\"宣城\",\"许昌\",\"徐州\",\"香港\",\"锡林郭勒\",\"兴安\"]},{\"title\":\"Y\",\"lists\":[\"银川\",\"雅安\",\"延安\",\"延边\",\"盐城\",\"阳江\",\"阳泉\",\"扬州\",\"烟台\",\"宜宾\",\"宜昌\",\"宜春\",\"营口\",\"益阳\",\"永州\",\"岳阳\",\"榆林\",\"运城\",\"云浮\",\"玉树\",\"玉溪\",\"玉林\"]},{\"title\":\"Z\",\"lists\":[\"杂多县\",\"赞皇县\",\"枣强县\",\"枣阳市\",\"枣庄\",\"泽库县\",\"增城市\",\"曾都区\",\"泽普县\",\"泽州县\",\"札达县\",\"扎赉特旗\",\"扎兰屯市\",\"扎鲁特旗\",\"扎囊县\",\"张北县\",\"张店区\",\"章贡区\",\"张家港\",\"张家界\",\"张家口\",\"漳平市\",\"漳浦县\",\"章丘市\",\"樟树市\",\"张湾区\",\"彰武县\",\"漳县\",\"张掖\",\"漳州\",\"长子县\",\"湛河区\",\"湛江\",\"站前区\",\"沾益县\",\"诏安县\",\"召陵区\",\"昭平县\",\"肇庆\",\"昭通\",\"赵县\",\"昭阳区\",\"招远市\",\"肇源县\",\"肇州县\",\"柞水县\",\"柘城县\",\"浙江\",\"镇安县\",\"振安区\",\"镇巴县\",\"正安县\",\"正定县\",\"正定新区\",\"正蓝旗\",\"正宁县\",\"蒸湘区\",\"正镶白旗\",\"正阳县\",\"郑州\",\"镇海区\",\"镇江\",\"浈江区\",\"镇康县\",\"镇赉县\",\"镇平县\",\"振兴区\",\"镇雄县\",\"镇原县\",\"志丹县\",\"治多县\",\"芝罘区\",\"枝江市\",\"芷江侗族自治县\",\"织金县\",\"中方县\",\"中江县\",\"钟楼区\",\"中牟县\",\"中宁县\",\"中山\",\"中山区\",\"钟山区\",\"钟山县\",\"中卫\",\"钟祥市\",\"中阳县\",\"中原区\",\"周村区\",\"周口\",\"周宁县\",\"舟曲县\",\"舟山\",\"周至县\",\"庄河市\",\"诸城市\",\"珠海\",\"珠晖区\",\"诸暨市\",\"驻马店\",\"准格尔旗\",\"涿鹿县\",\"卓尼\",\"涿州市\",\"卓资县\",\"珠山区\",\"竹山县\",\"竹溪县\",\"株洲\",\"株洲县\",\"淄博\",\"子长县\",\"淄川区\",\"自贡\",\"秭归县\",\"紫金县\",\"自流井区\",\"资溪县\",\"资兴市\",\"资阳\"]}]}");
  13682. /***/ }),
  13683. /***/ 114:
  13684. /*!*****************************************!*\
  13685. !*** ./node_modules/ripemd160/index.js ***!
  13686. \*****************************************/
  13687. /*! no static exports found */
  13688. /***/ (function(module, exports, __webpack_require__) {
  13689. "use strict";
  13690. var Buffer = __webpack_require__(/*! buffer */ 90).Buffer
  13691. var inherits = __webpack_require__(/*! inherits */ 95)
  13692. var HashBase = __webpack_require__(/*! hash-base */ 97)
  13693. var ARRAY16 = new Array(16)
  13694. var zl = [
  13695. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  13696. 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
  13697. 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
  13698. 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
  13699. 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
  13700. ]
  13701. var zr = [
  13702. 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
  13703. 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
  13704. 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
  13705. 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
  13706. 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
  13707. ]
  13708. var sl = [
  13709. 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
  13710. 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
  13711. 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
  13712. 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
  13713. 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
  13714. ]
  13715. var sr = [
  13716. 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
  13717. 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
  13718. 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
  13719. 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
  13720. 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
  13721. ]
  13722. var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]
  13723. var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]
  13724. function RIPEMD160 () {
  13725. HashBase.call(this, 64)
  13726. // state
  13727. this._a = 0x67452301
  13728. this._b = 0xefcdab89
  13729. this._c = 0x98badcfe
  13730. this._d = 0x10325476
  13731. this._e = 0xc3d2e1f0
  13732. }
  13733. inherits(RIPEMD160, HashBase)
  13734. RIPEMD160.prototype._update = function () {
  13735. var words = ARRAY16
  13736. for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)
  13737. var al = this._a | 0
  13738. var bl = this._b | 0
  13739. var cl = this._c | 0
  13740. var dl = this._d | 0
  13741. var el = this._e | 0
  13742. var ar = this._a | 0
  13743. var br = this._b | 0
  13744. var cr = this._c | 0
  13745. var dr = this._d | 0
  13746. var er = this._e | 0
  13747. // computation
  13748. for (var i = 0; i < 80; i += 1) {
  13749. var tl
  13750. var tr
  13751. if (i < 16) {
  13752. tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])
  13753. tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])
  13754. } else if (i < 32) {
  13755. tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])
  13756. tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])
  13757. } else if (i < 48) {
  13758. tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])
  13759. tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])
  13760. } else if (i < 64) {
  13761. tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])
  13762. tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])
  13763. } else { // if (i<80) {
  13764. tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])
  13765. tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])
  13766. }
  13767. al = el
  13768. el = dl
  13769. dl = rotl(cl, 10)
  13770. cl = bl
  13771. bl = tl
  13772. ar = er
  13773. er = dr
  13774. dr = rotl(cr, 10)
  13775. cr = br
  13776. br = tr
  13777. }
  13778. // update state
  13779. var t = (this._b + cl + dr) | 0
  13780. this._b = (this._c + dl + er) | 0
  13781. this._c = (this._d + el + ar) | 0
  13782. this._d = (this._e + al + br) | 0
  13783. this._e = (this._a + bl + cr) | 0
  13784. this._a = t
  13785. }
  13786. RIPEMD160.prototype._digest = function () {
  13787. // create padding and handle blocks
  13788. this._block[this._blockOffset++] = 0x80
  13789. if (this._blockOffset > 56) {
  13790. this._block.fill(0, this._blockOffset, 64)
  13791. this._update()
  13792. this._blockOffset = 0
  13793. }
  13794. this._block.fill(0, this._blockOffset, 56)
  13795. this._block.writeUInt32LE(this._length[0], 56)
  13796. this._block.writeUInt32LE(this._length[1], 60)
  13797. this._update()
  13798. // produce result
  13799. var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)
  13800. buffer.writeInt32LE(this._a, 0)
  13801. buffer.writeInt32LE(this._b, 4)
  13802. buffer.writeInt32LE(this._c, 8)
  13803. buffer.writeInt32LE(this._d, 12)
  13804. buffer.writeInt32LE(this._e, 16)
  13805. return buffer
  13806. }
  13807. function rotl (x, n) {
  13808. return (x << n) | (x >>> (32 - n))
  13809. }
  13810. function fn1 (a, b, c, d, e, m, k, s) {
  13811. return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0
  13812. }
  13813. function fn2 (a, b, c, d, e, m, k, s) {
  13814. return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0
  13815. }
  13816. function fn3 (a, b, c, d, e, m, k, s) {
  13817. return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0
  13818. }
  13819. function fn4 (a, b, c, d, e, m, k, s) {
  13820. return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0
  13821. }
  13822. function fn5 (a, b, c, d, e, m, k, s) {
  13823. return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0
  13824. }
  13825. module.exports = RIPEMD160
  13826. /***/ }),
  13827. /***/ 115:
  13828. /*!**************************************!*\
  13829. !*** ./node_modules/sha.js/index.js ***!
  13830. \**************************************/
  13831. /*! no static exports found */
  13832. /***/ (function(module, exports, __webpack_require__) {
  13833. var exports = module.exports = function SHA (algorithm) {
  13834. algorithm = algorithm.toLowerCase()
  13835. var Algorithm = exports[algorithm]
  13836. if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
  13837. return new Algorithm()
  13838. }
  13839. exports.sha = __webpack_require__(/*! ./sha */ 116)
  13840. exports.sha1 = __webpack_require__(/*! ./sha1 */ 118)
  13841. exports.sha224 = __webpack_require__(/*! ./sha224 */ 119)
  13842. exports.sha256 = __webpack_require__(/*! ./sha256 */ 120)
  13843. exports.sha384 = __webpack_require__(/*! ./sha384 */ 121)
  13844. exports.sha512 = __webpack_require__(/*! ./sha512 */ 122)
  13845. /***/ }),
  13846. /***/ 116:
  13847. /*!************************************!*\
  13848. !*** ./node_modules/sha.js/sha.js ***!
  13849. \************************************/
  13850. /*! no static exports found */
  13851. /***/ (function(module, exports, __webpack_require__) {
  13852. /*
  13853. * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
  13854. * in FIPS PUB 180-1
  13855. * This source code is derived from sha1.js of the same repository.
  13856. * The difference between SHA-0 and SHA-1 is just a bitwise rotate left
  13857. * operation was added.
  13858. */
  13859. var inherits = __webpack_require__(/*! inherits */ 95)
  13860. var Hash = __webpack_require__(/*! ./hash */ 117)
  13861. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  13862. var K = [
  13863. 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
  13864. ]
  13865. var W = new Array(80)
  13866. function Sha () {
  13867. this.init()
  13868. this._w = W
  13869. Hash.call(this, 64, 56)
  13870. }
  13871. inherits(Sha, Hash)
  13872. Sha.prototype.init = function () {
  13873. this._a = 0x67452301
  13874. this._b = 0xefcdab89
  13875. this._c = 0x98badcfe
  13876. this._d = 0x10325476
  13877. this._e = 0xc3d2e1f0
  13878. return this
  13879. }
  13880. function rotl5 (num) {
  13881. return (num << 5) | (num >>> 27)
  13882. }
  13883. function rotl30 (num) {
  13884. return (num << 30) | (num >>> 2)
  13885. }
  13886. function ft (s, b, c, d) {
  13887. if (s === 0) return (b & c) | ((~b) & d)
  13888. if (s === 2) return (b & c) | (b & d) | (c & d)
  13889. return b ^ c ^ d
  13890. }
  13891. Sha.prototype._update = function (M) {
  13892. var W = this._w
  13893. var a = this._a | 0
  13894. var b = this._b | 0
  13895. var c = this._c | 0
  13896. var d = this._d | 0
  13897. var e = this._e | 0
  13898. for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
  13899. for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]
  13900. for (var j = 0; j < 80; ++j) {
  13901. var s = ~~(j / 20)
  13902. var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
  13903. e = d
  13904. d = c
  13905. c = rotl30(b)
  13906. b = a
  13907. a = t
  13908. }
  13909. this._a = (a + this._a) | 0
  13910. this._b = (b + this._b) | 0
  13911. this._c = (c + this._c) | 0
  13912. this._d = (d + this._d) | 0
  13913. this._e = (e + this._e) | 0
  13914. }
  13915. Sha.prototype._hash = function () {
  13916. var H = Buffer.allocUnsafe(20)
  13917. H.writeInt32BE(this._a | 0, 0)
  13918. H.writeInt32BE(this._b | 0, 4)
  13919. H.writeInt32BE(this._c | 0, 8)
  13920. H.writeInt32BE(this._d | 0, 12)
  13921. H.writeInt32BE(this._e | 0, 16)
  13922. return H
  13923. }
  13924. module.exports = Sha
  13925. /***/ }),
  13926. /***/ 117:
  13927. /*!*************************************!*\
  13928. !*** ./node_modules/sha.js/hash.js ***!
  13929. \*************************************/
  13930. /*! no static exports found */
  13931. /***/ (function(module, exports, __webpack_require__) {
  13932. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  13933. // prototype class for hash functions
  13934. function Hash (blockSize, finalSize) {
  13935. this._block = Buffer.alloc(blockSize)
  13936. this._finalSize = finalSize
  13937. this._blockSize = blockSize
  13938. this._len = 0
  13939. }
  13940. Hash.prototype.update = function (data, enc) {
  13941. if (typeof data === 'string') {
  13942. enc = enc || 'utf8'
  13943. data = Buffer.from(data, enc)
  13944. }
  13945. var block = this._block
  13946. var blockSize = this._blockSize
  13947. var length = data.length
  13948. var accum = this._len
  13949. for (var offset = 0; offset < length;) {
  13950. var assigned = accum % blockSize
  13951. var remainder = Math.min(length - offset, blockSize - assigned)
  13952. for (var i = 0; i < remainder; i++) {
  13953. block[assigned + i] = data[offset + i]
  13954. }
  13955. accum += remainder
  13956. offset += remainder
  13957. if ((accum % blockSize) === 0) {
  13958. this._update(block)
  13959. }
  13960. }
  13961. this._len += length
  13962. return this
  13963. }
  13964. Hash.prototype.digest = function (enc) {
  13965. var rem = this._len % this._blockSize
  13966. this._block[rem] = 0x80
  13967. // zero (rem + 1) trailing bits, where (rem + 1) is the smallest
  13968. // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize
  13969. this._block.fill(0, rem + 1)
  13970. if (rem >= this._finalSize) {
  13971. this._update(this._block)
  13972. this._block.fill(0)
  13973. }
  13974. var bits = this._len * 8
  13975. // uint32
  13976. if (bits <= 0xffffffff) {
  13977. this._block.writeUInt32BE(bits, this._blockSize - 4)
  13978. // uint64
  13979. } else {
  13980. var lowBits = (bits & 0xffffffff) >>> 0
  13981. var highBits = (bits - lowBits) / 0x100000000
  13982. this._block.writeUInt32BE(highBits, this._blockSize - 8)
  13983. this._block.writeUInt32BE(lowBits, this._blockSize - 4)
  13984. }
  13985. this._update(this._block)
  13986. var hash = this._hash()
  13987. return enc ? hash.toString(enc) : hash
  13988. }
  13989. Hash.prototype._update = function () {
  13990. throw new Error('_update must be implemented by subclass')
  13991. }
  13992. module.exports = Hash
  13993. /***/ }),
  13994. /***/ 118:
  13995. /*!*************************************!*\
  13996. !*** ./node_modules/sha.js/sha1.js ***!
  13997. \*************************************/
  13998. /*! no static exports found */
  13999. /***/ (function(module, exports, __webpack_require__) {
  14000. /*
  14001. * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
  14002. * in FIPS PUB 180-1
  14003. * Version 2.1a Copyright Paul Johnston 2000 - 2002.
  14004. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  14005. * Distributed under the BSD License
  14006. * See http://pajhome.org.uk/crypt/md5 for details.
  14007. */
  14008. var inherits = __webpack_require__(/*! inherits */ 95)
  14009. var Hash = __webpack_require__(/*! ./hash */ 117)
  14010. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14011. var K = [
  14012. 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
  14013. ]
  14014. var W = new Array(80)
  14015. function Sha1 () {
  14016. this.init()
  14017. this._w = W
  14018. Hash.call(this, 64, 56)
  14019. }
  14020. inherits(Sha1, Hash)
  14021. Sha1.prototype.init = function () {
  14022. this._a = 0x67452301
  14023. this._b = 0xefcdab89
  14024. this._c = 0x98badcfe
  14025. this._d = 0x10325476
  14026. this._e = 0xc3d2e1f0
  14027. return this
  14028. }
  14029. function rotl1 (num) {
  14030. return (num << 1) | (num >>> 31)
  14031. }
  14032. function rotl5 (num) {
  14033. return (num << 5) | (num >>> 27)
  14034. }
  14035. function rotl30 (num) {
  14036. return (num << 30) | (num >>> 2)
  14037. }
  14038. function ft (s, b, c, d) {
  14039. if (s === 0) return (b & c) | ((~b) & d)
  14040. if (s === 2) return (b & c) | (b & d) | (c & d)
  14041. return b ^ c ^ d
  14042. }
  14043. Sha1.prototype._update = function (M) {
  14044. var W = this._w
  14045. var a = this._a | 0
  14046. var b = this._b | 0
  14047. var c = this._c | 0
  14048. var d = this._d | 0
  14049. var e = this._e | 0
  14050. for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
  14051. for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])
  14052. for (var j = 0; j < 80; ++j) {
  14053. var s = ~~(j / 20)
  14054. var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
  14055. e = d
  14056. d = c
  14057. c = rotl30(b)
  14058. b = a
  14059. a = t
  14060. }
  14061. this._a = (a + this._a) | 0
  14062. this._b = (b + this._b) | 0
  14063. this._c = (c + this._c) | 0
  14064. this._d = (d + this._d) | 0
  14065. this._e = (e + this._e) | 0
  14066. }
  14067. Sha1.prototype._hash = function () {
  14068. var H = Buffer.allocUnsafe(20)
  14069. H.writeInt32BE(this._a | 0, 0)
  14070. H.writeInt32BE(this._b | 0, 4)
  14071. H.writeInt32BE(this._c | 0, 8)
  14072. H.writeInt32BE(this._d | 0, 12)
  14073. H.writeInt32BE(this._e | 0, 16)
  14074. return H
  14075. }
  14076. module.exports = Sha1
  14077. /***/ }),
  14078. /***/ 119:
  14079. /*!***************************************!*\
  14080. !*** ./node_modules/sha.js/sha224.js ***!
  14081. \***************************************/
  14082. /*! no static exports found */
  14083. /***/ (function(module, exports, __webpack_require__) {
  14084. /**
  14085. * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
  14086. * in FIPS 180-2
  14087. * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
  14088. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  14089. *
  14090. */
  14091. var inherits = __webpack_require__(/*! inherits */ 95)
  14092. var Sha256 = __webpack_require__(/*! ./sha256 */ 120)
  14093. var Hash = __webpack_require__(/*! ./hash */ 117)
  14094. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14095. var W = new Array(64)
  14096. function Sha224 () {
  14097. this.init()
  14098. this._w = W // new Array(64)
  14099. Hash.call(this, 64, 56)
  14100. }
  14101. inherits(Sha224, Sha256)
  14102. Sha224.prototype.init = function () {
  14103. this._a = 0xc1059ed8
  14104. this._b = 0x367cd507
  14105. this._c = 0x3070dd17
  14106. this._d = 0xf70e5939
  14107. this._e = 0xffc00b31
  14108. this._f = 0x68581511
  14109. this._g = 0x64f98fa7
  14110. this._h = 0xbefa4fa4
  14111. return this
  14112. }
  14113. Sha224.prototype._hash = function () {
  14114. var H = Buffer.allocUnsafe(28)
  14115. H.writeInt32BE(this._a, 0)
  14116. H.writeInt32BE(this._b, 4)
  14117. H.writeInt32BE(this._c, 8)
  14118. H.writeInt32BE(this._d, 12)
  14119. H.writeInt32BE(this._e, 16)
  14120. H.writeInt32BE(this._f, 20)
  14121. H.writeInt32BE(this._g, 24)
  14122. return H
  14123. }
  14124. module.exports = Sha224
  14125. /***/ }),
  14126. /***/ 12:
  14127. /*!**************************************************************!*\
  14128. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  14129. \**************************************************************/
  14130. /*! no static exports found */
  14131. /***/ (function(module, exports, __webpack_require__) {
  14132. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  14133. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  14134. function _toPropertyKey(arg) {
  14135. var key = toPrimitive(arg, "string");
  14136. return _typeof(key) === "symbol" ? key : String(key);
  14137. }
  14138. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14139. /***/ }),
  14140. /***/ 120:
  14141. /*!***************************************!*\
  14142. !*** ./node_modules/sha.js/sha256.js ***!
  14143. \***************************************/
  14144. /*! no static exports found */
  14145. /***/ (function(module, exports, __webpack_require__) {
  14146. /**
  14147. * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
  14148. * in FIPS 180-2
  14149. * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
  14150. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  14151. *
  14152. */
  14153. var inherits = __webpack_require__(/*! inherits */ 95)
  14154. var Hash = __webpack_require__(/*! ./hash */ 117)
  14155. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14156. var K = [
  14157. 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
  14158. 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
  14159. 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
  14160. 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
  14161. 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
  14162. 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
  14163. 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
  14164. 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
  14165. 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
  14166. 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
  14167. 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
  14168. 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
  14169. 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
  14170. 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
  14171. 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
  14172. 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2
  14173. ]
  14174. var W = new Array(64)
  14175. function Sha256 () {
  14176. this.init()
  14177. this._w = W // new Array(64)
  14178. Hash.call(this, 64, 56)
  14179. }
  14180. inherits(Sha256, Hash)
  14181. Sha256.prototype.init = function () {
  14182. this._a = 0x6a09e667
  14183. this._b = 0xbb67ae85
  14184. this._c = 0x3c6ef372
  14185. this._d = 0xa54ff53a
  14186. this._e = 0x510e527f
  14187. this._f = 0x9b05688c
  14188. this._g = 0x1f83d9ab
  14189. this._h = 0x5be0cd19
  14190. return this
  14191. }
  14192. function ch (x, y, z) {
  14193. return z ^ (x & (y ^ z))
  14194. }
  14195. function maj (x, y, z) {
  14196. return (x & y) | (z & (x | y))
  14197. }
  14198. function sigma0 (x) {
  14199. return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)
  14200. }
  14201. function sigma1 (x) {
  14202. return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)
  14203. }
  14204. function gamma0 (x) {
  14205. return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)
  14206. }
  14207. function gamma1 (x) {
  14208. return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)
  14209. }
  14210. Sha256.prototype._update = function (M) {
  14211. var W = this._w
  14212. var a = this._a | 0
  14213. var b = this._b | 0
  14214. var c = this._c | 0
  14215. var d = this._d | 0
  14216. var e = this._e | 0
  14217. var f = this._f | 0
  14218. var g = this._g | 0
  14219. var h = this._h | 0
  14220. for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
  14221. for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0
  14222. for (var j = 0; j < 64; ++j) {
  14223. var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0
  14224. var T2 = (sigma0(a) + maj(a, b, c)) | 0
  14225. h = g
  14226. g = f
  14227. f = e
  14228. e = (d + T1) | 0
  14229. d = c
  14230. c = b
  14231. b = a
  14232. a = (T1 + T2) | 0
  14233. }
  14234. this._a = (a + this._a) | 0
  14235. this._b = (b + this._b) | 0
  14236. this._c = (c + this._c) | 0
  14237. this._d = (d + this._d) | 0
  14238. this._e = (e + this._e) | 0
  14239. this._f = (f + this._f) | 0
  14240. this._g = (g + this._g) | 0
  14241. this._h = (h + this._h) | 0
  14242. }
  14243. Sha256.prototype._hash = function () {
  14244. var H = Buffer.allocUnsafe(32)
  14245. H.writeInt32BE(this._a, 0)
  14246. H.writeInt32BE(this._b, 4)
  14247. H.writeInt32BE(this._c, 8)
  14248. H.writeInt32BE(this._d, 12)
  14249. H.writeInt32BE(this._e, 16)
  14250. H.writeInt32BE(this._f, 20)
  14251. H.writeInt32BE(this._g, 24)
  14252. H.writeInt32BE(this._h, 28)
  14253. return H
  14254. }
  14255. module.exports = Sha256
  14256. /***/ }),
  14257. /***/ 121:
  14258. /*!***************************************!*\
  14259. !*** ./node_modules/sha.js/sha384.js ***!
  14260. \***************************************/
  14261. /*! no static exports found */
  14262. /***/ (function(module, exports, __webpack_require__) {
  14263. var inherits = __webpack_require__(/*! inherits */ 95)
  14264. var SHA512 = __webpack_require__(/*! ./sha512 */ 122)
  14265. var Hash = __webpack_require__(/*! ./hash */ 117)
  14266. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14267. var W = new Array(160)
  14268. function Sha384 () {
  14269. this.init()
  14270. this._w = W
  14271. Hash.call(this, 128, 112)
  14272. }
  14273. inherits(Sha384, SHA512)
  14274. Sha384.prototype.init = function () {
  14275. this._ah = 0xcbbb9d5d
  14276. this._bh = 0x629a292a
  14277. this._ch = 0x9159015a
  14278. this._dh = 0x152fecd8
  14279. this._eh = 0x67332667
  14280. this._fh = 0x8eb44a87
  14281. this._gh = 0xdb0c2e0d
  14282. this._hh = 0x47b5481d
  14283. this._al = 0xc1059ed8
  14284. this._bl = 0x367cd507
  14285. this._cl = 0x3070dd17
  14286. this._dl = 0xf70e5939
  14287. this._el = 0xffc00b31
  14288. this._fl = 0x68581511
  14289. this._gl = 0x64f98fa7
  14290. this._hl = 0xbefa4fa4
  14291. return this
  14292. }
  14293. Sha384.prototype._hash = function () {
  14294. var H = Buffer.allocUnsafe(48)
  14295. function writeInt64BE (h, l, offset) {
  14296. H.writeInt32BE(h, offset)
  14297. H.writeInt32BE(l, offset + 4)
  14298. }
  14299. writeInt64BE(this._ah, this._al, 0)
  14300. writeInt64BE(this._bh, this._bl, 8)
  14301. writeInt64BE(this._ch, this._cl, 16)
  14302. writeInt64BE(this._dh, this._dl, 24)
  14303. writeInt64BE(this._eh, this._el, 32)
  14304. writeInt64BE(this._fh, this._fl, 40)
  14305. return H
  14306. }
  14307. module.exports = Sha384
  14308. /***/ }),
  14309. /***/ 122:
  14310. /*!***************************************!*\
  14311. !*** ./node_modules/sha.js/sha512.js ***!
  14312. \***************************************/
  14313. /*! no static exports found */
  14314. /***/ (function(module, exports, __webpack_require__) {
  14315. var inherits = __webpack_require__(/*! inherits */ 95)
  14316. var Hash = __webpack_require__(/*! ./hash */ 117)
  14317. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14318. var K = [
  14319. 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
  14320. 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
  14321. 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
  14322. 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
  14323. 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
  14324. 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
  14325. 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
  14326. 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
  14327. 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
  14328. 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
  14329. 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
  14330. 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
  14331. 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
  14332. 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
  14333. 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
  14334. 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
  14335. 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
  14336. 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
  14337. 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
  14338. 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
  14339. 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
  14340. 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
  14341. 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
  14342. 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
  14343. 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
  14344. 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
  14345. 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
  14346. 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
  14347. 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
  14348. 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
  14349. 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
  14350. 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
  14351. 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
  14352. 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
  14353. 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
  14354. 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
  14355. 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
  14356. 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
  14357. 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
  14358. 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
  14359. ]
  14360. var W = new Array(160)
  14361. function Sha512 () {
  14362. this.init()
  14363. this._w = W
  14364. Hash.call(this, 128, 112)
  14365. }
  14366. inherits(Sha512, Hash)
  14367. Sha512.prototype.init = function () {
  14368. this._ah = 0x6a09e667
  14369. this._bh = 0xbb67ae85
  14370. this._ch = 0x3c6ef372
  14371. this._dh = 0xa54ff53a
  14372. this._eh = 0x510e527f
  14373. this._fh = 0x9b05688c
  14374. this._gh = 0x1f83d9ab
  14375. this._hh = 0x5be0cd19
  14376. this._al = 0xf3bcc908
  14377. this._bl = 0x84caa73b
  14378. this._cl = 0xfe94f82b
  14379. this._dl = 0x5f1d36f1
  14380. this._el = 0xade682d1
  14381. this._fl = 0x2b3e6c1f
  14382. this._gl = 0xfb41bd6b
  14383. this._hl = 0x137e2179
  14384. return this
  14385. }
  14386. function Ch (x, y, z) {
  14387. return z ^ (x & (y ^ z))
  14388. }
  14389. function maj (x, y, z) {
  14390. return (x & y) | (z & (x | y))
  14391. }
  14392. function sigma0 (x, xl) {
  14393. return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)
  14394. }
  14395. function sigma1 (x, xl) {
  14396. return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)
  14397. }
  14398. function Gamma0 (x, xl) {
  14399. return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)
  14400. }
  14401. function Gamma0l (x, xl) {
  14402. return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)
  14403. }
  14404. function Gamma1 (x, xl) {
  14405. return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)
  14406. }
  14407. function Gamma1l (x, xl) {
  14408. return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)
  14409. }
  14410. function getCarry (a, b) {
  14411. return (a >>> 0) < (b >>> 0) ? 1 : 0
  14412. }
  14413. Sha512.prototype._update = function (M) {
  14414. var W = this._w
  14415. var ah = this._ah | 0
  14416. var bh = this._bh | 0
  14417. var ch = this._ch | 0
  14418. var dh = this._dh | 0
  14419. var eh = this._eh | 0
  14420. var fh = this._fh | 0
  14421. var gh = this._gh | 0
  14422. var hh = this._hh | 0
  14423. var al = this._al | 0
  14424. var bl = this._bl | 0
  14425. var cl = this._cl | 0
  14426. var dl = this._dl | 0
  14427. var el = this._el | 0
  14428. var fl = this._fl | 0
  14429. var gl = this._gl | 0
  14430. var hl = this._hl | 0
  14431. for (var i = 0; i < 32; i += 2) {
  14432. W[i] = M.readInt32BE(i * 4)
  14433. W[i + 1] = M.readInt32BE(i * 4 + 4)
  14434. }
  14435. for (; i < 160; i += 2) {
  14436. var xh = W[i - 15 * 2]
  14437. var xl = W[i - 15 * 2 + 1]
  14438. var gamma0 = Gamma0(xh, xl)
  14439. var gamma0l = Gamma0l(xl, xh)
  14440. xh = W[i - 2 * 2]
  14441. xl = W[i - 2 * 2 + 1]
  14442. var gamma1 = Gamma1(xh, xl)
  14443. var gamma1l = Gamma1l(xl, xh)
  14444. // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
  14445. var Wi7h = W[i - 7 * 2]
  14446. var Wi7l = W[i - 7 * 2 + 1]
  14447. var Wi16h = W[i - 16 * 2]
  14448. var Wi16l = W[i - 16 * 2 + 1]
  14449. var Wil = (gamma0l + Wi7l) | 0
  14450. var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0
  14451. Wil = (Wil + gamma1l) | 0
  14452. Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0
  14453. Wil = (Wil + Wi16l) | 0
  14454. Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0
  14455. W[i] = Wih
  14456. W[i + 1] = Wil
  14457. }
  14458. for (var j = 0; j < 160; j += 2) {
  14459. Wih = W[j]
  14460. Wil = W[j + 1]
  14461. var majh = maj(ah, bh, ch)
  14462. var majl = maj(al, bl, cl)
  14463. var sigma0h = sigma0(ah, al)
  14464. var sigma0l = sigma0(al, ah)
  14465. var sigma1h = sigma1(eh, el)
  14466. var sigma1l = sigma1(el, eh)
  14467. // t1 = h + sigma1 + ch + K[j] + W[j]
  14468. var Kih = K[j]
  14469. var Kil = K[j + 1]
  14470. var chh = Ch(eh, fh, gh)
  14471. var chl = Ch(el, fl, gl)
  14472. var t1l = (hl + sigma1l) | 0
  14473. var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0
  14474. t1l = (t1l + chl) | 0
  14475. t1h = (t1h + chh + getCarry(t1l, chl)) | 0
  14476. t1l = (t1l + Kil) | 0
  14477. t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0
  14478. t1l = (t1l + Wil) | 0
  14479. t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0
  14480. // t2 = sigma0 + maj
  14481. var t2l = (sigma0l + majl) | 0
  14482. var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0
  14483. hh = gh
  14484. hl = gl
  14485. gh = fh
  14486. gl = fl
  14487. fh = eh
  14488. fl = el
  14489. el = (dl + t1l) | 0
  14490. eh = (dh + t1h + getCarry(el, dl)) | 0
  14491. dh = ch
  14492. dl = cl
  14493. ch = bh
  14494. cl = bl
  14495. bh = ah
  14496. bl = al
  14497. al = (t1l + t2l) | 0
  14498. ah = (t1h + t2h + getCarry(al, t1l)) | 0
  14499. }
  14500. this._al = (this._al + al) | 0
  14501. this._bl = (this._bl + bl) | 0
  14502. this._cl = (this._cl + cl) | 0
  14503. this._dl = (this._dl + dl) | 0
  14504. this._el = (this._el + el) | 0
  14505. this._fl = (this._fl + fl) | 0
  14506. this._gl = (this._gl + gl) | 0
  14507. this._hl = (this._hl + hl) | 0
  14508. this._ah = (this._ah + ah + getCarry(this._al, al)) | 0
  14509. this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0
  14510. this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0
  14511. this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0
  14512. this._eh = (this._eh + eh + getCarry(this._el, el)) | 0
  14513. this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0
  14514. this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0
  14515. this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0
  14516. }
  14517. Sha512.prototype._hash = function () {
  14518. var H = Buffer.allocUnsafe(64)
  14519. function writeInt64BE (h, l, offset) {
  14520. H.writeInt32BE(h, offset)
  14521. H.writeInt32BE(l, offset + 4)
  14522. }
  14523. writeInt64BE(this._ah, this._al, 0)
  14524. writeInt64BE(this._bh, this._bl, 8)
  14525. writeInt64BE(this._ch, this._cl, 16)
  14526. writeInt64BE(this._dh, this._dl, 24)
  14527. writeInt64BE(this._eh, this._el, 32)
  14528. writeInt64BE(this._fh, this._fl, 40)
  14529. writeInt64BE(this._gh, this._gl, 48)
  14530. writeInt64BE(this._hh, this._hl, 56)
  14531. return H
  14532. }
  14533. module.exports = Sha512
  14534. /***/ }),
  14535. /***/ 123:
  14536. /*!*******************************************!*\
  14537. !*** ./node_modules/cipher-base/index.js ***!
  14538. \*******************************************/
  14539. /*! no static exports found */
  14540. /***/ (function(module, exports, __webpack_require__) {
  14541. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14542. var Transform = __webpack_require__(/*! stream */ 124).Transform
  14543. var StringDecoder = __webpack_require__(/*! string_decoder */ 111).StringDecoder
  14544. var inherits = __webpack_require__(/*! inherits */ 95)
  14545. function CipherBase (hashMode) {
  14546. Transform.call(this)
  14547. this.hashMode = typeof hashMode === 'string'
  14548. if (this.hashMode) {
  14549. this[hashMode] = this._finalOrDigest
  14550. } else {
  14551. this.final = this._finalOrDigest
  14552. }
  14553. if (this._final) {
  14554. this.__final = this._final
  14555. this._final = null
  14556. }
  14557. this._decoder = null
  14558. this._encoding = null
  14559. }
  14560. inherits(CipherBase, Transform)
  14561. CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
  14562. if (typeof data === 'string') {
  14563. data = Buffer.from(data, inputEnc)
  14564. }
  14565. var outData = this._update(data)
  14566. if (this.hashMode) return this
  14567. if (outputEnc) {
  14568. outData = this._toString(outData, outputEnc)
  14569. }
  14570. return outData
  14571. }
  14572. CipherBase.prototype.setAutoPadding = function () {}
  14573. CipherBase.prototype.getAuthTag = function () {
  14574. throw new Error('trying to get auth tag in unsupported state')
  14575. }
  14576. CipherBase.prototype.setAuthTag = function () {
  14577. throw new Error('trying to set auth tag in unsupported state')
  14578. }
  14579. CipherBase.prototype.setAAD = function () {
  14580. throw new Error('trying to set aad in unsupported state')
  14581. }
  14582. CipherBase.prototype._transform = function (data, _, next) {
  14583. var err
  14584. try {
  14585. if (this.hashMode) {
  14586. this._update(data)
  14587. } else {
  14588. this.push(this._update(data))
  14589. }
  14590. } catch (e) {
  14591. err = e
  14592. } finally {
  14593. next(err)
  14594. }
  14595. }
  14596. CipherBase.prototype._flush = function (done) {
  14597. var err
  14598. try {
  14599. this.push(this.__final())
  14600. } catch (e) {
  14601. err = e
  14602. }
  14603. done(err)
  14604. }
  14605. CipherBase.prototype._finalOrDigest = function (outputEnc) {
  14606. var outData = this.__final() || Buffer.alloc(0)
  14607. if (outputEnc) {
  14608. outData = this._toString(outData, outputEnc, true)
  14609. }
  14610. return outData
  14611. }
  14612. CipherBase.prototype._toString = function (value, enc, fin) {
  14613. if (!this._decoder) {
  14614. this._decoder = new StringDecoder(enc)
  14615. this._encoding = enc
  14616. }
  14617. if (this._encoding !== enc) throw new Error('can\'t switch encodings')
  14618. var out = this._decoder.write(value)
  14619. if (fin) {
  14620. out += this._decoder.end()
  14621. }
  14622. return out
  14623. }
  14624. module.exports = CipherBase
  14625. /***/ }),
  14626. /***/ 124:
  14627. /*!*************************************************!*\
  14628. !*** ./node_modules/stream-browserify/index.js ***!
  14629. \*************************************************/
  14630. /*! no static exports found */
  14631. /***/ (function(module, exports, __webpack_require__) {
  14632. // Copyright Joyent, Inc. and other Node contributors.
  14633. //
  14634. // Permission is hereby granted, free of charge, to any person obtaining a
  14635. // copy of this software and associated documentation files (the
  14636. // "Software"), to deal in the Software without restriction, including
  14637. // without limitation the rights to use, copy, modify, merge, publish,
  14638. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14639. // persons to whom the Software is furnished to do so, subject to the
  14640. // following conditions:
  14641. //
  14642. // The above copyright notice and this permission notice shall be included
  14643. // in all copies or substantial portions of the Software.
  14644. //
  14645. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14646. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14647. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14648. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14649. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14650. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14651. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14652. module.exports = Stream;
  14653. var EE = __webpack_require__(/*! events */ 101).EventEmitter;
  14654. var inherits = __webpack_require__(/*! inherits */ 95);
  14655. inherits(Stream, EE);
  14656. Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ 98);
  14657. Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ 125);
  14658. Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ 126);
  14659. Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ 127);
  14660. Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ 128);
  14661. // Backwards-compat with node 0.4.x
  14662. Stream.Stream = Stream;
  14663. // old-style streams. Note that the pipe method (the only relevant
  14664. // part of this class) is overridden in the Readable class.
  14665. function Stream() {
  14666. EE.call(this);
  14667. }
  14668. Stream.prototype.pipe = function(dest, options) {
  14669. var source = this;
  14670. function ondata(chunk) {
  14671. if (dest.writable) {
  14672. if (false === dest.write(chunk) && source.pause) {
  14673. source.pause();
  14674. }
  14675. }
  14676. }
  14677. source.on('data', ondata);
  14678. function ondrain() {
  14679. if (source.readable && source.resume) {
  14680. source.resume();
  14681. }
  14682. }
  14683. dest.on('drain', ondrain);
  14684. // If the 'end' option is not supplied, dest.end() will be called when
  14685. // source gets the 'end' or 'close' events. Only dest.end() once.
  14686. if (!dest._isStdio && (!options || options.end !== false)) {
  14687. source.on('end', onend);
  14688. source.on('close', onclose);
  14689. }
  14690. var didOnEnd = false;
  14691. function onend() {
  14692. if (didOnEnd) return;
  14693. didOnEnd = true;
  14694. dest.end();
  14695. }
  14696. function onclose() {
  14697. if (didOnEnd) return;
  14698. didOnEnd = true;
  14699. if (typeof dest.destroy === 'function') dest.destroy();
  14700. }
  14701. // don't leave dangling pipes when there are errors.
  14702. function onerror(er) {
  14703. cleanup();
  14704. if (EE.listenerCount(this, 'error') === 0) {
  14705. throw er; // Unhandled stream error in pipe.
  14706. }
  14707. }
  14708. source.on('error', onerror);
  14709. dest.on('error', onerror);
  14710. // remove all the event listeners that were added.
  14711. function cleanup() {
  14712. source.removeListener('data', ondata);
  14713. dest.removeListener('drain', ondrain);
  14714. source.removeListener('end', onend);
  14715. source.removeListener('close', onclose);
  14716. source.removeListener('error', onerror);
  14717. dest.removeListener('error', onerror);
  14718. source.removeListener('end', cleanup);
  14719. source.removeListener('close', cleanup);
  14720. dest.removeListener('close', cleanup);
  14721. }
  14722. source.on('end', cleanup);
  14723. source.on('close', cleanup);
  14724. dest.on('close', cleanup);
  14725. dest.emit('pipe', source);
  14726. // Allow for unix-like usage: A.pipe(B).pipe(C)
  14727. return dest;
  14728. };
  14729. /***/ }),
  14730. /***/ 125:
  14731. /*!**********************************************************!*\
  14732. !*** ./node_modules/readable-stream/writable-browser.js ***!
  14733. \**********************************************************/
  14734. /*! no static exports found */
  14735. /***/ (function(module, exports, __webpack_require__) {
  14736. module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ 109);
  14737. /***/ }),
  14738. /***/ 126:
  14739. /*!********************************************************!*\
  14740. !*** ./node_modules/readable-stream/duplex-browser.js ***!
  14741. \********************************************************/
  14742. /*! no static exports found */
  14743. /***/ (function(module, exports, __webpack_require__) {
  14744. module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ 108);
  14745. /***/ }),
  14746. /***/ 127:
  14747. /*!***************************************************!*\
  14748. !*** ./node_modules/readable-stream/transform.js ***!
  14749. \***************************************************/
  14750. /*! no static exports found */
  14751. /***/ (function(module, exports, __webpack_require__) {
  14752. module.exports = __webpack_require__(/*! ./readable */ 98).Transform
  14753. /***/ }),
  14754. /***/ 128:
  14755. /*!*****************************************************!*\
  14756. !*** ./node_modules/readable-stream/passthrough.js ***!
  14757. \*****************************************************/
  14758. /*! no static exports found */
  14759. /***/ (function(module, exports, __webpack_require__) {
  14760. module.exports = __webpack_require__(/*! ./readable */ 98).PassThrough
  14761. /***/ }),
  14762. /***/ 129:
  14763. /*!*********************************************!*\
  14764. !*** ./node_modules/create-hmac/browser.js ***!
  14765. \*********************************************/
  14766. /*! no static exports found */
  14767. /***/ (function(module, exports, __webpack_require__) {
  14768. "use strict";
  14769. var inherits = __webpack_require__(/*! inherits */ 95)
  14770. var Legacy = __webpack_require__(/*! ./legacy */ 130)
  14771. var Base = __webpack_require__(/*! cipher-base */ 123)
  14772. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14773. var md5 = __webpack_require__(/*! create-hash/md5 */ 131)
  14774. var RIPEMD160 = __webpack_require__(/*! ripemd160 */ 114)
  14775. var sha = __webpack_require__(/*! sha.js */ 115)
  14776. var ZEROS = Buffer.alloc(128)
  14777. function Hmac (alg, key) {
  14778. Base.call(this, 'digest')
  14779. if (typeof key === 'string') {
  14780. key = Buffer.from(key)
  14781. }
  14782. var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
  14783. this._alg = alg
  14784. this._key = key
  14785. if (key.length > blocksize) {
  14786. var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
  14787. key = hash.update(key).digest()
  14788. } else if (key.length < blocksize) {
  14789. key = Buffer.concat([key, ZEROS], blocksize)
  14790. }
  14791. var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
  14792. var opad = this._opad = Buffer.allocUnsafe(blocksize)
  14793. for (var i = 0; i < blocksize; i++) {
  14794. ipad[i] = key[i] ^ 0x36
  14795. opad[i] = key[i] ^ 0x5C
  14796. }
  14797. this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
  14798. this._hash.update(ipad)
  14799. }
  14800. inherits(Hmac, Base)
  14801. Hmac.prototype._update = function (data) {
  14802. this._hash.update(data)
  14803. }
  14804. Hmac.prototype._final = function () {
  14805. var h = this._hash.digest()
  14806. var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)
  14807. return hash.update(this._opad).update(h).digest()
  14808. }
  14809. module.exports = function createHmac (alg, key) {
  14810. alg = alg.toLowerCase()
  14811. if (alg === 'rmd160' || alg === 'ripemd160') {
  14812. return new Hmac('rmd160', key)
  14813. }
  14814. if (alg === 'md5') {
  14815. return new Legacy(md5, key)
  14816. }
  14817. return new Hmac(alg, key)
  14818. }
  14819. /***/ }),
  14820. /***/ 13:
  14821. /*!*******************************************************!*\
  14822. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  14823. \*******************************************************/
  14824. /*! no static exports found */
  14825. /***/ (function(module, exports) {
  14826. function _typeof(obj) {
  14827. "@babel/helpers - typeof";
  14828. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  14829. return typeof obj;
  14830. } : function (obj) {
  14831. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  14832. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  14833. }
  14834. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14835. /***/ }),
  14836. /***/ 130:
  14837. /*!********************************************!*\
  14838. !*** ./node_modules/create-hmac/legacy.js ***!
  14839. \********************************************/
  14840. /*! no static exports found */
  14841. /***/ (function(module, exports, __webpack_require__) {
  14842. "use strict";
  14843. var inherits = __webpack_require__(/*! inherits */ 95)
  14844. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14845. var Base = __webpack_require__(/*! cipher-base */ 123)
  14846. var ZEROS = Buffer.alloc(128)
  14847. var blocksize = 64
  14848. function Hmac (alg, key) {
  14849. Base.call(this, 'digest')
  14850. if (typeof key === 'string') {
  14851. key = Buffer.from(key)
  14852. }
  14853. this._alg = alg
  14854. this._key = key
  14855. if (key.length > blocksize) {
  14856. key = alg(key)
  14857. } else if (key.length < blocksize) {
  14858. key = Buffer.concat([key, ZEROS], blocksize)
  14859. }
  14860. var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
  14861. var opad = this._opad = Buffer.allocUnsafe(blocksize)
  14862. for (var i = 0; i < blocksize; i++) {
  14863. ipad[i] = key[i] ^ 0x36
  14864. opad[i] = key[i] ^ 0x5C
  14865. }
  14866. this._hash = [ipad]
  14867. }
  14868. inherits(Hmac, Base)
  14869. Hmac.prototype._update = function (data) {
  14870. this._hash.push(data)
  14871. }
  14872. Hmac.prototype._final = function () {
  14873. var h = this._alg(Buffer.concat(this._hash))
  14874. return this._alg(Buffer.concat([this._opad, h]))
  14875. }
  14876. module.exports = Hmac
  14877. /***/ }),
  14878. /***/ 131:
  14879. /*!*****************************************!*\
  14880. !*** ./node_modules/create-hash/md5.js ***!
  14881. \*****************************************/
  14882. /*! no static exports found */
  14883. /***/ (function(module, exports, __webpack_require__) {
  14884. var MD5 = __webpack_require__(/*! md5.js */ 96)
  14885. module.exports = function (buffer) {
  14886. return new MD5().update(buffer).digest()
  14887. }
  14888. /***/ }),
  14889. /***/ 132:
  14890. /*!***********************************************!*\
  14891. !*** ./node_modules/browserify-sign/algos.js ***!
  14892. \***********************************************/
  14893. /*! no static exports found */
  14894. /***/ (function(module, exports, __webpack_require__) {
  14895. module.exports = __webpack_require__(/*! ./browser/algorithms.json */ 133)
  14896. /***/ }),
  14897. /***/ 133:
  14898. /*!**************************************************************!*\
  14899. !*** ./node_modules/browserify-sign/browser/algorithms.json ***!
  14900. \**************************************************************/
  14901. /*! exports provided: sha224WithRSAEncryption, RSA-SHA224, sha256WithRSAEncryption, RSA-SHA256, sha384WithRSAEncryption, RSA-SHA384, sha512WithRSAEncryption, RSA-SHA512, RSA-SHA1, ecdsa-with-SHA1, sha256, sha224, sha384, sha512, DSA-SHA, DSA-SHA1, DSA, DSA-WITH-SHA224, DSA-SHA224, DSA-WITH-SHA256, DSA-SHA256, DSA-WITH-SHA384, DSA-SHA384, DSA-WITH-SHA512, DSA-SHA512, DSA-RIPEMD160, ripemd160WithRSA, RSA-RIPEMD160, md5WithRSAEncryption, RSA-MD5, default */
  14902. /***/ (function(module) {
  14903. module.exports = JSON.parse("{\"sha224WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"RSA-SHA224\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"sha256WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"RSA-SHA256\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"sha384WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"RSA-SHA384\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"sha512WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA512\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA1\":{\"sign\":\"rsa\",\"hash\":\"sha1\",\"id\":\"3021300906052b0e03021a05000414\"},\"ecdsa-with-SHA1\":{\"sign\":\"ecdsa\",\"hash\":\"sha1\",\"id\":\"\"},\"sha256\":{\"sign\":\"ecdsa\",\"hash\":\"sha256\",\"id\":\"\"},\"sha224\":{\"sign\":\"ecdsa\",\"hash\":\"sha224\",\"id\":\"\"},\"sha384\":{\"sign\":\"ecdsa\",\"hash\":\"sha384\",\"id\":\"\"},\"sha512\":{\"sign\":\"ecdsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-SHA1\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-WITH-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-WITH-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-WITH-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-WITH-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-RIPEMD160\":{\"sign\":\"dsa\",\"hash\":\"rmd160\",\"id\":\"\"},\"ripemd160WithRSA\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"RSA-RIPEMD160\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"md5WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"},\"RSA-MD5\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"}}");
  14904. /***/ }),
  14905. /***/ 134:
  14906. /*!****************************************!*\
  14907. !*** ./node_modules/pbkdf2/browser.js ***!
  14908. \****************************************/
  14909. /*! no static exports found */
  14910. /***/ (function(module, exports, __webpack_require__) {
  14911. exports.pbkdf2 = __webpack_require__(/*! ./lib/async */ 135)
  14912. exports.pbkdf2Sync = __webpack_require__(/*! ./lib/sync */ 138)
  14913. /***/ }),
  14914. /***/ 135:
  14915. /*!******************************************!*\
  14916. !*** ./node_modules/pbkdf2/lib/async.js ***!
  14917. \******************************************/
  14918. /*! no static exports found */
  14919. /***/ (function(module, exports, __webpack_require__) {
  14920. /* WEBPACK VAR INJECTION */(function(global) {var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  14921. var checkParameters = __webpack_require__(/*! ./precondition */ 136)
  14922. var defaultEncoding = __webpack_require__(/*! ./default-encoding */ 137)
  14923. var sync = __webpack_require__(/*! ./sync */ 138)
  14924. var toBuffer = __webpack_require__(/*! ./to-buffer */ 139)
  14925. var ZERO_BUF
  14926. var subtle = global.crypto && global.crypto.subtle
  14927. var toBrowser = {
  14928. sha: 'SHA-1',
  14929. 'sha-1': 'SHA-1',
  14930. sha1: 'SHA-1',
  14931. sha256: 'SHA-256',
  14932. 'sha-256': 'SHA-256',
  14933. sha384: 'SHA-384',
  14934. 'sha-384': 'SHA-384',
  14935. 'sha-512': 'SHA-512',
  14936. sha512: 'SHA-512'
  14937. }
  14938. var checks = []
  14939. function checkNative (algo) {
  14940. if (global.process && !global.process.browser) {
  14941. return Promise.resolve(false)
  14942. }
  14943. if (!subtle || !subtle.importKey || !subtle.deriveBits) {
  14944. return Promise.resolve(false)
  14945. }
  14946. if (checks[algo] !== undefined) {
  14947. return checks[algo]
  14948. }
  14949. ZERO_BUF = ZERO_BUF || Buffer.alloc(8)
  14950. var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)
  14951. .then(function () {
  14952. return true
  14953. }).catch(function () {
  14954. return false
  14955. })
  14956. checks[algo] = prom
  14957. return prom
  14958. }
  14959. var nextTick
  14960. function getNextTick () {
  14961. if (nextTick) {
  14962. return nextTick
  14963. }
  14964. if (global.process && global.process.nextTick) {
  14965. nextTick = global.process.nextTick
  14966. } else if (global.queueMicrotask) {
  14967. nextTick = global.queueMicrotask
  14968. } else if (global.setImmediate) {
  14969. nextTick = global.setImmediate
  14970. } else {
  14971. nextTick = global.setTimeout
  14972. }
  14973. return nextTick
  14974. }
  14975. function browserPbkdf2 (password, salt, iterations, length, algo) {
  14976. return subtle.importKey(
  14977. 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']
  14978. ).then(function (key) {
  14979. return subtle.deriveBits({
  14980. name: 'PBKDF2',
  14981. salt: salt,
  14982. iterations: iterations,
  14983. hash: {
  14984. name: algo
  14985. }
  14986. }, key, length << 3)
  14987. }).then(function (res) {
  14988. return Buffer.from(res)
  14989. })
  14990. }
  14991. function resolvePromise (promise, callback) {
  14992. promise.then(function (out) {
  14993. getNextTick()(function () {
  14994. callback(null, out)
  14995. })
  14996. }, function (e) {
  14997. getNextTick()(function () {
  14998. callback(e)
  14999. })
  15000. })
  15001. }
  15002. module.exports = function (password, salt, iterations, keylen, digest, callback) {
  15003. if (typeof digest === 'function') {
  15004. callback = digest
  15005. digest = undefined
  15006. }
  15007. digest = digest || 'sha1'
  15008. var algo = toBrowser[digest.toLowerCase()]
  15009. if (!algo || typeof global.Promise !== 'function') {
  15010. getNextTick()(function () {
  15011. var out
  15012. try {
  15013. out = sync(password, salt, iterations, keylen, digest)
  15014. } catch (e) {
  15015. return callback(e)
  15016. }
  15017. callback(null, out)
  15018. })
  15019. return
  15020. }
  15021. checkParameters(iterations, keylen)
  15022. password = toBuffer(password, defaultEncoding, 'Password')
  15023. salt = toBuffer(salt, defaultEncoding, 'Salt')
  15024. if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')
  15025. resolvePromise(checkNative(algo).then(function (resp) {
  15026. if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)
  15027. return sync(password, salt, iterations, keylen, digest)
  15028. }), callback)
  15029. }
  15030. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  15031. /***/ }),
  15032. /***/ 136:
  15033. /*!*************************************************!*\
  15034. !*** ./node_modules/pbkdf2/lib/precondition.js ***!
  15035. \*************************************************/
  15036. /*! no static exports found */
  15037. /***/ (function(module, exports) {
  15038. var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
  15039. module.exports = function (iterations, keylen) {
  15040. if (typeof iterations !== 'number') {
  15041. throw new TypeError('Iterations not a number')
  15042. }
  15043. if (iterations < 0) {
  15044. throw new TypeError('Bad iterations')
  15045. }
  15046. if (typeof keylen !== 'number') {
  15047. throw new TypeError('Key length not a number')
  15048. }
  15049. if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */
  15050. throw new TypeError('Bad key length')
  15051. }
  15052. }
  15053. /***/ }),
  15054. /***/ 137:
  15055. /*!*****************************************************!*\
  15056. !*** ./node_modules/pbkdf2/lib/default-encoding.js ***!
  15057. \*****************************************************/
  15058. /*! no static exports found */
  15059. /***/ (function(module, exports, __webpack_require__) {
  15060. /* WEBPACK VAR INJECTION */(function(global, process) {var defaultEncoding
  15061. /* istanbul ignore next */
  15062. if (global.process && global.process.browser) {
  15063. defaultEncoding = 'utf-8'
  15064. } else if (global.process && global.process.version) {
  15065. var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
  15066. defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
  15067. } else {
  15068. defaultEncoding = 'utf-8'
  15069. }
  15070. module.exports = defaultEncoding
  15071. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ 87)))
  15072. /***/ }),
  15073. /***/ 138:
  15074. /*!*************************************************!*\
  15075. !*** ./node_modules/pbkdf2/lib/sync-browser.js ***!
  15076. \*************************************************/
  15077. /*! no static exports found */
  15078. /***/ (function(module, exports, __webpack_require__) {
  15079. var md5 = __webpack_require__(/*! create-hash/md5 */ 131)
  15080. var RIPEMD160 = __webpack_require__(/*! ripemd160 */ 114)
  15081. var sha = __webpack_require__(/*! sha.js */ 115)
  15082. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  15083. var checkParameters = __webpack_require__(/*! ./precondition */ 136)
  15084. var defaultEncoding = __webpack_require__(/*! ./default-encoding */ 137)
  15085. var toBuffer = __webpack_require__(/*! ./to-buffer */ 139)
  15086. var ZEROS = Buffer.alloc(128)
  15087. var sizes = {
  15088. md5: 16,
  15089. sha1: 20,
  15090. sha224: 28,
  15091. sha256: 32,
  15092. sha384: 48,
  15093. sha512: 64,
  15094. rmd160: 20,
  15095. ripemd160: 20
  15096. }
  15097. function Hmac (alg, key, saltLen) {
  15098. var hash = getDigest(alg)
  15099. var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
  15100. if (key.length > blocksize) {
  15101. key = hash(key)
  15102. } else if (key.length < blocksize) {
  15103. key = Buffer.concat([key, ZEROS], blocksize)
  15104. }
  15105. var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])
  15106. var opad = Buffer.allocUnsafe(blocksize + sizes[alg])
  15107. for (var i = 0; i < blocksize; i++) {
  15108. ipad[i] = key[i] ^ 0x36
  15109. opad[i] = key[i] ^ 0x5C
  15110. }
  15111. var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)
  15112. ipad.copy(ipad1, 0, 0, blocksize)
  15113. this.ipad1 = ipad1
  15114. this.ipad2 = ipad
  15115. this.opad = opad
  15116. this.alg = alg
  15117. this.blocksize = blocksize
  15118. this.hash = hash
  15119. this.size = sizes[alg]
  15120. }
  15121. Hmac.prototype.run = function (data, ipad) {
  15122. data.copy(ipad, this.blocksize)
  15123. var h = this.hash(ipad)
  15124. h.copy(this.opad, this.blocksize)
  15125. return this.hash(this.opad)
  15126. }
  15127. function getDigest (alg) {
  15128. function shaFunc (data) {
  15129. return sha(alg).update(data).digest()
  15130. }
  15131. function rmd160Func (data) {
  15132. return new RIPEMD160().update(data).digest()
  15133. }
  15134. if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func
  15135. if (alg === 'md5') return md5
  15136. return shaFunc
  15137. }
  15138. function pbkdf2 (password, salt, iterations, keylen, digest) {
  15139. checkParameters(iterations, keylen)
  15140. password = toBuffer(password, defaultEncoding, 'Password')
  15141. salt = toBuffer(salt, defaultEncoding, 'Salt')
  15142. digest = digest || 'sha1'
  15143. var hmac = new Hmac(digest, password, salt.length)
  15144. var DK = Buffer.allocUnsafe(keylen)
  15145. var block1 = Buffer.allocUnsafe(salt.length + 4)
  15146. salt.copy(block1, 0, 0, salt.length)
  15147. var destPos = 0
  15148. var hLen = sizes[digest]
  15149. var l = Math.ceil(keylen / hLen)
  15150. for (var i = 1; i <= l; i++) {
  15151. block1.writeUInt32BE(i, salt.length)
  15152. var T = hmac.run(block1, hmac.ipad1)
  15153. var U = T
  15154. for (var j = 1; j < iterations; j++) {
  15155. U = hmac.run(U, hmac.ipad2)
  15156. for (var k = 0; k < hLen; k++) T[k] ^= U[k]
  15157. }
  15158. T.copy(DK, destPos)
  15159. destPos += hLen
  15160. }
  15161. return DK
  15162. }
  15163. module.exports = pbkdf2
  15164. /***/ }),
  15165. /***/ 139:
  15166. /*!**********************************************!*\
  15167. !*** ./node_modules/pbkdf2/lib/to-buffer.js ***!
  15168. \**********************************************/
  15169. /*! no static exports found */
  15170. /***/ (function(module, exports, __webpack_require__) {
  15171. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  15172. module.exports = function (thing, encoding, name) {
  15173. if (Buffer.isBuffer(thing)) {
  15174. return thing
  15175. } else if (typeof thing === 'string') {
  15176. return Buffer.from(thing, encoding)
  15177. } else if (ArrayBuffer.isView(thing)) {
  15178. return Buffer.from(thing.buffer)
  15179. } else {
  15180. throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')
  15181. }
  15182. }
  15183. /***/ }),
  15184. /***/ 14:
  15185. /*!************************************************************!*\
  15186. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  15187. \************************************************************/
  15188. /*! no static exports found */
  15189. /***/ (function(module, exports, __webpack_require__) {
  15190. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  15191. function _toPrimitive(input, hint) {
  15192. if (_typeof(input) !== "object" || input === null) return input;
  15193. var prim = input[Symbol.toPrimitive];
  15194. if (prim !== undefined) {
  15195. var res = prim.call(input, hint || "default");
  15196. if (_typeof(res) !== "object") return res;
  15197. throw new TypeError("@@toPrimitive must return a primitive value.");
  15198. }
  15199. return (hint === "string" ? String : Number)(input);
  15200. }
  15201. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  15202. /***/ }),
  15203. /***/ 140:
  15204. /*!***************************************************!*\
  15205. !*** ./node_modules/browserify-cipher/browser.js ***!
  15206. \***************************************************/
  15207. /*! no static exports found */
  15208. /***/ (function(module, exports, __webpack_require__) {
  15209. var DES = __webpack_require__(/*! browserify-des */ 141)
  15210. var aes = __webpack_require__(/*! browserify-aes/browser */ 149)
  15211. var aesModes = __webpack_require__(/*! browserify-aes/modes */ 151)
  15212. var desModes = __webpack_require__(/*! browserify-des/modes */ 168)
  15213. var ebtk = __webpack_require__(/*! evp_bytestokey */ 166)
  15214. function createCipher (suite, password) {
  15215. suite = suite.toLowerCase()
  15216. var keyLen, ivLen
  15217. if (aesModes[suite]) {
  15218. keyLen = aesModes[suite].key
  15219. ivLen = aesModes[suite].iv
  15220. } else if (desModes[suite]) {
  15221. keyLen = desModes[suite].key * 8
  15222. ivLen = desModes[suite].iv
  15223. } else {
  15224. throw new TypeError('invalid suite type')
  15225. }
  15226. var keys = ebtk(password, false, keyLen, ivLen)
  15227. return createCipheriv(suite, keys.key, keys.iv)
  15228. }
  15229. function createDecipher (suite, password) {
  15230. suite = suite.toLowerCase()
  15231. var keyLen, ivLen
  15232. if (aesModes[suite]) {
  15233. keyLen = aesModes[suite].key
  15234. ivLen = aesModes[suite].iv
  15235. } else if (desModes[suite]) {
  15236. keyLen = desModes[suite].key * 8
  15237. ivLen = desModes[suite].iv
  15238. } else {
  15239. throw new TypeError('invalid suite type')
  15240. }
  15241. var keys = ebtk(password, false, keyLen, ivLen)
  15242. return createDecipheriv(suite, keys.key, keys.iv)
  15243. }
  15244. function createCipheriv (suite, key, iv) {
  15245. suite = suite.toLowerCase()
  15246. if (aesModes[suite]) return aes.createCipheriv(suite, key, iv)
  15247. if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite })
  15248. throw new TypeError('invalid suite type')
  15249. }
  15250. function createDecipheriv (suite, key, iv) {
  15251. suite = suite.toLowerCase()
  15252. if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv)
  15253. if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true })
  15254. throw new TypeError('invalid suite type')
  15255. }
  15256. function getCiphers () {
  15257. return Object.keys(desModes).concat(aes.getCiphers())
  15258. }
  15259. exports.createCipher = exports.Cipher = createCipher
  15260. exports.createCipheriv = exports.Cipheriv = createCipheriv
  15261. exports.createDecipher = exports.Decipher = createDecipher
  15262. exports.createDecipheriv = exports.Decipheriv = createDecipheriv
  15263. exports.listCiphers = exports.getCiphers = getCiphers
  15264. /***/ }),
  15265. /***/ 141:
  15266. /*!**********************************************!*\
  15267. !*** ./node_modules/browserify-des/index.js ***!
  15268. \**********************************************/
  15269. /*! no static exports found */
  15270. /***/ (function(module, exports, __webpack_require__) {
  15271. var CipherBase = __webpack_require__(/*! cipher-base */ 123)
  15272. var des = __webpack_require__(/*! des.js */ 142)
  15273. var inherits = __webpack_require__(/*! inherits */ 95)
  15274. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  15275. var modes = {
  15276. 'des-ede3-cbc': des.CBC.instantiate(des.EDE),
  15277. 'des-ede3': des.EDE,
  15278. 'des-ede-cbc': des.CBC.instantiate(des.EDE),
  15279. 'des-ede': des.EDE,
  15280. 'des-cbc': des.CBC.instantiate(des.DES),
  15281. 'des-ecb': des.DES
  15282. }
  15283. modes.des = modes['des-cbc']
  15284. modes.des3 = modes['des-ede3-cbc']
  15285. module.exports = DES
  15286. inherits(DES, CipherBase)
  15287. function DES (opts) {
  15288. CipherBase.call(this)
  15289. var modeName = opts.mode.toLowerCase()
  15290. var mode = modes[modeName]
  15291. var type
  15292. if (opts.decrypt) {
  15293. type = 'decrypt'
  15294. } else {
  15295. type = 'encrypt'
  15296. }
  15297. var key = opts.key
  15298. if (!Buffer.isBuffer(key)) {
  15299. key = Buffer.from(key)
  15300. }
  15301. if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {
  15302. key = Buffer.concat([key, key.slice(0, 8)])
  15303. }
  15304. var iv = opts.iv
  15305. if (!Buffer.isBuffer(iv)) {
  15306. iv = Buffer.from(iv)
  15307. }
  15308. this._des = mode.create({
  15309. key: key,
  15310. iv: iv,
  15311. type: type
  15312. })
  15313. }
  15314. DES.prototype._update = function (data) {
  15315. return Buffer.from(this._des.update(data))
  15316. }
  15317. DES.prototype._final = function () {
  15318. return Buffer.from(this._des.final())
  15319. }
  15320. /***/ }),
  15321. /***/ 142:
  15322. /*!****************************************!*\
  15323. !*** ./node_modules/des.js/lib/des.js ***!
  15324. \****************************************/
  15325. /*! no static exports found */
  15326. /***/ (function(module, exports, __webpack_require__) {
  15327. "use strict";
  15328. exports.utils = __webpack_require__(/*! ./des/utils */ 143);
  15329. exports.Cipher = __webpack_require__(/*! ./des/cipher */ 144);
  15330. exports.DES = __webpack_require__(/*! ./des/des */ 146);
  15331. exports.CBC = __webpack_require__(/*! ./des/cbc */ 147);
  15332. exports.EDE = __webpack_require__(/*! ./des/ede */ 148);
  15333. /***/ }),
  15334. /***/ 143:
  15335. /*!**********************************************!*\
  15336. !*** ./node_modules/des.js/lib/des/utils.js ***!
  15337. \**********************************************/
  15338. /*! no static exports found */
  15339. /***/ (function(module, exports, __webpack_require__) {
  15340. "use strict";
  15341. exports.readUInt32BE = function readUInt32BE(bytes, off) {
  15342. var res = (bytes[0 + off] << 24) |
  15343. (bytes[1 + off] << 16) |
  15344. (bytes[2 + off] << 8) |
  15345. bytes[3 + off];
  15346. return res >>> 0;
  15347. };
  15348. exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {
  15349. bytes[0 + off] = value >>> 24;
  15350. bytes[1 + off] = (value >>> 16) & 0xff;
  15351. bytes[2 + off] = (value >>> 8) & 0xff;
  15352. bytes[3 + off] = value & 0xff;
  15353. };
  15354. exports.ip = function ip(inL, inR, out, off) {
  15355. var outL = 0;
  15356. var outR = 0;
  15357. for (var i = 6; i >= 0; i -= 2) {
  15358. for (var j = 0; j <= 24; j += 8) {
  15359. outL <<= 1;
  15360. outL |= (inR >>> (j + i)) & 1;
  15361. }
  15362. for (var j = 0; j <= 24; j += 8) {
  15363. outL <<= 1;
  15364. outL |= (inL >>> (j + i)) & 1;
  15365. }
  15366. }
  15367. for (var i = 6; i >= 0; i -= 2) {
  15368. for (var j = 1; j <= 25; j += 8) {
  15369. outR <<= 1;
  15370. outR |= (inR >>> (j + i)) & 1;
  15371. }
  15372. for (var j = 1; j <= 25; j += 8) {
  15373. outR <<= 1;
  15374. outR |= (inL >>> (j + i)) & 1;
  15375. }
  15376. }
  15377. out[off + 0] = outL >>> 0;
  15378. out[off + 1] = outR >>> 0;
  15379. };
  15380. exports.rip = function rip(inL, inR, out, off) {
  15381. var outL = 0;
  15382. var outR = 0;
  15383. for (var i = 0; i < 4; i++) {
  15384. for (var j = 24; j >= 0; j -= 8) {
  15385. outL <<= 1;
  15386. outL |= (inR >>> (j + i)) & 1;
  15387. outL <<= 1;
  15388. outL |= (inL >>> (j + i)) & 1;
  15389. }
  15390. }
  15391. for (var i = 4; i < 8; i++) {
  15392. for (var j = 24; j >= 0; j -= 8) {
  15393. outR <<= 1;
  15394. outR |= (inR >>> (j + i)) & 1;
  15395. outR <<= 1;
  15396. outR |= (inL >>> (j + i)) & 1;
  15397. }
  15398. }
  15399. out[off + 0] = outL >>> 0;
  15400. out[off + 1] = outR >>> 0;
  15401. };
  15402. exports.pc1 = function pc1(inL, inR, out, off) {
  15403. var outL = 0;
  15404. var outR = 0;
  15405. // 7, 15, 23, 31, 39, 47, 55, 63
  15406. // 6, 14, 22, 30, 39, 47, 55, 63
  15407. // 5, 13, 21, 29, 39, 47, 55, 63
  15408. // 4, 12, 20, 28
  15409. for (var i = 7; i >= 5; i--) {
  15410. for (var j = 0; j <= 24; j += 8) {
  15411. outL <<= 1;
  15412. outL |= (inR >> (j + i)) & 1;
  15413. }
  15414. for (var j = 0; j <= 24; j += 8) {
  15415. outL <<= 1;
  15416. outL |= (inL >> (j + i)) & 1;
  15417. }
  15418. }
  15419. for (var j = 0; j <= 24; j += 8) {
  15420. outL <<= 1;
  15421. outL |= (inR >> (j + i)) & 1;
  15422. }
  15423. // 1, 9, 17, 25, 33, 41, 49, 57
  15424. // 2, 10, 18, 26, 34, 42, 50, 58
  15425. // 3, 11, 19, 27, 35, 43, 51, 59
  15426. // 36, 44, 52, 60
  15427. for (var i = 1; i <= 3; i++) {
  15428. for (var j = 0; j <= 24; j += 8) {
  15429. outR <<= 1;
  15430. outR |= (inR >> (j + i)) & 1;
  15431. }
  15432. for (var j = 0; j <= 24; j += 8) {
  15433. outR <<= 1;
  15434. outR |= (inL >> (j + i)) & 1;
  15435. }
  15436. }
  15437. for (var j = 0; j <= 24; j += 8) {
  15438. outR <<= 1;
  15439. outR |= (inL >> (j + i)) & 1;
  15440. }
  15441. out[off + 0] = outL >>> 0;
  15442. out[off + 1] = outR >>> 0;
  15443. };
  15444. exports.r28shl = function r28shl(num, shift) {
  15445. return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));
  15446. };
  15447. var pc2table = [
  15448. // inL => outL
  15449. 14, 11, 17, 4, 27, 23, 25, 0,
  15450. 13, 22, 7, 18, 5, 9, 16, 24,
  15451. 2, 20, 12, 21, 1, 8, 15, 26,
  15452. // inR => outR
  15453. 15, 4, 25, 19, 9, 1, 26, 16,
  15454. 5, 11, 23, 8, 12, 7, 17, 0,
  15455. 22, 3, 10, 14, 6, 20, 27, 24
  15456. ];
  15457. exports.pc2 = function pc2(inL, inR, out, off) {
  15458. var outL = 0;
  15459. var outR = 0;
  15460. var len = pc2table.length >>> 1;
  15461. for (var i = 0; i < len; i++) {
  15462. outL <<= 1;
  15463. outL |= (inL >>> pc2table[i]) & 0x1;
  15464. }
  15465. for (var i = len; i < pc2table.length; i++) {
  15466. outR <<= 1;
  15467. outR |= (inR >>> pc2table[i]) & 0x1;
  15468. }
  15469. out[off + 0] = outL >>> 0;
  15470. out[off + 1] = outR >>> 0;
  15471. };
  15472. exports.expand = function expand(r, out, off) {
  15473. var outL = 0;
  15474. var outR = 0;
  15475. outL = ((r & 1) << 5) | (r >>> 27);
  15476. for (var i = 23; i >= 15; i -= 4) {
  15477. outL <<= 6;
  15478. outL |= (r >>> i) & 0x3f;
  15479. }
  15480. for (var i = 11; i >= 3; i -= 4) {
  15481. outR |= (r >>> i) & 0x3f;
  15482. outR <<= 6;
  15483. }
  15484. outR |= ((r & 0x1f) << 1) | (r >>> 31);
  15485. out[off + 0] = outL >>> 0;
  15486. out[off + 1] = outR >>> 0;
  15487. };
  15488. var sTable = [
  15489. 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,
  15490. 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,
  15491. 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,
  15492. 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,
  15493. 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,
  15494. 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,
  15495. 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,
  15496. 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,
  15497. 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,
  15498. 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,
  15499. 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,
  15500. 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,
  15501. 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,
  15502. 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,
  15503. 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,
  15504. 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,
  15505. 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,
  15506. 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,
  15507. 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,
  15508. 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,
  15509. 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,
  15510. 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,
  15511. 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,
  15512. 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,
  15513. 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,
  15514. 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,
  15515. 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,
  15516. 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,
  15517. 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,
  15518. 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,
  15519. 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,
  15520. 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11
  15521. ];
  15522. exports.substitute = function substitute(inL, inR) {
  15523. var out = 0;
  15524. for (var i = 0; i < 4; i++) {
  15525. var b = (inL >>> (18 - i * 6)) & 0x3f;
  15526. var sb = sTable[i * 0x40 + b];
  15527. out <<= 4;
  15528. out |= sb;
  15529. }
  15530. for (var i = 0; i < 4; i++) {
  15531. var b = (inR >>> (18 - i * 6)) & 0x3f;
  15532. var sb = sTable[4 * 0x40 + i * 0x40 + b];
  15533. out <<= 4;
  15534. out |= sb;
  15535. }
  15536. return out >>> 0;
  15537. };
  15538. var permuteTable = [
  15539. 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,
  15540. 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7
  15541. ];
  15542. exports.permute = function permute(num) {
  15543. var out = 0;
  15544. for (var i = 0; i < permuteTable.length; i++) {
  15545. out <<= 1;
  15546. out |= (num >>> permuteTable[i]) & 0x1;
  15547. }
  15548. return out >>> 0;
  15549. };
  15550. exports.padSplit = function padSplit(num, size, group) {
  15551. var str = num.toString(2);
  15552. while (str.length < size)
  15553. str = '0' + str;
  15554. var out = [];
  15555. for (var i = 0; i < size; i += group)
  15556. out.push(str.slice(i, i + group));
  15557. return out.join(' ');
  15558. };
  15559. /***/ }),
  15560. /***/ 144:
  15561. /*!***********************************************!*\
  15562. !*** ./node_modules/des.js/lib/des/cipher.js ***!
  15563. \***********************************************/
  15564. /*! no static exports found */
  15565. /***/ (function(module, exports, __webpack_require__) {
  15566. "use strict";
  15567. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  15568. function Cipher(options) {
  15569. this.options = options;
  15570. this.type = this.options.type;
  15571. this.blockSize = 8;
  15572. this._init();
  15573. this.buffer = new Array(this.blockSize);
  15574. this.bufferOff = 0;
  15575. }
  15576. module.exports = Cipher;
  15577. Cipher.prototype._init = function _init() {
  15578. // Might be overrided
  15579. };
  15580. Cipher.prototype.update = function update(data) {
  15581. if (data.length === 0)
  15582. return [];
  15583. if (this.type === 'decrypt')
  15584. return this._updateDecrypt(data);
  15585. else
  15586. return this._updateEncrypt(data);
  15587. };
  15588. Cipher.prototype._buffer = function _buffer(data, off) {
  15589. // Append data to buffer
  15590. var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);
  15591. for (var i = 0; i < min; i++)
  15592. this.buffer[this.bufferOff + i] = data[off + i];
  15593. this.bufferOff += min;
  15594. // Shift next
  15595. return min;
  15596. };
  15597. Cipher.prototype._flushBuffer = function _flushBuffer(out, off) {
  15598. this._update(this.buffer, 0, out, off);
  15599. this.bufferOff = 0;
  15600. return this.blockSize;
  15601. };
  15602. Cipher.prototype._updateEncrypt = function _updateEncrypt(data) {
  15603. var inputOff = 0;
  15604. var outputOff = 0;
  15605. var count = ((this.bufferOff + data.length) / this.blockSize) | 0;
  15606. var out = new Array(count * this.blockSize);
  15607. if (this.bufferOff !== 0) {
  15608. inputOff += this._buffer(data, inputOff);
  15609. if (this.bufferOff === this.buffer.length)
  15610. outputOff += this._flushBuffer(out, outputOff);
  15611. }
  15612. // Write blocks
  15613. var max = data.length - ((data.length - inputOff) % this.blockSize);
  15614. for (; inputOff < max; inputOff += this.blockSize) {
  15615. this._update(data, inputOff, out, outputOff);
  15616. outputOff += this.blockSize;
  15617. }
  15618. // Queue rest
  15619. for (; inputOff < data.length; inputOff++, this.bufferOff++)
  15620. this.buffer[this.bufferOff] = data[inputOff];
  15621. return out;
  15622. };
  15623. Cipher.prototype._updateDecrypt = function _updateDecrypt(data) {
  15624. var inputOff = 0;
  15625. var outputOff = 0;
  15626. var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;
  15627. var out = new Array(count * this.blockSize);
  15628. // TODO(indutny): optimize it, this is far from optimal
  15629. for (; count > 0; count--) {
  15630. inputOff += this._buffer(data, inputOff);
  15631. outputOff += this._flushBuffer(out, outputOff);
  15632. }
  15633. // Buffer rest of the input
  15634. inputOff += this._buffer(data, inputOff);
  15635. return out;
  15636. };
  15637. Cipher.prototype.final = function final(buffer) {
  15638. var first;
  15639. if (buffer)
  15640. first = this.update(buffer);
  15641. var last;
  15642. if (this.type === 'encrypt')
  15643. last = this._finalEncrypt();
  15644. else
  15645. last = this._finalDecrypt();
  15646. if (first)
  15647. return first.concat(last);
  15648. else
  15649. return last;
  15650. };
  15651. Cipher.prototype._pad = function _pad(buffer, off) {
  15652. if (off === 0)
  15653. return false;
  15654. while (off < buffer.length)
  15655. buffer[off++] = 0;
  15656. return true;
  15657. };
  15658. Cipher.prototype._finalEncrypt = function _finalEncrypt() {
  15659. if (!this._pad(this.buffer, this.bufferOff))
  15660. return [];
  15661. var out = new Array(this.blockSize);
  15662. this._update(this.buffer, 0, out, 0);
  15663. return out;
  15664. };
  15665. Cipher.prototype._unpad = function _unpad(buffer) {
  15666. return buffer;
  15667. };
  15668. Cipher.prototype._finalDecrypt = function _finalDecrypt() {
  15669. assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');
  15670. var out = new Array(this.blockSize);
  15671. this._flushBuffer(out, 0);
  15672. return this._unpad(out);
  15673. };
  15674. /***/ }),
  15675. /***/ 145:
  15676. /*!***************************************************!*\
  15677. !*** ./node_modules/minimalistic-assert/index.js ***!
  15678. \***************************************************/
  15679. /*! no static exports found */
  15680. /***/ (function(module, exports) {
  15681. module.exports = assert;
  15682. function assert(val, msg) {
  15683. if (!val)
  15684. throw new Error(msg || 'Assertion failed');
  15685. }
  15686. assert.equal = function assertEqual(l, r, msg) {
  15687. if (l != r)
  15688. throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
  15689. };
  15690. /***/ }),
  15691. /***/ 146:
  15692. /*!********************************************!*\
  15693. !*** ./node_modules/des.js/lib/des/des.js ***!
  15694. \********************************************/
  15695. /*! no static exports found */
  15696. /***/ (function(module, exports, __webpack_require__) {
  15697. "use strict";
  15698. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  15699. var inherits = __webpack_require__(/*! inherits */ 95);
  15700. var utils = __webpack_require__(/*! ./utils */ 143);
  15701. var Cipher = __webpack_require__(/*! ./cipher */ 144);
  15702. function DESState() {
  15703. this.tmp = new Array(2);
  15704. this.keys = null;
  15705. }
  15706. function DES(options) {
  15707. Cipher.call(this, options);
  15708. var state = new DESState();
  15709. this._desState = state;
  15710. this.deriveKeys(state, options.key);
  15711. }
  15712. inherits(DES, Cipher);
  15713. module.exports = DES;
  15714. DES.create = function create(options) {
  15715. return new DES(options);
  15716. };
  15717. var shiftTable = [
  15718. 1, 1, 2, 2, 2, 2, 2, 2,
  15719. 1, 2, 2, 2, 2, 2, 2, 1
  15720. ];
  15721. DES.prototype.deriveKeys = function deriveKeys(state, key) {
  15722. state.keys = new Array(16 * 2);
  15723. assert.equal(key.length, this.blockSize, 'Invalid key length');
  15724. var kL = utils.readUInt32BE(key, 0);
  15725. var kR = utils.readUInt32BE(key, 4);
  15726. utils.pc1(kL, kR, state.tmp, 0);
  15727. kL = state.tmp[0];
  15728. kR = state.tmp[1];
  15729. for (var i = 0; i < state.keys.length; i += 2) {
  15730. var shift = shiftTable[i >>> 1];
  15731. kL = utils.r28shl(kL, shift);
  15732. kR = utils.r28shl(kR, shift);
  15733. utils.pc2(kL, kR, state.keys, i);
  15734. }
  15735. };
  15736. DES.prototype._update = function _update(inp, inOff, out, outOff) {
  15737. var state = this._desState;
  15738. var l = utils.readUInt32BE(inp, inOff);
  15739. var r = utils.readUInt32BE(inp, inOff + 4);
  15740. // Initial Permutation
  15741. utils.ip(l, r, state.tmp, 0);
  15742. l = state.tmp[0];
  15743. r = state.tmp[1];
  15744. if (this.type === 'encrypt')
  15745. this._encrypt(state, l, r, state.tmp, 0);
  15746. else
  15747. this._decrypt(state, l, r, state.tmp, 0);
  15748. l = state.tmp[0];
  15749. r = state.tmp[1];
  15750. utils.writeUInt32BE(out, l, outOff);
  15751. utils.writeUInt32BE(out, r, outOff + 4);
  15752. };
  15753. DES.prototype._pad = function _pad(buffer, off) {
  15754. var value = buffer.length - off;
  15755. for (var i = off; i < buffer.length; i++)
  15756. buffer[i] = value;
  15757. return true;
  15758. };
  15759. DES.prototype._unpad = function _unpad(buffer) {
  15760. var pad = buffer[buffer.length - 1];
  15761. for (var i = buffer.length - pad; i < buffer.length; i++)
  15762. assert.equal(buffer[i], pad);
  15763. return buffer.slice(0, buffer.length - pad);
  15764. };
  15765. DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {
  15766. var l = lStart;
  15767. var r = rStart;
  15768. // Apply f() x16 times
  15769. for (var i = 0; i < state.keys.length; i += 2) {
  15770. var keyL = state.keys[i];
  15771. var keyR = state.keys[i + 1];
  15772. // f(r, k)
  15773. utils.expand(r, state.tmp, 0);
  15774. keyL ^= state.tmp[0];
  15775. keyR ^= state.tmp[1];
  15776. var s = utils.substitute(keyL, keyR);
  15777. var f = utils.permute(s);
  15778. var t = r;
  15779. r = (l ^ f) >>> 0;
  15780. l = t;
  15781. }
  15782. // Reverse Initial Permutation
  15783. utils.rip(r, l, out, off);
  15784. };
  15785. DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {
  15786. var l = rStart;
  15787. var r = lStart;
  15788. // Apply f() x16 times
  15789. for (var i = state.keys.length - 2; i >= 0; i -= 2) {
  15790. var keyL = state.keys[i];
  15791. var keyR = state.keys[i + 1];
  15792. // f(r, k)
  15793. utils.expand(l, state.tmp, 0);
  15794. keyL ^= state.tmp[0];
  15795. keyR ^= state.tmp[1];
  15796. var s = utils.substitute(keyL, keyR);
  15797. var f = utils.permute(s);
  15798. var t = l;
  15799. l = (r ^ f) >>> 0;
  15800. r = t;
  15801. }
  15802. // Reverse Initial Permutation
  15803. utils.rip(l, r, out, off);
  15804. };
  15805. /***/ }),
  15806. /***/ 147:
  15807. /*!********************************************!*\
  15808. !*** ./node_modules/des.js/lib/des/cbc.js ***!
  15809. \********************************************/
  15810. /*! no static exports found */
  15811. /***/ (function(module, exports, __webpack_require__) {
  15812. "use strict";
  15813. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  15814. var inherits = __webpack_require__(/*! inherits */ 95);
  15815. var proto = {};
  15816. function CBCState(iv) {
  15817. assert.equal(iv.length, 8, 'Invalid IV length');
  15818. this.iv = new Array(8);
  15819. for (var i = 0; i < this.iv.length; i++)
  15820. this.iv[i] = iv[i];
  15821. }
  15822. function instantiate(Base) {
  15823. function CBC(options) {
  15824. Base.call(this, options);
  15825. this._cbcInit();
  15826. }
  15827. inherits(CBC, Base);
  15828. var keys = Object.keys(proto);
  15829. for (var i = 0; i < keys.length; i++) {
  15830. var key = keys[i];
  15831. CBC.prototype[key] = proto[key];
  15832. }
  15833. CBC.create = function create(options) {
  15834. return new CBC(options);
  15835. };
  15836. return CBC;
  15837. }
  15838. exports.instantiate = instantiate;
  15839. proto._cbcInit = function _cbcInit() {
  15840. var state = new CBCState(this.options.iv);
  15841. this._cbcState = state;
  15842. };
  15843. proto._update = function _update(inp, inOff, out, outOff) {
  15844. var state = this._cbcState;
  15845. var superProto = this.constructor.super_.prototype;
  15846. var iv = state.iv;
  15847. if (this.type === 'encrypt') {
  15848. for (var i = 0; i < this.blockSize; i++)
  15849. iv[i] ^= inp[inOff + i];
  15850. superProto._update.call(this, iv, 0, out, outOff);
  15851. for (var i = 0; i < this.blockSize; i++)
  15852. iv[i] = out[outOff + i];
  15853. } else {
  15854. superProto._update.call(this, inp, inOff, out, outOff);
  15855. for (var i = 0; i < this.blockSize; i++)
  15856. out[outOff + i] ^= iv[i];
  15857. for (var i = 0; i < this.blockSize; i++)
  15858. iv[i] = inp[inOff + i];
  15859. }
  15860. };
  15861. /***/ }),
  15862. /***/ 148:
  15863. /*!********************************************!*\
  15864. !*** ./node_modules/des.js/lib/des/ede.js ***!
  15865. \********************************************/
  15866. /*! no static exports found */
  15867. /***/ (function(module, exports, __webpack_require__) {
  15868. "use strict";
  15869. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  15870. var inherits = __webpack_require__(/*! inherits */ 95);
  15871. var Cipher = __webpack_require__(/*! ./cipher */ 144);
  15872. var DES = __webpack_require__(/*! ./des */ 146);
  15873. function EDEState(type, key) {
  15874. assert.equal(key.length, 24, 'Invalid key length');
  15875. var k1 = key.slice(0, 8);
  15876. var k2 = key.slice(8, 16);
  15877. var k3 = key.slice(16, 24);
  15878. if (type === 'encrypt') {
  15879. this.ciphers = [
  15880. DES.create({ type: 'encrypt', key: k1 }),
  15881. DES.create({ type: 'decrypt', key: k2 }),
  15882. DES.create({ type: 'encrypt', key: k3 })
  15883. ];
  15884. } else {
  15885. this.ciphers = [
  15886. DES.create({ type: 'decrypt', key: k3 }),
  15887. DES.create({ type: 'encrypt', key: k2 }),
  15888. DES.create({ type: 'decrypt', key: k1 })
  15889. ];
  15890. }
  15891. }
  15892. function EDE(options) {
  15893. Cipher.call(this, options);
  15894. var state = new EDEState(this.type, this.options.key);
  15895. this._edeState = state;
  15896. }
  15897. inherits(EDE, Cipher);
  15898. module.exports = EDE;
  15899. EDE.create = function create(options) {
  15900. return new EDE(options);
  15901. };
  15902. EDE.prototype._update = function _update(inp, inOff, out, outOff) {
  15903. var state = this._edeState;
  15904. state.ciphers[0]._update(inp, inOff, out, outOff);
  15905. state.ciphers[1]._update(out, outOff, out, outOff);
  15906. state.ciphers[2]._update(out, outOff, out, outOff);
  15907. };
  15908. EDE.prototype._pad = DES.prototype._pad;
  15909. EDE.prototype._unpad = DES.prototype._unpad;
  15910. /***/ }),
  15911. /***/ 149:
  15912. /*!************************************************!*\
  15913. !*** ./node_modules/browserify-aes/browser.js ***!
  15914. \************************************************/
  15915. /*! no static exports found */
  15916. /***/ (function(module, exports, __webpack_require__) {
  15917. var ciphers = __webpack_require__(/*! ./encrypter */ 150)
  15918. var deciphers = __webpack_require__(/*! ./decrypter */ 167)
  15919. var modes = __webpack_require__(/*! ./modes/list.json */ 161)
  15920. function getCiphers () {
  15921. return Object.keys(modes)
  15922. }
  15923. exports.createCipher = exports.Cipher = ciphers.createCipher
  15924. exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv
  15925. exports.createDecipher = exports.Decipher = deciphers.createDecipher
  15926. exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv
  15927. exports.listCiphers = exports.getCiphers = getCiphers
  15928. /***/ }),
  15929. /***/ 15:
  15930. /*!**********************************************************!*\
  15931. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  15932. \**********************************************************/
  15933. /*! no static exports found */
  15934. /***/ (function(module, exports, __webpack_require__) {
  15935. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  15936. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  15937. function _construct(Parent, args, Class) {
  15938. if (isNativeReflectConstruct()) {
  15939. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  15940. } else {
  15941. module.exports = _construct = function _construct(Parent, args, Class) {
  15942. var a = [null];
  15943. a.push.apply(a, args);
  15944. var Constructor = Function.bind.apply(Parent, a);
  15945. var instance = new Constructor();
  15946. if (Class) setPrototypeOf(instance, Class.prototype);
  15947. return instance;
  15948. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  15949. }
  15950. return _construct.apply(null, arguments);
  15951. }
  15952. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  15953. /***/ }),
  15954. /***/ 150:
  15955. /*!**************************************************!*\
  15956. !*** ./node_modules/browserify-aes/encrypter.js ***!
  15957. \**************************************************/
  15958. /*! no static exports found */
  15959. /***/ (function(module, exports, __webpack_require__) {
  15960. var MODES = __webpack_require__(/*! ./modes */ 151)
  15961. var AuthCipher = __webpack_require__(/*! ./authCipher */ 162)
  15962. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  15963. var StreamCipher = __webpack_require__(/*! ./streamCipher */ 165)
  15964. var Transform = __webpack_require__(/*! cipher-base */ 123)
  15965. var aes = __webpack_require__(/*! ./aes */ 163)
  15966. var ebtk = __webpack_require__(/*! evp_bytestokey */ 166)
  15967. var inherits = __webpack_require__(/*! inherits */ 95)
  15968. function Cipher (mode, key, iv) {
  15969. Transform.call(this)
  15970. this._cache = new Splitter()
  15971. this._cipher = new aes.AES(key)
  15972. this._prev = Buffer.from(iv)
  15973. this._mode = mode
  15974. this._autopadding = true
  15975. }
  15976. inherits(Cipher, Transform)
  15977. Cipher.prototype._update = function (data) {
  15978. this._cache.add(data)
  15979. var chunk
  15980. var thing
  15981. var out = []
  15982. while ((chunk = this._cache.get())) {
  15983. thing = this._mode.encrypt(this, chunk)
  15984. out.push(thing)
  15985. }
  15986. return Buffer.concat(out)
  15987. }
  15988. var PADDING = Buffer.alloc(16, 0x10)
  15989. Cipher.prototype._final = function () {
  15990. var chunk = this._cache.flush()
  15991. if (this._autopadding) {
  15992. chunk = this._mode.encrypt(this, chunk)
  15993. this._cipher.scrub()
  15994. return chunk
  15995. }
  15996. if (!chunk.equals(PADDING)) {
  15997. this._cipher.scrub()
  15998. throw new Error('data not multiple of block length')
  15999. }
  16000. }
  16001. Cipher.prototype.setAutoPadding = function (setTo) {
  16002. this._autopadding = !!setTo
  16003. return this
  16004. }
  16005. function Splitter () {
  16006. this.cache = Buffer.allocUnsafe(0)
  16007. }
  16008. Splitter.prototype.add = function (data) {
  16009. this.cache = Buffer.concat([this.cache, data])
  16010. }
  16011. Splitter.prototype.get = function () {
  16012. if (this.cache.length > 15) {
  16013. var out = this.cache.slice(0, 16)
  16014. this.cache = this.cache.slice(16)
  16015. return out
  16016. }
  16017. return null
  16018. }
  16019. Splitter.prototype.flush = function () {
  16020. var len = 16 - this.cache.length
  16021. var padBuff = Buffer.allocUnsafe(len)
  16022. var i = -1
  16023. while (++i < len) {
  16024. padBuff.writeUInt8(len, i)
  16025. }
  16026. return Buffer.concat([this.cache, padBuff])
  16027. }
  16028. function createCipheriv (suite, password, iv) {
  16029. var config = MODES[suite.toLowerCase()]
  16030. if (!config) throw new TypeError('invalid suite type')
  16031. if (typeof password === 'string') password = Buffer.from(password)
  16032. if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
  16033. if (typeof iv === 'string') iv = Buffer.from(iv)
  16034. if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
  16035. if (config.type === 'stream') {
  16036. return new StreamCipher(config.module, password, iv)
  16037. } else if (config.type === 'auth') {
  16038. return new AuthCipher(config.module, password, iv)
  16039. }
  16040. return new Cipher(config.module, password, iv)
  16041. }
  16042. function createCipher (suite, password) {
  16043. var config = MODES[suite.toLowerCase()]
  16044. if (!config) throw new TypeError('invalid suite type')
  16045. var keys = ebtk(password, false, config.key, config.iv)
  16046. return createCipheriv(suite, keys.key, keys.iv)
  16047. }
  16048. exports.createCipheriv = createCipheriv
  16049. exports.createCipher = createCipher
  16050. /***/ }),
  16051. /***/ 151:
  16052. /*!****************************************************!*\
  16053. !*** ./node_modules/browserify-aes/modes/index.js ***!
  16054. \****************************************************/
  16055. /*! no static exports found */
  16056. /***/ (function(module, exports, __webpack_require__) {
  16057. var modeModules = {
  16058. ECB: __webpack_require__(/*! ./ecb */ 152),
  16059. CBC: __webpack_require__(/*! ./cbc */ 153),
  16060. CFB: __webpack_require__(/*! ./cfb */ 155),
  16061. CFB8: __webpack_require__(/*! ./cfb8 */ 156),
  16062. CFB1: __webpack_require__(/*! ./cfb1 */ 157),
  16063. OFB: __webpack_require__(/*! ./ofb */ 158),
  16064. CTR: __webpack_require__(/*! ./ctr */ 159),
  16065. GCM: __webpack_require__(/*! ./ctr */ 159)
  16066. }
  16067. var modes = __webpack_require__(/*! ./list.json */ 161)
  16068. for (var key in modes) {
  16069. modes[key].module = modeModules[modes[key].mode]
  16070. }
  16071. module.exports = modes
  16072. /***/ }),
  16073. /***/ 152:
  16074. /*!**************************************************!*\
  16075. !*** ./node_modules/browserify-aes/modes/ecb.js ***!
  16076. \**************************************************/
  16077. /*! no static exports found */
  16078. /***/ (function(module, exports) {
  16079. exports.encrypt = function (self, block) {
  16080. return self._cipher.encryptBlock(block)
  16081. }
  16082. exports.decrypt = function (self, block) {
  16083. return self._cipher.decryptBlock(block)
  16084. }
  16085. /***/ }),
  16086. /***/ 153:
  16087. /*!**************************************************!*\
  16088. !*** ./node_modules/browserify-aes/modes/cbc.js ***!
  16089. \**************************************************/
  16090. /*! no static exports found */
  16091. /***/ (function(module, exports, __webpack_require__) {
  16092. var xor = __webpack_require__(/*! buffer-xor */ 154)
  16093. exports.encrypt = function (self, block) {
  16094. var data = xor(block, self._prev)
  16095. self._prev = self._cipher.encryptBlock(data)
  16096. return self._prev
  16097. }
  16098. exports.decrypt = function (self, block) {
  16099. var pad = self._prev
  16100. self._prev = block
  16101. var out = self._cipher.decryptBlock(block)
  16102. return xor(out, pad)
  16103. }
  16104. /***/ }),
  16105. /***/ 154:
  16106. /*!******************************************!*\
  16107. !*** ./node_modules/buffer-xor/index.js ***!
  16108. \******************************************/
  16109. /*! no static exports found */
  16110. /***/ (function(module, exports, __webpack_require__) {
  16111. /* WEBPACK VAR INJECTION */(function(Buffer) {module.exports = function xor (a, b) {
  16112. var length = Math.min(a.length, b.length)
  16113. var buffer = new Buffer(length)
  16114. for (var i = 0; i < length; ++i) {
  16115. buffer[i] = a[i] ^ b[i]
  16116. }
  16117. return buffer
  16118. }
  16119. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 90).Buffer))
  16120. /***/ }),
  16121. /***/ 155:
  16122. /*!**************************************************!*\
  16123. !*** ./node_modules/browserify-aes/modes/cfb.js ***!
  16124. \**************************************************/
  16125. /*! no static exports found */
  16126. /***/ (function(module, exports, __webpack_require__) {
  16127. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16128. var xor = __webpack_require__(/*! buffer-xor */ 154)
  16129. function encryptStart (self, data, decrypt) {
  16130. var len = data.length
  16131. var out = xor(data, self._cache)
  16132. self._cache = self._cache.slice(len)
  16133. self._prev = Buffer.concat([self._prev, decrypt ? data : out])
  16134. return out
  16135. }
  16136. exports.encrypt = function (self, data, decrypt) {
  16137. var out = Buffer.allocUnsafe(0)
  16138. var len
  16139. while (data.length) {
  16140. if (self._cache.length === 0) {
  16141. self._cache = self._cipher.encryptBlock(self._prev)
  16142. self._prev = Buffer.allocUnsafe(0)
  16143. }
  16144. if (self._cache.length <= data.length) {
  16145. len = self._cache.length
  16146. out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])
  16147. data = data.slice(len)
  16148. } else {
  16149. out = Buffer.concat([out, encryptStart(self, data, decrypt)])
  16150. break
  16151. }
  16152. }
  16153. return out
  16154. }
  16155. /***/ }),
  16156. /***/ 156:
  16157. /*!***************************************************!*\
  16158. !*** ./node_modules/browserify-aes/modes/cfb8.js ***!
  16159. \***************************************************/
  16160. /*! no static exports found */
  16161. /***/ (function(module, exports, __webpack_require__) {
  16162. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16163. function encryptByte (self, byteParam, decrypt) {
  16164. var pad = self._cipher.encryptBlock(self._prev)
  16165. var out = pad[0] ^ byteParam
  16166. self._prev = Buffer.concat([
  16167. self._prev.slice(1),
  16168. Buffer.from([decrypt ? byteParam : out])
  16169. ])
  16170. return out
  16171. }
  16172. exports.encrypt = function (self, chunk, decrypt) {
  16173. var len = chunk.length
  16174. var out = Buffer.allocUnsafe(len)
  16175. var i = -1
  16176. while (++i < len) {
  16177. out[i] = encryptByte(self, chunk[i], decrypt)
  16178. }
  16179. return out
  16180. }
  16181. /***/ }),
  16182. /***/ 157:
  16183. /*!***************************************************!*\
  16184. !*** ./node_modules/browserify-aes/modes/cfb1.js ***!
  16185. \***************************************************/
  16186. /*! no static exports found */
  16187. /***/ (function(module, exports, __webpack_require__) {
  16188. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16189. function encryptByte (self, byteParam, decrypt) {
  16190. var pad
  16191. var i = -1
  16192. var len = 8
  16193. var out = 0
  16194. var bit, value
  16195. while (++i < len) {
  16196. pad = self._cipher.encryptBlock(self._prev)
  16197. bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0
  16198. value = pad[0] ^ bit
  16199. out += ((value & 0x80) >> (i % 8))
  16200. self._prev = shiftIn(self._prev, decrypt ? bit : value)
  16201. }
  16202. return out
  16203. }
  16204. function shiftIn (buffer, value) {
  16205. var len = buffer.length
  16206. var i = -1
  16207. var out = Buffer.allocUnsafe(buffer.length)
  16208. buffer = Buffer.concat([buffer, Buffer.from([value])])
  16209. while (++i < len) {
  16210. out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)
  16211. }
  16212. return out
  16213. }
  16214. exports.encrypt = function (self, chunk, decrypt) {
  16215. var len = chunk.length
  16216. var out = Buffer.allocUnsafe(len)
  16217. var i = -1
  16218. while (++i < len) {
  16219. out[i] = encryptByte(self, chunk[i], decrypt)
  16220. }
  16221. return out
  16222. }
  16223. /***/ }),
  16224. /***/ 158:
  16225. /*!**************************************************!*\
  16226. !*** ./node_modules/browserify-aes/modes/ofb.js ***!
  16227. \**************************************************/
  16228. /*! no static exports found */
  16229. /***/ (function(module, exports, __webpack_require__) {
  16230. /* WEBPACK VAR INJECTION */(function(Buffer) {var xor = __webpack_require__(/*! buffer-xor */ 154)
  16231. function getBlock (self) {
  16232. self._prev = self._cipher.encryptBlock(self._prev)
  16233. return self._prev
  16234. }
  16235. exports.encrypt = function (self, chunk) {
  16236. while (self._cache.length < chunk.length) {
  16237. self._cache = Buffer.concat([self._cache, getBlock(self)])
  16238. }
  16239. var pad = self._cache.slice(0, chunk.length)
  16240. self._cache = self._cache.slice(chunk.length)
  16241. return xor(chunk, pad)
  16242. }
  16243. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 90).Buffer))
  16244. /***/ }),
  16245. /***/ 159:
  16246. /*!**************************************************!*\
  16247. !*** ./node_modules/browserify-aes/modes/ctr.js ***!
  16248. \**************************************************/
  16249. /*! no static exports found */
  16250. /***/ (function(module, exports, __webpack_require__) {
  16251. var xor = __webpack_require__(/*! buffer-xor */ 154)
  16252. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16253. var incr32 = __webpack_require__(/*! ../incr32 */ 160)
  16254. function getBlock (self) {
  16255. var out = self._cipher.encryptBlockRaw(self._prev)
  16256. incr32(self._prev)
  16257. return out
  16258. }
  16259. var blockSize = 16
  16260. exports.encrypt = function (self, chunk) {
  16261. var chunkNum = Math.ceil(chunk.length / blockSize)
  16262. var start = self._cache.length
  16263. self._cache = Buffer.concat([
  16264. self._cache,
  16265. Buffer.allocUnsafe(chunkNum * blockSize)
  16266. ])
  16267. for (var i = 0; i < chunkNum; i++) {
  16268. var out = getBlock(self)
  16269. var offset = start + i * blockSize
  16270. self._cache.writeUInt32BE(out[0], offset + 0)
  16271. self._cache.writeUInt32BE(out[1], offset + 4)
  16272. self._cache.writeUInt32BE(out[2], offset + 8)
  16273. self._cache.writeUInt32BE(out[3], offset + 12)
  16274. }
  16275. var pad = self._cache.slice(0, chunk.length)
  16276. self._cache = self._cache.slice(chunk.length)
  16277. return xor(chunk, pad)
  16278. }
  16279. /***/ }),
  16280. /***/ 16:
  16281. /*!***************************************************************!*\
  16282. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  16283. \***************************************************************/
  16284. /*! no static exports found */
  16285. /***/ (function(module, exports) {
  16286. function _setPrototypeOf(o, p) {
  16287. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  16288. o.__proto__ = p;
  16289. return o;
  16290. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16291. return _setPrototypeOf(o, p);
  16292. }
  16293. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16294. /***/ }),
  16295. /***/ 160:
  16296. /*!***********************************************!*\
  16297. !*** ./node_modules/browserify-aes/incr32.js ***!
  16298. \***********************************************/
  16299. /*! no static exports found */
  16300. /***/ (function(module, exports) {
  16301. function incr32 (iv) {
  16302. var len = iv.length
  16303. var item
  16304. while (len--) {
  16305. item = iv.readUInt8(len)
  16306. if (item === 255) {
  16307. iv.writeUInt8(0, len)
  16308. } else {
  16309. item++
  16310. iv.writeUInt8(item, len)
  16311. break
  16312. }
  16313. }
  16314. }
  16315. module.exports = incr32
  16316. /***/ }),
  16317. /***/ 161:
  16318. /*!*****************************************************!*\
  16319. !*** ./node_modules/browserify-aes/modes/list.json ***!
  16320. \*****************************************************/
  16321. /*! exports provided: aes-128-ecb, aes-192-ecb, aes-256-ecb, aes-128-cbc, aes-192-cbc, aes-256-cbc, aes128, aes192, aes256, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-cfb8, aes-192-cfb8, aes-256-cfb8, aes-128-cfb1, aes-192-cfb1, aes-256-cfb1, aes-128-ofb, aes-192-ofb, aes-256-ofb, aes-128-ctr, aes-192-ctr, aes-256-ctr, aes-128-gcm, aes-192-gcm, aes-256-gcm, default */
  16322. /***/ (function(module) {
  16323. module.exports = JSON.parse("{\"aes-128-ecb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-192-ecb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-256-ecb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-128-cbc\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-192-cbc\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-256-cbc\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes128\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes192\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes256\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-128-cfb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-192-cfb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-256-cfb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-128-cfb8\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-192-cfb8\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-256-cfb8\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-128-cfb1\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-192-cfb1\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-256-cfb1\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-128-ofb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-192-ofb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-256-ofb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-128-ctr\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-192-ctr\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-256-ctr\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-128-gcm\":{\"cipher\":\"AES\",\"key\":128,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-192-gcm\":{\"cipher\":\"AES\",\"key\":192,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-256-gcm\":{\"cipher\":\"AES\",\"key\":256,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"}}");
  16324. /***/ }),
  16325. /***/ 162:
  16326. /*!***************************************************!*\
  16327. !*** ./node_modules/browserify-aes/authCipher.js ***!
  16328. \***************************************************/
  16329. /*! no static exports found */
  16330. /***/ (function(module, exports, __webpack_require__) {
  16331. var aes = __webpack_require__(/*! ./aes */ 163)
  16332. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16333. var Transform = __webpack_require__(/*! cipher-base */ 123)
  16334. var inherits = __webpack_require__(/*! inherits */ 95)
  16335. var GHASH = __webpack_require__(/*! ./ghash */ 164)
  16336. var xor = __webpack_require__(/*! buffer-xor */ 154)
  16337. var incr32 = __webpack_require__(/*! ./incr32 */ 160)
  16338. function xorTest (a, b) {
  16339. var out = 0
  16340. if (a.length !== b.length) out++
  16341. var len = Math.min(a.length, b.length)
  16342. for (var i = 0; i < len; ++i) {
  16343. out += (a[i] ^ b[i])
  16344. }
  16345. return out
  16346. }
  16347. function calcIv (self, iv, ck) {
  16348. if (iv.length === 12) {
  16349. self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])
  16350. return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])
  16351. }
  16352. var ghash = new GHASH(ck)
  16353. var len = iv.length
  16354. var toPad = len % 16
  16355. ghash.update(iv)
  16356. if (toPad) {
  16357. toPad = 16 - toPad
  16358. ghash.update(Buffer.alloc(toPad, 0))
  16359. }
  16360. ghash.update(Buffer.alloc(8, 0))
  16361. var ivBits = len * 8
  16362. var tail = Buffer.alloc(8)
  16363. tail.writeUIntBE(ivBits, 0, 8)
  16364. ghash.update(tail)
  16365. self._finID = ghash.state
  16366. var out = Buffer.from(self._finID)
  16367. incr32(out)
  16368. return out
  16369. }
  16370. function StreamCipher (mode, key, iv, decrypt) {
  16371. Transform.call(this)
  16372. var h = Buffer.alloc(4, 0)
  16373. this._cipher = new aes.AES(key)
  16374. var ck = this._cipher.encryptBlock(h)
  16375. this._ghash = new GHASH(ck)
  16376. iv = calcIv(this, iv, ck)
  16377. this._prev = Buffer.from(iv)
  16378. this._cache = Buffer.allocUnsafe(0)
  16379. this._secCache = Buffer.allocUnsafe(0)
  16380. this._decrypt = decrypt
  16381. this._alen = 0
  16382. this._len = 0
  16383. this._mode = mode
  16384. this._authTag = null
  16385. this._called = false
  16386. }
  16387. inherits(StreamCipher, Transform)
  16388. StreamCipher.prototype._update = function (chunk) {
  16389. if (!this._called && this._alen) {
  16390. var rump = 16 - (this._alen % 16)
  16391. if (rump < 16) {
  16392. rump = Buffer.alloc(rump, 0)
  16393. this._ghash.update(rump)
  16394. }
  16395. }
  16396. this._called = true
  16397. var out = this._mode.encrypt(this, chunk)
  16398. if (this._decrypt) {
  16399. this._ghash.update(chunk)
  16400. } else {
  16401. this._ghash.update(out)
  16402. }
  16403. this._len += chunk.length
  16404. return out
  16405. }
  16406. StreamCipher.prototype._final = function () {
  16407. if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')
  16408. var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))
  16409. if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')
  16410. this._authTag = tag
  16411. this._cipher.scrub()
  16412. }
  16413. StreamCipher.prototype.getAuthTag = function getAuthTag () {
  16414. if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')
  16415. return this._authTag
  16416. }
  16417. StreamCipher.prototype.setAuthTag = function setAuthTag (tag) {
  16418. if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')
  16419. this._authTag = tag
  16420. }
  16421. StreamCipher.prototype.setAAD = function setAAD (buf) {
  16422. if (this._called) throw new Error('Attempting to set AAD in unsupported state')
  16423. this._ghash.update(buf)
  16424. this._alen += buf.length
  16425. }
  16426. module.exports = StreamCipher
  16427. /***/ }),
  16428. /***/ 163:
  16429. /*!********************************************!*\
  16430. !*** ./node_modules/browserify-aes/aes.js ***!
  16431. \********************************************/
  16432. /*! no static exports found */
  16433. /***/ (function(module, exports, __webpack_require__) {
  16434. // based on the aes implimentation in triple sec
  16435. // https://github.com/keybase/triplesec
  16436. // which is in turn based on the one from crypto-js
  16437. // https://code.google.com/p/crypto-js/
  16438. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16439. function asUInt32Array (buf) {
  16440. if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)
  16441. var len = (buf.length / 4) | 0
  16442. var out = new Array(len)
  16443. for (var i = 0; i < len; i++) {
  16444. out[i] = buf.readUInt32BE(i * 4)
  16445. }
  16446. return out
  16447. }
  16448. function scrubVec (v) {
  16449. for (var i = 0; i < v.length; v++) {
  16450. v[i] = 0
  16451. }
  16452. }
  16453. function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {
  16454. var SUB_MIX0 = SUB_MIX[0]
  16455. var SUB_MIX1 = SUB_MIX[1]
  16456. var SUB_MIX2 = SUB_MIX[2]
  16457. var SUB_MIX3 = SUB_MIX[3]
  16458. var s0 = M[0] ^ keySchedule[0]
  16459. var s1 = M[1] ^ keySchedule[1]
  16460. var s2 = M[2] ^ keySchedule[2]
  16461. var s3 = M[3] ^ keySchedule[3]
  16462. var t0, t1, t2, t3
  16463. var ksRow = 4
  16464. for (var round = 1; round < nRounds; round++) {
  16465. t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]
  16466. t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]
  16467. t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]
  16468. t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]
  16469. s0 = t0
  16470. s1 = t1
  16471. s2 = t2
  16472. s3 = t3
  16473. }
  16474. t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]
  16475. t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]
  16476. t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]
  16477. t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]
  16478. t0 = t0 >>> 0
  16479. t1 = t1 >>> 0
  16480. t2 = t2 >>> 0
  16481. t3 = t3 >>> 0
  16482. return [t0, t1, t2, t3]
  16483. }
  16484. // AES constants
  16485. var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]
  16486. var G = (function () {
  16487. // Compute double table
  16488. var d = new Array(256)
  16489. for (var j = 0; j < 256; j++) {
  16490. if (j < 128) {
  16491. d[j] = j << 1
  16492. } else {
  16493. d[j] = (j << 1) ^ 0x11b
  16494. }
  16495. }
  16496. var SBOX = []
  16497. var INV_SBOX = []
  16498. var SUB_MIX = [[], [], [], []]
  16499. var INV_SUB_MIX = [[], [], [], []]
  16500. // Walk GF(2^8)
  16501. var x = 0
  16502. var xi = 0
  16503. for (var i = 0; i < 256; ++i) {
  16504. // Compute sbox
  16505. var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)
  16506. sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63
  16507. SBOX[x] = sx
  16508. INV_SBOX[sx] = x
  16509. // Compute multiplication
  16510. var x2 = d[x]
  16511. var x4 = d[x2]
  16512. var x8 = d[x4]
  16513. // Compute sub bytes, mix columns tables
  16514. var t = (d[sx] * 0x101) ^ (sx * 0x1010100)
  16515. SUB_MIX[0][x] = (t << 24) | (t >>> 8)
  16516. SUB_MIX[1][x] = (t << 16) | (t >>> 16)
  16517. SUB_MIX[2][x] = (t << 8) | (t >>> 24)
  16518. SUB_MIX[3][x] = t
  16519. // Compute inv sub bytes, inv mix columns tables
  16520. t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)
  16521. INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)
  16522. INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)
  16523. INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)
  16524. INV_SUB_MIX[3][sx] = t
  16525. if (x === 0) {
  16526. x = xi = 1
  16527. } else {
  16528. x = x2 ^ d[d[d[x8 ^ x2]]]
  16529. xi ^= d[d[xi]]
  16530. }
  16531. }
  16532. return {
  16533. SBOX: SBOX,
  16534. INV_SBOX: INV_SBOX,
  16535. SUB_MIX: SUB_MIX,
  16536. INV_SUB_MIX: INV_SUB_MIX
  16537. }
  16538. })()
  16539. function AES (key) {
  16540. this._key = asUInt32Array(key)
  16541. this._reset()
  16542. }
  16543. AES.blockSize = 4 * 4
  16544. AES.keySize = 256 / 8
  16545. AES.prototype.blockSize = AES.blockSize
  16546. AES.prototype.keySize = AES.keySize
  16547. AES.prototype._reset = function () {
  16548. var keyWords = this._key
  16549. var keySize = keyWords.length
  16550. var nRounds = keySize + 6
  16551. var ksRows = (nRounds + 1) * 4
  16552. var keySchedule = []
  16553. for (var k = 0; k < keySize; k++) {
  16554. keySchedule[k] = keyWords[k]
  16555. }
  16556. for (k = keySize; k < ksRows; k++) {
  16557. var t = keySchedule[k - 1]
  16558. if (k % keySize === 0) {
  16559. t = (t << 8) | (t >>> 24)
  16560. t =
  16561. (G.SBOX[t >>> 24] << 24) |
  16562. (G.SBOX[(t >>> 16) & 0xff] << 16) |
  16563. (G.SBOX[(t >>> 8) & 0xff] << 8) |
  16564. (G.SBOX[t & 0xff])
  16565. t ^= RCON[(k / keySize) | 0] << 24
  16566. } else if (keySize > 6 && k % keySize === 4) {
  16567. t =
  16568. (G.SBOX[t >>> 24] << 24) |
  16569. (G.SBOX[(t >>> 16) & 0xff] << 16) |
  16570. (G.SBOX[(t >>> 8) & 0xff] << 8) |
  16571. (G.SBOX[t & 0xff])
  16572. }
  16573. keySchedule[k] = keySchedule[k - keySize] ^ t
  16574. }
  16575. var invKeySchedule = []
  16576. for (var ik = 0; ik < ksRows; ik++) {
  16577. var ksR = ksRows - ik
  16578. var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]
  16579. if (ik < 4 || ksR <= 4) {
  16580. invKeySchedule[ik] = tt
  16581. } else {
  16582. invKeySchedule[ik] =
  16583. G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^
  16584. G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^
  16585. G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^
  16586. G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]
  16587. }
  16588. }
  16589. this._nRounds = nRounds
  16590. this._keySchedule = keySchedule
  16591. this._invKeySchedule = invKeySchedule
  16592. }
  16593. AES.prototype.encryptBlockRaw = function (M) {
  16594. M = asUInt32Array(M)
  16595. return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)
  16596. }
  16597. AES.prototype.encryptBlock = function (M) {
  16598. var out = this.encryptBlockRaw(M)
  16599. var buf = Buffer.allocUnsafe(16)
  16600. buf.writeUInt32BE(out[0], 0)
  16601. buf.writeUInt32BE(out[1], 4)
  16602. buf.writeUInt32BE(out[2], 8)
  16603. buf.writeUInt32BE(out[3], 12)
  16604. return buf
  16605. }
  16606. AES.prototype.decryptBlock = function (M) {
  16607. M = asUInt32Array(M)
  16608. // swap
  16609. var m1 = M[1]
  16610. M[1] = M[3]
  16611. M[3] = m1
  16612. var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)
  16613. var buf = Buffer.allocUnsafe(16)
  16614. buf.writeUInt32BE(out[0], 0)
  16615. buf.writeUInt32BE(out[3], 4)
  16616. buf.writeUInt32BE(out[2], 8)
  16617. buf.writeUInt32BE(out[1], 12)
  16618. return buf
  16619. }
  16620. AES.prototype.scrub = function () {
  16621. scrubVec(this._keySchedule)
  16622. scrubVec(this._invKeySchedule)
  16623. scrubVec(this._key)
  16624. }
  16625. module.exports.AES = AES
  16626. /***/ }),
  16627. /***/ 164:
  16628. /*!**********************************************!*\
  16629. !*** ./node_modules/browserify-aes/ghash.js ***!
  16630. \**********************************************/
  16631. /*! no static exports found */
  16632. /***/ (function(module, exports, __webpack_require__) {
  16633. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16634. var ZEROES = Buffer.alloc(16, 0)
  16635. function toArray (buf) {
  16636. return [
  16637. buf.readUInt32BE(0),
  16638. buf.readUInt32BE(4),
  16639. buf.readUInt32BE(8),
  16640. buf.readUInt32BE(12)
  16641. ]
  16642. }
  16643. function fromArray (out) {
  16644. var buf = Buffer.allocUnsafe(16)
  16645. buf.writeUInt32BE(out[0] >>> 0, 0)
  16646. buf.writeUInt32BE(out[1] >>> 0, 4)
  16647. buf.writeUInt32BE(out[2] >>> 0, 8)
  16648. buf.writeUInt32BE(out[3] >>> 0, 12)
  16649. return buf
  16650. }
  16651. function GHASH (key) {
  16652. this.h = key
  16653. this.state = Buffer.alloc(16, 0)
  16654. this.cache = Buffer.allocUnsafe(0)
  16655. }
  16656. // from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html
  16657. // by Juho Vähä-Herttua
  16658. GHASH.prototype.ghash = function (block) {
  16659. var i = -1
  16660. while (++i < block.length) {
  16661. this.state[i] ^= block[i]
  16662. }
  16663. this._multiply()
  16664. }
  16665. GHASH.prototype._multiply = function () {
  16666. var Vi = toArray(this.h)
  16667. var Zi = [0, 0, 0, 0]
  16668. var j, xi, lsbVi
  16669. var i = -1
  16670. while (++i < 128) {
  16671. xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0
  16672. if (xi) {
  16673. // Z_i+1 = Z_i ^ V_i
  16674. Zi[0] ^= Vi[0]
  16675. Zi[1] ^= Vi[1]
  16676. Zi[2] ^= Vi[2]
  16677. Zi[3] ^= Vi[3]
  16678. }
  16679. // Store the value of LSB(V_i)
  16680. lsbVi = (Vi[3] & 1) !== 0
  16681. // V_i+1 = V_i >> 1
  16682. for (j = 3; j > 0; j--) {
  16683. Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)
  16684. }
  16685. Vi[0] = Vi[0] >>> 1
  16686. // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R
  16687. if (lsbVi) {
  16688. Vi[0] = Vi[0] ^ (0xe1 << 24)
  16689. }
  16690. }
  16691. this.state = fromArray(Zi)
  16692. }
  16693. GHASH.prototype.update = function (buf) {
  16694. this.cache = Buffer.concat([this.cache, buf])
  16695. var chunk
  16696. while (this.cache.length >= 16) {
  16697. chunk = this.cache.slice(0, 16)
  16698. this.cache = this.cache.slice(16)
  16699. this.ghash(chunk)
  16700. }
  16701. }
  16702. GHASH.prototype.final = function (abl, bl) {
  16703. if (this.cache.length) {
  16704. this.ghash(Buffer.concat([this.cache, ZEROES], 16))
  16705. }
  16706. this.ghash(fromArray([0, abl, 0, bl]))
  16707. return this.state
  16708. }
  16709. module.exports = GHASH
  16710. /***/ }),
  16711. /***/ 165:
  16712. /*!*****************************************************!*\
  16713. !*** ./node_modules/browserify-aes/streamCipher.js ***!
  16714. \*****************************************************/
  16715. /*! no static exports found */
  16716. /***/ (function(module, exports, __webpack_require__) {
  16717. var aes = __webpack_require__(/*! ./aes */ 163)
  16718. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16719. var Transform = __webpack_require__(/*! cipher-base */ 123)
  16720. var inherits = __webpack_require__(/*! inherits */ 95)
  16721. function StreamCipher (mode, key, iv, decrypt) {
  16722. Transform.call(this)
  16723. this._cipher = new aes.AES(key)
  16724. this._prev = Buffer.from(iv)
  16725. this._cache = Buffer.allocUnsafe(0)
  16726. this._secCache = Buffer.allocUnsafe(0)
  16727. this._decrypt = decrypt
  16728. this._mode = mode
  16729. }
  16730. inherits(StreamCipher, Transform)
  16731. StreamCipher.prototype._update = function (chunk) {
  16732. return this._mode.encrypt(this, chunk, this._decrypt)
  16733. }
  16734. StreamCipher.prototype._final = function () {
  16735. this._cipher.scrub()
  16736. }
  16737. module.exports = StreamCipher
  16738. /***/ }),
  16739. /***/ 166:
  16740. /*!**********************************************!*\
  16741. !*** ./node_modules/evp_bytestokey/index.js ***!
  16742. \**********************************************/
  16743. /*! no static exports found */
  16744. /***/ (function(module, exports, __webpack_require__) {
  16745. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16746. var MD5 = __webpack_require__(/*! md5.js */ 96)
  16747. /* eslint-disable camelcase */
  16748. function EVP_BytesToKey (password, salt, keyBits, ivLen) {
  16749. if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')
  16750. if (salt) {
  16751. if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')
  16752. if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')
  16753. }
  16754. var keyLen = keyBits / 8
  16755. var key = Buffer.alloc(keyLen)
  16756. var iv = Buffer.alloc(ivLen || 0)
  16757. var tmp = Buffer.alloc(0)
  16758. while (keyLen > 0 || ivLen > 0) {
  16759. var hash = new MD5()
  16760. hash.update(tmp)
  16761. hash.update(password)
  16762. if (salt) hash.update(salt)
  16763. tmp = hash.digest()
  16764. var used = 0
  16765. if (keyLen > 0) {
  16766. var keyStart = key.length - keyLen
  16767. used = Math.min(keyLen, tmp.length)
  16768. tmp.copy(key, keyStart, 0, used)
  16769. keyLen -= used
  16770. }
  16771. if (used < tmp.length && ivLen > 0) {
  16772. var ivStart = iv.length - ivLen
  16773. var length = Math.min(ivLen, tmp.length - used)
  16774. tmp.copy(iv, ivStart, used, used + length)
  16775. ivLen -= length
  16776. }
  16777. }
  16778. tmp.fill(0)
  16779. return { key: key, iv: iv }
  16780. }
  16781. module.exports = EVP_BytesToKey
  16782. /***/ }),
  16783. /***/ 167:
  16784. /*!**************************************************!*\
  16785. !*** ./node_modules/browserify-aes/decrypter.js ***!
  16786. \**************************************************/
  16787. /*! no static exports found */
  16788. /***/ (function(module, exports, __webpack_require__) {
  16789. var AuthCipher = __webpack_require__(/*! ./authCipher */ 162)
  16790. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  16791. var MODES = __webpack_require__(/*! ./modes */ 151)
  16792. var StreamCipher = __webpack_require__(/*! ./streamCipher */ 165)
  16793. var Transform = __webpack_require__(/*! cipher-base */ 123)
  16794. var aes = __webpack_require__(/*! ./aes */ 163)
  16795. var ebtk = __webpack_require__(/*! evp_bytestokey */ 166)
  16796. var inherits = __webpack_require__(/*! inherits */ 95)
  16797. function Decipher (mode, key, iv) {
  16798. Transform.call(this)
  16799. this._cache = new Splitter()
  16800. this._last = void 0
  16801. this._cipher = new aes.AES(key)
  16802. this._prev = Buffer.from(iv)
  16803. this._mode = mode
  16804. this._autopadding = true
  16805. }
  16806. inherits(Decipher, Transform)
  16807. Decipher.prototype._update = function (data) {
  16808. this._cache.add(data)
  16809. var chunk
  16810. var thing
  16811. var out = []
  16812. while ((chunk = this._cache.get(this._autopadding))) {
  16813. thing = this._mode.decrypt(this, chunk)
  16814. out.push(thing)
  16815. }
  16816. return Buffer.concat(out)
  16817. }
  16818. Decipher.prototype._final = function () {
  16819. var chunk = this._cache.flush()
  16820. if (this._autopadding) {
  16821. return unpad(this._mode.decrypt(this, chunk))
  16822. } else if (chunk) {
  16823. throw new Error('data not multiple of block length')
  16824. }
  16825. }
  16826. Decipher.prototype.setAutoPadding = function (setTo) {
  16827. this._autopadding = !!setTo
  16828. return this
  16829. }
  16830. function Splitter () {
  16831. this.cache = Buffer.allocUnsafe(0)
  16832. }
  16833. Splitter.prototype.add = function (data) {
  16834. this.cache = Buffer.concat([this.cache, data])
  16835. }
  16836. Splitter.prototype.get = function (autoPadding) {
  16837. var out
  16838. if (autoPadding) {
  16839. if (this.cache.length > 16) {
  16840. out = this.cache.slice(0, 16)
  16841. this.cache = this.cache.slice(16)
  16842. return out
  16843. }
  16844. } else {
  16845. if (this.cache.length >= 16) {
  16846. out = this.cache.slice(0, 16)
  16847. this.cache = this.cache.slice(16)
  16848. return out
  16849. }
  16850. }
  16851. return null
  16852. }
  16853. Splitter.prototype.flush = function () {
  16854. if (this.cache.length) return this.cache
  16855. }
  16856. function unpad (last) {
  16857. var padded = last[15]
  16858. if (padded < 1 || padded > 16) {
  16859. throw new Error('unable to decrypt data')
  16860. }
  16861. var i = -1
  16862. while (++i < padded) {
  16863. if (last[(i + (16 - padded))] !== padded) {
  16864. throw new Error('unable to decrypt data')
  16865. }
  16866. }
  16867. if (padded === 16) return
  16868. return last.slice(0, 16 - padded)
  16869. }
  16870. function createDecipheriv (suite, password, iv) {
  16871. var config = MODES[suite.toLowerCase()]
  16872. if (!config) throw new TypeError('invalid suite type')
  16873. if (typeof iv === 'string') iv = Buffer.from(iv)
  16874. if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
  16875. if (typeof password === 'string') password = Buffer.from(password)
  16876. if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
  16877. if (config.type === 'stream') {
  16878. return new StreamCipher(config.module, password, iv, true)
  16879. } else if (config.type === 'auth') {
  16880. return new AuthCipher(config.module, password, iv, true)
  16881. }
  16882. return new Decipher(config.module, password, iv)
  16883. }
  16884. function createDecipher (suite, password) {
  16885. var config = MODES[suite.toLowerCase()]
  16886. if (!config) throw new TypeError('invalid suite type')
  16887. var keys = ebtk(password, false, config.key, config.iv)
  16888. return createDecipheriv(suite, keys.key, keys.iv)
  16889. }
  16890. exports.createDecipher = createDecipher
  16891. exports.createDecipheriv = createDecipheriv
  16892. /***/ }),
  16893. /***/ 168:
  16894. /*!**********************************************!*\
  16895. !*** ./node_modules/browserify-des/modes.js ***!
  16896. \**********************************************/
  16897. /*! no static exports found */
  16898. /***/ (function(module, exports) {
  16899. exports['des-ecb'] = {
  16900. key: 8,
  16901. iv: 0
  16902. }
  16903. exports['des-cbc'] = exports.des = {
  16904. key: 8,
  16905. iv: 8
  16906. }
  16907. exports['des-ede3-cbc'] = exports.des3 = {
  16908. key: 24,
  16909. iv: 8
  16910. }
  16911. exports['des-ede3'] = {
  16912. key: 24,
  16913. iv: 0
  16914. }
  16915. exports['des-ede-cbc'] = {
  16916. key: 16,
  16917. iv: 8
  16918. }
  16919. exports['des-ede'] = {
  16920. key: 16,
  16921. iv: 0
  16922. }
  16923. /***/ }),
  16924. /***/ 169:
  16925. /*!************************************************!*\
  16926. !*** ./node_modules/diffie-hellman/browser.js ***!
  16927. \************************************************/
  16928. /*! no static exports found */
  16929. /***/ (function(module, exports, __webpack_require__) {
  16930. /* WEBPACK VAR INJECTION */(function(Buffer) {var generatePrime = __webpack_require__(/*! ./lib/generatePrime */ 170)
  16931. var primes = __webpack_require__(/*! ./lib/primes.json */ 177)
  16932. var DH = __webpack_require__(/*! ./lib/dh */ 178)
  16933. function getDiffieHellman (mod) {
  16934. var prime = new Buffer(primes[mod].prime, 'hex')
  16935. var gen = new Buffer(primes[mod].gen, 'hex')
  16936. return new DH(prime, gen)
  16937. }
  16938. var ENCODINGS = {
  16939. 'binary': true, 'hex': true, 'base64': true
  16940. }
  16941. function createDiffieHellman (prime, enc, generator, genc) {
  16942. if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {
  16943. return createDiffieHellman(prime, 'binary', enc, generator)
  16944. }
  16945. enc = enc || 'binary'
  16946. genc = genc || 'binary'
  16947. generator = generator || new Buffer([2])
  16948. if (!Buffer.isBuffer(generator)) {
  16949. generator = new Buffer(generator, genc)
  16950. }
  16951. if (typeof prime === 'number') {
  16952. return new DH(generatePrime(prime, generator), generator, true)
  16953. }
  16954. if (!Buffer.isBuffer(prime)) {
  16955. prime = new Buffer(prime, enc)
  16956. }
  16957. return new DH(prime, generator, true)
  16958. }
  16959. exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman
  16960. exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman
  16961. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 90).Buffer))
  16962. /***/ }),
  16963. /***/ 17:
  16964. /*!*************************************************************************!*\
  16965. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  16966. \*************************************************************************/
  16967. /*! no static exports found */
  16968. /***/ (function(module, exports) {
  16969. function _isNativeReflectConstruct() {
  16970. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  16971. if (Reflect.construct.sham) return false;
  16972. if (typeof Proxy === "function") return true;
  16973. try {
  16974. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  16975. return true;
  16976. } catch (e) {
  16977. return false;
  16978. }
  16979. }
  16980. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16981. /***/ }),
  16982. /***/ 170:
  16983. /*!**********************************************************!*\
  16984. !*** ./node_modules/diffie-hellman/lib/generatePrime.js ***!
  16985. \**********************************************************/
  16986. /*! no static exports found */
  16987. /***/ (function(module, exports, __webpack_require__) {
  16988. var randomBytes = __webpack_require__(/*! randombytes */ 86);
  16989. module.exports = findPrime;
  16990. findPrime.simpleSieve = simpleSieve;
  16991. findPrime.fermatTest = fermatTest;
  16992. var BN = __webpack_require__(/*! bn.js */ 171);
  16993. var TWENTYFOUR = new BN(24);
  16994. var MillerRabin = __webpack_require__(/*! miller-rabin */ 174);
  16995. var millerRabin = new MillerRabin();
  16996. var ONE = new BN(1);
  16997. var TWO = new BN(2);
  16998. var FIVE = new BN(5);
  16999. var SIXTEEN = new BN(16);
  17000. var EIGHT = new BN(8);
  17001. var TEN = new BN(10);
  17002. var THREE = new BN(3);
  17003. var SEVEN = new BN(7);
  17004. var ELEVEN = new BN(11);
  17005. var FOUR = new BN(4);
  17006. var TWELVE = new BN(12);
  17007. var primes = null;
  17008. function _getPrimes() {
  17009. if (primes !== null)
  17010. return primes;
  17011. var limit = 0x100000;
  17012. var res = [];
  17013. res[0] = 2;
  17014. for (var i = 1, k = 3; k < limit; k += 2) {
  17015. var sqrt = Math.ceil(Math.sqrt(k));
  17016. for (var j = 0; j < i && res[j] <= sqrt; j++)
  17017. if (k % res[j] === 0)
  17018. break;
  17019. if (i !== j && res[j] <= sqrt)
  17020. continue;
  17021. res[i++] = k;
  17022. }
  17023. primes = res;
  17024. return res;
  17025. }
  17026. function simpleSieve(p) {
  17027. var primes = _getPrimes();
  17028. for (var i = 0; i < primes.length; i++)
  17029. if (p.modn(primes[i]) === 0) {
  17030. if (p.cmpn(primes[i]) === 0) {
  17031. return true;
  17032. } else {
  17033. return false;
  17034. }
  17035. }
  17036. return true;
  17037. }
  17038. function fermatTest(p) {
  17039. var red = BN.mont(p);
  17040. return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;
  17041. }
  17042. function findPrime(bits, gen) {
  17043. if (bits < 16) {
  17044. // this is what openssl does
  17045. if (gen === 2 || gen === 5) {
  17046. return new BN([0x8c, 0x7b]);
  17047. } else {
  17048. return new BN([0x8c, 0x27]);
  17049. }
  17050. }
  17051. gen = new BN(gen);
  17052. var num, n2;
  17053. while (true) {
  17054. num = new BN(randomBytes(Math.ceil(bits / 8)));
  17055. while (num.bitLength() > bits) {
  17056. num.ishrn(1);
  17057. }
  17058. if (num.isEven()) {
  17059. num.iadd(ONE);
  17060. }
  17061. if (!num.testn(1)) {
  17062. num.iadd(TWO);
  17063. }
  17064. if (!gen.cmp(TWO)) {
  17065. while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {
  17066. num.iadd(FOUR);
  17067. }
  17068. } else if (!gen.cmp(FIVE)) {
  17069. while (num.mod(TEN).cmp(THREE)) {
  17070. num.iadd(FOUR);
  17071. }
  17072. }
  17073. n2 = num.shrn(1);
  17074. if (simpleSieve(n2) && simpleSieve(num) &&
  17075. fermatTest(n2) && fermatTest(num) &&
  17076. millerRabin.test(n2) && millerRabin.test(num)) {
  17077. return num;
  17078. }
  17079. }
  17080. }
  17081. /***/ }),
  17082. /***/ 171:
  17083. /*!**************************************!*\
  17084. !*** ./node_modules/bn.js/lib/bn.js ***!
  17085. \**************************************/
  17086. /*! no static exports found */
  17087. /***/ (function(module, exports, __webpack_require__) {
  17088. /* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) {
  17089. 'use strict';
  17090. // Utils
  17091. function assert (val, msg) {
  17092. if (!val) throw new Error(msg || 'Assertion failed');
  17093. }
  17094. // Could use `inherits` module, but don't want to move from single file
  17095. // architecture yet.
  17096. function inherits (ctor, superCtor) {
  17097. ctor.super_ = superCtor;
  17098. var TempCtor = function () {};
  17099. TempCtor.prototype = superCtor.prototype;
  17100. ctor.prototype = new TempCtor();
  17101. ctor.prototype.constructor = ctor;
  17102. }
  17103. // BN
  17104. function BN (number, base, endian) {
  17105. if (BN.isBN(number)) {
  17106. return number;
  17107. }
  17108. this.negative = 0;
  17109. this.words = null;
  17110. this.length = 0;
  17111. // Reduction context
  17112. this.red = null;
  17113. if (number !== null) {
  17114. if (base === 'le' || base === 'be') {
  17115. endian = base;
  17116. base = 10;
  17117. }
  17118. this._init(number || 0, base || 10, endian || 'be');
  17119. }
  17120. }
  17121. if (typeof module === 'object') {
  17122. module.exports = BN;
  17123. } else {
  17124. exports.BN = BN;
  17125. }
  17126. BN.BN = BN;
  17127. BN.wordSize = 26;
  17128. var Buffer;
  17129. try {
  17130. if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {
  17131. Buffer = window.Buffer;
  17132. } else {
  17133. Buffer = __webpack_require__(/*! buffer */ 173).Buffer;
  17134. }
  17135. } catch (e) {
  17136. }
  17137. BN.isBN = function isBN (num) {
  17138. if (num instanceof BN) {
  17139. return true;
  17140. }
  17141. return num !== null && typeof num === 'object' &&
  17142. num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
  17143. };
  17144. BN.max = function max (left, right) {
  17145. if (left.cmp(right) > 0) return left;
  17146. return right;
  17147. };
  17148. BN.min = function min (left, right) {
  17149. if (left.cmp(right) < 0) return left;
  17150. return right;
  17151. };
  17152. BN.prototype._init = function init (number, base, endian) {
  17153. if (typeof number === 'number') {
  17154. return this._initNumber(number, base, endian);
  17155. }
  17156. if (typeof number === 'object') {
  17157. return this._initArray(number, base, endian);
  17158. }
  17159. if (base === 'hex') {
  17160. base = 16;
  17161. }
  17162. assert(base === (base | 0) && base >= 2 && base <= 36);
  17163. number = number.toString().replace(/\s+/g, '');
  17164. var start = 0;
  17165. if (number[0] === '-') {
  17166. start++;
  17167. this.negative = 1;
  17168. }
  17169. if (start < number.length) {
  17170. if (base === 16) {
  17171. this._parseHex(number, start, endian);
  17172. } else {
  17173. this._parseBase(number, base, start);
  17174. if (endian === 'le') {
  17175. this._initArray(this.toArray(), base, endian);
  17176. }
  17177. }
  17178. }
  17179. };
  17180. BN.prototype._initNumber = function _initNumber (number, base, endian) {
  17181. if (number < 0) {
  17182. this.negative = 1;
  17183. number = -number;
  17184. }
  17185. if (number < 0x4000000) {
  17186. this.words = [ number & 0x3ffffff ];
  17187. this.length = 1;
  17188. } else if (number < 0x10000000000000) {
  17189. this.words = [
  17190. number & 0x3ffffff,
  17191. (number / 0x4000000) & 0x3ffffff
  17192. ];
  17193. this.length = 2;
  17194. } else {
  17195. assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
  17196. this.words = [
  17197. number & 0x3ffffff,
  17198. (number / 0x4000000) & 0x3ffffff,
  17199. 1
  17200. ];
  17201. this.length = 3;
  17202. }
  17203. if (endian !== 'le') return;
  17204. // Reverse the bytes
  17205. this._initArray(this.toArray(), base, endian);
  17206. };
  17207. BN.prototype._initArray = function _initArray (number, base, endian) {
  17208. // Perhaps a Uint8Array
  17209. assert(typeof number.length === 'number');
  17210. if (number.length <= 0) {
  17211. this.words = [ 0 ];
  17212. this.length = 1;
  17213. return this;
  17214. }
  17215. this.length = Math.ceil(number.length / 3);
  17216. this.words = new Array(this.length);
  17217. for (var i = 0; i < this.length; i++) {
  17218. this.words[i] = 0;
  17219. }
  17220. var j, w;
  17221. var off = 0;
  17222. if (endian === 'be') {
  17223. for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
  17224. w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
  17225. this.words[j] |= (w << off) & 0x3ffffff;
  17226. this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
  17227. off += 24;
  17228. if (off >= 26) {
  17229. off -= 26;
  17230. j++;
  17231. }
  17232. }
  17233. } else if (endian === 'le') {
  17234. for (i = 0, j = 0; i < number.length; i += 3) {
  17235. w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
  17236. this.words[j] |= (w << off) & 0x3ffffff;
  17237. this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
  17238. off += 24;
  17239. if (off >= 26) {
  17240. off -= 26;
  17241. j++;
  17242. }
  17243. }
  17244. }
  17245. return this.strip();
  17246. };
  17247. function parseHex4Bits (string, index) {
  17248. var c = string.charCodeAt(index);
  17249. // 'A' - 'F'
  17250. if (c >= 65 && c <= 70) {
  17251. return c - 55;
  17252. // 'a' - 'f'
  17253. } else if (c >= 97 && c <= 102) {
  17254. return c - 87;
  17255. // '0' - '9'
  17256. } else {
  17257. return (c - 48) & 0xf;
  17258. }
  17259. }
  17260. function parseHexByte (string, lowerBound, index) {
  17261. var r = parseHex4Bits(string, index);
  17262. if (index - 1 >= lowerBound) {
  17263. r |= parseHex4Bits(string, index - 1) << 4;
  17264. }
  17265. return r;
  17266. }
  17267. BN.prototype._parseHex = function _parseHex (number, start, endian) {
  17268. // Create possibly bigger array to ensure that it fits the number
  17269. this.length = Math.ceil((number.length - start) / 6);
  17270. this.words = new Array(this.length);
  17271. for (var i = 0; i < this.length; i++) {
  17272. this.words[i] = 0;
  17273. }
  17274. // 24-bits chunks
  17275. var off = 0;
  17276. var j = 0;
  17277. var w;
  17278. if (endian === 'be') {
  17279. for (i = number.length - 1; i >= start; i -= 2) {
  17280. w = parseHexByte(number, start, i) << off;
  17281. this.words[j] |= w & 0x3ffffff;
  17282. if (off >= 18) {
  17283. off -= 18;
  17284. j += 1;
  17285. this.words[j] |= w >>> 26;
  17286. } else {
  17287. off += 8;
  17288. }
  17289. }
  17290. } else {
  17291. var parseLength = number.length - start;
  17292. for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {
  17293. w = parseHexByte(number, start, i) << off;
  17294. this.words[j] |= w & 0x3ffffff;
  17295. if (off >= 18) {
  17296. off -= 18;
  17297. j += 1;
  17298. this.words[j] |= w >>> 26;
  17299. } else {
  17300. off += 8;
  17301. }
  17302. }
  17303. }
  17304. this.strip();
  17305. };
  17306. function parseBase (str, start, end, mul) {
  17307. var r = 0;
  17308. var len = Math.min(str.length, end);
  17309. for (var i = start; i < len; i++) {
  17310. var c = str.charCodeAt(i) - 48;
  17311. r *= mul;
  17312. // 'a'
  17313. if (c >= 49) {
  17314. r += c - 49 + 0xa;
  17315. // 'A'
  17316. } else if (c >= 17) {
  17317. r += c - 17 + 0xa;
  17318. // '0' - '9'
  17319. } else {
  17320. r += c;
  17321. }
  17322. }
  17323. return r;
  17324. }
  17325. BN.prototype._parseBase = function _parseBase (number, base, start) {
  17326. // Initialize as zero
  17327. this.words = [ 0 ];
  17328. this.length = 1;
  17329. // Find length of limb in base
  17330. for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
  17331. limbLen++;
  17332. }
  17333. limbLen--;
  17334. limbPow = (limbPow / base) | 0;
  17335. var total = number.length - start;
  17336. var mod = total % limbLen;
  17337. var end = Math.min(total, total - mod) + start;
  17338. var word = 0;
  17339. for (var i = start; i < end; i += limbLen) {
  17340. word = parseBase(number, i, i + limbLen, base);
  17341. this.imuln(limbPow);
  17342. if (this.words[0] + word < 0x4000000) {
  17343. this.words[0] += word;
  17344. } else {
  17345. this._iaddn(word);
  17346. }
  17347. }
  17348. if (mod !== 0) {
  17349. var pow = 1;
  17350. word = parseBase(number, i, number.length, base);
  17351. for (i = 0; i < mod; i++) {
  17352. pow *= base;
  17353. }
  17354. this.imuln(pow);
  17355. if (this.words[0] + word < 0x4000000) {
  17356. this.words[0] += word;
  17357. } else {
  17358. this._iaddn(word);
  17359. }
  17360. }
  17361. this.strip();
  17362. };
  17363. BN.prototype.copy = function copy (dest) {
  17364. dest.words = new Array(this.length);
  17365. for (var i = 0; i < this.length; i++) {
  17366. dest.words[i] = this.words[i];
  17367. }
  17368. dest.length = this.length;
  17369. dest.negative = this.negative;
  17370. dest.red = this.red;
  17371. };
  17372. BN.prototype.clone = function clone () {
  17373. var r = new BN(null);
  17374. this.copy(r);
  17375. return r;
  17376. };
  17377. BN.prototype._expand = function _expand (size) {
  17378. while (this.length < size) {
  17379. this.words[this.length++] = 0;
  17380. }
  17381. return this;
  17382. };
  17383. // Remove leading `0` from `this`
  17384. BN.prototype.strip = function strip () {
  17385. while (this.length > 1 && this.words[this.length - 1] === 0) {
  17386. this.length--;
  17387. }
  17388. return this._normSign();
  17389. };
  17390. BN.prototype._normSign = function _normSign () {
  17391. // -0 = 0
  17392. if (this.length === 1 && this.words[0] === 0) {
  17393. this.negative = 0;
  17394. }
  17395. return this;
  17396. };
  17397. BN.prototype.inspect = function inspect () {
  17398. return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
  17399. };
  17400. /*
  17401. var zeros = [];
  17402. var groupSizes = [];
  17403. var groupBases = [];
  17404. var s = '';
  17405. var i = -1;
  17406. while (++i < BN.wordSize) {
  17407. zeros[i] = s;
  17408. s += '0';
  17409. }
  17410. groupSizes[0] = 0;
  17411. groupSizes[1] = 0;
  17412. groupBases[0] = 0;
  17413. groupBases[1] = 0;
  17414. var base = 2 - 1;
  17415. while (++base < 36 + 1) {
  17416. var groupSize = 0;
  17417. var groupBase = 1;
  17418. while (groupBase < (1 << BN.wordSize) / base) {
  17419. groupBase *= base;
  17420. groupSize += 1;
  17421. }
  17422. groupSizes[base] = groupSize;
  17423. groupBases[base] = groupBase;
  17424. }
  17425. */
  17426. var zeros = [
  17427. '',
  17428. '0',
  17429. '00',
  17430. '000',
  17431. '0000',
  17432. '00000',
  17433. '000000',
  17434. '0000000',
  17435. '00000000',
  17436. '000000000',
  17437. '0000000000',
  17438. '00000000000',
  17439. '000000000000',
  17440. '0000000000000',
  17441. '00000000000000',
  17442. '000000000000000',
  17443. '0000000000000000',
  17444. '00000000000000000',
  17445. '000000000000000000',
  17446. '0000000000000000000',
  17447. '00000000000000000000',
  17448. '000000000000000000000',
  17449. '0000000000000000000000',
  17450. '00000000000000000000000',
  17451. '000000000000000000000000',
  17452. '0000000000000000000000000'
  17453. ];
  17454. var groupSizes = [
  17455. 0, 0,
  17456. 25, 16, 12, 11, 10, 9, 8,
  17457. 8, 7, 7, 7, 7, 6, 6,
  17458. 6, 6, 6, 6, 6, 5, 5,
  17459. 5, 5, 5, 5, 5, 5, 5,
  17460. 5, 5, 5, 5, 5, 5, 5
  17461. ];
  17462. var groupBases = [
  17463. 0, 0,
  17464. 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
  17465. 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
  17466. 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
  17467. 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
  17468. 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
  17469. ];
  17470. BN.prototype.toString = function toString (base, padding) {
  17471. base = base || 10;
  17472. padding = padding | 0 || 1;
  17473. var out;
  17474. if (base === 16 || base === 'hex') {
  17475. out = '';
  17476. var off = 0;
  17477. var carry = 0;
  17478. for (var i = 0; i < this.length; i++) {
  17479. var w = this.words[i];
  17480. var word = (((w << off) | carry) & 0xffffff).toString(16);
  17481. carry = (w >>> (24 - off)) & 0xffffff;
  17482. if (carry !== 0 || i !== this.length - 1) {
  17483. out = zeros[6 - word.length] + word + out;
  17484. } else {
  17485. out = word + out;
  17486. }
  17487. off += 2;
  17488. if (off >= 26) {
  17489. off -= 26;
  17490. i--;
  17491. }
  17492. }
  17493. if (carry !== 0) {
  17494. out = carry.toString(16) + out;
  17495. }
  17496. while (out.length % padding !== 0) {
  17497. out = '0' + out;
  17498. }
  17499. if (this.negative !== 0) {
  17500. out = '-' + out;
  17501. }
  17502. return out;
  17503. }
  17504. if (base === (base | 0) && base >= 2 && base <= 36) {
  17505. // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
  17506. var groupSize = groupSizes[base];
  17507. // var groupBase = Math.pow(base, groupSize);
  17508. var groupBase = groupBases[base];
  17509. out = '';
  17510. var c = this.clone();
  17511. c.negative = 0;
  17512. while (!c.isZero()) {
  17513. var r = c.modn(groupBase).toString(base);
  17514. c = c.idivn(groupBase);
  17515. if (!c.isZero()) {
  17516. out = zeros[groupSize - r.length] + r + out;
  17517. } else {
  17518. out = r + out;
  17519. }
  17520. }
  17521. if (this.isZero()) {
  17522. out = '0' + out;
  17523. }
  17524. while (out.length % padding !== 0) {
  17525. out = '0' + out;
  17526. }
  17527. if (this.negative !== 0) {
  17528. out = '-' + out;
  17529. }
  17530. return out;
  17531. }
  17532. assert(false, 'Base should be between 2 and 36');
  17533. };
  17534. BN.prototype.toNumber = function toNumber () {
  17535. var ret = this.words[0];
  17536. if (this.length === 2) {
  17537. ret += this.words[1] * 0x4000000;
  17538. } else if (this.length === 3 && this.words[2] === 0x01) {
  17539. // NOTE: at this stage it is known that the top bit is set
  17540. ret += 0x10000000000000 + (this.words[1] * 0x4000000);
  17541. } else if (this.length > 2) {
  17542. assert(false, 'Number can only safely store up to 53 bits');
  17543. }
  17544. return (this.negative !== 0) ? -ret : ret;
  17545. };
  17546. BN.prototype.toJSON = function toJSON () {
  17547. return this.toString(16);
  17548. };
  17549. BN.prototype.toBuffer = function toBuffer (endian, length) {
  17550. assert(typeof Buffer !== 'undefined');
  17551. return this.toArrayLike(Buffer, endian, length);
  17552. };
  17553. BN.prototype.toArray = function toArray (endian, length) {
  17554. return this.toArrayLike(Array, endian, length);
  17555. };
  17556. BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
  17557. var byteLength = this.byteLength();
  17558. var reqLength = length || Math.max(1, byteLength);
  17559. assert(byteLength <= reqLength, 'byte array longer than desired length');
  17560. assert(reqLength > 0, 'Requested array length <= 0');
  17561. this.strip();
  17562. var littleEndian = endian === 'le';
  17563. var res = new ArrayType(reqLength);
  17564. var b, i;
  17565. var q = this.clone();
  17566. if (!littleEndian) {
  17567. // Assume big-endian
  17568. for (i = 0; i < reqLength - byteLength; i++) {
  17569. res[i] = 0;
  17570. }
  17571. for (i = 0; !q.isZero(); i++) {
  17572. b = q.andln(0xff);
  17573. q.iushrn(8);
  17574. res[reqLength - i - 1] = b;
  17575. }
  17576. } else {
  17577. for (i = 0; !q.isZero(); i++) {
  17578. b = q.andln(0xff);
  17579. q.iushrn(8);
  17580. res[i] = b;
  17581. }
  17582. for (; i < reqLength; i++) {
  17583. res[i] = 0;
  17584. }
  17585. }
  17586. return res;
  17587. };
  17588. if (Math.clz32) {
  17589. BN.prototype._countBits = function _countBits (w) {
  17590. return 32 - Math.clz32(w);
  17591. };
  17592. } else {
  17593. BN.prototype._countBits = function _countBits (w) {
  17594. var t = w;
  17595. var r = 0;
  17596. if (t >= 0x1000) {
  17597. r += 13;
  17598. t >>>= 13;
  17599. }
  17600. if (t >= 0x40) {
  17601. r += 7;
  17602. t >>>= 7;
  17603. }
  17604. if (t >= 0x8) {
  17605. r += 4;
  17606. t >>>= 4;
  17607. }
  17608. if (t >= 0x02) {
  17609. r += 2;
  17610. t >>>= 2;
  17611. }
  17612. return r + t;
  17613. };
  17614. }
  17615. BN.prototype._zeroBits = function _zeroBits (w) {
  17616. // Short-cut
  17617. if (w === 0) return 26;
  17618. var t = w;
  17619. var r = 0;
  17620. if ((t & 0x1fff) === 0) {
  17621. r += 13;
  17622. t >>>= 13;
  17623. }
  17624. if ((t & 0x7f) === 0) {
  17625. r += 7;
  17626. t >>>= 7;
  17627. }
  17628. if ((t & 0xf) === 0) {
  17629. r += 4;
  17630. t >>>= 4;
  17631. }
  17632. if ((t & 0x3) === 0) {
  17633. r += 2;
  17634. t >>>= 2;
  17635. }
  17636. if ((t & 0x1) === 0) {
  17637. r++;
  17638. }
  17639. return r;
  17640. };
  17641. // Return number of used bits in a BN
  17642. BN.prototype.bitLength = function bitLength () {
  17643. var w = this.words[this.length - 1];
  17644. var hi = this._countBits(w);
  17645. return (this.length - 1) * 26 + hi;
  17646. };
  17647. function toBitArray (num) {
  17648. var w = new Array(num.bitLength());
  17649. for (var bit = 0; bit < w.length; bit++) {
  17650. var off = (bit / 26) | 0;
  17651. var wbit = bit % 26;
  17652. w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
  17653. }
  17654. return w;
  17655. }
  17656. // Number of trailing zero bits
  17657. BN.prototype.zeroBits = function zeroBits () {
  17658. if (this.isZero()) return 0;
  17659. var r = 0;
  17660. for (var i = 0; i < this.length; i++) {
  17661. var b = this._zeroBits(this.words[i]);
  17662. r += b;
  17663. if (b !== 26) break;
  17664. }
  17665. return r;
  17666. };
  17667. BN.prototype.byteLength = function byteLength () {
  17668. return Math.ceil(this.bitLength() / 8);
  17669. };
  17670. BN.prototype.toTwos = function toTwos (width) {
  17671. if (this.negative !== 0) {
  17672. return this.abs().inotn(width).iaddn(1);
  17673. }
  17674. return this.clone();
  17675. };
  17676. BN.prototype.fromTwos = function fromTwos (width) {
  17677. if (this.testn(width - 1)) {
  17678. return this.notn(width).iaddn(1).ineg();
  17679. }
  17680. return this.clone();
  17681. };
  17682. BN.prototype.isNeg = function isNeg () {
  17683. return this.negative !== 0;
  17684. };
  17685. // Return negative clone of `this`
  17686. BN.prototype.neg = function neg () {
  17687. return this.clone().ineg();
  17688. };
  17689. BN.prototype.ineg = function ineg () {
  17690. if (!this.isZero()) {
  17691. this.negative ^= 1;
  17692. }
  17693. return this;
  17694. };
  17695. // Or `num` with `this` in-place
  17696. BN.prototype.iuor = function iuor (num) {
  17697. while (this.length < num.length) {
  17698. this.words[this.length++] = 0;
  17699. }
  17700. for (var i = 0; i < num.length; i++) {
  17701. this.words[i] = this.words[i] | num.words[i];
  17702. }
  17703. return this.strip();
  17704. };
  17705. BN.prototype.ior = function ior (num) {
  17706. assert((this.negative | num.negative) === 0);
  17707. return this.iuor(num);
  17708. };
  17709. // Or `num` with `this`
  17710. BN.prototype.or = function or (num) {
  17711. if (this.length > num.length) return this.clone().ior(num);
  17712. return num.clone().ior(this);
  17713. };
  17714. BN.prototype.uor = function uor (num) {
  17715. if (this.length > num.length) return this.clone().iuor(num);
  17716. return num.clone().iuor(this);
  17717. };
  17718. // And `num` with `this` in-place
  17719. BN.prototype.iuand = function iuand (num) {
  17720. // b = min-length(num, this)
  17721. var b;
  17722. if (this.length > num.length) {
  17723. b = num;
  17724. } else {
  17725. b = this;
  17726. }
  17727. for (var i = 0; i < b.length; i++) {
  17728. this.words[i] = this.words[i] & num.words[i];
  17729. }
  17730. this.length = b.length;
  17731. return this.strip();
  17732. };
  17733. BN.prototype.iand = function iand (num) {
  17734. assert((this.negative | num.negative) === 0);
  17735. return this.iuand(num);
  17736. };
  17737. // And `num` with `this`
  17738. BN.prototype.and = function and (num) {
  17739. if (this.length > num.length) return this.clone().iand(num);
  17740. return num.clone().iand(this);
  17741. };
  17742. BN.prototype.uand = function uand (num) {
  17743. if (this.length > num.length) return this.clone().iuand(num);
  17744. return num.clone().iuand(this);
  17745. };
  17746. // Xor `num` with `this` in-place
  17747. BN.prototype.iuxor = function iuxor (num) {
  17748. // a.length > b.length
  17749. var a;
  17750. var b;
  17751. if (this.length > num.length) {
  17752. a = this;
  17753. b = num;
  17754. } else {
  17755. a = num;
  17756. b = this;
  17757. }
  17758. for (var i = 0; i < b.length; i++) {
  17759. this.words[i] = a.words[i] ^ b.words[i];
  17760. }
  17761. if (this !== a) {
  17762. for (; i < a.length; i++) {
  17763. this.words[i] = a.words[i];
  17764. }
  17765. }
  17766. this.length = a.length;
  17767. return this.strip();
  17768. };
  17769. BN.prototype.ixor = function ixor (num) {
  17770. assert((this.negative | num.negative) === 0);
  17771. return this.iuxor(num);
  17772. };
  17773. // Xor `num` with `this`
  17774. BN.prototype.xor = function xor (num) {
  17775. if (this.length > num.length) return this.clone().ixor(num);
  17776. return num.clone().ixor(this);
  17777. };
  17778. BN.prototype.uxor = function uxor (num) {
  17779. if (this.length > num.length) return this.clone().iuxor(num);
  17780. return num.clone().iuxor(this);
  17781. };
  17782. // Not ``this`` with ``width`` bitwidth
  17783. BN.prototype.inotn = function inotn (width) {
  17784. assert(typeof width === 'number' && width >= 0);
  17785. var bytesNeeded = Math.ceil(width / 26) | 0;
  17786. var bitsLeft = width % 26;
  17787. // Extend the buffer with leading zeroes
  17788. this._expand(bytesNeeded);
  17789. if (bitsLeft > 0) {
  17790. bytesNeeded--;
  17791. }
  17792. // Handle complete words
  17793. for (var i = 0; i < bytesNeeded; i++) {
  17794. this.words[i] = ~this.words[i] & 0x3ffffff;
  17795. }
  17796. // Handle the residue
  17797. if (bitsLeft > 0) {
  17798. this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
  17799. }
  17800. // And remove leading zeroes
  17801. return this.strip();
  17802. };
  17803. BN.prototype.notn = function notn (width) {
  17804. return this.clone().inotn(width);
  17805. };
  17806. // Set `bit` of `this`
  17807. BN.prototype.setn = function setn (bit, val) {
  17808. assert(typeof bit === 'number' && bit >= 0);
  17809. var off = (bit / 26) | 0;
  17810. var wbit = bit % 26;
  17811. this._expand(off + 1);
  17812. if (val) {
  17813. this.words[off] = this.words[off] | (1 << wbit);
  17814. } else {
  17815. this.words[off] = this.words[off] & ~(1 << wbit);
  17816. }
  17817. return this.strip();
  17818. };
  17819. // Add `num` to `this` in-place
  17820. BN.prototype.iadd = function iadd (num) {
  17821. var r;
  17822. // negative + positive
  17823. if (this.negative !== 0 && num.negative === 0) {
  17824. this.negative = 0;
  17825. r = this.isub(num);
  17826. this.negative ^= 1;
  17827. return this._normSign();
  17828. // positive + negative
  17829. } else if (this.negative === 0 && num.negative !== 0) {
  17830. num.negative = 0;
  17831. r = this.isub(num);
  17832. num.negative = 1;
  17833. return r._normSign();
  17834. }
  17835. // a.length > b.length
  17836. var a, b;
  17837. if (this.length > num.length) {
  17838. a = this;
  17839. b = num;
  17840. } else {
  17841. a = num;
  17842. b = this;
  17843. }
  17844. var carry = 0;
  17845. for (var i = 0; i < b.length; i++) {
  17846. r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
  17847. this.words[i] = r & 0x3ffffff;
  17848. carry = r >>> 26;
  17849. }
  17850. for (; carry !== 0 && i < a.length; i++) {
  17851. r = (a.words[i] | 0) + carry;
  17852. this.words[i] = r & 0x3ffffff;
  17853. carry = r >>> 26;
  17854. }
  17855. this.length = a.length;
  17856. if (carry !== 0) {
  17857. this.words[this.length] = carry;
  17858. this.length++;
  17859. // Copy the rest of the words
  17860. } else if (a !== this) {
  17861. for (; i < a.length; i++) {
  17862. this.words[i] = a.words[i];
  17863. }
  17864. }
  17865. return this;
  17866. };
  17867. // Add `num` to `this`
  17868. BN.prototype.add = function add (num) {
  17869. var res;
  17870. if (num.negative !== 0 && this.negative === 0) {
  17871. num.negative = 0;
  17872. res = this.sub(num);
  17873. num.negative ^= 1;
  17874. return res;
  17875. } else if (num.negative === 0 && this.negative !== 0) {
  17876. this.negative = 0;
  17877. res = num.sub(this);
  17878. this.negative = 1;
  17879. return res;
  17880. }
  17881. if (this.length > num.length) return this.clone().iadd(num);
  17882. return num.clone().iadd(this);
  17883. };
  17884. // Subtract `num` from `this` in-place
  17885. BN.prototype.isub = function isub (num) {
  17886. // this - (-num) = this + num
  17887. if (num.negative !== 0) {
  17888. num.negative = 0;
  17889. var r = this.iadd(num);
  17890. num.negative = 1;
  17891. return r._normSign();
  17892. // -this - num = -(this + num)
  17893. } else if (this.negative !== 0) {
  17894. this.negative = 0;
  17895. this.iadd(num);
  17896. this.negative = 1;
  17897. return this._normSign();
  17898. }
  17899. // At this point both numbers are positive
  17900. var cmp = this.cmp(num);
  17901. // Optimization - zeroify
  17902. if (cmp === 0) {
  17903. this.negative = 0;
  17904. this.length = 1;
  17905. this.words[0] = 0;
  17906. return this;
  17907. }
  17908. // a > b
  17909. var a, b;
  17910. if (cmp > 0) {
  17911. a = this;
  17912. b = num;
  17913. } else {
  17914. a = num;
  17915. b = this;
  17916. }
  17917. var carry = 0;
  17918. for (var i = 0; i < b.length; i++) {
  17919. r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
  17920. carry = r >> 26;
  17921. this.words[i] = r & 0x3ffffff;
  17922. }
  17923. for (; carry !== 0 && i < a.length; i++) {
  17924. r = (a.words[i] | 0) + carry;
  17925. carry = r >> 26;
  17926. this.words[i] = r & 0x3ffffff;
  17927. }
  17928. // Copy rest of the words
  17929. if (carry === 0 && i < a.length && a !== this) {
  17930. for (; i < a.length; i++) {
  17931. this.words[i] = a.words[i];
  17932. }
  17933. }
  17934. this.length = Math.max(this.length, i);
  17935. if (a !== this) {
  17936. this.negative = 1;
  17937. }
  17938. return this.strip();
  17939. };
  17940. // Subtract `num` from `this`
  17941. BN.prototype.sub = function sub (num) {
  17942. return this.clone().isub(num);
  17943. };
  17944. function smallMulTo (self, num, out) {
  17945. out.negative = num.negative ^ self.negative;
  17946. var len = (self.length + num.length) | 0;
  17947. out.length = len;
  17948. len = (len - 1) | 0;
  17949. // Peel one iteration (compiler can't do it, because of code complexity)
  17950. var a = self.words[0] | 0;
  17951. var b = num.words[0] | 0;
  17952. var r = a * b;
  17953. var lo = r & 0x3ffffff;
  17954. var carry = (r / 0x4000000) | 0;
  17955. out.words[0] = lo;
  17956. for (var k = 1; k < len; k++) {
  17957. // Sum all words with the same `i + j = k` and accumulate `ncarry`,
  17958. // note that ncarry could be >= 0x3ffffff
  17959. var ncarry = carry >>> 26;
  17960. var rword = carry & 0x3ffffff;
  17961. var maxJ = Math.min(k, num.length - 1);
  17962. for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
  17963. var i = (k - j) | 0;
  17964. a = self.words[i] | 0;
  17965. b = num.words[j] | 0;
  17966. r = a * b + rword;
  17967. ncarry += (r / 0x4000000) | 0;
  17968. rword = r & 0x3ffffff;
  17969. }
  17970. out.words[k] = rword | 0;
  17971. carry = ncarry | 0;
  17972. }
  17973. if (carry !== 0) {
  17974. out.words[k] = carry | 0;
  17975. } else {
  17976. out.length--;
  17977. }
  17978. return out.strip();
  17979. }
  17980. // TODO(indutny): it may be reasonable to omit it for users who don't need
  17981. // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
  17982. // multiplication (like elliptic secp256k1).
  17983. var comb10MulTo = function comb10MulTo (self, num, out) {
  17984. var a = self.words;
  17985. var b = num.words;
  17986. var o = out.words;
  17987. var c = 0;
  17988. var lo;
  17989. var mid;
  17990. var hi;
  17991. var a0 = a[0] | 0;
  17992. var al0 = a0 & 0x1fff;
  17993. var ah0 = a0 >>> 13;
  17994. var a1 = a[1] | 0;
  17995. var al1 = a1 & 0x1fff;
  17996. var ah1 = a1 >>> 13;
  17997. var a2 = a[2] | 0;
  17998. var al2 = a2 & 0x1fff;
  17999. var ah2 = a2 >>> 13;
  18000. var a3 = a[3] | 0;
  18001. var al3 = a3 & 0x1fff;
  18002. var ah3 = a3 >>> 13;
  18003. var a4 = a[4] | 0;
  18004. var al4 = a4 & 0x1fff;
  18005. var ah4 = a4 >>> 13;
  18006. var a5 = a[5] | 0;
  18007. var al5 = a5 & 0x1fff;
  18008. var ah5 = a5 >>> 13;
  18009. var a6 = a[6] | 0;
  18010. var al6 = a6 & 0x1fff;
  18011. var ah6 = a6 >>> 13;
  18012. var a7 = a[7] | 0;
  18013. var al7 = a7 & 0x1fff;
  18014. var ah7 = a7 >>> 13;
  18015. var a8 = a[8] | 0;
  18016. var al8 = a8 & 0x1fff;
  18017. var ah8 = a8 >>> 13;
  18018. var a9 = a[9] | 0;
  18019. var al9 = a9 & 0x1fff;
  18020. var ah9 = a9 >>> 13;
  18021. var b0 = b[0] | 0;
  18022. var bl0 = b0 & 0x1fff;
  18023. var bh0 = b0 >>> 13;
  18024. var b1 = b[1] | 0;
  18025. var bl1 = b1 & 0x1fff;
  18026. var bh1 = b1 >>> 13;
  18027. var b2 = b[2] | 0;
  18028. var bl2 = b2 & 0x1fff;
  18029. var bh2 = b2 >>> 13;
  18030. var b3 = b[3] | 0;
  18031. var bl3 = b3 & 0x1fff;
  18032. var bh3 = b3 >>> 13;
  18033. var b4 = b[4] | 0;
  18034. var bl4 = b4 & 0x1fff;
  18035. var bh4 = b4 >>> 13;
  18036. var b5 = b[5] | 0;
  18037. var bl5 = b5 & 0x1fff;
  18038. var bh5 = b5 >>> 13;
  18039. var b6 = b[6] | 0;
  18040. var bl6 = b6 & 0x1fff;
  18041. var bh6 = b6 >>> 13;
  18042. var b7 = b[7] | 0;
  18043. var bl7 = b7 & 0x1fff;
  18044. var bh7 = b7 >>> 13;
  18045. var b8 = b[8] | 0;
  18046. var bl8 = b8 & 0x1fff;
  18047. var bh8 = b8 >>> 13;
  18048. var b9 = b[9] | 0;
  18049. var bl9 = b9 & 0x1fff;
  18050. var bh9 = b9 >>> 13;
  18051. out.negative = self.negative ^ num.negative;
  18052. out.length = 19;
  18053. /* k = 0 */
  18054. lo = Math.imul(al0, bl0);
  18055. mid = Math.imul(al0, bh0);
  18056. mid = (mid + Math.imul(ah0, bl0)) | 0;
  18057. hi = Math.imul(ah0, bh0);
  18058. var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18059. c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
  18060. w0 &= 0x3ffffff;
  18061. /* k = 1 */
  18062. lo = Math.imul(al1, bl0);
  18063. mid = Math.imul(al1, bh0);
  18064. mid = (mid + Math.imul(ah1, bl0)) | 0;
  18065. hi = Math.imul(ah1, bh0);
  18066. lo = (lo + Math.imul(al0, bl1)) | 0;
  18067. mid = (mid + Math.imul(al0, bh1)) | 0;
  18068. mid = (mid + Math.imul(ah0, bl1)) | 0;
  18069. hi = (hi + Math.imul(ah0, bh1)) | 0;
  18070. var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18071. c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
  18072. w1 &= 0x3ffffff;
  18073. /* k = 2 */
  18074. lo = Math.imul(al2, bl0);
  18075. mid = Math.imul(al2, bh0);
  18076. mid = (mid + Math.imul(ah2, bl0)) | 0;
  18077. hi = Math.imul(ah2, bh0);
  18078. lo = (lo + Math.imul(al1, bl1)) | 0;
  18079. mid = (mid + Math.imul(al1, bh1)) | 0;
  18080. mid = (mid + Math.imul(ah1, bl1)) | 0;
  18081. hi = (hi + Math.imul(ah1, bh1)) | 0;
  18082. lo = (lo + Math.imul(al0, bl2)) | 0;
  18083. mid = (mid + Math.imul(al0, bh2)) | 0;
  18084. mid = (mid + Math.imul(ah0, bl2)) | 0;
  18085. hi = (hi + Math.imul(ah0, bh2)) | 0;
  18086. var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18087. c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
  18088. w2 &= 0x3ffffff;
  18089. /* k = 3 */
  18090. lo = Math.imul(al3, bl0);
  18091. mid = Math.imul(al3, bh0);
  18092. mid = (mid + Math.imul(ah3, bl0)) | 0;
  18093. hi = Math.imul(ah3, bh0);
  18094. lo = (lo + Math.imul(al2, bl1)) | 0;
  18095. mid = (mid + Math.imul(al2, bh1)) | 0;
  18096. mid = (mid + Math.imul(ah2, bl1)) | 0;
  18097. hi = (hi + Math.imul(ah2, bh1)) | 0;
  18098. lo = (lo + Math.imul(al1, bl2)) | 0;
  18099. mid = (mid + Math.imul(al1, bh2)) | 0;
  18100. mid = (mid + Math.imul(ah1, bl2)) | 0;
  18101. hi = (hi + Math.imul(ah1, bh2)) | 0;
  18102. lo = (lo + Math.imul(al0, bl3)) | 0;
  18103. mid = (mid + Math.imul(al0, bh3)) | 0;
  18104. mid = (mid + Math.imul(ah0, bl3)) | 0;
  18105. hi = (hi + Math.imul(ah0, bh3)) | 0;
  18106. var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18107. c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
  18108. w3 &= 0x3ffffff;
  18109. /* k = 4 */
  18110. lo = Math.imul(al4, bl0);
  18111. mid = Math.imul(al4, bh0);
  18112. mid = (mid + Math.imul(ah4, bl0)) | 0;
  18113. hi = Math.imul(ah4, bh0);
  18114. lo = (lo + Math.imul(al3, bl1)) | 0;
  18115. mid = (mid + Math.imul(al3, bh1)) | 0;
  18116. mid = (mid + Math.imul(ah3, bl1)) | 0;
  18117. hi = (hi + Math.imul(ah3, bh1)) | 0;
  18118. lo = (lo + Math.imul(al2, bl2)) | 0;
  18119. mid = (mid + Math.imul(al2, bh2)) | 0;
  18120. mid = (mid + Math.imul(ah2, bl2)) | 0;
  18121. hi = (hi + Math.imul(ah2, bh2)) | 0;
  18122. lo = (lo + Math.imul(al1, bl3)) | 0;
  18123. mid = (mid + Math.imul(al1, bh3)) | 0;
  18124. mid = (mid + Math.imul(ah1, bl3)) | 0;
  18125. hi = (hi + Math.imul(ah1, bh3)) | 0;
  18126. lo = (lo + Math.imul(al0, bl4)) | 0;
  18127. mid = (mid + Math.imul(al0, bh4)) | 0;
  18128. mid = (mid + Math.imul(ah0, bl4)) | 0;
  18129. hi = (hi + Math.imul(ah0, bh4)) | 0;
  18130. var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18131. c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
  18132. w4 &= 0x3ffffff;
  18133. /* k = 5 */
  18134. lo = Math.imul(al5, bl0);
  18135. mid = Math.imul(al5, bh0);
  18136. mid = (mid + Math.imul(ah5, bl0)) | 0;
  18137. hi = Math.imul(ah5, bh0);
  18138. lo = (lo + Math.imul(al4, bl1)) | 0;
  18139. mid = (mid + Math.imul(al4, bh1)) | 0;
  18140. mid = (mid + Math.imul(ah4, bl1)) | 0;
  18141. hi = (hi + Math.imul(ah4, bh1)) | 0;
  18142. lo = (lo + Math.imul(al3, bl2)) | 0;
  18143. mid = (mid + Math.imul(al3, bh2)) | 0;
  18144. mid = (mid + Math.imul(ah3, bl2)) | 0;
  18145. hi = (hi + Math.imul(ah3, bh2)) | 0;
  18146. lo = (lo + Math.imul(al2, bl3)) | 0;
  18147. mid = (mid + Math.imul(al2, bh3)) | 0;
  18148. mid = (mid + Math.imul(ah2, bl3)) | 0;
  18149. hi = (hi + Math.imul(ah2, bh3)) | 0;
  18150. lo = (lo + Math.imul(al1, bl4)) | 0;
  18151. mid = (mid + Math.imul(al1, bh4)) | 0;
  18152. mid = (mid + Math.imul(ah1, bl4)) | 0;
  18153. hi = (hi + Math.imul(ah1, bh4)) | 0;
  18154. lo = (lo + Math.imul(al0, bl5)) | 0;
  18155. mid = (mid + Math.imul(al0, bh5)) | 0;
  18156. mid = (mid + Math.imul(ah0, bl5)) | 0;
  18157. hi = (hi + Math.imul(ah0, bh5)) | 0;
  18158. var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18159. c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
  18160. w5 &= 0x3ffffff;
  18161. /* k = 6 */
  18162. lo = Math.imul(al6, bl0);
  18163. mid = Math.imul(al6, bh0);
  18164. mid = (mid + Math.imul(ah6, bl0)) | 0;
  18165. hi = Math.imul(ah6, bh0);
  18166. lo = (lo + Math.imul(al5, bl1)) | 0;
  18167. mid = (mid + Math.imul(al5, bh1)) | 0;
  18168. mid = (mid + Math.imul(ah5, bl1)) | 0;
  18169. hi = (hi + Math.imul(ah5, bh1)) | 0;
  18170. lo = (lo + Math.imul(al4, bl2)) | 0;
  18171. mid = (mid + Math.imul(al4, bh2)) | 0;
  18172. mid = (mid + Math.imul(ah4, bl2)) | 0;
  18173. hi = (hi + Math.imul(ah4, bh2)) | 0;
  18174. lo = (lo + Math.imul(al3, bl3)) | 0;
  18175. mid = (mid + Math.imul(al3, bh3)) | 0;
  18176. mid = (mid + Math.imul(ah3, bl3)) | 0;
  18177. hi = (hi + Math.imul(ah3, bh3)) | 0;
  18178. lo = (lo + Math.imul(al2, bl4)) | 0;
  18179. mid = (mid + Math.imul(al2, bh4)) | 0;
  18180. mid = (mid + Math.imul(ah2, bl4)) | 0;
  18181. hi = (hi + Math.imul(ah2, bh4)) | 0;
  18182. lo = (lo + Math.imul(al1, bl5)) | 0;
  18183. mid = (mid + Math.imul(al1, bh5)) | 0;
  18184. mid = (mid + Math.imul(ah1, bl5)) | 0;
  18185. hi = (hi + Math.imul(ah1, bh5)) | 0;
  18186. lo = (lo + Math.imul(al0, bl6)) | 0;
  18187. mid = (mid + Math.imul(al0, bh6)) | 0;
  18188. mid = (mid + Math.imul(ah0, bl6)) | 0;
  18189. hi = (hi + Math.imul(ah0, bh6)) | 0;
  18190. var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18191. c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
  18192. w6 &= 0x3ffffff;
  18193. /* k = 7 */
  18194. lo = Math.imul(al7, bl0);
  18195. mid = Math.imul(al7, bh0);
  18196. mid = (mid + Math.imul(ah7, bl0)) | 0;
  18197. hi = Math.imul(ah7, bh0);
  18198. lo = (lo + Math.imul(al6, bl1)) | 0;
  18199. mid = (mid + Math.imul(al6, bh1)) | 0;
  18200. mid = (mid + Math.imul(ah6, bl1)) | 0;
  18201. hi = (hi + Math.imul(ah6, bh1)) | 0;
  18202. lo = (lo + Math.imul(al5, bl2)) | 0;
  18203. mid = (mid + Math.imul(al5, bh2)) | 0;
  18204. mid = (mid + Math.imul(ah5, bl2)) | 0;
  18205. hi = (hi + Math.imul(ah5, bh2)) | 0;
  18206. lo = (lo + Math.imul(al4, bl3)) | 0;
  18207. mid = (mid + Math.imul(al4, bh3)) | 0;
  18208. mid = (mid + Math.imul(ah4, bl3)) | 0;
  18209. hi = (hi + Math.imul(ah4, bh3)) | 0;
  18210. lo = (lo + Math.imul(al3, bl4)) | 0;
  18211. mid = (mid + Math.imul(al3, bh4)) | 0;
  18212. mid = (mid + Math.imul(ah3, bl4)) | 0;
  18213. hi = (hi + Math.imul(ah3, bh4)) | 0;
  18214. lo = (lo + Math.imul(al2, bl5)) | 0;
  18215. mid = (mid + Math.imul(al2, bh5)) | 0;
  18216. mid = (mid + Math.imul(ah2, bl5)) | 0;
  18217. hi = (hi + Math.imul(ah2, bh5)) | 0;
  18218. lo = (lo + Math.imul(al1, bl6)) | 0;
  18219. mid = (mid + Math.imul(al1, bh6)) | 0;
  18220. mid = (mid + Math.imul(ah1, bl6)) | 0;
  18221. hi = (hi + Math.imul(ah1, bh6)) | 0;
  18222. lo = (lo + Math.imul(al0, bl7)) | 0;
  18223. mid = (mid + Math.imul(al0, bh7)) | 0;
  18224. mid = (mid + Math.imul(ah0, bl7)) | 0;
  18225. hi = (hi + Math.imul(ah0, bh7)) | 0;
  18226. var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18227. c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
  18228. w7 &= 0x3ffffff;
  18229. /* k = 8 */
  18230. lo = Math.imul(al8, bl0);
  18231. mid = Math.imul(al8, bh0);
  18232. mid = (mid + Math.imul(ah8, bl0)) | 0;
  18233. hi = Math.imul(ah8, bh0);
  18234. lo = (lo + Math.imul(al7, bl1)) | 0;
  18235. mid = (mid + Math.imul(al7, bh1)) | 0;
  18236. mid = (mid + Math.imul(ah7, bl1)) | 0;
  18237. hi = (hi + Math.imul(ah7, bh1)) | 0;
  18238. lo = (lo + Math.imul(al6, bl2)) | 0;
  18239. mid = (mid + Math.imul(al6, bh2)) | 0;
  18240. mid = (mid + Math.imul(ah6, bl2)) | 0;
  18241. hi = (hi + Math.imul(ah6, bh2)) | 0;
  18242. lo = (lo + Math.imul(al5, bl3)) | 0;
  18243. mid = (mid + Math.imul(al5, bh3)) | 0;
  18244. mid = (mid + Math.imul(ah5, bl3)) | 0;
  18245. hi = (hi + Math.imul(ah5, bh3)) | 0;
  18246. lo = (lo + Math.imul(al4, bl4)) | 0;
  18247. mid = (mid + Math.imul(al4, bh4)) | 0;
  18248. mid = (mid + Math.imul(ah4, bl4)) | 0;
  18249. hi = (hi + Math.imul(ah4, bh4)) | 0;
  18250. lo = (lo + Math.imul(al3, bl5)) | 0;
  18251. mid = (mid + Math.imul(al3, bh5)) | 0;
  18252. mid = (mid + Math.imul(ah3, bl5)) | 0;
  18253. hi = (hi + Math.imul(ah3, bh5)) | 0;
  18254. lo = (lo + Math.imul(al2, bl6)) | 0;
  18255. mid = (mid + Math.imul(al2, bh6)) | 0;
  18256. mid = (mid + Math.imul(ah2, bl6)) | 0;
  18257. hi = (hi + Math.imul(ah2, bh6)) | 0;
  18258. lo = (lo + Math.imul(al1, bl7)) | 0;
  18259. mid = (mid + Math.imul(al1, bh7)) | 0;
  18260. mid = (mid + Math.imul(ah1, bl7)) | 0;
  18261. hi = (hi + Math.imul(ah1, bh7)) | 0;
  18262. lo = (lo + Math.imul(al0, bl8)) | 0;
  18263. mid = (mid + Math.imul(al0, bh8)) | 0;
  18264. mid = (mid + Math.imul(ah0, bl8)) | 0;
  18265. hi = (hi + Math.imul(ah0, bh8)) | 0;
  18266. var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18267. c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
  18268. w8 &= 0x3ffffff;
  18269. /* k = 9 */
  18270. lo = Math.imul(al9, bl0);
  18271. mid = Math.imul(al9, bh0);
  18272. mid = (mid + Math.imul(ah9, bl0)) | 0;
  18273. hi = Math.imul(ah9, bh0);
  18274. lo = (lo + Math.imul(al8, bl1)) | 0;
  18275. mid = (mid + Math.imul(al8, bh1)) | 0;
  18276. mid = (mid + Math.imul(ah8, bl1)) | 0;
  18277. hi = (hi + Math.imul(ah8, bh1)) | 0;
  18278. lo = (lo + Math.imul(al7, bl2)) | 0;
  18279. mid = (mid + Math.imul(al7, bh2)) | 0;
  18280. mid = (mid + Math.imul(ah7, bl2)) | 0;
  18281. hi = (hi + Math.imul(ah7, bh2)) | 0;
  18282. lo = (lo + Math.imul(al6, bl3)) | 0;
  18283. mid = (mid + Math.imul(al6, bh3)) | 0;
  18284. mid = (mid + Math.imul(ah6, bl3)) | 0;
  18285. hi = (hi + Math.imul(ah6, bh3)) | 0;
  18286. lo = (lo + Math.imul(al5, bl4)) | 0;
  18287. mid = (mid + Math.imul(al5, bh4)) | 0;
  18288. mid = (mid + Math.imul(ah5, bl4)) | 0;
  18289. hi = (hi + Math.imul(ah5, bh4)) | 0;
  18290. lo = (lo + Math.imul(al4, bl5)) | 0;
  18291. mid = (mid + Math.imul(al4, bh5)) | 0;
  18292. mid = (mid + Math.imul(ah4, bl5)) | 0;
  18293. hi = (hi + Math.imul(ah4, bh5)) | 0;
  18294. lo = (lo + Math.imul(al3, bl6)) | 0;
  18295. mid = (mid + Math.imul(al3, bh6)) | 0;
  18296. mid = (mid + Math.imul(ah3, bl6)) | 0;
  18297. hi = (hi + Math.imul(ah3, bh6)) | 0;
  18298. lo = (lo + Math.imul(al2, bl7)) | 0;
  18299. mid = (mid + Math.imul(al2, bh7)) | 0;
  18300. mid = (mid + Math.imul(ah2, bl7)) | 0;
  18301. hi = (hi + Math.imul(ah2, bh7)) | 0;
  18302. lo = (lo + Math.imul(al1, bl8)) | 0;
  18303. mid = (mid + Math.imul(al1, bh8)) | 0;
  18304. mid = (mid + Math.imul(ah1, bl8)) | 0;
  18305. hi = (hi + Math.imul(ah1, bh8)) | 0;
  18306. lo = (lo + Math.imul(al0, bl9)) | 0;
  18307. mid = (mid + Math.imul(al0, bh9)) | 0;
  18308. mid = (mid + Math.imul(ah0, bl9)) | 0;
  18309. hi = (hi + Math.imul(ah0, bh9)) | 0;
  18310. var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18311. c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
  18312. w9 &= 0x3ffffff;
  18313. /* k = 10 */
  18314. lo = Math.imul(al9, bl1);
  18315. mid = Math.imul(al9, bh1);
  18316. mid = (mid + Math.imul(ah9, bl1)) | 0;
  18317. hi = Math.imul(ah9, bh1);
  18318. lo = (lo + Math.imul(al8, bl2)) | 0;
  18319. mid = (mid + Math.imul(al8, bh2)) | 0;
  18320. mid = (mid + Math.imul(ah8, bl2)) | 0;
  18321. hi = (hi + Math.imul(ah8, bh2)) | 0;
  18322. lo = (lo + Math.imul(al7, bl3)) | 0;
  18323. mid = (mid + Math.imul(al7, bh3)) | 0;
  18324. mid = (mid + Math.imul(ah7, bl3)) | 0;
  18325. hi = (hi + Math.imul(ah7, bh3)) | 0;
  18326. lo = (lo + Math.imul(al6, bl4)) | 0;
  18327. mid = (mid + Math.imul(al6, bh4)) | 0;
  18328. mid = (mid + Math.imul(ah6, bl4)) | 0;
  18329. hi = (hi + Math.imul(ah6, bh4)) | 0;
  18330. lo = (lo + Math.imul(al5, bl5)) | 0;
  18331. mid = (mid + Math.imul(al5, bh5)) | 0;
  18332. mid = (mid + Math.imul(ah5, bl5)) | 0;
  18333. hi = (hi + Math.imul(ah5, bh5)) | 0;
  18334. lo = (lo + Math.imul(al4, bl6)) | 0;
  18335. mid = (mid + Math.imul(al4, bh6)) | 0;
  18336. mid = (mid + Math.imul(ah4, bl6)) | 0;
  18337. hi = (hi + Math.imul(ah4, bh6)) | 0;
  18338. lo = (lo + Math.imul(al3, bl7)) | 0;
  18339. mid = (mid + Math.imul(al3, bh7)) | 0;
  18340. mid = (mid + Math.imul(ah3, bl7)) | 0;
  18341. hi = (hi + Math.imul(ah3, bh7)) | 0;
  18342. lo = (lo + Math.imul(al2, bl8)) | 0;
  18343. mid = (mid + Math.imul(al2, bh8)) | 0;
  18344. mid = (mid + Math.imul(ah2, bl8)) | 0;
  18345. hi = (hi + Math.imul(ah2, bh8)) | 0;
  18346. lo = (lo + Math.imul(al1, bl9)) | 0;
  18347. mid = (mid + Math.imul(al1, bh9)) | 0;
  18348. mid = (mid + Math.imul(ah1, bl9)) | 0;
  18349. hi = (hi + Math.imul(ah1, bh9)) | 0;
  18350. var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18351. c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
  18352. w10 &= 0x3ffffff;
  18353. /* k = 11 */
  18354. lo = Math.imul(al9, bl2);
  18355. mid = Math.imul(al9, bh2);
  18356. mid = (mid + Math.imul(ah9, bl2)) | 0;
  18357. hi = Math.imul(ah9, bh2);
  18358. lo = (lo + Math.imul(al8, bl3)) | 0;
  18359. mid = (mid + Math.imul(al8, bh3)) | 0;
  18360. mid = (mid + Math.imul(ah8, bl3)) | 0;
  18361. hi = (hi + Math.imul(ah8, bh3)) | 0;
  18362. lo = (lo + Math.imul(al7, bl4)) | 0;
  18363. mid = (mid + Math.imul(al7, bh4)) | 0;
  18364. mid = (mid + Math.imul(ah7, bl4)) | 0;
  18365. hi = (hi + Math.imul(ah7, bh4)) | 0;
  18366. lo = (lo + Math.imul(al6, bl5)) | 0;
  18367. mid = (mid + Math.imul(al6, bh5)) | 0;
  18368. mid = (mid + Math.imul(ah6, bl5)) | 0;
  18369. hi = (hi + Math.imul(ah6, bh5)) | 0;
  18370. lo = (lo + Math.imul(al5, bl6)) | 0;
  18371. mid = (mid + Math.imul(al5, bh6)) | 0;
  18372. mid = (mid + Math.imul(ah5, bl6)) | 0;
  18373. hi = (hi + Math.imul(ah5, bh6)) | 0;
  18374. lo = (lo + Math.imul(al4, bl7)) | 0;
  18375. mid = (mid + Math.imul(al4, bh7)) | 0;
  18376. mid = (mid + Math.imul(ah4, bl7)) | 0;
  18377. hi = (hi + Math.imul(ah4, bh7)) | 0;
  18378. lo = (lo + Math.imul(al3, bl8)) | 0;
  18379. mid = (mid + Math.imul(al3, bh8)) | 0;
  18380. mid = (mid + Math.imul(ah3, bl8)) | 0;
  18381. hi = (hi + Math.imul(ah3, bh8)) | 0;
  18382. lo = (lo + Math.imul(al2, bl9)) | 0;
  18383. mid = (mid + Math.imul(al2, bh9)) | 0;
  18384. mid = (mid + Math.imul(ah2, bl9)) | 0;
  18385. hi = (hi + Math.imul(ah2, bh9)) | 0;
  18386. var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18387. c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
  18388. w11 &= 0x3ffffff;
  18389. /* k = 12 */
  18390. lo = Math.imul(al9, bl3);
  18391. mid = Math.imul(al9, bh3);
  18392. mid = (mid + Math.imul(ah9, bl3)) | 0;
  18393. hi = Math.imul(ah9, bh3);
  18394. lo = (lo + Math.imul(al8, bl4)) | 0;
  18395. mid = (mid + Math.imul(al8, bh4)) | 0;
  18396. mid = (mid + Math.imul(ah8, bl4)) | 0;
  18397. hi = (hi + Math.imul(ah8, bh4)) | 0;
  18398. lo = (lo + Math.imul(al7, bl5)) | 0;
  18399. mid = (mid + Math.imul(al7, bh5)) | 0;
  18400. mid = (mid + Math.imul(ah7, bl5)) | 0;
  18401. hi = (hi + Math.imul(ah7, bh5)) | 0;
  18402. lo = (lo + Math.imul(al6, bl6)) | 0;
  18403. mid = (mid + Math.imul(al6, bh6)) | 0;
  18404. mid = (mid + Math.imul(ah6, bl6)) | 0;
  18405. hi = (hi + Math.imul(ah6, bh6)) | 0;
  18406. lo = (lo + Math.imul(al5, bl7)) | 0;
  18407. mid = (mid + Math.imul(al5, bh7)) | 0;
  18408. mid = (mid + Math.imul(ah5, bl7)) | 0;
  18409. hi = (hi + Math.imul(ah5, bh7)) | 0;
  18410. lo = (lo + Math.imul(al4, bl8)) | 0;
  18411. mid = (mid + Math.imul(al4, bh8)) | 0;
  18412. mid = (mid + Math.imul(ah4, bl8)) | 0;
  18413. hi = (hi + Math.imul(ah4, bh8)) | 0;
  18414. lo = (lo + Math.imul(al3, bl9)) | 0;
  18415. mid = (mid + Math.imul(al3, bh9)) | 0;
  18416. mid = (mid + Math.imul(ah3, bl9)) | 0;
  18417. hi = (hi + Math.imul(ah3, bh9)) | 0;
  18418. var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18419. c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
  18420. w12 &= 0x3ffffff;
  18421. /* k = 13 */
  18422. lo = Math.imul(al9, bl4);
  18423. mid = Math.imul(al9, bh4);
  18424. mid = (mid + Math.imul(ah9, bl4)) | 0;
  18425. hi = Math.imul(ah9, bh4);
  18426. lo = (lo + Math.imul(al8, bl5)) | 0;
  18427. mid = (mid + Math.imul(al8, bh5)) | 0;
  18428. mid = (mid + Math.imul(ah8, bl5)) | 0;
  18429. hi = (hi + Math.imul(ah8, bh5)) | 0;
  18430. lo = (lo + Math.imul(al7, bl6)) | 0;
  18431. mid = (mid + Math.imul(al7, bh6)) | 0;
  18432. mid = (mid + Math.imul(ah7, bl6)) | 0;
  18433. hi = (hi + Math.imul(ah7, bh6)) | 0;
  18434. lo = (lo + Math.imul(al6, bl7)) | 0;
  18435. mid = (mid + Math.imul(al6, bh7)) | 0;
  18436. mid = (mid + Math.imul(ah6, bl7)) | 0;
  18437. hi = (hi + Math.imul(ah6, bh7)) | 0;
  18438. lo = (lo + Math.imul(al5, bl8)) | 0;
  18439. mid = (mid + Math.imul(al5, bh8)) | 0;
  18440. mid = (mid + Math.imul(ah5, bl8)) | 0;
  18441. hi = (hi + Math.imul(ah5, bh8)) | 0;
  18442. lo = (lo + Math.imul(al4, bl9)) | 0;
  18443. mid = (mid + Math.imul(al4, bh9)) | 0;
  18444. mid = (mid + Math.imul(ah4, bl9)) | 0;
  18445. hi = (hi + Math.imul(ah4, bh9)) | 0;
  18446. var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18447. c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
  18448. w13 &= 0x3ffffff;
  18449. /* k = 14 */
  18450. lo = Math.imul(al9, bl5);
  18451. mid = Math.imul(al9, bh5);
  18452. mid = (mid + Math.imul(ah9, bl5)) | 0;
  18453. hi = Math.imul(ah9, bh5);
  18454. lo = (lo + Math.imul(al8, bl6)) | 0;
  18455. mid = (mid + Math.imul(al8, bh6)) | 0;
  18456. mid = (mid + Math.imul(ah8, bl6)) | 0;
  18457. hi = (hi + Math.imul(ah8, bh6)) | 0;
  18458. lo = (lo + Math.imul(al7, bl7)) | 0;
  18459. mid = (mid + Math.imul(al7, bh7)) | 0;
  18460. mid = (mid + Math.imul(ah7, bl7)) | 0;
  18461. hi = (hi + Math.imul(ah7, bh7)) | 0;
  18462. lo = (lo + Math.imul(al6, bl8)) | 0;
  18463. mid = (mid + Math.imul(al6, bh8)) | 0;
  18464. mid = (mid + Math.imul(ah6, bl8)) | 0;
  18465. hi = (hi + Math.imul(ah6, bh8)) | 0;
  18466. lo = (lo + Math.imul(al5, bl9)) | 0;
  18467. mid = (mid + Math.imul(al5, bh9)) | 0;
  18468. mid = (mid + Math.imul(ah5, bl9)) | 0;
  18469. hi = (hi + Math.imul(ah5, bh9)) | 0;
  18470. var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18471. c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
  18472. w14 &= 0x3ffffff;
  18473. /* k = 15 */
  18474. lo = Math.imul(al9, bl6);
  18475. mid = Math.imul(al9, bh6);
  18476. mid = (mid + Math.imul(ah9, bl6)) | 0;
  18477. hi = Math.imul(ah9, bh6);
  18478. lo = (lo + Math.imul(al8, bl7)) | 0;
  18479. mid = (mid + Math.imul(al8, bh7)) | 0;
  18480. mid = (mid + Math.imul(ah8, bl7)) | 0;
  18481. hi = (hi + Math.imul(ah8, bh7)) | 0;
  18482. lo = (lo + Math.imul(al7, bl8)) | 0;
  18483. mid = (mid + Math.imul(al7, bh8)) | 0;
  18484. mid = (mid + Math.imul(ah7, bl8)) | 0;
  18485. hi = (hi + Math.imul(ah7, bh8)) | 0;
  18486. lo = (lo + Math.imul(al6, bl9)) | 0;
  18487. mid = (mid + Math.imul(al6, bh9)) | 0;
  18488. mid = (mid + Math.imul(ah6, bl9)) | 0;
  18489. hi = (hi + Math.imul(ah6, bh9)) | 0;
  18490. var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18491. c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
  18492. w15 &= 0x3ffffff;
  18493. /* k = 16 */
  18494. lo = Math.imul(al9, bl7);
  18495. mid = Math.imul(al9, bh7);
  18496. mid = (mid + Math.imul(ah9, bl7)) | 0;
  18497. hi = Math.imul(ah9, bh7);
  18498. lo = (lo + Math.imul(al8, bl8)) | 0;
  18499. mid = (mid + Math.imul(al8, bh8)) | 0;
  18500. mid = (mid + Math.imul(ah8, bl8)) | 0;
  18501. hi = (hi + Math.imul(ah8, bh8)) | 0;
  18502. lo = (lo + Math.imul(al7, bl9)) | 0;
  18503. mid = (mid + Math.imul(al7, bh9)) | 0;
  18504. mid = (mid + Math.imul(ah7, bl9)) | 0;
  18505. hi = (hi + Math.imul(ah7, bh9)) | 0;
  18506. var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18507. c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
  18508. w16 &= 0x3ffffff;
  18509. /* k = 17 */
  18510. lo = Math.imul(al9, bl8);
  18511. mid = Math.imul(al9, bh8);
  18512. mid = (mid + Math.imul(ah9, bl8)) | 0;
  18513. hi = Math.imul(ah9, bh8);
  18514. lo = (lo + Math.imul(al8, bl9)) | 0;
  18515. mid = (mid + Math.imul(al8, bh9)) | 0;
  18516. mid = (mid + Math.imul(ah8, bl9)) | 0;
  18517. hi = (hi + Math.imul(ah8, bh9)) | 0;
  18518. var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18519. c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
  18520. w17 &= 0x3ffffff;
  18521. /* k = 18 */
  18522. lo = Math.imul(al9, bl9);
  18523. mid = Math.imul(al9, bh9);
  18524. mid = (mid + Math.imul(ah9, bl9)) | 0;
  18525. hi = Math.imul(ah9, bh9);
  18526. var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
  18527. c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
  18528. w18 &= 0x3ffffff;
  18529. o[0] = w0;
  18530. o[1] = w1;
  18531. o[2] = w2;
  18532. o[3] = w3;
  18533. o[4] = w4;
  18534. o[5] = w5;
  18535. o[6] = w6;
  18536. o[7] = w7;
  18537. o[8] = w8;
  18538. o[9] = w9;
  18539. o[10] = w10;
  18540. o[11] = w11;
  18541. o[12] = w12;
  18542. o[13] = w13;
  18543. o[14] = w14;
  18544. o[15] = w15;
  18545. o[16] = w16;
  18546. o[17] = w17;
  18547. o[18] = w18;
  18548. if (c !== 0) {
  18549. o[19] = c;
  18550. out.length++;
  18551. }
  18552. return out;
  18553. };
  18554. // Polyfill comb
  18555. if (!Math.imul) {
  18556. comb10MulTo = smallMulTo;
  18557. }
  18558. function bigMulTo (self, num, out) {
  18559. out.negative = num.negative ^ self.negative;
  18560. out.length = self.length + num.length;
  18561. var carry = 0;
  18562. var hncarry = 0;
  18563. for (var k = 0; k < out.length - 1; k++) {
  18564. // Sum all words with the same `i + j = k` and accumulate `ncarry`,
  18565. // note that ncarry could be >= 0x3ffffff
  18566. var ncarry = hncarry;
  18567. hncarry = 0;
  18568. var rword = carry & 0x3ffffff;
  18569. var maxJ = Math.min(k, num.length - 1);
  18570. for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
  18571. var i = k - j;
  18572. var a = self.words[i] | 0;
  18573. var b = num.words[j] | 0;
  18574. var r = a * b;
  18575. var lo = r & 0x3ffffff;
  18576. ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
  18577. lo = (lo + rword) | 0;
  18578. rword = lo & 0x3ffffff;
  18579. ncarry = (ncarry + (lo >>> 26)) | 0;
  18580. hncarry += ncarry >>> 26;
  18581. ncarry &= 0x3ffffff;
  18582. }
  18583. out.words[k] = rword;
  18584. carry = ncarry;
  18585. ncarry = hncarry;
  18586. }
  18587. if (carry !== 0) {
  18588. out.words[k] = carry;
  18589. } else {
  18590. out.length--;
  18591. }
  18592. return out.strip();
  18593. }
  18594. function jumboMulTo (self, num, out) {
  18595. var fftm = new FFTM();
  18596. return fftm.mulp(self, num, out);
  18597. }
  18598. BN.prototype.mulTo = function mulTo (num, out) {
  18599. var res;
  18600. var len = this.length + num.length;
  18601. if (this.length === 10 && num.length === 10) {
  18602. res = comb10MulTo(this, num, out);
  18603. } else if (len < 63) {
  18604. res = smallMulTo(this, num, out);
  18605. } else if (len < 1024) {
  18606. res = bigMulTo(this, num, out);
  18607. } else {
  18608. res = jumboMulTo(this, num, out);
  18609. }
  18610. return res;
  18611. };
  18612. // Cooley-Tukey algorithm for FFT
  18613. // slightly revisited to rely on looping instead of recursion
  18614. function FFTM (x, y) {
  18615. this.x = x;
  18616. this.y = y;
  18617. }
  18618. FFTM.prototype.makeRBT = function makeRBT (N) {
  18619. var t = new Array(N);
  18620. var l = BN.prototype._countBits(N) - 1;
  18621. for (var i = 0; i < N; i++) {
  18622. t[i] = this.revBin(i, l, N);
  18623. }
  18624. return t;
  18625. };
  18626. // Returns binary-reversed representation of `x`
  18627. FFTM.prototype.revBin = function revBin (x, l, N) {
  18628. if (x === 0 || x === N - 1) return x;
  18629. var rb = 0;
  18630. for (var i = 0; i < l; i++) {
  18631. rb |= (x & 1) << (l - i - 1);
  18632. x >>= 1;
  18633. }
  18634. return rb;
  18635. };
  18636. // Performs "tweedling" phase, therefore 'emulating'
  18637. // behaviour of the recursive algorithm
  18638. FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
  18639. for (var i = 0; i < N; i++) {
  18640. rtws[i] = rws[rbt[i]];
  18641. itws[i] = iws[rbt[i]];
  18642. }
  18643. };
  18644. FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
  18645. this.permute(rbt, rws, iws, rtws, itws, N);
  18646. for (var s = 1; s < N; s <<= 1) {
  18647. var l = s << 1;
  18648. var rtwdf = Math.cos(2 * Math.PI / l);
  18649. var itwdf = Math.sin(2 * Math.PI / l);
  18650. for (var p = 0; p < N; p += l) {
  18651. var rtwdf_ = rtwdf;
  18652. var itwdf_ = itwdf;
  18653. for (var j = 0; j < s; j++) {
  18654. var re = rtws[p + j];
  18655. var ie = itws[p + j];
  18656. var ro = rtws[p + j + s];
  18657. var io = itws[p + j + s];
  18658. var rx = rtwdf_ * ro - itwdf_ * io;
  18659. io = rtwdf_ * io + itwdf_ * ro;
  18660. ro = rx;
  18661. rtws[p + j] = re + ro;
  18662. itws[p + j] = ie + io;
  18663. rtws[p + j + s] = re - ro;
  18664. itws[p + j + s] = ie - io;
  18665. /* jshint maxdepth : false */
  18666. if (j !== l) {
  18667. rx = rtwdf * rtwdf_ - itwdf * itwdf_;
  18668. itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
  18669. rtwdf_ = rx;
  18670. }
  18671. }
  18672. }
  18673. }
  18674. };
  18675. FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
  18676. var N = Math.max(m, n) | 1;
  18677. var odd = N & 1;
  18678. var i = 0;
  18679. for (N = N / 2 | 0; N; N = N >>> 1) {
  18680. i++;
  18681. }
  18682. return 1 << i + 1 + odd;
  18683. };
  18684. FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
  18685. if (N <= 1) return;
  18686. for (var i = 0; i < N / 2; i++) {
  18687. var t = rws[i];
  18688. rws[i] = rws[N - i - 1];
  18689. rws[N - i - 1] = t;
  18690. t = iws[i];
  18691. iws[i] = -iws[N - i - 1];
  18692. iws[N - i - 1] = -t;
  18693. }
  18694. };
  18695. FFTM.prototype.normalize13b = function normalize13b (ws, N) {
  18696. var carry = 0;
  18697. for (var i = 0; i < N / 2; i++) {
  18698. var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
  18699. Math.round(ws[2 * i] / N) +
  18700. carry;
  18701. ws[i] = w & 0x3ffffff;
  18702. if (w < 0x4000000) {
  18703. carry = 0;
  18704. } else {
  18705. carry = w / 0x4000000 | 0;
  18706. }
  18707. }
  18708. return ws;
  18709. };
  18710. FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
  18711. var carry = 0;
  18712. for (var i = 0; i < len; i++) {
  18713. carry = carry + (ws[i] | 0);
  18714. rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
  18715. rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
  18716. }
  18717. // Pad with zeroes
  18718. for (i = 2 * len; i < N; ++i) {
  18719. rws[i] = 0;
  18720. }
  18721. assert(carry === 0);
  18722. assert((carry & ~0x1fff) === 0);
  18723. };
  18724. FFTM.prototype.stub = function stub (N) {
  18725. var ph = new Array(N);
  18726. for (var i = 0; i < N; i++) {
  18727. ph[i] = 0;
  18728. }
  18729. return ph;
  18730. };
  18731. FFTM.prototype.mulp = function mulp (x, y, out) {
  18732. var N = 2 * this.guessLen13b(x.length, y.length);
  18733. var rbt = this.makeRBT(N);
  18734. var _ = this.stub(N);
  18735. var rws = new Array(N);
  18736. var rwst = new Array(N);
  18737. var iwst = new Array(N);
  18738. var nrws = new Array(N);
  18739. var nrwst = new Array(N);
  18740. var niwst = new Array(N);
  18741. var rmws = out.words;
  18742. rmws.length = N;
  18743. this.convert13b(x.words, x.length, rws, N);
  18744. this.convert13b(y.words, y.length, nrws, N);
  18745. this.transform(rws, _, rwst, iwst, N, rbt);
  18746. this.transform(nrws, _, nrwst, niwst, N, rbt);
  18747. for (var i = 0; i < N; i++) {
  18748. var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
  18749. iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
  18750. rwst[i] = rx;
  18751. }
  18752. this.conjugate(rwst, iwst, N);
  18753. this.transform(rwst, iwst, rmws, _, N, rbt);
  18754. this.conjugate(rmws, _, N);
  18755. this.normalize13b(rmws, N);
  18756. out.negative = x.negative ^ y.negative;
  18757. out.length = x.length + y.length;
  18758. return out.strip();
  18759. };
  18760. // Multiply `this` by `num`
  18761. BN.prototype.mul = function mul (num) {
  18762. var out = new BN(null);
  18763. out.words = new Array(this.length + num.length);
  18764. return this.mulTo(num, out);
  18765. };
  18766. // Multiply employing FFT
  18767. BN.prototype.mulf = function mulf (num) {
  18768. var out = new BN(null);
  18769. out.words = new Array(this.length + num.length);
  18770. return jumboMulTo(this, num, out);
  18771. };
  18772. // In-place Multiplication
  18773. BN.prototype.imul = function imul (num) {
  18774. return this.clone().mulTo(num, this);
  18775. };
  18776. BN.prototype.imuln = function imuln (num) {
  18777. assert(typeof num === 'number');
  18778. assert(num < 0x4000000);
  18779. // Carry
  18780. var carry = 0;
  18781. for (var i = 0; i < this.length; i++) {
  18782. var w = (this.words[i] | 0) * num;
  18783. var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
  18784. carry >>= 26;
  18785. carry += (w / 0x4000000) | 0;
  18786. // NOTE: lo is 27bit maximum
  18787. carry += lo >>> 26;
  18788. this.words[i] = lo & 0x3ffffff;
  18789. }
  18790. if (carry !== 0) {
  18791. this.words[i] = carry;
  18792. this.length++;
  18793. }
  18794. return this;
  18795. };
  18796. BN.prototype.muln = function muln (num) {
  18797. return this.clone().imuln(num);
  18798. };
  18799. // `this` * `this`
  18800. BN.prototype.sqr = function sqr () {
  18801. return this.mul(this);
  18802. };
  18803. // `this` * `this` in-place
  18804. BN.prototype.isqr = function isqr () {
  18805. return this.imul(this.clone());
  18806. };
  18807. // Math.pow(`this`, `num`)
  18808. BN.prototype.pow = function pow (num) {
  18809. var w = toBitArray(num);
  18810. if (w.length === 0) return new BN(1);
  18811. // Skip leading zeroes
  18812. var res = this;
  18813. for (var i = 0; i < w.length; i++, res = res.sqr()) {
  18814. if (w[i] !== 0) break;
  18815. }
  18816. if (++i < w.length) {
  18817. for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
  18818. if (w[i] === 0) continue;
  18819. res = res.mul(q);
  18820. }
  18821. }
  18822. return res;
  18823. };
  18824. // Shift-left in-place
  18825. BN.prototype.iushln = function iushln (bits) {
  18826. assert(typeof bits === 'number' && bits >= 0);
  18827. var r = bits % 26;
  18828. var s = (bits - r) / 26;
  18829. var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
  18830. var i;
  18831. if (r !== 0) {
  18832. var carry = 0;
  18833. for (i = 0; i < this.length; i++) {
  18834. var newCarry = this.words[i] & carryMask;
  18835. var c = ((this.words[i] | 0) - newCarry) << r;
  18836. this.words[i] = c | carry;
  18837. carry = newCarry >>> (26 - r);
  18838. }
  18839. if (carry) {
  18840. this.words[i] = carry;
  18841. this.length++;
  18842. }
  18843. }
  18844. if (s !== 0) {
  18845. for (i = this.length - 1; i >= 0; i--) {
  18846. this.words[i + s] = this.words[i];
  18847. }
  18848. for (i = 0; i < s; i++) {
  18849. this.words[i] = 0;
  18850. }
  18851. this.length += s;
  18852. }
  18853. return this.strip();
  18854. };
  18855. BN.prototype.ishln = function ishln (bits) {
  18856. // TODO(indutny): implement me
  18857. assert(this.negative === 0);
  18858. return this.iushln(bits);
  18859. };
  18860. // Shift-right in-place
  18861. // NOTE: `hint` is a lowest bit before trailing zeroes
  18862. // NOTE: if `extended` is present - it will be filled with destroyed bits
  18863. BN.prototype.iushrn = function iushrn (bits, hint, extended) {
  18864. assert(typeof bits === 'number' && bits >= 0);
  18865. var h;
  18866. if (hint) {
  18867. h = (hint - (hint % 26)) / 26;
  18868. } else {
  18869. h = 0;
  18870. }
  18871. var r = bits % 26;
  18872. var s = Math.min((bits - r) / 26, this.length);
  18873. var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
  18874. var maskedWords = extended;
  18875. h -= s;
  18876. h = Math.max(0, h);
  18877. // Extended mode, copy masked part
  18878. if (maskedWords) {
  18879. for (var i = 0; i < s; i++) {
  18880. maskedWords.words[i] = this.words[i];
  18881. }
  18882. maskedWords.length = s;
  18883. }
  18884. if (s === 0) {
  18885. // No-op, we should not move anything at all
  18886. } else if (this.length > s) {
  18887. this.length -= s;
  18888. for (i = 0; i < this.length; i++) {
  18889. this.words[i] = this.words[i + s];
  18890. }
  18891. } else {
  18892. this.words[0] = 0;
  18893. this.length = 1;
  18894. }
  18895. var carry = 0;
  18896. for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
  18897. var word = this.words[i] | 0;
  18898. this.words[i] = (carry << (26 - r)) | (word >>> r);
  18899. carry = word & mask;
  18900. }
  18901. // Push carried bits as a mask
  18902. if (maskedWords && carry !== 0) {
  18903. maskedWords.words[maskedWords.length++] = carry;
  18904. }
  18905. if (this.length === 0) {
  18906. this.words[0] = 0;
  18907. this.length = 1;
  18908. }
  18909. return this.strip();
  18910. };
  18911. BN.prototype.ishrn = function ishrn (bits, hint, extended) {
  18912. // TODO(indutny): implement me
  18913. assert(this.negative === 0);
  18914. return this.iushrn(bits, hint, extended);
  18915. };
  18916. // Shift-left
  18917. BN.prototype.shln = function shln (bits) {
  18918. return this.clone().ishln(bits);
  18919. };
  18920. BN.prototype.ushln = function ushln (bits) {
  18921. return this.clone().iushln(bits);
  18922. };
  18923. // Shift-right
  18924. BN.prototype.shrn = function shrn (bits) {
  18925. return this.clone().ishrn(bits);
  18926. };
  18927. BN.prototype.ushrn = function ushrn (bits) {
  18928. return this.clone().iushrn(bits);
  18929. };
  18930. // Test if n bit is set
  18931. BN.prototype.testn = function testn (bit) {
  18932. assert(typeof bit === 'number' && bit >= 0);
  18933. var r = bit % 26;
  18934. var s = (bit - r) / 26;
  18935. var q = 1 << r;
  18936. // Fast case: bit is much higher than all existing words
  18937. if (this.length <= s) return false;
  18938. // Check bit and return
  18939. var w = this.words[s];
  18940. return !!(w & q);
  18941. };
  18942. // Return only lowers bits of number (in-place)
  18943. BN.prototype.imaskn = function imaskn (bits) {
  18944. assert(typeof bits === 'number' && bits >= 0);
  18945. var r = bits % 26;
  18946. var s = (bits - r) / 26;
  18947. assert(this.negative === 0, 'imaskn works only with positive numbers');
  18948. if (this.length <= s) {
  18949. return this;
  18950. }
  18951. if (r !== 0) {
  18952. s++;
  18953. }
  18954. this.length = Math.min(s, this.length);
  18955. if (r !== 0) {
  18956. var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
  18957. this.words[this.length - 1] &= mask;
  18958. }
  18959. return this.strip();
  18960. };
  18961. // Return only lowers bits of number
  18962. BN.prototype.maskn = function maskn (bits) {
  18963. return this.clone().imaskn(bits);
  18964. };
  18965. // Add plain number `num` to `this`
  18966. BN.prototype.iaddn = function iaddn (num) {
  18967. assert(typeof num === 'number');
  18968. assert(num < 0x4000000);
  18969. if (num < 0) return this.isubn(-num);
  18970. // Possible sign change
  18971. if (this.negative !== 0) {
  18972. if (this.length === 1 && (this.words[0] | 0) < num) {
  18973. this.words[0] = num - (this.words[0] | 0);
  18974. this.negative = 0;
  18975. return this;
  18976. }
  18977. this.negative = 0;
  18978. this.isubn(num);
  18979. this.negative = 1;
  18980. return this;
  18981. }
  18982. // Add without checks
  18983. return this._iaddn(num);
  18984. };
  18985. BN.prototype._iaddn = function _iaddn (num) {
  18986. this.words[0] += num;
  18987. // Carry
  18988. for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
  18989. this.words[i] -= 0x4000000;
  18990. if (i === this.length - 1) {
  18991. this.words[i + 1] = 1;
  18992. } else {
  18993. this.words[i + 1]++;
  18994. }
  18995. }
  18996. this.length = Math.max(this.length, i + 1);
  18997. return this;
  18998. };
  18999. // Subtract plain number `num` from `this`
  19000. BN.prototype.isubn = function isubn (num) {
  19001. assert(typeof num === 'number');
  19002. assert(num < 0x4000000);
  19003. if (num < 0) return this.iaddn(-num);
  19004. if (this.negative !== 0) {
  19005. this.negative = 0;
  19006. this.iaddn(num);
  19007. this.negative = 1;
  19008. return this;
  19009. }
  19010. this.words[0] -= num;
  19011. if (this.length === 1 && this.words[0] < 0) {
  19012. this.words[0] = -this.words[0];
  19013. this.negative = 1;
  19014. } else {
  19015. // Carry
  19016. for (var i = 0; i < this.length && this.words[i] < 0; i++) {
  19017. this.words[i] += 0x4000000;
  19018. this.words[i + 1] -= 1;
  19019. }
  19020. }
  19021. return this.strip();
  19022. };
  19023. BN.prototype.addn = function addn (num) {
  19024. return this.clone().iaddn(num);
  19025. };
  19026. BN.prototype.subn = function subn (num) {
  19027. return this.clone().isubn(num);
  19028. };
  19029. BN.prototype.iabs = function iabs () {
  19030. this.negative = 0;
  19031. return this;
  19032. };
  19033. BN.prototype.abs = function abs () {
  19034. return this.clone().iabs();
  19035. };
  19036. BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
  19037. var len = num.length + shift;
  19038. var i;
  19039. this._expand(len);
  19040. var w;
  19041. var carry = 0;
  19042. for (i = 0; i < num.length; i++) {
  19043. w = (this.words[i + shift] | 0) + carry;
  19044. var right = (num.words[i] | 0) * mul;
  19045. w -= right & 0x3ffffff;
  19046. carry = (w >> 26) - ((right / 0x4000000) | 0);
  19047. this.words[i + shift] = w & 0x3ffffff;
  19048. }
  19049. for (; i < this.length - shift; i++) {
  19050. w = (this.words[i + shift] | 0) + carry;
  19051. carry = w >> 26;
  19052. this.words[i + shift] = w & 0x3ffffff;
  19053. }
  19054. if (carry === 0) return this.strip();
  19055. // Subtraction overflow
  19056. assert(carry === -1);
  19057. carry = 0;
  19058. for (i = 0; i < this.length; i++) {
  19059. w = -(this.words[i] | 0) + carry;
  19060. carry = w >> 26;
  19061. this.words[i] = w & 0x3ffffff;
  19062. }
  19063. this.negative = 1;
  19064. return this.strip();
  19065. };
  19066. BN.prototype._wordDiv = function _wordDiv (num, mode) {
  19067. var shift = this.length - num.length;
  19068. var a = this.clone();
  19069. var b = num;
  19070. // Normalize
  19071. var bhi = b.words[b.length - 1] | 0;
  19072. var bhiBits = this._countBits(bhi);
  19073. shift = 26 - bhiBits;
  19074. if (shift !== 0) {
  19075. b = b.ushln(shift);
  19076. a.iushln(shift);
  19077. bhi = b.words[b.length - 1] | 0;
  19078. }
  19079. // Initialize quotient
  19080. var m = a.length - b.length;
  19081. var q;
  19082. if (mode !== 'mod') {
  19083. q = new BN(null);
  19084. q.length = m + 1;
  19085. q.words = new Array(q.length);
  19086. for (var i = 0; i < q.length; i++) {
  19087. q.words[i] = 0;
  19088. }
  19089. }
  19090. var diff = a.clone()._ishlnsubmul(b, 1, m);
  19091. if (diff.negative === 0) {
  19092. a = diff;
  19093. if (q) {
  19094. q.words[m] = 1;
  19095. }
  19096. }
  19097. for (var j = m - 1; j >= 0; j--) {
  19098. var qj = (a.words[b.length + j] | 0) * 0x4000000 +
  19099. (a.words[b.length + j - 1] | 0);
  19100. // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
  19101. // (0x7ffffff)
  19102. qj = Math.min((qj / bhi) | 0, 0x3ffffff);
  19103. a._ishlnsubmul(b, qj, j);
  19104. while (a.negative !== 0) {
  19105. qj--;
  19106. a.negative = 0;
  19107. a._ishlnsubmul(b, 1, j);
  19108. if (!a.isZero()) {
  19109. a.negative ^= 1;
  19110. }
  19111. }
  19112. if (q) {
  19113. q.words[j] = qj;
  19114. }
  19115. }
  19116. if (q) {
  19117. q.strip();
  19118. }
  19119. a.strip();
  19120. // Denormalize
  19121. if (mode !== 'div' && shift !== 0) {
  19122. a.iushrn(shift);
  19123. }
  19124. return {
  19125. div: q || null,
  19126. mod: a
  19127. };
  19128. };
  19129. // NOTE: 1) `mode` can be set to `mod` to request mod only,
  19130. // to `div` to request div only, or be absent to
  19131. // request both div & mod
  19132. // 2) `positive` is true if unsigned mod is requested
  19133. BN.prototype.divmod = function divmod (num, mode, positive) {
  19134. assert(!num.isZero());
  19135. if (this.isZero()) {
  19136. return {
  19137. div: new BN(0),
  19138. mod: new BN(0)
  19139. };
  19140. }
  19141. var div, mod, res;
  19142. if (this.negative !== 0 && num.negative === 0) {
  19143. res = this.neg().divmod(num, mode);
  19144. if (mode !== 'mod') {
  19145. div = res.div.neg();
  19146. }
  19147. if (mode !== 'div') {
  19148. mod = res.mod.neg();
  19149. if (positive && mod.negative !== 0) {
  19150. mod.iadd(num);
  19151. }
  19152. }
  19153. return {
  19154. div: div,
  19155. mod: mod
  19156. };
  19157. }
  19158. if (this.negative === 0 && num.negative !== 0) {
  19159. res = this.divmod(num.neg(), mode);
  19160. if (mode !== 'mod') {
  19161. div = res.div.neg();
  19162. }
  19163. return {
  19164. div: div,
  19165. mod: res.mod
  19166. };
  19167. }
  19168. if ((this.negative & num.negative) !== 0) {
  19169. res = this.neg().divmod(num.neg(), mode);
  19170. if (mode !== 'div') {
  19171. mod = res.mod.neg();
  19172. if (positive && mod.negative !== 0) {
  19173. mod.isub(num);
  19174. }
  19175. }
  19176. return {
  19177. div: res.div,
  19178. mod: mod
  19179. };
  19180. }
  19181. // Both numbers are positive at this point
  19182. // Strip both numbers to approximate shift value
  19183. if (num.length > this.length || this.cmp(num) < 0) {
  19184. return {
  19185. div: new BN(0),
  19186. mod: this
  19187. };
  19188. }
  19189. // Very short reduction
  19190. if (num.length === 1) {
  19191. if (mode === 'div') {
  19192. return {
  19193. div: this.divn(num.words[0]),
  19194. mod: null
  19195. };
  19196. }
  19197. if (mode === 'mod') {
  19198. return {
  19199. div: null,
  19200. mod: new BN(this.modn(num.words[0]))
  19201. };
  19202. }
  19203. return {
  19204. div: this.divn(num.words[0]),
  19205. mod: new BN(this.modn(num.words[0]))
  19206. };
  19207. }
  19208. return this._wordDiv(num, mode);
  19209. };
  19210. // Find `this` / `num`
  19211. BN.prototype.div = function div (num) {
  19212. return this.divmod(num, 'div', false).div;
  19213. };
  19214. // Find `this` % `num`
  19215. BN.prototype.mod = function mod (num) {
  19216. return this.divmod(num, 'mod', false).mod;
  19217. };
  19218. BN.prototype.umod = function umod (num) {
  19219. return this.divmod(num, 'mod', true).mod;
  19220. };
  19221. // Find Round(`this` / `num`)
  19222. BN.prototype.divRound = function divRound (num) {
  19223. var dm = this.divmod(num);
  19224. // Fast case - exact division
  19225. if (dm.mod.isZero()) return dm.div;
  19226. var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
  19227. var half = num.ushrn(1);
  19228. var r2 = num.andln(1);
  19229. var cmp = mod.cmp(half);
  19230. // Round down
  19231. if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
  19232. // Round up
  19233. return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
  19234. };
  19235. BN.prototype.modn = function modn (num) {
  19236. assert(num <= 0x3ffffff);
  19237. var p = (1 << 26) % num;
  19238. var acc = 0;
  19239. for (var i = this.length - 1; i >= 0; i--) {
  19240. acc = (p * acc + (this.words[i] | 0)) % num;
  19241. }
  19242. return acc;
  19243. };
  19244. // In-place division by number
  19245. BN.prototype.idivn = function idivn (num) {
  19246. assert(num <= 0x3ffffff);
  19247. var carry = 0;
  19248. for (var i = this.length - 1; i >= 0; i--) {
  19249. var w = (this.words[i] | 0) + carry * 0x4000000;
  19250. this.words[i] = (w / num) | 0;
  19251. carry = w % num;
  19252. }
  19253. return this.strip();
  19254. };
  19255. BN.prototype.divn = function divn (num) {
  19256. return this.clone().idivn(num);
  19257. };
  19258. BN.prototype.egcd = function egcd (p) {
  19259. assert(p.negative === 0);
  19260. assert(!p.isZero());
  19261. var x = this;
  19262. var y = p.clone();
  19263. if (x.negative !== 0) {
  19264. x = x.umod(p);
  19265. } else {
  19266. x = x.clone();
  19267. }
  19268. // A * x + B * y = x
  19269. var A = new BN(1);
  19270. var B = new BN(0);
  19271. // C * x + D * y = y
  19272. var C = new BN(0);
  19273. var D = new BN(1);
  19274. var g = 0;
  19275. while (x.isEven() && y.isEven()) {
  19276. x.iushrn(1);
  19277. y.iushrn(1);
  19278. ++g;
  19279. }
  19280. var yp = y.clone();
  19281. var xp = x.clone();
  19282. while (!x.isZero()) {
  19283. for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
  19284. if (i > 0) {
  19285. x.iushrn(i);
  19286. while (i-- > 0) {
  19287. if (A.isOdd() || B.isOdd()) {
  19288. A.iadd(yp);
  19289. B.isub(xp);
  19290. }
  19291. A.iushrn(1);
  19292. B.iushrn(1);
  19293. }
  19294. }
  19295. for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
  19296. if (j > 0) {
  19297. y.iushrn(j);
  19298. while (j-- > 0) {
  19299. if (C.isOdd() || D.isOdd()) {
  19300. C.iadd(yp);
  19301. D.isub(xp);
  19302. }
  19303. C.iushrn(1);
  19304. D.iushrn(1);
  19305. }
  19306. }
  19307. if (x.cmp(y) >= 0) {
  19308. x.isub(y);
  19309. A.isub(C);
  19310. B.isub(D);
  19311. } else {
  19312. y.isub(x);
  19313. C.isub(A);
  19314. D.isub(B);
  19315. }
  19316. }
  19317. return {
  19318. a: C,
  19319. b: D,
  19320. gcd: y.iushln(g)
  19321. };
  19322. };
  19323. // This is reduced incarnation of the binary EEA
  19324. // above, designated to invert members of the
  19325. // _prime_ fields F(p) at a maximal speed
  19326. BN.prototype._invmp = function _invmp (p) {
  19327. assert(p.negative === 0);
  19328. assert(!p.isZero());
  19329. var a = this;
  19330. var b = p.clone();
  19331. if (a.negative !== 0) {
  19332. a = a.umod(p);
  19333. } else {
  19334. a = a.clone();
  19335. }
  19336. var x1 = new BN(1);
  19337. var x2 = new BN(0);
  19338. var delta = b.clone();
  19339. while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
  19340. for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
  19341. if (i > 0) {
  19342. a.iushrn(i);
  19343. while (i-- > 0) {
  19344. if (x1.isOdd()) {
  19345. x1.iadd(delta);
  19346. }
  19347. x1.iushrn(1);
  19348. }
  19349. }
  19350. for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
  19351. if (j > 0) {
  19352. b.iushrn(j);
  19353. while (j-- > 0) {
  19354. if (x2.isOdd()) {
  19355. x2.iadd(delta);
  19356. }
  19357. x2.iushrn(1);
  19358. }
  19359. }
  19360. if (a.cmp(b) >= 0) {
  19361. a.isub(b);
  19362. x1.isub(x2);
  19363. } else {
  19364. b.isub(a);
  19365. x2.isub(x1);
  19366. }
  19367. }
  19368. var res;
  19369. if (a.cmpn(1) === 0) {
  19370. res = x1;
  19371. } else {
  19372. res = x2;
  19373. }
  19374. if (res.cmpn(0) < 0) {
  19375. res.iadd(p);
  19376. }
  19377. return res;
  19378. };
  19379. BN.prototype.gcd = function gcd (num) {
  19380. if (this.isZero()) return num.abs();
  19381. if (num.isZero()) return this.abs();
  19382. var a = this.clone();
  19383. var b = num.clone();
  19384. a.negative = 0;
  19385. b.negative = 0;
  19386. // Remove common factor of two
  19387. for (var shift = 0; a.isEven() && b.isEven(); shift++) {
  19388. a.iushrn(1);
  19389. b.iushrn(1);
  19390. }
  19391. do {
  19392. while (a.isEven()) {
  19393. a.iushrn(1);
  19394. }
  19395. while (b.isEven()) {
  19396. b.iushrn(1);
  19397. }
  19398. var r = a.cmp(b);
  19399. if (r < 0) {
  19400. // Swap `a` and `b` to make `a` always bigger than `b`
  19401. var t = a;
  19402. a = b;
  19403. b = t;
  19404. } else if (r === 0 || b.cmpn(1) === 0) {
  19405. break;
  19406. }
  19407. a.isub(b);
  19408. } while (true);
  19409. return b.iushln(shift);
  19410. };
  19411. // Invert number in the field F(num)
  19412. BN.prototype.invm = function invm (num) {
  19413. return this.egcd(num).a.umod(num);
  19414. };
  19415. BN.prototype.isEven = function isEven () {
  19416. return (this.words[0] & 1) === 0;
  19417. };
  19418. BN.prototype.isOdd = function isOdd () {
  19419. return (this.words[0] & 1) === 1;
  19420. };
  19421. // And first word and num
  19422. BN.prototype.andln = function andln (num) {
  19423. return this.words[0] & num;
  19424. };
  19425. // Increment at the bit position in-line
  19426. BN.prototype.bincn = function bincn (bit) {
  19427. assert(typeof bit === 'number');
  19428. var r = bit % 26;
  19429. var s = (bit - r) / 26;
  19430. var q = 1 << r;
  19431. // Fast case: bit is much higher than all existing words
  19432. if (this.length <= s) {
  19433. this._expand(s + 1);
  19434. this.words[s] |= q;
  19435. return this;
  19436. }
  19437. // Add bit and propagate, if needed
  19438. var carry = q;
  19439. for (var i = s; carry !== 0 && i < this.length; i++) {
  19440. var w = this.words[i] | 0;
  19441. w += carry;
  19442. carry = w >>> 26;
  19443. w &= 0x3ffffff;
  19444. this.words[i] = w;
  19445. }
  19446. if (carry !== 0) {
  19447. this.words[i] = carry;
  19448. this.length++;
  19449. }
  19450. return this;
  19451. };
  19452. BN.prototype.isZero = function isZero () {
  19453. return this.length === 1 && this.words[0] === 0;
  19454. };
  19455. BN.prototype.cmpn = function cmpn (num) {
  19456. var negative = num < 0;
  19457. if (this.negative !== 0 && !negative) return -1;
  19458. if (this.negative === 0 && negative) return 1;
  19459. this.strip();
  19460. var res;
  19461. if (this.length > 1) {
  19462. res = 1;
  19463. } else {
  19464. if (negative) {
  19465. num = -num;
  19466. }
  19467. assert(num <= 0x3ffffff, 'Number is too big');
  19468. var w = this.words[0] | 0;
  19469. res = w === num ? 0 : w < num ? -1 : 1;
  19470. }
  19471. if (this.negative !== 0) return -res | 0;
  19472. return res;
  19473. };
  19474. // Compare two numbers and return:
  19475. // 1 - if `this` > `num`
  19476. // 0 - if `this` == `num`
  19477. // -1 - if `this` < `num`
  19478. BN.prototype.cmp = function cmp (num) {
  19479. if (this.negative !== 0 && num.negative === 0) return -1;
  19480. if (this.negative === 0 && num.negative !== 0) return 1;
  19481. var res = this.ucmp(num);
  19482. if (this.negative !== 0) return -res | 0;
  19483. return res;
  19484. };
  19485. // Unsigned comparison
  19486. BN.prototype.ucmp = function ucmp (num) {
  19487. // At this point both numbers have the same sign
  19488. if (this.length > num.length) return 1;
  19489. if (this.length < num.length) return -1;
  19490. var res = 0;
  19491. for (var i = this.length - 1; i >= 0; i--) {
  19492. var a = this.words[i] | 0;
  19493. var b = num.words[i] | 0;
  19494. if (a === b) continue;
  19495. if (a < b) {
  19496. res = -1;
  19497. } else if (a > b) {
  19498. res = 1;
  19499. }
  19500. break;
  19501. }
  19502. return res;
  19503. };
  19504. BN.prototype.gtn = function gtn (num) {
  19505. return this.cmpn(num) === 1;
  19506. };
  19507. BN.prototype.gt = function gt (num) {
  19508. return this.cmp(num) === 1;
  19509. };
  19510. BN.prototype.gten = function gten (num) {
  19511. return this.cmpn(num) >= 0;
  19512. };
  19513. BN.prototype.gte = function gte (num) {
  19514. return this.cmp(num) >= 0;
  19515. };
  19516. BN.prototype.ltn = function ltn (num) {
  19517. return this.cmpn(num) === -1;
  19518. };
  19519. BN.prototype.lt = function lt (num) {
  19520. return this.cmp(num) === -1;
  19521. };
  19522. BN.prototype.lten = function lten (num) {
  19523. return this.cmpn(num) <= 0;
  19524. };
  19525. BN.prototype.lte = function lte (num) {
  19526. return this.cmp(num) <= 0;
  19527. };
  19528. BN.prototype.eqn = function eqn (num) {
  19529. return this.cmpn(num) === 0;
  19530. };
  19531. BN.prototype.eq = function eq (num) {
  19532. return this.cmp(num) === 0;
  19533. };
  19534. //
  19535. // A reduce context, could be using montgomery or something better, depending
  19536. // on the `m` itself.
  19537. //
  19538. BN.red = function red (num) {
  19539. return new Red(num);
  19540. };
  19541. BN.prototype.toRed = function toRed (ctx) {
  19542. assert(!this.red, 'Already a number in reduction context');
  19543. assert(this.negative === 0, 'red works only with positives');
  19544. return ctx.convertTo(this)._forceRed(ctx);
  19545. };
  19546. BN.prototype.fromRed = function fromRed () {
  19547. assert(this.red, 'fromRed works only with numbers in reduction context');
  19548. return this.red.convertFrom(this);
  19549. };
  19550. BN.prototype._forceRed = function _forceRed (ctx) {
  19551. this.red = ctx;
  19552. return this;
  19553. };
  19554. BN.prototype.forceRed = function forceRed (ctx) {
  19555. assert(!this.red, 'Already a number in reduction context');
  19556. return this._forceRed(ctx);
  19557. };
  19558. BN.prototype.redAdd = function redAdd (num) {
  19559. assert(this.red, 'redAdd works only with red numbers');
  19560. return this.red.add(this, num);
  19561. };
  19562. BN.prototype.redIAdd = function redIAdd (num) {
  19563. assert(this.red, 'redIAdd works only with red numbers');
  19564. return this.red.iadd(this, num);
  19565. };
  19566. BN.prototype.redSub = function redSub (num) {
  19567. assert(this.red, 'redSub works only with red numbers');
  19568. return this.red.sub(this, num);
  19569. };
  19570. BN.prototype.redISub = function redISub (num) {
  19571. assert(this.red, 'redISub works only with red numbers');
  19572. return this.red.isub(this, num);
  19573. };
  19574. BN.prototype.redShl = function redShl (num) {
  19575. assert(this.red, 'redShl works only with red numbers');
  19576. return this.red.shl(this, num);
  19577. };
  19578. BN.prototype.redMul = function redMul (num) {
  19579. assert(this.red, 'redMul works only with red numbers');
  19580. this.red._verify2(this, num);
  19581. return this.red.mul(this, num);
  19582. };
  19583. BN.prototype.redIMul = function redIMul (num) {
  19584. assert(this.red, 'redMul works only with red numbers');
  19585. this.red._verify2(this, num);
  19586. return this.red.imul(this, num);
  19587. };
  19588. BN.prototype.redSqr = function redSqr () {
  19589. assert(this.red, 'redSqr works only with red numbers');
  19590. this.red._verify1(this);
  19591. return this.red.sqr(this);
  19592. };
  19593. BN.prototype.redISqr = function redISqr () {
  19594. assert(this.red, 'redISqr works only with red numbers');
  19595. this.red._verify1(this);
  19596. return this.red.isqr(this);
  19597. };
  19598. // Square root over p
  19599. BN.prototype.redSqrt = function redSqrt () {
  19600. assert(this.red, 'redSqrt works only with red numbers');
  19601. this.red._verify1(this);
  19602. return this.red.sqrt(this);
  19603. };
  19604. BN.prototype.redInvm = function redInvm () {
  19605. assert(this.red, 'redInvm works only with red numbers');
  19606. this.red._verify1(this);
  19607. return this.red.invm(this);
  19608. };
  19609. // Return negative clone of `this` % `red modulo`
  19610. BN.prototype.redNeg = function redNeg () {
  19611. assert(this.red, 'redNeg works only with red numbers');
  19612. this.red._verify1(this);
  19613. return this.red.neg(this);
  19614. };
  19615. BN.prototype.redPow = function redPow (num) {
  19616. assert(this.red && !num.red, 'redPow(normalNum)');
  19617. this.red._verify1(this);
  19618. return this.red.pow(this, num);
  19619. };
  19620. // Prime numbers with efficient reduction
  19621. var primes = {
  19622. k256: null,
  19623. p224: null,
  19624. p192: null,
  19625. p25519: null
  19626. };
  19627. // Pseudo-Mersenne prime
  19628. function MPrime (name, p) {
  19629. // P = 2 ^ N - K
  19630. this.name = name;
  19631. this.p = new BN(p, 16);
  19632. this.n = this.p.bitLength();
  19633. this.k = new BN(1).iushln(this.n).isub(this.p);
  19634. this.tmp = this._tmp();
  19635. }
  19636. MPrime.prototype._tmp = function _tmp () {
  19637. var tmp = new BN(null);
  19638. tmp.words = new Array(Math.ceil(this.n / 13));
  19639. return tmp;
  19640. };
  19641. MPrime.prototype.ireduce = function ireduce (num) {
  19642. // Assumes that `num` is less than `P^2`
  19643. // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
  19644. var r = num;
  19645. var rlen;
  19646. do {
  19647. this.split(r, this.tmp);
  19648. r = this.imulK(r);
  19649. r = r.iadd(this.tmp);
  19650. rlen = r.bitLength();
  19651. } while (rlen > this.n);
  19652. var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
  19653. if (cmp === 0) {
  19654. r.words[0] = 0;
  19655. r.length = 1;
  19656. } else if (cmp > 0) {
  19657. r.isub(this.p);
  19658. } else {
  19659. if (r.strip !== undefined) {
  19660. // r is BN v4 instance
  19661. r.strip();
  19662. } else {
  19663. // r is BN v5 instance
  19664. r._strip();
  19665. }
  19666. }
  19667. return r;
  19668. };
  19669. MPrime.prototype.split = function split (input, out) {
  19670. input.iushrn(this.n, 0, out);
  19671. };
  19672. MPrime.prototype.imulK = function imulK (num) {
  19673. return num.imul(this.k);
  19674. };
  19675. function K256 () {
  19676. MPrime.call(
  19677. this,
  19678. 'k256',
  19679. 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
  19680. }
  19681. inherits(K256, MPrime);
  19682. K256.prototype.split = function split (input, output) {
  19683. // 256 = 9 * 26 + 22
  19684. var mask = 0x3fffff;
  19685. var outLen = Math.min(input.length, 9);
  19686. for (var i = 0; i < outLen; i++) {
  19687. output.words[i] = input.words[i];
  19688. }
  19689. output.length = outLen;
  19690. if (input.length <= 9) {
  19691. input.words[0] = 0;
  19692. input.length = 1;
  19693. return;
  19694. }
  19695. // Shift by 9 limbs
  19696. var prev = input.words[9];
  19697. output.words[output.length++] = prev & mask;
  19698. for (i = 10; i < input.length; i++) {
  19699. var next = input.words[i] | 0;
  19700. input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
  19701. prev = next;
  19702. }
  19703. prev >>>= 22;
  19704. input.words[i - 10] = prev;
  19705. if (prev === 0 && input.length > 10) {
  19706. input.length -= 10;
  19707. } else {
  19708. input.length -= 9;
  19709. }
  19710. };
  19711. K256.prototype.imulK = function imulK (num) {
  19712. // K = 0x1000003d1 = [ 0x40, 0x3d1 ]
  19713. num.words[num.length] = 0;
  19714. num.words[num.length + 1] = 0;
  19715. num.length += 2;
  19716. // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
  19717. var lo = 0;
  19718. for (var i = 0; i < num.length; i++) {
  19719. var w = num.words[i] | 0;
  19720. lo += w * 0x3d1;
  19721. num.words[i] = lo & 0x3ffffff;
  19722. lo = w * 0x40 + ((lo / 0x4000000) | 0);
  19723. }
  19724. // Fast length reduction
  19725. if (num.words[num.length - 1] === 0) {
  19726. num.length--;
  19727. if (num.words[num.length - 1] === 0) {
  19728. num.length--;
  19729. }
  19730. }
  19731. return num;
  19732. };
  19733. function P224 () {
  19734. MPrime.call(
  19735. this,
  19736. 'p224',
  19737. 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
  19738. }
  19739. inherits(P224, MPrime);
  19740. function P192 () {
  19741. MPrime.call(
  19742. this,
  19743. 'p192',
  19744. 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
  19745. }
  19746. inherits(P192, MPrime);
  19747. function P25519 () {
  19748. // 2 ^ 255 - 19
  19749. MPrime.call(
  19750. this,
  19751. '25519',
  19752. '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
  19753. }
  19754. inherits(P25519, MPrime);
  19755. P25519.prototype.imulK = function imulK (num) {
  19756. // K = 0x13
  19757. var carry = 0;
  19758. for (var i = 0; i < num.length; i++) {
  19759. var hi = (num.words[i] | 0) * 0x13 + carry;
  19760. var lo = hi & 0x3ffffff;
  19761. hi >>>= 26;
  19762. num.words[i] = lo;
  19763. carry = hi;
  19764. }
  19765. if (carry !== 0) {
  19766. num.words[num.length++] = carry;
  19767. }
  19768. return num;
  19769. };
  19770. // Exported mostly for testing purposes, use plain name instead
  19771. BN._prime = function prime (name) {
  19772. // Cached version of prime
  19773. if (primes[name]) return primes[name];
  19774. var prime;
  19775. if (name === 'k256') {
  19776. prime = new K256();
  19777. } else if (name === 'p224') {
  19778. prime = new P224();
  19779. } else if (name === 'p192') {
  19780. prime = new P192();
  19781. } else if (name === 'p25519') {
  19782. prime = new P25519();
  19783. } else {
  19784. throw new Error('Unknown prime ' + name);
  19785. }
  19786. primes[name] = prime;
  19787. return prime;
  19788. };
  19789. //
  19790. // Base reduction engine
  19791. //
  19792. function Red (m) {
  19793. if (typeof m === 'string') {
  19794. var prime = BN._prime(m);
  19795. this.m = prime.p;
  19796. this.prime = prime;
  19797. } else {
  19798. assert(m.gtn(1), 'modulus must be greater than 1');
  19799. this.m = m;
  19800. this.prime = null;
  19801. }
  19802. }
  19803. Red.prototype._verify1 = function _verify1 (a) {
  19804. assert(a.negative === 0, 'red works only with positives');
  19805. assert(a.red, 'red works only with red numbers');
  19806. };
  19807. Red.prototype._verify2 = function _verify2 (a, b) {
  19808. assert((a.negative | b.negative) === 0, 'red works only with positives');
  19809. assert(a.red && a.red === b.red,
  19810. 'red works only with red numbers');
  19811. };
  19812. Red.prototype.imod = function imod (a) {
  19813. if (this.prime) return this.prime.ireduce(a)._forceRed(this);
  19814. return a.umod(this.m)._forceRed(this);
  19815. };
  19816. Red.prototype.neg = function neg (a) {
  19817. if (a.isZero()) {
  19818. return a.clone();
  19819. }
  19820. return this.m.sub(a)._forceRed(this);
  19821. };
  19822. Red.prototype.add = function add (a, b) {
  19823. this._verify2(a, b);
  19824. var res = a.add(b);
  19825. if (res.cmp(this.m) >= 0) {
  19826. res.isub(this.m);
  19827. }
  19828. return res._forceRed(this);
  19829. };
  19830. Red.prototype.iadd = function iadd (a, b) {
  19831. this._verify2(a, b);
  19832. var res = a.iadd(b);
  19833. if (res.cmp(this.m) >= 0) {
  19834. res.isub(this.m);
  19835. }
  19836. return res;
  19837. };
  19838. Red.prototype.sub = function sub (a, b) {
  19839. this._verify2(a, b);
  19840. var res = a.sub(b);
  19841. if (res.cmpn(0) < 0) {
  19842. res.iadd(this.m);
  19843. }
  19844. return res._forceRed(this);
  19845. };
  19846. Red.prototype.isub = function isub (a, b) {
  19847. this._verify2(a, b);
  19848. var res = a.isub(b);
  19849. if (res.cmpn(0) < 0) {
  19850. res.iadd(this.m);
  19851. }
  19852. return res;
  19853. };
  19854. Red.prototype.shl = function shl (a, num) {
  19855. this._verify1(a);
  19856. return this.imod(a.ushln(num));
  19857. };
  19858. Red.prototype.imul = function imul (a, b) {
  19859. this._verify2(a, b);
  19860. return this.imod(a.imul(b));
  19861. };
  19862. Red.prototype.mul = function mul (a, b) {
  19863. this._verify2(a, b);
  19864. return this.imod(a.mul(b));
  19865. };
  19866. Red.prototype.isqr = function isqr (a) {
  19867. return this.imul(a, a.clone());
  19868. };
  19869. Red.prototype.sqr = function sqr (a) {
  19870. return this.mul(a, a);
  19871. };
  19872. Red.prototype.sqrt = function sqrt (a) {
  19873. if (a.isZero()) return a.clone();
  19874. var mod3 = this.m.andln(3);
  19875. assert(mod3 % 2 === 1);
  19876. // Fast case
  19877. if (mod3 === 3) {
  19878. var pow = this.m.add(new BN(1)).iushrn(2);
  19879. return this.pow(a, pow);
  19880. }
  19881. // Tonelli-Shanks algorithm (Totally unoptimized and slow)
  19882. //
  19883. // Find Q and S, that Q * 2 ^ S = (P - 1)
  19884. var q = this.m.subn(1);
  19885. var s = 0;
  19886. while (!q.isZero() && q.andln(1) === 0) {
  19887. s++;
  19888. q.iushrn(1);
  19889. }
  19890. assert(!q.isZero());
  19891. var one = new BN(1).toRed(this);
  19892. var nOne = one.redNeg();
  19893. // Find quadratic non-residue
  19894. // NOTE: Max is such because of generalized Riemann hypothesis.
  19895. var lpow = this.m.subn(1).iushrn(1);
  19896. var z = this.m.bitLength();
  19897. z = new BN(2 * z * z).toRed(this);
  19898. while (this.pow(z, lpow).cmp(nOne) !== 0) {
  19899. z.redIAdd(nOne);
  19900. }
  19901. var c = this.pow(z, q);
  19902. var r = this.pow(a, q.addn(1).iushrn(1));
  19903. var t = this.pow(a, q);
  19904. var m = s;
  19905. while (t.cmp(one) !== 0) {
  19906. var tmp = t;
  19907. for (var i = 0; tmp.cmp(one) !== 0; i++) {
  19908. tmp = tmp.redSqr();
  19909. }
  19910. assert(i < m);
  19911. var b = this.pow(c, new BN(1).iushln(m - i - 1));
  19912. r = r.redMul(b);
  19913. c = b.redSqr();
  19914. t = t.redMul(c);
  19915. m = i;
  19916. }
  19917. return r;
  19918. };
  19919. Red.prototype.invm = function invm (a) {
  19920. var inv = a._invmp(this.m);
  19921. if (inv.negative !== 0) {
  19922. inv.negative = 0;
  19923. return this.imod(inv).redNeg();
  19924. } else {
  19925. return this.imod(inv);
  19926. }
  19927. };
  19928. Red.prototype.pow = function pow (a, num) {
  19929. if (num.isZero()) return new BN(1).toRed(this);
  19930. if (num.cmpn(1) === 0) return a.clone();
  19931. var windowSize = 4;
  19932. var wnd = new Array(1 << windowSize);
  19933. wnd[0] = new BN(1).toRed(this);
  19934. wnd[1] = a;
  19935. for (var i = 2; i < wnd.length; i++) {
  19936. wnd[i] = this.mul(wnd[i - 1], a);
  19937. }
  19938. var res = wnd[0];
  19939. var current = 0;
  19940. var currentLen = 0;
  19941. var start = num.bitLength() % 26;
  19942. if (start === 0) {
  19943. start = 26;
  19944. }
  19945. for (i = num.length - 1; i >= 0; i--) {
  19946. var word = num.words[i];
  19947. for (var j = start - 1; j >= 0; j--) {
  19948. var bit = (word >> j) & 1;
  19949. if (res !== wnd[0]) {
  19950. res = this.sqr(res);
  19951. }
  19952. if (bit === 0 && current === 0) {
  19953. currentLen = 0;
  19954. continue;
  19955. }
  19956. current <<= 1;
  19957. current |= bit;
  19958. currentLen++;
  19959. if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;
  19960. res = this.mul(res, wnd[current]);
  19961. currentLen = 0;
  19962. current = 0;
  19963. }
  19964. start = 26;
  19965. }
  19966. return res;
  19967. };
  19968. Red.prototype.convertTo = function convertTo (num) {
  19969. var r = num.umod(this.m);
  19970. return r === num ? r.clone() : r;
  19971. };
  19972. Red.prototype.convertFrom = function convertFrom (num) {
  19973. var res = num.clone();
  19974. res.red = null;
  19975. return res;
  19976. };
  19977. //
  19978. // Montgomery method engine
  19979. //
  19980. BN.mont = function mont (num) {
  19981. return new Mont(num);
  19982. };
  19983. function Mont (m) {
  19984. Red.call(this, m);
  19985. this.shift = this.m.bitLength();
  19986. if (this.shift % 26 !== 0) {
  19987. this.shift += 26 - (this.shift % 26);
  19988. }
  19989. this.r = new BN(1).iushln(this.shift);
  19990. this.r2 = this.imod(this.r.sqr());
  19991. this.rinv = this.r._invmp(this.m);
  19992. this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
  19993. this.minv = this.minv.umod(this.r);
  19994. this.minv = this.r.sub(this.minv);
  19995. }
  19996. inherits(Mont, Red);
  19997. Mont.prototype.convertTo = function convertTo (num) {
  19998. return this.imod(num.ushln(this.shift));
  19999. };
  20000. Mont.prototype.convertFrom = function convertFrom (num) {
  20001. var r = this.imod(num.mul(this.rinv));
  20002. r.red = null;
  20003. return r;
  20004. };
  20005. Mont.prototype.imul = function imul (a, b) {
  20006. if (a.isZero() || b.isZero()) {
  20007. a.words[0] = 0;
  20008. a.length = 1;
  20009. return a;
  20010. }
  20011. var t = a.imul(b);
  20012. var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
  20013. var u = t.isub(c).iushrn(this.shift);
  20014. var res = u;
  20015. if (u.cmp(this.m) >= 0) {
  20016. res = u.isub(this.m);
  20017. } else if (u.cmpn(0) < 0) {
  20018. res = u.iadd(this.m);
  20019. }
  20020. return res._forceRed(this);
  20021. };
  20022. Mont.prototype.mul = function mul (a, b) {
  20023. if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);
  20024. var t = a.mul(b);
  20025. var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
  20026. var u = t.isub(c).iushrn(this.shift);
  20027. var res = u;
  20028. if (u.cmp(this.m) >= 0) {
  20029. res = u.isub(this.m);
  20030. } else if (u.cmpn(0) < 0) {
  20031. res = u.iadd(this.m);
  20032. }
  20033. return res._forceRed(this);
  20034. };
  20035. Mont.prototype.invm = function invm (a) {
  20036. // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
  20037. var res = this.imod(a._invmp(this.m).mul(this.r2));
  20038. return res._forceRed(this);
  20039. };
  20040. })( false || module, this);
  20041. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ 172)(module)))
  20042. /***/ }),
  20043. /***/ 172:
  20044. /*!***********************************!*\
  20045. !*** (webpack)/buildin/module.js ***!
  20046. \***********************************/
  20047. /*! no static exports found */
  20048. /***/ (function(module, exports) {
  20049. module.exports = function(module) {
  20050. if (!module.webpackPolyfill) {
  20051. module.deprecate = function() {};
  20052. module.paths = [];
  20053. // module.parent = undefined by default
  20054. if (!module.children) module.children = [];
  20055. Object.defineProperty(module, "loaded", {
  20056. enumerable: true,
  20057. get: function() {
  20058. return module.l;
  20059. }
  20060. });
  20061. Object.defineProperty(module, "id", {
  20062. enumerable: true,
  20063. get: function() {
  20064. return module.i;
  20065. }
  20066. });
  20067. module.webpackPolyfill = 1;
  20068. }
  20069. return module;
  20070. };
  20071. /***/ }),
  20072. /***/ 173:
  20073. /*!************************!*\
  20074. !*** buffer (ignored) ***!
  20075. \************************/
  20076. /*! no static exports found */
  20077. /***/ (function(module, exports) {
  20078. /* (ignored) */
  20079. /***/ }),
  20080. /***/ 174:
  20081. /*!*********************************************!*\
  20082. !*** ./node_modules/miller-rabin/lib/mr.js ***!
  20083. \*********************************************/
  20084. /*! no static exports found */
  20085. /***/ (function(module, exports, __webpack_require__) {
  20086. var bn = __webpack_require__(/*! bn.js */ 171);
  20087. var brorand = __webpack_require__(/*! brorand */ 175);
  20088. function MillerRabin(rand) {
  20089. this.rand = rand || new brorand.Rand();
  20090. }
  20091. module.exports = MillerRabin;
  20092. MillerRabin.create = function create(rand) {
  20093. return new MillerRabin(rand);
  20094. };
  20095. MillerRabin.prototype._randbelow = function _randbelow(n) {
  20096. var len = n.bitLength();
  20097. var min_bytes = Math.ceil(len / 8);
  20098. // Generage random bytes until a number less than n is found.
  20099. // This ensures that 0..n-1 have an equal probability of being selected.
  20100. do
  20101. var a = new bn(this.rand.generate(min_bytes));
  20102. while (a.cmp(n) >= 0);
  20103. return a;
  20104. };
  20105. MillerRabin.prototype._randrange = function _randrange(start, stop) {
  20106. // Generate a random number greater than or equal to start and less than stop.
  20107. var size = stop.sub(start);
  20108. return start.add(this._randbelow(size));
  20109. };
  20110. MillerRabin.prototype.test = function test(n, k, cb) {
  20111. var len = n.bitLength();
  20112. var red = bn.mont(n);
  20113. var rone = new bn(1).toRed(red);
  20114. if (!k)
  20115. k = Math.max(1, (len / 48) | 0);
  20116. // Find d and s, (n - 1) = (2 ^ s) * d;
  20117. var n1 = n.subn(1);
  20118. for (var s = 0; !n1.testn(s); s++) {}
  20119. var d = n.shrn(s);
  20120. var rn1 = n1.toRed(red);
  20121. var prime = true;
  20122. for (; k > 0; k--) {
  20123. var a = this._randrange(new bn(2), n1);
  20124. if (cb)
  20125. cb(a);
  20126. var x = a.toRed(red).redPow(d);
  20127. if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
  20128. continue;
  20129. for (var i = 1; i < s; i++) {
  20130. x = x.redSqr();
  20131. if (x.cmp(rone) === 0)
  20132. return false;
  20133. if (x.cmp(rn1) === 0)
  20134. break;
  20135. }
  20136. if (i === s)
  20137. return false;
  20138. }
  20139. return prime;
  20140. };
  20141. MillerRabin.prototype.getDivisor = function getDivisor(n, k) {
  20142. var len = n.bitLength();
  20143. var red = bn.mont(n);
  20144. var rone = new bn(1).toRed(red);
  20145. if (!k)
  20146. k = Math.max(1, (len / 48) | 0);
  20147. // Find d and s, (n - 1) = (2 ^ s) * d;
  20148. var n1 = n.subn(1);
  20149. for (var s = 0; !n1.testn(s); s++) {}
  20150. var d = n.shrn(s);
  20151. var rn1 = n1.toRed(red);
  20152. for (; k > 0; k--) {
  20153. var a = this._randrange(new bn(2), n1);
  20154. var g = n.gcd(a);
  20155. if (g.cmpn(1) !== 0)
  20156. return g;
  20157. var x = a.toRed(red).redPow(d);
  20158. if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
  20159. continue;
  20160. for (var i = 1; i < s; i++) {
  20161. x = x.redSqr();
  20162. if (x.cmp(rone) === 0)
  20163. return x.fromRed().subn(1).gcd(n);
  20164. if (x.cmp(rn1) === 0)
  20165. break;
  20166. }
  20167. if (i === s) {
  20168. x = x.redSqr();
  20169. return x.fromRed().subn(1).gcd(n);
  20170. }
  20171. }
  20172. return false;
  20173. };
  20174. /***/ }),
  20175. /***/ 175:
  20176. /*!***************************************!*\
  20177. !*** ./node_modules/brorand/index.js ***!
  20178. \***************************************/
  20179. /*! no static exports found */
  20180. /***/ (function(module, exports, __webpack_require__) {
  20181. var r;
  20182. module.exports = function rand(len) {
  20183. if (!r)
  20184. r = new Rand(null);
  20185. return r.generate(len);
  20186. };
  20187. function Rand(rand) {
  20188. this.rand = rand;
  20189. }
  20190. module.exports.Rand = Rand;
  20191. Rand.prototype.generate = function generate(len) {
  20192. return this._rand(len);
  20193. };
  20194. // Emulate crypto API using randy
  20195. Rand.prototype._rand = function _rand(n) {
  20196. if (this.rand.getBytes)
  20197. return this.rand.getBytes(n);
  20198. var res = new Uint8Array(n);
  20199. for (var i = 0; i < res.length; i++)
  20200. res[i] = this.rand.getByte();
  20201. return res;
  20202. };
  20203. if (typeof self === 'object') {
  20204. if (self.crypto && self.crypto.getRandomValues) {
  20205. // Modern browsers
  20206. Rand.prototype._rand = function _rand(n) {
  20207. var arr = new Uint8Array(n);
  20208. self.crypto.getRandomValues(arr);
  20209. return arr;
  20210. };
  20211. } else if (self.msCrypto && self.msCrypto.getRandomValues) {
  20212. // IE
  20213. Rand.prototype._rand = function _rand(n) {
  20214. var arr = new Uint8Array(n);
  20215. self.msCrypto.getRandomValues(arr);
  20216. return arr;
  20217. };
  20218. // Safari's WebWorkers do not have `crypto`
  20219. } else if (typeof window === 'object') {
  20220. // Old junk
  20221. Rand.prototype._rand = function() {
  20222. throw new Error('Not implemented yet');
  20223. };
  20224. }
  20225. } else {
  20226. // Node.js or Web worker with no crypto support
  20227. try {
  20228. var crypto = __webpack_require__(/*! crypto */ 176);
  20229. if (typeof crypto.randomBytes !== 'function')
  20230. throw new Error('Not supported');
  20231. Rand.prototype._rand = function _rand(n) {
  20232. return crypto.randomBytes(n);
  20233. };
  20234. } catch (e) {
  20235. }
  20236. }
  20237. /***/ }),
  20238. /***/ 176:
  20239. /*!************************!*\
  20240. !*** crypto (ignored) ***!
  20241. \************************/
  20242. /*! no static exports found */
  20243. /***/ (function(module, exports) {
  20244. /* (ignored) */
  20245. /***/ }),
  20246. /***/ 177:
  20247. /*!*****************************************************!*\
  20248. !*** ./node_modules/diffie-hellman/lib/primes.json ***!
  20249. \*****************************************************/
  20250. /*! exports provided: modp1, modp2, modp5, modp14, modp15, modp16, modp17, modp18, default */
  20251. /***/ (function(module) {
  20252. module.exports = JSON.parse("{\"modp1\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff\"},\"modp2\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff\"},\"modp5\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff\"},\"modp14\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff\"},\"modp15\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff\"},\"modp16\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff\"},\"modp17\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff\"},\"modp18\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff\"}}");
  20253. /***/ }),
  20254. /***/ 178:
  20255. /*!***********************************************!*\
  20256. !*** ./node_modules/diffie-hellman/lib/dh.js ***!
  20257. \***********************************************/
  20258. /*! no static exports found */
  20259. /***/ (function(module, exports, __webpack_require__) {
  20260. /* WEBPACK VAR INJECTION */(function(Buffer) {var BN = __webpack_require__(/*! bn.js */ 171);
  20261. var MillerRabin = __webpack_require__(/*! miller-rabin */ 174);
  20262. var millerRabin = new MillerRabin();
  20263. var TWENTYFOUR = new BN(24);
  20264. var ELEVEN = new BN(11);
  20265. var TEN = new BN(10);
  20266. var THREE = new BN(3);
  20267. var SEVEN = new BN(7);
  20268. var primes = __webpack_require__(/*! ./generatePrime */ 170);
  20269. var randomBytes = __webpack_require__(/*! randombytes */ 86);
  20270. module.exports = DH;
  20271. function setPublicKey(pub, enc) {
  20272. enc = enc || 'utf8';
  20273. if (!Buffer.isBuffer(pub)) {
  20274. pub = new Buffer(pub, enc);
  20275. }
  20276. this._pub = new BN(pub);
  20277. return this;
  20278. }
  20279. function setPrivateKey(priv, enc) {
  20280. enc = enc || 'utf8';
  20281. if (!Buffer.isBuffer(priv)) {
  20282. priv = new Buffer(priv, enc);
  20283. }
  20284. this._priv = new BN(priv);
  20285. return this;
  20286. }
  20287. var primeCache = {};
  20288. function checkPrime(prime, generator) {
  20289. var gen = generator.toString('hex');
  20290. var hex = [gen, prime.toString(16)].join('_');
  20291. if (hex in primeCache) {
  20292. return primeCache[hex];
  20293. }
  20294. var error = 0;
  20295. if (prime.isEven() ||
  20296. !primes.simpleSieve ||
  20297. !primes.fermatTest(prime) ||
  20298. !millerRabin.test(prime)) {
  20299. //not a prime so +1
  20300. error += 1;
  20301. if (gen === '02' || gen === '05') {
  20302. // we'd be able to check the generator
  20303. // it would fail so +8
  20304. error += 8;
  20305. } else {
  20306. //we wouldn't be able to test the generator
  20307. // so +4
  20308. error += 4;
  20309. }
  20310. primeCache[hex] = error;
  20311. return error;
  20312. }
  20313. if (!millerRabin.test(prime.shrn(1))) {
  20314. //not a safe prime
  20315. error += 2;
  20316. }
  20317. var rem;
  20318. switch (gen) {
  20319. case '02':
  20320. if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {
  20321. // unsuidable generator
  20322. error += 8;
  20323. }
  20324. break;
  20325. case '05':
  20326. rem = prime.mod(TEN);
  20327. if (rem.cmp(THREE) && rem.cmp(SEVEN)) {
  20328. // prime mod 10 needs to equal 3 or 7
  20329. error += 8;
  20330. }
  20331. break;
  20332. default:
  20333. error += 4;
  20334. }
  20335. primeCache[hex] = error;
  20336. return error;
  20337. }
  20338. function DH(prime, generator, malleable) {
  20339. this.setGenerator(generator);
  20340. this.__prime = new BN(prime);
  20341. this._prime = BN.mont(this.__prime);
  20342. this._primeLen = prime.length;
  20343. this._pub = undefined;
  20344. this._priv = undefined;
  20345. this._primeCode = undefined;
  20346. if (malleable) {
  20347. this.setPublicKey = setPublicKey;
  20348. this.setPrivateKey = setPrivateKey;
  20349. } else {
  20350. this._primeCode = 8;
  20351. }
  20352. }
  20353. Object.defineProperty(DH.prototype, 'verifyError', {
  20354. enumerable: true,
  20355. get: function () {
  20356. if (typeof this._primeCode !== 'number') {
  20357. this._primeCode = checkPrime(this.__prime, this.__gen);
  20358. }
  20359. return this._primeCode;
  20360. }
  20361. });
  20362. DH.prototype.generateKeys = function () {
  20363. if (!this._priv) {
  20364. this._priv = new BN(randomBytes(this._primeLen));
  20365. }
  20366. this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();
  20367. return this.getPublicKey();
  20368. };
  20369. DH.prototype.computeSecret = function (other) {
  20370. other = new BN(other);
  20371. other = other.toRed(this._prime);
  20372. var secret = other.redPow(this._priv).fromRed();
  20373. var out = new Buffer(secret.toArray());
  20374. var prime = this.getPrime();
  20375. if (out.length < prime.length) {
  20376. var front = new Buffer(prime.length - out.length);
  20377. front.fill(0);
  20378. out = Buffer.concat([front, out]);
  20379. }
  20380. return out;
  20381. };
  20382. DH.prototype.getPublicKey = function getPublicKey(enc) {
  20383. return formatReturnValue(this._pub, enc);
  20384. };
  20385. DH.prototype.getPrivateKey = function getPrivateKey(enc) {
  20386. return formatReturnValue(this._priv, enc);
  20387. };
  20388. DH.prototype.getPrime = function (enc) {
  20389. return formatReturnValue(this.__prime, enc);
  20390. };
  20391. DH.prototype.getGenerator = function (enc) {
  20392. return formatReturnValue(this._gen, enc);
  20393. };
  20394. DH.prototype.setGenerator = function (gen, enc) {
  20395. enc = enc || 'utf8';
  20396. if (!Buffer.isBuffer(gen)) {
  20397. gen = new Buffer(gen, enc);
  20398. }
  20399. this.__gen = gen;
  20400. this._gen = new BN(gen);
  20401. return this;
  20402. };
  20403. function formatReturnValue(bn, enc) {
  20404. var buf = new Buffer(bn.toArray());
  20405. if (!enc) {
  20406. return buf;
  20407. } else {
  20408. return buf.toString(enc);
  20409. }
  20410. }
  20411. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ 90).Buffer))
  20412. /***/ }),
  20413. /***/ 179:
  20414. /*!*******************************************************!*\
  20415. !*** ./node_modules/browserify-sign/browser/index.js ***!
  20416. \*******************************************************/
  20417. /*! no static exports found */
  20418. /***/ (function(module, exports, __webpack_require__) {
  20419. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  20420. var createHash = __webpack_require__(/*! create-hash */ 94)
  20421. var stream = __webpack_require__(/*! readable-stream */ 98)
  20422. var inherits = __webpack_require__(/*! inherits */ 95)
  20423. var sign = __webpack_require__(/*! ./sign */ 180)
  20424. var verify = __webpack_require__(/*! ./verify */ 233)
  20425. var algorithms = __webpack_require__(/*! ./algorithms.json */ 133)
  20426. Object.keys(algorithms).forEach(function (key) {
  20427. algorithms[key].id = Buffer.from(algorithms[key].id, 'hex')
  20428. algorithms[key.toLowerCase()] = algorithms[key]
  20429. })
  20430. function Sign (algorithm) {
  20431. stream.Writable.call(this)
  20432. var data = algorithms[algorithm]
  20433. if (!data) throw new Error('Unknown message digest')
  20434. this._hashType = data.hash
  20435. this._hash = createHash(data.hash)
  20436. this._tag = data.id
  20437. this._signType = data.sign
  20438. }
  20439. inherits(Sign, stream.Writable)
  20440. Sign.prototype._write = function _write (data, _, done) {
  20441. this._hash.update(data)
  20442. done()
  20443. }
  20444. Sign.prototype.update = function update (data, enc) {
  20445. if (typeof data === 'string') data = Buffer.from(data, enc)
  20446. this._hash.update(data)
  20447. return this
  20448. }
  20449. Sign.prototype.sign = function signMethod (key, enc) {
  20450. this.end()
  20451. var hash = this._hash.digest()
  20452. var sig = sign(hash, key, this._hashType, this._signType, this._tag)
  20453. return enc ? sig.toString(enc) : sig
  20454. }
  20455. function Verify (algorithm) {
  20456. stream.Writable.call(this)
  20457. var data = algorithms[algorithm]
  20458. if (!data) throw new Error('Unknown message digest')
  20459. this._hash = createHash(data.hash)
  20460. this._tag = data.id
  20461. this._signType = data.sign
  20462. }
  20463. inherits(Verify, stream.Writable)
  20464. Verify.prototype._write = function _write (data, _, done) {
  20465. this._hash.update(data)
  20466. done()
  20467. }
  20468. Verify.prototype.update = function update (data, enc) {
  20469. if (typeof data === 'string') data = Buffer.from(data, enc)
  20470. this._hash.update(data)
  20471. return this
  20472. }
  20473. Verify.prototype.verify = function verifyMethod (key, sig, enc) {
  20474. if (typeof sig === 'string') sig = Buffer.from(sig, enc)
  20475. this.end()
  20476. var hash = this._hash.digest()
  20477. return verify(sig, hash, key, this._signType, this._tag)
  20478. }
  20479. function createSign (algorithm) {
  20480. return new Sign(algorithm)
  20481. }
  20482. function createVerify (algorithm) {
  20483. return new Verify(algorithm)
  20484. }
  20485. module.exports = {
  20486. Sign: createSign,
  20487. Verify: createVerify,
  20488. createSign: createSign,
  20489. createVerify: createVerify
  20490. }
  20491. /***/ }),
  20492. /***/ 18:
  20493. /*!******************************************************************!*\
  20494. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  20495. \******************************************************************/
  20496. /*! no static exports found */
  20497. /***/ (function(module, exports, __webpack_require__) {
  20498. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  20499. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  20500. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  20501. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  20502. function _toConsumableArray(arr) {
  20503. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  20504. }
  20505. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20506. /***/ }),
  20507. /***/ 180:
  20508. /*!******************************************************!*\
  20509. !*** ./node_modules/browserify-sign/browser/sign.js ***!
  20510. \******************************************************/
  20511. /*! no static exports found */
  20512. /***/ (function(module, exports, __webpack_require__) {
  20513. // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
  20514. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  20515. var createHmac = __webpack_require__(/*! create-hmac */ 129)
  20516. var crt = __webpack_require__(/*! browserify-rsa */ 181)
  20517. var EC = __webpack_require__(/*! elliptic */ 182).ec
  20518. var BN = __webpack_require__(/*! bn.js */ 171)
  20519. var parseKeys = __webpack_require__(/*! parse-asn1 */ 212)
  20520. var curves = __webpack_require__(/*! ./curves.json */ 232)
  20521. function sign (hash, key, hashType, signType, tag) {
  20522. var priv = parseKeys(key)
  20523. if (priv.curve) {
  20524. // rsa keys can be interpreted as ecdsa ones in openssl
  20525. if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
  20526. return ecSign(hash, priv)
  20527. } else if (priv.type === 'dsa') {
  20528. if (signType !== 'dsa') throw new Error('wrong private key type')
  20529. return dsaSign(hash, priv, hashType)
  20530. } else {
  20531. if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
  20532. }
  20533. hash = Buffer.concat([tag, hash])
  20534. var len = priv.modulus.byteLength()
  20535. var pad = [0, 1]
  20536. while (hash.length + pad.length + 1 < len) pad.push(0xff)
  20537. pad.push(0x00)
  20538. var i = -1
  20539. while (++i < hash.length) pad.push(hash[i])
  20540. var out = crt(pad, priv)
  20541. return out
  20542. }
  20543. function ecSign (hash, priv) {
  20544. var curveId = curves[priv.curve.join('.')]
  20545. if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.'))
  20546. var curve = new EC(curveId)
  20547. var key = curve.keyFromPrivate(priv.privateKey)
  20548. var out = key.sign(hash)
  20549. return Buffer.from(out.toDER())
  20550. }
  20551. function dsaSign (hash, priv, algo) {
  20552. var x = priv.params.priv_key
  20553. var p = priv.params.p
  20554. var q = priv.params.q
  20555. var g = priv.params.g
  20556. var r = new BN(0)
  20557. var k
  20558. var H = bits2int(hash, q).mod(q)
  20559. var s = false
  20560. var kv = getKey(x, q, hash, algo)
  20561. while (s === false) {
  20562. k = makeKey(q, kv, algo)
  20563. r = makeR(g, k, p, q)
  20564. s = k.invm(q).imul(H.add(x.mul(r))).mod(q)
  20565. if (s.cmpn(0) === 0) {
  20566. s = false
  20567. r = new BN(0)
  20568. }
  20569. }
  20570. return toDER(r, s)
  20571. }
  20572. function toDER (r, s) {
  20573. r = r.toArray()
  20574. s = s.toArray()
  20575. // Pad values
  20576. if (r[0] & 0x80) r = [0].concat(r)
  20577. if (s[0] & 0x80) s = [0].concat(s)
  20578. var total = r.length + s.length + 4
  20579. var res = [0x30, total, 0x02, r.length]
  20580. res = res.concat(r, [0x02, s.length], s)
  20581. return Buffer.from(res)
  20582. }
  20583. function getKey (x, q, hash, algo) {
  20584. x = Buffer.from(x.toArray())
  20585. if (x.length < q.byteLength()) {
  20586. var zeros = Buffer.alloc(q.byteLength() - x.length)
  20587. x = Buffer.concat([zeros, x])
  20588. }
  20589. var hlen = hash.length
  20590. var hbits = bits2octets(hash, q)
  20591. var v = Buffer.alloc(hlen)
  20592. v.fill(1)
  20593. var k = Buffer.alloc(hlen)
  20594. k = createHmac(algo, k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest()
  20595. v = createHmac(algo, k).update(v).digest()
  20596. k = createHmac(algo, k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest()
  20597. v = createHmac(algo, k).update(v).digest()
  20598. return { k: k, v: v }
  20599. }
  20600. function bits2int (obits, q) {
  20601. var bits = new BN(obits)
  20602. var shift = (obits.length << 3) - q.bitLength()
  20603. if (shift > 0) bits.ishrn(shift)
  20604. return bits
  20605. }
  20606. function bits2octets (bits, q) {
  20607. bits = bits2int(bits, q)
  20608. bits = bits.mod(q)
  20609. var out = Buffer.from(bits.toArray())
  20610. if (out.length < q.byteLength()) {
  20611. var zeros = Buffer.alloc(q.byteLength() - out.length)
  20612. out = Buffer.concat([zeros, out])
  20613. }
  20614. return out
  20615. }
  20616. function makeKey (q, kv, algo) {
  20617. var t
  20618. var k
  20619. do {
  20620. t = Buffer.alloc(0)
  20621. while (t.length * 8 < q.bitLength()) {
  20622. kv.v = createHmac(algo, kv.k).update(kv.v).digest()
  20623. t = Buffer.concat([t, kv.v])
  20624. }
  20625. k = bits2int(t, q)
  20626. kv.k = createHmac(algo, kv.k).update(kv.v).update(Buffer.from([0])).digest()
  20627. kv.v = createHmac(algo, kv.k).update(kv.v).digest()
  20628. } while (k.cmp(q) !== -1)
  20629. return k
  20630. }
  20631. function makeR (g, k, p, q) {
  20632. return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q)
  20633. }
  20634. module.exports = sign
  20635. module.exports.getKey = getKey
  20636. module.exports.makeKey = makeKey
  20637. /***/ }),
  20638. /***/ 181:
  20639. /*!**********************************************!*\
  20640. !*** ./node_modules/browserify-rsa/index.js ***!
  20641. \**********************************************/
  20642. /*! no static exports found */
  20643. /***/ (function(module, exports, __webpack_require__) {
  20644. /* WEBPACK VAR INJECTION */(function(Buffer) {var BN = __webpack_require__(/*! bn.js */ 171)
  20645. var randomBytes = __webpack_require__(/*! randombytes */ 86)
  20646. function blind (priv) {
  20647. var r = getr(priv)
  20648. var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()
  20649. return { blinder: blinder, unblinder: r.invm(priv.modulus) }
  20650. }
  20651. function getr (priv) {
  20652. var len = priv.modulus.byteLength()
  20653. var r
  20654. do {
  20655. r = new BN(randomBytes(len))
  20656. } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))
  20657. return r
  20658. }
  20659. function crt (msg, priv) {
  20660. var blinds = blind(priv)
  20661. var len = priv.modulus.byteLength()
  20662. var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)
  20663. var c1 = blinded.toRed(BN.mont(priv.prime1))
  20664. var c2 = blinded.toRed(BN.mont(priv.prime2))
  20665. var qinv = priv.coefficient
  20666. var p = priv.prime1
  20667. var q = priv.prime2
  20668. var m1 = c1.redPow(priv.exponent1).fromRed()
  20669. var m2 = c2.redPow(priv.exponent2).fromRed()
  20670. var h = m1.isub(m2).imul(qinv).umod(p).imul(q)
  20671. return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)
  20672. }
  20673. crt.getr = getr
  20674. module.exports = crt
  20675. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 90).Buffer))
  20676. /***/ }),
  20677. /***/ 182:
  20678. /*!***********************************************!*\
  20679. !*** ./node_modules/elliptic/lib/elliptic.js ***!
  20680. \***********************************************/
  20681. /*! no static exports found */
  20682. /***/ (function(module, exports, __webpack_require__) {
  20683. "use strict";
  20684. var elliptic = exports;
  20685. elliptic.version = __webpack_require__(/*! ../package.json */ 183).version;
  20686. elliptic.utils = __webpack_require__(/*! ./elliptic/utils */ 184);
  20687. elliptic.rand = __webpack_require__(/*! brorand */ 175);
  20688. elliptic.curve = __webpack_require__(/*! ./elliptic/curve */ 186);
  20689. elliptic.curves = __webpack_require__(/*! ./elliptic/curves */ 191);
  20690. // Protocols
  20691. elliptic.ec = __webpack_require__(/*! ./elliptic/ec */ 205);
  20692. elliptic.eddsa = __webpack_require__(/*! ./elliptic/eddsa */ 209);
  20693. /***/ }),
  20694. /***/ 183:
  20695. /*!********************************************!*\
  20696. !*** ./node_modules/elliptic/package.json ***!
  20697. \********************************************/
  20698. /*! exports provided: name, version, description, main, files, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, dependencies, default */
  20699. /***/ (function(module) {
  20700. module.exports = JSON.parse("{\"name\":\"elliptic\",\"version\":\"6.5.4\",\"description\":\"EC cryptography\",\"main\":\"lib/elliptic.js\",\"files\":[\"lib\"],\"scripts\":{\"lint\":\"eslint lib test\",\"lint:fix\":\"npm run lint -- --fix\",\"unit\":\"istanbul test _mocha --reporter=spec test/index.js\",\"test\":\"npm run lint && npm run unit\",\"version\":\"grunt dist && git add dist/\"},\"repository\":{\"type\":\"git\",\"url\":\"git@github.com:indutny/elliptic\"},\"keywords\":[\"EC\",\"Elliptic\",\"curve\",\"Cryptography\"],\"author\":\"Fedor Indutny <fedor@indutny.com>\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/indutny/elliptic/issues\"},\"homepage\":\"https://github.com/indutny/elliptic\",\"devDependencies\":{\"brfs\":\"^2.0.2\",\"coveralls\":\"^3.1.0\",\"eslint\":\"^7.6.0\",\"grunt\":\"^1.2.1\",\"grunt-browserify\":\"^5.3.0\",\"grunt-cli\":\"^1.3.2\",\"grunt-contrib-connect\":\"^3.0.0\",\"grunt-contrib-copy\":\"^1.0.0\",\"grunt-contrib-uglify\":\"^5.0.0\",\"grunt-mocha-istanbul\":\"^5.0.2\",\"grunt-saucelabs\":\"^9.0.1\",\"istanbul\":\"^0.4.5\",\"mocha\":\"^8.0.1\"},\"dependencies\":{\"bn.js\":\"^4.11.9\",\"brorand\":\"^1.1.0\",\"hash.js\":\"^1.0.0\",\"hmac-drbg\":\"^1.0.1\",\"inherits\":\"^2.0.4\",\"minimalistic-assert\":\"^1.0.1\",\"minimalistic-crypto-utils\":\"^1.0.1\"}}");
  20701. /***/ }),
  20702. /***/ 184:
  20703. /*!*****************************************************!*\
  20704. !*** ./node_modules/elliptic/lib/elliptic/utils.js ***!
  20705. \*****************************************************/
  20706. /*! no static exports found */
  20707. /***/ (function(module, exports, __webpack_require__) {
  20708. "use strict";
  20709. var utils = exports;
  20710. var BN = __webpack_require__(/*! bn.js */ 171);
  20711. var minAssert = __webpack_require__(/*! minimalistic-assert */ 145);
  20712. var minUtils = __webpack_require__(/*! minimalistic-crypto-utils */ 185);
  20713. utils.assert = minAssert;
  20714. utils.toArray = minUtils.toArray;
  20715. utils.zero2 = minUtils.zero2;
  20716. utils.toHex = minUtils.toHex;
  20717. utils.encode = minUtils.encode;
  20718. // Represent num in a w-NAF form
  20719. function getNAF(num, w, bits) {
  20720. var naf = new Array(Math.max(num.bitLength(), bits) + 1);
  20721. naf.fill(0);
  20722. var ws = 1 << (w + 1);
  20723. var k = num.clone();
  20724. for (var i = 0; i < naf.length; i++) {
  20725. var z;
  20726. var mod = k.andln(ws - 1);
  20727. if (k.isOdd()) {
  20728. if (mod > (ws >> 1) - 1)
  20729. z = (ws >> 1) - mod;
  20730. else
  20731. z = mod;
  20732. k.isubn(z);
  20733. } else {
  20734. z = 0;
  20735. }
  20736. naf[i] = z;
  20737. k.iushrn(1);
  20738. }
  20739. return naf;
  20740. }
  20741. utils.getNAF = getNAF;
  20742. // Represent k1, k2 in a Joint Sparse Form
  20743. function getJSF(k1, k2) {
  20744. var jsf = [
  20745. [],
  20746. [],
  20747. ];
  20748. k1 = k1.clone();
  20749. k2 = k2.clone();
  20750. var d1 = 0;
  20751. var d2 = 0;
  20752. var m8;
  20753. while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {
  20754. // First phase
  20755. var m14 = (k1.andln(3) + d1) & 3;
  20756. var m24 = (k2.andln(3) + d2) & 3;
  20757. if (m14 === 3)
  20758. m14 = -1;
  20759. if (m24 === 3)
  20760. m24 = -1;
  20761. var u1;
  20762. if ((m14 & 1) === 0) {
  20763. u1 = 0;
  20764. } else {
  20765. m8 = (k1.andln(7) + d1) & 7;
  20766. if ((m8 === 3 || m8 === 5) && m24 === 2)
  20767. u1 = -m14;
  20768. else
  20769. u1 = m14;
  20770. }
  20771. jsf[0].push(u1);
  20772. var u2;
  20773. if ((m24 & 1) === 0) {
  20774. u2 = 0;
  20775. } else {
  20776. m8 = (k2.andln(7) + d2) & 7;
  20777. if ((m8 === 3 || m8 === 5) && m14 === 2)
  20778. u2 = -m24;
  20779. else
  20780. u2 = m24;
  20781. }
  20782. jsf[1].push(u2);
  20783. // Second phase
  20784. if (2 * d1 === u1 + 1)
  20785. d1 = 1 - d1;
  20786. if (2 * d2 === u2 + 1)
  20787. d2 = 1 - d2;
  20788. k1.iushrn(1);
  20789. k2.iushrn(1);
  20790. }
  20791. return jsf;
  20792. }
  20793. utils.getJSF = getJSF;
  20794. function cachedProperty(obj, name, computer) {
  20795. var key = '_' + name;
  20796. obj.prototype[name] = function cachedProperty() {
  20797. return this[key] !== undefined ? this[key] :
  20798. this[key] = computer.call(this);
  20799. };
  20800. }
  20801. utils.cachedProperty = cachedProperty;
  20802. function parseBytes(bytes) {
  20803. return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :
  20804. bytes;
  20805. }
  20806. utils.parseBytes = parseBytes;
  20807. function intFromLE(bytes) {
  20808. return new BN(bytes, 'hex', 'le');
  20809. }
  20810. utils.intFromLE = intFromLE;
  20811. /***/ }),
  20812. /***/ 185:
  20813. /*!*************************************************************!*\
  20814. !*** ./node_modules/minimalistic-crypto-utils/lib/utils.js ***!
  20815. \*************************************************************/
  20816. /*! no static exports found */
  20817. /***/ (function(module, exports, __webpack_require__) {
  20818. "use strict";
  20819. var utils = exports;
  20820. function toArray(msg, enc) {
  20821. if (Array.isArray(msg))
  20822. return msg.slice();
  20823. if (!msg)
  20824. return [];
  20825. var res = [];
  20826. if (typeof msg !== 'string') {
  20827. for (var i = 0; i < msg.length; i++)
  20828. res[i] = msg[i] | 0;
  20829. return res;
  20830. }
  20831. if (enc === 'hex') {
  20832. msg = msg.replace(/[^a-z0-9]+/ig, '');
  20833. if (msg.length % 2 !== 0)
  20834. msg = '0' + msg;
  20835. for (var i = 0; i < msg.length; i += 2)
  20836. res.push(parseInt(msg[i] + msg[i + 1], 16));
  20837. } else {
  20838. for (var i = 0; i < msg.length; i++) {
  20839. var c = msg.charCodeAt(i);
  20840. var hi = c >> 8;
  20841. var lo = c & 0xff;
  20842. if (hi)
  20843. res.push(hi, lo);
  20844. else
  20845. res.push(lo);
  20846. }
  20847. }
  20848. return res;
  20849. }
  20850. utils.toArray = toArray;
  20851. function zero2(word) {
  20852. if (word.length === 1)
  20853. return '0' + word;
  20854. else
  20855. return word;
  20856. }
  20857. utils.zero2 = zero2;
  20858. function toHex(msg) {
  20859. var res = '';
  20860. for (var i = 0; i < msg.length; i++)
  20861. res += zero2(msg[i].toString(16));
  20862. return res;
  20863. }
  20864. utils.toHex = toHex;
  20865. utils.encode = function encode(arr, enc) {
  20866. if (enc === 'hex')
  20867. return toHex(arr);
  20868. else
  20869. return arr;
  20870. };
  20871. /***/ }),
  20872. /***/ 186:
  20873. /*!***********************************************************!*\
  20874. !*** ./node_modules/elliptic/lib/elliptic/curve/index.js ***!
  20875. \***********************************************************/
  20876. /*! no static exports found */
  20877. /***/ (function(module, exports, __webpack_require__) {
  20878. "use strict";
  20879. var curve = exports;
  20880. curve.base = __webpack_require__(/*! ./base */ 187);
  20881. curve.short = __webpack_require__(/*! ./short */ 188);
  20882. curve.mont = __webpack_require__(/*! ./mont */ 189);
  20883. curve.edwards = __webpack_require__(/*! ./edwards */ 190);
  20884. /***/ }),
  20885. /***/ 187:
  20886. /*!**********************************************************!*\
  20887. !*** ./node_modules/elliptic/lib/elliptic/curve/base.js ***!
  20888. \**********************************************************/
  20889. /*! no static exports found */
  20890. /***/ (function(module, exports, __webpack_require__) {
  20891. "use strict";
  20892. var BN = __webpack_require__(/*! bn.js */ 171);
  20893. var utils = __webpack_require__(/*! ../utils */ 184);
  20894. var getNAF = utils.getNAF;
  20895. var getJSF = utils.getJSF;
  20896. var assert = utils.assert;
  20897. function BaseCurve(type, conf) {
  20898. this.type = type;
  20899. this.p = new BN(conf.p, 16);
  20900. // Use Montgomery, when there is no fast reduction for the prime
  20901. this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);
  20902. // Useful for many curves
  20903. this.zero = new BN(0).toRed(this.red);
  20904. this.one = new BN(1).toRed(this.red);
  20905. this.two = new BN(2).toRed(this.red);
  20906. // Curve configuration, optional
  20907. this.n = conf.n && new BN(conf.n, 16);
  20908. this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);
  20909. // Temporary arrays
  20910. this._wnafT1 = new Array(4);
  20911. this._wnafT2 = new Array(4);
  20912. this._wnafT3 = new Array(4);
  20913. this._wnafT4 = new Array(4);
  20914. this._bitLength = this.n ? this.n.bitLength() : 0;
  20915. // Generalized Greg Maxwell's trick
  20916. var adjustCount = this.n && this.p.div(this.n);
  20917. if (!adjustCount || adjustCount.cmpn(100) > 0) {
  20918. this.redN = null;
  20919. } else {
  20920. this._maxwellTrick = true;
  20921. this.redN = this.n.toRed(this.red);
  20922. }
  20923. }
  20924. module.exports = BaseCurve;
  20925. BaseCurve.prototype.point = function point() {
  20926. throw new Error('Not implemented');
  20927. };
  20928. BaseCurve.prototype.validate = function validate() {
  20929. throw new Error('Not implemented');
  20930. };
  20931. BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
  20932. assert(p.precomputed);
  20933. var doubles = p._getDoubles();
  20934. var naf = getNAF(k, 1, this._bitLength);
  20935. var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
  20936. I /= 3;
  20937. // Translate into more windowed form
  20938. var repr = [];
  20939. var j;
  20940. var nafW;
  20941. for (j = 0; j < naf.length; j += doubles.step) {
  20942. nafW = 0;
  20943. for (var l = j + doubles.step - 1; l >= j; l--)
  20944. nafW = (nafW << 1) + naf[l];
  20945. repr.push(nafW);
  20946. }
  20947. var a = this.jpoint(null, null, null);
  20948. var b = this.jpoint(null, null, null);
  20949. for (var i = I; i > 0; i--) {
  20950. for (j = 0; j < repr.length; j++) {
  20951. nafW = repr[j];
  20952. if (nafW === i)
  20953. b = b.mixedAdd(doubles.points[j]);
  20954. else if (nafW === -i)
  20955. b = b.mixedAdd(doubles.points[j].neg());
  20956. }
  20957. a = a.add(b);
  20958. }
  20959. return a.toP();
  20960. };
  20961. BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
  20962. var w = 4;
  20963. // Precompute window
  20964. var nafPoints = p._getNAFPoints(w);
  20965. w = nafPoints.wnd;
  20966. var wnd = nafPoints.points;
  20967. // Get NAF form
  20968. var naf = getNAF(k, w, this._bitLength);
  20969. // Add `this`*(N+1) for every w-NAF index
  20970. var acc = this.jpoint(null, null, null);
  20971. for (var i = naf.length - 1; i >= 0; i--) {
  20972. // Count zeroes
  20973. for (var l = 0; i >= 0 && naf[i] === 0; i--)
  20974. l++;
  20975. if (i >= 0)
  20976. l++;
  20977. acc = acc.dblp(l);
  20978. if (i < 0)
  20979. break;
  20980. var z = naf[i];
  20981. assert(z !== 0);
  20982. if (p.type === 'affine') {
  20983. // J +- P
  20984. if (z > 0)
  20985. acc = acc.mixedAdd(wnd[(z - 1) >> 1]);
  20986. else
  20987. acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());
  20988. } else {
  20989. // J +- J
  20990. if (z > 0)
  20991. acc = acc.add(wnd[(z - 1) >> 1]);
  20992. else
  20993. acc = acc.add(wnd[(-z - 1) >> 1].neg());
  20994. }
  20995. }
  20996. return p.type === 'affine' ? acc.toP() : acc;
  20997. };
  20998. BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
  20999. points,
  21000. coeffs,
  21001. len,
  21002. jacobianResult) {
  21003. var wndWidth = this._wnafT1;
  21004. var wnd = this._wnafT2;
  21005. var naf = this._wnafT3;
  21006. // Fill all arrays
  21007. var max = 0;
  21008. var i;
  21009. var j;
  21010. var p;
  21011. for (i = 0; i < len; i++) {
  21012. p = points[i];
  21013. var nafPoints = p._getNAFPoints(defW);
  21014. wndWidth[i] = nafPoints.wnd;
  21015. wnd[i] = nafPoints.points;
  21016. }
  21017. // Comb small window NAFs
  21018. for (i = len - 1; i >= 1; i -= 2) {
  21019. var a = i - 1;
  21020. var b = i;
  21021. if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
  21022. naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
  21023. naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
  21024. max = Math.max(naf[a].length, max);
  21025. max = Math.max(naf[b].length, max);
  21026. continue;
  21027. }
  21028. var comb = [
  21029. points[a], /* 1 */
  21030. null, /* 3 */
  21031. null, /* 5 */
  21032. points[b], /* 7 */
  21033. ];
  21034. // Try to avoid Projective points, if possible
  21035. if (points[a].y.cmp(points[b].y) === 0) {
  21036. comb[1] = points[a].add(points[b]);
  21037. comb[2] = points[a].toJ().mixedAdd(points[b].neg());
  21038. } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {
  21039. comb[1] = points[a].toJ().mixedAdd(points[b]);
  21040. comb[2] = points[a].add(points[b].neg());
  21041. } else {
  21042. comb[1] = points[a].toJ().mixedAdd(points[b]);
  21043. comb[2] = points[a].toJ().mixedAdd(points[b].neg());
  21044. }
  21045. var index = [
  21046. -3, /* -1 -1 */
  21047. -1, /* -1 0 */
  21048. -5, /* -1 1 */
  21049. -7, /* 0 -1 */
  21050. 0, /* 0 0 */
  21051. 7, /* 0 1 */
  21052. 5, /* 1 -1 */
  21053. 1, /* 1 0 */
  21054. 3, /* 1 1 */
  21055. ];
  21056. var jsf = getJSF(coeffs[a], coeffs[b]);
  21057. max = Math.max(jsf[0].length, max);
  21058. naf[a] = new Array(max);
  21059. naf[b] = new Array(max);
  21060. for (j = 0; j < max; j++) {
  21061. var ja = jsf[0][j] | 0;
  21062. var jb = jsf[1][j] | 0;
  21063. naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];
  21064. naf[b][j] = 0;
  21065. wnd[a] = comb;
  21066. }
  21067. }
  21068. var acc = this.jpoint(null, null, null);
  21069. var tmp = this._wnafT4;
  21070. for (i = max; i >= 0; i--) {
  21071. var k = 0;
  21072. while (i >= 0) {
  21073. var zero = true;
  21074. for (j = 0; j < len; j++) {
  21075. tmp[j] = naf[j][i] | 0;
  21076. if (tmp[j] !== 0)
  21077. zero = false;
  21078. }
  21079. if (!zero)
  21080. break;
  21081. k++;
  21082. i--;
  21083. }
  21084. if (i >= 0)
  21085. k++;
  21086. acc = acc.dblp(k);
  21087. if (i < 0)
  21088. break;
  21089. for (j = 0; j < len; j++) {
  21090. var z = tmp[j];
  21091. p;
  21092. if (z === 0)
  21093. continue;
  21094. else if (z > 0)
  21095. p = wnd[j][(z - 1) >> 1];
  21096. else if (z < 0)
  21097. p = wnd[j][(-z - 1) >> 1].neg();
  21098. if (p.type === 'affine')
  21099. acc = acc.mixedAdd(p);
  21100. else
  21101. acc = acc.add(p);
  21102. }
  21103. }
  21104. // Zeroify references
  21105. for (i = 0; i < len; i++)
  21106. wnd[i] = null;
  21107. if (jacobianResult)
  21108. return acc;
  21109. else
  21110. return acc.toP();
  21111. };
  21112. function BasePoint(curve, type) {
  21113. this.curve = curve;
  21114. this.type = type;
  21115. this.precomputed = null;
  21116. }
  21117. BaseCurve.BasePoint = BasePoint;
  21118. BasePoint.prototype.eq = function eq(/*other*/) {
  21119. throw new Error('Not implemented');
  21120. };
  21121. BasePoint.prototype.validate = function validate() {
  21122. return this.curve.validate(this);
  21123. };
  21124. BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  21125. bytes = utils.toArray(bytes, enc);
  21126. var len = this.p.byteLength();
  21127. // uncompressed, hybrid-odd, hybrid-even
  21128. if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&
  21129. bytes.length - 1 === 2 * len) {
  21130. if (bytes[0] === 0x06)
  21131. assert(bytes[bytes.length - 1] % 2 === 0);
  21132. else if (bytes[0] === 0x07)
  21133. assert(bytes[bytes.length - 1] % 2 === 1);
  21134. var res = this.point(bytes.slice(1, 1 + len),
  21135. bytes.slice(1 + len, 1 + 2 * len));
  21136. return res;
  21137. } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&
  21138. bytes.length - 1 === len) {
  21139. return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);
  21140. }
  21141. throw new Error('Unknown point format');
  21142. };
  21143. BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
  21144. return this.encode(enc, true);
  21145. };
  21146. BasePoint.prototype._encode = function _encode(compact) {
  21147. var len = this.curve.p.byteLength();
  21148. var x = this.getX().toArray('be', len);
  21149. if (compact)
  21150. return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);
  21151. return [ 0x04 ].concat(x, this.getY().toArray('be', len));
  21152. };
  21153. BasePoint.prototype.encode = function encode(enc, compact) {
  21154. return utils.encode(this._encode(compact), enc);
  21155. };
  21156. BasePoint.prototype.precompute = function precompute(power) {
  21157. if (this.precomputed)
  21158. return this;
  21159. var precomputed = {
  21160. doubles: null,
  21161. naf: null,
  21162. beta: null,
  21163. };
  21164. precomputed.naf = this._getNAFPoints(8);
  21165. precomputed.doubles = this._getDoubles(4, power);
  21166. precomputed.beta = this._getBeta();
  21167. this.precomputed = precomputed;
  21168. return this;
  21169. };
  21170. BasePoint.prototype._hasDoubles = function _hasDoubles(k) {
  21171. if (!this.precomputed)
  21172. return false;
  21173. var doubles = this.precomputed.doubles;
  21174. if (!doubles)
  21175. return false;
  21176. return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);
  21177. };
  21178. BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
  21179. if (this.precomputed && this.precomputed.doubles)
  21180. return this.precomputed.doubles;
  21181. var doubles = [ this ];
  21182. var acc = this;
  21183. for (var i = 0; i < power; i += step) {
  21184. for (var j = 0; j < step; j++)
  21185. acc = acc.dbl();
  21186. doubles.push(acc);
  21187. }
  21188. return {
  21189. step: step,
  21190. points: doubles,
  21191. };
  21192. };
  21193. BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
  21194. if (this.precomputed && this.precomputed.naf)
  21195. return this.precomputed.naf;
  21196. var res = [ this ];
  21197. var max = (1 << wnd) - 1;
  21198. var dbl = max === 1 ? null : this.dbl();
  21199. for (var i = 1; i < max; i++)
  21200. res[i] = res[i - 1].add(dbl);
  21201. return {
  21202. wnd: wnd,
  21203. points: res,
  21204. };
  21205. };
  21206. BasePoint.prototype._getBeta = function _getBeta() {
  21207. return null;
  21208. };
  21209. BasePoint.prototype.dblp = function dblp(k) {
  21210. var r = this;
  21211. for (var i = 0; i < k; i++)
  21212. r = r.dbl();
  21213. return r;
  21214. };
  21215. /***/ }),
  21216. /***/ 188:
  21217. /*!***********************************************************!*\
  21218. !*** ./node_modules/elliptic/lib/elliptic/curve/short.js ***!
  21219. \***********************************************************/
  21220. /*! no static exports found */
  21221. /***/ (function(module, exports, __webpack_require__) {
  21222. "use strict";
  21223. var utils = __webpack_require__(/*! ../utils */ 184);
  21224. var BN = __webpack_require__(/*! bn.js */ 171);
  21225. var inherits = __webpack_require__(/*! inherits */ 95);
  21226. var Base = __webpack_require__(/*! ./base */ 187);
  21227. var assert = utils.assert;
  21228. function ShortCurve(conf) {
  21229. Base.call(this, 'short', conf);
  21230. this.a = new BN(conf.a, 16).toRed(this.red);
  21231. this.b = new BN(conf.b, 16).toRed(this.red);
  21232. this.tinv = this.two.redInvm();
  21233. this.zeroA = this.a.fromRed().cmpn(0) === 0;
  21234. this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;
  21235. // If the curve is endomorphic, precalculate beta and lambda
  21236. this.endo = this._getEndomorphism(conf);
  21237. this._endoWnafT1 = new Array(4);
  21238. this._endoWnafT2 = new Array(4);
  21239. }
  21240. inherits(ShortCurve, Base);
  21241. module.exports = ShortCurve;
  21242. ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
  21243. // No efficient endomorphism
  21244. if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
  21245. return;
  21246. // Compute beta and lambda, that lambda * P = (beta * Px; Py)
  21247. var beta;
  21248. var lambda;
  21249. if (conf.beta) {
  21250. beta = new BN(conf.beta, 16).toRed(this.red);
  21251. } else {
  21252. var betas = this._getEndoRoots(this.p);
  21253. // Choose the smallest beta
  21254. beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
  21255. beta = beta.toRed(this.red);
  21256. }
  21257. if (conf.lambda) {
  21258. lambda = new BN(conf.lambda, 16);
  21259. } else {
  21260. // Choose the lambda that is matching selected beta
  21261. var lambdas = this._getEndoRoots(this.n);
  21262. if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
  21263. lambda = lambdas[0];
  21264. } else {
  21265. lambda = lambdas[1];
  21266. assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
  21267. }
  21268. }
  21269. // Get basis vectors, used for balanced length-two representation
  21270. var basis;
  21271. if (conf.basis) {
  21272. basis = conf.basis.map(function(vec) {
  21273. return {
  21274. a: new BN(vec.a, 16),
  21275. b: new BN(vec.b, 16),
  21276. };
  21277. });
  21278. } else {
  21279. basis = this._getEndoBasis(lambda);
  21280. }
  21281. return {
  21282. beta: beta,
  21283. lambda: lambda,
  21284. basis: basis,
  21285. };
  21286. };
  21287. ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
  21288. // Find roots of for x^2 + x + 1 in F
  21289. // Root = (-1 +- Sqrt(-3)) / 2
  21290. //
  21291. var red = num === this.p ? this.red : BN.mont(num);
  21292. var tinv = new BN(2).toRed(red).redInvm();
  21293. var ntinv = tinv.redNeg();
  21294. var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);
  21295. var l1 = ntinv.redAdd(s).fromRed();
  21296. var l2 = ntinv.redSub(s).fromRed();
  21297. return [ l1, l2 ];
  21298. };
  21299. ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
  21300. // aprxSqrt >= sqrt(this.n)
  21301. var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));
  21302. // 3.74
  21303. // Run EGCD, until r(L + 1) < aprxSqrt
  21304. var u = lambda;
  21305. var v = this.n.clone();
  21306. var x1 = new BN(1);
  21307. var y1 = new BN(0);
  21308. var x2 = new BN(0);
  21309. var y2 = new BN(1);
  21310. // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)
  21311. var a0;
  21312. var b0;
  21313. // First vector
  21314. var a1;
  21315. var b1;
  21316. // Second vector
  21317. var a2;
  21318. var b2;
  21319. var prevR;
  21320. var i = 0;
  21321. var r;
  21322. var x;
  21323. while (u.cmpn(0) !== 0) {
  21324. var q = v.div(u);
  21325. r = v.sub(q.mul(u));
  21326. x = x2.sub(q.mul(x1));
  21327. var y = y2.sub(q.mul(y1));
  21328. if (!a1 && r.cmp(aprxSqrt) < 0) {
  21329. a0 = prevR.neg();
  21330. b0 = x1;
  21331. a1 = r.neg();
  21332. b1 = x;
  21333. } else if (a1 && ++i === 2) {
  21334. break;
  21335. }
  21336. prevR = r;
  21337. v = u;
  21338. u = r;
  21339. x2 = x1;
  21340. x1 = x;
  21341. y2 = y1;
  21342. y1 = y;
  21343. }
  21344. a2 = r.neg();
  21345. b2 = x;
  21346. var len1 = a1.sqr().add(b1.sqr());
  21347. var len2 = a2.sqr().add(b2.sqr());
  21348. if (len2.cmp(len1) >= 0) {
  21349. a2 = a0;
  21350. b2 = b0;
  21351. }
  21352. // Normalize signs
  21353. if (a1.negative) {
  21354. a1 = a1.neg();
  21355. b1 = b1.neg();
  21356. }
  21357. if (a2.negative) {
  21358. a2 = a2.neg();
  21359. b2 = b2.neg();
  21360. }
  21361. return [
  21362. { a: a1, b: b1 },
  21363. { a: a2, b: b2 },
  21364. ];
  21365. };
  21366. ShortCurve.prototype._endoSplit = function _endoSplit(k) {
  21367. var basis = this.endo.basis;
  21368. var v1 = basis[0];
  21369. var v2 = basis[1];
  21370. var c1 = v2.b.mul(k).divRound(this.n);
  21371. var c2 = v1.b.neg().mul(k).divRound(this.n);
  21372. var p1 = c1.mul(v1.a);
  21373. var p2 = c2.mul(v2.a);
  21374. var q1 = c1.mul(v1.b);
  21375. var q2 = c2.mul(v2.b);
  21376. // Calculate answer
  21377. var k1 = k.sub(p1).sub(p2);
  21378. var k2 = q1.add(q2).neg();
  21379. return { k1: k1, k2: k2 };
  21380. };
  21381. ShortCurve.prototype.pointFromX = function pointFromX(x, odd) {
  21382. x = new BN(x, 16);
  21383. if (!x.red)
  21384. x = x.toRed(this.red);
  21385. var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);
  21386. var y = y2.redSqrt();
  21387. if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
  21388. throw new Error('invalid point');
  21389. // XXX Is there any way to tell if the number is odd without converting it
  21390. // to non-red form?
  21391. var isOdd = y.fromRed().isOdd();
  21392. if (odd && !isOdd || !odd && isOdd)
  21393. y = y.redNeg();
  21394. return this.point(x, y);
  21395. };
  21396. ShortCurve.prototype.validate = function validate(point) {
  21397. if (point.inf)
  21398. return true;
  21399. var x = point.x;
  21400. var y = point.y;
  21401. var ax = this.a.redMul(x);
  21402. var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);
  21403. return y.redSqr().redISub(rhs).cmpn(0) === 0;
  21404. };
  21405. ShortCurve.prototype._endoWnafMulAdd =
  21406. function _endoWnafMulAdd(points, coeffs, jacobianResult) {
  21407. var npoints = this._endoWnafT1;
  21408. var ncoeffs = this._endoWnafT2;
  21409. for (var i = 0; i < points.length; i++) {
  21410. var split = this._endoSplit(coeffs[i]);
  21411. var p = points[i];
  21412. var beta = p._getBeta();
  21413. if (split.k1.negative) {
  21414. split.k1.ineg();
  21415. p = p.neg(true);
  21416. }
  21417. if (split.k2.negative) {
  21418. split.k2.ineg();
  21419. beta = beta.neg(true);
  21420. }
  21421. npoints[i * 2] = p;
  21422. npoints[i * 2 + 1] = beta;
  21423. ncoeffs[i * 2] = split.k1;
  21424. ncoeffs[i * 2 + 1] = split.k2;
  21425. }
  21426. var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);
  21427. // Clean-up references to points and coefficients
  21428. for (var j = 0; j < i * 2; j++) {
  21429. npoints[j] = null;
  21430. ncoeffs[j] = null;
  21431. }
  21432. return res;
  21433. };
  21434. function Point(curve, x, y, isRed) {
  21435. Base.BasePoint.call(this, curve, 'affine');
  21436. if (x === null && y === null) {
  21437. this.x = null;
  21438. this.y = null;
  21439. this.inf = true;
  21440. } else {
  21441. this.x = new BN(x, 16);
  21442. this.y = new BN(y, 16);
  21443. // Force redgomery representation when loading from JSON
  21444. if (isRed) {
  21445. this.x.forceRed(this.curve.red);
  21446. this.y.forceRed(this.curve.red);
  21447. }
  21448. if (!this.x.red)
  21449. this.x = this.x.toRed(this.curve.red);
  21450. if (!this.y.red)
  21451. this.y = this.y.toRed(this.curve.red);
  21452. this.inf = false;
  21453. }
  21454. }
  21455. inherits(Point, Base.BasePoint);
  21456. ShortCurve.prototype.point = function point(x, y, isRed) {
  21457. return new Point(this, x, y, isRed);
  21458. };
  21459. ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
  21460. return Point.fromJSON(this, obj, red);
  21461. };
  21462. Point.prototype._getBeta = function _getBeta() {
  21463. if (!this.curve.endo)
  21464. return;
  21465. var pre = this.precomputed;
  21466. if (pre && pre.beta)
  21467. return pre.beta;
  21468. var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
  21469. if (pre) {
  21470. var curve = this.curve;
  21471. var endoMul = function(p) {
  21472. return curve.point(p.x.redMul(curve.endo.beta), p.y);
  21473. };
  21474. pre.beta = beta;
  21475. beta.precomputed = {
  21476. beta: null,
  21477. naf: pre.naf && {
  21478. wnd: pre.naf.wnd,
  21479. points: pre.naf.points.map(endoMul),
  21480. },
  21481. doubles: pre.doubles && {
  21482. step: pre.doubles.step,
  21483. points: pre.doubles.points.map(endoMul),
  21484. },
  21485. };
  21486. }
  21487. return beta;
  21488. };
  21489. Point.prototype.toJSON = function toJSON() {
  21490. if (!this.precomputed)
  21491. return [ this.x, this.y ];
  21492. return [ this.x, this.y, this.precomputed && {
  21493. doubles: this.precomputed.doubles && {
  21494. step: this.precomputed.doubles.step,
  21495. points: this.precomputed.doubles.points.slice(1),
  21496. },
  21497. naf: this.precomputed.naf && {
  21498. wnd: this.precomputed.naf.wnd,
  21499. points: this.precomputed.naf.points.slice(1),
  21500. },
  21501. } ];
  21502. };
  21503. Point.fromJSON = function fromJSON(curve, obj, red) {
  21504. if (typeof obj === 'string')
  21505. obj = JSON.parse(obj);
  21506. var res = curve.point(obj[0], obj[1], red);
  21507. if (!obj[2])
  21508. return res;
  21509. function obj2point(obj) {
  21510. return curve.point(obj[0], obj[1], red);
  21511. }
  21512. var pre = obj[2];
  21513. res.precomputed = {
  21514. beta: null,
  21515. doubles: pre.doubles && {
  21516. step: pre.doubles.step,
  21517. points: [ res ].concat(pre.doubles.points.map(obj2point)),
  21518. },
  21519. naf: pre.naf && {
  21520. wnd: pre.naf.wnd,
  21521. points: [ res ].concat(pre.naf.points.map(obj2point)),
  21522. },
  21523. };
  21524. return res;
  21525. };
  21526. Point.prototype.inspect = function inspect() {
  21527. if (this.isInfinity())
  21528. return '<EC Point Infinity>';
  21529. return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
  21530. ' y: ' + this.y.fromRed().toString(16, 2) + '>';
  21531. };
  21532. Point.prototype.isInfinity = function isInfinity() {
  21533. return this.inf;
  21534. };
  21535. Point.prototype.add = function add(p) {
  21536. // O + P = P
  21537. if (this.inf)
  21538. return p;
  21539. // P + O = P
  21540. if (p.inf)
  21541. return this;
  21542. // P + P = 2P
  21543. if (this.eq(p))
  21544. return this.dbl();
  21545. // P + (-P) = O
  21546. if (this.neg().eq(p))
  21547. return this.curve.point(null, null);
  21548. // P + Q = O
  21549. if (this.x.cmp(p.x) === 0)
  21550. return this.curve.point(null, null);
  21551. var c = this.y.redSub(p.y);
  21552. if (c.cmpn(0) !== 0)
  21553. c = c.redMul(this.x.redSub(p.x).redInvm());
  21554. var nx = c.redSqr().redISub(this.x).redISub(p.x);
  21555. var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  21556. return this.curve.point(nx, ny);
  21557. };
  21558. Point.prototype.dbl = function dbl() {
  21559. if (this.inf)
  21560. return this;
  21561. // 2P = O
  21562. var ys1 = this.y.redAdd(this.y);
  21563. if (ys1.cmpn(0) === 0)
  21564. return this.curve.point(null, null);
  21565. var a = this.curve.a;
  21566. var x2 = this.x.redSqr();
  21567. var dyinv = ys1.redInvm();
  21568. var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);
  21569. var nx = c.redSqr().redISub(this.x.redAdd(this.x));
  21570. var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  21571. return this.curve.point(nx, ny);
  21572. };
  21573. Point.prototype.getX = function getX() {
  21574. return this.x.fromRed();
  21575. };
  21576. Point.prototype.getY = function getY() {
  21577. return this.y.fromRed();
  21578. };
  21579. Point.prototype.mul = function mul(k) {
  21580. k = new BN(k, 16);
  21581. if (this.isInfinity())
  21582. return this;
  21583. else if (this._hasDoubles(k))
  21584. return this.curve._fixedNafMul(this, k);
  21585. else if (this.curve.endo)
  21586. return this.curve._endoWnafMulAdd([ this ], [ k ]);
  21587. else
  21588. return this.curve._wnafMul(this, k);
  21589. };
  21590. Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
  21591. var points = [ this, p2 ];
  21592. var coeffs = [ k1, k2 ];
  21593. if (this.curve.endo)
  21594. return this.curve._endoWnafMulAdd(points, coeffs);
  21595. else
  21596. return this.curve._wnafMulAdd(1, points, coeffs, 2);
  21597. };
  21598. Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
  21599. var points = [ this, p2 ];
  21600. var coeffs = [ k1, k2 ];
  21601. if (this.curve.endo)
  21602. return this.curve._endoWnafMulAdd(points, coeffs, true);
  21603. else
  21604. return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
  21605. };
  21606. Point.prototype.eq = function eq(p) {
  21607. return this === p ||
  21608. this.inf === p.inf &&
  21609. (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);
  21610. };
  21611. Point.prototype.neg = function neg(_precompute) {
  21612. if (this.inf)
  21613. return this;
  21614. var res = this.curve.point(this.x, this.y.redNeg());
  21615. if (_precompute && this.precomputed) {
  21616. var pre = this.precomputed;
  21617. var negate = function(p) {
  21618. return p.neg();
  21619. };
  21620. res.precomputed = {
  21621. naf: pre.naf && {
  21622. wnd: pre.naf.wnd,
  21623. points: pre.naf.points.map(negate),
  21624. },
  21625. doubles: pre.doubles && {
  21626. step: pre.doubles.step,
  21627. points: pre.doubles.points.map(negate),
  21628. },
  21629. };
  21630. }
  21631. return res;
  21632. };
  21633. Point.prototype.toJ = function toJ() {
  21634. if (this.inf)
  21635. return this.curve.jpoint(null, null, null);
  21636. var res = this.curve.jpoint(this.x, this.y, this.curve.one);
  21637. return res;
  21638. };
  21639. function JPoint(curve, x, y, z) {
  21640. Base.BasePoint.call(this, curve, 'jacobian');
  21641. if (x === null && y === null && z === null) {
  21642. this.x = this.curve.one;
  21643. this.y = this.curve.one;
  21644. this.z = new BN(0);
  21645. } else {
  21646. this.x = new BN(x, 16);
  21647. this.y = new BN(y, 16);
  21648. this.z = new BN(z, 16);
  21649. }
  21650. if (!this.x.red)
  21651. this.x = this.x.toRed(this.curve.red);
  21652. if (!this.y.red)
  21653. this.y = this.y.toRed(this.curve.red);
  21654. if (!this.z.red)
  21655. this.z = this.z.toRed(this.curve.red);
  21656. this.zOne = this.z === this.curve.one;
  21657. }
  21658. inherits(JPoint, Base.BasePoint);
  21659. ShortCurve.prototype.jpoint = function jpoint(x, y, z) {
  21660. return new JPoint(this, x, y, z);
  21661. };
  21662. JPoint.prototype.toP = function toP() {
  21663. if (this.isInfinity())
  21664. return this.curve.point(null, null);
  21665. var zinv = this.z.redInvm();
  21666. var zinv2 = zinv.redSqr();
  21667. var ax = this.x.redMul(zinv2);
  21668. var ay = this.y.redMul(zinv2).redMul(zinv);
  21669. return this.curve.point(ax, ay);
  21670. };
  21671. JPoint.prototype.neg = function neg() {
  21672. return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
  21673. };
  21674. JPoint.prototype.add = function add(p) {
  21675. // O + P = P
  21676. if (this.isInfinity())
  21677. return p;
  21678. // P + O = P
  21679. if (p.isInfinity())
  21680. return this;
  21681. // 12M + 4S + 7A
  21682. var pz2 = p.z.redSqr();
  21683. var z2 = this.z.redSqr();
  21684. var u1 = this.x.redMul(pz2);
  21685. var u2 = p.x.redMul(z2);
  21686. var s1 = this.y.redMul(pz2.redMul(p.z));
  21687. var s2 = p.y.redMul(z2.redMul(this.z));
  21688. var h = u1.redSub(u2);
  21689. var r = s1.redSub(s2);
  21690. if (h.cmpn(0) === 0) {
  21691. if (r.cmpn(0) !== 0)
  21692. return this.curve.jpoint(null, null, null);
  21693. else
  21694. return this.dbl();
  21695. }
  21696. var h2 = h.redSqr();
  21697. var h3 = h2.redMul(h);
  21698. var v = u1.redMul(h2);
  21699. var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  21700. var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  21701. var nz = this.z.redMul(p.z).redMul(h);
  21702. return this.curve.jpoint(nx, ny, nz);
  21703. };
  21704. JPoint.prototype.mixedAdd = function mixedAdd(p) {
  21705. // O + P = P
  21706. if (this.isInfinity())
  21707. return p.toJ();
  21708. // P + O = P
  21709. if (p.isInfinity())
  21710. return this;
  21711. // 8M + 3S + 7A
  21712. var z2 = this.z.redSqr();
  21713. var u1 = this.x;
  21714. var u2 = p.x.redMul(z2);
  21715. var s1 = this.y;
  21716. var s2 = p.y.redMul(z2).redMul(this.z);
  21717. var h = u1.redSub(u2);
  21718. var r = s1.redSub(s2);
  21719. if (h.cmpn(0) === 0) {
  21720. if (r.cmpn(0) !== 0)
  21721. return this.curve.jpoint(null, null, null);
  21722. else
  21723. return this.dbl();
  21724. }
  21725. var h2 = h.redSqr();
  21726. var h3 = h2.redMul(h);
  21727. var v = u1.redMul(h2);
  21728. var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  21729. var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  21730. var nz = this.z.redMul(h);
  21731. return this.curve.jpoint(nx, ny, nz);
  21732. };
  21733. JPoint.prototype.dblp = function dblp(pow) {
  21734. if (pow === 0)
  21735. return this;
  21736. if (this.isInfinity())
  21737. return this;
  21738. if (!pow)
  21739. return this.dbl();
  21740. var i;
  21741. if (this.curve.zeroA || this.curve.threeA) {
  21742. var r = this;
  21743. for (i = 0; i < pow; i++)
  21744. r = r.dbl();
  21745. return r;
  21746. }
  21747. // 1M + 2S + 1A + N * (4S + 5M + 8A)
  21748. // N = 1 => 6M + 6S + 9A
  21749. var a = this.curve.a;
  21750. var tinv = this.curve.tinv;
  21751. var jx = this.x;
  21752. var jy = this.y;
  21753. var jz = this.z;
  21754. var jz4 = jz.redSqr().redSqr();
  21755. // Reuse results
  21756. var jyd = jy.redAdd(jy);
  21757. for (i = 0; i < pow; i++) {
  21758. var jx2 = jx.redSqr();
  21759. var jyd2 = jyd.redSqr();
  21760. var jyd4 = jyd2.redSqr();
  21761. var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
  21762. var t1 = jx.redMul(jyd2);
  21763. var nx = c.redSqr().redISub(t1.redAdd(t1));
  21764. var t2 = t1.redISub(nx);
  21765. var dny = c.redMul(t2);
  21766. dny = dny.redIAdd(dny).redISub(jyd4);
  21767. var nz = jyd.redMul(jz);
  21768. if (i + 1 < pow)
  21769. jz4 = jz4.redMul(jyd4);
  21770. jx = nx;
  21771. jz = nz;
  21772. jyd = dny;
  21773. }
  21774. return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
  21775. };
  21776. JPoint.prototype.dbl = function dbl() {
  21777. if (this.isInfinity())
  21778. return this;
  21779. if (this.curve.zeroA)
  21780. return this._zeroDbl();
  21781. else if (this.curve.threeA)
  21782. return this._threeDbl();
  21783. else
  21784. return this._dbl();
  21785. };
  21786. JPoint.prototype._zeroDbl = function _zeroDbl() {
  21787. var nx;
  21788. var ny;
  21789. var nz;
  21790. // Z = 1
  21791. if (this.zOne) {
  21792. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
  21793. // #doubling-mdbl-2007-bl
  21794. // 1M + 5S + 14A
  21795. // XX = X1^2
  21796. var xx = this.x.redSqr();
  21797. // YY = Y1^2
  21798. var yy = this.y.redSqr();
  21799. // YYYY = YY^2
  21800. var yyyy = yy.redSqr();
  21801. // S = 2 * ((X1 + YY)^2 - XX - YYYY)
  21802. var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  21803. s = s.redIAdd(s);
  21804. // M = 3 * XX + a; a = 0
  21805. var m = xx.redAdd(xx).redIAdd(xx);
  21806. // T = M ^ 2 - 2*S
  21807. var t = m.redSqr().redISub(s).redISub(s);
  21808. // 8 * YYYY
  21809. var yyyy8 = yyyy.redIAdd(yyyy);
  21810. yyyy8 = yyyy8.redIAdd(yyyy8);
  21811. yyyy8 = yyyy8.redIAdd(yyyy8);
  21812. // X3 = T
  21813. nx = t;
  21814. // Y3 = M * (S - T) - 8 * YYYY
  21815. ny = m.redMul(s.redISub(t)).redISub(yyyy8);
  21816. // Z3 = 2*Y1
  21817. nz = this.y.redAdd(this.y);
  21818. } else {
  21819. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
  21820. // #doubling-dbl-2009-l
  21821. // 2M + 5S + 13A
  21822. // A = X1^2
  21823. var a = this.x.redSqr();
  21824. // B = Y1^2
  21825. var b = this.y.redSqr();
  21826. // C = B^2
  21827. var c = b.redSqr();
  21828. // D = 2 * ((X1 + B)^2 - A - C)
  21829. var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
  21830. d = d.redIAdd(d);
  21831. // E = 3 * A
  21832. var e = a.redAdd(a).redIAdd(a);
  21833. // F = E^2
  21834. var f = e.redSqr();
  21835. // 8 * C
  21836. var c8 = c.redIAdd(c);
  21837. c8 = c8.redIAdd(c8);
  21838. c8 = c8.redIAdd(c8);
  21839. // X3 = F - 2 * D
  21840. nx = f.redISub(d).redISub(d);
  21841. // Y3 = E * (D - X3) - 8 * C
  21842. ny = e.redMul(d.redISub(nx)).redISub(c8);
  21843. // Z3 = 2 * Y1 * Z1
  21844. nz = this.y.redMul(this.z);
  21845. nz = nz.redIAdd(nz);
  21846. }
  21847. return this.curve.jpoint(nx, ny, nz);
  21848. };
  21849. JPoint.prototype._threeDbl = function _threeDbl() {
  21850. var nx;
  21851. var ny;
  21852. var nz;
  21853. // Z = 1
  21854. if (this.zOne) {
  21855. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html
  21856. // #doubling-mdbl-2007-bl
  21857. // 1M + 5S + 15A
  21858. // XX = X1^2
  21859. var xx = this.x.redSqr();
  21860. // YY = Y1^2
  21861. var yy = this.y.redSqr();
  21862. // YYYY = YY^2
  21863. var yyyy = yy.redSqr();
  21864. // S = 2 * ((X1 + YY)^2 - XX - YYYY)
  21865. var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  21866. s = s.redIAdd(s);
  21867. // M = 3 * XX + a
  21868. var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
  21869. // T = M^2 - 2 * S
  21870. var t = m.redSqr().redISub(s).redISub(s);
  21871. // X3 = T
  21872. nx = t;
  21873. // Y3 = M * (S - T) - 8 * YYYY
  21874. var yyyy8 = yyyy.redIAdd(yyyy);
  21875. yyyy8 = yyyy8.redIAdd(yyyy8);
  21876. yyyy8 = yyyy8.redIAdd(yyyy8);
  21877. ny = m.redMul(s.redISub(t)).redISub(yyyy8);
  21878. // Z3 = 2 * Y1
  21879. nz = this.y.redAdd(this.y);
  21880. } else {
  21881. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b
  21882. // 3M + 5S
  21883. // delta = Z1^2
  21884. var delta = this.z.redSqr();
  21885. // gamma = Y1^2
  21886. var gamma = this.y.redSqr();
  21887. // beta = X1 * gamma
  21888. var beta = this.x.redMul(gamma);
  21889. // alpha = 3 * (X1 - delta) * (X1 + delta)
  21890. var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
  21891. alpha = alpha.redAdd(alpha).redIAdd(alpha);
  21892. // X3 = alpha^2 - 8 * beta
  21893. var beta4 = beta.redIAdd(beta);
  21894. beta4 = beta4.redIAdd(beta4);
  21895. var beta8 = beta4.redAdd(beta4);
  21896. nx = alpha.redSqr().redISub(beta8);
  21897. // Z3 = (Y1 + Z1)^2 - gamma - delta
  21898. nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
  21899. // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2
  21900. var ggamma8 = gamma.redSqr();
  21901. ggamma8 = ggamma8.redIAdd(ggamma8);
  21902. ggamma8 = ggamma8.redIAdd(ggamma8);
  21903. ggamma8 = ggamma8.redIAdd(ggamma8);
  21904. ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
  21905. }
  21906. return this.curve.jpoint(nx, ny, nz);
  21907. };
  21908. JPoint.prototype._dbl = function _dbl() {
  21909. var a = this.curve.a;
  21910. // 4M + 6S + 10A
  21911. var jx = this.x;
  21912. var jy = this.y;
  21913. var jz = this.z;
  21914. var jz4 = jz.redSqr().redSqr();
  21915. var jx2 = jx.redSqr();
  21916. var jy2 = jy.redSqr();
  21917. var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
  21918. var jxd4 = jx.redAdd(jx);
  21919. jxd4 = jxd4.redIAdd(jxd4);
  21920. var t1 = jxd4.redMul(jy2);
  21921. var nx = c.redSqr().redISub(t1.redAdd(t1));
  21922. var t2 = t1.redISub(nx);
  21923. var jyd8 = jy2.redSqr();
  21924. jyd8 = jyd8.redIAdd(jyd8);
  21925. jyd8 = jyd8.redIAdd(jyd8);
  21926. jyd8 = jyd8.redIAdd(jyd8);
  21927. var ny = c.redMul(t2).redISub(jyd8);
  21928. var nz = jy.redAdd(jy).redMul(jz);
  21929. return this.curve.jpoint(nx, ny, nz);
  21930. };
  21931. JPoint.prototype.trpl = function trpl() {
  21932. if (!this.curve.zeroA)
  21933. return this.dbl().add(this);
  21934. // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl
  21935. // 5M + 10S + ...
  21936. // XX = X1^2
  21937. var xx = this.x.redSqr();
  21938. // YY = Y1^2
  21939. var yy = this.y.redSqr();
  21940. // ZZ = Z1^2
  21941. var zz = this.z.redSqr();
  21942. // YYYY = YY^2
  21943. var yyyy = yy.redSqr();
  21944. // M = 3 * XX + a * ZZ2; a = 0
  21945. var m = xx.redAdd(xx).redIAdd(xx);
  21946. // MM = M^2
  21947. var mm = m.redSqr();
  21948. // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM
  21949. var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  21950. e = e.redIAdd(e);
  21951. e = e.redAdd(e).redIAdd(e);
  21952. e = e.redISub(mm);
  21953. // EE = E^2
  21954. var ee = e.redSqr();
  21955. // T = 16*YYYY
  21956. var t = yyyy.redIAdd(yyyy);
  21957. t = t.redIAdd(t);
  21958. t = t.redIAdd(t);
  21959. t = t.redIAdd(t);
  21960. // U = (M + E)^2 - MM - EE - T
  21961. var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);
  21962. // X3 = 4 * (X1 * EE - 4 * YY * U)
  21963. var yyu4 = yy.redMul(u);
  21964. yyu4 = yyu4.redIAdd(yyu4);
  21965. yyu4 = yyu4.redIAdd(yyu4);
  21966. var nx = this.x.redMul(ee).redISub(yyu4);
  21967. nx = nx.redIAdd(nx);
  21968. nx = nx.redIAdd(nx);
  21969. // Y3 = 8 * Y1 * (U * (T - U) - E * EE)
  21970. var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));
  21971. ny = ny.redIAdd(ny);
  21972. ny = ny.redIAdd(ny);
  21973. ny = ny.redIAdd(ny);
  21974. // Z3 = (Z1 + E)^2 - ZZ - EE
  21975. var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);
  21976. return this.curve.jpoint(nx, ny, nz);
  21977. };
  21978. JPoint.prototype.mul = function mul(k, kbase) {
  21979. k = new BN(k, kbase);
  21980. return this.curve._wnafMul(this, k);
  21981. };
  21982. JPoint.prototype.eq = function eq(p) {
  21983. if (p.type === 'affine')
  21984. return this.eq(p.toJ());
  21985. if (this === p)
  21986. return true;
  21987. // x1 * z2^2 == x2 * z1^2
  21988. var z2 = this.z.redSqr();
  21989. var pz2 = p.z.redSqr();
  21990. if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)
  21991. return false;
  21992. // y1 * z2^3 == y2 * z1^3
  21993. var z3 = z2.redMul(this.z);
  21994. var pz3 = pz2.redMul(p.z);
  21995. return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
  21996. };
  21997. JPoint.prototype.eqXToP = function eqXToP(x) {
  21998. var zs = this.z.redSqr();
  21999. var rx = x.toRed(this.curve.red).redMul(zs);
  22000. if (this.x.cmp(rx) === 0)
  22001. return true;
  22002. var xc = x.clone();
  22003. var t = this.curve.redN.redMul(zs);
  22004. for (;;) {
  22005. xc.iadd(this.curve.n);
  22006. if (xc.cmp(this.curve.p) >= 0)
  22007. return false;
  22008. rx.redIAdd(t);
  22009. if (this.x.cmp(rx) === 0)
  22010. return true;
  22011. }
  22012. };
  22013. JPoint.prototype.inspect = function inspect() {
  22014. if (this.isInfinity())
  22015. return '<EC JPoint Infinity>';
  22016. return '<EC JPoint x: ' + this.x.toString(16, 2) +
  22017. ' y: ' + this.y.toString(16, 2) +
  22018. ' z: ' + this.z.toString(16, 2) + '>';
  22019. };
  22020. JPoint.prototype.isInfinity = function isInfinity() {
  22021. // XXX This code assumes that zero is always zero in red
  22022. return this.z.cmpn(0) === 0;
  22023. };
  22024. /***/ }),
  22025. /***/ 189:
  22026. /*!**********************************************************!*\
  22027. !*** ./node_modules/elliptic/lib/elliptic/curve/mont.js ***!
  22028. \**********************************************************/
  22029. /*! no static exports found */
  22030. /***/ (function(module, exports, __webpack_require__) {
  22031. "use strict";
  22032. var BN = __webpack_require__(/*! bn.js */ 171);
  22033. var inherits = __webpack_require__(/*! inherits */ 95);
  22034. var Base = __webpack_require__(/*! ./base */ 187);
  22035. var utils = __webpack_require__(/*! ../utils */ 184);
  22036. function MontCurve(conf) {
  22037. Base.call(this, 'mont', conf);
  22038. this.a = new BN(conf.a, 16).toRed(this.red);
  22039. this.b = new BN(conf.b, 16).toRed(this.red);
  22040. this.i4 = new BN(4).toRed(this.red).redInvm();
  22041. this.two = new BN(2).toRed(this.red);
  22042. this.a24 = this.i4.redMul(this.a.redAdd(this.two));
  22043. }
  22044. inherits(MontCurve, Base);
  22045. module.exports = MontCurve;
  22046. MontCurve.prototype.validate = function validate(point) {
  22047. var x = point.normalize().x;
  22048. var x2 = x.redSqr();
  22049. var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
  22050. var y = rhs.redSqrt();
  22051. return y.redSqr().cmp(rhs) === 0;
  22052. };
  22053. function Point(curve, x, z) {
  22054. Base.BasePoint.call(this, curve, 'projective');
  22055. if (x === null && z === null) {
  22056. this.x = this.curve.one;
  22057. this.z = this.curve.zero;
  22058. } else {
  22059. this.x = new BN(x, 16);
  22060. this.z = new BN(z, 16);
  22061. if (!this.x.red)
  22062. this.x = this.x.toRed(this.curve.red);
  22063. if (!this.z.red)
  22064. this.z = this.z.toRed(this.curve.red);
  22065. }
  22066. }
  22067. inherits(Point, Base.BasePoint);
  22068. MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  22069. return this.point(utils.toArray(bytes, enc), 1);
  22070. };
  22071. MontCurve.prototype.point = function point(x, z) {
  22072. return new Point(this, x, z);
  22073. };
  22074. MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  22075. return Point.fromJSON(this, obj);
  22076. };
  22077. Point.prototype.precompute = function precompute() {
  22078. // No-op
  22079. };
  22080. Point.prototype._encode = function _encode() {
  22081. return this.getX().toArray('be', this.curve.p.byteLength());
  22082. };
  22083. Point.fromJSON = function fromJSON(curve, obj) {
  22084. return new Point(curve, obj[0], obj[1] || curve.one);
  22085. };
  22086. Point.prototype.inspect = function inspect() {
  22087. if (this.isInfinity())
  22088. return '<EC Point Infinity>';
  22089. return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
  22090. ' z: ' + this.z.fromRed().toString(16, 2) + '>';
  22091. };
  22092. Point.prototype.isInfinity = function isInfinity() {
  22093. // XXX This code assumes that zero is always zero in red
  22094. return this.z.cmpn(0) === 0;
  22095. };
  22096. Point.prototype.dbl = function dbl() {
  22097. // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3
  22098. // 2M + 2S + 4A
  22099. // A = X1 + Z1
  22100. var a = this.x.redAdd(this.z);
  22101. // AA = A^2
  22102. var aa = a.redSqr();
  22103. // B = X1 - Z1
  22104. var b = this.x.redSub(this.z);
  22105. // BB = B^2
  22106. var bb = b.redSqr();
  22107. // C = AA - BB
  22108. var c = aa.redSub(bb);
  22109. // X3 = AA * BB
  22110. var nx = aa.redMul(bb);
  22111. // Z3 = C * (BB + A24 * C)
  22112. var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));
  22113. return this.curve.point(nx, nz);
  22114. };
  22115. Point.prototype.add = function add() {
  22116. throw new Error('Not supported on Montgomery curve');
  22117. };
  22118. Point.prototype.diffAdd = function diffAdd(p, diff) {
  22119. // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3
  22120. // 4M + 2S + 6A
  22121. // A = X2 + Z2
  22122. var a = this.x.redAdd(this.z);
  22123. // B = X2 - Z2
  22124. var b = this.x.redSub(this.z);
  22125. // C = X3 + Z3
  22126. var c = p.x.redAdd(p.z);
  22127. // D = X3 - Z3
  22128. var d = p.x.redSub(p.z);
  22129. // DA = D * A
  22130. var da = d.redMul(a);
  22131. // CB = C * B
  22132. var cb = c.redMul(b);
  22133. // X5 = Z1 * (DA + CB)^2
  22134. var nx = diff.z.redMul(da.redAdd(cb).redSqr());
  22135. // Z5 = X1 * (DA - CB)^2
  22136. var nz = diff.x.redMul(da.redISub(cb).redSqr());
  22137. return this.curve.point(nx, nz);
  22138. };
  22139. Point.prototype.mul = function mul(k) {
  22140. var t = k.clone();
  22141. var a = this; // (N / 2) * Q + Q
  22142. var b = this.curve.point(null, null); // (N / 2) * Q
  22143. var c = this; // Q
  22144. for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
  22145. bits.push(t.andln(1));
  22146. for (var i = bits.length - 1; i >= 0; i--) {
  22147. if (bits[i] === 0) {
  22148. // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q
  22149. a = a.diffAdd(b, c);
  22150. // N * Q = 2 * ((N / 2) * Q + Q))
  22151. b = b.dbl();
  22152. } else {
  22153. // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)
  22154. b = a.diffAdd(b, c);
  22155. // N * Q + Q = 2 * ((N / 2) * Q + Q)
  22156. a = a.dbl();
  22157. }
  22158. }
  22159. return b;
  22160. };
  22161. Point.prototype.mulAdd = function mulAdd() {
  22162. throw new Error('Not supported on Montgomery curve');
  22163. };
  22164. Point.prototype.jumlAdd = function jumlAdd() {
  22165. throw new Error('Not supported on Montgomery curve');
  22166. };
  22167. Point.prototype.eq = function eq(other) {
  22168. return this.getX().cmp(other.getX()) === 0;
  22169. };
  22170. Point.prototype.normalize = function normalize() {
  22171. this.x = this.x.redMul(this.z.redInvm());
  22172. this.z = this.curve.one;
  22173. return this;
  22174. };
  22175. Point.prototype.getX = function getX() {
  22176. // Normalize coordinates
  22177. this.normalize();
  22178. return this.x.fromRed();
  22179. };
  22180. /***/ }),
  22181. /***/ 19:
  22182. /*!******************************************************************!*\
  22183. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  22184. \******************************************************************/
  22185. /*! no static exports found */
  22186. /***/ (function(module, exports, __webpack_require__) {
  22187. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  22188. function _arrayWithoutHoles(arr) {
  22189. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  22190. }
  22191. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22192. /***/ }),
  22193. /***/ 190:
  22194. /*!*************************************************************!*\
  22195. !*** ./node_modules/elliptic/lib/elliptic/curve/edwards.js ***!
  22196. \*************************************************************/
  22197. /*! no static exports found */
  22198. /***/ (function(module, exports, __webpack_require__) {
  22199. "use strict";
  22200. var utils = __webpack_require__(/*! ../utils */ 184);
  22201. var BN = __webpack_require__(/*! bn.js */ 171);
  22202. var inherits = __webpack_require__(/*! inherits */ 95);
  22203. var Base = __webpack_require__(/*! ./base */ 187);
  22204. var assert = utils.assert;
  22205. function EdwardsCurve(conf) {
  22206. // NOTE: Important as we are creating point in Base.call()
  22207. this.twisted = (conf.a | 0) !== 1;
  22208. this.mOneA = this.twisted && (conf.a | 0) === -1;
  22209. this.extended = this.mOneA;
  22210. Base.call(this, 'edwards', conf);
  22211. this.a = new BN(conf.a, 16).umod(this.red.m);
  22212. this.a = this.a.toRed(this.red);
  22213. this.c = new BN(conf.c, 16).toRed(this.red);
  22214. this.c2 = this.c.redSqr();
  22215. this.d = new BN(conf.d, 16).toRed(this.red);
  22216. this.dd = this.d.redAdd(this.d);
  22217. assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);
  22218. this.oneC = (conf.c | 0) === 1;
  22219. }
  22220. inherits(EdwardsCurve, Base);
  22221. module.exports = EdwardsCurve;
  22222. EdwardsCurve.prototype._mulA = function _mulA(num) {
  22223. if (this.mOneA)
  22224. return num.redNeg();
  22225. else
  22226. return this.a.redMul(num);
  22227. };
  22228. EdwardsCurve.prototype._mulC = function _mulC(num) {
  22229. if (this.oneC)
  22230. return num;
  22231. else
  22232. return this.c.redMul(num);
  22233. };
  22234. // Just for compatibility with Short curve
  22235. EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {
  22236. return this.point(x, y, z, t);
  22237. };
  22238. EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {
  22239. x = new BN(x, 16);
  22240. if (!x.red)
  22241. x = x.toRed(this.red);
  22242. var x2 = x.redSqr();
  22243. var rhs = this.c2.redSub(this.a.redMul(x2));
  22244. var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));
  22245. var y2 = rhs.redMul(lhs.redInvm());
  22246. var y = y2.redSqrt();
  22247. if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
  22248. throw new Error('invalid point');
  22249. var isOdd = y.fromRed().isOdd();
  22250. if (odd && !isOdd || !odd && isOdd)
  22251. y = y.redNeg();
  22252. return this.point(x, y);
  22253. };
  22254. EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {
  22255. y = new BN(y, 16);
  22256. if (!y.red)
  22257. y = y.toRed(this.red);
  22258. // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)
  22259. var y2 = y.redSqr();
  22260. var lhs = y2.redSub(this.c2);
  22261. var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);
  22262. var x2 = lhs.redMul(rhs.redInvm());
  22263. if (x2.cmp(this.zero) === 0) {
  22264. if (odd)
  22265. throw new Error('invalid point');
  22266. else
  22267. return this.point(this.zero, y);
  22268. }
  22269. var x = x2.redSqrt();
  22270. if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)
  22271. throw new Error('invalid point');
  22272. if (x.fromRed().isOdd() !== odd)
  22273. x = x.redNeg();
  22274. return this.point(x, y);
  22275. };
  22276. EdwardsCurve.prototype.validate = function validate(point) {
  22277. if (point.isInfinity())
  22278. return true;
  22279. // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)
  22280. point.normalize();
  22281. var x2 = point.x.redSqr();
  22282. var y2 = point.y.redSqr();
  22283. var lhs = x2.redMul(this.a).redAdd(y2);
  22284. var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));
  22285. return lhs.cmp(rhs) === 0;
  22286. };
  22287. function Point(curve, x, y, z, t) {
  22288. Base.BasePoint.call(this, curve, 'projective');
  22289. if (x === null && y === null && z === null) {
  22290. this.x = this.curve.zero;
  22291. this.y = this.curve.one;
  22292. this.z = this.curve.one;
  22293. this.t = this.curve.zero;
  22294. this.zOne = true;
  22295. } else {
  22296. this.x = new BN(x, 16);
  22297. this.y = new BN(y, 16);
  22298. this.z = z ? new BN(z, 16) : this.curve.one;
  22299. this.t = t && new BN(t, 16);
  22300. if (!this.x.red)
  22301. this.x = this.x.toRed(this.curve.red);
  22302. if (!this.y.red)
  22303. this.y = this.y.toRed(this.curve.red);
  22304. if (!this.z.red)
  22305. this.z = this.z.toRed(this.curve.red);
  22306. if (this.t && !this.t.red)
  22307. this.t = this.t.toRed(this.curve.red);
  22308. this.zOne = this.z === this.curve.one;
  22309. // Use extended coordinates
  22310. if (this.curve.extended && !this.t) {
  22311. this.t = this.x.redMul(this.y);
  22312. if (!this.zOne)
  22313. this.t = this.t.redMul(this.z.redInvm());
  22314. }
  22315. }
  22316. }
  22317. inherits(Point, Base.BasePoint);
  22318. EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  22319. return Point.fromJSON(this, obj);
  22320. };
  22321. EdwardsCurve.prototype.point = function point(x, y, z, t) {
  22322. return new Point(this, x, y, z, t);
  22323. };
  22324. Point.fromJSON = function fromJSON(curve, obj) {
  22325. return new Point(curve, obj[0], obj[1], obj[2]);
  22326. };
  22327. Point.prototype.inspect = function inspect() {
  22328. if (this.isInfinity())
  22329. return '<EC Point Infinity>';
  22330. return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
  22331. ' y: ' + this.y.fromRed().toString(16, 2) +
  22332. ' z: ' + this.z.fromRed().toString(16, 2) + '>';
  22333. };
  22334. Point.prototype.isInfinity = function isInfinity() {
  22335. // XXX This code assumes that zero is always zero in red
  22336. return this.x.cmpn(0) === 0 &&
  22337. (this.y.cmp(this.z) === 0 ||
  22338. (this.zOne && this.y.cmp(this.curve.c) === 0));
  22339. };
  22340. Point.prototype._extDbl = function _extDbl() {
  22341. // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  22342. // #doubling-dbl-2008-hwcd
  22343. // 4M + 4S
  22344. // A = X1^2
  22345. var a = this.x.redSqr();
  22346. // B = Y1^2
  22347. var b = this.y.redSqr();
  22348. // C = 2 * Z1^2
  22349. var c = this.z.redSqr();
  22350. c = c.redIAdd(c);
  22351. // D = a * A
  22352. var d = this.curve._mulA(a);
  22353. // E = (X1 + Y1)^2 - A - B
  22354. var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
  22355. // G = D + B
  22356. var g = d.redAdd(b);
  22357. // F = G - C
  22358. var f = g.redSub(c);
  22359. // H = D - B
  22360. var h = d.redSub(b);
  22361. // X3 = E * F
  22362. var nx = e.redMul(f);
  22363. // Y3 = G * H
  22364. var ny = g.redMul(h);
  22365. // T3 = E * H
  22366. var nt = e.redMul(h);
  22367. // Z3 = F * G
  22368. var nz = f.redMul(g);
  22369. return this.curve.point(nx, ny, nz, nt);
  22370. };
  22371. Point.prototype._projDbl = function _projDbl() {
  22372. // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  22373. // #doubling-dbl-2008-bbjlp
  22374. // #doubling-dbl-2007-bl
  22375. // and others
  22376. // Generally 3M + 4S or 2M + 4S
  22377. // B = (X1 + Y1)^2
  22378. var b = this.x.redAdd(this.y).redSqr();
  22379. // C = X1^2
  22380. var c = this.x.redSqr();
  22381. // D = Y1^2
  22382. var d = this.y.redSqr();
  22383. var nx;
  22384. var ny;
  22385. var nz;
  22386. var e;
  22387. var h;
  22388. var j;
  22389. if (this.curve.twisted) {
  22390. // E = a * C
  22391. e = this.curve._mulA(c);
  22392. // F = E + D
  22393. var f = e.redAdd(d);
  22394. if (this.zOne) {
  22395. // X3 = (B - C - D) * (F - 2)
  22396. nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
  22397. // Y3 = F * (E - D)
  22398. ny = f.redMul(e.redSub(d));
  22399. // Z3 = F^2 - 2 * F
  22400. nz = f.redSqr().redSub(f).redSub(f);
  22401. } else {
  22402. // H = Z1^2
  22403. h = this.z.redSqr();
  22404. // J = F - 2 * H
  22405. j = f.redSub(h).redISub(h);
  22406. // X3 = (B-C-D)*J
  22407. nx = b.redSub(c).redISub(d).redMul(j);
  22408. // Y3 = F * (E - D)
  22409. ny = f.redMul(e.redSub(d));
  22410. // Z3 = F * J
  22411. nz = f.redMul(j);
  22412. }
  22413. } else {
  22414. // E = C + D
  22415. e = c.redAdd(d);
  22416. // H = (c * Z1)^2
  22417. h = this.curve._mulC(this.z).redSqr();
  22418. // J = E - 2 * H
  22419. j = e.redSub(h).redSub(h);
  22420. // X3 = c * (B - E) * J
  22421. nx = this.curve._mulC(b.redISub(e)).redMul(j);
  22422. // Y3 = c * E * (C - D)
  22423. ny = this.curve._mulC(e).redMul(c.redISub(d));
  22424. // Z3 = E * J
  22425. nz = e.redMul(j);
  22426. }
  22427. return this.curve.point(nx, ny, nz);
  22428. };
  22429. Point.prototype.dbl = function dbl() {
  22430. if (this.isInfinity())
  22431. return this;
  22432. // Double in extended coordinates
  22433. if (this.curve.extended)
  22434. return this._extDbl();
  22435. else
  22436. return this._projDbl();
  22437. };
  22438. Point.prototype._extAdd = function _extAdd(p) {
  22439. // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  22440. // #addition-add-2008-hwcd-3
  22441. // 8M
  22442. // A = (Y1 - X1) * (Y2 - X2)
  22443. var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));
  22444. // B = (Y1 + X1) * (Y2 + X2)
  22445. var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));
  22446. // C = T1 * k * T2
  22447. var c = this.t.redMul(this.curve.dd).redMul(p.t);
  22448. // D = Z1 * 2 * Z2
  22449. var d = this.z.redMul(p.z.redAdd(p.z));
  22450. // E = B - A
  22451. var e = b.redSub(a);
  22452. // F = D - C
  22453. var f = d.redSub(c);
  22454. // G = D + C
  22455. var g = d.redAdd(c);
  22456. // H = B + A
  22457. var h = b.redAdd(a);
  22458. // X3 = E * F
  22459. var nx = e.redMul(f);
  22460. // Y3 = G * H
  22461. var ny = g.redMul(h);
  22462. // T3 = E * H
  22463. var nt = e.redMul(h);
  22464. // Z3 = F * G
  22465. var nz = f.redMul(g);
  22466. return this.curve.point(nx, ny, nz, nt);
  22467. };
  22468. Point.prototype._projAdd = function _projAdd(p) {
  22469. // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  22470. // #addition-add-2008-bbjlp
  22471. // #addition-add-2007-bl
  22472. // 10M + 1S
  22473. // A = Z1 * Z2
  22474. var a = this.z.redMul(p.z);
  22475. // B = A^2
  22476. var b = a.redSqr();
  22477. // C = X1 * X2
  22478. var c = this.x.redMul(p.x);
  22479. // D = Y1 * Y2
  22480. var d = this.y.redMul(p.y);
  22481. // E = d * C * D
  22482. var e = this.curve.d.redMul(c).redMul(d);
  22483. // F = B - E
  22484. var f = b.redSub(e);
  22485. // G = B + E
  22486. var g = b.redAdd(e);
  22487. // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)
  22488. var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
  22489. var nx = a.redMul(f).redMul(tmp);
  22490. var ny;
  22491. var nz;
  22492. if (this.curve.twisted) {
  22493. // Y3 = A * G * (D - a * C)
  22494. ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
  22495. // Z3 = F * G
  22496. nz = f.redMul(g);
  22497. } else {
  22498. // Y3 = A * G * (D - C)
  22499. ny = a.redMul(g).redMul(d.redSub(c));
  22500. // Z3 = c * F * G
  22501. nz = this.curve._mulC(f).redMul(g);
  22502. }
  22503. return this.curve.point(nx, ny, nz);
  22504. };
  22505. Point.prototype.add = function add(p) {
  22506. if (this.isInfinity())
  22507. return p;
  22508. if (p.isInfinity())
  22509. return this;
  22510. if (this.curve.extended)
  22511. return this._extAdd(p);
  22512. else
  22513. return this._projAdd(p);
  22514. };
  22515. Point.prototype.mul = function mul(k) {
  22516. if (this._hasDoubles(k))
  22517. return this.curve._fixedNafMul(this, k);
  22518. else
  22519. return this.curve._wnafMul(this, k);
  22520. };
  22521. Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
  22522. return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
  22523. };
  22524. Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
  22525. return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
  22526. };
  22527. Point.prototype.normalize = function normalize() {
  22528. if (this.zOne)
  22529. return this;
  22530. // Normalize coordinates
  22531. var zi = this.z.redInvm();
  22532. this.x = this.x.redMul(zi);
  22533. this.y = this.y.redMul(zi);
  22534. if (this.t)
  22535. this.t = this.t.redMul(zi);
  22536. this.z = this.curve.one;
  22537. this.zOne = true;
  22538. return this;
  22539. };
  22540. Point.prototype.neg = function neg() {
  22541. return this.curve.point(this.x.redNeg(),
  22542. this.y,
  22543. this.z,
  22544. this.t && this.t.redNeg());
  22545. };
  22546. Point.prototype.getX = function getX() {
  22547. this.normalize();
  22548. return this.x.fromRed();
  22549. };
  22550. Point.prototype.getY = function getY() {
  22551. this.normalize();
  22552. return this.y.fromRed();
  22553. };
  22554. Point.prototype.eq = function eq(other) {
  22555. return this === other ||
  22556. this.getX().cmp(other.getX()) === 0 &&
  22557. this.getY().cmp(other.getY()) === 0;
  22558. };
  22559. Point.prototype.eqXToP = function eqXToP(x) {
  22560. var rx = x.toRed(this.curve.red).redMul(this.z);
  22561. if (this.x.cmp(rx) === 0)
  22562. return true;
  22563. var xc = x.clone();
  22564. var t = this.curve.redN.redMul(this.z);
  22565. for (;;) {
  22566. xc.iadd(this.curve.n);
  22567. if (xc.cmp(this.curve.p) >= 0)
  22568. return false;
  22569. rx.redIAdd(t);
  22570. if (this.x.cmp(rx) === 0)
  22571. return true;
  22572. }
  22573. };
  22574. // Compatibility with BaseCurve
  22575. Point.prototype.toP = Point.prototype.normalize;
  22576. Point.prototype.mixedAdd = Point.prototype.add;
  22577. /***/ }),
  22578. /***/ 191:
  22579. /*!******************************************************!*\
  22580. !*** ./node_modules/elliptic/lib/elliptic/curves.js ***!
  22581. \******************************************************/
  22582. /*! no static exports found */
  22583. /***/ (function(module, exports, __webpack_require__) {
  22584. "use strict";
  22585. var curves = exports;
  22586. var hash = __webpack_require__(/*! hash.js */ 192);
  22587. var curve = __webpack_require__(/*! ./curve */ 186);
  22588. var utils = __webpack_require__(/*! ./utils */ 184);
  22589. var assert = utils.assert;
  22590. function PresetCurve(options) {
  22591. if (options.type === 'short')
  22592. this.curve = new curve.short(options);
  22593. else if (options.type === 'edwards')
  22594. this.curve = new curve.edwards(options);
  22595. else
  22596. this.curve = new curve.mont(options);
  22597. this.g = this.curve.g;
  22598. this.n = this.curve.n;
  22599. this.hash = options.hash;
  22600. assert(this.g.validate(), 'Invalid curve');
  22601. assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');
  22602. }
  22603. curves.PresetCurve = PresetCurve;
  22604. function defineCurve(name, options) {
  22605. Object.defineProperty(curves, name, {
  22606. configurable: true,
  22607. enumerable: true,
  22608. get: function() {
  22609. var curve = new PresetCurve(options);
  22610. Object.defineProperty(curves, name, {
  22611. configurable: true,
  22612. enumerable: true,
  22613. value: curve,
  22614. });
  22615. return curve;
  22616. },
  22617. });
  22618. }
  22619. defineCurve('p192', {
  22620. type: 'short',
  22621. prime: 'p192',
  22622. p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',
  22623. a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',
  22624. b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',
  22625. n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',
  22626. hash: hash.sha256,
  22627. gRed: false,
  22628. g: [
  22629. '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',
  22630. '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',
  22631. ],
  22632. });
  22633. defineCurve('p224', {
  22634. type: 'short',
  22635. prime: 'p224',
  22636. p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',
  22637. a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',
  22638. b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',
  22639. n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',
  22640. hash: hash.sha256,
  22641. gRed: false,
  22642. g: [
  22643. 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',
  22644. 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',
  22645. ],
  22646. });
  22647. defineCurve('p256', {
  22648. type: 'short',
  22649. prime: null,
  22650. p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',
  22651. a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',
  22652. b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',
  22653. n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',
  22654. hash: hash.sha256,
  22655. gRed: false,
  22656. g: [
  22657. '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',
  22658. '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',
  22659. ],
  22660. });
  22661. defineCurve('p384', {
  22662. type: 'short',
  22663. prime: null,
  22664. p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22665. 'fffffffe ffffffff 00000000 00000000 ffffffff',
  22666. a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22667. 'fffffffe ffffffff 00000000 00000000 fffffffc',
  22668. b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +
  22669. '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',
  22670. n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +
  22671. 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',
  22672. hash: hash.sha384,
  22673. gRed: false,
  22674. g: [
  22675. 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +
  22676. '5502f25d bf55296c 3a545e38 72760ab7',
  22677. '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +
  22678. '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',
  22679. ],
  22680. });
  22681. defineCurve('p521', {
  22682. type: 'short',
  22683. prime: null,
  22684. p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22685. 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22686. 'ffffffff ffffffff ffffffff ffffffff ffffffff',
  22687. a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22688. 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22689. 'ffffffff ffffffff ffffffff ffffffff fffffffc',
  22690. b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +
  22691. '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +
  22692. '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',
  22693. n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
  22694. 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +
  22695. 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',
  22696. hash: hash.sha512,
  22697. gRed: false,
  22698. g: [
  22699. '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +
  22700. '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +
  22701. 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',
  22702. '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +
  22703. '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +
  22704. '3fad0761 353c7086 a272c240 88be9476 9fd16650',
  22705. ],
  22706. });
  22707. defineCurve('curve25519', {
  22708. type: 'mont',
  22709. prime: 'p25519',
  22710. p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  22711. a: '76d06',
  22712. b: '1',
  22713. n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  22714. hash: hash.sha256,
  22715. gRed: false,
  22716. g: [
  22717. '9',
  22718. ],
  22719. });
  22720. defineCurve('ed25519', {
  22721. type: 'edwards',
  22722. prime: 'p25519',
  22723. p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  22724. a: '-1',
  22725. c: '1',
  22726. // -121665 * (121666^(-1)) (mod P)
  22727. d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',
  22728. n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  22729. hash: hash.sha256,
  22730. gRed: false,
  22731. g: [
  22732. '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',
  22733. // 4/5
  22734. '6666666666666666666666666666666666666666666666666666666666666658',
  22735. ],
  22736. });
  22737. var pre;
  22738. try {
  22739. pre = __webpack_require__(/*! ./precomputed/secp256k1 */ 204);
  22740. } catch (e) {
  22741. pre = undefined;
  22742. }
  22743. defineCurve('secp256k1', {
  22744. type: 'short',
  22745. prime: 'k256',
  22746. p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',
  22747. a: '0',
  22748. b: '7',
  22749. n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',
  22750. h: '1',
  22751. hash: hash.sha256,
  22752. // Precomputed endomorphism
  22753. beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',
  22754. lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',
  22755. basis: [
  22756. {
  22757. a: '3086d221a7d46bcde86c90e49284eb15',
  22758. b: '-e4437ed6010e88286f547fa90abfe4c3',
  22759. },
  22760. {
  22761. a: '114ca50f7a8e2f3f657c1108d9d44cfd8',
  22762. b: '3086d221a7d46bcde86c90e49284eb15',
  22763. },
  22764. ],
  22765. gRed: false,
  22766. g: [
  22767. '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
  22768. '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',
  22769. pre,
  22770. ],
  22771. });
  22772. /***/ }),
  22773. /***/ 192:
  22774. /*!******************************************!*\
  22775. !*** ./node_modules/hash.js/lib/hash.js ***!
  22776. \******************************************/
  22777. /*! no static exports found */
  22778. /***/ (function(module, exports, __webpack_require__) {
  22779. var hash = exports;
  22780. hash.utils = __webpack_require__(/*! ./hash/utils */ 193);
  22781. hash.common = __webpack_require__(/*! ./hash/common */ 194);
  22782. hash.sha = __webpack_require__(/*! ./hash/sha */ 195);
  22783. hash.ripemd = __webpack_require__(/*! ./hash/ripemd */ 202);
  22784. hash.hmac = __webpack_require__(/*! ./hash/hmac */ 203);
  22785. // Proxy hash functions to the main object
  22786. hash.sha1 = hash.sha.sha1;
  22787. hash.sha256 = hash.sha.sha256;
  22788. hash.sha224 = hash.sha.sha224;
  22789. hash.sha384 = hash.sha.sha384;
  22790. hash.sha512 = hash.sha.sha512;
  22791. hash.ripemd160 = hash.ripemd.ripemd160;
  22792. /***/ }),
  22793. /***/ 193:
  22794. /*!************************************************!*\
  22795. !*** ./node_modules/hash.js/lib/hash/utils.js ***!
  22796. \************************************************/
  22797. /*! no static exports found */
  22798. /***/ (function(module, exports, __webpack_require__) {
  22799. "use strict";
  22800. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  22801. var inherits = __webpack_require__(/*! inherits */ 95);
  22802. exports.inherits = inherits;
  22803. function isSurrogatePair(msg, i) {
  22804. if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {
  22805. return false;
  22806. }
  22807. if (i < 0 || i + 1 >= msg.length) {
  22808. return false;
  22809. }
  22810. return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;
  22811. }
  22812. function toArray(msg, enc) {
  22813. if (Array.isArray(msg))
  22814. return msg.slice();
  22815. if (!msg)
  22816. return [];
  22817. var res = [];
  22818. if (typeof msg === 'string') {
  22819. if (!enc) {
  22820. // Inspired by stringToUtf8ByteArray() in closure-library by Google
  22821. // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143
  22822. // Apache License 2.0
  22823. // https://github.com/google/closure-library/blob/master/LICENSE
  22824. var p = 0;
  22825. for (var i = 0; i < msg.length; i++) {
  22826. var c = msg.charCodeAt(i);
  22827. if (c < 128) {
  22828. res[p++] = c;
  22829. } else if (c < 2048) {
  22830. res[p++] = (c >> 6) | 192;
  22831. res[p++] = (c & 63) | 128;
  22832. } else if (isSurrogatePair(msg, i)) {
  22833. c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);
  22834. res[p++] = (c >> 18) | 240;
  22835. res[p++] = ((c >> 12) & 63) | 128;
  22836. res[p++] = ((c >> 6) & 63) | 128;
  22837. res[p++] = (c & 63) | 128;
  22838. } else {
  22839. res[p++] = (c >> 12) | 224;
  22840. res[p++] = ((c >> 6) & 63) | 128;
  22841. res[p++] = (c & 63) | 128;
  22842. }
  22843. }
  22844. } else if (enc === 'hex') {
  22845. msg = msg.replace(/[^a-z0-9]+/ig, '');
  22846. if (msg.length % 2 !== 0)
  22847. msg = '0' + msg;
  22848. for (i = 0; i < msg.length; i += 2)
  22849. res.push(parseInt(msg[i] + msg[i + 1], 16));
  22850. }
  22851. } else {
  22852. for (i = 0; i < msg.length; i++)
  22853. res[i] = msg[i] | 0;
  22854. }
  22855. return res;
  22856. }
  22857. exports.toArray = toArray;
  22858. function toHex(msg) {
  22859. var res = '';
  22860. for (var i = 0; i < msg.length; i++)
  22861. res += zero2(msg[i].toString(16));
  22862. return res;
  22863. }
  22864. exports.toHex = toHex;
  22865. function htonl(w) {
  22866. var res = (w >>> 24) |
  22867. ((w >>> 8) & 0xff00) |
  22868. ((w << 8) & 0xff0000) |
  22869. ((w & 0xff) << 24);
  22870. return res >>> 0;
  22871. }
  22872. exports.htonl = htonl;
  22873. function toHex32(msg, endian) {
  22874. var res = '';
  22875. for (var i = 0; i < msg.length; i++) {
  22876. var w = msg[i];
  22877. if (endian === 'little')
  22878. w = htonl(w);
  22879. res += zero8(w.toString(16));
  22880. }
  22881. return res;
  22882. }
  22883. exports.toHex32 = toHex32;
  22884. function zero2(word) {
  22885. if (word.length === 1)
  22886. return '0' + word;
  22887. else
  22888. return word;
  22889. }
  22890. exports.zero2 = zero2;
  22891. function zero8(word) {
  22892. if (word.length === 7)
  22893. return '0' + word;
  22894. else if (word.length === 6)
  22895. return '00' + word;
  22896. else if (word.length === 5)
  22897. return '000' + word;
  22898. else if (word.length === 4)
  22899. return '0000' + word;
  22900. else if (word.length === 3)
  22901. return '00000' + word;
  22902. else if (word.length === 2)
  22903. return '000000' + word;
  22904. else if (word.length === 1)
  22905. return '0000000' + word;
  22906. else
  22907. return word;
  22908. }
  22909. exports.zero8 = zero8;
  22910. function join32(msg, start, end, endian) {
  22911. var len = end - start;
  22912. assert(len % 4 === 0);
  22913. var res = new Array(len / 4);
  22914. for (var i = 0, k = start; i < res.length; i++, k += 4) {
  22915. var w;
  22916. if (endian === 'big')
  22917. w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];
  22918. else
  22919. w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];
  22920. res[i] = w >>> 0;
  22921. }
  22922. return res;
  22923. }
  22924. exports.join32 = join32;
  22925. function split32(msg, endian) {
  22926. var res = new Array(msg.length * 4);
  22927. for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
  22928. var m = msg[i];
  22929. if (endian === 'big') {
  22930. res[k] = m >>> 24;
  22931. res[k + 1] = (m >>> 16) & 0xff;
  22932. res[k + 2] = (m >>> 8) & 0xff;
  22933. res[k + 3] = m & 0xff;
  22934. } else {
  22935. res[k + 3] = m >>> 24;
  22936. res[k + 2] = (m >>> 16) & 0xff;
  22937. res[k + 1] = (m >>> 8) & 0xff;
  22938. res[k] = m & 0xff;
  22939. }
  22940. }
  22941. return res;
  22942. }
  22943. exports.split32 = split32;
  22944. function rotr32(w, b) {
  22945. return (w >>> b) | (w << (32 - b));
  22946. }
  22947. exports.rotr32 = rotr32;
  22948. function rotl32(w, b) {
  22949. return (w << b) | (w >>> (32 - b));
  22950. }
  22951. exports.rotl32 = rotl32;
  22952. function sum32(a, b) {
  22953. return (a + b) >>> 0;
  22954. }
  22955. exports.sum32 = sum32;
  22956. function sum32_3(a, b, c) {
  22957. return (a + b + c) >>> 0;
  22958. }
  22959. exports.sum32_3 = sum32_3;
  22960. function sum32_4(a, b, c, d) {
  22961. return (a + b + c + d) >>> 0;
  22962. }
  22963. exports.sum32_4 = sum32_4;
  22964. function sum32_5(a, b, c, d, e) {
  22965. return (a + b + c + d + e) >>> 0;
  22966. }
  22967. exports.sum32_5 = sum32_5;
  22968. function sum64(buf, pos, ah, al) {
  22969. var bh = buf[pos];
  22970. var bl = buf[pos + 1];
  22971. var lo = (al + bl) >>> 0;
  22972. var hi = (lo < al ? 1 : 0) + ah + bh;
  22973. buf[pos] = hi >>> 0;
  22974. buf[pos + 1] = lo;
  22975. }
  22976. exports.sum64 = sum64;
  22977. function sum64_hi(ah, al, bh, bl) {
  22978. var lo = (al + bl) >>> 0;
  22979. var hi = (lo < al ? 1 : 0) + ah + bh;
  22980. return hi >>> 0;
  22981. }
  22982. exports.sum64_hi = sum64_hi;
  22983. function sum64_lo(ah, al, bh, bl) {
  22984. var lo = al + bl;
  22985. return lo >>> 0;
  22986. }
  22987. exports.sum64_lo = sum64_lo;
  22988. function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
  22989. var carry = 0;
  22990. var lo = al;
  22991. lo = (lo + bl) >>> 0;
  22992. carry += lo < al ? 1 : 0;
  22993. lo = (lo + cl) >>> 0;
  22994. carry += lo < cl ? 1 : 0;
  22995. lo = (lo + dl) >>> 0;
  22996. carry += lo < dl ? 1 : 0;
  22997. var hi = ah + bh + ch + dh + carry;
  22998. return hi >>> 0;
  22999. }
  23000. exports.sum64_4_hi = sum64_4_hi;
  23001. function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
  23002. var lo = al + bl + cl + dl;
  23003. return lo >>> 0;
  23004. }
  23005. exports.sum64_4_lo = sum64_4_lo;
  23006. function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
  23007. var carry = 0;
  23008. var lo = al;
  23009. lo = (lo + bl) >>> 0;
  23010. carry += lo < al ? 1 : 0;
  23011. lo = (lo + cl) >>> 0;
  23012. carry += lo < cl ? 1 : 0;
  23013. lo = (lo + dl) >>> 0;
  23014. carry += lo < dl ? 1 : 0;
  23015. lo = (lo + el) >>> 0;
  23016. carry += lo < el ? 1 : 0;
  23017. var hi = ah + bh + ch + dh + eh + carry;
  23018. return hi >>> 0;
  23019. }
  23020. exports.sum64_5_hi = sum64_5_hi;
  23021. function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
  23022. var lo = al + bl + cl + dl + el;
  23023. return lo >>> 0;
  23024. }
  23025. exports.sum64_5_lo = sum64_5_lo;
  23026. function rotr64_hi(ah, al, num) {
  23027. var r = (al << (32 - num)) | (ah >>> num);
  23028. return r >>> 0;
  23029. }
  23030. exports.rotr64_hi = rotr64_hi;
  23031. function rotr64_lo(ah, al, num) {
  23032. var r = (ah << (32 - num)) | (al >>> num);
  23033. return r >>> 0;
  23034. }
  23035. exports.rotr64_lo = rotr64_lo;
  23036. function shr64_hi(ah, al, num) {
  23037. return ah >>> num;
  23038. }
  23039. exports.shr64_hi = shr64_hi;
  23040. function shr64_lo(ah, al, num) {
  23041. var r = (ah << (32 - num)) | (al >>> num);
  23042. return r >>> 0;
  23043. }
  23044. exports.shr64_lo = shr64_lo;
  23045. /***/ }),
  23046. /***/ 194:
  23047. /*!*************************************************!*\
  23048. !*** ./node_modules/hash.js/lib/hash/common.js ***!
  23049. \*************************************************/
  23050. /*! no static exports found */
  23051. /***/ (function(module, exports, __webpack_require__) {
  23052. "use strict";
  23053. var utils = __webpack_require__(/*! ./utils */ 193);
  23054. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  23055. function BlockHash() {
  23056. this.pending = null;
  23057. this.pendingTotal = 0;
  23058. this.blockSize = this.constructor.blockSize;
  23059. this.outSize = this.constructor.outSize;
  23060. this.hmacStrength = this.constructor.hmacStrength;
  23061. this.padLength = this.constructor.padLength / 8;
  23062. this.endian = 'big';
  23063. this._delta8 = this.blockSize / 8;
  23064. this._delta32 = this.blockSize / 32;
  23065. }
  23066. exports.BlockHash = BlockHash;
  23067. BlockHash.prototype.update = function update(msg, enc) {
  23068. // Convert message to array, pad it, and join into 32bit blocks
  23069. msg = utils.toArray(msg, enc);
  23070. if (!this.pending)
  23071. this.pending = msg;
  23072. else
  23073. this.pending = this.pending.concat(msg);
  23074. this.pendingTotal += msg.length;
  23075. // Enough data, try updating
  23076. if (this.pending.length >= this._delta8) {
  23077. msg = this.pending;
  23078. // Process pending data in blocks
  23079. var r = msg.length % this._delta8;
  23080. this.pending = msg.slice(msg.length - r, msg.length);
  23081. if (this.pending.length === 0)
  23082. this.pending = null;
  23083. msg = utils.join32(msg, 0, msg.length - r, this.endian);
  23084. for (var i = 0; i < msg.length; i += this._delta32)
  23085. this._update(msg, i, i + this._delta32);
  23086. }
  23087. return this;
  23088. };
  23089. BlockHash.prototype.digest = function digest(enc) {
  23090. this.update(this._pad());
  23091. assert(this.pending === null);
  23092. return this._digest(enc);
  23093. };
  23094. BlockHash.prototype._pad = function pad() {
  23095. var len = this.pendingTotal;
  23096. var bytes = this._delta8;
  23097. var k = bytes - ((len + this.padLength) % bytes);
  23098. var res = new Array(k + this.padLength);
  23099. res[0] = 0x80;
  23100. for (var i = 1; i < k; i++)
  23101. res[i] = 0;
  23102. // Append length
  23103. len <<= 3;
  23104. if (this.endian === 'big') {
  23105. for (var t = 8; t < this.padLength; t++)
  23106. res[i++] = 0;
  23107. res[i++] = 0;
  23108. res[i++] = 0;
  23109. res[i++] = 0;
  23110. res[i++] = 0;
  23111. res[i++] = (len >>> 24) & 0xff;
  23112. res[i++] = (len >>> 16) & 0xff;
  23113. res[i++] = (len >>> 8) & 0xff;
  23114. res[i++] = len & 0xff;
  23115. } else {
  23116. res[i++] = len & 0xff;
  23117. res[i++] = (len >>> 8) & 0xff;
  23118. res[i++] = (len >>> 16) & 0xff;
  23119. res[i++] = (len >>> 24) & 0xff;
  23120. res[i++] = 0;
  23121. res[i++] = 0;
  23122. res[i++] = 0;
  23123. res[i++] = 0;
  23124. for (t = 8; t < this.padLength; t++)
  23125. res[i++] = 0;
  23126. }
  23127. return res;
  23128. };
  23129. /***/ }),
  23130. /***/ 195:
  23131. /*!**********************************************!*\
  23132. !*** ./node_modules/hash.js/lib/hash/sha.js ***!
  23133. \**********************************************/
  23134. /*! no static exports found */
  23135. /***/ (function(module, exports, __webpack_require__) {
  23136. "use strict";
  23137. exports.sha1 = __webpack_require__(/*! ./sha/1 */ 196);
  23138. exports.sha224 = __webpack_require__(/*! ./sha/224 */ 198);
  23139. exports.sha256 = __webpack_require__(/*! ./sha/256 */ 199);
  23140. exports.sha384 = __webpack_require__(/*! ./sha/384 */ 200);
  23141. exports.sha512 = __webpack_require__(/*! ./sha/512 */ 201);
  23142. /***/ }),
  23143. /***/ 196:
  23144. /*!************************************************!*\
  23145. !*** ./node_modules/hash.js/lib/hash/sha/1.js ***!
  23146. \************************************************/
  23147. /*! no static exports found */
  23148. /***/ (function(module, exports, __webpack_require__) {
  23149. "use strict";
  23150. var utils = __webpack_require__(/*! ../utils */ 193);
  23151. var common = __webpack_require__(/*! ../common */ 194);
  23152. var shaCommon = __webpack_require__(/*! ./common */ 197);
  23153. var rotl32 = utils.rotl32;
  23154. var sum32 = utils.sum32;
  23155. var sum32_5 = utils.sum32_5;
  23156. var ft_1 = shaCommon.ft_1;
  23157. var BlockHash = common.BlockHash;
  23158. var sha1_K = [
  23159. 0x5A827999, 0x6ED9EBA1,
  23160. 0x8F1BBCDC, 0xCA62C1D6
  23161. ];
  23162. function SHA1() {
  23163. if (!(this instanceof SHA1))
  23164. return new SHA1();
  23165. BlockHash.call(this);
  23166. this.h = [
  23167. 0x67452301, 0xefcdab89, 0x98badcfe,
  23168. 0x10325476, 0xc3d2e1f0 ];
  23169. this.W = new Array(80);
  23170. }
  23171. utils.inherits(SHA1, BlockHash);
  23172. module.exports = SHA1;
  23173. SHA1.blockSize = 512;
  23174. SHA1.outSize = 160;
  23175. SHA1.hmacStrength = 80;
  23176. SHA1.padLength = 64;
  23177. SHA1.prototype._update = function _update(msg, start) {
  23178. var W = this.W;
  23179. for (var i = 0; i < 16; i++)
  23180. W[i] = msg[start + i];
  23181. for(; i < W.length; i++)
  23182. W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
  23183. var a = this.h[0];
  23184. var b = this.h[1];
  23185. var c = this.h[2];
  23186. var d = this.h[3];
  23187. var e = this.h[4];
  23188. for (i = 0; i < W.length; i++) {
  23189. var s = ~~(i / 20);
  23190. var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);
  23191. e = d;
  23192. d = c;
  23193. c = rotl32(b, 30);
  23194. b = a;
  23195. a = t;
  23196. }
  23197. this.h[0] = sum32(this.h[0], a);
  23198. this.h[1] = sum32(this.h[1], b);
  23199. this.h[2] = sum32(this.h[2], c);
  23200. this.h[3] = sum32(this.h[3], d);
  23201. this.h[4] = sum32(this.h[4], e);
  23202. };
  23203. SHA1.prototype._digest = function digest(enc) {
  23204. if (enc === 'hex')
  23205. return utils.toHex32(this.h, 'big');
  23206. else
  23207. return utils.split32(this.h, 'big');
  23208. };
  23209. /***/ }),
  23210. /***/ 197:
  23211. /*!*****************************************************!*\
  23212. !*** ./node_modules/hash.js/lib/hash/sha/common.js ***!
  23213. \*****************************************************/
  23214. /*! no static exports found */
  23215. /***/ (function(module, exports, __webpack_require__) {
  23216. "use strict";
  23217. var utils = __webpack_require__(/*! ../utils */ 193);
  23218. var rotr32 = utils.rotr32;
  23219. function ft_1(s, x, y, z) {
  23220. if (s === 0)
  23221. return ch32(x, y, z);
  23222. if (s === 1 || s === 3)
  23223. return p32(x, y, z);
  23224. if (s === 2)
  23225. return maj32(x, y, z);
  23226. }
  23227. exports.ft_1 = ft_1;
  23228. function ch32(x, y, z) {
  23229. return (x & y) ^ ((~x) & z);
  23230. }
  23231. exports.ch32 = ch32;
  23232. function maj32(x, y, z) {
  23233. return (x & y) ^ (x & z) ^ (y & z);
  23234. }
  23235. exports.maj32 = maj32;
  23236. function p32(x, y, z) {
  23237. return x ^ y ^ z;
  23238. }
  23239. exports.p32 = p32;
  23240. function s0_256(x) {
  23241. return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
  23242. }
  23243. exports.s0_256 = s0_256;
  23244. function s1_256(x) {
  23245. return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
  23246. }
  23247. exports.s1_256 = s1_256;
  23248. function g0_256(x) {
  23249. return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
  23250. }
  23251. exports.g0_256 = g0_256;
  23252. function g1_256(x) {
  23253. return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
  23254. }
  23255. exports.g1_256 = g1_256;
  23256. /***/ }),
  23257. /***/ 198:
  23258. /*!**************************************************!*\
  23259. !*** ./node_modules/hash.js/lib/hash/sha/224.js ***!
  23260. \**************************************************/
  23261. /*! no static exports found */
  23262. /***/ (function(module, exports, __webpack_require__) {
  23263. "use strict";
  23264. var utils = __webpack_require__(/*! ../utils */ 193);
  23265. var SHA256 = __webpack_require__(/*! ./256 */ 199);
  23266. function SHA224() {
  23267. if (!(this instanceof SHA224))
  23268. return new SHA224();
  23269. SHA256.call(this);
  23270. this.h = [
  23271. 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
  23272. 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];
  23273. }
  23274. utils.inherits(SHA224, SHA256);
  23275. module.exports = SHA224;
  23276. SHA224.blockSize = 512;
  23277. SHA224.outSize = 224;
  23278. SHA224.hmacStrength = 192;
  23279. SHA224.padLength = 64;
  23280. SHA224.prototype._digest = function digest(enc) {
  23281. // Just truncate output
  23282. if (enc === 'hex')
  23283. return utils.toHex32(this.h.slice(0, 7), 'big');
  23284. else
  23285. return utils.split32(this.h.slice(0, 7), 'big');
  23286. };
  23287. /***/ }),
  23288. /***/ 199:
  23289. /*!**************************************************!*\
  23290. !*** ./node_modules/hash.js/lib/hash/sha/256.js ***!
  23291. \**************************************************/
  23292. /*! no static exports found */
  23293. /***/ (function(module, exports, __webpack_require__) {
  23294. "use strict";
  23295. var utils = __webpack_require__(/*! ../utils */ 193);
  23296. var common = __webpack_require__(/*! ../common */ 194);
  23297. var shaCommon = __webpack_require__(/*! ./common */ 197);
  23298. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  23299. var sum32 = utils.sum32;
  23300. var sum32_4 = utils.sum32_4;
  23301. var sum32_5 = utils.sum32_5;
  23302. var ch32 = shaCommon.ch32;
  23303. var maj32 = shaCommon.maj32;
  23304. var s0_256 = shaCommon.s0_256;
  23305. var s1_256 = shaCommon.s1_256;
  23306. var g0_256 = shaCommon.g0_256;
  23307. var g1_256 = shaCommon.g1_256;
  23308. var BlockHash = common.BlockHash;
  23309. var sha256_K = [
  23310. 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
  23311. 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
  23312. 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
  23313. 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
  23314. 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
  23315. 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
  23316. 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
  23317. 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
  23318. 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
  23319. 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
  23320. 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
  23321. 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
  23322. 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
  23323. 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
  23324. 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
  23325. 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
  23326. ];
  23327. function SHA256() {
  23328. if (!(this instanceof SHA256))
  23329. return new SHA256();
  23330. BlockHash.call(this);
  23331. this.h = [
  23332. 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
  23333. 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
  23334. ];
  23335. this.k = sha256_K;
  23336. this.W = new Array(64);
  23337. }
  23338. utils.inherits(SHA256, BlockHash);
  23339. module.exports = SHA256;
  23340. SHA256.blockSize = 512;
  23341. SHA256.outSize = 256;
  23342. SHA256.hmacStrength = 192;
  23343. SHA256.padLength = 64;
  23344. SHA256.prototype._update = function _update(msg, start) {
  23345. var W = this.W;
  23346. for (var i = 0; i < 16; i++)
  23347. W[i] = msg[start + i];
  23348. for (; i < W.length; i++)
  23349. W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
  23350. var a = this.h[0];
  23351. var b = this.h[1];
  23352. var c = this.h[2];
  23353. var d = this.h[3];
  23354. var e = this.h[4];
  23355. var f = this.h[5];
  23356. var g = this.h[6];
  23357. var h = this.h[7];
  23358. assert(this.k.length === W.length);
  23359. for (i = 0; i < W.length; i++) {
  23360. var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);
  23361. var T2 = sum32(s0_256(a), maj32(a, b, c));
  23362. h = g;
  23363. g = f;
  23364. f = e;
  23365. e = sum32(d, T1);
  23366. d = c;
  23367. c = b;
  23368. b = a;
  23369. a = sum32(T1, T2);
  23370. }
  23371. this.h[0] = sum32(this.h[0], a);
  23372. this.h[1] = sum32(this.h[1], b);
  23373. this.h[2] = sum32(this.h[2], c);
  23374. this.h[3] = sum32(this.h[3], d);
  23375. this.h[4] = sum32(this.h[4], e);
  23376. this.h[5] = sum32(this.h[5], f);
  23377. this.h[6] = sum32(this.h[6], g);
  23378. this.h[7] = sum32(this.h[7], h);
  23379. };
  23380. SHA256.prototype._digest = function digest(enc) {
  23381. if (enc === 'hex')
  23382. return utils.toHex32(this.h, 'big');
  23383. else
  23384. return utils.split32(this.h, 'big');
  23385. };
  23386. /***/ }),
  23387. /***/ 2:
  23388. /*!************************************************************!*\
  23389. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  23390. \************************************************************/
  23391. /*! no static exports found */
  23392. /***/ (function(module, exports, __webpack_require__) {
  23393. "use strict";
  23394. /* WEBPACK VAR INJECTION */(function(wx, global) {
  23395. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  23396. Object.defineProperty(exports, "__esModule", {
  23397. value: true
  23398. });
  23399. exports.createApp = createApp;
  23400. exports.createComponent = createComponent;
  23401. exports.createPage = createPage;
  23402. exports.createPlugin = createPlugin;
  23403. exports.createSubpackageApp = createSubpackageApp;
  23404. exports.default = void 0;
  23405. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  23406. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  23407. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  23408. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  23409. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  23410. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  23411. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  23412. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  23413. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  23414. var realAtob;
  23415. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  23416. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  23417. if (typeof atob !== 'function') {
  23418. realAtob = function realAtob(str) {
  23419. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  23420. if (!b64re.test(str)) {
  23421. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  23422. }
  23423. // Adding the padding if missing, for semplicity
  23424. str += '=='.slice(2 - (str.length & 3));
  23425. var bitmap;
  23426. var result = '';
  23427. var r1;
  23428. var r2;
  23429. var i = 0;
  23430. for (; i < str.length;) {
  23431. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  23432. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  23433. }
  23434. return result;
  23435. };
  23436. } else {
  23437. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  23438. realAtob = atob;
  23439. }
  23440. function b64DecodeUnicode(str) {
  23441. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  23442. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  23443. }).join(''));
  23444. }
  23445. function getCurrentUserInfo() {
  23446. var token = wx.getStorageSync('uni_id_token') || '';
  23447. var tokenArr = token.split('.');
  23448. if (!token || tokenArr.length !== 3) {
  23449. return {
  23450. uid: null,
  23451. role: [],
  23452. permission: [],
  23453. tokenExpired: 0
  23454. };
  23455. }
  23456. var userInfo;
  23457. try {
  23458. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  23459. } catch (error) {
  23460. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  23461. }
  23462. userInfo.tokenExpired = userInfo.exp * 1000;
  23463. delete userInfo.exp;
  23464. delete userInfo.iat;
  23465. return userInfo;
  23466. }
  23467. function uniIdMixin(Vue) {
  23468. Vue.prototype.uniIDHasRole = function (roleId) {
  23469. var _getCurrentUserInfo = getCurrentUserInfo(),
  23470. role = _getCurrentUserInfo.role;
  23471. return role.indexOf(roleId) > -1;
  23472. };
  23473. Vue.prototype.uniIDHasPermission = function (permissionId) {
  23474. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  23475. permission = _getCurrentUserInfo2.permission;
  23476. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  23477. };
  23478. Vue.prototype.uniIDTokenValid = function () {
  23479. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  23480. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  23481. return tokenExpired > Date.now();
  23482. };
  23483. }
  23484. var _toString = Object.prototype.toString;
  23485. var hasOwnProperty = Object.prototype.hasOwnProperty;
  23486. function isFn(fn) {
  23487. return typeof fn === 'function';
  23488. }
  23489. function isStr(str) {
  23490. return typeof str === 'string';
  23491. }
  23492. function isObject(obj) {
  23493. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  23494. }
  23495. function isPlainObject(obj) {
  23496. return _toString.call(obj) === '[object Object]';
  23497. }
  23498. function hasOwn(obj, key) {
  23499. return hasOwnProperty.call(obj, key);
  23500. }
  23501. function noop() {}
  23502. /**
  23503. * Create a cached version of a pure function.
  23504. */
  23505. function cached(fn) {
  23506. var cache = Object.create(null);
  23507. return function cachedFn(str) {
  23508. var hit = cache[str];
  23509. return hit || (cache[str] = fn(str));
  23510. };
  23511. }
  23512. /**
  23513. * Camelize a hyphen-delimited string.
  23514. */
  23515. var camelizeRE = /-(\w)/g;
  23516. var camelize = cached(function (str) {
  23517. return str.replace(camelizeRE, function (_, c) {
  23518. return c ? c.toUpperCase() : '';
  23519. });
  23520. });
  23521. function sortObject(obj) {
  23522. var sortObj = {};
  23523. if (isPlainObject(obj)) {
  23524. Object.keys(obj).sort().forEach(function (key) {
  23525. sortObj[key] = obj[key];
  23526. });
  23527. }
  23528. return !Object.keys(sortObj) ? obj : sortObj;
  23529. }
  23530. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  23531. var globalInterceptors = {};
  23532. var scopedInterceptors = {};
  23533. function mergeHook(parentVal, childVal) {
  23534. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  23535. return res ? dedupeHooks(res) : res;
  23536. }
  23537. function dedupeHooks(hooks) {
  23538. var res = [];
  23539. for (var i = 0; i < hooks.length; i++) {
  23540. if (res.indexOf(hooks[i]) === -1) {
  23541. res.push(hooks[i]);
  23542. }
  23543. }
  23544. return res;
  23545. }
  23546. function removeHook(hooks, hook) {
  23547. var index = hooks.indexOf(hook);
  23548. if (index !== -1) {
  23549. hooks.splice(index, 1);
  23550. }
  23551. }
  23552. function mergeInterceptorHook(interceptor, option) {
  23553. Object.keys(option).forEach(function (hook) {
  23554. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  23555. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  23556. }
  23557. });
  23558. }
  23559. function removeInterceptorHook(interceptor, option) {
  23560. if (!interceptor || !option) {
  23561. return;
  23562. }
  23563. Object.keys(option).forEach(function (hook) {
  23564. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  23565. removeHook(interceptor[hook], option[hook]);
  23566. }
  23567. });
  23568. }
  23569. function addInterceptor(method, option) {
  23570. if (typeof method === 'string' && isPlainObject(option)) {
  23571. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  23572. } else if (isPlainObject(method)) {
  23573. mergeInterceptorHook(globalInterceptors, method);
  23574. }
  23575. }
  23576. function removeInterceptor(method, option) {
  23577. if (typeof method === 'string') {
  23578. if (isPlainObject(option)) {
  23579. removeInterceptorHook(scopedInterceptors[method], option);
  23580. } else {
  23581. delete scopedInterceptors[method];
  23582. }
  23583. } else if (isPlainObject(method)) {
  23584. removeInterceptorHook(globalInterceptors, method);
  23585. }
  23586. }
  23587. function wrapperHook(hook) {
  23588. return function (data) {
  23589. return hook(data) || data;
  23590. };
  23591. }
  23592. function isPromise(obj) {
  23593. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  23594. }
  23595. function queue(hooks, data) {
  23596. var promise = false;
  23597. for (var i = 0; i < hooks.length; i++) {
  23598. var hook = hooks[i];
  23599. if (promise) {
  23600. promise = Promise.resolve(wrapperHook(hook));
  23601. } else {
  23602. var res = hook(data);
  23603. if (isPromise(res)) {
  23604. promise = Promise.resolve(res);
  23605. }
  23606. if (res === false) {
  23607. return {
  23608. then: function then() {}
  23609. };
  23610. }
  23611. }
  23612. }
  23613. return promise || {
  23614. then: function then(callback) {
  23615. return callback(data);
  23616. }
  23617. };
  23618. }
  23619. function wrapperOptions(interceptor) {
  23620. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  23621. ['success', 'fail', 'complete'].forEach(function (name) {
  23622. if (Array.isArray(interceptor[name])) {
  23623. var oldCallback = options[name];
  23624. options[name] = function callbackInterceptor(res) {
  23625. queue(interceptor[name], res).then(function (res) {
  23626. /* eslint-disable no-mixed-operators */
  23627. return isFn(oldCallback) && oldCallback(res) || res;
  23628. });
  23629. };
  23630. }
  23631. });
  23632. return options;
  23633. }
  23634. function wrapperReturnValue(method, returnValue) {
  23635. var returnValueHooks = [];
  23636. if (Array.isArray(globalInterceptors.returnValue)) {
  23637. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  23638. }
  23639. var interceptor = scopedInterceptors[method];
  23640. if (interceptor && Array.isArray(interceptor.returnValue)) {
  23641. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  23642. }
  23643. returnValueHooks.forEach(function (hook) {
  23644. returnValue = hook(returnValue) || returnValue;
  23645. });
  23646. return returnValue;
  23647. }
  23648. function getApiInterceptorHooks(method) {
  23649. var interceptor = Object.create(null);
  23650. Object.keys(globalInterceptors).forEach(function (hook) {
  23651. if (hook !== 'returnValue') {
  23652. interceptor[hook] = globalInterceptors[hook].slice();
  23653. }
  23654. });
  23655. var scopedInterceptor = scopedInterceptors[method];
  23656. if (scopedInterceptor) {
  23657. Object.keys(scopedInterceptor).forEach(function (hook) {
  23658. if (hook !== 'returnValue') {
  23659. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  23660. }
  23661. });
  23662. }
  23663. return interceptor;
  23664. }
  23665. function invokeApi(method, api, options) {
  23666. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  23667. params[_key - 3] = arguments[_key];
  23668. }
  23669. var interceptor = getApiInterceptorHooks(method);
  23670. if (interceptor && Object.keys(interceptor).length) {
  23671. if (Array.isArray(interceptor.invoke)) {
  23672. var res = queue(interceptor.invoke, options);
  23673. return res.then(function (options) {
  23674. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  23675. });
  23676. } else {
  23677. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  23678. }
  23679. }
  23680. return api.apply(void 0, [options].concat(params));
  23681. }
  23682. var promiseInterceptor = {
  23683. returnValue: function returnValue(res) {
  23684. if (!isPromise(res)) {
  23685. return res;
  23686. }
  23687. return new Promise(function (resolve, reject) {
  23688. res.then(function (res) {
  23689. if (res[0]) {
  23690. reject(res[0]);
  23691. } else {
  23692. resolve(res[1]);
  23693. }
  23694. });
  23695. });
  23696. }
  23697. };
  23698. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  23699. var CONTEXT_API_RE = /^create|Manager$/;
  23700. // Context例外情况
  23701. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  23702. // 同步例外情况
  23703. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  23704. var CALLBACK_API_RE = /^on|^off/;
  23705. function isContextApi(name) {
  23706. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  23707. }
  23708. function isSyncApi(name) {
  23709. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  23710. }
  23711. function isCallbackApi(name) {
  23712. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  23713. }
  23714. function handlePromise(promise) {
  23715. return promise.then(function (data) {
  23716. return [null, data];
  23717. }).catch(function (err) {
  23718. return [err];
  23719. });
  23720. }
  23721. function shouldPromise(name) {
  23722. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  23723. return false;
  23724. }
  23725. return true;
  23726. }
  23727. /* eslint-disable no-extend-native */
  23728. if (!Promise.prototype.finally) {
  23729. Promise.prototype.finally = function (callback) {
  23730. var promise = this.constructor;
  23731. return this.then(function (value) {
  23732. return promise.resolve(callback()).then(function () {
  23733. return value;
  23734. });
  23735. }, function (reason) {
  23736. return promise.resolve(callback()).then(function () {
  23737. throw reason;
  23738. });
  23739. });
  23740. };
  23741. }
  23742. function promisify(name, api) {
  23743. if (!shouldPromise(name) || !isFn(api)) {
  23744. return api;
  23745. }
  23746. return function promiseApi() {
  23747. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  23748. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  23749. params[_key2 - 1] = arguments[_key2];
  23750. }
  23751. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  23752. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  23753. }
  23754. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  23755. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  23756. success: resolve,
  23757. fail: reject
  23758. })].concat(params));
  23759. })));
  23760. };
  23761. }
  23762. var EPS = 1e-4;
  23763. var BASE_DEVICE_WIDTH = 750;
  23764. var isIOS = false;
  23765. var deviceWidth = 0;
  23766. var deviceDPR = 0;
  23767. function checkDeviceWidth() {
  23768. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  23769. platform = _wx$getSystemInfoSync.platform,
  23770. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  23771. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  23772. deviceWidth = windowWidth;
  23773. deviceDPR = pixelRatio;
  23774. isIOS = platform === 'ios';
  23775. }
  23776. function upx2px(number, newDeviceWidth) {
  23777. if (deviceWidth === 0) {
  23778. checkDeviceWidth();
  23779. }
  23780. number = Number(number);
  23781. if (number === 0) {
  23782. return 0;
  23783. }
  23784. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  23785. if (result < 0) {
  23786. result = -result;
  23787. }
  23788. result = Math.floor(result + EPS);
  23789. if (result === 0) {
  23790. if (deviceDPR === 1 || !isIOS) {
  23791. result = 1;
  23792. } else {
  23793. result = 0.5;
  23794. }
  23795. }
  23796. return number < 0 ? -result : result;
  23797. }
  23798. var LOCALE_ZH_HANS = 'zh-Hans';
  23799. var LOCALE_ZH_HANT = 'zh-Hant';
  23800. var LOCALE_EN = 'en';
  23801. var LOCALE_FR = 'fr';
  23802. var LOCALE_ES = 'es';
  23803. var messages = {};
  23804. var locale;
  23805. {
  23806. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  23807. }
  23808. function initI18nMessages() {
  23809. if (!isEnableLocale()) {
  23810. return;
  23811. }
  23812. var localeKeys = Object.keys(__uniConfig.locales);
  23813. if (localeKeys.length) {
  23814. localeKeys.forEach(function (locale) {
  23815. var curMessages = messages[locale];
  23816. var userMessages = __uniConfig.locales[locale];
  23817. if (curMessages) {
  23818. Object.assign(curMessages, userMessages);
  23819. } else {
  23820. messages[locale] = userMessages;
  23821. }
  23822. });
  23823. }
  23824. }
  23825. initI18nMessages();
  23826. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  23827. var t = i18n.t;
  23828. var i18nMixin = i18n.mixin = {
  23829. beforeCreate: function beforeCreate() {
  23830. var _this = this;
  23831. var unwatch = i18n.i18n.watchLocale(function () {
  23832. _this.$forceUpdate();
  23833. });
  23834. this.$once('hook:beforeDestroy', function () {
  23835. unwatch();
  23836. });
  23837. },
  23838. methods: {
  23839. $$t: function $$t(key, values) {
  23840. return t(key, values);
  23841. }
  23842. }
  23843. };
  23844. var setLocale = i18n.setLocale;
  23845. var getLocale = i18n.getLocale;
  23846. function initAppLocale(Vue, appVm, locale) {
  23847. var state = Vue.observable({
  23848. locale: locale || i18n.getLocale()
  23849. });
  23850. var localeWatchers = [];
  23851. appVm.$watchLocale = function (fn) {
  23852. localeWatchers.push(fn);
  23853. };
  23854. Object.defineProperty(appVm, '$locale', {
  23855. get: function get() {
  23856. return state.locale;
  23857. },
  23858. set: function set(v) {
  23859. state.locale = v;
  23860. localeWatchers.forEach(function (watch) {
  23861. return watch(v);
  23862. });
  23863. }
  23864. });
  23865. }
  23866. function isEnableLocale() {
  23867. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  23868. }
  23869. function include(str, parts) {
  23870. return !!parts.find(function (part) {
  23871. return str.indexOf(part) !== -1;
  23872. });
  23873. }
  23874. function startsWith(str, parts) {
  23875. return parts.find(function (part) {
  23876. return str.indexOf(part) === 0;
  23877. });
  23878. }
  23879. function normalizeLocale(locale, messages) {
  23880. if (!locale) {
  23881. return;
  23882. }
  23883. locale = locale.trim().replace(/_/g, '-');
  23884. if (messages && messages[locale]) {
  23885. return locale;
  23886. }
  23887. locale = locale.toLowerCase();
  23888. if (locale === 'chinese') {
  23889. // 支付宝
  23890. return LOCALE_ZH_HANS;
  23891. }
  23892. if (locale.indexOf('zh') === 0) {
  23893. if (locale.indexOf('-hans') > -1) {
  23894. return LOCALE_ZH_HANS;
  23895. }
  23896. if (locale.indexOf('-hant') > -1) {
  23897. return LOCALE_ZH_HANT;
  23898. }
  23899. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  23900. return LOCALE_ZH_HANT;
  23901. }
  23902. return LOCALE_ZH_HANS;
  23903. }
  23904. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  23905. if (lang) {
  23906. return lang;
  23907. }
  23908. }
  23909. // export function initI18n() {
  23910. // const localeKeys = Object.keys(__uniConfig.locales || {})
  23911. // if (localeKeys.length) {
  23912. // localeKeys.forEach((locale) =>
  23913. // i18n.add(locale, __uniConfig.locales[locale])
  23914. // )
  23915. // }
  23916. // }
  23917. function getLocale$1() {
  23918. // 优先使用 $locale
  23919. if (isFn(getApp)) {
  23920. var app = getApp({
  23921. allowDefault: true
  23922. });
  23923. if (app && app.$vm) {
  23924. return app.$vm.$locale;
  23925. }
  23926. }
  23927. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  23928. }
  23929. function setLocale$1(locale) {
  23930. var app = isFn(getApp) ? getApp() : false;
  23931. if (!app) {
  23932. return false;
  23933. }
  23934. var oldLocale = app.$vm.$locale;
  23935. if (oldLocale !== locale) {
  23936. app.$vm.$locale = locale;
  23937. onLocaleChangeCallbacks.forEach(function (fn) {
  23938. return fn({
  23939. locale: locale
  23940. });
  23941. });
  23942. return true;
  23943. }
  23944. return false;
  23945. }
  23946. var onLocaleChangeCallbacks = [];
  23947. function onLocaleChange(fn) {
  23948. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  23949. onLocaleChangeCallbacks.push(fn);
  23950. }
  23951. }
  23952. if (typeof global !== 'undefined') {
  23953. global.getLocale = getLocale$1;
  23954. }
  23955. var interceptors = {
  23956. promiseInterceptor: promiseInterceptor
  23957. };
  23958. var baseApi = /*#__PURE__*/Object.freeze({
  23959. __proto__: null,
  23960. upx2px: upx2px,
  23961. getLocale: getLocale$1,
  23962. setLocale: setLocale$1,
  23963. onLocaleChange: onLocaleChange,
  23964. addInterceptor: addInterceptor,
  23965. removeInterceptor: removeInterceptor,
  23966. interceptors: interceptors
  23967. });
  23968. function findExistsPageIndex(url) {
  23969. var pages = getCurrentPages();
  23970. var len = pages.length;
  23971. while (len--) {
  23972. var page = pages[len];
  23973. if (page.$page && page.$page.fullPath === url) {
  23974. return len;
  23975. }
  23976. }
  23977. return -1;
  23978. }
  23979. var redirectTo = {
  23980. name: function name(fromArgs) {
  23981. if (fromArgs.exists === 'back' && fromArgs.delta) {
  23982. return 'navigateBack';
  23983. }
  23984. return 'redirectTo';
  23985. },
  23986. args: function args(fromArgs) {
  23987. if (fromArgs.exists === 'back' && fromArgs.url) {
  23988. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  23989. if (existsPageIndex !== -1) {
  23990. var delta = getCurrentPages().length - 1 - existsPageIndex;
  23991. if (delta > 0) {
  23992. fromArgs.delta = delta;
  23993. }
  23994. }
  23995. }
  23996. }
  23997. };
  23998. var previewImage = {
  23999. args: function args(fromArgs) {
  24000. var currentIndex = parseInt(fromArgs.current);
  24001. if (isNaN(currentIndex)) {
  24002. return;
  24003. }
  24004. var urls = fromArgs.urls;
  24005. if (!Array.isArray(urls)) {
  24006. return;
  24007. }
  24008. var len = urls.length;
  24009. if (!len) {
  24010. return;
  24011. }
  24012. if (currentIndex < 0) {
  24013. currentIndex = 0;
  24014. } else if (currentIndex >= len) {
  24015. currentIndex = len - 1;
  24016. }
  24017. if (currentIndex > 0) {
  24018. fromArgs.current = urls[currentIndex];
  24019. fromArgs.urls = urls.filter(function (item, index) {
  24020. return index < currentIndex ? item !== urls[currentIndex] : true;
  24021. });
  24022. } else {
  24023. fromArgs.current = urls[0];
  24024. }
  24025. return {
  24026. indicator: false,
  24027. loop: false
  24028. };
  24029. }
  24030. };
  24031. var UUID_KEY = '__DC_STAT_UUID';
  24032. var deviceId;
  24033. function useDeviceId(result) {
  24034. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  24035. if (!deviceId) {
  24036. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  24037. wx.setStorage({
  24038. key: UUID_KEY,
  24039. data: deviceId
  24040. });
  24041. }
  24042. result.deviceId = deviceId;
  24043. }
  24044. function addSafeAreaInsets(result) {
  24045. if (result.safeArea) {
  24046. var safeArea = result.safeArea;
  24047. result.safeAreaInsets = {
  24048. top: safeArea.top,
  24049. left: safeArea.left,
  24050. right: result.windowWidth - safeArea.right,
  24051. bottom: result.screenHeight - safeArea.bottom
  24052. };
  24053. }
  24054. }
  24055. function populateParameters(result) {
  24056. var _result$brand = result.brand,
  24057. brand = _result$brand === void 0 ? '' : _result$brand,
  24058. _result$model = result.model,
  24059. model = _result$model === void 0 ? '' : _result$model,
  24060. _result$system = result.system,
  24061. system = _result$system === void 0 ? '' : _result$system,
  24062. _result$language = result.language,
  24063. language = _result$language === void 0 ? '' : _result$language,
  24064. theme = result.theme,
  24065. version = result.version,
  24066. platform = result.platform,
  24067. fontSizeSetting = result.fontSizeSetting,
  24068. SDKVersion = result.SDKVersion,
  24069. pixelRatio = result.pixelRatio,
  24070. deviceOrientation = result.deviceOrientation;
  24071. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  24072. var extraParam = {};
  24073. // osName osVersion
  24074. var osName = '';
  24075. var osVersion = '';
  24076. {
  24077. osName = system.split(' ')[0] || '';
  24078. osVersion = system.split(' ')[1] || '';
  24079. }
  24080. var hostVersion = version;
  24081. // deviceType
  24082. var deviceType = getGetDeviceType(result, model);
  24083. // deviceModel
  24084. var deviceBrand = getDeviceBrand(brand);
  24085. // hostName
  24086. var _hostName = getHostName(result);
  24087. // deviceOrientation
  24088. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  24089. // devicePixelRatio
  24090. var _devicePixelRatio = pixelRatio;
  24091. // SDKVersion
  24092. var _SDKVersion = SDKVersion;
  24093. // hostLanguage
  24094. var hostLanguage = language.replace(/_/g, '-');
  24095. // wx.getAccountInfoSync
  24096. var parameters = {
  24097. appId: "__UNI__DBA6730",
  24098. appName: "云飞智控",
  24099. appVersion: "1.5.5",
  24100. appVersionCode: "155",
  24101. appLanguage: getAppLanguage(hostLanguage),
  24102. uniCompileVersion: "3.7.11",
  24103. uniRuntimeVersion: "3.7.11",
  24104. uniPlatform: undefined || "mp-weixin",
  24105. deviceBrand: deviceBrand,
  24106. deviceModel: model,
  24107. deviceType: deviceType,
  24108. devicePixelRatio: _devicePixelRatio,
  24109. deviceOrientation: _deviceOrientation,
  24110. osName: osName.toLocaleLowerCase(),
  24111. osVersion: osVersion,
  24112. hostTheme: theme,
  24113. hostVersion: hostVersion,
  24114. hostLanguage: hostLanguage,
  24115. hostName: _hostName,
  24116. hostSDKVersion: _SDKVersion,
  24117. hostFontSizeSetting: fontSizeSetting,
  24118. windowTop: 0,
  24119. windowBottom: 0,
  24120. // TODO
  24121. osLanguage: undefined,
  24122. osTheme: undefined,
  24123. ua: undefined,
  24124. hostPackageName: undefined,
  24125. browserName: undefined,
  24126. browserVersion: undefined
  24127. };
  24128. Object.assign(result, parameters, extraParam);
  24129. }
  24130. function getGetDeviceType(result, model) {
  24131. var deviceType = result.deviceType || 'phone';
  24132. {
  24133. var deviceTypeMaps = {
  24134. ipad: 'pad',
  24135. windows: 'pc',
  24136. mac: 'pc'
  24137. };
  24138. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  24139. var _model = model.toLocaleLowerCase();
  24140. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  24141. var _m = deviceTypeMapsKeys[index];
  24142. if (_model.indexOf(_m) !== -1) {
  24143. deviceType = deviceTypeMaps[_m];
  24144. break;
  24145. }
  24146. }
  24147. }
  24148. return deviceType;
  24149. }
  24150. function getDeviceBrand(brand) {
  24151. var deviceBrand = brand;
  24152. if (deviceBrand) {
  24153. deviceBrand = brand.toLocaleLowerCase();
  24154. }
  24155. return deviceBrand;
  24156. }
  24157. function getAppLanguage(defaultLanguage) {
  24158. return getLocale$1 ? getLocale$1() : defaultLanguage;
  24159. }
  24160. function getHostName(result) {
  24161. var _platform = 'WeChat';
  24162. var _hostName = result.hostName || _platform; // mp-jd
  24163. {
  24164. if (result.environment) {
  24165. _hostName = result.environment;
  24166. } else if (result.host && result.host.env) {
  24167. _hostName = result.host.env;
  24168. }
  24169. }
  24170. return _hostName;
  24171. }
  24172. var getSystemInfo = {
  24173. returnValue: function returnValue(result) {
  24174. useDeviceId(result);
  24175. addSafeAreaInsets(result);
  24176. populateParameters(result);
  24177. }
  24178. };
  24179. var showActionSheet = {
  24180. args: function args(fromArgs) {
  24181. if ((0, _typeof2.default)(fromArgs) === 'object') {
  24182. fromArgs.alertText = fromArgs.title;
  24183. }
  24184. }
  24185. };
  24186. var getAppBaseInfo = {
  24187. returnValue: function returnValue(result) {
  24188. var _result = result,
  24189. version = _result.version,
  24190. language = _result.language,
  24191. SDKVersion = _result.SDKVersion,
  24192. theme = _result.theme;
  24193. var _hostName = getHostName(result);
  24194. var hostLanguage = language.replace('_', '-');
  24195. result = sortObject(Object.assign(result, {
  24196. appId: "__UNI__DBA6730",
  24197. appName: "云飞智控",
  24198. appVersion: "1.5.5",
  24199. appVersionCode: "155",
  24200. appLanguage: getAppLanguage(hostLanguage),
  24201. hostVersion: version,
  24202. hostLanguage: hostLanguage,
  24203. hostName: _hostName,
  24204. hostSDKVersion: SDKVersion,
  24205. hostTheme: theme
  24206. }));
  24207. }
  24208. };
  24209. var getDeviceInfo = {
  24210. returnValue: function returnValue(result) {
  24211. var _result2 = result,
  24212. brand = _result2.brand,
  24213. model = _result2.model;
  24214. var deviceType = getGetDeviceType(result, model);
  24215. var deviceBrand = getDeviceBrand(brand);
  24216. useDeviceId(result);
  24217. result = sortObject(Object.assign(result, {
  24218. deviceType: deviceType,
  24219. deviceBrand: deviceBrand,
  24220. deviceModel: model
  24221. }));
  24222. }
  24223. };
  24224. var getWindowInfo = {
  24225. returnValue: function returnValue(result) {
  24226. addSafeAreaInsets(result);
  24227. result = sortObject(Object.assign(result, {
  24228. windowTop: 0,
  24229. windowBottom: 0
  24230. }));
  24231. }
  24232. };
  24233. var getAppAuthorizeSetting = {
  24234. returnValue: function returnValue(result) {
  24235. var locationReducedAccuracy = result.locationReducedAccuracy;
  24236. result.locationAccuracy = 'unsupported';
  24237. if (locationReducedAccuracy === true) {
  24238. result.locationAccuracy = 'reduced';
  24239. } else if (locationReducedAccuracy === false) {
  24240. result.locationAccuracy = 'full';
  24241. }
  24242. }
  24243. };
  24244. // import navigateTo from 'uni-helpers/navigate-to'
  24245. var compressImage = {
  24246. args: function args(fromArgs) {
  24247. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  24248. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  24249. fromArgs.compressHeight = fromArgs.compressedHeight;
  24250. }
  24251. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  24252. fromArgs.compressWidth = fromArgs.compressedWidth;
  24253. }
  24254. }
  24255. };
  24256. var protocols = {
  24257. redirectTo: redirectTo,
  24258. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  24259. previewImage: previewImage,
  24260. getSystemInfo: getSystemInfo,
  24261. getSystemInfoSync: getSystemInfo,
  24262. showActionSheet: showActionSheet,
  24263. getAppBaseInfo: getAppBaseInfo,
  24264. getDeviceInfo: getDeviceInfo,
  24265. getWindowInfo: getWindowInfo,
  24266. getAppAuthorizeSetting: getAppAuthorizeSetting,
  24267. compressImage: compressImage
  24268. };
  24269. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  24270. var canIUses = [];
  24271. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  24272. function processCallback(methodName, method, returnValue) {
  24273. return function (res) {
  24274. return method(processReturnValue(methodName, res, returnValue));
  24275. };
  24276. }
  24277. function processArgs(methodName, fromArgs) {
  24278. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  24279. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  24280. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  24281. if (isPlainObject(fromArgs)) {
  24282. // 一般 api 的参数解析
  24283. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  24284. if (isFn(argsOption)) {
  24285. argsOption = argsOption(fromArgs, toArgs) || {};
  24286. }
  24287. for (var key in fromArgs) {
  24288. if (hasOwn(argsOption, key)) {
  24289. var keyOption = argsOption[key];
  24290. if (isFn(keyOption)) {
  24291. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  24292. }
  24293. if (!keyOption) {
  24294. // 不支持的参数
  24295. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  24296. } else if (isStr(keyOption)) {
  24297. // 重写参数 key
  24298. toArgs[keyOption] = fromArgs[key];
  24299. } else if (isPlainObject(keyOption)) {
  24300. // {name:newName,value:value}可重新指定参数 key:value
  24301. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  24302. }
  24303. } else if (CALLBACKS.indexOf(key) !== -1) {
  24304. if (isFn(fromArgs[key])) {
  24305. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  24306. }
  24307. } else {
  24308. if (!keepFromArgs) {
  24309. toArgs[key] = fromArgs[key];
  24310. }
  24311. }
  24312. }
  24313. return toArgs;
  24314. } else if (isFn(fromArgs)) {
  24315. fromArgs = processCallback(methodName, fromArgs, returnValue);
  24316. }
  24317. return fromArgs;
  24318. }
  24319. function processReturnValue(methodName, res, returnValue) {
  24320. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  24321. if (isFn(protocols.returnValue)) {
  24322. // 处理通用 returnValue
  24323. res = protocols.returnValue(methodName, res);
  24324. }
  24325. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  24326. }
  24327. function wrapper(methodName, method) {
  24328. if (hasOwn(protocols, methodName)) {
  24329. var protocol = protocols[methodName];
  24330. if (!protocol) {
  24331. // 暂不支持的 api
  24332. return function () {
  24333. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  24334. };
  24335. }
  24336. return function (arg1, arg2) {
  24337. // 目前 api 最多两个参数
  24338. var options = protocol;
  24339. if (isFn(protocol)) {
  24340. options = protocol(arg1);
  24341. }
  24342. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  24343. var args = [arg1];
  24344. if (typeof arg2 !== 'undefined') {
  24345. args.push(arg2);
  24346. }
  24347. if (isFn(options.name)) {
  24348. methodName = options.name(arg1);
  24349. } else if (isStr(options.name)) {
  24350. methodName = options.name;
  24351. }
  24352. var returnValue = wx[methodName].apply(wx, args);
  24353. if (isSyncApi(methodName)) {
  24354. // 同步 api
  24355. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  24356. }
  24357. return returnValue;
  24358. };
  24359. }
  24360. return method;
  24361. }
  24362. var todoApis = Object.create(null);
  24363. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  24364. function createTodoApi(name) {
  24365. return function todoApi(_ref) {
  24366. var fail = _ref.fail,
  24367. complete = _ref.complete;
  24368. var res = {
  24369. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  24370. };
  24371. isFn(fail) && fail(res);
  24372. isFn(complete) && complete(res);
  24373. };
  24374. }
  24375. TODOS.forEach(function (name) {
  24376. todoApis[name] = createTodoApi(name);
  24377. });
  24378. var providers = {
  24379. oauth: ['weixin'],
  24380. share: ['weixin'],
  24381. payment: ['wxpay'],
  24382. push: ['weixin']
  24383. };
  24384. function getProvider(_ref2) {
  24385. var service = _ref2.service,
  24386. success = _ref2.success,
  24387. fail = _ref2.fail,
  24388. complete = _ref2.complete;
  24389. var res = false;
  24390. if (providers[service]) {
  24391. res = {
  24392. errMsg: 'getProvider:ok',
  24393. service: service,
  24394. provider: providers[service]
  24395. };
  24396. isFn(success) && success(res);
  24397. } else {
  24398. res = {
  24399. errMsg: 'getProvider:fail service not found'
  24400. };
  24401. isFn(fail) && fail(res);
  24402. }
  24403. isFn(complete) && complete(res);
  24404. }
  24405. var extraApi = /*#__PURE__*/Object.freeze({
  24406. __proto__: null,
  24407. getProvider: getProvider
  24408. });
  24409. var getEmitter = function () {
  24410. var Emitter;
  24411. return function getUniEmitter() {
  24412. if (!Emitter) {
  24413. Emitter = new _vue.default();
  24414. }
  24415. return Emitter;
  24416. };
  24417. }();
  24418. function apply(ctx, method, args) {
  24419. return ctx[method].apply(ctx, args);
  24420. }
  24421. function $on() {
  24422. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  24423. }
  24424. function $off() {
  24425. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  24426. }
  24427. function $once() {
  24428. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  24429. }
  24430. function $emit() {
  24431. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  24432. }
  24433. var eventApi = /*#__PURE__*/Object.freeze({
  24434. __proto__: null,
  24435. $on: $on,
  24436. $off: $off,
  24437. $once: $once,
  24438. $emit: $emit
  24439. });
  24440. /**
  24441. * 框架内 try-catch
  24442. */
  24443. /**
  24444. * 开发者 try-catch
  24445. */
  24446. function tryCatch(fn) {
  24447. return function () {
  24448. try {
  24449. return fn.apply(fn, arguments);
  24450. } catch (e) {
  24451. // TODO
  24452. console.error(e);
  24453. }
  24454. };
  24455. }
  24456. function getApiCallbacks(params) {
  24457. var apiCallbacks = {};
  24458. for (var name in params) {
  24459. var param = params[name];
  24460. if (isFn(param)) {
  24461. apiCallbacks[name] = tryCatch(param);
  24462. delete params[name];
  24463. }
  24464. }
  24465. return apiCallbacks;
  24466. }
  24467. var cid;
  24468. var cidErrMsg;
  24469. var enabled;
  24470. function normalizePushMessage(message) {
  24471. try {
  24472. return JSON.parse(message);
  24473. } catch (e) {}
  24474. return message;
  24475. }
  24476. function invokePushCallback(args) {
  24477. if (args.type === 'enabled') {
  24478. enabled = true;
  24479. } else if (args.type === 'clientId') {
  24480. cid = args.cid;
  24481. cidErrMsg = args.errMsg;
  24482. invokeGetPushCidCallbacks(cid, args.errMsg);
  24483. } else if (args.type === 'pushMsg') {
  24484. var message = {
  24485. type: 'receive',
  24486. data: normalizePushMessage(args.message)
  24487. };
  24488. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  24489. var callback = onPushMessageCallbacks[i];
  24490. callback(message);
  24491. // 该消息已被阻止
  24492. if (message.stopped) {
  24493. break;
  24494. }
  24495. }
  24496. } else if (args.type === 'click') {
  24497. onPushMessageCallbacks.forEach(function (callback) {
  24498. callback({
  24499. type: 'click',
  24500. data: normalizePushMessage(args.message)
  24501. });
  24502. });
  24503. }
  24504. }
  24505. var getPushCidCallbacks = [];
  24506. function invokeGetPushCidCallbacks(cid, errMsg) {
  24507. getPushCidCallbacks.forEach(function (callback) {
  24508. callback(cid, errMsg);
  24509. });
  24510. getPushCidCallbacks.length = 0;
  24511. }
  24512. function getPushClientId(args) {
  24513. if (!isPlainObject(args)) {
  24514. args = {};
  24515. }
  24516. var _getApiCallbacks = getApiCallbacks(args),
  24517. success = _getApiCallbacks.success,
  24518. fail = _getApiCallbacks.fail,
  24519. complete = _getApiCallbacks.complete;
  24520. var hasSuccess = isFn(success);
  24521. var hasFail = isFn(fail);
  24522. var hasComplete = isFn(complete);
  24523. Promise.resolve().then(function () {
  24524. if (typeof enabled === 'undefined') {
  24525. enabled = false;
  24526. cid = '';
  24527. cidErrMsg = 'uniPush is not enabled';
  24528. }
  24529. getPushCidCallbacks.push(function (cid, errMsg) {
  24530. var res;
  24531. if (cid) {
  24532. res = {
  24533. errMsg: 'getPushClientId:ok',
  24534. cid: cid
  24535. };
  24536. hasSuccess && success(res);
  24537. } else {
  24538. res = {
  24539. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  24540. };
  24541. hasFail && fail(res);
  24542. }
  24543. hasComplete && complete(res);
  24544. });
  24545. if (typeof cid !== 'undefined') {
  24546. invokeGetPushCidCallbacks(cid, cidErrMsg);
  24547. }
  24548. });
  24549. }
  24550. var onPushMessageCallbacks = [];
  24551. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  24552. var onPushMessage = function onPushMessage(fn) {
  24553. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  24554. onPushMessageCallbacks.push(fn);
  24555. }
  24556. };
  24557. var offPushMessage = function offPushMessage(fn) {
  24558. if (!fn) {
  24559. onPushMessageCallbacks.length = 0;
  24560. } else {
  24561. var index = onPushMessageCallbacks.indexOf(fn);
  24562. if (index > -1) {
  24563. onPushMessageCallbacks.splice(index, 1);
  24564. }
  24565. }
  24566. };
  24567. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  24568. if (!baseInfo) {
  24569. baseInfo = wx.getSystemInfoSync();
  24570. }
  24571. var host = baseInfo ? baseInfo.host : null;
  24572. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  24573. var api = /*#__PURE__*/Object.freeze({
  24574. __proto__: null,
  24575. shareVideoMessage: shareVideoMessage,
  24576. getPushClientId: getPushClientId,
  24577. onPushMessage: onPushMessage,
  24578. offPushMessage: offPushMessage,
  24579. invokePushCallback: invokePushCallback
  24580. });
  24581. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  24582. function findVmByVueId(vm, vuePid) {
  24583. var $children = vm.$children;
  24584. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  24585. for (var i = $children.length - 1; i >= 0; i--) {
  24586. var childVm = $children[i];
  24587. if (childVm.$scope._$vueId === vuePid) {
  24588. return childVm;
  24589. }
  24590. }
  24591. // 反向递归查找
  24592. var parentVm;
  24593. for (var _i = $children.length - 1; _i >= 0; _i--) {
  24594. parentVm = findVmByVueId($children[_i], vuePid);
  24595. if (parentVm) {
  24596. return parentVm;
  24597. }
  24598. }
  24599. }
  24600. function initBehavior(options) {
  24601. return Behavior(options);
  24602. }
  24603. function isPage() {
  24604. return !!this.route;
  24605. }
  24606. function initRelation(detail) {
  24607. this.triggerEvent('__l', detail);
  24608. }
  24609. function selectAllComponents(mpInstance, selector, $refs) {
  24610. var components = mpInstance.selectAllComponents(selector) || [];
  24611. components.forEach(function (component) {
  24612. var ref = component.dataset.ref;
  24613. $refs[ref] = component.$vm || toSkip(component);
  24614. {
  24615. if (component.dataset.vueGeneric === 'scoped') {
  24616. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  24617. selectAllComponents(scopedComponent, selector, $refs);
  24618. });
  24619. }
  24620. }
  24621. });
  24622. }
  24623. function syncRefs(refs, newRefs) {
  24624. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  24625. var newKeys = Object.keys(newRefs);
  24626. newKeys.forEach(function (key) {
  24627. var oldValue = refs[key];
  24628. var newValue = newRefs[key];
  24629. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  24630. return oldValue.includes(value);
  24631. })) {
  24632. return;
  24633. }
  24634. refs[key] = newValue;
  24635. oldKeys.delete(key);
  24636. });
  24637. oldKeys.forEach(function (key) {
  24638. delete refs[key];
  24639. });
  24640. return refs;
  24641. }
  24642. function initRefs(vm) {
  24643. var mpInstance = vm.$scope;
  24644. var refs = {};
  24645. Object.defineProperty(vm, '$refs', {
  24646. get: function get() {
  24647. var $refs = {};
  24648. selectAllComponents(mpInstance, '.vue-ref', $refs);
  24649. // TODO 暂不考虑 for 中的 scoped
  24650. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  24651. forComponents.forEach(function (component) {
  24652. var ref = component.dataset.ref;
  24653. if (!$refs[ref]) {
  24654. $refs[ref] = [];
  24655. }
  24656. $refs[ref].push(component.$vm || toSkip(component));
  24657. });
  24658. return syncRefs(refs, $refs);
  24659. }
  24660. });
  24661. }
  24662. function handleLink(event) {
  24663. var _ref3 = event.detail || event.value,
  24664. vuePid = _ref3.vuePid,
  24665. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  24666. var parentVm;
  24667. if (vuePid) {
  24668. parentVm = findVmByVueId(this.$vm, vuePid);
  24669. }
  24670. if (!parentVm) {
  24671. parentVm = this.$vm;
  24672. }
  24673. vueOptions.parent = parentVm;
  24674. }
  24675. function markMPComponent(component) {
  24676. // 在 Vue 中标记为小程序组件
  24677. var IS_MP = '__v_isMPComponent';
  24678. Object.defineProperty(component, IS_MP, {
  24679. configurable: true,
  24680. enumerable: false,
  24681. value: true
  24682. });
  24683. return component;
  24684. }
  24685. function toSkip(obj) {
  24686. var OB = '__ob__';
  24687. var SKIP = '__v_skip';
  24688. if (isObject(obj) && Object.isExtensible(obj)) {
  24689. // 避免被 @vue/composition-api 观测
  24690. Object.defineProperty(obj, OB, {
  24691. configurable: true,
  24692. enumerable: false,
  24693. value: (0, _defineProperty2.default)({}, SKIP, true)
  24694. });
  24695. }
  24696. return obj;
  24697. }
  24698. var WORKLET_RE = /_(.*)_worklet_factory_/;
  24699. function initWorkletMethods(mpMethods, vueMethods) {
  24700. if (vueMethods) {
  24701. Object.keys(vueMethods).forEach(function (name) {
  24702. var matches = name.match(WORKLET_RE);
  24703. if (matches) {
  24704. var workletName = matches[1];
  24705. mpMethods[name] = vueMethods[name];
  24706. mpMethods[workletName] = vueMethods[workletName];
  24707. }
  24708. });
  24709. }
  24710. }
  24711. var MPPage = Page;
  24712. var MPComponent = Component;
  24713. var customizeRE = /:/g;
  24714. var customize = cached(function (str) {
  24715. return camelize(str.replace(customizeRE, '-'));
  24716. });
  24717. function initTriggerEvent(mpInstance) {
  24718. var oldTriggerEvent = mpInstance.triggerEvent;
  24719. var newTriggerEvent = function newTriggerEvent(event) {
  24720. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  24721. args[_key3 - 1] = arguments[_key3];
  24722. }
  24723. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  24724. if (this.$vm || this.dataset && this.dataset.comType) {
  24725. event = customize(event);
  24726. } else {
  24727. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  24728. var newEvent = customize(event);
  24729. if (newEvent !== event) {
  24730. oldTriggerEvent.apply(this, [newEvent].concat(args));
  24731. }
  24732. }
  24733. return oldTriggerEvent.apply(this, [event].concat(args));
  24734. };
  24735. try {
  24736. // 京东小程序 triggerEvent 为只读
  24737. mpInstance.triggerEvent = newTriggerEvent;
  24738. } catch (error) {
  24739. mpInstance._triggerEvent = newTriggerEvent;
  24740. }
  24741. }
  24742. function initHook(name, options, isComponent) {
  24743. var oldHook = options[name];
  24744. options[name] = function () {
  24745. markMPComponent(this);
  24746. initTriggerEvent(this);
  24747. if (oldHook) {
  24748. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  24749. args[_key4] = arguments[_key4];
  24750. }
  24751. return oldHook.apply(this, args);
  24752. }
  24753. };
  24754. }
  24755. if (!MPPage.__$wrappered) {
  24756. MPPage.__$wrappered = true;
  24757. Page = function Page() {
  24758. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  24759. initHook('onLoad', options);
  24760. return MPPage(options);
  24761. };
  24762. Page.after = MPPage.after;
  24763. Component = function Component() {
  24764. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  24765. initHook('created', options);
  24766. return MPComponent(options);
  24767. };
  24768. }
  24769. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  24770. function initMocks(vm, mocks) {
  24771. var mpInstance = vm.$mp[vm.mpType];
  24772. mocks.forEach(function (mock) {
  24773. if (hasOwn(mpInstance, mock)) {
  24774. vm[mock] = mpInstance[mock];
  24775. }
  24776. });
  24777. }
  24778. function hasHook(hook, vueOptions) {
  24779. if (!vueOptions) {
  24780. return true;
  24781. }
  24782. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  24783. return true;
  24784. }
  24785. vueOptions = vueOptions.default || vueOptions;
  24786. if (isFn(vueOptions)) {
  24787. if (isFn(vueOptions.extendOptions[hook])) {
  24788. return true;
  24789. }
  24790. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  24791. return true;
  24792. }
  24793. return false;
  24794. }
  24795. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  24796. return true;
  24797. }
  24798. var mixins = vueOptions.mixins;
  24799. if (Array.isArray(mixins)) {
  24800. return !!mixins.find(function (mixin) {
  24801. return hasHook(hook, mixin);
  24802. });
  24803. }
  24804. }
  24805. function initHooks(mpOptions, hooks, vueOptions) {
  24806. hooks.forEach(function (hook) {
  24807. if (hasHook(hook, vueOptions)) {
  24808. mpOptions[hook] = function (args) {
  24809. return this.$vm && this.$vm.__call_hook(hook, args);
  24810. };
  24811. }
  24812. });
  24813. }
  24814. function initUnknownHooks(mpOptions, vueOptions) {
  24815. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  24816. findHooks(vueOptions).forEach(function (hook) {
  24817. return initHook$1(mpOptions, hook, excludes);
  24818. });
  24819. }
  24820. function findHooks(vueOptions) {
  24821. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  24822. if (vueOptions) {
  24823. Object.keys(vueOptions).forEach(function (name) {
  24824. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  24825. hooks.push(name);
  24826. }
  24827. });
  24828. }
  24829. return hooks;
  24830. }
  24831. function initHook$1(mpOptions, hook, excludes) {
  24832. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  24833. mpOptions[hook] = function (args) {
  24834. return this.$vm && this.$vm.__call_hook(hook, args);
  24835. };
  24836. }
  24837. }
  24838. function initVueComponent(Vue, vueOptions) {
  24839. vueOptions = vueOptions.default || vueOptions;
  24840. var VueComponent;
  24841. if (isFn(vueOptions)) {
  24842. VueComponent = vueOptions;
  24843. } else {
  24844. VueComponent = Vue.extend(vueOptions);
  24845. }
  24846. vueOptions = VueComponent.options;
  24847. return [VueComponent, vueOptions];
  24848. }
  24849. function initSlots(vm, vueSlots) {
  24850. if (Array.isArray(vueSlots) && vueSlots.length) {
  24851. var $slots = Object.create(null);
  24852. vueSlots.forEach(function (slotName) {
  24853. $slots[slotName] = true;
  24854. });
  24855. vm.$scopedSlots = vm.$slots = $slots;
  24856. }
  24857. }
  24858. function initVueIds(vueIds, mpInstance) {
  24859. vueIds = (vueIds || '').split(',');
  24860. var len = vueIds.length;
  24861. if (len === 1) {
  24862. mpInstance._$vueId = vueIds[0];
  24863. } else if (len === 2) {
  24864. mpInstance._$vueId = vueIds[0];
  24865. mpInstance._$vuePid = vueIds[1];
  24866. }
  24867. }
  24868. function initData(vueOptions, context) {
  24869. var data = vueOptions.data || {};
  24870. var methods = vueOptions.methods || {};
  24871. if (typeof data === 'function') {
  24872. try {
  24873. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  24874. } catch (e) {
  24875. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  24876. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  24877. }
  24878. }
  24879. } else {
  24880. try {
  24881. // 对 data 格式化
  24882. data = JSON.parse(JSON.stringify(data));
  24883. } catch (e) {}
  24884. }
  24885. if (!isPlainObject(data)) {
  24886. data = {};
  24887. }
  24888. Object.keys(methods).forEach(function (methodName) {
  24889. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  24890. data[methodName] = methods[methodName];
  24891. }
  24892. });
  24893. return data;
  24894. }
  24895. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  24896. function createObserver(name) {
  24897. return function observer(newVal, oldVal) {
  24898. if (this.$vm) {
  24899. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  24900. }
  24901. };
  24902. }
  24903. function initBehaviors(vueOptions, initBehavior) {
  24904. var vueBehaviors = vueOptions.behaviors;
  24905. var vueExtends = vueOptions.extends;
  24906. var vueMixins = vueOptions.mixins;
  24907. var vueProps = vueOptions.props;
  24908. if (!vueProps) {
  24909. vueOptions.props = vueProps = [];
  24910. }
  24911. var behaviors = [];
  24912. if (Array.isArray(vueBehaviors)) {
  24913. vueBehaviors.forEach(function (behavior) {
  24914. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  24915. if (behavior === 'uni://form-field') {
  24916. if (Array.isArray(vueProps)) {
  24917. vueProps.push('name');
  24918. vueProps.push('value');
  24919. } else {
  24920. vueProps.name = {
  24921. type: String,
  24922. default: ''
  24923. };
  24924. vueProps.value = {
  24925. type: [String, Number, Boolean, Array, Object, Date],
  24926. default: ''
  24927. };
  24928. }
  24929. }
  24930. });
  24931. }
  24932. if (isPlainObject(vueExtends) && vueExtends.props) {
  24933. behaviors.push(initBehavior({
  24934. properties: initProperties(vueExtends.props, true)
  24935. }));
  24936. }
  24937. if (Array.isArray(vueMixins)) {
  24938. vueMixins.forEach(function (vueMixin) {
  24939. if (isPlainObject(vueMixin) && vueMixin.props) {
  24940. behaviors.push(initBehavior({
  24941. properties: initProperties(vueMixin.props, true)
  24942. }));
  24943. }
  24944. });
  24945. }
  24946. return behaviors;
  24947. }
  24948. function parsePropType(key, type, defaultValue, file) {
  24949. // [String]=>String
  24950. if (Array.isArray(type) && type.length === 1) {
  24951. return type[0];
  24952. }
  24953. return type;
  24954. }
  24955. function initProperties(props) {
  24956. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  24957. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  24958. var options = arguments.length > 3 ? arguments[3] : undefined;
  24959. var properties = {};
  24960. if (!isBehavior) {
  24961. properties.vueId = {
  24962. type: String,
  24963. value: ''
  24964. };
  24965. {
  24966. if (options.virtualHost) {
  24967. properties.virtualHostStyle = {
  24968. type: null,
  24969. value: ''
  24970. };
  24971. properties.virtualHostClass = {
  24972. type: null,
  24973. value: ''
  24974. };
  24975. }
  24976. }
  24977. // scopedSlotsCompiler auto
  24978. properties.scopedSlotsCompiler = {
  24979. type: String,
  24980. value: ''
  24981. };
  24982. properties.vueSlots = {
  24983. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  24984. type: null,
  24985. value: [],
  24986. observer: function observer(newVal, oldVal) {
  24987. var $slots = Object.create(null);
  24988. newVal.forEach(function (slotName) {
  24989. $slots[slotName] = true;
  24990. });
  24991. this.setData({
  24992. $slots: $slots
  24993. });
  24994. }
  24995. };
  24996. }
  24997. if (Array.isArray(props)) {
  24998. // ['title']
  24999. props.forEach(function (key) {
  25000. properties[key] = {
  25001. type: null,
  25002. observer: createObserver(key)
  25003. };
  25004. });
  25005. } else if (isPlainObject(props)) {
  25006. // {title:{type:String,default:''},content:String}
  25007. Object.keys(props).forEach(function (key) {
  25008. var opts = props[key];
  25009. if (isPlainObject(opts)) {
  25010. // title:{type:String,default:''}
  25011. var value = opts.default;
  25012. if (isFn(value)) {
  25013. value = value();
  25014. }
  25015. opts.type = parsePropType(key, opts.type);
  25016. properties[key] = {
  25017. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  25018. value: value,
  25019. observer: createObserver(key)
  25020. };
  25021. } else {
  25022. // content:String
  25023. var type = parsePropType(key, opts);
  25024. properties[key] = {
  25025. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  25026. observer: createObserver(key)
  25027. };
  25028. }
  25029. });
  25030. }
  25031. return properties;
  25032. }
  25033. function wrapper$1(event) {
  25034. // TODO 又得兼容 mpvue 的 mp 对象
  25035. try {
  25036. event.mp = JSON.parse(JSON.stringify(event));
  25037. } catch (e) {}
  25038. event.stopPropagation = noop;
  25039. event.preventDefault = noop;
  25040. event.target = event.target || {};
  25041. if (!hasOwn(event, 'detail')) {
  25042. event.detail = {};
  25043. }
  25044. if (hasOwn(event, 'markerId')) {
  25045. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  25046. event.detail.markerId = event.markerId;
  25047. }
  25048. if (isPlainObject(event.detail)) {
  25049. event.target = Object.assign({}, event.target, event.detail);
  25050. }
  25051. return event;
  25052. }
  25053. function getExtraValue(vm, dataPathsArray) {
  25054. var context = vm;
  25055. dataPathsArray.forEach(function (dataPathArray) {
  25056. var dataPath = dataPathArray[0];
  25057. var value = dataPathArray[2];
  25058. if (dataPath || typeof value !== 'undefined') {
  25059. // ['','',index,'disable']
  25060. var propPath = dataPathArray[1];
  25061. var valuePath = dataPathArray[3];
  25062. var vFor;
  25063. if (Number.isInteger(dataPath)) {
  25064. vFor = dataPath;
  25065. } else if (!dataPath) {
  25066. vFor = context;
  25067. } else if (typeof dataPath === 'string' && dataPath) {
  25068. if (dataPath.indexOf('#s#') === 0) {
  25069. vFor = dataPath.substr(3);
  25070. } else {
  25071. vFor = vm.__get_value(dataPath, context);
  25072. }
  25073. }
  25074. if (Number.isInteger(vFor)) {
  25075. context = value;
  25076. } else if (!propPath) {
  25077. context = vFor[value];
  25078. } else {
  25079. if (Array.isArray(vFor)) {
  25080. context = vFor.find(function (vForItem) {
  25081. return vm.__get_value(propPath, vForItem) === value;
  25082. });
  25083. } else if (isPlainObject(vFor)) {
  25084. context = Object.keys(vFor).find(function (vForKey) {
  25085. return vm.__get_value(propPath, vFor[vForKey]) === value;
  25086. });
  25087. } else {
  25088. console.error('v-for 暂不支持循环数据:', vFor);
  25089. }
  25090. }
  25091. if (valuePath) {
  25092. context = vm.__get_value(valuePath, context);
  25093. }
  25094. }
  25095. });
  25096. return context;
  25097. }
  25098. function processEventExtra(vm, extra, event, __args__) {
  25099. var extraObj = {};
  25100. if (Array.isArray(extra) && extra.length) {
  25101. /**
  25102. *[
  25103. * ['data.items', 'data.id', item.data.id],
  25104. * ['metas', 'id', meta.id]
  25105. *],
  25106. *[
  25107. * ['data.items', 'data.id', item.data.id],
  25108. * ['metas', 'id', meta.id]
  25109. *],
  25110. *'test'
  25111. */
  25112. extra.forEach(function (dataPath, index) {
  25113. if (typeof dataPath === 'string') {
  25114. if (!dataPath) {
  25115. // model,prop.sync
  25116. extraObj['$' + index] = vm;
  25117. } else {
  25118. if (dataPath === '$event') {
  25119. // $event
  25120. extraObj['$' + index] = event;
  25121. } else if (dataPath === 'arguments') {
  25122. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  25123. } else if (dataPath.indexOf('$event.') === 0) {
  25124. // $event.target.value
  25125. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  25126. } else {
  25127. extraObj['$' + index] = vm.__get_value(dataPath);
  25128. }
  25129. }
  25130. } else {
  25131. extraObj['$' + index] = getExtraValue(vm, dataPath);
  25132. }
  25133. });
  25134. }
  25135. return extraObj;
  25136. }
  25137. function getObjByArray(arr) {
  25138. var obj = {};
  25139. for (var i = 1; i < arr.length; i++) {
  25140. var element = arr[i];
  25141. obj[element[0]] = element[1];
  25142. }
  25143. return obj;
  25144. }
  25145. function processEventArgs(vm, event) {
  25146. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  25147. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  25148. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  25149. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  25150. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  25151. // fixed 用户直接触发 mpInstance.triggerEvent
  25152. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  25153. if (isCustom) {
  25154. // 自定义事件
  25155. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  25156. if (!args.length) {
  25157. // 无参数,直接传入 event 或 detail 数组
  25158. if (isCustomMPEvent) {
  25159. return [event];
  25160. }
  25161. return __args__;
  25162. }
  25163. }
  25164. var extraObj = processEventExtra(vm, extra, event, __args__);
  25165. var ret = [];
  25166. args.forEach(function (arg) {
  25167. if (arg === '$event') {
  25168. if (methodName === '__set_model' && !isCustom) {
  25169. // input v-model value
  25170. ret.push(event.target.value);
  25171. } else {
  25172. if (isCustom && !isCustomMPEvent) {
  25173. ret.push(__args__[0]);
  25174. } else {
  25175. // wxcomponent 组件或内置组件
  25176. ret.push(event);
  25177. }
  25178. }
  25179. } else {
  25180. if (Array.isArray(arg) && arg[0] === 'o') {
  25181. ret.push(getObjByArray(arg));
  25182. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  25183. ret.push(extraObj[arg]);
  25184. } else {
  25185. ret.push(arg);
  25186. }
  25187. }
  25188. });
  25189. return ret;
  25190. }
  25191. var ONCE = '~';
  25192. var CUSTOM = '^';
  25193. function isMatchEventType(eventType, optType) {
  25194. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  25195. }
  25196. function getContextVm(vm) {
  25197. var $parent = vm.$parent;
  25198. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  25199. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  25200. $parent = $parent.$parent;
  25201. }
  25202. return $parent && $parent.$parent;
  25203. }
  25204. function handleEvent(event) {
  25205. var _this2 = this;
  25206. event = wrapper$1(event);
  25207. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  25208. var dataset = (event.currentTarget || event.target).dataset;
  25209. if (!dataset) {
  25210. return console.warn('事件信息不存在');
  25211. }
  25212. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  25213. if (!eventOpts) {
  25214. return console.warn('事件信息不存在');
  25215. }
  25216. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  25217. var eventType = event.type;
  25218. var ret = [];
  25219. eventOpts.forEach(function (eventOpt) {
  25220. var type = eventOpt[0];
  25221. var eventsArray = eventOpt[1];
  25222. var isCustom = type.charAt(0) === CUSTOM;
  25223. type = isCustom ? type.slice(1) : type;
  25224. var isOnce = type.charAt(0) === ONCE;
  25225. type = isOnce ? type.slice(1) : type;
  25226. if (eventsArray && isMatchEventType(eventType, type)) {
  25227. eventsArray.forEach(function (eventArray) {
  25228. var methodName = eventArray[0];
  25229. if (methodName) {
  25230. var handlerCtx = _this2.$vm;
  25231. if (handlerCtx.$options.generic) {
  25232. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  25233. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  25234. }
  25235. if (methodName === '$emit') {
  25236. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  25237. return;
  25238. }
  25239. var handler = handlerCtx[methodName];
  25240. if (!isFn(handler)) {
  25241. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  25242. var path = _this2.route || _this2.is;
  25243. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  25244. }
  25245. if (isOnce) {
  25246. if (handler.once) {
  25247. return;
  25248. }
  25249. handler.once = true;
  25250. }
  25251. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  25252. params = Array.isArray(params) ? params : [];
  25253. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  25254. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  25255. // eslint-disable-next-line no-sparse-arrays
  25256. params = params.concat([,,,,,,,,,, event]);
  25257. }
  25258. ret.push(handler.apply(handlerCtx, params));
  25259. }
  25260. });
  25261. }
  25262. });
  25263. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  25264. return ret[0];
  25265. }
  25266. }
  25267. var eventChannels = {};
  25268. var eventChannelStack = [];
  25269. function getEventChannel(id) {
  25270. if (id) {
  25271. var eventChannel = eventChannels[id];
  25272. delete eventChannels[id];
  25273. return eventChannel;
  25274. }
  25275. return eventChannelStack.shift();
  25276. }
  25277. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  25278. function initEventChannel() {
  25279. _vue.default.prototype.getOpenerEventChannel = function () {
  25280. // 微信小程序使用自身getOpenerEventChannel
  25281. {
  25282. return this.$scope.getOpenerEventChannel();
  25283. }
  25284. };
  25285. var callHook = _vue.default.prototype.__call_hook;
  25286. _vue.default.prototype.__call_hook = function (hook, args) {
  25287. if (hook === 'onLoad' && args && args.__id__) {
  25288. this.__eventChannel__ = getEventChannel(args.__id__);
  25289. delete args.__id__;
  25290. }
  25291. return callHook.call(this, hook, args);
  25292. };
  25293. }
  25294. function initScopedSlotsParams() {
  25295. var center = {};
  25296. var parents = {};
  25297. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  25298. var has = center[vueId];
  25299. if (!has) {
  25300. parents[vueId] = this;
  25301. this.$on('hook:destroyed', function () {
  25302. delete parents[vueId];
  25303. });
  25304. }
  25305. return has;
  25306. };
  25307. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  25308. var data = center[vueId];
  25309. if (data) {
  25310. var object = data[name] || {};
  25311. return key ? object[key] : object;
  25312. } else {
  25313. parents[vueId] = this;
  25314. this.$on('hook:destroyed', function () {
  25315. delete parents[vueId];
  25316. });
  25317. }
  25318. };
  25319. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  25320. var vueIds = this.$options.propsData.vueId;
  25321. if (vueIds) {
  25322. var vueId = vueIds.split(',')[0];
  25323. var object = center[vueId] = center[vueId] || {};
  25324. object[name] = value;
  25325. if (parents[vueId]) {
  25326. parents[vueId].$forceUpdate();
  25327. }
  25328. }
  25329. };
  25330. _vue.default.mixin({
  25331. destroyed: function destroyed() {
  25332. var propsData = this.$options.propsData;
  25333. var vueId = propsData && propsData.vueId;
  25334. if (vueId) {
  25335. delete center[vueId];
  25336. delete parents[vueId];
  25337. }
  25338. }
  25339. });
  25340. }
  25341. function parseBaseApp(vm, _ref4) {
  25342. var mocks = _ref4.mocks,
  25343. initRefs = _ref4.initRefs;
  25344. initEventChannel();
  25345. {
  25346. initScopedSlotsParams();
  25347. }
  25348. if (vm.$options.store) {
  25349. _vue.default.prototype.$store = vm.$options.store;
  25350. }
  25351. uniIdMixin(_vue.default);
  25352. _vue.default.prototype.mpHost = "mp-weixin";
  25353. _vue.default.mixin({
  25354. beforeCreate: function beforeCreate() {
  25355. if (!this.$options.mpType) {
  25356. return;
  25357. }
  25358. this.mpType = this.$options.mpType;
  25359. this.$mp = (0, _defineProperty2.default)({
  25360. data: {}
  25361. }, this.mpType, this.$options.mpInstance);
  25362. this.$scope = this.$options.mpInstance;
  25363. delete this.$options.mpType;
  25364. delete this.$options.mpInstance;
  25365. if (this.mpType === 'page' && typeof getApp === 'function') {
  25366. // hack vue-i18n
  25367. var app = getApp();
  25368. if (app.$vm && app.$vm.$i18n) {
  25369. this._i18n = app.$vm.$i18n;
  25370. }
  25371. }
  25372. if (this.mpType !== 'app') {
  25373. initRefs(this);
  25374. initMocks(this, mocks);
  25375. }
  25376. }
  25377. });
  25378. var appOptions = {
  25379. onLaunch: function onLaunch(args) {
  25380. if (this.$vm) {
  25381. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  25382. return;
  25383. }
  25384. {
  25385. if (wx.canIUse && !wx.canIUse('nextTick')) {
  25386. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  25387. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  25388. }
  25389. }
  25390. this.$vm = vm;
  25391. this.$vm.$mp = {
  25392. app: this
  25393. };
  25394. this.$vm.$scope = this;
  25395. // vm 上也挂载 globalData
  25396. this.$vm.globalData = this.globalData;
  25397. this.$vm._isMounted = true;
  25398. this.$vm.__call_hook('mounted', args);
  25399. this.$vm.__call_hook('onLaunch', args);
  25400. }
  25401. };
  25402. // 兼容旧版本 globalData
  25403. appOptions.globalData = vm.$options.globalData || {};
  25404. // 将 methods 中的方法挂在 getApp() 中
  25405. var methods = vm.$options.methods;
  25406. if (methods) {
  25407. Object.keys(methods).forEach(function (name) {
  25408. appOptions[name] = methods[name];
  25409. });
  25410. }
  25411. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  25412. initHooks(appOptions, hooks);
  25413. initUnknownHooks(appOptions, vm.$options);
  25414. return appOptions;
  25415. }
  25416. function parseApp(vm) {
  25417. return parseBaseApp(vm, {
  25418. mocks: mocks,
  25419. initRefs: initRefs
  25420. });
  25421. }
  25422. function createApp(vm) {
  25423. App(parseApp(vm));
  25424. return vm;
  25425. }
  25426. var encodeReserveRE = /[!'()*]/g;
  25427. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  25428. return '%' + c.charCodeAt(0).toString(16);
  25429. };
  25430. var commaRE = /%2C/g;
  25431. // fixed encodeURIComponent which is more conformant to RFC3986:
  25432. // - escapes [!'()*]
  25433. // - preserve commas
  25434. var encode = function encode(str) {
  25435. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  25436. };
  25437. function stringifyQuery(obj) {
  25438. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  25439. var res = obj ? Object.keys(obj).map(function (key) {
  25440. var val = obj[key];
  25441. if (val === undefined) {
  25442. return '';
  25443. }
  25444. if (val === null) {
  25445. return encodeStr(key);
  25446. }
  25447. if (Array.isArray(val)) {
  25448. var result = [];
  25449. val.forEach(function (val2) {
  25450. if (val2 === undefined) {
  25451. return;
  25452. }
  25453. if (val2 === null) {
  25454. result.push(encodeStr(key));
  25455. } else {
  25456. result.push(encodeStr(key) + '=' + encodeStr(val2));
  25457. }
  25458. });
  25459. return result.join('&');
  25460. }
  25461. return encodeStr(key) + '=' + encodeStr(val);
  25462. }).filter(function (x) {
  25463. return x.length > 0;
  25464. }).join('&') : null;
  25465. return res ? "?".concat(res) : '';
  25466. }
  25467. function parseBaseComponent(vueComponentOptions) {
  25468. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  25469. isPage = _ref5.isPage,
  25470. initRelation = _ref5.initRelation;
  25471. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  25472. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  25473. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  25474. VueComponent = _initVueComponent2[0],
  25475. vueOptions = _initVueComponent2[1];
  25476. var options = _objectSpread({
  25477. multipleSlots: true,
  25478. addGlobalClass: true
  25479. }, vueOptions.options || {});
  25480. {
  25481. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  25482. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  25483. Object.assign(options, vueOptions['mp-weixin'].options);
  25484. }
  25485. }
  25486. var componentOptions = {
  25487. options: options,
  25488. data: initData(vueOptions, _vue.default.prototype),
  25489. behaviors: initBehaviors(vueOptions, initBehavior),
  25490. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  25491. lifetimes: {
  25492. attached: function attached() {
  25493. var properties = this.properties;
  25494. var options = {
  25495. mpType: isPage.call(this) ? 'page' : 'component',
  25496. mpInstance: this,
  25497. propsData: properties
  25498. };
  25499. initVueIds(properties.vueId, this);
  25500. // 处理父子关系
  25501. initRelation.call(this, {
  25502. vuePid: this._$vuePid,
  25503. vueOptions: options
  25504. });
  25505. // 初始化 vue 实例
  25506. this.$vm = new VueComponent(options);
  25507. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  25508. initSlots(this.$vm, properties.vueSlots);
  25509. // 触发首次 setData
  25510. this.$vm.$mount();
  25511. },
  25512. ready: function ready() {
  25513. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  25514. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  25515. if (this.$vm) {
  25516. this.$vm._isMounted = true;
  25517. this.$vm.__call_hook('mounted');
  25518. this.$vm.__call_hook('onReady');
  25519. }
  25520. },
  25521. detached: function detached() {
  25522. this.$vm && this.$vm.$destroy();
  25523. }
  25524. },
  25525. pageLifetimes: {
  25526. show: function show(args) {
  25527. this.$vm && this.$vm.__call_hook('onPageShow', args);
  25528. },
  25529. hide: function hide() {
  25530. this.$vm && this.$vm.__call_hook('onPageHide');
  25531. },
  25532. resize: function resize(size) {
  25533. this.$vm && this.$vm.__call_hook('onPageResize', size);
  25534. }
  25535. },
  25536. methods: {
  25537. __l: handleLink,
  25538. __e: handleEvent
  25539. }
  25540. };
  25541. // externalClasses
  25542. if (vueOptions.externalClasses) {
  25543. componentOptions.externalClasses = vueOptions.externalClasses;
  25544. }
  25545. if (Array.isArray(vueOptions.wxsCallMethods)) {
  25546. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  25547. componentOptions.methods[callMethod] = function (args) {
  25548. return this.$vm[callMethod](args);
  25549. };
  25550. });
  25551. }
  25552. if (needVueOptions) {
  25553. return [componentOptions, vueOptions, VueComponent];
  25554. }
  25555. if (isPage) {
  25556. return componentOptions;
  25557. }
  25558. return [componentOptions, VueComponent];
  25559. }
  25560. function parseComponent(vueComponentOptions, needVueOptions) {
  25561. return parseBaseComponent(vueComponentOptions, {
  25562. isPage: isPage,
  25563. initRelation: initRelation
  25564. }, needVueOptions);
  25565. }
  25566. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  25567. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  25568. function parseBasePage(vuePageOptions) {
  25569. var _parseComponent = parseComponent(vuePageOptions, true),
  25570. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  25571. pageOptions = _parseComponent2[0],
  25572. vueOptions = _parseComponent2[1];
  25573. initHooks(pageOptions.methods, hooks$1, vueOptions);
  25574. pageOptions.methods.onLoad = function (query) {
  25575. this.options = query;
  25576. var copyQuery = Object.assign({}, query);
  25577. delete copyQuery.__id__;
  25578. this.$page = {
  25579. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  25580. };
  25581. this.$vm.$mp.query = query; // 兼容 mpvue
  25582. this.$vm.__call_hook('onLoad', query);
  25583. };
  25584. {
  25585. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  25586. }
  25587. {
  25588. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  25589. }
  25590. return pageOptions;
  25591. }
  25592. function parsePage(vuePageOptions) {
  25593. return parseBasePage(vuePageOptions);
  25594. }
  25595. function createPage(vuePageOptions) {
  25596. {
  25597. return Component(parsePage(vuePageOptions));
  25598. }
  25599. }
  25600. function createComponent(vueOptions) {
  25601. {
  25602. return Component(parseComponent(vueOptions));
  25603. }
  25604. }
  25605. function createSubpackageApp(vm) {
  25606. var appOptions = parseApp(vm);
  25607. var app = getApp({
  25608. allowDefault: true
  25609. });
  25610. vm.$scope = app;
  25611. var globalData = app.globalData;
  25612. if (globalData) {
  25613. Object.keys(appOptions.globalData).forEach(function (name) {
  25614. if (!hasOwn(globalData, name)) {
  25615. globalData[name] = appOptions.globalData[name];
  25616. }
  25617. });
  25618. }
  25619. Object.keys(appOptions).forEach(function (name) {
  25620. if (!hasOwn(app, name)) {
  25621. app[name] = appOptions[name];
  25622. }
  25623. });
  25624. if (isFn(appOptions.onShow) && wx.onAppShow) {
  25625. wx.onAppShow(function () {
  25626. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  25627. args[_key5] = arguments[_key5];
  25628. }
  25629. vm.__call_hook('onShow', args);
  25630. });
  25631. }
  25632. if (isFn(appOptions.onHide) && wx.onAppHide) {
  25633. wx.onAppHide(function () {
  25634. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  25635. args[_key6] = arguments[_key6];
  25636. }
  25637. vm.__call_hook('onHide', args);
  25638. });
  25639. }
  25640. if (isFn(appOptions.onLaunch)) {
  25641. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  25642. vm.__call_hook('onLaunch', args);
  25643. }
  25644. return vm;
  25645. }
  25646. function createPlugin(vm) {
  25647. var appOptions = parseApp(vm);
  25648. if (isFn(appOptions.onShow) && wx.onAppShow) {
  25649. wx.onAppShow(function () {
  25650. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  25651. args[_key7] = arguments[_key7];
  25652. }
  25653. vm.__call_hook('onShow', args);
  25654. });
  25655. }
  25656. if (isFn(appOptions.onHide) && wx.onAppHide) {
  25657. wx.onAppHide(function () {
  25658. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  25659. args[_key8] = arguments[_key8];
  25660. }
  25661. vm.__call_hook('onHide', args);
  25662. });
  25663. }
  25664. if (isFn(appOptions.onLaunch)) {
  25665. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  25666. vm.__call_hook('onLaunch', args);
  25667. }
  25668. return vm;
  25669. }
  25670. todos.forEach(function (todoApi) {
  25671. protocols[todoApi] = false;
  25672. });
  25673. canIUses.forEach(function (canIUseApi) {
  25674. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  25675. if (!wx.canIUse(apiName)) {
  25676. protocols[canIUseApi] = false;
  25677. }
  25678. });
  25679. var uni = {};
  25680. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  25681. uni = new Proxy({}, {
  25682. get: function get(target, name) {
  25683. if (hasOwn(target, name)) {
  25684. return target[name];
  25685. }
  25686. if (baseApi[name]) {
  25687. return baseApi[name];
  25688. }
  25689. if (api[name]) {
  25690. return promisify(name, api[name]);
  25691. }
  25692. {
  25693. if (extraApi[name]) {
  25694. return promisify(name, extraApi[name]);
  25695. }
  25696. if (todoApis[name]) {
  25697. return promisify(name, todoApis[name]);
  25698. }
  25699. }
  25700. if (eventApi[name]) {
  25701. return eventApi[name];
  25702. }
  25703. return promisify(name, wrapper(name, wx[name]));
  25704. },
  25705. set: function set(target, name, value) {
  25706. target[name] = value;
  25707. return true;
  25708. }
  25709. });
  25710. } else {
  25711. Object.keys(baseApi).forEach(function (name) {
  25712. uni[name] = baseApi[name];
  25713. });
  25714. {
  25715. Object.keys(todoApis).forEach(function (name) {
  25716. uni[name] = promisify(name, todoApis[name]);
  25717. });
  25718. Object.keys(extraApi).forEach(function (name) {
  25719. uni[name] = promisify(name, todoApis[name]);
  25720. });
  25721. }
  25722. Object.keys(eventApi).forEach(function (name) {
  25723. uni[name] = eventApi[name];
  25724. });
  25725. Object.keys(api).forEach(function (name) {
  25726. uni[name] = promisify(name, api[name]);
  25727. });
  25728. Object.keys(wx).forEach(function (name) {
  25729. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  25730. uni[name] = promisify(name, wrapper(name, wx[name]));
  25731. }
  25732. });
  25733. }
  25734. wx.createApp = createApp;
  25735. wx.createPage = createPage;
  25736. wx.createComponent = createComponent;
  25737. wx.createSubpackageApp = createSubpackageApp;
  25738. wx.createPlugin = createPlugin;
  25739. var uni$1 = uni;
  25740. var _default = uni$1;
  25741. exports.default = _default;
  25742. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  25743. /***/ }),
  25744. /***/ 20:
  25745. /*!****************************************************************!*\
  25746. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  25747. \****************************************************************/
  25748. /*! no static exports found */
  25749. /***/ (function(module, exports) {
  25750. function _iterableToArray(iter) {
  25751. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  25752. }
  25753. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  25754. /***/ }),
  25755. /***/ 200:
  25756. /*!**************************************************!*\
  25757. !*** ./node_modules/hash.js/lib/hash/sha/384.js ***!
  25758. \**************************************************/
  25759. /*! no static exports found */
  25760. /***/ (function(module, exports, __webpack_require__) {
  25761. "use strict";
  25762. var utils = __webpack_require__(/*! ../utils */ 193);
  25763. var SHA512 = __webpack_require__(/*! ./512 */ 201);
  25764. function SHA384() {
  25765. if (!(this instanceof SHA384))
  25766. return new SHA384();
  25767. SHA512.call(this);
  25768. this.h = [
  25769. 0xcbbb9d5d, 0xc1059ed8,
  25770. 0x629a292a, 0x367cd507,
  25771. 0x9159015a, 0x3070dd17,
  25772. 0x152fecd8, 0xf70e5939,
  25773. 0x67332667, 0xffc00b31,
  25774. 0x8eb44a87, 0x68581511,
  25775. 0xdb0c2e0d, 0x64f98fa7,
  25776. 0x47b5481d, 0xbefa4fa4 ];
  25777. }
  25778. utils.inherits(SHA384, SHA512);
  25779. module.exports = SHA384;
  25780. SHA384.blockSize = 1024;
  25781. SHA384.outSize = 384;
  25782. SHA384.hmacStrength = 192;
  25783. SHA384.padLength = 128;
  25784. SHA384.prototype._digest = function digest(enc) {
  25785. if (enc === 'hex')
  25786. return utils.toHex32(this.h.slice(0, 12), 'big');
  25787. else
  25788. return utils.split32(this.h.slice(0, 12), 'big');
  25789. };
  25790. /***/ }),
  25791. /***/ 201:
  25792. /*!**************************************************!*\
  25793. !*** ./node_modules/hash.js/lib/hash/sha/512.js ***!
  25794. \**************************************************/
  25795. /*! no static exports found */
  25796. /***/ (function(module, exports, __webpack_require__) {
  25797. "use strict";
  25798. var utils = __webpack_require__(/*! ../utils */ 193);
  25799. var common = __webpack_require__(/*! ../common */ 194);
  25800. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  25801. var rotr64_hi = utils.rotr64_hi;
  25802. var rotr64_lo = utils.rotr64_lo;
  25803. var shr64_hi = utils.shr64_hi;
  25804. var shr64_lo = utils.shr64_lo;
  25805. var sum64 = utils.sum64;
  25806. var sum64_hi = utils.sum64_hi;
  25807. var sum64_lo = utils.sum64_lo;
  25808. var sum64_4_hi = utils.sum64_4_hi;
  25809. var sum64_4_lo = utils.sum64_4_lo;
  25810. var sum64_5_hi = utils.sum64_5_hi;
  25811. var sum64_5_lo = utils.sum64_5_lo;
  25812. var BlockHash = common.BlockHash;
  25813. var sha512_K = [
  25814. 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
  25815. 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
  25816. 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
  25817. 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
  25818. 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
  25819. 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
  25820. 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
  25821. 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
  25822. 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
  25823. 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
  25824. 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
  25825. 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
  25826. 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
  25827. 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
  25828. 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
  25829. 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
  25830. 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
  25831. 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
  25832. 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
  25833. 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
  25834. 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
  25835. 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
  25836. 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
  25837. 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
  25838. 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
  25839. 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
  25840. 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
  25841. 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
  25842. 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
  25843. 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
  25844. 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
  25845. 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
  25846. 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
  25847. 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
  25848. 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
  25849. 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
  25850. 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
  25851. 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
  25852. 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
  25853. 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
  25854. ];
  25855. function SHA512() {
  25856. if (!(this instanceof SHA512))
  25857. return new SHA512();
  25858. BlockHash.call(this);
  25859. this.h = [
  25860. 0x6a09e667, 0xf3bcc908,
  25861. 0xbb67ae85, 0x84caa73b,
  25862. 0x3c6ef372, 0xfe94f82b,
  25863. 0xa54ff53a, 0x5f1d36f1,
  25864. 0x510e527f, 0xade682d1,
  25865. 0x9b05688c, 0x2b3e6c1f,
  25866. 0x1f83d9ab, 0xfb41bd6b,
  25867. 0x5be0cd19, 0x137e2179 ];
  25868. this.k = sha512_K;
  25869. this.W = new Array(160);
  25870. }
  25871. utils.inherits(SHA512, BlockHash);
  25872. module.exports = SHA512;
  25873. SHA512.blockSize = 1024;
  25874. SHA512.outSize = 512;
  25875. SHA512.hmacStrength = 192;
  25876. SHA512.padLength = 128;
  25877. SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
  25878. var W = this.W;
  25879. // 32 x 32bit words
  25880. for (var i = 0; i < 32; i++)
  25881. W[i] = msg[start + i];
  25882. for (; i < W.length; i += 2) {
  25883. var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2
  25884. var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
  25885. var c1_hi = W[i - 14]; // i - 7
  25886. var c1_lo = W[i - 13];
  25887. var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15
  25888. var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
  25889. var c3_hi = W[i - 32]; // i - 16
  25890. var c3_lo = W[i - 31];
  25891. W[i] = sum64_4_hi(
  25892. c0_hi, c0_lo,
  25893. c1_hi, c1_lo,
  25894. c2_hi, c2_lo,
  25895. c3_hi, c3_lo);
  25896. W[i + 1] = sum64_4_lo(
  25897. c0_hi, c0_lo,
  25898. c1_hi, c1_lo,
  25899. c2_hi, c2_lo,
  25900. c3_hi, c3_lo);
  25901. }
  25902. };
  25903. SHA512.prototype._update = function _update(msg, start) {
  25904. this._prepareBlock(msg, start);
  25905. var W = this.W;
  25906. var ah = this.h[0];
  25907. var al = this.h[1];
  25908. var bh = this.h[2];
  25909. var bl = this.h[3];
  25910. var ch = this.h[4];
  25911. var cl = this.h[5];
  25912. var dh = this.h[6];
  25913. var dl = this.h[7];
  25914. var eh = this.h[8];
  25915. var el = this.h[9];
  25916. var fh = this.h[10];
  25917. var fl = this.h[11];
  25918. var gh = this.h[12];
  25919. var gl = this.h[13];
  25920. var hh = this.h[14];
  25921. var hl = this.h[15];
  25922. assert(this.k.length === W.length);
  25923. for (var i = 0; i < W.length; i += 2) {
  25924. var c0_hi = hh;
  25925. var c0_lo = hl;
  25926. var c1_hi = s1_512_hi(eh, el);
  25927. var c1_lo = s1_512_lo(eh, el);
  25928. var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
  25929. var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
  25930. var c3_hi = this.k[i];
  25931. var c3_lo = this.k[i + 1];
  25932. var c4_hi = W[i];
  25933. var c4_lo = W[i + 1];
  25934. var T1_hi = sum64_5_hi(
  25935. c0_hi, c0_lo,
  25936. c1_hi, c1_lo,
  25937. c2_hi, c2_lo,
  25938. c3_hi, c3_lo,
  25939. c4_hi, c4_lo);
  25940. var T1_lo = sum64_5_lo(
  25941. c0_hi, c0_lo,
  25942. c1_hi, c1_lo,
  25943. c2_hi, c2_lo,
  25944. c3_hi, c3_lo,
  25945. c4_hi, c4_lo);
  25946. c0_hi = s0_512_hi(ah, al);
  25947. c0_lo = s0_512_lo(ah, al);
  25948. c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
  25949. c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
  25950. var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
  25951. var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
  25952. hh = gh;
  25953. hl = gl;
  25954. gh = fh;
  25955. gl = fl;
  25956. fh = eh;
  25957. fl = el;
  25958. eh = sum64_hi(dh, dl, T1_hi, T1_lo);
  25959. el = sum64_lo(dl, dl, T1_hi, T1_lo);
  25960. dh = ch;
  25961. dl = cl;
  25962. ch = bh;
  25963. cl = bl;
  25964. bh = ah;
  25965. bl = al;
  25966. ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
  25967. al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
  25968. }
  25969. sum64(this.h, 0, ah, al);
  25970. sum64(this.h, 2, bh, bl);
  25971. sum64(this.h, 4, ch, cl);
  25972. sum64(this.h, 6, dh, dl);
  25973. sum64(this.h, 8, eh, el);
  25974. sum64(this.h, 10, fh, fl);
  25975. sum64(this.h, 12, gh, gl);
  25976. sum64(this.h, 14, hh, hl);
  25977. };
  25978. SHA512.prototype._digest = function digest(enc) {
  25979. if (enc === 'hex')
  25980. return utils.toHex32(this.h, 'big');
  25981. else
  25982. return utils.split32(this.h, 'big');
  25983. };
  25984. function ch64_hi(xh, xl, yh, yl, zh) {
  25985. var r = (xh & yh) ^ ((~xh) & zh);
  25986. if (r < 0)
  25987. r += 0x100000000;
  25988. return r;
  25989. }
  25990. function ch64_lo(xh, xl, yh, yl, zh, zl) {
  25991. var r = (xl & yl) ^ ((~xl) & zl);
  25992. if (r < 0)
  25993. r += 0x100000000;
  25994. return r;
  25995. }
  25996. function maj64_hi(xh, xl, yh, yl, zh) {
  25997. var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);
  25998. if (r < 0)
  25999. r += 0x100000000;
  26000. return r;
  26001. }
  26002. function maj64_lo(xh, xl, yh, yl, zh, zl) {
  26003. var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);
  26004. if (r < 0)
  26005. r += 0x100000000;
  26006. return r;
  26007. }
  26008. function s0_512_hi(xh, xl) {
  26009. var c0_hi = rotr64_hi(xh, xl, 28);
  26010. var c1_hi = rotr64_hi(xl, xh, 2); // 34
  26011. var c2_hi = rotr64_hi(xl, xh, 7); // 39
  26012. var r = c0_hi ^ c1_hi ^ c2_hi;
  26013. if (r < 0)
  26014. r += 0x100000000;
  26015. return r;
  26016. }
  26017. function s0_512_lo(xh, xl) {
  26018. var c0_lo = rotr64_lo(xh, xl, 28);
  26019. var c1_lo = rotr64_lo(xl, xh, 2); // 34
  26020. var c2_lo = rotr64_lo(xl, xh, 7); // 39
  26021. var r = c0_lo ^ c1_lo ^ c2_lo;
  26022. if (r < 0)
  26023. r += 0x100000000;
  26024. return r;
  26025. }
  26026. function s1_512_hi(xh, xl) {
  26027. var c0_hi = rotr64_hi(xh, xl, 14);
  26028. var c1_hi = rotr64_hi(xh, xl, 18);
  26029. var c2_hi = rotr64_hi(xl, xh, 9); // 41
  26030. var r = c0_hi ^ c1_hi ^ c2_hi;
  26031. if (r < 0)
  26032. r += 0x100000000;
  26033. return r;
  26034. }
  26035. function s1_512_lo(xh, xl) {
  26036. var c0_lo = rotr64_lo(xh, xl, 14);
  26037. var c1_lo = rotr64_lo(xh, xl, 18);
  26038. var c2_lo = rotr64_lo(xl, xh, 9); // 41
  26039. var r = c0_lo ^ c1_lo ^ c2_lo;
  26040. if (r < 0)
  26041. r += 0x100000000;
  26042. return r;
  26043. }
  26044. function g0_512_hi(xh, xl) {
  26045. var c0_hi = rotr64_hi(xh, xl, 1);
  26046. var c1_hi = rotr64_hi(xh, xl, 8);
  26047. var c2_hi = shr64_hi(xh, xl, 7);
  26048. var r = c0_hi ^ c1_hi ^ c2_hi;
  26049. if (r < 0)
  26050. r += 0x100000000;
  26051. return r;
  26052. }
  26053. function g0_512_lo(xh, xl) {
  26054. var c0_lo = rotr64_lo(xh, xl, 1);
  26055. var c1_lo = rotr64_lo(xh, xl, 8);
  26056. var c2_lo = shr64_lo(xh, xl, 7);
  26057. var r = c0_lo ^ c1_lo ^ c2_lo;
  26058. if (r < 0)
  26059. r += 0x100000000;
  26060. return r;
  26061. }
  26062. function g1_512_hi(xh, xl) {
  26063. var c0_hi = rotr64_hi(xh, xl, 19);
  26064. var c1_hi = rotr64_hi(xl, xh, 29); // 61
  26065. var c2_hi = shr64_hi(xh, xl, 6);
  26066. var r = c0_hi ^ c1_hi ^ c2_hi;
  26067. if (r < 0)
  26068. r += 0x100000000;
  26069. return r;
  26070. }
  26071. function g1_512_lo(xh, xl) {
  26072. var c0_lo = rotr64_lo(xh, xl, 19);
  26073. var c1_lo = rotr64_lo(xl, xh, 29); // 61
  26074. var c2_lo = shr64_lo(xh, xl, 6);
  26075. var r = c0_lo ^ c1_lo ^ c2_lo;
  26076. if (r < 0)
  26077. r += 0x100000000;
  26078. return r;
  26079. }
  26080. /***/ }),
  26081. /***/ 202:
  26082. /*!*************************************************!*\
  26083. !*** ./node_modules/hash.js/lib/hash/ripemd.js ***!
  26084. \*************************************************/
  26085. /*! no static exports found */
  26086. /***/ (function(module, exports, __webpack_require__) {
  26087. "use strict";
  26088. var utils = __webpack_require__(/*! ./utils */ 193);
  26089. var common = __webpack_require__(/*! ./common */ 194);
  26090. var rotl32 = utils.rotl32;
  26091. var sum32 = utils.sum32;
  26092. var sum32_3 = utils.sum32_3;
  26093. var sum32_4 = utils.sum32_4;
  26094. var BlockHash = common.BlockHash;
  26095. function RIPEMD160() {
  26096. if (!(this instanceof RIPEMD160))
  26097. return new RIPEMD160();
  26098. BlockHash.call(this);
  26099. this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
  26100. this.endian = 'little';
  26101. }
  26102. utils.inherits(RIPEMD160, BlockHash);
  26103. exports.ripemd160 = RIPEMD160;
  26104. RIPEMD160.blockSize = 512;
  26105. RIPEMD160.outSize = 160;
  26106. RIPEMD160.hmacStrength = 192;
  26107. RIPEMD160.padLength = 64;
  26108. RIPEMD160.prototype._update = function update(msg, start) {
  26109. var A = this.h[0];
  26110. var B = this.h[1];
  26111. var C = this.h[2];
  26112. var D = this.h[3];
  26113. var E = this.h[4];
  26114. var Ah = A;
  26115. var Bh = B;
  26116. var Ch = C;
  26117. var Dh = D;
  26118. var Eh = E;
  26119. for (var j = 0; j < 80; j++) {
  26120. var T = sum32(
  26121. rotl32(
  26122. sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
  26123. s[j]),
  26124. E);
  26125. A = E;
  26126. E = D;
  26127. D = rotl32(C, 10);
  26128. C = B;
  26129. B = T;
  26130. T = sum32(
  26131. rotl32(
  26132. sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
  26133. sh[j]),
  26134. Eh);
  26135. Ah = Eh;
  26136. Eh = Dh;
  26137. Dh = rotl32(Ch, 10);
  26138. Ch = Bh;
  26139. Bh = T;
  26140. }
  26141. T = sum32_3(this.h[1], C, Dh);
  26142. this.h[1] = sum32_3(this.h[2], D, Eh);
  26143. this.h[2] = sum32_3(this.h[3], E, Ah);
  26144. this.h[3] = sum32_3(this.h[4], A, Bh);
  26145. this.h[4] = sum32_3(this.h[0], B, Ch);
  26146. this.h[0] = T;
  26147. };
  26148. RIPEMD160.prototype._digest = function digest(enc) {
  26149. if (enc === 'hex')
  26150. return utils.toHex32(this.h, 'little');
  26151. else
  26152. return utils.split32(this.h, 'little');
  26153. };
  26154. function f(j, x, y, z) {
  26155. if (j <= 15)
  26156. return x ^ y ^ z;
  26157. else if (j <= 31)
  26158. return (x & y) | ((~x) & z);
  26159. else if (j <= 47)
  26160. return (x | (~y)) ^ z;
  26161. else if (j <= 63)
  26162. return (x & z) | (y & (~z));
  26163. else
  26164. return x ^ (y | (~z));
  26165. }
  26166. function K(j) {
  26167. if (j <= 15)
  26168. return 0x00000000;
  26169. else if (j <= 31)
  26170. return 0x5a827999;
  26171. else if (j <= 47)
  26172. return 0x6ed9eba1;
  26173. else if (j <= 63)
  26174. return 0x8f1bbcdc;
  26175. else
  26176. return 0xa953fd4e;
  26177. }
  26178. function Kh(j) {
  26179. if (j <= 15)
  26180. return 0x50a28be6;
  26181. else if (j <= 31)
  26182. return 0x5c4dd124;
  26183. else if (j <= 47)
  26184. return 0x6d703ef3;
  26185. else if (j <= 63)
  26186. return 0x7a6d76e9;
  26187. else
  26188. return 0x00000000;
  26189. }
  26190. var r = [
  26191. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  26192. 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
  26193. 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
  26194. 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
  26195. 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
  26196. ];
  26197. var rh = [
  26198. 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
  26199. 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
  26200. 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
  26201. 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
  26202. 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
  26203. ];
  26204. var s = [
  26205. 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
  26206. 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
  26207. 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
  26208. 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
  26209. 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
  26210. ];
  26211. var sh = [
  26212. 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
  26213. 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
  26214. 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
  26215. 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
  26216. 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
  26217. ];
  26218. /***/ }),
  26219. /***/ 203:
  26220. /*!***********************************************!*\
  26221. !*** ./node_modules/hash.js/lib/hash/hmac.js ***!
  26222. \***********************************************/
  26223. /*! no static exports found */
  26224. /***/ (function(module, exports, __webpack_require__) {
  26225. "use strict";
  26226. var utils = __webpack_require__(/*! ./utils */ 193);
  26227. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  26228. function Hmac(hash, key, enc) {
  26229. if (!(this instanceof Hmac))
  26230. return new Hmac(hash, key, enc);
  26231. this.Hash = hash;
  26232. this.blockSize = hash.blockSize / 8;
  26233. this.outSize = hash.outSize / 8;
  26234. this.inner = null;
  26235. this.outer = null;
  26236. this._init(utils.toArray(key, enc));
  26237. }
  26238. module.exports = Hmac;
  26239. Hmac.prototype._init = function init(key) {
  26240. // Shorten key, if needed
  26241. if (key.length > this.blockSize)
  26242. key = new this.Hash().update(key).digest();
  26243. assert(key.length <= this.blockSize);
  26244. // Add padding to key
  26245. for (var i = key.length; i < this.blockSize; i++)
  26246. key.push(0);
  26247. for (i = 0; i < key.length; i++)
  26248. key[i] ^= 0x36;
  26249. this.inner = new this.Hash().update(key);
  26250. // 0x36 ^ 0x5c = 0x6a
  26251. for (i = 0; i < key.length; i++)
  26252. key[i] ^= 0x6a;
  26253. this.outer = new this.Hash().update(key);
  26254. };
  26255. Hmac.prototype.update = function update(msg, enc) {
  26256. this.inner.update(msg, enc);
  26257. return this;
  26258. };
  26259. Hmac.prototype.digest = function digest(enc) {
  26260. this.outer.update(this.inner.digest());
  26261. return this.outer.digest(enc);
  26262. };
  26263. /***/ }),
  26264. /***/ 204:
  26265. /*!*********************************************************************!*\
  26266. !*** ./node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js ***!
  26267. \*********************************************************************/
  26268. /*! no static exports found */
  26269. /***/ (function(module, exports) {
  26270. module.exports = {
  26271. doubles: {
  26272. step: 4,
  26273. points: [
  26274. [
  26275. 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',
  26276. 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',
  26277. ],
  26278. [
  26279. '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',
  26280. '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',
  26281. ],
  26282. [
  26283. '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',
  26284. 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',
  26285. ],
  26286. [
  26287. '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',
  26288. '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',
  26289. ],
  26290. [
  26291. '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',
  26292. '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',
  26293. ],
  26294. [
  26295. '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',
  26296. '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',
  26297. ],
  26298. [
  26299. 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',
  26300. '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',
  26301. ],
  26302. [
  26303. '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',
  26304. 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',
  26305. ],
  26306. [
  26307. 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',
  26308. '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',
  26309. ],
  26310. [
  26311. 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',
  26312. 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',
  26313. ],
  26314. [
  26315. 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',
  26316. '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',
  26317. ],
  26318. [
  26319. '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',
  26320. '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',
  26321. ],
  26322. [
  26323. '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',
  26324. '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',
  26325. ],
  26326. [
  26327. '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',
  26328. '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',
  26329. ],
  26330. [
  26331. '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',
  26332. '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',
  26333. ],
  26334. [
  26335. '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',
  26336. '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',
  26337. ],
  26338. [
  26339. '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',
  26340. '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',
  26341. ],
  26342. [
  26343. '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',
  26344. '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',
  26345. ],
  26346. [
  26347. '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',
  26348. 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',
  26349. ],
  26350. [
  26351. 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',
  26352. '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',
  26353. ],
  26354. [
  26355. 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',
  26356. '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',
  26357. ],
  26358. [
  26359. '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',
  26360. '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',
  26361. ],
  26362. [
  26363. '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',
  26364. '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',
  26365. ],
  26366. [
  26367. 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',
  26368. '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',
  26369. ],
  26370. [
  26371. '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',
  26372. 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',
  26373. ],
  26374. [
  26375. 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',
  26376. '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',
  26377. ],
  26378. [
  26379. 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',
  26380. 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',
  26381. ],
  26382. [
  26383. 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',
  26384. '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',
  26385. ],
  26386. [
  26387. 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',
  26388. 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',
  26389. ],
  26390. [
  26391. 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',
  26392. '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',
  26393. ],
  26394. [
  26395. '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',
  26396. 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',
  26397. ],
  26398. [
  26399. '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',
  26400. '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',
  26401. ],
  26402. [
  26403. 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',
  26404. '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',
  26405. ],
  26406. [
  26407. '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',
  26408. 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',
  26409. ],
  26410. [
  26411. 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',
  26412. '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',
  26413. ],
  26414. [
  26415. 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',
  26416. '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',
  26417. ],
  26418. [
  26419. 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',
  26420. 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',
  26421. ],
  26422. [
  26423. '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',
  26424. '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',
  26425. ],
  26426. [
  26427. '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',
  26428. '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',
  26429. ],
  26430. [
  26431. '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',
  26432. 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',
  26433. ],
  26434. [
  26435. '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',
  26436. '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',
  26437. ],
  26438. [
  26439. 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',
  26440. '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',
  26441. ],
  26442. [
  26443. '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',
  26444. '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',
  26445. ],
  26446. [
  26447. '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',
  26448. 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',
  26449. ],
  26450. [
  26451. '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',
  26452. '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',
  26453. ],
  26454. [
  26455. 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',
  26456. '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',
  26457. ],
  26458. [
  26459. '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',
  26460. 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',
  26461. ],
  26462. [
  26463. 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',
  26464. 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',
  26465. ],
  26466. [
  26467. 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',
  26468. '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',
  26469. ],
  26470. [
  26471. '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',
  26472. 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',
  26473. ],
  26474. [
  26475. '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',
  26476. 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',
  26477. ],
  26478. [
  26479. 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',
  26480. '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',
  26481. ],
  26482. [
  26483. 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',
  26484. '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',
  26485. ],
  26486. [
  26487. 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',
  26488. '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',
  26489. ],
  26490. [
  26491. '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',
  26492. 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',
  26493. ],
  26494. [
  26495. '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',
  26496. '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',
  26497. ],
  26498. [
  26499. 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',
  26500. 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',
  26501. ],
  26502. [
  26503. '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',
  26504. 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',
  26505. ],
  26506. [
  26507. '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',
  26508. '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',
  26509. ],
  26510. [
  26511. '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',
  26512. '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',
  26513. ],
  26514. [
  26515. 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',
  26516. 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',
  26517. ],
  26518. [
  26519. '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',
  26520. '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',
  26521. ],
  26522. [
  26523. '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',
  26524. '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',
  26525. ],
  26526. [
  26527. 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',
  26528. '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',
  26529. ],
  26530. [
  26531. 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',
  26532. 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',
  26533. ],
  26534. ],
  26535. },
  26536. naf: {
  26537. wnd: 7,
  26538. points: [
  26539. [
  26540. 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',
  26541. '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',
  26542. ],
  26543. [
  26544. '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',
  26545. 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',
  26546. ],
  26547. [
  26548. '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',
  26549. '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',
  26550. ],
  26551. [
  26552. 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',
  26553. 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',
  26554. ],
  26555. [
  26556. '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',
  26557. 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',
  26558. ],
  26559. [
  26560. 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',
  26561. 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',
  26562. ],
  26563. [
  26564. 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',
  26565. '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',
  26566. ],
  26567. [
  26568. 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',
  26569. '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',
  26570. ],
  26571. [
  26572. '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',
  26573. '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',
  26574. ],
  26575. [
  26576. '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',
  26577. '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',
  26578. ],
  26579. [
  26580. '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',
  26581. '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',
  26582. ],
  26583. [
  26584. '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',
  26585. '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',
  26586. ],
  26587. [
  26588. 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',
  26589. 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',
  26590. ],
  26591. [
  26592. 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',
  26593. '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',
  26594. ],
  26595. [
  26596. '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',
  26597. 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',
  26598. ],
  26599. [
  26600. '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',
  26601. 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',
  26602. ],
  26603. [
  26604. '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',
  26605. '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',
  26606. ],
  26607. [
  26608. '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',
  26609. '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',
  26610. ],
  26611. [
  26612. '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',
  26613. '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',
  26614. ],
  26615. [
  26616. '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',
  26617. 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',
  26618. ],
  26619. [
  26620. 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',
  26621. 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',
  26622. ],
  26623. [
  26624. '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',
  26625. '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',
  26626. ],
  26627. [
  26628. '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',
  26629. '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',
  26630. ],
  26631. [
  26632. 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',
  26633. 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',
  26634. ],
  26635. [
  26636. '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',
  26637. '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',
  26638. ],
  26639. [
  26640. 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',
  26641. 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',
  26642. ],
  26643. [
  26644. 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',
  26645. 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',
  26646. ],
  26647. [
  26648. '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',
  26649. '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',
  26650. ],
  26651. [
  26652. '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',
  26653. '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',
  26654. ],
  26655. [
  26656. '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',
  26657. '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',
  26658. ],
  26659. [
  26660. 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',
  26661. '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',
  26662. ],
  26663. [
  26664. '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',
  26665. '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',
  26666. ],
  26667. [
  26668. 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',
  26669. '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',
  26670. ],
  26671. [
  26672. '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',
  26673. 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',
  26674. ],
  26675. [
  26676. '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',
  26677. 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',
  26678. ],
  26679. [
  26680. 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',
  26681. 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',
  26682. ],
  26683. [
  26684. '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',
  26685. '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',
  26686. ],
  26687. [
  26688. '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',
  26689. 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',
  26690. ],
  26691. [
  26692. 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',
  26693. 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',
  26694. ],
  26695. [
  26696. '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',
  26697. '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',
  26698. ],
  26699. [
  26700. '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',
  26701. 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',
  26702. ],
  26703. [
  26704. '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',
  26705. '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',
  26706. ],
  26707. [
  26708. '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',
  26709. 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',
  26710. ],
  26711. [
  26712. 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',
  26713. '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',
  26714. ],
  26715. [
  26716. '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',
  26717. '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',
  26718. ],
  26719. [
  26720. '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',
  26721. 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',
  26722. ],
  26723. [
  26724. '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',
  26725. 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',
  26726. ],
  26727. [
  26728. 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',
  26729. 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',
  26730. ],
  26731. [
  26732. 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',
  26733. 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',
  26734. ],
  26735. [
  26736. '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',
  26737. '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',
  26738. ],
  26739. [
  26740. '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',
  26741. '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',
  26742. ],
  26743. [
  26744. 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',
  26745. '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',
  26746. ],
  26747. [
  26748. 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',
  26749. 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',
  26750. ],
  26751. [
  26752. '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',
  26753. '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',
  26754. ],
  26755. [
  26756. '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',
  26757. '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',
  26758. ],
  26759. [
  26760. 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',
  26761. '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',
  26762. ],
  26763. [
  26764. '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',
  26765. '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',
  26766. ],
  26767. [
  26768. 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',
  26769. 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',
  26770. ],
  26771. [
  26772. '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',
  26773. 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',
  26774. ],
  26775. [
  26776. '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',
  26777. '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',
  26778. ],
  26779. [
  26780. 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',
  26781. '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',
  26782. ],
  26783. [
  26784. 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',
  26785. '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',
  26786. ],
  26787. [
  26788. '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',
  26789. '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',
  26790. ],
  26791. [
  26792. '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',
  26793. '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',
  26794. ],
  26795. [
  26796. '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',
  26797. 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',
  26798. ],
  26799. [
  26800. '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',
  26801. 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',
  26802. ],
  26803. [
  26804. '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',
  26805. '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',
  26806. ],
  26807. [
  26808. '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',
  26809. '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',
  26810. ],
  26811. [
  26812. '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',
  26813. '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',
  26814. ],
  26815. [
  26816. '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',
  26817. 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',
  26818. ],
  26819. [
  26820. 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',
  26821. 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',
  26822. ],
  26823. [
  26824. '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',
  26825. 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',
  26826. ],
  26827. [
  26828. 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',
  26829. '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',
  26830. ],
  26831. [
  26832. 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',
  26833. '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',
  26834. ],
  26835. [
  26836. 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',
  26837. '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',
  26838. ],
  26839. [
  26840. 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',
  26841. '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',
  26842. ],
  26843. [
  26844. '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',
  26845. 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',
  26846. ],
  26847. [
  26848. '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',
  26849. '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',
  26850. ],
  26851. [
  26852. '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',
  26853. 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',
  26854. ],
  26855. [
  26856. 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',
  26857. 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',
  26858. ],
  26859. [
  26860. 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',
  26861. '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',
  26862. ],
  26863. [
  26864. 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',
  26865. 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',
  26866. ],
  26867. [
  26868. 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',
  26869. '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',
  26870. ],
  26871. [
  26872. '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',
  26873. '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',
  26874. ],
  26875. [
  26876. 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',
  26877. '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',
  26878. ],
  26879. [
  26880. 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',
  26881. '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',
  26882. ],
  26883. [
  26884. '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',
  26885. '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',
  26886. ],
  26887. [
  26888. '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',
  26889. 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',
  26890. ],
  26891. [
  26892. 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',
  26893. '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',
  26894. ],
  26895. [
  26896. 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',
  26897. '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',
  26898. ],
  26899. [
  26900. 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',
  26901. '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',
  26902. ],
  26903. [
  26904. '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',
  26905. '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',
  26906. ],
  26907. [
  26908. 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',
  26909. 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',
  26910. ],
  26911. [
  26912. '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',
  26913. 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',
  26914. ],
  26915. [
  26916. 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',
  26917. 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',
  26918. ],
  26919. [
  26920. 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',
  26921. '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',
  26922. ],
  26923. [
  26924. '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',
  26925. 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',
  26926. ],
  26927. [
  26928. 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',
  26929. '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',
  26930. ],
  26931. [
  26932. 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',
  26933. '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',
  26934. ],
  26935. [
  26936. 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',
  26937. '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',
  26938. ],
  26939. [
  26940. '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',
  26941. 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',
  26942. ],
  26943. [
  26944. '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',
  26945. 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',
  26946. ],
  26947. [
  26948. 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',
  26949. '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',
  26950. ],
  26951. [
  26952. '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',
  26953. 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',
  26954. ],
  26955. [
  26956. '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',
  26957. '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',
  26958. ],
  26959. [
  26960. '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',
  26961. 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',
  26962. ],
  26963. [
  26964. 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',
  26965. 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',
  26966. ],
  26967. [
  26968. '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',
  26969. 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',
  26970. ],
  26971. [
  26972. '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',
  26973. '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',
  26974. ],
  26975. [
  26976. '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',
  26977. 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',
  26978. ],
  26979. [
  26980. '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',
  26981. '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',
  26982. ],
  26983. [
  26984. 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',
  26985. 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',
  26986. ],
  26987. [
  26988. '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',
  26989. '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',
  26990. ],
  26991. [
  26992. 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',
  26993. '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',
  26994. ],
  26995. [
  26996. '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',
  26997. '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',
  26998. ],
  26999. [
  27000. 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',
  27001. 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',
  27002. ],
  27003. [
  27004. 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',
  27005. '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',
  27006. ],
  27007. [
  27008. 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',
  27009. 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',
  27010. ],
  27011. [
  27012. '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',
  27013. 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',
  27014. ],
  27015. [
  27016. '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',
  27017. '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',
  27018. ],
  27019. [
  27020. '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',
  27021. 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',
  27022. ],
  27023. [
  27024. '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',
  27025. '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',
  27026. ],
  27027. [
  27028. '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',
  27029. '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',
  27030. ],
  27031. [
  27032. '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',
  27033. 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',
  27034. ],
  27035. [
  27036. '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',
  27037. '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',
  27038. ],
  27039. [
  27040. '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',
  27041. '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',
  27042. ],
  27043. [
  27044. '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',
  27045. '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',
  27046. ],
  27047. ],
  27048. },
  27049. };
  27050. /***/ }),
  27051. /***/ 205:
  27052. /*!********************************************************!*\
  27053. !*** ./node_modules/elliptic/lib/elliptic/ec/index.js ***!
  27054. \********************************************************/
  27055. /*! no static exports found */
  27056. /***/ (function(module, exports, __webpack_require__) {
  27057. "use strict";
  27058. var BN = __webpack_require__(/*! bn.js */ 171);
  27059. var HmacDRBG = __webpack_require__(/*! hmac-drbg */ 206);
  27060. var utils = __webpack_require__(/*! ../utils */ 184);
  27061. var curves = __webpack_require__(/*! ../curves */ 191);
  27062. var rand = __webpack_require__(/*! brorand */ 175);
  27063. var assert = utils.assert;
  27064. var KeyPair = __webpack_require__(/*! ./key */ 207);
  27065. var Signature = __webpack_require__(/*! ./signature */ 208);
  27066. function EC(options) {
  27067. if (!(this instanceof EC))
  27068. return new EC(options);
  27069. // Shortcut `elliptic.ec(curve-name)`
  27070. if (typeof options === 'string') {
  27071. assert(Object.prototype.hasOwnProperty.call(curves, options),
  27072. 'Unknown curve ' + options);
  27073. options = curves[options];
  27074. }
  27075. // Shortcut for `elliptic.ec(elliptic.curves.curveName)`
  27076. if (options instanceof curves.PresetCurve)
  27077. options = { curve: options };
  27078. this.curve = options.curve.curve;
  27079. this.n = this.curve.n;
  27080. this.nh = this.n.ushrn(1);
  27081. this.g = this.curve.g;
  27082. // Point on curve
  27083. this.g = options.curve.g;
  27084. this.g.precompute(options.curve.n.bitLength() + 1);
  27085. // Hash for function for DRBG
  27086. this.hash = options.hash || options.curve.hash;
  27087. }
  27088. module.exports = EC;
  27089. EC.prototype.keyPair = function keyPair(options) {
  27090. return new KeyPair(this, options);
  27091. };
  27092. EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
  27093. return KeyPair.fromPrivate(this, priv, enc);
  27094. };
  27095. EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
  27096. return KeyPair.fromPublic(this, pub, enc);
  27097. };
  27098. EC.prototype.genKeyPair = function genKeyPair(options) {
  27099. if (!options)
  27100. options = {};
  27101. // Instantiate Hmac_DRBG
  27102. var drbg = new HmacDRBG({
  27103. hash: this.hash,
  27104. pers: options.pers,
  27105. persEnc: options.persEnc || 'utf8',
  27106. entropy: options.entropy || rand(this.hash.hmacStrength),
  27107. entropyEnc: options.entropy && options.entropyEnc || 'utf8',
  27108. nonce: this.n.toArray(),
  27109. });
  27110. var bytes = this.n.byteLength();
  27111. var ns2 = this.n.sub(new BN(2));
  27112. for (;;) {
  27113. var priv = new BN(drbg.generate(bytes));
  27114. if (priv.cmp(ns2) > 0)
  27115. continue;
  27116. priv.iaddn(1);
  27117. return this.keyFromPrivate(priv);
  27118. }
  27119. };
  27120. EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {
  27121. var delta = msg.byteLength() * 8 - this.n.bitLength();
  27122. if (delta > 0)
  27123. msg = msg.ushrn(delta);
  27124. if (!truncOnly && msg.cmp(this.n) >= 0)
  27125. return msg.sub(this.n);
  27126. else
  27127. return msg;
  27128. };
  27129. EC.prototype.sign = function sign(msg, key, enc, options) {
  27130. if (typeof enc === 'object') {
  27131. options = enc;
  27132. enc = null;
  27133. }
  27134. if (!options)
  27135. options = {};
  27136. key = this.keyFromPrivate(key, enc);
  27137. msg = this._truncateToN(new BN(msg, 16));
  27138. // Zero-extend key to provide enough entropy
  27139. var bytes = this.n.byteLength();
  27140. var bkey = key.getPrivate().toArray('be', bytes);
  27141. // Zero-extend nonce to have the same byte size as N
  27142. var nonce = msg.toArray('be', bytes);
  27143. // Instantiate Hmac_DRBG
  27144. var drbg = new HmacDRBG({
  27145. hash: this.hash,
  27146. entropy: bkey,
  27147. nonce: nonce,
  27148. pers: options.pers,
  27149. persEnc: options.persEnc || 'utf8',
  27150. });
  27151. // Number of bytes to generate
  27152. var ns1 = this.n.sub(new BN(1));
  27153. for (var iter = 0; ; iter++) {
  27154. var k = options.k ?
  27155. options.k(iter) :
  27156. new BN(drbg.generate(this.n.byteLength()));
  27157. k = this._truncateToN(k, true);
  27158. if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)
  27159. continue;
  27160. var kp = this.g.mul(k);
  27161. if (kp.isInfinity())
  27162. continue;
  27163. var kpX = kp.getX();
  27164. var r = kpX.umod(this.n);
  27165. if (r.cmpn(0) === 0)
  27166. continue;
  27167. var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));
  27168. s = s.umod(this.n);
  27169. if (s.cmpn(0) === 0)
  27170. continue;
  27171. var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |
  27172. (kpX.cmp(r) !== 0 ? 2 : 0);
  27173. // Use complement of `s`, if it is > `n / 2`
  27174. if (options.canonical && s.cmp(this.nh) > 0) {
  27175. s = this.n.sub(s);
  27176. recoveryParam ^= 1;
  27177. }
  27178. return new Signature({ r: r, s: s, recoveryParam: recoveryParam });
  27179. }
  27180. };
  27181. EC.prototype.verify = function verify(msg, signature, key, enc) {
  27182. msg = this._truncateToN(new BN(msg, 16));
  27183. key = this.keyFromPublic(key, enc);
  27184. signature = new Signature(signature, 'hex');
  27185. // Perform primitive values validation
  27186. var r = signature.r;
  27187. var s = signature.s;
  27188. if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)
  27189. return false;
  27190. if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)
  27191. return false;
  27192. // Validate signature
  27193. var sinv = s.invm(this.n);
  27194. var u1 = sinv.mul(msg).umod(this.n);
  27195. var u2 = sinv.mul(r).umod(this.n);
  27196. var p;
  27197. if (!this.curve._maxwellTrick) {
  27198. p = this.g.mulAdd(u1, key.getPublic(), u2);
  27199. if (p.isInfinity())
  27200. return false;
  27201. return p.getX().umod(this.n).cmp(r) === 0;
  27202. }
  27203. // NOTE: Greg Maxwell's trick, inspired by:
  27204. // https://git.io/vad3K
  27205. p = this.g.jmulAdd(u1, key.getPublic(), u2);
  27206. if (p.isInfinity())
  27207. return false;
  27208. // Compare `p.x` of Jacobian point with `r`,
  27209. // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
  27210. // inverse of `p.z^2`
  27211. return p.eqXToP(r);
  27212. };
  27213. EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
  27214. assert((3 & j) === j, 'The recovery param is more than two bits');
  27215. signature = new Signature(signature, enc);
  27216. var n = this.n;
  27217. var e = new BN(msg);
  27218. var r = signature.r;
  27219. var s = signature.s;
  27220. // A set LSB signifies that the y-coordinate is odd
  27221. var isYOdd = j & 1;
  27222. var isSecondKey = j >> 1;
  27223. if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
  27224. throw new Error('Unable to find sencond key candinate');
  27225. // 1.1. Let x = r + jn.
  27226. if (isSecondKey)
  27227. r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);
  27228. else
  27229. r = this.curve.pointFromX(r, isYOdd);
  27230. var rInv = signature.r.invm(n);
  27231. var s1 = n.sub(e).mul(rInv).umod(n);
  27232. var s2 = s.mul(rInv).umod(n);
  27233. // 1.6.1 Compute Q = r^-1 (sR - eG)
  27234. // Q = r^-1 (sR + -eG)
  27235. return this.g.mulAdd(s1, r, s2);
  27236. };
  27237. EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
  27238. signature = new Signature(signature, enc);
  27239. if (signature.recoveryParam !== null)
  27240. return signature.recoveryParam;
  27241. for (var i = 0; i < 4; i++) {
  27242. var Qprime;
  27243. try {
  27244. Qprime = this.recoverPubKey(e, signature, i);
  27245. } catch (e) {
  27246. continue;
  27247. }
  27248. if (Qprime.eq(Q))
  27249. return i;
  27250. }
  27251. throw new Error('Unable to find valid recovery factor');
  27252. };
  27253. /***/ }),
  27254. /***/ 206:
  27255. /*!*************************************************!*\
  27256. !*** ./node_modules/hmac-drbg/lib/hmac-drbg.js ***!
  27257. \*************************************************/
  27258. /*! no static exports found */
  27259. /***/ (function(module, exports, __webpack_require__) {
  27260. "use strict";
  27261. var hash = __webpack_require__(/*! hash.js */ 192);
  27262. var utils = __webpack_require__(/*! minimalistic-crypto-utils */ 185);
  27263. var assert = __webpack_require__(/*! minimalistic-assert */ 145);
  27264. function HmacDRBG(options) {
  27265. if (!(this instanceof HmacDRBG))
  27266. return new HmacDRBG(options);
  27267. this.hash = options.hash;
  27268. this.predResist = !!options.predResist;
  27269. this.outLen = this.hash.outSize;
  27270. this.minEntropy = options.minEntropy || this.hash.hmacStrength;
  27271. this._reseed = null;
  27272. this.reseedInterval = null;
  27273. this.K = null;
  27274. this.V = null;
  27275. var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');
  27276. var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');
  27277. var pers = utils.toArray(options.pers, options.persEnc || 'hex');
  27278. assert(entropy.length >= (this.minEntropy / 8),
  27279. 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
  27280. this._init(entropy, nonce, pers);
  27281. }
  27282. module.exports = HmacDRBG;
  27283. HmacDRBG.prototype._init = function init(entropy, nonce, pers) {
  27284. var seed = entropy.concat(nonce).concat(pers);
  27285. this.K = new Array(this.outLen / 8);
  27286. this.V = new Array(this.outLen / 8);
  27287. for (var i = 0; i < this.V.length; i++) {
  27288. this.K[i] = 0x00;
  27289. this.V[i] = 0x01;
  27290. }
  27291. this._update(seed);
  27292. this._reseed = 1;
  27293. this.reseedInterval = 0x1000000000000; // 2^48
  27294. };
  27295. HmacDRBG.prototype._hmac = function hmac() {
  27296. return new hash.hmac(this.hash, this.K);
  27297. };
  27298. HmacDRBG.prototype._update = function update(seed) {
  27299. var kmac = this._hmac()
  27300. .update(this.V)
  27301. .update([ 0x00 ]);
  27302. if (seed)
  27303. kmac = kmac.update(seed);
  27304. this.K = kmac.digest();
  27305. this.V = this._hmac().update(this.V).digest();
  27306. if (!seed)
  27307. return;
  27308. this.K = this._hmac()
  27309. .update(this.V)
  27310. .update([ 0x01 ])
  27311. .update(seed)
  27312. .digest();
  27313. this.V = this._hmac().update(this.V).digest();
  27314. };
  27315. HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {
  27316. // Optional entropy enc
  27317. if (typeof entropyEnc !== 'string') {
  27318. addEnc = add;
  27319. add = entropyEnc;
  27320. entropyEnc = null;
  27321. }
  27322. entropy = utils.toArray(entropy, entropyEnc);
  27323. add = utils.toArray(add, addEnc);
  27324. assert(entropy.length >= (this.minEntropy / 8),
  27325. 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
  27326. this._update(entropy.concat(add || []));
  27327. this._reseed = 1;
  27328. };
  27329. HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
  27330. if (this._reseed > this.reseedInterval)
  27331. throw new Error('Reseed is required');
  27332. // Optional encoding
  27333. if (typeof enc !== 'string') {
  27334. addEnc = add;
  27335. add = enc;
  27336. enc = null;
  27337. }
  27338. // Optional additional data
  27339. if (add) {
  27340. add = utils.toArray(add, addEnc || 'hex');
  27341. this._update(add);
  27342. }
  27343. var temp = [];
  27344. while (temp.length < len) {
  27345. this.V = this._hmac().update(this.V).digest();
  27346. temp = temp.concat(this.V);
  27347. }
  27348. var res = temp.slice(0, len);
  27349. this._update(add);
  27350. this._reseed++;
  27351. return utils.encode(res, enc);
  27352. };
  27353. /***/ }),
  27354. /***/ 207:
  27355. /*!******************************************************!*\
  27356. !*** ./node_modules/elliptic/lib/elliptic/ec/key.js ***!
  27357. \******************************************************/
  27358. /*! no static exports found */
  27359. /***/ (function(module, exports, __webpack_require__) {
  27360. "use strict";
  27361. var BN = __webpack_require__(/*! bn.js */ 171);
  27362. var utils = __webpack_require__(/*! ../utils */ 184);
  27363. var assert = utils.assert;
  27364. function KeyPair(ec, options) {
  27365. this.ec = ec;
  27366. this.priv = null;
  27367. this.pub = null;
  27368. // KeyPair(ec, { priv: ..., pub: ... })
  27369. if (options.priv)
  27370. this._importPrivate(options.priv, options.privEnc);
  27371. if (options.pub)
  27372. this._importPublic(options.pub, options.pubEnc);
  27373. }
  27374. module.exports = KeyPair;
  27375. KeyPair.fromPublic = function fromPublic(ec, pub, enc) {
  27376. if (pub instanceof KeyPair)
  27377. return pub;
  27378. return new KeyPair(ec, {
  27379. pub: pub,
  27380. pubEnc: enc,
  27381. });
  27382. };
  27383. KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {
  27384. if (priv instanceof KeyPair)
  27385. return priv;
  27386. return new KeyPair(ec, {
  27387. priv: priv,
  27388. privEnc: enc,
  27389. });
  27390. };
  27391. KeyPair.prototype.validate = function validate() {
  27392. var pub = this.getPublic();
  27393. if (pub.isInfinity())
  27394. return { result: false, reason: 'Invalid public key' };
  27395. if (!pub.validate())
  27396. return { result: false, reason: 'Public key is not a point' };
  27397. if (!pub.mul(this.ec.curve.n).isInfinity())
  27398. return { result: false, reason: 'Public key * N != O' };
  27399. return { result: true, reason: null };
  27400. };
  27401. KeyPair.prototype.getPublic = function getPublic(compact, enc) {
  27402. // compact is optional argument
  27403. if (typeof compact === 'string') {
  27404. enc = compact;
  27405. compact = null;
  27406. }
  27407. if (!this.pub)
  27408. this.pub = this.ec.g.mul(this.priv);
  27409. if (!enc)
  27410. return this.pub;
  27411. return this.pub.encode(enc, compact);
  27412. };
  27413. KeyPair.prototype.getPrivate = function getPrivate(enc) {
  27414. if (enc === 'hex')
  27415. return this.priv.toString(16, 2);
  27416. else
  27417. return this.priv;
  27418. };
  27419. KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {
  27420. this.priv = new BN(key, enc || 16);
  27421. // Ensure that the priv won't be bigger than n, otherwise we may fail
  27422. // in fixed multiplication method
  27423. this.priv = this.priv.umod(this.ec.curve.n);
  27424. };
  27425. KeyPair.prototype._importPublic = function _importPublic(key, enc) {
  27426. if (key.x || key.y) {
  27427. // Montgomery points only have an `x` coordinate.
  27428. // Weierstrass/Edwards points on the other hand have both `x` and
  27429. // `y` coordinates.
  27430. if (this.ec.curve.type === 'mont') {
  27431. assert(key.x, 'Need x coordinate');
  27432. } else if (this.ec.curve.type === 'short' ||
  27433. this.ec.curve.type === 'edwards') {
  27434. assert(key.x && key.y, 'Need both x and y coordinate');
  27435. }
  27436. this.pub = this.ec.curve.point(key.x, key.y);
  27437. return;
  27438. }
  27439. this.pub = this.ec.curve.decodePoint(key, enc);
  27440. };
  27441. // ECDH
  27442. KeyPair.prototype.derive = function derive(pub) {
  27443. if(!pub.validate()) {
  27444. assert(pub.validate(), 'public point not validated');
  27445. }
  27446. return pub.mul(this.priv).getX();
  27447. };
  27448. // ECDSA
  27449. KeyPair.prototype.sign = function sign(msg, enc, options) {
  27450. return this.ec.sign(msg, this, enc, options);
  27451. };
  27452. KeyPair.prototype.verify = function verify(msg, signature) {
  27453. return this.ec.verify(msg, signature, this);
  27454. };
  27455. KeyPair.prototype.inspect = function inspect() {
  27456. return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +
  27457. ' pub: ' + (this.pub && this.pub.inspect()) + ' >';
  27458. };
  27459. /***/ }),
  27460. /***/ 208:
  27461. /*!************************************************************!*\
  27462. !*** ./node_modules/elliptic/lib/elliptic/ec/signature.js ***!
  27463. \************************************************************/
  27464. /*! no static exports found */
  27465. /***/ (function(module, exports, __webpack_require__) {
  27466. "use strict";
  27467. var BN = __webpack_require__(/*! bn.js */ 171);
  27468. var utils = __webpack_require__(/*! ../utils */ 184);
  27469. var assert = utils.assert;
  27470. function Signature(options, enc) {
  27471. if (options instanceof Signature)
  27472. return options;
  27473. if (this._importDER(options, enc))
  27474. return;
  27475. assert(options.r && options.s, 'Signature without r or s');
  27476. this.r = new BN(options.r, 16);
  27477. this.s = new BN(options.s, 16);
  27478. if (options.recoveryParam === undefined)
  27479. this.recoveryParam = null;
  27480. else
  27481. this.recoveryParam = options.recoveryParam;
  27482. }
  27483. module.exports = Signature;
  27484. function Position() {
  27485. this.place = 0;
  27486. }
  27487. function getLength(buf, p) {
  27488. var initial = buf[p.place++];
  27489. if (!(initial & 0x80)) {
  27490. return initial;
  27491. }
  27492. var octetLen = initial & 0xf;
  27493. // Indefinite length or overflow
  27494. if (octetLen === 0 || octetLen > 4) {
  27495. return false;
  27496. }
  27497. var val = 0;
  27498. for (var i = 0, off = p.place; i < octetLen; i++, off++) {
  27499. val <<= 8;
  27500. val |= buf[off];
  27501. val >>>= 0;
  27502. }
  27503. // Leading zeroes
  27504. if (val <= 0x7f) {
  27505. return false;
  27506. }
  27507. p.place = off;
  27508. return val;
  27509. }
  27510. function rmPadding(buf) {
  27511. var i = 0;
  27512. var len = buf.length - 1;
  27513. while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {
  27514. i++;
  27515. }
  27516. if (i === 0) {
  27517. return buf;
  27518. }
  27519. return buf.slice(i);
  27520. }
  27521. Signature.prototype._importDER = function _importDER(data, enc) {
  27522. data = utils.toArray(data, enc);
  27523. var p = new Position();
  27524. if (data[p.place++] !== 0x30) {
  27525. return false;
  27526. }
  27527. var len = getLength(data, p);
  27528. if (len === false) {
  27529. return false;
  27530. }
  27531. if ((len + p.place) !== data.length) {
  27532. return false;
  27533. }
  27534. if (data[p.place++] !== 0x02) {
  27535. return false;
  27536. }
  27537. var rlen = getLength(data, p);
  27538. if (rlen === false) {
  27539. return false;
  27540. }
  27541. var r = data.slice(p.place, rlen + p.place);
  27542. p.place += rlen;
  27543. if (data[p.place++] !== 0x02) {
  27544. return false;
  27545. }
  27546. var slen = getLength(data, p);
  27547. if (slen === false) {
  27548. return false;
  27549. }
  27550. if (data.length !== slen + p.place) {
  27551. return false;
  27552. }
  27553. var s = data.slice(p.place, slen + p.place);
  27554. if (r[0] === 0) {
  27555. if (r[1] & 0x80) {
  27556. r = r.slice(1);
  27557. } else {
  27558. // Leading zeroes
  27559. return false;
  27560. }
  27561. }
  27562. if (s[0] === 0) {
  27563. if (s[1] & 0x80) {
  27564. s = s.slice(1);
  27565. } else {
  27566. // Leading zeroes
  27567. return false;
  27568. }
  27569. }
  27570. this.r = new BN(r);
  27571. this.s = new BN(s);
  27572. this.recoveryParam = null;
  27573. return true;
  27574. };
  27575. function constructLength(arr, len) {
  27576. if (len < 0x80) {
  27577. arr.push(len);
  27578. return;
  27579. }
  27580. var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
  27581. arr.push(octets | 0x80);
  27582. while (--octets) {
  27583. arr.push((len >>> (octets << 3)) & 0xff);
  27584. }
  27585. arr.push(len);
  27586. }
  27587. Signature.prototype.toDER = function toDER(enc) {
  27588. var r = this.r.toArray();
  27589. var s = this.s.toArray();
  27590. // Pad values
  27591. if (r[0] & 0x80)
  27592. r = [ 0 ].concat(r);
  27593. // Pad values
  27594. if (s[0] & 0x80)
  27595. s = [ 0 ].concat(s);
  27596. r = rmPadding(r);
  27597. s = rmPadding(s);
  27598. while (!s[0] && !(s[1] & 0x80)) {
  27599. s = s.slice(1);
  27600. }
  27601. var arr = [ 0x02 ];
  27602. constructLength(arr, r.length);
  27603. arr = arr.concat(r);
  27604. arr.push(0x02);
  27605. constructLength(arr, s.length);
  27606. var backHalf = arr.concat(s);
  27607. var res = [ 0x30 ];
  27608. constructLength(res, backHalf.length);
  27609. res = res.concat(backHalf);
  27610. return utils.encode(res, enc);
  27611. };
  27612. /***/ }),
  27613. /***/ 209:
  27614. /*!***********************************************************!*\
  27615. !*** ./node_modules/elliptic/lib/elliptic/eddsa/index.js ***!
  27616. \***********************************************************/
  27617. /*! no static exports found */
  27618. /***/ (function(module, exports, __webpack_require__) {
  27619. "use strict";
  27620. var hash = __webpack_require__(/*! hash.js */ 192);
  27621. var curves = __webpack_require__(/*! ../curves */ 191);
  27622. var utils = __webpack_require__(/*! ../utils */ 184);
  27623. var assert = utils.assert;
  27624. var parseBytes = utils.parseBytes;
  27625. var KeyPair = __webpack_require__(/*! ./key */ 210);
  27626. var Signature = __webpack_require__(/*! ./signature */ 211);
  27627. function EDDSA(curve) {
  27628. assert(curve === 'ed25519', 'only tested with ed25519 so far');
  27629. if (!(this instanceof EDDSA))
  27630. return new EDDSA(curve);
  27631. curve = curves[curve].curve;
  27632. this.curve = curve;
  27633. this.g = curve.g;
  27634. this.g.precompute(curve.n.bitLength() + 1);
  27635. this.pointClass = curve.point().constructor;
  27636. this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
  27637. this.hash = hash.sha512;
  27638. }
  27639. module.exports = EDDSA;
  27640. /**
  27641. * @param {Array|String} message - message bytes
  27642. * @param {Array|String|KeyPair} secret - secret bytes or a keypair
  27643. * @returns {Signature} - signature
  27644. */
  27645. EDDSA.prototype.sign = function sign(message, secret) {
  27646. message = parseBytes(message);
  27647. var key = this.keyFromSecret(secret);
  27648. var r = this.hashInt(key.messagePrefix(), message);
  27649. var R = this.g.mul(r);
  27650. var Rencoded = this.encodePoint(R);
  27651. var s_ = this.hashInt(Rencoded, key.pubBytes(), message)
  27652. .mul(key.priv());
  27653. var S = r.add(s_).umod(this.curve.n);
  27654. return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });
  27655. };
  27656. /**
  27657. * @param {Array} message - message bytes
  27658. * @param {Array|String|Signature} sig - sig bytes
  27659. * @param {Array|String|Point|KeyPair} pub - public key
  27660. * @returns {Boolean} - true if public key matches sig of message
  27661. */
  27662. EDDSA.prototype.verify = function verify(message, sig, pub) {
  27663. message = parseBytes(message);
  27664. sig = this.makeSignature(sig);
  27665. var key = this.keyFromPublic(pub);
  27666. var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
  27667. var SG = this.g.mul(sig.S());
  27668. var RplusAh = sig.R().add(key.pub().mul(h));
  27669. return RplusAh.eq(SG);
  27670. };
  27671. EDDSA.prototype.hashInt = function hashInt() {
  27672. var hash = this.hash();
  27673. for (var i = 0; i < arguments.length; i++)
  27674. hash.update(arguments[i]);
  27675. return utils.intFromLE(hash.digest()).umod(this.curve.n);
  27676. };
  27677. EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
  27678. return KeyPair.fromPublic(this, pub);
  27679. };
  27680. EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
  27681. return KeyPair.fromSecret(this, secret);
  27682. };
  27683. EDDSA.prototype.makeSignature = function makeSignature(sig) {
  27684. if (sig instanceof Signature)
  27685. return sig;
  27686. return new Signature(this, sig);
  27687. };
  27688. /**
  27689. * * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2
  27690. *
  27691. * EDDSA defines methods for encoding and decoding points and integers. These are
  27692. * helper convenience methods, that pass along to utility functions implied
  27693. * parameters.
  27694. *
  27695. */
  27696. EDDSA.prototype.encodePoint = function encodePoint(point) {
  27697. var enc = point.getY().toArray('le', this.encodingLength);
  27698. enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;
  27699. return enc;
  27700. };
  27701. EDDSA.prototype.decodePoint = function decodePoint(bytes) {
  27702. bytes = utils.parseBytes(bytes);
  27703. var lastIx = bytes.length - 1;
  27704. var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);
  27705. var xIsOdd = (bytes[lastIx] & 0x80) !== 0;
  27706. var y = utils.intFromLE(normed);
  27707. return this.curve.pointFromY(y, xIsOdd);
  27708. };
  27709. EDDSA.prototype.encodeInt = function encodeInt(num) {
  27710. return num.toArray('le', this.encodingLength);
  27711. };
  27712. EDDSA.prototype.decodeInt = function decodeInt(bytes) {
  27713. return utils.intFromLE(bytes);
  27714. };
  27715. EDDSA.prototype.isPoint = function isPoint(val) {
  27716. return val instanceof this.pointClass;
  27717. };
  27718. /***/ }),
  27719. /***/ 21:
  27720. /*!******************************************************************!*\
  27721. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  27722. \******************************************************************/
  27723. /*! no static exports found */
  27724. /***/ (function(module, exports) {
  27725. function _nonIterableSpread() {
  27726. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  27727. }
  27728. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  27729. /***/ }),
  27730. /***/ 210:
  27731. /*!*********************************************************!*\
  27732. !*** ./node_modules/elliptic/lib/elliptic/eddsa/key.js ***!
  27733. \*********************************************************/
  27734. /*! no static exports found */
  27735. /***/ (function(module, exports, __webpack_require__) {
  27736. "use strict";
  27737. var utils = __webpack_require__(/*! ../utils */ 184);
  27738. var assert = utils.assert;
  27739. var parseBytes = utils.parseBytes;
  27740. var cachedProperty = utils.cachedProperty;
  27741. /**
  27742. * @param {EDDSA} eddsa - instance
  27743. * @param {Object} params - public/private key parameters
  27744. *
  27745. * @param {Array<Byte>} [params.secret] - secret seed bytes
  27746. * @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)
  27747. * @param {Array<Byte>} [params.pub] - public key point encoded as bytes
  27748. *
  27749. */
  27750. function KeyPair(eddsa, params) {
  27751. this.eddsa = eddsa;
  27752. this._secret = parseBytes(params.secret);
  27753. if (eddsa.isPoint(params.pub))
  27754. this._pub = params.pub;
  27755. else
  27756. this._pubBytes = parseBytes(params.pub);
  27757. }
  27758. KeyPair.fromPublic = function fromPublic(eddsa, pub) {
  27759. if (pub instanceof KeyPair)
  27760. return pub;
  27761. return new KeyPair(eddsa, { pub: pub });
  27762. };
  27763. KeyPair.fromSecret = function fromSecret(eddsa, secret) {
  27764. if (secret instanceof KeyPair)
  27765. return secret;
  27766. return new KeyPair(eddsa, { secret: secret });
  27767. };
  27768. KeyPair.prototype.secret = function secret() {
  27769. return this._secret;
  27770. };
  27771. cachedProperty(KeyPair, 'pubBytes', function pubBytes() {
  27772. return this.eddsa.encodePoint(this.pub());
  27773. });
  27774. cachedProperty(KeyPair, 'pub', function pub() {
  27775. if (this._pubBytes)
  27776. return this.eddsa.decodePoint(this._pubBytes);
  27777. return this.eddsa.g.mul(this.priv());
  27778. });
  27779. cachedProperty(KeyPair, 'privBytes', function privBytes() {
  27780. var eddsa = this.eddsa;
  27781. var hash = this.hash();
  27782. var lastIx = eddsa.encodingLength - 1;
  27783. var a = hash.slice(0, eddsa.encodingLength);
  27784. a[0] &= 248;
  27785. a[lastIx] &= 127;
  27786. a[lastIx] |= 64;
  27787. return a;
  27788. });
  27789. cachedProperty(KeyPair, 'priv', function priv() {
  27790. return this.eddsa.decodeInt(this.privBytes());
  27791. });
  27792. cachedProperty(KeyPair, 'hash', function hash() {
  27793. return this.eddsa.hash().update(this.secret()).digest();
  27794. });
  27795. cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {
  27796. return this.hash().slice(this.eddsa.encodingLength);
  27797. });
  27798. KeyPair.prototype.sign = function sign(message) {
  27799. assert(this._secret, 'KeyPair can only verify');
  27800. return this.eddsa.sign(message, this);
  27801. };
  27802. KeyPair.prototype.verify = function verify(message, sig) {
  27803. return this.eddsa.verify(message, sig, this);
  27804. };
  27805. KeyPair.prototype.getSecret = function getSecret(enc) {
  27806. assert(this._secret, 'KeyPair is public only');
  27807. return utils.encode(this.secret(), enc);
  27808. };
  27809. KeyPair.prototype.getPublic = function getPublic(enc) {
  27810. return utils.encode(this.pubBytes(), enc);
  27811. };
  27812. module.exports = KeyPair;
  27813. /***/ }),
  27814. /***/ 211:
  27815. /*!***************************************************************!*\
  27816. !*** ./node_modules/elliptic/lib/elliptic/eddsa/signature.js ***!
  27817. \***************************************************************/
  27818. /*! no static exports found */
  27819. /***/ (function(module, exports, __webpack_require__) {
  27820. "use strict";
  27821. var BN = __webpack_require__(/*! bn.js */ 171);
  27822. var utils = __webpack_require__(/*! ../utils */ 184);
  27823. var assert = utils.assert;
  27824. var cachedProperty = utils.cachedProperty;
  27825. var parseBytes = utils.parseBytes;
  27826. /**
  27827. * @param {EDDSA} eddsa - eddsa instance
  27828. * @param {Array<Bytes>|Object} sig -
  27829. * @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes
  27830. * @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes
  27831. * @param {Array<Bytes>} [sig.Rencoded] - R point encoded
  27832. * @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded
  27833. */
  27834. function Signature(eddsa, sig) {
  27835. this.eddsa = eddsa;
  27836. if (typeof sig !== 'object')
  27837. sig = parseBytes(sig);
  27838. if (Array.isArray(sig)) {
  27839. sig = {
  27840. R: sig.slice(0, eddsa.encodingLength),
  27841. S: sig.slice(eddsa.encodingLength),
  27842. };
  27843. }
  27844. assert(sig.R && sig.S, 'Signature without R or S');
  27845. if (eddsa.isPoint(sig.R))
  27846. this._R = sig.R;
  27847. if (sig.S instanceof BN)
  27848. this._S = sig.S;
  27849. this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
  27850. this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
  27851. }
  27852. cachedProperty(Signature, 'S', function S() {
  27853. return this.eddsa.decodeInt(this.Sencoded());
  27854. });
  27855. cachedProperty(Signature, 'R', function R() {
  27856. return this.eddsa.decodePoint(this.Rencoded());
  27857. });
  27858. cachedProperty(Signature, 'Rencoded', function Rencoded() {
  27859. return this.eddsa.encodePoint(this.R());
  27860. });
  27861. cachedProperty(Signature, 'Sencoded', function Sencoded() {
  27862. return this.eddsa.encodeInt(this.S());
  27863. });
  27864. Signature.prototype.toBytes = function toBytes() {
  27865. return this.Rencoded().concat(this.Sencoded());
  27866. };
  27867. Signature.prototype.toHex = function toHex() {
  27868. return utils.encode(this.toBytes(), 'hex').toUpperCase();
  27869. };
  27870. module.exports = Signature;
  27871. /***/ }),
  27872. /***/ 212:
  27873. /*!******************************************!*\
  27874. !*** ./node_modules/parse-asn1/index.js ***!
  27875. \******************************************/
  27876. /*! no static exports found */
  27877. /***/ (function(module, exports, __webpack_require__) {
  27878. var asn1 = __webpack_require__(/*! ./asn1 */ 213)
  27879. var aesid = __webpack_require__(/*! ./aesid.json */ 230)
  27880. var fixProc = __webpack_require__(/*! ./fixProc */ 231)
  27881. var ciphers = __webpack_require__(/*! browserify-aes */ 149)
  27882. var compat = __webpack_require__(/*! pbkdf2 */ 134)
  27883. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  27884. module.exports = parseKeys
  27885. function parseKeys (buffer) {
  27886. var password
  27887. if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {
  27888. password = buffer.passphrase
  27889. buffer = buffer.key
  27890. }
  27891. if (typeof buffer === 'string') {
  27892. buffer = Buffer.from(buffer)
  27893. }
  27894. var stripped = fixProc(buffer, password)
  27895. var type = stripped.tag
  27896. var data = stripped.data
  27897. var subtype, ndata
  27898. switch (type) {
  27899. case 'CERTIFICATE':
  27900. ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo
  27901. // falls through
  27902. case 'PUBLIC KEY':
  27903. if (!ndata) {
  27904. ndata = asn1.PublicKey.decode(data, 'der')
  27905. }
  27906. subtype = ndata.algorithm.algorithm.join('.')
  27907. switch (subtype) {
  27908. case '1.2.840.113549.1.1.1':
  27909. return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')
  27910. case '1.2.840.10045.2.1':
  27911. ndata.subjectPrivateKey = ndata.subjectPublicKey
  27912. return {
  27913. type: 'ec',
  27914. data: ndata
  27915. }
  27916. case '1.2.840.10040.4.1':
  27917. ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')
  27918. return {
  27919. type: 'dsa',
  27920. data: ndata.algorithm.params
  27921. }
  27922. default: throw new Error('unknown key id ' + subtype)
  27923. }
  27924. // throw new Error('unknown key type ' + type)
  27925. case 'ENCRYPTED PRIVATE KEY':
  27926. data = asn1.EncryptedPrivateKey.decode(data, 'der')
  27927. data = decrypt(data, password)
  27928. // falls through
  27929. case 'PRIVATE KEY':
  27930. ndata = asn1.PrivateKey.decode(data, 'der')
  27931. subtype = ndata.algorithm.algorithm.join('.')
  27932. switch (subtype) {
  27933. case '1.2.840.113549.1.1.1':
  27934. return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')
  27935. case '1.2.840.10045.2.1':
  27936. return {
  27937. curve: ndata.algorithm.curve,
  27938. privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey
  27939. }
  27940. case '1.2.840.10040.4.1':
  27941. ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')
  27942. return {
  27943. type: 'dsa',
  27944. params: ndata.algorithm.params
  27945. }
  27946. default: throw new Error('unknown key id ' + subtype)
  27947. }
  27948. // throw new Error('unknown key type ' + type)
  27949. case 'RSA PUBLIC KEY':
  27950. return asn1.RSAPublicKey.decode(data, 'der')
  27951. case 'RSA PRIVATE KEY':
  27952. return asn1.RSAPrivateKey.decode(data, 'der')
  27953. case 'DSA PRIVATE KEY':
  27954. return {
  27955. type: 'dsa',
  27956. params: asn1.DSAPrivateKey.decode(data, 'der')
  27957. }
  27958. case 'EC PRIVATE KEY':
  27959. data = asn1.ECPrivateKey.decode(data, 'der')
  27960. return {
  27961. curve: data.parameters.value,
  27962. privateKey: data.privateKey
  27963. }
  27964. default: throw new Error('unknown key type ' + type)
  27965. }
  27966. }
  27967. parseKeys.signature = asn1.signature
  27968. function decrypt (data, password) {
  27969. var salt = data.algorithm.decrypt.kde.kdeparams.salt
  27970. var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)
  27971. var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]
  27972. var iv = data.algorithm.decrypt.cipher.iv
  27973. var cipherText = data.subjectPrivateKey
  27974. var keylen = parseInt(algo.split('-')[1], 10) / 8
  27975. var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')
  27976. var cipher = ciphers.createDecipheriv(algo, key, iv)
  27977. var out = []
  27978. out.push(cipher.update(cipherText))
  27979. out.push(cipher.final())
  27980. return Buffer.concat(out)
  27981. }
  27982. /***/ }),
  27983. /***/ 213:
  27984. /*!*****************************************!*\
  27985. !*** ./node_modules/parse-asn1/asn1.js ***!
  27986. \*****************************************/
  27987. /*! no static exports found */
  27988. /***/ (function(module, exports, __webpack_require__) {
  27989. "use strict";
  27990. // from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js
  27991. // Fedor, you are amazing.
  27992. var asn1 = __webpack_require__(/*! asn1.js */ 214)
  27993. exports.certificate = __webpack_require__(/*! ./certificate */ 229)
  27994. var RSAPrivateKey = asn1.define('RSAPrivateKey', function () {
  27995. this.seq().obj(
  27996. this.key('version').int(),
  27997. this.key('modulus').int(),
  27998. this.key('publicExponent').int(),
  27999. this.key('privateExponent').int(),
  28000. this.key('prime1').int(),
  28001. this.key('prime2').int(),
  28002. this.key('exponent1').int(),
  28003. this.key('exponent2').int(),
  28004. this.key('coefficient').int()
  28005. )
  28006. })
  28007. exports.RSAPrivateKey = RSAPrivateKey
  28008. var RSAPublicKey = asn1.define('RSAPublicKey', function () {
  28009. this.seq().obj(
  28010. this.key('modulus').int(),
  28011. this.key('publicExponent').int()
  28012. )
  28013. })
  28014. exports.RSAPublicKey = RSAPublicKey
  28015. var PublicKey = asn1.define('SubjectPublicKeyInfo', function () {
  28016. this.seq().obj(
  28017. this.key('algorithm').use(AlgorithmIdentifier),
  28018. this.key('subjectPublicKey').bitstr()
  28019. )
  28020. })
  28021. exports.PublicKey = PublicKey
  28022. var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {
  28023. this.seq().obj(
  28024. this.key('algorithm').objid(),
  28025. this.key('none').null_().optional(),
  28026. this.key('curve').objid().optional(),
  28027. this.key('params').seq().obj(
  28028. this.key('p').int(),
  28029. this.key('q').int(),
  28030. this.key('g').int()
  28031. ).optional()
  28032. )
  28033. })
  28034. var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {
  28035. this.seq().obj(
  28036. this.key('version').int(),
  28037. this.key('algorithm').use(AlgorithmIdentifier),
  28038. this.key('subjectPrivateKey').octstr()
  28039. )
  28040. })
  28041. exports.PrivateKey = PrivateKeyInfo
  28042. var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {
  28043. this.seq().obj(
  28044. this.key('algorithm').seq().obj(
  28045. this.key('id').objid(),
  28046. this.key('decrypt').seq().obj(
  28047. this.key('kde').seq().obj(
  28048. this.key('id').objid(),
  28049. this.key('kdeparams').seq().obj(
  28050. this.key('salt').octstr(),
  28051. this.key('iters').int()
  28052. )
  28053. ),
  28054. this.key('cipher').seq().obj(
  28055. this.key('algo').objid(),
  28056. this.key('iv').octstr()
  28057. )
  28058. )
  28059. ),
  28060. this.key('subjectPrivateKey').octstr()
  28061. )
  28062. })
  28063. exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo
  28064. var DSAPrivateKey = asn1.define('DSAPrivateKey', function () {
  28065. this.seq().obj(
  28066. this.key('version').int(),
  28067. this.key('p').int(),
  28068. this.key('q').int(),
  28069. this.key('g').int(),
  28070. this.key('pub_key').int(),
  28071. this.key('priv_key').int()
  28072. )
  28073. })
  28074. exports.DSAPrivateKey = DSAPrivateKey
  28075. exports.DSAparam = asn1.define('DSAparam', function () {
  28076. this.int()
  28077. })
  28078. var ECPrivateKey = asn1.define('ECPrivateKey', function () {
  28079. this.seq().obj(
  28080. this.key('version').int(),
  28081. this.key('privateKey').octstr(),
  28082. this.key('parameters').optional().explicit(0).use(ECParameters),
  28083. this.key('publicKey').optional().explicit(1).bitstr()
  28084. )
  28085. })
  28086. exports.ECPrivateKey = ECPrivateKey
  28087. var ECParameters = asn1.define('ECParameters', function () {
  28088. this.choice({
  28089. namedCurve: this.objid()
  28090. })
  28091. })
  28092. exports.signature = asn1.define('signature', function () {
  28093. this.seq().obj(
  28094. this.key('r').int(),
  28095. this.key('s').int()
  28096. )
  28097. })
  28098. /***/ }),
  28099. /***/ 214:
  28100. /*!******************************************!*\
  28101. !*** ./node_modules/asn1.js/lib/asn1.js ***!
  28102. \******************************************/
  28103. /*! no static exports found */
  28104. /***/ (function(module, exports, __webpack_require__) {
  28105. "use strict";
  28106. const asn1 = exports;
  28107. asn1.bignum = __webpack_require__(/*! bn.js */ 171);
  28108. asn1.define = __webpack_require__(/*! ./asn1/api */ 215).define;
  28109. asn1.base = __webpack_require__(/*! ./asn1/base */ 227);
  28110. asn1.constants = __webpack_require__(/*! ./asn1/constants */ 228);
  28111. asn1.decoders = __webpack_require__(/*! ./asn1/decoders */ 224);
  28112. asn1.encoders = __webpack_require__(/*! ./asn1/encoders */ 216);
  28113. /***/ }),
  28114. /***/ 215:
  28115. /*!**********************************************!*\
  28116. !*** ./node_modules/asn1.js/lib/asn1/api.js ***!
  28117. \**********************************************/
  28118. /*! no static exports found */
  28119. /***/ (function(module, exports, __webpack_require__) {
  28120. "use strict";
  28121. const encoders = __webpack_require__(/*! ./encoders */ 216);
  28122. const decoders = __webpack_require__(/*! ./decoders */ 224);
  28123. const inherits = __webpack_require__(/*! inherits */ 95);
  28124. const api = exports;
  28125. api.define = function define(name, body) {
  28126. return new Entity(name, body);
  28127. };
  28128. function Entity(name, body) {
  28129. this.name = name;
  28130. this.body = body;
  28131. this.decoders = {};
  28132. this.encoders = {};
  28133. }
  28134. Entity.prototype._createNamed = function createNamed(Base) {
  28135. const name = this.name;
  28136. function Generated(entity) {
  28137. this._initNamed(entity, name);
  28138. }
  28139. inherits(Generated, Base);
  28140. Generated.prototype._initNamed = function _initNamed(entity, name) {
  28141. Base.call(this, entity, name);
  28142. };
  28143. return new Generated(this);
  28144. };
  28145. Entity.prototype._getDecoder = function _getDecoder(enc) {
  28146. enc = enc || 'der';
  28147. // Lazily create decoder
  28148. if (!this.decoders.hasOwnProperty(enc))
  28149. this.decoders[enc] = this._createNamed(decoders[enc]);
  28150. return this.decoders[enc];
  28151. };
  28152. Entity.prototype.decode = function decode(data, enc, options) {
  28153. return this._getDecoder(enc).decode(data, options);
  28154. };
  28155. Entity.prototype._getEncoder = function _getEncoder(enc) {
  28156. enc = enc || 'der';
  28157. // Lazily create encoder
  28158. if (!this.encoders.hasOwnProperty(enc))
  28159. this.encoders[enc] = this._createNamed(encoders[enc]);
  28160. return this.encoders[enc];
  28161. };
  28162. Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
  28163. return this._getEncoder(enc).encode(data, reporter);
  28164. };
  28165. /***/ }),
  28166. /***/ 216:
  28167. /*!*********************************************************!*\
  28168. !*** ./node_modules/asn1.js/lib/asn1/encoders/index.js ***!
  28169. \*********************************************************/
  28170. /*! no static exports found */
  28171. /***/ (function(module, exports, __webpack_require__) {
  28172. "use strict";
  28173. const encoders = exports;
  28174. encoders.der = __webpack_require__(/*! ./der */ 217);
  28175. encoders.pem = __webpack_require__(/*! ./pem */ 223);
  28176. /***/ }),
  28177. /***/ 217:
  28178. /*!*******************************************************!*\
  28179. !*** ./node_modules/asn1.js/lib/asn1/encoders/der.js ***!
  28180. \*******************************************************/
  28181. /*! no static exports found */
  28182. /***/ (function(module, exports, __webpack_require__) {
  28183. "use strict";
  28184. const inherits = __webpack_require__(/*! inherits */ 95);
  28185. const Buffer = __webpack_require__(/*! safer-buffer */ 218).Buffer;
  28186. const Node = __webpack_require__(/*! ../base/node */ 219);
  28187. // Import DER constants
  28188. const der = __webpack_require__(/*! ../constants/der */ 222);
  28189. function DEREncoder(entity) {
  28190. this.enc = 'der';
  28191. this.name = entity.name;
  28192. this.entity = entity;
  28193. // Construct base tree
  28194. this.tree = new DERNode();
  28195. this.tree._init(entity.body);
  28196. }
  28197. module.exports = DEREncoder;
  28198. DEREncoder.prototype.encode = function encode(data, reporter) {
  28199. return this.tree._encode(data, reporter).join();
  28200. };
  28201. // Tree methods
  28202. function DERNode(parent) {
  28203. Node.call(this, 'der', parent);
  28204. }
  28205. inherits(DERNode, Node);
  28206. DERNode.prototype._encodeComposite = function encodeComposite(tag,
  28207. primitive,
  28208. cls,
  28209. content) {
  28210. const encodedTag = encodeTag(tag, primitive, cls, this.reporter);
  28211. // Short form
  28212. if (content.length < 0x80) {
  28213. const header = Buffer.alloc(2);
  28214. header[0] = encodedTag;
  28215. header[1] = content.length;
  28216. return this._createEncoderBuffer([ header, content ]);
  28217. }
  28218. // Long form
  28219. // Count octets required to store length
  28220. let lenOctets = 1;
  28221. for (let i = content.length; i >= 0x100; i >>= 8)
  28222. lenOctets++;
  28223. const header = Buffer.alloc(1 + 1 + lenOctets);
  28224. header[0] = encodedTag;
  28225. header[1] = 0x80 | lenOctets;
  28226. for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
  28227. header[i] = j & 0xff;
  28228. return this._createEncoderBuffer([ header, content ]);
  28229. };
  28230. DERNode.prototype._encodeStr = function encodeStr(str, tag) {
  28231. if (tag === 'bitstr') {
  28232. return this._createEncoderBuffer([ str.unused | 0, str.data ]);
  28233. } else if (tag === 'bmpstr') {
  28234. const buf = Buffer.alloc(str.length * 2);
  28235. for (let i = 0; i < str.length; i++) {
  28236. buf.writeUInt16BE(str.charCodeAt(i), i * 2);
  28237. }
  28238. return this._createEncoderBuffer(buf);
  28239. } else if (tag === 'numstr') {
  28240. if (!this._isNumstr(str)) {
  28241. return this.reporter.error('Encoding of string type: numstr supports ' +
  28242. 'only digits and space');
  28243. }
  28244. return this._createEncoderBuffer(str);
  28245. } else if (tag === 'printstr') {
  28246. if (!this._isPrintstr(str)) {
  28247. return this.reporter.error('Encoding of string type: printstr supports ' +
  28248. 'only latin upper and lower case letters, ' +
  28249. 'digits, space, apostrophe, left and rigth ' +
  28250. 'parenthesis, plus sign, comma, hyphen, ' +
  28251. 'dot, slash, colon, equal sign, ' +
  28252. 'question mark');
  28253. }
  28254. return this._createEncoderBuffer(str);
  28255. } else if (/str$/.test(tag)) {
  28256. return this._createEncoderBuffer(str);
  28257. } else if (tag === 'objDesc') {
  28258. return this._createEncoderBuffer(str);
  28259. } else {
  28260. return this.reporter.error('Encoding of string type: ' + tag +
  28261. ' unsupported');
  28262. }
  28263. };
  28264. DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
  28265. if (typeof id === 'string') {
  28266. if (!values)
  28267. return this.reporter.error('string objid given, but no values map found');
  28268. if (!values.hasOwnProperty(id))
  28269. return this.reporter.error('objid not found in values map');
  28270. id = values[id].split(/[\s.]+/g);
  28271. for (let i = 0; i < id.length; i++)
  28272. id[i] |= 0;
  28273. } else if (Array.isArray(id)) {
  28274. id = id.slice();
  28275. for (let i = 0; i < id.length; i++)
  28276. id[i] |= 0;
  28277. }
  28278. if (!Array.isArray(id)) {
  28279. return this.reporter.error('objid() should be either array or string, ' +
  28280. 'got: ' + JSON.stringify(id));
  28281. }
  28282. if (!relative) {
  28283. if (id[1] >= 40)
  28284. return this.reporter.error('Second objid identifier OOB');
  28285. id.splice(0, 2, id[0] * 40 + id[1]);
  28286. }
  28287. // Count number of octets
  28288. let size = 0;
  28289. for (let i = 0; i < id.length; i++) {
  28290. let ident = id[i];
  28291. for (size++; ident >= 0x80; ident >>= 7)
  28292. size++;
  28293. }
  28294. const objid = Buffer.alloc(size);
  28295. let offset = objid.length - 1;
  28296. for (let i = id.length - 1; i >= 0; i--) {
  28297. let ident = id[i];
  28298. objid[offset--] = ident & 0x7f;
  28299. while ((ident >>= 7) > 0)
  28300. objid[offset--] = 0x80 | (ident & 0x7f);
  28301. }
  28302. return this._createEncoderBuffer(objid);
  28303. };
  28304. function two(num) {
  28305. if (num < 10)
  28306. return '0' + num;
  28307. else
  28308. return num;
  28309. }
  28310. DERNode.prototype._encodeTime = function encodeTime(time, tag) {
  28311. let str;
  28312. const date = new Date(time);
  28313. if (tag === 'gentime') {
  28314. str = [
  28315. two(date.getUTCFullYear()),
  28316. two(date.getUTCMonth() + 1),
  28317. two(date.getUTCDate()),
  28318. two(date.getUTCHours()),
  28319. two(date.getUTCMinutes()),
  28320. two(date.getUTCSeconds()),
  28321. 'Z'
  28322. ].join('');
  28323. } else if (tag === 'utctime') {
  28324. str = [
  28325. two(date.getUTCFullYear() % 100),
  28326. two(date.getUTCMonth() + 1),
  28327. two(date.getUTCDate()),
  28328. two(date.getUTCHours()),
  28329. two(date.getUTCMinutes()),
  28330. two(date.getUTCSeconds()),
  28331. 'Z'
  28332. ].join('');
  28333. } else {
  28334. this.reporter.error('Encoding ' + tag + ' time is not supported yet');
  28335. }
  28336. return this._encodeStr(str, 'octstr');
  28337. };
  28338. DERNode.prototype._encodeNull = function encodeNull() {
  28339. return this._createEncoderBuffer('');
  28340. };
  28341. DERNode.prototype._encodeInt = function encodeInt(num, values) {
  28342. if (typeof num === 'string') {
  28343. if (!values)
  28344. return this.reporter.error('String int or enum given, but no values map');
  28345. if (!values.hasOwnProperty(num)) {
  28346. return this.reporter.error('Values map doesn\'t contain: ' +
  28347. JSON.stringify(num));
  28348. }
  28349. num = values[num];
  28350. }
  28351. // Bignum, assume big endian
  28352. if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
  28353. const numArray = num.toArray();
  28354. if (!num.sign && numArray[0] & 0x80) {
  28355. numArray.unshift(0);
  28356. }
  28357. num = Buffer.from(numArray);
  28358. }
  28359. if (Buffer.isBuffer(num)) {
  28360. let size = num.length;
  28361. if (num.length === 0)
  28362. size++;
  28363. const out = Buffer.alloc(size);
  28364. num.copy(out);
  28365. if (num.length === 0)
  28366. out[0] = 0;
  28367. return this._createEncoderBuffer(out);
  28368. }
  28369. if (num < 0x80)
  28370. return this._createEncoderBuffer(num);
  28371. if (num < 0x100)
  28372. return this._createEncoderBuffer([0, num]);
  28373. let size = 1;
  28374. for (let i = num; i >= 0x100; i >>= 8)
  28375. size++;
  28376. const out = new Array(size);
  28377. for (let i = out.length - 1; i >= 0; i--) {
  28378. out[i] = num & 0xff;
  28379. num >>= 8;
  28380. }
  28381. if(out[0] & 0x80) {
  28382. out.unshift(0);
  28383. }
  28384. return this._createEncoderBuffer(Buffer.from(out));
  28385. };
  28386. DERNode.prototype._encodeBool = function encodeBool(value) {
  28387. return this._createEncoderBuffer(value ? 0xff : 0);
  28388. };
  28389. DERNode.prototype._use = function use(entity, obj) {
  28390. if (typeof entity === 'function')
  28391. entity = entity(obj);
  28392. return entity._getEncoder('der').tree;
  28393. };
  28394. DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
  28395. const state = this._baseState;
  28396. let i;
  28397. if (state['default'] === null)
  28398. return false;
  28399. const data = dataBuffer.join();
  28400. if (state.defaultBuffer === undefined)
  28401. state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
  28402. if (data.length !== state.defaultBuffer.length)
  28403. return false;
  28404. for (i=0; i < data.length; i++)
  28405. if (data[i] !== state.defaultBuffer[i])
  28406. return false;
  28407. return true;
  28408. };
  28409. // Utility methods
  28410. function encodeTag(tag, primitive, cls, reporter) {
  28411. let res;
  28412. if (tag === 'seqof')
  28413. tag = 'seq';
  28414. else if (tag === 'setof')
  28415. tag = 'set';
  28416. if (der.tagByName.hasOwnProperty(tag))
  28417. res = der.tagByName[tag];
  28418. else if (typeof tag === 'number' && (tag | 0) === tag)
  28419. res = tag;
  28420. else
  28421. return reporter.error('Unknown tag: ' + tag);
  28422. if (res >= 0x1f)
  28423. return reporter.error('Multi-octet tag encoding unsupported');
  28424. if (!primitive)
  28425. res |= 0x20;
  28426. res |= (der.tagClassByName[cls || 'universal'] << 6);
  28427. return res;
  28428. }
  28429. /***/ }),
  28430. /***/ 218:
  28431. /*!********************************************!*\
  28432. !*** ./node_modules/safer-buffer/safer.js ***!
  28433. \********************************************/
  28434. /*! no static exports found */
  28435. /***/ (function(module, exports, __webpack_require__) {
  28436. "use strict";
  28437. /* WEBPACK VAR INJECTION */(function(process) {/* eslint-disable node/no-deprecated-api */
  28438. var buffer = __webpack_require__(/*! buffer */ 90)
  28439. var Buffer = buffer.Buffer
  28440. var safer = {}
  28441. var key
  28442. for (key in buffer) {
  28443. if (!buffer.hasOwnProperty(key)) continue
  28444. if (key === 'SlowBuffer' || key === 'Buffer') continue
  28445. safer[key] = buffer[key]
  28446. }
  28447. var Safer = safer.Buffer = {}
  28448. for (key in Buffer) {
  28449. if (!Buffer.hasOwnProperty(key)) continue
  28450. if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
  28451. Safer[key] = Buffer[key]
  28452. }
  28453. safer.Buffer.prototype = Buffer.prototype
  28454. if (!Safer.from || Safer.from === Uint8Array.from) {
  28455. Safer.from = function (value, encodingOrOffset, length) {
  28456. if (typeof value === 'number') {
  28457. throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
  28458. }
  28459. if (value && typeof value.length === 'undefined') {
  28460. throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
  28461. }
  28462. return Buffer(value, encodingOrOffset, length)
  28463. }
  28464. }
  28465. if (!Safer.alloc) {
  28466. Safer.alloc = function (size, fill, encoding) {
  28467. if (typeof size !== 'number') {
  28468. throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
  28469. }
  28470. if (size < 0 || size >= 2 * (1 << 30)) {
  28471. throw new RangeError('The value "' + size + '" is invalid for option "size"')
  28472. }
  28473. var buf = Buffer(size)
  28474. if (!fill || fill.length === 0) {
  28475. buf.fill(0)
  28476. } else if (typeof encoding === 'string') {
  28477. buf.fill(fill, encoding)
  28478. } else {
  28479. buf.fill(fill)
  28480. }
  28481. return buf
  28482. }
  28483. }
  28484. if (!safer.kStringMaxLength) {
  28485. try {
  28486. safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
  28487. } catch (e) {
  28488. // we can't determine kStringMaxLength in environments where process.binding
  28489. // is unsupported, so let's not set it
  28490. }
  28491. }
  28492. if (!safer.constants) {
  28493. safer.constants = {
  28494. MAX_LENGTH: safer.kMaxLength
  28495. }
  28496. if (safer.kStringMaxLength) {
  28497. safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
  28498. }
  28499. }
  28500. module.exports = safer
  28501. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 87)))
  28502. /***/ }),
  28503. /***/ 219:
  28504. /*!****************************************************!*\
  28505. !*** ./node_modules/asn1.js/lib/asn1/base/node.js ***!
  28506. \****************************************************/
  28507. /*! no static exports found */
  28508. /***/ (function(module, exports, __webpack_require__) {
  28509. "use strict";
  28510. const Reporter = __webpack_require__(/*! ../base/reporter */ 220).Reporter;
  28511. const EncoderBuffer = __webpack_require__(/*! ../base/buffer */ 221).EncoderBuffer;
  28512. const DecoderBuffer = __webpack_require__(/*! ../base/buffer */ 221).DecoderBuffer;
  28513. const assert = __webpack_require__(/*! minimalistic-assert */ 145);
  28514. // Supported tags
  28515. const tags = [
  28516. 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
  28517. 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
  28518. 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
  28519. 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
  28520. ];
  28521. // Public methods list
  28522. const methods = [
  28523. 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
  28524. 'any', 'contains'
  28525. ].concat(tags);
  28526. // Overrided methods list
  28527. const overrided = [
  28528. '_peekTag', '_decodeTag', '_use',
  28529. '_decodeStr', '_decodeObjid', '_decodeTime',
  28530. '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
  28531. '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
  28532. '_encodeNull', '_encodeInt', '_encodeBool'
  28533. ];
  28534. function Node(enc, parent, name) {
  28535. const state = {};
  28536. this._baseState = state;
  28537. state.name = name;
  28538. state.enc = enc;
  28539. state.parent = parent || null;
  28540. state.children = null;
  28541. // State
  28542. state.tag = null;
  28543. state.args = null;
  28544. state.reverseArgs = null;
  28545. state.choice = null;
  28546. state.optional = false;
  28547. state.any = false;
  28548. state.obj = false;
  28549. state.use = null;
  28550. state.useDecoder = null;
  28551. state.key = null;
  28552. state['default'] = null;
  28553. state.explicit = null;
  28554. state.implicit = null;
  28555. state.contains = null;
  28556. // Should create new instance on each method
  28557. if (!state.parent) {
  28558. state.children = [];
  28559. this._wrap();
  28560. }
  28561. }
  28562. module.exports = Node;
  28563. const stateProps = [
  28564. 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
  28565. 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
  28566. 'implicit', 'contains'
  28567. ];
  28568. Node.prototype.clone = function clone() {
  28569. const state = this._baseState;
  28570. const cstate = {};
  28571. stateProps.forEach(function(prop) {
  28572. cstate[prop] = state[prop];
  28573. });
  28574. const res = new this.constructor(cstate.parent);
  28575. res._baseState = cstate;
  28576. return res;
  28577. };
  28578. Node.prototype._wrap = function wrap() {
  28579. const state = this._baseState;
  28580. methods.forEach(function(method) {
  28581. this[method] = function _wrappedMethod() {
  28582. const clone = new this.constructor(this);
  28583. state.children.push(clone);
  28584. return clone[method].apply(clone, arguments);
  28585. };
  28586. }, this);
  28587. };
  28588. Node.prototype._init = function init(body) {
  28589. const state = this._baseState;
  28590. assert(state.parent === null);
  28591. body.call(this);
  28592. // Filter children
  28593. state.children = state.children.filter(function(child) {
  28594. return child._baseState.parent === this;
  28595. }, this);
  28596. assert.equal(state.children.length, 1, 'Root node can have only one child');
  28597. };
  28598. Node.prototype._useArgs = function useArgs(args) {
  28599. const state = this._baseState;
  28600. // Filter children and args
  28601. const children = args.filter(function(arg) {
  28602. return arg instanceof this.constructor;
  28603. }, this);
  28604. args = args.filter(function(arg) {
  28605. return !(arg instanceof this.constructor);
  28606. }, this);
  28607. if (children.length !== 0) {
  28608. assert(state.children === null);
  28609. state.children = children;
  28610. // Replace parent to maintain backward link
  28611. children.forEach(function(child) {
  28612. child._baseState.parent = this;
  28613. }, this);
  28614. }
  28615. if (args.length !== 0) {
  28616. assert(state.args === null);
  28617. state.args = args;
  28618. state.reverseArgs = args.map(function(arg) {
  28619. if (typeof arg !== 'object' || arg.constructor !== Object)
  28620. return arg;
  28621. const res = {};
  28622. Object.keys(arg).forEach(function(key) {
  28623. if (key == (key | 0))
  28624. key |= 0;
  28625. const value = arg[key];
  28626. res[value] = key;
  28627. });
  28628. return res;
  28629. });
  28630. }
  28631. };
  28632. //
  28633. // Overrided methods
  28634. //
  28635. overrided.forEach(function(method) {
  28636. Node.prototype[method] = function _overrided() {
  28637. const state = this._baseState;
  28638. throw new Error(method + ' not implemented for encoding: ' + state.enc);
  28639. };
  28640. });
  28641. //
  28642. // Public methods
  28643. //
  28644. tags.forEach(function(tag) {
  28645. Node.prototype[tag] = function _tagMethod() {
  28646. const state = this._baseState;
  28647. const args = Array.prototype.slice.call(arguments);
  28648. assert(state.tag === null);
  28649. state.tag = tag;
  28650. this._useArgs(args);
  28651. return this;
  28652. };
  28653. });
  28654. Node.prototype.use = function use(item) {
  28655. assert(item);
  28656. const state = this._baseState;
  28657. assert(state.use === null);
  28658. state.use = item;
  28659. return this;
  28660. };
  28661. Node.prototype.optional = function optional() {
  28662. const state = this._baseState;
  28663. state.optional = true;
  28664. return this;
  28665. };
  28666. Node.prototype.def = function def(val) {
  28667. const state = this._baseState;
  28668. assert(state['default'] === null);
  28669. state['default'] = val;
  28670. state.optional = true;
  28671. return this;
  28672. };
  28673. Node.prototype.explicit = function explicit(num) {
  28674. const state = this._baseState;
  28675. assert(state.explicit === null && state.implicit === null);
  28676. state.explicit = num;
  28677. return this;
  28678. };
  28679. Node.prototype.implicit = function implicit(num) {
  28680. const state = this._baseState;
  28681. assert(state.explicit === null && state.implicit === null);
  28682. state.implicit = num;
  28683. return this;
  28684. };
  28685. Node.prototype.obj = function obj() {
  28686. const state = this._baseState;
  28687. const args = Array.prototype.slice.call(arguments);
  28688. state.obj = true;
  28689. if (args.length !== 0)
  28690. this._useArgs(args);
  28691. return this;
  28692. };
  28693. Node.prototype.key = function key(newKey) {
  28694. const state = this._baseState;
  28695. assert(state.key === null);
  28696. state.key = newKey;
  28697. return this;
  28698. };
  28699. Node.prototype.any = function any() {
  28700. const state = this._baseState;
  28701. state.any = true;
  28702. return this;
  28703. };
  28704. Node.prototype.choice = function choice(obj) {
  28705. const state = this._baseState;
  28706. assert(state.choice === null);
  28707. state.choice = obj;
  28708. this._useArgs(Object.keys(obj).map(function(key) {
  28709. return obj[key];
  28710. }));
  28711. return this;
  28712. };
  28713. Node.prototype.contains = function contains(item) {
  28714. const state = this._baseState;
  28715. assert(state.use === null);
  28716. state.contains = item;
  28717. return this;
  28718. };
  28719. //
  28720. // Decoding
  28721. //
  28722. Node.prototype._decode = function decode(input, options) {
  28723. const state = this._baseState;
  28724. // Decode root node
  28725. if (state.parent === null)
  28726. return input.wrapResult(state.children[0]._decode(input, options));
  28727. let result = state['default'];
  28728. let present = true;
  28729. let prevKey = null;
  28730. if (state.key !== null)
  28731. prevKey = input.enterKey(state.key);
  28732. // Check if tag is there
  28733. if (state.optional) {
  28734. let tag = null;
  28735. if (state.explicit !== null)
  28736. tag = state.explicit;
  28737. else if (state.implicit !== null)
  28738. tag = state.implicit;
  28739. else if (state.tag !== null)
  28740. tag = state.tag;
  28741. if (tag === null && !state.any) {
  28742. // Trial and Error
  28743. const save = input.save();
  28744. try {
  28745. if (state.choice === null)
  28746. this._decodeGeneric(state.tag, input, options);
  28747. else
  28748. this._decodeChoice(input, options);
  28749. present = true;
  28750. } catch (e) {
  28751. present = false;
  28752. }
  28753. input.restore(save);
  28754. } else {
  28755. present = this._peekTag(input, tag, state.any);
  28756. if (input.isError(present))
  28757. return present;
  28758. }
  28759. }
  28760. // Push object on stack
  28761. let prevObj;
  28762. if (state.obj && present)
  28763. prevObj = input.enterObject();
  28764. if (present) {
  28765. // Unwrap explicit values
  28766. if (state.explicit !== null) {
  28767. const explicit = this._decodeTag(input, state.explicit);
  28768. if (input.isError(explicit))
  28769. return explicit;
  28770. input = explicit;
  28771. }
  28772. const start = input.offset;
  28773. // Unwrap implicit and normal values
  28774. if (state.use === null && state.choice === null) {
  28775. let save;
  28776. if (state.any)
  28777. save = input.save();
  28778. const body = this._decodeTag(
  28779. input,
  28780. state.implicit !== null ? state.implicit : state.tag,
  28781. state.any
  28782. );
  28783. if (input.isError(body))
  28784. return body;
  28785. if (state.any)
  28786. result = input.raw(save);
  28787. else
  28788. input = body;
  28789. }
  28790. if (options && options.track && state.tag !== null)
  28791. options.track(input.path(), start, input.length, 'tagged');
  28792. if (options && options.track && state.tag !== null)
  28793. options.track(input.path(), input.offset, input.length, 'content');
  28794. // Select proper method for tag
  28795. if (state.any) {
  28796. // no-op
  28797. } else if (state.choice === null) {
  28798. result = this._decodeGeneric(state.tag, input, options);
  28799. } else {
  28800. result = this._decodeChoice(input, options);
  28801. }
  28802. if (input.isError(result))
  28803. return result;
  28804. // Decode children
  28805. if (!state.any && state.choice === null && state.children !== null) {
  28806. state.children.forEach(function decodeChildren(child) {
  28807. // NOTE: We are ignoring errors here, to let parser continue with other
  28808. // parts of encoded data
  28809. child._decode(input, options);
  28810. });
  28811. }
  28812. // Decode contained/encoded by schema, only in bit or octet strings
  28813. if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
  28814. const data = new DecoderBuffer(result);
  28815. result = this._getUse(state.contains, input._reporterState.obj)
  28816. ._decode(data, options);
  28817. }
  28818. }
  28819. // Pop object
  28820. if (state.obj && present)
  28821. result = input.leaveObject(prevObj);
  28822. // Set key
  28823. if (state.key !== null && (result !== null || present === true))
  28824. input.leaveKey(prevKey, state.key, result);
  28825. else if (prevKey !== null)
  28826. input.exitKey(prevKey);
  28827. return result;
  28828. };
  28829. Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
  28830. const state = this._baseState;
  28831. if (tag === 'seq' || tag === 'set')
  28832. return null;
  28833. if (tag === 'seqof' || tag === 'setof')
  28834. return this._decodeList(input, tag, state.args[0], options);
  28835. else if (/str$/.test(tag))
  28836. return this._decodeStr(input, tag, options);
  28837. else if (tag === 'objid' && state.args)
  28838. return this._decodeObjid(input, state.args[0], state.args[1], options);
  28839. else if (tag === 'objid')
  28840. return this._decodeObjid(input, null, null, options);
  28841. else if (tag === 'gentime' || tag === 'utctime')
  28842. return this._decodeTime(input, tag, options);
  28843. else if (tag === 'null_')
  28844. return this._decodeNull(input, options);
  28845. else if (tag === 'bool')
  28846. return this._decodeBool(input, options);
  28847. else if (tag === 'objDesc')
  28848. return this._decodeStr(input, tag, options);
  28849. else if (tag === 'int' || tag === 'enum')
  28850. return this._decodeInt(input, state.args && state.args[0], options);
  28851. if (state.use !== null) {
  28852. return this._getUse(state.use, input._reporterState.obj)
  28853. ._decode(input, options);
  28854. } else {
  28855. return input.error('unknown tag: ' + tag);
  28856. }
  28857. };
  28858. Node.prototype._getUse = function _getUse(entity, obj) {
  28859. const state = this._baseState;
  28860. // Create altered use decoder if implicit is set
  28861. state.useDecoder = this._use(entity, obj);
  28862. assert(state.useDecoder._baseState.parent === null);
  28863. state.useDecoder = state.useDecoder._baseState.children[0];
  28864. if (state.implicit !== state.useDecoder._baseState.implicit) {
  28865. state.useDecoder = state.useDecoder.clone();
  28866. state.useDecoder._baseState.implicit = state.implicit;
  28867. }
  28868. return state.useDecoder;
  28869. };
  28870. Node.prototype._decodeChoice = function decodeChoice(input, options) {
  28871. const state = this._baseState;
  28872. let result = null;
  28873. let match = false;
  28874. Object.keys(state.choice).some(function(key) {
  28875. const save = input.save();
  28876. const node = state.choice[key];
  28877. try {
  28878. const value = node._decode(input, options);
  28879. if (input.isError(value))
  28880. return false;
  28881. result = { type: key, value: value };
  28882. match = true;
  28883. } catch (e) {
  28884. input.restore(save);
  28885. return false;
  28886. }
  28887. return true;
  28888. }, this);
  28889. if (!match)
  28890. return input.error('Choice not matched');
  28891. return result;
  28892. };
  28893. //
  28894. // Encoding
  28895. //
  28896. Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
  28897. return new EncoderBuffer(data, this.reporter);
  28898. };
  28899. Node.prototype._encode = function encode(data, reporter, parent) {
  28900. const state = this._baseState;
  28901. if (state['default'] !== null && state['default'] === data)
  28902. return;
  28903. const result = this._encodeValue(data, reporter, parent);
  28904. if (result === undefined)
  28905. return;
  28906. if (this._skipDefault(result, reporter, parent))
  28907. return;
  28908. return result;
  28909. };
  28910. Node.prototype._encodeValue = function encode(data, reporter, parent) {
  28911. const state = this._baseState;
  28912. // Decode root node
  28913. if (state.parent === null)
  28914. return state.children[0]._encode(data, reporter || new Reporter());
  28915. let result = null;
  28916. // Set reporter to share it with a child class
  28917. this.reporter = reporter;
  28918. // Check if data is there
  28919. if (state.optional && data === undefined) {
  28920. if (state['default'] !== null)
  28921. data = state['default'];
  28922. else
  28923. return;
  28924. }
  28925. // Encode children first
  28926. let content = null;
  28927. let primitive = false;
  28928. if (state.any) {
  28929. // Anything that was given is translated to buffer
  28930. result = this._createEncoderBuffer(data);
  28931. } else if (state.choice) {
  28932. result = this._encodeChoice(data, reporter);
  28933. } else if (state.contains) {
  28934. content = this._getUse(state.contains, parent)._encode(data, reporter);
  28935. primitive = true;
  28936. } else if (state.children) {
  28937. content = state.children.map(function(child) {
  28938. if (child._baseState.tag === 'null_')
  28939. return child._encode(null, reporter, data);
  28940. if (child._baseState.key === null)
  28941. return reporter.error('Child should have a key');
  28942. const prevKey = reporter.enterKey(child._baseState.key);
  28943. if (typeof data !== 'object')
  28944. return reporter.error('Child expected, but input is not object');
  28945. const res = child._encode(data[child._baseState.key], reporter, data);
  28946. reporter.leaveKey(prevKey);
  28947. return res;
  28948. }, this).filter(function(child) {
  28949. return child;
  28950. });
  28951. content = this._createEncoderBuffer(content);
  28952. } else {
  28953. if (state.tag === 'seqof' || state.tag === 'setof') {
  28954. // TODO(indutny): this should be thrown on DSL level
  28955. if (!(state.args && state.args.length === 1))
  28956. return reporter.error('Too many args for : ' + state.tag);
  28957. if (!Array.isArray(data))
  28958. return reporter.error('seqof/setof, but data is not Array');
  28959. const child = this.clone();
  28960. child._baseState.implicit = null;
  28961. content = this._createEncoderBuffer(data.map(function(item) {
  28962. const state = this._baseState;
  28963. return this._getUse(state.args[0], data)._encode(item, reporter);
  28964. }, child));
  28965. } else if (state.use !== null) {
  28966. result = this._getUse(state.use, parent)._encode(data, reporter);
  28967. } else {
  28968. content = this._encodePrimitive(state.tag, data);
  28969. primitive = true;
  28970. }
  28971. }
  28972. // Encode data itself
  28973. if (!state.any && state.choice === null) {
  28974. const tag = state.implicit !== null ? state.implicit : state.tag;
  28975. const cls = state.implicit === null ? 'universal' : 'context';
  28976. if (tag === null) {
  28977. if (state.use === null)
  28978. reporter.error('Tag could be omitted only for .use()');
  28979. } else {
  28980. if (state.use === null)
  28981. result = this._encodeComposite(tag, primitive, cls, content);
  28982. }
  28983. }
  28984. // Wrap in explicit
  28985. if (state.explicit !== null)
  28986. result = this._encodeComposite(state.explicit, false, 'context', result);
  28987. return result;
  28988. };
  28989. Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
  28990. const state = this._baseState;
  28991. const node = state.choice[data.type];
  28992. if (!node) {
  28993. assert(
  28994. false,
  28995. data.type + ' not found in ' +
  28996. JSON.stringify(Object.keys(state.choice)));
  28997. }
  28998. return node._encode(data.value, reporter);
  28999. };
  29000. Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
  29001. const state = this._baseState;
  29002. if (/str$/.test(tag))
  29003. return this._encodeStr(data, tag);
  29004. else if (tag === 'objid' && state.args)
  29005. return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
  29006. else if (tag === 'objid')
  29007. return this._encodeObjid(data, null, null);
  29008. else if (tag === 'gentime' || tag === 'utctime')
  29009. return this._encodeTime(data, tag);
  29010. else if (tag === 'null_')
  29011. return this._encodeNull();
  29012. else if (tag === 'int' || tag === 'enum')
  29013. return this._encodeInt(data, state.args && state.reverseArgs[0]);
  29014. else if (tag === 'bool')
  29015. return this._encodeBool(data);
  29016. else if (tag === 'objDesc')
  29017. return this._encodeStr(data, tag);
  29018. else
  29019. throw new Error('Unsupported tag: ' + tag);
  29020. };
  29021. Node.prototype._isNumstr = function isNumstr(str) {
  29022. return /^[0-9 ]*$/.test(str);
  29023. };
  29024. Node.prototype._isPrintstr = function isPrintstr(str) {
  29025. return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);
  29026. };
  29027. /***/ }),
  29028. /***/ 22:
  29029. /*!*************************************************************!*\
  29030. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  29031. \*************************************************************/
  29032. /*! no static exports found */
  29033. /***/ (function(module, exports, __webpack_require__) {
  29034. "use strict";
  29035. /* WEBPACK VAR INJECTION */(function(uni, global) {
  29036. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  29037. Object.defineProperty(exports, "__esModule", {
  29038. value: true
  29039. });
  29040. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  29041. exports.compileI18nJsonStr = compileI18nJsonStr;
  29042. exports.hasI18nJson = hasI18nJson;
  29043. exports.initVueI18n = initVueI18n;
  29044. exports.isI18nStr = isI18nStr;
  29045. exports.isString = void 0;
  29046. exports.normalizeLocale = normalizeLocale;
  29047. exports.parseI18nJson = parseI18nJson;
  29048. exports.resolveLocale = resolveLocale;
  29049. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  29050. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  29051. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  29052. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  29053. var isArray = Array.isArray;
  29054. var isObject = function isObject(val) {
  29055. return val !== null && (0, _typeof2.default)(val) === 'object';
  29056. };
  29057. var defaultDelimiters = ['{', '}'];
  29058. var BaseFormatter = /*#__PURE__*/function () {
  29059. function BaseFormatter() {
  29060. (0, _classCallCheck2.default)(this, BaseFormatter);
  29061. this._caches = Object.create(null);
  29062. }
  29063. (0, _createClass2.default)(BaseFormatter, [{
  29064. key: "interpolate",
  29065. value: function interpolate(message, values) {
  29066. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  29067. if (!values) {
  29068. return [message];
  29069. }
  29070. var tokens = this._caches[message];
  29071. if (!tokens) {
  29072. tokens = parse(message, delimiters);
  29073. this._caches[message] = tokens;
  29074. }
  29075. return compile(tokens, values);
  29076. }
  29077. }]);
  29078. return BaseFormatter;
  29079. }();
  29080. exports.Formatter = BaseFormatter;
  29081. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  29082. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  29083. function parse(format, _ref) {
  29084. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  29085. startDelimiter = _ref2[0],
  29086. endDelimiter = _ref2[1];
  29087. var tokens = [];
  29088. var position = 0;
  29089. var text = '';
  29090. while (position < format.length) {
  29091. var char = format[position++];
  29092. if (char === startDelimiter) {
  29093. if (text) {
  29094. tokens.push({
  29095. type: 'text',
  29096. value: text
  29097. });
  29098. }
  29099. text = '';
  29100. var sub = '';
  29101. char = format[position++];
  29102. while (char !== undefined && char !== endDelimiter) {
  29103. sub += char;
  29104. char = format[position++];
  29105. }
  29106. var isClosed = char === endDelimiter;
  29107. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  29108. tokens.push({
  29109. value: sub,
  29110. type: type
  29111. });
  29112. }
  29113. // else if (char === '%') {
  29114. // // when found rails i18n syntax, skip text capture
  29115. // if (format[position] !== '{') {
  29116. // text += char
  29117. // }
  29118. // }
  29119. else {
  29120. text += char;
  29121. }
  29122. }
  29123. text && tokens.push({
  29124. type: 'text',
  29125. value: text
  29126. });
  29127. return tokens;
  29128. }
  29129. function compile(tokens, values) {
  29130. var compiled = [];
  29131. var index = 0;
  29132. var mode = isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  29133. if (mode === 'unknown') {
  29134. return compiled;
  29135. }
  29136. while (index < tokens.length) {
  29137. var token = tokens[index];
  29138. switch (token.type) {
  29139. case 'text':
  29140. compiled.push(token.value);
  29141. break;
  29142. case 'list':
  29143. compiled.push(values[parseInt(token.value, 10)]);
  29144. break;
  29145. case 'named':
  29146. if (mode === 'named') {
  29147. compiled.push(values[token.value]);
  29148. } else {
  29149. if (true) {
  29150. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  29151. }
  29152. }
  29153. break;
  29154. case 'unknown':
  29155. if (true) {
  29156. console.warn("Detect 'unknown' type of token!");
  29157. }
  29158. break;
  29159. }
  29160. index++;
  29161. }
  29162. return compiled;
  29163. }
  29164. var LOCALE_ZH_HANS = 'zh-Hans';
  29165. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  29166. var LOCALE_ZH_HANT = 'zh-Hant';
  29167. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  29168. var LOCALE_EN = 'en';
  29169. exports.LOCALE_EN = LOCALE_EN;
  29170. var LOCALE_FR = 'fr';
  29171. exports.LOCALE_FR = LOCALE_FR;
  29172. var LOCALE_ES = 'es';
  29173. exports.LOCALE_ES = LOCALE_ES;
  29174. var hasOwnProperty = Object.prototype.hasOwnProperty;
  29175. var hasOwn = function hasOwn(val, key) {
  29176. return hasOwnProperty.call(val, key);
  29177. };
  29178. var defaultFormatter = new BaseFormatter();
  29179. function include(str, parts) {
  29180. return !!parts.find(function (part) {
  29181. return str.indexOf(part) !== -1;
  29182. });
  29183. }
  29184. function startsWith(str, parts) {
  29185. return parts.find(function (part) {
  29186. return str.indexOf(part) === 0;
  29187. });
  29188. }
  29189. function normalizeLocale(locale, messages) {
  29190. if (!locale) {
  29191. return;
  29192. }
  29193. locale = locale.trim().replace(/_/g, '-');
  29194. if (messages && messages[locale]) {
  29195. return locale;
  29196. }
  29197. locale = locale.toLowerCase();
  29198. if (locale.indexOf('zh') === 0) {
  29199. if (locale.indexOf('-hans') > -1) {
  29200. return LOCALE_ZH_HANS;
  29201. }
  29202. if (locale.indexOf('-hant') > -1) {
  29203. return LOCALE_ZH_HANT;
  29204. }
  29205. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  29206. return LOCALE_ZH_HANT;
  29207. }
  29208. return LOCALE_ZH_HANS;
  29209. }
  29210. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  29211. if (lang) {
  29212. return lang;
  29213. }
  29214. }
  29215. var I18n = /*#__PURE__*/function () {
  29216. function I18n(_ref3) {
  29217. var locale = _ref3.locale,
  29218. fallbackLocale = _ref3.fallbackLocale,
  29219. messages = _ref3.messages,
  29220. watcher = _ref3.watcher,
  29221. formater = _ref3.formater;
  29222. (0, _classCallCheck2.default)(this, I18n);
  29223. this.locale = LOCALE_EN;
  29224. this.fallbackLocale = LOCALE_EN;
  29225. this.message = {};
  29226. this.messages = {};
  29227. this.watchers = [];
  29228. if (fallbackLocale) {
  29229. this.fallbackLocale = fallbackLocale;
  29230. }
  29231. this.formater = formater || defaultFormatter;
  29232. this.messages = messages || {};
  29233. this.setLocale(locale || LOCALE_EN);
  29234. if (watcher) {
  29235. this.watchLocale(watcher);
  29236. }
  29237. }
  29238. (0, _createClass2.default)(I18n, [{
  29239. key: "setLocale",
  29240. value: function setLocale(locale) {
  29241. var _this = this;
  29242. var oldLocale = this.locale;
  29243. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  29244. if (!this.messages[this.locale]) {
  29245. // 可能初始化时不存在
  29246. this.messages[this.locale] = {};
  29247. }
  29248. this.message = this.messages[this.locale];
  29249. // 仅发生变化时,通知
  29250. if (oldLocale !== this.locale) {
  29251. this.watchers.forEach(function (watcher) {
  29252. watcher(_this.locale, oldLocale);
  29253. });
  29254. }
  29255. }
  29256. }, {
  29257. key: "getLocale",
  29258. value: function getLocale() {
  29259. return this.locale;
  29260. }
  29261. }, {
  29262. key: "watchLocale",
  29263. value: function watchLocale(fn) {
  29264. var _this2 = this;
  29265. var index = this.watchers.push(fn) - 1;
  29266. return function () {
  29267. _this2.watchers.splice(index, 1);
  29268. };
  29269. }
  29270. }, {
  29271. key: "add",
  29272. value: function add(locale, message) {
  29273. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  29274. var curMessages = this.messages[locale];
  29275. if (curMessages) {
  29276. if (override) {
  29277. Object.assign(curMessages, message);
  29278. } else {
  29279. Object.keys(message).forEach(function (key) {
  29280. if (!hasOwn(curMessages, key)) {
  29281. curMessages[key] = message[key];
  29282. }
  29283. });
  29284. }
  29285. } else {
  29286. this.messages[locale] = message;
  29287. }
  29288. }
  29289. }, {
  29290. key: "f",
  29291. value: function f(message, values, delimiters) {
  29292. return this.formater.interpolate(message, values, delimiters).join('');
  29293. }
  29294. }, {
  29295. key: "t",
  29296. value: function t(key, locale, values) {
  29297. var message = this.message;
  29298. if (typeof locale === 'string') {
  29299. locale = normalizeLocale(locale, this.messages);
  29300. locale && (message = this.messages[locale]);
  29301. } else {
  29302. values = locale;
  29303. }
  29304. if (!hasOwn(message, key)) {
  29305. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  29306. return key;
  29307. }
  29308. return this.formater.interpolate(message[key], values).join('');
  29309. }
  29310. }]);
  29311. return I18n;
  29312. }();
  29313. exports.I18n = I18n;
  29314. function watchAppLocale(appVm, i18n) {
  29315. // 需要保证 watch 的触发在组件渲染之前
  29316. if (appVm.$watchLocale) {
  29317. // vue2
  29318. appVm.$watchLocale(function (newLocale) {
  29319. i18n.setLocale(newLocale);
  29320. });
  29321. } else {
  29322. appVm.$watch(function () {
  29323. return appVm.$locale;
  29324. }, function (newLocale) {
  29325. i18n.setLocale(newLocale);
  29326. });
  29327. }
  29328. }
  29329. function getDefaultLocale() {
  29330. if (typeof uni !== 'undefined' && uni.getLocale) {
  29331. return uni.getLocale();
  29332. }
  29333. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  29334. if (typeof global !== 'undefined' && global.getLocale) {
  29335. return global.getLocale();
  29336. }
  29337. return LOCALE_EN;
  29338. }
  29339. function initVueI18n(locale) {
  29340. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  29341. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  29342. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  29343. // 兼容旧版本入参
  29344. if (typeof locale !== 'string') {
  29345. var _ref4 = [messages, locale];
  29346. locale = _ref4[0];
  29347. messages = _ref4[1];
  29348. }
  29349. if (typeof locale !== 'string') {
  29350. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  29351. locale = getDefaultLocale();
  29352. }
  29353. if (typeof fallbackLocale !== 'string') {
  29354. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  29355. }
  29356. var i18n = new I18n({
  29357. locale: locale,
  29358. fallbackLocale: fallbackLocale,
  29359. messages: messages,
  29360. watcher: watcher
  29361. });
  29362. var _t = function t(key, values) {
  29363. if (typeof getApp !== 'function') {
  29364. // app view
  29365. /* eslint-disable no-func-assign */
  29366. _t = function t(key, values) {
  29367. return i18n.t(key, values);
  29368. };
  29369. } else {
  29370. var isWatchedAppLocale = false;
  29371. _t = function t(key, values) {
  29372. var appVm = getApp().$vm;
  29373. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  29374. // options: {
  29375. // type: Array,
  29376. // default () {
  29377. // return [{
  29378. // icon: 'shop',
  29379. // text: t("uni-goods-nav.options.shop"),
  29380. // }, {
  29381. // icon: 'cart',
  29382. // text: t("uni-goods-nav.options.cart")
  29383. // }]
  29384. // }
  29385. // },
  29386. if (appVm) {
  29387. // 触发响应式
  29388. appVm.$locale;
  29389. if (!isWatchedAppLocale) {
  29390. isWatchedAppLocale = true;
  29391. watchAppLocale(appVm, i18n);
  29392. }
  29393. }
  29394. return i18n.t(key, values);
  29395. };
  29396. }
  29397. return _t(key, values);
  29398. };
  29399. return {
  29400. i18n: i18n,
  29401. f: function f(message, values, delimiters) {
  29402. return i18n.f(message, values, delimiters);
  29403. },
  29404. t: function t(key, values) {
  29405. return _t(key, values);
  29406. },
  29407. add: function add(locale, message) {
  29408. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  29409. return i18n.add(locale, message, override);
  29410. },
  29411. watch: function watch(fn) {
  29412. return i18n.watchLocale(fn);
  29413. },
  29414. getLocale: function getLocale() {
  29415. return i18n.getLocale();
  29416. },
  29417. setLocale: function setLocale(newLocale) {
  29418. return i18n.setLocale(newLocale);
  29419. }
  29420. };
  29421. }
  29422. var isString = function isString(val) {
  29423. return typeof val === 'string';
  29424. };
  29425. exports.isString = isString;
  29426. var formater;
  29427. function hasI18nJson(jsonObj, delimiters) {
  29428. if (!formater) {
  29429. formater = new BaseFormatter();
  29430. }
  29431. return walkJsonObj(jsonObj, function (jsonObj, key) {
  29432. var value = jsonObj[key];
  29433. if (isString(value)) {
  29434. if (isI18nStr(value, delimiters)) {
  29435. return true;
  29436. }
  29437. } else {
  29438. return hasI18nJson(value, delimiters);
  29439. }
  29440. });
  29441. }
  29442. function parseI18nJson(jsonObj, values, delimiters) {
  29443. if (!formater) {
  29444. formater = new BaseFormatter();
  29445. }
  29446. walkJsonObj(jsonObj, function (jsonObj, key) {
  29447. var value = jsonObj[key];
  29448. if (isString(value)) {
  29449. if (isI18nStr(value, delimiters)) {
  29450. jsonObj[key] = compileStr(value, values, delimiters);
  29451. }
  29452. } else {
  29453. parseI18nJson(value, values, delimiters);
  29454. }
  29455. });
  29456. return jsonObj;
  29457. }
  29458. function compileI18nJsonStr(jsonStr, _ref5) {
  29459. var locale = _ref5.locale,
  29460. locales = _ref5.locales,
  29461. delimiters = _ref5.delimiters;
  29462. if (!isI18nStr(jsonStr, delimiters)) {
  29463. return jsonStr;
  29464. }
  29465. if (!formater) {
  29466. formater = new BaseFormatter();
  29467. }
  29468. var localeValues = [];
  29469. Object.keys(locales).forEach(function (name) {
  29470. if (name !== locale) {
  29471. localeValues.push({
  29472. locale: name,
  29473. values: locales[name]
  29474. });
  29475. }
  29476. });
  29477. localeValues.unshift({
  29478. locale: locale,
  29479. values: locales[locale]
  29480. });
  29481. try {
  29482. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  29483. } catch (e) {}
  29484. return jsonStr;
  29485. }
  29486. function isI18nStr(value, delimiters) {
  29487. return value.indexOf(delimiters[0]) > -1;
  29488. }
  29489. function compileStr(value, values, delimiters) {
  29490. return formater.interpolate(value, values, delimiters).join('');
  29491. }
  29492. function compileValue(jsonObj, key, localeValues, delimiters) {
  29493. var value = jsonObj[key];
  29494. if (isString(value)) {
  29495. // 存在国际化
  29496. if (isI18nStr(value, delimiters)) {
  29497. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  29498. if (localeValues.length > 1) {
  29499. // 格式化国际化语言
  29500. var valueLocales = jsonObj[key + 'Locales'] = {};
  29501. localeValues.forEach(function (localValue) {
  29502. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  29503. });
  29504. }
  29505. }
  29506. } else {
  29507. compileJsonObj(value, localeValues, delimiters);
  29508. }
  29509. }
  29510. function compileJsonObj(jsonObj, localeValues, delimiters) {
  29511. walkJsonObj(jsonObj, function (jsonObj, key) {
  29512. compileValue(jsonObj, key, localeValues, delimiters);
  29513. });
  29514. return jsonObj;
  29515. }
  29516. function walkJsonObj(jsonObj, walk) {
  29517. if (isArray(jsonObj)) {
  29518. for (var i = 0; i < jsonObj.length; i++) {
  29519. if (walk(jsonObj, i)) {
  29520. return true;
  29521. }
  29522. }
  29523. } else if (isObject(jsonObj)) {
  29524. for (var key in jsonObj) {
  29525. if (walk(jsonObj, key)) {
  29526. return true;
  29527. }
  29528. }
  29529. }
  29530. return false;
  29531. }
  29532. function resolveLocale(locales) {
  29533. return function (locale) {
  29534. if (!locale) {
  29535. return locale;
  29536. }
  29537. locale = normalizeLocale(locale) || locale;
  29538. return resolveLocaleChain(locale).find(function (locale) {
  29539. return locales.indexOf(locale) > -1;
  29540. });
  29541. };
  29542. }
  29543. function resolveLocaleChain(locale) {
  29544. var chain = [];
  29545. var tokens = locale.split('-');
  29546. while (tokens.length) {
  29547. chain.push(tokens.join('-'));
  29548. tokens.pop();
  29549. }
  29550. return chain;
  29551. }
  29552. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  29553. /***/ }),
  29554. /***/ 220:
  29555. /*!********************************************************!*\
  29556. !*** ./node_modules/asn1.js/lib/asn1/base/reporter.js ***!
  29557. \********************************************************/
  29558. /*! no static exports found */
  29559. /***/ (function(module, exports, __webpack_require__) {
  29560. "use strict";
  29561. const inherits = __webpack_require__(/*! inherits */ 95);
  29562. function Reporter(options) {
  29563. this._reporterState = {
  29564. obj: null,
  29565. path: [],
  29566. options: options || {},
  29567. errors: []
  29568. };
  29569. }
  29570. exports.Reporter = Reporter;
  29571. Reporter.prototype.isError = function isError(obj) {
  29572. return obj instanceof ReporterError;
  29573. };
  29574. Reporter.prototype.save = function save() {
  29575. const state = this._reporterState;
  29576. return { obj: state.obj, pathLen: state.path.length };
  29577. };
  29578. Reporter.prototype.restore = function restore(data) {
  29579. const state = this._reporterState;
  29580. state.obj = data.obj;
  29581. state.path = state.path.slice(0, data.pathLen);
  29582. };
  29583. Reporter.prototype.enterKey = function enterKey(key) {
  29584. return this._reporterState.path.push(key);
  29585. };
  29586. Reporter.prototype.exitKey = function exitKey(index) {
  29587. const state = this._reporterState;
  29588. state.path = state.path.slice(0, index - 1);
  29589. };
  29590. Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
  29591. const state = this._reporterState;
  29592. this.exitKey(index);
  29593. if (state.obj !== null)
  29594. state.obj[key] = value;
  29595. };
  29596. Reporter.prototype.path = function path() {
  29597. return this._reporterState.path.join('/');
  29598. };
  29599. Reporter.prototype.enterObject = function enterObject() {
  29600. const state = this._reporterState;
  29601. const prev = state.obj;
  29602. state.obj = {};
  29603. return prev;
  29604. };
  29605. Reporter.prototype.leaveObject = function leaveObject(prev) {
  29606. const state = this._reporterState;
  29607. const now = state.obj;
  29608. state.obj = prev;
  29609. return now;
  29610. };
  29611. Reporter.prototype.error = function error(msg) {
  29612. let err;
  29613. const state = this._reporterState;
  29614. const inherited = msg instanceof ReporterError;
  29615. if (inherited) {
  29616. err = msg;
  29617. } else {
  29618. err = new ReporterError(state.path.map(function(elem) {
  29619. return '[' + JSON.stringify(elem) + ']';
  29620. }).join(''), msg.message || msg, msg.stack);
  29621. }
  29622. if (!state.options.partial)
  29623. throw err;
  29624. if (!inherited)
  29625. state.errors.push(err);
  29626. return err;
  29627. };
  29628. Reporter.prototype.wrapResult = function wrapResult(result) {
  29629. const state = this._reporterState;
  29630. if (!state.options.partial)
  29631. return result;
  29632. return {
  29633. result: this.isError(result) ? null : result,
  29634. errors: state.errors
  29635. };
  29636. };
  29637. function ReporterError(path, msg) {
  29638. this.path = path;
  29639. this.rethrow(msg);
  29640. }
  29641. inherits(ReporterError, Error);
  29642. ReporterError.prototype.rethrow = function rethrow(msg) {
  29643. this.message = msg + ' at: ' + (this.path || '(shallow)');
  29644. if (Error.captureStackTrace)
  29645. Error.captureStackTrace(this, ReporterError);
  29646. if (!this.stack) {
  29647. try {
  29648. // IE only adds stack when thrown
  29649. throw new Error(this.message);
  29650. } catch (e) {
  29651. this.stack = e.stack;
  29652. }
  29653. }
  29654. return this;
  29655. };
  29656. /***/ }),
  29657. /***/ 221:
  29658. /*!******************************************************!*\
  29659. !*** ./node_modules/asn1.js/lib/asn1/base/buffer.js ***!
  29660. \******************************************************/
  29661. /*! no static exports found */
  29662. /***/ (function(module, exports, __webpack_require__) {
  29663. "use strict";
  29664. const inherits = __webpack_require__(/*! inherits */ 95);
  29665. const Reporter = __webpack_require__(/*! ../base/reporter */ 220).Reporter;
  29666. const Buffer = __webpack_require__(/*! safer-buffer */ 218).Buffer;
  29667. function DecoderBuffer(base, options) {
  29668. Reporter.call(this, options);
  29669. if (!Buffer.isBuffer(base)) {
  29670. this.error('Input not Buffer');
  29671. return;
  29672. }
  29673. this.base = base;
  29674. this.offset = 0;
  29675. this.length = base.length;
  29676. }
  29677. inherits(DecoderBuffer, Reporter);
  29678. exports.DecoderBuffer = DecoderBuffer;
  29679. DecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {
  29680. if (data instanceof DecoderBuffer) {
  29681. return true;
  29682. }
  29683. // Or accept compatible API
  29684. const isCompatible = typeof data === 'object' &&
  29685. Buffer.isBuffer(data.base) &&
  29686. data.constructor.name === 'DecoderBuffer' &&
  29687. typeof data.offset === 'number' &&
  29688. typeof data.length === 'number' &&
  29689. typeof data.save === 'function' &&
  29690. typeof data.restore === 'function' &&
  29691. typeof data.isEmpty === 'function' &&
  29692. typeof data.readUInt8 === 'function' &&
  29693. typeof data.skip === 'function' &&
  29694. typeof data.raw === 'function';
  29695. return isCompatible;
  29696. };
  29697. DecoderBuffer.prototype.save = function save() {
  29698. return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
  29699. };
  29700. DecoderBuffer.prototype.restore = function restore(save) {
  29701. // Return skipped data
  29702. const res = new DecoderBuffer(this.base);
  29703. res.offset = save.offset;
  29704. res.length = this.offset;
  29705. this.offset = save.offset;
  29706. Reporter.prototype.restore.call(this, save.reporter);
  29707. return res;
  29708. };
  29709. DecoderBuffer.prototype.isEmpty = function isEmpty() {
  29710. return this.offset === this.length;
  29711. };
  29712. DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
  29713. if (this.offset + 1 <= this.length)
  29714. return this.base.readUInt8(this.offset++, true);
  29715. else
  29716. return this.error(fail || 'DecoderBuffer overrun');
  29717. };
  29718. DecoderBuffer.prototype.skip = function skip(bytes, fail) {
  29719. if (!(this.offset + bytes <= this.length))
  29720. return this.error(fail || 'DecoderBuffer overrun');
  29721. const res = new DecoderBuffer(this.base);
  29722. // Share reporter state
  29723. res._reporterState = this._reporterState;
  29724. res.offset = this.offset;
  29725. res.length = this.offset + bytes;
  29726. this.offset += bytes;
  29727. return res;
  29728. };
  29729. DecoderBuffer.prototype.raw = function raw(save) {
  29730. return this.base.slice(save ? save.offset : this.offset, this.length);
  29731. };
  29732. function EncoderBuffer(value, reporter) {
  29733. if (Array.isArray(value)) {
  29734. this.length = 0;
  29735. this.value = value.map(function(item) {
  29736. if (!EncoderBuffer.isEncoderBuffer(item))
  29737. item = new EncoderBuffer(item, reporter);
  29738. this.length += item.length;
  29739. return item;
  29740. }, this);
  29741. } else if (typeof value === 'number') {
  29742. if (!(0 <= value && value <= 0xff))
  29743. return reporter.error('non-byte EncoderBuffer value');
  29744. this.value = value;
  29745. this.length = 1;
  29746. } else if (typeof value === 'string') {
  29747. this.value = value;
  29748. this.length = Buffer.byteLength(value);
  29749. } else if (Buffer.isBuffer(value)) {
  29750. this.value = value;
  29751. this.length = value.length;
  29752. } else {
  29753. return reporter.error('Unsupported type: ' + typeof value);
  29754. }
  29755. }
  29756. exports.EncoderBuffer = EncoderBuffer;
  29757. EncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {
  29758. if (data instanceof EncoderBuffer) {
  29759. return true;
  29760. }
  29761. // Or accept compatible API
  29762. const isCompatible = typeof data === 'object' &&
  29763. data.constructor.name === 'EncoderBuffer' &&
  29764. typeof data.length === 'number' &&
  29765. typeof data.join === 'function';
  29766. return isCompatible;
  29767. };
  29768. EncoderBuffer.prototype.join = function join(out, offset) {
  29769. if (!out)
  29770. out = Buffer.alloc(this.length);
  29771. if (!offset)
  29772. offset = 0;
  29773. if (this.length === 0)
  29774. return out;
  29775. if (Array.isArray(this.value)) {
  29776. this.value.forEach(function(item) {
  29777. item.join(out, offset);
  29778. offset += item.length;
  29779. });
  29780. } else {
  29781. if (typeof this.value === 'number')
  29782. out[offset] = this.value;
  29783. else if (typeof this.value === 'string')
  29784. out.write(this.value, offset);
  29785. else if (Buffer.isBuffer(this.value))
  29786. this.value.copy(out, offset);
  29787. offset += this.length;
  29788. }
  29789. return out;
  29790. };
  29791. /***/ }),
  29792. /***/ 222:
  29793. /*!********************************************************!*\
  29794. !*** ./node_modules/asn1.js/lib/asn1/constants/der.js ***!
  29795. \********************************************************/
  29796. /*! no static exports found */
  29797. /***/ (function(module, exports, __webpack_require__) {
  29798. "use strict";
  29799. // Helper
  29800. function reverse(map) {
  29801. const res = {};
  29802. Object.keys(map).forEach(function(key) {
  29803. // Convert key to integer if it is stringified
  29804. if ((key | 0) == key)
  29805. key = key | 0;
  29806. const value = map[key];
  29807. res[value] = key;
  29808. });
  29809. return res;
  29810. }
  29811. exports.tagClass = {
  29812. 0: 'universal',
  29813. 1: 'application',
  29814. 2: 'context',
  29815. 3: 'private'
  29816. };
  29817. exports.tagClassByName = reverse(exports.tagClass);
  29818. exports.tag = {
  29819. 0x00: 'end',
  29820. 0x01: 'bool',
  29821. 0x02: 'int',
  29822. 0x03: 'bitstr',
  29823. 0x04: 'octstr',
  29824. 0x05: 'null_',
  29825. 0x06: 'objid',
  29826. 0x07: 'objDesc',
  29827. 0x08: 'external',
  29828. 0x09: 'real',
  29829. 0x0a: 'enum',
  29830. 0x0b: 'embed',
  29831. 0x0c: 'utf8str',
  29832. 0x0d: 'relativeOid',
  29833. 0x10: 'seq',
  29834. 0x11: 'set',
  29835. 0x12: 'numstr',
  29836. 0x13: 'printstr',
  29837. 0x14: 't61str',
  29838. 0x15: 'videostr',
  29839. 0x16: 'ia5str',
  29840. 0x17: 'utctime',
  29841. 0x18: 'gentime',
  29842. 0x19: 'graphstr',
  29843. 0x1a: 'iso646str',
  29844. 0x1b: 'genstr',
  29845. 0x1c: 'unistr',
  29846. 0x1d: 'charstr',
  29847. 0x1e: 'bmpstr'
  29848. };
  29849. exports.tagByName = reverse(exports.tag);
  29850. /***/ }),
  29851. /***/ 223:
  29852. /*!*******************************************************!*\
  29853. !*** ./node_modules/asn1.js/lib/asn1/encoders/pem.js ***!
  29854. \*******************************************************/
  29855. /*! no static exports found */
  29856. /***/ (function(module, exports, __webpack_require__) {
  29857. "use strict";
  29858. const inherits = __webpack_require__(/*! inherits */ 95);
  29859. const DEREncoder = __webpack_require__(/*! ./der */ 217);
  29860. function PEMEncoder(entity) {
  29861. DEREncoder.call(this, entity);
  29862. this.enc = 'pem';
  29863. }
  29864. inherits(PEMEncoder, DEREncoder);
  29865. module.exports = PEMEncoder;
  29866. PEMEncoder.prototype.encode = function encode(data, options) {
  29867. const buf = DEREncoder.prototype.encode.call(this, data);
  29868. const p = buf.toString('base64');
  29869. const out = [ '-----BEGIN ' + options.label + '-----' ];
  29870. for (let i = 0; i < p.length; i += 64)
  29871. out.push(p.slice(i, i + 64));
  29872. out.push('-----END ' + options.label + '-----');
  29873. return out.join('\n');
  29874. };
  29875. /***/ }),
  29876. /***/ 224:
  29877. /*!*********************************************************!*\
  29878. !*** ./node_modules/asn1.js/lib/asn1/decoders/index.js ***!
  29879. \*********************************************************/
  29880. /*! no static exports found */
  29881. /***/ (function(module, exports, __webpack_require__) {
  29882. "use strict";
  29883. const decoders = exports;
  29884. decoders.der = __webpack_require__(/*! ./der */ 225);
  29885. decoders.pem = __webpack_require__(/*! ./pem */ 226);
  29886. /***/ }),
  29887. /***/ 225:
  29888. /*!*******************************************************!*\
  29889. !*** ./node_modules/asn1.js/lib/asn1/decoders/der.js ***!
  29890. \*******************************************************/
  29891. /*! no static exports found */
  29892. /***/ (function(module, exports, __webpack_require__) {
  29893. "use strict";
  29894. const inherits = __webpack_require__(/*! inherits */ 95);
  29895. const bignum = __webpack_require__(/*! bn.js */ 171);
  29896. const DecoderBuffer = __webpack_require__(/*! ../base/buffer */ 221).DecoderBuffer;
  29897. const Node = __webpack_require__(/*! ../base/node */ 219);
  29898. // Import DER constants
  29899. const der = __webpack_require__(/*! ../constants/der */ 222);
  29900. function DERDecoder(entity) {
  29901. this.enc = 'der';
  29902. this.name = entity.name;
  29903. this.entity = entity;
  29904. // Construct base tree
  29905. this.tree = new DERNode();
  29906. this.tree._init(entity.body);
  29907. }
  29908. module.exports = DERDecoder;
  29909. DERDecoder.prototype.decode = function decode(data, options) {
  29910. if (!DecoderBuffer.isDecoderBuffer(data)) {
  29911. data = new DecoderBuffer(data, options);
  29912. }
  29913. return this.tree._decode(data, options);
  29914. };
  29915. // Tree methods
  29916. function DERNode(parent) {
  29917. Node.call(this, 'der', parent);
  29918. }
  29919. inherits(DERNode, Node);
  29920. DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
  29921. if (buffer.isEmpty())
  29922. return false;
  29923. const state = buffer.save();
  29924. const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
  29925. if (buffer.isError(decodedTag))
  29926. return decodedTag;
  29927. buffer.restore(state);
  29928. return decodedTag.tag === tag || decodedTag.tagStr === tag ||
  29929. (decodedTag.tagStr + 'of') === tag || any;
  29930. };
  29931. DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
  29932. const decodedTag = derDecodeTag(buffer,
  29933. 'Failed to decode tag of "' + tag + '"');
  29934. if (buffer.isError(decodedTag))
  29935. return decodedTag;
  29936. let len = derDecodeLen(buffer,
  29937. decodedTag.primitive,
  29938. 'Failed to get length of "' + tag + '"');
  29939. // Failure
  29940. if (buffer.isError(len))
  29941. return len;
  29942. if (!any &&
  29943. decodedTag.tag !== tag &&
  29944. decodedTag.tagStr !== tag &&
  29945. decodedTag.tagStr + 'of' !== tag) {
  29946. return buffer.error('Failed to match tag: "' + tag + '"');
  29947. }
  29948. if (decodedTag.primitive || len !== null)
  29949. return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
  29950. // Indefinite length... find END tag
  29951. const state = buffer.save();
  29952. const res = this._skipUntilEnd(
  29953. buffer,
  29954. 'Failed to skip indefinite length body: "' + this.tag + '"');
  29955. if (buffer.isError(res))
  29956. return res;
  29957. len = buffer.offset - state.offset;
  29958. buffer.restore(state);
  29959. return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
  29960. };
  29961. DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
  29962. for (;;) {
  29963. const tag = derDecodeTag(buffer, fail);
  29964. if (buffer.isError(tag))
  29965. return tag;
  29966. const len = derDecodeLen(buffer, tag.primitive, fail);
  29967. if (buffer.isError(len))
  29968. return len;
  29969. let res;
  29970. if (tag.primitive || len !== null)
  29971. res = buffer.skip(len);
  29972. else
  29973. res = this._skipUntilEnd(buffer, fail);
  29974. // Failure
  29975. if (buffer.isError(res))
  29976. return res;
  29977. if (tag.tagStr === 'end')
  29978. break;
  29979. }
  29980. };
  29981. DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
  29982. options) {
  29983. const result = [];
  29984. while (!buffer.isEmpty()) {
  29985. const possibleEnd = this._peekTag(buffer, 'end');
  29986. if (buffer.isError(possibleEnd))
  29987. return possibleEnd;
  29988. const res = decoder.decode(buffer, 'der', options);
  29989. if (buffer.isError(res) && possibleEnd)
  29990. break;
  29991. result.push(res);
  29992. }
  29993. return result;
  29994. };
  29995. DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
  29996. if (tag === 'bitstr') {
  29997. const unused = buffer.readUInt8();
  29998. if (buffer.isError(unused))
  29999. return unused;
  30000. return { unused: unused, data: buffer.raw() };
  30001. } else if (tag === 'bmpstr') {
  30002. const raw = buffer.raw();
  30003. if (raw.length % 2 === 1)
  30004. return buffer.error('Decoding of string type: bmpstr length mismatch');
  30005. let str = '';
  30006. for (let i = 0; i < raw.length / 2; i++) {
  30007. str += String.fromCharCode(raw.readUInt16BE(i * 2));
  30008. }
  30009. return str;
  30010. } else if (tag === 'numstr') {
  30011. const numstr = buffer.raw().toString('ascii');
  30012. if (!this._isNumstr(numstr)) {
  30013. return buffer.error('Decoding of string type: ' +
  30014. 'numstr unsupported characters');
  30015. }
  30016. return numstr;
  30017. } else if (tag === 'octstr') {
  30018. return buffer.raw();
  30019. } else if (tag === 'objDesc') {
  30020. return buffer.raw();
  30021. } else if (tag === 'printstr') {
  30022. const printstr = buffer.raw().toString('ascii');
  30023. if (!this._isPrintstr(printstr)) {
  30024. return buffer.error('Decoding of string type: ' +
  30025. 'printstr unsupported characters');
  30026. }
  30027. return printstr;
  30028. } else if (/str$/.test(tag)) {
  30029. return buffer.raw().toString();
  30030. } else {
  30031. return buffer.error('Decoding of string type: ' + tag + ' unsupported');
  30032. }
  30033. };
  30034. DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
  30035. let result;
  30036. const identifiers = [];
  30037. let ident = 0;
  30038. let subident = 0;
  30039. while (!buffer.isEmpty()) {
  30040. subident = buffer.readUInt8();
  30041. ident <<= 7;
  30042. ident |= subident & 0x7f;
  30043. if ((subident & 0x80) === 0) {
  30044. identifiers.push(ident);
  30045. ident = 0;
  30046. }
  30047. }
  30048. if (subident & 0x80)
  30049. identifiers.push(ident);
  30050. const first = (identifiers[0] / 40) | 0;
  30051. const second = identifiers[0] % 40;
  30052. if (relative)
  30053. result = identifiers;
  30054. else
  30055. result = [first, second].concat(identifiers.slice(1));
  30056. if (values) {
  30057. let tmp = values[result.join(' ')];
  30058. if (tmp === undefined)
  30059. tmp = values[result.join('.')];
  30060. if (tmp !== undefined)
  30061. result = tmp;
  30062. }
  30063. return result;
  30064. };
  30065. DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
  30066. const str = buffer.raw().toString();
  30067. let year;
  30068. let mon;
  30069. let day;
  30070. let hour;
  30071. let min;
  30072. let sec;
  30073. if (tag === 'gentime') {
  30074. year = str.slice(0, 4) | 0;
  30075. mon = str.slice(4, 6) | 0;
  30076. day = str.slice(6, 8) | 0;
  30077. hour = str.slice(8, 10) | 0;
  30078. min = str.slice(10, 12) | 0;
  30079. sec = str.slice(12, 14) | 0;
  30080. } else if (tag === 'utctime') {
  30081. year = str.slice(0, 2) | 0;
  30082. mon = str.slice(2, 4) | 0;
  30083. day = str.slice(4, 6) | 0;
  30084. hour = str.slice(6, 8) | 0;
  30085. min = str.slice(8, 10) | 0;
  30086. sec = str.slice(10, 12) | 0;
  30087. if (year < 70)
  30088. year = 2000 + year;
  30089. else
  30090. year = 1900 + year;
  30091. } else {
  30092. return buffer.error('Decoding ' + tag + ' time is not supported yet');
  30093. }
  30094. return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
  30095. };
  30096. DERNode.prototype._decodeNull = function decodeNull() {
  30097. return null;
  30098. };
  30099. DERNode.prototype._decodeBool = function decodeBool(buffer) {
  30100. const res = buffer.readUInt8();
  30101. if (buffer.isError(res))
  30102. return res;
  30103. else
  30104. return res !== 0;
  30105. };
  30106. DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
  30107. // Bigint, return as it is (assume big endian)
  30108. const raw = buffer.raw();
  30109. let res = new bignum(raw);
  30110. if (values)
  30111. res = values[res.toString(10)] || res;
  30112. return res;
  30113. };
  30114. DERNode.prototype._use = function use(entity, obj) {
  30115. if (typeof entity === 'function')
  30116. entity = entity(obj);
  30117. return entity._getDecoder('der').tree;
  30118. };
  30119. // Utility methods
  30120. function derDecodeTag(buf, fail) {
  30121. let tag = buf.readUInt8(fail);
  30122. if (buf.isError(tag))
  30123. return tag;
  30124. const cls = der.tagClass[tag >> 6];
  30125. const primitive = (tag & 0x20) === 0;
  30126. // Multi-octet tag - load
  30127. if ((tag & 0x1f) === 0x1f) {
  30128. let oct = tag;
  30129. tag = 0;
  30130. while ((oct & 0x80) === 0x80) {
  30131. oct = buf.readUInt8(fail);
  30132. if (buf.isError(oct))
  30133. return oct;
  30134. tag <<= 7;
  30135. tag |= oct & 0x7f;
  30136. }
  30137. } else {
  30138. tag &= 0x1f;
  30139. }
  30140. const tagStr = der.tag[tag];
  30141. return {
  30142. cls: cls,
  30143. primitive: primitive,
  30144. tag: tag,
  30145. tagStr: tagStr
  30146. };
  30147. }
  30148. function derDecodeLen(buf, primitive, fail) {
  30149. let len = buf.readUInt8(fail);
  30150. if (buf.isError(len))
  30151. return len;
  30152. // Indefinite form
  30153. if (!primitive && len === 0x80)
  30154. return null;
  30155. // Definite form
  30156. if ((len & 0x80) === 0) {
  30157. // Short form
  30158. return len;
  30159. }
  30160. // Long form
  30161. const num = len & 0x7f;
  30162. if (num > 4)
  30163. return buf.error('length octect is too long');
  30164. len = 0;
  30165. for (let i = 0; i < num; i++) {
  30166. len <<= 8;
  30167. const j = buf.readUInt8(fail);
  30168. if (buf.isError(j))
  30169. return j;
  30170. len |= j;
  30171. }
  30172. return len;
  30173. }
  30174. /***/ }),
  30175. /***/ 226:
  30176. /*!*******************************************************!*\
  30177. !*** ./node_modules/asn1.js/lib/asn1/decoders/pem.js ***!
  30178. \*******************************************************/
  30179. /*! no static exports found */
  30180. /***/ (function(module, exports, __webpack_require__) {
  30181. "use strict";
  30182. const inherits = __webpack_require__(/*! inherits */ 95);
  30183. const Buffer = __webpack_require__(/*! safer-buffer */ 218).Buffer;
  30184. const DERDecoder = __webpack_require__(/*! ./der */ 225);
  30185. function PEMDecoder(entity) {
  30186. DERDecoder.call(this, entity);
  30187. this.enc = 'pem';
  30188. }
  30189. inherits(PEMDecoder, DERDecoder);
  30190. module.exports = PEMDecoder;
  30191. PEMDecoder.prototype.decode = function decode(data, options) {
  30192. const lines = data.toString().split(/[\r\n]+/g);
  30193. const label = options.label.toUpperCase();
  30194. const re = /^-----(BEGIN|END) ([^-]+)-----$/;
  30195. let start = -1;
  30196. let end = -1;
  30197. for (let i = 0; i < lines.length; i++) {
  30198. const match = lines[i].match(re);
  30199. if (match === null)
  30200. continue;
  30201. if (match[2] !== label)
  30202. continue;
  30203. if (start === -1) {
  30204. if (match[1] !== 'BEGIN')
  30205. break;
  30206. start = i;
  30207. } else {
  30208. if (match[1] !== 'END')
  30209. break;
  30210. end = i;
  30211. break;
  30212. }
  30213. }
  30214. if (start === -1 || end === -1)
  30215. throw new Error('PEM section not found for: ' + label);
  30216. const base64 = lines.slice(start + 1, end).join('');
  30217. // Remove excessive symbols
  30218. base64.replace(/[^a-z0-9+/=]+/gi, '');
  30219. const input = Buffer.from(base64, 'base64');
  30220. return DERDecoder.prototype.decode.call(this, input, options);
  30221. };
  30222. /***/ }),
  30223. /***/ 227:
  30224. /*!*****************************************************!*\
  30225. !*** ./node_modules/asn1.js/lib/asn1/base/index.js ***!
  30226. \*****************************************************/
  30227. /*! no static exports found */
  30228. /***/ (function(module, exports, __webpack_require__) {
  30229. "use strict";
  30230. const base = exports;
  30231. base.Reporter = __webpack_require__(/*! ./reporter */ 220).Reporter;
  30232. base.DecoderBuffer = __webpack_require__(/*! ./buffer */ 221).DecoderBuffer;
  30233. base.EncoderBuffer = __webpack_require__(/*! ./buffer */ 221).EncoderBuffer;
  30234. base.Node = __webpack_require__(/*! ./node */ 219);
  30235. /***/ }),
  30236. /***/ 228:
  30237. /*!**********************************************************!*\
  30238. !*** ./node_modules/asn1.js/lib/asn1/constants/index.js ***!
  30239. \**********************************************************/
  30240. /*! no static exports found */
  30241. /***/ (function(module, exports, __webpack_require__) {
  30242. "use strict";
  30243. const constants = exports;
  30244. // Helper
  30245. constants._reverse = function reverse(map) {
  30246. const res = {};
  30247. Object.keys(map).forEach(function(key) {
  30248. // Convert key to integer if it is stringified
  30249. if ((key | 0) == key)
  30250. key = key | 0;
  30251. const value = map[key];
  30252. res[value] = key;
  30253. });
  30254. return res;
  30255. };
  30256. constants.der = __webpack_require__(/*! ./der */ 222);
  30257. /***/ }),
  30258. /***/ 229:
  30259. /*!************************************************!*\
  30260. !*** ./node_modules/parse-asn1/certificate.js ***!
  30261. \************************************************/
  30262. /*! no static exports found */
  30263. /***/ (function(module, exports, __webpack_require__) {
  30264. "use strict";
  30265. // from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js
  30266. // thanks to @Rantanen
  30267. var asn = __webpack_require__(/*! asn1.js */ 214)
  30268. var Time = asn.define('Time', function () {
  30269. this.choice({
  30270. utcTime: this.utctime(),
  30271. generalTime: this.gentime()
  30272. })
  30273. })
  30274. var AttributeTypeValue = asn.define('AttributeTypeValue', function () {
  30275. this.seq().obj(
  30276. this.key('type').objid(),
  30277. this.key('value').any()
  30278. )
  30279. })
  30280. var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
  30281. this.seq().obj(
  30282. this.key('algorithm').objid(),
  30283. this.key('parameters').optional(),
  30284. this.key('curve').objid().optional()
  30285. )
  30286. })
  30287. var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {
  30288. this.seq().obj(
  30289. this.key('algorithm').use(AlgorithmIdentifier),
  30290. this.key('subjectPublicKey').bitstr()
  30291. )
  30292. })
  30293. var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {
  30294. this.setof(AttributeTypeValue)
  30295. })
  30296. var RDNSequence = asn.define('RDNSequence', function () {
  30297. this.seqof(RelativeDistinguishedName)
  30298. })
  30299. var Name = asn.define('Name', function () {
  30300. this.choice({
  30301. rdnSequence: this.use(RDNSequence)
  30302. })
  30303. })
  30304. var Validity = asn.define('Validity', function () {
  30305. this.seq().obj(
  30306. this.key('notBefore').use(Time),
  30307. this.key('notAfter').use(Time)
  30308. )
  30309. })
  30310. var Extension = asn.define('Extension', function () {
  30311. this.seq().obj(
  30312. this.key('extnID').objid(),
  30313. this.key('critical').bool().def(false),
  30314. this.key('extnValue').octstr()
  30315. )
  30316. })
  30317. var TBSCertificate = asn.define('TBSCertificate', function () {
  30318. this.seq().obj(
  30319. this.key('version').explicit(0).int().optional(),
  30320. this.key('serialNumber').int(),
  30321. this.key('signature').use(AlgorithmIdentifier),
  30322. this.key('issuer').use(Name),
  30323. this.key('validity').use(Validity),
  30324. this.key('subject').use(Name),
  30325. this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
  30326. this.key('issuerUniqueID').implicit(1).bitstr().optional(),
  30327. this.key('subjectUniqueID').implicit(2).bitstr().optional(),
  30328. this.key('extensions').explicit(3).seqof(Extension).optional()
  30329. )
  30330. })
  30331. var X509Certificate = asn.define('X509Certificate', function () {
  30332. this.seq().obj(
  30333. this.key('tbsCertificate').use(TBSCertificate),
  30334. this.key('signatureAlgorithm').use(AlgorithmIdentifier),
  30335. this.key('signatureValue').bitstr()
  30336. )
  30337. })
  30338. module.exports = X509Certificate
  30339. /***/ }),
  30340. /***/ 23:
  30341. /*!***************************************************************!*\
  30342. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  30343. \***************************************************************/
  30344. /*! no static exports found */
  30345. /***/ (function(module, exports) {
  30346. function _classCallCheck(instance, Constructor) {
  30347. if (!(instance instanceof Constructor)) {
  30348. throw new TypeError("Cannot call a class as a function");
  30349. }
  30350. }
  30351. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  30352. /***/ }),
  30353. /***/ 230:
  30354. /*!********************************************!*\
  30355. !*** ./node_modules/parse-asn1/aesid.json ***!
  30356. \********************************************/
  30357. /*! exports provided: 2.16.840.1.101.3.4.1.1, 2.16.840.1.101.3.4.1.2, 2.16.840.1.101.3.4.1.3, 2.16.840.1.101.3.4.1.4, 2.16.840.1.101.3.4.1.21, 2.16.840.1.101.3.4.1.22, 2.16.840.1.101.3.4.1.23, 2.16.840.1.101.3.4.1.24, 2.16.840.1.101.3.4.1.41, 2.16.840.1.101.3.4.1.42, 2.16.840.1.101.3.4.1.43, 2.16.840.1.101.3.4.1.44, default */
  30358. /***/ (function(module) {
  30359. module.exports = JSON.parse("{\"2.16.840.1.101.3.4.1.1\":\"aes-128-ecb\",\"2.16.840.1.101.3.4.1.2\":\"aes-128-cbc\",\"2.16.840.1.101.3.4.1.3\":\"aes-128-ofb\",\"2.16.840.1.101.3.4.1.4\":\"aes-128-cfb\",\"2.16.840.1.101.3.4.1.21\":\"aes-192-ecb\",\"2.16.840.1.101.3.4.1.22\":\"aes-192-cbc\",\"2.16.840.1.101.3.4.1.23\":\"aes-192-ofb\",\"2.16.840.1.101.3.4.1.24\":\"aes-192-cfb\",\"2.16.840.1.101.3.4.1.41\":\"aes-256-ecb\",\"2.16.840.1.101.3.4.1.42\":\"aes-256-cbc\",\"2.16.840.1.101.3.4.1.43\":\"aes-256-ofb\",\"2.16.840.1.101.3.4.1.44\":\"aes-256-cfb\"}");
  30360. /***/ }),
  30361. /***/ 231:
  30362. /*!********************************************!*\
  30363. !*** ./node_modules/parse-asn1/fixProc.js ***!
  30364. \********************************************/
  30365. /*! no static exports found */
  30366. /***/ (function(module, exports, __webpack_require__) {
  30367. // adapted from https://github.com/apatil/pemstrip
  30368. var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m
  30369. var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m
  30370. var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m
  30371. var evp = __webpack_require__(/*! evp_bytestokey */ 166)
  30372. var ciphers = __webpack_require__(/*! browserify-aes */ 149)
  30373. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  30374. module.exports = function (okey, password) {
  30375. var key = okey.toString()
  30376. var match = key.match(findProc)
  30377. var decrypted
  30378. if (!match) {
  30379. var match2 = key.match(fullRegex)
  30380. decrypted = Buffer.from(match2[2].replace(/[\r\n]/g, ''), 'base64')
  30381. } else {
  30382. var suite = 'aes' + match[1]
  30383. var iv = Buffer.from(match[2], 'hex')
  30384. var cipherText = Buffer.from(match[3].replace(/[\r\n]/g, ''), 'base64')
  30385. var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key
  30386. var out = []
  30387. var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)
  30388. out.push(cipher.update(cipherText))
  30389. out.push(cipher.final())
  30390. decrypted = Buffer.concat(out)
  30391. }
  30392. var tag = key.match(startRegex)[1]
  30393. return {
  30394. tag: tag,
  30395. data: decrypted
  30396. }
  30397. }
  30398. /***/ }),
  30399. /***/ 232:
  30400. /*!**********************************************************!*\
  30401. !*** ./node_modules/browserify-sign/browser/curves.json ***!
  30402. \**********************************************************/
  30403. /*! exports provided: 1.3.132.0.10, 1.3.132.0.33, 1.2.840.10045.3.1.1, 1.2.840.10045.3.1.7, 1.3.132.0.34, 1.3.132.0.35, default */
  30404. /***/ (function(module) {
  30405. module.exports = JSON.parse("{\"1.3.132.0.10\":\"secp256k1\",\"1.3.132.0.33\":\"p224\",\"1.2.840.10045.3.1.1\":\"p192\",\"1.2.840.10045.3.1.7\":\"p256\",\"1.3.132.0.34\":\"p384\",\"1.3.132.0.35\":\"p521\"}");
  30406. /***/ }),
  30407. /***/ 233:
  30408. /*!********************************************************!*\
  30409. !*** ./node_modules/browserify-sign/browser/verify.js ***!
  30410. \********************************************************/
  30411. /*! no static exports found */
  30412. /***/ (function(module, exports, __webpack_require__) {
  30413. // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
  30414. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  30415. var BN = __webpack_require__(/*! bn.js */ 171)
  30416. var EC = __webpack_require__(/*! elliptic */ 182).ec
  30417. var parseKeys = __webpack_require__(/*! parse-asn1 */ 212)
  30418. var curves = __webpack_require__(/*! ./curves.json */ 232)
  30419. function verify (sig, hash, key, signType, tag) {
  30420. var pub = parseKeys(key)
  30421. if (pub.type === 'ec') {
  30422. // rsa keys can be interpreted as ecdsa ones in openssl
  30423. if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
  30424. return ecVerify(sig, hash, pub)
  30425. } else if (pub.type === 'dsa') {
  30426. if (signType !== 'dsa') throw new Error('wrong public key type')
  30427. return dsaVerify(sig, hash, pub)
  30428. } else {
  30429. if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
  30430. }
  30431. hash = Buffer.concat([tag, hash])
  30432. var len = pub.modulus.byteLength()
  30433. var pad = [1]
  30434. var padNum = 0
  30435. while (hash.length + pad.length + 2 < len) {
  30436. pad.push(0xff)
  30437. padNum++
  30438. }
  30439. pad.push(0x00)
  30440. var i = -1
  30441. while (++i < hash.length) {
  30442. pad.push(hash[i])
  30443. }
  30444. pad = Buffer.from(pad)
  30445. var red = BN.mont(pub.modulus)
  30446. sig = new BN(sig).toRed(red)
  30447. sig = sig.redPow(new BN(pub.publicExponent))
  30448. sig = Buffer.from(sig.fromRed().toArray())
  30449. var out = padNum < 8 ? 1 : 0
  30450. len = Math.min(sig.length, pad.length)
  30451. if (sig.length !== pad.length) out = 1
  30452. i = -1
  30453. while (++i < len) out |= sig[i] ^ pad[i]
  30454. return out === 0
  30455. }
  30456. function ecVerify (sig, hash, pub) {
  30457. var curveId = curves[pub.data.algorithm.curve.join('.')]
  30458. if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.'))
  30459. var curve = new EC(curveId)
  30460. var pubkey = pub.data.subjectPrivateKey.data
  30461. return curve.verify(hash, sig, pubkey)
  30462. }
  30463. function dsaVerify (sig, hash, pub) {
  30464. var p = pub.data.p
  30465. var q = pub.data.q
  30466. var g = pub.data.g
  30467. var y = pub.data.pub_key
  30468. var unpacked = parseKeys.signature.decode(sig, 'der')
  30469. var s = unpacked.s
  30470. var r = unpacked.r
  30471. checkValue(s, q)
  30472. checkValue(r, q)
  30473. var montp = BN.mont(p)
  30474. var w = s.invm(q)
  30475. var v = g.toRed(montp)
  30476. .redPow(new BN(hash).mul(w).mod(q))
  30477. .fromRed()
  30478. .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())
  30479. .mod(p)
  30480. .mod(q)
  30481. return v.cmp(r) === 0
  30482. }
  30483. function checkValue (b, q) {
  30484. if (b.cmpn(0) <= 0) throw new Error('invalid sig')
  30485. if (b.cmp(q) >= q) throw new Error('invalid sig')
  30486. }
  30487. module.exports = verify
  30488. /***/ }),
  30489. /***/ 234:
  30490. /*!*********************************************!*\
  30491. !*** ./node_modules/create-ecdh/browser.js ***!
  30492. \*********************************************/
  30493. /*! no static exports found */
  30494. /***/ (function(module, exports, __webpack_require__) {
  30495. /* WEBPACK VAR INJECTION */(function(Buffer) {var elliptic = __webpack_require__(/*! elliptic */ 182)
  30496. var BN = __webpack_require__(/*! bn.js */ 171)
  30497. module.exports = function createECDH (curve) {
  30498. return new ECDH(curve)
  30499. }
  30500. var aliases = {
  30501. secp256k1: {
  30502. name: 'secp256k1',
  30503. byteLength: 32
  30504. },
  30505. secp224r1: {
  30506. name: 'p224',
  30507. byteLength: 28
  30508. },
  30509. prime256v1: {
  30510. name: 'p256',
  30511. byteLength: 32
  30512. },
  30513. prime192v1: {
  30514. name: 'p192',
  30515. byteLength: 24
  30516. },
  30517. ed25519: {
  30518. name: 'ed25519',
  30519. byteLength: 32
  30520. },
  30521. secp384r1: {
  30522. name: 'p384',
  30523. byteLength: 48
  30524. },
  30525. secp521r1: {
  30526. name: 'p521',
  30527. byteLength: 66
  30528. }
  30529. }
  30530. aliases.p224 = aliases.secp224r1
  30531. aliases.p256 = aliases.secp256r1 = aliases.prime256v1
  30532. aliases.p192 = aliases.secp192r1 = aliases.prime192v1
  30533. aliases.p384 = aliases.secp384r1
  30534. aliases.p521 = aliases.secp521r1
  30535. function ECDH (curve) {
  30536. this.curveType = aliases[curve]
  30537. if (!this.curveType) {
  30538. this.curveType = {
  30539. name: curve
  30540. }
  30541. }
  30542. this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap
  30543. this.keys = void 0
  30544. }
  30545. ECDH.prototype.generateKeys = function (enc, format) {
  30546. this.keys = this.curve.genKeyPair()
  30547. return this.getPublicKey(enc, format)
  30548. }
  30549. ECDH.prototype.computeSecret = function (other, inenc, enc) {
  30550. inenc = inenc || 'utf8'
  30551. if (!Buffer.isBuffer(other)) {
  30552. other = new Buffer(other, inenc)
  30553. }
  30554. var otherPub = this.curve.keyFromPublic(other).getPublic()
  30555. var out = otherPub.mul(this.keys.getPrivate()).getX()
  30556. return formatReturnValue(out, enc, this.curveType.byteLength)
  30557. }
  30558. ECDH.prototype.getPublicKey = function (enc, format) {
  30559. var key = this.keys.getPublic(format === 'compressed', true)
  30560. if (format === 'hybrid') {
  30561. if (key[key.length - 1] % 2) {
  30562. key[0] = 7
  30563. } else {
  30564. key[0] = 6
  30565. }
  30566. }
  30567. return formatReturnValue(key, enc)
  30568. }
  30569. ECDH.prototype.getPrivateKey = function (enc) {
  30570. return formatReturnValue(this.keys.getPrivate(), enc)
  30571. }
  30572. ECDH.prototype.setPublicKey = function (pub, enc) {
  30573. enc = enc || 'utf8'
  30574. if (!Buffer.isBuffer(pub)) {
  30575. pub = new Buffer(pub, enc)
  30576. }
  30577. this.keys._importPublic(pub)
  30578. return this
  30579. }
  30580. ECDH.prototype.setPrivateKey = function (priv, enc) {
  30581. enc = enc || 'utf8'
  30582. if (!Buffer.isBuffer(priv)) {
  30583. priv = new Buffer(priv, enc)
  30584. }
  30585. var _priv = new BN(priv)
  30586. _priv = _priv.toString(16)
  30587. this.keys = this.curve.genKeyPair()
  30588. this.keys._importPrivate(_priv)
  30589. return this
  30590. }
  30591. function formatReturnValue (bn, enc, len) {
  30592. if (!Array.isArray(bn)) {
  30593. bn = bn.toArray()
  30594. }
  30595. var buf = new Buffer(bn)
  30596. if (len && buf.length < len) {
  30597. var zeros = new Buffer(len - buf.length)
  30598. zeros.fill(0)
  30599. buf = Buffer.concat([zeros, buf])
  30600. }
  30601. if (!enc) {
  30602. return buf
  30603. } else {
  30604. return buf.toString(enc)
  30605. }
  30606. }
  30607. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ 90).Buffer))
  30608. /***/ }),
  30609. /***/ 235:
  30610. /*!************************************************!*\
  30611. !*** ./node_modules/public-encrypt/browser.js ***!
  30612. \************************************************/
  30613. /*! no static exports found */
  30614. /***/ (function(module, exports, __webpack_require__) {
  30615. exports.publicEncrypt = __webpack_require__(/*! ./publicEncrypt */ 236)
  30616. exports.privateDecrypt = __webpack_require__(/*! ./privateDecrypt */ 240)
  30617. exports.privateEncrypt = function privateEncrypt (key, buf) {
  30618. return exports.publicEncrypt(key, buf, true)
  30619. }
  30620. exports.publicDecrypt = function publicDecrypt (key, buf) {
  30621. return exports.privateDecrypt(key, buf, true)
  30622. }
  30623. /***/ }),
  30624. /***/ 236:
  30625. /*!******************************************************!*\
  30626. !*** ./node_modules/public-encrypt/publicEncrypt.js ***!
  30627. \******************************************************/
  30628. /*! no static exports found */
  30629. /***/ (function(module, exports, __webpack_require__) {
  30630. var parseKeys = __webpack_require__(/*! parse-asn1 */ 212)
  30631. var randomBytes = __webpack_require__(/*! randombytes */ 86)
  30632. var createHash = __webpack_require__(/*! create-hash */ 94)
  30633. var mgf = __webpack_require__(/*! ./mgf */ 237)
  30634. var xor = __webpack_require__(/*! ./xor */ 238)
  30635. var BN = __webpack_require__(/*! bn.js */ 171)
  30636. var withPublic = __webpack_require__(/*! ./withPublic */ 239)
  30637. var crt = __webpack_require__(/*! browserify-rsa */ 181)
  30638. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  30639. module.exports = function publicEncrypt (publicKey, msg, reverse) {
  30640. var padding
  30641. if (publicKey.padding) {
  30642. padding = publicKey.padding
  30643. } else if (reverse) {
  30644. padding = 1
  30645. } else {
  30646. padding = 4
  30647. }
  30648. var key = parseKeys(publicKey)
  30649. var paddedMsg
  30650. if (padding === 4) {
  30651. paddedMsg = oaep(key, msg)
  30652. } else if (padding === 1) {
  30653. paddedMsg = pkcs1(key, msg, reverse)
  30654. } else if (padding === 3) {
  30655. paddedMsg = new BN(msg)
  30656. if (paddedMsg.cmp(key.modulus) >= 0) {
  30657. throw new Error('data too long for modulus')
  30658. }
  30659. } else {
  30660. throw new Error('unknown padding')
  30661. }
  30662. if (reverse) {
  30663. return crt(paddedMsg, key)
  30664. } else {
  30665. return withPublic(paddedMsg, key)
  30666. }
  30667. }
  30668. function oaep (key, msg) {
  30669. var k = key.modulus.byteLength()
  30670. var mLen = msg.length
  30671. var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()
  30672. var hLen = iHash.length
  30673. var hLen2 = 2 * hLen
  30674. if (mLen > k - hLen2 - 2) {
  30675. throw new Error('message too long')
  30676. }
  30677. var ps = Buffer.alloc(k - mLen - hLen2 - 2)
  30678. var dblen = k - hLen - 1
  30679. var seed = randomBytes(hLen)
  30680. var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen))
  30681. var maskedSeed = xor(seed, mgf(maskedDb, hLen))
  30682. return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k))
  30683. }
  30684. function pkcs1 (key, msg, reverse) {
  30685. var mLen = msg.length
  30686. var k = key.modulus.byteLength()
  30687. if (mLen > k - 11) {
  30688. throw new Error('message too long')
  30689. }
  30690. var ps
  30691. if (reverse) {
  30692. ps = Buffer.alloc(k - mLen - 3, 0xff)
  30693. } else {
  30694. ps = nonZero(k - mLen - 3)
  30695. }
  30696. return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k))
  30697. }
  30698. function nonZero (len) {
  30699. var out = Buffer.allocUnsafe(len)
  30700. var i = 0
  30701. var cache = randomBytes(len * 2)
  30702. var cur = 0
  30703. var num
  30704. while (i < len) {
  30705. if (cur === cache.length) {
  30706. cache = randomBytes(len * 2)
  30707. cur = 0
  30708. }
  30709. num = cache[cur++]
  30710. if (num) {
  30711. out[i++] = num
  30712. }
  30713. }
  30714. return out
  30715. }
  30716. /***/ }),
  30717. /***/ 237:
  30718. /*!********************************************!*\
  30719. !*** ./node_modules/public-encrypt/mgf.js ***!
  30720. \********************************************/
  30721. /*! no static exports found */
  30722. /***/ (function(module, exports, __webpack_require__) {
  30723. var createHash = __webpack_require__(/*! create-hash */ 94)
  30724. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  30725. module.exports = function (seed, len) {
  30726. var t = Buffer.alloc(0)
  30727. var i = 0
  30728. var c
  30729. while (t.length < len) {
  30730. c = i2ops(i++)
  30731. t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])
  30732. }
  30733. return t.slice(0, len)
  30734. }
  30735. function i2ops (c) {
  30736. var out = Buffer.allocUnsafe(4)
  30737. out.writeUInt32BE(c, 0)
  30738. return out
  30739. }
  30740. /***/ }),
  30741. /***/ 238:
  30742. /*!********************************************!*\
  30743. !*** ./node_modules/public-encrypt/xor.js ***!
  30744. \********************************************/
  30745. /*! no static exports found */
  30746. /***/ (function(module, exports) {
  30747. module.exports = function xor (a, b) {
  30748. var len = a.length
  30749. var i = -1
  30750. while (++i < len) {
  30751. a[i] ^= b[i]
  30752. }
  30753. return a
  30754. }
  30755. /***/ }),
  30756. /***/ 239:
  30757. /*!***************************************************!*\
  30758. !*** ./node_modules/public-encrypt/withPublic.js ***!
  30759. \***************************************************/
  30760. /*! no static exports found */
  30761. /***/ (function(module, exports, __webpack_require__) {
  30762. var BN = __webpack_require__(/*! bn.js */ 171)
  30763. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  30764. function withPublic (paddedMsg, key) {
  30765. return Buffer.from(paddedMsg
  30766. .toRed(BN.mont(key.modulus))
  30767. .redPow(new BN(key.publicExponent))
  30768. .fromRed()
  30769. .toArray())
  30770. }
  30771. module.exports = withPublic
  30772. /***/ }),
  30773. /***/ 24:
  30774. /*!************************************************************!*\
  30775. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  30776. \************************************************************/
  30777. /*! no static exports found */
  30778. /***/ (function(module, exports, __webpack_require__) {
  30779. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  30780. function _defineProperties(target, props) {
  30781. for (var i = 0; i < props.length; i++) {
  30782. var descriptor = props[i];
  30783. descriptor.enumerable = descriptor.enumerable || false;
  30784. descriptor.configurable = true;
  30785. if ("value" in descriptor) descriptor.writable = true;
  30786. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  30787. }
  30788. }
  30789. function _createClass(Constructor, protoProps, staticProps) {
  30790. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  30791. if (staticProps) _defineProperties(Constructor, staticProps);
  30792. Object.defineProperty(Constructor, "prototype", {
  30793. writable: false
  30794. });
  30795. return Constructor;
  30796. }
  30797. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  30798. /***/ }),
  30799. /***/ 240:
  30800. /*!*******************************************************!*\
  30801. !*** ./node_modules/public-encrypt/privateDecrypt.js ***!
  30802. \*******************************************************/
  30803. /*! no static exports found */
  30804. /***/ (function(module, exports, __webpack_require__) {
  30805. var parseKeys = __webpack_require__(/*! parse-asn1 */ 212)
  30806. var mgf = __webpack_require__(/*! ./mgf */ 237)
  30807. var xor = __webpack_require__(/*! ./xor */ 238)
  30808. var BN = __webpack_require__(/*! bn.js */ 171)
  30809. var crt = __webpack_require__(/*! browserify-rsa */ 181)
  30810. var createHash = __webpack_require__(/*! create-hash */ 94)
  30811. var withPublic = __webpack_require__(/*! ./withPublic */ 239)
  30812. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  30813. module.exports = function privateDecrypt (privateKey, enc, reverse) {
  30814. var padding
  30815. if (privateKey.padding) {
  30816. padding = privateKey.padding
  30817. } else if (reverse) {
  30818. padding = 1
  30819. } else {
  30820. padding = 4
  30821. }
  30822. var key = parseKeys(privateKey)
  30823. var k = key.modulus.byteLength()
  30824. if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) {
  30825. throw new Error('decryption error')
  30826. }
  30827. var msg
  30828. if (reverse) {
  30829. msg = withPublic(new BN(enc), key)
  30830. } else {
  30831. msg = crt(enc, key)
  30832. }
  30833. var zBuffer = Buffer.alloc(k - msg.length)
  30834. msg = Buffer.concat([zBuffer, msg], k)
  30835. if (padding === 4) {
  30836. return oaep(key, msg)
  30837. } else if (padding === 1) {
  30838. return pkcs1(key, msg, reverse)
  30839. } else if (padding === 3) {
  30840. return msg
  30841. } else {
  30842. throw new Error('unknown padding')
  30843. }
  30844. }
  30845. function oaep (key, msg) {
  30846. var k = key.modulus.byteLength()
  30847. var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()
  30848. var hLen = iHash.length
  30849. if (msg[0] !== 0) {
  30850. throw new Error('decryption error')
  30851. }
  30852. var maskedSeed = msg.slice(1, hLen + 1)
  30853. var maskedDb = msg.slice(hLen + 1)
  30854. var seed = xor(maskedSeed, mgf(maskedDb, hLen))
  30855. var db = xor(maskedDb, mgf(seed, k - hLen - 1))
  30856. if (compare(iHash, db.slice(0, hLen))) {
  30857. throw new Error('decryption error')
  30858. }
  30859. var i = hLen
  30860. while (db[i] === 0) {
  30861. i++
  30862. }
  30863. if (db[i++] !== 1) {
  30864. throw new Error('decryption error')
  30865. }
  30866. return db.slice(i)
  30867. }
  30868. function pkcs1 (key, msg, reverse) {
  30869. var p1 = msg.slice(0, 2)
  30870. var i = 2
  30871. var status = 0
  30872. while (msg[i++] !== 0) {
  30873. if (i >= msg.length) {
  30874. status++
  30875. break
  30876. }
  30877. }
  30878. var ps = msg.slice(2, i - 1)
  30879. if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) {
  30880. status++
  30881. }
  30882. if (ps.length < 8) {
  30883. status++
  30884. }
  30885. if (status) {
  30886. throw new Error('decryption error')
  30887. }
  30888. return msg.slice(i)
  30889. }
  30890. function compare (a, b) {
  30891. a = Buffer.from(a)
  30892. b = Buffer.from(b)
  30893. var dif = 0
  30894. var len = a.length
  30895. if (a.length !== b.length) {
  30896. dif++
  30897. len = Math.min(a.length, b.length)
  30898. }
  30899. var i = -1
  30900. while (++i < len) {
  30901. dif += (a[i] ^ b[i])
  30902. }
  30903. return dif
  30904. }
  30905. /***/ }),
  30906. /***/ 241:
  30907. /*!********************************************!*\
  30908. !*** ./node_modules/randomfill/browser.js ***!
  30909. \********************************************/
  30910. /*! no static exports found */
  30911. /***/ (function(module, exports, __webpack_require__) {
  30912. "use strict";
  30913. /* WEBPACK VAR INJECTION */(function(global, process) {
  30914. function oldBrowser () {
  30915. throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11')
  30916. }
  30917. var safeBuffer = __webpack_require__(/*! safe-buffer */ 89)
  30918. var randombytes = __webpack_require__(/*! randombytes */ 86)
  30919. var Buffer = safeBuffer.Buffer
  30920. var kBufferMaxLength = safeBuffer.kMaxLength
  30921. var crypto = global.crypto || global.msCrypto
  30922. var kMaxUint32 = Math.pow(2, 32) - 1
  30923. function assertOffset (offset, length) {
  30924. if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare
  30925. throw new TypeError('offset must be a number')
  30926. }
  30927. if (offset > kMaxUint32 || offset < 0) {
  30928. throw new TypeError('offset must be a uint32')
  30929. }
  30930. if (offset > kBufferMaxLength || offset > length) {
  30931. throw new RangeError('offset out of range')
  30932. }
  30933. }
  30934. function assertSize (size, offset, length) {
  30935. if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare
  30936. throw new TypeError('size must be a number')
  30937. }
  30938. if (size > kMaxUint32 || size < 0) {
  30939. throw new TypeError('size must be a uint32')
  30940. }
  30941. if (size + offset > length || size > kBufferMaxLength) {
  30942. throw new RangeError('buffer too small')
  30943. }
  30944. }
  30945. if ((crypto && crypto.getRandomValues) || !process.browser) {
  30946. exports.randomFill = randomFill
  30947. exports.randomFillSync = randomFillSync
  30948. } else {
  30949. exports.randomFill = oldBrowser
  30950. exports.randomFillSync = oldBrowser
  30951. }
  30952. function randomFill (buf, offset, size, cb) {
  30953. if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {
  30954. throw new TypeError('"buf" argument must be a Buffer or Uint8Array')
  30955. }
  30956. if (typeof offset === 'function') {
  30957. cb = offset
  30958. offset = 0
  30959. size = buf.length
  30960. } else if (typeof size === 'function') {
  30961. cb = size
  30962. size = buf.length - offset
  30963. } else if (typeof cb !== 'function') {
  30964. throw new TypeError('"cb" argument must be a function')
  30965. }
  30966. assertOffset(offset, buf.length)
  30967. assertSize(size, offset, buf.length)
  30968. return actualFill(buf, offset, size, cb)
  30969. }
  30970. function actualFill (buf, offset, size, cb) {
  30971. if (process.browser) {
  30972. var ourBuf = buf.buffer
  30973. var uint = new Uint8Array(ourBuf, offset, size)
  30974. crypto.getRandomValues(uint)
  30975. if (cb) {
  30976. process.nextTick(function () {
  30977. cb(null, buf)
  30978. })
  30979. return
  30980. }
  30981. return buf
  30982. }
  30983. if (cb) {
  30984. randombytes(size, function (err, bytes) {
  30985. if (err) {
  30986. return cb(err)
  30987. }
  30988. bytes.copy(buf, offset)
  30989. cb(null, buf)
  30990. })
  30991. return
  30992. }
  30993. var bytes = randombytes(size)
  30994. bytes.copy(buf, offset)
  30995. return buf
  30996. }
  30997. function randomFillSync (buf, offset, size) {
  30998. if (typeof offset === 'undefined') {
  30999. offset = 0
  31000. }
  31001. if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {
  31002. throw new TypeError('"buf" argument must be a Buffer or Uint8Array')
  31003. }
  31004. assertOffset(offset, buf.length)
  31005. if (size === undefined) size = buf.length - offset
  31006. assertSize(size, offset, buf.length)
  31007. return actualFill(buf, offset, size)
  31008. }
  31009. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 87)))
  31010. /***/ }),
  31011. /***/ 25:
  31012. /*!******************************************************************************************!*\
  31013. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  31014. \******************************************************************************************/
  31015. /*! exports provided: default */
  31016. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  31017. "use strict";
  31018. __webpack_require__.r(__webpack_exports__);
  31019. /* WEBPACK VAR INJECTION */(function(global) {/*!
  31020. * Vue.js v2.6.11
  31021. * (c) 2014-2022 Evan You
  31022. * Released under the MIT License.
  31023. */
  31024. /* */
  31025. var emptyObject = Object.freeze({});
  31026. // These helpers produce better VM code in JS engines due to their
  31027. // explicitness and function inlining.
  31028. function isUndef (v) {
  31029. return v === undefined || v === null
  31030. }
  31031. function isDef (v) {
  31032. return v !== undefined && v !== null
  31033. }
  31034. function isTrue (v) {
  31035. return v === true
  31036. }
  31037. function isFalse (v) {
  31038. return v === false
  31039. }
  31040. /**
  31041. * Check if value is primitive.
  31042. */
  31043. function isPrimitive (value) {
  31044. return (
  31045. typeof value === 'string' ||
  31046. typeof value === 'number' ||
  31047. // $flow-disable-line
  31048. typeof value === 'symbol' ||
  31049. typeof value === 'boolean'
  31050. )
  31051. }
  31052. /**
  31053. * Quick object check - this is primarily used to tell
  31054. * Objects from primitive values when we know the value
  31055. * is a JSON-compliant type.
  31056. */
  31057. function isObject (obj) {
  31058. return obj !== null && typeof obj === 'object'
  31059. }
  31060. /**
  31061. * Get the raw type string of a value, e.g., [object Object].
  31062. */
  31063. var _toString = Object.prototype.toString;
  31064. function toRawType (value) {
  31065. return _toString.call(value).slice(8, -1)
  31066. }
  31067. /**
  31068. * Strict object type check. Only returns true
  31069. * for plain JavaScript objects.
  31070. */
  31071. function isPlainObject (obj) {
  31072. return _toString.call(obj) === '[object Object]'
  31073. }
  31074. function isRegExp (v) {
  31075. return _toString.call(v) === '[object RegExp]'
  31076. }
  31077. /**
  31078. * Check if val is a valid array index.
  31079. */
  31080. function isValidArrayIndex (val) {
  31081. var n = parseFloat(String(val));
  31082. return n >= 0 && Math.floor(n) === n && isFinite(val)
  31083. }
  31084. function isPromise (val) {
  31085. return (
  31086. isDef(val) &&
  31087. typeof val.then === 'function' &&
  31088. typeof val.catch === 'function'
  31089. )
  31090. }
  31091. /**
  31092. * Convert a value to a string that is actually rendered.
  31093. */
  31094. function toString (val) {
  31095. return val == null
  31096. ? ''
  31097. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  31098. ? JSON.stringify(val, null, 2)
  31099. : String(val)
  31100. }
  31101. /**
  31102. * Convert an input value to a number for persistence.
  31103. * If the conversion fails, return original string.
  31104. */
  31105. function toNumber (val) {
  31106. var n = parseFloat(val);
  31107. return isNaN(n) ? val : n
  31108. }
  31109. /**
  31110. * Make a map and return a function for checking if a key
  31111. * is in that map.
  31112. */
  31113. function makeMap (
  31114. str,
  31115. expectsLowerCase
  31116. ) {
  31117. var map = Object.create(null);
  31118. var list = str.split(',');
  31119. for (var i = 0; i < list.length; i++) {
  31120. map[list[i]] = true;
  31121. }
  31122. return expectsLowerCase
  31123. ? function (val) { return map[val.toLowerCase()]; }
  31124. : function (val) { return map[val]; }
  31125. }
  31126. /**
  31127. * Check if a tag is a built-in tag.
  31128. */
  31129. var isBuiltInTag = makeMap('slot,component', true);
  31130. /**
  31131. * Check if an attribute is a reserved attribute.
  31132. */
  31133. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  31134. /**
  31135. * Remove an item from an array.
  31136. */
  31137. function remove (arr, item) {
  31138. if (arr.length) {
  31139. var index = arr.indexOf(item);
  31140. if (index > -1) {
  31141. return arr.splice(index, 1)
  31142. }
  31143. }
  31144. }
  31145. /**
  31146. * Check whether an object has the property.
  31147. */
  31148. var hasOwnProperty = Object.prototype.hasOwnProperty;
  31149. function hasOwn (obj, key) {
  31150. return hasOwnProperty.call(obj, key)
  31151. }
  31152. /**
  31153. * Create a cached version of a pure function.
  31154. */
  31155. function cached (fn) {
  31156. var cache = Object.create(null);
  31157. return (function cachedFn (str) {
  31158. var hit = cache[str];
  31159. return hit || (cache[str] = fn(str))
  31160. })
  31161. }
  31162. /**
  31163. * Camelize a hyphen-delimited string.
  31164. */
  31165. var camelizeRE = /-(\w)/g;
  31166. var camelize = cached(function (str) {
  31167. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  31168. });
  31169. /**
  31170. * Capitalize a string.
  31171. */
  31172. var capitalize = cached(function (str) {
  31173. return str.charAt(0).toUpperCase() + str.slice(1)
  31174. });
  31175. /**
  31176. * Hyphenate a camelCase string.
  31177. */
  31178. var hyphenateRE = /\B([A-Z])/g;
  31179. var hyphenate = cached(function (str) {
  31180. return str.replace(hyphenateRE, '-$1').toLowerCase()
  31181. });
  31182. /**
  31183. * Simple bind polyfill for environments that do not support it,
  31184. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  31185. * since native bind is now performant enough in most browsers.
  31186. * But removing it would mean breaking code that was able to run in
  31187. * PhantomJS 1.x, so this must be kept for backward compatibility.
  31188. */
  31189. /* istanbul ignore next */
  31190. function polyfillBind (fn, ctx) {
  31191. function boundFn (a) {
  31192. var l = arguments.length;
  31193. return l
  31194. ? l > 1
  31195. ? fn.apply(ctx, arguments)
  31196. : fn.call(ctx, a)
  31197. : fn.call(ctx)
  31198. }
  31199. boundFn._length = fn.length;
  31200. return boundFn
  31201. }
  31202. function nativeBind (fn, ctx) {
  31203. return fn.bind(ctx)
  31204. }
  31205. var bind = Function.prototype.bind
  31206. ? nativeBind
  31207. : polyfillBind;
  31208. /**
  31209. * Convert an Array-like object to a real Array.
  31210. */
  31211. function toArray (list, start) {
  31212. start = start || 0;
  31213. var i = list.length - start;
  31214. var ret = new Array(i);
  31215. while (i--) {
  31216. ret[i] = list[i + start];
  31217. }
  31218. return ret
  31219. }
  31220. /**
  31221. * Mix properties into target object.
  31222. */
  31223. function extend (to, _from) {
  31224. for (var key in _from) {
  31225. to[key] = _from[key];
  31226. }
  31227. return to
  31228. }
  31229. /**
  31230. * Merge an Array of Objects into a single Object.
  31231. */
  31232. function toObject (arr) {
  31233. var res = {};
  31234. for (var i = 0; i < arr.length; i++) {
  31235. if (arr[i]) {
  31236. extend(res, arr[i]);
  31237. }
  31238. }
  31239. return res
  31240. }
  31241. /* eslint-disable no-unused-vars */
  31242. /**
  31243. * Perform no operation.
  31244. * Stubbing args to make Flow happy without leaving useless transpiled code
  31245. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  31246. */
  31247. function noop (a, b, c) {}
  31248. /**
  31249. * Always return false.
  31250. */
  31251. var no = function (a, b, c) { return false; };
  31252. /* eslint-enable no-unused-vars */
  31253. /**
  31254. * Return the same value.
  31255. */
  31256. var identity = function (_) { return _; };
  31257. /**
  31258. * Check if two values are loosely equal - that is,
  31259. * if they are plain objects, do they have the same shape?
  31260. */
  31261. function looseEqual (a, b) {
  31262. if (a === b) { return true }
  31263. var isObjectA = isObject(a);
  31264. var isObjectB = isObject(b);
  31265. if (isObjectA && isObjectB) {
  31266. try {
  31267. var isArrayA = Array.isArray(a);
  31268. var isArrayB = Array.isArray(b);
  31269. if (isArrayA && isArrayB) {
  31270. return a.length === b.length && a.every(function (e, i) {
  31271. return looseEqual(e, b[i])
  31272. })
  31273. } else if (a instanceof Date && b instanceof Date) {
  31274. return a.getTime() === b.getTime()
  31275. } else if (!isArrayA && !isArrayB) {
  31276. var keysA = Object.keys(a);
  31277. var keysB = Object.keys(b);
  31278. return keysA.length === keysB.length && keysA.every(function (key) {
  31279. return looseEqual(a[key], b[key])
  31280. })
  31281. } else {
  31282. /* istanbul ignore next */
  31283. return false
  31284. }
  31285. } catch (e) {
  31286. /* istanbul ignore next */
  31287. return false
  31288. }
  31289. } else if (!isObjectA && !isObjectB) {
  31290. return String(a) === String(b)
  31291. } else {
  31292. return false
  31293. }
  31294. }
  31295. /**
  31296. * Return the first index at which a loosely equal value can be
  31297. * found in the array (if value is a plain object, the array must
  31298. * contain an object of the same shape), or -1 if it is not present.
  31299. */
  31300. function looseIndexOf (arr, val) {
  31301. for (var i = 0; i < arr.length; i++) {
  31302. if (looseEqual(arr[i], val)) { return i }
  31303. }
  31304. return -1
  31305. }
  31306. /**
  31307. * Ensure a function is called only once.
  31308. */
  31309. function once (fn) {
  31310. var called = false;
  31311. return function () {
  31312. if (!called) {
  31313. called = true;
  31314. fn.apply(this, arguments);
  31315. }
  31316. }
  31317. }
  31318. var ASSET_TYPES = [
  31319. 'component',
  31320. 'directive',
  31321. 'filter'
  31322. ];
  31323. var LIFECYCLE_HOOKS = [
  31324. 'beforeCreate',
  31325. 'created',
  31326. 'beforeMount',
  31327. 'mounted',
  31328. 'beforeUpdate',
  31329. 'updated',
  31330. 'beforeDestroy',
  31331. 'destroyed',
  31332. 'activated',
  31333. 'deactivated',
  31334. 'errorCaptured',
  31335. 'serverPrefetch'
  31336. ];
  31337. /* */
  31338. var config = ({
  31339. /**
  31340. * Option merge strategies (used in core/util/options)
  31341. */
  31342. // $flow-disable-line
  31343. optionMergeStrategies: Object.create(null),
  31344. /**
  31345. * Whether to suppress warnings.
  31346. */
  31347. silent: false,
  31348. /**
  31349. * Show production mode tip message on boot?
  31350. */
  31351. productionTip: "development" !== 'production',
  31352. /**
  31353. * Whether to enable devtools
  31354. */
  31355. devtools: "development" !== 'production',
  31356. /**
  31357. * Whether to record perf
  31358. */
  31359. performance: false,
  31360. /**
  31361. * Error handler for watcher errors
  31362. */
  31363. errorHandler: null,
  31364. /**
  31365. * Warn handler for watcher warns
  31366. */
  31367. warnHandler: null,
  31368. /**
  31369. * Ignore certain custom elements
  31370. */
  31371. ignoredElements: [],
  31372. /**
  31373. * Custom user key aliases for v-on
  31374. */
  31375. // $flow-disable-line
  31376. keyCodes: Object.create(null),
  31377. /**
  31378. * Check if a tag is reserved so that it cannot be registered as a
  31379. * component. This is platform-dependent and may be overwritten.
  31380. */
  31381. isReservedTag: no,
  31382. /**
  31383. * Check if an attribute is reserved so that it cannot be used as a component
  31384. * prop. This is platform-dependent and may be overwritten.
  31385. */
  31386. isReservedAttr: no,
  31387. /**
  31388. * Check if a tag is an unknown element.
  31389. * Platform-dependent.
  31390. */
  31391. isUnknownElement: no,
  31392. /**
  31393. * Get the namespace of an element
  31394. */
  31395. getTagNamespace: noop,
  31396. /**
  31397. * Parse the real tag name for the specific platform.
  31398. */
  31399. parsePlatformTagName: identity,
  31400. /**
  31401. * Check if an attribute must be bound using property, e.g. value
  31402. * Platform-dependent.
  31403. */
  31404. mustUseProp: no,
  31405. /**
  31406. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  31407. * This will significantly reduce performance if set to false.
  31408. */
  31409. async: true,
  31410. /**
  31411. * Exposed for legacy reasons
  31412. */
  31413. _lifecycleHooks: LIFECYCLE_HOOKS
  31414. });
  31415. /* */
  31416. /**
  31417. * unicode letters used for parsing html tags, component names and property paths.
  31418. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  31419. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  31420. */
  31421. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  31422. /**
  31423. * Check if a string starts with $ or _
  31424. */
  31425. function isReserved (str) {
  31426. var c = (str + '').charCodeAt(0);
  31427. return c === 0x24 || c === 0x5F
  31428. }
  31429. /**
  31430. * Define a property.
  31431. */
  31432. function def (obj, key, val, enumerable) {
  31433. Object.defineProperty(obj, key, {
  31434. value: val,
  31435. enumerable: !!enumerable,
  31436. writable: true,
  31437. configurable: true
  31438. });
  31439. }
  31440. /**
  31441. * Parse simple path.
  31442. */
  31443. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  31444. function parsePath (path) {
  31445. if (bailRE.test(path)) {
  31446. return
  31447. }
  31448. var segments = path.split('.');
  31449. return function (obj) {
  31450. for (var i = 0; i < segments.length; i++) {
  31451. if (!obj) { return }
  31452. obj = obj[segments[i]];
  31453. }
  31454. return obj
  31455. }
  31456. }
  31457. /* */
  31458. // can we use __proto__?
  31459. var hasProto = '__proto__' in {};
  31460. // Browser environment sniffing
  31461. var inBrowser = typeof window !== 'undefined';
  31462. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  31463. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  31464. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  31465. var isIE = UA && /msie|trident/.test(UA);
  31466. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  31467. var isEdge = UA && UA.indexOf('edge/') > 0;
  31468. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  31469. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  31470. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  31471. var isPhantomJS = UA && /phantomjs/.test(UA);
  31472. var isFF = UA && UA.match(/firefox\/(\d+)/);
  31473. // Firefox has a "watch" function on Object.prototype...
  31474. var nativeWatch = ({}).watch;
  31475. if (inBrowser) {
  31476. try {
  31477. var opts = {};
  31478. Object.defineProperty(opts, 'passive', ({
  31479. get: function get () {
  31480. }
  31481. })); // https://github.com/facebook/flow/issues/285
  31482. window.addEventListener('test-passive', null, opts);
  31483. } catch (e) {}
  31484. }
  31485. // this needs to be lazy-evaled because vue may be required before
  31486. // vue-server-renderer can set VUE_ENV
  31487. var _isServer;
  31488. var isServerRendering = function () {
  31489. if (_isServer === undefined) {
  31490. /* istanbul ignore if */
  31491. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  31492. // detect presence of vue-server-renderer and avoid
  31493. // Webpack shimming the process
  31494. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  31495. } else {
  31496. _isServer = false;
  31497. }
  31498. }
  31499. return _isServer
  31500. };
  31501. // detect devtools
  31502. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  31503. /* istanbul ignore next */
  31504. function isNative (Ctor) {
  31505. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  31506. }
  31507. var hasSymbol =
  31508. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  31509. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  31510. var _Set;
  31511. /* istanbul ignore if */ // $flow-disable-line
  31512. if (typeof Set !== 'undefined' && isNative(Set)) {
  31513. // use native Set when available.
  31514. _Set = Set;
  31515. } else {
  31516. // a non-standard Set polyfill that only works with primitive keys.
  31517. _Set = /*@__PURE__*/(function () {
  31518. function Set () {
  31519. this.set = Object.create(null);
  31520. }
  31521. Set.prototype.has = function has (key) {
  31522. return this.set[key] === true
  31523. };
  31524. Set.prototype.add = function add (key) {
  31525. this.set[key] = true;
  31526. };
  31527. Set.prototype.clear = function clear () {
  31528. this.set = Object.create(null);
  31529. };
  31530. return Set;
  31531. }());
  31532. }
  31533. /* */
  31534. var warn = noop;
  31535. var tip = noop;
  31536. var generateComponentTrace = (noop); // work around flow check
  31537. var formatComponentName = (noop);
  31538. if (true) {
  31539. var hasConsole = typeof console !== 'undefined';
  31540. var classifyRE = /(?:^|[-_])(\w)/g;
  31541. var classify = function (str) { return str
  31542. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  31543. .replace(/[-_]/g, ''); };
  31544. warn = function (msg, vm) {
  31545. var trace = vm ? generateComponentTrace(vm) : '';
  31546. if (config.warnHandler) {
  31547. config.warnHandler.call(null, msg, vm, trace);
  31548. } else if (hasConsole && (!config.silent)) {
  31549. console.error(("[Vue warn]: " + msg + trace));
  31550. }
  31551. };
  31552. tip = function (msg, vm) {
  31553. if (hasConsole && (!config.silent)) {
  31554. console.warn("[Vue tip]: " + msg + (
  31555. vm ? generateComponentTrace(vm) : ''
  31556. ));
  31557. }
  31558. };
  31559. formatComponentName = function (vm, includeFile) {
  31560. if (vm.$root === vm) {
  31561. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  31562. return ('') + vm.$options.__file
  31563. }
  31564. return '<Root>'
  31565. }
  31566. var options = typeof vm === 'function' && vm.cid != null
  31567. ? vm.options
  31568. : vm._isVue
  31569. ? vm.$options || vm.constructor.options
  31570. : vm;
  31571. var name = options.name || options._componentTag;
  31572. var file = options.__file;
  31573. if (!name && file) {
  31574. var match = file.match(/([^/\\]+)\.vue$/);
  31575. name = match && match[1];
  31576. }
  31577. return (
  31578. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  31579. (file && includeFile !== false ? (" at " + file) : '')
  31580. )
  31581. };
  31582. var repeat = function (str, n) {
  31583. var res = '';
  31584. while (n) {
  31585. if (n % 2 === 1) { res += str; }
  31586. if (n > 1) { str += str; }
  31587. n >>= 1;
  31588. }
  31589. return res
  31590. };
  31591. generateComponentTrace = function (vm) {
  31592. if (vm._isVue && vm.$parent) {
  31593. var tree = [];
  31594. var currentRecursiveSequence = 0;
  31595. while (vm && vm.$options.name !== 'PageBody') {
  31596. if (tree.length > 0) {
  31597. var last = tree[tree.length - 1];
  31598. if (last.constructor === vm.constructor) {
  31599. currentRecursiveSequence++;
  31600. vm = vm.$parent;
  31601. continue
  31602. } else if (currentRecursiveSequence > 0) {
  31603. tree[tree.length - 1] = [last, currentRecursiveSequence];
  31604. currentRecursiveSequence = 0;
  31605. }
  31606. }
  31607. !vm.$options.isReserved && tree.push(vm);
  31608. vm = vm.$parent;
  31609. }
  31610. return '\n\nfound in\n\n' + tree
  31611. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  31612. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  31613. : formatComponentName(vm))); })
  31614. .join('\n')
  31615. } else {
  31616. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  31617. }
  31618. };
  31619. }
  31620. /* */
  31621. var uid = 0;
  31622. /**
  31623. * A dep is an observable that can have multiple
  31624. * directives subscribing to it.
  31625. */
  31626. var Dep = function Dep () {
  31627. this.id = uid++;
  31628. this.subs = [];
  31629. };
  31630. Dep.prototype.addSub = function addSub (sub) {
  31631. this.subs.push(sub);
  31632. };
  31633. Dep.prototype.removeSub = function removeSub (sub) {
  31634. remove(this.subs, sub);
  31635. };
  31636. Dep.prototype.depend = function depend () {
  31637. if (Dep.SharedObject.target) {
  31638. Dep.SharedObject.target.addDep(this);
  31639. }
  31640. };
  31641. Dep.prototype.notify = function notify () {
  31642. // stabilize the subscriber list first
  31643. var subs = this.subs.slice();
  31644. if ( true && !config.async) {
  31645. // subs aren't sorted in scheduler if not running async
  31646. // we need to sort them now to make sure they fire in correct
  31647. // order
  31648. subs.sort(function (a, b) { return a.id - b.id; });
  31649. }
  31650. for (var i = 0, l = subs.length; i < l; i++) {
  31651. subs[i].update();
  31652. }
  31653. };
  31654. // The current target watcher being evaluated.
  31655. // This is globally unique because only one watcher
  31656. // can be evaluated at a time.
  31657. // fixed by xxxxxx (nvue shared vuex)
  31658. /* eslint-disable no-undef */
  31659. Dep.SharedObject = {};
  31660. Dep.SharedObject.target = null;
  31661. Dep.SharedObject.targetStack = [];
  31662. function pushTarget (target) {
  31663. Dep.SharedObject.targetStack.push(target);
  31664. Dep.SharedObject.target = target;
  31665. Dep.target = target;
  31666. }
  31667. function popTarget () {
  31668. Dep.SharedObject.targetStack.pop();
  31669. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  31670. Dep.target = Dep.SharedObject.target;
  31671. }
  31672. /* */
  31673. var VNode = function VNode (
  31674. tag,
  31675. data,
  31676. children,
  31677. text,
  31678. elm,
  31679. context,
  31680. componentOptions,
  31681. asyncFactory
  31682. ) {
  31683. this.tag = tag;
  31684. this.data = data;
  31685. this.children = children;
  31686. this.text = text;
  31687. this.elm = elm;
  31688. this.ns = undefined;
  31689. this.context = context;
  31690. this.fnContext = undefined;
  31691. this.fnOptions = undefined;
  31692. this.fnScopeId = undefined;
  31693. this.key = data && data.key;
  31694. this.componentOptions = componentOptions;
  31695. this.componentInstance = undefined;
  31696. this.parent = undefined;
  31697. this.raw = false;
  31698. this.isStatic = false;
  31699. this.isRootInsert = true;
  31700. this.isComment = false;
  31701. this.isCloned = false;
  31702. this.isOnce = false;
  31703. this.asyncFactory = asyncFactory;
  31704. this.asyncMeta = undefined;
  31705. this.isAsyncPlaceholder = false;
  31706. };
  31707. var prototypeAccessors = { child: { configurable: true } };
  31708. // DEPRECATED: alias for componentInstance for backwards compat.
  31709. /* istanbul ignore next */
  31710. prototypeAccessors.child.get = function () {
  31711. return this.componentInstance
  31712. };
  31713. Object.defineProperties( VNode.prototype, prototypeAccessors );
  31714. var createEmptyVNode = function (text) {
  31715. if ( text === void 0 ) text = '';
  31716. var node = new VNode();
  31717. node.text = text;
  31718. node.isComment = true;
  31719. return node
  31720. };
  31721. function createTextVNode (val) {
  31722. return new VNode(undefined, undefined, undefined, String(val))
  31723. }
  31724. // optimized shallow clone
  31725. // used for static nodes and slot nodes because they may be reused across
  31726. // multiple renders, cloning them avoids errors when DOM manipulations rely
  31727. // on their elm reference.
  31728. function cloneVNode (vnode) {
  31729. var cloned = new VNode(
  31730. vnode.tag,
  31731. vnode.data,
  31732. // #7975
  31733. // clone children array to avoid mutating original in case of cloning
  31734. // a child.
  31735. vnode.children && vnode.children.slice(),
  31736. vnode.text,
  31737. vnode.elm,
  31738. vnode.context,
  31739. vnode.componentOptions,
  31740. vnode.asyncFactory
  31741. );
  31742. cloned.ns = vnode.ns;
  31743. cloned.isStatic = vnode.isStatic;
  31744. cloned.key = vnode.key;
  31745. cloned.isComment = vnode.isComment;
  31746. cloned.fnContext = vnode.fnContext;
  31747. cloned.fnOptions = vnode.fnOptions;
  31748. cloned.fnScopeId = vnode.fnScopeId;
  31749. cloned.asyncMeta = vnode.asyncMeta;
  31750. cloned.isCloned = true;
  31751. return cloned
  31752. }
  31753. /*
  31754. * not type checking this file because flow doesn't play well with
  31755. * dynamically accessing methods on Array prototype
  31756. */
  31757. var arrayProto = Array.prototype;
  31758. var arrayMethods = Object.create(arrayProto);
  31759. var methodsToPatch = [
  31760. 'push',
  31761. 'pop',
  31762. 'shift',
  31763. 'unshift',
  31764. 'splice',
  31765. 'sort',
  31766. 'reverse'
  31767. ];
  31768. /**
  31769. * Intercept mutating methods and emit events
  31770. */
  31771. methodsToPatch.forEach(function (method) {
  31772. // cache original method
  31773. var original = arrayProto[method];
  31774. def(arrayMethods, method, function mutator () {
  31775. var args = [], len = arguments.length;
  31776. while ( len-- ) args[ len ] = arguments[ len ];
  31777. var result = original.apply(this, args);
  31778. var ob = this.__ob__;
  31779. var inserted;
  31780. switch (method) {
  31781. case 'push':
  31782. case 'unshift':
  31783. inserted = args;
  31784. break
  31785. case 'splice':
  31786. inserted = args.slice(2);
  31787. break
  31788. }
  31789. if (inserted) { ob.observeArray(inserted); }
  31790. // notify change
  31791. ob.dep.notify();
  31792. return result
  31793. });
  31794. });
  31795. /* */
  31796. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  31797. /**
  31798. * In some cases we may want to disable observation inside a component's
  31799. * update computation.
  31800. */
  31801. var shouldObserve = true;
  31802. function toggleObserving (value) {
  31803. shouldObserve = value;
  31804. }
  31805. /**
  31806. * Observer class that is attached to each observed
  31807. * object. Once attached, the observer converts the target
  31808. * object's property keys into getter/setters that
  31809. * collect dependencies and dispatch updates.
  31810. */
  31811. var Observer = function Observer (value) {
  31812. this.value = value;
  31813. this.dep = new Dep();
  31814. this.vmCount = 0;
  31815. def(value, '__ob__', this);
  31816. if (Array.isArray(value)) {
  31817. if (hasProto) {
  31818. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  31819. if(value.push !== value.__proto__.push){
  31820. copyAugment(value, arrayMethods, arrayKeys);
  31821. } else {
  31822. protoAugment(value, arrayMethods);
  31823. }
  31824. }
  31825. } else {
  31826. copyAugment(value, arrayMethods, arrayKeys);
  31827. }
  31828. this.observeArray(value);
  31829. } else {
  31830. this.walk(value);
  31831. }
  31832. };
  31833. /**
  31834. * Walk through all properties and convert them into
  31835. * getter/setters. This method should only be called when
  31836. * value type is Object.
  31837. */
  31838. Observer.prototype.walk = function walk (obj) {
  31839. var keys = Object.keys(obj);
  31840. for (var i = 0; i < keys.length; i++) {
  31841. defineReactive$$1(obj, keys[i]);
  31842. }
  31843. };
  31844. /**
  31845. * Observe a list of Array items.
  31846. */
  31847. Observer.prototype.observeArray = function observeArray (items) {
  31848. for (var i = 0, l = items.length; i < l; i++) {
  31849. observe(items[i]);
  31850. }
  31851. };
  31852. // helpers
  31853. /**
  31854. * Augment a target Object or Array by intercepting
  31855. * the prototype chain using __proto__
  31856. */
  31857. function protoAugment (target, src) {
  31858. /* eslint-disable no-proto */
  31859. target.__proto__ = src;
  31860. /* eslint-enable no-proto */
  31861. }
  31862. /**
  31863. * Augment a target Object or Array by defining
  31864. * hidden properties.
  31865. */
  31866. /* istanbul ignore next */
  31867. function copyAugment (target, src, keys) {
  31868. for (var i = 0, l = keys.length; i < l; i++) {
  31869. var key = keys[i];
  31870. def(target, key, src[key]);
  31871. }
  31872. }
  31873. /**
  31874. * Attempt to create an observer instance for a value,
  31875. * returns the new observer if successfully observed,
  31876. * or the existing observer if the value already has one.
  31877. */
  31878. function observe (value, asRootData) {
  31879. if (!isObject(value) || value instanceof VNode) {
  31880. return
  31881. }
  31882. var ob;
  31883. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  31884. ob = value.__ob__;
  31885. } else if (
  31886. shouldObserve &&
  31887. !isServerRendering() &&
  31888. (Array.isArray(value) || isPlainObject(value)) &&
  31889. Object.isExtensible(value) &&
  31890. !value._isVue &&
  31891. !value.__v_isMPComponent
  31892. ) {
  31893. ob = new Observer(value);
  31894. }
  31895. if (asRootData && ob) {
  31896. ob.vmCount++;
  31897. }
  31898. return ob
  31899. }
  31900. /**
  31901. * Define a reactive property on an Object.
  31902. */
  31903. function defineReactive$$1 (
  31904. obj,
  31905. key,
  31906. val,
  31907. customSetter,
  31908. shallow
  31909. ) {
  31910. var dep = new Dep();
  31911. var property = Object.getOwnPropertyDescriptor(obj, key);
  31912. if (property && property.configurable === false) {
  31913. return
  31914. }
  31915. // cater for pre-defined getter/setters
  31916. var getter = property && property.get;
  31917. var setter = property && property.set;
  31918. if ((!getter || setter) && arguments.length === 2) {
  31919. val = obj[key];
  31920. }
  31921. var childOb = !shallow && observe(val);
  31922. Object.defineProperty(obj, key, {
  31923. enumerable: true,
  31924. configurable: true,
  31925. get: function reactiveGetter () {
  31926. var value = getter ? getter.call(obj) : val;
  31927. if (Dep.SharedObject.target) { // fixed by xxxxxx
  31928. dep.depend();
  31929. if (childOb) {
  31930. childOb.dep.depend();
  31931. if (Array.isArray(value)) {
  31932. dependArray(value);
  31933. }
  31934. }
  31935. }
  31936. return value
  31937. },
  31938. set: function reactiveSetter (newVal) {
  31939. var value = getter ? getter.call(obj) : val;
  31940. /* eslint-disable no-self-compare */
  31941. if (newVal === value || (newVal !== newVal && value !== value)) {
  31942. return
  31943. }
  31944. /* eslint-enable no-self-compare */
  31945. if ( true && customSetter) {
  31946. customSetter();
  31947. }
  31948. // #7981: for accessor properties without setter
  31949. if (getter && !setter) { return }
  31950. if (setter) {
  31951. setter.call(obj, newVal);
  31952. } else {
  31953. val = newVal;
  31954. }
  31955. childOb = !shallow && observe(newVal);
  31956. dep.notify();
  31957. }
  31958. });
  31959. }
  31960. /**
  31961. * Set a property on an object. Adds the new property and
  31962. * triggers change notification if the property doesn't
  31963. * already exist.
  31964. */
  31965. function set (target, key, val) {
  31966. if ( true &&
  31967. (isUndef(target) || isPrimitive(target))
  31968. ) {
  31969. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  31970. }
  31971. if (Array.isArray(target) && isValidArrayIndex(key)) {
  31972. target.length = Math.max(target.length, key);
  31973. target.splice(key, 1, val);
  31974. return val
  31975. }
  31976. if (key in target && !(key in Object.prototype)) {
  31977. target[key] = val;
  31978. return val
  31979. }
  31980. var ob = (target).__ob__;
  31981. if (target._isVue || (ob && ob.vmCount)) {
  31982. true && warn(
  31983. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  31984. 'at runtime - declare it upfront in the data option.'
  31985. );
  31986. return val
  31987. }
  31988. if (!ob) {
  31989. target[key] = val;
  31990. return val
  31991. }
  31992. defineReactive$$1(ob.value, key, val);
  31993. ob.dep.notify();
  31994. return val
  31995. }
  31996. /**
  31997. * Delete a property and trigger change if necessary.
  31998. */
  31999. function del (target, key) {
  32000. if ( true &&
  32001. (isUndef(target) || isPrimitive(target))
  32002. ) {
  32003. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  32004. }
  32005. if (Array.isArray(target) && isValidArrayIndex(key)) {
  32006. target.splice(key, 1);
  32007. return
  32008. }
  32009. var ob = (target).__ob__;
  32010. if (target._isVue || (ob && ob.vmCount)) {
  32011. true && warn(
  32012. 'Avoid deleting properties on a Vue instance or its root $data ' +
  32013. '- just set it to null.'
  32014. );
  32015. return
  32016. }
  32017. if (!hasOwn(target, key)) {
  32018. return
  32019. }
  32020. delete target[key];
  32021. if (!ob) {
  32022. return
  32023. }
  32024. ob.dep.notify();
  32025. }
  32026. /**
  32027. * Collect dependencies on array elements when the array is touched, since
  32028. * we cannot intercept array element access like property getters.
  32029. */
  32030. function dependArray (value) {
  32031. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  32032. e = value[i];
  32033. e && e.__ob__ && e.__ob__.dep.depend();
  32034. if (Array.isArray(e)) {
  32035. dependArray(e);
  32036. }
  32037. }
  32038. }
  32039. /* */
  32040. /**
  32041. * Option overwriting strategies are functions that handle
  32042. * how to merge a parent option value and a child option
  32043. * value into the final value.
  32044. */
  32045. var strats = config.optionMergeStrategies;
  32046. /**
  32047. * Options with restrictions
  32048. */
  32049. if (true) {
  32050. strats.el = strats.propsData = function (parent, child, vm, key) {
  32051. if (!vm) {
  32052. warn(
  32053. "option \"" + key + "\" can only be used during instance " +
  32054. 'creation with the `new` keyword.'
  32055. );
  32056. }
  32057. return defaultStrat(parent, child)
  32058. };
  32059. }
  32060. /**
  32061. * Helper that recursively merges two data objects together.
  32062. */
  32063. function mergeData (to, from) {
  32064. if (!from) { return to }
  32065. var key, toVal, fromVal;
  32066. var keys = hasSymbol
  32067. ? Reflect.ownKeys(from)
  32068. : Object.keys(from);
  32069. for (var i = 0; i < keys.length; i++) {
  32070. key = keys[i];
  32071. // in case the object is already observed...
  32072. if (key === '__ob__') { continue }
  32073. toVal = to[key];
  32074. fromVal = from[key];
  32075. if (!hasOwn(to, key)) {
  32076. set(to, key, fromVal);
  32077. } else if (
  32078. toVal !== fromVal &&
  32079. isPlainObject(toVal) &&
  32080. isPlainObject(fromVal)
  32081. ) {
  32082. mergeData(toVal, fromVal);
  32083. }
  32084. }
  32085. return to
  32086. }
  32087. /**
  32088. * Data
  32089. */
  32090. function mergeDataOrFn (
  32091. parentVal,
  32092. childVal,
  32093. vm
  32094. ) {
  32095. if (!vm) {
  32096. // in a Vue.extend merge, both should be functions
  32097. if (!childVal) {
  32098. return parentVal
  32099. }
  32100. if (!parentVal) {
  32101. return childVal
  32102. }
  32103. // when parentVal & childVal are both present,
  32104. // we need to return a function that returns the
  32105. // merged result of both functions... no need to
  32106. // check if parentVal is a function here because
  32107. // it has to be a function to pass previous merges.
  32108. return function mergedDataFn () {
  32109. return mergeData(
  32110. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  32111. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  32112. )
  32113. }
  32114. } else {
  32115. return function mergedInstanceDataFn () {
  32116. // instance merge
  32117. var instanceData = typeof childVal === 'function'
  32118. ? childVal.call(vm, vm)
  32119. : childVal;
  32120. var defaultData = typeof parentVal === 'function'
  32121. ? parentVal.call(vm, vm)
  32122. : parentVal;
  32123. if (instanceData) {
  32124. return mergeData(instanceData, defaultData)
  32125. } else {
  32126. return defaultData
  32127. }
  32128. }
  32129. }
  32130. }
  32131. strats.data = function (
  32132. parentVal,
  32133. childVal,
  32134. vm
  32135. ) {
  32136. if (!vm) {
  32137. if (childVal && typeof childVal !== 'function') {
  32138. true && warn(
  32139. 'The "data" option should be a function ' +
  32140. 'that returns a per-instance value in component ' +
  32141. 'definitions.',
  32142. vm
  32143. );
  32144. return parentVal
  32145. }
  32146. return mergeDataOrFn(parentVal, childVal)
  32147. }
  32148. return mergeDataOrFn(parentVal, childVal, vm)
  32149. };
  32150. /**
  32151. * Hooks and props are merged as arrays.
  32152. */
  32153. function mergeHook (
  32154. parentVal,
  32155. childVal
  32156. ) {
  32157. var res = childVal
  32158. ? parentVal
  32159. ? parentVal.concat(childVal)
  32160. : Array.isArray(childVal)
  32161. ? childVal
  32162. : [childVal]
  32163. : parentVal;
  32164. return res
  32165. ? dedupeHooks(res)
  32166. : res
  32167. }
  32168. function dedupeHooks (hooks) {
  32169. var res = [];
  32170. for (var i = 0; i < hooks.length; i++) {
  32171. if (res.indexOf(hooks[i]) === -1) {
  32172. res.push(hooks[i]);
  32173. }
  32174. }
  32175. return res
  32176. }
  32177. LIFECYCLE_HOOKS.forEach(function (hook) {
  32178. strats[hook] = mergeHook;
  32179. });
  32180. /**
  32181. * Assets
  32182. *
  32183. * When a vm is present (instance creation), we need to do
  32184. * a three-way merge between constructor options, instance
  32185. * options and parent options.
  32186. */
  32187. function mergeAssets (
  32188. parentVal,
  32189. childVal,
  32190. vm,
  32191. key
  32192. ) {
  32193. var res = Object.create(parentVal || null);
  32194. if (childVal) {
  32195. true && assertObjectType(key, childVal, vm);
  32196. return extend(res, childVal)
  32197. } else {
  32198. return res
  32199. }
  32200. }
  32201. ASSET_TYPES.forEach(function (type) {
  32202. strats[type + 's'] = mergeAssets;
  32203. });
  32204. /**
  32205. * Watchers.
  32206. *
  32207. * Watchers hashes should not overwrite one
  32208. * another, so we merge them as arrays.
  32209. */
  32210. strats.watch = function (
  32211. parentVal,
  32212. childVal,
  32213. vm,
  32214. key
  32215. ) {
  32216. // work around Firefox's Object.prototype.watch...
  32217. if (parentVal === nativeWatch) { parentVal = undefined; }
  32218. if (childVal === nativeWatch) { childVal = undefined; }
  32219. /* istanbul ignore if */
  32220. if (!childVal) { return Object.create(parentVal || null) }
  32221. if (true) {
  32222. assertObjectType(key, childVal, vm);
  32223. }
  32224. if (!parentVal) { return childVal }
  32225. var ret = {};
  32226. extend(ret, parentVal);
  32227. for (var key$1 in childVal) {
  32228. var parent = ret[key$1];
  32229. var child = childVal[key$1];
  32230. if (parent && !Array.isArray(parent)) {
  32231. parent = [parent];
  32232. }
  32233. ret[key$1] = parent
  32234. ? parent.concat(child)
  32235. : Array.isArray(child) ? child : [child];
  32236. }
  32237. return ret
  32238. };
  32239. /**
  32240. * Other object hashes.
  32241. */
  32242. strats.props =
  32243. strats.methods =
  32244. strats.inject =
  32245. strats.computed = function (
  32246. parentVal,
  32247. childVal,
  32248. vm,
  32249. key
  32250. ) {
  32251. if (childVal && "development" !== 'production') {
  32252. assertObjectType(key, childVal, vm);
  32253. }
  32254. if (!parentVal) { return childVal }
  32255. var ret = Object.create(null);
  32256. extend(ret, parentVal);
  32257. if (childVal) { extend(ret, childVal); }
  32258. return ret
  32259. };
  32260. strats.provide = mergeDataOrFn;
  32261. /**
  32262. * Default strategy.
  32263. */
  32264. var defaultStrat = function (parentVal, childVal) {
  32265. return childVal === undefined
  32266. ? parentVal
  32267. : childVal
  32268. };
  32269. /**
  32270. * Validate component names
  32271. */
  32272. function checkComponents (options) {
  32273. for (var key in options.components) {
  32274. validateComponentName(key);
  32275. }
  32276. }
  32277. function validateComponentName (name) {
  32278. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  32279. warn(
  32280. 'Invalid component name: "' + name + '". Component names ' +
  32281. 'should conform to valid custom element name in html5 specification.'
  32282. );
  32283. }
  32284. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  32285. warn(
  32286. 'Do not use built-in or reserved HTML elements as component ' +
  32287. 'id: ' + name
  32288. );
  32289. }
  32290. }
  32291. /**
  32292. * Ensure all props option syntax are normalized into the
  32293. * Object-based format.
  32294. */
  32295. function normalizeProps (options, vm) {
  32296. var props = options.props;
  32297. if (!props) { return }
  32298. var res = {};
  32299. var i, val, name;
  32300. if (Array.isArray(props)) {
  32301. i = props.length;
  32302. while (i--) {
  32303. val = props[i];
  32304. if (typeof val === 'string') {
  32305. name = camelize(val);
  32306. res[name] = { type: null };
  32307. } else if (true) {
  32308. warn('props must be strings when using array syntax.');
  32309. }
  32310. }
  32311. } else if (isPlainObject(props)) {
  32312. for (var key in props) {
  32313. val = props[key];
  32314. name = camelize(key);
  32315. res[name] = isPlainObject(val)
  32316. ? val
  32317. : { type: val };
  32318. }
  32319. } else if (true) {
  32320. warn(
  32321. "Invalid value for option \"props\": expected an Array or an Object, " +
  32322. "but got " + (toRawType(props)) + ".",
  32323. vm
  32324. );
  32325. }
  32326. options.props = res;
  32327. }
  32328. /**
  32329. * Normalize all injections into Object-based format
  32330. */
  32331. function normalizeInject (options, vm) {
  32332. var inject = options.inject;
  32333. if (!inject) { return }
  32334. var normalized = options.inject = {};
  32335. if (Array.isArray(inject)) {
  32336. for (var i = 0; i < inject.length; i++) {
  32337. normalized[inject[i]] = { from: inject[i] };
  32338. }
  32339. } else if (isPlainObject(inject)) {
  32340. for (var key in inject) {
  32341. var val = inject[key];
  32342. normalized[key] = isPlainObject(val)
  32343. ? extend({ from: key }, val)
  32344. : { from: val };
  32345. }
  32346. } else if (true) {
  32347. warn(
  32348. "Invalid value for option \"inject\": expected an Array or an Object, " +
  32349. "but got " + (toRawType(inject)) + ".",
  32350. vm
  32351. );
  32352. }
  32353. }
  32354. /**
  32355. * Normalize raw function directives into object format.
  32356. */
  32357. function normalizeDirectives (options) {
  32358. var dirs = options.directives;
  32359. if (dirs) {
  32360. for (var key in dirs) {
  32361. var def$$1 = dirs[key];
  32362. if (typeof def$$1 === 'function') {
  32363. dirs[key] = { bind: def$$1, update: def$$1 };
  32364. }
  32365. }
  32366. }
  32367. }
  32368. function assertObjectType (name, value, vm) {
  32369. if (!isPlainObject(value)) {
  32370. warn(
  32371. "Invalid value for option \"" + name + "\": expected an Object, " +
  32372. "but got " + (toRawType(value)) + ".",
  32373. vm
  32374. );
  32375. }
  32376. }
  32377. /**
  32378. * Merge two option objects into a new one.
  32379. * Core utility used in both instantiation and inheritance.
  32380. */
  32381. function mergeOptions (
  32382. parent,
  32383. child,
  32384. vm
  32385. ) {
  32386. if (true) {
  32387. checkComponents(child);
  32388. }
  32389. if (typeof child === 'function') {
  32390. child = child.options;
  32391. }
  32392. normalizeProps(child, vm);
  32393. normalizeInject(child, vm);
  32394. normalizeDirectives(child);
  32395. // Apply extends and mixins on the child options,
  32396. // but only if it is a raw options object that isn't
  32397. // the result of another mergeOptions call.
  32398. // Only merged options has the _base property.
  32399. if (!child._base) {
  32400. if (child.extends) {
  32401. parent = mergeOptions(parent, child.extends, vm);
  32402. }
  32403. if (child.mixins) {
  32404. for (var i = 0, l = child.mixins.length; i < l; i++) {
  32405. parent = mergeOptions(parent, child.mixins[i], vm);
  32406. }
  32407. }
  32408. }
  32409. var options = {};
  32410. var key;
  32411. for (key in parent) {
  32412. mergeField(key);
  32413. }
  32414. for (key in child) {
  32415. if (!hasOwn(parent, key)) {
  32416. mergeField(key);
  32417. }
  32418. }
  32419. function mergeField (key) {
  32420. var strat = strats[key] || defaultStrat;
  32421. options[key] = strat(parent[key], child[key], vm, key);
  32422. }
  32423. return options
  32424. }
  32425. /**
  32426. * Resolve an asset.
  32427. * This function is used because child instances need access
  32428. * to assets defined in its ancestor chain.
  32429. */
  32430. function resolveAsset (
  32431. options,
  32432. type,
  32433. id,
  32434. warnMissing
  32435. ) {
  32436. /* istanbul ignore if */
  32437. if (typeof id !== 'string') {
  32438. return
  32439. }
  32440. var assets = options[type];
  32441. // check local registration variations first
  32442. if (hasOwn(assets, id)) { return assets[id] }
  32443. var camelizedId = camelize(id);
  32444. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  32445. var PascalCaseId = capitalize(camelizedId);
  32446. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  32447. // fallback to prototype chain
  32448. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  32449. if ( true && warnMissing && !res) {
  32450. warn(
  32451. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  32452. options
  32453. );
  32454. }
  32455. return res
  32456. }
  32457. /* */
  32458. function validateProp (
  32459. key,
  32460. propOptions,
  32461. propsData,
  32462. vm
  32463. ) {
  32464. var prop = propOptions[key];
  32465. var absent = !hasOwn(propsData, key);
  32466. var value = propsData[key];
  32467. // boolean casting
  32468. var booleanIndex = getTypeIndex(Boolean, prop.type);
  32469. if (booleanIndex > -1) {
  32470. if (absent && !hasOwn(prop, 'default')) {
  32471. value = false;
  32472. } else if (value === '' || value === hyphenate(key)) {
  32473. // only cast empty string / same name to boolean if
  32474. // boolean has higher priority
  32475. var stringIndex = getTypeIndex(String, prop.type);
  32476. if (stringIndex < 0 || booleanIndex < stringIndex) {
  32477. value = true;
  32478. }
  32479. }
  32480. }
  32481. // check default value
  32482. if (value === undefined) {
  32483. value = getPropDefaultValue(vm, prop, key);
  32484. // since the default value is a fresh copy,
  32485. // make sure to observe it.
  32486. var prevShouldObserve = shouldObserve;
  32487. toggleObserving(true);
  32488. observe(value);
  32489. toggleObserving(prevShouldObserve);
  32490. }
  32491. if (
  32492. true
  32493. ) {
  32494. assertProp(prop, key, value, vm, absent);
  32495. }
  32496. return value
  32497. }
  32498. /**
  32499. * Get the default value of a prop.
  32500. */
  32501. function getPropDefaultValue (vm, prop, key) {
  32502. // no default, return undefined
  32503. if (!hasOwn(prop, 'default')) {
  32504. return undefined
  32505. }
  32506. var def = prop.default;
  32507. // warn against non-factory defaults for Object & Array
  32508. if ( true && isObject(def)) {
  32509. warn(
  32510. 'Invalid default value for prop "' + key + '": ' +
  32511. 'Props with type Object/Array must use a factory function ' +
  32512. 'to return the default value.',
  32513. vm
  32514. );
  32515. }
  32516. // the raw prop value was also undefined from previous render,
  32517. // return previous default value to avoid unnecessary watcher trigger
  32518. if (vm && vm.$options.propsData &&
  32519. vm.$options.propsData[key] === undefined &&
  32520. vm._props[key] !== undefined
  32521. ) {
  32522. return vm._props[key]
  32523. }
  32524. // call factory function for non-Function types
  32525. // a value is Function if its prototype is function even across different execution context
  32526. return typeof def === 'function' && getType(prop.type) !== 'Function'
  32527. ? def.call(vm)
  32528. : def
  32529. }
  32530. /**
  32531. * Assert whether a prop is valid.
  32532. */
  32533. function assertProp (
  32534. prop,
  32535. name,
  32536. value,
  32537. vm,
  32538. absent
  32539. ) {
  32540. if (prop.required && absent) {
  32541. warn(
  32542. 'Missing required prop: "' + name + '"',
  32543. vm
  32544. );
  32545. return
  32546. }
  32547. if (value == null && !prop.required) {
  32548. return
  32549. }
  32550. var type = prop.type;
  32551. var valid = !type || type === true;
  32552. var expectedTypes = [];
  32553. if (type) {
  32554. if (!Array.isArray(type)) {
  32555. type = [type];
  32556. }
  32557. for (var i = 0; i < type.length && !valid; i++) {
  32558. var assertedType = assertType(value, type[i]);
  32559. expectedTypes.push(assertedType.expectedType || '');
  32560. valid = assertedType.valid;
  32561. }
  32562. }
  32563. if (!valid) {
  32564. warn(
  32565. getInvalidTypeMessage(name, value, expectedTypes),
  32566. vm
  32567. );
  32568. return
  32569. }
  32570. var validator = prop.validator;
  32571. if (validator) {
  32572. if (!validator(value)) {
  32573. warn(
  32574. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  32575. vm
  32576. );
  32577. }
  32578. }
  32579. }
  32580. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  32581. function assertType (value, type) {
  32582. var valid;
  32583. var expectedType = getType(type);
  32584. if (simpleCheckRE.test(expectedType)) {
  32585. var t = typeof value;
  32586. valid = t === expectedType.toLowerCase();
  32587. // for primitive wrapper objects
  32588. if (!valid && t === 'object') {
  32589. valid = value instanceof type;
  32590. }
  32591. } else if (expectedType === 'Object') {
  32592. valid = isPlainObject(value);
  32593. } else if (expectedType === 'Array') {
  32594. valid = Array.isArray(value);
  32595. } else {
  32596. valid = value instanceof type;
  32597. }
  32598. return {
  32599. valid: valid,
  32600. expectedType: expectedType
  32601. }
  32602. }
  32603. /**
  32604. * Use function string name to check built-in types,
  32605. * because a simple equality check will fail when running
  32606. * across different vms / iframes.
  32607. */
  32608. function getType (fn) {
  32609. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  32610. return match ? match[1] : ''
  32611. }
  32612. function isSameType (a, b) {
  32613. return getType(a) === getType(b)
  32614. }
  32615. function getTypeIndex (type, expectedTypes) {
  32616. if (!Array.isArray(expectedTypes)) {
  32617. return isSameType(expectedTypes, type) ? 0 : -1
  32618. }
  32619. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  32620. if (isSameType(expectedTypes[i], type)) {
  32621. return i
  32622. }
  32623. }
  32624. return -1
  32625. }
  32626. function getInvalidTypeMessage (name, value, expectedTypes) {
  32627. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  32628. " Expected " + (expectedTypes.map(capitalize).join(', '));
  32629. var expectedType = expectedTypes[0];
  32630. var receivedType = toRawType(value);
  32631. var expectedValue = styleValue(value, expectedType);
  32632. var receivedValue = styleValue(value, receivedType);
  32633. // check if we need to specify expected value
  32634. if (expectedTypes.length === 1 &&
  32635. isExplicable(expectedType) &&
  32636. !isBoolean(expectedType, receivedType)) {
  32637. message += " with value " + expectedValue;
  32638. }
  32639. message += ", got " + receivedType + " ";
  32640. // check if we need to specify received value
  32641. if (isExplicable(receivedType)) {
  32642. message += "with value " + receivedValue + ".";
  32643. }
  32644. return message
  32645. }
  32646. function styleValue (value, type) {
  32647. if (type === 'String') {
  32648. return ("\"" + value + "\"")
  32649. } else if (type === 'Number') {
  32650. return ("" + (Number(value)))
  32651. } else {
  32652. return ("" + value)
  32653. }
  32654. }
  32655. function isExplicable (value) {
  32656. var explicitTypes = ['string', 'number', 'boolean'];
  32657. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  32658. }
  32659. function isBoolean () {
  32660. var args = [], len = arguments.length;
  32661. while ( len-- ) args[ len ] = arguments[ len ];
  32662. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  32663. }
  32664. /* */
  32665. function handleError (err, vm, info) {
  32666. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  32667. // See: https://github.com/vuejs/vuex/issues/1505
  32668. pushTarget();
  32669. try {
  32670. if (vm) {
  32671. var cur = vm;
  32672. while ((cur = cur.$parent)) {
  32673. var hooks = cur.$options.errorCaptured;
  32674. if (hooks) {
  32675. for (var i = 0; i < hooks.length; i++) {
  32676. try {
  32677. var capture = hooks[i].call(cur, err, vm, info) === false;
  32678. if (capture) { return }
  32679. } catch (e) {
  32680. globalHandleError(e, cur, 'errorCaptured hook');
  32681. }
  32682. }
  32683. }
  32684. }
  32685. }
  32686. globalHandleError(err, vm, info);
  32687. } finally {
  32688. popTarget();
  32689. }
  32690. }
  32691. function invokeWithErrorHandling (
  32692. handler,
  32693. context,
  32694. args,
  32695. vm,
  32696. info
  32697. ) {
  32698. var res;
  32699. try {
  32700. res = args ? handler.apply(context, args) : handler.call(context);
  32701. if (res && !res._isVue && isPromise(res) && !res._handled) {
  32702. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  32703. // issue #9511
  32704. // avoid catch triggering multiple times when nested calls
  32705. res._handled = true;
  32706. }
  32707. } catch (e) {
  32708. handleError(e, vm, info);
  32709. }
  32710. return res
  32711. }
  32712. function globalHandleError (err, vm, info) {
  32713. if (config.errorHandler) {
  32714. try {
  32715. return config.errorHandler.call(null, err, vm, info)
  32716. } catch (e) {
  32717. // if the user intentionally throws the original error in the handler,
  32718. // do not log it twice
  32719. if (e !== err) {
  32720. logError(e, null, 'config.errorHandler');
  32721. }
  32722. }
  32723. }
  32724. logError(err, vm, info);
  32725. }
  32726. function logError (err, vm, info) {
  32727. if (true) {
  32728. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  32729. }
  32730. /* istanbul ignore else */
  32731. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  32732. console.error(err);
  32733. } else {
  32734. throw err
  32735. }
  32736. }
  32737. /* */
  32738. var callbacks = [];
  32739. var pending = false;
  32740. function flushCallbacks () {
  32741. pending = false;
  32742. var copies = callbacks.slice(0);
  32743. callbacks.length = 0;
  32744. for (var i = 0; i < copies.length; i++) {
  32745. copies[i]();
  32746. }
  32747. }
  32748. // Here we have async deferring wrappers using microtasks.
  32749. // In 2.5 we used (macro) tasks (in combination with microtasks).
  32750. // However, it has subtle problems when state is changed right before repaint
  32751. // (e.g. #6813, out-in transitions).
  32752. // Also, using (macro) tasks in event handler would cause some weird behaviors
  32753. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  32754. // So we now use microtasks everywhere, again.
  32755. // A major drawback of this tradeoff is that there are some scenarios
  32756. // where microtasks have too high a priority and fire in between supposedly
  32757. // sequential events (e.g. #4521, #6690, which have workarounds)
  32758. // or even between bubbling of the same event (#6566).
  32759. var timerFunc;
  32760. // The nextTick behavior leverages the microtask queue, which can be accessed
  32761. // via either native Promise.then or MutationObserver.
  32762. // MutationObserver has wider support, however it is seriously bugged in
  32763. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  32764. // completely stops working after triggering a few times... so, if native
  32765. // Promise is available, we will use it:
  32766. /* istanbul ignore next, $flow-disable-line */
  32767. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  32768. var p = Promise.resolve();
  32769. timerFunc = function () {
  32770. p.then(flushCallbacks);
  32771. // In problematic UIWebViews, Promise.then doesn't completely break, but
  32772. // it can get stuck in a weird state where callbacks are pushed into the
  32773. // microtask queue but the queue isn't being flushed, until the browser
  32774. // needs to do some other work, e.g. handle a timer. Therefore we can
  32775. // "force" the microtask queue to be flushed by adding an empty timer.
  32776. if (isIOS) { setTimeout(noop); }
  32777. };
  32778. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  32779. isNative(MutationObserver) ||
  32780. // PhantomJS and iOS 7.x
  32781. MutationObserver.toString() === '[object MutationObserverConstructor]'
  32782. )) {
  32783. // Use MutationObserver where native Promise is not available,
  32784. // e.g. PhantomJS, iOS7, Android 4.4
  32785. // (#6466 MutationObserver is unreliable in IE11)
  32786. var counter = 1;
  32787. var observer = new MutationObserver(flushCallbacks);
  32788. var textNode = document.createTextNode(String(counter));
  32789. observer.observe(textNode, {
  32790. characterData: true
  32791. });
  32792. timerFunc = function () {
  32793. counter = (counter + 1) % 2;
  32794. textNode.data = String(counter);
  32795. };
  32796. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  32797. // Fallback to setImmediate.
  32798. // Technically it leverages the (macro) task queue,
  32799. // but it is still a better choice than setTimeout.
  32800. timerFunc = function () {
  32801. setImmediate(flushCallbacks);
  32802. };
  32803. } else {
  32804. // Fallback to setTimeout.
  32805. timerFunc = function () {
  32806. setTimeout(flushCallbacks, 0);
  32807. };
  32808. }
  32809. function nextTick (cb, ctx) {
  32810. var _resolve;
  32811. callbacks.push(function () {
  32812. if (cb) {
  32813. try {
  32814. cb.call(ctx);
  32815. } catch (e) {
  32816. handleError(e, ctx, 'nextTick');
  32817. }
  32818. } else if (_resolve) {
  32819. _resolve(ctx);
  32820. }
  32821. });
  32822. if (!pending) {
  32823. pending = true;
  32824. timerFunc();
  32825. }
  32826. // $flow-disable-line
  32827. if (!cb && typeof Promise !== 'undefined') {
  32828. return new Promise(function (resolve) {
  32829. _resolve = resolve;
  32830. })
  32831. }
  32832. }
  32833. /* */
  32834. /* not type checking this file because flow doesn't play well with Proxy */
  32835. var initProxy;
  32836. if (true) {
  32837. var allowedGlobals = makeMap(
  32838. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  32839. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  32840. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  32841. 'require' // for Webpack/Browserify
  32842. );
  32843. var warnNonPresent = function (target, key) {
  32844. warn(
  32845. "Property or method \"" + key + "\" is not defined on the instance but " +
  32846. 'referenced during render. Make sure that this property is reactive, ' +
  32847. 'either in the data option, or for class-based components, by ' +
  32848. 'initializing the property. ' +
  32849. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  32850. target
  32851. );
  32852. };
  32853. var warnReservedPrefix = function (target, key) {
  32854. warn(
  32855. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  32856. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  32857. 'prevent conflicts with Vue internals. ' +
  32858. 'See: https://vuejs.org/v2/api/#data',
  32859. target
  32860. );
  32861. };
  32862. var hasProxy =
  32863. typeof Proxy !== 'undefined' && isNative(Proxy);
  32864. if (hasProxy) {
  32865. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  32866. config.keyCodes = new Proxy(config.keyCodes, {
  32867. set: function set (target, key, value) {
  32868. if (isBuiltInModifier(key)) {
  32869. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  32870. return false
  32871. } else {
  32872. target[key] = value;
  32873. return true
  32874. }
  32875. }
  32876. });
  32877. }
  32878. var hasHandler = {
  32879. has: function has (target, key) {
  32880. var has = key in target;
  32881. var isAllowed = allowedGlobals(key) ||
  32882. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  32883. if (!has && !isAllowed) {
  32884. if (key in target.$data) { warnReservedPrefix(target, key); }
  32885. else { warnNonPresent(target, key); }
  32886. }
  32887. return has || !isAllowed
  32888. }
  32889. };
  32890. var getHandler = {
  32891. get: function get (target, key) {
  32892. if (typeof key === 'string' && !(key in target)) {
  32893. if (key in target.$data) { warnReservedPrefix(target, key); }
  32894. else { warnNonPresent(target, key); }
  32895. }
  32896. return target[key]
  32897. }
  32898. };
  32899. initProxy = function initProxy (vm) {
  32900. if (hasProxy) {
  32901. // determine which proxy handler to use
  32902. var options = vm.$options;
  32903. var handlers = options.render && options.render._withStripped
  32904. ? getHandler
  32905. : hasHandler;
  32906. vm._renderProxy = new Proxy(vm, handlers);
  32907. } else {
  32908. vm._renderProxy = vm;
  32909. }
  32910. };
  32911. }
  32912. /* */
  32913. var seenObjects = new _Set();
  32914. /**
  32915. * Recursively traverse an object to evoke all converted
  32916. * getters, so that every nested property inside the object
  32917. * is collected as a "deep" dependency.
  32918. */
  32919. function traverse (val) {
  32920. _traverse(val, seenObjects);
  32921. seenObjects.clear();
  32922. }
  32923. function _traverse (val, seen) {
  32924. var i, keys;
  32925. var isA = Array.isArray(val);
  32926. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  32927. return
  32928. }
  32929. if (val.__ob__) {
  32930. var depId = val.__ob__.dep.id;
  32931. if (seen.has(depId)) {
  32932. return
  32933. }
  32934. seen.add(depId);
  32935. }
  32936. if (isA) {
  32937. i = val.length;
  32938. while (i--) { _traverse(val[i], seen); }
  32939. } else {
  32940. keys = Object.keys(val);
  32941. i = keys.length;
  32942. while (i--) { _traverse(val[keys[i]], seen); }
  32943. }
  32944. }
  32945. var mark;
  32946. var measure;
  32947. if (true) {
  32948. var perf = inBrowser && window.performance;
  32949. /* istanbul ignore if */
  32950. if (
  32951. perf &&
  32952. perf.mark &&
  32953. perf.measure &&
  32954. perf.clearMarks &&
  32955. perf.clearMeasures
  32956. ) {
  32957. mark = function (tag) { return perf.mark(tag); };
  32958. measure = function (name, startTag, endTag) {
  32959. perf.measure(name, startTag, endTag);
  32960. perf.clearMarks(startTag);
  32961. perf.clearMarks(endTag);
  32962. // perf.clearMeasures(name)
  32963. };
  32964. }
  32965. }
  32966. /* */
  32967. var normalizeEvent = cached(function (name) {
  32968. var passive = name.charAt(0) === '&';
  32969. name = passive ? name.slice(1) : name;
  32970. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  32971. name = once$$1 ? name.slice(1) : name;
  32972. var capture = name.charAt(0) === '!';
  32973. name = capture ? name.slice(1) : name;
  32974. return {
  32975. name: name,
  32976. once: once$$1,
  32977. capture: capture,
  32978. passive: passive
  32979. }
  32980. });
  32981. function createFnInvoker (fns, vm) {
  32982. function invoker () {
  32983. var arguments$1 = arguments;
  32984. var fns = invoker.fns;
  32985. if (Array.isArray(fns)) {
  32986. var cloned = fns.slice();
  32987. for (var i = 0; i < cloned.length; i++) {
  32988. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  32989. }
  32990. } else {
  32991. // return handler return value for single handlers
  32992. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  32993. }
  32994. }
  32995. invoker.fns = fns;
  32996. return invoker
  32997. }
  32998. function updateListeners (
  32999. on,
  33000. oldOn,
  33001. add,
  33002. remove$$1,
  33003. createOnceHandler,
  33004. vm
  33005. ) {
  33006. var name, def$$1, cur, old, event;
  33007. for (name in on) {
  33008. def$$1 = cur = on[name];
  33009. old = oldOn[name];
  33010. event = normalizeEvent(name);
  33011. if (isUndef(cur)) {
  33012. true && warn(
  33013. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  33014. vm
  33015. );
  33016. } else if (isUndef(old)) {
  33017. if (isUndef(cur.fns)) {
  33018. cur = on[name] = createFnInvoker(cur, vm);
  33019. }
  33020. if (isTrue(event.once)) {
  33021. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  33022. }
  33023. add(event.name, cur, event.capture, event.passive, event.params);
  33024. } else if (cur !== old) {
  33025. old.fns = cur;
  33026. on[name] = old;
  33027. }
  33028. }
  33029. for (name in oldOn) {
  33030. if (isUndef(on[name])) {
  33031. event = normalizeEvent(name);
  33032. remove$$1(event.name, oldOn[name], event.capture);
  33033. }
  33034. }
  33035. }
  33036. /* */
  33037. /* */
  33038. // fixed by xxxxxx (mp properties)
  33039. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  33040. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  33041. if (isUndef(propOptions)) {
  33042. return res
  33043. }
  33044. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  33045. var attrs = data.attrs;
  33046. var props = data.props;
  33047. if (isDef(attrs) || isDef(props)) {
  33048. for (var key in propOptions) {
  33049. var altKey = hyphenate(key);
  33050. var result = checkProp(res, props, key, altKey, true) ||
  33051. checkProp(res, attrs, key, altKey, false);
  33052. // externalClass
  33053. if (
  33054. result &&
  33055. res[key] &&
  33056. externalClasses.indexOf(altKey) !== -1 &&
  33057. context[camelize(res[key])]
  33058. ) {
  33059. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  33060. res[key] = context[camelize(res[key])];
  33061. }
  33062. }
  33063. }
  33064. return res
  33065. }
  33066. function extractPropsFromVNodeData (
  33067. data,
  33068. Ctor,
  33069. tag,
  33070. context// fixed by xxxxxx
  33071. ) {
  33072. // we are only extracting raw values here.
  33073. // validation and default values are handled in the child
  33074. // component itself.
  33075. var propOptions = Ctor.options.props;
  33076. if (isUndef(propOptions)) {
  33077. // fixed by xxxxxx
  33078. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  33079. }
  33080. var res = {};
  33081. var attrs = data.attrs;
  33082. var props = data.props;
  33083. if (isDef(attrs) || isDef(props)) {
  33084. for (var key in propOptions) {
  33085. var altKey = hyphenate(key);
  33086. if (true) {
  33087. var keyInLowerCase = key.toLowerCase();
  33088. if (
  33089. key !== keyInLowerCase &&
  33090. attrs && hasOwn(attrs, keyInLowerCase)
  33091. ) {
  33092. tip(
  33093. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  33094. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  33095. " \"" + key + "\". " +
  33096. "Note that HTML attributes are case-insensitive and camelCased " +
  33097. "props need to use their kebab-case equivalents when using in-DOM " +
  33098. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  33099. );
  33100. }
  33101. }
  33102. checkProp(res, props, key, altKey, true) ||
  33103. checkProp(res, attrs, key, altKey, false);
  33104. }
  33105. }
  33106. // fixed by xxxxxx
  33107. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  33108. }
  33109. function checkProp (
  33110. res,
  33111. hash,
  33112. key,
  33113. altKey,
  33114. preserve
  33115. ) {
  33116. if (isDef(hash)) {
  33117. if (hasOwn(hash, key)) {
  33118. res[key] = hash[key];
  33119. if (!preserve) {
  33120. delete hash[key];
  33121. }
  33122. return true
  33123. } else if (hasOwn(hash, altKey)) {
  33124. res[key] = hash[altKey];
  33125. if (!preserve) {
  33126. delete hash[altKey];
  33127. }
  33128. return true
  33129. }
  33130. }
  33131. return false
  33132. }
  33133. /* */
  33134. // The template compiler attempts to minimize the need for normalization by
  33135. // statically analyzing the template at compile time.
  33136. //
  33137. // For plain HTML markup, normalization can be completely skipped because the
  33138. // generated render function is guaranteed to return Array<VNode>. There are
  33139. // two cases where extra normalization is needed:
  33140. // 1. When the children contains components - because a functional component
  33141. // may return an Array instead of a single root. In this case, just a simple
  33142. // normalization is needed - if any child is an Array, we flatten the whole
  33143. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  33144. // because functional components already normalize their own children.
  33145. function simpleNormalizeChildren (children) {
  33146. for (var i = 0; i < children.length; i++) {
  33147. if (Array.isArray(children[i])) {
  33148. return Array.prototype.concat.apply([], children)
  33149. }
  33150. }
  33151. return children
  33152. }
  33153. // 2. When the children contains constructs that always generated nested Arrays,
  33154. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  33155. // with hand-written render functions / JSX. In such cases a full normalization
  33156. // is needed to cater to all possible types of children values.
  33157. function normalizeChildren (children) {
  33158. return isPrimitive(children)
  33159. ? [createTextVNode(children)]
  33160. : Array.isArray(children)
  33161. ? normalizeArrayChildren(children)
  33162. : undefined
  33163. }
  33164. function isTextNode (node) {
  33165. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  33166. }
  33167. function normalizeArrayChildren (children, nestedIndex) {
  33168. var res = [];
  33169. var i, c, lastIndex, last;
  33170. for (i = 0; i < children.length; i++) {
  33171. c = children[i];
  33172. if (isUndef(c) || typeof c === 'boolean') { continue }
  33173. lastIndex = res.length - 1;
  33174. last = res[lastIndex];
  33175. // nested
  33176. if (Array.isArray(c)) {
  33177. if (c.length > 0) {
  33178. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  33179. // merge adjacent text nodes
  33180. if (isTextNode(c[0]) && isTextNode(last)) {
  33181. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  33182. c.shift();
  33183. }
  33184. res.push.apply(res, c);
  33185. }
  33186. } else if (isPrimitive(c)) {
  33187. if (isTextNode(last)) {
  33188. // merge adjacent text nodes
  33189. // this is necessary for SSR hydration because text nodes are
  33190. // essentially merged when rendered to HTML strings
  33191. res[lastIndex] = createTextVNode(last.text + c);
  33192. } else if (c !== '') {
  33193. // convert primitive to vnode
  33194. res.push(createTextVNode(c));
  33195. }
  33196. } else {
  33197. if (isTextNode(c) && isTextNode(last)) {
  33198. // merge adjacent text nodes
  33199. res[lastIndex] = createTextVNode(last.text + c.text);
  33200. } else {
  33201. // default key for nested array children (likely generated by v-for)
  33202. if (isTrue(children._isVList) &&
  33203. isDef(c.tag) &&
  33204. isUndef(c.key) &&
  33205. isDef(nestedIndex)) {
  33206. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  33207. }
  33208. res.push(c);
  33209. }
  33210. }
  33211. }
  33212. return res
  33213. }
  33214. /* */
  33215. function initProvide (vm) {
  33216. var provide = vm.$options.provide;
  33217. if (provide) {
  33218. vm._provided = typeof provide === 'function'
  33219. ? provide.call(vm)
  33220. : provide;
  33221. }
  33222. }
  33223. function initInjections (vm) {
  33224. var result = resolveInject(vm.$options.inject, vm);
  33225. if (result) {
  33226. toggleObserving(false);
  33227. Object.keys(result).forEach(function (key) {
  33228. /* istanbul ignore else */
  33229. if (true) {
  33230. defineReactive$$1(vm, key, result[key], function () {
  33231. warn(
  33232. "Avoid mutating an injected value directly since the changes will be " +
  33233. "overwritten whenever the provided component re-renders. " +
  33234. "injection being mutated: \"" + key + "\"",
  33235. vm
  33236. );
  33237. });
  33238. } else {}
  33239. });
  33240. toggleObserving(true);
  33241. }
  33242. }
  33243. function resolveInject (inject, vm) {
  33244. if (inject) {
  33245. // inject is :any because flow is not smart enough to figure out cached
  33246. var result = Object.create(null);
  33247. var keys = hasSymbol
  33248. ? Reflect.ownKeys(inject)
  33249. : Object.keys(inject);
  33250. for (var i = 0; i < keys.length; i++) {
  33251. var key = keys[i];
  33252. // #6574 in case the inject object is observed...
  33253. if (key === '__ob__') { continue }
  33254. var provideKey = inject[key].from;
  33255. var source = vm;
  33256. while (source) {
  33257. if (source._provided && hasOwn(source._provided, provideKey)) {
  33258. result[key] = source._provided[provideKey];
  33259. break
  33260. }
  33261. source = source.$parent;
  33262. }
  33263. if (!source) {
  33264. if ('default' in inject[key]) {
  33265. var provideDefault = inject[key].default;
  33266. result[key] = typeof provideDefault === 'function'
  33267. ? provideDefault.call(vm)
  33268. : provideDefault;
  33269. } else if (true) {
  33270. warn(("Injection \"" + key + "\" not found"), vm);
  33271. }
  33272. }
  33273. }
  33274. return result
  33275. }
  33276. }
  33277. /* */
  33278. /**
  33279. * Runtime helper for resolving raw children VNodes into a slot object.
  33280. */
  33281. function resolveSlots (
  33282. children,
  33283. context
  33284. ) {
  33285. if (!children || !children.length) {
  33286. return {}
  33287. }
  33288. var slots = {};
  33289. for (var i = 0, l = children.length; i < l; i++) {
  33290. var child = children[i];
  33291. var data = child.data;
  33292. // remove slot attribute if the node is resolved as a Vue slot node
  33293. if (data && data.attrs && data.attrs.slot) {
  33294. delete data.attrs.slot;
  33295. }
  33296. // named slots should only be respected if the vnode was rendered in the
  33297. // same context.
  33298. if ((child.context === context || child.fnContext === context) &&
  33299. data && data.slot != null
  33300. ) {
  33301. var name = data.slot;
  33302. var slot = (slots[name] || (slots[name] = []));
  33303. if (child.tag === 'template') {
  33304. slot.push.apply(slot, child.children || []);
  33305. } else {
  33306. slot.push(child);
  33307. }
  33308. } else {
  33309. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  33310. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  33311. (slots['page'] || (slots['page'] = [])).push(child);
  33312. }else{
  33313. (slots.default || (slots.default = [])).push(child);
  33314. }
  33315. }
  33316. }
  33317. // ignore slots that contains only whitespace
  33318. for (var name$1 in slots) {
  33319. if (slots[name$1].every(isWhitespace)) {
  33320. delete slots[name$1];
  33321. }
  33322. }
  33323. return slots
  33324. }
  33325. function isWhitespace (node) {
  33326. return (node.isComment && !node.asyncFactory) || node.text === ' '
  33327. }
  33328. /* */
  33329. function normalizeScopedSlots (
  33330. slots,
  33331. normalSlots,
  33332. prevSlots
  33333. ) {
  33334. var res;
  33335. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  33336. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  33337. var key = slots && slots.$key;
  33338. if (!slots) {
  33339. res = {};
  33340. } else if (slots._normalized) {
  33341. // fast path 1: child component re-render only, parent did not change
  33342. return slots._normalized
  33343. } else if (
  33344. isStable &&
  33345. prevSlots &&
  33346. prevSlots !== emptyObject &&
  33347. key === prevSlots.$key &&
  33348. !hasNormalSlots &&
  33349. !prevSlots.$hasNormal
  33350. ) {
  33351. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  33352. // only need to normalize once
  33353. return prevSlots
  33354. } else {
  33355. res = {};
  33356. for (var key$1 in slots) {
  33357. if (slots[key$1] && key$1[0] !== '$') {
  33358. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  33359. }
  33360. }
  33361. }
  33362. // expose normal slots on scopedSlots
  33363. for (var key$2 in normalSlots) {
  33364. if (!(key$2 in res)) {
  33365. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  33366. }
  33367. }
  33368. // avoriaz seems to mock a non-extensible $scopedSlots object
  33369. // and when that is passed down this would cause an error
  33370. if (slots && Object.isExtensible(slots)) {
  33371. (slots)._normalized = res;
  33372. }
  33373. def(res, '$stable', isStable);
  33374. def(res, '$key', key);
  33375. def(res, '$hasNormal', hasNormalSlots);
  33376. return res
  33377. }
  33378. function normalizeScopedSlot(normalSlots, key, fn) {
  33379. var normalized = function () {
  33380. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  33381. res = res && typeof res === 'object' && !Array.isArray(res)
  33382. ? [res] // single vnode
  33383. : normalizeChildren(res);
  33384. return res && (
  33385. res.length === 0 ||
  33386. (res.length === 1 && res[0].isComment) // #9658
  33387. ) ? undefined
  33388. : res
  33389. };
  33390. // this is a slot using the new v-slot syntax without scope. although it is
  33391. // compiled as a scoped slot, render fn users would expect it to be present
  33392. // on this.$slots because the usage is semantically a normal slot.
  33393. if (fn.proxy) {
  33394. Object.defineProperty(normalSlots, key, {
  33395. get: normalized,
  33396. enumerable: true,
  33397. configurable: true
  33398. });
  33399. }
  33400. return normalized
  33401. }
  33402. function proxyNormalSlot(slots, key) {
  33403. return function () { return slots[key]; }
  33404. }
  33405. /* */
  33406. /**
  33407. * Runtime helper for rendering v-for lists.
  33408. */
  33409. function renderList (
  33410. val,
  33411. render
  33412. ) {
  33413. var ret, i, l, keys, key;
  33414. if (Array.isArray(val) || typeof val === 'string') {
  33415. ret = new Array(val.length);
  33416. for (i = 0, l = val.length; i < l; i++) {
  33417. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  33418. }
  33419. } else if (typeof val === 'number') {
  33420. ret = new Array(val);
  33421. for (i = 0; i < val; i++) {
  33422. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  33423. }
  33424. } else if (isObject(val)) {
  33425. if (hasSymbol && val[Symbol.iterator]) {
  33426. ret = [];
  33427. var iterator = val[Symbol.iterator]();
  33428. var result = iterator.next();
  33429. while (!result.done) {
  33430. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  33431. result = iterator.next();
  33432. }
  33433. } else {
  33434. keys = Object.keys(val);
  33435. ret = new Array(keys.length);
  33436. for (i = 0, l = keys.length; i < l; i++) {
  33437. key = keys[i];
  33438. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  33439. }
  33440. }
  33441. }
  33442. if (!isDef(ret)) {
  33443. ret = [];
  33444. }
  33445. (ret)._isVList = true;
  33446. return ret
  33447. }
  33448. /* */
  33449. /**
  33450. * Runtime helper for rendering <slot>
  33451. */
  33452. function renderSlot (
  33453. name,
  33454. fallback,
  33455. props,
  33456. bindObject
  33457. ) {
  33458. var scopedSlotFn = this.$scopedSlots[name];
  33459. var nodes;
  33460. if (scopedSlotFn) { // scoped slot
  33461. props = props || {};
  33462. if (bindObject) {
  33463. if ( true && !isObject(bindObject)) {
  33464. warn(
  33465. 'slot v-bind without argument expects an Object',
  33466. this
  33467. );
  33468. }
  33469. props = extend(extend({}, bindObject), props);
  33470. }
  33471. // fixed by xxxxxx app-plus scopedSlot
  33472. nodes = scopedSlotFn(props, this, props._i) || fallback;
  33473. } else {
  33474. nodes = this.$slots[name] || fallback;
  33475. }
  33476. var target = props && props.slot;
  33477. if (target) {
  33478. return this.$createElement('template', { slot: target }, nodes)
  33479. } else {
  33480. return nodes
  33481. }
  33482. }
  33483. /* */
  33484. /**
  33485. * Runtime helper for resolving filters
  33486. */
  33487. function resolveFilter (id) {
  33488. return resolveAsset(this.$options, 'filters', id, true) || identity
  33489. }
  33490. /* */
  33491. function isKeyNotMatch (expect, actual) {
  33492. if (Array.isArray(expect)) {
  33493. return expect.indexOf(actual) === -1
  33494. } else {
  33495. return expect !== actual
  33496. }
  33497. }
  33498. /**
  33499. * Runtime helper for checking keyCodes from config.
  33500. * exposed as Vue.prototype._k
  33501. * passing in eventKeyName as last argument separately for backwards compat
  33502. */
  33503. function checkKeyCodes (
  33504. eventKeyCode,
  33505. key,
  33506. builtInKeyCode,
  33507. eventKeyName,
  33508. builtInKeyName
  33509. ) {
  33510. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  33511. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  33512. return isKeyNotMatch(builtInKeyName, eventKeyName)
  33513. } else if (mappedKeyCode) {
  33514. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  33515. } else if (eventKeyName) {
  33516. return hyphenate(eventKeyName) !== key
  33517. }
  33518. }
  33519. /* */
  33520. /**
  33521. * Runtime helper for merging v-bind="object" into a VNode's data.
  33522. */
  33523. function bindObjectProps (
  33524. data,
  33525. tag,
  33526. value,
  33527. asProp,
  33528. isSync
  33529. ) {
  33530. if (value) {
  33531. if (!isObject(value)) {
  33532. true && warn(
  33533. 'v-bind without argument expects an Object or Array value',
  33534. this
  33535. );
  33536. } else {
  33537. if (Array.isArray(value)) {
  33538. value = toObject(value);
  33539. }
  33540. var hash;
  33541. var loop = function ( key ) {
  33542. if (
  33543. key === 'class' ||
  33544. key === 'style' ||
  33545. isReservedAttribute(key)
  33546. ) {
  33547. hash = data;
  33548. } else {
  33549. var type = data.attrs && data.attrs.type;
  33550. hash = asProp || config.mustUseProp(tag, type, key)
  33551. ? data.domProps || (data.domProps = {})
  33552. : data.attrs || (data.attrs = {});
  33553. }
  33554. var camelizedKey = camelize(key);
  33555. var hyphenatedKey = hyphenate(key);
  33556. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  33557. hash[key] = value[key];
  33558. if (isSync) {
  33559. var on = data.on || (data.on = {});
  33560. on[("update:" + key)] = function ($event) {
  33561. value[key] = $event;
  33562. };
  33563. }
  33564. }
  33565. };
  33566. for (var key in value) loop( key );
  33567. }
  33568. }
  33569. return data
  33570. }
  33571. /* */
  33572. /**
  33573. * Runtime helper for rendering static trees.
  33574. */
  33575. function renderStatic (
  33576. index,
  33577. isInFor
  33578. ) {
  33579. var cached = this._staticTrees || (this._staticTrees = []);
  33580. var tree = cached[index];
  33581. // if has already-rendered static tree and not inside v-for,
  33582. // we can reuse the same tree.
  33583. if (tree && !isInFor) {
  33584. return tree
  33585. }
  33586. // otherwise, render a fresh tree.
  33587. tree = cached[index] = this.$options.staticRenderFns[index].call(
  33588. this._renderProxy,
  33589. null,
  33590. this // for render fns generated for functional component templates
  33591. );
  33592. markStatic(tree, ("__static__" + index), false);
  33593. return tree
  33594. }
  33595. /**
  33596. * Runtime helper for v-once.
  33597. * Effectively it means marking the node as static with a unique key.
  33598. */
  33599. function markOnce (
  33600. tree,
  33601. index,
  33602. key
  33603. ) {
  33604. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  33605. return tree
  33606. }
  33607. function markStatic (
  33608. tree,
  33609. key,
  33610. isOnce
  33611. ) {
  33612. if (Array.isArray(tree)) {
  33613. for (var i = 0; i < tree.length; i++) {
  33614. if (tree[i] && typeof tree[i] !== 'string') {
  33615. markStaticNode(tree[i], (key + "_" + i), isOnce);
  33616. }
  33617. }
  33618. } else {
  33619. markStaticNode(tree, key, isOnce);
  33620. }
  33621. }
  33622. function markStaticNode (node, key, isOnce) {
  33623. node.isStatic = true;
  33624. node.key = key;
  33625. node.isOnce = isOnce;
  33626. }
  33627. /* */
  33628. function bindObjectListeners (data, value) {
  33629. if (value) {
  33630. if (!isPlainObject(value)) {
  33631. true && warn(
  33632. 'v-on without argument expects an Object value',
  33633. this
  33634. );
  33635. } else {
  33636. var on = data.on = data.on ? extend({}, data.on) : {};
  33637. for (var key in value) {
  33638. var existing = on[key];
  33639. var ours = value[key];
  33640. on[key] = existing ? [].concat(existing, ours) : ours;
  33641. }
  33642. }
  33643. }
  33644. return data
  33645. }
  33646. /* */
  33647. function resolveScopedSlots (
  33648. fns, // see flow/vnode
  33649. res,
  33650. // the following are added in 2.6
  33651. hasDynamicKeys,
  33652. contentHashKey
  33653. ) {
  33654. res = res || { $stable: !hasDynamicKeys };
  33655. for (var i = 0; i < fns.length; i++) {
  33656. var slot = fns[i];
  33657. if (Array.isArray(slot)) {
  33658. resolveScopedSlots(slot, res, hasDynamicKeys);
  33659. } else if (slot) {
  33660. // marker for reverse proxying v-slot without scope on this.$slots
  33661. if (slot.proxy) {
  33662. slot.fn.proxy = true;
  33663. }
  33664. res[slot.key] = slot.fn;
  33665. }
  33666. }
  33667. if (contentHashKey) {
  33668. (res).$key = contentHashKey;
  33669. }
  33670. return res
  33671. }
  33672. /* */
  33673. function bindDynamicKeys (baseObj, values) {
  33674. for (var i = 0; i < values.length; i += 2) {
  33675. var key = values[i];
  33676. if (typeof key === 'string' && key) {
  33677. baseObj[values[i]] = values[i + 1];
  33678. } else if ( true && key !== '' && key !== null) {
  33679. // null is a special value for explicitly removing a binding
  33680. warn(
  33681. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  33682. this
  33683. );
  33684. }
  33685. }
  33686. return baseObj
  33687. }
  33688. // helper to dynamically append modifier runtime markers to event names.
  33689. // ensure only append when value is already string, otherwise it will be cast
  33690. // to string and cause the type check to miss.
  33691. function prependModifier (value, symbol) {
  33692. return typeof value === 'string' ? symbol + value : value
  33693. }
  33694. /* */
  33695. function installRenderHelpers (target) {
  33696. target._o = markOnce;
  33697. target._n = toNumber;
  33698. target._s = toString;
  33699. target._l = renderList;
  33700. target._t = renderSlot;
  33701. target._q = looseEqual;
  33702. target._i = looseIndexOf;
  33703. target._m = renderStatic;
  33704. target._f = resolveFilter;
  33705. target._k = checkKeyCodes;
  33706. target._b = bindObjectProps;
  33707. target._v = createTextVNode;
  33708. target._e = createEmptyVNode;
  33709. target._u = resolveScopedSlots;
  33710. target._g = bindObjectListeners;
  33711. target._d = bindDynamicKeys;
  33712. target._p = prependModifier;
  33713. }
  33714. /* */
  33715. function FunctionalRenderContext (
  33716. data,
  33717. props,
  33718. children,
  33719. parent,
  33720. Ctor
  33721. ) {
  33722. var this$1 = this;
  33723. var options = Ctor.options;
  33724. // ensure the createElement function in functional components
  33725. // gets a unique context - this is necessary for correct named slot check
  33726. var contextVm;
  33727. if (hasOwn(parent, '_uid')) {
  33728. contextVm = Object.create(parent);
  33729. // $flow-disable-line
  33730. contextVm._original = parent;
  33731. } else {
  33732. // the context vm passed in is a functional context as well.
  33733. // in this case we want to make sure we are able to get a hold to the
  33734. // real context instance.
  33735. contextVm = parent;
  33736. // $flow-disable-line
  33737. parent = parent._original;
  33738. }
  33739. var isCompiled = isTrue(options._compiled);
  33740. var needNormalization = !isCompiled;
  33741. this.data = data;
  33742. this.props = props;
  33743. this.children = children;
  33744. this.parent = parent;
  33745. this.listeners = data.on || emptyObject;
  33746. this.injections = resolveInject(options.inject, parent);
  33747. this.slots = function () {
  33748. if (!this$1.$slots) {
  33749. normalizeScopedSlots(
  33750. data.scopedSlots,
  33751. this$1.$slots = resolveSlots(children, parent)
  33752. );
  33753. }
  33754. return this$1.$slots
  33755. };
  33756. Object.defineProperty(this, 'scopedSlots', ({
  33757. enumerable: true,
  33758. get: function get () {
  33759. return normalizeScopedSlots(data.scopedSlots, this.slots())
  33760. }
  33761. }));
  33762. // support for compiled functional template
  33763. if (isCompiled) {
  33764. // exposing $options for renderStatic()
  33765. this.$options = options;
  33766. // pre-resolve slots for renderSlot()
  33767. this.$slots = this.slots();
  33768. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  33769. }
  33770. if (options._scopeId) {
  33771. this._c = function (a, b, c, d) {
  33772. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  33773. if (vnode && !Array.isArray(vnode)) {
  33774. vnode.fnScopeId = options._scopeId;
  33775. vnode.fnContext = parent;
  33776. }
  33777. return vnode
  33778. };
  33779. } else {
  33780. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  33781. }
  33782. }
  33783. installRenderHelpers(FunctionalRenderContext.prototype);
  33784. function createFunctionalComponent (
  33785. Ctor,
  33786. propsData,
  33787. data,
  33788. contextVm,
  33789. children
  33790. ) {
  33791. var options = Ctor.options;
  33792. var props = {};
  33793. var propOptions = options.props;
  33794. if (isDef(propOptions)) {
  33795. for (var key in propOptions) {
  33796. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  33797. }
  33798. } else {
  33799. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  33800. if (isDef(data.props)) { mergeProps(props, data.props); }
  33801. }
  33802. var renderContext = new FunctionalRenderContext(
  33803. data,
  33804. props,
  33805. children,
  33806. contextVm,
  33807. Ctor
  33808. );
  33809. var vnode = options.render.call(null, renderContext._c, renderContext);
  33810. if (vnode instanceof VNode) {
  33811. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  33812. } else if (Array.isArray(vnode)) {
  33813. var vnodes = normalizeChildren(vnode) || [];
  33814. var res = new Array(vnodes.length);
  33815. for (var i = 0; i < vnodes.length; i++) {
  33816. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  33817. }
  33818. return res
  33819. }
  33820. }
  33821. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  33822. // #7817 clone node before setting fnContext, otherwise if the node is reused
  33823. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  33824. // that should not be matched to match.
  33825. var clone = cloneVNode(vnode);
  33826. clone.fnContext = contextVm;
  33827. clone.fnOptions = options;
  33828. if (true) {
  33829. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  33830. }
  33831. if (data.slot) {
  33832. (clone.data || (clone.data = {})).slot = data.slot;
  33833. }
  33834. return clone
  33835. }
  33836. function mergeProps (to, from) {
  33837. for (var key in from) {
  33838. to[camelize(key)] = from[key];
  33839. }
  33840. }
  33841. /* */
  33842. /* */
  33843. /* */
  33844. /* */
  33845. // inline hooks to be invoked on component VNodes during patch
  33846. var componentVNodeHooks = {
  33847. init: function init (vnode, hydrating) {
  33848. if (
  33849. vnode.componentInstance &&
  33850. !vnode.componentInstance._isDestroyed &&
  33851. vnode.data.keepAlive
  33852. ) {
  33853. // kept-alive components, treat as a patch
  33854. var mountedNode = vnode; // work around flow
  33855. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  33856. } else {
  33857. var child = vnode.componentInstance = createComponentInstanceForVnode(
  33858. vnode,
  33859. activeInstance
  33860. );
  33861. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  33862. }
  33863. },
  33864. prepatch: function prepatch (oldVnode, vnode) {
  33865. var options = vnode.componentOptions;
  33866. var child = vnode.componentInstance = oldVnode.componentInstance;
  33867. updateChildComponent(
  33868. child,
  33869. options.propsData, // updated props
  33870. options.listeners, // updated listeners
  33871. vnode, // new parent vnode
  33872. options.children // new children
  33873. );
  33874. },
  33875. insert: function insert (vnode) {
  33876. var context = vnode.context;
  33877. var componentInstance = vnode.componentInstance;
  33878. if (!componentInstance._isMounted) {
  33879. callHook(componentInstance, 'onServiceCreated');
  33880. callHook(componentInstance, 'onServiceAttached');
  33881. componentInstance._isMounted = true;
  33882. callHook(componentInstance, 'mounted');
  33883. }
  33884. if (vnode.data.keepAlive) {
  33885. if (context._isMounted) {
  33886. // vue-router#1212
  33887. // During updates, a kept-alive component's child components may
  33888. // change, so directly walking the tree here may call activated hooks
  33889. // on incorrect children. Instead we push them into a queue which will
  33890. // be processed after the whole patch process ended.
  33891. queueActivatedComponent(componentInstance);
  33892. } else {
  33893. activateChildComponent(componentInstance, true /* direct */);
  33894. }
  33895. }
  33896. },
  33897. destroy: function destroy (vnode) {
  33898. var componentInstance = vnode.componentInstance;
  33899. if (!componentInstance._isDestroyed) {
  33900. if (!vnode.data.keepAlive) {
  33901. componentInstance.$destroy();
  33902. } else {
  33903. deactivateChildComponent(componentInstance, true /* direct */);
  33904. }
  33905. }
  33906. }
  33907. };
  33908. var hooksToMerge = Object.keys(componentVNodeHooks);
  33909. function createComponent (
  33910. Ctor,
  33911. data,
  33912. context,
  33913. children,
  33914. tag
  33915. ) {
  33916. if (isUndef(Ctor)) {
  33917. return
  33918. }
  33919. var baseCtor = context.$options._base;
  33920. // plain options object: turn it into a constructor
  33921. if (isObject(Ctor)) {
  33922. Ctor = baseCtor.extend(Ctor);
  33923. }
  33924. // if at this stage it's not a constructor or an async component factory,
  33925. // reject.
  33926. if (typeof Ctor !== 'function') {
  33927. if (true) {
  33928. warn(("Invalid Component definition: " + (String(Ctor))), context);
  33929. }
  33930. return
  33931. }
  33932. // async component
  33933. var asyncFactory;
  33934. if (isUndef(Ctor.cid)) {
  33935. asyncFactory = Ctor;
  33936. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  33937. if (Ctor === undefined) {
  33938. // return a placeholder node for async component, which is rendered
  33939. // as a comment node but preserves all the raw information for the node.
  33940. // the information will be used for async server-rendering and hydration.
  33941. return createAsyncPlaceholder(
  33942. asyncFactory,
  33943. data,
  33944. context,
  33945. children,
  33946. tag
  33947. )
  33948. }
  33949. }
  33950. data = data || {};
  33951. // resolve constructor options in case global mixins are applied after
  33952. // component constructor creation
  33953. resolveConstructorOptions(Ctor);
  33954. // transform component v-model data into props & events
  33955. if (isDef(data.model)) {
  33956. transformModel(Ctor.options, data);
  33957. }
  33958. // extract props
  33959. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  33960. // functional component
  33961. if (isTrue(Ctor.options.functional)) {
  33962. return createFunctionalComponent(Ctor, propsData, data, context, children)
  33963. }
  33964. // extract listeners, since these needs to be treated as
  33965. // child component listeners instead of DOM listeners
  33966. var listeners = data.on;
  33967. // replace with listeners with .native modifier
  33968. // so it gets processed during parent component patch.
  33969. data.on = data.nativeOn;
  33970. if (isTrue(Ctor.options.abstract)) {
  33971. // abstract components do not keep anything
  33972. // other than props & listeners & slot
  33973. // work around flow
  33974. var slot = data.slot;
  33975. data = {};
  33976. if (slot) {
  33977. data.slot = slot;
  33978. }
  33979. }
  33980. // install component management hooks onto the placeholder node
  33981. installComponentHooks(data);
  33982. // return a placeholder vnode
  33983. var name = Ctor.options.name || tag;
  33984. var vnode = new VNode(
  33985. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  33986. data, undefined, undefined, undefined, context,
  33987. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  33988. asyncFactory
  33989. );
  33990. return vnode
  33991. }
  33992. function createComponentInstanceForVnode (
  33993. vnode, // we know it's MountedComponentVNode but flow doesn't
  33994. parent // activeInstance in lifecycle state
  33995. ) {
  33996. var options = {
  33997. _isComponent: true,
  33998. _parentVnode: vnode,
  33999. parent: parent
  34000. };
  34001. // check inline-template render functions
  34002. var inlineTemplate = vnode.data.inlineTemplate;
  34003. if (isDef(inlineTemplate)) {
  34004. options.render = inlineTemplate.render;
  34005. options.staticRenderFns = inlineTemplate.staticRenderFns;
  34006. }
  34007. return new vnode.componentOptions.Ctor(options)
  34008. }
  34009. function installComponentHooks (data) {
  34010. var hooks = data.hook || (data.hook = {});
  34011. for (var i = 0; i < hooksToMerge.length; i++) {
  34012. var key = hooksToMerge[i];
  34013. var existing = hooks[key];
  34014. var toMerge = componentVNodeHooks[key];
  34015. if (existing !== toMerge && !(existing && existing._merged)) {
  34016. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  34017. }
  34018. }
  34019. }
  34020. function mergeHook$1 (f1, f2) {
  34021. var merged = function (a, b) {
  34022. // flow complains about extra args which is why we use any
  34023. f1(a, b);
  34024. f2(a, b);
  34025. };
  34026. merged._merged = true;
  34027. return merged
  34028. }
  34029. // transform component v-model info (value and callback) into
  34030. // prop and event handler respectively.
  34031. function transformModel (options, data) {
  34032. var prop = (options.model && options.model.prop) || 'value';
  34033. var event = (options.model && options.model.event) || 'input'
  34034. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  34035. var on = data.on || (data.on = {});
  34036. var existing = on[event];
  34037. var callback = data.model.callback;
  34038. if (isDef(existing)) {
  34039. if (
  34040. Array.isArray(existing)
  34041. ? existing.indexOf(callback) === -1
  34042. : existing !== callback
  34043. ) {
  34044. on[event] = [callback].concat(existing);
  34045. }
  34046. } else {
  34047. on[event] = callback;
  34048. }
  34049. }
  34050. /* */
  34051. var SIMPLE_NORMALIZE = 1;
  34052. var ALWAYS_NORMALIZE = 2;
  34053. // wrapper function for providing a more flexible interface
  34054. // without getting yelled at by flow
  34055. function createElement (
  34056. context,
  34057. tag,
  34058. data,
  34059. children,
  34060. normalizationType,
  34061. alwaysNormalize
  34062. ) {
  34063. if (Array.isArray(data) || isPrimitive(data)) {
  34064. normalizationType = children;
  34065. children = data;
  34066. data = undefined;
  34067. }
  34068. if (isTrue(alwaysNormalize)) {
  34069. normalizationType = ALWAYS_NORMALIZE;
  34070. }
  34071. return _createElement(context, tag, data, children, normalizationType)
  34072. }
  34073. function _createElement (
  34074. context,
  34075. tag,
  34076. data,
  34077. children,
  34078. normalizationType
  34079. ) {
  34080. if (isDef(data) && isDef((data).__ob__)) {
  34081. true && warn(
  34082. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  34083. 'Always create fresh vnode data objects in each render!',
  34084. context
  34085. );
  34086. return createEmptyVNode()
  34087. }
  34088. // object syntax in v-bind
  34089. if (isDef(data) && isDef(data.is)) {
  34090. tag = data.is;
  34091. }
  34092. if (!tag) {
  34093. // in case of component :is set to falsy value
  34094. return createEmptyVNode()
  34095. }
  34096. // warn against non-primitive key
  34097. if ( true &&
  34098. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  34099. ) {
  34100. {
  34101. warn(
  34102. 'Avoid using non-primitive value as key, ' +
  34103. 'use string/number value instead.',
  34104. context
  34105. );
  34106. }
  34107. }
  34108. // support single function children as default scoped slot
  34109. if (Array.isArray(children) &&
  34110. typeof children[0] === 'function'
  34111. ) {
  34112. data = data || {};
  34113. data.scopedSlots = { default: children[0] };
  34114. children.length = 0;
  34115. }
  34116. if (normalizationType === ALWAYS_NORMALIZE) {
  34117. children = normalizeChildren(children);
  34118. } else if (normalizationType === SIMPLE_NORMALIZE) {
  34119. children = simpleNormalizeChildren(children);
  34120. }
  34121. var vnode, ns;
  34122. if (typeof tag === 'string') {
  34123. var Ctor;
  34124. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  34125. if (config.isReservedTag(tag)) {
  34126. // platform built-in elements
  34127. if ( true && isDef(data) && isDef(data.nativeOn)) {
  34128. warn(
  34129. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  34130. context
  34131. );
  34132. }
  34133. vnode = new VNode(
  34134. config.parsePlatformTagName(tag), data, children,
  34135. undefined, undefined, context
  34136. );
  34137. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  34138. // component
  34139. vnode = createComponent(Ctor, data, context, children, tag);
  34140. } else {
  34141. // unknown or unlisted namespaced elements
  34142. // check at runtime because it may get assigned a namespace when its
  34143. // parent normalizes children
  34144. vnode = new VNode(
  34145. tag, data, children,
  34146. undefined, undefined, context
  34147. );
  34148. }
  34149. } else {
  34150. // direct component options / constructor
  34151. vnode = createComponent(tag, data, context, children);
  34152. }
  34153. if (Array.isArray(vnode)) {
  34154. return vnode
  34155. } else if (isDef(vnode)) {
  34156. if (isDef(ns)) { applyNS(vnode, ns); }
  34157. if (isDef(data)) { registerDeepBindings(data); }
  34158. return vnode
  34159. } else {
  34160. return createEmptyVNode()
  34161. }
  34162. }
  34163. function applyNS (vnode, ns, force) {
  34164. vnode.ns = ns;
  34165. if (vnode.tag === 'foreignObject') {
  34166. // use default namespace inside foreignObject
  34167. ns = undefined;
  34168. force = true;
  34169. }
  34170. if (isDef(vnode.children)) {
  34171. for (var i = 0, l = vnode.children.length; i < l; i++) {
  34172. var child = vnode.children[i];
  34173. if (isDef(child.tag) && (
  34174. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  34175. applyNS(child, ns, force);
  34176. }
  34177. }
  34178. }
  34179. }
  34180. // ref #5318
  34181. // necessary to ensure parent re-render when deep bindings like :style and
  34182. // :class are used on slot nodes
  34183. function registerDeepBindings (data) {
  34184. if (isObject(data.style)) {
  34185. traverse(data.style);
  34186. }
  34187. if (isObject(data.class)) {
  34188. traverse(data.class);
  34189. }
  34190. }
  34191. /* */
  34192. function initRender (vm) {
  34193. vm._vnode = null; // the root of the child tree
  34194. vm._staticTrees = null; // v-once cached trees
  34195. var options = vm.$options;
  34196. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  34197. var renderContext = parentVnode && parentVnode.context;
  34198. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  34199. vm.$scopedSlots = emptyObject;
  34200. // bind the createElement fn to this instance
  34201. // so that we get proper render context inside it.
  34202. // args order: tag, data, children, normalizationType, alwaysNormalize
  34203. // internal version is used by render functions compiled from templates
  34204. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  34205. // normalization is always applied for the public version, used in
  34206. // user-written render functions.
  34207. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  34208. // $attrs & $listeners are exposed for easier HOC creation.
  34209. // they need to be reactive so that HOCs using them are always updated
  34210. var parentData = parentVnode && parentVnode.data;
  34211. /* istanbul ignore else */
  34212. if (true) {
  34213. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  34214. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  34215. }, true);
  34216. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  34217. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  34218. }, true);
  34219. } else {}
  34220. }
  34221. var currentRenderingInstance = null;
  34222. function renderMixin (Vue) {
  34223. // install runtime convenience helpers
  34224. installRenderHelpers(Vue.prototype);
  34225. Vue.prototype.$nextTick = function (fn) {
  34226. return nextTick(fn, this)
  34227. };
  34228. Vue.prototype._render = function () {
  34229. var vm = this;
  34230. var ref = vm.$options;
  34231. var render = ref.render;
  34232. var _parentVnode = ref._parentVnode;
  34233. if (_parentVnode) {
  34234. vm.$scopedSlots = normalizeScopedSlots(
  34235. _parentVnode.data.scopedSlots,
  34236. vm.$slots,
  34237. vm.$scopedSlots
  34238. );
  34239. }
  34240. // set parent vnode. this allows render functions to have access
  34241. // to the data on the placeholder node.
  34242. vm.$vnode = _parentVnode;
  34243. // render self
  34244. var vnode;
  34245. try {
  34246. // There's no need to maintain a stack because all render fns are called
  34247. // separately from one another. Nested component's render fns are called
  34248. // when parent component is patched.
  34249. currentRenderingInstance = vm;
  34250. vnode = render.call(vm._renderProxy, vm.$createElement);
  34251. } catch (e) {
  34252. handleError(e, vm, "render");
  34253. // return error render result,
  34254. // or previous vnode to prevent render error causing blank component
  34255. /* istanbul ignore else */
  34256. if ( true && vm.$options.renderError) {
  34257. try {
  34258. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  34259. } catch (e) {
  34260. handleError(e, vm, "renderError");
  34261. vnode = vm._vnode;
  34262. }
  34263. } else {
  34264. vnode = vm._vnode;
  34265. }
  34266. } finally {
  34267. currentRenderingInstance = null;
  34268. }
  34269. // if the returned array contains only a single node, allow it
  34270. if (Array.isArray(vnode) && vnode.length === 1) {
  34271. vnode = vnode[0];
  34272. }
  34273. // return empty vnode in case the render function errored out
  34274. if (!(vnode instanceof VNode)) {
  34275. if ( true && Array.isArray(vnode)) {
  34276. warn(
  34277. 'Multiple root nodes returned from render function. Render function ' +
  34278. 'should return a single root node.',
  34279. vm
  34280. );
  34281. }
  34282. vnode = createEmptyVNode();
  34283. }
  34284. // set parent
  34285. vnode.parent = _parentVnode;
  34286. return vnode
  34287. };
  34288. }
  34289. /* */
  34290. function ensureCtor (comp, base) {
  34291. if (
  34292. comp.__esModule ||
  34293. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  34294. ) {
  34295. comp = comp.default;
  34296. }
  34297. return isObject(comp)
  34298. ? base.extend(comp)
  34299. : comp
  34300. }
  34301. function createAsyncPlaceholder (
  34302. factory,
  34303. data,
  34304. context,
  34305. children,
  34306. tag
  34307. ) {
  34308. var node = createEmptyVNode();
  34309. node.asyncFactory = factory;
  34310. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  34311. return node
  34312. }
  34313. function resolveAsyncComponent (
  34314. factory,
  34315. baseCtor
  34316. ) {
  34317. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  34318. return factory.errorComp
  34319. }
  34320. if (isDef(factory.resolved)) {
  34321. return factory.resolved
  34322. }
  34323. var owner = currentRenderingInstance;
  34324. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  34325. // already pending
  34326. factory.owners.push(owner);
  34327. }
  34328. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  34329. return factory.loadingComp
  34330. }
  34331. if (owner && !isDef(factory.owners)) {
  34332. var owners = factory.owners = [owner];
  34333. var sync = true;
  34334. var timerLoading = null;
  34335. var timerTimeout = null
  34336. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  34337. var forceRender = function (renderCompleted) {
  34338. for (var i = 0, l = owners.length; i < l; i++) {
  34339. (owners[i]).$forceUpdate();
  34340. }
  34341. if (renderCompleted) {
  34342. owners.length = 0;
  34343. if (timerLoading !== null) {
  34344. clearTimeout(timerLoading);
  34345. timerLoading = null;
  34346. }
  34347. if (timerTimeout !== null) {
  34348. clearTimeout(timerTimeout);
  34349. timerTimeout = null;
  34350. }
  34351. }
  34352. };
  34353. var resolve = once(function (res) {
  34354. // cache resolved
  34355. factory.resolved = ensureCtor(res, baseCtor);
  34356. // invoke callbacks only if this is not a synchronous resolve
  34357. // (async resolves are shimmed as synchronous during SSR)
  34358. if (!sync) {
  34359. forceRender(true);
  34360. } else {
  34361. owners.length = 0;
  34362. }
  34363. });
  34364. var reject = once(function (reason) {
  34365. true && warn(
  34366. "Failed to resolve async component: " + (String(factory)) +
  34367. (reason ? ("\nReason: " + reason) : '')
  34368. );
  34369. if (isDef(factory.errorComp)) {
  34370. factory.error = true;
  34371. forceRender(true);
  34372. }
  34373. });
  34374. var res = factory(resolve, reject);
  34375. if (isObject(res)) {
  34376. if (isPromise(res)) {
  34377. // () => Promise
  34378. if (isUndef(factory.resolved)) {
  34379. res.then(resolve, reject);
  34380. }
  34381. } else if (isPromise(res.component)) {
  34382. res.component.then(resolve, reject);
  34383. if (isDef(res.error)) {
  34384. factory.errorComp = ensureCtor(res.error, baseCtor);
  34385. }
  34386. if (isDef(res.loading)) {
  34387. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  34388. if (res.delay === 0) {
  34389. factory.loading = true;
  34390. } else {
  34391. timerLoading = setTimeout(function () {
  34392. timerLoading = null;
  34393. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  34394. factory.loading = true;
  34395. forceRender(false);
  34396. }
  34397. }, res.delay || 200);
  34398. }
  34399. }
  34400. if (isDef(res.timeout)) {
  34401. timerTimeout = setTimeout(function () {
  34402. timerTimeout = null;
  34403. if (isUndef(factory.resolved)) {
  34404. reject(
  34405. true
  34406. ? ("timeout (" + (res.timeout) + "ms)")
  34407. : undefined
  34408. );
  34409. }
  34410. }, res.timeout);
  34411. }
  34412. }
  34413. }
  34414. sync = false;
  34415. // return in case resolved synchronously
  34416. return factory.loading
  34417. ? factory.loadingComp
  34418. : factory.resolved
  34419. }
  34420. }
  34421. /* */
  34422. function isAsyncPlaceholder (node) {
  34423. return node.isComment && node.asyncFactory
  34424. }
  34425. /* */
  34426. function getFirstComponentChild (children) {
  34427. if (Array.isArray(children)) {
  34428. for (var i = 0; i < children.length; i++) {
  34429. var c = children[i];
  34430. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  34431. return c
  34432. }
  34433. }
  34434. }
  34435. }
  34436. /* */
  34437. /* */
  34438. function initEvents (vm) {
  34439. vm._events = Object.create(null);
  34440. vm._hasHookEvent = false;
  34441. // init parent attached events
  34442. var listeners = vm.$options._parentListeners;
  34443. if (listeners) {
  34444. updateComponentListeners(vm, listeners);
  34445. }
  34446. }
  34447. var target;
  34448. function add (event, fn) {
  34449. target.$on(event, fn);
  34450. }
  34451. function remove$1 (event, fn) {
  34452. target.$off(event, fn);
  34453. }
  34454. function createOnceHandler (event, fn) {
  34455. var _target = target;
  34456. return function onceHandler () {
  34457. var res = fn.apply(null, arguments);
  34458. if (res !== null) {
  34459. _target.$off(event, onceHandler);
  34460. }
  34461. }
  34462. }
  34463. function updateComponentListeners (
  34464. vm,
  34465. listeners,
  34466. oldListeners
  34467. ) {
  34468. target = vm;
  34469. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  34470. target = undefined;
  34471. }
  34472. function eventsMixin (Vue) {
  34473. var hookRE = /^hook:/;
  34474. Vue.prototype.$on = function (event, fn) {
  34475. var vm = this;
  34476. if (Array.isArray(event)) {
  34477. for (var i = 0, l = event.length; i < l; i++) {
  34478. vm.$on(event[i], fn);
  34479. }
  34480. } else {
  34481. (vm._events[event] || (vm._events[event] = [])).push(fn);
  34482. // optimize hook:event cost by using a boolean flag marked at registration
  34483. // instead of a hash lookup
  34484. if (hookRE.test(event)) {
  34485. vm._hasHookEvent = true;
  34486. }
  34487. }
  34488. return vm
  34489. };
  34490. Vue.prototype.$once = function (event, fn) {
  34491. var vm = this;
  34492. function on () {
  34493. vm.$off(event, on);
  34494. fn.apply(vm, arguments);
  34495. }
  34496. on.fn = fn;
  34497. vm.$on(event, on);
  34498. return vm
  34499. };
  34500. Vue.prototype.$off = function (event, fn) {
  34501. var vm = this;
  34502. // all
  34503. if (!arguments.length) {
  34504. vm._events = Object.create(null);
  34505. return vm
  34506. }
  34507. // array of events
  34508. if (Array.isArray(event)) {
  34509. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  34510. vm.$off(event[i$1], fn);
  34511. }
  34512. return vm
  34513. }
  34514. // specific event
  34515. var cbs = vm._events[event];
  34516. if (!cbs) {
  34517. return vm
  34518. }
  34519. if (!fn) {
  34520. vm._events[event] = null;
  34521. return vm
  34522. }
  34523. // specific handler
  34524. var cb;
  34525. var i = cbs.length;
  34526. while (i--) {
  34527. cb = cbs[i];
  34528. if (cb === fn || cb.fn === fn) {
  34529. cbs.splice(i, 1);
  34530. break
  34531. }
  34532. }
  34533. return vm
  34534. };
  34535. Vue.prototype.$emit = function (event) {
  34536. var vm = this;
  34537. if (true) {
  34538. var lowerCaseEvent = event.toLowerCase();
  34539. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  34540. tip(
  34541. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  34542. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  34543. "Note that HTML attributes are case-insensitive and you cannot use " +
  34544. "v-on to listen to camelCase events when using in-DOM templates. " +
  34545. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  34546. );
  34547. }
  34548. }
  34549. var cbs = vm._events[event];
  34550. if (cbs) {
  34551. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  34552. var args = toArray(arguments, 1);
  34553. var info = "event handler for \"" + event + "\"";
  34554. for (var i = 0, l = cbs.length; i < l; i++) {
  34555. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  34556. }
  34557. }
  34558. return vm
  34559. };
  34560. }
  34561. /* */
  34562. var activeInstance = null;
  34563. var isUpdatingChildComponent = false;
  34564. function setActiveInstance(vm) {
  34565. var prevActiveInstance = activeInstance;
  34566. activeInstance = vm;
  34567. return function () {
  34568. activeInstance = prevActiveInstance;
  34569. }
  34570. }
  34571. function initLifecycle (vm) {
  34572. var options = vm.$options;
  34573. // locate first non-abstract parent
  34574. var parent = options.parent;
  34575. if (parent && !options.abstract) {
  34576. while (parent.$options.abstract && parent.$parent) {
  34577. parent = parent.$parent;
  34578. }
  34579. parent.$children.push(vm);
  34580. }
  34581. vm.$parent = parent;
  34582. vm.$root = parent ? parent.$root : vm;
  34583. vm.$children = [];
  34584. vm.$refs = {};
  34585. vm._watcher = null;
  34586. vm._inactive = null;
  34587. vm._directInactive = false;
  34588. vm._isMounted = false;
  34589. vm._isDestroyed = false;
  34590. vm._isBeingDestroyed = false;
  34591. }
  34592. function lifecycleMixin (Vue) {
  34593. Vue.prototype._update = function (vnode, hydrating) {
  34594. var vm = this;
  34595. var prevEl = vm.$el;
  34596. var prevVnode = vm._vnode;
  34597. var restoreActiveInstance = setActiveInstance(vm);
  34598. vm._vnode = vnode;
  34599. // Vue.prototype.__patch__ is injected in entry points
  34600. // based on the rendering backend used.
  34601. if (!prevVnode) {
  34602. // initial render
  34603. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  34604. } else {
  34605. // updates
  34606. vm.$el = vm.__patch__(prevVnode, vnode);
  34607. }
  34608. restoreActiveInstance();
  34609. // update __vue__ reference
  34610. if (prevEl) {
  34611. prevEl.__vue__ = null;
  34612. }
  34613. if (vm.$el) {
  34614. vm.$el.__vue__ = vm;
  34615. }
  34616. // if parent is an HOC, update its $el as well
  34617. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  34618. vm.$parent.$el = vm.$el;
  34619. }
  34620. // updated hook is called by the scheduler to ensure that children are
  34621. // updated in a parent's updated hook.
  34622. };
  34623. Vue.prototype.$forceUpdate = function () {
  34624. var vm = this;
  34625. if (vm._watcher) {
  34626. vm._watcher.update();
  34627. }
  34628. };
  34629. Vue.prototype.$destroy = function () {
  34630. var vm = this;
  34631. if (vm._isBeingDestroyed) {
  34632. return
  34633. }
  34634. callHook(vm, 'beforeDestroy');
  34635. vm._isBeingDestroyed = true;
  34636. // remove self from parent
  34637. var parent = vm.$parent;
  34638. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  34639. remove(parent.$children, vm);
  34640. }
  34641. // teardown watchers
  34642. if (vm._watcher) {
  34643. vm._watcher.teardown();
  34644. }
  34645. var i = vm._watchers.length;
  34646. while (i--) {
  34647. vm._watchers[i].teardown();
  34648. }
  34649. // remove reference from data ob
  34650. // frozen object may not have observer.
  34651. if (vm._data.__ob__) {
  34652. vm._data.__ob__.vmCount--;
  34653. }
  34654. // call the last hook...
  34655. vm._isDestroyed = true;
  34656. // invoke destroy hooks on current rendered tree
  34657. vm.__patch__(vm._vnode, null);
  34658. // fire destroyed hook
  34659. callHook(vm, 'destroyed');
  34660. // turn off all instance listeners.
  34661. vm.$off();
  34662. // remove __vue__ reference
  34663. if (vm.$el) {
  34664. vm.$el.__vue__ = null;
  34665. }
  34666. // release circular reference (#6759)
  34667. if (vm.$vnode) {
  34668. vm.$vnode.parent = null;
  34669. }
  34670. };
  34671. }
  34672. function updateChildComponent (
  34673. vm,
  34674. propsData,
  34675. listeners,
  34676. parentVnode,
  34677. renderChildren
  34678. ) {
  34679. if (true) {
  34680. isUpdatingChildComponent = true;
  34681. }
  34682. // determine whether component has slot children
  34683. // we need to do this before overwriting $options._renderChildren.
  34684. // check if there are dynamic scopedSlots (hand-written or compiled but with
  34685. // dynamic slot names). Static scoped slots compiled from template has the
  34686. // "$stable" marker.
  34687. var newScopedSlots = parentVnode.data.scopedSlots;
  34688. var oldScopedSlots = vm.$scopedSlots;
  34689. var hasDynamicScopedSlot = !!(
  34690. (newScopedSlots && !newScopedSlots.$stable) ||
  34691. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  34692. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  34693. );
  34694. // Any static slot children from the parent may have changed during parent's
  34695. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  34696. // update is necessary to ensure correctness.
  34697. var needsForceUpdate = !!(
  34698. renderChildren || // has new static slots
  34699. vm.$options._renderChildren || // has old static slots
  34700. hasDynamicScopedSlot
  34701. );
  34702. vm.$options._parentVnode = parentVnode;
  34703. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  34704. if (vm._vnode) { // update child tree's parent
  34705. vm._vnode.parent = parentVnode;
  34706. }
  34707. vm.$options._renderChildren = renderChildren;
  34708. // update $attrs and $listeners hash
  34709. // these are also reactive so they may trigger child update if the child
  34710. // used them during render
  34711. vm.$attrs = parentVnode.data.attrs || emptyObject;
  34712. vm.$listeners = listeners || emptyObject;
  34713. // update props
  34714. if (propsData && vm.$options.props) {
  34715. toggleObserving(false);
  34716. var props = vm._props;
  34717. var propKeys = vm.$options._propKeys || [];
  34718. for (var i = 0; i < propKeys.length; i++) {
  34719. var key = propKeys[i];
  34720. var propOptions = vm.$options.props; // wtf flow?
  34721. props[key] = validateProp(key, propOptions, propsData, vm);
  34722. }
  34723. toggleObserving(true);
  34724. // keep a copy of raw propsData
  34725. vm.$options.propsData = propsData;
  34726. }
  34727. // fixed by xxxxxx update properties(mp runtime)
  34728. vm._$updateProperties && vm._$updateProperties(vm);
  34729. // update listeners
  34730. listeners = listeners || emptyObject;
  34731. var oldListeners = vm.$options._parentListeners;
  34732. vm.$options._parentListeners = listeners;
  34733. updateComponentListeners(vm, listeners, oldListeners);
  34734. // resolve slots + force update if has children
  34735. if (needsForceUpdate) {
  34736. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  34737. vm.$forceUpdate();
  34738. }
  34739. if (true) {
  34740. isUpdatingChildComponent = false;
  34741. }
  34742. }
  34743. function isInInactiveTree (vm) {
  34744. while (vm && (vm = vm.$parent)) {
  34745. if (vm._inactive) { return true }
  34746. }
  34747. return false
  34748. }
  34749. function activateChildComponent (vm, direct) {
  34750. if (direct) {
  34751. vm._directInactive = false;
  34752. if (isInInactiveTree(vm)) {
  34753. return
  34754. }
  34755. } else if (vm._directInactive) {
  34756. return
  34757. }
  34758. if (vm._inactive || vm._inactive === null) {
  34759. vm._inactive = false;
  34760. for (var i = 0; i < vm.$children.length; i++) {
  34761. activateChildComponent(vm.$children[i]);
  34762. }
  34763. callHook(vm, 'activated');
  34764. }
  34765. }
  34766. function deactivateChildComponent (vm, direct) {
  34767. if (direct) {
  34768. vm._directInactive = true;
  34769. if (isInInactiveTree(vm)) {
  34770. return
  34771. }
  34772. }
  34773. if (!vm._inactive) {
  34774. vm._inactive = true;
  34775. for (var i = 0; i < vm.$children.length; i++) {
  34776. deactivateChildComponent(vm.$children[i]);
  34777. }
  34778. callHook(vm, 'deactivated');
  34779. }
  34780. }
  34781. function callHook (vm, hook) {
  34782. // #7573 disable dep collection when invoking lifecycle hooks
  34783. pushTarget();
  34784. var handlers = vm.$options[hook];
  34785. var info = hook + " hook";
  34786. if (handlers) {
  34787. for (var i = 0, j = handlers.length; i < j; i++) {
  34788. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  34789. }
  34790. }
  34791. if (vm._hasHookEvent) {
  34792. vm.$emit('hook:' + hook);
  34793. }
  34794. popTarget();
  34795. }
  34796. /* */
  34797. var MAX_UPDATE_COUNT = 100;
  34798. var queue = [];
  34799. var activatedChildren = [];
  34800. var has = {};
  34801. var circular = {};
  34802. var waiting = false;
  34803. var flushing = false;
  34804. var index = 0;
  34805. /**
  34806. * Reset the scheduler's state.
  34807. */
  34808. function resetSchedulerState () {
  34809. index = queue.length = activatedChildren.length = 0;
  34810. has = {};
  34811. if (true) {
  34812. circular = {};
  34813. }
  34814. waiting = flushing = false;
  34815. }
  34816. // Async edge case #6566 requires saving the timestamp when event listeners are
  34817. // attached. However, calling performance.now() has a perf overhead especially
  34818. // if the page has thousands of event listeners. Instead, we take a timestamp
  34819. // every time the scheduler flushes and use that for all event listeners
  34820. // attached during that flush.
  34821. var currentFlushTimestamp = 0;
  34822. // Async edge case fix requires storing an event listener's attach timestamp.
  34823. var getNow = Date.now;
  34824. // Determine what event timestamp the browser is using. Annoyingly, the
  34825. // timestamp can either be hi-res (relative to page load) or low-res
  34826. // (relative to UNIX epoch), so in order to compare time we have to use the
  34827. // same timestamp type when saving the flush timestamp.
  34828. // All IE versions use low-res event timestamps, and have problematic clock
  34829. // implementations (#9632)
  34830. if (inBrowser && !isIE) {
  34831. var performance = window.performance;
  34832. if (
  34833. performance &&
  34834. typeof performance.now === 'function' &&
  34835. getNow() > document.createEvent('Event').timeStamp
  34836. ) {
  34837. // if the event timestamp, although evaluated AFTER the Date.now(), is
  34838. // smaller than it, it means the event is using a hi-res timestamp,
  34839. // and we need to use the hi-res version for event listener timestamps as
  34840. // well.
  34841. getNow = function () { return performance.now(); };
  34842. }
  34843. }
  34844. /**
  34845. * Flush both queues and run the watchers.
  34846. */
  34847. function flushSchedulerQueue () {
  34848. currentFlushTimestamp = getNow();
  34849. flushing = true;
  34850. var watcher, id;
  34851. // Sort queue before flush.
  34852. // This ensures that:
  34853. // 1. Components are updated from parent to child. (because parent is always
  34854. // created before the child)
  34855. // 2. A component's user watchers are run before its render watcher (because
  34856. // user watchers are created before the render watcher)
  34857. // 3. If a component is destroyed during a parent component's watcher run,
  34858. // its watchers can be skipped.
  34859. queue.sort(function (a, b) { return a.id - b.id; });
  34860. // do not cache length because more watchers might be pushed
  34861. // as we run existing watchers
  34862. for (index = 0; index < queue.length; index++) {
  34863. watcher = queue[index];
  34864. if (watcher.before) {
  34865. watcher.before();
  34866. }
  34867. id = watcher.id;
  34868. has[id] = null;
  34869. watcher.run();
  34870. // in dev build, check and stop circular updates.
  34871. if ( true && has[id] != null) {
  34872. circular[id] = (circular[id] || 0) + 1;
  34873. if (circular[id] > MAX_UPDATE_COUNT) {
  34874. warn(
  34875. 'You may have an infinite update loop ' + (
  34876. watcher.user
  34877. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  34878. : "in a component render function."
  34879. ),
  34880. watcher.vm
  34881. );
  34882. break
  34883. }
  34884. }
  34885. }
  34886. // keep copies of post queues before resetting state
  34887. var activatedQueue = activatedChildren.slice();
  34888. var updatedQueue = queue.slice();
  34889. resetSchedulerState();
  34890. // call component updated and activated hooks
  34891. callActivatedHooks(activatedQueue);
  34892. callUpdatedHooks(updatedQueue);
  34893. // devtool hook
  34894. /* istanbul ignore if */
  34895. if (devtools && config.devtools) {
  34896. devtools.emit('flush');
  34897. }
  34898. }
  34899. function callUpdatedHooks (queue) {
  34900. var i = queue.length;
  34901. while (i--) {
  34902. var watcher = queue[i];
  34903. var vm = watcher.vm;
  34904. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  34905. callHook(vm, 'updated');
  34906. }
  34907. }
  34908. }
  34909. /**
  34910. * Queue a kept-alive component that was activated during patch.
  34911. * The queue will be processed after the entire tree has been patched.
  34912. */
  34913. function queueActivatedComponent (vm) {
  34914. // setting _inactive to false here so that a render function can
  34915. // rely on checking whether it's in an inactive tree (e.g. router-view)
  34916. vm._inactive = false;
  34917. activatedChildren.push(vm);
  34918. }
  34919. function callActivatedHooks (queue) {
  34920. for (var i = 0; i < queue.length; i++) {
  34921. queue[i]._inactive = true;
  34922. activateChildComponent(queue[i], true /* true */);
  34923. }
  34924. }
  34925. /**
  34926. * Push a watcher into the watcher queue.
  34927. * Jobs with duplicate IDs will be skipped unless it's
  34928. * pushed when the queue is being flushed.
  34929. */
  34930. function queueWatcher (watcher) {
  34931. var id = watcher.id;
  34932. if (has[id] == null) {
  34933. has[id] = true;
  34934. if (!flushing) {
  34935. queue.push(watcher);
  34936. } else {
  34937. // if already flushing, splice the watcher based on its id
  34938. // if already past its id, it will be run next immediately.
  34939. var i = queue.length - 1;
  34940. while (i > index && queue[i].id > watcher.id) {
  34941. i--;
  34942. }
  34943. queue.splice(i + 1, 0, watcher);
  34944. }
  34945. // queue the flush
  34946. if (!waiting) {
  34947. waiting = true;
  34948. if ( true && !config.async) {
  34949. flushSchedulerQueue();
  34950. return
  34951. }
  34952. nextTick(flushSchedulerQueue);
  34953. }
  34954. }
  34955. }
  34956. /* */
  34957. var uid$2 = 0;
  34958. /**
  34959. * A watcher parses an expression, collects dependencies,
  34960. * and fires callback when the expression value changes.
  34961. * This is used for both the $watch() api and directives.
  34962. */
  34963. var Watcher = function Watcher (
  34964. vm,
  34965. expOrFn,
  34966. cb,
  34967. options,
  34968. isRenderWatcher
  34969. ) {
  34970. this.vm = vm;
  34971. if (isRenderWatcher) {
  34972. vm._watcher = this;
  34973. }
  34974. vm._watchers.push(this);
  34975. // options
  34976. if (options) {
  34977. this.deep = !!options.deep;
  34978. this.user = !!options.user;
  34979. this.lazy = !!options.lazy;
  34980. this.sync = !!options.sync;
  34981. this.before = options.before;
  34982. } else {
  34983. this.deep = this.user = this.lazy = this.sync = false;
  34984. }
  34985. this.cb = cb;
  34986. this.id = ++uid$2; // uid for batching
  34987. this.active = true;
  34988. this.dirty = this.lazy; // for lazy watchers
  34989. this.deps = [];
  34990. this.newDeps = [];
  34991. this.depIds = new _Set();
  34992. this.newDepIds = new _Set();
  34993. this.expression = true
  34994. ? expOrFn.toString()
  34995. : undefined;
  34996. // parse expression for getter
  34997. if (typeof expOrFn === 'function') {
  34998. this.getter = expOrFn;
  34999. } else {
  35000. this.getter = parsePath(expOrFn);
  35001. if (!this.getter) {
  35002. this.getter = noop;
  35003. true && warn(
  35004. "Failed watching path: \"" + expOrFn + "\" " +
  35005. 'Watcher only accepts simple dot-delimited paths. ' +
  35006. 'For full control, use a function instead.',
  35007. vm
  35008. );
  35009. }
  35010. }
  35011. this.value = this.lazy
  35012. ? undefined
  35013. : this.get();
  35014. };
  35015. /**
  35016. * Evaluate the getter, and re-collect dependencies.
  35017. */
  35018. Watcher.prototype.get = function get () {
  35019. pushTarget(this);
  35020. var value;
  35021. var vm = this.vm;
  35022. try {
  35023. value = this.getter.call(vm, vm);
  35024. } catch (e) {
  35025. if (this.user) {
  35026. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  35027. } else {
  35028. throw e
  35029. }
  35030. } finally {
  35031. // "touch" every property so they are all tracked as
  35032. // dependencies for deep watching
  35033. if (this.deep) {
  35034. traverse(value);
  35035. }
  35036. popTarget();
  35037. this.cleanupDeps();
  35038. }
  35039. return value
  35040. };
  35041. /**
  35042. * Add a dependency to this directive.
  35043. */
  35044. Watcher.prototype.addDep = function addDep (dep) {
  35045. var id = dep.id;
  35046. if (!this.newDepIds.has(id)) {
  35047. this.newDepIds.add(id);
  35048. this.newDeps.push(dep);
  35049. if (!this.depIds.has(id)) {
  35050. dep.addSub(this);
  35051. }
  35052. }
  35053. };
  35054. /**
  35055. * Clean up for dependency collection.
  35056. */
  35057. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  35058. var i = this.deps.length;
  35059. while (i--) {
  35060. var dep = this.deps[i];
  35061. if (!this.newDepIds.has(dep.id)) {
  35062. dep.removeSub(this);
  35063. }
  35064. }
  35065. var tmp = this.depIds;
  35066. this.depIds = this.newDepIds;
  35067. this.newDepIds = tmp;
  35068. this.newDepIds.clear();
  35069. tmp = this.deps;
  35070. this.deps = this.newDeps;
  35071. this.newDeps = tmp;
  35072. this.newDeps.length = 0;
  35073. };
  35074. /**
  35075. * Subscriber interface.
  35076. * Will be called when a dependency changes.
  35077. */
  35078. Watcher.prototype.update = function update () {
  35079. /* istanbul ignore else */
  35080. if (this.lazy) {
  35081. this.dirty = true;
  35082. } else if (this.sync) {
  35083. this.run();
  35084. } else {
  35085. queueWatcher(this);
  35086. }
  35087. };
  35088. /**
  35089. * Scheduler job interface.
  35090. * Will be called by the scheduler.
  35091. */
  35092. Watcher.prototype.run = function run () {
  35093. if (this.active) {
  35094. var value = this.get();
  35095. if (
  35096. value !== this.value ||
  35097. // Deep watchers and watchers on Object/Arrays should fire even
  35098. // when the value is the same, because the value may
  35099. // have mutated.
  35100. isObject(value) ||
  35101. this.deep
  35102. ) {
  35103. // set new value
  35104. var oldValue = this.value;
  35105. this.value = value;
  35106. if (this.user) {
  35107. try {
  35108. this.cb.call(this.vm, value, oldValue);
  35109. } catch (e) {
  35110. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  35111. }
  35112. } else {
  35113. this.cb.call(this.vm, value, oldValue);
  35114. }
  35115. }
  35116. }
  35117. };
  35118. /**
  35119. * Evaluate the value of the watcher.
  35120. * This only gets called for lazy watchers.
  35121. */
  35122. Watcher.prototype.evaluate = function evaluate () {
  35123. this.value = this.get();
  35124. this.dirty = false;
  35125. };
  35126. /**
  35127. * Depend on all deps collected by this watcher.
  35128. */
  35129. Watcher.prototype.depend = function depend () {
  35130. var i = this.deps.length;
  35131. while (i--) {
  35132. this.deps[i].depend();
  35133. }
  35134. };
  35135. /**
  35136. * Remove self from all dependencies' subscriber list.
  35137. */
  35138. Watcher.prototype.teardown = function teardown () {
  35139. if (this.active) {
  35140. // remove self from vm's watcher list
  35141. // this is a somewhat expensive operation so we skip it
  35142. // if the vm is being destroyed.
  35143. if (!this.vm._isBeingDestroyed) {
  35144. remove(this.vm._watchers, this);
  35145. }
  35146. var i = this.deps.length;
  35147. while (i--) {
  35148. this.deps[i].removeSub(this);
  35149. }
  35150. this.active = false;
  35151. }
  35152. };
  35153. /* */
  35154. var sharedPropertyDefinition = {
  35155. enumerable: true,
  35156. configurable: true,
  35157. get: noop,
  35158. set: noop
  35159. };
  35160. function proxy (target, sourceKey, key) {
  35161. sharedPropertyDefinition.get = function proxyGetter () {
  35162. return this[sourceKey][key]
  35163. };
  35164. sharedPropertyDefinition.set = function proxySetter (val) {
  35165. this[sourceKey][key] = val;
  35166. };
  35167. Object.defineProperty(target, key, sharedPropertyDefinition);
  35168. }
  35169. function initState (vm) {
  35170. vm._watchers = [];
  35171. var opts = vm.$options;
  35172. if (opts.props) { initProps(vm, opts.props); }
  35173. if (opts.methods) { initMethods(vm, opts.methods); }
  35174. if (opts.data) {
  35175. initData(vm);
  35176. } else {
  35177. observe(vm._data = {}, true /* asRootData */);
  35178. }
  35179. if (opts.computed) { initComputed(vm, opts.computed); }
  35180. if (opts.watch && opts.watch !== nativeWatch) {
  35181. initWatch(vm, opts.watch);
  35182. }
  35183. }
  35184. function initProps (vm, propsOptions) {
  35185. var propsData = vm.$options.propsData || {};
  35186. var props = vm._props = {};
  35187. // cache prop keys so that future props updates can iterate using Array
  35188. // instead of dynamic object key enumeration.
  35189. var keys = vm.$options._propKeys = [];
  35190. var isRoot = !vm.$parent;
  35191. // root instance props should be converted
  35192. if (!isRoot) {
  35193. toggleObserving(false);
  35194. }
  35195. var loop = function ( key ) {
  35196. keys.push(key);
  35197. var value = validateProp(key, propsOptions, propsData, vm);
  35198. /* istanbul ignore else */
  35199. if (true) {
  35200. var hyphenatedKey = hyphenate(key);
  35201. if (isReservedAttribute(hyphenatedKey) ||
  35202. config.isReservedAttr(hyphenatedKey)) {
  35203. warn(
  35204. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  35205. vm
  35206. );
  35207. }
  35208. defineReactive$$1(props, key, value, function () {
  35209. if (!isRoot && !isUpdatingChildComponent) {
  35210. {
  35211. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  35212. return
  35213. }
  35214. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  35215. if(
  35216. key === 'value' &&
  35217. Array.isArray(vm.$options.behaviors) &&
  35218. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  35219. ){
  35220. return
  35221. }
  35222. if(vm._getFormData){
  35223. return
  35224. }
  35225. var $parent = vm.$parent;
  35226. while($parent){
  35227. if($parent.__next_tick_pending){
  35228. return
  35229. }
  35230. $parent = $parent.$parent;
  35231. }
  35232. }
  35233. warn(
  35234. "Avoid mutating a prop directly since the value will be " +
  35235. "overwritten whenever the parent component re-renders. " +
  35236. "Instead, use a data or computed property based on the prop's " +
  35237. "value. Prop being mutated: \"" + key + "\"",
  35238. vm
  35239. );
  35240. }
  35241. });
  35242. } else {}
  35243. // static props are already proxied on the component's prototype
  35244. // during Vue.extend(). We only need to proxy props defined at
  35245. // instantiation here.
  35246. if (!(key in vm)) {
  35247. proxy(vm, "_props", key);
  35248. }
  35249. };
  35250. for (var key in propsOptions) loop( key );
  35251. toggleObserving(true);
  35252. }
  35253. function initData (vm) {
  35254. var data = vm.$options.data;
  35255. data = vm._data = typeof data === 'function'
  35256. ? getData(data, vm)
  35257. : data || {};
  35258. if (!isPlainObject(data)) {
  35259. data = {};
  35260. true && warn(
  35261. 'data functions should return an object:\n' +
  35262. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  35263. vm
  35264. );
  35265. }
  35266. // proxy data on instance
  35267. var keys = Object.keys(data);
  35268. var props = vm.$options.props;
  35269. var methods = vm.$options.methods;
  35270. var i = keys.length;
  35271. while (i--) {
  35272. var key = keys[i];
  35273. if (true) {
  35274. if (methods && hasOwn(methods, key)) {
  35275. warn(
  35276. ("Method \"" + key + "\" has already been defined as a data property."),
  35277. vm
  35278. );
  35279. }
  35280. }
  35281. if (props && hasOwn(props, key)) {
  35282. true && warn(
  35283. "The data property \"" + key + "\" is already declared as a prop. " +
  35284. "Use prop default value instead.",
  35285. vm
  35286. );
  35287. } else if (!isReserved(key)) {
  35288. proxy(vm, "_data", key);
  35289. }
  35290. }
  35291. // observe data
  35292. observe(data, true /* asRootData */);
  35293. }
  35294. function getData (data, vm) {
  35295. // #7573 disable dep collection when invoking data getters
  35296. pushTarget();
  35297. try {
  35298. return data.call(vm, vm)
  35299. } catch (e) {
  35300. handleError(e, vm, "data()");
  35301. return {}
  35302. } finally {
  35303. popTarget();
  35304. }
  35305. }
  35306. var computedWatcherOptions = { lazy: true };
  35307. function initComputed (vm, computed) {
  35308. // $flow-disable-line
  35309. var watchers = vm._computedWatchers = Object.create(null);
  35310. // computed properties are just getters during SSR
  35311. var isSSR = isServerRendering();
  35312. for (var key in computed) {
  35313. var userDef = computed[key];
  35314. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  35315. if ( true && getter == null) {
  35316. warn(
  35317. ("Getter is missing for computed property \"" + key + "\"."),
  35318. vm
  35319. );
  35320. }
  35321. if (!isSSR) {
  35322. // create internal watcher for the computed property.
  35323. watchers[key] = new Watcher(
  35324. vm,
  35325. getter || noop,
  35326. noop,
  35327. computedWatcherOptions
  35328. );
  35329. }
  35330. // component-defined computed properties are already defined on the
  35331. // component prototype. We only need to define computed properties defined
  35332. // at instantiation here.
  35333. if (!(key in vm)) {
  35334. defineComputed(vm, key, userDef);
  35335. } else if (true) {
  35336. if (key in vm.$data) {
  35337. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  35338. } else if (vm.$options.props && key in vm.$options.props) {
  35339. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  35340. }
  35341. }
  35342. }
  35343. }
  35344. function defineComputed (
  35345. target,
  35346. key,
  35347. userDef
  35348. ) {
  35349. var shouldCache = !isServerRendering();
  35350. if (typeof userDef === 'function') {
  35351. sharedPropertyDefinition.get = shouldCache
  35352. ? createComputedGetter(key)
  35353. : createGetterInvoker(userDef);
  35354. sharedPropertyDefinition.set = noop;
  35355. } else {
  35356. sharedPropertyDefinition.get = userDef.get
  35357. ? shouldCache && userDef.cache !== false
  35358. ? createComputedGetter(key)
  35359. : createGetterInvoker(userDef.get)
  35360. : noop;
  35361. sharedPropertyDefinition.set = userDef.set || noop;
  35362. }
  35363. if ( true &&
  35364. sharedPropertyDefinition.set === noop) {
  35365. sharedPropertyDefinition.set = function () {
  35366. warn(
  35367. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  35368. this
  35369. );
  35370. };
  35371. }
  35372. Object.defineProperty(target, key, sharedPropertyDefinition);
  35373. }
  35374. function createComputedGetter (key) {
  35375. return function computedGetter () {
  35376. var watcher = this._computedWatchers && this._computedWatchers[key];
  35377. if (watcher) {
  35378. if (watcher.dirty) {
  35379. watcher.evaluate();
  35380. }
  35381. if (Dep.SharedObject.target) {// fixed by xxxxxx
  35382. watcher.depend();
  35383. }
  35384. return watcher.value
  35385. }
  35386. }
  35387. }
  35388. function createGetterInvoker(fn) {
  35389. return function computedGetter () {
  35390. return fn.call(this, this)
  35391. }
  35392. }
  35393. function initMethods (vm, methods) {
  35394. var props = vm.$options.props;
  35395. for (var key in methods) {
  35396. if (true) {
  35397. if (typeof methods[key] !== 'function') {
  35398. warn(
  35399. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  35400. "Did you reference the function correctly?",
  35401. vm
  35402. );
  35403. }
  35404. if (props && hasOwn(props, key)) {
  35405. warn(
  35406. ("Method \"" + key + "\" has already been defined as a prop."),
  35407. vm
  35408. );
  35409. }
  35410. if ((key in vm) && isReserved(key)) {
  35411. warn(
  35412. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  35413. "Avoid defining component methods that start with _ or $."
  35414. );
  35415. }
  35416. }
  35417. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  35418. }
  35419. }
  35420. function initWatch (vm, watch) {
  35421. for (var key in watch) {
  35422. var handler = watch[key];
  35423. if (Array.isArray(handler)) {
  35424. for (var i = 0; i < handler.length; i++) {
  35425. createWatcher(vm, key, handler[i]);
  35426. }
  35427. } else {
  35428. createWatcher(vm, key, handler);
  35429. }
  35430. }
  35431. }
  35432. function createWatcher (
  35433. vm,
  35434. expOrFn,
  35435. handler,
  35436. options
  35437. ) {
  35438. if (isPlainObject(handler)) {
  35439. options = handler;
  35440. handler = handler.handler;
  35441. }
  35442. if (typeof handler === 'string') {
  35443. handler = vm[handler];
  35444. }
  35445. return vm.$watch(expOrFn, handler, options)
  35446. }
  35447. function stateMixin (Vue) {
  35448. // flow somehow has problems with directly declared definition object
  35449. // when using Object.defineProperty, so we have to procedurally build up
  35450. // the object here.
  35451. var dataDef = {};
  35452. dataDef.get = function () { return this._data };
  35453. var propsDef = {};
  35454. propsDef.get = function () { return this._props };
  35455. if (true) {
  35456. dataDef.set = function () {
  35457. warn(
  35458. 'Avoid replacing instance root $data. ' +
  35459. 'Use nested data properties instead.',
  35460. this
  35461. );
  35462. };
  35463. propsDef.set = function () {
  35464. warn("$props is readonly.", this);
  35465. };
  35466. }
  35467. Object.defineProperty(Vue.prototype, '$data', dataDef);
  35468. Object.defineProperty(Vue.prototype, '$props', propsDef);
  35469. Vue.prototype.$set = set;
  35470. Vue.prototype.$delete = del;
  35471. Vue.prototype.$watch = function (
  35472. expOrFn,
  35473. cb,
  35474. options
  35475. ) {
  35476. var vm = this;
  35477. if (isPlainObject(cb)) {
  35478. return createWatcher(vm, expOrFn, cb, options)
  35479. }
  35480. options = options || {};
  35481. options.user = true;
  35482. var watcher = new Watcher(vm, expOrFn, cb, options);
  35483. if (options.immediate) {
  35484. try {
  35485. cb.call(vm, watcher.value);
  35486. } catch (error) {
  35487. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  35488. }
  35489. }
  35490. return function unwatchFn () {
  35491. watcher.teardown();
  35492. }
  35493. };
  35494. }
  35495. /* */
  35496. var uid$3 = 0;
  35497. function initMixin (Vue) {
  35498. Vue.prototype._init = function (options) {
  35499. var vm = this;
  35500. // a uid
  35501. vm._uid = uid$3++;
  35502. var startTag, endTag;
  35503. /* istanbul ignore if */
  35504. if ( true && config.performance && mark) {
  35505. startTag = "vue-perf-start:" + (vm._uid);
  35506. endTag = "vue-perf-end:" + (vm._uid);
  35507. mark(startTag);
  35508. }
  35509. // a flag to avoid this being observed
  35510. vm._isVue = true;
  35511. // merge options
  35512. if (options && options._isComponent) {
  35513. // optimize internal component instantiation
  35514. // since dynamic options merging is pretty slow, and none of the
  35515. // internal component options needs special treatment.
  35516. initInternalComponent(vm, options);
  35517. } else {
  35518. vm.$options = mergeOptions(
  35519. resolveConstructorOptions(vm.constructor),
  35520. options || {},
  35521. vm
  35522. );
  35523. }
  35524. /* istanbul ignore else */
  35525. if (true) {
  35526. initProxy(vm);
  35527. } else {}
  35528. // expose real self
  35529. vm._self = vm;
  35530. initLifecycle(vm);
  35531. initEvents(vm);
  35532. initRender(vm);
  35533. callHook(vm, 'beforeCreate');
  35534. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  35535. initState(vm);
  35536. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  35537. !vm._$fallback && callHook(vm, 'created');
  35538. /* istanbul ignore if */
  35539. if ( true && config.performance && mark) {
  35540. vm._name = formatComponentName(vm, false);
  35541. mark(endTag);
  35542. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  35543. }
  35544. if (vm.$options.el) {
  35545. vm.$mount(vm.$options.el);
  35546. }
  35547. };
  35548. }
  35549. function initInternalComponent (vm, options) {
  35550. var opts = vm.$options = Object.create(vm.constructor.options);
  35551. // doing this because it's faster than dynamic enumeration.
  35552. var parentVnode = options._parentVnode;
  35553. opts.parent = options.parent;
  35554. opts._parentVnode = parentVnode;
  35555. var vnodeComponentOptions = parentVnode.componentOptions;
  35556. opts.propsData = vnodeComponentOptions.propsData;
  35557. opts._parentListeners = vnodeComponentOptions.listeners;
  35558. opts._renderChildren = vnodeComponentOptions.children;
  35559. opts._componentTag = vnodeComponentOptions.tag;
  35560. if (options.render) {
  35561. opts.render = options.render;
  35562. opts.staticRenderFns = options.staticRenderFns;
  35563. }
  35564. }
  35565. function resolveConstructorOptions (Ctor) {
  35566. var options = Ctor.options;
  35567. if (Ctor.super) {
  35568. var superOptions = resolveConstructorOptions(Ctor.super);
  35569. var cachedSuperOptions = Ctor.superOptions;
  35570. if (superOptions !== cachedSuperOptions) {
  35571. // super option changed,
  35572. // need to resolve new options.
  35573. Ctor.superOptions = superOptions;
  35574. // check if there are any late-modified/attached options (#4976)
  35575. var modifiedOptions = resolveModifiedOptions(Ctor);
  35576. // update base extend options
  35577. if (modifiedOptions) {
  35578. extend(Ctor.extendOptions, modifiedOptions);
  35579. }
  35580. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  35581. if (options.name) {
  35582. options.components[options.name] = Ctor;
  35583. }
  35584. }
  35585. }
  35586. return options
  35587. }
  35588. function resolveModifiedOptions (Ctor) {
  35589. var modified;
  35590. var latest = Ctor.options;
  35591. var sealed = Ctor.sealedOptions;
  35592. for (var key in latest) {
  35593. if (latest[key] !== sealed[key]) {
  35594. if (!modified) { modified = {}; }
  35595. modified[key] = latest[key];
  35596. }
  35597. }
  35598. return modified
  35599. }
  35600. function Vue (options) {
  35601. if ( true &&
  35602. !(this instanceof Vue)
  35603. ) {
  35604. warn('Vue is a constructor and should be called with the `new` keyword');
  35605. }
  35606. this._init(options);
  35607. }
  35608. initMixin(Vue);
  35609. stateMixin(Vue);
  35610. eventsMixin(Vue);
  35611. lifecycleMixin(Vue);
  35612. renderMixin(Vue);
  35613. /* */
  35614. function initUse (Vue) {
  35615. Vue.use = function (plugin) {
  35616. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  35617. if (installedPlugins.indexOf(plugin) > -1) {
  35618. return this
  35619. }
  35620. // additional parameters
  35621. var args = toArray(arguments, 1);
  35622. args.unshift(this);
  35623. if (typeof plugin.install === 'function') {
  35624. plugin.install.apply(plugin, args);
  35625. } else if (typeof plugin === 'function') {
  35626. plugin.apply(null, args);
  35627. }
  35628. installedPlugins.push(plugin);
  35629. return this
  35630. };
  35631. }
  35632. /* */
  35633. function initMixin$1 (Vue) {
  35634. Vue.mixin = function (mixin) {
  35635. this.options = mergeOptions(this.options, mixin);
  35636. return this
  35637. };
  35638. }
  35639. /* */
  35640. function initExtend (Vue) {
  35641. /**
  35642. * Each instance constructor, including Vue, has a unique
  35643. * cid. This enables us to create wrapped "child
  35644. * constructors" for prototypal inheritance and cache them.
  35645. */
  35646. Vue.cid = 0;
  35647. var cid = 1;
  35648. /**
  35649. * Class inheritance
  35650. */
  35651. Vue.extend = function (extendOptions) {
  35652. extendOptions = extendOptions || {};
  35653. var Super = this;
  35654. var SuperId = Super.cid;
  35655. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  35656. if (cachedCtors[SuperId]) {
  35657. return cachedCtors[SuperId]
  35658. }
  35659. var name = extendOptions.name || Super.options.name;
  35660. if ( true && name) {
  35661. validateComponentName(name);
  35662. }
  35663. var Sub = function VueComponent (options) {
  35664. this._init(options);
  35665. };
  35666. Sub.prototype = Object.create(Super.prototype);
  35667. Sub.prototype.constructor = Sub;
  35668. Sub.cid = cid++;
  35669. Sub.options = mergeOptions(
  35670. Super.options,
  35671. extendOptions
  35672. );
  35673. Sub['super'] = Super;
  35674. // For props and computed properties, we define the proxy getters on
  35675. // the Vue instances at extension time, on the extended prototype. This
  35676. // avoids Object.defineProperty calls for each instance created.
  35677. if (Sub.options.props) {
  35678. initProps$1(Sub);
  35679. }
  35680. if (Sub.options.computed) {
  35681. initComputed$1(Sub);
  35682. }
  35683. // allow further extension/mixin/plugin usage
  35684. Sub.extend = Super.extend;
  35685. Sub.mixin = Super.mixin;
  35686. Sub.use = Super.use;
  35687. // create asset registers, so extended classes
  35688. // can have their private assets too.
  35689. ASSET_TYPES.forEach(function (type) {
  35690. Sub[type] = Super[type];
  35691. });
  35692. // enable recursive self-lookup
  35693. if (name) {
  35694. Sub.options.components[name] = Sub;
  35695. }
  35696. // keep a reference to the super options at extension time.
  35697. // later at instantiation we can check if Super's options have
  35698. // been updated.
  35699. Sub.superOptions = Super.options;
  35700. Sub.extendOptions = extendOptions;
  35701. Sub.sealedOptions = extend({}, Sub.options);
  35702. // cache constructor
  35703. cachedCtors[SuperId] = Sub;
  35704. return Sub
  35705. };
  35706. }
  35707. function initProps$1 (Comp) {
  35708. var props = Comp.options.props;
  35709. for (var key in props) {
  35710. proxy(Comp.prototype, "_props", key);
  35711. }
  35712. }
  35713. function initComputed$1 (Comp) {
  35714. var computed = Comp.options.computed;
  35715. for (var key in computed) {
  35716. defineComputed(Comp.prototype, key, computed[key]);
  35717. }
  35718. }
  35719. /* */
  35720. function initAssetRegisters (Vue) {
  35721. /**
  35722. * Create asset registration methods.
  35723. */
  35724. ASSET_TYPES.forEach(function (type) {
  35725. Vue[type] = function (
  35726. id,
  35727. definition
  35728. ) {
  35729. if (!definition) {
  35730. return this.options[type + 's'][id]
  35731. } else {
  35732. /* istanbul ignore if */
  35733. if ( true && type === 'component') {
  35734. validateComponentName(id);
  35735. }
  35736. if (type === 'component' && isPlainObject(definition)) {
  35737. definition.name = definition.name || id;
  35738. definition = this.options._base.extend(definition);
  35739. }
  35740. if (type === 'directive' && typeof definition === 'function') {
  35741. definition = { bind: definition, update: definition };
  35742. }
  35743. this.options[type + 's'][id] = definition;
  35744. return definition
  35745. }
  35746. };
  35747. });
  35748. }
  35749. /* */
  35750. function getComponentName (opts) {
  35751. return opts && (opts.Ctor.options.name || opts.tag)
  35752. }
  35753. function matches (pattern, name) {
  35754. if (Array.isArray(pattern)) {
  35755. return pattern.indexOf(name) > -1
  35756. } else if (typeof pattern === 'string') {
  35757. return pattern.split(',').indexOf(name) > -1
  35758. } else if (isRegExp(pattern)) {
  35759. return pattern.test(name)
  35760. }
  35761. /* istanbul ignore next */
  35762. return false
  35763. }
  35764. function pruneCache (keepAliveInstance, filter) {
  35765. var cache = keepAliveInstance.cache;
  35766. var keys = keepAliveInstance.keys;
  35767. var _vnode = keepAliveInstance._vnode;
  35768. for (var key in cache) {
  35769. var cachedNode = cache[key];
  35770. if (cachedNode) {
  35771. var name = getComponentName(cachedNode.componentOptions);
  35772. if (name && !filter(name)) {
  35773. pruneCacheEntry(cache, key, keys, _vnode);
  35774. }
  35775. }
  35776. }
  35777. }
  35778. function pruneCacheEntry (
  35779. cache,
  35780. key,
  35781. keys,
  35782. current
  35783. ) {
  35784. var cached$$1 = cache[key];
  35785. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  35786. cached$$1.componentInstance.$destroy();
  35787. }
  35788. cache[key] = null;
  35789. remove(keys, key);
  35790. }
  35791. var patternTypes = [String, RegExp, Array];
  35792. var KeepAlive = {
  35793. name: 'keep-alive',
  35794. abstract: true,
  35795. props: {
  35796. include: patternTypes,
  35797. exclude: patternTypes,
  35798. max: [String, Number]
  35799. },
  35800. created: function created () {
  35801. this.cache = Object.create(null);
  35802. this.keys = [];
  35803. },
  35804. destroyed: function destroyed () {
  35805. for (var key in this.cache) {
  35806. pruneCacheEntry(this.cache, key, this.keys);
  35807. }
  35808. },
  35809. mounted: function mounted () {
  35810. var this$1 = this;
  35811. this.$watch('include', function (val) {
  35812. pruneCache(this$1, function (name) { return matches(val, name); });
  35813. });
  35814. this.$watch('exclude', function (val) {
  35815. pruneCache(this$1, function (name) { return !matches(val, name); });
  35816. });
  35817. },
  35818. render: function render () {
  35819. var slot = this.$slots.default;
  35820. var vnode = getFirstComponentChild(slot);
  35821. var componentOptions = vnode && vnode.componentOptions;
  35822. if (componentOptions) {
  35823. // check pattern
  35824. var name = getComponentName(componentOptions);
  35825. var ref = this;
  35826. var include = ref.include;
  35827. var exclude = ref.exclude;
  35828. if (
  35829. // not included
  35830. (include && (!name || !matches(include, name))) ||
  35831. // excluded
  35832. (exclude && name && matches(exclude, name))
  35833. ) {
  35834. return vnode
  35835. }
  35836. var ref$1 = this;
  35837. var cache = ref$1.cache;
  35838. var keys = ref$1.keys;
  35839. var key = vnode.key == null
  35840. // same constructor may get registered as different local components
  35841. // so cid alone is not enough (#3269)
  35842. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  35843. : vnode.key;
  35844. if (cache[key]) {
  35845. vnode.componentInstance = cache[key].componentInstance;
  35846. // make current key freshest
  35847. remove(keys, key);
  35848. keys.push(key);
  35849. } else {
  35850. cache[key] = vnode;
  35851. keys.push(key);
  35852. // prune oldest entry
  35853. if (this.max && keys.length > parseInt(this.max)) {
  35854. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  35855. }
  35856. }
  35857. vnode.data.keepAlive = true;
  35858. }
  35859. return vnode || (slot && slot[0])
  35860. }
  35861. };
  35862. var builtInComponents = {
  35863. KeepAlive: KeepAlive
  35864. };
  35865. /* */
  35866. function initGlobalAPI (Vue) {
  35867. // config
  35868. var configDef = {};
  35869. configDef.get = function () { return config; };
  35870. if (true) {
  35871. configDef.set = function () {
  35872. warn(
  35873. 'Do not replace the Vue.config object, set individual fields instead.'
  35874. );
  35875. };
  35876. }
  35877. Object.defineProperty(Vue, 'config', configDef);
  35878. // exposed util methods.
  35879. // NOTE: these are not considered part of the public API - avoid relying on
  35880. // them unless you are aware of the risk.
  35881. Vue.util = {
  35882. warn: warn,
  35883. extend: extend,
  35884. mergeOptions: mergeOptions,
  35885. defineReactive: defineReactive$$1
  35886. };
  35887. Vue.set = set;
  35888. Vue.delete = del;
  35889. Vue.nextTick = nextTick;
  35890. // 2.6 explicit observable API
  35891. Vue.observable = function (obj) {
  35892. observe(obj);
  35893. return obj
  35894. };
  35895. Vue.options = Object.create(null);
  35896. ASSET_TYPES.forEach(function (type) {
  35897. Vue.options[type + 's'] = Object.create(null);
  35898. });
  35899. // this is used to identify the "base" constructor to extend all plain-object
  35900. // components with in Weex's multi-instance scenarios.
  35901. Vue.options._base = Vue;
  35902. extend(Vue.options.components, builtInComponents);
  35903. initUse(Vue);
  35904. initMixin$1(Vue);
  35905. initExtend(Vue);
  35906. initAssetRegisters(Vue);
  35907. }
  35908. initGlobalAPI(Vue);
  35909. Object.defineProperty(Vue.prototype, '$isServer', {
  35910. get: isServerRendering
  35911. });
  35912. Object.defineProperty(Vue.prototype, '$ssrContext', {
  35913. get: function get () {
  35914. /* istanbul ignore next */
  35915. return this.$vnode && this.$vnode.ssrContext
  35916. }
  35917. });
  35918. // expose FunctionalRenderContext for ssr runtime helper installation
  35919. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  35920. value: FunctionalRenderContext
  35921. });
  35922. Vue.version = '2.6.11';
  35923. /**
  35924. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  35925. */
  35926. var ARRAYTYPE = '[object Array]';
  35927. var OBJECTTYPE = '[object Object]';
  35928. var NULLTYPE = '[object Null]';
  35929. var UNDEFINEDTYPE = '[object Undefined]';
  35930. // const FUNCTIONTYPE = '[object Function]'
  35931. function diff(current, pre) {
  35932. var result = {};
  35933. syncKeys(current, pre);
  35934. _diff(current, pre, '', result);
  35935. return result
  35936. }
  35937. function syncKeys(current, pre) {
  35938. if (current === pre) { return }
  35939. var rootCurrentType = type(current);
  35940. var rootPreType = type(pre);
  35941. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  35942. if(Object.keys(current).length >= Object.keys(pre).length){
  35943. for (var key in pre) {
  35944. var currentValue = current[key];
  35945. if (currentValue === undefined) {
  35946. current[key] = null;
  35947. } else {
  35948. syncKeys(currentValue, pre[key]);
  35949. }
  35950. }
  35951. }
  35952. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  35953. if (current.length >= pre.length) {
  35954. pre.forEach(function (item, index) {
  35955. syncKeys(current[index], item);
  35956. });
  35957. }
  35958. }
  35959. }
  35960. function nullOrUndefined(currentType, preType) {
  35961. if(
  35962. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  35963. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  35964. ) {
  35965. return false
  35966. }
  35967. return true
  35968. }
  35969. function _diff(current, pre, path, result) {
  35970. if (current === pre) { return }
  35971. var rootCurrentType = type(current);
  35972. var rootPreType = type(pre);
  35973. if (rootCurrentType == OBJECTTYPE) {
  35974. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  35975. setResult(result, path, current);
  35976. } else {
  35977. var loop = function ( key ) {
  35978. var currentValue = current[key];
  35979. var preValue = pre[key];
  35980. var currentType = type(currentValue);
  35981. var preType = type(preValue);
  35982. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  35983. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  35984. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35985. }
  35986. } else if (currentType == ARRAYTYPE) {
  35987. if (preType != ARRAYTYPE) {
  35988. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35989. } else {
  35990. if (currentValue.length < preValue.length) {
  35991. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  35992. } else {
  35993. currentValue.forEach(function (item, index) {
  35994. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  35995. });
  35996. }
  35997. }
  35998. } else if (currentType == OBJECTTYPE) {
  35999. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  36000. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  36001. } else {
  36002. for (var subKey in currentValue) {
  36003. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  36004. }
  36005. }
  36006. }
  36007. };
  36008. for (var key in current) loop( key );
  36009. }
  36010. } else if (rootCurrentType == ARRAYTYPE) {
  36011. if (rootPreType != ARRAYTYPE) {
  36012. setResult(result, path, current);
  36013. } else {
  36014. if (current.length < pre.length) {
  36015. setResult(result, path, current);
  36016. } else {
  36017. current.forEach(function (item, index) {
  36018. _diff(item, pre[index], path + '[' + index + ']', result);
  36019. });
  36020. }
  36021. }
  36022. } else {
  36023. setResult(result, path, current);
  36024. }
  36025. }
  36026. function setResult(result, k, v) {
  36027. // if (type(v) != FUNCTIONTYPE) {
  36028. result[k] = v;
  36029. // }
  36030. }
  36031. function type(obj) {
  36032. return Object.prototype.toString.call(obj)
  36033. }
  36034. /* */
  36035. function flushCallbacks$1(vm) {
  36036. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  36037. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  36038. var mpInstance = vm.$scope;
  36039. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  36040. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  36041. }
  36042. var copies = vm.__next_tick_callbacks.slice(0);
  36043. vm.__next_tick_callbacks.length = 0;
  36044. for (var i = 0; i < copies.length; i++) {
  36045. copies[i]();
  36046. }
  36047. }
  36048. }
  36049. function hasRenderWatcher(vm) {
  36050. return queue.find(function (watcher) { return vm._watcher === watcher; })
  36051. }
  36052. function nextTick$1(vm, cb) {
  36053. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  36054. //2.nextTick 之前存在 render watcher
  36055. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  36056. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  36057. var mpInstance = vm.$scope;
  36058. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  36059. ']:nextVueTick');
  36060. }
  36061. return nextTick(cb, vm)
  36062. }else{
  36063. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  36064. var mpInstance$1 = vm.$scope;
  36065. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  36066. ']:nextMPTick');
  36067. }
  36068. }
  36069. var _resolve;
  36070. if (!vm.__next_tick_callbacks) {
  36071. vm.__next_tick_callbacks = [];
  36072. }
  36073. vm.__next_tick_callbacks.push(function () {
  36074. if (cb) {
  36075. try {
  36076. cb.call(vm);
  36077. } catch (e) {
  36078. handleError(e, vm, 'nextTick');
  36079. }
  36080. } else if (_resolve) {
  36081. _resolve(vm);
  36082. }
  36083. });
  36084. // $flow-disable-line
  36085. if (!cb && typeof Promise !== 'undefined') {
  36086. return new Promise(function (resolve) {
  36087. _resolve = resolve;
  36088. })
  36089. }
  36090. }
  36091. /* */
  36092. function clearInstance(key, value) {
  36093. // 简易去除 Vue 和小程序组件实例
  36094. if (value) {
  36095. if (value._isVue || value.__v_isMPComponent) {
  36096. return {}
  36097. }
  36098. }
  36099. return value
  36100. }
  36101. function cloneWithData(vm) {
  36102. // 确保当前 vm 所有数据被同步
  36103. var ret = Object.create(null);
  36104. var dataKeys = [].concat(
  36105. Object.keys(vm._data || {}),
  36106. Object.keys(vm._computedWatchers || {}));
  36107. dataKeys.reduce(function(ret, key) {
  36108. ret[key] = vm[key];
  36109. return ret
  36110. }, ret);
  36111. // vue-composition-api
  36112. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  36113. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  36114. if (rawBindings) {
  36115. Object.keys(rawBindings).forEach(function (key) {
  36116. ret[key] = vm[key];
  36117. });
  36118. }
  36119. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  36120. Object.assign(ret, vm.$mp.data || {});
  36121. if (
  36122. Array.isArray(vm.$options.behaviors) &&
  36123. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  36124. ) { //form-field
  36125. ret['name'] = vm.name;
  36126. ret['value'] = vm.value;
  36127. }
  36128. return JSON.parse(JSON.stringify(ret, clearInstance))
  36129. }
  36130. var patch = function(oldVnode, vnode) {
  36131. var this$1 = this;
  36132. if (vnode === null) { //destroy
  36133. return
  36134. }
  36135. if (this.mpType === 'page' || this.mpType === 'component') {
  36136. var mpInstance = this.$scope;
  36137. var data = Object.create(null);
  36138. try {
  36139. data = cloneWithData(this);
  36140. } catch (err) {
  36141. console.error(err);
  36142. }
  36143. data.__webviewId__ = mpInstance.data.__webviewId__;
  36144. var mpData = Object.create(null);
  36145. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  36146. mpData[key] = mpInstance.data[key];
  36147. });
  36148. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  36149. if (Object.keys(diffData).length) {
  36150. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"云飞智控","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  36151. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  36152. ']差量更新',
  36153. JSON.stringify(diffData));
  36154. }
  36155. this.__next_tick_pending = true;
  36156. mpInstance.setData(diffData, function () {
  36157. this$1.__next_tick_pending = false;
  36158. flushCallbacks$1(this$1);
  36159. });
  36160. } else {
  36161. flushCallbacks$1(this);
  36162. }
  36163. }
  36164. };
  36165. /* */
  36166. function createEmptyRender() {
  36167. }
  36168. function mountComponent$1(
  36169. vm,
  36170. el,
  36171. hydrating
  36172. ) {
  36173. if (!vm.mpType) {//main.js 中的 new Vue
  36174. return vm
  36175. }
  36176. if (vm.mpType === 'app') {
  36177. vm.$options.render = createEmptyRender;
  36178. }
  36179. if (!vm.$options.render) {
  36180. vm.$options.render = createEmptyRender;
  36181. if (true) {
  36182. /* istanbul ignore if */
  36183. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  36184. vm.$options.el || el) {
  36185. warn(
  36186. 'You are using the runtime-only build of Vue where the template ' +
  36187. 'compiler is not available. Either pre-compile the templates into ' +
  36188. 'render functions, or use the compiler-included build.',
  36189. vm
  36190. );
  36191. } else {
  36192. warn(
  36193. 'Failed to mount component: template or render function not defined.',
  36194. vm
  36195. );
  36196. }
  36197. }
  36198. }
  36199. !vm._$fallback && callHook(vm, 'beforeMount');
  36200. var updateComponent = function () {
  36201. vm._update(vm._render(), hydrating);
  36202. };
  36203. // we set this to vm._watcher inside the watcher's constructor
  36204. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  36205. // component's mounted hook), which relies on vm._watcher being already defined
  36206. new Watcher(vm, updateComponent, noop, {
  36207. before: function before() {
  36208. if (vm._isMounted && !vm._isDestroyed) {
  36209. callHook(vm, 'beforeUpdate');
  36210. }
  36211. }
  36212. }, true /* isRenderWatcher */);
  36213. hydrating = false;
  36214. return vm
  36215. }
  36216. /* */
  36217. function renderClass (
  36218. staticClass,
  36219. dynamicClass
  36220. ) {
  36221. if (isDef(staticClass) || isDef(dynamicClass)) {
  36222. return concat(staticClass, stringifyClass(dynamicClass))
  36223. }
  36224. /* istanbul ignore next */
  36225. return ''
  36226. }
  36227. function concat (a, b) {
  36228. return a ? b ? (a + ' ' + b) : a : (b || '')
  36229. }
  36230. function stringifyClass (value) {
  36231. if (Array.isArray(value)) {
  36232. return stringifyArray(value)
  36233. }
  36234. if (isObject(value)) {
  36235. return stringifyObject(value)
  36236. }
  36237. if (typeof value === 'string') {
  36238. return value
  36239. }
  36240. /* istanbul ignore next */
  36241. return ''
  36242. }
  36243. function stringifyArray (value) {
  36244. var res = '';
  36245. var stringified;
  36246. for (var i = 0, l = value.length; i < l; i++) {
  36247. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  36248. if (res) { res += ' '; }
  36249. res += stringified;
  36250. }
  36251. }
  36252. return res
  36253. }
  36254. function stringifyObject (value) {
  36255. var res = '';
  36256. for (var key in value) {
  36257. if (value[key]) {
  36258. if (res) { res += ' '; }
  36259. res += key;
  36260. }
  36261. }
  36262. return res
  36263. }
  36264. /* */
  36265. var parseStyleText = cached(function (cssText) {
  36266. var res = {};
  36267. var listDelimiter = /;(?![^(]*\))/g;
  36268. var propertyDelimiter = /:(.+)/;
  36269. cssText.split(listDelimiter).forEach(function (item) {
  36270. if (item) {
  36271. var tmp = item.split(propertyDelimiter);
  36272. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  36273. }
  36274. });
  36275. return res
  36276. });
  36277. // normalize possible array / string values into Object
  36278. function normalizeStyleBinding (bindingStyle) {
  36279. if (Array.isArray(bindingStyle)) {
  36280. return toObject(bindingStyle)
  36281. }
  36282. if (typeof bindingStyle === 'string') {
  36283. return parseStyleText(bindingStyle)
  36284. }
  36285. return bindingStyle
  36286. }
  36287. /* */
  36288. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  36289. function getTarget(obj, path) {
  36290. var parts = path.split('.');
  36291. var key = parts[0];
  36292. if (key.indexOf('__$n') === 0) { //number index
  36293. key = parseInt(key.replace('__$n', ''));
  36294. }
  36295. if (parts.length === 1) {
  36296. return obj[key]
  36297. }
  36298. return getTarget(obj[key], parts.slice(1).join('.'))
  36299. }
  36300. function internalMixin(Vue) {
  36301. Vue.config.errorHandler = function(err, vm, info) {
  36302. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  36303. console.error(err);
  36304. /* eslint-disable no-undef */
  36305. var app = typeof getApp === 'function' && getApp();
  36306. if (app && app.onError) {
  36307. app.onError(err);
  36308. }
  36309. };
  36310. var oldEmit = Vue.prototype.$emit;
  36311. Vue.prototype.$emit = function(event) {
  36312. if (this.$scope && event) {
  36313. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  36314. if (triggerEvent) {
  36315. try {
  36316. triggerEvent.call(this.$scope, event, {
  36317. __args__: toArray(arguments, 1)
  36318. });
  36319. } catch (error) {
  36320. }
  36321. }
  36322. }
  36323. return oldEmit.apply(this, arguments)
  36324. };
  36325. Vue.prototype.$nextTick = function(fn) {
  36326. return nextTick$1(this, fn)
  36327. };
  36328. MP_METHODS.forEach(function (method) {
  36329. Vue.prototype[method] = function(args) {
  36330. if (this.$scope && this.$scope[method]) {
  36331. return this.$scope[method](args)
  36332. }
  36333. // mp-alipay
  36334. if (typeof my === 'undefined') {
  36335. return
  36336. }
  36337. if (method === 'createSelectorQuery') {
  36338. /* eslint-disable no-undef */
  36339. return my.createSelectorQuery(args)
  36340. } else if (method === 'createIntersectionObserver') {
  36341. /* eslint-disable no-undef */
  36342. return my.createIntersectionObserver(args)
  36343. }
  36344. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  36345. };
  36346. });
  36347. Vue.prototype.__init_provide = initProvide;
  36348. Vue.prototype.__init_injections = initInjections;
  36349. Vue.prototype.__call_hook = function(hook, args) {
  36350. var vm = this;
  36351. // #7573 disable dep collection when invoking lifecycle hooks
  36352. pushTarget();
  36353. var handlers = vm.$options[hook];
  36354. var info = hook + " hook";
  36355. var ret;
  36356. if (handlers) {
  36357. for (var i = 0, j = handlers.length; i < j; i++) {
  36358. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  36359. }
  36360. }
  36361. if (vm._hasHookEvent) {
  36362. vm.$emit('hook:' + hook, args);
  36363. }
  36364. popTarget();
  36365. return ret
  36366. };
  36367. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  36368. if (Array.isArray(modifiers)) {
  36369. if (modifiers.indexOf('trim') !== -1) {
  36370. value = value.trim();
  36371. }
  36372. if (modifiers.indexOf('number') !== -1) {
  36373. value = this._n(value);
  36374. }
  36375. }
  36376. if (!target) {
  36377. target = this;
  36378. }
  36379. // 解决动态属性添加
  36380. Vue.set(target, key, value);
  36381. };
  36382. Vue.prototype.__set_sync = function(target, key, value) {
  36383. if (!target) {
  36384. target = this;
  36385. }
  36386. // 解决动态属性添加
  36387. Vue.set(target, key, value);
  36388. };
  36389. Vue.prototype.__get_orig = function(item) {
  36390. if (isPlainObject(item)) {
  36391. return item['$orig'] || item
  36392. }
  36393. return item
  36394. };
  36395. Vue.prototype.__get_value = function(dataPath, target) {
  36396. return getTarget(target || this, dataPath)
  36397. };
  36398. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  36399. return renderClass(staticClass, dynamicClass)
  36400. };
  36401. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  36402. if (!dynamicStyle && !staticStyle) {
  36403. return ''
  36404. }
  36405. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  36406. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  36407. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  36408. };
  36409. Vue.prototype.__map = function(val, iteratee) {
  36410. //TODO 暂不考虑 string
  36411. var ret, i, l, keys, key;
  36412. if (Array.isArray(val)) {
  36413. ret = new Array(val.length);
  36414. for (i = 0, l = val.length; i < l; i++) {
  36415. ret[i] = iteratee(val[i], i);
  36416. }
  36417. return ret
  36418. } else if (isObject(val)) {
  36419. keys = Object.keys(val);
  36420. ret = Object.create(null);
  36421. for (i = 0, l = keys.length; i < l; i++) {
  36422. key = keys[i];
  36423. ret[key] = iteratee(val[key], key, i);
  36424. }
  36425. return ret
  36426. } else if (typeof val === 'number') {
  36427. ret = new Array(val);
  36428. for (i = 0, l = val; i < l; i++) {
  36429. // 第一个参数暂时仍和小程序一致
  36430. ret[i] = iteratee(i, i);
  36431. }
  36432. return ret
  36433. }
  36434. return []
  36435. };
  36436. }
  36437. /* */
  36438. var LIFECYCLE_HOOKS$1 = [
  36439. //App
  36440. 'onLaunch',
  36441. 'onShow',
  36442. 'onHide',
  36443. 'onUniNViewMessage',
  36444. 'onPageNotFound',
  36445. 'onThemeChange',
  36446. 'onError',
  36447. 'onUnhandledRejection',
  36448. //Page
  36449. 'onInit',
  36450. 'onLoad',
  36451. // 'onShow',
  36452. 'onReady',
  36453. // 'onHide',
  36454. 'onUnload',
  36455. 'onPullDownRefresh',
  36456. 'onReachBottom',
  36457. 'onTabItemTap',
  36458. 'onAddToFavorites',
  36459. 'onShareTimeline',
  36460. 'onShareAppMessage',
  36461. 'onResize',
  36462. 'onPageScroll',
  36463. 'onNavigationBarButtonTap',
  36464. 'onBackPress',
  36465. 'onNavigationBarSearchInputChanged',
  36466. 'onNavigationBarSearchInputConfirmed',
  36467. 'onNavigationBarSearchInputClicked',
  36468. //Component
  36469. // 'onReady', // 兼容旧版本,应该移除该事件
  36470. 'onPageShow',
  36471. 'onPageHide',
  36472. 'onPageResize',
  36473. 'onUploadDouyinVideo'
  36474. ];
  36475. function lifecycleMixin$1(Vue) {
  36476. //fixed vue-class-component
  36477. var oldExtend = Vue.extend;
  36478. Vue.extend = function(extendOptions) {
  36479. extendOptions = extendOptions || {};
  36480. var methods = extendOptions.methods;
  36481. if (methods) {
  36482. Object.keys(methods).forEach(function (methodName) {
  36483. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  36484. extendOptions[methodName] = methods[methodName];
  36485. delete methods[methodName];
  36486. }
  36487. });
  36488. }
  36489. return oldExtend.call(this, extendOptions)
  36490. };
  36491. var strategies = Vue.config.optionMergeStrategies;
  36492. var mergeHook = strategies.created;
  36493. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  36494. strategies[hook] = mergeHook;
  36495. });
  36496. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  36497. }
  36498. /* */
  36499. // install platform patch function
  36500. Vue.prototype.__patch__ = patch;
  36501. // public mount method
  36502. Vue.prototype.$mount = function(
  36503. el ,
  36504. hydrating
  36505. ) {
  36506. return mountComponent$1(this, el, hydrating)
  36507. };
  36508. lifecycleMixin$1(Vue);
  36509. internalMixin(Vue);
  36510. /* */
  36511. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  36512. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  36513. /***/ }),
  36514. /***/ 250:
  36515. /*!******************************************************!*\
  36516. !*** E:/yunfei/product1/bigDataApp/util/anitthro.js ***!
  36517. \******************************************************/
  36518. /*! no static exports found */
  36519. /***/ (function(module, exports) {
  36520. var timer1 = null; //防抖,
  36521. var timer2 = null; //节流
  36522. function Debounce(fn, t) {
  36523. //防抖
  36524. var delay = t || 500;
  36525. return function () {
  36526. var _this = this;
  36527. var args = arguments;
  36528. // let timer1 = null
  36529. // console.log(timer1);
  36530. if (timer1) {
  36531. clearTimeout(timer1);
  36532. }
  36533. timer1 = setTimeout(function () {
  36534. fn.apply(_this, args);
  36535. timer1 = null;
  36536. }, delay);
  36537. };
  36538. }
  36539. // 使用
  36540. /*import {Debounce} from '@/common/debounceThrottle.js'
  36541. Debounce(() => {
  36542. //要执行的函数
  36543. }, 200)() */
  36544. function Throttle(fn, t) {
  36545. //节流
  36546. var last;
  36547. var interval = t || 500;
  36548. return function () {
  36549. var _this2 = this;
  36550. var args = arguments;
  36551. var now = +new Date();
  36552. if (last && now - last < interval) {
  36553. clearTimeout(timer2);
  36554. timer2 = setTimeout(function () {
  36555. last = now;
  36556. fn.apply(_this2, args);
  36557. }, interval);
  36558. } else {
  36559. last = now;
  36560. fn.apply(this, args);
  36561. }
  36562. };
  36563. }
  36564. module.exports = {
  36565. Debounce: Debounce,
  36566. Throttle: Throttle
  36567. };
  36568. /***/ }),
  36569. /***/ 26:
  36570. /*!************************************************!*\
  36571. !*** E:/yunfei/product1/bigDataApp/pages.json ***!
  36572. \************************************************/
  36573. /*! no static exports found */
  36574. /***/ (function(module, exports) {
  36575. /***/ }),
  36576. /***/ 275:
  36577. /*!********************************************************************!*\
  36578. !*** E:/yunfei/product1/bigDataApp/static/js/equipState_dict.json ***!
  36579. \********************************************************************/
  36580. /*! exports provided: imei, iccid, csq, lat, lng, dtype, ws, dver, vbat, st, et, tps, lps, rps, dps, collt, current, hrt, hst, at, ah, stamp, dat_f, rcnt, htim, batStatus, tt, shake, shake_sec, ts, upds, dnds, lamp, fuse_voltage, ds, bt, tcs, clt_t, gps, cv, bv, ct, info, proj, btype, cs, bs, infr_ct, volt_ct, wind_drec, wind_sped, cold_sw, wind_sw, pre_temp, set_temp, usb_sta, work_sta, imgres, staytime, cul_time, coll_time, addtime, hs, is_online, gs, tph, tpl, boot, lux, clt, dattim, datt, tbs, type, simStatus, default */
  36581. /***/ (function(module) {
  36582. module.exports = JSON.parse("{\"imei\":{\"name\":\"设备ID\",\"unit\":\"\",\"desc\":\"通讯板唯一ID\"},\"iccid\":{\"name\":\"物联网卡\",\"unit\":\"\",\"desc\":\"用于查询物联网卡的套餐、流量信息等\"},\"csq\":{\"name\":\"信号强度\",\"unit\":\"\",\"desc\":\"\"},\"lat\":{\"name\":\"纬度\",\"unit\":\"\",\"desc\":\"\"},\"lng\":{\"name\":\"经度\",\"unit\":\"\",\"desc\":\"\"},\"dtype\":{\"name\":\"设备类型\",\"unit\":\"\",\"desc\":\"\"},\"ws\":{\"name\":\"工作状态\",\"unit\":\"\",\"value\":{\"0\":\"待机\",\"1\":\"工作\",\"2\":\"充电\"},\"desc\":\"工作状态、0 待机, 1 工作\"},\"dver\":{\"name\":\"设备版本\",\"unit\":\"\",\"desc\":\"设备固件版本\"},\"vbat\":{\"name\":\"电压\",\"unit\":\"V\",\"desc\":\"\"},\"st\":{\"name\":\"开始时间\",\"unit\":\"h\",\"desc\":\"时控开始时间:0-23\"},\"et\":{\"name\":\"结束时间\",\"unit\":\"h\",\"desc\":\"时控结束时间:0-23\"},\"tps\":{\"name\":\"温控状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"温控\"},\"desc\":\"0-正常,1-保护\"},\"lps\":{\"name\":\"光控状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"光控\"},\"desc\":\"0-正常,1-保护\"},\"rps\":{\"name\":\"雨控状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"雨控\"},\"desc\":\"0-正常,1-保护\"},\"dps\":{\"name\":\"倾倒状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"保护\"},\"desc\":\"0-正常,1-保护\"},\"collt\":{\"name\":\"收集时间\",\"unit\":\"\",\"desc\":\"收集时间:1-30\"},\"current\":{\"name\":\"功率\",\"unit\":\"mA\",\"desc\":\"功率:单位mA\"},\"hrt\":{\"name\":\"加热仓温度\",\"unit\":\"°C\",\"desc\":\"加热仓实时温度\"},\"hst\":{\"name\":\"加热仓设定温度\",\"unit\":\"°C\",\"desc\":\"加热仓设定温度:70-130\"},\"at\":{\"name\":\"环境温度\",\"unit\":\"°C\",\"desc\":\"\"},\"ah\":{\"name\":\"环境湿度\",\"unit\":\"%RH\",\"desc\":\"\"},\"stamp\":{\"name\":\"时间\",\"unit\":\"\",\"desc\":\"\"},\"dat_f\":{\"name\":\"数据上传间隔\",\"unit\":\"\",\"desc\":\"数据上传时间间隔\"},\"rcnt\":{\"name\":\"开机次数\",\"unit\":\"\",\"desc\":\"每次重启加1\"},\"htim\":{\"name\":\"加热时间\",\"unit\":\"min\",\"desc\":\"加热时间:1-30分钟\"},\"batStatus\":{\"name\":\"电压状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"电量过低\"},\"desc\":\"0-正常 1-欠压\"},\"tt\":{\"name\":\"定时时长\",\"unit\":\"h\",\"desc\":\"定时时间1~10\"},\"shake\":{\"name\":\"震动开关\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"0-关,1-开\"},\"shake_sec\":{\"name\":\"震动时间\",\"unit\":\"ms\",\"desc\":\"1~20(步长:100ms)\"},\"ts\":{\"name\":\"定时模式\",\"unit\":\"\",\"value\":{\"0\":\"光控\",\"1\":\"时控\"},\"desc\":\"0-光控,1-时控\"},\"upds\":{\"name\":\"上仓门状态\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"1 打开,0 关闭\"},\"dnds\":{\"name\":\"下仓门状态\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"1 打开,0 关闭\"},\"lamp\":{\"name\":\"灯管状态\",\"unit\":\"\",\"value\":{\"0\":\"工作\",\"1\":\"异常\"},\"desc\":\"灯管/工作状态 0 工作 1未工\"},\"fuse_voltage\":{\"name\":\"保险丝电压\",\"unit\":\"V\",\"desc\":\"\"},\"ds\":{\"name\":\"设备开关\",\"unit\":\"\",\"value\":{\"0\":\"关机\",\"1\":\"开机\"},\"desc\":\"0 关机 1 开机\"},\"bt\":{\"name\":\"主板温度\",\"unit\":\"°C\",\"desc\":\"\"},\"tcs\":{\"name\":\"时控开关\",\"unit\":\"\",\"value\":{\"0\":\"关机\",\"1\":\"开机\"},\"desc\":\"0 关闭 1 开启\"},\"clt_t\":{\"name\":\"清虫间隔\",\"unit\":\"min\",\"desc\":\"清虫时间间隔\"},\"gps\":{\"name\":\"定位方式\",\"unit\":\"\",\"value\":{\"0\":\"手动定位\",\"1\":\"GPS 定位\",\"2\":\"LBS 定位\"},\"desc\":\"0 手动定位 1 GPS 定位 2 LBS 定位\"},\"cv\":{\"name\":\"充电电压\",\"unit\":\"V\",\"desc\":\"充电电压\"},\"bv\":{\"name\":\"电池电压\",\"unit\":\"V\",\"desc\":\"电池电压\"},\"ct\":{\"name\":\"电击次数\",\"unit\":\"\",\"desc\":\"电击次数 (最大255)\"},\"info\":{\"name\":\"重启信息\",\"unit\":\"\",\"desc\":\"1正常 2 socket重连 3 MQTT重连\"},\"proj\":{\"name\":\"设备型号\",\"unit\":\"\",\"desc\":\"性诱一型或者二型\"},\"btype\":{\"name\":\"电池类型\",\"unit\":\"\",\"value\":{\"0\":\"蓄电池\",\"1\":\"锂电池\"},\"desc\":\"0 蓄电池,1锂电池\"},\"cs\":{\"name\":\"充电状态\",\"unit\":\"\",\"value\":{\"0\":\"非充电\",\"1\":\"充电\"},\"desc\":\"0非充电,1充电\"},\"bs\":{\"name\":\"电池状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"欠压\",\"2\":\"过压\"},\"desc\":\"0 正常,1欠压, 2过压\"},\"infr_ct\":{\"name\":\"红外计数值\",\"unit\":\"\",\"desc\":\"性诱红外计数值\"},\"volt_ct\":{\"name\":\"高压计数值\",\"unit\":\"\",\"desc\":\"性诱高压计数值\"},\"wind_drec\":{\"name\":\"风向\",\"unit\":\"\",\"desc\":\"性诱风向\"},\"wind_sped\":{\"name\":\"风速\",\"unit\":\"\",\"desc\":\"性诱风向\"},\"cold_sw\":{\"name\":\"制冷开关\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"制冷机开关 0 关闭, 1 开启\"},\"wind_sw\":{\"name\":\"风机开关\",\"unit\":\"\",\"value\":{\"0\":\"关闭\",\"1\":\"开启\"},\"desc\":\"风机开关 0 关闭, 1 开启\"},\"pre_temp\":{\"name\":\"保温仓温度\",\"unit\":\"℃\",\"desc\":\"保温仓当前温度-℃\"},\"set_temp\":{\"name\":\"保温仓设定温度\",\"unit\":\"℃\",\"desc\":\"保温仓设定温度-℃\"},\"usb_sta\":{\"name\":\"摄像头状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"异常\"},\"desc\":\"摄像头状态 0 正常, 1 异常\"},\"work_sta\":{\"name\":\"摄像头状态\",\"unit\":\"\",\"value\":{\"0\":\"待机\",\"1\":\"收集\",\"2\":\"培养\",\"3\":\"拍照\"},\"desc\":\"摄像头状态 0 待机, 1 收集, 2 培养, 3 拍照\"},\"imgres\":{\"name\":\"图片分辨率\",\"unit\":\"\",\"desc\":\"图片分辨率默认为7(最高)\"},\"staytime\":{\"name\":\"已培养时间\",\"unit\":\"h\",\"desc\":\"已培养时间-小时\"},\"cul_time\":{\"name\":\"孢子培养时间\",\"unit\":\"h\",\"desc\":\"孢子培养时间-小时\"},\"coll_time\":{\"name\":\"收集时间\",\"unit\":\"h\",\"desc\":\"收集时间[8-10,14-16]\"},\"addtime\":{\"name\":\"上报时间\",\"unit\":\"\",\"desc\":\"数据上报时间\"},\"hs\":{\"name\":\"加热状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"加热\"},\"desc\":\"测报灯状态0 正常, 1 加热\"},\"is_online\":{\"name\":\"在线状态\",\"unit\":\"\",\"value\":{\"0\":\"离线\",\"1\":\"在线\"},\"desc\":\"设备在线离线状态\"},\"gs\":{\"name\":\"通道状态\",\"unit\":\"\",\"value\":{\"0\":\"排水\",\"1\":\"落虫\"},\"desc\":\"通道状态\"},\"tph\":{\"name\":\"高温保护阀值\",\"unit\":\"°C\",\"desc\":\"高温保护阀值\"},\"tpl\":{\"name\":\"低温保护阀值\",\"unit\":\"°C\",\"desc\":\"低温保护阀值\"},\"boot\":{\"name\":\"禁止工作\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"使能(禁止工作)\"},\"desc\":\"禁止工作\"},\"lux\":{\"name\":\"光照强度\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"使能(禁止工作)\"},\"desc\":\"光照强度\"},\"clt\":{\"name\":\"清虫间隔\",\"unit\":\"min\",\"desc\":\"清虫时间间隔\"},\"dattim\":{\"name\":\"数据上传间隔\",\"unit\":\"\",\"desc\":\"数据上传时间间隔\"},\"datt\":{\"name\":\"数据上传间隔\",\"unit\":\"\",\"desc\":\"数据上传时间间隔\"},\"tbs\":{\"name\":\"灯管状态\",\"unit\":\"\",\"value\":{\"0\":\"正常\",\"1\":\"异常\"},\"desc\":\"数据上传时间间隔\"},\"type\":{\"name\":\"设备类型\",\"unit\":\"\",\"value\":{\"0\":\"--\",\"1\":\"--\",\"2\":\"杀虫灯\",\"3\":\"测报灯\",\"4\":\"性诱器\",\"5\":\"气象站\",\"6\":\"--\",\"7\":\"孢子仪\"},\"desc\":\"设备类型\"},\"simStatus\":{\"name\":\"sim卡状态\",\"unit\":\"\",\"value\":[{\"name\":\"未知\",\"val\":0},{\"name\":\"测试期\",\"val\":1},{\"name\":\"沉默期\",\"val\":2},{\"name\":\"使用中\",\"val\":3},{\"name\":\"停机\",\"val\":4},{\"name\":\"停机保号\",\"val\":5},{\"name\":\"预销号\",\"val\":6},{\"name\":\"销号\",\"val\":7}],\"desc\":\"sim卡状态\"}}");
  36583. /***/ }),
  36584. /***/ 3:
  36585. /*!***********************************!*\
  36586. !*** (webpack)/buildin/global.js ***!
  36587. \***********************************/
  36588. /*! no static exports found */
  36589. /***/ (function(module, exports) {
  36590. var g;
  36591. // This works in non-strict mode
  36592. g = (function() {
  36593. return this;
  36594. })();
  36595. try {
  36596. // This works if eval is allowed (see CSP)
  36597. g = g || new Function("return this")();
  36598. } catch (e) {
  36599. // This works if the window reference is available
  36600. if (typeof window === "object") g = window;
  36601. }
  36602. // g can still be undefined, but nothing to do about it...
  36603. // We return undefined, instead of nothing here, so it's
  36604. // easier to handle this case. if(!global) { ...}
  36605. module.exports = g;
  36606. /***/ }),
  36607. /***/ 32:
  36608. /*!**********************************************************************************************************!*\
  36609. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  36610. \**********************************************************************************************************/
  36611. /*! exports provided: default */
  36612. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36613. "use strict";
  36614. __webpack_require__.r(__webpack_exports__);
  36615. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  36616. /* globals __VUE_SSR_CONTEXT__ */
  36617. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  36618. // This module is a runtime utility for cleaner component module output and will
  36619. // be included in the final webpack user bundle.
  36620. function normalizeComponent (
  36621. scriptExports,
  36622. render,
  36623. staticRenderFns,
  36624. functionalTemplate,
  36625. injectStyles,
  36626. scopeId,
  36627. moduleIdentifier, /* server only */
  36628. shadowMode, /* vue-cli only */
  36629. components, // fixed by xxxxxx auto components
  36630. renderjs // fixed by xxxxxx renderjs
  36631. ) {
  36632. // Vue.extend constructor export interop
  36633. var options = typeof scriptExports === 'function'
  36634. ? scriptExports.options
  36635. : scriptExports
  36636. // fixed by xxxxxx auto components
  36637. if (components) {
  36638. if (!options.components) {
  36639. options.components = {}
  36640. }
  36641. var hasOwn = Object.prototype.hasOwnProperty
  36642. for (var name in components) {
  36643. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  36644. options.components[name] = components[name]
  36645. }
  36646. }
  36647. }
  36648. // fixed by xxxxxx renderjs
  36649. if (renderjs) {
  36650. if(typeof renderjs.beforeCreate === 'function'){
  36651. renderjs.beforeCreate = [renderjs.beforeCreate]
  36652. }
  36653. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  36654. this[renderjs.__module] = this
  36655. });
  36656. (options.mixins || (options.mixins = [])).push(renderjs)
  36657. }
  36658. // render functions
  36659. if (render) {
  36660. options.render = render
  36661. options.staticRenderFns = staticRenderFns
  36662. options._compiled = true
  36663. }
  36664. // functional template
  36665. if (functionalTemplate) {
  36666. options.functional = true
  36667. }
  36668. // scopedId
  36669. if (scopeId) {
  36670. options._scopeId = 'data-v-' + scopeId
  36671. }
  36672. var hook
  36673. if (moduleIdentifier) { // server build
  36674. hook = function (context) {
  36675. // 2.3 injection
  36676. context =
  36677. context || // cached call
  36678. (this.$vnode && this.$vnode.ssrContext) || // stateful
  36679. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  36680. // 2.2 with runInNewContext: true
  36681. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  36682. context = __VUE_SSR_CONTEXT__
  36683. }
  36684. // inject component styles
  36685. if (injectStyles) {
  36686. injectStyles.call(this, context)
  36687. }
  36688. // register component module identifier for async chunk inferrence
  36689. if (context && context._registeredComponents) {
  36690. context._registeredComponents.add(moduleIdentifier)
  36691. }
  36692. }
  36693. // used by ssr in case component is cached and beforeCreate
  36694. // never gets called
  36695. options._ssrRegister = hook
  36696. } else if (injectStyles) {
  36697. hook = shadowMode
  36698. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  36699. : injectStyles
  36700. }
  36701. if (hook) {
  36702. if (options.functional) {
  36703. // for template-only hot-reload because in that case the render fn doesn't
  36704. // go through the normalizer
  36705. options._injectStyles = hook
  36706. // register for functioal component in vue file
  36707. var originalRender = options.render
  36708. options.render = function renderWithStyleInjection (h, context) {
  36709. hook.call(context)
  36710. return originalRender(h, context)
  36711. }
  36712. } else {
  36713. // inject component registration as beforeCreate hook
  36714. var existing = options.beforeCreate
  36715. options.beforeCreate = existing
  36716. ? [].concat(existing, hook)
  36717. : [hook]
  36718. }
  36719. }
  36720. return {
  36721. exports: scriptExports,
  36722. options: options
  36723. }
  36724. }
  36725. /***/ }),
  36726. /***/ 33:
  36727. /*!*******************************************************!*\
  36728. !*** E:/yunfei/product1/bigDataApp/uview-ui/index.js ***!
  36729. \*******************************************************/
  36730. /*! no static exports found */
  36731. /***/ (function(module, exports, __webpack_require__) {
  36732. "use strict";
  36733. /* WEBPACK VAR INJECTION */(function(uni) {
  36734. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  36735. Object.defineProperty(exports, "__esModule", {
  36736. value: true
  36737. });
  36738. exports.default = void 0;
  36739. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 34));
  36740. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 35));
  36741. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 39));
  36742. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 40));
  36743. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 44));
  36744. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 45));
  36745. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 46));
  36746. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 47));
  36747. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 48));
  36748. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 49));
  36749. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 50));
  36750. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 37));
  36751. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 36));
  36752. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 51));
  36753. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 38));
  36754. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 52));
  36755. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 53));
  36756. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 54));
  36757. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 55));
  36758. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 56));
  36759. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 57);
  36760. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 58));
  36761. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 59));
  36762. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 60));
  36763. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 61));
  36764. // 引入全局mixin
  36765. // 引入关于是否mixin集成小程序分享的配置
  36766. // import wxshare from './libs/mixin/mpShare.js'
  36767. // 全局挂载引入http相关请求拦截插件
  36768. function wranning(str) {
  36769. // 开发环境进行信息输出,主要是一些报错信息
  36770. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  36771. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  36772. if (true) {
  36773. console.warn(str);
  36774. }
  36775. }
  36776. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  36777. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  36778. // let vuexStore = {};
  36779. // try {
  36780. // vuexStore = require("@/store/$u.mixin.js");
  36781. // } catch (e) {
  36782. // //TODO handle the exception
  36783. // }
  36784. // post类型对象参数转为get类型url参数
  36785. var $u = {
  36786. queryParams: _queryParams.default,
  36787. route: _route.default,
  36788. timeFormat: _timeFormat.default,
  36789. date: _timeFormat.default,
  36790. // 另名date
  36791. timeFrom: _timeFrom.default,
  36792. colorGradient: _colorGradient.default.colorGradient,
  36793. colorToRgba: _colorGradient.default.colorToRgba,
  36794. guid: _guid.default,
  36795. color: _color.default,
  36796. sys: _sys.sys,
  36797. os: _sys.os,
  36798. type2icon: _type2icon.default,
  36799. randomArray: _randomArray.default,
  36800. wranning: wranning,
  36801. get: _request.default.get,
  36802. post: _request.default.post,
  36803. put: _request.default.put,
  36804. 'delete': _request.default.delete,
  36805. hexToRgb: _colorGradient.default.hexToRgb,
  36806. rgbToHex: _colorGradient.default.rgbToHex,
  36807. test: _test.default,
  36808. random: _random.default,
  36809. deepClone: _deepClone.default,
  36810. deepMerge: _deepMerge.default,
  36811. getParent: _getParent.default,
  36812. $parent: _$parent.default,
  36813. addUnit: _addUnit.default,
  36814. trim: _trim.default,
  36815. type: ['primary', 'success', 'error', 'warning', 'info'],
  36816. http: _request.default,
  36817. toast: _toast.default,
  36818. config: _config.default,
  36819. // uView配置信息相关,比如版本号
  36820. zIndex: _zIndex.default,
  36821. debounce: _debounce.default,
  36822. throttle: _throttle.default
  36823. };
  36824. // $u挂载到uni对象上
  36825. uni.$u = $u;
  36826. var install = function install(Vue) {
  36827. Vue.mixin(_mixin.default);
  36828. if (Vue.prototype.openShare) {
  36829. Vue.mixin(mpShare);
  36830. }
  36831. // Vue.mixin(vuexStore);
  36832. // 时间格式化,同时两个名称,date和timeFormat
  36833. Vue.filter('timeFormat', function (timestamp, format) {
  36834. return (0, _timeFormat.default)(timestamp, format);
  36835. });
  36836. Vue.filter('date', function (timestamp, format) {
  36837. return (0, _timeFormat.default)(timestamp, format);
  36838. });
  36839. // 将多久以前的方法,注入到全局过滤器
  36840. Vue.filter('timeFrom', function (timestamp, format) {
  36841. return (0, _timeFrom.default)(timestamp, format);
  36842. });
  36843. Vue.prototype.$u = $u;
  36844. };
  36845. var _default = {
  36846. install: install
  36847. };
  36848. exports.default = _default;
  36849. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  36850. /***/ }),
  36851. /***/ 34:
  36852. /*!******************************************************************!*\
  36853. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/mixin/mixin.js ***!
  36854. \******************************************************************/
  36855. /*! no static exports found */
  36856. /***/ (function(module, exports, __webpack_require__) {
  36857. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  36858. data: function data() {
  36859. return {};
  36860. },
  36861. onLoad: function onLoad() {
  36862. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  36863. this.$u.getRect = this.$uGetRect;
  36864. },
  36865. methods: {
  36866. // 查询节点信息
  36867. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  36868. // 解决办法为在组件根部再套一个没有任何作用的view元素
  36869. $uGetRect: function $uGetRect(selector, all) {
  36870. var _this = this;
  36871. return new Promise(function (resolve) {
  36872. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  36873. if (all && Array.isArray(rect) && rect.length) {
  36874. resolve(rect);
  36875. }
  36876. if (!all && rect) {
  36877. resolve(rect);
  36878. }
  36879. }).exec();
  36880. });
  36881. },
  36882. getParentData: function getParentData() {
  36883. var _this2 = this;
  36884. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  36885. // 避免在created中去定义parent变量
  36886. if (!this.parent) this.parent = false;
  36887. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  36888. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  36889. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  36890. this.parent = this.$u.$parent.call(this, parentName);
  36891. if (this.parent) {
  36892. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  36893. Object.keys(this.parentData).map(function (key) {
  36894. _this2.parentData[key] = _this2.parent[key];
  36895. });
  36896. }
  36897. },
  36898. // 阻止事件冒泡
  36899. preventEvent: function preventEvent(e) {
  36900. e && e.stopPropagation && e.stopPropagation();
  36901. }
  36902. },
  36903. onReachBottom: function onReachBottom() {
  36904. uni.$emit('uOnReachBottom');
  36905. }
  36906. };
  36907. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  36908. /***/ }),
  36909. /***/ 35:
  36910. /*!********************************************************************!*\
  36911. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/request/index.js ***!
  36912. \********************************************************************/
  36913. /*! no static exports found */
  36914. /***/ (function(module, exports, __webpack_require__) {
  36915. "use strict";
  36916. /* WEBPACK VAR INJECTION */(function(uni) {
  36917. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  36918. Object.defineProperty(exports, "__esModule", {
  36919. value: true
  36920. });
  36921. exports.default = void 0;
  36922. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  36923. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  36924. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 36));
  36925. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 38));
  36926. var Request = /*#__PURE__*/function () {
  36927. function Request() {
  36928. var _this = this;
  36929. (0, _classCallCheck2.default)(this, Request);
  36930. this.config = {
  36931. baseUrl: '',
  36932. // 请求的根域名
  36933. // 默认的请求头
  36934. header: {},
  36935. method: 'POST',
  36936. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  36937. dataType: 'json',
  36938. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  36939. responseType: 'text',
  36940. showLoading: true,
  36941. // 是否显示请求中的loading
  36942. loadingText: '请求中...',
  36943. loadingTime: 800,
  36944. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  36945. timer: null,
  36946. // 定时器
  36947. originalData: false,
  36948. // 是否在拦截器中返回服务端的原始数据,见文档说明
  36949. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  36950. };
  36951. // 拦截器
  36952. this.interceptor = {
  36953. // 请求前的拦截
  36954. request: null,
  36955. // 请求后的拦截
  36956. response: null
  36957. };
  36958. // get请求
  36959. this.get = function (url) {
  36960. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36961. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36962. return _this.request({
  36963. method: 'GET',
  36964. url: url,
  36965. header: header,
  36966. data: data
  36967. });
  36968. };
  36969. // post请求
  36970. this.post = function (url) {
  36971. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36972. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36973. return _this.request({
  36974. url: url,
  36975. method: 'POST',
  36976. header: header,
  36977. data: data
  36978. });
  36979. };
  36980. // put请求,不支持支付宝小程序(HX2.6.15)
  36981. this.put = function (url) {
  36982. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36983. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36984. return _this.request({
  36985. url: url,
  36986. method: 'PUT',
  36987. header: header,
  36988. data: data
  36989. });
  36990. };
  36991. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  36992. this.delete = function (url) {
  36993. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  36994. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  36995. return _this.request({
  36996. url: url,
  36997. method: 'DELETE',
  36998. header: header,
  36999. data: data
  37000. });
  37001. };
  37002. }
  37003. (0, _createClass2.default)(Request, [{
  37004. key: "setConfig",
  37005. value:
  37006. // 设置全局默认配置
  37007. function setConfig(customConfig) {
  37008. // 深度合并对象,否则会造成对象深层属性丢失
  37009. this.config = (0, _deepMerge.default)(this.config, customConfig);
  37010. }
  37011. // 主要请求部分
  37012. }, {
  37013. key: "request",
  37014. value: function request() {
  37015. var _this2 = this;
  37016. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  37017. // 检查请求拦截
  37018. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  37019. var tmpConfig = {};
  37020. var interceptorRequest = this.interceptor.request(options);
  37021. if (interceptorRequest === false) {
  37022. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  37023. return new Promise(function () {});
  37024. }
  37025. this.options = interceptorRequest;
  37026. }
  37027. options.dataType = options.dataType || this.config.dataType;
  37028. options.responseType = options.responseType || this.config.responseType;
  37029. options.url = options.url || '';
  37030. options.params = options.params || {};
  37031. options.header = Object.assign(this.config.header, options.header);
  37032. options.method = options.method || this.config.method;
  37033. return new Promise(function (resolve, reject) {
  37034. options.complete = function (response) {
  37035. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  37036. uni.hideLoading();
  37037. // 清除定时器,如果请求回来了,就无需loading
  37038. clearTimeout(_this2.config.timer);
  37039. _this2.config.timer = null;
  37040. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  37041. if (_this2.config.originalData) {
  37042. // 判断是否存在拦截器
  37043. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  37044. var resInterceptors = _this2.interceptor.response(response);
  37045. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  37046. if (resInterceptors !== false) {
  37047. resolve(resInterceptors);
  37048. } else {
  37049. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  37050. reject(response);
  37051. }
  37052. } else {
  37053. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  37054. resolve(response);
  37055. }
  37056. } else {
  37057. if (response.statusCode == 200) {
  37058. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  37059. var _resInterceptors = _this2.interceptor.response(response.data);
  37060. if (_resInterceptors !== false) {
  37061. resolve(_resInterceptors);
  37062. } else {
  37063. reject(response.data);
  37064. }
  37065. } else {
  37066. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  37067. resolve(response.data);
  37068. }
  37069. } else {
  37070. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  37071. // if(response.errMsg) {
  37072. // uni.showModal({
  37073. // title: response.errMsg
  37074. // });
  37075. // }
  37076. reject(response);
  37077. }
  37078. }
  37079. };
  37080. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  37081. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  37082. // 是否显示loading
  37083. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  37084. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  37085. if (_this2.config.showLoading && !_this2.config.timer) {
  37086. _this2.config.timer = setTimeout(function () {
  37087. uni.showLoading({
  37088. title: _this2.config.loadingText,
  37089. mask: _this2.config.loadingMask
  37090. });
  37091. _this2.config.timer = null;
  37092. }, _this2.config.loadingTime);
  37093. }
  37094. uni.request(options);
  37095. });
  37096. // .catch(res => {
  37097. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  37098. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  37099. // return new Promise(()=>{});
  37100. // })
  37101. }
  37102. }]);
  37103. return Request;
  37104. }();
  37105. var _default = new Request();
  37106. exports.default = _default;
  37107. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  37108. /***/ }),
  37109. /***/ 36:
  37110. /*!*************************************************************************!*\
  37111. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/deepMerge.js ***!
  37112. \*************************************************************************/
  37113. /*! no static exports found */
  37114. /***/ (function(module, exports, __webpack_require__) {
  37115. "use strict";
  37116. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  37117. Object.defineProperty(exports, "__esModule", {
  37118. value: true
  37119. });
  37120. exports.default = void 0;
  37121. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  37122. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 37));
  37123. // JS对象深度合并
  37124. function deepMerge() {
  37125. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  37126. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  37127. target = (0, _deepClone.default)(target);
  37128. if ((0, _typeof2.default)(target) !== 'object' || (0, _typeof2.default)(source) !== 'object') return false;
  37129. for (var prop in source) {
  37130. if (!source.hasOwnProperty(prop)) continue;
  37131. if (prop in target) {
  37132. if ((0, _typeof2.default)(target[prop]) !== 'object') {
  37133. target[prop] = source[prop];
  37134. } else {
  37135. if ((0, _typeof2.default)(source[prop]) !== 'object') {
  37136. target[prop] = source[prop];
  37137. } else {
  37138. if (target[prop].concat && source[prop].concat) {
  37139. target[prop] = target[prop].concat(source[prop]);
  37140. } else {
  37141. target[prop] = deepMerge(target[prop], source[prop]);
  37142. }
  37143. }
  37144. }
  37145. } else {
  37146. target[prop] = source[prop];
  37147. }
  37148. }
  37149. return target;
  37150. }
  37151. var _default = deepMerge;
  37152. exports.default = _default;
  37153. /***/ }),
  37154. /***/ 37:
  37155. /*!*************************************************************************!*\
  37156. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/deepClone.js ***!
  37157. \*************************************************************************/
  37158. /*! no static exports found */
  37159. /***/ (function(module, exports, __webpack_require__) {
  37160. "use strict";
  37161. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  37162. Object.defineProperty(exports, "__esModule", {
  37163. value: true
  37164. });
  37165. exports.default = void 0;
  37166. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  37167. // 判断arr是否为一个数组,返回一个bool值
  37168. function isArray(arr) {
  37169. return Object.prototype.toString.call(arr) === '[object Array]';
  37170. }
  37171. // 深度克隆
  37172. function deepClone(obj) {
  37173. // 对常见的“非”值,直接返回原来值
  37174. if ([null, undefined, NaN, false].includes(obj)) return obj;
  37175. if ((0, _typeof2.default)(obj) !== "object" && typeof obj !== 'function') {
  37176. //原始类型直接返回
  37177. return obj;
  37178. }
  37179. var o = isArray(obj) ? [] : {};
  37180. for (var i in obj) {
  37181. if (obj.hasOwnProperty(i)) {
  37182. o[i] = (0, _typeof2.default)(obj[i]) === "object" ? deepClone(obj[i]) : obj[i];
  37183. }
  37184. }
  37185. return o;
  37186. }
  37187. var _default = deepClone;
  37188. exports.default = _default;
  37189. /***/ }),
  37190. /***/ 38:
  37191. /*!********************************************************************!*\
  37192. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/test.js ***!
  37193. \********************************************************************/
  37194. /*! no static exports found */
  37195. /***/ (function(module, exports, __webpack_require__) {
  37196. "use strict";
  37197. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  37198. Object.defineProperty(exports, "__esModule", {
  37199. value: true
  37200. });
  37201. exports.default = void 0;
  37202. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  37203. /**
  37204. * 验证电子邮箱格式
  37205. */
  37206. function email(value) {
  37207. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  37208. }
  37209. /**
  37210. * 验证手机格式
  37211. */
  37212. function mobile(value) {
  37213. return /^1[23456789]\d{9}$/.test(value);
  37214. }
  37215. /**
  37216. * 验证URL格式
  37217. */
  37218. function url(value) {
  37219. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  37220. }
  37221. /**
  37222. * 验证日期格式
  37223. */
  37224. function date(value) {
  37225. return !/Invalid|NaN/.test(new Date(value).toString());
  37226. }
  37227. /**
  37228. * 验证ISO类型的日期格式
  37229. */
  37230. function dateISO(value) {
  37231. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  37232. }
  37233. /**
  37234. * 验证十进制数字
  37235. */
  37236. function number(value) {
  37237. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  37238. }
  37239. /**
  37240. * 验证整数
  37241. */
  37242. function digits(value) {
  37243. return /^\d+$/.test(value);
  37244. }
  37245. /**
  37246. * 验证身份证号码
  37247. */
  37248. function idCard(value) {
  37249. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  37250. }
  37251. /**
  37252. * 是否车牌号
  37253. */
  37254. function carNo(value) {
  37255. // 新能源车牌
  37256. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  37257. // 旧车牌
  37258. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  37259. if (value.length === 7) {
  37260. return creg.test(value);
  37261. } else if (value.length === 8) {
  37262. return xreg.test(value);
  37263. } else {
  37264. return false;
  37265. }
  37266. }
  37267. /**
  37268. * 金额,只允许2位小数
  37269. */
  37270. function amount(value) {
  37271. //金额,只允许保留两位小数
  37272. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  37273. }
  37274. /**
  37275. * 中文
  37276. */
  37277. function chinese(value) {
  37278. var reg = /^[\u4e00-\u9fa5]+$/gi;
  37279. return reg.test(value);
  37280. }
  37281. /**
  37282. * 只能输入字母
  37283. */
  37284. function letter(value) {
  37285. return /^[a-zA-Z]*$/.test(value);
  37286. }
  37287. /**
  37288. * 只能是字母或者数字
  37289. */
  37290. function enOrNum(value) {
  37291. //英文或者数字
  37292. var reg = /^[0-9a-zA-Z]*$/g;
  37293. return reg.test(value);
  37294. }
  37295. /**
  37296. * 验证是否包含某个值
  37297. */
  37298. function contains(value, param) {
  37299. return value.indexOf(param) >= 0;
  37300. }
  37301. /**
  37302. * 验证一个值范围[min, max]
  37303. */
  37304. function range(value, param) {
  37305. return value >= param[0] && value <= param[1];
  37306. }
  37307. /**
  37308. * 验证一个长度范围[min, max]
  37309. */
  37310. function rangeLength(value, param) {
  37311. return value.length >= param[0] && value.length <= param[1];
  37312. }
  37313. /**
  37314. * 是否固定电话
  37315. */
  37316. function landline(value) {
  37317. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  37318. return reg.test(value);
  37319. }
  37320. /**
  37321. * 判断是否为空
  37322. */
  37323. function empty(value) {
  37324. switch ((0, _typeof2.default)(value)) {
  37325. case 'undefined':
  37326. return true;
  37327. case 'string':
  37328. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  37329. break;
  37330. case 'boolean':
  37331. if (!value) return true;
  37332. break;
  37333. case 'number':
  37334. if (0 === value || isNaN(value)) return true;
  37335. break;
  37336. case 'object':
  37337. if (null === value || value.length === 0) return true;
  37338. for (var i in value) {
  37339. return false;
  37340. }
  37341. return true;
  37342. }
  37343. return false;
  37344. }
  37345. /**
  37346. * 是否json字符串
  37347. */
  37348. function jsonString(value) {
  37349. if (typeof value == 'string') {
  37350. try {
  37351. var obj = JSON.parse(value);
  37352. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  37353. return true;
  37354. } else {
  37355. return false;
  37356. }
  37357. } catch (e) {
  37358. return false;
  37359. }
  37360. }
  37361. return false;
  37362. }
  37363. /**
  37364. * 是否数组
  37365. */
  37366. function array(value) {
  37367. if (typeof Array.isArray === "function") {
  37368. return Array.isArray(value);
  37369. } else {
  37370. return Object.prototype.toString.call(value) === "[object Array]";
  37371. }
  37372. }
  37373. /**
  37374. * 是否对象
  37375. */
  37376. function object(value) {
  37377. return Object.prototype.toString.call(value) === '[object Object]';
  37378. }
  37379. /**
  37380. * 是否短信验证码
  37381. */
  37382. function code(value) {
  37383. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  37384. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  37385. }
  37386. var _default = {
  37387. email: email,
  37388. mobile: mobile,
  37389. url: url,
  37390. date: date,
  37391. dateISO: dateISO,
  37392. number: number,
  37393. digits: digits,
  37394. idCard: idCard,
  37395. carNo: carNo,
  37396. amount: amount,
  37397. chinese: chinese,
  37398. letter: letter,
  37399. enOrNum: enOrNum,
  37400. contains: contains,
  37401. range: range,
  37402. rangeLength: rangeLength,
  37403. empty: empty,
  37404. isEmpty: empty,
  37405. jsonString: jsonString,
  37406. landline: landline,
  37407. object: object,
  37408. array: array,
  37409. code: code
  37410. };
  37411. exports.default = _default;
  37412. /***/ }),
  37413. /***/ 39:
  37414. /*!***************************************************************************!*\
  37415. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/queryParams.js ***!
  37416. \***************************************************************************/
  37417. /*! no static exports found */
  37418. /***/ (function(module, exports, __webpack_require__) {
  37419. "use strict";
  37420. Object.defineProperty(exports, "__esModule", {
  37421. value: true
  37422. });
  37423. exports.default = void 0;
  37424. /**
  37425. * 对象转url参数
  37426. * @param {*} data,对象
  37427. * @param {*} isPrefix,是否自动加上"?"
  37428. */
  37429. function queryParams() {
  37430. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  37431. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  37432. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  37433. var prefix = isPrefix ? '?' : '';
  37434. var _result = [];
  37435. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  37436. var _loop = function _loop(key) {
  37437. var value = data[key];
  37438. // 去掉为空的参数
  37439. if (['', undefined, null].indexOf(value) >= 0) {
  37440. return "continue";
  37441. }
  37442. // 如果值为数组,另行处理
  37443. if (value.constructor === Array) {
  37444. // e.g. {ids: [1, 2, 3]}
  37445. switch (arrayFormat) {
  37446. case 'indices':
  37447. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  37448. for (var i = 0; i < value.length; i++) {
  37449. _result.push(key + '[' + i + ']=' + value[i]);
  37450. }
  37451. break;
  37452. case 'brackets':
  37453. // 结果: ids[]=1&ids[]=2&ids[]=3
  37454. value.forEach(function (_value) {
  37455. _result.push(key + '[]=' + _value);
  37456. });
  37457. break;
  37458. case 'repeat':
  37459. // 结果: ids=1&ids=2&ids=3
  37460. value.forEach(function (_value) {
  37461. _result.push(key + '=' + _value);
  37462. });
  37463. break;
  37464. case 'comma':
  37465. // 结果: ids=1,2,3
  37466. var commaStr = "";
  37467. value.forEach(function (_value) {
  37468. commaStr += (commaStr ? "," : "") + _value;
  37469. });
  37470. _result.push(key + '=' + commaStr);
  37471. break;
  37472. default:
  37473. value.forEach(function (_value) {
  37474. _result.push(key + '[]=' + _value);
  37475. });
  37476. }
  37477. } else {
  37478. _result.push(key + '=' + value);
  37479. }
  37480. };
  37481. for (var key in data) {
  37482. var _ret = _loop(key);
  37483. if (_ret === "continue") continue;
  37484. }
  37485. return _result.length ? prefix + _result.join('&') : '';
  37486. }
  37487. var _default = queryParams;
  37488. exports.default = _default;
  37489. /***/ }),
  37490. /***/ 4:
  37491. /*!**********************************************************************!*\
  37492. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  37493. \**********************************************************************/
  37494. /*! no static exports found */
  37495. /***/ (function(module, exports) {
  37496. function _interopRequireDefault(obj) {
  37497. return obj && obj.__esModule ? obj : {
  37498. "default": obj
  37499. };
  37500. }
  37501. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  37502. /***/ }),
  37503. /***/ 40:
  37504. /*!*********************************************************************!*\
  37505. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/route.js ***!
  37506. \*********************************************************************/
  37507. /*! no static exports found */
  37508. /***/ (function(module, exports, __webpack_require__) {
  37509. "use strict";
  37510. /* WEBPACK VAR INJECTION */(function(uni) {
  37511. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  37512. Object.defineProperty(exports, "__esModule", {
  37513. value: true
  37514. });
  37515. exports.default = void 0;
  37516. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 41));
  37517. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 43));
  37518. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  37519. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  37520. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  37521. /**
  37522. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  37523. * 并且带有路由拦截功能
  37524. */
  37525. var Router = /*#__PURE__*/function () {
  37526. // 原始属性定义
  37527. function Router() {
  37528. (0, _classCallCheck2.default)(this, Router);
  37529. (0, _defineProperty2.default)(this, "config", {
  37530. type: 'navigateTo',
  37531. url: '',
  37532. delta: 1,
  37533. // navigateBack页面后退时,回退的层数
  37534. params: {},
  37535. // 传递的参数
  37536. animationType: 'pop-in',
  37537. // 窗口动画,只在APP有效
  37538. animationDuration: 300,
  37539. // 窗口动画持续时间,单位毫秒,只在APP有效
  37540. intercept: false // 是否需要拦截
  37541. });
  37542. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  37543. // 这里在构造函数中进行this绑定
  37544. this.route = this.route.bind(this);
  37545. }
  37546. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  37547. (0, _createClass2.default)(Router, [{
  37548. key: "addRootPath",
  37549. value: function addRootPath(url) {
  37550. return url[0] === '/' ? url : "/".concat(url);
  37551. }
  37552. // 整合路由参数
  37553. }, {
  37554. key: "mixinParam",
  37555. value: function mixinParam(url, params) {
  37556. url = this.addRootPath(url);
  37557. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  37558. // 如果有url中有get参数,转换后无需带上"?"
  37559. var query = '';
  37560. if (/.*\/.*\?.*=.*/.test(url)) {
  37561. // object对象转为get类型的参数
  37562. query = uni.$u.queryParams(params, false);
  37563. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  37564. return url += "&" + query;
  37565. } else {
  37566. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  37567. query = uni.$u.queryParams(params);
  37568. return url += query;
  37569. }
  37570. }
  37571. // 对外的方法名称
  37572. }, {
  37573. key: "route",
  37574. value: function () {
  37575. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  37576. var options,
  37577. params,
  37578. mergeConfig,
  37579. isNext,
  37580. _args = arguments;
  37581. return _regenerator.default.wrap(function _callee$(_context) {
  37582. while (1) {
  37583. switch (_context.prev = _context.next) {
  37584. case 0:
  37585. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  37586. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  37587. // 合并用户的配置和内部的默认配置
  37588. mergeConfig = {};
  37589. if (typeof options === 'string') {
  37590. // 如果options为字符串,则为route(url, params)的形式
  37591. mergeConfig.url = this.mixinParam(options, params);
  37592. mergeConfig.type = 'navigateTo';
  37593. } else {
  37594. mergeConfig = uni.$u.deepClone(options, this.config);
  37595. // 否则正常使用mergeConfig中的url和params进行拼接
  37596. mergeConfig.url = this.mixinParam(options.url, options.params);
  37597. }
  37598. if (params.intercept) {
  37599. this.config.intercept = params.intercept;
  37600. }
  37601. // params参数也带给拦截器
  37602. mergeConfig.params = params;
  37603. // 合并内外部参数
  37604. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  37605. // 判断用户是否定义了拦截器
  37606. if (!(typeof uni.$u.routeIntercept === 'function')) {
  37607. _context.next = 14;
  37608. break;
  37609. }
  37610. _context.next = 10;
  37611. return new Promise(function (resolve, reject) {
  37612. uni.$u.routeIntercept(mergeConfig, resolve);
  37613. });
  37614. case 10:
  37615. isNext = _context.sent;
  37616. // 如果isNext为true,则执行路由跳转
  37617. isNext && this.openPage(mergeConfig);
  37618. _context.next = 15;
  37619. break;
  37620. case 14:
  37621. this.openPage(mergeConfig);
  37622. case 15:
  37623. case "end":
  37624. return _context.stop();
  37625. }
  37626. }
  37627. }, _callee, this);
  37628. }));
  37629. function route() {
  37630. return _route.apply(this, arguments);
  37631. }
  37632. return route;
  37633. }() // 执行路由跳转
  37634. }, {
  37635. key: "openPage",
  37636. value: function openPage(config) {
  37637. // 解构参数
  37638. var url = config.url,
  37639. type = config.type,
  37640. delta = config.delta,
  37641. animationType = config.animationType,
  37642. animationDuration = config.animationDuration;
  37643. if (config.type == 'navigateTo' || config.type == 'to') {
  37644. uni.navigateTo({
  37645. url: url,
  37646. animationType: animationType,
  37647. animationDuration: animationDuration
  37648. });
  37649. }
  37650. if (config.type == 'redirectTo' || config.type == 'redirect') {
  37651. uni.redirectTo({
  37652. url: url
  37653. });
  37654. }
  37655. if (config.type == 'switchTab' || config.type == 'tab') {
  37656. uni.switchTab({
  37657. url: url
  37658. });
  37659. }
  37660. if (config.type == 'reLaunch' || config.type == 'launch') {
  37661. uni.reLaunch({
  37662. url: url
  37663. });
  37664. }
  37665. if (config.type == 'navigateBack' || config.type == 'back') {
  37666. uni.navigateBack({
  37667. delta: delta
  37668. });
  37669. }
  37670. }
  37671. }]);
  37672. return Router;
  37673. }();
  37674. var _default = new Router().route;
  37675. exports.default = _default;
  37676. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  37677. /***/ }),
  37678. /***/ 41:
  37679. /*!************************************************************************************************!*\
  37680. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  37681. \************************************************************************************************/
  37682. /*! no static exports found */
  37683. /***/ (function(module, exports, __webpack_require__) {
  37684. // TODO(Babel 8): Remove this file.
  37685. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 42)();
  37686. module.exports = runtime;
  37687. /***/ }),
  37688. /***/ 42:
  37689. /*!*******************************************************************!*\
  37690. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  37691. \*******************************************************************/
  37692. /*! no static exports found */
  37693. /***/ (function(module, exports, __webpack_require__) {
  37694. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  37695. function _regeneratorRuntime() {
  37696. "use strict";
  37697. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  37698. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  37699. return exports;
  37700. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  37701. var exports = {},
  37702. Op = Object.prototype,
  37703. hasOwn = Op.hasOwnProperty,
  37704. defineProperty = Object.defineProperty || function (obj, key, desc) {
  37705. obj[key] = desc.value;
  37706. },
  37707. $Symbol = "function" == typeof Symbol ? Symbol : {},
  37708. iteratorSymbol = $Symbol.iterator || "@@iterator",
  37709. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  37710. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  37711. function define(obj, key, value) {
  37712. return Object.defineProperty(obj, key, {
  37713. value: value,
  37714. enumerable: !0,
  37715. configurable: !0,
  37716. writable: !0
  37717. }), obj[key];
  37718. }
  37719. try {
  37720. define({}, "");
  37721. } catch (err) {
  37722. define = function define(obj, key, value) {
  37723. return obj[key] = value;
  37724. };
  37725. }
  37726. function wrap(innerFn, outerFn, self, tryLocsList) {
  37727. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  37728. generator = Object.create(protoGenerator.prototype),
  37729. context = new Context(tryLocsList || []);
  37730. return defineProperty(generator, "_invoke", {
  37731. value: makeInvokeMethod(innerFn, self, context)
  37732. }), generator;
  37733. }
  37734. function tryCatch(fn, obj, arg) {
  37735. try {
  37736. return {
  37737. type: "normal",
  37738. arg: fn.call(obj, arg)
  37739. };
  37740. } catch (err) {
  37741. return {
  37742. type: "throw",
  37743. arg: err
  37744. };
  37745. }
  37746. }
  37747. exports.wrap = wrap;
  37748. var ContinueSentinel = {};
  37749. function Generator() {}
  37750. function GeneratorFunction() {}
  37751. function GeneratorFunctionPrototype() {}
  37752. var IteratorPrototype = {};
  37753. define(IteratorPrototype, iteratorSymbol, function () {
  37754. return this;
  37755. });
  37756. var getProto = Object.getPrototypeOf,
  37757. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  37758. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  37759. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  37760. function defineIteratorMethods(prototype) {
  37761. ["next", "throw", "return"].forEach(function (method) {
  37762. define(prototype, method, function (arg) {
  37763. return this._invoke(method, arg);
  37764. });
  37765. });
  37766. }
  37767. function AsyncIterator(generator, PromiseImpl) {
  37768. function invoke(method, arg, resolve, reject) {
  37769. var record = tryCatch(generator[method], generator, arg);
  37770. if ("throw" !== record.type) {
  37771. var result = record.arg,
  37772. value = result.value;
  37773. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  37774. invoke("next", value, resolve, reject);
  37775. }, function (err) {
  37776. invoke("throw", err, resolve, reject);
  37777. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  37778. result.value = unwrapped, resolve(result);
  37779. }, function (error) {
  37780. return invoke("throw", error, resolve, reject);
  37781. });
  37782. }
  37783. reject(record.arg);
  37784. }
  37785. var previousPromise;
  37786. defineProperty(this, "_invoke", {
  37787. value: function value(method, arg) {
  37788. function callInvokeWithMethodAndArg() {
  37789. return new PromiseImpl(function (resolve, reject) {
  37790. invoke(method, arg, resolve, reject);
  37791. });
  37792. }
  37793. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  37794. }
  37795. });
  37796. }
  37797. function makeInvokeMethod(innerFn, self, context) {
  37798. var state = "suspendedStart";
  37799. return function (method, arg) {
  37800. if ("executing" === state) throw new Error("Generator is already running");
  37801. if ("completed" === state) {
  37802. if ("throw" === method) throw arg;
  37803. return doneResult();
  37804. }
  37805. for (context.method = method, context.arg = arg;;) {
  37806. var delegate = context.delegate;
  37807. if (delegate) {
  37808. var delegateResult = maybeInvokeDelegate(delegate, context);
  37809. if (delegateResult) {
  37810. if (delegateResult === ContinueSentinel) continue;
  37811. return delegateResult;
  37812. }
  37813. }
  37814. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  37815. if ("suspendedStart" === state) throw state = "completed", context.arg;
  37816. context.dispatchException(context.arg);
  37817. } else "return" === context.method && context.abrupt("return", context.arg);
  37818. state = "executing";
  37819. var record = tryCatch(innerFn, self, context);
  37820. if ("normal" === record.type) {
  37821. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  37822. return {
  37823. value: record.arg,
  37824. done: context.done
  37825. };
  37826. }
  37827. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  37828. }
  37829. };
  37830. }
  37831. function maybeInvokeDelegate(delegate, context) {
  37832. var methodName = context.method,
  37833. method = delegate.iterator[methodName];
  37834. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  37835. var record = tryCatch(method, delegate.iterator, context.arg);
  37836. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  37837. var info = record.arg;
  37838. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  37839. }
  37840. function pushTryEntry(locs) {
  37841. var entry = {
  37842. tryLoc: locs[0]
  37843. };
  37844. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  37845. }
  37846. function resetTryEntry(entry) {
  37847. var record = entry.completion || {};
  37848. record.type = "normal", delete record.arg, entry.completion = record;
  37849. }
  37850. function Context(tryLocsList) {
  37851. this.tryEntries = [{
  37852. tryLoc: "root"
  37853. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  37854. }
  37855. function values(iterable) {
  37856. if (iterable) {
  37857. var iteratorMethod = iterable[iteratorSymbol];
  37858. if (iteratorMethod) return iteratorMethod.call(iterable);
  37859. if ("function" == typeof iterable.next) return iterable;
  37860. if (!isNaN(iterable.length)) {
  37861. var i = -1,
  37862. next = function next() {
  37863. for (; ++i < iterable.length;) {
  37864. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  37865. }
  37866. return next.value = undefined, next.done = !0, next;
  37867. };
  37868. return next.next = next;
  37869. }
  37870. }
  37871. return {
  37872. next: doneResult
  37873. };
  37874. }
  37875. function doneResult() {
  37876. return {
  37877. value: undefined,
  37878. done: !0
  37879. };
  37880. }
  37881. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  37882. value: GeneratorFunctionPrototype,
  37883. configurable: !0
  37884. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  37885. value: GeneratorFunction,
  37886. configurable: !0
  37887. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  37888. var ctor = "function" == typeof genFun && genFun.constructor;
  37889. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  37890. }, exports.mark = function (genFun) {
  37891. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  37892. }, exports.awrap = function (arg) {
  37893. return {
  37894. __await: arg
  37895. };
  37896. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  37897. return this;
  37898. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  37899. void 0 === PromiseImpl && (PromiseImpl = Promise);
  37900. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  37901. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  37902. return result.done ? result.value : iter.next();
  37903. });
  37904. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  37905. return this;
  37906. }), define(Gp, "toString", function () {
  37907. return "[object Generator]";
  37908. }), exports.keys = function (val) {
  37909. var object = Object(val),
  37910. keys = [];
  37911. for (var key in object) {
  37912. keys.push(key);
  37913. }
  37914. return keys.reverse(), function next() {
  37915. for (; keys.length;) {
  37916. var key = keys.pop();
  37917. if (key in object) return next.value = key, next.done = !1, next;
  37918. }
  37919. return next.done = !0, next;
  37920. };
  37921. }, exports.values = values, Context.prototype = {
  37922. constructor: Context,
  37923. reset: function reset(skipTempReset) {
  37924. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  37925. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  37926. }
  37927. },
  37928. stop: function stop() {
  37929. this.done = !0;
  37930. var rootRecord = this.tryEntries[0].completion;
  37931. if ("throw" === rootRecord.type) throw rootRecord.arg;
  37932. return this.rval;
  37933. },
  37934. dispatchException: function dispatchException(exception) {
  37935. if (this.done) throw exception;
  37936. var context = this;
  37937. function handle(loc, caught) {
  37938. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  37939. }
  37940. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  37941. var entry = this.tryEntries[i],
  37942. record = entry.completion;
  37943. if ("root" === entry.tryLoc) return handle("end");
  37944. if (entry.tryLoc <= this.prev) {
  37945. var hasCatch = hasOwn.call(entry, "catchLoc"),
  37946. hasFinally = hasOwn.call(entry, "finallyLoc");
  37947. if (hasCatch && hasFinally) {
  37948. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  37949. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  37950. } else if (hasCatch) {
  37951. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  37952. } else {
  37953. if (!hasFinally) throw new Error("try statement without catch or finally");
  37954. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  37955. }
  37956. }
  37957. }
  37958. },
  37959. abrupt: function abrupt(type, arg) {
  37960. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  37961. var entry = this.tryEntries[i];
  37962. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  37963. var finallyEntry = entry;
  37964. break;
  37965. }
  37966. }
  37967. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  37968. var record = finallyEntry ? finallyEntry.completion : {};
  37969. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  37970. },
  37971. complete: function complete(record, afterLoc) {
  37972. if ("throw" === record.type) throw record.arg;
  37973. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  37974. },
  37975. finish: function finish(finallyLoc) {
  37976. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  37977. var entry = this.tryEntries[i];
  37978. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  37979. }
  37980. },
  37981. "catch": function _catch(tryLoc) {
  37982. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  37983. var entry = this.tryEntries[i];
  37984. if (entry.tryLoc === tryLoc) {
  37985. var record = entry.completion;
  37986. if ("throw" === record.type) {
  37987. var thrown = record.arg;
  37988. resetTryEntry(entry);
  37989. }
  37990. return thrown;
  37991. }
  37992. }
  37993. throw new Error("illegal catch attempt");
  37994. },
  37995. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  37996. return this.delegate = {
  37997. iterator: values(iterable),
  37998. resultName: resultName,
  37999. nextLoc: nextLoc
  38000. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  38001. }
  38002. }, exports;
  38003. }
  38004. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  38005. /***/ }),
  38006. /***/ 43:
  38007. /*!*****************************************************************!*\
  38008. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  38009. \*****************************************************************/
  38010. /*! no static exports found */
  38011. /***/ (function(module, exports) {
  38012. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  38013. try {
  38014. var info = gen[key](arg);
  38015. var value = info.value;
  38016. } catch (error) {
  38017. reject(error);
  38018. return;
  38019. }
  38020. if (info.done) {
  38021. resolve(value);
  38022. } else {
  38023. Promise.resolve(value).then(_next, _throw);
  38024. }
  38025. }
  38026. function _asyncToGenerator(fn) {
  38027. return function () {
  38028. var self = this,
  38029. args = arguments;
  38030. return new Promise(function (resolve, reject) {
  38031. var gen = fn.apply(self, args);
  38032. function _next(value) {
  38033. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  38034. }
  38035. function _throw(err) {
  38036. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  38037. }
  38038. _next(undefined);
  38039. });
  38040. };
  38041. }
  38042. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  38043. /***/ }),
  38044. /***/ 44:
  38045. /*!**************************************************************************!*\
  38046. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/timeFormat.js ***!
  38047. \**************************************************************************/
  38048. /*! no static exports found */
  38049. /***/ (function(module, exports, __webpack_require__) {
  38050. "use strict";
  38051. Object.defineProperty(exports, "__esModule", {
  38052. value: true
  38053. });
  38054. exports.default = void 0;
  38055. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  38056. // 所以这里做一个兼容polyfill的兼容处理
  38057. if (!String.prototype.padStart) {
  38058. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  38059. String.prototype.padStart = function (maxLength) {
  38060. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  38061. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  38062. var str = this;
  38063. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  38064. if (str.length >= maxLength) return String(str);
  38065. var fillLength = maxLength - str.length,
  38066. times = Math.ceil(fillLength / fillString.length);
  38067. while (times >>= 1) {
  38068. fillString += fillString;
  38069. if (times === 1) {
  38070. fillString += fillString;
  38071. }
  38072. }
  38073. return fillString.slice(0, fillLength) + str;
  38074. };
  38075. }
  38076. // 其他更多是格式化有如下:
  38077. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  38078. function timeFormat() {
  38079. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  38080. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  38081. // 如果为null,则格式化当前时间
  38082. if (!dateTime) dateTime = Number(new Date());
  38083. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  38084. if (dateTime.toString().length == 10) dateTime *= 1000;
  38085. var date = new Date(Number(dateTime));
  38086. var ret;
  38087. var opt = {
  38088. "y+": date.getFullYear().toString(),
  38089. // 年
  38090. "m+": (date.getMonth() + 1).toString(),
  38091. // 月
  38092. "d+": date.getDate().toString(),
  38093. // 日
  38094. "h+": date.getHours().toString(),
  38095. // 时
  38096. "M+": date.getMinutes().toString(),
  38097. // 分
  38098. "s+": date.getSeconds().toString() // 秒
  38099. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  38100. };
  38101. for (var k in opt) {
  38102. ret = new RegExp("(" + k + ")").exec(fmt);
  38103. if (ret) {
  38104. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  38105. }
  38106. ;
  38107. }
  38108. ;
  38109. return fmt;
  38110. }
  38111. var _default = timeFormat;
  38112. exports.default = _default;
  38113. /***/ }),
  38114. /***/ 45:
  38115. /*!************************************************************************!*\
  38116. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/timeFrom.js ***!
  38117. \************************************************************************/
  38118. /*! no static exports found */
  38119. /***/ (function(module, exports, __webpack_require__) {
  38120. "use strict";
  38121. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  38122. Object.defineProperty(exports, "__esModule", {
  38123. value: true
  38124. });
  38125. exports.default = void 0;
  38126. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 44));
  38127. /**
  38128. * 时间戳转为多久之前
  38129. * @param String timestamp 时间戳
  38130. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  38131. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  38132. */
  38133. function timeFrom() {
  38134. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  38135. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  38136. // 如果为null,则格式化当前时间
  38137. if (!dateTime) dateTime = Number(new Date());
  38138. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  38139. if (dateTime.toString().length == 10) dateTime *= 1000;
  38140. var timestamp = +new Date(Number(dateTime));
  38141. var timer = (Number(new Date()) - timestamp) / 1000;
  38142. // 如果小于5分钟,则返回"刚刚",其他以此类推
  38143. var tips = '';
  38144. switch (true) {
  38145. case timer < 300:
  38146. tips = '刚刚';
  38147. break;
  38148. case timer >= 300 && timer < 3600:
  38149. tips = parseInt(timer / 60) + '分钟前';
  38150. break;
  38151. case timer >= 3600 && timer < 86400:
  38152. tips = parseInt(timer / 3600) + '小时前';
  38153. break;
  38154. case timer >= 86400 && timer < 2592000:
  38155. tips = parseInt(timer / 86400) + '天前';
  38156. break;
  38157. default:
  38158. // 如果format为false,则无论什么时间戳,都显示xx之前
  38159. if (format === false) {
  38160. if (timer >= 2592000 && timer < 365 * 86400) {
  38161. tips = parseInt(timer / (86400 * 30)) + '个月前';
  38162. } else {
  38163. tips = parseInt(timer / (86400 * 365)) + '年前';
  38164. }
  38165. } else {
  38166. tips = (0, _timeFormat.default)(timestamp, format);
  38167. }
  38168. }
  38169. return tips;
  38170. }
  38171. var _default = timeFrom;
  38172. exports.default = _default;
  38173. /***/ }),
  38174. /***/ 46:
  38175. /*!*****************************************************************************!*\
  38176. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/colorGradient.js ***!
  38177. \*****************************************************************************/
  38178. /*! no static exports found */
  38179. /***/ (function(module, exports, __webpack_require__) {
  38180. "use strict";
  38181. Object.defineProperty(exports, "__esModule", {
  38182. value: true
  38183. });
  38184. exports.default = void 0;
  38185. /**
  38186. * 求两个颜色之间的渐变值
  38187. * @param {string} startColor 开始的颜色
  38188. * @param {string} endColor 结束的颜色
  38189. * @param {number} step 颜色等分的份额
  38190. * */
  38191. function colorGradient() {
  38192. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  38193. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  38194. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  38195. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  38196. var startR = startRGB[0];
  38197. var startG = startRGB[1];
  38198. var startB = startRGB[2];
  38199. var endRGB = hexToRgb(endColor, false);
  38200. var endR = endRGB[0];
  38201. var endG = endRGB[1];
  38202. var endB = endRGB[2];
  38203. var sR = (endR - startR) / step; //总差值
  38204. var sG = (endG - startG) / step;
  38205. var sB = (endB - startB) / step;
  38206. var colorArr = [];
  38207. for (var i = 0; i < step; i++) {
  38208. //计算每一步的hex值
  38209. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  38210. colorArr.push(hex);
  38211. }
  38212. return colorArr;
  38213. }
  38214. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  38215. function hexToRgb(sColor) {
  38216. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  38217. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  38218. sColor = sColor.toLowerCase();
  38219. if (sColor && reg.test(sColor)) {
  38220. if (sColor.length === 4) {
  38221. var sColorNew = "#";
  38222. for (var i = 1; i < 4; i += 1) {
  38223. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  38224. }
  38225. sColor = sColorNew;
  38226. }
  38227. //处理六位的颜色值
  38228. var sColorChange = [];
  38229. for (var _i = 1; _i < 7; _i += 2) {
  38230. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  38231. }
  38232. if (!str) {
  38233. return sColorChange;
  38234. } else {
  38235. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  38236. }
  38237. } else if (/^(rgb|RGB)/.test(sColor)) {
  38238. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  38239. return arr.map(function (val) {
  38240. return Number(val);
  38241. });
  38242. } else {
  38243. return sColor;
  38244. }
  38245. }
  38246. ;
  38247. // 将rgb表示方式转换为hex表示方式
  38248. function rgbToHex(rgb) {
  38249. var _this = rgb;
  38250. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  38251. if (/^(rgb|RGB)/.test(_this)) {
  38252. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  38253. var strHex = "#";
  38254. for (var i = 0; i < aColor.length; i++) {
  38255. var hex = Number(aColor[i]).toString(16);
  38256. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  38257. if (hex === "0") {
  38258. hex += hex;
  38259. }
  38260. strHex += hex;
  38261. }
  38262. if (strHex.length !== 7) {
  38263. strHex = _this;
  38264. }
  38265. return strHex;
  38266. } else if (reg.test(_this)) {
  38267. var aNum = _this.replace(/#/, "").split("");
  38268. if (aNum.length === 6) {
  38269. return _this;
  38270. } else if (aNum.length === 3) {
  38271. var numHex = "#";
  38272. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  38273. numHex += aNum[_i2] + aNum[_i2];
  38274. }
  38275. return numHex;
  38276. }
  38277. } else {
  38278. return _this;
  38279. }
  38280. }
  38281. /**
  38282. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  38283. * sHex为传入的十六进制的色值
  38284. * alpha为rgba的透明度
  38285. */
  38286. function colorToRgba(color) {
  38287. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  38288. color = rgbToHex(color);
  38289. // 十六进制颜色值的正则表达式
  38290. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  38291. /* 16进制颜色转为RGB格式 */
  38292. var sColor = color.toLowerCase();
  38293. if (sColor && reg.test(sColor)) {
  38294. if (sColor.length === 4) {
  38295. var sColorNew = '#';
  38296. for (var i = 1; i < 4; i += 1) {
  38297. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  38298. }
  38299. sColor = sColorNew;
  38300. }
  38301. // 处理六位的颜色值
  38302. var sColorChange = [];
  38303. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  38304. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  38305. }
  38306. // return sColorChange.join(',')
  38307. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  38308. } else {
  38309. return sColor;
  38310. }
  38311. }
  38312. var _default = {
  38313. colorGradient: colorGradient,
  38314. hexToRgb: hexToRgb,
  38315. rgbToHex: rgbToHex,
  38316. colorToRgba: colorToRgba
  38317. };
  38318. exports.default = _default;
  38319. /***/ }),
  38320. /***/ 47:
  38321. /*!********************************************************************!*\
  38322. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/guid.js ***!
  38323. \********************************************************************/
  38324. /*! no static exports found */
  38325. /***/ (function(module, exports, __webpack_require__) {
  38326. "use strict";
  38327. Object.defineProperty(exports, "__esModule", {
  38328. value: true
  38329. });
  38330. exports.default = void 0;
  38331. /**
  38332. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  38333. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  38334. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  38335. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  38336. * v-for的时候,推荐使用后端返回的id而不是循环的index
  38337. * @param {Number} len uuid的长度
  38338. * @param {Boolean} firstU 将返回的首字母置为"u"
  38339. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  38340. */
  38341. function guid() {
  38342. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  38343. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  38344. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  38345. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  38346. var uuid = [];
  38347. radix = radix || chars.length;
  38348. if (len) {
  38349. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  38350. for (var i = 0; i < len; i++) {
  38351. uuid[i] = chars[0 | Math.random() * radix];
  38352. }
  38353. } else {
  38354. var r;
  38355. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  38356. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  38357. uuid[14] = '4';
  38358. for (var _i = 0; _i < 36; _i++) {
  38359. if (!uuid[_i]) {
  38360. r = 0 | Math.random() * 16;
  38361. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  38362. }
  38363. }
  38364. }
  38365. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  38366. if (firstU) {
  38367. uuid.shift();
  38368. return 'u' + uuid.join('');
  38369. } else {
  38370. return uuid.join('');
  38371. }
  38372. }
  38373. var _default = guid;
  38374. exports.default = _default;
  38375. /***/ }),
  38376. /***/ 48:
  38377. /*!*********************************************************************!*\
  38378. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/color.js ***!
  38379. \*********************************************************************/
  38380. /*! no static exports found */
  38381. /***/ (function(module, exports, __webpack_require__) {
  38382. "use strict";
  38383. Object.defineProperty(exports, "__esModule", {
  38384. value: true
  38385. });
  38386. exports.default = void 0;
  38387. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  38388. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  38389. var color = {
  38390. primary: "#2979ff",
  38391. primaryDark: "#2b85e4",
  38392. primaryDisabled: "#a0cfff",
  38393. primaryLight: "#ecf5ff",
  38394. bgColor: "#f3f4f6",
  38395. info: "#909399",
  38396. infoDark: "#82848a",
  38397. infoDisabled: "#c8c9cc",
  38398. infoLight: "#f4f4f5",
  38399. warning: "#ff9900",
  38400. warningDark: "#f29100",
  38401. warningDisabled: "#fcbd71",
  38402. warningLight: "#fdf6ec",
  38403. error: "#fa3534",
  38404. errorDark: "#dd6161",
  38405. errorDisabled: "#fab6b6",
  38406. errorLight: "#fef0f0",
  38407. success: "#19be6b",
  38408. successDark: "#18b566",
  38409. successDisabled: "#71d5a1",
  38410. successLight: "#dbf1e1",
  38411. mainColor: "#303133",
  38412. contentColor: "#606266",
  38413. tipsColor: "#909399",
  38414. lightColor: "#c0c4cc",
  38415. borderColor: "#e4e7ed"
  38416. };
  38417. var _default = color;
  38418. exports.default = _default;
  38419. /***/ }),
  38420. /***/ 49:
  38421. /*!*************************************************************************!*\
  38422. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/type2icon.js ***!
  38423. \*************************************************************************/
  38424. /*! no static exports found */
  38425. /***/ (function(module, exports, __webpack_require__) {
  38426. "use strict";
  38427. Object.defineProperty(exports, "__esModule", {
  38428. value: true
  38429. });
  38430. exports.default = void 0;
  38431. /**
  38432. * 根据主题type值,获取对应的图标
  38433. * @param String type 主题名称,primary|info|error|warning|success
  38434. * @param String fill 是否使用fill填充实体的图标
  38435. */
  38436. function type2icon() {
  38437. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  38438. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  38439. // 如果非预置值,默认为success
  38440. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  38441. var iconName = '';
  38442. // 目前(2019-12-12),info和primary使用同一个图标
  38443. switch (type) {
  38444. case 'primary':
  38445. iconName = 'info-circle';
  38446. break;
  38447. case 'info':
  38448. iconName = 'info-circle';
  38449. break;
  38450. case 'error':
  38451. iconName = 'close-circle';
  38452. break;
  38453. case 'warning':
  38454. iconName = 'error-circle';
  38455. break;
  38456. case 'success':
  38457. iconName = 'checkmark-circle';
  38458. break;
  38459. default:
  38460. iconName = 'checkmark-circle';
  38461. }
  38462. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  38463. if (fill) iconName += '-fill';
  38464. return iconName;
  38465. }
  38466. var _default = type2icon;
  38467. exports.default = _default;
  38468. /***/ }),
  38469. /***/ 5:
  38470. /*!**************************************************************!*\
  38471. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  38472. \**************************************************************/
  38473. /*! no static exports found */
  38474. /***/ (function(module, exports, __webpack_require__) {
  38475. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  38476. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  38477. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  38478. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  38479. function _slicedToArray(arr, i) {
  38480. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  38481. }
  38482. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  38483. /***/ }),
  38484. /***/ 50:
  38485. /*!***************************************************************************!*\
  38486. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/randomArray.js ***!
  38487. \***************************************************************************/
  38488. /*! no static exports found */
  38489. /***/ (function(module, exports, __webpack_require__) {
  38490. "use strict";
  38491. Object.defineProperty(exports, "__esModule", {
  38492. value: true
  38493. });
  38494. exports.default = void 0;
  38495. // 打乱数组
  38496. function randomArray() {
  38497. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  38498. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  38499. return array.sort(function () {
  38500. return Math.random() - 0.5;
  38501. });
  38502. }
  38503. var _default = randomArray;
  38504. exports.default = _default;
  38505. /***/ }),
  38506. /***/ 500:
  38507. /*!*************************************************************************************!*\
  38508. !*** E:/yunfei/product1/bigDataApp/components/js_sdk/u-charts/u-charts/u-charts.js ***!
  38509. \*************************************************************************************/
  38510. /*! no static exports found */
  38511. /***/ (function(module, exports, __webpack_require__) {
  38512. "use strict";
  38513. /* WEBPACK VAR INJECTION */(function(uni, module) {/*
  38514. * uCharts v1.9.6.20210214
  38515. * uni-app平台高性能跨全端图表,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)
  38516. * Copyright (c) 2021 QIUN秋云 https://www.ucharts.cn All rights reserved.
  38517. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  38518. *
  38519. * uCharts官方网站
  38520. * https://www.uCharts.cn
  38521. *
  38522. * 开源地址:
  38523. * https://gitee.com/uCharts/uCharts
  38524. *
  38525. * uni-app插件市场地址:
  38526. * http://ext.dcloud.net.cn/plugin?id=271
  38527. *
  38528. */
  38529. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  38530. var config = {
  38531. yAxisWidth: 15,
  38532. yAxisSplit: 5,
  38533. xAxisHeight: 22,
  38534. xAxisLineHeight: 22,
  38535. legendHeight: 15,
  38536. yAxisTitleWidth: 15,
  38537. padding: [10, 10, 10, 10],
  38538. pixelRatio: 1,
  38539. rotate: false,
  38540. columePadding: 3,
  38541. fontSize: 13,
  38542. //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'],
  38543. dataPointShape: ['circle', 'circle', 'circle', 'circle'],
  38544. colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'],
  38545. pieChartLinePadding: 15,
  38546. pieChartTextPadding: 5,
  38547. xAxisTextPadding: 3,
  38548. titleColor: '#333333',
  38549. titleFontSize: 20,
  38550. subtitleColor: '#999999',
  38551. subtitleFontSize: 15,
  38552. toolTipPadding: 3,
  38553. toolTipBackground: '#000000',
  38554. toolTipOpacity: 0.7,
  38555. toolTipLineHeight: 20,
  38556. radarLabelTextMargin: 15,
  38557. gaugeLabelTextMargin: 15
  38558. };
  38559. var assign = function assign(target) {
  38560. for (var _len2 = arguments.length, varArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  38561. varArgs[_key2 - 1] = arguments[_key2];
  38562. }
  38563. if (target == null) {
  38564. throw new TypeError('Cannot convert undefined or null to object');
  38565. }
  38566. if (!varArgs || varArgs.length <= 0) {
  38567. return target;
  38568. }
  38569. // 深度合并对象
  38570. function deepAssign(obj1, obj2) {
  38571. for (var key in obj2) {
  38572. obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
  38573. }
  38574. return obj1;
  38575. }
  38576. varArgs.forEach(function (val) {
  38577. target = deepAssign(target, val);
  38578. });
  38579. return target;
  38580. };
  38581. var util = {
  38582. toFixed: function toFixed(num, limit) {
  38583. limit = limit || 2;
  38584. if (this.isFloat(num)) {
  38585. num = num.toFixed(limit);
  38586. }
  38587. return num;
  38588. },
  38589. isFloat: function isFloat(num) {
  38590. return num % 1 !== 0;
  38591. },
  38592. approximatelyEqual: function approximatelyEqual(num1, num2) {
  38593. return Math.abs(num1 - num2) < 1e-10;
  38594. },
  38595. isSameSign: function isSameSign(num1, num2) {
  38596. return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
  38597. },
  38598. isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
  38599. return this.isSameSign(p1.x, p2.x);
  38600. },
  38601. isCollision: function isCollision(obj1, obj2) {
  38602. obj1.end = {};
  38603. obj1.end.x = obj1.start.x + obj1.width;
  38604. obj1.end.y = obj1.start.y - obj1.height;
  38605. obj2.end = {};
  38606. obj2.end.x = obj2.start.x + obj2.width;
  38607. obj2.end.y = obj2.start.y - obj2.height;
  38608. var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
  38609. return !flag;
  38610. }
  38611. };
  38612. //兼容H5点击事件
  38613. function getH5Offset(e) {
  38614. e.mp = {
  38615. changedTouches: []
  38616. };
  38617. e.mp.changedTouches.push({
  38618. x: e.offsetX,
  38619. y: e.offsetY
  38620. });
  38621. return e;
  38622. }
  38623. // hex 转 rgba
  38624. function hexToRgb(hexValue, opc) {
  38625. var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  38626. var hex = hexValue.replace(rgx, function (m, r, g, b) {
  38627. return r + r + g + g + b + b;
  38628. });
  38629. var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
  38630. var r = parseInt(rgb[1], 16);
  38631. var g = parseInt(rgb[2], 16);
  38632. var b = parseInt(rgb[3], 16);
  38633. return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
  38634. }
  38635. function findRange(num, type, limit) {
  38636. if (isNaN(num)) {
  38637. throw new Error('[uCharts] unvalid series data!');
  38638. }
  38639. limit = limit || 10;
  38640. type = type ? type : 'upper';
  38641. var multiple = 1;
  38642. while (limit < 1) {
  38643. limit *= 10;
  38644. multiple *= 10;
  38645. }
  38646. if (type === 'upper') {
  38647. num = Math.ceil(num * multiple);
  38648. } else {
  38649. num = Math.floor(num * multiple);
  38650. }
  38651. while (num % limit !== 0) {
  38652. if (type === 'upper') {
  38653. num++;
  38654. } else {
  38655. num--;
  38656. }
  38657. }
  38658. return num / multiple;
  38659. }
  38660. function calCandleMA(dayArr, nameArr, colorArr, kdata) {
  38661. var seriesTemp = [];
  38662. for (var k = 0; k < dayArr.length; k++) {
  38663. var seriesItem = {
  38664. data: [],
  38665. name: nameArr[k],
  38666. color: colorArr[k]
  38667. };
  38668. for (var i = 0, len = kdata.length; i < len; i++) {
  38669. if (i < dayArr[k]) {
  38670. seriesItem.data.push(null);
  38671. continue;
  38672. }
  38673. var sum = 0;
  38674. for (var j = 0; j < dayArr[k]; j++) {
  38675. sum += kdata[i - j][1];
  38676. }
  38677. seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
  38678. }
  38679. seriesTemp.push(seriesItem);
  38680. }
  38681. return seriesTemp;
  38682. }
  38683. function calValidDistance(self, distance, chartData, config, opts) {
  38684. var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
  38685. var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
  38686. var validDistance = distance;
  38687. if (distance >= 0) {
  38688. validDistance = 0;
  38689. self.event.trigger('scrollLeft');
  38690. } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
  38691. validDistance = dataChartAreaWidth - dataChartWidth;
  38692. self.event.trigger('scrollRight');
  38693. }
  38694. return validDistance;
  38695. }
  38696. function isInAngleRange(angle, startAngle, endAngle) {
  38697. function adjust(angle) {
  38698. while (angle < 0) {
  38699. angle += 2 * Math.PI;
  38700. }
  38701. while (angle > 2 * Math.PI) {
  38702. angle -= 2 * Math.PI;
  38703. }
  38704. return angle;
  38705. }
  38706. angle = adjust(angle);
  38707. startAngle = adjust(startAngle);
  38708. endAngle = adjust(endAngle);
  38709. if (startAngle > endAngle) {
  38710. endAngle += 2 * Math.PI;
  38711. if (angle < startAngle) {
  38712. angle += 2 * Math.PI;
  38713. }
  38714. }
  38715. return angle >= startAngle && angle <= endAngle;
  38716. }
  38717. function calRotateTranslate(x, y, h) {
  38718. var xv = x;
  38719. var yv = h - y;
  38720. var transX = xv + (h - yv - xv) / Math.sqrt(2);
  38721. transX *= -1;
  38722. var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
  38723. return {
  38724. transX: transX,
  38725. transY: transY
  38726. };
  38727. }
  38728. function createCurveControlPoints(points, i) {
  38729. function isNotMiddlePoint(points, i) {
  38730. if (points[i - 1] && points[i + 1]) {
  38731. return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, points[i + 1].y);
  38732. } else {
  38733. return false;
  38734. }
  38735. }
  38736. function isNotMiddlePointX(points, i) {
  38737. if (points[i - 1] && points[i + 1]) {
  38738. return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x, points[i + 1].x);
  38739. } else {
  38740. return false;
  38741. }
  38742. }
  38743. var a = 0.2;
  38744. var b = 0.2;
  38745. var pAx = null;
  38746. var pAy = null;
  38747. var pBx = null;
  38748. var pBy = null;
  38749. if (i < 1) {
  38750. pAx = points[0].x + (points[1].x - points[0].x) * a;
  38751. pAy = points[0].y + (points[1].y - points[0].y) * a;
  38752. } else {
  38753. pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
  38754. pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
  38755. }
  38756. if (i > points.length - 3) {
  38757. var last = points.length - 1;
  38758. pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
  38759. pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
  38760. } else {
  38761. pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
  38762. pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
  38763. }
  38764. if (isNotMiddlePoint(points, i + 1)) {
  38765. pBy = points[i + 1].y;
  38766. }
  38767. if (isNotMiddlePoint(points, i)) {
  38768. pAy = points[i].y;
  38769. }
  38770. if (isNotMiddlePointX(points, i + 1)) {
  38771. pBx = points[i + 1].x;
  38772. }
  38773. if (isNotMiddlePointX(points, i)) {
  38774. pAx = points[i].x;
  38775. }
  38776. if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
  38777. pAy = points[i].y;
  38778. }
  38779. if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
  38780. pBy = points[i + 1].y;
  38781. }
  38782. if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
  38783. pAx = points[i].x;
  38784. }
  38785. if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
  38786. pBx = points[i + 1].x;
  38787. }
  38788. return {
  38789. ctrA: {
  38790. x: pAx,
  38791. y: pAy
  38792. },
  38793. ctrB: {
  38794. x: pBx,
  38795. y: pBy
  38796. }
  38797. };
  38798. }
  38799. function convertCoordinateOrigin(x, y, center) {
  38800. return {
  38801. x: center.x + x,
  38802. y: center.y - y
  38803. };
  38804. }
  38805. function avoidCollision(obj, target) {
  38806. if (target) {
  38807. // is collision test
  38808. while (util.isCollision(obj, target)) {
  38809. if (obj.start.x > 0) {
  38810. obj.start.y--;
  38811. } else if (obj.start.x < 0) {
  38812. obj.start.y++;
  38813. } else {
  38814. if (obj.start.y > 0) {
  38815. obj.start.y++;
  38816. } else {
  38817. obj.start.y--;
  38818. }
  38819. }
  38820. }
  38821. }
  38822. return obj;
  38823. }
  38824. function fillSeries(series, opts, config) {
  38825. var index = 0;
  38826. return series.map(function (item) {
  38827. if (!item.color) {
  38828. item.color = config.colors[index];
  38829. index = (index + 1) % config.colors.length;
  38830. }
  38831. if (!item.index) {
  38832. item.index = 0;
  38833. }
  38834. if (!item.type) {
  38835. item.type = opts.type;
  38836. }
  38837. if (typeof item.show == "undefined") {
  38838. item.show = true;
  38839. }
  38840. if (!item.type) {
  38841. item.type = opts.type;
  38842. }
  38843. if (!item.pointShape) {
  38844. item.pointShape = "circle";
  38845. }
  38846. if (!item.legendShape) {
  38847. switch (item.type) {
  38848. case 'line':
  38849. item.legendShape = "line";
  38850. break;
  38851. case 'column':
  38852. item.legendShape = "rect";
  38853. break;
  38854. case 'area':
  38855. item.legendShape = "triangle";
  38856. break;
  38857. default:
  38858. item.legendShape = "circle";
  38859. }
  38860. }
  38861. return item;
  38862. });
  38863. }
  38864. function getDataRange(minData, maxData) {
  38865. var limit = 0;
  38866. var range = maxData - minData;
  38867. if (range >= 10000) {
  38868. limit = 1000;
  38869. } else if (range >= 1000) {
  38870. limit = 100;
  38871. } else if (range >= 100) {
  38872. limit = 10;
  38873. } else if (range >= 10) {
  38874. limit = 5;
  38875. } else if (range >= 1) {
  38876. limit = 1;
  38877. } else if (range >= 0.1) {
  38878. limit = 0.1;
  38879. } else if (range >= 0.01) {
  38880. limit = 0.01;
  38881. } else if (range >= 0.001) {
  38882. limit = 0.001;
  38883. } else if (range >= 0.0001) {
  38884. limit = 0.0001;
  38885. } else if (range >= 0.00001) {
  38886. limit = 0.00001;
  38887. } else {
  38888. limit = 0.000001;
  38889. }
  38890. return {
  38891. minRange: findRange(minData, 'lower', limit),
  38892. maxRange: findRange(maxData, 'upper', limit)
  38893. };
  38894. }
  38895. function measureText(text) {
  38896. var fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.fontSize;
  38897. text = String(text);
  38898. var text = text.split('');
  38899. var width = 0;
  38900. for (var i = 0; i < text.length; i++) {
  38901. var item = text[i];
  38902. if (/[a-zA-Z]/.test(item)) {
  38903. width += 7;
  38904. } else if (/[0-9]/.test(item)) {
  38905. width += 5.5;
  38906. } else if (/\./.test(item)) {
  38907. width += 2.7;
  38908. } else if (/-/.test(item)) {
  38909. width += 3.25;
  38910. } else if (/[\u4e00-\u9fa5]/.test(item)) {
  38911. width += 10;
  38912. } else if (/\(|\)/.test(item)) {
  38913. width += 3.73;
  38914. } else if (/\s/.test(item)) {
  38915. width += 2.5;
  38916. } else if (/%/.test(item)) {
  38917. width += 8;
  38918. } else {
  38919. width += 10;
  38920. }
  38921. }
  38922. return width * fontSize / 10;
  38923. }
  38924. function dataCombine(series) {
  38925. return series.reduce(function (a, b) {
  38926. return (a.data ? a.data : a).concat(b.data);
  38927. }, []);
  38928. }
  38929. function dataCombineStack(series, len) {
  38930. var sum = new Array(len);
  38931. for (var j = 0; j < sum.length; j++) {
  38932. sum[j] = 0;
  38933. }
  38934. for (var i = 0; i < series.length; i++) {
  38935. for (var j = 0; j < sum.length; j++) {
  38936. sum[j] += series[i].data[j];
  38937. }
  38938. }
  38939. return series.reduce(function (a, b) {
  38940. return (a.data ? a.data : a).concat(b.data).concat(sum);
  38941. }, []);
  38942. }
  38943. function getTouches(touches, opts, e) {
  38944. var x, y;
  38945. if (touches.clientX) {
  38946. if (opts.rotate) {
  38947. y = opts.height - touches.clientX * opts.pixelRatio;
  38948. x = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pixelRatio / 2 * (opts.pixelRatio - 1)) * opts.pixelRatio;
  38949. } else {
  38950. x = touches.clientX * opts.pixelRatio;
  38951. y = (touches.pageY - e.currentTarget.offsetTop - opts.height / opts.pixelRatio / 2 * (opts.pixelRatio - 1)) * opts.pixelRatio;
  38952. }
  38953. } else {
  38954. if (opts.rotate) {
  38955. y = opts.height - touches.x * opts.pixelRatio;
  38956. x = touches.y * opts.pixelRatio;
  38957. } else {
  38958. x = touches.x * opts.pixelRatio;
  38959. y = touches.y * opts.pixelRatio;
  38960. }
  38961. }
  38962. return {
  38963. x: x,
  38964. y: y
  38965. };
  38966. }
  38967. function getSeriesDataItem(series, index) {
  38968. var data = [];
  38969. for (var i = 0; i < series.length; i++) {
  38970. var item = series[i];
  38971. if (item.data[index] !== null && typeof item.data[index] !== 'undefined' && item.show) {
  38972. var seriesItem = {};
  38973. seriesItem.color = item.color;
  38974. seriesItem.type = item.type;
  38975. seriesItem.style = item.style;
  38976. seriesItem.pointShape = item.pointShape;
  38977. seriesItem.disableLegend = item.disableLegend;
  38978. seriesItem.name = item.name;
  38979. seriesItem.show = item.show;
  38980. seriesItem.data = item.format ? item.format(item.data[index]) : item.data[index];
  38981. data.push(seriesItem);
  38982. }
  38983. }
  38984. return data;
  38985. }
  38986. function getMaxTextListLength(list) {
  38987. var lengthList = list.map(function (item) {
  38988. return measureText(item);
  38989. });
  38990. return Math.max.apply(null, lengthList);
  38991. }
  38992. function getRadarCoordinateSeries(length) {
  38993. var eachAngle = 2 * Math.PI / length;
  38994. var CoordinateSeries = [];
  38995. for (var i = 0; i < length; i++) {
  38996. CoordinateSeries.push(eachAngle * i);
  38997. }
  38998. return CoordinateSeries.map(function (item) {
  38999. return -1 * item + Math.PI / 2;
  39000. });
  39001. }
  39002. function getToolTipData(seriesData, calPoints, index, categories) {
  39003. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  39004. var textList = seriesData.map(function (item) {
  39005. var titleText = [];
  39006. if (categories) {
  39007. titleText = categories;
  39008. } else {
  39009. titleText = item.data;
  39010. }
  39011. return {
  39012. text: option.format ? option.format(item, titleText[index]) : item.name + ': ' + item.data,
  39013. color: item.color
  39014. };
  39015. });
  39016. var validCalPoints = [];
  39017. var offset = {
  39018. x: 0,
  39019. y: 0
  39020. };
  39021. for (var i = 0; i < calPoints.length; i++) {
  39022. var points = calPoints[i];
  39023. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  39024. validCalPoints.push(points[index]);
  39025. }
  39026. }
  39027. for (var _i = 0; _i < validCalPoints.length; _i++) {
  39028. var item = validCalPoints[_i];
  39029. offset.x = Math.round(item.x);
  39030. offset.y += item.y;
  39031. }
  39032. offset.y /= validCalPoints.length;
  39033. return {
  39034. textList: textList,
  39035. offset: offset
  39036. };
  39037. }
  39038. function getMixToolTipData(seriesData, calPoints, index, categories) {
  39039. var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  39040. var textList = seriesData.map(function (item) {
  39041. return {
  39042. text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data,
  39043. color: item.color,
  39044. disableLegend: item.disableLegend ? true : false
  39045. };
  39046. });
  39047. textList = textList.filter(function (item) {
  39048. if (item.disableLegend !== true) {
  39049. return item;
  39050. }
  39051. });
  39052. var validCalPoints = [];
  39053. var offset = {
  39054. x: 0,
  39055. y: 0
  39056. };
  39057. for (var i = 0; i < calPoints.length; i++) {
  39058. var points = calPoints[i];
  39059. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  39060. validCalPoints.push(points[index]);
  39061. }
  39062. }
  39063. for (var _i2 = 0; _i2 < validCalPoints.length; _i2++) {
  39064. var item = validCalPoints[_i2];
  39065. offset.x = Math.round(item.x);
  39066. offset.y += item.y;
  39067. }
  39068. offset.y /= validCalPoints.length;
  39069. return {
  39070. textList: textList,
  39071. offset: offset
  39072. };
  39073. }
  39074. function getCandleToolTipData(series, seriesData, calPoints, index, categories, extra) {
  39075. var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  39076. var upColor = extra.color.upFill;
  39077. var downColor = extra.color.downFill;
  39078. //颜色顺序为开盘,收盘,最低,最高
  39079. var color = [upColor, upColor, downColor, upColor];
  39080. var textList = [];
  39081. var text0 = {
  39082. text: categories[index],
  39083. color: null
  39084. };
  39085. textList.push(text0);
  39086. seriesData.map(function (item) {
  39087. if (index == 0) {
  39088. if (item.data[1] - item.data[0] < 0) {
  39089. color[1] = downColor;
  39090. } else {
  39091. color[1] = upColor;
  39092. }
  39093. } else {
  39094. if (item.data[0] < series[index - 1][1]) {
  39095. color[0] = downColor;
  39096. }
  39097. if (item.data[1] < item.data[0]) {
  39098. color[1] = downColor;
  39099. }
  39100. if (item.data[2] > series[index - 1][1]) {
  39101. color[2] = upColor;
  39102. }
  39103. if (item.data[3] < series[index - 1][1]) {
  39104. color[3] = downColor;
  39105. }
  39106. }
  39107. var text1 = {
  39108. text: '开盘:' + item.data[0],
  39109. color: color[0]
  39110. };
  39111. var text2 = {
  39112. text: '收盘:' + item.data[1],
  39113. color: color[1]
  39114. };
  39115. var text3 = {
  39116. text: '最低:' + item.data[2],
  39117. color: color[2]
  39118. };
  39119. var text4 = {
  39120. text: '最高:' + item.data[3],
  39121. color: color[3]
  39122. };
  39123. textList.push(text1, text2, text3, text4);
  39124. });
  39125. var validCalPoints = [];
  39126. var offset = {
  39127. x: 0,
  39128. y: 0
  39129. };
  39130. for (var i = 0; i < calPoints.length; i++) {
  39131. var points = calPoints[i];
  39132. if (typeof points[index] !== 'undefined' && points[index] !== null) {
  39133. validCalPoints.push(points[index]);
  39134. }
  39135. }
  39136. offset.x = Math.round(validCalPoints[0][0].x);
  39137. return {
  39138. textList: textList,
  39139. offset: offset
  39140. };
  39141. }
  39142. function filterSeries(series) {
  39143. var tempSeries = [];
  39144. for (var i = 0; i < series.length; i++) {
  39145. if (series[i].show == true) {
  39146. tempSeries.push(series[i]);
  39147. }
  39148. }
  39149. return tempSeries;
  39150. }
  39151. function findCurrentIndex(currentPoints, calPoints, opts, config) {
  39152. var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  39153. var currentIndex = -1;
  39154. var spacing = opts.chartData.eachSpacing / 2;
  39155. var xAxisPoints = [];
  39156. if (calPoints && calPoints.length > 0) {
  39157. for (var i = 1; i < opts.chartData.xAxisPoints.length; i++) {
  39158. xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
  39159. }
  39160. if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
  39161. spacing = opts.chartData.eachSpacing / 2;
  39162. }
  39163. if (!opts.categories) {
  39164. spacing = 0;
  39165. }
  39166. if (isInExactChartArea(currentPoints, opts, config)) {
  39167. xAxisPoints.forEach(function (item, index) {
  39168. if (currentPoints.x + offset + spacing > item) {
  39169. currentIndex = index;
  39170. }
  39171. });
  39172. }
  39173. }
  39174. return currentIndex;
  39175. }
  39176. function findLegendIndex(currentPoints, legendData, opts) {
  39177. var currentIndex = -1;
  39178. if (isInExactLegendArea(currentPoints, legendData.area)) {
  39179. var points = legendData.points;
  39180. var index = -1;
  39181. for (var i = 0, len = points.length; i < len; i++) {
  39182. var item = points[i];
  39183. for (var j = 0; j < item.length; j++) {
  39184. index += 1;
  39185. var area = item[j]['area'];
  39186. if (currentPoints.x > area[0] && currentPoints.x < area[2] && currentPoints.y > area[1] && currentPoints.y < area[3]) {
  39187. currentIndex = index;
  39188. break;
  39189. }
  39190. }
  39191. }
  39192. return currentIndex;
  39193. }
  39194. return currentIndex;
  39195. }
  39196. function isInExactLegendArea(currentPoints, area) {
  39197. return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
  39198. }
  39199. function isInExactChartArea(currentPoints, opts, config) {
  39200. return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] - 10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
  39201. }
  39202. function findRadarChartCurrentIndex(currentPoints, radarData, count) {
  39203. var eachAngleArea = 2 * Math.PI / count;
  39204. var currentIndex = -1;
  39205. if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
  39206. var fixAngle = function fixAngle(angle) {
  39207. if (angle < 0) {
  39208. angle += 2 * Math.PI;
  39209. }
  39210. if (angle > 2 * Math.PI) {
  39211. angle -= 2 * Math.PI;
  39212. }
  39213. return angle;
  39214. };
  39215. var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
  39216. angle = -1 * angle;
  39217. if (angle < 0) {
  39218. angle += 2 * Math.PI;
  39219. }
  39220. var angleList = radarData.angleList.map(function (item) {
  39221. item = fixAngle(-1 * item);
  39222. return item;
  39223. });
  39224. angleList.forEach(function (item, index) {
  39225. var rangeStart = fixAngle(item - eachAngleArea / 2);
  39226. var rangeEnd = fixAngle(item + eachAngleArea / 2);
  39227. if (rangeEnd < rangeStart) {
  39228. rangeEnd += 2 * Math.PI;
  39229. }
  39230. if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
  39231. currentIndex = index;
  39232. }
  39233. });
  39234. }
  39235. return currentIndex;
  39236. }
  39237. function findFunnelChartCurrentIndex(currentPoints, funnelData) {
  39238. var currentIndex = -1;
  39239. for (var i = 0, len = funnelData.series.length; i < len; i++) {
  39240. var item = funnelData.series[i];
  39241. if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
  39242. currentIndex = i;
  39243. break;
  39244. }
  39245. }
  39246. return currentIndex;
  39247. }
  39248. function findWordChartCurrentIndex(currentPoints, wordData) {
  39249. var currentIndex = -1;
  39250. for (var i = 0, len = wordData.length; i < len; i++) {
  39251. var item = wordData[i];
  39252. if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
  39253. currentIndex = i;
  39254. break;
  39255. }
  39256. }
  39257. return currentIndex;
  39258. }
  39259. function findMapChartCurrentIndex(currentPoints, opts) {
  39260. var currentIndex = -1;
  39261. var cData = opts.chartData.mapData;
  39262. var data = opts.series;
  39263. var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
  39264. var poi = [tmp.x, tmp.y];
  39265. for (var i = 0, len = data.length; i < len; i++) {
  39266. var item = data[i].geometry.coordinates;
  39267. if (isPoiWithinPoly(poi, item)) {
  39268. currentIndex = i;
  39269. break;
  39270. }
  39271. }
  39272. return currentIndex;
  39273. }
  39274. function findPieChartCurrentIndex(currentPoints, pieData) {
  39275. var currentIndex = -1;
  39276. if (isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
  39277. var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
  39278. angle = -angle;
  39279. for (var i = 0, len = pieData.series.length; i < len; i++) {
  39280. var item = pieData.series[i];
  39281. if (isInAngleRange(angle, item._start_, item._start_ + item._proportion_ * 2 * Math.PI)) {
  39282. currentIndex = i;
  39283. break;
  39284. }
  39285. }
  39286. }
  39287. return currentIndex;
  39288. }
  39289. function isInExactPieChartArea(currentPoints, center, radius) {
  39290. return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
  39291. }
  39292. function splitPoints(points) {
  39293. var newPoints = [];
  39294. var items = [];
  39295. points.forEach(function (item, index) {
  39296. if (item !== null) {
  39297. items.push(item);
  39298. } else {
  39299. if (items.length) {
  39300. newPoints.push(items);
  39301. }
  39302. items = [];
  39303. }
  39304. });
  39305. if (items.length) {
  39306. newPoints.push(items);
  39307. }
  39308. return newPoints;
  39309. }
  39310. function calLegendData(series, opts, config, chartData) {
  39311. var legendData = {
  39312. area: {
  39313. start: {
  39314. x: 0,
  39315. y: 0
  39316. },
  39317. end: {
  39318. x: 0,
  39319. y: 0
  39320. },
  39321. width: 0,
  39322. height: 0,
  39323. wholeWidth: 0,
  39324. wholeHeight: 0
  39325. },
  39326. points: [],
  39327. widthArr: [],
  39328. heightArr: []
  39329. };
  39330. if (opts.legend.show === false) {
  39331. chartData.legendData = legendData;
  39332. return legendData;
  39333. }
  39334. var padding = opts.legend.padding;
  39335. var margin = opts.legend.margin;
  39336. var fontSize = opts.legend.fontSize;
  39337. var shapeWidth = 15 * opts.pixelRatio;
  39338. var shapeRight = 5 * opts.pixelRatio;
  39339. var lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);
  39340. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  39341. var legendList = [];
  39342. var widthCount = 0;
  39343. var widthCountArr = [];
  39344. var currentRow = [];
  39345. for (var i = 0; i < series.length; i++) {
  39346. var item = series[i];
  39347. var itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize) + opts.legend.itemGap;
  39348. if (widthCount + itemWidth > opts.width - opts.padding[1] - opts.padding[3]) {
  39349. legendList.push(currentRow);
  39350. widthCountArr.push(widthCount - opts.legend.itemGap);
  39351. widthCount = itemWidth;
  39352. currentRow = [item];
  39353. } else {
  39354. widthCount += itemWidth;
  39355. currentRow.push(item);
  39356. }
  39357. }
  39358. if (currentRow.length) {
  39359. legendList.push(currentRow);
  39360. widthCountArr.push(widthCount - opts.legend.itemGap);
  39361. legendData.widthArr = widthCountArr;
  39362. var legendWidth = Math.max.apply(null, widthCountArr);
  39363. switch (opts.legend.float) {
  39364. case 'left':
  39365. legendData.area.start.x = opts.padding[3];
  39366. legendData.area.end.x = opts.padding[3] + 2 * padding;
  39367. break;
  39368. case 'right':
  39369. legendData.area.start.x = opts.width - opts.padding[1] - legendWidth - 2 * padding;
  39370. legendData.area.end.x = opts.width - opts.padding[1];
  39371. break;
  39372. default:
  39373. legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
  39374. legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
  39375. }
  39376. legendData.area.width = legendWidth + 2 * padding;
  39377. legendData.area.wholeWidth = legendWidth + 2 * padding;
  39378. legendData.area.height = legendList.length * lineHeight + 2 * padding;
  39379. legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
  39380. legendData.points = legendList;
  39381. }
  39382. } else {
  39383. var len = series.length;
  39384. var maxHeight = opts.height - opts.padding[0] - opts.padding[2] - 2 * margin - 2 * padding;
  39385. var maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
  39386. legendData.area.height = maxLength * lineHeight + padding * 2;
  39387. legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
  39388. switch (opts.legend.float) {
  39389. case 'top':
  39390. legendData.area.start.y = opts.padding[0] + margin;
  39391. legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;
  39392. break;
  39393. case 'bottom':
  39394. legendData.area.start.y = opts.height - opts.padding[2] - margin - legendData.area.height;
  39395. legendData.area.end.y = opts.height - opts.padding[2] - margin;
  39396. break;
  39397. default:
  39398. legendData.area.start.y = (opts.height - legendData.area.height) / 2;
  39399. legendData.area.end.y = (opts.height + legendData.area.height) / 2;
  39400. }
  39401. var lineNum = len % maxLength === 0 ? len / maxLength : Math.floor(len / maxLength + 1);
  39402. var _currentRow = [];
  39403. for (var _i3 = 0; _i3 < lineNum; _i3++) {
  39404. var temp = series.slice(_i3 * maxLength, _i3 * maxLength + maxLength);
  39405. _currentRow.push(temp);
  39406. }
  39407. legendData.points = _currentRow;
  39408. if (_currentRow.length) {
  39409. for (var _i4 = 0; _i4 < _currentRow.length; _i4++) {
  39410. var _item = _currentRow[_i4];
  39411. var maxWidth = 0;
  39412. for (var j = 0; j < _item.length; j++) {
  39413. var _itemWidth = shapeWidth + shapeRight + measureText(_item[j].name || 'undefined', fontSize) + opts.legend.itemGap;
  39414. if (_itemWidth > maxWidth) {
  39415. maxWidth = _itemWidth;
  39416. }
  39417. }
  39418. legendData.widthArr.push(maxWidth);
  39419. legendData.heightArr.push(_item.length * lineHeight + padding * 2);
  39420. }
  39421. var _legendWidth = 0;
  39422. for (var _i5 = 0; _i5 < legendData.widthArr.length; _i5++) {
  39423. _legendWidth += legendData.widthArr[_i5];
  39424. }
  39425. legendData.area.width = _legendWidth - opts.legend.itemGap + 2 * padding;
  39426. legendData.area.wholeWidth = legendData.area.width + padding;
  39427. }
  39428. }
  39429. switch (opts.legend.position) {
  39430. case 'top':
  39431. legendData.area.start.y = opts.padding[0] + margin;
  39432. legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;
  39433. break;
  39434. case 'bottom':
  39435. legendData.area.start.y = opts.height - opts.padding[2] - legendData.area.height - margin;
  39436. legendData.area.end.y = opts.height - opts.padding[2] - margin;
  39437. break;
  39438. case 'left':
  39439. legendData.area.start.x = opts.padding[3];
  39440. legendData.area.end.x = opts.padding[3] + legendData.area.width;
  39441. break;
  39442. case 'right':
  39443. legendData.area.start.x = opts.width - opts.padding[1] - legendData.area.width;
  39444. legendData.area.end.x = opts.width - opts.padding[1];
  39445. break;
  39446. }
  39447. chartData.legendData = legendData;
  39448. return legendData;
  39449. }
  39450. function calCategoriesData(categories, opts, config, eachSpacing) {
  39451. var result = {
  39452. angle: 0,
  39453. xAxisHeight: config.xAxisHeight
  39454. };
  39455. var categoriesTextLenth = categories.map(function (item) {
  39456. return measureText(item, opts.xAxis.fontSize || config.fontSize);
  39457. });
  39458. var maxTextLength = Math.max.apply(this, categoriesTextLenth);
  39459. if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  39460. result.angle = 45 * Math.PI / 180;
  39461. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  39462. }
  39463. return result;
  39464. }
  39465. function getXAxisTextList(series, opts, config) {
  39466. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  39467. var data = dataCombine(series);
  39468. var sorted = [];
  39469. // remove null from data
  39470. data = data.filter(function (item) {
  39471. //return item !== null;
  39472. if (_typeof(item) === 'object' && item !== null) {
  39473. if (item.constructor.toString().indexOf('Array') > -1) {
  39474. return item !== null;
  39475. } else {
  39476. return item.value !== null;
  39477. }
  39478. } else {
  39479. return item !== null;
  39480. }
  39481. });
  39482. data.map(function (item) {
  39483. if (_typeof(item) === 'object') {
  39484. if (item.constructor.toString().indexOf('Array') > -1) {
  39485. if (opts.type == 'candle') {
  39486. item.map(function (subitem) {
  39487. sorted.push(subitem);
  39488. });
  39489. } else {
  39490. sorted.push(item[0]);
  39491. }
  39492. } else {
  39493. sorted.push(item.value);
  39494. }
  39495. } else {
  39496. sorted.push(item);
  39497. }
  39498. });
  39499. var minData = 0;
  39500. var maxData = 0;
  39501. if (sorted.length > 0) {
  39502. minData = Math.min.apply(this, sorted);
  39503. maxData = Math.max.apply(this, sorted);
  39504. }
  39505. //为了兼容v1.9.0之前的项目
  39506. if (index > -1) {
  39507. if (typeof opts.xAxis.data[index].min === 'number') {
  39508. minData = Math.min(opts.xAxis.data[index].min, minData);
  39509. }
  39510. if (typeof opts.xAxis.data[index].max === 'number') {
  39511. maxData = Math.max(opts.xAxis.data[index].max, maxData);
  39512. }
  39513. } else {
  39514. if (typeof opts.xAxis.min === 'number') {
  39515. minData = Math.min(opts.xAxis.min, minData);
  39516. }
  39517. if (typeof opts.xAxis.max === 'number') {
  39518. maxData = Math.max(opts.xAxis.max, maxData);
  39519. }
  39520. }
  39521. if (minData === maxData) {
  39522. var rangeSpan = maxData || 10;
  39523. maxData += rangeSpan;
  39524. }
  39525. //var dataRange = getDataRange(minData, maxData);
  39526. var minRange = minData;
  39527. var maxRange = maxData;
  39528. var range = [];
  39529. var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
  39530. for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
  39531. range.push(minRange + eachRange * i);
  39532. }
  39533. return range;
  39534. }
  39535. function calXAxisData(series, opts, config) {
  39536. var result = {
  39537. angle: 0,
  39538. xAxisHeight: config.xAxisHeight
  39539. };
  39540. result.ranges = getXAxisTextList(series, opts, config);
  39541. result.rangesFormat = result.ranges.map(function (item) {
  39542. item = opts.xAxis.format ? opts.xAxis.format(item) : util.toFixed(item, 2);
  39543. return item;
  39544. });
  39545. var xAxisScaleValues = result.ranges.map(function (item) {
  39546. // 如果刻度值是浮点数,则保留两位小数
  39547. item = util.toFixed(item, 2);
  39548. // 若有自定义格式则调用自定义的格式化函数
  39549. item = opts.xAxis.format ? opts.xAxis.format(Number(item)) : item;
  39550. return item;
  39551. });
  39552. result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
  39553. // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
  39554. var eachSpacing = result.eachSpacing;
  39555. var textLength = xAxisScaleValues.map(function (item) {
  39556. return measureText(item);
  39557. });
  39558. // get max length of categories text
  39559. var maxTextLength = Math.max.apply(this, textLength);
  39560. // 如果刻度值文本内容过长,则将其逆时针旋转45°
  39561. if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
  39562. result.angle = 45 * Math.PI / 180;
  39563. result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
  39564. }
  39565. if (opts.xAxis.disabled === true) {
  39566. result.xAxisHeight = 0;
  39567. }
  39568. return result;
  39569. }
  39570. function getRadarDataPoints(angleList, center, radius, series, opts) {
  39571. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  39572. var radarOption = opts.extra.radar || {};
  39573. radarOption.max = radarOption.max || 0;
  39574. var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
  39575. var data = [];
  39576. var _loop2 = function _loop2(i) {
  39577. var each = series[i];
  39578. var listItem = {};
  39579. listItem.color = each.color;
  39580. listItem.legendShape = each.legendShape;
  39581. listItem.pointShape = each.pointShape;
  39582. listItem.data = [];
  39583. each.data.forEach(function (item, index) {
  39584. var tmp = {};
  39585. tmp.angle = angleList[index];
  39586. tmp.proportion = item / maxData;
  39587. tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
  39588. listItem.data.push(tmp);
  39589. });
  39590. data.push(listItem);
  39591. };
  39592. for (var i = 0; i < series.length; i++) {
  39593. _loop2(i);
  39594. }
  39595. return data;
  39596. }
  39597. function getPieDataPoints(series, radius) {
  39598. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  39599. var count = 0;
  39600. var _start_ = 0;
  39601. for (var i = 0; i < series.length; i++) {
  39602. var item = series[i];
  39603. item.data = item.data === null ? 0 : item.data;
  39604. count += item.data;
  39605. }
  39606. for (var _i6 = 0; _i6 < series.length; _i6++) {
  39607. var _item2 = series[_i6];
  39608. _item2.data = _item2.data === null ? 0 : _item2.data;
  39609. if (count === 0) {
  39610. _item2._proportion_ = 1 / series.length * process;
  39611. } else {
  39612. _item2._proportion_ = _item2.data / count * process;
  39613. }
  39614. _item2._radius_ = radius;
  39615. }
  39616. for (var _i7 = 0; _i7 < series.length; _i7++) {
  39617. var _item3 = series[_i7];
  39618. _item3._start_ = _start_;
  39619. _start_ += 2 * _item3._proportion_ * Math.PI;
  39620. }
  39621. return series;
  39622. }
  39623. function getFunnelDataPoints(series, radius) {
  39624. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  39625. series = series.sort(function (a, b) {
  39626. return parseInt(b.data) - parseInt(a.data);
  39627. });
  39628. for (var i = 0; i < series.length; i++) {
  39629. series[i].radius = series[i].data / series[0].data * radius * process;
  39630. series[i]._proportion_ = series[i].data / series[0].data;
  39631. }
  39632. return series.reverse();
  39633. }
  39634. function getRoseDataPoints(series, type, minRadius, radius) {
  39635. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  39636. var count = 0;
  39637. var _start_ = 0;
  39638. var dataArr = [];
  39639. for (var i = 0; i < series.length; i++) {
  39640. var item = series[i];
  39641. item.data = item.data === null ? 0 : item.data;
  39642. count += item.data;
  39643. dataArr.push(item.data);
  39644. }
  39645. var minData = Math.min.apply(null, dataArr);
  39646. var maxData = Math.max.apply(null, dataArr);
  39647. var radiusLength = radius - minRadius;
  39648. for (var _i8 = 0; _i8 < series.length; _i8++) {
  39649. var _item4 = series[_i8];
  39650. _item4.data = _item4.data === null ? 0 : _item4.data;
  39651. if (count === 0 || type == 'area') {
  39652. _item4._proportion_ = _item4.data / count * process;
  39653. _item4._rose_proportion_ = 1 / series.length * process;
  39654. } else {
  39655. _item4._proportion_ = _item4.data / count * process;
  39656. _item4._rose_proportion_ = _item4.data / count * process;
  39657. }
  39658. _item4._radius_ = minRadius + radiusLength * ((_item4.data - minData) / (maxData - minData));
  39659. }
  39660. for (var _i9 = 0; _i9 < series.length; _i9++) {
  39661. var _item5 = series[_i9];
  39662. _item5._start_ = _start_;
  39663. _start_ += 2 * _item5._rose_proportion_ * Math.PI;
  39664. }
  39665. return series;
  39666. }
  39667. function getArcbarDataPoints(series, arcbarOption) {
  39668. var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  39669. if (process == 1) {
  39670. process = 0.999999;
  39671. }
  39672. for (var i = 0; i < series.length; i++) {
  39673. var item = series[i];
  39674. item.data = item.data === null ? 0 : item.data;
  39675. var totalAngle = void 0;
  39676. if (arcbarOption.type == 'circle') {
  39677. totalAngle = 2;
  39678. } else {
  39679. if (arcbarOption.endAngle < arcbarOption.startAngle) {
  39680. totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
  39681. } else {
  39682. totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
  39683. }
  39684. }
  39685. item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
  39686. if (item._proportion_ >= 2) {
  39687. item._proportion_ = item._proportion_ % 2;
  39688. }
  39689. }
  39690. return series;
  39691. }
  39692. function getGaugeAxisPoints(categories, startAngle, endAngle) {
  39693. var totalAngle = startAngle - endAngle + 1;
  39694. var tempStartAngle = startAngle;
  39695. for (var i = 0; i < categories.length; i++) {
  39696. categories[i].value = categories[i].value === null ? 0 : categories[i].value;
  39697. categories[i]._startAngle_ = tempStartAngle;
  39698. categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
  39699. if (categories[i]._endAngle_ >= 2) {
  39700. categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
  39701. }
  39702. tempStartAngle = categories[i]._endAngle_;
  39703. }
  39704. return categories;
  39705. }
  39706. function getGaugeDataPoints(series, categories, gaugeOption) {
  39707. var process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  39708. for (var i = 0; i < series.length; i++) {
  39709. var item = series[i];
  39710. item.data = item.data === null ? 0 : item.data;
  39711. if (gaugeOption.pointer.color == 'auto') {
  39712. for (var _i10 = 0; _i10 < categories.length; _i10++) {
  39713. if (item.data <= categories[_i10].value) {
  39714. item.color = categories[_i10].color;
  39715. break;
  39716. }
  39717. }
  39718. } else {
  39719. item.color = gaugeOption.pointer.color;
  39720. }
  39721. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  39722. item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
  39723. item._oldAngle_ = gaugeOption.oldAngle;
  39724. if (gaugeOption.oldAngle < gaugeOption.endAngle) {
  39725. item._oldAngle_ += 2;
  39726. }
  39727. if (item.data >= gaugeOption.oldData) {
  39728. item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
  39729. } else {
  39730. item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
  39731. }
  39732. if (item._proportion_ >= 2) {
  39733. item._proportion_ = item._proportion_ % 2;
  39734. }
  39735. }
  39736. return series;
  39737. }
  39738. function getPieTextMaxLength(series) {
  39739. series = getPieDataPoints(series);
  39740. var maxLength = 0;
  39741. for (var i = 0; i < series.length; i++) {
  39742. var item = series[i];
  39743. var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  39744. maxLength = Math.max(maxLength, measureText(text));
  39745. }
  39746. return maxLength;
  39747. }
  39748. function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
  39749. return points.map(function (item) {
  39750. if (item === null) {
  39751. return null;
  39752. }
  39753. item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / columnLen);
  39754. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  39755. item.width = Math.min(item.width, +opts.extra.column.width);
  39756. }
  39757. if (item.width <= 0) {
  39758. item.width = 1;
  39759. }
  39760. item.x += (index + 0.5 - columnLen / 2) * item.width;
  39761. return item;
  39762. });
  39763. }
  39764. function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
  39765. return points.map(function (item) {
  39766. if (item === null) {
  39767. return null;
  39768. }
  39769. item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
  39770. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  39771. item.width = Math.min(item.width, +opts.extra.column.width);
  39772. }
  39773. if (index > 0) {
  39774. item.width -= 2 * border;
  39775. }
  39776. return item;
  39777. });
  39778. }
  39779. function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
  39780. return points.map(function (item, indexn) {
  39781. if (item === null) {
  39782. return null;
  39783. }
  39784. item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
  39785. if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
  39786. item.width = Math.min(item.width, +opts.extra.column.width);
  39787. }
  39788. return item;
  39789. });
  39790. }
  39791. function getXAxisPoints(categories, opts, config) {
  39792. var spacingValid = opts.width - opts.area[1] - opts.area[3];
  39793. var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
  39794. if ((opts.type == 'line' || opts.type == 'area') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
  39795. dataCount -= 1;
  39796. }
  39797. var eachSpacing = spacingValid / dataCount;
  39798. var xAxisPoints = [];
  39799. var startX = opts.area[3];
  39800. var endX = opts.width - opts.area[1];
  39801. categories.forEach(function (item, index) {
  39802. xAxisPoints.push(startX + index * eachSpacing);
  39803. });
  39804. if (opts.xAxis.boundaryGap !== 'justify') {
  39805. if (opts.enableScroll === true) {
  39806. xAxisPoints.push(startX + categories.length * eachSpacing);
  39807. } else {
  39808. xAxisPoints.push(endX);
  39809. }
  39810. }
  39811. return {
  39812. xAxisPoints: xAxisPoints,
  39813. startX: startX,
  39814. endX: endX,
  39815. eachSpacing: eachSpacing
  39816. };
  39817. }
  39818. function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  39819. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  39820. var points = [];
  39821. var validHeight = opts.height - opts.area[0] - opts.area[2];
  39822. data.forEach(function (item, index) {
  39823. if (item === null) {
  39824. points.push(null);
  39825. } else {
  39826. var cPoints = [];
  39827. item.forEach(function (items, indexs) {
  39828. var point = {};
  39829. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  39830. var value = items.value || items;
  39831. var height = validHeight * (value - minRange) / (maxRange - minRange);
  39832. height *= process;
  39833. point.y = opts.height - Math.round(height) - opts.area[2];
  39834. cPoints.push(point);
  39835. });
  39836. points.push(cPoints);
  39837. }
  39838. });
  39839. return points;
  39840. }
  39841. function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
  39842. var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
  39843. var boundaryGap = 'center';
  39844. if (opts.type == 'line' || opts.type == 'area') {
  39845. boundaryGap = opts.xAxis.boundaryGap;
  39846. }
  39847. var points = [];
  39848. var validHeight = opts.height - opts.area[0] - opts.area[2];
  39849. var validWidth = opts.width - opts.area[1] - opts.area[3];
  39850. data.forEach(function (item, index) {
  39851. if (item === null) {
  39852. points.push(null);
  39853. } else {
  39854. var point = {};
  39855. point.color = item.color;
  39856. point.x = xAxisPoints[index];
  39857. var value = item;
  39858. if (_typeof(item) === 'object' && item !== null) {
  39859. if (item.constructor.toString().indexOf('Array') > -1) {
  39860. var xranges, xminRange, xmaxRange;
  39861. xranges = [].concat(opts.chartData.xAxisData.ranges);
  39862. xminRange = xranges.shift();
  39863. xmaxRange = xranges.pop();
  39864. value = item[1];
  39865. point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
  39866. } else {
  39867. value = item.value;
  39868. }
  39869. }
  39870. if (boundaryGap == 'center') {
  39871. point.x += Math.round(eachSpacing / 2);
  39872. }
  39873. var height = validHeight * (value - minRange) / (maxRange - minRange);
  39874. height *= process;
  39875. point.y = opts.height - Math.round(height) - opts.area[2];
  39876. points.push(point);
  39877. }
  39878. });
  39879. return points;
  39880. }
  39881. function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
  39882. var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
  39883. var points = [];
  39884. var validHeight = opts.height - opts.area[0] - opts.area[2];
  39885. data.forEach(function (item, index) {
  39886. if (item === null) {
  39887. points.push(null);
  39888. } else {
  39889. var point = {};
  39890. point.color = item.color;
  39891. point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
  39892. if (seriesIndex > 0) {
  39893. var value = 0;
  39894. for (var i = 0; i <= seriesIndex; i++) {
  39895. value += stackSeries[i].data[index];
  39896. }
  39897. var value0 = value - item;
  39898. var height = validHeight * (value - minRange) / (maxRange - minRange);
  39899. var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
  39900. } else {
  39901. var value = item;
  39902. var height = validHeight * (value - minRange) / (maxRange - minRange);
  39903. var height0 = 0;
  39904. }
  39905. var heightc = height0;
  39906. height *= process;
  39907. heightc *= process;
  39908. point.y = opts.height - Math.round(height) - opts.area[2];
  39909. point.y0 = opts.height - Math.round(heightc) - opts.area[2];
  39910. points.push(point);
  39911. }
  39912. });
  39913. return points;
  39914. }
  39915. function getYAxisTextList(series, opts, config, stack) {
  39916. var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  39917. var data;
  39918. if (stack == 'stack') {
  39919. data = dataCombineStack(series, opts.categories.length);
  39920. } else {
  39921. data = dataCombine(series);
  39922. }
  39923. var sorted = [];
  39924. // remove null from data
  39925. data = data.filter(function (item) {
  39926. //return item !== null;
  39927. if (_typeof(item) === 'object' && item !== null) {
  39928. if (item.constructor.toString().indexOf('Array') > -1) {
  39929. return item !== null;
  39930. } else {
  39931. return item.value !== null;
  39932. }
  39933. } else {
  39934. return item !== null;
  39935. }
  39936. });
  39937. data.map(function (item) {
  39938. if (_typeof(item) === 'object') {
  39939. if (item.constructor.toString().indexOf('Array') > -1) {
  39940. if (opts.type == 'candle') {
  39941. item.map(function (subitem) {
  39942. sorted.push(subitem);
  39943. });
  39944. } else {
  39945. sorted.push(item[1]);
  39946. }
  39947. } else {
  39948. sorted.push(item.value);
  39949. }
  39950. } else {
  39951. sorted.push(item);
  39952. }
  39953. });
  39954. var minData = 0;
  39955. var maxData = 0;
  39956. if (sorted.length > 0) {
  39957. minData = Math.min.apply(this, sorted);
  39958. maxData = Math.max.apply(this, sorted);
  39959. }
  39960. //为了兼容v1.9.0之前的项目
  39961. if (index > -1) {
  39962. if (typeof opts.yAxis.data[index].min === 'number') {
  39963. minData = Math.min(opts.yAxis.data[index].min, minData);
  39964. }
  39965. if (typeof opts.yAxis.data[index].max === 'number') {
  39966. maxData = Math.max(opts.yAxis.data[index].max, maxData);
  39967. }
  39968. } else {
  39969. if (typeof opts.yAxis.min === 'number') {
  39970. minData = Math.min(opts.yAxis.min, minData);
  39971. }
  39972. if (typeof opts.yAxis.max === 'number') {
  39973. maxData = Math.max(opts.yAxis.max, maxData);
  39974. }
  39975. }
  39976. if (minData === maxData) {
  39977. var rangeSpan = maxData || 10;
  39978. maxData += rangeSpan;
  39979. }
  39980. var dataRange = getDataRange(minData, maxData);
  39981. var minRange = dataRange.minRange;
  39982. var maxRange = dataRange.maxRange;
  39983. var range = [];
  39984. var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
  39985. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  39986. range.push(minRange + eachRange * i);
  39987. }
  39988. return range.reverse();
  39989. }
  39990. function calYAxisData(series, opts, config) {
  39991. //堆叠图重算Y轴
  39992. var columnstyle = assign({}, {
  39993. type: ""
  39994. }, opts.extra.column);
  39995. //如果是多Y轴,重新计算
  39996. var YLength = opts.yAxis.data.length;
  39997. var newSeries = new Array(YLength);
  39998. if (YLength > 0) {
  39999. for (var i = 0; i < YLength; i++) {
  40000. newSeries[i] = [];
  40001. for (var j = 0; j < series.length; j++) {
  40002. if (series[j].index == i) {
  40003. newSeries[i].push(series[j]);
  40004. }
  40005. }
  40006. }
  40007. var rangesArr = new Array(YLength);
  40008. var rangesFormatArr = new Array(YLength);
  40009. var yAxisWidthArr = new Array(YLength);
  40010. var _loop3 = function _loop3(_i11) {
  40011. var yData = opts.yAxis.data[_i11];
  40012. //如果总开关不显示,强制每个Y轴为不显示
  40013. if (opts.yAxis.disabled == true) {
  40014. yData.disabled = true;
  40015. }
  40016. rangesArr[_i11] = getYAxisTextList(newSeries[_i11], opts, config, columnstyle.type, _i11);
  40017. var yAxisFontSizes = yData.fontSize || config.fontSize;
  40018. yAxisWidthArr[_i11] = {
  40019. position: yData.position ? yData.position : 'left',
  40020. width: 0
  40021. };
  40022. rangesFormatArr[_i11] = rangesArr[_i11].map(function (items) {
  40023. items = util.toFixed(items, 6);
  40024. items = yData.format ? yData.format(Number(items)) : items;
  40025. yAxisWidthArr[_i11].width = Math.max(yAxisWidthArr[_i11].width, measureText(items, yAxisFontSizes) + 5);
  40026. return items;
  40027. });
  40028. var calibration = yData.calibration ? 4 * opts.pixelRatio : 0;
  40029. yAxisWidthArr[_i11].width += calibration + 3 * opts.pixelRatio;
  40030. if (yData.disabled === true) {
  40031. yAxisWidthArr[_i11].width = 0;
  40032. }
  40033. };
  40034. for (var _i11 = 0; _i11 < YLength; _i11++) {
  40035. _loop3(_i11);
  40036. }
  40037. } else {
  40038. var rangesArr = new Array(1);
  40039. var rangesFormatArr = new Array(1);
  40040. var yAxisWidthArr = new Array(1);
  40041. rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type);
  40042. yAxisWidthArr[0] = {
  40043. position: 'left',
  40044. width: 0
  40045. };
  40046. var yAxisFontSize = opts.yAxis.fontSize || config.fontSize;
  40047. rangesFormatArr[0] = rangesArr[0].map(function (item) {
  40048. item = util.toFixed(item, 6);
  40049. item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item;
  40050. yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize) + 5);
  40051. return item;
  40052. });
  40053. yAxisWidthArr[0].width += 3 * opts.pixelRatio;
  40054. if (opts.yAxis.disabled === true) {
  40055. yAxisWidthArr[0] = {
  40056. position: 'left',
  40057. width: 0
  40058. };
  40059. opts.yAxis.data[0] = {
  40060. disabled: true
  40061. };
  40062. } else {
  40063. opts.yAxis.data[0] = {
  40064. disabled: false,
  40065. position: 'left',
  40066. max: opts.yAxis.max,
  40067. min: opts.yAxis.min,
  40068. format: opts.yAxis.format
  40069. };
  40070. }
  40071. }
  40072. return {
  40073. rangesFormat: rangesFormatArr,
  40074. ranges: rangesArr,
  40075. yAxisWidth: yAxisWidthArr
  40076. };
  40077. }
  40078. function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
  40079. var ranges = [].concat(opts.chartData.yAxisData.ranges);
  40080. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  40081. var minAxis = opts.area[0];
  40082. var items = [];
  40083. for (var i = 0; i < ranges.length; i++) {
  40084. var maxVal = ranges[i].shift();
  40085. var minVal = ranges[i].pop();
  40086. var item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
  40087. item = opts.yAxis.data[i].format ? opts.yAxis.data[i].format(Number(item)) : item.toFixed(0);
  40088. items.push(String(item));
  40089. }
  40090. return items;
  40091. }
  40092. function calMarkLineData(points, opts) {
  40093. var minRange, maxRange;
  40094. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  40095. for (var i = 0; i < points.length; i++) {
  40096. points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
  40097. var range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
  40098. minRange = range.pop();
  40099. maxRange = range.shift();
  40100. var height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
  40101. points[i].y = opts.height - Math.round(height) - opts.area[2];
  40102. }
  40103. return points;
  40104. }
  40105. function contextRotate(context, opts) {
  40106. if (opts.rotateLock !== true) {
  40107. context.translate(opts.height, 0);
  40108. context.rotate(90 * Math.PI / 180);
  40109. } else if (opts._rotate_ !== true) {
  40110. context.translate(opts.height, 0);
  40111. context.rotate(90 * Math.PI / 180);
  40112. opts._rotate_ = true;
  40113. }
  40114. }
  40115. function drawPointShape(points, color, shape, context, opts) {
  40116. context.beginPath();
  40117. if (opts.dataPointShapeType == 'hollow') {
  40118. context.setStrokeStyle(color);
  40119. context.setFillStyle(opts.background);
  40120. context.setLineWidth(2 * opts.pixelRatio);
  40121. } else {
  40122. context.setStrokeStyle("#ffffff");
  40123. context.setFillStyle(color);
  40124. context.setLineWidth(1 * opts.pixelRatio);
  40125. }
  40126. if (shape === 'diamond') {
  40127. points.forEach(function (item, index) {
  40128. if (item !== null) {
  40129. context.moveTo(item.x, item.y - 4.5);
  40130. context.lineTo(item.x - 4.5, item.y);
  40131. context.lineTo(item.x, item.y + 4.5);
  40132. context.lineTo(item.x + 4.5, item.y);
  40133. context.lineTo(item.x, item.y - 4.5);
  40134. }
  40135. });
  40136. } else if (shape === 'circle') {
  40137. points.forEach(function (item, index) {
  40138. if (item !== null) {
  40139. context.moveTo(item.x + 2.5 * opts.pixelRatio, item.y);
  40140. context.arc(item.x, item.y, 3 * opts.pixelRatio, 0, 2 * Math.PI, false);
  40141. }
  40142. });
  40143. } else if (shape === 'rect') {
  40144. points.forEach(function (item, index) {
  40145. if (item !== null) {
  40146. context.moveTo(item.x - 3.5, item.y - 3.5);
  40147. context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
  40148. }
  40149. });
  40150. } else if (shape === 'triangle') {
  40151. points.forEach(function (item, index) {
  40152. if (item !== null) {
  40153. context.moveTo(item.x, item.y - 4.5);
  40154. context.lineTo(item.x - 4.5, item.y + 4.5);
  40155. context.lineTo(item.x + 4.5, item.y + 4.5);
  40156. context.lineTo(item.x, item.y - 4.5);
  40157. }
  40158. });
  40159. }
  40160. context.closePath();
  40161. context.fill();
  40162. context.stroke();
  40163. }
  40164. function drawRingTitle(opts, config, context, center) {
  40165. var titlefontSize = opts.title.fontSize || config.titleFontSize;
  40166. var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
  40167. var title = opts.title.name || '';
  40168. var subtitle = opts.subtitle.name || '';
  40169. var titleFontColor = opts.title.color || config.titleColor;
  40170. var subtitleFontColor = opts.subtitle.color || config.subtitleColor;
  40171. var titleHeight = title ? titlefontSize : 0;
  40172. var subtitleHeight = subtitle ? subtitlefontSize : 0;
  40173. var margin = 5;
  40174. if (subtitle) {
  40175. var textWidth = measureText(subtitle, subtitlefontSize);
  40176. var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0);
  40177. var startY = center.y + subtitlefontSize / 2 + (opts.subtitle.offsetY || 0);
  40178. if (title) {
  40179. startY += (titleHeight + margin) / 2;
  40180. }
  40181. context.beginPath();
  40182. context.setFontSize(subtitlefontSize);
  40183. context.setFillStyle(subtitleFontColor);
  40184. context.fillText(subtitle, startX, startY);
  40185. context.closePath();
  40186. context.stroke();
  40187. }
  40188. if (title) {
  40189. var _textWidth = measureText(title, titlefontSize);
  40190. var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
  40191. var _startY = center.y + titlefontSize / 2 + (opts.title.offsetY || 0);
  40192. if (subtitle) {
  40193. _startY -= (subtitleHeight + margin) / 2;
  40194. }
  40195. context.beginPath();
  40196. context.setFontSize(titlefontSize);
  40197. context.setFillStyle(titleFontColor);
  40198. context.fillText(title, _startX, _startY);
  40199. context.closePath();
  40200. context.stroke();
  40201. }
  40202. }
  40203. function drawPointText(points, series, config, context) {
  40204. // 绘制数据文案
  40205. var data = series.data;
  40206. points.forEach(function (item, index) {
  40207. if (item !== null) {
  40208. //var formatVal = series.format ? series.format(data[index]) : data[index];
  40209. context.beginPath();
  40210. context.setFontSize(series.textSize || config.fontSize);
  40211. context.setFillStyle(series.textColor || '#666666');
  40212. var value = data[index];
  40213. if (_typeof(data[index]) === 'object' && data[index] !== null) {
  40214. if (data[index].constructor == Array) {
  40215. value = data[index][1];
  40216. } else {
  40217. value = data[index].value;
  40218. }
  40219. }
  40220. var formatVal = series.format ? series.format(value) : value;
  40221. context.fillText(String(formatVal), item.x - measureText(formatVal, series.textSize || config.fontSize) / 2, item.y - 4);
  40222. context.closePath();
  40223. context.stroke();
  40224. }
  40225. });
  40226. }
  40227. function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
  40228. radius -= gaugeOption.width / 2 + config.gaugeLabelTextMargin;
  40229. var totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  40230. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  40231. var totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
  40232. var splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
  40233. var nowAngle = gaugeOption.startAngle;
  40234. var nowNumber = gaugeOption.startNumber;
  40235. for (var i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
  40236. var pos = {
  40237. x: radius * Math.cos(nowAngle * Math.PI),
  40238. y: radius * Math.sin(nowAngle * Math.PI)
  40239. };
  40240. var labelText = gaugeOption.labelFormat ? gaugeOption.labelFormat(nowNumber) : nowNumber;
  40241. pos.x += centerPosition.x - measureText(labelText) / 2;
  40242. pos.y += centerPosition.y;
  40243. var startX = pos.x;
  40244. var startY = pos.y;
  40245. context.beginPath();
  40246. context.setFontSize(config.fontSize);
  40247. context.setFillStyle(gaugeOption.labelColor || '#666666');
  40248. context.fillText(labelText, startX, startY + config.fontSize / 2);
  40249. context.closePath();
  40250. context.stroke();
  40251. nowAngle += splitAngle;
  40252. if (nowAngle >= 2) {
  40253. nowAngle = nowAngle % 2;
  40254. }
  40255. nowNumber += splitNumber;
  40256. }
  40257. }
  40258. function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
  40259. var radarOption = opts.extra.radar || {};
  40260. radius += config.radarLabelTextMargin;
  40261. angleList.forEach(function (angle, index) {
  40262. var pos = {
  40263. x: radius * Math.cos(angle),
  40264. y: radius * Math.sin(angle)
  40265. };
  40266. var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
  40267. var startX = posRelativeCanvas.x;
  40268. var startY = posRelativeCanvas.y;
  40269. if (util.approximatelyEqual(pos.x, 0)) {
  40270. startX -= measureText(opts.categories[index] || '') / 2;
  40271. } else if (pos.x < 0) {
  40272. startX -= measureText(opts.categories[index] || '');
  40273. }
  40274. context.beginPath();
  40275. context.setFontSize(config.fontSize);
  40276. context.setFillStyle(radarOption.labelColor || '#666666');
  40277. context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
  40278. context.closePath();
  40279. context.stroke();
  40280. });
  40281. }
  40282. function drawPieText(series, opts, config, context, radius, center) {
  40283. var lineRadius = config.pieChartLinePadding;
  40284. var textObjectCollection = [];
  40285. var lastTextObject = null;
  40286. var seriesConvert = series.map(function (item) {
  40287. var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
  40288. if (item._rose_proportion_) item._proportion_ = item._rose_proportion_;
  40289. var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
  40290. var color = item.color;
  40291. var radius = item._radius_;
  40292. return {
  40293. arc: arc,
  40294. text: text,
  40295. color: color,
  40296. radius: radius,
  40297. textColor: item.textColor,
  40298. textSize: item.textSize
  40299. };
  40300. });
  40301. for (var i = 0; i < seriesConvert.length; i++) {
  40302. var item = seriesConvert[i];
  40303. // line end
  40304. var orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
  40305. var orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
  40306. // line start
  40307. var orginX2 = Math.cos(item.arc) * item.radius;
  40308. var orginY2 = Math.sin(item.arc) * item.radius;
  40309. // text start
  40310. var orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
  40311. var orginY3 = orginY1;
  40312. var textWidth = measureText(item.text, item.textSize || config.fontSize);
  40313. var startY = orginY3;
  40314. if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
  40315. x: orginX3
  40316. })) {
  40317. if (orginX3 > 0) {
  40318. startY = Math.min(orginY3, lastTextObject.start.y);
  40319. } else if (orginX1 < 0) {
  40320. startY = Math.max(orginY3, lastTextObject.start.y);
  40321. } else {
  40322. if (orginY3 > 0) {
  40323. startY = Math.max(orginY3, lastTextObject.start.y);
  40324. } else {
  40325. startY = Math.min(orginY3, lastTextObject.start.y);
  40326. }
  40327. }
  40328. }
  40329. if (orginX3 < 0) {
  40330. orginX3 -= textWidth;
  40331. }
  40332. var textObject = {
  40333. lineStart: {
  40334. x: orginX2,
  40335. y: orginY2
  40336. },
  40337. lineEnd: {
  40338. x: orginX1,
  40339. y: orginY1
  40340. },
  40341. start: {
  40342. x: orginX3,
  40343. y: startY
  40344. },
  40345. width: textWidth,
  40346. height: config.fontSize,
  40347. text: item.text,
  40348. color: item.color,
  40349. textColor: item.textColor,
  40350. textSize: item.textSize
  40351. };
  40352. lastTextObject = avoidCollision(textObject, lastTextObject);
  40353. textObjectCollection.push(lastTextObject);
  40354. }
  40355. for (var _i12 = 0; _i12 < textObjectCollection.length; _i12++) {
  40356. var _item6 = textObjectCollection[_i12];
  40357. var lineStartPoistion = convertCoordinateOrigin(_item6.lineStart.x, _item6.lineStart.y, center);
  40358. var lineEndPoistion = convertCoordinateOrigin(_item6.lineEnd.x, _item6.lineEnd.y, center);
  40359. var textPosition = convertCoordinateOrigin(_item6.start.x, _item6.start.y, center);
  40360. context.setLineWidth(1 * opts.pixelRatio);
  40361. context.setFontSize(config.fontSize);
  40362. context.beginPath();
  40363. context.setStrokeStyle(_item6.color);
  40364. context.setFillStyle(_item6.color);
  40365. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  40366. var curveStartX = _item6.start.x < 0 ? textPosition.x + _item6.width : textPosition.x;
  40367. var textStartX = _item6.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
  40368. context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
  40369. context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
  40370. context.stroke();
  40371. context.closePath();
  40372. context.beginPath();
  40373. context.moveTo(textPosition.x + _item6.width, textPosition.y);
  40374. context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
  40375. context.closePath();
  40376. context.fill();
  40377. context.beginPath();
  40378. context.setFontSize(_item6.textSize || config.fontSize);
  40379. context.setFillStyle(_item6.textColor || '#666666');
  40380. context.fillText(_item6.text, textStartX, textPosition.y + 3);
  40381. context.closePath();
  40382. context.stroke();
  40383. context.closePath();
  40384. }
  40385. }
  40386. function drawToolTipSplitLine(offsetX, opts, config, context) {
  40387. var toolTipOption = opts.extra.tooltip || {};
  40388. toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
  40389. toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
  40390. var startY = opts.area[0];
  40391. var endY = opts.height - opts.area[2];
  40392. if (toolTipOption.gridType == 'dash') {
  40393. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  40394. }
  40395. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  40396. context.setLineWidth(1 * opts.pixelRatio);
  40397. context.beginPath();
  40398. context.moveTo(offsetX, startY);
  40399. context.lineTo(offsetX, endY);
  40400. context.stroke();
  40401. context.setLineDash([]);
  40402. if (toolTipOption.xAxisLabel) {
  40403. var labelText = opts.categories[opts.tooltip.index];
  40404. context.setFontSize(config.fontSize);
  40405. var textWidth = measureText(labelText, config.fontSize);
  40406. var textX = offsetX - 0.5 * textWidth;
  40407. var textY = endY;
  40408. context.beginPath();
  40409. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  40410. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  40411. context.setLineWidth(1 * opts.pixelRatio);
  40412. context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
  40413. context.closePath();
  40414. context.stroke();
  40415. context.fill();
  40416. context.beginPath();
  40417. context.setFontSize(config.fontSize);
  40418. context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);
  40419. context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
  40420. context.closePath();
  40421. context.stroke();
  40422. }
  40423. }
  40424. function drawMarkLine(opts, config, context) {
  40425. var markLineOption = assign({}, {
  40426. type: 'solid',
  40427. dashLength: 4,
  40428. data: []
  40429. }, opts.extra.markLine);
  40430. var startX = opts.area[3];
  40431. var endX = opts.width - opts.area[1];
  40432. var points = calMarkLineData(markLineOption.data, opts);
  40433. for (var i = 0; i < points.length; i++) {
  40434. var item = assign({}, {
  40435. lineColor: '#DE4A42',
  40436. showLabel: false,
  40437. labelFontColor: '#666666',
  40438. labelBgColor: '#DFE8FF',
  40439. labelBgOpacity: 0.8,
  40440. yAxisIndex: 0
  40441. }, points[i]);
  40442. if (markLineOption.type == 'dash') {
  40443. context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
  40444. }
  40445. context.setStrokeStyle(item.lineColor);
  40446. context.setLineWidth(1 * opts.pixelRatio);
  40447. context.beginPath();
  40448. context.moveTo(startX, item.y);
  40449. context.lineTo(endX, item.y);
  40450. context.stroke();
  40451. context.setLineDash([]);
  40452. if (item.showLabel) {
  40453. var labelText = opts.yAxis.format ? opts.yAxis.format(Number(item.value)) : item.value;
  40454. context.setFontSize(config.fontSize);
  40455. var textWidth = measureText(labelText, config.fontSize);
  40456. var bgStartX = opts.padding[3] + config.yAxisTitleWidth - config.toolTipPadding;
  40457. var bgEndX = Math.max(opts.area[3], textWidth + config.toolTipPadding * 2);
  40458. var bgWidth = bgEndX - bgStartX;
  40459. var textX = bgStartX + (bgWidth - textWidth) / 2;
  40460. var textY = item.y;
  40461. context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
  40462. context.setStrokeStyle(item.labelBgColor);
  40463. context.setLineWidth(1 * opts.pixelRatio);
  40464. context.beginPath();
  40465. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  40466. context.closePath();
  40467. context.stroke();
  40468. context.fill();
  40469. context.beginPath();
  40470. context.setFontSize(config.fontSize);
  40471. context.setFillStyle(item.labelFontColor);
  40472. context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
  40473. context.stroke();
  40474. }
  40475. }
  40476. }
  40477. function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
  40478. var toolTipOption = assign({}, {
  40479. gridType: 'solid',
  40480. dashLength: 4
  40481. }, opts.extra.tooltip);
  40482. var startX = opts.area[3];
  40483. var endX = opts.width - opts.area[1];
  40484. if (toolTipOption.gridType == 'dash') {
  40485. context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
  40486. }
  40487. context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
  40488. context.setLineWidth(1 * opts.pixelRatio);
  40489. context.beginPath();
  40490. context.moveTo(startX, opts.tooltip.offset.y);
  40491. context.lineTo(endX, opts.tooltip.offset.y);
  40492. context.stroke();
  40493. context.setLineDash([]);
  40494. if (toolTipOption.yAxisLabel) {
  40495. var labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
  40496. var widthArr = opts.chartData.yAxisData.yAxisWidth;
  40497. var tStartLeft = opts.area[3];
  40498. var tStartRight = opts.width - opts.area[1];
  40499. for (var i = 0; i < labelText.length; i++) {
  40500. context.setFontSize(config.fontSize);
  40501. var textWidth = measureText(labelText[i], config.fontSize);
  40502. var bgStartX = void 0,
  40503. bgEndX = void 0,
  40504. bgWidth = void 0;
  40505. if (widthArr[i].position == 'left') {
  40506. bgStartX = tStartLeft - widthArr[i].width;
  40507. bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
  40508. } else {
  40509. bgStartX = tStartRight;
  40510. bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
  40511. }
  40512. bgWidth = bgEndX - bgStartX;
  40513. var textX = bgStartX + (bgWidth - textWidth) / 2;
  40514. var textY = opts.tooltip.offset.y;
  40515. context.beginPath();
  40516. context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
  40517. context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
  40518. context.setLineWidth(1 * opts.pixelRatio);
  40519. context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
  40520. context.closePath();
  40521. context.stroke();
  40522. context.fill();
  40523. context.beginPath();
  40524. context.setFontSize(config.fontSize);
  40525. context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);
  40526. context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
  40527. context.closePath();
  40528. context.stroke();
  40529. if (widthArr[i].position == 'left') {
  40530. tStartLeft -= widthArr[i].width + opts.yAxis.padding;
  40531. } else {
  40532. tStartRight += widthArr[i].width + opts.yAxis.padding;
  40533. }
  40534. }
  40535. }
  40536. }
  40537. function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
  40538. var toolTipOption = assign({}, {
  40539. activeBgColor: '#000000',
  40540. activeBgOpacity: 0.08
  40541. }, opts.extra.tooltip);
  40542. var startY = opts.area[0];
  40543. var endY = opts.height - opts.area[2];
  40544. context.beginPath();
  40545. context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
  40546. context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
  40547. context.closePath();
  40548. context.fill();
  40549. }
  40550. function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
  40551. var toolTipOption = assign({}, {
  40552. showBox: true,
  40553. bgColor: '#000000',
  40554. bgOpacity: 0.7,
  40555. fontColor: '#FFFFFF'
  40556. }, opts.extra.tooltip);
  40557. var legendWidth = 4 * opts.pixelRatio;
  40558. var legendMarginRight = 5 * opts.pixelRatio;
  40559. var arrowWidth = 8 * opts.pixelRatio;
  40560. var isOverRightBorder = false;
  40561. if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
  40562. drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
  40563. }
  40564. offset = assign({
  40565. x: 0,
  40566. y: 0
  40567. }, offset);
  40568. offset.y -= 8 * opts.pixelRatio;
  40569. var textWidth = textList.map(function (item) {
  40570. return measureText(item.text, config.fontSize);
  40571. });
  40572. var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
  40573. var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
  40574. if (toolTipOption.showBox == false) {
  40575. return;
  40576. }
  40577. // if beyond the right border
  40578. if (offset.x - Math.abs(opts._scrollDistance_) + arrowWidth + toolTipWidth > opts.width) {
  40579. isOverRightBorder = true;
  40580. }
  40581. if (toolTipHeight + offset.y > opts.height) {
  40582. offset.y = opts.height - toolTipHeight;
  40583. }
  40584. // draw background rect
  40585. context.beginPath();
  40586. context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
  40587. if (isOverRightBorder) {
  40588. context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);
  40589. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);
  40590. context.lineTo(offset.x - arrowWidth, offset.y);
  40591. context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y);
  40592. context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y + toolTipHeight);
  40593. context.lineTo(offset.x - arrowWidth, offset.y + toolTipHeight);
  40594. context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);
  40595. context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);
  40596. } else {
  40597. context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);
  40598. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);
  40599. context.lineTo(offset.x + arrowWidth, offset.y);
  40600. context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y);
  40601. context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y + toolTipHeight);
  40602. context.lineTo(offset.x + arrowWidth, offset.y + toolTipHeight);
  40603. context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);
  40604. context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);
  40605. }
  40606. context.closePath();
  40607. context.fill();
  40608. // draw legend
  40609. textList.forEach(function (item, index) {
  40610. if (item.color !== null) {
  40611. context.beginPath();
  40612. context.setFillStyle(item.color);
  40613. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
  40614. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1;
  40615. if (isOverRightBorder) {
  40616. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
  40617. }
  40618. context.fillRect(startX, startY, legendWidth, config.fontSize);
  40619. context.closePath();
  40620. }
  40621. });
  40622. // draw text list
  40623. textList.forEach(function (item, index) {
  40624. var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
  40625. if (isOverRightBorder) {
  40626. startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
  40627. }
  40628. var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding;
  40629. context.beginPath();
  40630. context.setFontSize(config.fontSize);
  40631. context.setFillStyle(toolTipOption.fontColor);
  40632. context.fillText(item.text, startX, startY + config.fontSize);
  40633. context.closePath();
  40634. context.stroke();
  40635. });
  40636. }
  40637. function drawYAxisTitle(title, opts, config, context) {
  40638. var startX = config.xAxisHeight + (opts.height - config.xAxisHeight - measureText(title)) / 2;
  40639. context.save();
  40640. context.beginPath();
  40641. context.setFontSize(config.fontSize);
  40642. context.setFillStyle(opts.yAxis.titleFontColor || '#333333');
  40643. context.translate(0, opts.height);
  40644. context.rotate(-90 * Math.PI / 180);
  40645. context.fillText(title, startX, opts.padding[3] + 0.5 * config.fontSize);
  40646. context.closePath();
  40647. context.stroke();
  40648. context.restore();
  40649. }
  40650. function drawColumnDataPoints(series, opts, config, context) {
  40651. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40652. var xAxisData = opts.chartData.xAxisData,
  40653. xAxisPoints = xAxisData.xAxisPoints,
  40654. eachSpacing = xAxisData.eachSpacing;
  40655. var columnOption = assign({}, {
  40656. type: 'group',
  40657. width: eachSpacing / 2,
  40658. meter: {
  40659. border: 4,
  40660. fillColor: '#FFFFFF'
  40661. }
  40662. }, opts.extra.column);
  40663. var calPoints = [];
  40664. context.save();
  40665. var leftNum = -2;
  40666. var rightNum = xAxisPoints.length + 2;
  40667. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  40668. context.translate(opts._scrollDistance_, 0);
  40669. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  40670. rightNum = leftNum + opts.xAxis.itemCount + 4;
  40671. }
  40672. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  40673. drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
  40674. }
  40675. series.forEach(function (eachSeries, seriesIndex) {
  40676. var ranges, minRange, maxRange;
  40677. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  40678. minRange = ranges.pop();
  40679. maxRange = ranges.shift();
  40680. var data = eachSeries.data;
  40681. switch (columnOption.type) {
  40682. case 'group':
  40683. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40684. var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  40685. calPoints.push(tooltipPoints);
  40686. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  40687. for (var i = 0; i < points.length; i++) {
  40688. var item = points[i];
  40689. if (item !== null && i > leftNum && i < rightNum) {
  40690. context.beginPath();
  40691. context.setStrokeStyle(item.color || eachSeries.color);
  40692. context.setLineWidth(1);
  40693. context.setFillStyle(item.color || eachSeries.color);
  40694. var startX = item.x - item.width / 2;
  40695. var height = opts.height - item.y - opts.area[2];
  40696. context.moveTo(startX, item.y);
  40697. context.lineTo(startX + item.width - 2, item.y);
  40698. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  40699. context.lineTo(startX, opts.height - opts.area[2]);
  40700. context.lineTo(startX, item.y);
  40701. context.closePath();
  40702. context.stroke();
  40703. context.fill();
  40704. }
  40705. }
  40706. ;
  40707. break;
  40708. case 'stack':
  40709. // 绘制堆叠数据图
  40710. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  40711. calPoints.push(points);
  40712. points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
  40713. for (var _i13 = 0; _i13 < points.length; _i13++) {
  40714. var _item7 = points[_i13];
  40715. if (_item7 !== null && _i13 > leftNum && _i13 < rightNum) {
  40716. context.beginPath();
  40717. context.setFillStyle(_item7.color || eachSeries.color);
  40718. var startX = _item7.x - _item7.width / 2 + 1;
  40719. var height = opts.height - _item7.y - opts.area[2];
  40720. var height0 = opts.height - _item7.y0 - opts.area[2];
  40721. if (seriesIndex > 0) {
  40722. height -= height0;
  40723. }
  40724. context.moveTo(startX, _item7.y);
  40725. context.fillRect(startX, _item7.y, _item7.width - 2, height);
  40726. context.closePath();
  40727. context.fill();
  40728. }
  40729. }
  40730. ;
  40731. break;
  40732. case 'meter':
  40733. // 绘制温度计数据图
  40734. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40735. calPoints.push(points);
  40736. points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meter.border);
  40737. if (seriesIndex == 0) {
  40738. for (var _i14 = 0; _i14 < points.length; _i14++) {
  40739. var _item8 = points[_i14];
  40740. if (_item8 !== null && _i14 > leftNum && _i14 < rightNum) {
  40741. //画背景颜色
  40742. context.beginPath();
  40743. context.setFillStyle(columnOption.meter.fillColor);
  40744. var startX = _item8.x - _item8.width / 2;
  40745. var height = opts.height - _item8.y - opts.area[2];
  40746. context.moveTo(startX, _item8.y);
  40747. context.fillRect(startX, _item8.y, _item8.width, height);
  40748. context.closePath();
  40749. context.fill();
  40750. //画边框线
  40751. if (columnOption.meter.border > 0) {
  40752. context.beginPath();
  40753. context.setStrokeStyle(eachSeries.color);
  40754. context.setLineWidth(columnOption.meter.border * opts.pixelRatio);
  40755. context.moveTo(startX + columnOption.meter.border * 0.5, _item8.y + height);
  40756. context.lineTo(startX + columnOption.meter.border * 0.5, _item8.y + columnOption.meter.border * 0.5);
  40757. context.lineTo(startX + _item8.width - columnOption.meter.border * 0.5, _item8.y + columnOption.meter.border * 0.5);
  40758. context.lineTo(startX + _item8.width - columnOption.meter.border * 0.5, _item8.y + height);
  40759. context.stroke();
  40760. }
  40761. }
  40762. }
  40763. ;
  40764. } else {
  40765. for (var _i15 = 0; _i15 < points.length; _i15++) {
  40766. var _item9 = points[_i15];
  40767. if (_item9 !== null && _i15 > leftNum && _i15 < rightNum) {
  40768. context.beginPath();
  40769. context.setFillStyle(_item9.color || eachSeries.color);
  40770. var startX = _item9.x - _item9.width / 2;
  40771. var height = opts.height - _item9.y - opts.area[2];
  40772. context.moveTo(startX, _item9.y);
  40773. context.fillRect(startX, _item9.y, _item9.width, height);
  40774. context.closePath();
  40775. context.fill();
  40776. }
  40777. }
  40778. ;
  40779. }
  40780. break;
  40781. }
  40782. });
  40783. if (opts.dataLabel !== false && process === 1) {
  40784. series.forEach(function (eachSeries, seriesIndex) {
  40785. var ranges, minRange, maxRange;
  40786. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  40787. minRange = ranges.pop();
  40788. maxRange = ranges.shift();
  40789. var data = eachSeries.data;
  40790. switch (columnOption.type) {
  40791. case 'group':
  40792. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40793. points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
  40794. drawPointText(points, eachSeries, config, context);
  40795. break;
  40796. case 'stack':
  40797. var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
  40798. drawPointText(points, eachSeries, config, context);
  40799. break;
  40800. case 'meter':
  40801. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40802. drawPointText(points, eachSeries, config, context);
  40803. break;
  40804. }
  40805. });
  40806. }
  40807. context.restore();
  40808. return {
  40809. xAxisPoints: xAxisPoints,
  40810. calPoints: calPoints,
  40811. eachSpacing: eachSpacing
  40812. };
  40813. }
  40814. function drawCandleDataPoints(series, seriesMA, opts, config, context) {
  40815. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  40816. var candleOption = assign({}, {
  40817. color: {},
  40818. average: {}
  40819. }, opts.extra.candle);
  40820. candleOption.color = assign({}, {
  40821. upLine: '#f04864',
  40822. upFill: '#f04864',
  40823. downLine: '#2fc25b',
  40824. downFill: '#2fc25b'
  40825. }, candleOption.color);
  40826. candleOption.average = assign({}, {
  40827. show: false,
  40828. name: [],
  40829. day: [],
  40830. color: config.colors
  40831. }, candleOption.average);
  40832. opts.extra.candle = candleOption;
  40833. var xAxisData = opts.chartData.xAxisData,
  40834. xAxisPoints = xAxisData.xAxisPoints,
  40835. eachSpacing = xAxisData.eachSpacing;
  40836. var calPoints = [];
  40837. context.save();
  40838. var leftNum = -2;
  40839. var rightNum = xAxisPoints.length + 2;
  40840. var leftSpace = 0;
  40841. var rightSpace = opts.width + eachSpacing;
  40842. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  40843. context.translate(opts._scrollDistance_, 0);
  40844. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  40845. rightNum = leftNum + opts.xAxis.itemCount + 4;
  40846. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  40847. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  40848. }
  40849. //画均线
  40850. if (candleOption.average.show || seriesMA) {
  40851. //Merge pull request !12 from 邱贵翔
  40852. seriesMA.forEach(function (eachSeries, seriesIndex) {
  40853. var ranges, minRange, maxRange;
  40854. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  40855. minRange = ranges.pop();
  40856. maxRange = ranges.shift();
  40857. var data = eachSeries.data;
  40858. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40859. var splitPointList = splitPoints(points);
  40860. for (var i = 0; i < splitPointList.length; i++) {
  40861. var _points = splitPointList[i];
  40862. context.beginPath();
  40863. context.setStrokeStyle(eachSeries.color);
  40864. context.setLineWidth(1);
  40865. if (_points.length === 1) {
  40866. context.moveTo(_points[0].x, _points[0].y);
  40867. context.arc(_points[0].x, _points[0].y, 1, 0, 2 * Math.PI);
  40868. } else {
  40869. context.moveTo(_points[0].x, _points[0].y);
  40870. var startPoint = 0;
  40871. for (var j = 0; j < _points.length; j++) {
  40872. var item = _points[j];
  40873. if (startPoint == 0 && item.x > leftSpace) {
  40874. context.moveTo(item.x, item.y);
  40875. startPoint = 1;
  40876. }
  40877. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  40878. var ctrlPoint = createCurveControlPoints(_points, j - 1);
  40879. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  40880. }
  40881. }
  40882. context.moveTo(_points[0].x, _points[0].y);
  40883. }
  40884. context.closePath();
  40885. context.stroke();
  40886. }
  40887. });
  40888. }
  40889. //画K线
  40890. series.forEach(function (eachSeries, seriesIndex) {
  40891. var ranges, minRange, maxRange;
  40892. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  40893. minRange = ranges.pop();
  40894. maxRange = ranges.shift();
  40895. var data = eachSeries.data;
  40896. var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40897. calPoints.push(points);
  40898. var splitPointList = splitPoints(points);
  40899. for (var i = 0; i < splitPointList[0].length; i++) {
  40900. if (i > leftNum && i < rightNum) {
  40901. var item = splitPointList[0][i];
  40902. context.beginPath();
  40903. //如果上涨
  40904. if (data[i][1] - data[i][0] > 0) {
  40905. context.setStrokeStyle(candleOption.color.upLine);
  40906. context.setFillStyle(candleOption.color.upFill);
  40907. context.setLineWidth(1 * opts.pixelRatio);
  40908. context.moveTo(item[3].x, item[3].y); //顶点
  40909. context.lineTo(item[1].x, item[1].y); //收盘中间点
  40910. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  40911. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  40912. context.lineTo(item[0].x, item[0].y); //开盘中间点
  40913. context.lineTo(item[2].x, item[2].y); //底点
  40914. context.lineTo(item[0].x, item[0].y); //开盘中间点
  40915. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  40916. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  40917. context.lineTo(item[1].x, item[1].y); //收盘中间点
  40918. context.moveTo(item[3].x, item[3].y); //顶点
  40919. } else {
  40920. context.setStrokeStyle(candleOption.color.downLine);
  40921. context.setFillStyle(candleOption.color.downFill);
  40922. context.setLineWidth(1 * opts.pixelRatio);
  40923. context.moveTo(item[3].x, item[3].y); //顶点
  40924. context.lineTo(item[0].x, item[0].y); //开盘中间点
  40925. context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
  40926. context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
  40927. context.lineTo(item[1].x, item[1].y); //收盘中间点
  40928. context.lineTo(item[2].x, item[2].y); //底点
  40929. context.lineTo(item[1].x, item[1].y); //收盘中间点
  40930. context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
  40931. context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
  40932. context.lineTo(item[0].x, item[0].y); //开盘中间点
  40933. context.moveTo(item[3].x, item[3].y); //顶点
  40934. }
  40935. context.closePath();
  40936. context.fill();
  40937. context.stroke();
  40938. }
  40939. }
  40940. });
  40941. context.restore();
  40942. return {
  40943. xAxisPoints: xAxisPoints,
  40944. calPoints: calPoints,
  40945. eachSpacing: eachSpacing
  40946. };
  40947. }
  40948. function drawAreaDataPoints(series, opts, config, context) {
  40949. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  40950. var areaOption = assign({}, {
  40951. type: 'straight',
  40952. opacity: 0.2,
  40953. addLine: false,
  40954. width: 2,
  40955. gradient: false
  40956. }, opts.extra.area);
  40957. var xAxisData = opts.chartData.xAxisData,
  40958. xAxisPoints = xAxisData.xAxisPoints,
  40959. eachSpacing = xAxisData.eachSpacing;
  40960. var endY = opts.height - opts.area[2];
  40961. var calPoints = [];
  40962. context.save();
  40963. var leftSpace = 0;
  40964. var rightSpace = opts.width + eachSpacing;
  40965. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  40966. context.translate(opts._scrollDistance_, 0);
  40967. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  40968. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  40969. }
  40970. series.forEach(function (eachSeries, seriesIndex) {
  40971. var ranges, minRange, maxRange;
  40972. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  40973. minRange = ranges.pop();
  40974. maxRange = ranges.shift();
  40975. var data = eachSeries.data;
  40976. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  40977. calPoints.push(points);
  40978. var splitPointList = splitPoints(points);
  40979. for (var i = 0; i < splitPointList.length; i++) {
  40980. var _points2 = splitPointList[i];
  40981. // 绘制区域数
  40982. context.beginPath();
  40983. context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  40984. if (areaOption.gradient) {
  40985. var gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
  40986. gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
  40987. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  40988. context.setFillStyle(gradient);
  40989. } else {
  40990. context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
  40991. }
  40992. context.setLineWidth(areaOption.width * opts.pixelRatio);
  40993. if (_points2.length > 1) {
  40994. var firstPoint = _points2[0];
  40995. var lastPoint = _points2[_points2.length - 1];
  40996. context.moveTo(firstPoint.x, firstPoint.y);
  40997. var startPoint = 0;
  40998. if (areaOption.type === 'curve') {
  40999. for (var j = 0; j < _points2.length; j++) {
  41000. var item = _points2[j];
  41001. if (startPoint == 0 && item.x > leftSpace) {
  41002. context.moveTo(item.x, item.y);
  41003. startPoint = 1;
  41004. }
  41005. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  41006. var ctrlPoint = createCurveControlPoints(_points2, j - 1);
  41007. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  41008. }
  41009. }
  41010. ;
  41011. } else {
  41012. for (var _j = 0; _j < _points2.length; _j++) {
  41013. var _item10 = _points2[_j];
  41014. if (startPoint == 0 && _item10.x > leftSpace) {
  41015. context.moveTo(_item10.x, _item10.y);
  41016. startPoint = 1;
  41017. }
  41018. if (_j > 0 && _item10.x > leftSpace && _item10.x < rightSpace) {
  41019. context.lineTo(_item10.x, _item10.y);
  41020. }
  41021. }
  41022. ;
  41023. }
  41024. context.lineTo(lastPoint.x, endY);
  41025. context.lineTo(firstPoint.x, endY);
  41026. context.lineTo(firstPoint.x, firstPoint.y);
  41027. } else {
  41028. var _item11 = _points2[0];
  41029. context.moveTo(_item11.x - eachSpacing / 2, _item11.y);
  41030. context.lineTo(_item11.x + eachSpacing / 2, _item11.y);
  41031. context.lineTo(_item11.x + eachSpacing / 2, endY);
  41032. context.lineTo(_item11.x - eachSpacing / 2, endY);
  41033. context.moveTo(_item11.x - eachSpacing / 2, _item11.y);
  41034. }
  41035. context.closePath();
  41036. context.fill();
  41037. //画连线
  41038. if (areaOption.addLine) {
  41039. if (eachSeries.lineType == 'dash') {
  41040. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  41041. dashLength *= opts.pixelRatio;
  41042. context.setLineDash([dashLength, dashLength]);
  41043. }
  41044. context.beginPath();
  41045. context.setStrokeStyle(eachSeries.color);
  41046. context.setLineWidth(areaOption.width * opts.pixelRatio);
  41047. if (_points2.length === 1) {
  41048. context.moveTo(_points2[0].x, _points2[0].y);
  41049. context.arc(_points2[0].x, _points2[0].y, 1, 0, 2 * Math.PI);
  41050. } else {
  41051. context.moveTo(_points2[0].x, _points2[0].y);
  41052. var _startPoint = 0;
  41053. if (areaOption.type === 'curve') {
  41054. for (var _j2 = 0; _j2 < _points2.length; _j2++) {
  41055. var _item12 = _points2[_j2];
  41056. if (_startPoint == 0 && _item12.x > leftSpace) {
  41057. context.moveTo(_item12.x, _item12.y);
  41058. _startPoint = 1;
  41059. }
  41060. if (_j2 > 0 && _item12.x > leftSpace && _item12.x < rightSpace) {
  41061. var _ctrlPoint = createCurveControlPoints(_points2, _j2 - 1);
  41062. context.bezierCurveTo(_ctrlPoint.ctrA.x, _ctrlPoint.ctrA.y, _ctrlPoint.ctrB.x, _ctrlPoint.ctrB.y, _item12.x, _item12.y);
  41063. }
  41064. }
  41065. ;
  41066. } else {
  41067. for (var _j3 = 0; _j3 < _points2.length; _j3++) {
  41068. var _item13 = _points2[_j3];
  41069. if (_startPoint == 0 && _item13.x > leftSpace) {
  41070. context.moveTo(_item13.x, _item13.y);
  41071. _startPoint = 1;
  41072. }
  41073. if (_j3 > 0 && _item13.x > leftSpace && _item13.x < rightSpace) {
  41074. context.lineTo(_item13.x, _item13.y);
  41075. }
  41076. }
  41077. ;
  41078. }
  41079. context.moveTo(_points2[0].x, _points2[0].y);
  41080. }
  41081. context.stroke();
  41082. context.setLineDash([]);
  41083. }
  41084. }
  41085. //画点
  41086. if (opts.dataPointShape !== false) {
  41087. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  41088. }
  41089. });
  41090. if (opts.dataLabel !== false && process === 1) {
  41091. series.forEach(function (eachSeries, seriesIndex) {
  41092. var ranges, minRange, maxRange;
  41093. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  41094. minRange = ranges.pop();
  41095. maxRange = ranges.shift();
  41096. var data = eachSeries.data;
  41097. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  41098. drawPointText(points, eachSeries, config, context);
  41099. });
  41100. }
  41101. context.restore();
  41102. return {
  41103. xAxisPoints: xAxisPoints,
  41104. calPoints: calPoints,
  41105. eachSpacing: eachSpacing
  41106. };
  41107. }
  41108. function drawLineDataPoints(series, opts, config, context) {
  41109. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41110. var lineOption = assign({}, {
  41111. type: 'straight',
  41112. width: 2
  41113. }, opts.extra.line);
  41114. lineOption.width *= opts.pixelRatio;
  41115. var xAxisData = opts.chartData.xAxisData,
  41116. xAxisPoints = xAxisData.xAxisPoints,
  41117. eachSpacing = xAxisData.eachSpacing;
  41118. var calPoints = [];
  41119. context.save();
  41120. var leftSpace = 0;
  41121. var rightSpace = opts.width + eachSpacing;
  41122. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  41123. context.translate(opts._scrollDistance_, 0);
  41124. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  41125. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  41126. }
  41127. series.forEach(function (eachSeries, seriesIndex) {
  41128. var ranges, minRange, maxRange;
  41129. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  41130. minRange = ranges.pop();
  41131. maxRange = ranges.shift();
  41132. var data = eachSeries.data;
  41133. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  41134. calPoints.push(points);
  41135. var splitPointList = splitPoints(points);
  41136. if (eachSeries.lineType == 'dash') {
  41137. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  41138. dashLength *= opts.pixelRatio;
  41139. context.setLineDash([dashLength, dashLength]);
  41140. }
  41141. context.beginPath();
  41142. context.setStrokeStyle(eachSeries.color);
  41143. context.setLineWidth(lineOption.width);
  41144. splitPointList.forEach(function (points, index) {
  41145. if (points.length === 1) {
  41146. context.moveTo(points[0].x, points[0].y);
  41147. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  41148. } else {
  41149. context.moveTo(points[0].x, points[0].y);
  41150. var startPoint = 0;
  41151. if (lineOption.type === 'curve') {
  41152. for (var j = 0; j < points.length; j++) {
  41153. var item = points[j];
  41154. if (startPoint == 0 && item.x > leftSpace) {
  41155. context.moveTo(item.x, item.y);
  41156. startPoint = 1;
  41157. }
  41158. if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
  41159. var ctrlPoint = createCurveControlPoints(points, j - 1);
  41160. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
  41161. }
  41162. }
  41163. ;
  41164. }
  41165. if (lineOption.type === 'straight') {
  41166. for (var _j4 = 0; _j4 < points.length; _j4++) {
  41167. var _item14 = points[_j4];
  41168. if (startPoint == 0 && _item14.x > leftSpace) {
  41169. context.moveTo(_item14.x, _item14.y);
  41170. startPoint = 1;
  41171. }
  41172. if (_j4 > 0 && _item14.x > leftSpace && _item14.x < rightSpace) {
  41173. context.lineTo(_item14.x, _item14.y);
  41174. }
  41175. }
  41176. ;
  41177. }
  41178. if (lineOption.type === 'step') {
  41179. for (var _j5 = 0; _j5 < points.length; _j5++) {
  41180. var _item15 = points[_j5];
  41181. if (startPoint == 0 && _item15.x > leftSpace) {
  41182. context.moveTo(_item15.x, _item15.y);
  41183. startPoint = 1;
  41184. }
  41185. if (_j5 > 0 && _item15.x > leftSpace && _item15.x < rightSpace) {
  41186. context.lineTo(_item15.x, points[_j5 - 1].y);
  41187. context.lineTo(_item15.x, _item15.y);
  41188. }
  41189. }
  41190. ;
  41191. }
  41192. context.moveTo(points[0].x, points[0].y);
  41193. }
  41194. });
  41195. context.stroke();
  41196. context.setLineDash([]);
  41197. if (opts.dataPointShape !== false) {
  41198. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  41199. }
  41200. });
  41201. if (opts.dataLabel !== false && process === 1) {
  41202. series.forEach(function (eachSeries, seriesIndex) {
  41203. var ranges, minRange, maxRange;
  41204. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  41205. minRange = ranges.pop();
  41206. maxRange = ranges.shift();
  41207. var data = eachSeries.data;
  41208. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  41209. drawPointText(points, eachSeries, config, context);
  41210. });
  41211. }
  41212. context.restore();
  41213. return {
  41214. xAxisPoints: xAxisPoints,
  41215. calPoints: calPoints,
  41216. eachSpacing: eachSpacing
  41217. };
  41218. }
  41219. function drawMixDataPoints(series, opts, config, context) {
  41220. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41221. var xAxisData = opts.chartData.xAxisData,
  41222. xAxisPoints = xAxisData.xAxisPoints,
  41223. eachSpacing = xAxisData.eachSpacing;
  41224. var endY = opts.height - opts.area[2];
  41225. var calPoints = [];
  41226. var columnIndex = 0;
  41227. var columnLength = 0;
  41228. series.forEach(function (eachSeries, seriesIndex) {
  41229. if (eachSeries.type == 'column') {
  41230. columnLength += 1;
  41231. }
  41232. });
  41233. context.save();
  41234. var leftNum = -2;
  41235. var rightNum = xAxisPoints.length + 2;
  41236. var leftSpace = 0;
  41237. var rightSpace = opts.width + eachSpacing;
  41238. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  41239. context.translate(opts._scrollDistance_, 0);
  41240. leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
  41241. rightNum = leftNum + opts.xAxis.itemCount + 4;
  41242. leftSpace = -opts._scrollDistance_ - eachSpacing + opts.area[3];
  41243. rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
  41244. }
  41245. series.forEach(function (eachSeries, seriesIndex) {
  41246. var ranges, minRange, maxRange;
  41247. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  41248. minRange = ranges.pop();
  41249. maxRange = ranges.shift();
  41250. var data = eachSeries.data;
  41251. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  41252. calPoints.push(points);
  41253. // 绘制柱状数据图
  41254. if (eachSeries.type == 'column') {
  41255. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  41256. for (var i = 0; i < points.length; i++) {
  41257. var item = points[i];
  41258. if (item !== null && i > leftNum && i < rightNum) {
  41259. context.beginPath();
  41260. context.setStrokeStyle(item.color || eachSeries.color);
  41261. context.setLineWidth(1);
  41262. context.setFillStyle(item.color || eachSeries.color);
  41263. var startX = item.x - item.width / 2;
  41264. var height = opts.height - item.y - opts.area[2];
  41265. context.moveTo(startX, item.y);
  41266. context.moveTo(startX, item.y);
  41267. context.lineTo(startX + item.width - 2, item.y);
  41268. context.lineTo(startX + item.width - 2, opts.height - opts.area[2]);
  41269. context.lineTo(startX, opts.height - opts.area[2]);
  41270. context.lineTo(startX, item.y);
  41271. context.closePath();
  41272. context.stroke();
  41273. context.fill();
  41274. context.closePath();
  41275. context.fill();
  41276. }
  41277. }
  41278. columnIndex += 1;
  41279. }
  41280. //绘制区域图数据
  41281. if (eachSeries.type == 'area') {
  41282. var _splitPointList = splitPoints(points);
  41283. for (var _i16 = 0; _i16 < _splitPointList.length; _i16++) {
  41284. var _points3 = _splitPointList[_i16];
  41285. // 绘制区域数据
  41286. context.beginPath();
  41287. context.setStrokeStyle(eachSeries.color);
  41288. context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
  41289. context.setLineWidth(2 * opts.pixelRatio);
  41290. if (_points3.length > 1) {
  41291. var firstPoint = _points3[0];
  41292. var lastPoint = _points3[_points3.length - 1];
  41293. context.moveTo(firstPoint.x, firstPoint.y);
  41294. var startPoint = 0;
  41295. if (eachSeries.style === 'curve') {
  41296. for (var j = 0; j < _points3.length; j++) {
  41297. var _item16 = _points3[j];
  41298. if (startPoint == 0 && _item16.x > leftSpace) {
  41299. context.moveTo(_item16.x, _item16.y);
  41300. startPoint = 1;
  41301. }
  41302. if (j > 0 && _item16.x > leftSpace && _item16.x < rightSpace) {
  41303. var ctrlPoint = createCurveControlPoints(_points3, j - 1);
  41304. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item16.x, _item16.y);
  41305. }
  41306. }
  41307. ;
  41308. } else {
  41309. for (var _j6 = 0; _j6 < _points3.length; _j6++) {
  41310. var _item17 = _points3[_j6];
  41311. if (startPoint == 0 && _item17.x > leftSpace) {
  41312. context.moveTo(_item17.x, _item17.y);
  41313. startPoint = 1;
  41314. }
  41315. if (_j6 > 0 && _item17.x > leftSpace && _item17.x < rightSpace) {
  41316. context.lineTo(_item17.x, _item17.y);
  41317. }
  41318. }
  41319. ;
  41320. }
  41321. context.lineTo(lastPoint.x, endY);
  41322. context.lineTo(firstPoint.x, endY);
  41323. context.lineTo(firstPoint.x, firstPoint.y);
  41324. } else {
  41325. var _item18 = _points3[0];
  41326. context.moveTo(_item18.x - eachSpacing / 2, _item18.y);
  41327. context.lineTo(_item18.x + eachSpacing / 2, _item18.y);
  41328. context.lineTo(_item18.x + eachSpacing / 2, endY);
  41329. context.lineTo(_item18.x - eachSpacing / 2, endY);
  41330. context.moveTo(_item18.x - eachSpacing / 2, _item18.y);
  41331. }
  41332. context.closePath();
  41333. context.fill();
  41334. }
  41335. }
  41336. // 绘制折线数据图
  41337. if (eachSeries.type == 'line') {
  41338. var splitPointList = splitPoints(points);
  41339. splitPointList.forEach(function (points, index) {
  41340. if (eachSeries.lineType == 'dash') {
  41341. var dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
  41342. dashLength *= opts.pixelRatio;
  41343. context.setLineDash([dashLength, dashLength]);
  41344. }
  41345. context.beginPath();
  41346. context.setStrokeStyle(eachSeries.color);
  41347. context.setLineWidth(2 * opts.pixelRatio);
  41348. if (points.length === 1) {
  41349. context.moveTo(points[0].x, points[0].y);
  41350. context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
  41351. } else {
  41352. context.moveTo(points[0].x, points[0].y);
  41353. var _startPoint2 = 0;
  41354. if (eachSeries.style == 'curve') {
  41355. for (var _j7 = 0; _j7 < points.length; _j7++) {
  41356. var _item19 = points[_j7];
  41357. if (_startPoint2 == 0 && _item19.x > leftSpace) {
  41358. context.moveTo(_item19.x, _item19.y);
  41359. _startPoint2 = 1;
  41360. }
  41361. if (_j7 > 0 && _item19.x > leftSpace && _item19.x < rightSpace) {
  41362. var ctrlPoint = createCurveControlPoints(points, _j7 - 1);
  41363. context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, _item19.x, _item19.y);
  41364. }
  41365. }
  41366. } else {
  41367. for (var _j8 = 0; _j8 < points.length; _j8++) {
  41368. var _item20 = points[_j8];
  41369. if (_startPoint2 == 0 && _item20.x > leftSpace) {
  41370. context.moveTo(_item20.x, _item20.y);
  41371. _startPoint2 = 1;
  41372. }
  41373. if (_j8 > 0 && _item20.x > leftSpace && _item20.x < rightSpace) {
  41374. context.lineTo(_item20.x, _item20.y);
  41375. }
  41376. }
  41377. }
  41378. context.moveTo(points[0].x, points[0].y);
  41379. }
  41380. context.stroke();
  41381. context.setLineDash([]);
  41382. });
  41383. }
  41384. // 绘制点数据图
  41385. if (eachSeries.type == 'point') {
  41386. eachSeries.addPoint = true;
  41387. }
  41388. if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
  41389. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  41390. }
  41391. });
  41392. if (opts.dataLabel !== false && process === 1) {
  41393. var columnIndex = 0;
  41394. series.forEach(function (eachSeries, seriesIndex) {
  41395. var ranges, minRange, maxRange;
  41396. ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
  41397. minRange = ranges.pop();
  41398. maxRange = ranges.shift();
  41399. var data = eachSeries.data;
  41400. var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
  41401. if (eachSeries.type !== 'column') {
  41402. drawPointText(points, eachSeries, config, context);
  41403. } else {
  41404. points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
  41405. drawPointText(points, eachSeries, config, context);
  41406. columnIndex += 1;
  41407. }
  41408. });
  41409. }
  41410. context.restore();
  41411. return {
  41412. xAxisPoints: xAxisPoints,
  41413. calPoints: calPoints,
  41414. eachSpacing: eachSpacing
  41415. };
  41416. }
  41417. function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
  41418. var toolTipOption = opts.extra.tooltip || {};
  41419. if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
  41420. drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints);
  41421. }
  41422. context.save();
  41423. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
  41424. context.translate(opts._scrollDistance_, 0);
  41425. }
  41426. if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
  41427. drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
  41428. }
  41429. context.restore();
  41430. }
  41431. function drawXAxis(categories, opts, config, context) {
  41432. var xAxisData = opts.chartData.xAxisData,
  41433. xAxisPoints = xAxisData.xAxisPoints,
  41434. startX = xAxisData.startX,
  41435. endX = xAxisData.endX,
  41436. eachSpacing = xAxisData.eachSpacing;
  41437. var boundaryGap = 'center';
  41438. if (opts.type == 'line' || opts.type == 'area') {
  41439. boundaryGap = opts.xAxis.boundaryGap;
  41440. }
  41441. var startY = opts.height - opts.area[2];
  41442. var endY = opts.area[0];
  41443. //绘制滚动条
  41444. if (opts.enableScroll && opts.xAxis.scrollShow) {
  41445. var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
  41446. var scrollScreenWidth = endX - startX;
  41447. var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
  41448. var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
  41449. var scrollLeft = 0;
  41450. if (opts._scrollDistance_) {
  41451. scrollLeft = -opts._scrollDistance_ * scrollScreenWidth / scrollTotalWidth;
  41452. }
  41453. context.beginPath();
  41454. context.setLineCap('round');
  41455. context.setLineWidth(6 * opts.pixelRatio);
  41456. context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
  41457. context.moveTo(startX, scrollY);
  41458. context.lineTo(endX, scrollY);
  41459. context.stroke();
  41460. context.closePath();
  41461. context.beginPath();
  41462. context.setLineCap('round');
  41463. context.setLineWidth(6 * opts.pixelRatio);
  41464. context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
  41465. context.moveTo(startX + scrollLeft, scrollY);
  41466. context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
  41467. context.stroke();
  41468. context.closePath();
  41469. context.setLineCap('butt');
  41470. }
  41471. context.save();
  41472. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  41473. context.translate(opts._scrollDistance_, 0);
  41474. }
  41475. //绘制X轴刻度线
  41476. if (opts.xAxis.calibration === true) {
  41477. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  41478. context.setLineCap('butt');
  41479. context.setLineWidth(1 * opts.pixelRatio);
  41480. xAxisPoints.forEach(function (item, index) {
  41481. if (index > 0) {
  41482. context.beginPath();
  41483. context.moveTo(item - eachSpacing / 2, startY);
  41484. context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pixelRatio);
  41485. context.closePath();
  41486. context.stroke();
  41487. }
  41488. });
  41489. }
  41490. //绘制X轴网格
  41491. if (opts.xAxis.disableGrid !== true) {
  41492. context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
  41493. context.setLineCap('butt');
  41494. context.setLineWidth(1 * opts.pixelRatio);
  41495. if (opts.xAxis.gridType == 'dash') {
  41496. context.setLineDash([opts.xAxis.dashLength, opts.xAxis.dashLength]);
  41497. }
  41498. opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
  41499. xAxisPoints.forEach(function (item, index) {
  41500. if (index % opts.xAxis.gridEval == 0) {
  41501. context.beginPath();
  41502. context.moveTo(item, startY);
  41503. context.lineTo(item, endY);
  41504. context.stroke();
  41505. }
  41506. });
  41507. context.setLineDash([]);
  41508. }
  41509. //绘制X轴文案
  41510. if (opts.xAxis.disabled !== true) {
  41511. // 对X轴列表做抽稀处理
  41512. //默认全部显示X轴标签
  41513. var maxXAxisListLength = categories.length;
  41514. //如果设置了X轴单屏数量
  41515. if (opts.xAxis.labelCount) {
  41516. //如果设置X轴密度
  41517. if (opts.xAxis.itemCount) {
  41518. maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
  41519. } else {
  41520. maxXAxisListLength = opts.xAxis.labelCount;
  41521. }
  41522. maxXAxisListLength -= 1;
  41523. }
  41524. var ratio = Math.ceil(categories.length / maxXAxisListLength);
  41525. var newCategories = [];
  41526. var cgLength = categories.length;
  41527. for (var i = 0; i < cgLength; i++) {
  41528. if (i % ratio !== 0) {
  41529. newCategories.push("");
  41530. } else {
  41531. newCategories.push(categories[i]);
  41532. }
  41533. }
  41534. newCategories[cgLength - 1] = categories[cgLength - 1];
  41535. var xAxisFontSize = opts.xAxis.fontSize || config.fontSize;
  41536. if (config._xAxisTextAngle_ === 0) {
  41537. newCategories.forEach(function (item, index) {
  41538. var offset = -measureText(String(item), xAxisFontSize) / 2;
  41539. if (boundaryGap == 'center') {
  41540. offset += eachSpacing / 2;
  41541. }
  41542. var scrollHeight = 0;
  41543. if (opts.xAxis.scrollShow) {
  41544. scrollHeight = 6 * opts.pixelRatio;
  41545. }
  41546. context.beginPath();
  41547. context.setFontSize(xAxisFontSize);
  41548. context.setFillStyle(opts.xAxis.fontColor || '#666666');
  41549. context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
  41550. context.closePath();
  41551. context.stroke();
  41552. });
  41553. } else {
  41554. newCategories.forEach(function (item, index) {
  41555. context.save();
  41556. context.beginPath();
  41557. context.setFontSize(xAxisFontSize);
  41558. context.setFillStyle(opts.xAxis.fontColor || '#666666');
  41559. var textWidth = measureText(String(item), xAxisFontSize);
  41560. var offset = -textWidth;
  41561. if (boundaryGap == 'center') {
  41562. offset += eachSpacing / 2;
  41563. }
  41564. var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
  41565. transX = _calRotateTranslate.transX,
  41566. transY = _calRotateTranslate.transY;
  41567. context.rotate(-1 * config._xAxisTextAngle_);
  41568. context.translate(transX, transY);
  41569. context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
  41570. context.closePath();
  41571. context.stroke();
  41572. context.restore();
  41573. });
  41574. }
  41575. }
  41576. context.restore();
  41577. //绘制X轴轴线
  41578. if (opts.xAxis.axisLine) {
  41579. context.beginPath();
  41580. context.setStrokeStyle(opts.xAxis.axisLineColor);
  41581. context.setLineWidth(1 * opts.pixelRatio);
  41582. context.moveTo(startX, opts.height - opts.area[2]);
  41583. context.lineTo(endX, opts.height - opts.area[2]);
  41584. context.stroke();
  41585. }
  41586. }
  41587. function drawYAxisGrid(categories, opts, config, context) {
  41588. if (opts.yAxis.disableGrid === true) {
  41589. return;
  41590. }
  41591. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  41592. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  41593. var startX = opts.area[3];
  41594. var xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  41595. xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
  41596. var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
  41597. var endX = startX + TotalWidth;
  41598. var points = [];
  41599. for (var i = 0; i < opts.yAxis.splitNumber + 1; i++) {
  41600. points.push(opts.height - opts.area[2] - eachSpacing * i);
  41601. }
  41602. context.save();
  41603. if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
  41604. context.translate(opts._scrollDistance_, 0);
  41605. }
  41606. if (opts.yAxis.gridType == 'dash') {
  41607. context.setLineDash([opts.yAxis.dashLength, opts.yAxis.dashLength]);
  41608. }
  41609. context.setStrokeStyle(opts.yAxis.gridColor);
  41610. context.setLineWidth(1 * opts.pixelRatio);
  41611. points.forEach(function (item, index) {
  41612. context.beginPath();
  41613. context.moveTo(startX, item);
  41614. context.lineTo(endX, item);
  41615. context.stroke();
  41616. });
  41617. context.setLineDash([]);
  41618. context.restore();
  41619. }
  41620. function drawYAxis(series, opts, config, context) {
  41621. if (opts.yAxis.disabled === true) {
  41622. return;
  41623. }
  41624. var spacingValid = opts.height - opts.area[0] - opts.area[2];
  41625. var eachSpacing = spacingValid / opts.yAxis.splitNumber;
  41626. var startX = opts.area[3];
  41627. var endX = opts.width - opts.area[1];
  41628. var endY = opts.height - opts.area[2];
  41629. var fillEndY = endY + config.xAxisHeight;
  41630. if (opts.xAxis.scrollShow) {
  41631. fillEndY -= 3 * opts.pixelRatio;
  41632. }
  41633. if (opts.xAxis.rotateLabel) {
  41634. fillEndY = opts.height - opts.area[2] + 3;
  41635. }
  41636. // set YAxis background
  41637. context.beginPath();
  41638. context.setFillStyle(opts.background || '#ffffff');
  41639. if (opts._scrollDistance_ < 0) {
  41640. context.fillRect(0, 0, startX, fillEndY);
  41641. }
  41642. if (opts.enableScroll == true) {
  41643. context.fillRect(endX, 0, opts.width, fillEndY);
  41644. }
  41645. context.closePath();
  41646. context.stroke();
  41647. var points = [];
  41648. for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
  41649. points.push(opts.area[0] + eachSpacing * i);
  41650. }
  41651. var tStartLeft = opts.area[3];
  41652. var tStartRight = opts.width - opts.area[1];
  41653. var _loop4 = function _loop4(_i17) {
  41654. var yData = opts.yAxis.data[_i17];
  41655. if (yData.disabled !== true) {
  41656. var rangesFormat = opts.chartData.yAxisData.rangesFormat[_i17];
  41657. var yAxisFontSize = yData.fontSize || config.fontSize;
  41658. var yAxisWidth = opts.chartData.yAxisData.yAxisWidth[_i17];
  41659. //画Y轴刻度及文案
  41660. rangesFormat.forEach(function (item, index) {
  41661. var pos = points[index] ? points[index] : endY;
  41662. context.beginPath();
  41663. context.setFontSize(yAxisFontSize);
  41664. context.setLineWidth(1 * opts.pixelRatio);
  41665. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  41666. context.setFillStyle(yData.fontColor || '#666666');
  41667. if (yAxisWidth.position == 'left') {
  41668. context.fillText(String(item), tStartLeft - yAxisWidth.width, pos + yAxisFontSize / 2);
  41669. //画刻度线
  41670. if (yData.calibration == true) {
  41671. context.moveTo(tStartLeft, pos);
  41672. context.lineTo(tStartLeft - 3 * opts.pixelRatio, pos);
  41673. }
  41674. } else {
  41675. context.fillText(String(item), tStartRight + 4 * opts.pixelRatio, pos + yAxisFontSize / 2);
  41676. //画刻度线
  41677. if (yData.calibration == true) {
  41678. context.moveTo(tStartRight, pos);
  41679. context.lineTo(tStartRight + 3 * opts.pixelRatio, pos);
  41680. }
  41681. }
  41682. context.closePath();
  41683. context.stroke();
  41684. });
  41685. //画Y轴轴线
  41686. if (yData.axisLine !== false) {
  41687. context.beginPath();
  41688. context.setStrokeStyle(yData.axisLineColor || '#cccccc');
  41689. context.setLineWidth(1 * opts.pixelRatio);
  41690. if (yAxisWidth.position == 'left') {
  41691. context.moveTo(tStartLeft, opts.height - opts.area[2]);
  41692. context.lineTo(tStartLeft, opts.area[0]);
  41693. } else {
  41694. context.moveTo(tStartRight, opts.height - opts.area[2]);
  41695. context.lineTo(tStartRight, opts.area[0]);
  41696. }
  41697. context.stroke();
  41698. }
  41699. //画Y轴标题
  41700. if (opts.yAxis.showTitle) {
  41701. var titleFontSize = yData.titleFontSize || config.fontSize;
  41702. var title = yData.title;
  41703. context.beginPath();
  41704. context.setFontSize(titleFontSize);
  41705. context.setFillStyle(yData.titleFontColor || '#666666');
  41706. if (yAxisWidth.position == 'left') {
  41707. context.fillText(title, tStartLeft - measureText(title, titleFontSize) / 2, opts.area[0] - 10 * opts.pixelRatio);
  41708. } else {
  41709. context.fillText(title, tStartRight - measureText(title, titleFontSize) / 2, opts.area[0] - 10 * opts.pixelRatio);
  41710. }
  41711. context.closePath();
  41712. context.stroke();
  41713. }
  41714. if (yAxisWidth.position == 'left') {
  41715. tStartLeft -= yAxisWidth.width + opts.yAxis.padding;
  41716. } else {
  41717. tStartRight += yAxisWidth.width + opts.yAxis.padding;
  41718. }
  41719. }
  41720. };
  41721. for (var _i17 = 0; _i17 < opts.yAxis.data.length; _i17++) {
  41722. _loop4(_i17);
  41723. }
  41724. }
  41725. function drawLegend(series, opts, config, context, chartData) {
  41726. if (opts.legend.show === false) {
  41727. return;
  41728. }
  41729. var legendData = chartData.legendData;
  41730. var legendList = legendData.points;
  41731. var legendArea = legendData.area;
  41732. var padding = opts.legend.padding;
  41733. var fontSize = opts.legend.fontSize;
  41734. var shapeWidth = 15 * opts.pixelRatio;
  41735. var shapeRight = 5 * opts.pixelRatio;
  41736. var itemGap = opts.legend.itemGap;
  41737. var lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);
  41738. //画背景及边框
  41739. context.beginPath();
  41740. context.setLineWidth(opts.legend.borderWidth);
  41741. context.setStrokeStyle(opts.legend.borderColor);
  41742. context.setFillStyle(opts.legend.backgroundColor);
  41743. context.moveTo(legendArea.start.x, legendArea.start.y);
  41744. context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
  41745. context.closePath();
  41746. context.fill();
  41747. context.stroke();
  41748. legendList.forEach(function (itemList, listIndex) {
  41749. var width = 0;
  41750. var height = 0;
  41751. width = legendData.widthArr[listIndex];
  41752. height = legendData.heightArr[listIndex];
  41753. var startX = 0;
  41754. var startY = 0;
  41755. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  41756. startX = legendArea.start.x + (legendArea.width - width) / 2;
  41757. startY = legendArea.start.y + padding + listIndex * lineHeight;
  41758. } else {
  41759. if (listIndex == 0) {
  41760. width = 0;
  41761. } else {
  41762. width = legendData.widthArr[listIndex - 1];
  41763. }
  41764. startX = legendArea.start.x + padding + width;
  41765. startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
  41766. }
  41767. context.setFontSize(config.fontSize);
  41768. for (var i = 0; i < itemList.length; i++) {
  41769. var item = itemList[i];
  41770. item.area = [0, 0, 0, 0];
  41771. item.area[0] = startX;
  41772. item.area[1] = startY;
  41773. item.area[3] = startY + lineHeight;
  41774. context.beginPath();
  41775. context.setLineWidth(1 * opts.pixelRatio);
  41776. context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
  41777. context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
  41778. switch (item.legendShape) {
  41779. case 'line':
  41780. context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio);
  41781. context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio, 15 * opts.pixelRatio, 4 * opts.pixelRatio);
  41782. break;
  41783. case 'triangle':
  41784. context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  41785. context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
  41786. context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
  41787. context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  41788. break;
  41789. case 'diamond':
  41790. context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  41791. context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
  41792. context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
  41793. context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
  41794. context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  41795. break;
  41796. case 'circle':
  41797. context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
  41798. context.arc(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight, 5 * opts.pixelRatio, 0, 2 * Math.PI);
  41799. break;
  41800. case 'rect':
  41801. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  41802. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);
  41803. break;
  41804. default:
  41805. context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
  41806. context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);
  41807. }
  41808. context.closePath();
  41809. context.fill();
  41810. context.stroke();
  41811. startX += shapeWidth + shapeRight;
  41812. var fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
  41813. context.beginPath();
  41814. context.setFontSize(fontSize);
  41815. context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
  41816. context.fillText(item.name, startX, startY + fontTrans);
  41817. context.closePath();
  41818. context.stroke();
  41819. if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
  41820. startX += measureText(item.name, fontSize) + itemGap;
  41821. item.area[2] = startX;
  41822. } else {
  41823. item.area[2] = startX + measureText(item.name, fontSize) + itemGap;
  41824. ;
  41825. startX -= shapeWidth + shapeRight;
  41826. startY += lineHeight;
  41827. }
  41828. }
  41829. });
  41830. }
  41831. function drawPieDataPoints(series, opts, config, context) {
  41832. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41833. var pieOption = assign({}, {
  41834. activeOpacity: 0.5,
  41835. activeRadius: 10 * opts.pixelRatio,
  41836. offsetAngle: 0,
  41837. labelWidth: 15 * opts.pixelRatio,
  41838. ringWidth: 0,
  41839. border: false,
  41840. borderWidth: 2,
  41841. borderColor: '#FFFFFF'
  41842. }, opts.extra.pie);
  41843. var centerPosition = {
  41844. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  41845. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  41846. };
  41847. if (config.pieChartLinePadding == 0) {
  41848. config.pieChartLinePadding = pieOption.activeRadius;
  41849. }
  41850. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  41851. series = getPieDataPoints(series, radius, process);
  41852. var activeRadius = pieOption.activeRadius;
  41853. series = series.map(function (eachSeries) {
  41854. eachSeries._start_ += pieOption.offsetAngle * Math.PI / 180;
  41855. return eachSeries;
  41856. });
  41857. series.forEach(function (eachSeries, seriesIndex) {
  41858. if (opts.tooltip) {
  41859. if (opts.tooltip.index == seriesIndex) {
  41860. context.beginPath();
  41861. context.setFillStyle(hexToRgb(eachSeries.color, opts.extra.pie.activeOpacity || 0.5));
  41862. context.moveTo(centerPosition.x, centerPosition.y);
  41863. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  41864. context.closePath();
  41865. context.fill();
  41866. }
  41867. }
  41868. context.beginPath();
  41869. context.setLineWidth(pieOption.borderWidth * opts.pixelRatio);
  41870. context.lineJoin = "round";
  41871. context.setStrokeStyle(pieOption.borderColor);
  41872. context.setFillStyle(eachSeries.color);
  41873. context.moveTo(centerPosition.x, centerPosition.y);
  41874. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
  41875. context.closePath();
  41876. context.fill();
  41877. if (pieOption.border == true) {
  41878. context.stroke();
  41879. }
  41880. });
  41881. if (opts.type === 'ring') {
  41882. var innerPieWidth = radius * 0.6;
  41883. if (typeof opts.extra.pie.ringWidth === 'number' && opts.extra.pie.ringWidth > 0) {
  41884. innerPieWidth = Math.max(0, radius - opts.extra.pie.ringWidth);
  41885. }
  41886. context.beginPath();
  41887. context.setFillStyle(opts.background || '#ffffff');
  41888. context.moveTo(centerPosition.x, centerPosition.y);
  41889. context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
  41890. context.closePath();
  41891. context.fill();
  41892. }
  41893. if (opts.dataLabel !== false && process === 1) {
  41894. var valid = false;
  41895. for (var i = 0, len = series.length; i < len; i++) {
  41896. if (series[i].data > 0) {
  41897. valid = true;
  41898. break;
  41899. }
  41900. }
  41901. if (valid) {
  41902. drawPieText(series, opts, config, context, radius, centerPosition);
  41903. }
  41904. }
  41905. if (process === 1 && opts.type === 'ring') {
  41906. drawRingTitle(opts, config, context, centerPosition);
  41907. }
  41908. return {
  41909. center: centerPosition,
  41910. radius: radius,
  41911. series: series
  41912. };
  41913. }
  41914. function drawRoseDataPoints(series, opts, config, context) {
  41915. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41916. var roseOption = assign({}, {
  41917. type: 'area',
  41918. activeOpacity: 0.5,
  41919. activeRadius: 10 * opts.pixelRatio,
  41920. offsetAngle: 0,
  41921. labelWidth: 15 * opts.pixelRatio,
  41922. border: false,
  41923. borderWidth: 2,
  41924. borderColor: '#FFFFFF'
  41925. }, opts.extra.rose);
  41926. if (config.pieChartLinePadding == 0) {
  41927. config.pieChartLinePadding = roseOption.activeRadius;
  41928. }
  41929. var centerPosition = {
  41930. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  41931. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  41932. };
  41933. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
  41934. var minRadius = roseOption.minRadius || radius * 0.5;
  41935. series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
  41936. var activeRadius = roseOption.activeRadius;
  41937. series = series.map(function (eachSeries) {
  41938. eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
  41939. return eachSeries;
  41940. });
  41941. series.forEach(function (eachSeries, seriesIndex) {
  41942. if (opts.tooltip) {
  41943. if (opts.tooltip.index == seriesIndex) {
  41944. context.beginPath();
  41945. context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
  41946. context.moveTo(centerPosition.x, centerPosition.y);
  41947. context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  41948. context.closePath();
  41949. context.fill();
  41950. }
  41951. }
  41952. context.beginPath();
  41953. context.setLineWidth(roseOption.borderWidth * opts.pixelRatio);
  41954. context.lineJoin = "round";
  41955. context.setStrokeStyle(roseOption.borderColor);
  41956. context.setFillStyle(eachSeries.color);
  41957. context.moveTo(centerPosition.x, centerPosition.y);
  41958. context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
  41959. context.closePath();
  41960. context.fill();
  41961. if (roseOption.border == true) {
  41962. context.stroke();
  41963. }
  41964. });
  41965. if (opts.dataLabel !== false && process === 1) {
  41966. var valid = false;
  41967. for (var i = 0, len = series.length; i < len; i++) {
  41968. if (series[i].data > 0) {
  41969. valid = true;
  41970. break;
  41971. }
  41972. }
  41973. if (valid) {
  41974. drawPieText(series, opts, config, context, radius, centerPosition);
  41975. }
  41976. }
  41977. return {
  41978. center: centerPosition,
  41979. radius: radius,
  41980. series: series
  41981. };
  41982. }
  41983. function drawArcbarDataPoints(series, opts, config, context) {
  41984. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  41985. var arcbarOption = assign({}, {
  41986. startAngle: 0.75,
  41987. endAngle: 0.25,
  41988. type: 'default',
  41989. width: 12 * opts.pixelRatio,
  41990. gap: 2 * opts.pixelRatio
  41991. }, opts.extra.arcbar);
  41992. series = getArcbarDataPoints(series, arcbarOption, process);
  41993. var centerPosition;
  41994. if (arcbarOption.center) {
  41995. centerPosition = arcbarOption.center;
  41996. } else {
  41997. centerPosition = {
  41998. x: opts.width / 2,
  41999. y: opts.height / 2
  42000. };
  42001. }
  42002. var radius;
  42003. if (arcbarOption.radius) {
  42004. radius = arcbarOption.radius;
  42005. } else {
  42006. radius = Math.min(centerPosition.x, centerPosition.y);
  42007. radius -= 5 * opts.pixelRatio;
  42008. radius -= arcbarOption.width / 2;
  42009. }
  42010. for (var i = 0; i < series.length; i++) {
  42011. var eachSeries = series[i];
  42012. //背景颜色
  42013. context.setLineWidth(arcbarOption.width);
  42014. context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
  42015. context.setLineCap('round');
  42016. context.beginPath();
  42017. if (arcbarOption.type == 'default') {
  42018. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width + arcbarOption.gap) * i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);
  42019. } else {
  42020. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width + arcbarOption.gap) * i, 0, 2 * Math.PI, false);
  42021. }
  42022. context.stroke();
  42023. //进度条
  42024. context.setLineWidth(arcbarOption.width);
  42025. context.setStrokeStyle(eachSeries.color);
  42026. context.setLineCap('round');
  42027. context.beginPath();
  42028. context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width + arcbarOption.gap) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);
  42029. context.stroke();
  42030. }
  42031. drawRingTitle(opts, config, context, centerPosition);
  42032. return {
  42033. center: centerPosition,
  42034. radius: radius,
  42035. series: series
  42036. };
  42037. }
  42038. function drawGaugeDataPoints(categories, series, opts, config, context) {
  42039. var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
  42040. var gaugeOption = assign({}, {
  42041. type: 'default',
  42042. startAngle: 0.75,
  42043. endAngle: 0.25,
  42044. width: 15,
  42045. splitLine: {
  42046. fixRadius: 0,
  42047. splitNumber: 10,
  42048. width: 15,
  42049. color: '#FFFFFF',
  42050. childNumber: 5,
  42051. childWidth: 5
  42052. },
  42053. pointer: {
  42054. width: 15,
  42055. color: 'auto'
  42056. }
  42057. }, opts.extra.gauge);
  42058. if (gaugeOption.oldAngle == undefined) {
  42059. gaugeOption.oldAngle = gaugeOption.startAngle;
  42060. }
  42061. if (gaugeOption.oldData == undefined) {
  42062. gaugeOption.oldData = 0;
  42063. }
  42064. categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
  42065. var centerPosition = {
  42066. x: opts.width / 2,
  42067. y: opts.height / 2
  42068. };
  42069. var radius = Math.min(centerPosition.x, centerPosition.y);
  42070. radius -= 5 * opts.pixelRatio;
  42071. radius -= gaugeOption.width / 2;
  42072. var innerRadius = radius - gaugeOption.width;
  42073. var totalAngle = 0;
  42074. //判断仪表盘的样式:default百度样式,progress新样式
  42075. if (gaugeOption.type == 'progress') {
  42076. //## 第一步画中心圆形背景和进度条背景
  42077. //中心圆形背景
  42078. var pieRadius = radius - gaugeOption.width * 3;
  42079. context.beginPath();
  42080. var gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
  42081. //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
  42082. gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
  42083. gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
  42084. context.setFillStyle(gradient);
  42085. context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
  42086. context.fill();
  42087. //画进度条背景
  42088. context.setLineWidth(gaugeOption.width);
  42089. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  42090. context.setLineCap('round');
  42091. context.beginPath();
  42092. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
  42093. context.stroke();
  42094. //## 第二步画刻度线
  42095. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  42096. var splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  42097. var childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  42098. var startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  42099. var endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  42100. context.save();
  42101. context.translate(centerPosition.x, centerPosition.y);
  42102. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  42103. var len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
  42104. var proc = series[0].data * process;
  42105. for (var i = 0; i < len; i++) {
  42106. context.beginPath();
  42107. //刻度线随进度变色
  42108. if (proc > i / len) {
  42109. context.setStrokeStyle(hexToRgb(series[0].color, 1));
  42110. } else {
  42111. context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
  42112. }
  42113. context.setLineWidth(3 * opts.pixelRatio);
  42114. context.moveTo(startX, 0);
  42115. context.lineTo(endX, 0);
  42116. context.stroke();
  42117. context.rotate(childAngle * Math.PI);
  42118. }
  42119. context.restore();
  42120. //## 第三步画进度条
  42121. series = getArcbarDataPoints(series, gaugeOption, process);
  42122. context.setLineWidth(gaugeOption.width);
  42123. context.setStrokeStyle(series[0].color);
  42124. context.setLineCap('round');
  42125. context.beginPath();
  42126. context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
  42127. context.stroke();
  42128. //## 第四步画指针
  42129. var pointerRadius = radius - gaugeOption.width * 2.5;
  42130. context.save();
  42131. context.translate(centerPosition.x, centerPosition.y);
  42132. context.rotate((series[0]._proportion_ - 1) * Math.PI);
  42133. context.beginPath();
  42134. context.setLineWidth(gaugeOption.width / 3);
  42135. var gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
  42136. gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
  42137. gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
  42138. gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
  42139. context.setStrokeStyle(gradient3);
  42140. context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
  42141. context.stroke();
  42142. context.beginPath();
  42143. context.setLineWidth(1);
  42144. context.setStrokeStyle(series[0].color);
  42145. context.setFillStyle(series[0].color);
  42146. context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  42147. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
  42148. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
  42149. context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
  42150. context.stroke();
  42151. context.fill();
  42152. context.restore();
  42153. //default百度样式
  42154. } else {
  42155. //画背景
  42156. context.setLineWidth(gaugeOption.width);
  42157. context.setLineCap('butt');
  42158. for (var _i18 = 0; _i18 < categories.length; _i18++) {
  42159. var eachCategories = categories[_i18];
  42160. context.beginPath();
  42161. context.setStrokeStyle(eachCategories.color);
  42162. context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
  42163. context.stroke();
  42164. }
  42165. context.save();
  42166. //画刻度线
  42167. totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
  42168. var _splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
  42169. var _childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
  42170. var _startX2 = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
  42171. var _endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
  42172. var childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
  42173. context.translate(centerPosition.x, centerPosition.y);
  42174. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  42175. for (var _i19 = 0; _i19 < gaugeOption.splitLine.splitNumber + 1; _i19++) {
  42176. context.beginPath();
  42177. context.setStrokeStyle(gaugeOption.splitLine.color);
  42178. context.setLineWidth(2 * opts.pixelRatio);
  42179. context.moveTo(_startX2, 0);
  42180. context.lineTo(_endX, 0);
  42181. context.stroke();
  42182. context.rotate(_splitAngle * Math.PI);
  42183. }
  42184. context.restore();
  42185. context.save();
  42186. context.translate(centerPosition.x, centerPosition.y);
  42187. context.rotate((gaugeOption.startAngle - 1) * Math.PI);
  42188. for (var _i20 = 0; _i20 < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; _i20++) {
  42189. context.beginPath();
  42190. context.setStrokeStyle(gaugeOption.splitLine.color);
  42191. context.setLineWidth(1 * opts.pixelRatio);
  42192. context.moveTo(_startX2, 0);
  42193. context.lineTo(childendX, 0);
  42194. context.stroke();
  42195. context.rotate(_childAngle * Math.PI);
  42196. }
  42197. context.restore();
  42198. //画指针
  42199. series = getGaugeDataPoints(series, categories, gaugeOption, process);
  42200. for (var _i21 = 0; _i21 < series.length; _i21++) {
  42201. var eachSeries = series[_i21];
  42202. context.save();
  42203. context.translate(centerPosition.x, centerPosition.y);
  42204. context.rotate((eachSeries._proportion_ - 1) * Math.PI);
  42205. context.beginPath();
  42206. context.setFillStyle(eachSeries.color);
  42207. context.moveTo(gaugeOption.pointer.width, 0);
  42208. context.lineTo(0, -gaugeOption.pointer.width / 2);
  42209. context.lineTo(-innerRadius, 0);
  42210. context.lineTo(0, gaugeOption.pointer.width / 2);
  42211. context.lineTo(gaugeOption.pointer.width, 0);
  42212. context.closePath();
  42213. context.fill();
  42214. context.beginPath();
  42215. context.setFillStyle('#FFFFFF');
  42216. context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
  42217. context.fill();
  42218. context.restore();
  42219. }
  42220. if (opts.dataLabel !== false) {
  42221. drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
  42222. }
  42223. }
  42224. //画仪表盘标题,副标题
  42225. drawRingTitle(opts, config, context, centerPosition);
  42226. if (process === 1 && opts.type === 'gauge') {
  42227. opts.extra.gauge.oldAngle = series[0]._proportion_;
  42228. opts.extra.gauge.oldData = series[0].data;
  42229. }
  42230. return {
  42231. center: centerPosition,
  42232. radius: radius,
  42233. innerRadius: innerRadius,
  42234. categories: categories,
  42235. totalAngle: totalAngle
  42236. };
  42237. }
  42238. function drawRadarDataPoints(series, opts, config, context) {
  42239. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  42240. var radarOption = assign({}, {
  42241. gridColor: '#cccccc',
  42242. gridType: 'radar',
  42243. labelColor: '#666666',
  42244. opacity: 0.2,
  42245. gridCount: 3
  42246. }, opts.extra.radar);
  42247. var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
  42248. var centerPosition = {
  42249. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  42250. y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
  42251. };
  42252. var radius = Math.min(centerPosition.x - (getMaxTextListLength(opts.categories) + config.radarLabelTextMargin), centerPosition.y - config.radarLabelTextMargin);
  42253. //TODO逻辑不对
  42254. radius -= opts.padding[1];
  42255. // 画分割线
  42256. context.beginPath();
  42257. context.setLineWidth(1 * opts.pixelRatio);
  42258. context.setStrokeStyle(radarOption.gridColor);
  42259. coordinateAngle.forEach(function (angle) {
  42260. var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
  42261. context.moveTo(centerPosition.x, centerPosition.y);
  42262. context.lineTo(pos.x, pos.y);
  42263. });
  42264. context.stroke();
  42265. context.closePath();
  42266. // 画背景网格
  42267. var _loop = function _loop(i) {
  42268. var startPos = {};
  42269. context.beginPath();
  42270. context.setLineWidth(1 * opts.pixelRatio);
  42271. context.setStrokeStyle(radarOption.gridColor);
  42272. if (radarOption.gridType == 'radar') {
  42273. coordinateAngle.forEach(function (angle, index) {
  42274. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
  42275. if (index === 0) {
  42276. startPos = pos;
  42277. context.moveTo(pos.x, pos.y);
  42278. } else {
  42279. context.lineTo(pos.x, pos.y);
  42280. }
  42281. });
  42282. context.lineTo(startPos.x, startPos.y);
  42283. } else {
  42284. var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
  42285. context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
  42286. }
  42287. context.stroke();
  42288. context.closePath();
  42289. };
  42290. for (var i = 1; i <= radarOption.gridCount; i++) {
  42291. _loop(i);
  42292. }
  42293. var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
  42294. radarDataPoints.forEach(function (eachSeries, seriesIndex) {
  42295. // 绘制区域数据
  42296. context.beginPath();
  42297. context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
  42298. eachSeries.data.forEach(function (item, index) {
  42299. if (index === 0) {
  42300. context.moveTo(item.position.x, item.position.y);
  42301. } else {
  42302. context.lineTo(item.position.x, item.position.y);
  42303. }
  42304. });
  42305. context.closePath();
  42306. context.fill();
  42307. if (opts.dataPointShape !== false) {
  42308. var points = eachSeries.data.map(function (item) {
  42309. return item.position;
  42310. });
  42311. drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
  42312. }
  42313. });
  42314. // draw label text
  42315. drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
  42316. return {
  42317. center: centerPosition,
  42318. radius: radius,
  42319. angleList: coordinateAngle
  42320. };
  42321. }
  42322. function normalInt(min, max, iter) {
  42323. iter = iter == 0 ? 1 : iter;
  42324. var arr = [];
  42325. for (var i = 0; i < iter; i++) {
  42326. arr[i] = Math.random();
  42327. }
  42328. ;
  42329. return Math.floor(arr.reduce(function (i, j) {
  42330. return i + j;
  42331. }) / iter * (max - min)) + min;
  42332. }
  42333. ;
  42334. function collisionNew(area, points, width, height) {
  42335. var isIn = false;
  42336. for (var i = 0; i < points.length; i++) {
  42337. if (points[i].area) {
  42338. if (area[3] < points[i].area[1] || area[0] > points[i].area[2] || area[1] > points[i].area[3] || area[2] < points[i].area[0]) {
  42339. if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
  42340. isIn = true;
  42341. break;
  42342. } else {
  42343. isIn = false;
  42344. }
  42345. } else {
  42346. isIn = true;
  42347. break;
  42348. }
  42349. }
  42350. }
  42351. return isIn;
  42352. }
  42353. ;
  42354. function getBoundingBox(data) {
  42355. var bounds = {},
  42356. coords;
  42357. bounds.xMin = 180;
  42358. bounds.xMax = 0;
  42359. bounds.yMin = 90;
  42360. bounds.yMax = 0;
  42361. for (var i = 0; i < data.length; i++) {
  42362. var coorda = data[i].geometry.coordinates;
  42363. for (var k = 0; k < coorda.length; k++) {
  42364. coords = coorda[k];
  42365. if (coords.length == 1) {
  42366. coords = coords[0];
  42367. }
  42368. for (var j = 0; j < coords.length; j++) {
  42369. var longitude = coords[j][0];
  42370. var latitude = coords[j][1];
  42371. var point = {
  42372. x: longitude,
  42373. y: latitude
  42374. };
  42375. bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
  42376. bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
  42377. bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
  42378. bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
  42379. }
  42380. }
  42381. }
  42382. return bounds;
  42383. }
  42384. function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
  42385. return {
  42386. x: (longitude - bounds.xMin) * scale + xoffset,
  42387. y: (bounds.yMax - latitude) * scale + yoffset
  42388. };
  42389. }
  42390. function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
  42391. return {
  42392. x: (pointX - xoffset) / scale + bounds.xMin,
  42393. y: bounds.yMax - (pointY - yoffset) / scale
  42394. };
  42395. }
  42396. function isRayIntersectsSegment(poi, s_poi, e_poi) {
  42397. if (s_poi[1] == e_poi[1]) {
  42398. return false;
  42399. }
  42400. if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
  42401. return false;
  42402. }
  42403. if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
  42404. return false;
  42405. }
  42406. if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
  42407. return false;
  42408. }
  42409. if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
  42410. return false;
  42411. }
  42412. if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
  42413. return false;
  42414. }
  42415. var xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
  42416. if (xseg < poi[0]) {
  42417. return false;
  42418. } else {
  42419. return true;
  42420. }
  42421. }
  42422. function isPoiWithinPoly(poi, poly) {
  42423. var sinsc = 0;
  42424. for (var i = 0; i < poly.length; i++) {
  42425. var epoly = poly[i][0];
  42426. if (poly.length == 1) {
  42427. epoly = poly[i][0];
  42428. }
  42429. for (var j = 0; j < epoly.length - 1; j++) {
  42430. var s_poi = epoly[j];
  42431. var e_poi = epoly[j + 1];
  42432. if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
  42433. sinsc += 1;
  42434. }
  42435. }
  42436. }
  42437. if (sinsc % 2 == 1) {
  42438. return true;
  42439. } else {
  42440. return false;
  42441. }
  42442. }
  42443. function drawMapDataPoints(series, opts, config, context) {
  42444. var mapOption = assign({}, {
  42445. border: true,
  42446. borderWidth: 1,
  42447. borderColor: '#666666',
  42448. fillOpacity: 0.6,
  42449. activeBorderColor: '#f04864',
  42450. activeFillColor: '#facc14',
  42451. activeFillOpacity: 1
  42452. }, opts.extra.map);
  42453. var coords, point;
  42454. var data = series;
  42455. var bounds = getBoundingBox(data);
  42456. var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
  42457. var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
  42458. var scale = xScale < yScale ? xScale : yScale;
  42459. var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
  42460. var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
  42461. context.beginPath();
  42462. context.clearRect(0, 0, opts.width, opts.height);
  42463. context.setFillStyle(opts.background || '#FFFFFF');
  42464. context.rect(0, 0, opts.width, opts.height);
  42465. context.fill();
  42466. for (var i = 0; i < data.length; i++) {
  42467. context.beginPath();
  42468. context.setLineWidth(mapOption.borderWidth * opts.pixelRatio);
  42469. context.setStrokeStyle(mapOption.borderColor);
  42470. context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
  42471. if (opts.tooltip) {
  42472. if (opts.tooltip.index == i) {
  42473. context.setStrokeStyle(mapOption.activeBorderColor);
  42474. context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
  42475. }
  42476. }
  42477. var coorda = data[i].geometry.coordinates;
  42478. for (var k = 0; k < coorda.length; k++) {
  42479. coords = coorda[k];
  42480. if (coords.length == 1) {
  42481. coords = coords[0];
  42482. }
  42483. for (var j = 0; j < coords.length; j++) {
  42484. point = coordinateToPoint(coords[j][1], coords[j][0], bounds, scale, xoffset, yoffset);
  42485. if (j === 0) {
  42486. context.beginPath();
  42487. context.moveTo(point.x, point.y);
  42488. } else {
  42489. context.lineTo(point.x, point.y);
  42490. }
  42491. }
  42492. context.fill();
  42493. if (mapOption.border == true) {
  42494. context.stroke();
  42495. }
  42496. }
  42497. if (opts.dataLabel == true) {
  42498. var centerPoint = data[i].properties.centroid;
  42499. if (centerPoint) {
  42500. point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
  42501. var fontSize = data[i].textSize || config.fontSize;
  42502. var text = data[i].properties.name;
  42503. context.beginPath();
  42504. context.setFontSize(fontSize);
  42505. context.setFillStyle(data[i].textColor || '#666666');
  42506. context.fillText(text, point.x - measureText(text, fontSize) / 2, point.y + fontSize / 2);
  42507. context.closePath();
  42508. context.stroke();
  42509. }
  42510. }
  42511. }
  42512. opts.chartData.mapData = {
  42513. bounds: bounds,
  42514. scale: scale,
  42515. xoffset: xoffset,
  42516. yoffset: yoffset
  42517. };
  42518. drawToolTipBridge(opts, config, context, 1);
  42519. context.draw();
  42520. }
  42521. function getWordCloudPoint(opts, type) {
  42522. var points = opts.series.sort(function (a, b) {
  42523. return parseInt(b.textSize) - parseInt(a.textSize);
  42524. });
  42525. switch (type) {
  42526. case 'normal':
  42527. for (var i = 0; i < points.length; i++) {
  42528. var text = points[i].name;
  42529. var tHeight = points[i].textSize;
  42530. var tWidth = measureText(text, tHeight);
  42531. var x = void 0,
  42532. y = void 0;
  42533. var area = void 0;
  42534. var breaknum = 0;
  42535. while (true) {
  42536. breaknum++;
  42537. x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
  42538. y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
  42539. area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
  42540. var isCollision = collisionNew(area, points, opts.width, opts.height);
  42541. if (!isCollision) break;
  42542. if (breaknum == 1000) {
  42543. area = [-100, -100, -100, -100];
  42544. break;
  42545. }
  42546. }
  42547. ;
  42548. points[i].area = area;
  42549. }
  42550. break;
  42551. case 'vertical':
  42552. var Spin = function Spin() {
  42553. //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
  42554. if (Math.random() > 0.7) {
  42555. return true;
  42556. } else {
  42557. return false;
  42558. }
  42559. ;
  42560. };
  42561. ;
  42562. for (var _i22 = 0; _i22 < points.length; _i22++) {
  42563. var _text = points[_i22].name;
  42564. var _tHeight = points[_i22].textSize;
  42565. var _tWidth = measureText(_text, _tHeight);
  42566. var isSpin = Spin();
  42567. var _x = void 0,
  42568. _y = void 0,
  42569. _area = void 0,
  42570. areav = void 0;
  42571. var _breaknum = 0;
  42572. while (true) {
  42573. _breaknum++;
  42574. var _isCollision = void 0;
  42575. if (isSpin) {
  42576. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  42577. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  42578. _area = [_y - 5 - _tWidth + opts.width / 2, -_x - 5 + opts.height / 2, _y + 5 + opts.width / 2, -_x + _tHeight + 5 + opts.height / 2];
  42579. areav = [opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) - 5, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) - 5, opts.width - (opts.width / 2 - opts.height / 2) - (-_x + _tHeight + 5 + opts.height / 2) + _tHeight, opts.height / 2 - opts.width / 2 + (_y - 5 - _tWidth + opts.width / 2) + _tWidth + 5];
  42580. _isCollision = collisionNew(areav, points, opts.height, opts.width);
  42581. } else {
  42582. _x = normalInt(-opts.width / 2, opts.width / 2, 5) - _tWidth / 2;
  42583. _y = normalInt(-opts.height / 2, opts.height / 2, 5) + _tHeight / 2;
  42584. _area = [_x - 5 + opts.width / 2, _y - 5 - _tHeight + opts.height / 2, _x + _tWidth + 5 + opts.width / 2, _y + 5 + opts.height / 2];
  42585. _isCollision = collisionNew(_area, points, opts.width, opts.height);
  42586. }
  42587. if (!_isCollision) break;
  42588. if (_breaknum == 1000) {
  42589. _area = [-1000, -1000, -1000, -1000];
  42590. break;
  42591. }
  42592. }
  42593. ;
  42594. if (isSpin) {
  42595. points[_i22].area = areav;
  42596. points[_i22].areav = _area;
  42597. } else {
  42598. points[_i22].area = _area;
  42599. }
  42600. points[_i22].rotate = isSpin;
  42601. }
  42602. ;
  42603. break;
  42604. }
  42605. return points;
  42606. }
  42607. function drawWordCloudDataPoints(series, opts, config, context) {
  42608. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  42609. var wordOption = assign({}, {
  42610. type: 'normal',
  42611. autoColors: true
  42612. }, opts.extra.word);
  42613. context.beginPath();
  42614. context.setFillStyle(opts.background || '#FFFFFF');
  42615. context.rect(0, 0, opts.width, opts.height);
  42616. context.fill();
  42617. context.save();
  42618. var points = opts.chartData.wordCloudData;
  42619. context.translate(opts.width / 2, opts.height / 2);
  42620. for (var i = 0; i < points.length; i++) {
  42621. context.save();
  42622. if (points[i].rotate) {
  42623. context.rotate(90 * Math.PI / 180);
  42624. }
  42625. var text = points[i].name;
  42626. var tHeight = points[i].textSize;
  42627. var tWidth = measureText(text, tHeight);
  42628. context.beginPath();
  42629. context.setStrokeStyle(points[i].color);
  42630. context.setFillStyle(points[i].color);
  42631. context.setFontSize(tHeight);
  42632. if (points[i].rotate) {
  42633. if (points[i].areav[0] > 0) {
  42634. if (opts.tooltip) {
  42635. if (opts.tooltip.index == i) {
  42636. context.strokeText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  42637. } else {
  42638. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  42639. }
  42640. } else {
  42641. context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
  42642. }
  42643. }
  42644. } else {
  42645. if (points[i].area[0] > 0) {
  42646. if (opts.tooltip) {
  42647. if (opts.tooltip.index == i) {
  42648. context.strokeText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  42649. } else {
  42650. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  42651. }
  42652. } else {
  42653. context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
  42654. }
  42655. }
  42656. }
  42657. context.stroke();
  42658. context.restore();
  42659. }
  42660. context.restore();
  42661. }
  42662. function drawFunnelDataPoints(series, opts, config, context) {
  42663. var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
  42664. var funnelOption = assign({}, {
  42665. activeWidth: 10,
  42666. activeOpacity: 0.3,
  42667. border: false,
  42668. borderWidth: 2,
  42669. borderColor: '#FFFFFF',
  42670. fillOpacity: 1,
  42671. labelAlign: 'right'
  42672. }, opts.extra.funnel);
  42673. var eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
  42674. var centerPosition = {
  42675. x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
  42676. y: opts.height - opts.area[2]
  42677. };
  42678. var activeWidth = funnelOption.activeWidth;
  42679. var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
  42680. series = getFunnelDataPoints(series, radius, process);
  42681. context.save();
  42682. context.translate(centerPosition.x, centerPosition.y);
  42683. for (var i = 0; i < series.length; i++) {
  42684. if (i == 0) {
  42685. if (opts.tooltip) {
  42686. if (opts.tooltip.index == i) {
  42687. context.beginPath();
  42688. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  42689. context.moveTo(-activeWidth, 0);
  42690. context.lineTo(-series[i].radius - activeWidth, -eachSpacing);
  42691. context.lineTo(series[i].radius + activeWidth, -eachSpacing);
  42692. context.lineTo(activeWidth, 0);
  42693. context.lineTo(-activeWidth, 0);
  42694. context.closePath();
  42695. context.fill();
  42696. }
  42697. }
  42698. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing, centerPosition.x + series[i].radius, centerPosition.y];
  42699. context.beginPath();
  42700. context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);
  42701. context.setStrokeStyle(funnelOption.borderColor);
  42702. context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));
  42703. context.moveTo(0, 0);
  42704. context.lineTo(-series[i].radius, -eachSpacing);
  42705. context.lineTo(series[i].radius, -eachSpacing);
  42706. context.lineTo(0, 0);
  42707. context.closePath();
  42708. context.fill();
  42709. if (funnelOption.border == true) {
  42710. context.stroke();
  42711. }
  42712. } else {
  42713. if (opts.tooltip) {
  42714. if (opts.tooltip.index == i) {
  42715. context.beginPath();
  42716. context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
  42717. context.moveTo(0, 0);
  42718. context.lineTo(-series[i - 1].radius - activeWidth, 0);
  42719. context.lineTo(-series[i].radius - activeWidth, -eachSpacing);
  42720. context.lineTo(series[i].radius + activeWidth, -eachSpacing);
  42721. context.lineTo(series[i - 1].radius + activeWidth, 0);
  42722. context.lineTo(0, 0);
  42723. context.closePath();
  42724. context.fill();
  42725. }
  42726. }
  42727. series[i].funnelArea = [centerPosition.x - series[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + series[i].radius, centerPosition.y - eachSpacing * i];
  42728. context.beginPath();
  42729. context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);
  42730. context.setStrokeStyle(funnelOption.borderColor);
  42731. context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));
  42732. context.moveTo(0, 0);
  42733. context.lineTo(-series[i - 1].radius, 0);
  42734. context.lineTo(-series[i].radius, -eachSpacing);
  42735. context.lineTo(series[i].radius, -eachSpacing);
  42736. context.lineTo(series[i - 1].radius, 0);
  42737. context.lineTo(0, 0);
  42738. context.closePath();
  42739. context.fill();
  42740. if (funnelOption.border == true) {
  42741. context.stroke();
  42742. }
  42743. }
  42744. context.translate(0, -eachSpacing);
  42745. }
  42746. context.restore();
  42747. if (opts.dataLabel !== false && process === 1) {
  42748. drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
  42749. }
  42750. return {
  42751. center: centerPosition,
  42752. radius: radius,
  42753. series: series
  42754. };
  42755. }
  42756. function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
  42757. for (var i = 0; i < series.length; i++) {
  42758. var item = series[i];
  42759. var startX = void 0,
  42760. endX = void 0,
  42761. startY = void 0,
  42762. fontSize = void 0;
  42763. var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
  42764. if (labelAlign == 'right') {
  42765. if (i == 0) {
  42766. startX = (item.funnelArea[2] + centerPosition.x) / 2;
  42767. } else {
  42768. startX = (item.funnelArea[2] + series[i - 1].funnelArea[2]) / 2;
  42769. }
  42770. endX = startX + activeWidth * 2;
  42771. startY = item.funnelArea[1] + eachSpacing / 2;
  42772. fontSize = item.textSize || opts.fontSize;
  42773. context.setLineWidth(1 * opts.pixelRatio);
  42774. context.setStrokeStyle(item.color);
  42775. context.setFillStyle(item.color);
  42776. context.beginPath();
  42777. context.moveTo(startX, startY);
  42778. context.lineTo(endX, startY);
  42779. context.stroke();
  42780. context.closePath();
  42781. context.beginPath();
  42782. context.moveTo(endX, startY);
  42783. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  42784. context.closePath();
  42785. context.fill();
  42786. context.beginPath();
  42787. context.setFontSize(fontSize);
  42788. context.setFillStyle(item.textColor || '#666666');
  42789. context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
  42790. context.closePath();
  42791. context.stroke();
  42792. context.closePath();
  42793. } else {
  42794. if (i == 0) {
  42795. startX = (item.funnelArea[0] + centerPosition.x) / 2;
  42796. } else {
  42797. startX = (item.funnelArea[0] + series[i - 1].funnelArea[0]) / 2;
  42798. }
  42799. endX = startX - activeWidth * 2;
  42800. startY = item.funnelArea[1] + eachSpacing / 2;
  42801. fontSize = item.textSize || opts.fontSize;
  42802. context.setLineWidth(1 * opts.pixelRatio);
  42803. context.setStrokeStyle(item.color);
  42804. context.setFillStyle(item.color);
  42805. context.beginPath();
  42806. context.moveTo(startX, startY);
  42807. context.lineTo(endX, startY);
  42808. context.stroke();
  42809. context.closePath();
  42810. context.beginPath();
  42811. context.moveTo(endX, startY);
  42812. context.arc(endX, startY, 2, 0, 2 * Math.PI);
  42813. context.closePath();
  42814. context.fill();
  42815. context.beginPath();
  42816. context.setFontSize(fontSize);
  42817. context.setFillStyle(item.textColor || '#666666');
  42818. context.fillText(text, endX - 5 - measureText(text), startY + fontSize / 2 - 2);
  42819. context.closePath();
  42820. context.stroke();
  42821. context.closePath();
  42822. }
  42823. }
  42824. }
  42825. function drawCanvas(opts, context) {
  42826. context.draw();
  42827. }
  42828. var Timing = {
  42829. easeIn: function easeIn(pos) {
  42830. return Math.pow(pos, 3);
  42831. },
  42832. easeOut: function easeOut(pos) {
  42833. return Math.pow(pos - 1, 3) + 1;
  42834. },
  42835. easeInOut: function easeInOut(pos) {
  42836. if ((pos /= 0.5) < 1) {
  42837. return 0.5 * Math.pow(pos, 3);
  42838. } else {
  42839. return 0.5 * (Math.pow(pos - 2, 3) + 2);
  42840. }
  42841. },
  42842. linear: function linear(pos) {
  42843. return pos;
  42844. }
  42845. };
  42846. function Animation(opts) {
  42847. this.isStop = false;
  42848. opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
  42849. opts.timing = opts.timing || 'linear';
  42850. var delay = 17;
  42851. function createAnimationFrame() {
  42852. if (typeof setTimeout !== 'undefined') {
  42853. return function (step, delay) {
  42854. setTimeout(function () {
  42855. var timeStamp = +new Date();
  42856. step(timeStamp);
  42857. }, delay);
  42858. };
  42859. } else if (typeof requestAnimationFrame !== 'undefined') {
  42860. return requestAnimationFrame;
  42861. } else {
  42862. return function (step) {
  42863. step(null);
  42864. };
  42865. }
  42866. }
  42867. ;
  42868. var animationFrame = createAnimationFrame();
  42869. var startTimeStamp = null;
  42870. var _step = function step(timestamp) {
  42871. if (timestamp === null || this.isStop === true) {
  42872. opts.onProcess && opts.onProcess(1);
  42873. opts.onAnimationFinish && opts.onAnimationFinish();
  42874. return;
  42875. }
  42876. if (startTimeStamp === null) {
  42877. startTimeStamp = timestamp;
  42878. }
  42879. if (timestamp - startTimeStamp < opts.duration) {
  42880. var process = (timestamp - startTimeStamp) / opts.duration;
  42881. var timingFunction = Timing[opts.timing];
  42882. process = timingFunction(process);
  42883. opts.onProcess && opts.onProcess(process);
  42884. animationFrame(_step, delay);
  42885. } else {
  42886. opts.onProcess && opts.onProcess(1);
  42887. opts.onAnimationFinish && opts.onAnimationFinish();
  42888. }
  42889. };
  42890. _step = _step.bind(this);
  42891. animationFrame(_step, delay);
  42892. }
  42893. // stop animation immediately
  42894. // and tigger onAnimationFinish
  42895. Animation.prototype.stop = function () {
  42896. this.isStop = true;
  42897. };
  42898. function drawCharts(type, opts, config, context) {
  42899. var _this = this;
  42900. var series = opts.series;
  42901. var categories = opts.categories;
  42902. series = fillSeries(series, opts, config);
  42903. var duration = opts.animation ? opts.duration : 0;
  42904. _this.animationInstance && _this.animationInstance.stop();
  42905. var seriesMA = null;
  42906. if (type == 'candle') {
  42907. var average = assign({}, opts.extra.candle.average);
  42908. if (average.show) {
  42909. seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
  42910. seriesMA = fillSeries(seriesMA, opts, config);
  42911. opts.seriesMA = seriesMA;
  42912. } else if (opts.seriesMA) {
  42913. seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
  42914. } else {
  42915. seriesMA = series;
  42916. }
  42917. } else {
  42918. seriesMA = series;
  42919. }
  42920. /* 过滤掉show=false的series */
  42921. opts._series_ = series = filterSeries(series);
  42922. //重新计算图表区域
  42923. opts.area = new Array(4);
  42924. //复位绘图区域
  42925. for (var j = 0; j < 4; j++) {
  42926. opts.area[j] = opts.padding[j];
  42927. }
  42928. //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
  42929. var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData),
  42930. legendHeight = _calLegendData.area.wholeHeight,
  42931. legendWidth = _calLegendData.area.wholeWidth;
  42932. switch (opts.legend.position) {
  42933. case 'top':
  42934. opts.area[0] += legendHeight;
  42935. break;
  42936. case 'bottom':
  42937. opts.area[2] += legendHeight;
  42938. break;
  42939. case 'left':
  42940. opts.area[3] += legendWidth;
  42941. break;
  42942. case 'right':
  42943. opts.area[1] += legendWidth;
  42944. break;
  42945. }
  42946. var _calYAxisData = {},
  42947. yAxisWidth = 0;
  42948. if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle') {
  42949. _calYAxisData = calYAxisData(series, opts, config);
  42950. yAxisWidth = _calYAxisData.yAxisWidth;
  42951. //如果显示Y轴标题
  42952. if (opts.yAxis.showTitle) {
  42953. var maxTitleHeight = 0;
  42954. for (var i = 0; i < opts.yAxis.data.length; i++) {
  42955. maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize : config.fontSize);
  42956. }
  42957. opts.area[0] += (maxTitleHeight + 6) * opts.pixelRatio;
  42958. }
  42959. var rightIndex = 0,
  42960. leftIndex = 0;
  42961. //计算主绘图区域左右位置
  42962. for (var _i23 = 0; _i23 < yAxisWidth.length; _i23++) {
  42963. if (yAxisWidth[_i23].position == 'left') {
  42964. if (leftIndex > 0) {
  42965. opts.area[3] += yAxisWidth[_i23].width + opts.yAxis.padding;
  42966. } else {
  42967. opts.area[3] += yAxisWidth[_i23].width;
  42968. }
  42969. leftIndex += 1;
  42970. } else {
  42971. if (rightIndex > 0) {
  42972. opts.area[1] += yAxisWidth[_i23].width + opts.yAxis.padding;
  42973. } else {
  42974. opts.area[1] += yAxisWidth[_i23].width;
  42975. }
  42976. rightIndex += 1;
  42977. }
  42978. }
  42979. } else {
  42980. config.yAxisWidth = yAxisWidth;
  42981. }
  42982. opts.chartData.yAxisData = _calYAxisData;
  42983. if (opts.categories && opts.categories.length) {
  42984. opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
  42985. var _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing),
  42986. xAxisHeight = _calCategoriesData.xAxisHeight,
  42987. angle = _calCategoriesData.angle;
  42988. config.xAxisHeight = xAxisHeight;
  42989. config._xAxisTextAngle_ = angle;
  42990. opts.area[2] += xAxisHeight;
  42991. opts.chartData.categoriesData = _calCategoriesData;
  42992. } else {
  42993. if (opts.type === 'line' || opts.type === 'area' || opts.type === 'points') {
  42994. opts.chartData.xAxisData = calXAxisData(series, opts, config);
  42995. categories = opts.chartData.xAxisData.rangesFormat;
  42996. var _calCategoriesData2 = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing),
  42997. _xAxisHeight = _calCategoriesData2.xAxisHeight,
  42998. _angle = _calCategoriesData2.angle;
  42999. config.xAxisHeight = _xAxisHeight;
  43000. config._xAxisTextAngle_ = _angle;
  43001. opts.area[2] += _xAxisHeight;
  43002. opts.chartData.categoriesData = _calCategoriesData2;
  43003. } else {
  43004. opts.chartData.xAxisData = {
  43005. xAxisPoints: []
  43006. };
  43007. }
  43008. }
  43009. //计算右对齐偏移距离
  43010. if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
  43011. var offsetLeft = 0,
  43012. xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
  43013. startX = opts.chartData.xAxisData.startX,
  43014. endX = opts.chartData.xAxisData.endX,
  43015. eachSpacing = opts.chartData.xAxisData.eachSpacing;
  43016. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  43017. var screenWidth = endX - startX;
  43018. offsetLeft = screenWidth - totalWidth;
  43019. _this.scrollOption = {
  43020. currentOffset: offsetLeft,
  43021. startTouchX: offsetLeft,
  43022. distance: 0,
  43023. lastMoveTime: 0
  43024. };
  43025. opts._scrollDistance_ = offsetLeft;
  43026. }
  43027. if (type === 'pie' || type === 'ring' || type === 'rose') {
  43028. config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA);
  43029. }
  43030. switch (type) {
  43031. case 'word':
  43032. var wordOption = assign({}, {
  43033. type: 'normal',
  43034. autoColors: true
  43035. }, opts.extra.word);
  43036. if (opts.updateData == true || opts.updateData == undefined) {
  43037. opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type);
  43038. }
  43039. this.animationInstance = new Animation({
  43040. timing: 'easeInOut',
  43041. duration: duration,
  43042. onProcess: function onProcess(process) {
  43043. context.clearRect(0, 0, opts.width, opts.height);
  43044. if (opts.rotate) {
  43045. contextRotate(context, opts);
  43046. }
  43047. drawWordCloudDataPoints(series, opts, config, context, process);
  43048. drawCanvas(opts, context);
  43049. },
  43050. onAnimationFinish: function onAnimationFinish() {
  43051. _this.event.trigger('renderComplete');
  43052. }
  43053. });
  43054. break;
  43055. case 'map':
  43056. context.clearRect(0, 0, opts.width, opts.height);
  43057. drawMapDataPoints(series, opts, config, context);
  43058. break;
  43059. case 'funnel':
  43060. this.animationInstance = new Animation({
  43061. timing: 'easeInOut',
  43062. duration: duration,
  43063. onProcess: function onProcess(process) {
  43064. context.clearRect(0, 0, opts.width, opts.height);
  43065. if (opts.rotate) {
  43066. contextRotate(context, opts);
  43067. }
  43068. opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
  43069. drawLegend(opts.series, opts, config, context, opts.chartData);
  43070. drawToolTipBridge(opts, config, context, process);
  43071. drawCanvas(opts, context);
  43072. },
  43073. onAnimationFinish: function onAnimationFinish() {
  43074. _this.event.trigger('renderComplete');
  43075. }
  43076. });
  43077. break;
  43078. case 'line':
  43079. this.animationInstance = new Animation({
  43080. timing: 'easeIn',
  43081. duration: duration,
  43082. onProcess: function onProcess(process) {
  43083. context.clearRect(0, 0, opts.width, opts.height);
  43084. if (opts.rotate) {
  43085. contextRotate(context, opts);
  43086. }
  43087. drawYAxisGrid(categories, opts, config, context);
  43088. drawXAxis(categories, opts, config, context);
  43089. var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
  43090. xAxisPoints = _drawLineDataPoints.xAxisPoints,
  43091. calPoints = _drawLineDataPoints.calPoints,
  43092. eachSpacing = _drawLineDataPoints.eachSpacing;
  43093. opts.chartData.xAxisPoints = xAxisPoints;
  43094. opts.chartData.calPoints = calPoints;
  43095. opts.chartData.eachSpacing = eachSpacing;
  43096. drawYAxis(series, opts, config, context);
  43097. if (opts.enableMarkLine !== false && process === 1) {
  43098. drawMarkLine(opts, config, context);
  43099. }
  43100. drawLegend(opts.series, opts, config, context, opts.chartData);
  43101. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  43102. drawCanvas(opts, context);
  43103. },
  43104. onAnimationFinish: function onAnimationFinish() {
  43105. _this.event.trigger('renderComplete');
  43106. }
  43107. });
  43108. break;
  43109. case 'mix':
  43110. this.animationInstance = new Animation({
  43111. timing: 'easeIn',
  43112. duration: duration,
  43113. onProcess: function onProcess(process) {
  43114. context.clearRect(0, 0, opts.width, opts.height);
  43115. if (opts.rotate) {
  43116. contextRotate(context, opts);
  43117. }
  43118. drawYAxisGrid(categories, opts, config, context);
  43119. drawXAxis(categories, opts, config, context);
  43120. var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
  43121. xAxisPoints = _drawMixDataPoints.xAxisPoints,
  43122. calPoints = _drawMixDataPoints.calPoints,
  43123. eachSpacing = _drawMixDataPoints.eachSpacing;
  43124. opts.chartData.xAxisPoints = xAxisPoints;
  43125. opts.chartData.calPoints = calPoints;
  43126. opts.chartData.eachSpacing = eachSpacing;
  43127. drawYAxis(series, opts, config, context);
  43128. if (opts.enableMarkLine !== false && process === 1) {
  43129. drawMarkLine(opts, config, context);
  43130. }
  43131. drawLegend(opts.series, opts, config, context, opts.chartData);
  43132. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  43133. drawCanvas(opts, context);
  43134. },
  43135. onAnimationFinish: function onAnimationFinish() {
  43136. _this.event.trigger('renderComplete');
  43137. }
  43138. });
  43139. break;
  43140. case 'column':
  43141. this.animationInstance = new Animation({
  43142. timing: 'easeIn',
  43143. duration: duration,
  43144. onProcess: function onProcess(process) {
  43145. context.clearRect(0, 0, opts.width, opts.height);
  43146. if (opts.rotate) {
  43147. contextRotate(context, opts);
  43148. }
  43149. drawYAxisGrid(categories, opts, config, context);
  43150. drawXAxis(categories, opts, config, context);
  43151. var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
  43152. xAxisPoints = _drawColumnDataPoints.xAxisPoints,
  43153. calPoints = _drawColumnDataPoints.calPoints,
  43154. eachSpacing = _drawColumnDataPoints.eachSpacing;
  43155. opts.chartData.xAxisPoints = xAxisPoints;
  43156. opts.chartData.calPoints = calPoints;
  43157. opts.chartData.eachSpacing = eachSpacing;
  43158. drawYAxis(series, opts, config, context);
  43159. if (opts.enableMarkLine !== false && process === 1) {
  43160. drawMarkLine(opts, config, context);
  43161. }
  43162. drawLegend(opts.series, opts, config, context, opts.chartData);
  43163. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  43164. drawCanvas(opts, context);
  43165. },
  43166. onAnimationFinish: function onAnimationFinish() {
  43167. _this.event.trigger('renderComplete');
  43168. }
  43169. });
  43170. break;
  43171. case 'area':
  43172. this.animationInstance = new Animation({
  43173. timing: 'easeIn',
  43174. duration: duration,
  43175. onProcess: function onProcess(process) {
  43176. context.clearRect(0, 0, opts.width, opts.height);
  43177. if (opts.rotate) {
  43178. contextRotate(context, opts);
  43179. }
  43180. drawYAxisGrid(categories, opts, config, context);
  43181. drawXAxis(categories, opts, config, context);
  43182. var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
  43183. xAxisPoints = _drawAreaDataPoints.xAxisPoints,
  43184. calPoints = _drawAreaDataPoints.calPoints,
  43185. eachSpacing = _drawAreaDataPoints.eachSpacing;
  43186. opts.chartData.xAxisPoints = xAxisPoints;
  43187. opts.chartData.calPoints = calPoints;
  43188. opts.chartData.eachSpacing = eachSpacing;
  43189. drawYAxis(series, opts, config, context);
  43190. if (opts.enableMarkLine !== false && process === 1) {
  43191. drawMarkLine(opts, config, context);
  43192. }
  43193. drawLegend(opts.series, opts, config, context, opts.chartData);
  43194. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  43195. drawCanvas(opts, context);
  43196. },
  43197. onAnimationFinish: function onAnimationFinish() {
  43198. _this.event.trigger('renderComplete');
  43199. }
  43200. });
  43201. break;
  43202. case 'ring':
  43203. case 'pie':
  43204. this.animationInstance = new Animation({
  43205. timing: 'easeInOut',
  43206. duration: duration,
  43207. onProcess: function onProcess(process) {
  43208. context.clearRect(0, 0, opts.width, opts.height);
  43209. if (opts.rotate) {
  43210. contextRotate(context, opts);
  43211. }
  43212. opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
  43213. drawLegend(opts.series, opts, config, context, opts.chartData);
  43214. drawToolTipBridge(opts, config, context, process);
  43215. drawCanvas(opts, context);
  43216. },
  43217. onAnimationFinish: function onAnimationFinish() {
  43218. _this.event.trigger('renderComplete');
  43219. }
  43220. });
  43221. break;
  43222. case 'rose':
  43223. this.animationInstance = new Animation({
  43224. timing: 'easeInOut',
  43225. duration: duration,
  43226. onProcess: function onProcess(process) {
  43227. context.clearRect(0, 0, opts.width, opts.height);
  43228. if (opts.rotate) {
  43229. contextRotate(context, opts);
  43230. }
  43231. opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
  43232. drawLegend(opts.series, opts, config, context, opts.chartData);
  43233. drawToolTipBridge(opts, config, context, process);
  43234. drawCanvas(opts, context);
  43235. },
  43236. onAnimationFinish: function onAnimationFinish() {
  43237. _this.event.trigger('renderComplete');
  43238. }
  43239. });
  43240. break;
  43241. case 'radar':
  43242. this.animationInstance = new Animation({
  43243. timing: 'easeInOut',
  43244. duration: duration,
  43245. onProcess: function onProcess(process) {
  43246. context.clearRect(0, 0, opts.width, opts.height);
  43247. if (opts.rotate) {
  43248. contextRotate(context, opts);
  43249. }
  43250. opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
  43251. drawLegend(opts.series, opts, config, context, opts.chartData);
  43252. drawToolTipBridge(opts, config, context, process);
  43253. drawCanvas(opts, context);
  43254. },
  43255. onAnimationFinish: function onAnimationFinish() {
  43256. _this.event.trigger('renderComplete');
  43257. }
  43258. });
  43259. break;
  43260. case 'arcbar':
  43261. this.animationInstance = new Animation({
  43262. timing: 'easeInOut',
  43263. duration: duration,
  43264. onProcess: function onProcess(process) {
  43265. context.clearRect(0, 0, opts.width, opts.height);
  43266. if (opts.rotate) {
  43267. contextRotate(context, opts);
  43268. }
  43269. opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
  43270. drawCanvas(opts, context);
  43271. },
  43272. onAnimationFinish: function onAnimationFinish() {
  43273. _this.event.trigger('renderComplete');
  43274. }
  43275. });
  43276. break;
  43277. case 'gauge':
  43278. this.animationInstance = new Animation({
  43279. timing: 'easeInOut',
  43280. duration: duration,
  43281. onProcess: function onProcess(process) {
  43282. context.clearRect(0, 0, opts.width, opts.height);
  43283. if (opts.rotate) {
  43284. contextRotate(context, opts);
  43285. }
  43286. opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
  43287. drawCanvas(opts, context);
  43288. },
  43289. onAnimationFinish: function onAnimationFinish() {
  43290. _this.event.trigger('renderComplete');
  43291. }
  43292. });
  43293. break;
  43294. case 'candle':
  43295. this.animationInstance = new Animation({
  43296. timing: 'easeIn',
  43297. duration: duration,
  43298. onProcess: function onProcess(process) {
  43299. context.clearRect(0, 0, opts.width, opts.height);
  43300. if (opts.rotate) {
  43301. contextRotate(context, opts);
  43302. }
  43303. drawYAxisGrid(categories, opts, config, context);
  43304. drawXAxis(categories, opts, config, context);
  43305. var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
  43306. xAxisPoints = _drawCandleDataPoints.xAxisPoints,
  43307. calPoints = _drawCandleDataPoints.calPoints,
  43308. eachSpacing = _drawCandleDataPoints.eachSpacing;
  43309. opts.chartData.xAxisPoints = xAxisPoints;
  43310. opts.chartData.calPoints = calPoints;
  43311. opts.chartData.eachSpacing = eachSpacing;
  43312. drawYAxis(series, opts, config, context);
  43313. if (opts.enableMarkLine !== false && process === 1) {
  43314. drawMarkLine(opts, config, context);
  43315. }
  43316. if (seriesMA) {
  43317. drawLegend(seriesMA, opts, config, context, opts.chartData);
  43318. } else {
  43319. drawLegend(opts.series, opts, config, context, opts.chartData);
  43320. }
  43321. drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
  43322. drawCanvas(opts, context);
  43323. },
  43324. onAnimationFinish: function onAnimationFinish() {
  43325. _this.event.trigger('renderComplete');
  43326. }
  43327. });
  43328. break;
  43329. }
  43330. }
  43331. // simple event implement
  43332. function Event() {
  43333. this.events = {};
  43334. }
  43335. Event.prototype.addEventListener = function (type, listener) {
  43336. this.events[type] = this.events[type] || [];
  43337. this.events[type].push(listener);
  43338. };
  43339. Event.prototype.delEventListener = function (type) {
  43340. this.events[type] = [];
  43341. };
  43342. Event.prototype.trigger = function () {
  43343. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  43344. args[_key] = arguments[_key];
  43345. }
  43346. var type = args[0];
  43347. var params = args.slice(1);
  43348. if (!!this.events[type]) {
  43349. this.events[type].forEach(function (listener) {
  43350. try {
  43351. listener.apply(null, params);
  43352. } catch (e) {
  43353. console.error(e);
  43354. }
  43355. });
  43356. }
  43357. };
  43358. var Charts = function Charts(opts) {
  43359. opts.pixelRatio = opts.pixelRatio ? opts.pixelRatio : 1;
  43360. opts.fontSize = opts.fontSize ? opts.fontSize * opts.pixelRatio : 13 * opts.pixelRatio;
  43361. opts.title = assign({}, opts.title);
  43362. opts.subtitle = assign({}, opts.subtitle);
  43363. opts.duration = opts.duration ? opts.duration : 1000;
  43364. opts.yAxis = assign({}, {
  43365. data: [],
  43366. showTitle: false,
  43367. disabled: false,
  43368. disableGrid: false,
  43369. splitNumber: 5,
  43370. gridType: 'solid',
  43371. dashLength: 4 * opts.pixelRatio,
  43372. gridColor: '#cccccc',
  43373. padding: 10,
  43374. fontColor: '#666666'
  43375. }, opts.yAxis);
  43376. opts.yAxis.dashLength *= opts.pixelRatio;
  43377. opts.yAxis.padding *= opts.pixelRatio;
  43378. opts.xAxis = assign({}, {
  43379. rotateLabel: false,
  43380. type: 'calibration',
  43381. gridType: 'solid',
  43382. dashLength: 4,
  43383. scrollAlign: 'left',
  43384. boundaryGap: 'center',
  43385. axisLine: true,
  43386. axisLineColor: '#cccccc'
  43387. }, opts.xAxis);
  43388. opts.xAxis.dashLength *= opts.pixelRatio;
  43389. opts.legend = assign({}, {
  43390. show: true,
  43391. position: 'bottom',
  43392. float: 'center',
  43393. backgroundColor: 'rgba(0,0,0,0)',
  43394. borderColor: 'rgba(0,0,0,0)',
  43395. borderWidth: 0,
  43396. padding: 5,
  43397. margin: 5,
  43398. itemGap: 10,
  43399. fontSize: opts.fontSize,
  43400. lineHeight: opts.fontSize,
  43401. fontColor: '#333333',
  43402. format: {},
  43403. hiddenColor: '#CECECE'
  43404. }, opts.legend);
  43405. opts.legend.borderWidth = opts.legend.borderWidth * opts.pixelRatio;
  43406. opts.legend.itemGap = opts.legend.itemGap * opts.pixelRatio;
  43407. opts.legend.padding = opts.legend.padding * opts.pixelRatio;
  43408. opts.legend.margin = opts.legend.margin * opts.pixelRatio;
  43409. opts.extra = assign({}, opts.extra);
  43410. opts.rotate = opts.rotate ? true : false;
  43411. opts.animation = opts.animation ? true : false;
  43412. opts.rotate = opts.rotate ? true : false;
  43413. opts.canvas2d = opts.canvas2d ? true : false;
  43414. var config$$1 = JSON.parse(JSON.stringify(config));
  43415. config$$1.colors = opts.colors ? opts.colors : config$$1.colors;
  43416. config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
  43417. if (opts.type == 'pie' || opts.type == 'ring') {
  43418. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;
  43419. }
  43420. if (opts.type == 'rose') {
  43421. config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;
  43422. }
  43423. config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pixelRatio;
  43424. config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
  43425. //屏幕旋转
  43426. config$$1.rotate = opts.rotate;
  43427. if (opts.rotate) {
  43428. var tempWidth = opts.width;
  43429. var tempHeight = opts.height;
  43430. opts.width = tempHeight;
  43431. opts.height = tempWidth;
  43432. }
  43433. //适配高分屏
  43434. opts.padding = opts.padding ? opts.padding : config$$1.padding;
  43435. for (var i = 0; i < 4; i++) {
  43436. opts.padding[i] *= opts.pixelRatio;
  43437. }
  43438. config$$1.yAxisWidth = config.yAxisWidth * opts.pixelRatio;
  43439. config$$1.xAxisHeight = config.xAxisHeight * opts.pixelRatio;
  43440. if (opts.enableScroll && opts.xAxis.scrollShow) {
  43441. config$$1.xAxisHeight += 6 * opts.pixelRatio;
  43442. }
  43443. config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pixelRatio;
  43444. config$$1.fontSize = opts.fontSize;
  43445. config$$1.titleFontSize = config.titleFontSize * opts.pixelRatio;
  43446. config$$1.subtitleFontSize = config.subtitleFontSize * opts.pixelRatio;
  43447. config$$1.toolTipPadding = config.toolTipPadding * opts.pixelRatio;
  43448. config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pixelRatio;
  43449. config$$1.columePadding = config.columePadding * opts.pixelRatio;
  43450. this.context = opts.context ? opts.context : uni.createCanvasContext(opts.canvasId, opts.$this);
  43451. if (opts.canvas2d) {
  43452. this.context.setStrokeStyle = function (e) {
  43453. return this.strokeStyle = e;
  43454. };
  43455. this.context.setLineWidth = function (e) {
  43456. return this.lineWidth = e;
  43457. };
  43458. this.context.setLineCap = function (e) {
  43459. return this.lineCap = e;
  43460. };
  43461. this.context.setFontSize = function (e) {
  43462. return this.font = e + "px sans-serif";
  43463. };
  43464. this.context.setFillStyle = function (e) {
  43465. return this.fillStyle = e;
  43466. };
  43467. this.context.draw = function () {};
  43468. }
  43469. /* 兼容原生H5
  43470. this.context = document.getElementById(opts.canvasId).getContext("2d");
  43471. this.context.setStrokeStyle = function(e){ return this.strokeStyle=e; }
  43472. this.context.setLineWidth = function(e){ return this.lineWidth=e; }
  43473. this.context.setLineCap = function(e){ return this.lineCap=e; }
  43474. this.context.setFontSize = function(e){ return this.font=e+"px sans-serif"; }
  43475. this.context.setFillStyle = function(e){ return this.fillStyle=e; }
  43476. this.context.draw = function(){ }
  43477. */
  43478. opts.chartData = {};
  43479. this.event = new Event();
  43480. this.scrollOption = {
  43481. currentOffset: 0,
  43482. startTouchX: 0,
  43483. distance: 0,
  43484. lastMoveTime: 0
  43485. };
  43486. this.opts = opts;
  43487. this.config = config$$1;
  43488. drawCharts.call(this, opts.type, opts, config$$1, this.context);
  43489. };
  43490. Charts.prototype.updateData = function () {
  43491. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  43492. this.opts = assign({}, this.opts, data);
  43493. this.opts.updateData = true;
  43494. var scrollPosition = data.scrollPosition || 'current';
  43495. switch (scrollPosition) {
  43496. case 'current':
  43497. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  43498. break;
  43499. case 'left':
  43500. this.opts._scrollDistance_ = 0;
  43501. this.scrollOption = {
  43502. currentOffset: 0,
  43503. startTouchX: 0,
  43504. distance: 0,
  43505. lastMoveTime: 0
  43506. };
  43507. break;
  43508. case 'right':
  43509. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),
  43510. yAxisWidth = _calYAxisData.yAxisWidth;
  43511. this.config.yAxisWidth = yAxisWidth;
  43512. var offsetLeft = 0;
  43513. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  43514. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  43515. startX = _getXAxisPoints0.startX,
  43516. endX = _getXAxisPoints0.endX,
  43517. eachSpacing = _getXAxisPoints0.eachSpacing;
  43518. var totalWidth = eachSpacing * (xAxisPoints.length - 1);
  43519. var screenWidth = endX - startX;
  43520. offsetLeft = screenWidth - totalWidth;
  43521. this.scrollOption = {
  43522. currentOffset: offsetLeft,
  43523. startTouchX: offsetLeft,
  43524. distance: 0,
  43525. lastMoveTime: 0
  43526. };
  43527. this.opts._scrollDistance_ = offsetLeft;
  43528. break;
  43529. }
  43530. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  43531. };
  43532. Charts.prototype.zoom = function () {
  43533. var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
  43534. if (this.opts.enableScroll !== true) {
  43535. console.log('请启用滚动条后使用!');
  43536. return;
  43537. }
  43538. //当前屏幕中间点
  43539. var centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
  43540. this.opts.animation = false;
  43541. this.opts.xAxis.itemCount = val.itemCount;
  43542. //重新计算x轴偏移距离
  43543. var _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),
  43544. yAxisWidth = _calYAxisData.yAxisWidth;
  43545. this.config.yAxisWidth = yAxisWidth;
  43546. var offsetLeft = 0;
  43547. var _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
  43548. xAxisPoints = _getXAxisPoints0.xAxisPoints,
  43549. startX = _getXAxisPoints0.startX,
  43550. endX = _getXAxisPoints0.endX,
  43551. eachSpacing = _getXAxisPoints0.eachSpacing;
  43552. var centerLeft = eachSpacing * centerPoint;
  43553. var screenWidth = endX - startX;
  43554. var MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
  43555. offsetLeft = screenWidth / 2 - centerLeft;
  43556. if (offsetLeft > 0) {
  43557. offsetLeft = 0;
  43558. }
  43559. if (offsetLeft < MaxLeft) {
  43560. offsetLeft = MaxLeft;
  43561. }
  43562. this.scrollOption = {
  43563. currentOffset: offsetLeft,
  43564. startTouchX: offsetLeft,
  43565. distance: 0,
  43566. lastMoveTime: 0
  43567. };
  43568. this.opts._scrollDistance_ = offsetLeft;
  43569. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  43570. };
  43571. Charts.prototype.stopAnimation = function () {
  43572. this.animationInstance && this.animationInstance.stop();
  43573. };
  43574. Charts.prototype.addEventListener = function (type, listener) {
  43575. this.event.addEventListener(type, listener);
  43576. };
  43577. Charts.prototype.delEventListener = function (type) {
  43578. this.event.delEventListener(type);
  43579. };
  43580. Charts.prototype.getCurrentDataIndex = function (e) {
  43581. var touches = null;
  43582. if (e.changedTouches) {
  43583. touches = e.changedTouches[0];
  43584. } else {
  43585. touches = e.mp.changedTouches[0];
  43586. }
  43587. if (touches) {
  43588. var _touches$ = getTouches(touches, this.opts, e);
  43589. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') {
  43590. return findPieChartCurrentIndex({
  43591. x: _touches$.x,
  43592. y: _touches$.y
  43593. }, this.opts.chartData.pieData);
  43594. } else if (this.opts.type === 'radar') {
  43595. return findRadarChartCurrentIndex({
  43596. x: _touches$.x,
  43597. y: _touches$.y
  43598. }, this.opts.chartData.radarData, this.opts.categories.length);
  43599. } else if (this.opts.type === 'funnel') {
  43600. return findFunnelChartCurrentIndex({
  43601. x: _touches$.x,
  43602. y: _touches$.y
  43603. }, this.opts.chartData.funnelData);
  43604. } else if (this.opts.type === 'map') {
  43605. return findMapChartCurrentIndex({
  43606. x: _touches$.x,
  43607. y: _touches$.y
  43608. }, this.opts);
  43609. } else if (this.opts.type === 'word') {
  43610. return findWordChartCurrentIndex({
  43611. x: _touches$.x,
  43612. y: _touches$.y
  43613. }, this.opts.chartData.wordCloudData);
  43614. } else {
  43615. return findCurrentIndex({
  43616. x: _touches$.x,
  43617. y: _touches$.y
  43618. }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
  43619. }
  43620. }
  43621. return -1;
  43622. };
  43623. Charts.prototype.getLegendDataIndex = function (e) {
  43624. var touches = null;
  43625. if (e.changedTouches) {
  43626. touches = e.changedTouches[0];
  43627. } else {
  43628. touches = e.mp.changedTouches[0];
  43629. }
  43630. if (touches) {
  43631. var _touches$ = getTouches(touches, this.opts, e);
  43632. return findLegendIndex({
  43633. x: _touches$.x,
  43634. y: _touches$.y
  43635. }, this.opts.chartData.legendData);
  43636. }
  43637. return -1;
  43638. };
  43639. Charts.prototype.touchLegend = function (e) {
  43640. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  43641. var touches = null;
  43642. if (e.changedTouches) {
  43643. touches = e.changedTouches[0];
  43644. } else {
  43645. touches = e.mp.changedTouches[0];
  43646. }
  43647. if (touches) {
  43648. var _touches$ = getTouches(touches, this.opts, e);
  43649. var index = this.getLegendDataIndex(e);
  43650. if (index >= 0) {
  43651. this.opts.series[index].show = !this.opts.series[index].show;
  43652. this.opts.animation = option.animation ? true : false;
  43653. this.opts._scrollDistance_ = this.scrollOption.currentOffset;
  43654. drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
  43655. }
  43656. }
  43657. };
  43658. Charts.prototype.showToolTip = function (e) {
  43659. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  43660. var touches = null;
  43661. if (e.changedTouches) {
  43662. touches = e.changedTouches[0];
  43663. } else {
  43664. touches = e.mp.changedTouches[0];
  43665. }
  43666. if (!touches) {
  43667. console.log("touchError");
  43668. }
  43669. var _touches$ = getTouches(touches, this.opts, e);
  43670. var currentOffset = this.scrollOption.currentOffset;
  43671. var opts = assign({}, this.opts, {
  43672. _scrollDistance_: currentOffset,
  43673. animation: false
  43674. });
  43675. if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column') {
  43676. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  43677. if (index > -1) {
  43678. var seriesData = getSeriesDataItem(this.opts.series, index);
  43679. if (seriesData.length !== 0) {
  43680. var _getToolTipData = getToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories, option),
  43681. textList = _getToolTipData.textList,
  43682. offset = _getToolTipData.offset;
  43683. offset.y = _touches$.y;
  43684. opts.tooltip = {
  43685. textList: option.textList ? option.textList : textList,
  43686. offset: offset,
  43687. option: option,
  43688. index: index
  43689. };
  43690. }
  43691. }
  43692. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43693. }
  43694. if (this.opts.type === 'mix') {
  43695. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  43696. if (index > -1) {
  43697. var currentOffset = this.scrollOption.currentOffset;
  43698. var opts = assign({}, this.opts, {
  43699. _scrollDistance_: currentOffset,
  43700. animation: false
  43701. });
  43702. var seriesData = getSeriesDataItem(this.opts.series, index);
  43703. if (seriesData.length !== 0) {
  43704. var _getMixToolTipData = getMixToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories, option),
  43705. textList = _getMixToolTipData.textList,
  43706. offset = _getMixToolTipData.offset;
  43707. offset.y = _touches$.y;
  43708. opts.tooltip = {
  43709. textList: option.textList ? option.textList : textList,
  43710. offset: offset,
  43711. option: option,
  43712. index: index
  43713. };
  43714. }
  43715. }
  43716. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43717. }
  43718. if (this.opts.type === 'candle') {
  43719. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  43720. if (index > -1) {
  43721. var currentOffset = this.scrollOption.currentOffset;
  43722. var opts = assign({}, this.opts, {
  43723. _scrollDistance_: currentOffset,
  43724. animation: false
  43725. });
  43726. var seriesData = getSeriesDataItem(this.opts.series, index);
  43727. if (seriesData.length !== 0) {
  43728. var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts.chartData.calPoints, index, this.opts.categories, this.opts.extra.candle, option),
  43729. textList = _getToolTipData.textList,
  43730. offset = _getToolTipData.offset;
  43731. offset.y = _touches$.y;
  43732. opts.tooltip = {
  43733. textList: option.textList ? option.textList : textList,
  43734. offset: offset,
  43735. option: option,
  43736. index: index
  43737. };
  43738. }
  43739. }
  43740. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43741. }
  43742. if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
  43743. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  43744. if (index > -1) {
  43745. var currentOffset = this.scrollOption.currentOffset;
  43746. var opts = assign({}, this.opts, {
  43747. _scrollDistance_: currentOffset,
  43748. animation: false
  43749. });
  43750. var seriesData = this.opts._series_[index];
  43751. var textList = [{
  43752. text: option.format ? option.format(seriesData) : seriesData.name + ': ' + seriesData.data,
  43753. color: seriesData.color
  43754. }];
  43755. var offset = {
  43756. x: _touches$.x,
  43757. y: _touches$.y
  43758. };
  43759. opts.tooltip = {
  43760. textList: option.textList ? option.textList : textList,
  43761. offset: offset,
  43762. option: option,
  43763. index: index
  43764. };
  43765. }
  43766. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43767. }
  43768. if (this.opts.type === 'map' || this.opts.type === 'word') {
  43769. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  43770. if (index > -1) {
  43771. var currentOffset = this.scrollOption.currentOffset;
  43772. var opts = assign({}, this.opts, {
  43773. _scrollDistance_: currentOffset,
  43774. animation: false
  43775. });
  43776. var seriesData = this.opts._series_[index];
  43777. var textList = [{
  43778. text: option.format ? option.format(seriesData) : seriesData.properties.name,
  43779. color: seriesData.color
  43780. }];
  43781. var offset = {
  43782. x: _touches$.x,
  43783. y: _touches$.y
  43784. };
  43785. opts.tooltip = {
  43786. textList: option.textList ? option.textList : textList,
  43787. offset: offset,
  43788. option: option,
  43789. index: index
  43790. };
  43791. }
  43792. opts.updateData = false;
  43793. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43794. }
  43795. if (this.opts.type === 'radar') {
  43796. var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
  43797. if (index > -1) {
  43798. var currentOffset = this.scrollOption.currentOffset;
  43799. var opts = assign({}, this.opts, {
  43800. _scrollDistance_: currentOffset,
  43801. animation: false
  43802. });
  43803. var seriesData = getSeriesDataItem(this.opts.series, index);
  43804. if (seriesData.length !== 0) {
  43805. var textList = seriesData.map(function (item) {
  43806. return {
  43807. text: option.format ? option.format(item) : item.name + ': ' + item.data,
  43808. color: item.color
  43809. };
  43810. });
  43811. var offset = {
  43812. x: _touches$.x,
  43813. y: _touches$.y
  43814. };
  43815. opts.tooltip = {
  43816. textList: option.textList ? option.textList : textList,
  43817. offset: offset,
  43818. option: option,
  43819. index: index
  43820. };
  43821. }
  43822. }
  43823. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43824. }
  43825. };
  43826. Charts.prototype.translate = function (distance) {
  43827. this.scrollOption = {
  43828. currentOffset: distance,
  43829. startTouchX: distance,
  43830. distance: 0,
  43831. lastMoveTime: 0
  43832. };
  43833. var opts = assign({}, this.opts, {
  43834. _scrollDistance_: distance,
  43835. animation: false
  43836. });
  43837. drawCharts.call(this, this.opts.type, opts, this.config, this.context);
  43838. };
  43839. Charts.prototype.scrollStart = function (e) {
  43840. var touches = null;
  43841. if (e.changedTouches) {
  43842. touches = e.changedTouches[0];
  43843. } else {
  43844. touches = e.mp.changedTouches[0];
  43845. }
  43846. var _touches$ = getTouches(touches, this.opts, e);
  43847. if (touches && this.opts.enableScroll === true) {
  43848. this.scrollOption.startTouchX = _touches$.x;
  43849. }
  43850. };
  43851. Charts.prototype.scroll = function (e) {
  43852. if (this.scrollOption.lastMoveTime === 0) {
  43853. this.scrollOption.lastMoveTime = Date.now();
  43854. }
  43855. var Limit = this.opts.extra.touchMoveLimit || 20;
  43856. var currMoveTime = Date.now();
  43857. var duration = currMoveTime - this.scrollOption.lastMoveTime;
  43858. if (duration < Math.floor(1000 / Limit)) return;
  43859. this.scrollOption.lastMoveTime = currMoveTime;
  43860. var touches = null;
  43861. if (e.changedTouches) {
  43862. touches = e.changedTouches[0];
  43863. } else {
  43864. touches = e.mp.changedTouches[0];
  43865. }
  43866. if (touches && this.opts.enableScroll === true) {
  43867. var _touches$ = getTouches(touches, this.opts, e);
  43868. var _distance;
  43869. _distance = _touches$.x - this.scrollOption.startTouchX;
  43870. var currentOffset = this.scrollOption.currentOffset;
  43871. var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
  43872. this.scrollOption.distance = _distance = validDistance - currentOffset;
  43873. var opts = assign({}, this.opts, {
  43874. _scrollDistance_: currentOffset + _distance,
  43875. animation: false
  43876. });
  43877. drawCharts.call(this, opts.type, opts, this.config, this.context);
  43878. return currentOffset + _distance;
  43879. }
  43880. };
  43881. Charts.prototype.scrollEnd = function (e) {
  43882. if (this.opts.enableScroll === true) {
  43883. var _scrollOption = this.scrollOption,
  43884. currentOffset = _scrollOption.currentOffset,
  43885. distance = _scrollOption.distance;
  43886. this.scrollOption.currentOffset = currentOffset + distance;
  43887. this.scrollOption.distance = 0;
  43888. }
  43889. };
  43890. if (( false ? undefined : _typeof(module)) === "object" && _typeof(module.exports) === "object") {
  43891. module.exports = Charts;
  43892. //export default Charts;//建议使用nodejs的module导出方式,如报错请使用export方式导出
  43893. }
  43894. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! (webpack)/buildin/module.js */ 172)(module)))
  43895. /***/ }),
  43896. /***/ 51:
  43897. /*!***********************************************************************!*\
  43898. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/addUnit.js ***!
  43899. \***********************************************************************/
  43900. /*! no static exports found */
  43901. /***/ (function(module, exports, __webpack_require__) {
  43902. "use strict";
  43903. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  43904. Object.defineProperty(exports, "__esModule", {
  43905. value: true
  43906. });
  43907. exports.default = addUnit;
  43908. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 38));
  43909. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  43910. function addUnit() {
  43911. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  43912. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  43913. value = String(value);
  43914. // 用uView内置验证规则中的number判断是否为数值
  43915. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  43916. }
  43917. /***/ }),
  43918. /***/ 52:
  43919. /*!**********************************************************************!*\
  43920. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/random.js ***!
  43921. \**********************************************************************/
  43922. /*! no static exports found */
  43923. /***/ (function(module, exports, __webpack_require__) {
  43924. "use strict";
  43925. Object.defineProperty(exports, "__esModule", {
  43926. value: true
  43927. });
  43928. exports.default = void 0;
  43929. function random(min, max) {
  43930. if (min >= 0 && max > 0 && max >= min) {
  43931. var gab = max - min + 1;
  43932. return Math.floor(Math.random() * gab + min);
  43933. } else {
  43934. return 0;
  43935. }
  43936. }
  43937. var _default = random;
  43938. exports.default = _default;
  43939. /***/ }),
  43940. /***/ 53:
  43941. /*!********************************************************************!*\
  43942. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/trim.js ***!
  43943. \********************************************************************/
  43944. /*! no static exports found */
  43945. /***/ (function(module, exports, __webpack_require__) {
  43946. "use strict";
  43947. Object.defineProperty(exports, "__esModule", {
  43948. value: true
  43949. });
  43950. exports.default = void 0;
  43951. function trim(str) {
  43952. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  43953. if (pos == 'both') {
  43954. return str.replace(/^\s+|\s+$/g, "");
  43955. } else if (pos == "left") {
  43956. return str.replace(/^\s*/, '');
  43957. } else if (pos == 'right') {
  43958. return str.replace(/(\s*$)/g, "");
  43959. } else if (pos == 'all') {
  43960. return str.replace(/\s+/g, "");
  43961. } else {
  43962. return str;
  43963. }
  43964. }
  43965. var _default = trim;
  43966. exports.default = _default;
  43967. /***/ }),
  43968. /***/ 54:
  43969. /*!*********************************************************************!*\
  43970. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/toast.js ***!
  43971. \*********************************************************************/
  43972. /*! no static exports found */
  43973. /***/ (function(module, exports, __webpack_require__) {
  43974. "use strict";
  43975. /* WEBPACK VAR INJECTION */(function(uni) {
  43976. Object.defineProperty(exports, "__esModule", {
  43977. value: true
  43978. });
  43979. exports.default = void 0;
  43980. function toast(title) {
  43981. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  43982. uni.showToast({
  43983. title: title,
  43984. icon: 'none',
  43985. duration: duration
  43986. });
  43987. }
  43988. var _default = toast;
  43989. exports.default = _default;
  43990. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  43991. /***/ }),
  43992. /***/ 55:
  43993. /*!*************************************************************************!*\
  43994. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/getParent.js ***!
  43995. \*************************************************************************/
  43996. /*! no static exports found */
  43997. /***/ (function(module, exports, __webpack_require__) {
  43998. "use strict";
  43999. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  44000. Object.defineProperty(exports, "__esModule", {
  44001. value: true
  44002. });
  44003. exports.default = getParent;
  44004. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  44005. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  44006. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  44007. function getParent(name, keys) {
  44008. var parent = this.$parent;
  44009. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  44010. while (parent) {
  44011. // 父组件
  44012. if (parent.$options.name !== name) {
  44013. // 如果组件的name不相等,继续上一级寻找
  44014. parent = parent.$parent;
  44015. } else {
  44016. var _ret = function () {
  44017. var data = {};
  44018. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  44019. if (Array.isArray(keys)) {
  44020. keys.map(function (val) {
  44021. data[val] = parent[val] ? parent[val] : '';
  44022. });
  44023. } else {
  44024. // 历遍传过来的对象参数
  44025. for (var i in keys) {
  44026. // 如果子组件有此值则用,无此值则用父组件的值
  44027. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  44028. if (Array.isArray(keys[i])) {
  44029. if (keys[i].length) {
  44030. data[i] = keys[i];
  44031. } else {
  44032. data[i] = parent[i];
  44033. }
  44034. } else if (keys[i].constructor === Object) {
  44035. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  44036. if (Object.keys(keys[i]).length) {
  44037. data[i] = keys[i];
  44038. } else {
  44039. data[i] = parent[i];
  44040. }
  44041. } else {
  44042. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  44043. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  44044. }
  44045. }
  44046. }
  44047. return {
  44048. v: data
  44049. };
  44050. }();
  44051. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  44052. }
  44053. }
  44054. return {};
  44055. }
  44056. /***/ }),
  44057. /***/ 56:
  44058. /*!***********************************************************************!*\
  44059. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/$parent.js ***!
  44060. \***********************************************************************/
  44061. /*! no static exports found */
  44062. /***/ (function(module, exports, __webpack_require__) {
  44063. "use strict";
  44064. Object.defineProperty(exports, "__esModule", {
  44065. value: true
  44066. });
  44067. exports.default = $parent;
  44068. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  44069. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  44070. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  44071. // 值(默认为undefined),就是查找最顶层的$parent
  44072. function $parent() {
  44073. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  44074. var parent = this.$parent;
  44075. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  44076. while (parent) {
  44077. // 父组件
  44078. if (parent.$options && parent.$options.name !== name) {
  44079. // 如果组件的name不相等,继续上一级寻找
  44080. parent = parent.$parent;
  44081. } else {
  44082. return parent;
  44083. }
  44084. }
  44085. return false;
  44086. }
  44087. /***/ }),
  44088. /***/ 57:
  44089. /*!*******************************************************************!*\
  44090. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/sys.js ***!
  44091. \*******************************************************************/
  44092. /*! no static exports found */
  44093. /***/ (function(module, exports, __webpack_require__) {
  44094. "use strict";
  44095. /* WEBPACK VAR INJECTION */(function(uni) {
  44096. Object.defineProperty(exports, "__esModule", {
  44097. value: true
  44098. });
  44099. exports.os = os;
  44100. exports.sys = sys;
  44101. function os() {
  44102. return uni.getSystemInfoSync().platform;
  44103. }
  44104. ;
  44105. function sys() {
  44106. return uni.getSystemInfoSync();
  44107. }
  44108. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  44109. /***/ }),
  44110. /***/ 573:
  44111. /*!*********************************************************************!*\
  44112. !*** E:/yunfei/product1/bigDataApp/static/data/cbd_pest_library.js ***!
  44113. \*********************************************************************/
  44114. /*! no static exports found */
  44115. /***/ (function(module, exports, __webpack_require__) {
  44116. "use strict";
  44117. Object.defineProperty(exports, "__esModule", {
  44118. value: true
  44119. });
  44120. exports.default = void 0;
  44121. // 害虫库
  44122. var insect_dict = {
  44123. '1': '金龟子',
  44124. '2': '夜蛾',
  44125. '3': '二点委夜蛾',
  44126. '4': '梨剑纹夜蛾',
  44127. '5': '杨扇舟蛾',
  44128. '6': '舟蛾',
  44129. '7': '旋幽夜蛾',
  44130. '8': '蝼蛄',
  44131. '9': '步甲',
  44132. '10': '螟蛾',
  44133. '11': '毛黄鳃金龟',
  44134. '12': '尺蛾',
  44135. '13': '剑纹夜蛾',
  44136. '14': '粉缘钻夜蛾',
  44137. '15': '夜蛾科',
  44138. '16': '七星瓢虫',
  44139. '17': '棉铃虫',
  44140. '18': '蜻蜓',
  44141. '19': '蚊',
  44142. '20': '东方粘虫',
  44143. '21': '叶蝉',
  44144. '22': '春尺蠖',
  44145. '23': '雄性春尺蠖',
  44146. '24': '杨小舟蛾',
  44147. '25': '甘蓝夜蛾',
  44148. '26': '小地老虎',
  44149. '27': '两点尼夜蛾',
  44150. '28': '柳阴翅斑螟',
  44151. '29': '桑褶翅尺蛾',
  44152. '30': '宽胫夜蛾',
  44153. '31': '尺蠖',
  44154. '32': '一点钻夜蛾',
  44155. '33': '天蛾',
  44156. '34': '裳夜蛾',
  44157. '35': '灯蛾',
  44158. '36': '美国白蛾',
  44159. '37': '八字白眉天蛾',
  44160. '38': '陌夜蛾',
  44161. '39': '豆天蛾',
  44162. '40': '麦蛾',
  44163. '41': '围连环夜蛾',
  44164. '42': '亚美尺蛾',
  44165. '43': '梨星毛虫',
  44166. '44': '银锭夜蛾',
  44167. '45': '黄臀灯蛾',
  44168. '46': '大螟',
  44169. '47': '燕尾舟蛾',
  44170. '48': '榆津尺蛾',
  44171. '49': '朽木夜蛾',
  44172. '50': '黄地老虎',
  44173. '51': '白钩粘夜蛾',
  44174. '52': '桃蛀螟',
  44175. '53': '甜菜夜蛾',
  44176. '54': '斜纹夜蛾',
  44177. '55': '蚀夜蛾',
  44178. '56': '淡银锭夜蛾',
  44179. '57': '齿美冬夜蛾',
  44180. '58': '一点金刚钻',
  44181. '59': '胡桃豹夜蛾',
  44182. '60': '桑剑纹夜蛾',
  44183. '61': '蓝目天蛾',
  44184. '62': '黑绒绢金龟',
  44185. '63': '烟青虫',
  44186. '64': '暗黑鳃金龟',
  44187. '65': '中华绒金龟',
  44188. '66': '八字地老虎',
  44189. '67': '榆绿天蛾',
  44190. '68': '红星雪灯蛾',
  44191. '69': '雀纹天蛾',
  44192. '70': '铜绿丽金龟',
  44193. '71': '水龟虫',
  44194. '72': '曲线尼夜蛾',
  44195. '73': '粘虫',
  44196. '74': '瘦银锭夜蛾',
  44197. '75': '红天蛾',
  44198. '76': '鳃金龟',
  44199. '77': '大黑鳃金龟',
  44200. '78': '大地老虎',
  44201. '79': '玉米螟',
  44202. '80': '赤角盲蝽',
  44203. '81': '槐尺蛾',
  44204. '82': '银纹夜蛾',
  44205. '83': '天牛',
  44206. '84': '乏夜蛾',
  44207. '85': '丁香天蛾',
  44208. '86': '构月天蛾',
  44209. '87': '虎甲',
  44210. '88': '劳氏粘虫',
  44211. '89': '白薯天蛾',
  44212. '90': '广鹿蛾',
  44213. '91': '二十八星瓢虫',
  44214. '92': '腮金龟',
  44215. '93': '人纹污夜蛾',
  44216. '94': '叩甲',
  44217. '95': '楸蠹野螟',
  44218. '96': '丝绵木金星尺蛾',
  44219. '97': '红缘灯蛾',
  44220. '98': '黄褐丽金龟',
  44221. '99': '螟蛾科',
  44222. '100': '红棕灰夜蛾',
  44223. '101': '黑绒绢金龟',
  44224. '102': '广鹿灯蛾',
  44225. '103': '蝽',
  44226. '104': '蜂',
  44227. '105': '大造桥虫',
  44228. '106': '童剑纹夜蛾',
  44229. '107': '晃剑纹夜蛾',
  44230. '108': '钩粘虫',
  44231. '109': '直影夜蛾',
  44232. '110': '毛黄绢金龟',
  44233. '111': '乌氏小尾天蚕蛾',
  44234. '112': '褐边绿刺蛾',
  44235. '113': '广鹿舟蛾',
  44236. '114': '颜倾城',
  44237. '115': '龙虱',
  44238. '116': '双带盘瓢虫',
  44239. '117': '槲犹冬夜蛾',
  44240. '118': '洋槐天蛾',
  44241. '119': '弧角散纹夜蛾',
  44242. '120': '黄脉天蛾',
  44243. '121': '葡萄天蛾',
  44244. '122': '桃六点天蛾',
  44245. '123': '异色瓢虫',
  44246. '124': '榆黄足毒蛾',
  44247. '125': '客来夜蛾',
  44248. '126': '桦尺蛾',
  44249. '127': '草地螟',
  44250. '128': '细条纹野螟',
  44251. '129': '污灯蛾属',
  44252. '130': '杨二尾舟蛾',
  44253. '131': '克什杆野螟',
  44254. '132': '筱客来夜蛾',
  44255. '133': '栗六点天蛾',
  44256. '134': '紫光盾天蛾',
  44257. '135': '款冬玉米螟',
  44258. '136': '草蛉',
  44259. '137': '亚麻篱灯蛾',
  44260. '138': '扁连环夜蛾',
  44261. '139': '圣蜣螂',
  44262. '140': '白钩粘虫',
  44263. '141': '苇实夜蛾',
  44264. '142': '姬蜂',
  44265. '143': '秘夜蛾',
  44266. '144': '织网夜蛾',
  44267. '145': '深色白眉天蛾',
  44268. '146': '短扇舟蛾',
  44269. '147': '白须天蛾',
  44270. '148': '歌梦尼夜蛾',
  44271. '149': '海安夜蛾',
  44272. '150': '满丫纹夜蛾',
  44273. '151': '蟋蟀',
  44274. '152': '双斑青步甲',
  44275. '153': '白条夜蛾',
  44276. '154': '蟪蛄',
  44277. '155': '负子蝽',
  44278. '156': '脊青步甲',
  44279. '157': '宽斑青步甲',
  44280. '158': '稻从卷叶螟',
  44281. '159': '淡剑夜蛾',
  44282. '160': '甜菜白带野螟',
  44283. '161': '樗蚕',
  44284. '162': '蒙古寒蝉',
  44285. '163': '中带三角夜蛾',
  44286. '164': '蝗虫',
  44287. '165': '多色异丽金龟',
  44288. '166': '白色小卷蛾',
  44289. '167': '狭边青步甲',
  44290. '168': '棉卷叶野螟',
  44291. '169': '豆荚野螟',
  44292. '170': '麻小食心虫',
  44293. '171': '星斑虎甲',
  44294. '172': '黄缘龙虱',
  44295. '173': '无斑弧丽金龟',
  44296. '174': '白额鹰翅天蛾',
  44297. '175': '日本真龙虱',
  44298. '176': '山东云斑螟',
  44299. '177': '小文夜蛾',
  44300. '178': '三条蛀野螟',
  44301. '179': '榆掌舟蛾',
  44302. '180': '刺槐掌舟蛾',
  44303. '181': '星绒天蛾',
  44304. '182': '杨剑舟蛾',
  44305. '183': '刀夜蛾',
  44306. '184': '红节天蛾',
  44307. '185': '星白雪灯蛾',
  44308. '186': '桃剑纹夜蛾',
  44309. '187': '谐夜蛾',
  44310. '188': '小剑纹夜蛾',
  44311. '189': '鸣鸣蝉',
  44312. '190': '姬夜蛾',
  44313. '191': '落叶松毛虫',
  44314. '192': '苹六点天蛾',
  44315. '193': '四斑绢野螟',
  44316. '194': '甘薯天蛾',
  44317. '195': '小线角木蠹蛾',
  44318. '196': '三斑蕊夜蛾',
  44319. '197': '白雪灯蛾',
  44320. '198': '黄刺蛾',
  44321. '199': '茶翅蝽',
  44322. '200': '杨树枯叶蛾',
  44323. "201": "标瑙夜蛾",
  44324. "202": "瓜绢野螟",
  44325. "203": "稻绿蝽",
  44326. "204": "杨雪毒蛾",
  44327. "205": "榆白边舟蛾",
  44328. "206": "扁刺蛾",
  44329. "207": "绒黏夜蛾",
  44330. "208": "庸肖毛翅夜蛾",
  44331. "209": "中华婪步甲",
  44332. "210": "褐黄前锹甲",
  44333. "211": "旱柳原野螟",
  44334. "212": "巨影夜蛾",
  44335. "213": "食蚜蝇",
  44336. "214": "双斑葬甲",
  44337. "215": "黄毒蛾",
  44338. "216": "婪步甲",
  44339. "217": "土甲",
  44340. "218": "中华真地鳖",
  44341. "219": "紫线夜蛾",
  44342. "220": "小黄鳃金龟",
  44343. "221": "中华真土鳖",
  44344. "222": "云斑虎甲",
  44345. "223": "中华黧尺蛾",
  44346. "224": "中华绿刺蛾",
  44347. "225": "巨豹纹尺蛾",
  44348. "226": "多斑豹蠹蛾",
  44349. "227": "桑尺蛾",
  44350. "228": "灰直纹螟",
  44351. "229": "中国绿刺蛾",
  44352. "230": "云杉梢斑螟",
  44353. "231": "桑绢野螟",
  44354. "232": "黄杨绢野螟",
  44355. "233": "突背斑红蝽",
  44356. "234": "高粱条螟",
  44357. "235": "小麦负泥虫",
  44358. "236": "苹掌舟蛾",
  44359. "237": "绒粘夜蛾",
  44360. "238": "灰白灯蛾",
  44361. "239": "隐丫纹夜蛾",
  44362. "240": "满纹夜蛾",
  44363. "241": "黑剑狼夜蛾",
  44364. "242": "蜣螂",
  44365. "243": "福婆鳃金龟",
  44366. "244": "雨尺蛾",
  44367. "245": "优美苔蛾",
  44368. "246": "黄斑野螟",
  44369. "247": "疆夜蛾",
  44370. "248": "六点天蛾",
  44371. "249": "斜线夜蛾",
  44372. "250": "石榴巾夜蛾",
  44373. "251": "绒星天蛾",
  44374. "252": "霜天蛾",
  44375. "253": "大田鳖",
  44376. "254": "灰双纹螟",
  44377. "255": "青尺蛾",
  44378. "256": "二线绿尺蛾",
  44379. "257": "散纹夜蛾",
  44380. "258": "红双线尺蛾",
  44381. "259": "胞短栉夜蛾",
  44382. "260": "飞虱科",
  44383. "261": "桃多斑野螟",
  44384. "262": "甜菜青野螟",
  44385. "263": "核桃鹰翅天蛾",
  44386. "264": "角顶尺蛾",
  44387. "265": "葡萄缺角天蛾",
  44388. "266": "绿尾大蚕蛾",
  44389. "267": "杨褐枯叶蝶",
  44390. "268": "双云尺蛾",
  44391. "269": "斑拟兜夜蛾",
  44392. "270": "阿莎尺蛾",
  44393. "271": "榄绿岐角螟",
  44394. "272": "青革土蝽",
  44395. "273": "核桃美舟蛾",
  44396. "274": "斑点卷叶螟",
  44397. "275": "黄褐箩纹蛾",
  44398. "276": "白环红天蛾",
  44399. "277": "白腹网丛螟",
  44400. "278": "枯叶蛾",
  44401. "279": "丹日明夜蛾",
  44402. "280": "仿白边舟蛾",
  44403. "281": "槐羽舟蛾",
  44404. "282": "草地贪夜蛾",
  44405. "283": "环夜蛾",
  44406. "284": "尘尺蛾",
  44407. "285": "黄二星舟蛾",
  44408. "286": "榆木蠹蛾",
  44409. "287": "水黾",
  44410. "288": "银装冬夜蛾",
  44411. "289": "饰奇尺蛾",
  44412. "290": "枯叶蝶",
  44413. "291": "步甲",
  44414. "292": "阔胸禾犀金龟",
  44415. "293": "眼斑钩蛾",
  44416. "294": "三开蜣螂",
  44417. "295": "金星步甲",
  44418. "296": "残夜蛾",
  44419. "297": "野蚕蛾",
  44420. "298": "芦苇豹蠹蛾",
  44421. "299": "华晓扁犀金龟",
  44422. "300": "灰胸突鳃金龟",
  44423. "301": "龟纹瓢虫",
  44424. "302": "麻皮蝽",
  44425. "303": "斑须蝽",
  44426. "304": "斜斑虎甲",
  44427. "305": "地鳖",
  44428. "306": "叶甲",
  44429. "307": "燕夜蛾",
  44430. "308": "黑纹北灯蛾",
  44431. "309": "网夜蛾",
  44432. "310": "棘翅夜蛾",
  44433. "311": "规尺蛾",
  44434. "312": "苜蓿银纹夜蛾",
  44435. "313": "拟扇舟蛾",
  44436. "314": "丁目大蚕蛾",
  44437. "315": "金黄蛾",
  44438. "316": "黄星雪灯蛾",
  44439. "317": "暗纹紫褐螟",
  44440. "318": "白眉天蛾",
  44441. "319": "黄板盘瓢虫",
  44442. "320": "玫岐角螟",
  44443. "321": "枯黄贡尺蛾",
  44444. "322": "小豆长喙天蛾",
  44445. "323": "橙拟灯蛾",
  44446. "324": "粉蝶灯蛾",
  44447. "325": "纹散丽灯蛾",
  44448. "326": "雪尾尺蛾",
  44449. "327": "鹰翅天蛾",
  44450. "328": "波纹蛾",
  44451. "329": "黑条灰灯蛾",
  44452. "330": "八点灰灯蛾",
  44453. "331": "间纹弦夜蛾",
  44454. "332": "缤夜蛾"
  44455. };
  44456. var _default = insect_dict;
  44457. exports.default = _default;
  44458. /***/ }),
  44459. /***/ 58:
  44460. /*!************************************************************************!*\
  44461. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/debounce.js ***!
  44462. \************************************************************************/
  44463. /*! no static exports found */
  44464. /***/ (function(module, exports, __webpack_require__) {
  44465. "use strict";
  44466. Object.defineProperty(exports, "__esModule", {
  44467. value: true
  44468. });
  44469. exports.default = void 0;
  44470. var timeout = null;
  44471. /**
  44472. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  44473. *
  44474. * @param {Function} func 要执行的回调函数
  44475. * @param {Number} wait 延时的时间
  44476. * @param {Boolean} immediate 是否立即执行
  44477. * @return null
  44478. */
  44479. function debounce(func) {
  44480. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  44481. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  44482. // 清除定时器
  44483. if (timeout !== null) clearTimeout(timeout);
  44484. // 立即执行,此类情况一般用不到
  44485. if (immediate) {
  44486. var callNow = !timeout;
  44487. timeout = setTimeout(function () {
  44488. timeout = null;
  44489. }, wait);
  44490. if (callNow) typeof func === 'function' && func();
  44491. } else {
  44492. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  44493. timeout = setTimeout(function () {
  44494. typeof func === 'function' && func();
  44495. }, wait);
  44496. }
  44497. }
  44498. var _default = debounce;
  44499. exports.default = _default;
  44500. /***/ }),
  44501. /***/ 59:
  44502. /*!************************************************************************!*\
  44503. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/function/throttle.js ***!
  44504. \************************************************************************/
  44505. /*! no static exports found */
  44506. /***/ (function(module, exports, __webpack_require__) {
  44507. "use strict";
  44508. Object.defineProperty(exports, "__esModule", {
  44509. value: true
  44510. });
  44511. exports.default = void 0;
  44512. var timer, flag;
  44513. /**
  44514. * 节流原理:在一定时间内,只能触发一次
  44515. *
  44516. * @param {Function} func 要执行的回调函数
  44517. * @param {Number} wait 延时的时间
  44518. * @param {Boolean} immediate 是否立即执行
  44519. * @return null
  44520. */
  44521. function throttle(func) {
  44522. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  44523. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  44524. if (immediate) {
  44525. if (!flag) {
  44526. flag = true;
  44527. // 如果是立即执行,则在wait毫秒内开始时执行
  44528. typeof func === 'function' && func();
  44529. timer = setTimeout(function () {
  44530. flag = false;
  44531. }, wait);
  44532. }
  44533. } else {
  44534. if (!flag) {
  44535. flag = true;
  44536. // 如果是非立即执行,则在wait毫秒内的结束处执行
  44537. timer = setTimeout(function () {
  44538. flag = false;
  44539. typeof func === 'function' && func();
  44540. }, wait);
  44541. }
  44542. }
  44543. }
  44544. ;
  44545. var _default = throttle;
  44546. exports.default = _default;
  44547. /***/ }),
  44548. /***/ 6:
  44549. /*!***************************************************************!*\
  44550. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  44551. \***************************************************************/
  44552. /*! no static exports found */
  44553. /***/ (function(module, exports) {
  44554. function _arrayWithHoles(arr) {
  44555. if (Array.isArray(arr)) return arr;
  44556. }
  44557. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44558. /***/ }),
  44559. /***/ 60:
  44560. /*!********************************************************************!*\
  44561. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/config/config.js ***!
  44562. \********************************************************************/
  44563. /*! no static exports found */
  44564. /***/ (function(module, exports, __webpack_require__) {
  44565. "use strict";
  44566. Object.defineProperty(exports, "__esModule", {
  44567. value: true
  44568. });
  44569. exports.default = void 0;
  44570. // 此版本发布于2020-11-16
  44571. var version = '1.8.1';
  44572. var _default = {
  44573. v: version,
  44574. version: version,
  44575. // 主题名称
  44576. type: ['primary', 'success', 'info', 'error', 'warning']
  44577. };
  44578. exports.default = _default;
  44579. /***/ }),
  44580. /***/ 61:
  44581. /*!********************************************************************!*\
  44582. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/config/zIndex.js ***!
  44583. \********************************************************************/
  44584. /*! no static exports found */
  44585. /***/ (function(module, exports, __webpack_require__) {
  44586. "use strict";
  44587. Object.defineProperty(exports, "__esModule", {
  44588. value: true
  44589. });
  44590. exports.default = void 0;
  44591. // uniapp在H5中各API的z-index值如下:
  44592. /**
  44593. * actionsheet: 999
  44594. * modal: 999
  44595. * navigate: 998
  44596. * tabbar: 998
  44597. * toast: 999
  44598. */
  44599. var _default = {
  44600. toast: 10090,
  44601. noNetwork: 10080,
  44602. // popup包含popup,actionsheet,keyboard,picker的值
  44603. popup: 10075,
  44604. mask: 10070,
  44605. navbar: 980,
  44606. topTips: 975,
  44607. sticky: 970,
  44608. indexListSticky: 965
  44609. };
  44610. exports.default = _default;
  44611. /***/ }),
  44612. /***/ 62:
  44613. /*!*************************************************!*\
  44614. !*** E:/yunfei/product1/bigDataApp/util/api.js ***!
  44615. \*************************************************/
  44616. /*! no static exports found */
  44617. /***/ (function(module, exports, __webpack_require__) {
  44618. "use strict";
  44619. /* WEBPACK VAR INJECTION */(function(uni) {
  44620. Object.defineProperty(exports, "__esModule", {
  44621. value: true
  44622. });
  44623. exports.myRequest = void 0;
  44624. // const BASE_URL='http://8.136.98.49:8002'
  44625. // let BASE_URL = 'http://192.168.1.112:8002'
  44626. var myRequest = function myRequest(options) {
  44627. var BASE_URL = uni.getStorageSync('http');
  44628. if (BASE_URL == '') {
  44629. BASE_URL = 'http://8.136.98.49:8002'; //线上
  44630. // BASE_URL = 'http://114.115.147.140:8002'//线下
  44631. // BASE_URL = 'http://192.168.1.77:8002'
  44632. }
  44633. // BASE_URL = 'http://192.168.1.52:8003'
  44634. // console.log(BASE_URL)
  44635. var session_key = "";
  44636. session_key = uni.getStorageSync('session_key');
  44637. var url = "";
  44638. var data = options.data || {};
  44639. if (options.url.split('=')[1]) {
  44640. url = options.url.split('=')[1];
  44641. } else {
  44642. url = options.url.split('api/')[1];
  44643. }
  44644. // console.log(url)
  44645. if (url != 'user.login.login_user' && url != 'pest.pests.insect_discern' && url != 'pest.pests.plant_discern' && url != 'pest.pests.pests_contrast' && url != 'pest.pests.pests_expert_img' && url != 'pest.pests.pests_img' && url != 'recognizationSys' && url != 'base.bases.base_photo' && url != 'pest.warning_record.rolemanage_img' && url != 'home.homes.personal_photo' && url != 'ascend.ascend_manage.product_info' && url != 'ascend.ascend_manage.quality_info' && url != 'ascend.ascend_manage.grow_info' && url != 'ascend.ascend_manage.all_ascend' && url != 'after_sale.after_sale_manage.device_check' && url != 'after_sale.after_sale_manage.aftersale_apply') {
  44646. data.token = session_key;
  44647. }
  44648. return new Promise(function (resolve, reject) {
  44649. uni.request({
  44650. url: BASE_URL + options.url,
  44651. method: options.method || 'POST',
  44652. header: {
  44653. "Content-Type": "application/x-www-form-urlencoded"
  44654. },
  44655. data: data,
  44656. success: function success(res) {
  44657. if (res.data.message != "") {
  44658. if (res.data.message == "识别无结果" || res.data.message == "该设备未绑定SIM") {
  44659. resolve(res.data.data);
  44660. } else {
  44661. return uni.showToast({
  44662. title: res.data.message,
  44663. icon: "none"
  44664. });
  44665. }
  44666. }
  44667. resolve(res.data.data);
  44668. },
  44669. fail: function fail(err) {
  44670. uni.showToast({
  44671. title: '请求接口失败'
  44672. });
  44673. reject(err);
  44674. }
  44675. });
  44676. });
  44677. };
  44678. exports.myRequest = myRequest;
  44679. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  44680. /***/ }),
  44681. /***/ 63:
  44682. /*!*****************************************************!*\
  44683. !*** E:/yunfei/product1/bigDataApp/util/neutral.js ***!
  44684. \*****************************************************/
  44685. /*! no static exports found */
  44686. /***/ (function(module, exports, __webpack_require__) {
  44687. "use strict";
  44688. Object.defineProperty(exports, "__esModule", {
  44689. value: true
  44690. });
  44691. exports.default = void 0;
  44692. var _default = {
  44693. isneutral: true //云飞智控
  44694. // isneutral:false//云控
  44695. };
  44696. exports.default = _default;
  44697. /***/ }),
  44698. /***/ 64:
  44699. /*!*************************************************************!*\
  44700. !*** E:/yunfei/product1/bigDataApp/util/QueryPermission.js ***!
  44701. \*************************************************************/
  44702. /*! no static exports found */
  44703. /***/ (function(module, exports, __webpack_require__) {
  44704. "use strict";
  44705. /* WEBPACK VAR INJECTION */(function(uni) {
  44706. Object.defineProperty(exports, "__esModule", {
  44707. value: true
  44708. });
  44709. exports.QueryPermission = QueryPermission;
  44710. var list = [];
  44711. function QueryPermission(id) {
  44712. uni.getStorage({
  44713. key: "jurisdiction",
  44714. success: function success(res) {
  44715. list = JSON.parse(res.data);
  44716. }
  44717. });
  44718. // console.log(list)
  44719. for (var i = 0; i < list.length; i++) {
  44720. if (list[i].children) {
  44721. var data = list[i].children;
  44722. for (var j = 0; j < data.length; j++) {
  44723. if (data[j].children) {
  44724. var item = data[j].children;
  44725. for (var k = 0; k < item.length; k++) {
  44726. if (item[k].pur_id == id) {
  44727. return true;
  44728. }
  44729. }
  44730. }
  44731. }
  44732. }
  44733. }
  44734. return false;
  44735. }
  44736. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  44737. /***/ }),
  44738. /***/ 7:
  44739. /*!*********************************************************************!*\
  44740. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  44741. \*********************************************************************/
  44742. /*! no static exports found */
  44743. /***/ (function(module, exports) {
  44744. function _iterableToArrayLimit(arr, i) {
  44745. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  44746. if (null != _i) {
  44747. var _s,
  44748. _e,
  44749. _x,
  44750. _r,
  44751. _arr = [],
  44752. _n = !0,
  44753. _d = !1;
  44754. try {
  44755. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  44756. if (Object(_i) !== _i) return;
  44757. _n = !1;
  44758. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  44759. ;
  44760. }
  44761. } catch (err) {
  44762. _d = !0, _e = err;
  44763. } finally {
  44764. try {
  44765. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  44766. } finally {
  44767. if (_d) throw _e;
  44768. }
  44769. }
  44770. return _arr;
  44771. }
  44772. }
  44773. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44774. /***/ }),
  44775. /***/ 766:
  44776. /*!**************************************************************!*\
  44777. !*** E:/yunfei/product1/bigDataApp/static/json/eleList.json ***!
  44778. \**************************************************************/
  44779. /*! exports provided: 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, default */
  44780. /***/ (function(module) {
  44781. module.exports = JSON.parse("{\"100\":{\"id\":4,\"index\":\"100\",\"max\":\"10\",\"min\":\"0\",\"name\":\"未定义\",\"prec\":\"1\",\"unit\":\"-\"},\"101\":{\"id\":5,\"index\":\"101\",\"max\":\"100\",\"min\":\"-50\",\"name\":\"大气温度\",\"prec\":\"0.1\",\"unit\":\"℃\"},\"102\":{\"id\":6,\"index\":\"102\",\"max\":\"100\",\"min\":\"0\",\"name\":\"大气湿度\",\"prec\":\"0.1\",\"unit\":\"%RH\"},\"103\":{\"id\":7,\"index\":\"103\",\"max\":\"1500\",\"min\":\"500\",\"name\":\"模拟气压\",\"prec\":\"0.1\",\"unit\":\"hPa\"},\"104\":{\"id\":8,\"index\":\"104\",\"max\":\"100\",\"min\":\"0\",\"name\":\"雨量\",\"prec\":\"0.1\",\"unit\":\"mm\"},\"105\":{\"id\":9,\"index\":\"105\",\"max\":\"1500\",\"min\":\"0\",\"name\":\"简易总辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"106\":{\"id\":10,\"index\":\"106\",\"max\":\"100\",\"min\":\"-50\",\"name\":\"土壤温度\",\"prec\":\"0.1\",\"unit\":\"℃\"},\"107\":{\"id\":11,\"index\":\"107\",\"max\":\"100\",\"min\":\"0\",\"name\":\"土壤湿度\",\"prec\":\"0.1\",\"unit\":\"%\"},\"108\":{\"id\":12,\"index\":\"108\",\"max\":\"70\",\"min\":\"0\",\"name\":\"风速\",\"prec\":\"0.1\",\"unit\":\"m/s\"},\"109\":{\"id\":13,\"index\":\"109\",\"max\":\"360\",\"min\":\"0\",\"name\":\"风向\",\"prec\":\"1\",\"unit\":\"°\"},\"110\":{\"id\":14,\"index\":\"110\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"蒸发\",\"prec\":\"0.1\",\"unit\":\"mm\"},\"111\":{\"id\":15,\"index\":\"111\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"雪量\",\"prec\":\"0.1\",\"unit\":\"mm\"},\"112\":{\"id\":16,\"index\":\"112\",\"max\":\"200000\",\"min\":\"0\",\"name\":\"照度\",\"prec\":\"10\",\"unit\":\"Lux\"},\"113\":{\"id\":17,\"index\":\"113\",\"max\":\"24\",\"min\":\"0\",\"name\":\"日照时数\",\"prec\":\"0.1\",\"unit\":\"h\"},\"114\":{\"id\":18,\"index\":\"114\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"光合\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"115\":{\"id\":19,\"index\":\"115\",\"max\":\"6000\",\"min\":\"0\",\"name\":\"雨量累计\",\"prec\":\"0.1\",\"unit\":\"mm\"},\"116\":{\"id\":20,\"index\":\"116\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"辐射累计\",\"prec\":\"0.01\",\"unit\":\"MJ/m2\"},\"117\":{\"id\":21,\"index\":\"117\",\"max\":\"1\",\"min\":\"0\",\"name\":\"有无雨雪\",\"prec\":\"1\",\"unit\":\"\"},\"118\":{\"id\":22,\"index\":\"118\",\"max\":\"100\",\"min\":\"0\",\"name\":\"噪声\",\"prec\":\"0.1\",\"unit\":\"dB\"},\"119\":{\"id\":23,\"index\":\"119\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"水位\",\"prec\":\"0.1\",\"unit\":\"cm\"},\"120\":{\"id\":24,\"index\":\"120\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"二氧化碳\",\"prec\":\"1\",\"unit\":\"PPM\"},\"121\":{\"id\":25,\"index\":\"121\",\"max\":\"3\",\"min\":\"0\",\"name\":\"曝辐量\",\"prec\":\"1\",\"unit\":\"cal/cm2\"},\"122\":{\"id\":26,\"index\":\"122\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"液位\",\"prec\":\"0.1\",\"unit\":\"mm\"},\"123\":{\"id\":27,\"index\":\"123\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"光合有效辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"124\":{\"id\":28,\"index\":\"124\",\"max\":\"15\",\"min\":\"0\",\"name\":\"电压\",\"prec\":\"0.001\",\"unit\":\"V\"},\"125\":{\"id\":29,\"index\":\"125\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"紫外线\",\"prec\":\"1\",\"unit\":\"mW/m2\"},\"126\":{\"id\":30,\"index\":\"126\",\"max\":\"4\",\"min\":\"0\",\"name\":\"粉尘\",\"prec\":\"0.1\",\"unit\":\"ug/m3\"},\"127\":{\"id\":31,\"index\":\"127\",\"max\":\"1100\",\"min\":\"10\",\"name\":\"数字气压\",\"prec\":\"0.1\",\"unit\":\"hPa\"},\"128\":{\"id\":47,\"index\":\"128\",\"max\":\"14\",\"min\":\"0\",\"name\":\"pH值\",\"prec\":\"0.01\",\"unit\":\"\"},\"129\":{\"id\":33,\"index\":\"129\",\"max\":\"70\",\"min\":\"0\",\"name\":\"最大风速\",\"prec\":\"0.1\",\"unit\":\"m/s\"},\"130\":{\"id\":36,\"index\":\"130\",\"max\":\"70\",\"min\":\"0\",\"name\":\"平均风速\",\"prec\":\"0.1\",\"unit\":\"m/s\"},\"131\":{\"id\":37,\"index\":\"131\",\"max\":\"180\",\"min\":\"-180\",\"name\":\"经度\",\"prec\":\"0.1\",\"unit\":\"°\"},\"132\":{\"id\":38,\"index\":\"132\",\"max\":\"90\",\"min\":\"-90\",\"name\":\"纬度\",\"prec\":\"0.1\",\"unit\":\"°\"},\"133\":{\"id\":39,\"index\":\"133\",\"max\":\"9000\",\"min\":\"-2000\",\"name\":\"海拔高度\",\"prec\":\"0.1\",\"unit\":\"m\"},\"134\":{\"id\":40,\"index\":\"134\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"TBQ总辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"135\":{\"id\":41,\"index\":\"135\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"直接辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"136\":{\"id\":42,\"index\":\"136\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"散射辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"138\":{\"id\":43,\"index\":\"138\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"紫外辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"139\":{\"id\":44,\"index\":\"139\",\"max\":\"100\",\"min\":\"-50\",\"name\":\"贴片温度\",\"prec\":\"0.1\",\"unit\":\"℃\"},\"140\":{\"id\":45,\"index\":\"140\",\"max\":\"40\",\"min\":\"-50\",\"name\":\"露点温度\",\"prec\":\"0.1\",\"unit\":\"℃\"},\"141\":{\"id\":46,\"index\":\"141\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"一氧化碳\",\"prec\":\"1\",\"unit\":\"PPM\"},\"142\":{\"id\":32,\"index\":\"142\",\"max\":\"5000\",\"min\":\"0\",\"name\":\"电流\",\"prec\":\"0.1\",\"unit\":\"mA\"},\"143\":{\"id\":48,\"index\":\"143\",\"max\":\"60\",\"min\":\"0\",\"name\":\"超声波风速\",\"prec\":\"0.01\",\"unit\":\"m/s\"},\"144\":{\"id\":49,\"index\":\"144\",\"max\":\"100\",\"min\":\"-50\",\"name\":\"水温\",\"prec\":\"0.1\",\"unit\":\"℃\"},\"145\":{\"id\":50,\"index\":\"145\",\"max\":\"10\",\"min\":\"0\",\"name\":\"PM2.5\",\"prec\":\"0.1\",\"unit\":\"ug/m3\"},\"146\":{\"id\":51,\"index\":\"146\",\"max\":\"10\",\"min\":\"0\",\"name\":\"PM10\",\"prec\":\"0.1\",\"unit\":\"ug/m3\"},\"147\":{\"id\":53,\"index\":\"147\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.1\",\"prec\":\"0.1\",\"unit\":\" \"},\"148\":{\"id\":54,\"index\":\"148\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.01\",\"prec\":\"0.01\",\"unit\":\" \"},\"149\":{\"id\":55,\"index\":\"149\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.001\",\"prec\":\"0.001\",\"unit\":\" \"},\"150\":{\"id\":56,\"index\":\"150\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"PM2.5\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"151\":{\"id\":57,\"index\":\"151\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"PM10\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"152\":{\"id\":52,\"index\":\"152\",\"max\":\"50000\",\"min\":\"0\",\"name\":\"能见度\",\"prec\":\"0.1\",\"unit\":\" m\"},\"153\":{\"id\":58,\"index\":\"153\",\"max\":\"5000\",\"min\":\"0\",\"name\":\"负氧离子\",\"prec\":\"10\",\"unit\":\"个/cm3\"},\"154\":{\"id\":59,\"index\":\"154\",\"max\":\"15000\",\"min\":\"0\",\"name\":\"盐分\",\"prec\":\"1\",\"unit\":\"mg/L\"},\"155\":{\"id\":60,\"index\":\"155\",\"max\":\"20\",\"min\":\"0\",\"name\":\"电导率\",\"prec\":\"0.01\",\"unit\":\"mS/cm\"},\"156\":{\"id\":61,\"index\":\"156\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"SO2\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"157\":{\"id\":62,\"index\":\"157\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"CO\",\"prec\":\"0.01\",\"unit\":\"mg/m3\"},\"158\":{\"id\":63,\"index\":\"158\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"NO2\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"159\":{\"id\":64,\"index\":\"159\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"O3\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"160\":{\"id\":65,\"index\":\"160\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"管道流量\",\"prec\":\"0.01\",\"unit\":\"m3/s\"},\"161\":{\"id\":66,\"index\":\"161\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"流速\",\"prec\":\"1\",\"unit\":\"L/min\"},\"162\":{\"id\":67,\"index\":\"162\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"管道压力\",\"prec\":\"1\",\"unit\":\"KPa\"},\"163\":{\"id\":68,\"index\":\"163\",\"max\":\"150\",\"min\":\"-150\",\"name\":\"温差\",\"prec\":\"0.1\",\"unit\":\"℃\"},\"164\":{\"id\":69,\"index\":\"164\",\"max\":\"20\",\"min\":\"0\",\"name\":\"溶解氧\",\"prec\":\"0.01\",\"unit\":\"mg/L\"},\"165\":{\"id\":70,\"index\":\"165\",\"max\":\"20\",\"min\":\"-20\",\"name\":\"溶解氧差\",\"prec\":\"0.01\",\"unit\":\"mg/L\"},\"166\":{\"id\":71,\"index\":\"166\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"氨氮\",\"prec\":\"0.1\",\"unit\":\"mg/L\"},\"167\":{\"id\":72,\"index\":\"167\",\"max\":\"50000\",\"min\":\"0\",\"name\":\"负氧离子\",\"prec\":\"1\",\"unit\":\"个/cm3\"},\"168\":{\"id\":73,\"index\":\"168\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"TSP\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"169\":{\"id\":74,\"index\":\"169\",\"max\":\"300\",\"min\":\"0\",\"name\":\"水位\",\"prec\":\"0.01\",\"unit\":\"m\"},\"170\":{\"id\":75,\"index\":\"170\",\"max\":\"20\",\"min\":\"0\",\"name\":\"浊度\",\"prec\":\"0.1\",\"unit\":\"NTU\"},\"171\":{\"id\":76,\"index\":\"171\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.016\",\"prec\":\"0.016\",\"unit\":\" \"},\"172\":{\"id\":77,\"index\":\"172\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.019\",\"prec\":\"0.019\",\"unit\":\" \"},\"173\":{\"id\":78,\"index\":\"173\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.2\",\"prec\":\"0.2\",\"unit\":\" \"},\"174\":{\"id\":79,\"index\":\"174\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.3\",\"prec\":\"0.3\",\"unit\":\" \"},\"175\":{\"id\":80,\"index\":\"175\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.5\",\"prec\":\"0.5\",\"unit\":\" \"},\"176\":{\"id\":81,\"index\":\"176\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.7\",\"prec\":\"0.7\",\"unit\":\" \"},\"177\":{\"id\":82,\"index\":\"177\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.8\",\"prec\":\"0.8\",\"unit\":\" \"},\"178\":{\"id\":83,\"index\":\"178\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.9\",\"prec\":\"0.9\",\"unit\":\" \"},\"179\":{\"id\":84,\"index\":\"179\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.022\",\"prec\":\"0.022\",\"unit\":\" \"},\"180\":{\"id\":85,\"index\":\"180\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"0.025\",\"prec\":\"0.025\",\"unit\":\" \"},\"181\":{\"id\":86,\"index\":\"181\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"SO2\",\"prec\":\"1\",\"unit\":\"ppb\"},\"182\":{\"id\":87,\"index\":\"182\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"CO\",\"prec\":\"1\",\"unit\":\"ppb\"},\"183\":{\"id\":88,\"index\":\"183\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"NO2\",\"prec\":\"1\",\"unit\":\"ppb\"},\"184\":{\"id\":89,\"index\":\"184\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"O3\",\"prec\":\"1\",\"unit\":\"ppb\"},\"185\":{\"id\":90,\"index\":\"185\",\"max\":\"5000\",\"min\":\"0\",\"name\":\"NH3\",\"prec\":\"0.01\",\"unit\":\"ppm\"},\"186\":{\"id\":91,\"index\":\"186\",\"max\":\"5000\",\"min\":\"0\",\"name\":\"H2S\",\"prec\":\"0.01\",\"unit\":\"ppm\"},\"187\":{\"id\":92,\"index\":\"187\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"氧气\",\"prec\":\"0.1\",\"unit\":\"%Vol\"},\"188\":{\"id\":93,\"index\":\"188\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"声波液位\",\"prec\":\"0.4\",\"unit\":\"mm\"},\"189\":{\"id\":94,\"index\":\"189\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"5min-PM25\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"190\":{\"id\":96,\"index\":\"190\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"5min-PM10\",\"prec\":\"1\",\"unit\":\"ug/m3\"},\"191\":{\"id\":95,\"index\":\"191\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"水位\",\"prec\":\"0.1\",\"unit\":\"m\"},\"192\":{\"id\":97,\"index\":\"192\",\"max\":\"0\",\"min\":\"0\",\"name\":\"归零\",\"prec\":\"0\",\"unit\":\"0\"},\"193\":{\"id\":98,\"index\":\"193\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"CO\",\"prec\":\"0.1\",\"unit\":\"mg/m3\"},\"194\":{\"id\":99,\"index\":\"194\",\"max\":\"100\",\"min\":\"0\",\"name\":\"CH4\",\"prec\":\"0.1\",\"unit\":\"%LEL\"},\"195\":{\"id\":100,\"index\":\"195\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"CH4S\",\"prec\":\"0.001\",\"unit\":\"mg/m3\"},\"196\":{\"id\":101,\"index\":\"196\",\"max\":\"60000\",\"min\":\"0\",\"name\":\"能见度\",\"prec\":\"1\",\"unit\":\"m\"},\"197\":{\"id\":102,\"index\":\"197\",\"max\":\"10000\",\"min\":\"-500\",\"name\":\"0.105\",\"prec\":\"0.105\",\"unit\":\"℃\"},\"198\":{\"id\":103,\"index\":\"198\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"土壤盐分\",\"prec\":\"1\",\"unit\":\"\"},\"199\":{\"id\":104,\"index\":\"199\",\"max\":\"60000\",\"min\":\"0\",\"name\":\"累积流量\",\"prec\":\"0.01\",\"unit\":\"m3\"},\"200\":{\"id\":105,\"index\":\"200\",\"max\":\"800\",\"min\":\"0\",\"name\":\"菌落总数\",\"prec\":\"1\",\"unit\":\"CFU\"},\"201\":{\"id\":106,\"index\":\"201\",\"max\":\"500\",\"min\":\"-500\",\"name\":\"土壤热通量\",\"prec\":\"0.1\",\"unit\":\"w/m2\"},\"202\":{\"id\":107,\"index\":\"202\",\"max\":\"5000\",\"min\":\"0\",\"name\":\"液位\",\"prec\":\"1\",\"unit\":\"mm\"},\"203\":{\"id\":108,\"index\":\"203\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"液位\",\"prec\":\"1\",\"unit\":\"mm\"},\"204\":{\"id\":109,\"index\":\"204\",\"max\":\"300\",\"min\":\"0\",\"name\":\"氨氮\",\"prec\":\"0.1\",\"unit\":\"ppm\"},\"205\":{\"id\":110,\"index\":\"205\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"1.2PM\",\"prec\":\"1.2\",\"unit\":\"ug\"},\"206\":{\"id\":111,\"index\":\"206\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"1.5PM\",\"prec\":\"1.5\",\"unit\":\"ug\"},\"207\":{\"id\":112,\"index\":\"207\",\"max\":\"2000\",\"min\":\"0\",\"name\":\"毫米汞柱\",\"prec\":\"0.1\",\"unit\":\"mmHg\"},\"208\":{\"id\":113,\"index\":\"208\",\"max\":\"200000\",\"min\":\"0\",\"name\":\"照度\",\"prec\":\"1\",\"unit\":\"Lux\"},\"209\":{\"id\":114,\"index\":\"209\",\"max\":\"100000\",\"min\":\"0\",\"name\":\"电压\",\"prec\":\"0.1\",\"unit\":\"V\"},\"210\":{\"id\":115,\"index\":\"210\",\"max\":\"100000\",\"min\":\"0\",\"name\":\"电流\",\"prec\":\"0.1\",\"unit\":\"A\"},\"211\":{\"id\":116,\"index\":\"211\",\"max\":\"10000\",\"min\":\"-10000\",\"name\":\"ORP\",\"prec\":\"0.01\",\"unit\":\"mV\"},\"212\":{\"id\":117,\"index\":\"212\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"电压\",\"prec\":\"1\",\"unit\":\"V\"},\"213\":{\"id\":118,\"index\":\"213\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"电流\",\"prec\":\"1\",\"unit\":\"A\"},\"214\":{\"id\":119,\"index\":\"214\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"电量\",\"prec\":\"0.01\",\"unit\":\"KW·h\"},\"215\":{\"id\":120,\"index\":\"215\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"流量\",\"prec\":\"0.01\",\"unit\":\"m3/h\"},\"216\":{\"id\":121,\"index\":\"216\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"累计流量\",\"prec\":\"1\",\"unit\":\"m3\"},\"217\":{\"id\":122,\"index\":\"217\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"累计流量\",\"prec\":\"1\",\"unit\":\"L\"},\"218\":{\"id\":123,\"index\":\"218\",\"max\":\"20000\",\"min\":\"0\",\"name\":\"编码\",\"prec\":\"1\",\"unit\":\" \"},\"219\":{\"id\":124,\"index\":\"219\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"1\",\"prec\":\"1\",\"unit\":\" \"},\"220\":{\"id\":125,\"index\":\"220\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"电导率\",\"prec\":\"1\",\"unit\":\"uS/cm\"},\"221\":{\"id\":126,\"index\":\"221\",\"max\":\"100\",\"min\":\"0\",\"name\":\"路面状况\",\"prec\":\"1\",\"unit\":\" \"},\"222\":{\"id\":127,\"index\":\"222\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"直径\",\"prec\":\"0.1\",\"unit\":\"mm\"},\"223\":{\"id\":128,\"index\":\"223\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"100\",\"prec\":\"100\",\"unit\":\" \"},\"224\":{\"id\":129,\"index\":\"224\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"1000\",\"prec\":\"1000\",\"unit\":\" \"},\"225\":{\"id\":130,\"index\":\"225\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"流量\",\"prec\":\"0.1\",\"unit\":\"m3/h\"},\"226\":{\"id\":131,\"index\":\"226\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"ppm\",\"prec\":\"0.001\",\"unit\":\"ppm\"},\"227\":{\"id\":132,\"index\":\"227\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"10\",\"prec\":\"10\",\"unit\":\" \"},\"228\":{\"id\":133,\"index\":\"228\",\"max\":\"100\",\"min\":\"0\",\"name\":\"湿度\",\"prec\":\"0.001\",\"unit\":\"%RH\"},\"229\":{\"id\":134,\"index\":\"229\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"辐射\",\"prec\":\"1\",\"unit\":\"W/m2\"},\"230\":{\"id\":135,\"index\":\"230\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"水量\",\"prec\":\"0.0056\",\"unit\":\"m3\"},\"231\":{\"id\":136,\"index\":\"231\",\"max\":\"1000\",\"min\":\"0\",\"name\":\"金额\",\"prec\":\"0.1\",\"unit\":\"元\"},\"232\":{\"id\":137,\"index\":\"232\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.001\",\"prec\":\"0.001\",\"unit\":\"m\"},\"233\":{\"id\":138,\"index\":\"233\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.001\",\"prec\":\"0.001\",\"unit\":\"m/s\"},\"234\":{\"id\":139,\"index\":\"234\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.1\",\"prec\":\"0.1\",\"unit\":\"m3\"},\"235\":{\"id\":140,\"index\":\"235\",\"max\":\"10000\",\"min\":\"0\",\"name\":\"0.001\",\"prec\":\"0.001\",\"unit\":\"m3/s\"},\"236\":{\"id\":141,\"index\":\"236\",\"max\":\"360\",\"min\":\"0\",\"name\":\"0.1风向\",\"prec\":\"0.1\",\"unit\":\"°\"},\"237\":{\"id\":142,\"index\":\"237\",\"max\":\"100\",\"min\":\"0\",\"name\":\"0.01大气温度\",\"prec\":\"0.01\",\"unit\":\"℃\"},\"238\":{\"id\":143,\"index\":\"238\",\"max\":\"100\",\"min\":\"0\",\"name\":\"0.01大气湿度\",\"prec\":\"0.01\",\"unit\":\"%RH\"},\"239\":{\"id\":144,\"index\":\"239\",\"max\":\"500\",\"min\":\"0\",\"name\":\"氮离子\",\"prec\":\"1\",\"unit\":\"mg/L\"},\"240\":{\"id\":145,\"index\":\"240\",\"max\":\"500\",\"min\":\"0\",\"name\":\"钾离子\",\"prec\":\"1\",\"unit\":\"mg/L\"},\"241\":{\"id\":146,\"index\":\"241\",\"max\":\"500\",\"min\":\"0\",\"name\":\"磷离子\",\"prec\":\"1\",\"unit\":\"mg/L\"},\"242\":{\"id\":147,\"index\":\"242\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"0.0001\",\"prec\":\"0.0001\",\"unit\":\" \"},\"243\":{\"id\":148,\"index\":\"243\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"0.00001\",\"prec\":\"0.00001\",\"unit\":\" \"},\"244\":{\"id\":149,\"index\":\"244\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"流量\",\"prec\":\"1\",\"unit\":\"mL\"},\"245\":{\"id\":150,\"index\":\"245\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"流速\",\"prec\":\"1\",\"unit\":\"mL/s\"},\"246\":{\"id\":151,\"index\":\"246\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"重量\",\"prec\":\"1\",\"unit\":\"g\"},\"247\":{\"id\":152,\"index\":\"247\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"百分比\",\"prec\":\"0.01\",\"unit\":\"%\"},\"248\":{\"id\":153,\"index\":\"248\",\"max\":\"30000\",\"min\":\"0\",\"name\":\"分米\",\"prec\":\"0.01\",\"unit\":\"dm\"}}");
  44782. /***/ }),
  44783. /***/ 8:
  44784. /*!***************************************************************************!*\
  44785. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  44786. \***************************************************************************/
  44787. /*! no static exports found */
  44788. /***/ (function(module, exports, __webpack_require__) {
  44789. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  44790. function _unsupportedIterableToArray(o, minLen) {
  44791. if (!o) return;
  44792. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  44793. var n = Object.prototype.toString.call(o).slice(8, -1);
  44794. if (n === "Object" && o.constructor) n = o.constructor.name;
  44795. if (n === "Map" || n === "Set") return Array.from(o);
  44796. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  44797. }
  44798. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  44799. /***/ }),
  44800. /***/ 84:
  44801. /*!***************************************************************************!*\
  44802. !*** E:/yunfei/product1/bigDataApp/components/jsencrypt/jsencrypt.min.js ***!
  44803. \***************************************************************************/
  44804. /*! no static exports found */
  44805. /***/ (function(module, exports, __webpack_require__) {
  44806. /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  44807. var CryptoJS = CryptoJS || function (a, b) {
  44808. var c, e, f, g, h, i, j, k, l, m, n, o, q;
  44809. if (!c && "undefined" != typeof global && global.crypto && (c = global.crypto), !c && "function" == "function") try {
  44810. c = __webpack_require__(/*! crypto */ 85);
  44811. } catch (d) {}
  44812. return e = function e() {
  44813. if (c) {
  44814. if ("function" == typeof c.getRandomValues) try {
  44815. return c.getRandomValues(new Uint32Array(1))[0];
  44816. } catch (a) {}
  44817. if ("function" == typeof c.randomBytes) try {
  44818. return c.randomBytes(4).readInt32LE();
  44819. } catch (a) {}
  44820. }
  44821. throw new Error("Native crypto module could not be used to get secure random number.");
  44822. }, f = Object.create || function () {
  44823. function a() {}
  44824. return function (b) {
  44825. var c;
  44826. return a.prototype = b, c = new a(), a.prototype = null, c;
  44827. };
  44828. }(), g = {}, h = g.lib = {}, i = h.Base = function () {
  44829. return {
  44830. extend: function extend(a) {
  44831. var b = f(this);
  44832. return a && b.mixIn(a), b.hasOwnProperty("init") && this.init !== b.init || (b.init = function () {
  44833. b.$super.init.apply(this, arguments);
  44834. }), b.init.prototype = b, b.$super = this, b;
  44835. },
  44836. create: function create() {
  44837. var a = this.extend();
  44838. return a.init.apply(a, arguments), a;
  44839. },
  44840. init: function init() {},
  44841. mixIn: function mixIn(a) {
  44842. for (var b in a) {
  44843. a.hasOwnProperty(b) && (this[b] = a[b]);
  44844. }
  44845. a.hasOwnProperty("toString") && (this.toString = a.toString);
  44846. },
  44847. clone: function clone() {
  44848. return this.init.prototype.extend(this);
  44849. }
  44850. };
  44851. }(), j = h.WordArray = i.extend({
  44852. init: function init(a, c) {
  44853. a = this.words = a || [], this.sigBytes = c != b ? c : 4 * a.length;
  44854. },
  44855. toString: function toString(a) {
  44856. return (a || l).stringify(this);
  44857. },
  44858. concat: function concat(a) {
  44859. var f,
  44860. g,
  44861. b = this.words,
  44862. c = a.words,
  44863. d = this.sigBytes,
  44864. e = a.sigBytes;
  44865. if (this.clamp(), d % 4) for (f = 0; e > f; f++) {
  44866. g = 255 & c[f >>> 2] >>> 24 - 8 * (f % 4), b[d + f >>> 2] |= g << 24 - 8 * ((d + f) % 4);
  44867. } else for (f = 0; e > f; f += 4) {
  44868. b[d + f >>> 2] = c[f >>> 2];
  44869. }
  44870. return this.sigBytes += e, this;
  44871. },
  44872. clamp: function clamp() {
  44873. var b = this.words,
  44874. c = this.sigBytes;
  44875. b[c >>> 2] &= 4294967295 << 32 - 8 * (c % 4), b.length = a.ceil(c / 4);
  44876. },
  44877. clone: function clone() {
  44878. var a = i.clone.call(this);
  44879. return a.words = this.words.slice(0), a;
  44880. },
  44881. random: function random(a) {
  44882. var c,
  44883. b = [];
  44884. for (c = 0; a > c; c += 4) {
  44885. b.push(e());
  44886. }
  44887. return new j.init(b, a);
  44888. }
  44889. }), k = g.enc = {}, l = k.Hex = {
  44890. stringify: function stringify(a) {
  44891. var e,
  44892. f,
  44893. b = a.words,
  44894. c = a.sigBytes,
  44895. d = [];
  44896. for (e = 0; c > e; e++) {
  44897. f = 255 & b[e >>> 2] >>> 24 - 8 * (e % 4), d.push((f >>> 4).toString(16)), d.push((15 & f).toString(16));
  44898. }
  44899. return d.join("");
  44900. },
  44901. parse: function parse(a) {
  44902. var d,
  44903. b = a.length,
  44904. c = [];
  44905. for (d = 0; b > d; d += 2) {
  44906. c[d >>> 3] |= parseInt(a.substr(d, 2), 16) << 24 - 4 * (d % 8);
  44907. }
  44908. return new j.init(c, b / 2);
  44909. }
  44910. }, m = k.Latin1 = {
  44911. stringify: function stringify(a) {
  44912. var e,
  44913. f,
  44914. b = a.words,
  44915. c = a.sigBytes,
  44916. d = [];
  44917. for (e = 0; c > e; e++) {
  44918. f = 255 & b[e >>> 2] >>> 24 - 8 * (e % 4), d.push(String.fromCharCode(f));
  44919. }
  44920. return d.join("");
  44921. },
  44922. parse: function parse(a) {
  44923. var d,
  44924. b = a.length,
  44925. c = [];
  44926. for (d = 0; b > d; d++) {
  44927. c[d >>> 2] |= (255 & a.charCodeAt(d)) << 24 - 8 * (d % 4);
  44928. }
  44929. return new j.init(c, b);
  44930. }
  44931. }, n = k.Utf8 = {
  44932. stringify: function stringify(a) {
  44933. try {
  44934. return decodeURIComponent(escape(m.stringify(a)));
  44935. } catch (b) {
  44936. throw new Error("Malformed UTF-8 data");
  44937. }
  44938. },
  44939. parse: function parse(a) {
  44940. return m.parse(unescape(encodeURIComponent(a)));
  44941. }
  44942. }, o = h.BufferedBlockAlgorithm = i.extend({
  44943. reset: function reset() {
  44944. this._data = new j.init(), this._nDataBytes = 0;
  44945. },
  44946. _append: function _append(a) {
  44947. "string" == typeof a && (a = n.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes;
  44948. },
  44949. _process: function _process(b) {
  44950. var c,
  44951. k,
  44952. l,
  44953. m,
  44954. d = this._data,
  44955. e = d.words,
  44956. f = d.sigBytes,
  44957. g = this.blockSize,
  44958. h = 4 * g,
  44959. i = f / h;
  44960. if (i = b ? a.ceil(i) : a.max((0 | i) - this._minBufferSize, 0), k = i * g, l = a.min(4 * k, f), k) {
  44961. for (m = 0; k > m; m += g) {
  44962. this._doProcessBlock(e, m);
  44963. }
  44964. c = e.splice(0, k), d.sigBytes -= l;
  44965. }
  44966. return new j.init(c, l);
  44967. },
  44968. clone: function clone() {
  44969. var a = i.clone.call(this);
  44970. return a._data = this._data.clone(), a;
  44971. },
  44972. _minBufferSize: 0
  44973. }), h.Hasher = o.extend({
  44974. cfg: i.extend(),
  44975. init: function init(a) {
  44976. this.cfg = this.cfg.extend(a), this.reset();
  44977. },
  44978. reset: function reset() {
  44979. o.reset.call(this), this._doReset();
  44980. },
  44981. update: function update(a) {
  44982. return this._append(a), this._process(), this;
  44983. },
  44984. finalize: function finalize(a) {
  44985. a && this._append(a);
  44986. var b = this._doFinalize();
  44987. return b;
  44988. },
  44989. blockSize: 16,
  44990. _createHelper: function _createHelper(a) {
  44991. return function (b, c) {
  44992. return new a.init(c).finalize(b);
  44993. };
  44994. },
  44995. _createHmacHelper: function _createHmacHelper(a) {
  44996. return function (b, c) {
  44997. return new q.HMAC.init(a, c).finalize(b);
  44998. };
  44999. }
  45000. }), q = g.algo = {}, g;
  45001. }(Math);
  45002. !function () {
  45003. function f(a, b, d) {
  45004. var g,
  45005. h,
  45006. i,
  45007. j,
  45008. e = [],
  45009. f = 0;
  45010. for (g = 0; b > g; g++) {
  45011. g % 4 && (h = d[a.charCodeAt(g - 1)] << 2 * (g % 4), i = d[a.charCodeAt(g)] >>> 6 - 2 * (g % 4), j = h | i, e[f >>> 2] |= j << 24 - 8 * (f % 4), f++);
  45012. }
  45013. return c.create(e, f);
  45014. }
  45015. var a = CryptoJS,
  45016. b = a.lib,
  45017. c = b.WordArray,
  45018. d = a.enc;
  45019. d.Base64 = {
  45020. stringify: function stringify(a) {
  45021. var e,
  45022. f,
  45023. g,
  45024. h,
  45025. i,
  45026. j,
  45027. k,
  45028. l,
  45029. b = a.words,
  45030. c = a.sigBytes,
  45031. d = this._map;
  45032. for (a.clamp(), e = [], f = 0; c > f; f += 3) {
  45033. for (g = 255 & b[f >>> 2] >>> 24 - 8 * (f % 4), h = 255 & b[f + 1 >>> 2] >>> 24 - 8 * ((f + 1) % 4), i = 255 & b[f + 2 >>> 2] >>> 24 - 8 * ((f + 2) % 4), j = g << 16 | h << 8 | i, k = 0; 4 > k && c > f + .75 * k; k++) {
  45034. e.push(d.charAt(63 & j >>> 6 * (3 - k)));
  45035. }
  45036. }
  45037. if (l = d.charAt(64)) for (; e.length % 4;) {
  45038. e.push(l);
  45039. }
  45040. return e.join("");
  45041. },
  45042. parse: function parse(a) {
  45043. var e,
  45044. g,
  45045. h,
  45046. b = a.length,
  45047. c = this._map,
  45048. d = this._reverseMap;
  45049. if (!d) for (d = this._reverseMap = [], e = 0; e < c.length; e++) {
  45050. d[c.charCodeAt(e)] = e;
  45051. }
  45052. return g = c.charAt(64), g && (h = a.indexOf(g), -1 !== h && (b = h)), f(a, b, d);
  45053. },
  45054. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  45055. };
  45056. }(), function (a) {
  45057. function i(a, b, c, d, e, f, g) {
  45058. var h = a + (b & c | ~b & d) + e + g;
  45059. return (h << f | h >>> 32 - f) + b;
  45060. }
  45061. function j(a, b, c, d, e, f, g) {
  45062. var h = a + (b & d | c & ~d) + e + g;
  45063. return (h << f | h >>> 32 - f) + b;
  45064. }
  45065. function k(a, b, c, d, e, f, g) {
  45066. var h = a + (b ^ c ^ d) + e + g;
  45067. return (h << f | h >>> 32 - f) + b;
  45068. }
  45069. function l(a, b, c, d, e, f, g) {
  45070. var h = a + (c ^ (b | ~d)) + e + g;
  45071. return (h << f | h >>> 32 - f) + b;
  45072. }
  45073. var h,
  45074. b = CryptoJS,
  45075. c = b.lib,
  45076. d = c.WordArray,
  45077. e = c.Hasher,
  45078. f = b.algo,
  45079. g = [];
  45080. !function () {
  45081. for (var b = 0; 64 > b; b++) {
  45082. g[b] = 0 | 4294967296 * a.abs(a.sin(b + 1));
  45083. }
  45084. }(), h = f.MD5 = e.extend({
  45085. _doReset: function _doReset() {
  45086. this._hash = new d.init([1732584193, 4023233417, 2562383102, 271733878]);
  45087. },
  45088. _doProcessBlock: function _doProcessBlock(a, b) {
  45089. var c, d, e, f, h, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E;
  45090. for (c = 0; 16 > c; c++) {
  45091. d = b + c, e = a[d], a[d] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8);
  45092. }
  45093. f = this._hash.words, h = a[b + 0], m = a[b + 1], n = a[b + 2], o = a[b + 3], p = a[b + 4], q = a[b + 5], r = a[b + 6], s = a[b + 7], t = a[b + 8], u = a[b + 9], v = a[b + 10], w = a[b + 11], x = a[b + 12], y = a[b + 13], z = a[b + 14], A = a[b + 15], B = f[0], C = f[1], D = f[2], E = f[3], B = i(B, C, D, E, h, 7, g[0]), E = i(E, B, C, D, m, 12, g[1]), D = i(D, E, B, C, n, 17, g[2]), C = i(C, D, E, B, o, 22, g[3]), B = i(B, C, D, E, p, 7, g[4]), E = i(E, B, C, D, q, 12, g[5]), D = i(D, E, B, C, r, 17, g[6]), C = i(C, D, E, B, s, 22, g[7]), B = i(B, C, D, E, t, 7, g[8]), E = i(E, B, C, D, u, 12, g[9]), D = i(D, E, B, C, v, 17, g[10]), C = i(C, D, E, B, w, 22, g[11]), B = i(B, C, D, E, x, 7, g[12]), E = i(E, B, C, D, y, 12, g[13]), D = i(D, E, B, C, z, 17, g[14]), C = i(C, D, E, B, A, 22, g[15]), B = j(B, C, D, E, m, 5, g[16]), E = j(E, B, C, D, r, 9, g[17]), D = j(D, E, B, C, w, 14, g[18]), C = j(C, D, E, B, h, 20, g[19]), B = j(B, C, D, E, q, 5, g[20]), E = j(E, B, C, D, v, 9, g[21]), D = j(D, E, B, C, A, 14, g[22]), C = j(C, D, E, B, p, 20, g[23]), B = j(B, C, D, E, u, 5, g[24]), E = j(E, B, C, D, z, 9, g[25]), D = j(D, E, B, C, o, 14, g[26]), C = j(C, D, E, B, t, 20, g[27]), B = j(B, C, D, E, y, 5, g[28]), E = j(E, B, C, D, n, 9, g[29]), D = j(D, E, B, C, s, 14, g[30]), C = j(C, D, E, B, x, 20, g[31]), B = k(B, C, D, E, q, 4, g[32]), E = k(E, B, C, D, t, 11, g[33]), D = k(D, E, B, C, w, 16, g[34]), C = k(C, D, E, B, z, 23, g[35]), B = k(B, C, D, E, m, 4, g[36]), E = k(E, B, C, D, p, 11, g[37]), D = k(D, E, B, C, s, 16, g[38]), C = k(C, D, E, B, v, 23, g[39]), B = k(B, C, D, E, y, 4, g[40]), E = k(E, B, C, D, h, 11, g[41]), D = k(D, E, B, C, o, 16, g[42]), C = k(C, D, E, B, r, 23, g[43]), B = k(B, C, D, E, u, 4, g[44]), E = k(E, B, C, D, x, 11, g[45]), D = k(D, E, B, C, A, 16, g[46]), C = k(C, D, E, B, n, 23, g[47]), B = l(B, C, D, E, h, 6, g[48]), E = l(E, B, C, D, s, 10, g[49]), D = l(D, E, B, C, z, 15, g[50]), C = l(C, D, E, B, q, 21, g[51]), B = l(B, C, D, E, x, 6, g[52]), E = l(E, B, C, D, o, 10, g[53]), D = l(D, E, B, C, v, 15, g[54]), C = l(C, D, E, B, m, 21, g[55]), B = l(B, C, D, E, t, 6, g[56]), E = l(E, B, C, D, A, 10, g[57]), D = l(D, E, B, C, r, 15, g[58]), C = l(C, D, E, B, y, 21, g[59]), B = l(B, C, D, E, p, 6, g[60]), E = l(E, B, C, D, w, 10, g[61]), D = l(D, E, B, C, n, 15, g[62]), C = l(C, D, E, B, u, 21, g[63]), f[0] = 0 | f[0] + B, f[1] = 0 | f[1] + C, f[2] = 0 | f[2] + D, f[3] = 0 | f[3] + E;
  45094. },
  45095. _doFinalize: function _doFinalize() {
  45096. var f,
  45097. g,
  45098. h,
  45099. i,
  45100. j,
  45101. k,
  45102. b = this._data,
  45103. c = b.words,
  45104. d = 8 * this._nDataBytes,
  45105. e = 8 * b.sigBytes;
  45106. for (c[e >>> 5] |= 128 << 24 - e % 32, f = a.floor(d / 4294967296), g = d, c[(e + 64 >>> 9 << 4) + 15] = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8), c[(e + 64 >>> 9 << 4) + 14] = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), b.sigBytes = 4 * (c.length + 1), this._process(), h = this._hash, i = h.words, j = 0; 4 > j; j++) {
  45107. k = i[j], i[j] = 16711935 & (k << 8 | k >>> 24) | 4278255360 & (k << 24 | k >>> 8);
  45108. }
  45109. return h;
  45110. },
  45111. clone: function clone() {
  45112. var a = e.clone.call(this);
  45113. return a._hash = this._hash.clone(), a;
  45114. }
  45115. }), b.MD5 = e._createHelper(h), b.HmacMD5 = e._createHmacHelper(h);
  45116. }(Math), function () {
  45117. var a = CryptoJS,
  45118. b = a.lib,
  45119. c = b.WordArray,
  45120. d = b.Hasher,
  45121. e = a.algo,
  45122. f = [],
  45123. g = e.SHA1 = d.extend({
  45124. _doReset: function _doReset() {
  45125. this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
  45126. },
  45127. _doProcessBlock: function _doProcessBlock(a, b) {
  45128. var j,
  45129. k,
  45130. l,
  45131. c = this._hash.words,
  45132. d = c[0],
  45133. e = c[1],
  45134. g = c[2],
  45135. h = c[3],
  45136. i = c[4];
  45137. for (j = 0; 80 > j; j++) {
  45138. 16 > j ? f[j] = 0 | a[b + j] : (k = f[j - 3] ^ f[j - 8] ^ f[j - 14] ^ f[j - 16], f[j] = k << 1 | k >>> 31), l = (d << 5 | d >>> 27) + i + f[j], l += 20 > j ? (e & g | ~e & h) + 1518500249 : 40 > j ? (e ^ g ^ h) + 1859775393 : 60 > j ? (e & g | e & h | g & h) - 1894007588 : (e ^ g ^ h) - 899497514, i = h, h = g, g = e << 30 | e >>> 2, e = d, d = l;
  45139. }
  45140. c[0] = 0 | c[0] + d, c[1] = 0 | c[1] + e, c[2] = 0 | c[2] + g, c[3] = 0 | c[3] + h, c[4] = 0 | c[4] + i;
  45141. },
  45142. _doFinalize: function _doFinalize() {
  45143. var a = this._data,
  45144. b = a.words,
  45145. c = 8 * this._nDataBytes,
  45146. d = 8 * a.sigBytes;
  45147. return b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 64 >>> 9 << 4) + 14] = Math.floor(c / 4294967296), b[(d + 64 >>> 9 << 4) + 15] = c, a.sigBytes = 4 * b.length, this._process(), this._hash;
  45148. },
  45149. clone: function clone() {
  45150. var a = d.clone.call(this);
  45151. return a._hash = this._hash.clone(), a;
  45152. }
  45153. });
  45154. a.SHA1 = d._createHelper(g), a.HmacSHA1 = d._createHmacHelper(g);
  45155. }(), function (a) {
  45156. var i,
  45157. j,
  45158. b = CryptoJS,
  45159. c = b.lib,
  45160. d = c.WordArray,
  45161. e = c.Hasher,
  45162. f = b.algo,
  45163. g = [],
  45164. h = [];
  45165. !function () {
  45166. function b(b) {
  45167. var d,
  45168. c = a.sqrt(b);
  45169. for (d = 2; c >= d; d++) {
  45170. if (!(b % d)) return !1;
  45171. }
  45172. return !0;
  45173. }
  45174. function c(a) {
  45175. return 0 | 4294967296 * (a - (0 | a));
  45176. }
  45177. for (var d = 2, e = 0; 64 > e;) {
  45178. b(d) && (8 > e && (g[e] = c(a.pow(d, .5))), h[e] = c(a.pow(d, 1 / 3)), e++), d++;
  45179. }
  45180. }(), i = [], j = f.SHA256 = e.extend({
  45181. _doReset: function _doReset() {
  45182. this._hash = new d.init(g.slice(0));
  45183. },
  45184. _doProcessBlock: function _doProcessBlock(a, b) {
  45185. var n,
  45186. o,
  45187. p,
  45188. q,
  45189. r,
  45190. s,
  45191. t,
  45192. u,
  45193. v,
  45194. w,
  45195. x,
  45196. c = this._hash.words,
  45197. d = c[0],
  45198. e = c[1],
  45199. f = c[2],
  45200. g = c[3],
  45201. j = c[4],
  45202. k = c[5],
  45203. l = c[6],
  45204. m = c[7];
  45205. for (n = 0; 64 > n; n++) {
  45206. 16 > n ? i[n] = 0 | a[b + n] : (o = i[n - 15], p = (o << 25 | o >>> 7) ^ (o << 14 | o >>> 18) ^ o >>> 3, q = i[n - 2], r = (q << 15 | q >>> 17) ^ (q << 13 | q >>> 19) ^ q >>> 10, i[n] = p + i[n - 7] + r + i[n - 16]), s = j & k ^ ~j & l, t = d & e ^ d & f ^ e & f, u = (d << 30 | d >>> 2) ^ (d << 19 | d >>> 13) ^ (d << 10 | d >>> 22), v = (j << 26 | j >>> 6) ^ (j << 21 | j >>> 11) ^ (j << 7 | j >>> 25), w = m + v + s + h[n] + i[n], x = u + t, m = l, l = k, k = j, j = 0 | g + w, g = f, f = e, e = d, d = 0 | w + x;
  45207. }
  45208. c[0] = 0 | c[0] + d, c[1] = 0 | c[1] + e, c[2] = 0 | c[2] + f, c[3] = 0 | c[3] + g, c[4] = 0 | c[4] + j, c[5] = 0 | c[5] + k, c[6] = 0 | c[6] + l, c[7] = 0 | c[7] + m;
  45209. },
  45210. _doFinalize: function _doFinalize() {
  45211. var b = this._data,
  45212. c = b.words,
  45213. d = 8 * this._nDataBytes,
  45214. e = 8 * b.sigBytes;
  45215. return c[e >>> 5] |= 128 << 24 - e % 32, c[(e + 64 >>> 9 << 4) + 14] = a.floor(d / 4294967296), c[(e + 64 >>> 9 << 4) + 15] = d, b.sigBytes = 4 * c.length, this._process(), this._hash;
  45216. },
  45217. clone: function clone() {
  45218. var a = e.clone.call(this);
  45219. return a._hash = this._hash.clone(), a;
  45220. }
  45221. }), b.SHA256 = e._createHelper(j), b.HmacSHA256 = e._createHmacHelper(j);
  45222. }(Math), function () {
  45223. function f(a) {
  45224. return 4278255360 & a << 8 | 16711935 & a >>> 8;
  45225. }
  45226. var a = CryptoJS,
  45227. b = a.lib,
  45228. c = b.WordArray,
  45229. d = a.enc;
  45230. d.Utf16 = d.Utf16BE = {
  45231. stringify: function stringify(a) {
  45232. var e,
  45233. f,
  45234. b = a.words,
  45235. c = a.sigBytes,
  45236. d = [];
  45237. for (e = 0; c > e; e += 2) {
  45238. f = 65535 & b[e >>> 2] >>> 16 - 8 * (e % 4), d.push(String.fromCharCode(f));
  45239. }
  45240. return d.join("");
  45241. },
  45242. parse: function parse(a) {
  45243. var e,
  45244. b = a.length,
  45245. d = [];
  45246. for (e = 0; b > e; e++) {
  45247. d[e >>> 1] |= a.charCodeAt(e) << 16 - 16 * (e % 2);
  45248. }
  45249. return c.create(d, 2 * b);
  45250. }
  45251. }, d.Utf16LE = {
  45252. stringify: function stringify(a) {
  45253. var e,
  45254. g,
  45255. b = a.words,
  45256. c = a.sigBytes,
  45257. d = [];
  45258. for (e = 0; c > e; e += 2) {
  45259. g = f(65535 & b[e >>> 2] >>> 16 - 8 * (e % 4)), d.push(String.fromCharCode(g));
  45260. }
  45261. return d.join("");
  45262. },
  45263. parse: function parse(a) {
  45264. var e,
  45265. b = a.length,
  45266. d = [];
  45267. for (e = 0; b > e; e++) {
  45268. d[e >>> 1] |= f(a.charCodeAt(e) << 16 - 16 * (e % 2));
  45269. }
  45270. return c.create(d, 2 * b);
  45271. }
  45272. };
  45273. }(), function () {
  45274. var a, b, c, d, e;
  45275. "function" == typeof ArrayBuffer && (a = CryptoJS, b = a.lib, c = b.WordArray, d = c.init, e = c.init = function (a) {
  45276. var b, c, e;
  45277. if (a instanceof ArrayBuffer && (a = new Uint8Array(a)), (a instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && a instanceof Uint8ClampedArray || a instanceof Int16Array || a instanceof Uint16Array || a instanceof Int32Array || a instanceof Uint32Array || a instanceof Float32Array || a instanceof Float64Array) && (a = new Uint8Array(a.buffer, a.byteOffset, a.byteLength)), a instanceof Uint8Array) {
  45278. for (b = a.byteLength, c = [], e = 0; b > e; e++) {
  45279. c[e >>> 2] |= a[e] << 24 - 8 * (e % 4);
  45280. }
  45281. d.call(this, c, b);
  45282. } else d.apply(this, arguments);
  45283. }, e.prototype = c);
  45284. }(), function () {
  45285. function n(a, b, c) {
  45286. return a ^ b ^ c;
  45287. }
  45288. function o(a, b, c) {
  45289. return a & b | ~a & c;
  45290. }
  45291. function p(a, b, c) {
  45292. return (a | ~b) ^ c;
  45293. }
  45294. function q(a, b, c) {
  45295. return a & c | b & ~c;
  45296. }
  45297. function r(a, b, c) {
  45298. return a ^ (b | ~c);
  45299. }
  45300. function s(a, b) {
  45301. return a << b | a >>> 32 - b;
  45302. }
  45303. var b = CryptoJS,
  45304. c = b.lib,
  45305. d = c.WordArray,
  45306. e = c.Hasher,
  45307. f = b.algo,
  45308. g = d.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]),
  45309. h = d.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]),
  45310. i = d.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]),
  45311. j = d.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]),
  45312. k = d.create([0, 1518500249, 1859775393, 2400959708, 2840853838]),
  45313. l = d.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
  45314. m = f.RIPEMD160 = e.extend({
  45315. _doReset: function _doReset() {
  45316. this._hash = d.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
  45317. },
  45318. _doProcessBlock: function _doProcessBlock(a, b) {
  45319. var c, d, e, f, m, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I;
  45320. for (c = 0; 16 > c; c++) {
  45321. d = b + c, e = a[d], a[d] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8);
  45322. }
  45323. for (f = this._hash.words, m = k.words, t = l.words, u = g.words, v = h.words, w = i.words, x = j.words, D = y = f[0], E = z = f[1], F = A = f[2], G = B = f[3], H = C = f[4], c = 0; 80 > c; c += 1) {
  45324. I = 0 | y + a[b + u[c]], I += 16 > c ? n(z, A, B) + m[0] : 32 > c ? o(z, A, B) + m[1] : 48 > c ? p(z, A, B) + m[2] : 64 > c ? q(z, A, B) + m[3] : r(z, A, B) + m[4], I = 0 | I, I = s(I, w[c]), I = 0 | I + C, y = C, C = B, B = s(A, 10), A = z, z = I, I = 0 | D + a[b + v[c]], I += 16 > c ? r(E, F, G) + t[0] : 32 > c ? q(E, F, G) + t[1] : 48 > c ? p(E, F, G) + t[2] : 64 > c ? o(E, F, G) + t[3] : n(E, F, G) + t[4], I = 0 | I, I = s(I, x[c]), I = 0 | I + H, D = H, H = G, G = s(F, 10), F = E, E = I;
  45325. }
  45326. I = 0 | f[1] + A + G, f[1] = 0 | f[2] + B + H, f[2] = 0 | f[3] + C + D, f[3] = 0 | f[4] + y + E, f[4] = 0 | f[0] + z + F, f[0] = I;
  45327. },
  45328. _doFinalize: function _doFinalize() {
  45329. var e,
  45330. f,
  45331. g,
  45332. h,
  45333. a = this._data,
  45334. b = a.words,
  45335. c = 8 * this._nDataBytes,
  45336. d = 8 * a.sigBytes;
  45337. for (b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 64 >>> 9 << 4) + 14] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), a.sigBytes = 4 * (b.length + 1), this._process(), e = this._hash, f = e.words, g = 0; 5 > g; g++) {
  45338. h = f[g], f[g] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  45339. }
  45340. return e;
  45341. },
  45342. clone: function clone() {
  45343. var a = e.clone.call(this);
  45344. return a._hash = this._hash.clone(), a;
  45345. }
  45346. });
  45347. b.RIPEMD160 = e._createHelper(m), b.HmacRIPEMD160 = e._createHmacHelper(m);
  45348. }(Math), function () {
  45349. var a = CryptoJS,
  45350. b = a.lib,
  45351. c = b.Base,
  45352. d = a.enc,
  45353. e = d.Utf8,
  45354. f = a.algo;
  45355. f.HMAC = c.extend({
  45356. init: function init(a, b) {
  45357. var c, d, f, g, h, i, j;
  45358. for (a = this._hasher = new a.init(), "string" == typeof b && (b = e.parse(b)), c = a.blockSize, d = 4 * c, b.sigBytes > d && (b = a.finalize(b)), b.clamp(), f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, i = g.words, j = 0; c > j; j++) {
  45359. h[j] ^= 1549556828, i[j] ^= 909522486;
  45360. }
  45361. f.sigBytes = g.sigBytes = d, this.reset();
  45362. },
  45363. reset: function reset() {
  45364. var a = this._hasher;
  45365. a.reset(), a.update(this._iKey);
  45366. },
  45367. update: function update(a) {
  45368. return this._hasher.update(a), this;
  45369. },
  45370. finalize: function finalize(a) {
  45371. var d,
  45372. b = this._hasher,
  45373. c = b.finalize(a);
  45374. return b.reset(), d = b.finalize(this._oKey.clone().concat(c));
  45375. }
  45376. });
  45377. }(), function () {
  45378. var a = CryptoJS,
  45379. b = a.lib,
  45380. c = b.Base,
  45381. d = b.WordArray,
  45382. e = a.algo,
  45383. f = e.SHA1,
  45384. g = e.HMAC,
  45385. h = e.PBKDF2 = c.extend({
  45386. cfg: c.extend({
  45387. keySize: 4,
  45388. hasher: f,
  45389. iterations: 1
  45390. }),
  45391. init: function init(a) {
  45392. this.cfg = this.cfg.extend(a);
  45393. },
  45394. compute: function compute(a, b) {
  45395. for (var m, n, o, p, q, r, s, c = this.cfg, e = g.create(c.hasher, a), f = d.create(), h = d.create([1]), i = f.words, j = h.words, k = c.keySize, l = c.iterations; i.length < k;) {
  45396. for (m = e.update(b).finalize(h), e.reset(), n = m.words, o = n.length, p = m, q = 1; l > q; q++) {
  45397. for (p = e.finalize(p), e.reset(), r = p.words, s = 0; o > s; s++) {
  45398. n[s] ^= r[s];
  45399. }
  45400. }
  45401. f.concat(m), j[0]++;
  45402. }
  45403. return f.sigBytes = 4 * k, f;
  45404. }
  45405. });
  45406. a.PBKDF2 = function (a, b, c) {
  45407. return h.create(c).compute(a, b);
  45408. };
  45409. }(), function () {
  45410. var a = CryptoJS,
  45411. b = a.lib,
  45412. c = b.Base,
  45413. d = b.WordArray,
  45414. e = a.algo,
  45415. f = e.MD5,
  45416. g = e.EvpKDF = c.extend({
  45417. cfg: c.extend({
  45418. keySize: 4,
  45419. hasher: f,
  45420. iterations: 1
  45421. }),
  45422. init: function init(a) {
  45423. this.cfg = this.cfg.extend(a);
  45424. },
  45425. compute: function compute(a, b) {
  45426. for (var c, k, e = this.cfg, f = e.hasher.create(), g = d.create(), h = g.words, i = e.keySize, j = e.iterations; h.length < i;) {
  45427. for (c && f.update(c), c = f.update(a).finalize(b), f.reset(), k = 1; j > k; k++) {
  45428. c = f.finalize(c), f.reset();
  45429. }
  45430. g.concat(c);
  45431. }
  45432. return g.sigBytes = 4 * i, g;
  45433. }
  45434. });
  45435. a.EvpKDF = function (a, b, c) {
  45436. return g.create(c).compute(a, b);
  45437. };
  45438. }(), function () {
  45439. var a = CryptoJS,
  45440. b = a.lib,
  45441. c = b.WordArray,
  45442. d = a.algo,
  45443. e = d.SHA256,
  45444. f = d.SHA224 = e.extend({
  45445. _doReset: function _doReset() {
  45446. this._hash = new c.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
  45447. },
  45448. _doFinalize: function _doFinalize() {
  45449. var a = e._doFinalize.call(this);
  45450. return a.sigBytes -= 4, a;
  45451. }
  45452. });
  45453. a.SHA224 = e._createHelper(f), a.HmacSHA224 = e._createHmacHelper(f);
  45454. }(), function (a) {
  45455. var b = CryptoJS,
  45456. c = b.lib,
  45457. d = c.Base,
  45458. e = c.WordArray,
  45459. f = b.x64 = {};
  45460. f.Word = d.extend({
  45461. init: function init(a, b) {
  45462. this.high = a, this.low = b;
  45463. }
  45464. }), f.WordArray = d.extend({
  45465. init: function init(b, c) {
  45466. b = this.words = b || [], this.sigBytes = c != a ? c : 8 * b.length;
  45467. },
  45468. toX32: function toX32() {
  45469. var d,
  45470. f,
  45471. a = this.words,
  45472. b = a.length,
  45473. c = [];
  45474. for (d = 0; b > d; d++) {
  45475. f = a[d], c.push(f.high), c.push(f.low);
  45476. }
  45477. return e.create(c, this.sigBytes);
  45478. },
  45479. clone: function clone() {
  45480. var e,
  45481. a = d.clone.call(this),
  45482. b = a.words = this.words.slice(0),
  45483. c = b.length;
  45484. for (e = 0; c > e; e++) {
  45485. b[e] = b[e].clone();
  45486. }
  45487. return a;
  45488. }
  45489. });
  45490. }(), function (a) {
  45491. var l,
  45492. m,
  45493. b = CryptoJS,
  45494. c = b.lib,
  45495. d = c.WordArray,
  45496. e = c.Hasher,
  45497. f = b.x64,
  45498. g = f.Word,
  45499. h = b.algo,
  45500. i = [],
  45501. j = [],
  45502. k = [];
  45503. !function () {
  45504. var c,
  45505. d,
  45506. e,
  45507. f,
  45508. h,
  45509. l,
  45510. m,
  45511. n,
  45512. o,
  45513. a = 1,
  45514. b = 0;
  45515. for (c = 0; 24 > c; c++) {
  45516. i[a + 5 * b] = (c + 1) * (c + 2) / 2 % 64, d = b % 5, e = (2 * a + 3 * b) % 5, a = d, b = e;
  45517. }
  45518. for (a = 0; 5 > a; a++) {
  45519. for (b = 0; 5 > b; b++) {
  45520. j[a + 5 * b] = b + 5 * ((2 * a + 3 * b) % 5);
  45521. }
  45522. }
  45523. for (f = 1, h = 0; 24 > h; h++) {
  45524. for (l = 0, m = 0, n = 0; 7 > n; n++) {
  45525. 1 & f && (o = (1 << n) - 1, 32 > o ? m ^= 1 << o : l ^= 1 << o - 32), 128 & f ? f = 113 ^ f << 1 : f <<= 1;
  45526. }
  45527. k[h] = g.create(l, m);
  45528. }
  45529. }(), l = [], function () {
  45530. for (var a = 0; 25 > a; a++) {
  45531. l[a] = g.create();
  45532. }
  45533. }(), m = h.SHA3 = e.extend({
  45534. cfg: e.cfg.extend({
  45535. outputLength: 512
  45536. }),
  45537. _doReset: function _doReset() {
  45538. var b,
  45539. a = this._state = [];
  45540. for (b = 0; 25 > b; b++) {
  45541. a[b] = new g.init();
  45542. }
  45543. this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
  45544. },
  45545. _doProcessBlock: function _doProcessBlock(a, b) {
  45546. var e,
  45547. f,
  45548. g,
  45549. h,
  45550. m,
  45551. n,
  45552. o,
  45553. p,
  45554. q,
  45555. r,
  45556. s,
  45557. t,
  45558. u,
  45559. v,
  45560. w,
  45561. x,
  45562. y,
  45563. z,
  45564. A,
  45565. B,
  45566. C,
  45567. D,
  45568. E,
  45569. F,
  45570. G,
  45571. c = this._state,
  45572. d = this.blockSize / 2;
  45573. for (e = 0; d > e; e++) {
  45574. f = a[b + 2 * e], g = a[b + 2 * e + 1], f = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8), g = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), h = c[e], h.high ^= g, h.low ^= f;
  45575. }
  45576. for (m = 0; 24 > m; m++) {
  45577. for (n = 0; 5 > n; n++) {
  45578. for (o = 0, p = 0, q = 0; 5 > q; q++) {
  45579. h = c[n + 5 * q], o ^= h.high, p ^= h.low;
  45580. }
  45581. r = l[n], r.high = o, r.low = p;
  45582. }
  45583. for (n = 0; 5 > n; n++) {
  45584. for (s = l[(n + 4) % 5], t = l[(n + 1) % 5], u = t.high, v = t.low, o = s.high ^ (u << 1 | v >>> 31), p = s.low ^ (v << 1 | u >>> 31), q = 0; 5 > q; q++) {
  45585. h = c[n + 5 * q], h.high ^= o, h.low ^= p;
  45586. }
  45587. }
  45588. for (w = 1; 25 > w; w++) {
  45589. h = c[w], x = h.high, y = h.low, z = i[w], 32 > z ? (o = x << z | y >>> 32 - z, p = y << z | x >>> 32 - z) : (o = y << z - 32 | x >>> 64 - z, p = x << z - 32 | y >>> 64 - z), A = l[j[w]], A.high = o, A.low = p;
  45590. }
  45591. for (B = l[0], C = c[0], B.high = C.high, B.low = C.low, n = 0; 5 > n; n++) {
  45592. for (q = 0; 5 > q; q++) {
  45593. w = n + 5 * q, h = c[w], D = l[w], E = l[(n + 1) % 5 + 5 * q], F = l[(n + 2) % 5 + 5 * q], h.high = D.high ^ ~E.high & F.high, h.low = D.low ^ ~E.low & F.low;
  45594. }
  45595. }
  45596. h = c[0], G = k[m], h.high ^= G.high, h.low ^= G.low;
  45597. }
  45598. },
  45599. _doFinalize: function _doFinalize() {
  45600. var f,
  45601. g,
  45602. h,
  45603. i,
  45604. j,
  45605. k,
  45606. l,
  45607. m,
  45608. n,
  45609. o,
  45610. b = this._data,
  45611. c = b.words;
  45612. for (8 * this._nDataBytes, f = 8 * b.sigBytes, g = 32 * this.blockSize, c[f >>> 5] |= 1 << 24 - f % 32, c[(a.ceil((f + 1) / g) * g >>> 5) - 1] |= 128, b.sigBytes = 4 * c.length, this._process(), h = this._state, i = this.cfg.outputLength / 8, j = i / 8, k = [], l = 0; j > l; l++) {
  45613. m = h[l], n = m.high, o = m.low, n = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8), o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), k.push(o), k.push(n);
  45614. }
  45615. return new d.init(k, i);
  45616. },
  45617. clone: function clone() {
  45618. var c,
  45619. a = e.clone.call(this),
  45620. b = a._state = this._state.slice(0);
  45621. for (c = 0; 25 > c; c++) {
  45622. b[c] = b[c].clone();
  45623. }
  45624. return a;
  45625. }
  45626. }), b.SHA3 = e._createHelper(m), b.HmacSHA3 = e._createHmacHelper(m);
  45627. }(Math), function () {
  45628. function h() {
  45629. return e.create.apply(e, arguments);
  45630. }
  45631. var k,
  45632. a = CryptoJS,
  45633. b = a.lib,
  45634. c = b.Hasher,
  45635. d = a.x64,
  45636. e = d.Word,
  45637. f = d.WordArray,
  45638. g = a.algo,
  45639. i = [h(1116352408, 3609767458), h(1899447441, 602891725), h(3049323471, 3964484399), h(3921009573, 2173295548), h(961987163, 4081628472), h(1508970993, 3053834265), h(2453635748, 2937671579), h(2870763221, 3664609560), h(3624381080, 2734883394), h(310598401, 1164996542), h(607225278, 1323610764), h(1426881987, 3590304994), h(1925078388, 4068182383), h(2162078206, 991336113), h(2614888103, 633803317), h(3248222580, 3479774868), h(3835390401, 2666613458), h(4022224774, 944711139), h(264347078, 2341262773), h(604807628, 2007800933), h(770255983, 1495990901), h(1249150122, 1856431235), h(1555081692, 3175218132), h(1996064986, 2198950837), h(2554220882, 3999719339), h(2821834349, 766784016), h(2952996808, 2566594879), h(3210313671, 3203337956), h(3336571891, 1034457026), h(3584528711, 2466948901), h(113926993, 3758326383), h(338241895, 168717936), h(666307205, 1188179964), h(773529912, 1546045734), h(1294757372, 1522805485), h(1396182291, 2643833823), h(1695183700, 2343527390), h(1986661051, 1014477480), h(2177026350, 1206759142), h(2456956037, 344077627), h(2730485921, 1290863460), h(2820302411, 3158454273), h(3259730800, 3505952657), h(3345764771, 106217008), h(3516065817, 3606008344), h(3600352804, 1432725776), h(4094571909, 1467031594), h(275423344, 851169720), h(430227734, 3100823752), h(506948616, 1363258195), h(659060556, 3750685593), h(883997877, 3785050280), h(958139571, 3318307427), h(1322822218, 3812723403), h(1537002063, 2003034995), h(1747873779, 3602036899), h(1955562222, 1575990012), h(2024104815, 1125592928), h(2227730452, 2716904306), h(2361852424, 442776044), h(2428436474, 593698344), h(2756734187, 3733110249), h(3204031479, 2999351573), h(3329325298, 3815920427), h(3391569614, 3928383900), h(3515267271, 566280711), h(3940187606, 3454069534), h(4118630271, 4000239992), h(116418474, 1914138554), h(174292421, 2731055270), h(289380356, 3203993006), h(460393269, 320620315), h(685471733, 587496836), h(852142971, 1086792851), h(1017036298, 365543100), h(1126000580, 2618297676), h(1288033470, 3409855158), h(1501505948, 4234509866), h(1607167915, 987167468), h(1816402316, 1246189591)],
  45640. j = [];
  45641. !function () {
  45642. for (var a = 0; 80 > a; a++) {
  45643. j[a] = h();
  45644. }
  45645. }(), k = g.SHA512 = c.extend({
  45646. _doReset: function _doReset() {
  45647. this._hash = new f.init([new e.init(1779033703, 4089235720), new e.init(3144134277, 2227873595), new e.init(1013904242, 4271175723), new e.init(2773480762, 1595750129), new e.init(1359893119, 2917565137), new e.init(2600822924, 725511199), new e.init(528734635, 4215389547), new e.init(1541459225, 327033209)]);
  45648. },
  45649. _doProcessBlock: function _doProcessBlock(a, b) {
  45650. var T,
  45651. U,
  45652. V,
  45653. W,
  45654. X,
  45655. Y,
  45656. Z,
  45657. $,
  45658. _,
  45659. ab,
  45660. bb,
  45661. cb,
  45662. db,
  45663. eb,
  45664. fb,
  45665. gb,
  45666. hb,
  45667. ib,
  45668. jb,
  45669. kb,
  45670. lb,
  45671. mb,
  45672. nb,
  45673. ob,
  45674. pb,
  45675. qb,
  45676. rb,
  45677. sb,
  45678. tb,
  45679. ub,
  45680. vb,
  45681. wb,
  45682. xb,
  45683. yb,
  45684. zb,
  45685. c = this._hash.words,
  45686. d = c[0],
  45687. e = c[1],
  45688. f = c[2],
  45689. g = c[3],
  45690. h = c[4],
  45691. k = c[5],
  45692. l = c[6],
  45693. m = c[7],
  45694. n = d.high,
  45695. o = d.low,
  45696. p = e.high,
  45697. q = e.low,
  45698. r = f.high,
  45699. s = f.low,
  45700. t = g.high,
  45701. u = g.low,
  45702. v = h.high,
  45703. w = h.low,
  45704. x = k.high,
  45705. y = k.low,
  45706. z = l.high,
  45707. A = l.low,
  45708. B = m.high,
  45709. C = m.low,
  45710. D = n,
  45711. E = o,
  45712. F = p,
  45713. G = q,
  45714. H = r,
  45715. I = s,
  45716. J = t,
  45717. K = u,
  45718. L = v,
  45719. M = w,
  45720. N = x,
  45721. O = y,
  45722. P = z,
  45723. Q = A,
  45724. R = B,
  45725. S = C;
  45726. for (T = 0; 80 > T; T++) {
  45727. W = j[T], 16 > T ? (V = W.high = 0 | a[b + 2 * T], U = W.low = 0 | a[b + 2 * T + 1]) : (X = j[T - 15], Y = X.high, Z = X.low, $ = (Y >>> 1 | Z << 31) ^ (Y >>> 8 | Z << 24) ^ Y >>> 7, _ = (Z >>> 1 | Y << 31) ^ (Z >>> 8 | Y << 24) ^ (Z >>> 7 | Y << 25), ab = j[T - 2], bb = ab.high, cb = ab.low, db = (bb >>> 19 | cb << 13) ^ (bb << 3 | cb >>> 29) ^ bb >>> 6, eb = (cb >>> 19 | bb << 13) ^ (cb << 3 | bb >>> 29) ^ (cb >>> 6 | bb << 26), fb = j[T - 7], gb = fb.high, hb = fb.low, ib = j[T - 16], jb = ib.high, kb = ib.low, U = _ + hb, V = $ + gb + (_ >>> 0 > U >>> 0 ? 1 : 0), U += eb, V = V + db + (eb >>> 0 > U >>> 0 ? 1 : 0), U += kb, V = V + jb + (kb >>> 0 > U >>> 0 ? 1 : 0), W.high = V, W.low = U), lb = L & N ^ ~L & P, mb = M & O ^ ~M & Q, nb = D & F ^ D & H ^ F & H, ob = E & G ^ E & I ^ G & I, pb = (D >>> 28 | E << 4) ^ (D << 30 | E >>> 2) ^ (D << 25 | E >>> 7), qb = (E >>> 28 | D << 4) ^ (E << 30 | D >>> 2) ^ (E << 25 | D >>> 7), rb = (L >>> 14 | M << 18) ^ (L >>> 18 | M << 14) ^ (L << 23 | M >>> 9), sb = (M >>> 14 | L << 18) ^ (M >>> 18 | L << 14) ^ (M << 23 | L >>> 9), tb = i[T], ub = tb.high, vb = tb.low, wb = S + sb, xb = R + rb + (S >>> 0 > wb >>> 0 ? 1 : 0), wb += mb, xb = xb + lb + (mb >>> 0 > wb >>> 0 ? 1 : 0), wb += vb, xb = xb + ub + (vb >>> 0 > wb >>> 0 ? 1 : 0), wb += U, xb = xb + V + (U >>> 0 > wb >>> 0 ? 1 : 0), yb = qb + ob, zb = pb + nb + (qb >>> 0 > yb >>> 0 ? 1 : 0), R = P, S = Q, P = N, Q = O, N = L, O = M, M = 0 | K + wb, L = 0 | J + xb + (K >>> 0 > M >>> 0 ? 1 : 0), J = H, K = I, H = F, I = G, F = D, G = E, E = 0 | wb + yb, D = 0 | xb + zb + (wb >>> 0 > E >>> 0 ? 1 : 0);
  45728. }
  45729. o = d.low = o + E, d.high = n + D + (E >>> 0 > o >>> 0 ? 1 : 0), q = e.low = q + G, e.high = p + F + (G >>> 0 > q >>> 0 ? 1 : 0), s = f.low = s + I, f.high = r + H + (I >>> 0 > s >>> 0 ? 1 : 0), u = g.low = u + K, g.high = t + J + (K >>> 0 > u >>> 0 ? 1 : 0), w = h.low = w + M, h.high = v + L + (M >>> 0 > w >>> 0 ? 1 : 0), y = k.low = y + O, k.high = x + N + (O >>> 0 > y >>> 0 ? 1 : 0), A = l.low = A + Q, l.high = z + P + (Q >>> 0 > A >>> 0 ? 1 : 0), C = m.low = C + S, m.high = B + R + (S >>> 0 > C >>> 0 ? 1 : 0);
  45730. },
  45731. _doFinalize: function _doFinalize() {
  45732. var e,
  45733. a = this._data,
  45734. b = a.words,
  45735. c = 8 * this._nDataBytes,
  45736. d = 8 * a.sigBytes;
  45737. return b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 128 >>> 10 << 5) + 30] = Math.floor(c / 4294967296), b[(d + 128 >>> 10 << 5) + 31] = c, a.sigBytes = 4 * b.length, this._process(), e = this._hash.toX32();
  45738. },
  45739. clone: function clone() {
  45740. var a = c.clone.call(this);
  45741. return a._hash = this._hash.clone(), a;
  45742. },
  45743. blockSize: 32
  45744. }), a.SHA512 = c._createHelper(k), a.HmacSHA512 = c._createHmacHelper(k);
  45745. }(), function () {
  45746. var a = CryptoJS,
  45747. b = a.x64,
  45748. c = b.Word,
  45749. d = b.WordArray,
  45750. e = a.algo,
  45751. f = e.SHA512,
  45752. g = e.SHA384 = f.extend({
  45753. _doReset: function _doReset() {
  45754. this._hash = new d.init([new c.init(3418070365, 3238371032), new c.init(1654270250, 914150663), new c.init(2438529370, 812702999), new c.init(355462360, 4144912697), new c.init(1731405415, 4290775857), new c.init(2394180231, 1750603025), new c.init(3675008525, 1694076839), new c.init(1203062813, 3204075428)]);
  45755. },
  45756. _doFinalize: function _doFinalize() {
  45757. var a = f._doFinalize.call(this);
  45758. return a.sigBytes -= 16, a;
  45759. }
  45760. });
  45761. a.SHA384 = f._createHelper(g), a.HmacSHA384 = f._createHmacHelper(g);
  45762. }(), CryptoJS.lib.Cipher || function (a) {
  45763. var i,
  45764. j,
  45765. k,
  45766. l,
  45767. n,
  45768. o,
  45769. p,
  45770. q,
  45771. r,
  45772. t,
  45773. u,
  45774. v,
  45775. w,
  45776. x,
  45777. y,
  45778. z,
  45779. b = CryptoJS,
  45780. c = b.lib,
  45781. d = c.Base,
  45782. e = c.WordArray,
  45783. f = c.BufferedBlockAlgorithm,
  45784. g = b.enc;
  45785. g.Utf8, i = g.Base64, j = b.algo, k = j.EvpKDF, l = c.Cipher = f.extend({
  45786. cfg: d.extend(),
  45787. createEncryptor: function createEncryptor(a, b) {
  45788. return this.create(this._ENC_XFORM_MODE, a, b);
  45789. },
  45790. createDecryptor: function createDecryptor(a, b) {
  45791. return this.create(this._DEC_XFORM_MODE, a, b);
  45792. },
  45793. init: function init(a, b, c) {
  45794. this.cfg = this.cfg.extend(c), this._xformMode = a, this._key = b, this.reset();
  45795. },
  45796. reset: function reset() {
  45797. f.reset.call(this), this._doReset();
  45798. },
  45799. process: function process(a) {
  45800. return this._append(a), this._process();
  45801. },
  45802. finalize: function finalize(a) {
  45803. a && this._append(a);
  45804. var b = this._doFinalize();
  45805. return b;
  45806. },
  45807. keySize: 4,
  45808. ivSize: 4,
  45809. _ENC_XFORM_MODE: 1,
  45810. _DEC_XFORM_MODE: 2,
  45811. _createHelper: function () {
  45812. function a(a) {
  45813. return "string" == typeof a ? z : w;
  45814. }
  45815. return function (b) {
  45816. return {
  45817. encrypt: function encrypt(c, d, e) {
  45818. return a(d).encrypt(b, c, d, e);
  45819. },
  45820. decrypt: function decrypt(c, d, e) {
  45821. return a(d).decrypt(b, c, d, e);
  45822. }
  45823. };
  45824. };
  45825. }()
  45826. }), c.StreamCipher = l.extend({
  45827. _doFinalize: function _doFinalize() {
  45828. var a = this._process(!0);
  45829. return a;
  45830. },
  45831. blockSize: 1
  45832. }), n = b.mode = {}, o = c.BlockCipherMode = d.extend({
  45833. createEncryptor: function createEncryptor(a, b) {
  45834. return this.Encryptor.create(a, b);
  45835. },
  45836. createDecryptor: function createDecryptor(a, b) {
  45837. return this.Decryptor.create(a, b);
  45838. },
  45839. init: function init(a, b) {
  45840. this._cipher = a, this._iv = b;
  45841. }
  45842. }), p = n.CBC = function () {
  45843. function c(b, c, d) {
  45844. var e,
  45845. g,
  45846. f = this._iv;
  45847. for (f ? (e = f, this._iv = a) : e = this._prevBlock, g = 0; d > g; g++) {
  45848. b[c + g] ^= e[g];
  45849. }
  45850. }
  45851. var b = o.extend();
  45852. return b.Encryptor = b.extend({
  45853. processBlock: function processBlock(a, b) {
  45854. var d = this._cipher,
  45855. e = d.blockSize;
  45856. c.call(this, a, b, e), d.encryptBlock(a, b), this._prevBlock = a.slice(b, b + e);
  45857. }
  45858. }), b.Decryptor = b.extend({
  45859. processBlock: function processBlock(a, b) {
  45860. var d = this._cipher,
  45861. e = d.blockSize,
  45862. f = a.slice(b, b + e);
  45863. d.decryptBlock(a, b), c.call(this, a, b, e), this._prevBlock = f;
  45864. }
  45865. }), b;
  45866. }(), q = b.pad = {}, r = q.Pkcs7 = {
  45867. pad: function pad(a, b) {
  45868. var h,
  45869. i,
  45870. c = 4 * b,
  45871. d = c - a.sigBytes % c,
  45872. f = d << 24 | d << 16 | d << 8 | d,
  45873. g = [];
  45874. for (h = 0; d > h; h += 4) {
  45875. g.push(f);
  45876. }
  45877. i = e.create(g, d), a.concat(i);
  45878. },
  45879. unpad: function unpad(a) {
  45880. var b = 255 & a.words[a.sigBytes - 1 >>> 2];
  45881. a.sigBytes -= b;
  45882. }
  45883. }, c.BlockCipher = l.extend({
  45884. cfg: l.cfg.extend({
  45885. mode: p,
  45886. padding: r
  45887. }),
  45888. reset: function reset() {
  45889. var a, b, c, d;
  45890. l.reset.call(this), b = this.cfg, c = b.iv, d = b.mode, this._xformMode == this._ENC_XFORM_MODE ? a = d.createEncryptor : (a = d.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == a ? this._mode.init(this, c && c.words) : (this._mode = a.call(d, this, c && c.words), this._mode.__creator = a);
  45891. },
  45892. _doProcessBlock: function _doProcessBlock(a, b) {
  45893. this._mode.processBlock(a, b);
  45894. },
  45895. _doFinalize: function _doFinalize() {
  45896. var a,
  45897. b = this.cfg.padding;
  45898. return this._xformMode == this._ENC_XFORM_MODE ? (b.pad(this._data, this.blockSize), a = this._process(!0)) : (a = this._process(!0), b.unpad(a)), a;
  45899. },
  45900. blockSize: 4
  45901. }), t = c.CipherParams = d.extend({
  45902. init: function init(a) {
  45903. this.mixIn(a);
  45904. },
  45905. toString: function toString(a) {
  45906. return (a || this.formatter).stringify(this);
  45907. }
  45908. }), u = b.format = {}, v = u.OpenSSL = {
  45909. stringify: function stringify(a) {
  45910. var b,
  45911. c = a.ciphertext,
  45912. d = a.salt;
  45913. return b = d ? e.create([1398893684, 1701076831]).concat(d).concat(c) : c, b.toString(i);
  45914. },
  45915. parse: function parse(a) {
  45916. var b,
  45917. c = i.parse(a),
  45918. d = c.words;
  45919. return 1398893684 == d[0] && 1701076831 == d[1] && (b = e.create(d.slice(2, 4)), d.splice(0, 4), c.sigBytes -= 16), t.create({
  45920. ciphertext: c,
  45921. salt: b
  45922. });
  45923. }
  45924. }, w = c.SerializableCipher = d.extend({
  45925. cfg: d.extend({
  45926. format: v
  45927. }),
  45928. encrypt: function encrypt(a, b, c, d) {
  45929. var e, f, g;
  45930. return d = this.cfg.extend(d), e = a.createEncryptor(c, d), f = e.finalize(b), g = e.cfg, t.create({
  45931. ciphertext: f,
  45932. key: c,
  45933. iv: g.iv,
  45934. algorithm: a,
  45935. mode: g.mode,
  45936. padding: g.padding,
  45937. blockSize: a.blockSize,
  45938. formatter: d.format
  45939. });
  45940. },
  45941. decrypt: function decrypt(a, b, c, d) {
  45942. d = this.cfg.extend(d), b = this._parse(b, d.format);
  45943. var e = a.createDecryptor(c, d).finalize(b.ciphertext);
  45944. return e;
  45945. },
  45946. _parse: function _parse(a, b) {
  45947. return "string" == typeof a ? b.parse(a, this) : a;
  45948. }
  45949. }), x = b.kdf = {}, y = x.OpenSSL = {
  45950. execute: function execute(a, b, c, d) {
  45951. var f, g;
  45952. return d || (d = e.random(8)), f = k.create({
  45953. keySize: b + c
  45954. }).compute(a, d), g = e.create(f.words.slice(b), 4 * c), f.sigBytes = 4 * b, t.create({
  45955. key: f,
  45956. iv: g,
  45957. salt: d
  45958. });
  45959. }
  45960. }, z = c.PasswordBasedCipher = w.extend({
  45961. cfg: w.cfg.extend({
  45962. kdf: y
  45963. }),
  45964. encrypt: function encrypt(a, b, c, d) {
  45965. var e, f;
  45966. return d = this.cfg.extend(d), e = d.kdf.execute(c, a.keySize, a.ivSize), d.iv = e.iv, f = w.encrypt.call(this, a, b, e.key, d), f.mixIn(e), f;
  45967. },
  45968. decrypt: function decrypt(a, b, c, d) {
  45969. var e, f;
  45970. return d = this.cfg.extend(d), b = this._parse(b, d.format), e = d.kdf.execute(c, a.keySize, a.ivSize, b.salt), d.iv = e.iv, f = w.decrypt.call(this, a, b, e.key, d);
  45971. }
  45972. });
  45973. }(), CryptoJS.mode.CFB = function () {
  45974. function b(a, b, c, d) {
  45975. var e,
  45976. g,
  45977. f = this._iv;
  45978. for (f ? (e = f.slice(0), this._iv = void 0) : e = this._prevBlock, d.encryptBlock(e, 0), g = 0; c > g; g++) {
  45979. a[b + g] ^= e[g];
  45980. }
  45981. }
  45982. var a = CryptoJS.lib.BlockCipherMode.extend();
  45983. return a.Encryptor = a.extend({
  45984. processBlock: function processBlock(a, c) {
  45985. var d = this._cipher,
  45986. e = d.blockSize;
  45987. b.call(this, a, c, e, d), this._prevBlock = a.slice(c, c + e);
  45988. }
  45989. }), a.Decryptor = a.extend({
  45990. processBlock: function processBlock(a, c) {
  45991. var d = this._cipher,
  45992. e = d.blockSize,
  45993. f = a.slice(c, c + e);
  45994. b.call(this, a, c, e, d), this._prevBlock = f;
  45995. }
  45996. }), a;
  45997. }(), CryptoJS.mode.ECB = function () {
  45998. var a = CryptoJS.lib.BlockCipherMode.extend();
  45999. return a.Encryptor = a.extend({
  46000. processBlock: function processBlock(a, b) {
  46001. this._cipher.encryptBlock(a, b);
  46002. }
  46003. }), a.Decryptor = a.extend({
  46004. processBlock: function processBlock(a, b) {
  46005. this._cipher.decryptBlock(a, b);
  46006. }
  46007. }), a;
  46008. }(), CryptoJS.pad.AnsiX923 = {
  46009. pad: function pad(a, b) {
  46010. var c = a.sigBytes,
  46011. d = 4 * b,
  46012. e = d - c % d,
  46013. f = c + e - 1;
  46014. a.clamp(), a.words[f >>> 2] |= e << 24 - 8 * (f % 4), a.sigBytes += e;
  46015. },
  46016. unpad: function unpad(a) {
  46017. var b = 255 & a.words[a.sigBytes - 1 >>> 2];
  46018. a.sigBytes -= b;
  46019. }
  46020. }, CryptoJS.pad.Iso10126 = {
  46021. pad: function pad(a, b) {
  46022. var c = 4 * b,
  46023. d = c - a.sigBytes % c;
  46024. a.concat(CryptoJS.lib.WordArray.random(d - 1)).concat(CryptoJS.lib.WordArray.create([d << 24], 1));
  46025. },
  46026. unpad: function unpad(a) {
  46027. var b = 255 & a.words[a.sigBytes - 1 >>> 2];
  46028. a.sigBytes -= b;
  46029. }
  46030. }, CryptoJS.pad.Iso97971 = {
  46031. pad: function pad(a, b) {
  46032. a.concat(CryptoJS.lib.WordArray.create([2147483648], 1)), CryptoJS.pad.ZeroPadding.pad(a, b);
  46033. },
  46034. unpad: function unpad(a) {
  46035. CryptoJS.pad.ZeroPadding.unpad(a), a.sigBytes--;
  46036. }
  46037. }, CryptoJS.mode.OFB = function () {
  46038. var a = CryptoJS.lib.BlockCipherMode.extend(),
  46039. b = a.Encryptor = a.extend({
  46040. processBlock: function processBlock(a, b) {
  46041. var g,
  46042. c = this._cipher,
  46043. d = c.blockSize,
  46044. e = this._iv,
  46045. f = this._keystream;
  46046. for (e && (f = this._keystream = e.slice(0), this._iv = void 0), c.encryptBlock(f, 0), g = 0; d > g; g++) {
  46047. a[b + g] ^= f[g];
  46048. }
  46049. }
  46050. });
  46051. return a.Decryptor = b, a;
  46052. }(), CryptoJS.pad.NoPadding = {
  46053. pad: function pad() {},
  46054. unpad: function unpad() {}
  46055. }, function () {
  46056. var b = CryptoJS,
  46057. c = b.lib,
  46058. d = c.CipherParams,
  46059. e = b.enc,
  46060. f = e.Hex,
  46061. g = b.format;
  46062. g.Hex = {
  46063. stringify: function stringify(a) {
  46064. return a.ciphertext.toString(f);
  46065. },
  46066. parse: function parse(a) {
  46067. var b = f.parse(a);
  46068. return d.create({
  46069. ciphertext: b
  46070. });
  46071. }
  46072. };
  46073. }(), function () {
  46074. var o,
  46075. p,
  46076. a = CryptoJS,
  46077. b = a.lib,
  46078. c = b.BlockCipher,
  46079. d = a.algo,
  46080. e = [],
  46081. f = [],
  46082. g = [],
  46083. h = [],
  46084. i = [],
  46085. j = [],
  46086. k = [],
  46087. l = [],
  46088. m = [],
  46089. n = [];
  46090. !function () {
  46091. var b,
  46092. c,
  46093. d,
  46094. o,
  46095. p,
  46096. q,
  46097. r,
  46098. s,
  46099. a = [];
  46100. for (b = 0; 256 > b; b++) {
  46101. a[b] = 128 > b ? b << 1 : 283 ^ b << 1;
  46102. }
  46103. for (c = 0, d = 0, b = 0; 256 > b; b++) {
  46104. o = d ^ d << 1 ^ d << 2 ^ d << 3 ^ d << 4, o = 99 ^ (o >>> 8 ^ 255 & o), e[c] = o, f[o] = c, p = a[c], q = a[p], r = a[q], s = 257 * a[o] ^ 16843008 * o, g[c] = s << 24 | s >>> 8, h[c] = s << 16 | s >>> 16, i[c] = s << 8 | s >>> 24, j[c] = s, s = 16843009 * r ^ 65537 * q ^ 257 * p ^ 16843008 * c, k[o] = s << 24 | s >>> 8, l[o] = s << 16 | s >>> 16, m[o] = s << 8 | s >>> 24, n[o] = s, c ? (c = p ^ a[a[a[r ^ p]]], d ^= a[a[d]]) : c = d = 1;
  46105. }
  46106. }(), o = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], p = d.AES = c.extend({
  46107. _doReset: function _doReset() {
  46108. var a, b, c, d, f, g, h, i, j, p;
  46109. if (!this._nRounds || this._keyPriorReset !== this._key) {
  46110. for (b = this._keyPriorReset = this._key, c = b.words, d = b.sigBytes / 4, f = this._nRounds = d + 6, g = 4 * (f + 1), h = this._keySchedule = [], i = 0; g > i; i++) {
  46111. d > i ? h[i] = c[i] : (a = h[i - 1], i % d ? d > 6 && 4 == i % d && (a = e[a >>> 24] << 24 | e[255 & a >>> 16] << 16 | e[255 & a >>> 8] << 8 | e[255 & a]) : (a = a << 8 | a >>> 24, a = e[a >>> 24] << 24 | e[255 & a >>> 16] << 16 | e[255 & a >>> 8] << 8 | e[255 & a], a ^= o[0 | i / d] << 24), h[i] = h[i - d] ^ a);
  46112. }
  46113. for (j = this._invKeySchedule = [], p = 0; g > p; p++) {
  46114. i = g - p, a = p % 4 ? h[i] : h[i - 4], j[p] = 4 > p || 4 >= i ? a : k[e[a >>> 24]] ^ l[e[255 & a >>> 16]] ^ m[e[255 & a >>> 8]] ^ n[e[255 & a]];
  46115. }
  46116. }
  46117. },
  46118. encryptBlock: function encryptBlock(a, b) {
  46119. this._doCryptBlock(a, b, this._keySchedule, g, h, i, j, e);
  46120. },
  46121. decryptBlock: function decryptBlock(a, b) {
  46122. var c = a[b + 1];
  46123. a[b + 1] = a[b + 3], a[b + 3] = c, this._doCryptBlock(a, b, this._invKeySchedule, k, l, m, n, f), c = a[b + 1], a[b + 1] = a[b + 3], a[b + 3] = c;
  46124. },
  46125. _doCryptBlock: function _doCryptBlock(a, b, c, d, e, f, g, h) {
  46126. var o,
  46127. p,
  46128. q,
  46129. r,
  46130. s,
  46131. i = this._nRounds,
  46132. j = a[b] ^ c[0],
  46133. k = a[b + 1] ^ c[1],
  46134. l = a[b + 2] ^ c[2],
  46135. m = a[b + 3] ^ c[3],
  46136. n = 4;
  46137. for (o = 1; i > o; o++) {
  46138. p = d[j >>> 24] ^ e[255 & k >>> 16] ^ f[255 & l >>> 8] ^ g[255 & m] ^ c[n++], q = d[k >>> 24] ^ e[255 & l >>> 16] ^ f[255 & m >>> 8] ^ g[255 & j] ^ c[n++], r = d[l >>> 24] ^ e[255 & m >>> 16] ^ f[255 & j >>> 8] ^ g[255 & k] ^ c[n++], s = d[m >>> 24] ^ e[255 & j >>> 16] ^ f[255 & k >>> 8] ^ g[255 & l] ^ c[n++], j = p, k = q, l = r, m = s;
  46139. }
  46140. p = (h[j >>> 24] << 24 | h[255 & k >>> 16] << 16 | h[255 & l >>> 8] << 8 | h[255 & m]) ^ c[n++], q = (h[k >>> 24] << 24 | h[255 & l >>> 16] << 16 | h[255 & m >>> 8] << 8 | h[255 & j]) ^ c[n++], r = (h[l >>> 24] << 24 | h[255 & m >>> 16] << 16 | h[255 & j >>> 8] << 8 | h[255 & k]) ^ c[n++], s = (h[m >>> 24] << 24 | h[255 & j >>> 16] << 16 | h[255 & k >>> 8] << 8 | h[255 & l]) ^ c[n++], a[b] = p, a[b + 1] = q, a[b + 2] = r, a[b + 3] = s;
  46141. },
  46142. keySize: 8
  46143. }), a.AES = c._createHelper(p);
  46144. }(), function () {
  46145. function l(a, b) {
  46146. var c = (this._lBlock >>> a ^ this._rBlock) & b;
  46147. this._rBlock ^= c, this._lBlock ^= c << a;
  46148. }
  46149. function m(a, b) {
  46150. var c = (this._rBlock >>> a ^ this._lBlock) & b;
  46151. this._lBlock ^= c, this._rBlock ^= c << a;
  46152. }
  46153. var n,
  46154. a = CryptoJS,
  46155. b = a.lib,
  46156. c = b.WordArray,
  46157. d = b.BlockCipher,
  46158. e = a.algo,
  46159. f = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],
  46160. g = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],
  46161. h = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],
  46162. i = [{
  46163. 0: 8421888,
  46164. 268435456: 32768,
  46165. 536870912: 8421378,
  46166. 805306368: 2,
  46167. 1073741824: 512,
  46168. 1342177280: 8421890,
  46169. 1610612736: 8389122,
  46170. 1879048192: 8388608,
  46171. 2147483648: 514,
  46172. 2415919104: 8389120,
  46173. 2684354560: 33280,
  46174. 2952790016: 8421376,
  46175. 3221225472: 32770,
  46176. 3489660928: 8388610,
  46177. 3758096384: 0,
  46178. 4026531840: 33282,
  46179. 134217728: 0,
  46180. 402653184: 8421890,
  46181. 671088640: 33282,
  46182. 939524096: 32768,
  46183. 1207959552: 8421888,
  46184. 1476395008: 512,
  46185. 1744830464: 8421378,
  46186. 2013265920: 2,
  46187. 2281701376: 8389120,
  46188. 2550136832: 33280,
  46189. 2818572288: 8421376,
  46190. 3087007744: 8389122,
  46191. 3355443200: 8388610,
  46192. 3623878656: 32770,
  46193. 3892314112: 514,
  46194. 4160749568: 8388608,
  46195. 1: 32768,
  46196. 268435457: 2,
  46197. 536870913: 8421888,
  46198. 805306369: 8388608,
  46199. 1073741825: 8421378,
  46200. 1342177281: 33280,
  46201. 1610612737: 512,
  46202. 1879048193: 8389122,
  46203. 2147483649: 8421890,
  46204. 2415919105: 8421376,
  46205. 2684354561: 8388610,
  46206. 2952790017: 33282,
  46207. 3221225473: 514,
  46208. 3489660929: 8389120,
  46209. 3758096385: 32770,
  46210. 4026531841: 0,
  46211. 134217729: 8421890,
  46212. 402653185: 8421376,
  46213. 671088641: 8388608,
  46214. 939524097: 512,
  46215. 1207959553: 32768,
  46216. 1476395009: 8388610,
  46217. 1744830465: 2,
  46218. 2013265921: 33282,
  46219. 2281701377: 32770,
  46220. 2550136833: 8389122,
  46221. 2818572289: 514,
  46222. 3087007745: 8421888,
  46223. 3355443201: 8389120,
  46224. 3623878657: 0,
  46225. 3892314113: 33280,
  46226. 4160749569: 8421378
  46227. }, {
  46228. 0: 1074282512,
  46229. 16777216: 16384,
  46230. 33554432: 524288,
  46231. 50331648: 1074266128,
  46232. 67108864: 1073741840,
  46233. 83886080: 1074282496,
  46234. 100663296: 1073758208,
  46235. 117440512: 16,
  46236. 134217728: 540672,
  46237. 150994944: 1073758224,
  46238. 167772160: 1073741824,
  46239. 184549376: 540688,
  46240. 201326592: 524304,
  46241. 218103808: 0,
  46242. 234881024: 16400,
  46243. 251658240: 1074266112,
  46244. 8388608: 1073758208,
  46245. 25165824: 540688,
  46246. 41943040: 16,
  46247. 58720256: 1073758224,
  46248. 75497472: 1074282512,
  46249. 92274688: 1073741824,
  46250. 109051904: 524288,
  46251. 125829120: 1074266128,
  46252. 142606336: 524304,
  46253. 159383552: 0,
  46254. 176160768: 16384,
  46255. 192937984: 1074266112,
  46256. 209715200: 1073741840,
  46257. 226492416: 540672,
  46258. 243269632: 1074282496,
  46259. 260046848: 16400,
  46260. 268435456: 0,
  46261. 285212672: 1074266128,
  46262. 301989888: 1073758224,
  46263. 318767104: 1074282496,
  46264. 335544320: 1074266112,
  46265. 352321536: 16,
  46266. 369098752: 540688,
  46267. 385875968: 16384,
  46268. 402653184: 16400,
  46269. 419430400: 524288,
  46270. 436207616: 524304,
  46271. 452984832: 1073741840,
  46272. 469762048: 540672,
  46273. 486539264: 1073758208,
  46274. 503316480: 1073741824,
  46275. 520093696: 1074282512,
  46276. 276824064: 540688,
  46277. 293601280: 524288,
  46278. 310378496: 1074266112,
  46279. 327155712: 16384,
  46280. 343932928: 1073758208,
  46281. 360710144: 1074282512,
  46282. 377487360: 16,
  46283. 394264576: 1073741824,
  46284. 411041792: 1074282496,
  46285. 427819008: 1073741840,
  46286. 444596224: 1073758224,
  46287. 461373440: 524304,
  46288. 478150656: 0,
  46289. 494927872: 16400,
  46290. 511705088: 1074266128,
  46291. 528482304: 540672
  46292. }, {
  46293. 0: 260,
  46294. 1048576: 0,
  46295. 2097152: 67109120,
  46296. 3145728: 65796,
  46297. 4194304: 65540,
  46298. 5242880: 67108868,
  46299. 6291456: 67174660,
  46300. 7340032: 67174400,
  46301. 8388608: 67108864,
  46302. 9437184: 67174656,
  46303. 10485760: 65792,
  46304. 11534336: 67174404,
  46305. 12582912: 67109124,
  46306. 13631488: 65536,
  46307. 14680064: 4,
  46308. 15728640: 256,
  46309. 524288: 67174656,
  46310. 1572864: 67174404,
  46311. 2621440: 0,
  46312. 3670016: 67109120,
  46313. 4718592: 67108868,
  46314. 5767168: 65536,
  46315. 6815744: 65540,
  46316. 7864320: 260,
  46317. 8912896: 4,
  46318. 9961472: 256,
  46319. 11010048: 67174400,
  46320. 12058624: 65796,
  46321. 13107200: 65792,
  46322. 14155776: 67109124,
  46323. 15204352: 67174660,
  46324. 16252928: 67108864,
  46325. 16777216: 67174656,
  46326. 17825792: 65540,
  46327. 18874368: 65536,
  46328. 19922944: 67109120,
  46329. 20971520: 256,
  46330. 22020096: 67174660,
  46331. 23068672: 67108868,
  46332. 24117248: 0,
  46333. 25165824: 67109124,
  46334. 26214400: 67108864,
  46335. 27262976: 4,
  46336. 28311552: 65792,
  46337. 29360128: 67174400,
  46338. 30408704: 260,
  46339. 31457280: 65796,
  46340. 32505856: 67174404,
  46341. 17301504: 67108864,
  46342. 18350080: 260,
  46343. 19398656: 67174656,
  46344. 20447232: 0,
  46345. 21495808: 65540,
  46346. 22544384: 67109120,
  46347. 23592960: 256,
  46348. 24641536: 67174404,
  46349. 25690112: 65536,
  46350. 26738688: 67174660,
  46351. 27787264: 65796,
  46352. 28835840: 67108868,
  46353. 29884416: 67109124,
  46354. 30932992: 67174400,
  46355. 31981568: 4,
  46356. 33030144: 65792
  46357. }, {
  46358. 0: 2151682048,
  46359. 65536: 2147487808,
  46360. 131072: 4198464,
  46361. 196608: 2151677952,
  46362. 262144: 0,
  46363. 327680: 4198400,
  46364. 393216: 2147483712,
  46365. 458752: 4194368,
  46366. 524288: 2147483648,
  46367. 589824: 4194304,
  46368. 655360: 64,
  46369. 720896: 2147487744,
  46370. 786432: 2151678016,
  46371. 851968: 4160,
  46372. 917504: 4096,
  46373. 983040: 2151682112,
  46374. 32768: 2147487808,
  46375. 98304: 64,
  46376. 163840: 2151678016,
  46377. 229376: 2147487744,
  46378. 294912: 4198400,
  46379. 360448: 2151682112,
  46380. 425984: 0,
  46381. 491520: 2151677952,
  46382. 557056: 4096,
  46383. 622592: 2151682048,
  46384. 688128: 4194304,
  46385. 753664: 4160,
  46386. 819200: 2147483648,
  46387. 884736: 4194368,
  46388. 950272: 4198464,
  46389. 1015808: 2147483712,
  46390. 1048576: 4194368,
  46391. 1114112: 4198400,
  46392. 1179648: 2147483712,
  46393. 1245184: 0,
  46394. 1310720: 4160,
  46395. 1376256: 2151678016,
  46396. 1441792: 2151682048,
  46397. 1507328: 2147487808,
  46398. 1572864: 2151682112,
  46399. 1638400: 2147483648,
  46400. 1703936: 2151677952,
  46401. 1769472: 4198464,
  46402. 1835008: 2147487744,
  46403. 1900544: 4194304,
  46404. 1966080: 64,
  46405. 2031616: 4096,
  46406. 1081344: 2151677952,
  46407. 1146880: 2151682112,
  46408. 1212416: 0,
  46409. 1277952: 4198400,
  46410. 1343488: 4194368,
  46411. 1409024: 2147483648,
  46412. 1474560: 2147487808,
  46413. 1540096: 64,
  46414. 1605632: 2147483712,
  46415. 1671168: 4096,
  46416. 1736704: 2147487744,
  46417. 1802240: 2151678016,
  46418. 1867776: 4160,
  46419. 1933312: 2151682048,
  46420. 1998848: 4194304,
  46421. 2064384: 4198464
  46422. }, {
  46423. 0: 128,
  46424. 4096: 17039360,
  46425. 8192: 262144,
  46426. 12288: 536870912,
  46427. 16384: 537133184,
  46428. 20480: 16777344,
  46429. 24576: 553648256,
  46430. 28672: 262272,
  46431. 32768: 16777216,
  46432. 36864: 537133056,
  46433. 40960: 536871040,
  46434. 45056: 553910400,
  46435. 49152: 553910272,
  46436. 53248: 0,
  46437. 57344: 17039488,
  46438. 61440: 553648128,
  46439. 2048: 17039488,
  46440. 6144: 553648256,
  46441. 10240: 128,
  46442. 14336: 17039360,
  46443. 18432: 262144,
  46444. 22528: 537133184,
  46445. 26624: 553910272,
  46446. 30720: 536870912,
  46447. 34816: 537133056,
  46448. 38912: 0,
  46449. 43008: 553910400,
  46450. 47104: 16777344,
  46451. 51200: 536871040,
  46452. 55296: 553648128,
  46453. 59392: 16777216,
  46454. 63488: 262272,
  46455. 65536: 262144,
  46456. 69632: 128,
  46457. 73728: 536870912,
  46458. 77824: 553648256,
  46459. 81920: 16777344,
  46460. 86016: 553910272,
  46461. 90112: 537133184,
  46462. 94208: 16777216,
  46463. 98304: 553910400,
  46464. 102400: 553648128,
  46465. 106496: 17039360,
  46466. 110592: 537133056,
  46467. 114688: 262272,
  46468. 118784: 536871040,
  46469. 122880: 0,
  46470. 126976: 17039488,
  46471. 67584: 553648256,
  46472. 71680: 16777216,
  46473. 75776: 17039360,
  46474. 79872: 537133184,
  46475. 83968: 536870912,
  46476. 88064: 17039488,
  46477. 92160: 128,
  46478. 96256: 553910272,
  46479. 100352: 262272,
  46480. 104448: 553910400,
  46481. 108544: 0,
  46482. 112640: 553648128,
  46483. 116736: 16777344,
  46484. 120832: 262144,
  46485. 124928: 537133056,
  46486. 129024: 536871040
  46487. }, {
  46488. 0: 268435464,
  46489. 256: 8192,
  46490. 512: 270532608,
  46491. 768: 270540808,
  46492. 1024: 268443648,
  46493. 1280: 2097152,
  46494. 1536: 2097160,
  46495. 1792: 268435456,
  46496. 2048: 0,
  46497. 2304: 268443656,
  46498. 2560: 2105344,
  46499. 2816: 8,
  46500. 3072: 270532616,
  46501. 3328: 2105352,
  46502. 3584: 8200,
  46503. 3840: 270540800,
  46504. 128: 270532608,
  46505. 384: 270540808,
  46506. 640: 8,
  46507. 896: 2097152,
  46508. 1152: 2105352,
  46509. 1408: 268435464,
  46510. 1664: 268443648,
  46511. 1920: 8200,
  46512. 2176: 2097160,
  46513. 2432: 8192,
  46514. 2688: 268443656,
  46515. 2944: 270532616,
  46516. 3200: 0,
  46517. 3456: 270540800,
  46518. 3712: 2105344,
  46519. 3968: 268435456,
  46520. 4096: 268443648,
  46521. 4352: 270532616,
  46522. 4608: 270540808,
  46523. 4864: 8200,
  46524. 5120: 2097152,
  46525. 5376: 268435456,
  46526. 5632: 268435464,
  46527. 5888: 2105344,
  46528. 6144: 2105352,
  46529. 6400: 0,
  46530. 6656: 8,
  46531. 6912: 270532608,
  46532. 7168: 8192,
  46533. 7424: 268443656,
  46534. 7680: 270540800,
  46535. 7936: 2097160,
  46536. 4224: 8,
  46537. 4480: 2105344,
  46538. 4736: 2097152,
  46539. 4992: 268435464,
  46540. 5248: 268443648,
  46541. 5504: 8200,
  46542. 5760: 270540808,
  46543. 6016: 270532608,
  46544. 6272: 270540800,
  46545. 6528: 270532616,
  46546. 6784: 8192,
  46547. 7040: 2105352,
  46548. 7296: 2097160,
  46549. 7552: 0,
  46550. 7808: 268435456,
  46551. 8064: 268443656
  46552. }, {
  46553. 0: 1048576,
  46554. 16: 33555457,
  46555. 32: 1024,
  46556. 48: 1049601,
  46557. 64: 34604033,
  46558. 80: 0,
  46559. 96: 1,
  46560. 112: 34603009,
  46561. 128: 33555456,
  46562. 144: 1048577,
  46563. 160: 33554433,
  46564. 176: 34604032,
  46565. 192: 34603008,
  46566. 208: 1025,
  46567. 224: 1049600,
  46568. 240: 33554432,
  46569. 8: 34603009,
  46570. 24: 0,
  46571. 40: 33555457,
  46572. 56: 34604032,
  46573. 72: 1048576,
  46574. 88: 33554433,
  46575. 104: 33554432,
  46576. 120: 1025,
  46577. 136: 1049601,
  46578. 152: 33555456,
  46579. 168: 34603008,
  46580. 184: 1048577,
  46581. 200: 1024,
  46582. 216: 34604033,
  46583. 232: 1,
  46584. 248: 1049600,
  46585. 256: 33554432,
  46586. 272: 1048576,
  46587. 288: 33555457,
  46588. 304: 34603009,
  46589. 320: 1048577,
  46590. 336: 33555456,
  46591. 352: 34604032,
  46592. 368: 1049601,
  46593. 384: 1025,
  46594. 400: 34604033,
  46595. 416: 1049600,
  46596. 432: 1,
  46597. 448: 0,
  46598. 464: 34603008,
  46599. 480: 33554433,
  46600. 496: 1024,
  46601. 264: 1049600,
  46602. 280: 33555457,
  46603. 296: 34603009,
  46604. 312: 1,
  46605. 328: 33554432,
  46606. 344: 1048576,
  46607. 360: 1025,
  46608. 376: 34604032,
  46609. 392: 33554433,
  46610. 408: 34603008,
  46611. 424: 0,
  46612. 440: 34604033,
  46613. 456: 1049601,
  46614. 472: 1024,
  46615. 488: 33555456,
  46616. 504: 1048577
  46617. }, {
  46618. 0: 134219808,
  46619. 1: 131072,
  46620. 2: 134217728,
  46621. 3: 32,
  46622. 4: 131104,
  46623. 5: 134350880,
  46624. 6: 134350848,
  46625. 7: 2048,
  46626. 8: 134348800,
  46627. 9: 134219776,
  46628. 10: 133120,
  46629. 11: 134348832,
  46630. 12: 2080,
  46631. 13: 0,
  46632. 14: 134217760,
  46633. 15: 133152,
  46634. 2147483648: 2048,
  46635. 2147483649: 134350880,
  46636. 2147483650: 134219808,
  46637. 2147483651: 134217728,
  46638. 2147483652: 134348800,
  46639. 2147483653: 133120,
  46640. 2147483654: 133152,
  46641. 2147483655: 32,
  46642. 2147483656: 134217760,
  46643. 2147483657: 2080,
  46644. 2147483658: 131104,
  46645. 2147483659: 134350848,
  46646. 2147483660: 0,
  46647. 2147483661: 134348832,
  46648. 2147483662: 134219776,
  46649. 2147483663: 131072,
  46650. 16: 133152,
  46651. 17: 134350848,
  46652. 18: 32,
  46653. 19: 2048,
  46654. 20: 134219776,
  46655. 21: 134217760,
  46656. 22: 134348832,
  46657. 23: 131072,
  46658. 24: 0,
  46659. 25: 131104,
  46660. 26: 134348800,
  46661. 27: 134219808,
  46662. 28: 134350880,
  46663. 29: 133120,
  46664. 30: 2080,
  46665. 31: 134217728,
  46666. 2147483664: 131072,
  46667. 2147483665: 2048,
  46668. 2147483666: 134348832,
  46669. 2147483667: 133152,
  46670. 2147483668: 32,
  46671. 2147483669: 134348800,
  46672. 2147483670: 134217728,
  46673. 2147483671: 134219808,
  46674. 2147483672: 134350880,
  46675. 2147483673: 134217760,
  46676. 2147483674: 134219776,
  46677. 2147483675: 0,
  46678. 2147483676: 133120,
  46679. 2147483677: 2080,
  46680. 2147483678: 131104,
  46681. 2147483679: 134350848
  46682. }],
  46683. j = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679],
  46684. k = e.DES = d.extend({
  46685. _doReset: function _doReset() {
  46686. var d,
  46687. e,
  46688. i,
  46689. j,
  46690. k,
  46691. l,
  46692. m,
  46693. a = this._key,
  46694. b = a.words,
  46695. c = [];
  46696. for (d = 0; 56 > d; d++) {
  46697. e = f[d] - 1, c[d] = 1 & b[e >>> 5] >>> 31 - e % 32;
  46698. }
  46699. for (i = this._subKeys = [], j = 0; 16 > j; j++) {
  46700. for (k = i[j] = [], l = h[j], d = 0; 24 > d; d++) {
  46701. k[0 | d / 6] |= c[(g[d] - 1 + l) % 28] << 31 - d % 6, k[4 + (0 | d / 6)] |= c[28 + (g[d + 24] - 1 + l) % 28] << 31 - d % 6;
  46702. }
  46703. for (k[0] = k[0] << 1 | k[0] >>> 31, d = 1; 7 > d; d++) {
  46704. k[d] = k[d] >>> 4 * (d - 1) + 3;
  46705. }
  46706. k[7] = k[7] << 5 | k[7] >>> 27;
  46707. }
  46708. for (m = this._invSubKeys = [], d = 0; 16 > d; d++) {
  46709. m[d] = i[15 - d];
  46710. }
  46711. },
  46712. encryptBlock: function encryptBlock(a, b) {
  46713. this._doCryptBlock(a, b, this._subKeys);
  46714. },
  46715. decryptBlock: function decryptBlock(a, b) {
  46716. this._doCryptBlock(a, b, this._invSubKeys);
  46717. },
  46718. _doCryptBlock: function _doCryptBlock(a, b, c) {
  46719. var d, e, f, g, h, k, n;
  46720. for (this._lBlock = a[b], this._rBlock = a[b + 1], l.call(this, 4, 252645135), l.call(this, 16, 65535), m.call(this, 2, 858993459), m.call(this, 8, 16711935), l.call(this, 1, 1431655765), d = 0; 16 > d; d++) {
  46721. for (e = c[d], f = this._lBlock, g = this._rBlock, h = 0, k = 0; 8 > k; k++) {
  46722. h |= i[k][((g ^ e[k]) & j[k]) >>> 0];
  46723. }
  46724. this._lBlock = g, this._rBlock = f ^ h;
  46725. }
  46726. n = this._lBlock, this._lBlock = this._rBlock, this._rBlock = n, l.call(this, 1, 1431655765), m.call(this, 8, 16711935), m.call(this, 2, 858993459), l.call(this, 16, 65535), l.call(this, 4, 252645135), a[b] = this._lBlock, a[b + 1] = this._rBlock;
  46727. },
  46728. keySize: 2,
  46729. ivSize: 2,
  46730. blockSize: 2
  46731. });
  46732. a.DES = d._createHelper(k), n = e.TripleDES = d.extend({
  46733. _doReset: function _doReset() {
  46734. var d,
  46735. e,
  46736. f,
  46737. a = this._key,
  46738. b = a.words;
  46739. if (2 !== b.length && 4 !== b.length && b.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
  46740. d = b.slice(0, 2), e = b.length < 4 ? b.slice(0, 2) : b.slice(2, 4), f = b.length < 6 ? b.slice(0, 2) : b.slice(4, 6), this._des1 = k.createEncryptor(c.create(d)), this._des2 = k.createEncryptor(c.create(e)), this._des3 = k.createEncryptor(c.create(f));
  46741. },
  46742. encryptBlock: function encryptBlock(a, b) {
  46743. this._des1.encryptBlock(a, b), this._des2.decryptBlock(a, b), this._des3.encryptBlock(a, b);
  46744. },
  46745. decryptBlock: function decryptBlock(a, b) {
  46746. this._des3.decryptBlock(a, b), this._des2.encryptBlock(a, b), this._des1.decryptBlock(a, b);
  46747. },
  46748. keySize: 6,
  46749. ivSize: 2,
  46750. blockSize: 2
  46751. }), a.TripleDES = d._createHelper(n);
  46752. }(), function () {
  46753. function f() {
  46754. var e,
  46755. f,
  46756. a = this._S,
  46757. b = this._i,
  46758. c = this._j,
  46759. d = 0;
  46760. for (e = 0; 4 > e; e++) {
  46761. b = (b + 1) % 256, c = (c + a[b]) % 256, f = a[b], a[b] = a[c], a[c] = f, d |= a[(a[b] + a[c]) % 256] << 24 - 8 * e;
  46762. }
  46763. return this._i = b, this._j = c, d;
  46764. }
  46765. var g,
  46766. a = CryptoJS,
  46767. b = a.lib,
  46768. c = b.StreamCipher,
  46769. d = a.algo,
  46770. e = d.RC4 = c.extend({
  46771. _doReset: function _doReset() {
  46772. var e,
  46773. f,
  46774. g,
  46775. h,
  46776. i,
  46777. a = this._key,
  46778. b = a.words,
  46779. c = a.sigBytes,
  46780. d = this._S = [];
  46781. for (e = 0; 256 > e; e++) {
  46782. d[e] = e;
  46783. }
  46784. for (e = 0, f = 0; 256 > e; e++) {
  46785. g = e % c, h = 255 & b[g >>> 2] >>> 24 - 8 * (g % 4), f = (f + d[e] + h) % 256, i = d[e], d[e] = d[f], d[f] = i;
  46786. }
  46787. this._i = this._j = 0;
  46788. },
  46789. _doProcessBlock: function _doProcessBlock(a, b) {
  46790. a[b] ^= f.call(this);
  46791. },
  46792. keySize: 8,
  46793. ivSize: 0
  46794. });
  46795. a.RC4 = c._createHelper(e), g = d.RC4Drop = e.extend({
  46796. cfg: e.cfg.extend({
  46797. drop: 192
  46798. }),
  46799. _doReset: function _doReset() {
  46800. e._doReset.call(this);
  46801. for (var a = this.cfg.drop; a > 0; a--) {
  46802. f.call(this);
  46803. }
  46804. }
  46805. }), a.RC4Drop = c._createHelper(g);
  46806. }(), CryptoJS.mode.CTRGladman = function () {
  46807. function b(a) {
  46808. var b, c, d;
  46809. return 255 === (255 & a >> 24) ? (b = 255 & a >> 16, c = 255 & a >> 8, d = 255 & a, 255 === b ? (b = 0, 255 === c ? (c = 0, 255 === d ? d = 0 : ++d) : ++c) : ++b, a = 0, a += b << 16, a += c << 8, a += d) : a += 1 << 24, a;
  46810. }
  46811. function c(a) {
  46812. return 0 === (a[0] = b(a[0])) && (a[1] = b(a[1])), a;
  46813. }
  46814. var a = CryptoJS.lib.BlockCipherMode.extend(),
  46815. d = a.Encryptor = a.extend({
  46816. processBlock: function processBlock(a, b) {
  46817. var h,
  46818. i,
  46819. d = this._cipher,
  46820. e = d.blockSize,
  46821. f = this._iv,
  46822. g = this._counter;
  46823. for (f && (g = this._counter = f.slice(0), this._iv = void 0), c(g), h = g.slice(0), d.encryptBlock(h, 0), i = 0; e > i; i++) {
  46824. a[b + i] ^= h[i];
  46825. }
  46826. }
  46827. });
  46828. return a.Decryptor = d, a;
  46829. }(), function () {
  46830. function i() {
  46831. var c,
  46832. d,
  46833. e,
  46834. h,
  46835. i,
  46836. j,
  46837. a = this._X,
  46838. b = this._C;
  46839. for (c = 0; 8 > c; c++) {
  46840. f[c] = b[c];
  46841. }
  46842. for (b[0] = 0 | b[0] + 1295307597 + this._b, b[1] = 0 | b[1] + 3545052371 + (b[0] >>> 0 < f[0] >>> 0 ? 1 : 0), b[2] = 0 | b[2] + 886263092 + (b[1] >>> 0 < f[1] >>> 0 ? 1 : 0), b[3] = 0 | b[3] + 1295307597 + (b[2] >>> 0 < f[2] >>> 0 ? 1 : 0), b[4] = 0 | b[4] + 3545052371 + (b[3] >>> 0 < f[3] >>> 0 ? 1 : 0), b[5] = 0 | b[5] + 886263092 + (b[4] >>> 0 < f[4] >>> 0 ? 1 : 0), b[6] = 0 | b[6] + 1295307597 + (b[5] >>> 0 < f[5] >>> 0 ? 1 : 0), b[7] = 0 | b[7] + 3545052371 + (b[6] >>> 0 < f[6] >>> 0 ? 1 : 0), this._b = b[7] >>> 0 < f[7] >>> 0 ? 1 : 0, c = 0; 8 > c; c++) {
  46843. d = a[c] + b[c], e = 65535 & d, h = d >>> 16, i = ((e * e >>> 17) + e * h >>> 15) + h * h, j = (0 | (4294901760 & d) * d) + (0 | (65535 & d) * d), g[c] = i ^ j;
  46844. }
  46845. a[0] = 0 | g[0] + (g[7] << 16 | g[7] >>> 16) + (g[6] << 16 | g[6] >>> 16), a[1] = 0 | g[1] + (g[0] << 8 | g[0] >>> 24) + g[7], a[2] = 0 | g[2] + (g[1] << 16 | g[1] >>> 16) + (g[0] << 16 | g[0] >>> 16), a[3] = 0 | g[3] + (g[2] << 8 | g[2] >>> 24) + g[1], a[4] = 0 | g[4] + (g[3] << 16 | g[3] >>> 16) + (g[2] << 16 | g[2] >>> 16), a[5] = 0 | g[5] + (g[4] << 8 | g[4] >>> 24) + g[3], a[6] = 0 | g[6] + (g[5] << 16 | g[5] >>> 16) + (g[4] << 16 | g[4] >>> 16), a[7] = 0 | g[7] + (g[6] << 8 | g[6] >>> 24) + g[5];
  46846. }
  46847. var a = CryptoJS,
  46848. b = a.lib,
  46849. c = b.StreamCipher,
  46850. d = a.algo,
  46851. e = [],
  46852. f = [],
  46853. g = [],
  46854. h = d.Rabbit = c.extend({
  46855. _doReset: function _doReset() {
  46856. var c,
  46857. d,
  46858. e,
  46859. f,
  46860. g,
  46861. h,
  46862. j,
  46863. k,
  46864. l,
  46865. m,
  46866. a = this._key.words,
  46867. b = this.cfg.iv;
  46868. for (c = 0; 4 > c; c++) {
  46869. a[c] = 16711935 & (a[c] << 8 | a[c] >>> 24) | 4278255360 & (a[c] << 24 | a[c] >>> 8);
  46870. }
  46871. for (d = this._X = [a[0], a[3] << 16 | a[2] >>> 16, a[1], a[0] << 16 | a[3] >>> 16, a[2], a[1] << 16 | a[0] >>> 16, a[3], a[2] << 16 | a[1] >>> 16], e = this._C = [a[2] << 16 | a[2] >>> 16, 4294901760 & a[0] | 65535 & a[1], a[3] << 16 | a[3] >>> 16, 4294901760 & a[1] | 65535 & a[2], a[0] << 16 | a[0] >>> 16, 4294901760 & a[2] | 65535 & a[3], a[1] << 16 | a[1] >>> 16, 4294901760 & a[3] | 65535 & a[0]], this._b = 0, c = 0; 4 > c; c++) {
  46872. i.call(this);
  46873. }
  46874. for (c = 0; 8 > c; c++) {
  46875. e[c] ^= d[7 & c + 4];
  46876. }
  46877. if (b) for (f = b.words, g = f[0], h = f[1], j = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), k = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8), l = j >>> 16 | 4294901760 & k, m = k << 16 | 65535 & j, e[0] ^= j, e[1] ^= l, e[2] ^= k, e[3] ^= m, e[4] ^= j, e[5] ^= l, e[6] ^= k, e[7] ^= m, c = 0; 4 > c; c++) {
  46878. i.call(this);
  46879. }
  46880. },
  46881. _doProcessBlock: function _doProcessBlock(a, b) {
  46882. var d,
  46883. c = this._X;
  46884. for (i.call(this), e[0] = c[0] ^ c[5] >>> 16 ^ c[3] << 16, e[1] = c[2] ^ c[7] >>> 16 ^ c[5] << 16, e[2] = c[4] ^ c[1] >>> 16 ^ c[7] << 16, e[3] = c[6] ^ c[3] >>> 16 ^ c[1] << 16, d = 0; 4 > d; d++) {
  46885. e[d] = 16711935 & (e[d] << 8 | e[d] >>> 24) | 4278255360 & (e[d] << 24 | e[d] >>> 8), a[b + d] ^= e[d];
  46886. }
  46887. },
  46888. blockSize: 4,
  46889. ivSize: 2
  46890. });
  46891. a.Rabbit = c._createHelper(h);
  46892. }(), CryptoJS.mode.CTR = function () {
  46893. var a = CryptoJS.lib.BlockCipherMode.extend(),
  46894. b = a.Encryptor = a.extend({
  46895. processBlock: function processBlock(a, b) {
  46896. var g,
  46897. h,
  46898. c = this._cipher,
  46899. d = c.blockSize,
  46900. e = this._iv,
  46901. f = this._counter;
  46902. for (e && (f = this._counter = e.slice(0), this._iv = void 0), g = f.slice(0), c.encryptBlock(g, 0), f[d - 1] = 0 | f[d - 1] + 1, h = 0; d > h; h++) {
  46903. a[b + h] ^= g[h];
  46904. }
  46905. }
  46906. });
  46907. return a.Decryptor = b, a;
  46908. }(), function () {
  46909. function i() {
  46910. var c,
  46911. d,
  46912. e,
  46913. h,
  46914. i,
  46915. j,
  46916. a = this._X,
  46917. b = this._C;
  46918. for (c = 0; 8 > c; c++) {
  46919. f[c] = b[c];
  46920. }
  46921. for (b[0] = 0 | b[0] + 1295307597 + this._b, b[1] = 0 | b[1] + 3545052371 + (b[0] >>> 0 < f[0] >>> 0 ? 1 : 0), b[2] = 0 | b[2] + 886263092 + (b[1] >>> 0 < f[1] >>> 0 ? 1 : 0), b[3] = 0 | b[3] + 1295307597 + (b[2] >>> 0 < f[2] >>> 0 ? 1 : 0), b[4] = 0 | b[4] + 3545052371 + (b[3] >>> 0 < f[3] >>> 0 ? 1 : 0), b[5] = 0 | b[5] + 886263092 + (b[4] >>> 0 < f[4] >>> 0 ? 1 : 0), b[6] = 0 | b[6] + 1295307597 + (b[5] >>> 0 < f[5] >>> 0 ? 1 : 0), b[7] = 0 | b[7] + 3545052371 + (b[6] >>> 0 < f[6] >>> 0 ? 1 : 0), this._b = b[7] >>> 0 < f[7] >>> 0 ? 1 : 0, c = 0; 8 > c; c++) {
  46922. d = a[c] + b[c], e = 65535 & d, h = d >>> 16, i = ((e * e >>> 17) + e * h >>> 15) + h * h, j = (0 | (4294901760 & d) * d) + (0 | (65535 & d) * d), g[c] = i ^ j;
  46923. }
  46924. a[0] = 0 | g[0] + (g[7] << 16 | g[7] >>> 16) + (g[6] << 16 | g[6] >>> 16), a[1] = 0 | g[1] + (g[0] << 8 | g[0] >>> 24) + g[7], a[2] = 0 | g[2] + (g[1] << 16 | g[1] >>> 16) + (g[0] << 16 | g[0] >>> 16), a[3] = 0 | g[3] + (g[2] << 8 | g[2] >>> 24) + g[1], a[4] = 0 | g[4] + (g[3] << 16 | g[3] >>> 16) + (g[2] << 16 | g[2] >>> 16), a[5] = 0 | g[5] + (g[4] << 8 | g[4] >>> 24) + g[3], a[6] = 0 | g[6] + (g[5] << 16 | g[5] >>> 16) + (g[4] << 16 | g[4] >>> 16), a[7] = 0 | g[7] + (g[6] << 8 | g[6] >>> 24) + g[5];
  46925. }
  46926. var a = CryptoJS,
  46927. b = a.lib,
  46928. c = b.StreamCipher,
  46929. d = a.algo,
  46930. e = [],
  46931. f = [],
  46932. g = [],
  46933. h = d.RabbitLegacy = c.extend({
  46934. _doReset: function _doReset() {
  46935. var e,
  46936. f,
  46937. g,
  46938. h,
  46939. j,
  46940. k,
  46941. l,
  46942. m,
  46943. a = this._key.words,
  46944. b = this.cfg.iv,
  46945. c = this._X = [a[0], a[3] << 16 | a[2] >>> 16, a[1], a[0] << 16 | a[3] >>> 16, a[2], a[1] << 16 | a[0] >>> 16, a[3], a[2] << 16 | a[1] >>> 16],
  46946. d = this._C = [a[2] << 16 | a[2] >>> 16, 4294901760 & a[0] | 65535 & a[1], a[3] << 16 | a[3] >>> 16, 4294901760 & a[1] | 65535 & a[2], a[0] << 16 | a[0] >>> 16, 4294901760 & a[2] | 65535 & a[3], a[1] << 16 | a[1] >>> 16, 4294901760 & a[3] | 65535 & a[0]];
  46947. for (this._b = 0, e = 0; 4 > e; e++) {
  46948. i.call(this);
  46949. }
  46950. for (e = 0; 8 > e; e++) {
  46951. d[e] ^= c[7 & e + 4];
  46952. }
  46953. if (b) for (f = b.words, g = f[0], h = f[1], j = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), k = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8), l = j >>> 16 | 4294901760 & k, m = k << 16 | 65535 & j, d[0] ^= j, d[1] ^= l, d[2] ^= k, d[3] ^= m, d[4] ^= j, d[5] ^= l, d[6] ^= k, d[7] ^= m, e = 0; 4 > e; e++) {
  46954. i.call(this);
  46955. }
  46956. },
  46957. _doProcessBlock: function _doProcessBlock(a, b) {
  46958. var d,
  46959. c = this._X;
  46960. for (i.call(this), e[0] = c[0] ^ c[5] >>> 16 ^ c[3] << 16, e[1] = c[2] ^ c[7] >>> 16 ^ c[5] << 16, e[2] = c[4] ^ c[1] >>> 16 ^ c[7] << 16, e[3] = c[6] ^ c[3] >>> 16 ^ c[1] << 16, d = 0; 4 > d; d++) {
  46961. e[d] = 16711935 & (e[d] << 8 | e[d] >>> 24) | 4278255360 & (e[d] << 24 | e[d] >>> 8), a[b + d] ^= e[d];
  46962. }
  46963. },
  46964. blockSize: 4,
  46965. ivSize: 2
  46966. });
  46967. a.RabbitLegacy = c._createHelper(h);
  46968. }(), CryptoJS.pad.ZeroPadding = {
  46969. pad: function pad(a, b) {
  46970. var c = 4 * b;
  46971. a.clamp(), a.sigBytes += c - (a.sigBytes % c || c);
  46972. },
  46973. unpad: function unpad(a) {
  46974. var b = a.words,
  46975. c = a.sigBytes - 1;
  46976. for (c = a.sigBytes - 1; c >= 0; c--) {
  46977. if (255 & b[c >>> 2] >>> 24 - 8 * (c % 4)) {
  46978. a.sigBytes = c + 1;
  46979. break;
  46980. }
  46981. }
  46982. }
  46983. };
  46984. try {} catch (e) {}
  46985. !function (a, b) {
  46986. "object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? b(exports) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (b),
  46987. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  46988. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  46989. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  46990. }(this, function (a) {
  46991. "use strict";
  46992. function c(a) {
  46993. return b.charAt(a);
  46994. }
  46995. function d(a, b) {
  46996. return a & b;
  46997. }
  46998. function e(a, b) {
  46999. return a | b;
  47000. }
  47001. function f(a, b) {
  47002. return a ^ b;
  47003. }
  47004. function g(a, b) {
  47005. return a & ~b;
  47006. }
  47007. function h(a) {
  47008. if (0 == a) return -1;
  47009. var b = 0;
  47010. return 0 == (65535 & a) && (a >>= 16, b += 16), 0 == (255 & a) && (a >>= 8, b += 8), 0 == (15 & a) && (a >>= 4, b += 4), 0 == (3 & a) && (a >>= 2, b += 2), 0 == (1 & a) && ++b, b;
  47011. }
  47012. function i(a) {
  47013. for (var b = 0; 0 != a;) {
  47014. a &= a - 1, ++b;
  47015. }
  47016. return b;
  47017. }
  47018. function l(a) {
  47019. var b,
  47020. c,
  47021. d = "";
  47022. for (b = 0; b + 3 <= a.length; b += 3) {
  47023. c = parseInt(a.substring(b, b + 3), 16), d += j.charAt(c >> 6) + j.charAt(63 & c);
  47024. }
  47025. for (b + 1 == a.length ? (c = parseInt(a.substring(b, b + 1), 16), d += j.charAt(c << 2)) : b + 2 == a.length && (c = parseInt(a.substring(b, b + 2), 16), d += j.charAt(c >> 2) + j.charAt((3 & c) << 4)); (3 & d.length) > 0;) {
  47026. d += k;
  47027. }
  47028. return d;
  47029. }
  47030. function m(a) {
  47031. var d,
  47032. g,
  47033. b = "",
  47034. e = 0,
  47035. f = 0;
  47036. for (d = 0; d < a.length && a.charAt(d) != k; ++d) {
  47037. g = j.indexOf(a.charAt(d)), 0 > g || (0 == e ? (b += c(g >> 2), f = 3 & g, e = 1) : 1 == e ? (b += c(f << 2 | g >> 4), f = 15 & g, e = 2) : 2 == e ? (b += c(f), b += c(g >> 2), f = 3 & g, e = 3) : (b += c(f << 2 | g >> 4), b += c(15 & g), e = 0));
  47038. }
  47039. return 1 == e && (b += c(f << 2)), b;
  47040. }
  47041. function o(a, b) {
  47042. function c() {
  47043. this.constructor = a;
  47044. }
  47045. _n(a, b), a.prototype = null === b ? Object.create(b) : (c.prototype = b.prototype, new c());
  47046. }
  47047. function y(a, b) {
  47048. return a.length > b && (a = a.substring(0, b) + v), a;
  47049. }
  47050. function M() {
  47051. return new H(null);
  47052. }
  47053. function N(a, b) {
  47054. return new H(a, b);
  47055. }
  47056. function Q(a, b, c, d, e, f) {
  47057. for (var i, j, k, g = 16383 & b, h = b >> 14; --f >= 0;) {
  47058. i = 16383 & this[a], j = this[a++] >> 14, k = h * i + j * g, i = g * i + ((16383 & k) << 14) + c[d] + e, e = (i >> 28) + (k >> 14) + h * j, c[d++] = 268435455 & i;
  47059. }
  47060. return e;
  47061. }
  47062. function V(a, b) {
  47063. var c = S[a.charCodeAt(b)];
  47064. return null == c ? -1 : c;
  47065. }
  47066. function W(a) {
  47067. var b = M();
  47068. return b.fromInt(a), b;
  47069. }
  47070. function X(a) {
  47071. var c,
  47072. b = 1;
  47073. return 0 != (c = a >>> 16) && (a = c, b += 16), 0 != (c = a >> 8) && (a = c, b += 8), 0 != (c = a >> 4) && (a = c, b += 4), 0 != (c = a >> 2) && (a = c, b += 2), 0 != (c = a >> 1) && (a = c, b += 1), b;
  47074. }
  47075. function Z() {
  47076. return new Y();
  47077. }
  47078. function fb() {
  47079. if (null == _) {
  47080. for (_ = Z(); $ > bb;) {
  47081. var a = Math.floor(65536 * Math.random());
  47082. ab[bb++] = 255 & a;
  47083. }
  47084. for (_.init(ab), bb = 0; bb < ab.length; ++bb) {
  47085. ab[bb] = 0;
  47086. }
  47087. bb = 0;
  47088. }
  47089. return _.next();
  47090. }
  47091. function hb(a, b) {
  47092. var c, d, e, f;
  47093. if (b < a.length + 22) return console.error("Message too long for RSA"), null;
  47094. for (c = b - a.length - 6, d = "", e = 0; c > e; e += 2) {
  47095. d += "ff";
  47096. }
  47097. return f = "0001" + d + "00" + a, N(f, 16);
  47098. }
  47099. function ib(a, b) {
  47100. var c, d, e, f, g;
  47101. if (b < a.length + 11) return console.error("Message too long for RSA"), null;
  47102. for (c = [], d = a.length - 1; d >= 0 && b > 0;) {
  47103. e = a.charCodeAt(d--), 128 > e ? c[--b] = e : e > 127 && 2048 > e ? (c[--b] = 128 | 63 & e, c[--b] = 192 | e >> 6) : (c[--b] = 128 | 63 & e, c[--b] = 128 | 63 & e >> 6, c[--b] = 224 | e >> 12);
  47104. }
  47105. for (c[--b] = 0, f = new gb(), g = []; b > 2;) {
  47106. for (g[0] = 0; 0 == g[0];) {
  47107. f.nextBytes(g);
  47108. }
  47109. c[--b] = g[0];
  47110. }
  47111. return c[--b] = 2, c[--b] = 0, new H(c);
  47112. }
  47113. function kb(a, b) {
  47114. for (var e, f, c = a.toByteArray(), d = 0; d < c.length && 0 == c[d];) {
  47115. ++d;
  47116. }
  47117. if (c.length - d != b - 1 || 2 != c[d]) return null;
  47118. for (++d; 0 != c[d];) {
  47119. if (++d >= c.length) return null;
  47120. }
  47121. for (e = ""; ++d < c.length;) {
  47122. f = 255 & c[d], 128 > f ? e += String.fromCharCode(f) : f > 191 && 224 > f ? (e += String.fromCharCode((31 & f) << 6 | 63 & c[d + 1]), ++d) : (e += String.fromCharCode((15 & f) << 12 | (63 & c[d + 1]) << 6 | 63 & c[d + 2]), d += 2);
  47123. }
  47124. return e;
  47125. }
  47126. function mb(a) {
  47127. return lb[a] || "";
  47128. }
  47129. function nb(a) {
  47130. var b, c, d;
  47131. for (b in lb) {
  47132. if (lb.hasOwnProperty(b) && (c = lb[b], d = c.length, a.substr(0, d) == c)) return a.substr(d);
  47133. }
  47134. return a;
  47135. }
  47136. var p,
  47137. r,
  47138. C,
  47139. R,
  47140. S,
  47141. T,
  47142. U,
  47143. Y,
  47144. $,
  47145. _,
  47146. ab,
  47147. bb,
  47148. cb,
  47149. db,
  47150. gb,
  47151. jb,
  47152. lb,
  47153. ob,
  47154. pb,
  47155. qb,
  47156. rb,
  47157. b = "0123456789abcdefghijklmnopqrstuvwxyz",
  47158. j = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
  47159. k = "=",
  47160. _n = function n(a, b) {
  47161. return _n = Object.setPrototypeOf || {
  47162. __proto__: []
  47163. } instanceof Array && function (a, b) {
  47164. a.__proto__ = b;
  47165. } || function (a, b) {
  47166. for (var c in b) {
  47167. b.hasOwnProperty(c) && (a[c] = b[c]);
  47168. }
  47169. }, _n(a, b);
  47170. },
  47171. q = {
  47172. decode: function decode(a) {
  47173. var b, c, d, e, f, g, h;
  47174. if (void 0 === p) {
  47175. for (c = "0123456789ABCDEF", d = " \f\n\r\t\xA0\u2028\u2029", p = {}, b = 0; 16 > b; ++b) {
  47176. p[c.charAt(b)] = b;
  47177. }
  47178. for (c = c.toLowerCase(), b = 10; 16 > b; ++b) {
  47179. p[c.charAt(b)] = b;
  47180. }
  47181. for (b = 0; b < d.length; ++b) {
  47182. p[d.charAt(b)] = -1;
  47183. }
  47184. }
  47185. for (e = [], f = 0, g = 0, b = 0; b < a.length && (h = a.charAt(b), "=" != h); ++b) {
  47186. if (h = p[h], -1 != h) {
  47187. if (void 0 === h) throw new Error("Illegal character at offset " + b);
  47188. f |= h, ++g >= 2 ? (e[e.length] = f, f = 0, g = 0) : f <<= 4;
  47189. }
  47190. }
  47191. if (g) throw new Error("Hex encoding incomplete: 4 bits missing");
  47192. return e;
  47193. }
  47194. },
  47195. s = {
  47196. decode: function decode(a) {
  47197. var b, c, d, e, f, g, h;
  47198. if (void 0 === r) {
  47199. for (c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", d = "= \f\n\r\t\xA0\u2028\u2029", r = Object.create(null), b = 0; 64 > b; ++b) {
  47200. r[c.charAt(b)] = b;
  47201. }
  47202. for (b = 0; b < d.length; ++b) {
  47203. r[d.charAt(b)] = -1;
  47204. }
  47205. }
  47206. for (e = [], f = 0, g = 0, b = 0; b < a.length && (h = a.charAt(b), "=" != h); ++b) {
  47207. if (h = r[h], -1 != h) {
  47208. if (void 0 === h) throw new Error("Illegal character at offset " + b);
  47209. f |= h, ++g >= 4 ? (e[e.length] = f >> 16, e[e.length] = 255 & f >> 8, e[e.length] = 255 & f, f = 0, g = 0) : f <<= 6;
  47210. }
  47211. }
  47212. switch (g) {
  47213. case 1:
  47214. throw new Error("Base64 encoding incomplete: at least 2 bits missing");
  47215. case 2:
  47216. e[e.length] = f >> 10;
  47217. break;
  47218. case 3:
  47219. e[e.length] = f >> 16, e[e.length] = 255 & f >> 8;
  47220. }
  47221. return e;
  47222. },
  47223. re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  47224. unarmor: function unarmor(a) {
  47225. var b = s.re.exec(a);
  47226. if (b) if (b[1]) a = b[1];else {
  47227. if (!b[2]) throw new Error("RegExp out of sync");
  47228. a = b[2];
  47229. }
  47230. return s.decode(a);
  47231. }
  47232. },
  47233. t = 1e13,
  47234. u = function () {
  47235. function a(a) {
  47236. this.buf = [+a || 0];
  47237. }
  47238. return a.prototype.mulAdd = function (a, b) {
  47239. var e,
  47240. f,
  47241. c = this.buf,
  47242. d = c.length;
  47243. for (e = 0; d > e; ++e) {
  47244. f = c[e] * a + b, t > f ? b = 0 : (b = 0 | f / t, f -= b * t), c[e] = f;
  47245. }
  47246. b > 0 && (c[e] = b);
  47247. }, a.prototype.sub = function (a) {
  47248. var d,
  47249. e,
  47250. b = this.buf,
  47251. c = b.length;
  47252. for (d = 0; c > d; ++d) {
  47253. e = b[d] - a, 0 > e ? (e += t, a = 1) : a = 0, b[d] = e;
  47254. }
  47255. for (; 0 === b[b.length - 1];) {
  47256. b.pop();
  47257. }
  47258. }, a.prototype.toString = function (a) {
  47259. var b, c, d;
  47260. if (10 != (a || 10)) throw new Error("only base 10 is supported");
  47261. for (b = this.buf, c = b[b.length - 1].toString(), d = b.length - 2; d >= 0; --d) {
  47262. c += (t + b[d]).toString().substring(1);
  47263. }
  47264. return c;
  47265. }, a.prototype.valueOf = function () {
  47266. var c,
  47267. a = this.buf,
  47268. b = 0;
  47269. for (c = a.length - 1; c >= 0; --c) {
  47270. b = b * t + a[c];
  47271. }
  47272. return b;
  47273. }, a.prototype.simplify = function () {
  47274. var a = this.buf;
  47275. return 1 == a.length ? a[0] : this;
  47276. }, a;
  47277. }(),
  47278. v = "…",
  47279. w = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  47280. x = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  47281. z = function () {
  47282. function a(b, c) {
  47283. this.hexDigits = "0123456789ABCDEF", b instanceof a ? (this.enc = b.enc, this.pos = b.pos) : (this.enc = b, this.pos = c);
  47284. }
  47285. return a.prototype.get = function (a) {
  47286. if (void 0 === a && (a = this.pos++), a >= this.enc.length) throw new Error("Requesting byte offset " + a + " on a stream of length " + this.enc.length);
  47287. return "string" == typeof this.enc ? this.enc.charCodeAt(a) : this.enc[a];
  47288. }, a.prototype.hexByte = function (a) {
  47289. return this.hexDigits.charAt(15 & a >> 4) + this.hexDigits.charAt(15 & a);
  47290. }, a.prototype.hexDump = function (a, b, c) {
  47291. var e,
  47292. d = "";
  47293. for (e = a; b > e; ++e) {
  47294. if (d += this.hexByte(this.get(e)), c !== !0) switch (15 & e) {
  47295. case 7:
  47296. d += " ";
  47297. break;
  47298. case 15:
  47299. d += "\n";
  47300. break;
  47301. default:
  47302. d += " ";
  47303. }
  47304. }
  47305. return d;
  47306. }, a.prototype.isASCII = function (a, b) {
  47307. var c, d;
  47308. for (c = a; b > c; ++c) {
  47309. if (d = this.get(c), 32 > d || d > 176) return !1;
  47310. }
  47311. return !0;
  47312. }, a.prototype.parseStringISO = function (a, b) {
  47313. var d,
  47314. c = "";
  47315. for (d = a; b > d; ++d) {
  47316. c += String.fromCharCode(this.get(d));
  47317. }
  47318. return c;
  47319. }, a.prototype.parseStringUTF = function (a, b) {
  47320. var d,
  47321. e,
  47322. c = "";
  47323. for (d = a; b > d;) {
  47324. e = this.get(d++), c += 128 > e ? String.fromCharCode(e) : e > 191 && 224 > e ? String.fromCharCode((31 & e) << 6 | 63 & this.get(d++)) : String.fromCharCode((15 & e) << 12 | (63 & this.get(d++)) << 6 | 63 & this.get(d++));
  47325. }
  47326. return c;
  47327. }, a.prototype.parseStringBMP = function (a, b) {
  47328. var d,
  47329. e,
  47330. f,
  47331. c = "";
  47332. for (f = a; b > f;) {
  47333. d = this.get(f++), e = this.get(f++), c += String.fromCharCode(d << 8 | e);
  47334. }
  47335. return c;
  47336. }, a.prototype.parseTime = function (a, b, c) {
  47337. var d = this.parseStringISO(a, b),
  47338. e = (c ? w : x).exec(d);
  47339. return e ? (c && (e[1] = +e[1], e[1] += +e[1] < 70 ? 2e3 : 1900), d = e[1] + "-" + e[2] + "-" + e[3] + " " + e[4], e[5] && (d += ":" + e[5], e[6] && (d += ":" + e[6], e[7] && (d += "." + e[7]))), e[8] && (d += " UTC", "Z" != e[8] && (d += e[8], e[9] && (d += ":" + e[9]))), d) : "Unrecognized time: " + d;
  47340. }, a.prototype.parseInteger = function (a, b) {
  47341. for (var f, h, i, c = this.get(a), d = c > 127, e = d ? 255 : 0, g = ""; c == e && ++a < b;) {
  47342. c = this.get(a);
  47343. }
  47344. if (f = b - a, 0 === f) return d ? -1 : 0;
  47345. if (f > 4) {
  47346. for (g = c, f <<= 3; 0 == (128 & (+g ^ e));) {
  47347. g = +g << 1, --f;
  47348. }
  47349. g = "(" + f + " bit)\n";
  47350. }
  47351. for (d && (c -= 256), h = new u(c), i = a + 1; b > i; ++i) {
  47352. h.mulAdd(256, this.get(i));
  47353. }
  47354. return g + h.toString();
  47355. }, a.prototype.parseBitString = function (a, b, c) {
  47356. var h,
  47357. i,
  47358. j,
  47359. k,
  47360. d = this.get(a),
  47361. e = (b - a - 1 << 3) - d,
  47362. f = "(" + e + " bit)\n",
  47363. g = "";
  47364. for (h = a + 1; b > h; ++h) {
  47365. for (i = this.get(h), j = h == b - 1 ? d : 0, k = 7; k >= j; --k) {
  47366. g += 1 & i >> k ? "1" : "0";
  47367. }
  47368. if (g.length > c) return f + y(g, c);
  47369. }
  47370. return f + g;
  47371. }, a.prototype.parseOctetString = function (a, b, c) {
  47372. var d, e, f;
  47373. if (this.isASCII(a, b)) return y(this.parseStringISO(a, b), c);
  47374. for (d = b - a, e = "(" + d + " byte)\n", c /= 2, d > c && (b = a + c), f = a; b > f; ++f) {
  47375. e += this.hexByte(this.get(f));
  47376. }
  47377. return d > c && (e += v), e;
  47378. }, a.prototype.parseOID = function (a, b, c) {
  47379. var g,
  47380. h,
  47381. i,
  47382. d = "",
  47383. e = new u(),
  47384. f = 0;
  47385. for (g = a; b > g; ++g) {
  47386. if (h = this.get(g), e.mulAdd(128, 127 & h), f += 7, !(128 & h)) {
  47387. if ("" === d ? (e = e.simplify(), e instanceof u ? (e.sub(80), d = "2." + e.toString()) : (i = 80 > e ? 40 > e ? 0 : 1 : 2, d = i + "." + (e - 40 * i))) : d += "." + e.toString(), d.length > c) return y(d, c);
  47388. e = new u(), f = 0;
  47389. }
  47390. }
  47391. return f > 0 && (d += ".incomplete"), d;
  47392. }, a;
  47393. }(),
  47394. A = function () {
  47395. function a(a, b, c, d, e) {
  47396. if (!(d instanceof B)) throw new Error("Invalid tag value.");
  47397. this.stream = a, this.header = b, this.length = c, this.tag = d, this.sub = e;
  47398. }
  47399. return a.prototype.typeName = function () {
  47400. switch (this.tag.tagClass) {
  47401. case 0:
  47402. switch (this.tag.tagNumber) {
  47403. case 0:
  47404. return "EOC";
  47405. case 1:
  47406. return "BOOLEAN";
  47407. case 2:
  47408. return "INTEGER";
  47409. case 3:
  47410. return "BIT_STRING";
  47411. case 4:
  47412. return "OCTET_STRING";
  47413. case 5:
  47414. return "NULL";
  47415. case 6:
  47416. return "OBJECT_IDENTIFIER";
  47417. case 7:
  47418. return "ObjectDescriptor";
  47419. case 8:
  47420. return "EXTERNAL";
  47421. case 9:
  47422. return "REAL";
  47423. case 10:
  47424. return "ENUMERATED";
  47425. case 11:
  47426. return "EMBEDDED_PDV";
  47427. case 12:
  47428. return "UTF8String";
  47429. case 16:
  47430. return "SEQUENCE";
  47431. case 17:
  47432. return "SET";
  47433. case 18:
  47434. return "NumericString";
  47435. case 19:
  47436. return "PrintableString";
  47437. case 20:
  47438. return "TeletexString";
  47439. case 21:
  47440. return "VideotexString";
  47441. case 22:
  47442. return "IA5String";
  47443. case 23:
  47444. return "UTCTime";
  47445. case 24:
  47446. return "GeneralizedTime";
  47447. case 25:
  47448. return "GraphicString";
  47449. case 26:
  47450. return "VisibleString";
  47451. case 27:
  47452. return "GeneralString";
  47453. case 28:
  47454. return "UniversalString";
  47455. case 30:
  47456. return "BMPString";
  47457. }
  47458. return "Universal_" + this.tag.tagNumber.toString();
  47459. case 1:
  47460. return "Application_" + this.tag.tagNumber.toString();
  47461. case 2:
  47462. return "[" + this.tag.tagNumber.toString() + "]";
  47463. case 3:
  47464. return "Private_" + this.tag.tagNumber.toString();
  47465. }
  47466. }, a.prototype.content = function (a) {
  47467. var b, c;
  47468. if (void 0 === this.tag) return null;
  47469. if (void 0 === a && (a = 1 / 0), b = this.posContent(), c = Math.abs(this.length), !this.tag.isUniversal()) return null !== this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(b, b + c, a);
  47470. switch (this.tag.tagNumber) {
  47471. case 1:
  47472. return 0 === this.stream.get(b) ? "false" : "true";
  47473. case 2:
  47474. return this.stream.parseInteger(b, b + c);
  47475. case 3:
  47476. return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(b, b + c, a);
  47477. case 4:
  47478. return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(b, b + c, a);
  47479. case 6:
  47480. return this.stream.parseOID(b, b + c, a);
  47481. case 16:
  47482. case 17:
  47483. return null !== this.sub ? "(" + this.sub.length + " elem)" : "(no elem)";
  47484. case 12:
  47485. return y(this.stream.parseStringUTF(b, b + c), a);
  47486. case 18:
  47487. case 19:
  47488. case 20:
  47489. case 21:
  47490. case 22:
  47491. case 26:
  47492. return y(this.stream.parseStringISO(b, b + c), a);
  47493. case 30:
  47494. return y(this.stream.parseStringBMP(b, b + c), a);
  47495. case 23:
  47496. case 24:
  47497. return this.stream.parseTime(b, b + c, 23 == this.tag.tagNumber);
  47498. }
  47499. return null;
  47500. }, a.prototype.toString = function () {
  47501. return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]";
  47502. }, a.prototype.toPrettyString = function (a) {
  47503. var b, c, d;
  47504. if (void 0 === a && (a = ""), b = a + this.typeName() + " @" + this.stream.pos, this.length >= 0 && (b += "+"), b += this.length, this.tag.tagConstructed ? b += " (constructed)" : !this.tag.isUniversal() || 3 != this.tag.tagNumber && 4 != this.tag.tagNumber || null === this.sub || (b += " (encapsulates)"), b += "\n", null !== this.sub) for (a += " ", c = 0, d = this.sub.length; d > c; ++c) {
  47505. b += this.sub[c].toPrettyString(a);
  47506. }
  47507. return b;
  47508. }, a.prototype.posStart = function () {
  47509. return this.stream.pos;
  47510. }, a.prototype.posContent = function () {
  47511. return this.stream.pos + this.header;
  47512. }, a.prototype.posEnd = function () {
  47513. return this.stream.pos + this.header + Math.abs(this.length);
  47514. }, a.prototype.toHexString = function () {
  47515. return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
  47516. }, a.decodeLength = function (a) {
  47517. var d,
  47518. b = a.get(),
  47519. c = 127 & b;
  47520. if (c == b) return c;
  47521. if (c > 6) throw new Error("Length over 48 bits not supported at position " + (a.pos - 1));
  47522. if (0 === c) return null;
  47523. for (b = 0, d = 0; c > d; ++d) {
  47524. b = 256 * b + a.get();
  47525. }
  47526. return b;
  47527. }, a.prototype.getHexStringValue = function () {
  47528. var a = this.toHexString(),
  47529. b = 2 * this.header,
  47530. c = 2 * this.length;
  47531. return a.substr(b, c);
  47532. }, a.decode = function (b) {
  47533. var c, d, e, f, g, h, i, j, k;
  47534. if (c = b instanceof z ? b : new z(b, 0), d = new z(c), e = new B(c), f = a.decodeLength(c), g = c.pos, h = g - d.pos, i = null, j = function j() {
  47535. var d,
  47536. e,
  47537. b = [];
  47538. if (null !== f) {
  47539. for (d = g + f; c.pos < d;) {
  47540. b[b.length] = a.decode(c);
  47541. }
  47542. if (c.pos != d) throw new Error("Content size is not correct for container starting at offset " + g);
  47543. } else try {
  47544. for (; e = a.decode(c), !e.tag.isEOC();) {
  47545. b[b.length] = e;
  47546. }
  47547. f = g - c.pos;
  47548. } catch (h) {
  47549. throw new Error("Exception while decoding undefined length content: " + h);
  47550. }
  47551. return b;
  47552. }, e.tagConstructed) i = j();else if (e.isUniversal() && (3 == e.tagNumber || 4 == e.tagNumber)) try {
  47553. if (3 == e.tagNumber && 0 != c.get()) throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
  47554. for (i = j(), k = 0; k < i.length; ++k) {
  47555. if (i[k].tag.isEOC()) throw new Error("EOC is not supposed to be actual content.");
  47556. }
  47557. } catch (l) {
  47558. i = null;
  47559. }
  47560. if (null === i) {
  47561. if (null === f) throw new Error("We can't skip over an invalid tag with undefined length at offset " + g);
  47562. c.pos = g + Math.abs(f);
  47563. }
  47564. return new a(d, h, f, e, i);
  47565. }, a;
  47566. }(),
  47567. B = function () {
  47568. function a(a) {
  47569. var c,
  47570. b = a.get();
  47571. if (this.tagClass = b >> 6, this.tagConstructed = 0 !== (32 & b), this.tagNumber = 31 & b, 31 == this.tagNumber) {
  47572. c = new u();
  47573. do {
  47574. b = a.get(), c.mulAdd(128, 127 & b);
  47575. } while (128 & b);
  47576. this.tagNumber = c.simplify();
  47577. }
  47578. }
  47579. return a.prototype.isUniversal = function () {
  47580. return 0 === this.tagClass;
  47581. }, a.prototype.isEOC = function () {
  47582. return 0 === this.tagClass && 0 === this.tagNumber;
  47583. }, a;
  47584. }(),
  47585. F = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997],
  47586. G = (1 << 26) / F[F.length - 1],
  47587. H = function () {
  47588. function a(a, b, c) {
  47589. null != a && ("number" == typeof a ? this.fromNumber(a, b, c) : null == b && "string" != typeof a ? this.fromString(a, 256) : this.fromString(a, b));
  47590. }
  47591. return a.prototype.toString = function (a) {
  47592. var b, d, e, f, g, h, i;
  47593. if (this.s < 0) return "-" + this.negate().toString(a);
  47594. if (16 == a) b = 4;else if (8 == a) b = 3;else if (2 == a) b = 1;else if (32 == a) b = 5;else {
  47595. if (4 != a) return this.toRadix(a);
  47596. b = 2;
  47597. }
  47598. if (d = (1 << b) - 1, f = !1, g = "", h = this.t, i = this.DB - h * this.DB % b, h-- > 0) for (i < this.DB && (e = this[h] >> i) > 0 && (f = !0, g = c(e)); h >= 0;) {
  47599. b > i ? (e = (this[h] & (1 << i) - 1) << b - i, e |= this[--h] >> (i += this.DB - b)) : (e = this[h] >> (i -= b) & d, 0 >= i && (i += this.DB, --h)), e > 0 && (f = !0), f && (g += c(e));
  47600. }
  47601. return f ? g : "0";
  47602. }, a.prototype.negate = function () {
  47603. var b = M();
  47604. return a.ZERO.subTo(this, b), b;
  47605. }, a.prototype.abs = function () {
  47606. return this.s < 0 ? this.negate() : this;
  47607. }, a.prototype.compareTo = function (a) {
  47608. var c,
  47609. b = this.s - a.s;
  47610. if (0 != b) return b;
  47611. if (c = this.t, b = c - a.t, 0 != b) return this.s < 0 ? -b : b;
  47612. for (; --c >= 0;) {
  47613. if (0 != (b = this[c] - a[c])) return b;
  47614. }
  47615. return 0;
  47616. }, a.prototype.bitLength = function () {
  47617. return this.t <= 0 ? 0 : this.DB * (this.t - 1) + X(this[this.t - 1] ^ this.s & this.DM);
  47618. }, a.prototype.mod = function (b) {
  47619. var c = M();
  47620. return this.abs().divRemTo(b, null, c), this.s < 0 && c.compareTo(a.ZERO) > 0 && b.subTo(c, c), c;
  47621. }, a.prototype.modPowInt = function (a, b) {
  47622. var c;
  47623. return c = 256 > a || b.isEven() ? new J(b) : new K(b), this.exp(a, c);
  47624. }, a.prototype.clone = function () {
  47625. var a = M();
  47626. return this.copyTo(a), a;
  47627. }, a.prototype.intValue = function () {
  47628. if (this.s < 0) {
  47629. if (1 == this.t) return this[0] - this.DV;
  47630. if (0 == this.t) return -1;
  47631. } else {
  47632. if (1 == this.t) return this[0];
  47633. if (0 == this.t) return 0;
  47634. }
  47635. return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
  47636. }, a.prototype.byteValue = function () {
  47637. return 0 == this.t ? this.s : this[0] << 24 >> 24;
  47638. }, a.prototype.shortValue = function () {
  47639. return 0 == this.t ? this.s : this[0] << 16 >> 16;
  47640. }, a.prototype.signum = function () {
  47641. return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1;
  47642. }, a.prototype.toByteArray = function () {
  47643. var c,
  47644. d,
  47645. e,
  47646. a = this.t,
  47647. b = [];
  47648. if (b[0] = this.s, c = this.DB - a * this.DB % 8, e = 0, a-- > 0) for (c < this.DB && (d = this[a] >> c) != (this.s & this.DM) >> c && (b[e++] = d | this.s << this.DB - c); a >= 0;) {
  47649. 8 > c ? (d = (this[a] & (1 << c) - 1) << 8 - c, d |= this[--a] >> (c += this.DB - 8)) : (d = 255 & this[a] >> (c -= 8), 0 >= c && (c += this.DB, --a)), 0 != (128 & d) && (d |= -256), 0 == e && (128 & this.s) != (128 & d) && ++e, (e > 0 || d != this.s) && (b[e++] = d);
  47650. }
  47651. return b;
  47652. }, a.prototype.equals = function (a) {
  47653. return 0 == this.compareTo(a);
  47654. }, a.prototype.min = function (a) {
  47655. return this.compareTo(a) < 0 ? this : a;
  47656. }, a.prototype.max = function (a) {
  47657. return this.compareTo(a) > 0 ? this : a;
  47658. }, a.prototype.and = function (a) {
  47659. var b = M();
  47660. return this.bitwiseTo(a, d, b), b;
  47661. }, a.prototype.or = function (a) {
  47662. var b = M();
  47663. return this.bitwiseTo(a, e, b), b;
  47664. }, a.prototype.xor = function (a) {
  47665. var b = M();
  47666. return this.bitwiseTo(a, f, b), b;
  47667. }, a.prototype.andNot = function (a) {
  47668. var b = M();
  47669. return this.bitwiseTo(a, g, b), b;
  47670. }, a.prototype.not = function () {
  47671. var b,
  47672. a = M();
  47673. for (b = 0; b < this.t; ++b) {
  47674. a[b] = this.DM & ~this[b];
  47675. }
  47676. return a.t = this.t, a.s = ~this.s, a;
  47677. }, a.prototype.shiftLeft = function (a) {
  47678. var b = M();
  47679. return 0 > a ? this.rShiftTo(-a, b) : this.lShiftTo(a, b), b;
  47680. }, a.prototype.shiftRight = function (a) {
  47681. var b = M();
  47682. return 0 > a ? this.lShiftTo(-a, b) : this.rShiftTo(a, b), b;
  47683. }, a.prototype.getLowestSetBit = function () {
  47684. for (var a = 0; a < this.t; ++a) {
  47685. if (0 != this[a]) return a * this.DB + h(this[a]);
  47686. }
  47687. return this.s < 0 ? this.t * this.DB : -1;
  47688. }, a.prototype.bitCount = function () {
  47689. var c,
  47690. a = 0,
  47691. b = this.s & this.DM;
  47692. for (c = 0; c < this.t; ++c) {
  47693. a += i(this[c] ^ b);
  47694. }
  47695. return a;
  47696. }, a.prototype.testBit = function (a) {
  47697. var b = Math.floor(a / this.DB);
  47698. return b >= this.t ? 0 != this.s : 0 != (this[b] & 1 << a % this.DB);
  47699. }, a.prototype.setBit = function (a) {
  47700. return this.changeBit(a, e);
  47701. }, a.prototype.clearBit = function (a) {
  47702. return this.changeBit(a, g);
  47703. }, a.prototype.flipBit = function (a) {
  47704. return this.changeBit(a, f);
  47705. }, a.prototype.add = function (a) {
  47706. var b = M();
  47707. return this.addTo(a, b), b;
  47708. }, a.prototype.subtract = function (a) {
  47709. var b = M();
  47710. return this.subTo(a, b), b;
  47711. }, a.prototype.multiply = function (a) {
  47712. var b = M();
  47713. return this.multiplyTo(a, b), b;
  47714. }, a.prototype.divide = function (a) {
  47715. var b = M();
  47716. return this.divRemTo(a, b, null), b;
  47717. }, a.prototype.remainder = function (a) {
  47718. var b = M();
  47719. return this.divRemTo(a, null, b), b;
  47720. }, a.prototype.divideAndRemainder = function (a) {
  47721. var b = M(),
  47722. c = M();
  47723. return this.divRemTo(a, b, c), [b, c];
  47724. }, a.prototype.modPow = function (a, b) {
  47725. var d,
  47726. f,
  47727. g,
  47728. h,
  47729. i,
  47730. j,
  47731. k,
  47732. l,
  47733. m,
  47734. n,
  47735. o,
  47736. p,
  47737. c = a.bitLength(),
  47738. e = W(1);
  47739. if (0 >= c) return e;
  47740. if (d = 18 > c ? 1 : 48 > c ? 3 : 144 > c ? 4 : 768 > c ? 5 : 6, f = 8 > c ? new J(b) : b.isEven() ? new L(b) : new K(b), g = [], h = 3, i = d - 1, j = (1 << d) - 1, g[1] = f.convert(this), d > 1) for (k = M(), f.sqrTo(g[1], k); j >= h;) {
  47741. g[h] = M(), f.mulTo(k, g[h - 2], g[h]), h += 2;
  47742. }
  47743. for (l = a.t - 1, n = !0, o = M(), c = X(a[l]) - 1; l >= 0;) {
  47744. for (c >= i ? m = a[l] >> c - i & j : (m = (a[l] & (1 << c + 1) - 1) << i - c, l > 0 && (m |= a[l - 1] >> this.DB + c - i)), h = d; 0 == (1 & m);) {
  47745. m >>= 1, --h;
  47746. }
  47747. if ((c -= h) < 0 && (c += this.DB, --l), n) g[m].copyTo(e), n = !1;else {
  47748. for (; h > 1;) {
  47749. f.sqrTo(e, o), f.sqrTo(o, e), h -= 2;
  47750. }
  47751. h > 0 ? f.sqrTo(e, o) : (p = e, e = o, o = p), f.mulTo(o, g[m], e);
  47752. }
  47753. for (; l >= 0 && 0 == (a[l] & 1 << c);) {
  47754. f.sqrTo(e, o), p = e, e = o, o = p, --c < 0 && (c = this.DB - 1, --l);
  47755. }
  47756. }
  47757. return f.revert(e);
  47758. }, a.prototype.modInverse = function (b) {
  47759. var d,
  47760. e,
  47761. f,
  47762. g,
  47763. h,
  47764. i,
  47765. c = b.isEven();
  47766. if (this.isEven() && c || 0 == b.signum()) return a.ZERO;
  47767. for (d = b.clone(), e = this.clone(), f = W(1), g = W(0), h = W(0), i = W(1); 0 != d.signum();) {
  47768. for (; d.isEven();) {
  47769. d.rShiftTo(1, d), c ? (f.isEven() && g.isEven() || (f.addTo(this, f), g.subTo(b, g)), f.rShiftTo(1, f)) : g.isEven() || g.subTo(b, g), g.rShiftTo(1, g);
  47770. }
  47771. for (; e.isEven();) {
  47772. e.rShiftTo(1, e), c ? (h.isEven() && i.isEven() || (h.addTo(this, h), i.subTo(b, i)), h.rShiftTo(1, h)) : i.isEven() || i.subTo(b, i), i.rShiftTo(1, i);
  47773. }
  47774. d.compareTo(e) >= 0 ? (d.subTo(e, d), c && f.subTo(h, f), g.subTo(i, g)) : (e.subTo(d, e), c && h.subTo(f, h), i.subTo(g, i));
  47775. }
  47776. return 0 != e.compareTo(a.ONE) ? a.ZERO : i.compareTo(b) >= 0 ? i.subtract(b) : i.signum() < 0 ? (i.addTo(b, i), i.signum() < 0 ? i.add(b) : i) : i;
  47777. }, a.prototype.pow = function (a) {
  47778. return this.exp(a, new I());
  47779. }, a.prototype.gcd = function (a) {
  47780. var d,
  47781. e,
  47782. f,
  47783. b = this.s < 0 ? this.negate() : this.clone(),
  47784. c = a.s < 0 ? a.negate() : a.clone();
  47785. if (b.compareTo(c) < 0 && (d = b, b = c, c = d), e = b.getLowestSetBit(), f = c.getLowestSetBit(), 0 > f) return b;
  47786. for (f > e && (f = e), f > 0 && (b.rShiftTo(f, b), c.rShiftTo(f, c)); b.signum() > 0;) {
  47787. (e = b.getLowestSetBit()) > 0 && b.rShiftTo(e, b), (e = c.getLowestSetBit()) > 0 && c.rShiftTo(e, c), b.compareTo(c) >= 0 ? (b.subTo(c, b), b.rShiftTo(1, b)) : (c.subTo(b, c), c.rShiftTo(1, c));
  47788. }
  47789. return f > 0 && c.lShiftTo(f, c), c;
  47790. }, a.prototype.isProbablePrime = function (a) {
  47791. var b,
  47792. d,
  47793. e,
  47794. c = this.abs();
  47795. if (1 == c.t && c[0] <= F[F.length - 1]) {
  47796. for (b = 0; b < F.length; ++b) {
  47797. if (c[0] == F[b]) return !0;
  47798. }
  47799. return !1;
  47800. }
  47801. if (c.isEven()) return !1;
  47802. for (b = 1; b < F.length;) {
  47803. for (d = F[b], e = b + 1; e < F.length && G > d;) {
  47804. d *= F[e++];
  47805. }
  47806. for (d = c.modInt(d); e > b;) {
  47807. if (0 == d % F[b++]) return !1;
  47808. }
  47809. }
  47810. return c.millerRabin(a);
  47811. }, a.prototype.copyTo = function (a) {
  47812. for (var b = this.t - 1; b >= 0; --b) {
  47813. a[b] = this[b];
  47814. }
  47815. a.t = this.t, a.s = this.s;
  47816. }, a.prototype.fromInt = function (a) {
  47817. this.t = 1, this.s = 0 > a ? -1 : 0, a > 0 ? this[0] = a : -1 > a ? this[0] = a + this.DV : this.t = 0;
  47818. }, a.prototype.fromString = function (b, c) {
  47819. var d, e, f, g, h;
  47820. if (16 == c) d = 4;else if (8 == c) d = 3;else if (256 == c) d = 8;else if (2 == c) d = 1;else if (32 == c) d = 5;else {
  47821. if (4 != c) return this.fromRadix(b, c), void 0;
  47822. d = 2;
  47823. }
  47824. for (this.t = 0, this.s = 0, e = b.length, f = !1, g = 0; --e >= 0;) {
  47825. h = 8 == d ? 255 & +b[e] : V(b, e), 0 > h ? "-" == b.charAt(e) && (f = !0) : (f = !1, 0 == g ? this[this.t++] = h : g + d > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - g) - 1) << g, this[this.t++] = h >> this.DB - g) : this[this.t - 1] |= h << g, g += d, g >= this.DB && (g -= this.DB));
  47826. }
  47827. 8 == d && 0 != (128 & +b[0]) && (this.s = -1, g > 0 && (this[this.t - 1] |= (1 << this.DB - g) - 1 << g)), this.clamp(), f && a.ZERO.subTo(this, this);
  47828. }, a.prototype.clamp = function () {
  47829. for (var a = this.s & this.DM; this.t > 0 && this[this.t - 1] == a;) {
  47830. --this.t;
  47831. }
  47832. }, a.prototype.dlShiftTo = function (a, b) {
  47833. var c;
  47834. for (c = this.t - 1; c >= 0; --c) {
  47835. b[c + a] = this[c];
  47836. }
  47837. for (c = a - 1; c >= 0; --c) {
  47838. b[c] = 0;
  47839. }
  47840. b.t = this.t + a, b.s = this.s;
  47841. }, a.prototype.drShiftTo = function (a, b) {
  47842. for (var c = a; c < this.t; ++c) {
  47843. b[c - a] = this[c];
  47844. }
  47845. b.t = Math.max(this.t - a, 0), b.s = this.s;
  47846. }, a.prototype.lShiftTo = function (a, b) {
  47847. var h,
  47848. c = a % this.DB,
  47849. d = this.DB - c,
  47850. e = (1 << d) - 1,
  47851. f = Math.floor(a / this.DB),
  47852. g = this.s << c & this.DM;
  47853. for (h = this.t - 1; h >= 0; --h) {
  47854. b[h + f + 1] = this[h] >> d | g, g = (this[h] & e) << c;
  47855. }
  47856. for (h = f - 1; h >= 0; --h) {
  47857. b[h] = 0;
  47858. }
  47859. b[f] = g, b.t = this.t + f + 1, b.s = this.s, b.clamp();
  47860. }, a.prototype.rShiftTo = function (a, b) {
  47861. var c, d, e, f, g;
  47862. if (b.s = this.s, c = Math.floor(a / this.DB), c >= this.t) return b.t = 0, void 0;
  47863. for (d = a % this.DB, e = this.DB - d, f = (1 << d) - 1, b[0] = this[c] >> d, g = c + 1; g < this.t; ++g) {
  47864. b[g - c - 1] |= (this[g] & f) << e, b[g - c] = this[g] >> d;
  47865. }
  47866. d > 0 && (b[this.t - c - 1] |= (this.s & f) << e), b.t = this.t - c, b.clamp();
  47867. }, a.prototype.subTo = function (a, b) {
  47868. for (var c = 0, d = 0, e = Math.min(a.t, this.t); e > c;) {
  47869. d += this[c] - a[c], b[c++] = d & this.DM, d >>= this.DB;
  47870. }
  47871. if (a.t < this.t) {
  47872. for (d -= a.s; c < this.t;) {
  47873. d += this[c], b[c++] = d & this.DM, d >>= this.DB;
  47874. }
  47875. d += this.s;
  47876. } else {
  47877. for (d += this.s; c < a.t;) {
  47878. d -= a[c], b[c++] = d & this.DM, d >>= this.DB;
  47879. }
  47880. d -= a.s;
  47881. }
  47882. b.s = 0 > d ? -1 : 0, -1 > d ? b[c++] = this.DV + d : d > 0 && (b[c++] = d), b.t = c, b.clamp();
  47883. }, a.prototype.multiplyTo = function (b, c) {
  47884. var d = this.abs(),
  47885. e = b.abs(),
  47886. f = d.t;
  47887. for (c.t = f + e.t; --f >= 0;) {
  47888. c[f] = 0;
  47889. }
  47890. for (f = 0; f < e.t; ++f) {
  47891. c[f + d.t] = d.am(0, e[f], c, f, 0, d.t);
  47892. }
  47893. c.s = 0, c.clamp(), this.s != b.s && a.ZERO.subTo(c, c);
  47894. }, a.prototype.squareTo = function (a) {
  47895. for (var d, b = this.abs(), c = a.t = 2 * b.t; --c >= 0;) {
  47896. a[c] = 0;
  47897. }
  47898. for (c = 0; c < b.t - 1; ++c) {
  47899. d = b.am(c, b[c], a, 2 * c, 0, 1), (a[c + b.t] += b.am(c + 1, 2 * b[c], a, 2 * c + 1, d, b.t - c - 1)) >= b.DV && (a[c + b.t] -= b.DV, a[c + b.t + 1] = 1);
  47900. }
  47901. a.t > 0 && (a[a.t - 1] += b.am(c, b[c], a, 2 * c, 0, 1)), a.s = 0, a.clamp();
  47902. }, a.prototype.divRemTo = function (b, c, d) {
  47903. var f,
  47904. g,
  47905. h,
  47906. i,
  47907. j,
  47908. k,
  47909. l,
  47910. m,
  47911. n,
  47912. o,
  47913. p,
  47914. q,
  47915. r,
  47916. s,
  47917. t,
  47918. e = b.abs();
  47919. if (!(e.t <= 0)) {
  47920. if (f = this.abs(), f.t < e.t) return null != c && c.fromInt(0), null != d && this.copyTo(d), void 0;
  47921. if (null == d && (d = M()), g = M(), h = this.s, i = b.s, j = this.DB - X(e[e.t - 1]), j > 0 ? (e.lShiftTo(j, g), f.lShiftTo(j, d)) : (e.copyTo(g), f.copyTo(d)), k = g.t, l = g[k - 1], 0 != l) {
  47922. for (m = l * (1 << this.F1) + (k > 1 ? g[k - 2] >> this.F2 : 0), n = this.FV / m, o = (1 << this.F1) / m, p = 1 << this.F2, q = d.t, r = q - k, s = null == c ? M() : c, g.dlShiftTo(r, s), d.compareTo(s) >= 0 && (d[d.t++] = 1, d.subTo(s, d)), a.ONE.dlShiftTo(k, s), s.subTo(g, g); g.t < k;) {
  47923. g[g.t++] = 0;
  47924. }
  47925. for (; --r >= 0;) {
  47926. if (t = d[--q] == l ? this.DM : Math.floor(d[q] * n + (d[q - 1] + p) * o), (d[q] += g.am(0, t, d, r, 0, k)) < t) for (g.dlShiftTo(r, s), d.subTo(s, d); d[q] < --t;) {
  47927. d.subTo(s, d);
  47928. }
  47929. }
  47930. null != c && (d.drShiftTo(k, c), h != i && a.ZERO.subTo(c, c)), d.t = k, d.clamp(), j > 0 && d.rShiftTo(j, d), 0 > h && a.ZERO.subTo(d, d);
  47931. }
  47932. }
  47933. }, a.prototype.invDigit = function () {
  47934. var a, b;
  47935. return this.t < 1 ? 0 : (a = this[0], 0 == (1 & a) ? 0 : (b = 3 & a, b = 15 & b * (2 - (15 & a) * b), b = 255 & b * (2 - (255 & a) * b), b = 65535 & b * (2 - (65535 & (65535 & a) * b)), b = b * (2 - a * b % this.DV) % this.DV, b > 0 ? this.DV - b : -b));
  47936. }, a.prototype.isEven = function () {
  47937. return 0 == (this.t > 0 ? 1 & this[0] : this.s);
  47938. }, a.prototype.exp = function (b, c) {
  47939. var d, e, f, g, h;
  47940. if (b > 4294967295 || 1 > b) return a.ONE;
  47941. for (d = M(), e = M(), f = c.convert(this), g = X(b) - 1, f.copyTo(d); --g >= 0;) {
  47942. c.sqrTo(d, e), (b & 1 << g) > 0 ? c.mulTo(e, f, d) : (h = d, d = e, e = h);
  47943. }
  47944. return c.revert(d);
  47945. }, a.prototype.chunkSize = function (a) {
  47946. return Math.floor(Math.LN2 * this.DB / Math.log(a));
  47947. }, a.prototype.toRadix = function (a) {
  47948. var b, c, d, e, f, g;
  47949. if (null == a && (a = 10), 0 == this.signum() || 2 > a || a > 36) return "0";
  47950. for (b = this.chunkSize(a), c = Math.pow(a, b), d = W(c), e = M(), f = M(), g = "", this.divRemTo(d, e, f); e.signum() > 0;) {
  47951. g = (c + f.intValue()).toString(a).substr(1) + g, e.divRemTo(d, e, f);
  47952. }
  47953. return f.intValue().toString(a) + g;
  47954. }, a.prototype.fromRadix = function (b, c) {
  47955. var d, e, f, g, h, i, j;
  47956. for (this.fromInt(0), null == c && (c = 10), d = this.chunkSize(c), e = Math.pow(c, d), f = !1, g = 0, h = 0, i = 0; i < b.length; ++i) {
  47957. j = V(b, i), 0 > j ? "-" == b.charAt(i) && 0 == this.signum() && (f = !0) : (h = c * h + j, ++g >= d && (this.dMultiply(e), this.dAddOffset(h, 0), g = 0, h = 0));
  47958. }
  47959. g > 0 && (this.dMultiply(Math.pow(c, g)), this.dAddOffset(h, 0)), f && a.ZERO.subTo(this, this);
  47960. }, a.prototype.fromNumber = function (b, c, d) {
  47961. var f, g;
  47962. if ("number" == typeof c) {
  47963. if (2 > b) this.fromInt(1);else for (this.fromNumber(b, d), this.testBit(b - 1) || this.bitwiseTo(a.ONE.shiftLeft(b - 1), e, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(c);) {
  47964. this.dAddOffset(2, 0), this.bitLength() > b && this.subTo(a.ONE.shiftLeft(b - 1), this);
  47965. }
  47966. } else f = [], g = 7 & b, f.length = (b >> 3) + 1, c.nextBytes(f), g > 0 ? f[0] &= (1 << g) - 1 : f[0] = 0, this.fromString(f, 256);
  47967. }, a.prototype.bitwiseTo = function (a, b, c) {
  47968. var d,
  47969. e,
  47970. f = Math.min(a.t, this.t);
  47971. for (d = 0; f > d; ++d) {
  47972. c[d] = b(this[d], a[d]);
  47973. }
  47974. if (a.t < this.t) {
  47975. for (e = a.s & this.DM, d = f; d < this.t; ++d) {
  47976. c[d] = b(this[d], e);
  47977. }
  47978. c.t = this.t;
  47979. } else {
  47980. for (e = this.s & this.DM, d = f; d < a.t; ++d) {
  47981. c[d] = b(e, a[d]);
  47982. }
  47983. c.t = a.t;
  47984. }
  47985. c.s = b(this.s, a.s), c.clamp();
  47986. }, a.prototype.changeBit = function (b, c) {
  47987. var d = a.ONE.shiftLeft(b);
  47988. return this.bitwiseTo(d, c, d), d;
  47989. }, a.prototype.addTo = function (a, b) {
  47990. for (var c = 0, d = 0, e = Math.min(a.t, this.t); e > c;) {
  47991. d += this[c] + a[c], b[c++] = d & this.DM, d >>= this.DB;
  47992. }
  47993. if (a.t < this.t) {
  47994. for (d += a.s; c < this.t;) {
  47995. d += this[c], b[c++] = d & this.DM, d >>= this.DB;
  47996. }
  47997. d += this.s;
  47998. } else {
  47999. for (d += this.s; c < a.t;) {
  48000. d += a[c], b[c++] = d & this.DM, d >>= this.DB;
  48001. }
  48002. d += a.s;
  48003. }
  48004. b.s = 0 > d ? -1 : 0, d > 0 ? b[c++] = d : -1 > d && (b[c++] = this.DV + d), b.t = c, b.clamp();
  48005. }, a.prototype.dMultiply = function (a) {
  48006. this[this.t] = this.am(0, a - 1, this, 0, 0, this.t), ++this.t, this.clamp();
  48007. }, a.prototype.dAddOffset = function (a, b) {
  48008. if (0 != a) {
  48009. for (; this.t <= b;) {
  48010. this[this.t++] = 0;
  48011. }
  48012. for (this[b] += a; this[b] >= this.DV;) {
  48013. this[b] -= this.DV, ++b >= this.t && (this[this.t++] = 0), ++this[b];
  48014. }
  48015. }
  48016. }, a.prototype.multiplyLowerTo = function (a, b, c) {
  48017. var e,
  48018. d = Math.min(this.t + a.t, b);
  48019. for (c.s = 0, c.t = d; d > 0;) {
  48020. c[--d] = 0;
  48021. }
  48022. for (e = c.t - this.t; e > d; ++d) {
  48023. c[d + this.t] = this.am(0, a[d], c, d, 0, this.t);
  48024. }
  48025. for (e = Math.min(a.t, b); e > d; ++d) {
  48026. this.am(0, a[d], c, d, 0, b - d);
  48027. }
  48028. c.clamp();
  48029. }, a.prototype.multiplyUpperTo = function (a, b, c) {
  48030. --b;
  48031. var d = c.t = this.t + a.t - b;
  48032. for (c.s = 0; --d >= 0;) {
  48033. c[d] = 0;
  48034. }
  48035. for (d = Math.max(b - this.t, 0); d < a.t; ++d) {
  48036. c[this.t + d - b] = this.am(b - d, a[d], c, 0, 0, this.t + d - b);
  48037. }
  48038. c.clamp(), c.drShiftTo(1, c);
  48039. }, a.prototype.modInt = function (a) {
  48040. var b, c, d;
  48041. if (0 >= a) return 0;
  48042. if (b = this.DV % a, c = this.s < 0 ? a - 1 : 0, this.t > 0) if (0 == b) c = this[0] % a;else for (d = this.t - 1; d >= 0; --d) {
  48043. c = (b * c + this[d]) % a;
  48044. }
  48045. return c;
  48046. }, a.prototype.millerRabin = function (b) {
  48047. var e,
  48048. f,
  48049. g,
  48050. h,
  48051. i,
  48052. c = this.subtract(a.ONE),
  48053. d = c.getLowestSetBit();
  48054. if (0 >= d) return !1;
  48055. for (e = c.shiftRight(d), b = b + 1 >> 1, b > F.length && (b = F.length), f = M(), g = 0; b > g; ++g) {
  48056. if (f.fromInt(F[Math.floor(Math.random() * F.length)]), h = f.modPow(e, this), 0 != h.compareTo(a.ONE) && 0 != h.compareTo(c)) {
  48057. for (i = 1; i++ < d && 0 != h.compareTo(c);) {
  48058. if (h = h.modPowInt(2, this), 0 == h.compareTo(a.ONE)) return !1;
  48059. }
  48060. if (0 != h.compareTo(c)) return !1;
  48061. }
  48062. }
  48063. return !0;
  48064. }, a.prototype.square = function () {
  48065. var a = M();
  48066. return this.squareTo(a), a;
  48067. }, a.prototype.gcda = function (a, b) {
  48068. var e,
  48069. f,
  48070. g,
  48071. _h,
  48072. c = this.s < 0 ? this.negate() : this.clone(),
  48073. d = a.s < 0 ? a.negate() : a.clone();
  48074. return c.compareTo(d) < 0 && (e = c, c = d, d = e), f = c.getLowestSetBit(), g = d.getLowestSetBit(), 0 > g ? (b(c), void 0) : (g > f && (g = f), g > 0 && (c.rShiftTo(g, c), d.rShiftTo(g, d)), _h = function h() {
  48075. (f = c.getLowestSetBit()) > 0 && c.rShiftTo(f, c), (f = d.getLowestSetBit()) > 0 && d.rShiftTo(f, d), c.compareTo(d) >= 0 ? (c.subTo(d, c), c.rShiftTo(1, c)) : (d.subTo(c, d), d.rShiftTo(1, d)), c.signum() > 0 ? setTimeout(_h, 0) : (g > 0 && d.lShiftTo(g, d), setTimeout(function () {
  48076. b(d);
  48077. }, 0));
  48078. }, setTimeout(_h, 10), void 0);
  48079. }, a.prototype.fromNumberAsync = function (b, c, d, f) {
  48080. var g, _h2, i, j;
  48081. "number" == typeof c ? 2 > b ? this.fromInt(1) : (this.fromNumber(b, d), this.testBit(b - 1) || this.bitwiseTo(a.ONE.shiftLeft(b - 1), e, this), this.isEven() && this.dAddOffset(1, 0), g = this, _h2 = function h() {
  48082. g.dAddOffset(2, 0), g.bitLength() > b && g.subTo(a.ONE.shiftLeft(b - 1), g), g.isProbablePrime(c) ? setTimeout(function () {
  48083. f();
  48084. }, 0) : setTimeout(_h2, 0);
  48085. }, setTimeout(_h2, 0)) : (i = [], j = 7 & b, i.length = (b >> 3) + 1, c.nextBytes(i), j > 0 ? i[0] &= (1 << j) - 1 : i[0] = 0, this.fromString(i, 256));
  48086. }, a;
  48087. }(),
  48088. I = function () {
  48089. function a() {}
  48090. return a.prototype.convert = function (a) {
  48091. return a;
  48092. }, a.prototype.revert = function (a) {
  48093. return a;
  48094. }, a.prototype.mulTo = function (a, b, c) {
  48095. a.multiplyTo(b, c);
  48096. }, a.prototype.sqrTo = function (a, b) {
  48097. a.squareTo(b);
  48098. }, a;
  48099. }(),
  48100. J = function () {
  48101. function a(a) {
  48102. this.m = a;
  48103. }
  48104. return a.prototype.convert = function (a) {
  48105. return a.s < 0 || a.compareTo(this.m) >= 0 ? a.mod(this.m) : a;
  48106. }, a.prototype.revert = function (a) {
  48107. return a;
  48108. }, a.prototype.reduce = function (a) {
  48109. a.divRemTo(this.m, null, a);
  48110. }, a.prototype.mulTo = function (a, b, c) {
  48111. a.multiplyTo(b, c), this.reduce(c);
  48112. }, a.prototype.sqrTo = function (a, b) {
  48113. a.squareTo(b), this.reduce(b);
  48114. }, a;
  48115. }(),
  48116. K = function () {
  48117. function a(a) {
  48118. this.m = a, this.mp = a.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << a.DB - 15) - 1, this.mt2 = 2 * a.t;
  48119. }
  48120. return a.prototype.convert = function (a) {
  48121. var b = M();
  48122. return a.abs().dlShiftTo(this.m.t, b), b.divRemTo(this.m, null, b), a.s < 0 && b.compareTo(H.ZERO) > 0 && this.m.subTo(b, b), b;
  48123. }, a.prototype.revert = function (a) {
  48124. var b = M();
  48125. return a.copyTo(b), this.reduce(b), b;
  48126. }, a.prototype.reduce = function (a) {
  48127. for (var b, c, d; a.t <= this.mt2;) {
  48128. a[a.t++] = 0;
  48129. }
  48130. for (b = 0; b < this.m.t; ++b) {
  48131. for (c = 32767 & a[b], d = c * this.mpl + ((c * this.mph + (a[b] >> 15) * this.mpl & this.um) << 15) & a.DM, c = b + this.m.t, a[c] += this.m.am(0, d, a, b, 0, this.m.t); a[c] >= a.DV;) {
  48132. a[c] -= a.DV, a[++c]++;
  48133. }
  48134. }
  48135. a.clamp(), a.drShiftTo(this.m.t, a), a.compareTo(this.m) >= 0 && a.subTo(this.m, a);
  48136. }, a.prototype.mulTo = function (a, b, c) {
  48137. a.multiplyTo(b, c), this.reduce(c);
  48138. }, a.prototype.sqrTo = function (a, b) {
  48139. a.squareTo(b), this.reduce(b);
  48140. }, a;
  48141. }(),
  48142. L = function () {
  48143. function a(a) {
  48144. this.m = a, this.r2 = M(), this.q3 = M(), H.ONE.dlShiftTo(2 * a.t, this.r2), this.mu = this.r2.divide(a);
  48145. }
  48146. return a.prototype.convert = function (a) {
  48147. if (a.s < 0 || a.t > 2 * this.m.t) return a.mod(this.m);
  48148. if (a.compareTo(this.m) < 0) return a;
  48149. var b = M();
  48150. return a.copyTo(b), this.reduce(b), b;
  48151. }, a.prototype.revert = function (a) {
  48152. return a;
  48153. }, a.prototype.reduce = function (a) {
  48154. for (a.drShiftTo(this.m.t - 1, this.r2), a.t > this.m.t + 1 && (a.t = this.m.t + 1, a.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); a.compareTo(this.r2) < 0;) {
  48155. a.dAddOffset(1, this.m.t + 1);
  48156. }
  48157. for (a.subTo(this.r2, a); a.compareTo(this.m) >= 0;) {
  48158. a.subTo(this.m, a);
  48159. }
  48160. }, a.prototype.mulTo = function (a, b, c) {
  48161. a.multiplyTo(b, c), this.reduce(c);
  48162. }, a.prototype.sqrTo = function (a, b) {
  48163. a.squareTo(b), this.reduce(b);
  48164. }, a;
  48165. }();
  48166. for (H.prototype.am = Q, C = 28, H.prototype.DB = C, H.prototype.DM = (1 << C) - 1, H.prototype.DV = 1 << C, R = 52, H.prototype.FV = Math.pow(2, R), H.prototype.F1 = R - C, H.prototype.F2 = 2 * C - R, S = [], T = "0".charCodeAt(0), U = 0; 9 >= U; ++U) {
  48167. S[T++] = U;
  48168. }
  48169. for (T = "a".charCodeAt(0), U = 10; 36 > U; ++U) {
  48170. S[T++] = U;
  48171. }
  48172. for (T = "A".charCodeAt(0), U = 10; 36 > U; ++U) {
  48173. S[T++] = U;
  48174. }
  48175. if (H.ZERO = W(0), H.ONE = W(1), Y = function () {
  48176. function a() {
  48177. this.i = 0, this.j = 0, this.S = [];
  48178. }
  48179. return a.prototype.init = function (a) {
  48180. var b, c, d;
  48181. for (b = 0; 256 > b; ++b) {
  48182. this.S[b] = b;
  48183. }
  48184. for (c = 0, b = 0; 256 > b; ++b) {
  48185. c = 255 & c + this.S[b] + a[b % a.length], d = this.S[b], this.S[b] = this.S[c], this.S[c] = d;
  48186. }
  48187. this.i = 0, this.j = 0;
  48188. }, a.prototype.next = function () {
  48189. var a;
  48190. return this.i = 255 & this.i + 1, this.j = 255 & this.j + this.S[this.i], a = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = a, this.S[255 & a + this.S[this.i]];
  48191. }, a;
  48192. }(), $ = 256, ab = null, null == ab && (ab = [], bb = 0, cb = void 0, CryptoJS && CryptoJS.getRandomValues)) for (db = new Uint32Array(256), CryptoJS.getRandomValues(db), cb = 0; cb < db.length; ++cb) {
  48193. ab[bb++] = 255 & db[cb];
  48194. }
  48195. gb = function () {
  48196. function a() {}
  48197. return a.prototype.nextBytes = function (a) {
  48198. for (var b = 0; b < a.length; ++b) {
  48199. a[b] = fb();
  48200. }
  48201. }, a;
  48202. }(), jb = function () {
  48203. function a() {
  48204. this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
  48205. }
  48206. return a.prototype.doPublic = function (a) {
  48207. return a.modPowInt(this.e, this.n);
  48208. }, a.prototype.doPrivate = function (a) {
  48209. var b, c;
  48210. if (null == this.p || null == this.q) return a.modPow(this.d, this.n);
  48211. for (b = a.mod(this.p).modPow(this.dmp1, this.p), c = a.mod(this.q).modPow(this.dmq1, this.q); b.compareTo(c) < 0;) {
  48212. b = b.add(this.p);
  48213. }
  48214. return b.subtract(c).multiply(this.coeff).mod(this.p).multiply(this.q).add(c);
  48215. }, a.prototype.setPublic = function (a, b) {
  48216. null != a && null != b && a.length > 0 && b.length > 0 ? (this.n = N(a, 16), this.e = parseInt(b, 16)) : console.error("Invalid RSA public key");
  48217. }, a.prototype.encrypt = function (a) {
  48218. var c,
  48219. d,
  48220. b = ib(a, this.n.bitLength() + 7 >> 3);
  48221. return null == b ? null : (c = this.doPublic(b), null == c ? null : (d = c.toString(16), 0 == (1 & d.length) ? d : "0" + d));
  48222. }, a.prototype.setPrivate = function (a, b, c) {
  48223. null != a && null != b && a.length > 0 && b.length > 0 ? (this.n = N(a, 16), this.e = parseInt(b, 16), this.d = N(c, 16)) : console.error("Invalid RSA private key");
  48224. }, a.prototype.setPrivateEx = function (a, b, c, d, e, f, g, h) {
  48225. null != a && null != b && a.length > 0 && b.length > 0 ? (this.n = N(a, 16), this.e = parseInt(b, 16), this.d = N(c, 16), this.p = N(d, 16), this.q = N(e, 16), this.dmp1 = N(f, 16), this.dmq1 = N(g, 16), this.coeff = N(h, 16)) : console.error("Invalid RSA private key");
  48226. }, a.prototype.generate = function (a, b) {
  48227. var e,
  48228. f,
  48229. g,
  48230. h,
  48231. i,
  48232. c = new gb(),
  48233. d = a >> 1;
  48234. for (this.e = parseInt(b, 16), e = new H(b, 16);;) {
  48235. for (; this.p = new H(a - d, 1, c), 0 != this.p.subtract(H.ONE).gcd(e).compareTo(H.ONE) || !this.p.isProbablePrime(10);) {
  48236. ;
  48237. }
  48238. for (; this.q = new H(d, 1, c), 0 != this.q.subtract(H.ONE).gcd(e).compareTo(H.ONE) || !this.q.isProbablePrime(10);) {
  48239. ;
  48240. }
  48241. if (this.p.compareTo(this.q) <= 0 && (f = this.p, this.p = this.q, this.q = f), g = this.p.subtract(H.ONE), h = this.q.subtract(H.ONE), i = g.multiply(h), 0 == i.gcd(e).compareTo(H.ONE)) {
  48242. this.n = this.p.multiply(this.q), this.d = e.modInverse(i), this.dmp1 = this.d.mod(g), this.dmq1 = this.d.mod(h), this.coeff = this.q.modInverse(this.p);
  48243. break;
  48244. }
  48245. }
  48246. }, a.prototype.decrypt = function (a) {
  48247. var b = N(a, 16),
  48248. c = this.doPrivate(b);
  48249. return null == c ? null : kb(c, this.n.bitLength() + 7 >> 3);
  48250. }, a.prototype.generateAsync = function (a, b, c) {
  48251. var f,
  48252. g,
  48253. _h3,
  48254. d = new gb(),
  48255. e = a >> 1;
  48256. this.e = parseInt(b, 16), f = new H(b, 16), g = this, _h3 = function h() {
  48257. var b = function b() {
  48258. var a, b, d, e;
  48259. g.p.compareTo(g.q) <= 0 && (a = g.p, g.p = g.q, g.q = a), b = g.p.subtract(H.ONE), d = g.q.subtract(H.ONE), e = b.multiply(d), 0 == e.gcd(f).compareTo(H.ONE) ? (g.n = g.p.multiply(g.q), g.d = f.modInverse(e), g.dmp1 = g.d.mod(b), g.dmq1 = g.d.mod(d), g.coeff = g.q.modInverse(g.p), setTimeout(function () {
  48260. c();
  48261. }, 0)) : setTimeout(_h3, 0);
  48262. },
  48263. i = function i() {
  48264. g.q = M(), g.q.fromNumberAsync(e, 1, d, function () {
  48265. g.q.subtract(H.ONE).gcda(f, function (a) {
  48266. 0 == a.compareTo(H.ONE) && g.q.isProbablePrime(10) ? setTimeout(b, 0) : setTimeout(i, 0);
  48267. });
  48268. });
  48269. },
  48270. j = function j() {
  48271. g.p = M(), g.p.fromNumberAsync(a - e, 1, d, function () {
  48272. g.p.subtract(H.ONE).gcda(f, function (a) {
  48273. 0 == a.compareTo(H.ONE) && g.p.isProbablePrime(10) ? setTimeout(i, 0) : setTimeout(j, 0);
  48274. });
  48275. });
  48276. };
  48277. setTimeout(j, 0);
  48278. }, setTimeout(_h3, 0);
  48279. }, a.prototype.sign = function (a, b, c) {
  48280. var g,
  48281. h,
  48282. d = mb(c),
  48283. e = d + b(a).toString(),
  48284. f = hb(e, this.n.bitLength() / 4);
  48285. return null == f ? null : (g = this.doPrivate(f), null == g ? null : (h = g.toString(16), 0 == (1 & h.length) ? h : "0" + h));
  48286. }, a.prototype.verify = function (a, b, c) {
  48287. var f,
  48288. g,
  48289. d = N(b, 16),
  48290. e = this.doPublic(d);
  48291. return null == e ? null : (f = e.toString(16).replace(/^1f+00/, ""), g = nb(f), g == c(a).toString());
  48292. }, a;
  48293. }(), lb = {
  48294. md2: "3020300c06082a864886f70d020205000410",
  48295. md5: "3020300c06082a864886f70d020505000410",
  48296. sha1: "3021300906052b0e03021a05000414",
  48297. sha224: "302d300d06096086480165030402040500041c",
  48298. sha256: "3031300d060960864801650304020105000420",
  48299. sha384: "3041300d060960864801650304020205000430",
  48300. sha512: "3051300d060960864801650304020305000440",
  48301. ripemd160: "3021300906052b2403020105000414"
  48302. }, ob = {}, ob.lang = {
  48303. extend: function extend(a, b, c) {
  48304. var d, e, f, g;
  48305. if (!b || !a) throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
  48306. if (d = function d() {}, d.prototype = b.prototype, a.prototype = new d(), a.prototype.constructor = a, a.superclass = b.prototype, b.prototype.constructor == Object.prototype.constructor && (b.prototype.constructor = b), c) {
  48307. for (e in c) {
  48308. a.prototype[e] = c[e];
  48309. }
  48310. f = function f() {}, g = ["toString", "valueOf"];
  48311. try {
  48312. /MSIE/.test(navigator.userAgent) && (f = function f(a, b) {
  48313. for (e = 0; e < g.length; e += 1) {
  48314. var c = g[e],
  48315. d = b[c];
  48316. "function" == typeof d && d != Object.prototype[c] && (a[c] = d);
  48317. }
  48318. });
  48319. } catch (h) {}
  48320. f(a.prototype, c);
  48321. }
  48322. }
  48323. }, pb = {}, "undefined" != typeof pb.asn1 && pb.asn1 || (pb.asn1 = {}), pb.asn1.ASN1Util = new function () {
  48324. this.integerToByteHex = function (a) {
  48325. var b = a.toString(16);
  48326. return 1 == b.length % 2 && (b = "0" + b), b;
  48327. }, this.bigIntToMinTwosComplementsHex = function (a) {
  48328. var c,
  48329. d,
  48330. e,
  48331. f,
  48332. g,
  48333. h,
  48334. b = a.toString(16);
  48335. if ("-" != b.substr(0, 1)) 1 == b.length % 2 ? b = "0" + b : b.match(/^[0-7]/) || (b = "00" + b);else {
  48336. for (c = b.substr(1), d = c.length, 1 == d % 2 ? d += 1 : b.match(/^[0-7]/) || (d += 2), e = "", f = 0; d > f; f++) {
  48337. e += "f";
  48338. }
  48339. g = new H(e, 16), h = g.xor(a).add(H.ONE), b = h.toString(16).replace(/^-/, "");
  48340. }
  48341. return b;
  48342. }, this.getPEMStringFromHex = function (a, b) {
  48343. return hextopem(a, b);
  48344. }, this.newObject = function (a) {
  48345. var w,
  48346. x,
  48347. y,
  48348. z,
  48349. A,
  48350. B,
  48351. C,
  48352. D,
  48353. b = pb,
  48354. c = b.asn1,
  48355. d = c.DERBoolean,
  48356. e = c.DERInteger,
  48357. f = c.DERBitString,
  48358. g = c.DEROctetString,
  48359. h = c.DERNull,
  48360. i = c.DERObjectIdentifier,
  48361. j = c.DEREnumerated,
  48362. k = c.DERUTF8String,
  48363. l = c.DERNumericString,
  48364. m = c.DERPrintableString,
  48365. n = c.DERTeletexString,
  48366. o = c.DERIA5String,
  48367. p = c.DERUTCTime,
  48368. q = c.DERGeneralizedTime,
  48369. r = c.DERSequence,
  48370. s = c.DERSet,
  48371. t = c.DERTaggedObject,
  48372. u = c.ASN1Util.newObject,
  48373. v = Object.keys(a);
  48374. if (1 != v.length) throw "key of param shall be only one.";
  48375. if (w = v[0], -1 == ":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + w + ":")) throw "undefined key: " + w;
  48376. if ("bool" == w) return new d(a[w]);
  48377. if ("int" == w) return new e(a[w]);
  48378. if ("bitstr" == w) return new f(a[w]);
  48379. if ("octstr" == w) return new g(a[w]);
  48380. if ("null" == w) return new h(a[w]);
  48381. if ("oid" == w) return new i(a[w]);
  48382. if ("enum" == w) return new j(a[w]);
  48383. if ("utf8str" == w) return new k(a[w]);
  48384. if ("numstr" == w) return new l(a[w]);
  48385. if ("prnstr" == w) return new m(a[w]);
  48386. if ("telstr" == w) return new n(a[w]);
  48387. if ("ia5str" == w) return new o(a[w]);
  48388. if ("utctime" == w) return new p(a[w]);
  48389. if ("gentime" == w) return new q(a[w]);
  48390. if ("seq" == w) {
  48391. for (x = a[w], y = [], z = 0; z < x.length; z++) {
  48392. A = u(x[z]), y.push(A);
  48393. }
  48394. return new r({
  48395. array: y
  48396. });
  48397. }
  48398. if ("set" == w) {
  48399. for (x = a[w], y = [], z = 0; z < x.length; z++) {
  48400. A = u(x[z]), y.push(A);
  48401. }
  48402. return new s({
  48403. array: y
  48404. });
  48405. }
  48406. if ("tag" == w) {
  48407. if (B = a[w], "[object Array]" === Object.prototype.toString.call(B) && 3 == B.length) return C = u(B[2]), new t({
  48408. tag: B[0],
  48409. explicit: B[1],
  48410. obj: C
  48411. });
  48412. if (D = {}, void 0 !== B.explicit && (D.explicit = B.explicit), void 0 !== B.tag && (D.tag = B.tag), void 0 === B.obj) throw "obj shall be specified for 'tag'.";
  48413. return D.obj = u(B.obj), new t(D);
  48414. }
  48415. }, this.jsonToASN1HEX = function (a) {
  48416. var b = this.newObject(a);
  48417. return b.getEncodedHex();
  48418. };
  48419. }(), pb.asn1.ASN1Util.oidHexToInt = function (a) {
  48420. var f,
  48421. g,
  48422. h,
  48423. i,
  48424. j,
  48425. b = "",
  48426. c = parseInt(a.substr(0, 2), 16),
  48427. d = Math.floor(c / 40),
  48428. e = c % 40;
  48429. for (b = d + "." + e, f = "", g = 2; g < a.length; g += 2) {
  48430. h = parseInt(a.substr(g, 2), 16), i = ("00000000" + h.toString(2)).slice(-8), f += i.substr(1, 7), "0" == i.substr(0, 1) && (j = new H(f, 2), b = b + "." + j.toString(10), f = "");
  48431. }
  48432. return b;
  48433. }, pb.asn1.ASN1Util.oidIntToHex = function (a) {
  48434. var d,
  48435. e,
  48436. f,
  48437. g,
  48438. b = function b(a) {
  48439. var b = a.toString(16);
  48440. return 1 == b.length && (b = "0" + b), b;
  48441. },
  48442. c = function c(a) {
  48443. var g,
  48444. h,
  48445. i,
  48446. c = "",
  48447. d = new H(a, 10),
  48448. e = d.toString(2),
  48449. f = 7 - e.length % 7;
  48450. for (7 == f && (f = 0), g = "", h = 0; f > h; h++) {
  48451. g += "0";
  48452. }
  48453. for (e = g + e, h = 0; h < e.length - 1; h += 7) {
  48454. i = e.substr(h, 7), h != e.length - 7 && (i = "1" + i), c += b(parseInt(i, 2));
  48455. }
  48456. return c;
  48457. };
  48458. if (!a.match(/^[0-9.]+$/)) throw "malformed oid string: " + a;
  48459. for (d = "", e = a.split("."), f = 40 * parseInt(e[0]) + parseInt(e[1]), d += b(f), e.splice(0, 2), g = 0; g < e.length; g++) {
  48460. d += c(e[g]);
  48461. }
  48462. return d;
  48463. }, pb.asn1.ASN1Object = function () {
  48464. var a = "";
  48465. this.getLengthHexFromValue = function () {
  48466. var b, c, d, e;
  48467. if ("undefined" == typeof this.hV || null == this.hV) throw "this.hV is null or undefined.";
  48468. if (1 == this.hV.length % 2) throw "value hex must be even length: n=" + a.length + ",v=" + this.hV;
  48469. if (b = this.hV.length / 2, c = b.toString(16), 1 == c.length % 2 && (c = "0" + c), 128 > b) return c;
  48470. if (d = c.length / 2, d > 15) throw "ASN.1 length too long to represent by 8x: n = " + b.toString(16);
  48471. return e = 128 + d, e.toString(16) + c;
  48472. }, this.getEncodedHex = function () {
  48473. return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
  48474. }, this.getValueHex = function () {
  48475. return this.getEncodedHex(), this.hV;
  48476. }, this.getFreshValueHex = function () {
  48477. return "";
  48478. };
  48479. }, pb.asn1.DERAbstractString = function (a) {
  48480. pb.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function () {
  48481. return this.s;
  48482. }, this.setString = function (a) {
  48483. this.hTLV = null, this.isModified = !0, this.s = a, this.hV = stohex(this.s);
  48484. }, this.setStringHex = function (a) {
  48485. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = a;
  48486. }, this.getFreshValueHex = function () {
  48487. return this.hV;
  48488. }, "undefined" != typeof a && ("string" == typeof a ? this.setString(a) : "undefined" != typeof a["str"] ? this.setString(a["str"]) : "undefined" != typeof a["hex"] && this.setStringHex(a["hex"]));
  48489. }, ob.lang.extend(pb.asn1.DERAbstractString, pb.asn1.ASN1Object), pb.asn1.DERAbstractTime = function () {
  48490. pb.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function (a) {
  48491. utc = a.getTime() + 6e4 * a.getTimezoneOffset();
  48492. var b = new Date(utc);
  48493. return b;
  48494. }, this.formatDate = function (a, b, c) {
  48495. var g,
  48496. h,
  48497. i,
  48498. j,
  48499. k,
  48500. l,
  48501. m,
  48502. n,
  48503. d = this.zeroPadding,
  48504. e = this.localDateToUTC(a),
  48505. f = String(e.getFullYear());
  48506. return "utc" == b && (f = f.substr(2, 2)), g = d(String(e.getMonth() + 1), 2), h = d(String(e.getDate()), 2), i = d(String(e.getHours()), 2), j = d(String(e.getMinutes()), 2), k = d(String(e.getSeconds()), 2), l = f + g + h + i + j + k, c === !0 && (m = e.getMilliseconds(), 0 != m && (n = d(String(m), 3), n = n.replace(/[0]+$/, ""), l = l + "." + n)), l + "Z";
  48507. }, this.zeroPadding = function (a, b) {
  48508. return a.length >= b ? a : new Array(b - a.length + 1).join("0") + a;
  48509. }, this.getString = function () {
  48510. return this.s;
  48511. }, this.setString = function (a) {
  48512. this.hTLV = null, this.isModified = !0, this.s = a, this.hV = stohex(a);
  48513. }, this.setByDateValue = function (a, b, c, d, e, f) {
  48514. var g = new Date(Date.UTC(a, b - 1, c, d, e, f, 0));
  48515. this.setByDate(g);
  48516. }, this.getFreshValueHex = function () {
  48517. return this.hV;
  48518. };
  48519. }, ob.lang.extend(pb.asn1.DERAbstractTime, pb.asn1.ASN1Object), pb.asn1.DERAbstractStructured = function (a) {
  48520. pb.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function (a) {
  48521. this.hTLV = null, this.isModified = !0, this.asn1Array = a;
  48522. }, this.appendASN1Object = function (a) {
  48523. this.hTLV = null, this.isModified = !0, this.asn1Array.push(a);
  48524. }, this.asn1Array = new Array(), "undefined" != typeof a && "undefined" != typeof a["array"] && (this.asn1Array = a["array"]);
  48525. }, ob.lang.extend(pb.asn1.DERAbstractStructured, pb.asn1.ASN1Object), pb.asn1.DERBoolean = function () {
  48526. pb.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
  48527. }, ob.lang.extend(pb.asn1.DERBoolean, pb.asn1.ASN1Object), pb.asn1.DERInteger = function (a) {
  48528. pb.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function (a) {
  48529. this.hTLV = null, this.isModified = !0, this.hV = pb.asn1.ASN1Util.bigIntToMinTwosComplementsHex(a);
  48530. }, this.setByInteger = function (a) {
  48531. var b = new H(String(a), 10);
  48532. this.setByBigInteger(b);
  48533. }, this.setValueHex = function (a) {
  48534. this.hV = a;
  48535. }, this.getFreshValueHex = function () {
  48536. return this.hV;
  48537. }, "undefined" != typeof a && ("undefined" != typeof a["bigint"] ? this.setByBigInteger(a["bigint"]) : "undefined" != typeof a["int"] ? this.setByInteger(a["int"]) : "number" == typeof a ? this.setByInteger(a) : "undefined" != typeof a["hex"] && this.setValueHex(a["hex"]));
  48538. }, ob.lang.extend(pb.asn1.DERInteger, pb.asn1.ASN1Object), pb.asn1.DERBitString = function (a) {
  48539. if (void 0 !== a && "undefined" != typeof a.obj) {
  48540. var b = pb.asn1.ASN1Util.newObject(a.obj);
  48541. a.hex = "00" + b.getEncodedHex();
  48542. }
  48543. pb.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function (a) {
  48544. this.hTLV = null, this.isModified = !0, this.hV = a;
  48545. }, this.setUnusedBitsAndHexValue = function (a, b) {
  48546. if (0 > a || a > 7) throw "unused bits shall be from 0 to 7: u = " + a;
  48547. var c = "0" + a;
  48548. this.hTLV = null, this.isModified = !0, this.hV = c + b;
  48549. }, this.setByBinaryString = function (a) {
  48550. var b, c, d, e, f;
  48551. for (a = a.replace(/0+$/, ""), b = 8 - a.length % 8, 8 == b && (b = 0), c = 0; b >= c; c++) {
  48552. a += "0";
  48553. }
  48554. for (d = "", c = 0; c < a.length - 1; c += 8) {
  48555. e = a.substr(c, 8), f = parseInt(e, 2).toString(16), 1 == f.length && (f = "0" + f), d += f;
  48556. }
  48557. this.hTLV = null, this.isModified = !0, this.hV = "0" + b + d;
  48558. }, this.setByBooleanArray = function (a) {
  48559. var c,
  48560. b = "";
  48561. for (c = 0; c < a.length; c++) {
  48562. b += 1 == a[c] ? "1" : "0";
  48563. }
  48564. this.setByBinaryString(b);
  48565. }, this.newFalseArray = function (a) {
  48566. var c,
  48567. b = new Array(a);
  48568. for (c = 0; a > c; c++) {
  48569. b[c] = !1;
  48570. }
  48571. return b;
  48572. }, this.getFreshValueHex = function () {
  48573. return this.hV;
  48574. }, "undefined" != typeof a && ("string" == typeof a && a.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(a) : "undefined" != typeof a["hex"] ? this.setHexValueIncludingUnusedBits(a["hex"]) : "undefined" != typeof a["bin"] ? this.setByBinaryString(a["bin"]) : "undefined" != typeof a["array"] && this.setByBooleanArray(a["array"]));
  48575. }, ob.lang.extend(pb.asn1.DERBitString, pb.asn1.ASN1Object), pb.asn1.DEROctetString = function (a) {
  48576. if (void 0 !== a && "undefined" != typeof a.obj) {
  48577. var b = pb.asn1.ASN1Util.newObject(a.obj);
  48578. a.hex = b.getEncodedHex();
  48579. }
  48580. pb.asn1.DEROctetString.superclass.constructor.call(this, a), this.hT = "04";
  48581. }, ob.lang.extend(pb.asn1.DEROctetString, pb.asn1.DERAbstractString), pb.asn1.DERNull = function () {
  48582. pb.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
  48583. }, ob.lang.extend(pb.asn1.DERNull, pb.asn1.ASN1Object), pb.asn1.DERObjectIdentifier = function (a) {
  48584. var b = function b(a) {
  48585. var b = a.toString(16);
  48586. return 1 == b.length && (b = "0" + b), b;
  48587. },
  48588. c = function c(a) {
  48589. var g,
  48590. h,
  48591. i,
  48592. c = "",
  48593. d = new H(a, 10),
  48594. e = d.toString(2),
  48595. f = 7 - e.length % 7;
  48596. for (7 == f && (f = 0), g = "", h = 0; f > h; h++) {
  48597. g += "0";
  48598. }
  48599. for (e = g + e, h = 0; h < e.length - 1; h += 7) {
  48600. i = e.substr(h, 7), h != e.length - 7 && (i = "1" + i), c += b(parseInt(i, 2));
  48601. }
  48602. return c;
  48603. };
  48604. pb.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function (a) {
  48605. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = a;
  48606. }, this.setValueOidString = function (a) {
  48607. var d, e, f, g;
  48608. if (!a.match(/^[0-9.]+$/)) throw "malformed oid string: " + a;
  48609. for (d = "", e = a.split("."), f = 40 * parseInt(e[0]) + parseInt(e[1]), d += b(f), e.splice(0, 2), g = 0; g < e.length; g++) {
  48610. d += c(e[g]);
  48611. }
  48612. this.hTLV = null, this.isModified = !0, this.s = null, this.hV = d;
  48613. }, this.setValueName = function (a) {
  48614. var b = pb.asn1.x509.OID.name2oid(a);
  48615. if ("" === b) throw "DERObjectIdentifier oidName undefined: " + a;
  48616. this.setValueOidString(b);
  48617. }, this.getFreshValueHex = function () {
  48618. return this.hV;
  48619. }, void 0 !== a && ("string" == typeof a ? a.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(a) : this.setValueName(a) : void 0 !== a.oid ? this.setValueOidString(a.oid) : void 0 !== a.hex ? this.setValueHex(a.hex) : void 0 !== a.name && this.setValueName(a.name));
  48620. }, ob.lang.extend(pb.asn1.DERObjectIdentifier, pb.asn1.ASN1Object), pb.asn1.DEREnumerated = function (a) {
  48621. pb.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function (a) {
  48622. this.hTLV = null, this.isModified = !0, this.hV = pb.asn1.ASN1Util.bigIntToMinTwosComplementsHex(a);
  48623. }, this.setByInteger = function (a) {
  48624. var b = new H(String(a), 10);
  48625. this.setByBigInteger(b);
  48626. }, this.setValueHex = function (a) {
  48627. this.hV = a;
  48628. }, this.getFreshValueHex = function () {
  48629. return this.hV;
  48630. }, "undefined" != typeof a && ("undefined" != typeof a["int"] ? this.setByInteger(a["int"]) : "number" == typeof a ? this.setByInteger(a) : "undefined" != typeof a["hex"] && this.setValueHex(a["hex"]));
  48631. }, ob.lang.extend(pb.asn1.DEREnumerated, pb.asn1.ASN1Object), pb.asn1.DERUTF8String = function (a) {
  48632. pb.asn1.DERUTF8String.superclass.constructor.call(this, a), this.hT = "0c";
  48633. }, ob.lang.extend(pb.asn1.DERUTF8String, pb.asn1.DERAbstractString), pb.asn1.DERNumericString = function (a) {
  48634. pb.asn1.DERNumericString.superclass.constructor.call(this, a), this.hT = "12";
  48635. }, ob.lang.extend(pb.asn1.DERNumericString, pb.asn1.DERAbstractString), pb.asn1.DERPrintableString = function (a) {
  48636. pb.asn1.DERPrintableString.superclass.constructor.call(this, a), this.hT = "13";
  48637. }, ob.lang.extend(pb.asn1.DERPrintableString, pb.asn1.DERAbstractString), pb.asn1.DERTeletexString = function (a) {
  48638. pb.asn1.DERTeletexString.superclass.constructor.call(this, a), this.hT = "14";
  48639. }, ob.lang.extend(pb.asn1.DERTeletexString, pb.asn1.DERAbstractString), pb.asn1.DERIA5String = function (a) {
  48640. pb.asn1.DERIA5String.superclass.constructor.call(this, a), this.hT = "16";
  48641. }, ob.lang.extend(pb.asn1.DERIA5String, pb.asn1.DERAbstractString), pb.asn1.DERUTCTime = function (a) {
  48642. pb.asn1.DERUTCTime.superclass.constructor.call(this, a), this.hT = "17", this.setByDate = function (a) {
  48643. this.hTLV = null, this.isModified = !0, this.date = a, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
  48644. }, this.getFreshValueHex = function () {
  48645. return "undefined" == typeof this.date && "undefined" == typeof this.s && (this.date = new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
  48646. }, void 0 !== a && (void 0 !== a.str ? this.setString(a.str) : "string" == typeof a && a.match(/^[0-9]{12}Z$/) ? this.setString(a) : void 0 !== a.hex ? this.setStringHex(a.hex) : void 0 !== a.date && this.setByDate(a.date));
  48647. }, ob.lang.extend(pb.asn1.DERUTCTime, pb.asn1.DERAbstractTime), pb.asn1.DERGeneralizedTime = function (a) {
  48648. pb.asn1.DERGeneralizedTime.superclass.constructor.call(this, a), this.hT = "18", this.withMillis = !1, this.setByDate = function (a) {
  48649. this.hTLV = null, this.isModified = !0, this.date = a, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
  48650. }, this.getFreshValueHex = function () {
  48651. return void 0 === this.date && void 0 === this.s && (this.date = new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
  48652. }, void 0 !== a && (void 0 !== a.str ? this.setString(a.str) : "string" == typeof a && a.match(/^[0-9]{14}Z$/) ? this.setString(a) : void 0 !== a.hex ? this.setStringHex(a.hex) : void 0 !== a.date && this.setByDate(a.date), a.millis === !0 && (this.withMillis = !0));
  48653. }, ob.lang.extend(pb.asn1.DERGeneralizedTime, pb.asn1.DERAbstractTime), pb.asn1.DERSequence = function (a) {
  48654. pb.asn1.DERSequence.superclass.constructor.call(this, a), this.hT = "30", this.getFreshValueHex = function () {
  48655. var b,
  48656. c,
  48657. a = "";
  48658. for (b = 0; b < this.asn1Array.length; b++) {
  48659. c = this.asn1Array[b], a += c.getEncodedHex();
  48660. }
  48661. return this.hV = a, this.hV;
  48662. };
  48663. }, ob.lang.extend(pb.asn1.DERSequence, pb.asn1.DERAbstractStructured), pb.asn1.DERSet = function (a) {
  48664. pb.asn1.DERSet.superclass.constructor.call(this, a), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function () {
  48665. var b,
  48666. c,
  48667. a = new Array();
  48668. for (b = 0; b < this.asn1Array.length; b++) {
  48669. c = this.asn1Array[b], a.push(c.getEncodedHex());
  48670. }
  48671. return 1 == this.sortFlag && a.sort(), this.hV = a.join(""), this.hV;
  48672. }, "undefined" != typeof a && "undefined" != typeof a.sortflag && 0 == a.sortflag && (this.sortFlag = !1);
  48673. }, ob.lang.extend(pb.asn1.DERSet, pb.asn1.DERAbstractStructured), pb.asn1.DERTaggedObject = function (a) {
  48674. pb.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function (a, b, c) {
  48675. this.hT = b, this.isExplicit = a, this.asn1Object = c, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = c.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, b), this.isModified = !1);
  48676. }, this.getFreshValueHex = function () {
  48677. return this.hV;
  48678. }, "undefined" != typeof a && ("undefined" != typeof a["tag"] && (this.hT = a["tag"]), "undefined" != typeof a["explicit"] && (this.isExplicit = a["explicit"]), "undefined" != typeof a["obj"] && (this.asn1Object = a["obj"], this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
  48679. }, ob.lang.extend(pb.asn1.DERTaggedObject, pb.asn1.ASN1Object), qb = function (a) {
  48680. function b(c) {
  48681. var d = a.call(this) || this;
  48682. return c && ("string" == typeof c ? d.parseKey(c) : (b.hasPrivateKeyProperty(c) || b.hasPublicKeyProperty(c)) && d.parsePropertiesFrom(c)), d;
  48683. }
  48684. return o(b, a), b.prototype.parseKey = function (a) {
  48685. var b, c, d, e, f, g, h, i, j, k, l, m, n;
  48686. try {
  48687. if (b = 0, c = 0, d = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, e = d.test(a) ? q.decode(a) : s.unarmor(a), f = A.decode(e), 3 === f.sub.length && (f = f.sub[2].sub[0]), 9 === f.sub.length) b = f.sub[1].getHexStringValue(), this.n = N(b, 16), c = f.sub[2].getHexStringValue(), this.e = parseInt(c, 16), g = f.sub[3].getHexStringValue(), this.d = N(g, 16), h = f.sub[4].getHexStringValue(), this.p = N(h, 16), i = f.sub[5].getHexStringValue(), this.q = N(i, 16), j = f.sub[6].getHexStringValue(), this.dmp1 = N(j, 16), k = f.sub[7].getHexStringValue(), this.dmq1 = N(k, 16), l = f.sub[8].getHexStringValue(), this.coeff = N(l, 16);else {
  48688. if (2 !== f.sub.length) return !1;
  48689. m = f.sub[1], n = m.sub[0], b = n.sub[0].getHexStringValue(), this.n = N(b, 16), c = n.sub[1].getHexStringValue(), this.e = parseInt(c, 16);
  48690. }
  48691. return !0;
  48692. } catch (o) {
  48693. return !1;
  48694. }
  48695. }, b.prototype.getPrivateBaseKey = function () {
  48696. var a = {
  48697. array: [new pb.asn1.DERInteger({
  48698. "int": 0
  48699. }), new pb.asn1.DERInteger({
  48700. bigint: this.n
  48701. }), new pb.asn1.DERInteger({
  48702. "int": this.e
  48703. }), new pb.asn1.DERInteger({
  48704. bigint: this.d
  48705. }), new pb.asn1.DERInteger({
  48706. bigint: this.p
  48707. }), new pb.asn1.DERInteger({
  48708. bigint: this.q
  48709. }), new pb.asn1.DERInteger({
  48710. bigint: this.dmp1
  48711. }), new pb.asn1.DERInteger({
  48712. bigint: this.dmq1
  48713. }), new pb.asn1.DERInteger({
  48714. bigint: this.coeff
  48715. })]
  48716. },
  48717. b = new pb.asn1.DERSequence(a);
  48718. return b.getEncodedHex();
  48719. }, b.prototype.getPrivateBaseKeyB64 = function () {
  48720. return l(this.getPrivateBaseKey());
  48721. }, b.prototype.getPublicBaseKey = function () {
  48722. var a = new pb.asn1.DERSequence({
  48723. array: [new pb.asn1.DERObjectIdentifier({
  48724. oid: "1.2.840.113549.1.1.1"
  48725. }), new pb.asn1.DERNull()]
  48726. }),
  48727. b = new pb.asn1.DERSequence({
  48728. array: [new pb.asn1.DERInteger({
  48729. bigint: this.n
  48730. }), new pb.asn1.DERInteger({
  48731. "int": this.e
  48732. })]
  48733. }),
  48734. c = new pb.asn1.DERBitString({
  48735. hex: "00" + b.getEncodedHex()
  48736. }),
  48737. d = new pb.asn1.DERSequence({
  48738. array: [a, c]
  48739. });
  48740. return d.getEncodedHex();
  48741. }, b.prototype.getPublicBaseKeyB64 = function () {
  48742. return l(this.getPublicBaseKey());
  48743. }, b.wordwrap = function (a, b) {
  48744. if (b = b || 64, !a) return a;
  48745. var c = "(.{1," + b + "})( +|$\n?)|(.{1," + b + "})";
  48746. return a.match(RegExp(c, "g")).join("\n");
  48747. }, b.prototype.getPrivateKey = function () {
  48748. var a = "-----BEGIN RSA PRIVATE KEY-----\n";
  48749. return a += b.wordwrap(this.getPrivateBaseKeyB64()) + "\n", a += "-----END RSA PRIVATE KEY-----";
  48750. }, b.prototype.getPublicKey = function () {
  48751. var a = "-----BEGIN PUBLIC KEY-----\n";
  48752. return a += b.wordwrap(this.getPublicBaseKeyB64()) + "\n", a += "-----END PUBLIC KEY-----";
  48753. }, b.hasPublicKeyProperty = function (a) {
  48754. return a = a || {}, a.hasOwnProperty("n") && a.hasOwnProperty("e");
  48755. }, b.hasPrivateKeyProperty = function (a) {
  48756. return a = a || {}, a.hasOwnProperty("n") && a.hasOwnProperty("e") && a.hasOwnProperty("d") && a.hasOwnProperty("p") && a.hasOwnProperty("q") && a.hasOwnProperty("dmp1") && a.hasOwnProperty("dmq1") && a.hasOwnProperty("coeff");
  48757. }, b.prototype.parsePropertiesFrom = function (a) {
  48758. this.n = a.n, this.e = a.e, a.hasOwnProperty("d") && (this.d = a.d, this.p = a.p, this.q = a.q, this.dmp1 = a.dmp1, this.dmq1 = a.dmq1, this.coeff = a.coeff);
  48759. }, b;
  48760. }(jb), rb = function () {
  48761. function a(a) {
  48762. a = a || {}, this.default_key_size = parseInt(a.default_key_size, 10) || 1024, this.default_public_exponent = a.default_public_exponent || "010001", this.log = a.log || !1, this.key = null;
  48763. }
  48764. return a.prototype.setKey = function (a) {
  48765. this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new qb(a);
  48766. }, a.prototype.setPrivateKey = function (a) {
  48767. this.setKey(a);
  48768. }, a.prototype.setPublicKey = function (a) {
  48769. this.setKey(a);
  48770. }, a.prototype.decrypt = function (a) {
  48771. try {
  48772. return this.getKey().decrypt(m(a));
  48773. } catch (b) {
  48774. return !1;
  48775. }
  48776. }, a.prototype.encrypt = function (a) {
  48777. try {
  48778. return l(this.getKey().encrypt(a));
  48779. } catch (b) {
  48780. return !1;
  48781. }
  48782. }, a.prototype.sign = function (a, b, c) {
  48783. try {
  48784. return l(this.getKey().sign(a, b, c));
  48785. } catch (d) {
  48786. return !1;
  48787. }
  48788. }, a.prototype.verify = function (a, b, c) {
  48789. try {
  48790. return this.getKey().verify(a, m(b), c);
  48791. } catch (d) {
  48792. return !1;
  48793. }
  48794. }, a.prototype.getKey = function (a) {
  48795. if (!this.key) {
  48796. if (this.key = new qb(), a && "[object Function]" === {}.toString.call(a)) return this.key.generateAsync(this.default_key_size, this.default_public_exponent, a), void 0;
  48797. this.key.generate(this.default_key_size, this.default_public_exponent);
  48798. }
  48799. return this.key;
  48800. }, a.prototype.getPrivateKey = function () {
  48801. return this.getKey().getPrivateKey();
  48802. }, a.prototype.getPrivateKeyB64 = function () {
  48803. return this.getKey().getPrivateBaseKeyB64();
  48804. }, a.prototype.getPublicKey = function () {
  48805. return this.getKey().getPublicKey();
  48806. }, a.prototype.getPublicKeyB64 = function () {
  48807. return this.getKey().getPublicBaseKeyB64();
  48808. }, a.version = "3.0.0-rc.1", a;
  48809. }(), a.JSEncrypt = rb, a.default = rb, Object.defineProperty(a, "__esModule", {
  48810. value: !0
  48811. });
  48812. });
  48813. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! (webpack)/buildin/global.js */ 3)))
  48814. /***/ }),
  48815. /***/ 85:
  48816. /*!*************************************************!*\
  48817. !*** ./node_modules/crypto-browserify/index.js ***!
  48818. \*************************************************/
  48819. /*! no static exports found */
  48820. /***/ (function(module, exports, __webpack_require__) {
  48821. "use strict";
  48822. exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = __webpack_require__(/*! randombytes */ 86)
  48823. exports.createHash = exports.Hash = __webpack_require__(/*! create-hash */ 94)
  48824. exports.createHmac = exports.Hmac = __webpack_require__(/*! create-hmac */ 129)
  48825. var algos = __webpack_require__(/*! browserify-sign/algos */ 132)
  48826. var algoKeys = Object.keys(algos)
  48827. var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
  48828. exports.getHashes = function () {
  48829. return hashes
  48830. }
  48831. var p = __webpack_require__(/*! pbkdf2 */ 134)
  48832. exports.pbkdf2 = p.pbkdf2
  48833. exports.pbkdf2Sync = p.pbkdf2Sync
  48834. var aes = __webpack_require__(/*! browserify-cipher */ 140)
  48835. exports.Cipher = aes.Cipher
  48836. exports.createCipher = aes.createCipher
  48837. exports.Cipheriv = aes.Cipheriv
  48838. exports.createCipheriv = aes.createCipheriv
  48839. exports.Decipher = aes.Decipher
  48840. exports.createDecipher = aes.createDecipher
  48841. exports.Decipheriv = aes.Decipheriv
  48842. exports.createDecipheriv = aes.createDecipheriv
  48843. exports.getCiphers = aes.getCiphers
  48844. exports.listCiphers = aes.listCiphers
  48845. var dh = __webpack_require__(/*! diffie-hellman */ 169)
  48846. exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
  48847. exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
  48848. exports.getDiffieHellman = dh.getDiffieHellman
  48849. exports.createDiffieHellman = dh.createDiffieHellman
  48850. exports.DiffieHellman = dh.DiffieHellman
  48851. var sign = __webpack_require__(/*! browserify-sign */ 179)
  48852. exports.createSign = sign.createSign
  48853. exports.Sign = sign.Sign
  48854. exports.createVerify = sign.createVerify
  48855. exports.Verify = sign.Verify
  48856. exports.createECDH = __webpack_require__(/*! create-ecdh */ 234)
  48857. var publicEncrypt = __webpack_require__(/*! public-encrypt */ 235)
  48858. exports.publicEncrypt = publicEncrypt.publicEncrypt
  48859. exports.privateEncrypt = publicEncrypt.privateEncrypt
  48860. exports.publicDecrypt = publicEncrypt.publicDecrypt
  48861. exports.privateDecrypt = publicEncrypt.privateDecrypt
  48862. // the least I can do is make error messages for the rest of the node.js/crypto api.
  48863. // ;[
  48864. // 'createCredentials'
  48865. // ].forEach(function (name) {
  48866. // exports[name] = function () {
  48867. // throw new Error([
  48868. // 'sorry, ' + name + ' is not implemented yet',
  48869. // 'we accept pull requests',
  48870. // 'https://github.com/crypto-browserify/crypto-browserify'
  48871. // ].join('\n'))
  48872. // }
  48873. // })
  48874. var rf = __webpack_require__(/*! randomfill */ 241)
  48875. exports.randomFill = rf.randomFill
  48876. exports.randomFillSync = rf.randomFillSync
  48877. exports.createCredentials = function () {
  48878. throw new Error([
  48879. 'sorry, createCredentials is not implemented yet',
  48880. 'we accept pull requests',
  48881. 'https://github.com/crypto-browserify/crypto-browserify'
  48882. ].join('\n'))
  48883. }
  48884. exports.constants = {
  48885. 'DH_CHECK_P_NOT_SAFE_PRIME': 2,
  48886. 'DH_CHECK_P_NOT_PRIME': 1,
  48887. 'DH_UNABLE_TO_CHECK_GENERATOR': 4,
  48888. 'DH_NOT_SUITABLE_GENERATOR': 8,
  48889. 'NPN_ENABLED': 1,
  48890. 'ALPN_ENABLED': 1,
  48891. 'RSA_PKCS1_PADDING': 1,
  48892. 'RSA_SSLV23_PADDING': 2,
  48893. 'RSA_NO_PADDING': 3,
  48894. 'RSA_PKCS1_OAEP_PADDING': 4,
  48895. 'RSA_X931_PADDING': 5,
  48896. 'RSA_PKCS1_PSS_PADDING': 6,
  48897. 'POINT_CONVERSION_COMPRESSED': 2,
  48898. 'POINT_CONVERSION_UNCOMPRESSED': 4,
  48899. 'POINT_CONVERSION_HYBRID': 6
  48900. }
  48901. /***/ }),
  48902. /***/ 86:
  48903. /*!*********************************************!*\
  48904. !*** ./node_modules/randombytes/browser.js ***!
  48905. \*********************************************/
  48906. /*! no static exports found */
  48907. /***/ (function(module, exports, __webpack_require__) {
  48908. "use strict";
  48909. /* WEBPACK VAR INJECTION */(function(global, process) {
  48910. // limit of Crypto.getRandomValues()
  48911. // https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
  48912. var MAX_BYTES = 65536
  48913. // Node supports requesting up to this number of bytes
  48914. // https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48
  48915. var MAX_UINT32 = 4294967295
  48916. function oldBrowser () {
  48917. throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11')
  48918. }
  48919. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  48920. var crypto = global.crypto || global.msCrypto
  48921. if (crypto && crypto.getRandomValues) {
  48922. module.exports = randomBytes
  48923. } else {
  48924. module.exports = oldBrowser
  48925. }
  48926. function randomBytes (size, cb) {
  48927. // phantomjs needs to throw
  48928. if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')
  48929. var bytes = Buffer.allocUnsafe(size)
  48930. if (size > 0) { // getRandomValues fails on IE if size == 0
  48931. if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues
  48932. // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues
  48933. for (var generated = 0; generated < size; generated += MAX_BYTES) {
  48934. // buffer.slice automatically checks if the end is past the end of
  48935. // the buffer so we don't have to here
  48936. crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))
  48937. }
  48938. } else {
  48939. crypto.getRandomValues(bytes)
  48940. }
  48941. }
  48942. if (typeof cb === 'function') {
  48943. return process.nextTick(function () {
  48944. cb(null, bytes)
  48945. })
  48946. }
  48947. return bytes
  48948. }
  48949. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 87)))
  48950. /***/ }),
  48951. /***/ 87:
  48952. /*!********************************************************!*\
  48953. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  48954. \********************************************************/
  48955. /*! no static exports found */
  48956. /***/ (function(module, exports, __webpack_require__) {
  48957. exports.nextTick = function nextTick(fn) {
  48958. var args = Array.prototype.slice.call(arguments);
  48959. args.shift();
  48960. setTimeout(function () {
  48961. fn.apply(null, args);
  48962. }, 0);
  48963. };
  48964. exports.platform = exports.arch =
  48965. exports.execPath = exports.title = 'browser';
  48966. exports.pid = 1;
  48967. exports.browser = true;
  48968. exports.env = {};
  48969. exports.argv = [];
  48970. exports.binding = function (name) {
  48971. throw new Error('No such module. (Possibly not yet loaded)')
  48972. };
  48973. (function () {
  48974. var cwd = '/';
  48975. var path;
  48976. exports.cwd = function () { return cwd };
  48977. exports.chdir = function (dir) {
  48978. if (!path) path = __webpack_require__(/*! path */ 88);
  48979. cwd = path.resolve(dir, cwd);
  48980. };
  48981. })();
  48982. exports.exit = exports.kill =
  48983. exports.umask = exports.dlopen =
  48984. exports.uptime = exports.memoryUsage =
  48985. exports.uvCounters = function() {};
  48986. exports.features = {};
  48987. /***/ }),
  48988. /***/ 88:
  48989. /*!***********************************************!*\
  48990. !*** ./node_modules/path-browserify/index.js ***!
  48991. \***********************************************/
  48992. /*! no static exports found */
  48993. /***/ (function(module, exports, __webpack_require__) {
  48994. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  48995. // backported and transplited with Babel, with backwards-compat fixes
  48996. // Copyright Joyent, Inc. and other Node contributors.
  48997. //
  48998. // Permission is hereby granted, free of charge, to any person obtaining a
  48999. // copy of this software and associated documentation files (the
  49000. // "Software"), to deal in the Software without restriction, including
  49001. // without limitation the rights to use, copy, modify, merge, publish,
  49002. // distribute, sublicense, and/or sell copies of the Software, and to permit
  49003. // persons to whom the Software is furnished to do so, subject to the
  49004. // following conditions:
  49005. //
  49006. // The above copyright notice and this permission notice shall be included
  49007. // in all copies or substantial portions of the Software.
  49008. //
  49009. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  49010. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  49011. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  49012. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  49013. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  49014. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  49015. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  49016. // resolves . and .. elements in a path array with directory names there
  49017. // must be no slashes, empty elements, or device names (c:\) in the array
  49018. // (so also no leading and trailing slashes - it does not distinguish
  49019. // relative and absolute paths)
  49020. function normalizeArray(parts, allowAboveRoot) {
  49021. // if the path tries to go above the root, `up` ends up > 0
  49022. var up = 0;
  49023. for (var i = parts.length - 1; i >= 0; i--) {
  49024. var last = parts[i];
  49025. if (last === '.') {
  49026. parts.splice(i, 1);
  49027. } else if (last === '..') {
  49028. parts.splice(i, 1);
  49029. up++;
  49030. } else if (up) {
  49031. parts.splice(i, 1);
  49032. up--;
  49033. }
  49034. }
  49035. // if the path is allowed to go above the root, restore leading ..s
  49036. if (allowAboveRoot) {
  49037. for (; up--; up) {
  49038. parts.unshift('..');
  49039. }
  49040. }
  49041. return parts;
  49042. }
  49043. // path.resolve([from ...], to)
  49044. // posix version
  49045. exports.resolve = function() {
  49046. var resolvedPath = '',
  49047. resolvedAbsolute = false;
  49048. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  49049. var path = (i >= 0) ? arguments[i] : process.cwd();
  49050. // Skip empty and invalid entries
  49051. if (typeof path !== 'string') {
  49052. throw new TypeError('Arguments to path.resolve must be strings');
  49053. } else if (!path) {
  49054. continue;
  49055. }
  49056. resolvedPath = path + '/' + resolvedPath;
  49057. resolvedAbsolute = path.charAt(0) === '/';
  49058. }
  49059. // At this point the path should be resolved to a full absolute path, but
  49060. // handle relative paths to be safe (might happen when process.cwd() fails)
  49061. // Normalize the path
  49062. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  49063. return !!p;
  49064. }), !resolvedAbsolute).join('/');
  49065. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  49066. };
  49067. // path.normalize(path)
  49068. // posix version
  49069. exports.normalize = function(path) {
  49070. var isAbsolute = exports.isAbsolute(path),
  49071. trailingSlash = substr(path, -1) === '/';
  49072. // Normalize the path
  49073. path = normalizeArray(filter(path.split('/'), function(p) {
  49074. return !!p;
  49075. }), !isAbsolute).join('/');
  49076. if (!path && !isAbsolute) {
  49077. path = '.';
  49078. }
  49079. if (path && trailingSlash) {
  49080. path += '/';
  49081. }
  49082. return (isAbsolute ? '/' : '') + path;
  49083. };
  49084. // posix version
  49085. exports.isAbsolute = function(path) {
  49086. return path.charAt(0) === '/';
  49087. };
  49088. // posix version
  49089. exports.join = function() {
  49090. var paths = Array.prototype.slice.call(arguments, 0);
  49091. return exports.normalize(filter(paths, function(p, index) {
  49092. if (typeof p !== 'string') {
  49093. throw new TypeError('Arguments to path.join must be strings');
  49094. }
  49095. return p;
  49096. }).join('/'));
  49097. };
  49098. // path.relative(from, to)
  49099. // posix version
  49100. exports.relative = function(from, to) {
  49101. from = exports.resolve(from).substr(1);
  49102. to = exports.resolve(to).substr(1);
  49103. function trim(arr) {
  49104. var start = 0;
  49105. for (; start < arr.length; start++) {
  49106. if (arr[start] !== '') break;
  49107. }
  49108. var end = arr.length - 1;
  49109. for (; end >= 0; end--) {
  49110. if (arr[end] !== '') break;
  49111. }
  49112. if (start > end) return [];
  49113. return arr.slice(start, end - start + 1);
  49114. }
  49115. var fromParts = trim(from.split('/'));
  49116. var toParts = trim(to.split('/'));
  49117. var length = Math.min(fromParts.length, toParts.length);
  49118. var samePartsLength = length;
  49119. for (var i = 0; i < length; i++) {
  49120. if (fromParts[i] !== toParts[i]) {
  49121. samePartsLength = i;
  49122. break;
  49123. }
  49124. }
  49125. var outputParts = [];
  49126. for (var i = samePartsLength; i < fromParts.length; i++) {
  49127. outputParts.push('..');
  49128. }
  49129. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  49130. return outputParts.join('/');
  49131. };
  49132. exports.sep = '/';
  49133. exports.delimiter = ':';
  49134. exports.dirname = function (path) {
  49135. if (typeof path !== 'string') path = path + '';
  49136. if (path.length === 0) return '.';
  49137. var code = path.charCodeAt(0);
  49138. var hasRoot = code === 47 /*/*/;
  49139. var end = -1;
  49140. var matchedSlash = true;
  49141. for (var i = path.length - 1; i >= 1; --i) {
  49142. code = path.charCodeAt(i);
  49143. if (code === 47 /*/*/) {
  49144. if (!matchedSlash) {
  49145. end = i;
  49146. break;
  49147. }
  49148. } else {
  49149. // We saw the first non-path separator
  49150. matchedSlash = false;
  49151. }
  49152. }
  49153. if (end === -1) return hasRoot ? '/' : '.';
  49154. if (hasRoot && end === 1) {
  49155. // return '//';
  49156. // Backwards-compat fix:
  49157. return '/';
  49158. }
  49159. return path.slice(0, end);
  49160. };
  49161. function basename(path) {
  49162. if (typeof path !== 'string') path = path + '';
  49163. var start = 0;
  49164. var end = -1;
  49165. var matchedSlash = true;
  49166. var i;
  49167. for (i = path.length - 1; i >= 0; --i) {
  49168. if (path.charCodeAt(i) === 47 /*/*/) {
  49169. // If we reached a path separator that was not part of a set of path
  49170. // separators at the end of the string, stop now
  49171. if (!matchedSlash) {
  49172. start = i + 1;
  49173. break;
  49174. }
  49175. } else if (end === -1) {
  49176. // We saw the first non-path separator, mark this as the end of our
  49177. // path component
  49178. matchedSlash = false;
  49179. end = i + 1;
  49180. }
  49181. }
  49182. if (end === -1) return '';
  49183. return path.slice(start, end);
  49184. }
  49185. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  49186. // in new Node.js versions, so only basename() above is backported here
  49187. exports.basename = function (path, ext) {
  49188. var f = basename(path);
  49189. if (ext && f.substr(-1 * ext.length) === ext) {
  49190. f = f.substr(0, f.length - ext.length);
  49191. }
  49192. return f;
  49193. };
  49194. exports.extname = function (path) {
  49195. if (typeof path !== 'string') path = path + '';
  49196. var startDot = -1;
  49197. var startPart = 0;
  49198. var end = -1;
  49199. var matchedSlash = true;
  49200. // Track the state of characters (if any) we see before our first dot and
  49201. // after any path separator we find
  49202. var preDotState = 0;
  49203. for (var i = path.length - 1; i >= 0; --i) {
  49204. var code = path.charCodeAt(i);
  49205. if (code === 47 /*/*/) {
  49206. // If we reached a path separator that was not part of a set of path
  49207. // separators at the end of the string, stop now
  49208. if (!matchedSlash) {
  49209. startPart = i + 1;
  49210. break;
  49211. }
  49212. continue;
  49213. }
  49214. if (end === -1) {
  49215. // We saw the first non-path separator, mark this as the end of our
  49216. // extension
  49217. matchedSlash = false;
  49218. end = i + 1;
  49219. }
  49220. if (code === 46 /*.*/) {
  49221. // If this is our first dot, mark it as the start of our extension
  49222. if (startDot === -1)
  49223. startDot = i;
  49224. else if (preDotState !== 1)
  49225. preDotState = 1;
  49226. } else if (startDot !== -1) {
  49227. // We saw a non-dot and non-path separator before our dot, so we should
  49228. // have a good chance at having a non-empty extension
  49229. preDotState = -1;
  49230. }
  49231. }
  49232. if (startDot === -1 || end === -1 ||
  49233. // We saw a non-dot character immediately before the dot
  49234. preDotState === 0 ||
  49235. // The (right-most) trimmed path component is exactly '..'
  49236. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  49237. return '';
  49238. }
  49239. return path.slice(startDot, end);
  49240. };
  49241. function filter (xs, f) {
  49242. if (xs.filter) return xs.filter(f);
  49243. var res = [];
  49244. for (var i = 0; i < xs.length; i++) {
  49245. if (f(xs[i], i, xs)) res.push(xs[i]);
  49246. }
  49247. return res;
  49248. }
  49249. // String.prototype.substr - negative index don't work in IE8
  49250. var substr = 'ab'.substr(-1) === 'b'
  49251. ? function (str, start, len) { return str.substr(start, len) }
  49252. : function (str, start, len) {
  49253. if (start < 0) start = str.length + start;
  49254. return str.substr(start, len);
  49255. }
  49256. ;
  49257. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 87)))
  49258. /***/ }),
  49259. /***/ 89:
  49260. /*!*******************************************!*\
  49261. !*** ./node_modules/safe-buffer/index.js ***!
  49262. \*******************************************/
  49263. /*! no static exports found */
  49264. /***/ (function(module, exports, __webpack_require__) {
  49265. /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
  49266. /* eslint-disable node/no-deprecated-api */
  49267. var buffer = __webpack_require__(/*! buffer */ 90)
  49268. var Buffer = buffer.Buffer
  49269. // alternative to using Object.keys for old browsers
  49270. function copyProps (src, dst) {
  49271. for (var key in src) {
  49272. dst[key] = src[key]
  49273. }
  49274. }
  49275. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  49276. module.exports = buffer
  49277. } else {
  49278. // Copy properties from require('buffer')
  49279. copyProps(buffer, exports)
  49280. exports.Buffer = SafeBuffer
  49281. }
  49282. function SafeBuffer (arg, encodingOrOffset, length) {
  49283. return Buffer(arg, encodingOrOffset, length)
  49284. }
  49285. SafeBuffer.prototype = Object.create(Buffer.prototype)
  49286. // Copy static methods from Buffer
  49287. copyProps(Buffer, SafeBuffer)
  49288. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  49289. if (typeof arg === 'number') {
  49290. throw new TypeError('Argument must not be a number')
  49291. }
  49292. return Buffer(arg, encodingOrOffset, length)
  49293. }
  49294. SafeBuffer.alloc = function (size, fill, encoding) {
  49295. if (typeof size !== 'number') {
  49296. throw new TypeError('Argument must be a number')
  49297. }
  49298. var buf = Buffer(size)
  49299. if (fill !== undefined) {
  49300. if (typeof encoding === 'string') {
  49301. buf.fill(fill, encoding)
  49302. } else {
  49303. buf.fill(fill)
  49304. }
  49305. } else {
  49306. buf.fill(0)
  49307. }
  49308. return buf
  49309. }
  49310. SafeBuffer.allocUnsafe = function (size) {
  49311. if (typeof size !== 'number') {
  49312. throw new TypeError('Argument must be a number')
  49313. }
  49314. return Buffer(size)
  49315. }
  49316. SafeBuffer.allocUnsafeSlow = function (size) {
  49317. if (typeof size !== 'number') {
  49318. throw new TypeError('Argument must be a number')
  49319. }
  49320. return buffer.SlowBuffer(size)
  49321. }
  49322. /***/ }),
  49323. /***/ 9:
  49324. /*!*****************************************************************!*\
  49325. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  49326. \*****************************************************************/
  49327. /*! no static exports found */
  49328. /***/ (function(module, exports) {
  49329. function _arrayLikeToArray(arr, len) {
  49330. if (len == null || len > arr.length) len = arr.length;
  49331. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  49332. arr2[i] = arr[i];
  49333. }
  49334. return arr2;
  49335. }
  49336. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  49337. /***/ }),
  49338. /***/ 90:
  49339. /*!**************************************!*\
  49340. !*** ./node_modules/buffer/index.js ***!
  49341. \**************************************/
  49342. /*! no static exports found */
  49343. /***/ (function(module, exports, __webpack_require__) {
  49344. "use strict";
  49345. /* WEBPACK VAR INJECTION */(function(global) {/*!
  49346. * The buffer module from node.js, for the browser.
  49347. *
  49348. * @author Feross Aboukhadijeh <http://feross.org>
  49349. * @license MIT
  49350. */
  49351. /* eslint-disable no-proto */
  49352. var base64 = __webpack_require__(/*! base64-js */ 91)
  49353. var ieee754 = __webpack_require__(/*! ieee754 */ 92)
  49354. var isArray = __webpack_require__(/*! isarray */ 93)
  49355. exports.Buffer = Buffer
  49356. exports.SlowBuffer = SlowBuffer
  49357. exports.INSPECT_MAX_BYTES = 50
  49358. /**
  49359. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  49360. * === true Use Uint8Array implementation (fastest)
  49361. * === false Use Object implementation (most compatible, even IE6)
  49362. *
  49363. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  49364. * Opera 11.6+, iOS 4.2+.
  49365. *
  49366. * Due to various browser bugs, sometimes the Object implementation will be used even
  49367. * when the browser supports typed arrays.
  49368. *
  49369. * Note:
  49370. *
  49371. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  49372. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  49373. *
  49374. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  49375. *
  49376. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  49377. * incorrect length in some situations.
  49378. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  49379. * get the Object implementation, which is slower but behaves correctly.
  49380. */
  49381. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  49382. ? global.TYPED_ARRAY_SUPPORT
  49383. : typedArraySupport()
  49384. /*
  49385. * Export kMaxLength after typed array support is determined.
  49386. */
  49387. exports.kMaxLength = kMaxLength()
  49388. function typedArraySupport () {
  49389. try {
  49390. var arr = new Uint8Array(1)
  49391. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  49392. return arr.foo() === 42 && // typed array instances can be augmented
  49393. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  49394. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  49395. } catch (e) {
  49396. return false
  49397. }
  49398. }
  49399. function kMaxLength () {
  49400. return Buffer.TYPED_ARRAY_SUPPORT
  49401. ? 0x7fffffff
  49402. : 0x3fffffff
  49403. }
  49404. function createBuffer (that, length) {
  49405. if (kMaxLength() < length) {
  49406. throw new RangeError('Invalid typed array length')
  49407. }
  49408. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49409. // Return an augmented `Uint8Array` instance, for best performance
  49410. that = new Uint8Array(length)
  49411. that.__proto__ = Buffer.prototype
  49412. } else {
  49413. // Fallback: Return an object instance of the Buffer class
  49414. if (that === null) {
  49415. that = new Buffer(length)
  49416. }
  49417. that.length = length
  49418. }
  49419. return that
  49420. }
  49421. /**
  49422. * The Buffer constructor returns instances of `Uint8Array` that have their
  49423. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  49424. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  49425. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  49426. * returns a single octet.
  49427. *
  49428. * The `Uint8Array` prototype remains unmodified.
  49429. */
  49430. function Buffer (arg, encodingOrOffset, length) {
  49431. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  49432. return new Buffer(arg, encodingOrOffset, length)
  49433. }
  49434. // Common case.
  49435. if (typeof arg === 'number') {
  49436. if (typeof encodingOrOffset === 'string') {
  49437. throw new Error(
  49438. 'If encoding is specified then the first argument must be a string'
  49439. )
  49440. }
  49441. return allocUnsafe(this, arg)
  49442. }
  49443. return from(this, arg, encodingOrOffset, length)
  49444. }
  49445. Buffer.poolSize = 8192 // not used by this implementation
  49446. // TODO: Legacy, not needed anymore. Remove in next major version.
  49447. Buffer._augment = function (arr) {
  49448. arr.__proto__ = Buffer.prototype
  49449. return arr
  49450. }
  49451. function from (that, value, encodingOrOffset, length) {
  49452. if (typeof value === 'number') {
  49453. throw new TypeError('"value" argument must not be a number')
  49454. }
  49455. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  49456. return fromArrayBuffer(that, value, encodingOrOffset, length)
  49457. }
  49458. if (typeof value === 'string') {
  49459. return fromString(that, value, encodingOrOffset)
  49460. }
  49461. return fromObject(that, value)
  49462. }
  49463. /**
  49464. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  49465. * if value is a number.
  49466. * Buffer.from(str[, encoding])
  49467. * Buffer.from(array)
  49468. * Buffer.from(buffer)
  49469. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  49470. **/
  49471. Buffer.from = function (value, encodingOrOffset, length) {
  49472. return from(null, value, encodingOrOffset, length)
  49473. }
  49474. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49475. Buffer.prototype.__proto__ = Uint8Array.prototype
  49476. Buffer.__proto__ = Uint8Array
  49477. if (typeof Symbol !== 'undefined' && Symbol.species &&
  49478. Buffer[Symbol.species] === Buffer) {
  49479. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  49480. Object.defineProperty(Buffer, Symbol.species, {
  49481. value: null,
  49482. configurable: true
  49483. })
  49484. }
  49485. }
  49486. function assertSize (size) {
  49487. if (typeof size !== 'number') {
  49488. throw new TypeError('"size" argument must be a number')
  49489. } else if (size < 0) {
  49490. throw new RangeError('"size" argument must not be negative')
  49491. }
  49492. }
  49493. function alloc (that, size, fill, encoding) {
  49494. assertSize(size)
  49495. if (size <= 0) {
  49496. return createBuffer(that, size)
  49497. }
  49498. if (fill !== undefined) {
  49499. // Only pay attention to encoding if it's a string. This
  49500. // prevents accidentally sending in a number that would
  49501. // be interpretted as a start offset.
  49502. return typeof encoding === 'string'
  49503. ? createBuffer(that, size).fill(fill, encoding)
  49504. : createBuffer(that, size).fill(fill)
  49505. }
  49506. return createBuffer(that, size)
  49507. }
  49508. /**
  49509. * Creates a new filled Buffer instance.
  49510. * alloc(size[, fill[, encoding]])
  49511. **/
  49512. Buffer.alloc = function (size, fill, encoding) {
  49513. return alloc(null, size, fill, encoding)
  49514. }
  49515. function allocUnsafe (that, size) {
  49516. assertSize(size)
  49517. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  49518. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  49519. for (var i = 0; i < size; ++i) {
  49520. that[i] = 0
  49521. }
  49522. }
  49523. return that
  49524. }
  49525. /**
  49526. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  49527. * */
  49528. Buffer.allocUnsafe = function (size) {
  49529. return allocUnsafe(null, size)
  49530. }
  49531. /**
  49532. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  49533. */
  49534. Buffer.allocUnsafeSlow = function (size) {
  49535. return allocUnsafe(null, size)
  49536. }
  49537. function fromString (that, string, encoding) {
  49538. if (typeof encoding !== 'string' || encoding === '') {
  49539. encoding = 'utf8'
  49540. }
  49541. if (!Buffer.isEncoding(encoding)) {
  49542. throw new TypeError('"encoding" must be a valid string encoding')
  49543. }
  49544. var length = byteLength(string, encoding) | 0
  49545. that = createBuffer(that, length)
  49546. var actual = that.write(string, encoding)
  49547. if (actual !== length) {
  49548. // Writing a hex string, for example, that contains invalid characters will
  49549. // cause everything after the first invalid character to be ignored. (e.g.
  49550. // 'abxxcd' will be treated as 'ab')
  49551. that = that.slice(0, actual)
  49552. }
  49553. return that
  49554. }
  49555. function fromArrayLike (that, array) {
  49556. var length = array.length < 0 ? 0 : checked(array.length) | 0
  49557. that = createBuffer(that, length)
  49558. for (var i = 0; i < length; i += 1) {
  49559. that[i] = array[i] & 255
  49560. }
  49561. return that
  49562. }
  49563. function fromArrayBuffer (that, array, byteOffset, length) {
  49564. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  49565. if (byteOffset < 0 || array.byteLength < byteOffset) {
  49566. throw new RangeError('\'offset\' is out of bounds')
  49567. }
  49568. if (array.byteLength < byteOffset + (length || 0)) {
  49569. throw new RangeError('\'length\' is out of bounds')
  49570. }
  49571. if (byteOffset === undefined && length === undefined) {
  49572. array = new Uint8Array(array)
  49573. } else if (length === undefined) {
  49574. array = new Uint8Array(array, byteOffset)
  49575. } else {
  49576. array = new Uint8Array(array, byteOffset, length)
  49577. }
  49578. if (Buffer.TYPED_ARRAY_SUPPORT) {
  49579. // Return an augmented `Uint8Array` instance, for best performance
  49580. that = array
  49581. that.__proto__ = Buffer.prototype
  49582. } else {
  49583. // Fallback: Return an object instance of the Buffer class
  49584. that = fromArrayLike(that, array)
  49585. }
  49586. return that
  49587. }
  49588. function fromObject (that, obj) {
  49589. if (Buffer.isBuffer(obj)) {
  49590. var len = checked(obj.length) | 0
  49591. that = createBuffer(that, len)
  49592. if (that.length === 0) {
  49593. return that
  49594. }
  49595. obj.copy(that, 0, 0, len)
  49596. return that
  49597. }
  49598. if (obj) {
  49599. if ((typeof ArrayBuffer !== 'undefined' &&
  49600. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  49601. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  49602. return createBuffer(that, 0)
  49603. }
  49604. return fromArrayLike(that, obj)
  49605. }
  49606. if (obj.type === 'Buffer' && isArray(obj.data)) {
  49607. return fromArrayLike(that, obj.data)
  49608. }
  49609. }
  49610. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  49611. }
  49612. function checked (length) {
  49613. // Note: cannot use `length < kMaxLength()` here because that fails when
  49614. // length is NaN (which is otherwise coerced to zero.)
  49615. if (length >= kMaxLength()) {
  49616. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  49617. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  49618. }
  49619. return length | 0
  49620. }
  49621. function SlowBuffer (length) {
  49622. if (+length != length) { // eslint-disable-line eqeqeq
  49623. length = 0
  49624. }
  49625. return Buffer.alloc(+length)
  49626. }
  49627. Buffer.isBuffer = function isBuffer (b) {
  49628. return !!(b != null && b._isBuffer)
  49629. }
  49630. Buffer.compare = function compare (a, b) {
  49631. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  49632. throw new TypeError('Arguments must be Buffers')
  49633. }
  49634. if (a === b) return 0
  49635. var x = a.length
  49636. var y = b.length
  49637. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  49638. if (a[i] !== b[i]) {
  49639. x = a[i]
  49640. y = b[i]
  49641. break
  49642. }
  49643. }
  49644. if (x < y) return -1
  49645. if (y < x) return 1
  49646. return 0
  49647. }
  49648. Buffer.isEncoding = function isEncoding (encoding) {
  49649. switch (String(encoding).toLowerCase()) {
  49650. case 'hex':
  49651. case 'utf8':
  49652. case 'utf-8':
  49653. case 'ascii':
  49654. case 'latin1':
  49655. case 'binary':
  49656. case 'base64':
  49657. case 'ucs2':
  49658. case 'ucs-2':
  49659. case 'utf16le':
  49660. case 'utf-16le':
  49661. return true
  49662. default:
  49663. return false
  49664. }
  49665. }
  49666. Buffer.concat = function concat (list, length) {
  49667. if (!isArray(list)) {
  49668. throw new TypeError('"list" argument must be an Array of Buffers')
  49669. }
  49670. if (list.length === 0) {
  49671. return Buffer.alloc(0)
  49672. }
  49673. var i
  49674. if (length === undefined) {
  49675. length = 0
  49676. for (i = 0; i < list.length; ++i) {
  49677. length += list[i].length
  49678. }
  49679. }
  49680. var buffer = Buffer.allocUnsafe(length)
  49681. var pos = 0
  49682. for (i = 0; i < list.length; ++i) {
  49683. var buf = list[i]
  49684. if (!Buffer.isBuffer(buf)) {
  49685. throw new TypeError('"list" argument must be an Array of Buffers')
  49686. }
  49687. buf.copy(buffer, pos)
  49688. pos += buf.length
  49689. }
  49690. return buffer
  49691. }
  49692. function byteLength (string, encoding) {
  49693. if (Buffer.isBuffer(string)) {
  49694. return string.length
  49695. }
  49696. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  49697. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  49698. return string.byteLength
  49699. }
  49700. if (typeof string !== 'string') {
  49701. string = '' + string
  49702. }
  49703. var len = string.length
  49704. if (len === 0) return 0
  49705. // Use a for loop to avoid recursion
  49706. var loweredCase = false
  49707. for (;;) {
  49708. switch (encoding) {
  49709. case 'ascii':
  49710. case 'latin1':
  49711. case 'binary':
  49712. return len
  49713. case 'utf8':
  49714. case 'utf-8':
  49715. case undefined:
  49716. return utf8ToBytes(string).length
  49717. case 'ucs2':
  49718. case 'ucs-2':
  49719. case 'utf16le':
  49720. case 'utf-16le':
  49721. return len * 2
  49722. case 'hex':
  49723. return len >>> 1
  49724. case 'base64':
  49725. return base64ToBytes(string).length
  49726. default:
  49727. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  49728. encoding = ('' + encoding).toLowerCase()
  49729. loweredCase = true
  49730. }
  49731. }
  49732. }
  49733. Buffer.byteLength = byteLength
  49734. function slowToString (encoding, start, end) {
  49735. var loweredCase = false
  49736. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  49737. // property of a typed array.
  49738. // This behaves neither like String nor Uint8Array in that we set start/end
  49739. // to their upper/lower bounds if the value passed is out of range.
  49740. // undefined is handled specially as per ECMA-262 6th Edition,
  49741. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  49742. if (start === undefined || start < 0) {
  49743. start = 0
  49744. }
  49745. // Return early if start > this.length. Done here to prevent potential uint32
  49746. // coercion fail below.
  49747. if (start > this.length) {
  49748. return ''
  49749. }
  49750. if (end === undefined || end > this.length) {
  49751. end = this.length
  49752. }
  49753. if (end <= 0) {
  49754. return ''
  49755. }
  49756. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  49757. end >>>= 0
  49758. start >>>= 0
  49759. if (end <= start) {
  49760. return ''
  49761. }
  49762. if (!encoding) encoding = 'utf8'
  49763. while (true) {
  49764. switch (encoding) {
  49765. case 'hex':
  49766. return hexSlice(this, start, end)
  49767. case 'utf8':
  49768. case 'utf-8':
  49769. return utf8Slice(this, start, end)
  49770. case 'ascii':
  49771. return asciiSlice(this, start, end)
  49772. case 'latin1':
  49773. case 'binary':
  49774. return latin1Slice(this, start, end)
  49775. case 'base64':
  49776. return base64Slice(this, start, end)
  49777. case 'ucs2':
  49778. case 'ucs-2':
  49779. case 'utf16le':
  49780. case 'utf-16le':
  49781. return utf16leSlice(this, start, end)
  49782. default:
  49783. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  49784. encoding = (encoding + '').toLowerCase()
  49785. loweredCase = true
  49786. }
  49787. }
  49788. }
  49789. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  49790. // Buffer instances.
  49791. Buffer.prototype._isBuffer = true
  49792. function swap (b, n, m) {
  49793. var i = b[n]
  49794. b[n] = b[m]
  49795. b[m] = i
  49796. }
  49797. Buffer.prototype.swap16 = function swap16 () {
  49798. var len = this.length
  49799. if (len % 2 !== 0) {
  49800. throw new RangeError('Buffer size must be a multiple of 16-bits')
  49801. }
  49802. for (var i = 0; i < len; i += 2) {
  49803. swap(this, i, i + 1)
  49804. }
  49805. return this
  49806. }
  49807. Buffer.prototype.swap32 = function swap32 () {
  49808. var len = this.length
  49809. if (len % 4 !== 0) {
  49810. throw new RangeError('Buffer size must be a multiple of 32-bits')
  49811. }
  49812. for (var i = 0; i < len; i += 4) {
  49813. swap(this, i, i + 3)
  49814. swap(this, i + 1, i + 2)
  49815. }
  49816. return this
  49817. }
  49818. Buffer.prototype.swap64 = function swap64 () {
  49819. var len = this.length
  49820. if (len % 8 !== 0) {
  49821. throw new RangeError('Buffer size must be a multiple of 64-bits')
  49822. }
  49823. for (var i = 0; i < len; i += 8) {
  49824. swap(this, i, i + 7)
  49825. swap(this, i + 1, i + 6)
  49826. swap(this, i + 2, i + 5)
  49827. swap(this, i + 3, i + 4)
  49828. }
  49829. return this
  49830. }
  49831. Buffer.prototype.toString = function toString () {
  49832. var length = this.length | 0
  49833. if (length === 0) return ''
  49834. if (arguments.length === 0) return utf8Slice(this, 0, length)
  49835. return slowToString.apply(this, arguments)
  49836. }
  49837. Buffer.prototype.equals = function equals (b) {
  49838. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  49839. if (this === b) return true
  49840. return Buffer.compare(this, b) === 0
  49841. }
  49842. Buffer.prototype.inspect = function inspect () {
  49843. var str = ''
  49844. var max = exports.INSPECT_MAX_BYTES
  49845. if (this.length > 0) {
  49846. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  49847. if (this.length > max) str += ' ... '
  49848. }
  49849. return '<Buffer ' + str + '>'
  49850. }
  49851. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  49852. if (!Buffer.isBuffer(target)) {
  49853. throw new TypeError('Argument must be a Buffer')
  49854. }
  49855. if (start === undefined) {
  49856. start = 0
  49857. }
  49858. if (end === undefined) {
  49859. end = target ? target.length : 0
  49860. }
  49861. if (thisStart === undefined) {
  49862. thisStart = 0
  49863. }
  49864. if (thisEnd === undefined) {
  49865. thisEnd = this.length
  49866. }
  49867. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  49868. throw new RangeError('out of range index')
  49869. }
  49870. if (thisStart >= thisEnd && start >= end) {
  49871. return 0
  49872. }
  49873. if (thisStart >= thisEnd) {
  49874. return -1
  49875. }
  49876. if (start >= end) {
  49877. return 1
  49878. }
  49879. start >>>= 0
  49880. end >>>= 0
  49881. thisStart >>>= 0
  49882. thisEnd >>>= 0
  49883. if (this === target) return 0
  49884. var x = thisEnd - thisStart
  49885. var y = end - start
  49886. var len = Math.min(x, y)
  49887. var thisCopy = this.slice(thisStart, thisEnd)
  49888. var targetCopy = target.slice(start, end)
  49889. for (var i = 0; i < len; ++i) {
  49890. if (thisCopy[i] !== targetCopy[i]) {
  49891. x = thisCopy[i]
  49892. y = targetCopy[i]
  49893. break
  49894. }
  49895. }
  49896. if (x < y) return -1
  49897. if (y < x) return 1
  49898. return 0
  49899. }
  49900. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  49901. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  49902. //
  49903. // Arguments:
  49904. // - buffer - a Buffer to search
  49905. // - val - a string, Buffer, or number
  49906. // - byteOffset - an index into `buffer`; will be clamped to an int32
  49907. // - encoding - an optional encoding, relevant is val is a string
  49908. // - dir - true for indexOf, false for lastIndexOf
  49909. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  49910. // Empty buffer means no match
  49911. if (buffer.length === 0) return -1
  49912. // Normalize byteOffset
  49913. if (typeof byteOffset === 'string') {
  49914. encoding = byteOffset
  49915. byteOffset = 0
  49916. } else if (byteOffset > 0x7fffffff) {
  49917. byteOffset = 0x7fffffff
  49918. } else if (byteOffset < -0x80000000) {
  49919. byteOffset = -0x80000000
  49920. }
  49921. byteOffset = +byteOffset // Coerce to Number.
  49922. if (isNaN(byteOffset)) {
  49923. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  49924. byteOffset = dir ? 0 : (buffer.length - 1)
  49925. }
  49926. // Normalize byteOffset: negative offsets start from the end of the buffer
  49927. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  49928. if (byteOffset >= buffer.length) {
  49929. if (dir) return -1
  49930. else byteOffset = buffer.length - 1
  49931. } else if (byteOffset < 0) {
  49932. if (dir) byteOffset = 0
  49933. else return -1
  49934. }
  49935. // Normalize val
  49936. if (typeof val === 'string') {
  49937. val = Buffer.from(val, encoding)
  49938. }
  49939. // Finally, search either indexOf (if dir is true) or lastIndexOf
  49940. if (Buffer.isBuffer(val)) {
  49941. // Special case: looking for empty string/buffer always fails
  49942. if (val.length === 0) {
  49943. return -1
  49944. }
  49945. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  49946. } else if (typeof val === 'number') {
  49947. val = val & 0xFF // Search for a byte value [0-255]
  49948. if (Buffer.TYPED_ARRAY_SUPPORT &&
  49949. typeof Uint8Array.prototype.indexOf === 'function') {
  49950. if (dir) {
  49951. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  49952. } else {
  49953. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  49954. }
  49955. }
  49956. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  49957. }
  49958. throw new TypeError('val must be string, number or Buffer')
  49959. }
  49960. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  49961. var indexSize = 1
  49962. var arrLength = arr.length
  49963. var valLength = val.length
  49964. if (encoding !== undefined) {
  49965. encoding = String(encoding).toLowerCase()
  49966. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  49967. encoding === 'utf16le' || encoding === 'utf-16le') {
  49968. if (arr.length < 2 || val.length < 2) {
  49969. return -1
  49970. }
  49971. indexSize = 2
  49972. arrLength /= 2
  49973. valLength /= 2
  49974. byteOffset /= 2
  49975. }
  49976. }
  49977. function read (buf, i) {
  49978. if (indexSize === 1) {
  49979. return buf[i]
  49980. } else {
  49981. return buf.readUInt16BE(i * indexSize)
  49982. }
  49983. }
  49984. var i
  49985. if (dir) {
  49986. var foundIndex = -1
  49987. for (i = byteOffset; i < arrLength; i++) {
  49988. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  49989. if (foundIndex === -1) foundIndex = i
  49990. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  49991. } else {
  49992. if (foundIndex !== -1) i -= i - foundIndex
  49993. foundIndex = -1
  49994. }
  49995. }
  49996. } else {
  49997. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  49998. for (i = byteOffset; i >= 0; i--) {
  49999. var found = true
  50000. for (var j = 0; j < valLength; j++) {
  50001. if (read(arr, i + j) !== read(val, j)) {
  50002. found = false
  50003. break
  50004. }
  50005. }
  50006. if (found) return i
  50007. }
  50008. }
  50009. return -1
  50010. }
  50011. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  50012. return this.indexOf(val, byteOffset, encoding) !== -1
  50013. }
  50014. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  50015. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  50016. }
  50017. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  50018. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  50019. }
  50020. function hexWrite (buf, string, offset, length) {
  50021. offset = Number(offset) || 0
  50022. var remaining = buf.length - offset
  50023. if (!length) {
  50024. length = remaining
  50025. } else {
  50026. length = Number(length)
  50027. if (length > remaining) {
  50028. length = remaining
  50029. }
  50030. }
  50031. // must be an even number of digits
  50032. var strLen = string.length
  50033. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  50034. if (length > strLen / 2) {
  50035. length = strLen / 2
  50036. }
  50037. for (var i = 0; i < length; ++i) {
  50038. var parsed = parseInt(string.substr(i * 2, 2), 16)
  50039. if (isNaN(parsed)) return i
  50040. buf[offset + i] = parsed
  50041. }
  50042. return i
  50043. }
  50044. function utf8Write (buf, string, offset, length) {
  50045. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  50046. }
  50047. function asciiWrite (buf, string, offset, length) {
  50048. return blitBuffer(asciiToBytes(string), buf, offset, length)
  50049. }
  50050. function latin1Write (buf, string, offset, length) {
  50051. return asciiWrite(buf, string, offset, length)
  50052. }
  50053. function base64Write (buf, string, offset, length) {
  50054. return blitBuffer(base64ToBytes(string), buf, offset, length)
  50055. }
  50056. function ucs2Write (buf, string, offset, length) {
  50057. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  50058. }
  50059. Buffer.prototype.write = function write (string, offset, length, encoding) {
  50060. // Buffer#write(string)
  50061. if (offset === undefined) {
  50062. encoding = 'utf8'
  50063. length = this.length
  50064. offset = 0
  50065. // Buffer#write(string, encoding)
  50066. } else if (length === undefined && typeof offset === 'string') {
  50067. encoding = offset
  50068. length = this.length
  50069. offset = 0
  50070. // Buffer#write(string, offset[, length][, encoding])
  50071. } else if (isFinite(offset)) {
  50072. offset = offset | 0
  50073. if (isFinite(length)) {
  50074. length = length | 0
  50075. if (encoding === undefined) encoding = 'utf8'
  50076. } else {
  50077. encoding = length
  50078. length = undefined
  50079. }
  50080. // legacy write(string, encoding, offset, length) - remove in v0.13
  50081. } else {
  50082. throw new Error(
  50083. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  50084. )
  50085. }
  50086. var remaining = this.length - offset
  50087. if (length === undefined || length > remaining) length = remaining
  50088. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  50089. throw new RangeError('Attempt to write outside buffer bounds')
  50090. }
  50091. if (!encoding) encoding = 'utf8'
  50092. var loweredCase = false
  50093. for (;;) {
  50094. switch (encoding) {
  50095. case 'hex':
  50096. return hexWrite(this, string, offset, length)
  50097. case 'utf8':
  50098. case 'utf-8':
  50099. return utf8Write(this, string, offset, length)
  50100. case 'ascii':
  50101. return asciiWrite(this, string, offset, length)
  50102. case 'latin1':
  50103. case 'binary':
  50104. return latin1Write(this, string, offset, length)
  50105. case 'base64':
  50106. // Warning: maxLength not taken into account in base64Write
  50107. return base64Write(this, string, offset, length)
  50108. case 'ucs2':
  50109. case 'ucs-2':
  50110. case 'utf16le':
  50111. case 'utf-16le':
  50112. return ucs2Write(this, string, offset, length)
  50113. default:
  50114. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  50115. encoding = ('' + encoding).toLowerCase()
  50116. loweredCase = true
  50117. }
  50118. }
  50119. }
  50120. Buffer.prototype.toJSON = function toJSON () {
  50121. return {
  50122. type: 'Buffer',
  50123. data: Array.prototype.slice.call(this._arr || this, 0)
  50124. }
  50125. }
  50126. function base64Slice (buf, start, end) {
  50127. if (start === 0 && end === buf.length) {
  50128. return base64.fromByteArray(buf)
  50129. } else {
  50130. return base64.fromByteArray(buf.slice(start, end))
  50131. }
  50132. }
  50133. function utf8Slice (buf, start, end) {
  50134. end = Math.min(buf.length, end)
  50135. var res = []
  50136. var i = start
  50137. while (i < end) {
  50138. var firstByte = buf[i]
  50139. var codePoint = null
  50140. var bytesPerSequence = (firstByte > 0xEF) ? 4
  50141. : (firstByte > 0xDF) ? 3
  50142. : (firstByte > 0xBF) ? 2
  50143. : 1
  50144. if (i + bytesPerSequence <= end) {
  50145. var secondByte, thirdByte, fourthByte, tempCodePoint
  50146. switch (bytesPerSequence) {
  50147. case 1:
  50148. if (firstByte < 0x80) {
  50149. codePoint = firstByte
  50150. }
  50151. break
  50152. case 2:
  50153. secondByte = buf[i + 1]
  50154. if ((secondByte & 0xC0) === 0x80) {
  50155. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  50156. if (tempCodePoint > 0x7F) {
  50157. codePoint = tempCodePoint
  50158. }
  50159. }
  50160. break
  50161. case 3:
  50162. secondByte = buf[i + 1]
  50163. thirdByte = buf[i + 2]
  50164. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  50165. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  50166. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  50167. codePoint = tempCodePoint
  50168. }
  50169. }
  50170. break
  50171. case 4:
  50172. secondByte = buf[i + 1]
  50173. thirdByte = buf[i + 2]
  50174. fourthByte = buf[i + 3]
  50175. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  50176. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  50177. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  50178. codePoint = tempCodePoint
  50179. }
  50180. }
  50181. }
  50182. }
  50183. if (codePoint === null) {
  50184. // we did not generate a valid codePoint so insert a
  50185. // replacement char (U+FFFD) and advance only 1 byte
  50186. codePoint = 0xFFFD
  50187. bytesPerSequence = 1
  50188. } else if (codePoint > 0xFFFF) {
  50189. // encode to utf16 (surrogate pair dance)
  50190. codePoint -= 0x10000
  50191. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  50192. codePoint = 0xDC00 | codePoint & 0x3FF
  50193. }
  50194. res.push(codePoint)
  50195. i += bytesPerSequence
  50196. }
  50197. return decodeCodePointsArray(res)
  50198. }
  50199. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  50200. // the lowest limit is Chrome, with 0x10000 args.
  50201. // We go 1 magnitude less, for safety
  50202. var MAX_ARGUMENTS_LENGTH = 0x1000
  50203. function decodeCodePointsArray (codePoints) {
  50204. var len = codePoints.length
  50205. if (len <= MAX_ARGUMENTS_LENGTH) {
  50206. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  50207. }
  50208. // Decode in chunks to avoid "call stack size exceeded".
  50209. var res = ''
  50210. var i = 0
  50211. while (i < len) {
  50212. res += String.fromCharCode.apply(
  50213. String,
  50214. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  50215. )
  50216. }
  50217. return res
  50218. }
  50219. function asciiSlice (buf, start, end) {
  50220. var ret = ''
  50221. end = Math.min(buf.length, end)
  50222. for (var i = start; i < end; ++i) {
  50223. ret += String.fromCharCode(buf[i] & 0x7F)
  50224. }
  50225. return ret
  50226. }
  50227. function latin1Slice (buf, start, end) {
  50228. var ret = ''
  50229. end = Math.min(buf.length, end)
  50230. for (var i = start; i < end; ++i) {
  50231. ret += String.fromCharCode(buf[i])
  50232. }
  50233. return ret
  50234. }
  50235. function hexSlice (buf, start, end) {
  50236. var len = buf.length
  50237. if (!start || start < 0) start = 0
  50238. if (!end || end < 0 || end > len) end = len
  50239. var out = ''
  50240. for (var i = start; i < end; ++i) {
  50241. out += toHex(buf[i])
  50242. }
  50243. return out
  50244. }
  50245. function utf16leSlice (buf, start, end) {
  50246. var bytes = buf.slice(start, end)
  50247. var res = ''
  50248. for (var i = 0; i < bytes.length; i += 2) {
  50249. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  50250. }
  50251. return res
  50252. }
  50253. Buffer.prototype.slice = function slice (start, end) {
  50254. var len = this.length
  50255. start = ~~start
  50256. end = end === undefined ? len : ~~end
  50257. if (start < 0) {
  50258. start += len
  50259. if (start < 0) start = 0
  50260. } else if (start > len) {
  50261. start = len
  50262. }
  50263. if (end < 0) {
  50264. end += len
  50265. if (end < 0) end = 0
  50266. } else if (end > len) {
  50267. end = len
  50268. }
  50269. if (end < start) end = start
  50270. var newBuf
  50271. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50272. newBuf = this.subarray(start, end)
  50273. newBuf.__proto__ = Buffer.prototype
  50274. } else {
  50275. var sliceLen = end - start
  50276. newBuf = new Buffer(sliceLen, undefined)
  50277. for (var i = 0; i < sliceLen; ++i) {
  50278. newBuf[i] = this[i + start]
  50279. }
  50280. }
  50281. return newBuf
  50282. }
  50283. /*
  50284. * Need to make sure that buffer isn't trying to write out of bounds.
  50285. */
  50286. function checkOffset (offset, ext, length) {
  50287. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  50288. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  50289. }
  50290. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  50291. offset = offset | 0
  50292. byteLength = byteLength | 0
  50293. if (!noAssert) checkOffset(offset, byteLength, this.length)
  50294. var val = this[offset]
  50295. var mul = 1
  50296. var i = 0
  50297. while (++i < byteLength && (mul *= 0x100)) {
  50298. val += this[offset + i] * mul
  50299. }
  50300. return val
  50301. }
  50302. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  50303. offset = offset | 0
  50304. byteLength = byteLength | 0
  50305. if (!noAssert) {
  50306. checkOffset(offset, byteLength, this.length)
  50307. }
  50308. var val = this[offset + --byteLength]
  50309. var mul = 1
  50310. while (byteLength > 0 && (mul *= 0x100)) {
  50311. val += this[offset + --byteLength] * mul
  50312. }
  50313. return val
  50314. }
  50315. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  50316. if (!noAssert) checkOffset(offset, 1, this.length)
  50317. return this[offset]
  50318. }
  50319. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  50320. if (!noAssert) checkOffset(offset, 2, this.length)
  50321. return this[offset] | (this[offset + 1] << 8)
  50322. }
  50323. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  50324. if (!noAssert) checkOffset(offset, 2, this.length)
  50325. return (this[offset] << 8) | this[offset + 1]
  50326. }
  50327. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  50328. if (!noAssert) checkOffset(offset, 4, this.length)
  50329. return ((this[offset]) |
  50330. (this[offset + 1] << 8) |
  50331. (this[offset + 2] << 16)) +
  50332. (this[offset + 3] * 0x1000000)
  50333. }
  50334. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  50335. if (!noAssert) checkOffset(offset, 4, this.length)
  50336. return (this[offset] * 0x1000000) +
  50337. ((this[offset + 1] << 16) |
  50338. (this[offset + 2] << 8) |
  50339. this[offset + 3])
  50340. }
  50341. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  50342. offset = offset | 0
  50343. byteLength = byteLength | 0
  50344. if (!noAssert) checkOffset(offset, byteLength, this.length)
  50345. var val = this[offset]
  50346. var mul = 1
  50347. var i = 0
  50348. while (++i < byteLength && (mul *= 0x100)) {
  50349. val += this[offset + i] * mul
  50350. }
  50351. mul *= 0x80
  50352. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  50353. return val
  50354. }
  50355. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  50356. offset = offset | 0
  50357. byteLength = byteLength | 0
  50358. if (!noAssert) checkOffset(offset, byteLength, this.length)
  50359. var i = byteLength
  50360. var mul = 1
  50361. var val = this[offset + --i]
  50362. while (i > 0 && (mul *= 0x100)) {
  50363. val += this[offset + --i] * mul
  50364. }
  50365. mul *= 0x80
  50366. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  50367. return val
  50368. }
  50369. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  50370. if (!noAssert) checkOffset(offset, 1, this.length)
  50371. if (!(this[offset] & 0x80)) return (this[offset])
  50372. return ((0xff - this[offset] + 1) * -1)
  50373. }
  50374. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  50375. if (!noAssert) checkOffset(offset, 2, this.length)
  50376. var val = this[offset] | (this[offset + 1] << 8)
  50377. return (val & 0x8000) ? val | 0xFFFF0000 : val
  50378. }
  50379. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  50380. if (!noAssert) checkOffset(offset, 2, this.length)
  50381. var val = this[offset + 1] | (this[offset] << 8)
  50382. return (val & 0x8000) ? val | 0xFFFF0000 : val
  50383. }
  50384. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  50385. if (!noAssert) checkOffset(offset, 4, this.length)
  50386. return (this[offset]) |
  50387. (this[offset + 1] << 8) |
  50388. (this[offset + 2] << 16) |
  50389. (this[offset + 3] << 24)
  50390. }
  50391. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  50392. if (!noAssert) checkOffset(offset, 4, this.length)
  50393. return (this[offset] << 24) |
  50394. (this[offset + 1] << 16) |
  50395. (this[offset + 2] << 8) |
  50396. (this[offset + 3])
  50397. }
  50398. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  50399. if (!noAssert) checkOffset(offset, 4, this.length)
  50400. return ieee754.read(this, offset, true, 23, 4)
  50401. }
  50402. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  50403. if (!noAssert) checkOffset(offset, 4, this.length)
  50404. return ieee754.read(this, offset, false, 23, 4)
  50405. }
  50406. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  50407. if (!noAssert) checkOffset(offset, 8, this.length)
  50408. return ieee754.read(this, offset, true, 52, 8)
  50409. }
  50410. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  50411. if (!noAssert) checkOffset(offset, 8, this.length)
  50412. return ieee754.read(this, offset, false, 52, 8)
  50413. }
  50414. function checkInt (buf, value, offset, ext, max, min) {
  50415. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  50416. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  50417. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  50418. }
  50419. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  50420. value = +value
  50421. offset = offset | 0
  50422. byteLength = byteLength | 0
  50423. if (!noAssert) {
  50424. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  50425. checkInt(this, value, offset, byteLength, maxBytes, 0)
  50426. }
  50427. var mul = 1
  50428. var i = 0
  50429. this[offset] = value & 0xFF
  50430. while (++i < byteLength && (mul *= 0x100)) {
  50431. this[offset + i] = (value / mul) & 0xFF
  50432. }
  50433. return offset + byteLength
  50434. }
  50435. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  50436. value = +value
  50437. offset = offset | 0
  50438. byteLength = byteLength | 0
  50439. if (!noAssert) {
  50440. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  50441. checkInt(this, value, offset, byteLength, maxBytes, 0)
  50442. }
  50443. var i = byteLength - 1
  50444. var mul = 1
  50445. this[offset + i] = value & 0xFF
  50446. while (--i >= 0 && (mul *= 0x100)) {
  50447. this[offset + i] = (value / mul) & 0xFF
  50448. }
  50449. return offset + byteLength
  50450. }
  50451. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  50452. value = +value
  50453. offset = offset | 0
  50454. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  50455. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  50456. this[offset] = (value & 0xff)
  50457. return offset + 1
  50458. }
  50459. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  50460. if (value < 0) value = 0xffff + value + 1
  50461. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  50462. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  50463. (littleEndian ? i : 1 - i) * 8
  50464. }
  50465. }
  50466. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  50467. value = +value
  50468. offset = offset | 0
  50469. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  50470. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50471. this[offset] = (value & 0xff)
  50472. this[offset + 1] = (value >>> 8)
  50473. } else {
  50474. objectWriteUInt16(this, value, offset, true)
  50475. }
  50476. return offset + 2
  50477. }
  50478. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  50479. value = +value
  50480. offset = offset | 0
  50481. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  50482. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50483. this[offset] = (value >>> 8)
  50484. this[offset + 1] = (value & 0xff)
  50485. } else {
  50486. objectWriteUInt16(this, value, offset, false)
  50487. }
  50488. return offset + 2
  50489. }
  50490. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  50491. if (value < 0) value = 0xffffffff + value + 1
  50492. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  50493. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  50494. }
  50495. }
  50496. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  50497. value = +value
  50498. offset = offset | 0
  50499. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  50500. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50501. this[offset + 3] = (value >>> 24)
  50502. this[offset + 2] = (value >>> 16)
  50503. this[offset + 1] = (value >>> 8)
  50504. this[offset] = (value & 0xff)
  50505. } else {
  50506. objectWriteUInt32(this, value, offset, true)
  50507. }
  50508. return offset + 4
  50509. }
  50510. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  50511. value = +value
  50512. offset = offset | 0
  50513. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  50514. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50515. this[offset] = (value >>> 24)
  50516. this[offset + 1] = (value >>> 16)
  50517. this[offset + 2] = (value >>> 8)
  50518. this[offset + 3] = (value & 0xff)
  50519. } else {
  50520. objectWriteUInt32(this, value, offset, false)
  50521. }
  50522. return offset + 4
  50523. }
  50524. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  50525. value = +value
  50526. offset = offset | 0
  50527. if (!noAssert) {
  50528. var limit = Math.pow(2, 8 * byteLength - 1)
  50529. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  50530. }
  50531. var i = 0
  50532. var mul = 1
  50533. var sub = 0
  50534. this[offset] = value & 0xFF
  50535. while (++i < byteLength && (mul *= 0x100)) {
  50536. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  50537. sub = 1
  50538. }
  50539. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  50540. }
  50541. return offset + byteLength
  50542. }
  50543. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  50544. value = +value
  50545. offset = offset | 0
  50546. if (!noAssert) {
  50547. var limit = Math.pow(2, 8 * byteLength - 1)
  50548. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  50549. }
  50550. var i = byteLength - 1
  50551. var mul = 1
  50552. var sub = 0
  50553. this[offset + i] = value & 0xFF
  50554. while (--i >= 0 && (mul *= 0x100)) {
  50555. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  50556. sub = 1
  50557. }
  50558. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  50559. }
  50560. return offset + byteLength
  50561. }
  50562. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  50563. value = +value
  50564. offset = offset | 0
  50565. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  50566. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  50567. if (value < 0) value = 0xff + value + 1
  50568. this[offset] = (value & 0xff)
  50569. return offset + 1
  50570. }
  50571. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  50572. value = +value
  50573. offset = offset | 0
  50574. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  50575. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50576. this[offset] = (value & 0xff)
  50577. this[offset + 1] = (value >>> 8)
  50578. } else {
  50579. objectWriteUInt16(this, value, offset, true)
  50580. }
  50581. return offset + 2
  50582. }
  50583. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  50584. value = +value
  50585. offset = offset | 0
  50586. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  50587. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50588. this[offset] = (value >>> 8)
  50589. this[offset + 1] = (value & 0xff)
  50590. } else {
  50591. objectWriteUInt16(this, value, offset, false)
  50592. }
  50593. return offset + 2
  50594. }
  50595. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  50596. value = +value
  50597. offset = offset | 0
  50598. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  50599. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50600. this[offset] = (value & 0xff)
  50601. this[offset + 1] = (value >>> 8)
  50602. this[offset + 2] = (value >>> 16)
  50603. this[offset + 3] = (value >>> 24)
  50604. } else {
  50605. objectWriteUInt32(this, value, offset, true)
  50606. }
  50607. return offset + 4
  50608. }
  50609. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  50610. value = +value
  50611. offset = offset | 0
  50612. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  50613. if (value < 0) value = 0xffffffff + value + 1
  50614. if (Buffer.TYPED_ARRAY_SUPPORT) {
  50615. this[offset] = (value >>> 24)
  50616. this[offset + 1] = (value >>> 16)
  50617. this[offset + 2] = (value >>> 8)
  50618. this[offset + 3] = (value & 0xff)
  50619. } else {
  50620. objectWriteUInt32(this, value, offset, false)
  50621. }
  50622. return offset + 4
  50623. }
  50624. function checkIEEE754 (buf, value, offset, ext, max, min) {
  50625. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  50626. if (offset < 0) throw new RangeError('Index out of range')
  50627. }
  50628. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  50629. if (!noAssert) {
  50630. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  50631. }
  50632. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  50633. return offset + 4
  50634. }
  50635. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  50636. return writeFloat(this, value, offset, true, noAssert)
  50637. }
  50638. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  50639. return writeFloat(this, value, offset, false, noAssert)
  50640. }
  50641. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  50642. if (!noAssert) {
  50643. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  50644. }
  50645. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  50646. return offset + 8
  50647. }
  50648. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  50649. return writeDouble(this, value, offset, true, noAssert)
  50650. }
  50651. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  50652. return writeDouble(this, value, offset, false, noAssert)
  50653. }
  50654. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  50655. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  50656. if (!start) start = 0
  50657. if (!end && end !== 0) end = this.length
  50658. if (targetStart >= target.length) targetStart = target.length
  50659. if (!targetStart) targetStart = 0
  50660. if (end > 0 && end < start) end = start
  50661. // Copy 0 bytes; we're done
  50662. if (end === start) return 0
  50663. if (target.length === 0 || this.length === 0) return 0
  50664. // Fatal error conditions
  50665. if (targetStart < 0) {
  50666. throw new RangeError('targetStart out of bounds')
  50667. }
  50668. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  50669. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  50670. // Are we oob?
  50671. if (end > this.length) end = this.length
  50672. if (target.length - targetStart < end - start) {
  50673. end = target.length - targetStart + start
  50674. }
  50675. var len = end - start
  50676. var i
  50677. if (this === target && start < targetStart && targetStart < end) {
  50678. // descending copy from end
  50679. for (i = len - 1; i >= 0; --i) {
  50680. target[i + targetStart] = this[i + start]
  50681. }
  50682. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  50683. // ascending copy from start
  50684. for (i = 0; i < len; ++i) {
  50685. target[i + targetStart] = this[i + start]
  50686. }
  50687. } else {
  50688. Uint8Array.prototype.set.call(
  50689. target,
  50690. this.subarray(start, start + len),
  50691. targetStart
  50692. )
  50693. }
  50694. return len
  50695. }
  50696. // Usage:
  50697. // buffer.fill(number[, offset[, end]])
  50698. // buffer.fill(buffer[, offset[, end]])
  50699. // buffer.fill(string[, offset[, end]][, encoding])
  50700. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  50701. // Handle string cases:
  50702. if (typeof val === 'string') {
  50703. if (typeof start === 'string') {
  50704. encoding = start
  50705. start = 0
  50706. end = this.length
  50707. } else if (typeof end === 'string') {
  50708. encoding = end
  50709. end = this.length
  50710. }
  50711. if (val.length === 1) {
  50712. var code = val.charCodeAt(0)
  50713. if (code < 256) {
  50714. val = code
  50715. }
  50716. }
  50717. if (encoding !== undefined && typeof encoding !== 'string') {
  50718. throw new TypeError('encoding must be a string')
  50719. }
  50720. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  50721. throw new TypeError('Unknown encoding: ' + encoding)
  50722. }
  50723. } else if (typeof val === 'number') {
  50724. val = val & 255
  50725. }
  50726. // Invalid ranges are not set to a default, so can range check early.
  50727. if (start < 0 || this.length < start || this.length < end) {
  50728. throw new RangeError('Out of range index')
  50729. }
  50730. if (end <= start) {
  50731. return this
  50732. }
  50733. start = start >>> 0
  50734. end = end === undefined ? this.length : end >>> 0
  50735. if (!val) val = 0
  50736. var i
  50737. if (typeof val === 'number') {
  50738. for (i = start; i < end; ++i) {
  50739. this[i] = val
  50740. }
  50741. } else {
  50742. var bytes = Buffer.isBuffer(val)
  50743. ? val
  50744. : utf8ToBytes(new Buffer(val, encoding).toString())
  50745. var len = bytes.length
  50746. for (i = 0; i < end - start; ++i) {
  50747. this[i + start] = bytes[i % len]
  50748. }
  50749. }
  50750. return this
  50751. }
  50752. // HELPER FUNCTIONS
  50753. // ================
  50754. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  50755. function base64clean (str) {
  50756. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  50757. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  50758. // Node converts strings with length < 2 to ''
  50759. if (str.length < 2) return ''
  50760. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  50761. while (str.length % 4 !== 0) {
  50762. str = str + '='
  50763. }
  50764. return str
  50765. }
  50766. function stringtrim (str) {
  50767. if (str.trim) return str.trim()
  50768. return str.replace(/^\s+|\s+$/g, '')
  50769. }
  50770. function toHex (n) {
  50771. if (n < 16) return '0' + n.toString(16)
  50772. return n.toString(16)
  50773. }
  50774. function utf8ToBytes (string, units) {
  50775. units = units || Infinity
  50776. var codePoint
  50777. var length = string.length
  50778. var leadSurrogate = null
  50779. var bytes = []
  50780. for (var i = 0; i < length; ++i) {
  50781. codePoint = string.charCodeAt(i)
  50782. // is surrogate component
  50783. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  50784. // last char was a lead
  50785. if (!leadSurrogate) {
  50786. // no lead yet
  50787. if (codePoint > 0xDBFF) {
  50788. // unexpected trail
  50789. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  50790. continue
  50791. } else if (i + 1 === length) {
  50792. // unpaired lead
  50793. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  50794. continue
  50795. }
  50796. // valid lead
  50797. leadSurrogate = codePoint
  50798. continue
  50799. }
  50800. // 2 leads in a row
  50801. if (codePoint < 0xDC00) {
  50802. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  50803. leadSurrogate = codePoint
  50804. continue
  50805. }
  50806. // valid surrogate pair
  50807. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  50808. } else if (leadSurrogate) {
  50809. // valid bmp char, but last char was a lead
  50810. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  50811. }
  50812. leadSurrogate = null
  50813. // encode utf8
  50814. if (codePoint < 0x80) {
  50815. if ((units -= 1) < 0) break
  50816. bytes.push(codePoint)
  50817. } else if (codePoint < 0x800) {
  50818. if ((units -= 2) < 0) break
  50819. bytes.push(
  50820. codePoint >> 0x6 | 0xC0,
  50821. codePoint & 0x3F | 0x80
  50822. )
  50823. } else if (codePoint < 0x10000) {
  50824. if ((units -= 3) < 0) break
  50825. bytes.push(
  50826. codePoint >> 0xC | 0xE0,
  50827. codePoint >> 0x6 & 0x3F | 0x80,
  50828. codePoint & 0x3F | 0x80
  50829. )
  50830. } else if (codePoint < 0x110000) {
  50831. if ((units -= 4) < 0) break
  50832. bytes.push(
  50833. codePoint >> 0x12 | 0xF0,
  50834. codePoint >> 0xC & 0x3F | 0x80,
  50835. codePoint >> 0x6 & 0x3F | 0x80,
  50836. codePoint & 0x3F | 0x80
  50837. )
  50838. } else {
  50839. throw new Error('Invalid code point')
  50840. }
  50841. }
  50842. return bytes
  50843. }
  50844. function asciiToBytes (str) {
  50845. var byteArray = []
  50846. for (var i = 0; i < str.length; ++i) {
  50847. // Node's code seems to be doing this and not & 0x7F..
  50848. byteArray.push(str.charCodeAt(i) & 0xFF)
  50849. }
  50850. return byteArray
  50851. }
  50852. function utf16leToBytes (str, units) {
  50853. var c, hi, lo
  50854. var byteArray = []
  50855. for (var i = 0; i < str.length; ++i) {
  50856. if ((units -= 2) < 0) break
  50857. c = str.charCodeAt(i)
  50858. hi = c >> 8
  50859. lo = c % 256
  50860. byteArray.push(lo)
  50861. byteArray.push(hi)
  50862. }
  50863. return byteArray
  50864. }
  50865. function base64ToBytes (str) {
  50866. return base64.toByteArray(base64clean(str))
  50867. }
  50868. function blitBuffer (src, dst, offset, length) {
  50869. for (var i = 0; i < length; ++i) {
  50870. if ((i + offset >= dst.length) || (i >= src.length)) break
  50871. dst[i + offset] = src[i]
  50872. }
  50873. return i
  50874. }
  50875. function isnan (val) {
  50876. return val !== val // eslint-disable-line no-self-compare
  50877. }
  50878. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  50879. /***/ }),
  50880. /***/ 91:
  50881. /*!*****************************************!*\
  50882. !*** ./node_modules/base64-js/index.js ***!
  50883. \*****************************************/
  50884. /*! no static exports found */
  50885. /***/ (function(module, exports, __webpack_require__) {
  50886. "use strict";
  50887. exports.byteLength = byteLength
  50888. exports.toByteArray = toByteArray
  50889. exports.fromByteArray = fromByteArray
  50890. var lookup = []
  50891. var revLookup = []
  50892. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  50893. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  50894. for (var i = 0, len = code.length; i < len; ++i) {
  50895. lookup[i] = code[i]
  50896. revLookup[code.charCodeAt(i)] = i
  50897. }
  50898. // Support decoding URL-safe base64 strings, as Node.js does.
  50899. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  50900. revLookup['-'.charCodeAt(0)] = 62
  50901. revLookup['_'.charCodeAt(0)] = 63
  50902. function getLens (b64) {
  50903. var len = b64.length
  50904. if (len % 4 > 0) {
  50905. throw new Error('Invalid string. Length must be a multiple of 4')
  50906. }
  50907. // Trim off extra bytes after placeholder bytes are found
  50908. // See: https://github.com/beatgammit/base64-js/issues/42
  50909. var validLen = b64.indexOf('=')
  50910. if (validLen === -1) validLen = len
  50911. var placeHoldersLen = validLen === len
  50912. ? 0
  50913. : 4 - (validLen % 4)
  50914. return [validLen, placeHoldersLen]
  50915. }
  50916. // base64 is 4/3 + up to two characters of the original data
  50917. function byteLength (b64) {
  50918. var lens = getLens(b64)
  50919. var validLen = lens[0]
  50920. var placeHoldersLen = lens[1]
  50921. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  50922. }
  50923. function _byteLength (b64, validLen, placeHoldersLen) {
  50924. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  50925. }
  50926. function toByteArray (b64) {
  50927. var tmp
  50928. var lens = getLens(b64)
  50929. var validLen = lens[0]
  50930. var placeHoldersLen = lens[1]
  50931. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  50932. var curByte = 0
  50933. // if there are placeholders, only get up to the last complete 4 chars
  50934. var len = placeHoldersLen > 0
  50935. ? validLen - 4
  50936. : validLen
  50937. var i
  50938. for (i = 0; i < len; i += 4) {
  50939. tmp =
  50940. (revLookup[b64.charCodeAt(i)] << 18) |
  50941. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  50942. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  50943. revLookup[b64.charCodeAt(i + 3)]
  50944. arr[curByte++] = (tmp >> 16) & 0xFF
  50945. arr[curByte++] = (tmp >> 8) & 0xFF
  50946. arr[curByte++] = tmp & 0xFF
  50947. }
  50948. if (placeHoldersLen === 2) {
  50949. tmp =
  50950. (revLookup[b64.charCodeAt(i)] << 2) |
  50951. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  50952. arr[curByte++] = tmp & 0xFF
  50953. }
  50954. if (placeHoldersLen === 1) {
  50955. tmp =
  50956. (revLookup[b64.charCodeAt(i)] << 10) |
  50957. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  50958. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  50959. arr[curByte++] = (tmp >> 8) & 0xFF
  50960. arr[curByte++] = tmp & 0xFF
  50961. }
  50962. return arr
  50963. }
  50964. function tripletToBase64 (num) {
  50965. return lookup[num >> 18 & 0x3F] +
  50966. lookup[num >> 12 & 0x3F] +
  50967. lookup[num >> 6 & 0x3F] +
  50968. lookup[num & 0x3F]
  50969. }
  50970. function encodeChunk (uint8, start, end) {
  50971. var tmp
  50972. var output = []
  50973. for (var i = start; i < end; i += 3) {
  50974. tmp =
  50975. ((uint8[i] << 16) & 0xFF0000) +
  50976. ((uint8[i + 1] << 8) & 0xFF00) +
  50977. (uint8[i + 2] & 0xFF)
  50978. output.push(tripletToBase64(tmp))
  50979. }
  50980. return output.join('')
  50981. }
  50982. function fromByteArray (uint8) {
  50983. var tmp
  50984. var len = uint8.length
  50985. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  50986. var parts = []
  50987. var maxChunkLength = 16383 // must be multiple of 3
  50988. // go through the array every three bytes, we'll deal with trailing stuff later
  50989. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  50990. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  50991. }
  50992. // pad the end with zeros, but make sure to not forget the extra bytes
  50993. if (extraBytes === 1) {
  50994. tmp = uint8[len - 1]
  50995. parts.push(
  50996. lookup[tmp >> 2] +
  50997. lookup[(tmp << 4) & 0x3F] +
  50998. '=='
  50999. )
  51000. } else if (extraBytes === 2) {
  51001. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  51002. parts.push(
  51003. lookup[tmp >> 10] +
  51004. lookup[(tmp >> 4) & 0x3F] +
  51005. lookup[(tmp << 2) & 0x3F] +
  51006. '='
  51007. )
  51008. }
  51009. return parts.join('')
  51010. }
  51011. /***/ }),
  51012. /***/ 92:
  51013. /*!***************************************!*\
  51014. !*** ./node_modules/ieee754/index.js ***!
  51015. \***************************************/
  51016. /*! no static exports found */
  51017. /***/ (function(module, exports) {
  51018. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  51019. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  51020. var e, m
  51021. var eLen = (nBytes * 8) - mLen - 1
  51022. var eMax = (1 << eLen) - 1
  51023. var eBias = eMax >> 1
  51024. var nBits = -7
  51025. var i = isLE ? (nBytes - 1) : 0
  51026. var d = isLE ? -1 : 1
  51027. var s = buffer[offset + i]
  51028. i += d
  51029. e = s & ((1 << (-nBits)) - 1)
  51030. s >>= (-nBits)
  51031. nBits += eLen
  51032. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  51033. m = e & ((1 << (-nBits)) - 1)
  51034. e >>= (-nBits)
  51035. nBits += mLen
  51036. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  51037. if (e === 0) {
  51038. e = 1 - eBias
  51039. } else if (e === eMax) {
  51040. return m ? NaN : ((s ? -1 : 1) * Infinity)
  51041. } else {
  51042. m = m + Math.pow(2, mLen)
  51043. e = e - eBias
  51044. }
  51045. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  51046. }
  51047. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  51048. var e, m, c
  51049. var eLen = (nBytes * 8) - mLen - 1
  51050. var eMax = (1 << eLen) - 1
  51051. var eBias = eMax >> 1
  51052. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  51053. var i = isLE ? 0 : (nBytes - 1)
  51054. var d = isLE ? 1 : -1
  51055. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  51056. value = Math.abs(value)
  51057. if (isNaN(value) || value === Infinity) {
  51058. m = isNaN(value) ? 1 : 0
  51059. e = eMax
  51060. } else {
  51061. e = Math.floor(Math.log(value) / Math.LN2)
  51062. if (value * (c = Math.pow(2, -e)) < 1) {
  51063. e--
  51064. c *= 2
  51065. }
  51066. if (e + eBias >= 1) {
  51067. value += rt / c
  51068. } else {
  51069. value += rt * Math.pow(2, 1 - eBias)
  51070. }
  51071. if (value * c >= 2) {
  51072. e++
  51073. c /= 2
  51074. }
  51075. if (e + eBias >= eMax) {
  51076. m = 0
  51077. e = eMax
  51078. } else if (e + eBias >= 1) {
  51079. m = ((value * c) - 1) * Math.pow(2, mLen)
  51080. e = e + eBias
  51081. } else {
  51082. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  51083. e = 0
  51084. }
  51085. }
  51086. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  51087. e = (e << mLen) | m
  51088. eLen += mLen
  51089. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  51090. buffer[offset + i - d] |= s * 128
  51091. }
  51092. /***/ }),
  51093. /***/ 93:
  51094. /*!***************************************!*\
  51095. !*** ./node_modules/isarray/index.js ***!
  51096. \***************************************/
  51097. /*! no static exports found */
  51098. /***/ (function(module, exports) {
  51099. var toString = {}.toString;
  51100. module.exports = Array.isArray || function (arr) {
  51101. return toString.call(arr) == '[object Array]';
  51102. };
  51103. /***/ }),
  51104. /***/ 94:
  51105. /*!*********************************************!*\
  51106. !*** ./node_modules/create-hash/browser.js ***!
  51107. \*********************************************/
  51108. /*! no static exports found */
  51109. /***/ (function(module, exports, __webpack_require__) {
  51110. "use strict";
  51111. var inherits = __webpack_require__(/*! inherits */ 95)
  51112. var MD5 = __webpack_require__(/*! md5.js */ 96)
  51113. var RIPEMD160 = __webpack_require__(/*! ripemd160 */ 114)
  51114. var sha = __webpack_require__(/*! sha.js */ 115)
  51115. var Base = __webpack_require__(/*! cipher-base */ 123)
  51116. function Hash (hash) {
  51117. Base.call(this, 'digest')
  51118. this._hash = hash
  51119. }
  51120. inherits(Hash, Base)
  51121. Hash.prototype._update = function (data) {
  51122. this._hash.update(data)
  51123. }
  51124. Hash.prototype._final = function () {
  51125. return this._hash.digest()
  51126. }
  51127. module.exports = function createHash (alg) {
  51128. alg = alg.toLowerCase()
  51129. if (alg === 'md5') return new MD5()
  51130. if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()
  51131. return new Hash(sha(alg))
  51132. }
  51133. /***/ }),
  51134. /***/ 95:
  51135. /*!***************************************************!*\
  51136. !*** ./node_modules/inherits/inherits_browser.js ***!
  51137. \***************************************************/
  51138. /*! no static exports found */
  51139. /***/ (function(module, exports) {
  51140. if (typeof Object.create === 'function') {
  51141. // implementation from standard node.js 'util' module
  51142. module.exports = function inherits(ctor, superCtor) {
  51143. if (superCtor) {
  51144. ctor.super_ = superCtor
  51145. ctor.prototype = Object.create(superCtor.prototype, {
  51146. constructor: {
  51147. value: ctor,
  51148. enumerable: false,
  51149. writable: true,
  51150. configurable: true
  51151. }
  51152. })
  51153. }
  51154. };
  51155. } else {
  51156. // old school shim for old browsers
  51157. module.exports = function inherits(ctor, superCtor) {
  51158. if (superCtor) {
  51159. ctor.super_ = superCtor
  51160. var TempCtor = function () {}
  51161. TempCtor.prototype = superCtor.prototype
  51162. ctor.prototype = new TempCtor()
  51163. ctor.prototype.constructor = ctor
  51164. }
  51165. }
  51166. }
  51167. /***/ }),
  51168. /***/ 957:
  51169. /*!*******************************************************************!*\
  51170. !*** E:/yunfei/product1/bigDataApp/uview-ui/libs/util/emitter.js ***!
  51171. \*******************************************************************/
  51172. /*! no static exports found */
  51173. /***/ (function(module, exports, __webpack_require__) {
  51174. "use strict";
  51175. Object.defineProperty(exports, "__esModule", {
  51176. value: true
  51177. });
  51178. exports.default = void 0;
  51179. /**
  51180. * 递归使用 call 方式this指向
  51181. * @param componentName // 需要找的组件的名称
  51182. * @param eventName // 事件名称
  51183. * @param params // 需要传递的参数
  51184. */
  51185. function _broadcast(componentName, eventName, params) {
  51186. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  51187. this.$children.map(function (child) {
  51188. if (componentName === child.$options.name) {
  51189. child.$emit.apply(child, [eventName].concat(params));
  51190. } else {
  51191. _broadcast.apply(child, [componentName, eventName].concat(params));
  51192. }
  51193. });
  51194. }
  51195. var _default = {
  51196. methods: {
  51197. /**
  51198. * 派发 (向上查找) (一个)
  51199. * @param componentName // 需要找的组件的名称
  51200. * @param eventName // 事件名称
  51201. * @param params // 需要传递的参数
  51202. */
  51203. dispatch: function dispatch(componentName, eventName, params) {
  51204. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  51205. var name = parent.$options.name; // 获取当前组件实例的name
  51206. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  51207. // 循环出当前名称的一样的组件实例
  51208. while (parent && (!name || name !== componentName)) {
  51209. parent = parent.$parent;
  51210. if (parent) {
  51211. name = parent.$options.name;
  51212. }
  51213. }
  51214. // 有节点表示当前找到了name一样的实例
  51215. if (parent) {
  51216. parent.$emit.apply(parent, [eventName].concat(params));
  51217. }
  51218. },
  51219. /**
  51220. * 广播 (向下查找) (广播多个)
  51221. * @param componentName // 需要找的组件的名称
  51222. * @param eventName // 事件名称
  51223. * @param params // 需要传递的参数
  51224. */
  51225. broadcast: function broadcast(componentName, eventName, params) {
  51226. _broadcast.call(this, componentName, eventName, params);
  51227. }
  51228. }
  51229. };
  51230. exports.default = _default;
  51231. /***/ }),
  51232. /***/ 96:
  51233. /*!**************************************!*\
  51234. !*** ./node_modules/md5.js/index.js ***!
  51235. \**************************************/
  51236. /*! no static exports found */
  51237. /***/ (function(module, exports, __webpack_require__) {
  51238. "use strict";
  51239. var inherits = __webpack_require__(/*! inherits */ 95)
  51240. var HashBase = __webpack_require__(/*! hash-base */ 97)
  51241. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  51242. var ARRAY16 = new Array(16)
  51243. function MD5 () {
  51244. HashBase.call(this, 64)
  51245. // state
  51246. this._a = 0x67452301
  51247. this._b = 0xefcdab89
  51248. this._c = 0x98badcfe
  51249. this._d = 0x10325476
  51250. }
  51251. inherits(MD5, HashBase)
  51252. MD5.prototype._update = function () {
  51253. var M = ARRAY16
  51254. for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)
  51255. var a = this._a
  51256. var b = this._b
  51257. var c = this._c
  51258. var d = this._d
  51259. a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)
  51260. d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)
  51261. c = fnF(c, d, a, b, M[2], 0x242070db, 17)
  51262. b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)
  51263. a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)
  51264. d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)
  51265. c = fnF(c, d, a, b, M[6], 0xa8304613, 17)
  51266. b = fnF(b, c, d, a, M[7], 0xfd469501, 22)
  51267. a = fnF(a, b, c, d, M[8], 0x698098d8, 7)
  51268. d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)
  51269. c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)
  51270. b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)
  51271. a = fnF(a, b, c, d, M[12], 0x6b901122, 7)
  51272. d = fnF(d, a, b, c, M[13], 0xfd987193, 12)
  51273. c = fnF(c, d, a, b, M[14], 0xa679438e, 17)
  51274. b = fnF(b, c, d, a, M[15], 0x49b40821, 22)
  51275. a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)
  51276. d = fnG(d, a, b, c, M[6], 0xc040b340, 9)
  51277. c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)
  51278. b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)
  51279. a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)
  51280. d = fnG(d, a, b, c, M[10], 0x02441453, 9)
  51281. c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)
  51282. b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)
  51283. a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)
  51284. d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)
  51285. c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)
  51286. b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)
  51287. a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)
  51288. d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)
  51289. c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)
  51290. b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)
  51291. a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)
  51292. d = fnH(d, a, b, c, M[8], 0x8771f681, 11)
  51293. c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)
  51294. b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)
  51295. a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)
  51296. d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)
  51297. c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)
  51298. b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)
  51299. a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)
  51300. d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)
  51301. c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)
  51302. b = fnH(b, c, d, a, M[6], 0x04881d05, 23)
  51303. a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)
  51304. d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)
  51305. c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)
  51306. b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)
  51307. a = fnI(a, b, c, d, M[0], 0xf4292244, 6)
  51308. d = fnI(d, a, b, c, M[7], 0x432aff97, 10)
  51309. c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)
  51310. b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)
  51311. a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)
  51312. d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)
  51313. c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)
  51314. b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)
  51315. a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)
  51316. d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)
  51317. c = fnI(c, d, a, b, M[6], 0xa3014314, 15)
  51318. b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)
  51319. a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)
  51320. d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)
  51321. c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)
  51322. b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)
  51323. this._a = (this._a + a) | 0
  51324. this._b = (this._b + b) | 0
  51325. this._c = (this._c + c) | 0
  51326. this._d = (this._d + d) | 0
  51327. }
  51328. MD5.prototype._digest = function () {
  51329. // create padding and handle blocks
  51330. this._block[this._blockOffset++] = 0x80
  51331. if (this._blockOffset > 56) {
  51332. this._block.fill(0, this._blockOffset, 64)
  51333. this._update()
  51334. this._blockOffset = 0
  51335. }
  51336. this._block.fill(0, this._blockOffset, 56)
  51337. this._block.writeUInt32LE(this._length[0], 56)
  51338. this._block.writeUInt32LE(this._length[1], 60)
  51339. this._update()
  51340. // produce result
  51341. var buffer = Buffer.allocUnsafe(16)
  51342. buffer.writeInt32LE(this._a, 0)
  51343. buffer.writeInt32LE(this._b, 4)
  51344. buffer.writeInt32LE(this._c, 8)
  51345. buffer.writeInt32LE(this._d, 12)
  51346. return buffer
  51347. }
  51348. function rotl (x, n) {
  51349. return (x << n) | (x >>> (32 - n))
  51350. }
  51351. function fnF (a, b, c, d, m, k, s) {
  51352. return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0
  51353. }
  51354. function fnG (a, b, c, d, m, k, s) {
  51355. return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0
  51356. }
  51357. function fnH (a, b, c, d, m, k, s) {
  51358. return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0
  51359. }
  51360. function fnI (a, b, c, d, m, k, s) {
  51361. return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0
  51362. }
  51363. module.exports = MD5
  51364. /***/ }),
  51365. /***/ 97:
  51366. /*!*****************************************!*\
  51367. !*** ./node_modules/hash-base/index.js ***!
  51368. \*****************************************/
  51369. /*! no static exports found */
  51370. /***/ (function(module, exports, __webpack_require__) {
  51371. "use strict";
  51372. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer
  51373. var Transform = __webpack_require__(/*! readable-stream */ 98).Transform
  51374. var inherits = __webpack_require__(/*! inherits */ 95)
  51375. function throwIfNotStringOrBuffer (val, prefix) {
  51376. if (!Buffer.isBuffer(val) && typeof val !== 'string') {
  51377. throw new TypeError(prefix + ' must be a string or a buffer')
  51378. }
  51379. }
  51380. function HashBase (blockSize) {
  51381. Transform.call(this)
  51382. this._block = Buffer.allocUnsafe(blockSize)
  51383. this._blockSize = blockSize
  51384. this._blockOffset = 0
  51385. this._length = [0, 0, 0, 0]
  51386. this._finalized = false
  51387. }
  51388. inherits(HashBase, Transform)
  51389. HashBase.prototype._transform = function (chunk, encoding, callback) {
  51390. var error = null
  51391. try {
  51392. this.update(chunk, encoding)
  51393. } catch (err) {
  51394. error = err
  51395. }
  51396. callback(error)
  51397. }
  51398. HashBase.prototype._flush = function (callback) {
  51399. var error = null
  51400. try {
  51401. this.push(this.digest())
  51402. } catch (err) {
  51403. error = err
  51404. }
  51405. callback(error)
  51406. }
  51407. HashBase.prototype.update = function (data, encoding) {
  51408. throwIfNotStringOrBuffer(data, 'Data')
  51409. if (this._finalized) throw new Error('Digest already called')
  51410. if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)
  51411. // consume data
  51412. var block = this._block
  51413. var offset = 0
  51414. while (this._blockOffset + data.length - offset >= this._blockSize) {
  51415. for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
  51416. this._update()
  51417. this._blockOffset = 0
  51418. }
  51419. while (offset < data.length) block[this._blockOffset++] = data[offset++]
  51420. // update length
  51421. for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
  51422. this._length[j] += carry
  51423. carry = (this._length[j] / 0x0100000000) | 0
  51424. if (carry > 0) this._length[j] -= 0x0100000000 * carry
  51425. }
  51426. return this
  51427. }
  51428. HashBase.prototype._update = function () {
  51429. throw new Error('_update is not implemented')
  51430. }
  51431. HashBase.prototype.digest = function (encoding) {
  51432. if (this._finalized) throw new Error('Digest already called')
  51433. this._finalized = true
  51434. var digest = this._digest()
  51435. if (encoding !== undefined) digest = digest.toString(encoding)
  51436. // reset state
  51437. this._block.fill(0)
  51438. this._blockOffset = 0
  51439. for (var i = 0; i < 4; ++i) this._length[i] = 0
  51440. return digest
  51441. }
  51442. HashBase.prototype._digest = function () {
  51443. throw new Error('_digest is not implemented')
  51444. }
  51445. module.exports = HashBase
  51446. /***/ }),
  51447. /***/ 98:
  51448. /*!**********************************************************!*\
  51449. !*** ./node_modules/readable-stream/readable-browser.js ***!
  51450. \**********************************************************/
  51451. /*! no static exports found */
  51452. /***/ (function(module, exports, __webpack_require__) {
  51453. exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ 99);
  51454. exports.Stream = exports;
  51455. exports.Readable = exports;
  51456. exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ 109);
  51457. exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ 108);
  51458. exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ 112);
  51459. exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ 113);
  51460. /***/ }),
  51461. /***/ 99:
  51462. /*!**************************************************************!*\
  51463. !*** ./node_modules/readable-stream/lib/_stream_readable.js ***!
  51464. \**************************************************************/
  51465. /*! no static exports found */
  51466. /***/ (function(module, exports, __webpack_require__) {
  51467. "use strict";
  51468. /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
  51469. //
  51470. // Permission is hereby granted, free of charge, to any person obtaining a
  51471. // copy of this software and associated documentation files (the
  51472. // "Software"), to deal in the Software without restriction, including
  51473. // without limitation the rights to use, copy, modify, merge, publish,
  51474. // distribute, sublicense, and/or sell copies of the Software, and to permit
  51475. // persons to whom the Software is furnished to do so, subject to the
  51476. // following conditions:
  51477. //
  51478. // The above copyright notice and this permission notice shall be included
  51479. // in all copies or substantial portions of the Software.
  51480. //
  51481. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  51482. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  51483. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  51484. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  51485. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  51486. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  51487. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  51488. /*<replacement>*/
  51489. var pna = __webpack_require__(/*! process-nextick-args */ 100);
  51490. /*</replacement>*/
  51491. module.exports = Readable;
  51492. /*<replacement>*/
  51493. var isArray = __webpack_require__(/*! isarray */ 93);
  51494. /*</replacement>*/
  51495. /*<replacement>*/
  51496. var Duplex;
  51497. /*</replacement>*/
  51498. Readable.ReadableState = ReadableState;
  51499. /*<replacement>*/
  51500. var EE = __webpack_require__(/*! events */ 101).EventEmitter;
  51501. var EElistenerCount = function (emitter, type) {
  51502. return emitter.listeners(type).length;
  51503. };
  51504. /*</replacement>*/
  51505. /*<replacement>*/
  51506. var Stream = __webpack_require__(/*! ./internal/streams/stream */ 102);
  51507. /*</replacement>*/
  51508. /*<replacement>*/
  51509. var Buffer = __webpack_require__(/*! safe-buffer */ 89).Buffer;
  51510. var OurUint8Array = global.Uint8Array || function () {};
  51511. function _uint8ArrayToBuffer(chunk) {
  51512. return Buffer.from(chunk);
  51513. }
  51514. function _isUint8Array(obj) {
  51515. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  51516. }
  51517. /*</replacement>*/
  51518. /*<replacement>*/
  51519. var util = Object.create(__webpack_require__(/*! core-util-is */ 103));
  51520. util.inherits = __webpack_require__(/*! inherits */ 95);
  51521. /*</replacement>*/
  51522. /*<replacement>*/
  51523. var debugUtil = __webpack_require__(/*! util */ 104);
  51524. var debug = void 0;
  51525. if (debugUtil && debugUtil.debuglog) {
  51526. debug = debugUtil.debuglog('stream');
  51527. } else {
  51528. debug = function () {};
  51529. }
  51530. /*</replacement>*/
  51531. var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ 105);
  51532. var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ 107);
  51533. var StringDecoder;
  51534. util.inherits(Readable, Stream);
  51535. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  51536. function prependListener(emitter, event, fn) {
  51537. // Sadly this is not cacheable as some libraries bundle their own
  51538. // event emitter implementation with them.
  51539. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
  51540. // This is a hack to make sure that our error handler is attached before any
  51541. // userland ones. NEVER DO THIS. This is here only because this code needs
  51542. // to continue to work with older versions of Node.js that do not include
  51543. // the prependListener() method. The goal is to eventually remove this hack.
  51544. 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]];
  51545. }
  51546. function ReadableState(options, stream) {
  51547. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 108);
  51548. options = options || {};
  51549. // Duplex streams are both readable and writable, but share
  51550. // the same options object.
  51551. // However, some cases require setting options to different
  51552. // values for the readable and the writable sides of the duplex stream.
  51553. // These options can be provided separately as readableXXX and writableXXX.
  51554. var isDuplex = stream instanceof Duplex;
  51555. // object stream flag. Used to make read(n) ignore n and to
  51556. // make all the buffer merging and length checks go away
  51557. this.objectMode = !!options.objectMode;
  51558. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
  51559. // the point at which it stops calling _read() to fill the buffer
  51560. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  51561. var hwm = options.highWaterMark;
  51562. var readableHwm = options.readableHighWaterMark;
  51563. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  51564. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
  51565. // cast to ints.
  51566. this.highWaterMark = Math.floor(this.highWaterMark);
  51567. // A linked list is used to store data chunks instead of an array because the
  51568. // linked list can remove elements from the beginning faster than
  51569. // array.shift()
  51570. this.buffer = new BufferList();
  51571. this.length = 0;
  51572. this.pipes = null;
  51573. this.pipesCount = 0;
  51574. this.flowing = null;
  51575. this.ended = false;
  51576. this.endEmitted = false;
  51577. this.reading = false;
  51578. // a flag to be able to tell if the event 'readable'/'data' is emitted
  51579. // immediately, or on a later tick. We set this to true at first, because
  51580. // any actions that shouldn't happen until "later" should generally also
  51581. // not happen before the first read call.
  51582. this.sync = true;
  51583. // whenever we return null, then we set a flag to say
  51584. // that we're awaiting a 'readable' event emission.
  51585. this.needReadable = false;
  51586. this.emittedReadable = false;
  51587. this.readableListening = false;
  51588. this.resumeScheduled = false;
  51589. // has it been destroyed
  51590. this.destroyed = false;
  51591. // Crypto is kind of old and crusty. Historically, its default string
  51592. // encoding is 'binary' so we have to make this configurable.
  51593. // Everything else in the universe uses 'utf8', though.
  51594. this.defaultEncoding = options.defaultEncoding || 'utf8';
  51595. // the number of writers that are awaiting a drain event in .pipe()s
  51596. this.awaitDrain = 0;
  51597. // if true, a maybeReadMore has been scheduled
  51598. this.readingMore = false;
  51599. this.decoder = null;
  51600. this.encoding = null;
  51601. if (options.encoding) {
  51602. if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 111).StringDecoder;
  51603. this.decoder = new StringDecoder(options.encoding);
  51604. this.encoding = options.encoding;
  51605. }
  51606. }
  51607. function Readable(options) {
  51608. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ 108);
  51609. if (!(this instanceof Readable)) return new Readable(options);
  51610. this._readableState = new ReadableState(options, this);
  51611. // legacy
  51612. this.readable = true;
  51613. if (options) {
  51614. if (typeof options.read === 'function') this._read = options.read;
  51615. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  51616. }
  51617. Stream.call(this);
  51618. }
  51619. Object.defineProperty(Readable.prototype, 'destroyed', {
  51620. get: function () {
  51621. if (this._readableState === undefined) {
  51622. return false;
  51623. }
  51624. return this._readableState.destroyed;
  51625. },
  51626. set: function (value) {
  51627. // we ignore the value if the stream
  51628. // has not been initialized yet
  51629. if (!this._readableState) {
  51630. return;
  51631. }
  51632. // backward compatibility, the user is explicitly
  51633. // managing destroyed
  51634. this._readableState.destroyed = value;
  51635. }
  51636. });
  51637. Readable.prototype.destroy = destroyImpl.destroy;
  51638. Readable.prototype._undestroy = destroyImpl.undestroy;
  51639. Readable.prototype._destroy = function (err, cb) {
  51640. this.push(null);
  51641. cb(err);
  51642. };
  51643. // Manually shove something into the read() buffer.
  51644. // This returns true if the highWaterMark has not been hit yet,
  51645. // similar to how Writable.write() returns true if you should
  51646. // write() some more.
  51647. Readable.prototype.push = function (chunk, encoding) {
  51648. var state = this._readableState;
  51649. var skipChunkCheck;
  51650. if (!state.objectMode) {
  51651. if (typeof chunk === 'string') {
  51652. encoding = encoding || state.defaultEncoding;
  51653. if (encoding !== state.encoding) {
  51654. chunk = Buffer.from(chunk, encoding);
  51655. encoding = '';
  51656. }
  51657. skipChunkCheck = true;
  51658. }
  51659. } else {
  51660. skipChunkCheck = true;
  51661. }
  51662. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  51663. };
  51664. // Unshift should *always* be something directly out of read()
  51665. Readable.prototype.unshift = function (chunk) {
  51666. return readableAddChunk(this, chunk, null, true, false);
  51667. };
  51668. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  51669. var state = stream._readableState;
  51670. if (chunk === null) {
  51671. state.reading = false;
  51672. onEofChunk(stream, state);
  51673. } else {
  51674. var er;
  51675. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  51676. if (er) {
  51677. stream.emit('error', er);
  51678. } else if (state.objectMode || chunk && chunk.length > 0) {
  51679. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  51680. chunk = _uint8ArrayToBuffer(chunk);
  51681. }
  51682. if (addToFront) {
  51683. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  51684. } else if (state.ended) {
  51685. stream.emit('error', new Error('stream.push() after EOF'));
  51686. } else {
  51687. state.reading = false;
  51688. if (state.decoder && !encoding) {
  51689. chunk = state.decoder.write(chunk);
  51690. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  51691. } else {
  51692. addChunk(stream, state, chunk, false);
  51693. }
  51694. }
  51695. } else if (!addToFront) {
  51696. state.reading = false;
  51697. }
  51698. }
  51699. return needMoreData(state);
  51700. }
  51701. function addChunk(stream, state, chunk, addToFront) {
  51702. if (state.flowing && state.length === 0 && !state.sync) {
  51703. stream.emit('data', chunk);
  51704. stream.read(0);
  51705. } else {
  51706. // update the buffer info.
  51707. state.length += state.objectMode ? 1 : chunk.length;
  51708. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  51709. if (state.needReadable) emitReadable(stream);
  51710. }
  51711. maybeReadMore(stream, state);
  51712. }
  51713. function chunkInvalid(state, chunk) {
  51714. var er;
  51715. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  51716. er = new TypeError('Invalid non-string/buffer chunk');
  51717. }
  51718. return er;
  51719. }
  51720. // if it's past the high water mark, we can push in some more.
  51721. // Also, if we have no data yet, we can stand some
  51722. // more bytes. This is to work around cases where hwm=0,
  51723. // such as the repl. Also, if the push() triggered a
  51724. // readable event, and the user called read(largeNumber) such that
  51725. // needReadable was set, then we ought to push more, so that another
  51726. // 'readable' event will be triggered.
  51727. function needMoreData(state) {
  51728. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  51729. }
  51730. Readable.prototype.isPaused = function () {
  51731. return this._readableState.flowing === false;
  51732. };
  51733. // backwards compatibility.
  51734. Readable.prototype.setEncoding = function (enc) {
  51735. if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ 111).StringDecoder;
  51736. this._readableState.decoder = new StringDecoder(enc);
  51737. this._readableState.encoding = enc;
  51738. return this;
  51739. };
  51740. // Don't raise the hwm > 8MB
  51741. var MAX_HWM = 0x800000;
  51742. function computeNewHighWaterMark(n) {
  51743. if (n >= MAX_HWM) {
  51744. n = MAX_HWM;
  51745. } else {
  51746. // Get the next highest power of 2 to prevent increasing hwm excessively in
  51747. // tiny amounts
  51748. n--;
  51749. n |= n >>> 1;
  51750. n |= n >>> 2;
  51751. n |= n >>> 4;
  51752. n |= n >>> 8;
  51753. n |= n >>> 16;
  51754. n++;
  51755. }
  51756. return n;
  51757. }
  51758. // This function is designed to be inlinable, so please take care when making
  51759. // changes to the function body.
  51760. function howMuchToRead(n, state) {
  51761. if (n <= 0 || state.length === 0 && state.ended) return 0;
  51762. if (state.objectMode) return 1;
  51763. if (n !== n) {
  51764. // Only flow one buffer at a time
  51765. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  51766. }
  51767. // If we're asking for more than the current hwm, then raise the hwm.
  51768. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  51769. if (n <= state.length) return n;
  51770. // Don't have enough
  51771. if (!state.ended) {
  51772. state.needReadable = true;
  51773. return 0;
  51774. }
  51775. return state.length;
  51776. }
  51777. // you can override either this method, or the async _read(n) below.
  51778. Readable.prototype.read = function (n) {
  51779. debug('read', n);
  51780. n = parseInt(n, 10);
  51781. var state = this._readableState;
  51782. var nOrig = n;
  51783. if (n !== 0) state.emittedReadable = false;
  51784. // if we're doing read(0) to trigger a readable event, but we
  51785. // already have a bunch of data in the buffer, then just trigger
  51786. // the 'readable' event and move on.
  51787. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  51788. debug('read: emitReadable', state.length, state.ended);
  51789. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  51790. return null;
  51791. }
  51792. n = howMuchToRead(n, state);
  51793. // if we've ended, and we're now clear, then finish it up.
  51794. if (n === 0 && state.ended) {
  51795. if (state.length === 0) endReadable(this);
  51796. return null;
  51797. }
  51798. // All the actual chunk generation logic needs to be
  51799. // *below* the call to _read. The reason is that in certain
  51800. // synthetic stream cases, such as passthrough streams, _read
  51801. // may be a completely synchronous operation which may change
  51802. // the state of the read buffer, providing enough data when
  51803. // before there was *not* enough.
  51804. //
  51805. // So, the steps are:
  51806. // 1. Figure out what the state of things will be after we do
  51807. // a read from the buffer.
  51808. //
  51809. // 2. If that resulting state will trigger a _read, then call _read.
  51810. // Note that this may be asynchronous, or synchronous. Yes, it is
  51811. // deeply ugly to write APIs this way, but that still doesn't mean
  51812. // that the Readable class should behave improperly, as streams are
  51813. // designed to be sync/async agnostic.
  51814. // Take note if the _read call is sync or async (ie, if the read call
  51815. // has returned yet), so that we know whether or not it's safe to emit
  51816. // 'readable' etc.
  51817. //
  51818. // 3. Actually pull the requested chunks out of the buffer and return.
  51819. // if we need a readable event, then we need to do some reading.
  51820. var doRead = state.needReadable;
  51821. debug('need readable', doRead);
  51822. // if we currently have less than the highWaterMark, then also read some
  51823. if (state.length === 0 || state.length - n < state.highWaterMark) {
  51824. doRead = true;
  51825. debug('length less than watermark', doRead);
  51826. }
  51827. // however, if we've ended, then there's no point, and if we're already
  51828. // reading, then it's unnecessary.
  51829. if (state.ended || state.reading) {
  51830. doRead = false;
  51831. debug('reading or ended', doRead);
  51832. } else if (doRead) {
  51833. debug('do read');
  51834. state.reading = true;
  51835. state.sync = true;
  51836. // if the length is currently zero, then we *need* a readable event.
  51837. if (state.length === 0) state.needReadable = true;
  51838. // call internal read method
  51839. this._read(state.highWaterMark);
  51840. state.sync = false;
  51841. // If _read pushed data synchronously, then `reading` will be false,
  51842. // and we need to re-evaluate how much data we can return to the user.
  51843. if (!state.reading) n = howMuchToRead(nOrig, state);
  51844. }
  51845. var ret;
  51846. if (n > 0) ret = fromList(n, state);else ret = null;
  51847. if (ret === null) {
  51848. state.needReadable = true;
  51849. n = 0;
  51850. } else {
  51851. state.length -= n;
  51852. }
  51853. if (state.length === 0) {
  51854. // If we have nothing in the buffer, then we want to know
  51855. // as soon as we *do* get something into the buffer.
  51856. if (!state.ended) state.needReadable = true;
  51857. // If we tried to read() past the EOF, then emit end on the next tick.
  51858. if (nOrig !== n && state.ended) endReadable(this);
  51859. }
  51860. if (ret !== null) this.emit('data', ret);
  51861. return ret;
  51862. };
  51863. function onEofChunk(stream, state) {
  51864. if (state.ended) return;
  51865. if (state.decoder) {
  51866. var chunk = state.decoder.end();
  51867. if (chunk && chunk.length) {
  51868. state.buffer.push(chunk);
  51869. state.length += state.objectMode ? 1 : chunk.length;
  51870. }
  51871. }
  51872. state.ended = true;
  51873. // emit 'readable' now to make sure it gets picked up.
  51874. emitReadable(stream);
  51875. }
  51876. // Don't emit readable right away in sync mode, because this can trigger
  51877. // another read() call => stack overflow. This way, it might trigger
  51878. // a nextTick recursion warning, but that's not so bad.
  51879. function emitReadable(stream) {
  51880. var state = stream._readableState;
  51881. state.needReadable = false;
  51882. if (!state.emittedReadable) {
  51883. debug('emitReadable', state.flowing);
  51884. state.emittedReadable = true;
  51885. if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  51886. }
  51887. }
  51888. function emitReadable_(stream) {
  51889. debug('emit readable');
  51890. stream.emit('readable');
  51891. flow(stream);
  51892. }
  51893. // at this point, the user has presumably seen the 'readable' event,
  51894. // and called read() to consume some data. that may have triggered
  51895. // in turn another _read(n) call, in which case reading = true if
  51896. // it's in progress.
  51897. // However, if we're not ended, or reading, and the length < hwm,
  51898. // then go ahead and try to read some more preemptively.
  51899. function maybeReadMore(stream, state) {
  51900. if (!state.readingMore) {
  51901. state.readingMore = true;
  51902. pna.nextTick(maybeReadMore_, stream, state);
  51903. }
  51904. }
  51905. function maybeReadMore_(stream, state) {
  51906. var len = state.length;
  51907. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  51908. debug('maybeReadMore read 0');
  51909. stream.read(0);
  51910. if (len === state.length)
  51911. // didn't get any data, stop spinning.
  51912. break;else len = state.length;
  51913. }
  51914. state.readingMore = false;
  51915. }
  51916. // abstract method. to be overridden in specific implementation classes.
  51917. // call cb(er, data) where data is <= n in length.
  51918. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  51919. // arbitrary, and perhaps not very meaningful.
  51920. Readable.prototype._read = function (n) {
  51921. this.emit('error', new Error('_read() is not implemented'));
  51922. };
  51923. Readable.prototype.pipe = function (dest, pipeOpts) {
  51924. var src = this;
  51925. var state = this._readableState;
  51926. switch (state.pipesCount) {
  51927. case 0:
  51928. state.pipes = dest;
  51929. break;
  51930. case 1:
  51931. state.pipes = [state.pipes, dest];
  51932. break;
  51933. default:
  51934. state.pipes.push(dest);
  51935. break;
  51936. }
  51937. state.pipesCount += 1;
  51938. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  51939. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  51940. var endFn = doEnd ? onend : unpipe;
  51941. if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
  51942. dest.on('unpipe', onunpipe);
  51943. function onunpipe(readable, unpipeInfo) {
  51944. debug('onunpipe');
  51945. if (readable === src) {
  51946. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  51947. unpipeInfo.hasUnpiped = true;
  51948. cleanup();
  51949. }
  51950. }
  51951. }
  51952. function onend() {
  51953. debug('onend');
  51954. dest.end();
  51955. }
  51956. // when the dest drains, it reduces the awaitDrain counter
  51957. // on the source. This would be more elegant with a .once()
  51958. // handler in flow(), but adding and removing repeatedly is
  51959. // too slow.
  51960. var ondrain = pipeOnDrain(src);
  51961. dest.on('drain', ondrain);
  51962. var cleanedUp = false;
  51963. function cleanup() {
  51964. debug('cleanup');
  51965. // cleanup event handlers once the pipe is broken
  51966. dest.removeListener('close', onclose);
  51967. dest.removeListener('finish', onfinish);
  51968. dest.removeListener('drain', ondrain);
  51969. dest.removeListener('error', onerror);
  51970. dest.removeListener('unpipe', onunpipe);
  51971. src.removeListener('end', onend);
  51972. src.removeListener('end', unpipe);
  51973. src.removeListener('data', ondata);
  51974. cleanedUp = true;
  51975. // if the reader is waiting for a drain event from this
  51976. // specific writer, then it would cause it to never start
  51977. // flowing again.
  51978. // So, if this is awaiting a drain, then we just call it now.
  51979. // If we don't know, then assume that we are waiting for one.
  51980. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  51981. }
  51982. // If the user pushes more data while we're writing to dest then we'll end up
  51983. // in ondata again. However, we only want to increase awaitDrain once because
  51984. // dest will only emit one 'drain' event for the multiple writes.
  51985. // => Introduce a guard on increasing awaitDrain.
  51986. var increasedAwaitDrain = false;
  51987. src.on('data', ondata);
  51988. function ondata(chunk) {
  51989. debug('ondata');
  51990. increasedAwaitDrain = false;
  51991. var ret = dest.write(chunk);
  51992. if (false === ret && !increasedAwaitDrain) {
  51993. // If the user unpiped during `dest.write()`, it is possible
  51994. // to get stuck in a permanently paused state if that write
  51995. // also returned false.
  51996. // => Check whether `dest` is still a piping destination.
  51997. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  51998. debug('false write response, pause', src._readableState.awaitDrain);
  51999. src._readableState.awaitDrain++;
  52000. increasedAwaitDrain = true;
  52001. }
  52002. src.pause();
  52003. }
  52004. }
  52005. // if the dest has an error, then stop piping into it.
  52006. // however, don't suppress the throwing behavior for this.
  52007. function onerror(er) {
  52008. debug('onerror', er);
  52009. unpipe();
  52010. dest.removeListener('error', onerror);
  52011. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  52012. }
  52013. // Make sure our error handler is attached before userland ones.
  52014. prependListener(dest, 'error', onerror);
  52015. // Both close and finish should trigger unpipe, but only once.
  52016. function onclose() {
  52017. dest.removeListener('finish', onfinish);
  52018. unpipe();
  52019. }
  52020. dest.once('close', onclose);
  52021. function onfinish() {
  52022. debug('onfinish');
  52023. dest.removeListener('close', onclose);
  52024. unpipe();
  52025. }
  52026. dest.once('finish', onfinish);
  52027. function unpipe() {
  52028. debug('unpipe');
  52029. src.unpipe(dest);
  52030. }
  52031. // tell the dest that it's being piped to
  52032. dest.emit('pipe', src);
  52033. // start the flow if it hasn't been started already.
  52034. if (!state.flowing) {
  52035. debug('pipe resume');
  52036. src.resume();
  52037. }
  52038. return dest;
  52039. };
  52040. function pipeOnDrain(src) {
  52041. return function () {
  52042. var state = src._readableState;
  52043. debug('pipeOnDrain', state.awaitDrain);
  52044. if (state.awaitDrain) state.awaitDrain--;
  52045. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  52046. state.flowing = true;
  52047. flow(src);
  52048. }
  52049. };
  52050. }
  52051. Readable.prototype.unpipe = function (dest) {
  52052. var state = this._readableState;
  52053. var unpipeInfo = { hasUnpiped: false };
  52054. // if we're not piping anywhere, then do nothing.
  52055. if (state.pipesCount === 0) return this;
  52056. // just one destination. most common case.
  52057. if (state.pipesCount === 1) {
  52058. // passed in one, but it's not the right one.
  52059. if (dest && dest !== state.pipes) return this;
  52060. if (!dest) dest = state.pipes;
  52061. // got a match.
  52062. state.pipes = null;
  52063. state.pipesCount = 0;
  52064. state.flowing = false;
  52065. if (dest) dest.emit('unpipe', this, unpipeInfo);
  52066. return this;
  52067. }
  52068. // slow case. multiple pipe destinations.
  52069. if (!dest) {
  52070. // remove all.
  52071. var dests = state.pipes;
  52072. var len = state.pipesCount;
  52073. state.pipes = null;
  52074. state.pipesCount = 0;
  52075. state.flowing = false;
  52076. for (var i = 0; i < len; i++) {
  52077. dests[i].emit('unpipe', this, unpipeInfo);
  52078. }return this;
  52079. }
  52080. // try to find the right one.
  52081. var index = indexOf(state.pipes, dest);
  52082. if (index === -1) return this;
  52083. state.pipes.splice(index, 1);
  52084. state.pipesCount -= 1;
  52085. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  52086. dest.emit('unpipe', this, unpipeInfo);
  52087. return this;
  52088. };
  52089. // set up data events if they are asked for
  52090. // Ensure readable listeners eventually get something
  52091. Readable.prototype.on = function (ev, fn) {
  52092. var res = Stream.prototype.on.call(this, ev, fn);
  52093. if (ev === 'data') {
  52094. // Start flowing on next tick if stream isn't explicitly paused
  52095. if (this._readableState.flowing !== false) this.resume();
  52096. } else if (ev === 'readable') {
  52097. var state = this._readableState;
  52098. if (!state.endEmitted && !state.readableListening) {
  52099. state.readableListening = state.needReadable = true;
  52100. state.emittedReadable = false;
  52101. if (!state.reading) {
  52102. pna.nextTick(nReadingNextTick, this);
  52103. } else if (state.length) {
  52104. emitReadable(this);
  52105. }
  52106. }
  52107. }
  52108. return res;
  52109. };
  52110. Readable.prototype.addListener = Readable.prototype.on;
  52111. function nReadingNextTick(self) {
  52112. debug('readable nexttick read 0');
  52113. self.read(0);
  52114. }
  52115. // pause() and resume() are remnants of the legacy readable stream API
  52116. // If the user uses them, then switch into old mode.
  52117. Readable.prototype.resume = function () {
  52118. var state = this._readableState;
  52119. if (!state.flowing) {
  52120. debug('resume');
  52121. state.flowing = true;
  52122. resume(this, state);
  52123. }
  52124. return this;
  52125. };
  52126. function resume(stream, state) {
  52127. if (!state.resumeScheduled) {
  52128. state.resumeScheduled = true;
  52129. pna.nextTick(resume_, stream, state);
  52130. }
  52131. }
  52132. function resume_(stream, state) {
  52133. if (!state.reading) {
  52134. debug('resume read 0');
  52135. stream.read(0);
  52136. }
  52137. state.resumeScheduled = false;
  52138. state.awaitDrain = 0;
  52139. stream.emit('resume');
  52140. flow(stream);
  52141. if (state.flowing && !state.reading) stream.read(0);
  52142. }
  52143. Readable.prototype.pause = function () {
  52144. debug('call pause flowing=%j', this._readableState.flowing);
  52145. if (false !== this._readableState.flowing) {
  52146. debug('pause');
  52147. this._readableState.flowing = false;
  52148. this.emit('pause');
  52149. }
  52150. return this;
  52151. };
  52152. function flow(stream) {
  52153. var state = stream._readableState;
  52154. debug('flow', state.flowing);
  52155. while (state.flowing && stream.read() !== null) {}
  52156. }
  52157. // wrap an old-style stream as the async data source.
  52158. // This is *not* part of the readable stream interface.
  52159. // It is an ugly unfortunate mess of history.
  52160. Readable.prototype.wrap = function (stream) {
  52161. var _this = this;
  52162. var state = this._readableState;
  52163. var paused = false;
  52164. stream.on('end', function () {
  52165. debug('wrapped end');
  52166. if (state.decoder && !state.ended) {
  52167. var chunk = state.decoder.end();
  52168. if (chunk && chunk.length) _this.push(chunk);
  52169. }
  52170. _this.push(null);
  52171. });
  52172. stream.on('data', function (chunk) {
  52173. debug('wrapped data');
  52174. if (state.decoder) chunk = state.decoder.write(chunk);
  52175. // don't skip over falsy values in objectMode
  52176. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  52177. var ret = _this.push(chunk);
  52178. if (!ret) {
  52179. paused = true;
  52180. stream.pause();
  52181. }
  52182. });
  52183. // proxy all the other methods.
  52184. // important when wrapping filters and duplexes.
  52185. for (var i in stream) {
  52186. if (this[i] === undefined && typeof stream[i] === 'function') {
  52187. this[i] = function (method) {
  52188. return function () {
  52189. return stream[method].apply(stream, arguments);
  52190. };
  52191. }(i);
  52192. }
  52193. }
  52194. // proxy certain important events.
  52195. for (var n = 0; n < kProxyEvents.length; n++) {
  52196. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  52197. }
  52198. // when we try to consume some more bytes, simply unpause the
  52199. // underlying stream.
  52200. this._read = function (n) {
  52201. debug('wrapped _read', n);
  52202. if (paused) {
  52203. paused = false;
  52204. stream.resume();
  52205. }
  52206. };
  52207. return this;
  52208. };
  52209. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  52210. // making it explicit this property is not enumerable
  52211. // because otherwise some prototype manipulation in
  52212. // userland will fail
  52213. enumerable: false,
  52214. get: function () {
  52215. return this._readableState.highWaterMark;
  52216. }
  52217. });
  52218. // exposed for testing purposes only.
  52219. Readable._fromList = fromList;
  52220. // Pluck off n bytes from an array of buffers.
  52221. // Length is the combined lengths of all the buffers in the list.
  52222. // This function is designed to be inlinable, so please take care when making
  52223. // changes to the function body.
  52224. function fromList(n, state) {
  52225. // nothing buffered
  52226. if (state.length === 0) return null;
  52227. var ret;
  52228. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  52229. // read it all, truncate the list
  52230. 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);
  52231. state.buffer.clear();
  52232. } else {
  52233. // read part of list
  52234. ret = fromListPartial(n, state.buffer, state.decoder);
  52235. }
  52236. return ret;
  52237. }
  52238. // Extracts only enough buffered data to satisfy the amount requested.
  52239. // This function is designed to be inlinable, so please take care when making
  52240. // changes to the function body.
  52241. function fromListPartial(n, list, hasStrings) {
  52242. var ret;
  52243. if (n < list.head.data.length) {
  52244. // slice is the same for buffers and strings
  52245. ret = list.head.data.slice(0, n);
  52246. list.head.data = list.head.data.slice(n);
  52247. } else if (n === list.head.data.length) {
  52248. // first chunk is a perfect match
  52249. ret = list.shift();
  52250. } else {
  52251. // result spans more than one buffer
  52252. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  52253. }
  52254. return ret;
  52255. }
  52256. // Copies a specified amount of characters from the list of buffered data
  52257. // chunks.
  52258. // This function is designed to be inlinable, so please take care when making
  52259. // changes to the function body.
  52260. function copyFromBufferString(n, list) {
  52261. var p = list.head;
  52262. var c = 1;
  52263. var ret = p.data;
  52264. n -= ret.length;
  52265. while (p = p.next) {
  52266. var str = p.data;
  52267. var nb = n > str.length ? str.length : n;
  52268. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  52269. n -= nb;
  52270. if (n === 0) {
  52271. if (nb === str.length) {
  52272. ++c;
  52273. if (p.next) list.head = p.next;else list.head = list.tail = null;
  52274. } else {
  52275. list.head = p;
  52276. p.data = str.slice(nb);
  52277. }
  52278. break;
  52279. }
  52280. ++c;
  52281. }
  52282. list.length -= c;
  52283. return ret;
  52284. }
  52285. // Copies a specified amount of bytes from the list of buffered data chunks.
  52286. // This function is designed to be inlinable, so please take care when making
  52287. // changes to the function body.
  52288. function copyFromBuffer(n, list) {
  52289. var ret = Buffer.allocUnsafe(n);
  52290. var p = list.head;
  52291. var c = 1;
  52292. p.data.copy(ret);
  52293. n -= p.data.length;
  52294. while (p = p.next) {
  52295. var buf = p.data;
  52296. var nb = n > buf.length ? buf.length : n;
  52297. buf.copy(ret, ret.length - n, 0, nb);
  52298. n -= nb;
  52299. if (n === 0) {
  52300. if (nb === buf.length) {
  52301. ++c;
  52302. if (p.next) list.head = p.next;else list.head = list.tail = null;
  52303. } else {
  52304. list.head = p;
  52305. p.data = buf.slice(nb);
  52306. }
  52307. break;
  52308. }
  52309. ++c;
  52310. }
  52311. list.length -= c;
  52312. return ret;
  52313. }
  52314. function endReadable(stream) {
  52315. var state = stream._readableState;
  52316. // If we get here before consuming all the bytes, then that is a
  52317. // bug in node. Should never happen.
  52318. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  52319. if (!state.endEmitted) {
  52320. state.ended = true;
  52321. pna.nextTick(endReadableNT, state, stream);
  52322. }
  52323. }
  52324. function endReadableNT(state, stream) {
  52325. // Check that we didn't get one last unshift.
  52326. if (!state.endEmitted && state.length === 0) {
  52327. state.endEmitted = true;
  52328. stream.readable = false;
  52329. stream.emit('end');
  52330. }
  52331. }
  52332. function indexOf(xs, x) {
  52333. for (var i = 0, l = xs.length; i < l; i++) {
  52334. if (xs[i] === x) return i;
  52335. }
  52336. return -1;
  52337. }
  52338. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ 87)))
  52339. /***/ })
  52340. }]);
  52341. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map