vendor.js 423 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 3);
  10. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  11. var realAtob;
  12. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  13. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14. if (typeof atob !== 'function') {
  15. realAtob = function realAtob(str) {
  16. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  17. if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
  18. // Adding the padding if missing, for semplicity
  19. str += '=='.slice(2 - (str.length & 3));
  20. var bitmap;var result = '';var r1;var r2;var i = 0;
  21. for (; i < str.length;) {
  22. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 |
  23. (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  25. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  26. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  27. }
  28. return result;
  29. };
  30. } else {
  31. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  32. realAtob = atob;
  33. }
  34. function b64DecodeUnicode(str) {
  35. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  36. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  37. }).join(''));
  38. }
  39. function getCurrentUserInfo() {
  40. var token = wx.getStorageSync('uni_id_token') || '';
  41. var tokenArr = token.split('.');
  42. if (!token || tokenArr.length !== 3) {
  43. return {
  44. uid: null,
  45. role: [],
  46. permission: [],
  47. tokenExpired: 0 };
  48. }
  49. var userInfo;
  50. try {
  51. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  52. } catch (error) {
  53. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  54. }
  55. userInfo.tokenExpired = userInfo.exp * 1000;
  56. delete userInfo.exp;
  57. delete userInfo.iat;
  58. return userInfo;
  59. }
  60. function uniIdMixin(Vue) {
  61. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  62. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  63. return role.indexOf(roleId) > -1;
  64. };
  65. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  66. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  67. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  68. };
  69. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  70. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  71. return tokenExpired > Date.now();
  72. };
  73. }
  74. var _toString = Object.prototype.toString;
  75. var hasOwnProperty = Object.prototype.hasOwnProperty;
  76. function isFn(fn) {
  77. return typeof fn === 'function';
  78. }
  79. function isStr(str) {
  80. return typeof str === 'string';
  81. }
  82. function isPlainObject(obj) {
  83. return _toString.call(obj) === '[object Object]';
  84. }
  85. function hasOwn(obj, key) {
  86. return hasOwnProperty.call(obj, key);
  87. }
  88. function noop() {}
  89. /**
  90. * Create a cached version of a pure function.
  91. */
  92. function cached(fn) {
  93. var cache = Object.create(null);
  94. return function cachedFn(str) {
  95. var hit = cache[str];
  96. return hit || (cache[str] = fn(str));
  97. };
  98. }
  99. /**
  100. * Camelize a hyphen-delimited string.
  101. */
  102. var camelizeRE = /-(\w)/g;
  103. var camelize = cached(function (str) {
  104. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  105. });
  106. function sortObject(obj) {
  107. var sortObj = {};
  108. if (isPlainObject(obj)) {
  109. Object.keys(obj).sort().forEach(function (key) {
  110. sortObj[key] = obj[key];
  111. });
  112. }
  113. return !Object.keys(sortObj) ? obj : sortObj;
  114. }
  115. var HOOKS = [
  116. 'invoke',
  117. 'success',
  118. 'fail',
  119. 'complete',
  120. 'returnValue'];
  121. var globalInterceptors = {};
  122. var scopedInterceptors = {};
  123. function mergeHook(parentVal, childVal) {
  124. var res = childVal ?
  125. parentVal ?
  126. parentVal.concat(childVal) :
  127. Array.isArray(childVal) ?
  128. childVal : [childVal] :
  129. parentVal;
  130. return res ?
  131. dedupeHooks(res) :
  132. res;
  133. }
  134. function dedupeHooks(hooks) {
  135. var res = [];
  136. for (var i = 0; i < hooks.length; i++) {
  137. if (res.indexOf(hooks[i]) === -1) {
  138. res.push(hooks[i]);
  139. }
  140. }
  141. return res;
  142. }
  143. function removeHook(hooks, hook) {
  144. var index = hooks.indexOf(hook);
  145. if (index !== -1) {
  146. hooks.splice(index, 1);
  147. }
  148. }
  149. function mergeInterceptorHook(interceptor, option) {
  150. Object.keys(option).forEach(function (hook) {
  151. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  152. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  153. }
  154. });
  155. }
  156. function removeInterceptorHook(interceptor, option) {
  157. if (!interceptor || !option) {
  158. return;
  159. }
  160. Object.keys(option).forEach(function (hook) {
  161. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  162. removeHook(interceptor[hook], option[hook]);
  163. }
  164. });
  165. }
  166. function addInterceptor(method, option) {
  167. if (typeof method === 'string' && isPlainObject(option)) {
  168. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  169. } else if (isPlainObject(method)) {
  170. mergeInterceptorHook(globalInterceptors, method);
  171. }
  172. }
  173. function removeInterceptor(method, option) {
  174. if (typeof method === 'string') {
  175. if (isPlainObject(option)) {
  176. removeInterceptorHook(scopedInterceptors[method], option);
  177. } else {
  178. delete scopedInterceptors[method];
  179. }
  180. } else if (isPlainObject(method)) {
  181. removeInterceptorHook(globalInterceptors, method);
  182. }
  183. }
  184. function wrapperHook(hook) {
  185. return function (data) {
  186. return hook(data) || data;
  187. };
  188. }
  189. function isPromise(obj) {
  190. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  191. }
  192. function queue(hooks, data) {
  193. var promise = false;
  194. for (var i = 0; i < hooks.length; i++) {
  195. var hook = hooks[i];
  196. if (promise) {
  197. promise = Promise.resolve(wrapperHook(hook));
  198. } else {
  199. var res = hook(data);
  200. if (isPromise(res)) {
  201. promise = Promise.resolve(res);
  202. }
  203. if (res === false) {
  204. return {
  205. then: function then() {} };
  206. }
  207. }
  208. }
  209. return promise || {
  210. then: function then(callback) {
  211. return callback(data);
  212. } };
  213. }
  214. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  215. ['success', 'fail', 'complete'].forEach(function (name) {
  216. if (Array.isArray(interceptor[name])) {
  217. var oldCallback = options[name];
  218. options[name] = function callbackInterceptor(res) {
  219. queue(interceptor[name], res).then(function (res) {
  220. /* eslint-disable no-mixed-operators */
  221. return isFn(oldCallback) && oldCallback(res) || res;
  222. });
  223. };
  224. }
  225. });
  226. return options;
  227. }
  228. function wrapperReturnValue(method, returnValue) {
  229. var returnValueHooks = [];
  230. if (Array.isArray(globalInterceptors.returnValue)) {
  231. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  232. }
  233. var interceptor = scopedInterceptors[method];
  234. if (interceptor && Array.isArray(interceptor.returnValue)) {
  235. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  236. }
  237. returnValueHooks.forEach(function (hook) {
  238. returnValue = hook(returnValue) || returnValue;
  239. });
  240. return returnValue;
  241. }
  242. function getApiInterceptorHooks(method) {
  243. var interceptor = Object.create(null);
  244. Object.keys(globalInterceptors).forEach(function (hook) {
  245. if (hook !== 'returnValue') {
  246. interceptor[hook] = globalInterceptors[hook].slice();
  247. }
  248. });
  249. var scopedInterceptor = scopedInterceptors[method];
  250. if (scopedInterceptor) {
  251. Object.keys(scopedInterceptor).forEach(function (hook) {
  252. if (hook !== 'returnValue') {
  253. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  254. }
  255. });
  256. }
  257. return interceptor;
  258. }
  259. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  260. var interceptor = getApiInterceptorHooks(method);
  261. if (interceptor && Object.keys(interceptor).length) {
  262. if (Array.isArray(interceptor.invoke)) {
  263. var res = queue(interceptor.invoke, options);
  264. return res.then(function (options) {
  265. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  266. });
  267. } else {
  268. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  269. }
  270. }
  271. return api.apply(void 0, [options].concat(params));
  272. }
  273. var promiseInterceptor = {
  274. returnValue: function returnValue(res) {
  275. if (!isPromise(res)) {
  276. return res;
  277. }
  278. return new Promise(function (resolve, reject) {
  279. res.then(function (res) {
  280. if (res[0]) {
  281. reject(res[0]);
  282. } else {
  283. resolve(res[1]);
  284. }
  285. });
  286. });
  287. } };
  288. var SYNC_API_RE =
  289. /^\$|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/;
  290. var CONTEXT_API_RE = /^create|Manager$/;
  291. // Context例外情况
  292. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  293. // 同步例外情况
  294. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  295. var CALLBACK_API_RE = /^on|^off/;
  296. function isContextApi(name) {
  297. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  298. }
  299. function isSyncApi(name) {
  300. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  301. }
  302. function isCallbackApi(name) {
  303. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  304. }
  305. function handlePromise(promise) {
  306. return promise.then(function (data) {
  307. return [null, data];
  308. }).
  309. catch(function (err) {return [err];});
  310. }
  311. function shouldPromise(name) {
  312. if (
  313. isContextApi(name) ||
  314. isSyncApi(name) ||
  315. isCallbackApi(name))
  316. {
  317. return false;
  318. }
  319. return true;
  320. }
  321. /* eslint-disable no-extend-native */
  322. if (!Promise.prototype.finally) {
  323. Promise.prototype.finally = function (callback) {
  324. var promise = this.constructor;
  325. return this.then(
  326. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  327. function (reason) {return promise.resolve(callback()).then(function () {
  328. throw reason;
  329. });});
  330. };
  331. }
  332. function promisify(name, api) {
  333. if (!shouldPromise(name)) {
  334. return api;
  335. }
  336. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  337. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  338. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  339. }
  340. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  341. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  342. success: resolve,
  343. fail: reject })].concat(
  344. params));
  345. })));
  346. };
  347. }
  348. var EPS = 1e-4;
  349. var BASE_DEVICE_WIDTH = 750;
  350. var isIOS = false;
  351. var deviceWidth = 0;
  352. var deviceDPR = 0;
  353. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  354. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  355. deviceWidth = windowWidth;
  356. deviceDPR = pixelRatio;
  357. isIOS = platform === 'ios';
  358. }
  359. function upx2px(number, newDeviceWidth) {
  360. if (deviceWidth === 0) {
  361. checkDeviceWidth();
  362. }
  363. number = Number(number);
  364. if (number === 0) {
  365. return 0;
  366. }
  367. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  368. if (result < 0) {
  369. result = -result;
  370. }
  371. result = Math.floor(result + EPS);
  372. if (result === 0) {
  373. if (deviceDPR === 1 || !isIOS) {
  374. result = 1;
  375. } else {
  376. result = 0.5;
  377. }
  378. }
  379. return number < 0 ? -result : result;
  380. }
  381. var LOCALE_ZH_HANS = 'zh-Hans';
  382. var LOCALE_ZH_HANT = 'zh-Hant';
  383. var LOCALE_EN = 'en';
  384. var LOCALE_FR = 'fr';
  385. var LOCALE_ES = 'es';
  386. var messages = {};
  387. var locale;
  388. {
  389. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  390. }
  391. function initI18nMessages() {
  392. if (!isEnableLocale()) {
  393. return;
  394. }
  395. var localeKeys = Object.keys(__uniConfig.locales);
  396. if (localeKeys.length) {
  397. localeKeys.forEach(function (locale) {
  398. var curMessages = messages[locale];
  399. var userMessages = __uniConfig.locales[locale];
  400. if (curMessages) {
  401. Object.assign(curMessages, userMessages);
  402. } else {
  403. messages[locale] = userMessages;
  404. }
  405. });
  406. }
  407. }
  408. initI18nMessages();
  409. var i18n = (0, _uniI18n.initVueI18n)(
  410. locale,
  411. {});
  412. var t = i18n.t;
  413. var i18nMixin = i18n.mixin = {
  414. beforeCreate: function beforeCreate() {var _this = this;
  415. var unwatch = i18n.i18n.watchLocale(function () {
  416. _this.$forceUpdate();
  417. });
  418. this.$once('hook:beforeDestroy', function () {
  419. unwatch();
  420. });
  421. },
  422. methods: {
  423. $$t: function $$t(key, values) {
  424. return t(key, values);
  425. } } };
  426. var setLocale = i18n.setLocale;
  427. var getLocale = i18n.getLocale;
  428. function initAppLocale(Vue, appVm, locale) {
  429. var state = Vue.observable({
  430. locale: locale || i18n.getLocale() });
  431. var localeWatchers = [];
  432. appVm.$watchLocale = function (fn) {
  433. localeWatchers.push(fn);
  434. };
  435. Object.defineProperty(appVm, '$locale', {
  436. get: function get() {
  437. return state.locale;
  438. },
  439. set: function set(v) {
  440. state.locale = v;
  441. localeWatchers.forEach(function (watch) {return watch(v);});
  442. } });
  443. }
  444. function isEnableLocale() {
  445. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  446. }
  447. function include(str, parts) {
  448. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  449. }
  450. function startsWith(str, parts) {
  451. return parts.find(function (part) {return str.indexOf(part) === 0;});
  452. }
  453. function normalizeLocale(locale, messages) {
  454. if (!locale) {
  455. return;
  456. }
  457. locale = locale.trim().replace(/_/g, '-');
  458. if (messages && messages[locale]) {
  459. return locale;
  460. }
  461. locale = locale.toLowerCase();
  462. if (locale === 'chinese') {
  463. // 支付宝
  464. return LOCALE_ZH_HANS;
  465. }
  466. if (locale.indexOf('zh') === 0) {
  467. if (locale.indexOf('-hans') > -1) {
  468. return LOCALE_ZH_HANS;
  469. }
  470. if (locale.indexOf('-hant') > -1) {
  471. return LOCALE_ZH_HANT;
  472. }
  473. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  474. return LOCALE_ZH_HANT;
  475. }
  476. return LOCALE_ZH_HANS;
  477. }
  478. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  479. if (lang) {
  480. return lang;
  481. }
  482. }
  483. // export function initI18n() {
  484. // const localeKeys = Object.keys(__uniConfig.locales || {})
  485. // if (localeKeys.length) {
  486. // localeKeys.forEach((locale) =>
  487. // i18n.add(locale, __uniConfig.locales[locale])
  488. // )
  489. // }
  490. // }
  491. function getLocale$1() {
  492. // 优先使用 $locale
  493. var app = getApp({
  494. allowDefault: true });
  495. if (app && app.$vm) {
  496. return app.$vm.$locale;
  497. }
  498. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  499. }
  500. function setLocale$1(locale) {
  501. var app = getApp();
  502. if (!app) {
  503. return false;
  504. }
  505. var oldLocale = app.$vm.$locale;
  506. if (oldLocale !== locale) {
  507. app.$vm.$locale = locale;
  508. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  509. locale: locale });});
  510. return true;
  511. }
  512. return false;
  513. }
  514. var onLocaleChangeCallbacks = [];
  515. function onLocaleChange(fn) {
  516. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  517. onLocaleChangeCallbacks.push(fn);
  518. }
  519. }
  520. if (typeof global !== 'undefined') {
  521. global.getLocale = getLocale$1;
  522. }
  523. var interceptors = {
  524. promiseInterceptor: promiseInterceptor };
  525. var baseApi = /*#__PURE__*/Object.freeze({
  526. __proto__: null,
  527. upx2px: upx2px,
  528. getLocale: getLocale$1,
  529. setLocale: setLocale$1,
  530. onLocaleChange: onLocaleChange,
  531. addInterceptor: addInterceptor,
  532. removeInterceptor: removeInterceptor,
  533. interceptors: interceptors });
  534. function findExistsPageIndex(url) {
  535. var pages = getCurrentPages();
  536. var len = pages.length;
  537. while (len--) {
  538. var page = pages[len];
  539. if (page.$page && page.$page.fullPath === url) {
  540. return len;
  541. }
  542. }
  543. return -1;
  544. }
  545. var redirectTo = {
  546. name: function name(fromArgs) {
  547. if (fromArgs.exists === 'back' && fromArgs.delta) {
  548. return 'navigateBack';
  549. }
  550. return 'redirectTo';
  551. },
  552. args: function args(fromArgs) {
  553. if (fromArgs.exists === 'back' && fromArgs.url) {
  554. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  555. if (existsPageIndex !== -1) {
  556. var delta = getCurrentPages().length - 1 - existsPageIndex;
  557. if (delta > 0) {
  558. fromArgs.delta = delta;
  559. }
  560. }
  561. }
  562. } };
  563. var previewImage = {
  564. args: function args(fromArgs) {
  565. var currentIndex = parseInt(fromArgs.current);
  566. if (isNaN(currentIndex)) {
  567. return;
  568. }
  569. var urls = fromArgs.urls;
  570. if (!Array.isArray(urls)) {
  571. return;
  572. }
  573. var len = urls.length;
  574. if (!len) {
  575. return;
  576. }
  577. if (currentIndex < 0) {
  578. currentIndex = 0;
  579. } else if (currentIndex >= len) {
  580. currentIndex = len - 1;
  581. }
  582. if (currentIndex > 0) {
  583. fromArgs.current = urls[currentIndex];
  584. fromArgs.urls = urls.filter(
  585. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  586. } else {
  587. fromArgs.current = urls[0];
  588. }
  589. return {
  590. indicator: false,
  591. loop: false };
  592. } };
  593. var UUID_KEY = '__DC_STAT_UUID';
  594. var deviceId;
  595. function useDeviceId(result) {
  596. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  597. if (!deviceId) {
  598. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  599. wx.setStorage({
  600. key: UUID_KEY,
  601. data: deviceId });
  602. }
  603. result.deviceId = deviceId;
  604. }
  605. function addSafeAreaInsets(result) {
  606. if (result.safeArea) {
  607. var safeArea = result.safeArea;
  608. result.safeAreaInsets = {
  609. top: safeArea.top,
  610. left: safeArea.left,
  611. right: result.windowWidth - safeArea.right,
  612. bottom: result.screenHeight - safeArea.bottom };
  613. }
  614. }
  615. function populateParameters(result) {var _result$brand =
  616. result.brand,brand = _result$brand === void 0 ? '' : _result$brand,_result$model = result.model,model = _result$model === void 0 ? '' : _result$model,_result$system = result.system,system = _result$system === void 0 ? '' : _result$system,_result$language = result.language,language = _result$language === void 0 ? '' : _result$language,theme = result.theme,version = result.version,platform = result.platform,fontSizeSetting = result.fontSizeSetting,SDKVersion = result.SDKVersion,pixelRatio = result.pixelRatio,deviceOrientation = result.deviceOrientation;
  617. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  618. // osName osVersion
  619. var osName = '';
  620. var osVersion = '';
  621. {
  622. osName = system.split(' ')[0] || '';
  623. osVersion = system.split(' ')[1] || '';
  624. }
  625. var hostVersion = version;
  626. // deviceType
  627. var deviceType = getGetDeviceType(result, model);
  628. // deviceModel
  629. var deviceBrand = getDeviceBrand(brand);
  630. // hostName
  631. var _hostName = getHostName(result);
  632. // deviceOrientation
  633. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  634. // devicePixelRatio
  635. var _devicePixelRatio = pixelRatio;
  636. // SDKVersion
  637. var _SDKVersion = SDKVersion;
  638. // hostLanguage
  639. var hostLanguage = language.replace(/_/g, '-');
  640. // wx.getAccountInfoSync
  641. var parameters = {
  642. appId: "__UNI__F0EBD91",
  643. appName: "鸿蒙德",
  644. appVersion: "1.0.0",
  645. appVersionCode: "100",
  646. appLanguage: getAppLanguage(hostLanguage),
  647. uniCompileVersion: "3.6.4",
  648. uniRuntimeVersion: "3.6.4",
  649. uniPlatform: undefined || "mp-weixin",
  650. deviceBrand: deviceBrand,
  651. deviceModel: model,
  652. deviceType: deviceType,
  653. devicePixelRatio: _devicePixelRatio,
  654. deviceOrientation: _deviceOrientation,
  655. osName: osName.toLocaleLowerCase(),
  656. osVersion: osVersion,
  657. hostTheme: theme,
  658. hostVersion: hostVersion,
  659. hostLanguage: hostLanguage,
  660. hostName: _hostName,
  661. hostSDKVersion: _SDKVersion,
  662. hostFontSizeSetting: fontSizeSetting,
  663. windowTop: 0,
  664. windowBottom: 0,
  665. // TODO
  666. osLanguage: undefined,
  667. osTheme: undefined,
  668. ua: undefined,
  669. hostPackageName: undefined,
  670. browserName: undefined,
  671. browserVersion: undefined };
  672. Object.assign(result, parameters);
  673. }
  674. function getGetDeviceType(result, model) {
  675. var deviceType = result.deviceType || 'phone';
  676. {
  677. var deviceTypeMaps = {
  678. ipad: 'pad',
  679. windows: 'pc',
  680. mac: 'pc' };
  681. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  682. var _model = model.toLocaleLowerCase();
  683. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  684. var _m = deviceTypeMapsKeys[index];
  685. if (_model.indexOf(_m) !== -1) {
  686. deviceType = deviceTypeMaps[_m];
  687. break;
  688. }
  689. }
  690. }
  691. return deviceType;
  692. }
  693. function getDeviceBrand(brand) {
  694. var deviceBrand = brand;
  695. if (deviceBrand) {
  696. deviceBrand = brand.toLocaleLowerCase();
  697. }
  698. return deviceBrand;
  699. }
  700. function getAppLanguage(defaultLanguage) {
  701. return getLocale$1 ?
  702. getLocale$1() :
  703. defaultLanguage;
  704. }
  705. function getHostName(result) {
  706. var _platform = 'WeChat';
  707. var _hostName = result.hostName || _platform; // mp-jd
  708. {
  709. if (result.environment) {
  710. _hostName = result.environment;
  711. } else if (result.host && result.host.env) {
  712. _hostName = result.host.env;
  713. }
  714. }
  715. return _hostName;
  716. }
  717. var getSystemInfo = {
  718. returnValue: function returnValue(result) {
  719. useDeviceId(result);
  720. addSafeAreaInsets(result);
  721. populateParameters(result);
  722. } };
  723. var showActionSheet = {
  724. args: function args(fromArgs) {
  725. if (typeof fromArgs === 'object') {
  726. fromArgs.alertText = fromArgs.title;
  727. }
  728. } };
  729. var getAppBaseInfo = {
  730. returnValue: function returnValue(result) {var _result =
  731. result,version = _result.version,language = _result.language,SDKVersion = _result.SDKVersion,theme = _result.theme;
  732. var _hostName = getHostName(result);
  733. var hostLanguage = language.replace('_', '-');
  734. result = sortObject(Object.assign(result, {
  735. appId: "__UNI__F0EBD91",
  736. appName: "鸿蒙德",
  737. appVersion: "1.0.0",
  738. appVersionCode: "100",
  739. appLanguage: getAppLanguage(hostLanguage),
  740. hostVersion: version,
  741. hostLanguage: hostLanguage,
  742. hostName: _hostName,
  743. hostSDKVersion: SDKVersion,
  744. hostTheme: theme }));
  745. } };
  746. var getDeviceInfo = {
  747. returnValue: function returnValue(result) {var _result2 =
  748. result,brand = _result2.brand,model = _result2.model;
  749. var deviceType = getGetDeviceType(result, model);
  750. var deviceBrand = getDeviceBrand(brand);
  751. useDeviceId(result);
  752. result = sortObject(Object.assign(result, {
  753. deviceType: deviceType,
  754. deviceBrand: deviceBrand,
  755. deviceModel: model }));
  756. } };
  757. var getWindowInfo = {
  758. returnValue: function returnValue(result) {
  759. addSafeAreaInsets(result);
  760. result = sortObject(Object.assign(result, {
  761. windowTop: 0,
  762. windowBottom: 0 }));
  763. } };
  764. var getAppAuthorizeSetting = {
  765. returnValue: function returnValue(result) {var
  766. locationReducedAccuracy = result.locationReducedAccuracy;
  767. result.locationAccuracy = 'unsupported';
  768. if (locationReducedAccuracy === true) {
  769. result.locationAccuracy = 'reduced';
  770. } else if (locationReducedAccuracy === false) {
  771. result.locationAccuracy = 'full';
  772. }
  773. } };
  774. // import navigateTo from 'uni-helpers/navigate-to'
  775. var protocols = {
  776. redirectTo: redirectTo,
  777. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  778. previewImage: previewImage,
  779. getSystemInfo: getSystemInfo,
  780. getSystemInfoSync: getSystemInfo,
  781. showActionSheet: showActionSheet,
  782. getAppBaseInfo: getAppBaseInfo,
  783. getDeviceInfo: getDeviceInfo,
  784. getWindowInfo: getWindowInfo,
  785. getAppAuthorizeSetting: getAppAuthorizeSetting };
  786. var todos = [
  787. 'vibrate',
  788. 'preloadPage',
  789. 'unPreloadPage',
  790. 'loadSubPackage'];
  791. var canIUses = [];
  792. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  793. function processCallback(methodName, method, returnValue) {
  794. return function (res) {
  795. return method(processReturnValue(methodName, res, returnValue));
  796. };
  797. }
  798. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  799. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  800. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  801. if (isFn(argsOption)) {
  802. argsOption = argsOption(fromArgs, toArgs) || {};
  803. }
  804. for (var key in fromArgs) {
  805. if (hasOwn(argsOption, key)) {
  806. var keyOption = argsOption[key];
  807. if (isFn(keyOption)) {
  808. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  809. }
  810. if (!keyOption) {// 不支持的参数
  811. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  812. } else if (isStr(keyOption)) {// 重写参数 key
  813. toArgs[keyOption] = fromArgs[key];
  814. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  815. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  816. }
  817. } else if (CALLBACKS.indexOf(key) !== -1) {
  818. if (isFn(fromArgs[key])) {
  819. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  820. }
  821. } else {
  822. if (!keepFromArgs) {
  823. toArgs[key] = fromArgs[key];
  824. }
  825. }
  826. }
  827. return toArgs;
  828. } else if (isFn(fromArgs)) {
  829. fromArgs = processCallback(methodName, fromArgs, returnValue);
  830. }
  831. return fromArgs;
  832. }
  833. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  834. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  835. res = protocols.returnValue(methodName, res);
  836. }
  837. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  838. }
  839. function wrapper(methodName, method) {
  840. if (hasOwn(protocols, methodName)) {
  841. var protocol = protocols[methodName];
  842. if (!protocol) {// 暂不支持的 api
  843. return function () {
  844. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  845. };
  846. }
  847. return function (arg1, arg2) {// 目前 api 最多两个参数
  848. var options = protocol;
  849. if (isFn(protocol)) {
  850. options = protocol(arg1);
  851. }
  852. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  853. var args = [arg1];
  854. if (typeof arg2 !== 'undefined') {
  855. args.push(arg2);
  856. }
  857. if (isFn(options.name)) {
  858. methodName = options.name(arg1);
  859. } else if (isStr(options.name)) {
  860. methodName = options.name;
  861. }
  862. var returnValue = wx[methodName].apply(wx, args);
  863. if (isSyncApi(methodName)) {// 同步 api
  864. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  865. }
  866. return returnValue;
  867. };
  868. }
  869. return method;
  870. }
  871. var todoApis = Object.create(null);
  872. var TODOS = [
  873. 'onTabBarMidButtonTap',
  874. 'subscribePush',
  875. 'unsubscribePush',
  876. 'onPush',
  877. 'offPush',
  878. 'share'];
  879. function createTodoApi(name) {
  880. return function todoApi(_ref)
  881. {var fail = _ref.fail,complete = _ref.complete;
  882. var res = {
  883. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  884. isFn(fail) && fail(res);
  885. isFn(complete) && complete(res);
  886. };
  887. }
  888. TODOS.forEach(function (name) {
  889. todoApis[name] = createTodoApi(name);
  890. });
  891. var providers = {
  892. oauth: ['weixin'],
  893. share: ['weixin'],
  894. payment: ['wxpay'],
  895. push: ['weixin'] };
  896. function getProvider(_ref2)
  897. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  898. var res = false;
  899. if (providers[service]) {
  900. res = {
  901. errMsg: 'getProvider:ok',
  902. service: service,
  903. provider: providers[service] };
  904. isFn(success) && success(res);
  905. } else {
  906. res = {
  907. errMsg: 'getProvider:fail service not found' };
  908. isFn(fail) && fail(res);
  909. }
  910. isFn(complete) && complete(res);
  911. }
  912. var extraApi = /*#__PURE__*/Object.freeze({
  913. __proto__: null,
  914. getProvider: getProvider });
  915. var getEmitter = function () {
  916. var Emitter;
  917. return function getUniEmitter() {
  918. if (!Emitter) {
  919. Emitter = new _vue.default();
  920. }
  921. return Emitter;
  922. };
  923. }();
  924. function apply(ctx, method, args) {
  925. return ctx[method].apply(ctx, args);
  926. }
  927. function $on() {
  928. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  929. }
  930. function $off() {
  931. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  932. }
  933. function $once() {
  934. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  935. }
  936. function $emit() {
  937. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  938. }
  939. var eventApi = /*#__PURE__*/Object.freeze({
  940. __proto__: null,
  941. $on: $on,
  942. $off: $off,
  943. $once: $once,
  944. $emit: $emit });
  945. /**
  946. * 框架内 try-catch
  947. */
  948. /**
  949. * 开发者 try-catch
  950. */
  951. function tryCatch(fn) {
  952. return function () {
  953. try {
  954. return fn.apply(fn, arguments);
  955. } catch (e) {
  956. // TODO
  957. console.error(e);
  958. }
  959. };
  960. }
  961. function getApiCallbacks(params) {
  962. var apiCallbacks = {};
  963. for (var name in params) {
  964. var param = params[name];
  965. if (isFn(param)) {
  966. apiCallbacks[name] = tryCatch(param);
  967. delete params[name];
  968. }
  969. }
  970. return apiCallbacks;
  971. }
  972. var cid;
  973. var cidErrMsg;
  974. var enabled;
  975. function normalizePushMessage(message) {
  976. try {
  977. return JSON.parse(message);
  978. } catch (e) {}
  979. return message;
  980. }
  981. function invokePushCallback(
  982. args)
  983. {
  984. if (args.type === 'enabled') {
  985. enabled = true;
  986. } else if (args.type === 'clientId') {
  987. cid = args.cid;
  988. cidErrMsg = args.errMsg;
  989. invokeGetPushCidCallbacks(cid, args.errMsg);
  990. } else if (args.type === 'pushMsg') {
  991. var message = {
  992. type: 'receive',
  993. data: normalizePushMessage(args.message) };
  994. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  995. var callback = onPushMessageCallbacks[i];
  996. callback(message);
  997. // 该消息已被阻止
  998. if (message.stopped) {
  999. break;
  1000. }
  1001. }
  1002. } else if (args.type === 'click') {
  1003. onPushMessageCallbacks.forEach(function (callback) {
  1004. callback({
  1005. type: 'click',
  1006. data: normalizePushMessage(args.message) });
  1007. });
  1008. }
  1009. }
  1010. var getPushCidCallbacks = [];
  1011. function invokeGetPushCidCallbacks(cid, errMsg) {
  1012. getPushCidCallbacks.forEach(function (callback) {
  1013. callback(cid, errMsg);
  1014. });
  1015. getPushCidCallbacks.length = 0;
  1016. }
  1017. function getPushClientId(args) {
  1018. if (!isPlainObject(args)) {
  1019. args = {};
  1020. }var _getApiCallbacks =
  1021. getApiCallbacks(args),success = _getApiCallbacks.success,fail = _getApiCallbacks.fail,complete = _getApiCallbacks.complete;
  1022. var hasSuccess = isFn(success);
  1023. var hasFail = isFn(fail);
  1024. var hasComplete = isFn(complete);
  1025. Promise.resolve().then(function () {
  1026. if (typeof enabled === 'undefined') {
  1027. enabled = false;
  1028. cid = '';
  1029. cidErrMsg = 'uniPush is not enabled';
  1030. }
  1031. getPushCidCallbacks.push(function (cid, errMsg) {
  1032. var res;
  1033. if (cid) {
  1034. res = {
  1035. errMsg: 'getPushClientId:ok',
  1036. cid: cid };
  1037. hasSuccess && success(res);
  1038. } else {
  1039. res = {
  1040. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '') };
  1041. hasFail && fail(res);
  1042. }
  1043. hasComplete && complete(res);
  1044. });
  1045. if (typeof cid !== 'undefined') {
  1046. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1047. }
  1048. });
  1049. }
  1050. var onPushMessageCallbacks = [];
  1051. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1052. var onPushMessage = function onPushMessage(fn) {
  1053. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1054. onPushMessageCallbacks.push(fn);
  1055. }
  1056. };
  1057. var offPushMessage = function offPushMessage(fn) {
  1058. if (!fn) {
  1059. onPushMessageCallbacks.length = 0;
  1060. } else {
  1061. var index = onPushMessageCallbacks.indexOf(fn);
  1062. if (index > -1) {
  1063. onPushMessageCallbacks.splice(index, 1);
  1064. }
  1065. }
  1066. };
  1067. var api = /*#__PURE__*/Object.freeze({
  1068. __proto__: null,
  1069. getPushClientId: getPushClientId,
  1070. onPushMessage: onPushMessage,
  1071. offPushMessage: offPushMessage,
  1072. invokePushCallback: invokePushCallback });
  1073. var MPPage = Page;
  1074. var MPComponent = Component;
  1075. var customizeRE = /:/g;
  1076. var customize = cached(function (str) {
  1077. return camelize(str.replace(customizeRE, '-'));
  1078. });
  1079. function initTriggerEvent(mpInstance) {
  1080. var oldTriggerEvent = mpInstance.triggerEvent;
  1081. var newTriggerEvent = function newTriggerEvent(event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  1082. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1083. if (this.$vm || this.dataset && this.dataset.comType) {
  1084. event = customize(event);
  1085. } else {
  1086. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1087. var newEvent = customize(event);
  1088. if (newEvent !== event) {
  1089. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1090. }
  1091. }
  1092. return oldTriggerEvent.apply(this, [event].concat(args));
  1093. };
  1094. try {
  1095. // 京东小程序 triggerEvent 为只读
  1096. mpInstance.triggerEvent = newTriggerEvent;
  1097. } catch (error) {
  1098. mpInstance._triggerEvent = newTriggerEvent;
  1099. }
  1100. }
  1101. function initHook(name, options, isComponent) {
  1102. var oldHook = options[name];
  1103. if (!oldHook) {
  1104. options[name] = function () {
  1105. initTriggerEvent(this);
  1106. };
  1107. } else {
  1108. options[name] = function () {
  1109. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  1110. return oldHook.apply(this, args);
  1111. };
  1112. }
  1113. }
  1114. if (!MPPage.__$wrappered) {
  1115. MPPage.__$wrappered = true;
  1116. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1117. initHook('onLoad', options);
  1118. return MPPage(options);
  1119. };
  1120. Page.after = MPPage.after;
  1121. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1122. initHook('created', options);
  1123. return MPComponent(options);
  1124. };
  1125. }
  1126. var PAGE_EVENT_HOOKS = [
  1127. 'onPullDownRefresh',
  1128. 'onReachBottom',
  1129. 'onAddToFavorites',
  1130. 'onShareTimeline',
  1131. 'onShareAppMessage',
  1132. 'onPageScroll',
  1133. 'onResize',
  1134. 'onTabItemTap'];
  1135. function initMocks(vm, mocks) {
  1136. var mpInstance = vm.$mp[vm.mpType];
  1137. mocks.forEach(function (mock) {
  1138. if (hasOwn(mpInstance, mock)) {
  1139. vm[mock] = mpInstance[mock];
  1140. }
  1141. });
  1142. }
  1143. function hasHook(hook, vueOptions) {
  1144. if (!vueOptions) {
  1145. return true;
  1146. }
  1147. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1148. return true;
  1149. }
  1150. vueOptions = vueOptions.default || vueOptions;
  1151. if (isFn(vueOptions)) {
  1152. if (isFn(vueOptions.extendOptions[hook])) {
  1153. return true;
  1154. }
  1155. if (vueOptions.super &&
  1156. vueOptions.super.options &&
  1157. Array.isArray(vueOptions.super.options[hook])) {
  1158. return true;
  1159. }
  1160. return false;
  1161. }
  1162. if (isFn(vueOptions[hook])) {
  1163. return true;
  1164. }
  1165. var mixins = vueOptions.mixins;
  1166. if (Array.isArray(mixins)) {
  1167. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  1168. }
  1169. }
  1170. function initHooks(mpOptions, hooks, vueOptions) {
  1171. hooks.forEach(function (hook) {
  1172. if (hasHook(hook, vueOptions)) {
  1173. mpOptions[hook] = function (args) {
  1174. return this.$vm && this.$vm.__call_hook(hook, args);
  1175. };
  1176. }
  1177. });
  1178. }
  1179. function initUnknownHooks(mpOptions, vueOptions) {var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1180. findHooks(vueOptions).forEach(function (hook) {return initHook$1(mpOptions, hook, excludes);});
  1181. }
  1182. function findHooks(vueOptions) {var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1183. if (vueOptions) {
  1184. Object.keys(vueOptions).forEach(function (name) {
  1185. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1186. hooks.push(name);
  1187. }
  1188. });
  1189. }
  1190. return hooks;
  1191. }
  1192. function initHook$1(mpOptions, hook, excludes) {
  1193. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1194. mpOptions[hook] = function (args) {
  1195. return this.$vm && this.$vm.__call_hook(hook, args);
  1196. };
  1197. }
  1198. }
  1199. function initVueComponent(Vue, vueOptions) {
  1200. vueOptions = vueOptions.default || vueOptions;
  1201. var VueComponent;
  1202. if (isFn(vueOptions)) {
  1203. VueComponent = vueOptions;
  1204. } else {
  1205. VueComponent = Vue.extend(vueOptions);
  1206. }
  1207. vueOptions = VueComponent.options;
  1208. return [VueComponent, vueOptions];
  1209. }
  1210. function initSlots(vm, vueSlots) {
  1211. if (Array.isArray(vueSlots) && vueSlots.length) {
  1212. var $slots = Object.create(null);
  1213. vueSlots.forEach(function (slotName) {
  1214. $slots[slotName] = true;
  1215. });
  1216. vm.$scopedSlots = vm.$slots = $slots;
  1217. }
  1218. }
  1219. function initVueIds(vueIds, mpInstance) {
  1220. vueIds = (vueIds || '').split(',');
  1221. var len = vueIds.length;
  1222. if (len === 1) {
  1223. mpInstance._$vueId = vueIds[0];
  1224. } else if (len === 2) {
  1225. mpInstance._$vueId = vueIds[0];
  1226. mpInstance._$vuePid = vueIds[1];
  1227. }
  1228. }
  1229. function initData(vueOptions, context) {
  1230. var data = vueOptions.data || {};
  1231. var methods = vueOptions.methods || {};
  1232. if (typeof data === 'function') {
  1233. try {
  1234. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1235. } catch (e) {
  1236. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"鸿蒙德","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1237. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1238. }
  1239. }
  1240. } else {
  1241. try {
  1242. // 对 data 格式化
  1243. data = JSON.parse(JSON.stringify(data));
  1244. } catch (e) {}
  1245. }
  1246. if (!isPlainObject(data)) {
  1247. data = {};
  1248. }
  1249. Object.keys(methods).forEach(function (methodName) {
  1250. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1251. data[methodName] = methods[methodName];
  1252. }
  1253. });
  1254. return data;
  1255. }
  1256. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1257. function createObserver(name) {
  1258. return function observer(newVal, oldVal) {
  1259. if (this.$vm) {
  1260. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1261. }
  1262. };
  1263. }
  1264. function initBehaviors(vueOptions, initBehavior) {
  1265. var vueBehaviors = vueOptions.behaviors;
  1266. var vueExtends = vueOptions.extends;
  1267. var vueMixins = vueOptions.mixins;
  1268. var vueProps = vueOptions.props;
  1269. if (!vueProps) {
  1270. vueOptions.props = vueProps = [];
  1271. }
  1272. var behaviors = [];
  1273. if (Array.isArray(vueBehaviors)) {
  1274. vueBehaviors.forEach(function (behavior) {
  1275. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1276. if (behavior === 'uni://form-field') {
  1277. if (Array.isArray(vueProps)) {
  1278. vueProps.push('name');
  1279. vueProps.push('value');
  1280. } else {
  1281. vueProps.name = {
  1282. type: String,
  1283. default: '' };
  1284. vueProps.value = {
  1285. type: [String, Number, Boolean, Array, Object, Date],
  1286. default: '' };
  1287. }
  1288. }
  1289. });
  1290. }
  1291. if (isPlainObject(vueExtends) && vueExtends.props) {
  1292. behaviors.push(
  1293. initBehavior({
  1294. properties: initProperties(vueExtends.props, true) }));
  1295. }
  1296. if (Array.isArray(vueMixins)) {
  1297. vueMixins.forEach(function (vueMixin) {
  1298. if (isPlainObject(vueMixin) && vueMixin.props) {
  1299. behaviors.push(
  1300. initBehavior({
  1301. properties: initProperties(vueMixin.props, true) }));
  1302. }
  1303. });
  1304. }
  1305. return behaviors;
  1306. }
  1307. function parsePropType(key, type, defaultValue, file) {
  1308. // [String]=>String
  1309. if (Array.isArray(type) && type.length === 1) {
  1310. return type[0];
  1311. }
  1312. return type;
  1313. }
  1314. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';var options = arguments.length > 3 ? arguments[3] : undefined;
  1315. var properties = {};
  1316. if (!isBehavior) {
  1317. properties.vueId = {
  1318. type: String,
  1319. value: '' };
  1320. {
  1321. if (options.virtualHost) {
  1322. properties.virtualHostStyle = {
  1323. type: null,
  1324. value: '' };
  1325. properties.virtualHostClass = {
  1326. type: null,
  1327. value: '' };
  1328. }
  1329. }
  1330. // scopedSlotsCompiler auto
  1331. properties.scopedSlotsCompiler = {
  1332. type: String,
  1333. value: '' };
  1334. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1335. type: null,
  1336. value: [],
  1337. observer: function observer(newVal, oldVal) {
  1338. var $slots = Object.create(null);
  1339. newVal.forEach(function (slotName) {
  1340. $slots[slotName] = true;
  1341. });
  1342. this.setData({
  1343. $slots: $slots });
  1344. } };
  1345. }
  1346. if (Array.isArray(props)) {// ['title']
  1347. props.forEach(function (key) {
  1348. properties[key] = {
  1349. type: null,
  1350. observer: createObserver(key) };
  1351. });
  1352. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  1353. Object.keys(props).forEach(function (key) {
  1354. var opts = props[key];
  1355. if (isPlainObject(opts)) {// title:{type:String,default:''}
  1356. var value = opts.default;
  1357. if (isFn(value)) {
  1358. value = value();
  1359. }
  1360. opts.type = parsePropType(key, opts.type);
  1361. properties[key] = {
  1362. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1363. value: value,
  1364. observer: createObserver(key) };
  1365. } else {// content:String
  1366. var type = parsePropType(key, opts);
  1367. properties[key] = {
  1368. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1369. observer: createObserver(key) };
  1370. }
  1371. });
  1372. }
  1373. return properties;
  1374. }
  1375. function wrapper$1(event) {
  1376. // TODO 又得兼容 mpvue 的 mp 对象
  1377. try {
  1378. event.mp = JSON.parse(JSON.stringify(event));
  1379. } catch (e) {}
  1380. event.stopPropagation = noop;
  1381. event.preventDefault = noop;
  1382. event.target = event.target || {};
  1383. if (!hasOwn(event, 'detail')) {
  1384. event.detail = {};
  1385. }
  1386. if (hasOwn(event, 'markerId')) {
  1387. event.detail = typeof event.detail === 'object' ? event.detail : {};
  1388. event.detail.markerId = event.markerId;
  1389. }
  1390. if (isPlainObject(event.detail)) {
  1391. event.target = Object.assign({}, event.target, event.detail);
  1392. }
  1393. return event;
  1394. }
  1395. function getExtraValue(vm, dataPathsArray) {
  1396. var context = vm;
  1397. dataPathsArray.forEach(function (dataPathArray) {
  1398. var dataPath = dataPathArray[0];
  1399. var value = dataPathArray[2];
  1400. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  1401. var propPath = dataPathArray[1];
  1402. var valuePath = dataPathArray[3];
  1403. var vFor;
  1404. if (Number.isInteger(dataPath)) {
  1405. vFor = dataPath;
  1406. } else if (!dataPath) {
  1407. vFor = context;
  1408. } else if (typeof dataPath === 'string' && dataPath) {
  1409. if (dataPath.indexOf('#s#') === 0) {
  1410. vFor = dataPath.substr(3);
  1411. } else {
  1412. vFor = vm.__get_value(dataPath, context);
  1413. }
  1414. }
  1415. if (Number.isInteger(vFor)) {
  1416. context = value;
  1417. } else if (!propPath) {
  1418. context = vFor[value];
  1419. } else {
  1420. if (Array.isArray(vFor)) {
  1421. context = vFor.find(function (vForItem) {
  1422. return vm.__get_value(propPath, vForItem) === value;
  1423. });
  1424. } else if (isPlainObject(vFor)) {
  1425. context = Object.keys(vFor).find(function (vForKey) {
  1426. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1427. });
  1428. } else {
  1429. console.error('v-for 暂不支持循环数据:', vFor);
  1430. }
  1431. }
  1432. if (valuePath) {
  1433. context = vm.__get_value(valuePath, context);
  1434. }
  1435. }
  1436. });
  1437. return context;
  1438. }
  1439. function processEventExtra(vm, extra, event, __args__) {
  1440. var extraObj = {};
  1441. if (Array.isArray(extra) && extra.length) {
  1442. /**
  1443. *[
  1444. * ['data.items', 'data.id', item.data.id],
  1445. * ['metas', 'id', meta.id]
  1446. *],
  1447. *[
  1448. * ['data.items', 'data.id', item.data.id],
  1449. * ['metas', 'id', meta.id]
  1450. *],
  1451. *'test'
  1452. */
  1453. extra.forEach(function (dataPath, index) {
  1454. if (typeof dataPath === 'string') {
  1455. if (!dataPath) {// model,prop.sync
  1456. extraObj['$' + index] = vm;
  1457. } else {
  1458. if (dataPath === '$event') {// $event
  1459. extraObj['$' + index] = event;
  1460. } else if (dataPath === 'arguments') {
  1461. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1462. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1463. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1464. } else {
  1465. extraObj['$' + index] = vm.__get_value(dataPath);
  1466. }
  1467. }
  1468. } else {
  1469. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1470. }
  1471. });
  1472. }
  1473. return extraObj;
  1474. }
  1475. function getObjByArray(arr) {
  1476. var obj = {};
  1477. for (var i = 1; i < arr.length; i++) {
  1478. var element = arr[i];
  1479. obj[element[0]] = element[1];
  1480. }
  1481. return obj;
  1482. }
  1483. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1484. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1485. // fixed 用户直接触发 mpInstance.triggerEvent
  1486. var __args__ = isPlainObject(event.detail) ?
  1487. event.detail.__args__ || [event.detail] :
  1488. [event.detail];
  1489. if (isCustom) {// 自定义事件
  1490. isCustomMPEvent = event.currentTarget &&
  1491. event.currentTarget.dataset &&
  1492. event.currentTarget.dataset.comType === 'wx';
  1493. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1494. if (isCustomMPEvent) {
  1495. return [event];
  1496. }
  1497. return __args__;
  1498. }
  1499. }
  1500. var extraObj = processEventExtra(vm, extra, event, __args__);
  1501. var ret = [];
  1502. args.forEach(function (arg) {
  1503. if (arg === '$event') {
  1504. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1505. ret.push(event.target.value);
  1506. } else {
  1507. if (isCustom && !isCustomMPEvent) {
  1508. ret.push(__args__[0]);
  1509. } else {// wxcomponent 组件或内置组件
  1510. ret.push(event);
  1511. }
  1512. }
  1513. } else {
  1514. if (Array.isArray(arg) && arg[0] === 'o') {
  1515. ret.push(getObjByArray(arg));
  1516. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1517. ret.push(extraObj[arg]);
  1518. } else {
  1519. ret.push(arg);
  1520. }
  1521. }
  1522. });
  1523. return ret;
  1524. }
  1525. var ONCE = '~';
  1526. var CUSTOM = '^';
  1527. function isMatchEventType(eventType, optType) {
  1528. return eventType === optType ||
  1529. optType === 'regionchange' && (
  1530. eventType === 'begin' ||
  1531. eventType === 'end');
  1532. }
  1533. function getContextVm(vm) {
  1534. var $parent = vm.$parent;
  1535. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1536. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1537. $parent = $parent.$parent;
  1538. }
  1539. return $parent && $parent.$parent;
  1540. }
  1541. function handleEvent(event) {var _this2 = this;
  1542. event = wrapper$1(event);
  1543. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1544. var dataset = (event.currentTarget || event.target).dataset;
  1545. if (!dataset) {
  1546. return console.warn('事件信息不存在');
  1547. }
  1548. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1549. if (!eventOpts) {
  1550. return console.warn('事件信息不存在');
  1551. }
  1552. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1553. var eventType = event.type;
  1554. var ret = [];
  1555. eventOpts.forEach(function (eventOpt) {
  1556. var type = eventOpt[0];
  1557. var eventsArray = eventOpt[1];
  1558. var isCustom = type.charAt(0) === CUSTOM;
  1559. type = isCustom ? type.slice(1) : type;
  1560. var isOnce = type.charAt(0) === ONCE;
  1561. type = isOnce ? type.slice(1) : type;
  1562. if (eventsArray && isMatchEventType(eventType, type)) {
  1563. eventsArray.forEach(function (eventArray) {
  1564. var methodName = eventArray[0];
  1565. if (methodName) {
  1566. var handlerCtx = _this2.$vm;
  1567. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1568. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1569. }
  1570. if (methodName === '$emit') {
  1571. handlerCtx.$emit.apply(handlerCtx,
  1572. processEventArgs(
  1573. _this2.$vm,
  1574. event,
  1575. eventArray[1],
  1576. eventArray[2],
  1577. isCustom,
  1578. methodName));
  1579. return;
  1580. }
  1581. var handler = handlerCtx[methodName];
  1582. if (!isFn(handler)) {
  1583. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1584. var path = _this2.route || _this2.is;
  1585. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1586. }
  1587. if (isOnce) {
  1588. if (handler.once) {
  1589. return;
  1590. }
  1591. handler.once = true;
  1592. }
  1593. var params = processEventArgs(
  1594. _this2.$vm,
  1595. event,
  1596. eventArray[1],
  1597. eventArray[2],
  1598. isCustom,
  1599. methodName);
  1600. params = Array.isArray(params) ? params : [];
  1601. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1602. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1603. // eslint-disable-next-line no-sparse-arrays
  1604. params = params.concat([,,,,,,,,,, event]);
  1605. }
  1606. ret.push(handler.apply(handlerCtx, params));
  1607. }
  1608. });
  1609. }
  1610. });
  1611. if (
  1612. eventType === 'input' &&
  1613. ret.length === 1 &&
  1614. typeof ret[0] !== 'undefined')
  1615. {
  1616. return ret[0];
  1617. }
  1618. }
  1619. var eventChannels = {};
  1620. var eventChannelStack = [];
  1621. function getEventChannel(id) {
  1622. if (id) {
  1623. var eventChannel = eventChannels[id];
  1624. delete eventChannels[id];
  1625. return eventChannel;
  1626. }
  1627. return eventChannelStack.shift();
  1628. }
  1629. var hooks = [
  1630. 'onShow',
  1631. 'onHide',
  1632. 'onError',
  1633. 'onPageNotFound',
  1634. 'onThemeChange',
  1635. 'onUnhandledRejection'];
  1636. function initEventChannel() {
  1637. _vue.default.prototype.getOpenerEventChannel = function () {
  1638. // 微信小程序使用自身getOpenerEventChannel
  1639. {
  1640. return this.$scope.getOpenerEventChannel();
  1641. }
  1642. };
  1643. var callHook = _vue.default.prototype.__call_hook;
  1644. _vue.default.prototype.__call_hook = function (hook, args) {
  1645. if (hook === 'onLoad' && args && args.__id__) {
  1646. this.__eventChannel__ = getEventChannel(args.__id__);
  1647. delete args.__id__;
  1648. }
  1649. return callHook.call(this, hook, args);
  1650. };
  1651. }
  1652. function initScopedSlotsParams() {
  1653. var center = {};
  1654. var parents = {};
  1655. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1656. var has = center[vueId];
  1657. if (!has) {
  1658. parents[vueId] = this;
  1659. this.$on('hook:destroyed', function () {
  1660. delete parents[vueId];
  1661. });
  1662. }
  1663. return has;
  1664. };
  1665. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1666. var data = center[vueId];
  1667. if (data) {
  1668. var object = data[name] || {};
  1669. return key ? object[key] : object;
  1670. } else {
  1671. parents[vueId] = this;
  1672. this.$on('hook:destroyed', function () {
  1673. delete parents[vueId];
  1674. });
  1675. }
  1676. };
  1677. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1678. var vueIds = this.$options.propsData.vueId;
  1679. if (vueIds) {
  1680. var vueId = vueIds.split(',')[0];
  1681. var object = center[vueId] = center[vueId] || {};
  1682. object[name] = value;
  1683. if (parents[vueId]) {
  1684. parents[vueId].$forceUpdate();
  1685. }
  1686. }
  1687. };
  1688. _vue.default.mixin({
  1689. destroyed: function destroyed() {
  1690. var propsData = this.$options.propsData;
  1691. var vueId = propsData && propsData.vueId;
  1692. if (vueId) {
  1693. delete center[vueId];
  1694. delete parents[vueId];
  1695. }
  1696. } });
  1697. }
  1698. function parseBaseApp(vm, _ref3)
  1699. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1700. initEventChannel();
  1701. {
  1702. initScopedSlotsParams();
  1703. }
  1704. if (vm.$options.store) {
  1705. _vue.default.prototype.$store = vm.$options.store;
  1706. }
  1707. uniIdMixin(_vue.default);
  1708. _vue.default.prototype.mpHost = "mp-weixin";
  1709. _vue.default.mixin({
  1710. beforeCreate: function beforeCreate() {
  1711. if (!this.$options.mpType) {
  1712. return;
  1713. }
  1714. this.mpType = this.$options.mpType;
  1715. this.$mp = _defineProperty({
  1716. data: {} },
  1717. this.mpType, this.$options.mpInstance);
  1718. this.$scope = this.$options.mpInstance;
  1719. delete this.$options.mpType;
  1720. delete this.$options.mpInstance;
  1721. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1722. var app = getApp();
  1723. if (app.$vm && app.$vm.$i18n) {
  1724. this._i18n = app.$vm.$i18n;
  1725. }
  1726. }
  1727. if (this.mpType !== 'app') {
  1728. initRefs(this);
  1729. initMocks(this, mocks);
  1730. }
  1731. } });
  1732. var appOptions = {
  1733. onLaunch: function onLaunch(args) {
  1734. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1735. return;
  1736. }
  1737. {
  1738. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1739. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1740. }
  1741. }
  1742. this.$vm = vm;
  1743. this.$vm.$mp = {
  1744. app: this };
  1745. this.$vm.$scope = this;
  1746. // vm 上也挂载 globalData
  1747. this.$vm.globalData = this.globalData;
  1748. this.$vm._isMounted = true;
  1749. this.$vm.__call_hook('mounted', args);
  1750. this.$vm.__call_hook('onLaunch', args);
  1751. } };
  1752. // 兼容旧版本 globalData
  1753. appOptions.globalData = vm.$options.globalData || {};
  1754. // 将 methods 中的方法挂在 getApp() 中
  1755. var methods = vm.$options.methods;
  1756. if (methods) {
  1757. Object.keys(methods).forEach(function (name) {
  1758. appOptions[name] = methods[name];
  1759. });
  1760. }
  1761. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  1762. initHooks(appOptions, hooks);
  1763. initUnknownHooks(appOptions, vm.$options);
  1764. return appOptions;
  1765. }
  1766. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1767. function findVmByVueId(vm, vuePid) {
  1768. var $children = vm.$children;
  1769. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1770. for (var i = $children.length - 1; i >= 0; i--) {
  1771. var childVm = $children[i];
  1772. if (childVm.$scope._$vueId === vuePid) {
  1773. return childVm;
  1774. }
  1775. }
  1776. // 反向递归查找
  1777. var parentVm;
  1778. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1779. parentVm = findVmByVueId($children[_i], vuePid);
  1780. if (parentVm) {
  1781. return parentVm;
  1782. }
  1783. }
  1784. }
  1785. function initBehavior(options) {
  1786. return Behavior(options);
  1787. }
  1788. function isPage() {
  1789. return !!this.route;
  1790. }
  1791. function initRelation(detail) {
  1792. this.triggerEvent('__l', detail);
  1793. }
  1794. function selectAllComponents(mpInstance, selector, $refs) {
  1795. var components = mpInstance.selectAllComponents(selector);
  1796. components.forEach(function (component) {
  1797. var ref = component.dataset.ref;
  1798. $refs[ref] = component.$vm || component;
  1799. {
  1800. if (component.dataset.vueGeneric === 'scoped') {
  1801. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1802. selectAllComponents(scopedComponent, selector, $refs);
  1803. });
  1804. }
  1805. }
  1806. });
  1807. }
  1808. function initRefs(vm) {
  1809. var mpInstance = vm.$scope;
  1810. Object.defineProperty(vm, '$refs', {
  1811. get: function get() {
  1812. var $refs = {};
  1813. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1814. // TODO 暂不考虑 for 中的 scoped
  1815. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1816. forComponents.forEach(function (component) {
  1817. var ref = component.dataset.ref;
  1818. if (!$refs[ref]) {
  1819. $refs[ref] = [];
  1820. }
  1821. $refs[ref].push(component.$vm || component);
  1822. });
  1823. return $refs;
  1824. } });
  1825. }
  1826. function handleLink(event) {var _ref4 =
  1827. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1828. var parentVm;
  1829. if (vuePid) {
  1830. parentVm = findVmByVueId(this.$vm, vuePid);
  1831. }
  1832. if (!parentVm) {
  1833. parentVm = this.$vm;
  1834. }
  1835. vueOptions.parent = parentVm;
  1836. }
  1837. function parseApp(vm) {
  1838. return parseBaseApp(vm, {
  1839. mocks: mocks,
  1840. initRefs: initRefs });
  1841. }
  1842. function createApp(vm) {
  1843. App(parseApp(vm));
  1844. return vm;
  1845. }
  1846. var encodeReserveRE = /[!'()*]/g;
  1847. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1848. var commaRE = /%2C/g;
  1849. // fixed encodeURIComponent which is more conformant to RFC3986:
  1850. // - escapes [!'()*]
  1851. // - preserve commas
  1852. var encode = function encode(str) {return encodeURIComponent(str).
  1853. replace(encodeReserveRE, encodeReserveReplacer).
  1854. replace(commaRE, ',');};
  1855. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1856. var res = obj ? Object.keys(obj).map(function (key) {
  1857. var val = obj[key];
  1858. if (val === undefined) {
  1859. return '';
  1860. }
  1861. if (val === null) {
  1862. return encodeStr(key);
  1863. }
  1864. if (Array.isArray(val)) {
  1865. var result = [];
  1866. val.forEach(function (val2) {
  1867. if (val2 === undefined) {
  1868. return;
  1869. }
  1870. if (val2 === null) {
  1871. result.push(encodeStr(key));
  1872. } else {
  1873. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1874. }
  1875. });
  1876. return result.join('&');
  1877. }
  1878. return encodeStr(key) + '=' + encodeStr(val);
  1879. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1880. return res ? "?".concat(res) : '';
  1881. }
  1882. function parseBaseComponent(vueComponentOptions)
  1883. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1884. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1885. var options = _objectSpread({
  1886. multipleSlots: true,
  1887. addGlobalClass: true },
  1888. vueOptions.options || {});
  1889. {
  1890. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1891. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1892. Object.assign(options, vueOptions['mp-weixin'].options);
  1893. }
  1894. }
  1895. var componentOptions = {
  1896. options: options,
  1897. data: initData(vueOptions, _vue.default.prototype),
  1898. behaviors: initBehaviors(vueOptions, initBehavior),
  1899. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  1900. lifetimes: {
  1901. attached: function attached() {
  1902. var properties = this.properties;
  1903. var options = {
  1904. mpType: isPage.call(this) ? 'page' : 'component',
  1905. mpInstance: this,
  1906. propsData: properties };
  1907. initVueIds(properties.vueId, this);
  1908. // 处理父子关系
  1909. initRelation.call(this, {
  1910. vuePid: this._$vuePid,
  1911. vueOptions: options });
  1912. // 初始化 vue 实例
  1913. this.$vm = new VueComponent(options);
  1914. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1915. initSlots(this.$vm, properties.vueSlots);
  1916. // 触发首次 setData
  1917. this.$vm.$mount();
  1918. },
  1919. ready: function ready() {
  1920. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1921. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1922. if (this.$vm) {
  1923. this.$vm._isMounted = true;
  1924. this.$vm.__call_hook('mounted');
  1925. this.$vm.__call_hook('onReady');
  1926. }
  1927. },
  1928. detached: function detached() {
  1929. this.$vm && this.$vm.$destroy();
  1930. } },
  1931. pageLifetimes: {
  1932. show: function show(args) {
  1933. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1934. },
  1935. hide: function hide() {
  1936. this.$vm && this.$vm.__call_hook('onPageHide');
  1937. },
  1938. resize: function resize(size) {
  1939. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1940. } },
  1941. methods: {
  1942. __l: handleLink,
  1943. __e: handleEvent } };
  1944. // externalClasses
  1945. if (vueOptions.externalClasses) {
  1946. componentOptions.externalClasses = vueOptions.externalClasses;
  1947. }
  1948. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1949. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1950. componentOptions.methods[callMethod] = function (args) {
  1951. return this.$vm[callMethod](args);
  1952. };
  1953. });
  1954. }
  1955. if (isPage) {
  1956. return componentOptions;
  1957. }
  1958. return [componentOptions, VueComponent];
  1959. }
  1960. function parseComponent(vueComponentOptions) {
  1961. return parseBaseComponent(vueComponentOptions, {
  1962. isPage: isPage,
  1963. initRelation: initRelation });
  1964. }
  1965. var hooks$1 = [
  1966. 'onShow',
  1967. 'onHide',
  1968. 'onUnload'];
  1969. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1970. function parseBasePage(vuePageOptions, _ref6)
  1971. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1972. var pageOptions = parseComponent(vuePageOptions);
  1973. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1974. pageOptions.methods.onLoad = function (query) {
  1975. this.options = query;
  1976. var copyQuery = Object.assign({}, query);
  1977. delete copyQuery.__id__;
  1978. this.$page = {
  1979. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1980. this.$vm.$mp.query = query; // 兼容 mpvue
  1981. this.$vm.__call_hook('onLoad', query);
  1982. };
  1983. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  1984. return pageOptions;
  1985. }
  1986. function parsePage(vuePageOptions) {
  1987. return parseBasePage(vuePageOptions, {
  1988. isPage: isPage,
  1989. initRelation: initRelation });
  1990. }
  1991. function createPage(vuePageOptions) {
  1992. {
  1993. return Component(parsePage(vuePageOptions));
  1994. }
  1995. }
  1996. function createComponent(vueOptions) {
  1997. {
  1998. return Component(parseComponent(vueOptions));
  1999. }
  2000. }
  2001. function createSubpackageApp(vm) {
  2002. var appOptions = parseApp(vm);
  2003. var app = getApp({
  2004. allowDefault: true });
  2005. vm.$scope = app;
  2006. var globalData = app.globalData;
  2007. if (globalData) {
  2008. Object.keys(appOptions.globalData).forEach(function (name) {
  2009. if (!hasOwn(globalData, name)) {
  2010. globalData[name] = appOptions.globalData[name];
  2011. }
  2012. });
  2013. }
  2014. Object.keys(appOptions).forEach(function (name) {
  2015. if (!hasOwn(app, name)) {
  2016. app[name] = appOptions[name];
  2017. }
  2018. });
  2019. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2020. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  2021. vm.__call_hook('onShow', args);
  2022. });
  2023. }
  2024. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2025. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  2026. vm.__call_hook('onHide', args);
  2027. });
  2028. }
  2029. if (isFn(appOptions.onLaunch)) {
  2030. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2031. vm.__call_hook('onLaunch', args);
  2032. }
  2033. return vm;
  2034. }
  2035. function createPlugin(vm) {
  2036. var appOptions = parseApp(vm);
  2037. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2038. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  2039. vm.__call_hook('onShow', args);
  2040. });
  2041. }
  2042. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2043. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  2044. vm.__call_hook('onHide', args);
  2045. });
  2046. }
  2047. if (isFn(appOptions.onLaunch)) {
  2048. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2049. vm.__call_hook('onLaunch', args);
  2050. }
  2051. return vm;
  2052. }
  2053. todos.forEach(function (todoApi) {
  2054. protocols[todoApi] = false;
  2055. });
  2056. canIUses.forEach(function (canIUseApi) {
  2057. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  2058. canIUseApi;
  2059. if (!wx.canIUse(apiName)) {
  2060. protocols[canIUseApi] = false;
  2061. }
  2062. });
  2063. var uni = {};
  2064. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2065. uni = new Proxy({}, {
  2066. get: function get(target, name) {
  2067. if (hasOwn(target, name)) {
  2068. return target[name];
  2069. }
  2070. if (baseApi[name]) {
  2071. return baseApi[name];
  2072. }
  2073. if (api[name]) {
  2074. return promisify(name, api[name]);
  2075. }
  2076. {
  2077. if (extraApi[name]) {
  2078. return promisify(name, extraApi[name]);
  2079. }
  2080. if (todoApis[name]) {
  2081. return promisify(name, todoApis[name]);
  2082. }
  2083. }
  2084. if (eventApi[name]) {
  2085. return eventApi[name];
  2086. }
  2087. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  2088. return;
  2089. }
  2090. return promisify(name, wrapper(name, wx[name]));
  2091. },
  2092. set: function set(target, name, value) {
  2093. target[name] = value;
  2094. return true;
  2095. } });
  2096. } else {
  2097. Object.keys(baseApi).forEach(function (name) {
  2098. uni[name] = baseApi[name];
  2099. });
  2100. {
  2101. Object.keys(todoApis).forEach(function (name) {
  2102. uni[name] = promisify(name, todoApis[name]);
  2103. });
  2104. Object.keys(extraApi).forEach(function (name) {
  2105. uni[name] = promisify(name, todoApis[name]);
  2106. });
  2107. }
  2108. Object.keys(eventApi).forEach(function (name) {
  2109. uni[name] = eventApi[name];
  2110. });
  2111. Object.keys(api).forEach(function (name) {
  2112. uni[name] = promisify(name, api[name]);
  2113. });
  2114. Object.keys(wx).forEach(function (name) {
  2115. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2116. uni[name] = promisify(name, wrapper(name, wx[name]));
  2117. }
  2118. });
  2119. }
  2120. wx.createApp = createApp;
  2121. wx.createPage = createPage;
  2122. wx.createComponent = createComponent;
  2123. wx.createSubpackageApp = createSubpackageApp;
  2124. wx.createPlugin = createPlugin;
  2125. var uni$1 = uni;var _default =
  2126. uni$1;exports.default = _default;
  2127. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  2128. /***/ }),
  2129. /***/ 105:
  2130. /*!*********************************!*\
  2131. !*** D:/2022/10/hmd/api/set.js ***!
  2132. \*********************************/
  2133. /*! no static exports found */
  2134. /***/ (function(module, exports, __webpack_require__) {
  2135. "use strict";
  2136. Object.defineProperty(exports, "__esModule", { value: true });exports.userEdit = userEdit;exports.logout = logout;exports.registerReset = registerReset;exports.binding = binding;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2137. // 修改用户信息
  2138. function userEdit(data) {
  2139. return (0, _request.default)({
  2140. url: '/api/user/edit',
  2141. method: 'post',
  2142. data: data });
  2143. }
  2144. //退出登录
  2145. function logout(data) {
  2146. return (0, _request.default)({
  2147. url: '/api/logout',
  2148. method: 'get',
  2149. data: data });
  2150. }
  2151. //修改密码
  2152. function registerReset(data) {
  2153. return (0, _request.default)({
  2154. url: '/api/register/reset',
  2155. method: 'post',
  2156. data: data });
  2157. }
  2158. //绑定手机
  2159. function binding(data) {
  2160. return (0, _request.default)({
  2161. url: '/api/binding',
  2162. method: 'post',
  2163. data: data });
  2164. }
  2165. /***/ }),
  2166. /***/ 14:
  2167. /*!**********************************************************************************************************!*\
  2168. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  2169. \**********************************************************************************************************/
  2170. /*! exports provided: default */
  2171. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2172. "use strict";
  2173. __webpack_require__.r(__webpack_exports__);
  2174. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  2175. /* globals __VUE_SSR_CONTEXT__ */
  2176. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  2177. // This module is a runtime utility for cleaner component module output and will
  2178. // be included in the final webpack user bundle.
  2179. function normalizeComponent (
  2180. scriptExports,
  2181. render,
  2182. staticRenderFns,
  2183. functionalTemplate,
  2184. injectStyles,
  2185. scopeId,
  2186. moduleIdentifier, /* server only */
  2187. shadowMode, /* vue-cli only */
  2188. components, // fixed by xxxxxx auto components
  2189. renderjs // fixed by xxxxxx renderjs
  2190. ) {
  2191. // Vue.extend constructor export interop
  2192. var options = typeof scriptExports === 'function'
  2193. ? scriptExports.options
  2194. : scriptExports
  2195. // fixed by xxxxxx auto components
  2196. if (components) {
  2197. if (!options.components) {
  2198. options.components = {}
  2199. }
  2200. var hasOwn = Object.prototype.hasOwnProperty
  2201. for (var name in components) {
  2202. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  2203. options.components[name] = components[name]
  2204. }
  2205. }
  2206. }
  2207. // fixed by xxxxxx renderjs
  2208. if (renderjs) {
  2209. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  2210. this[renderjs.__module] = this
  2211. });
  2212. (options.mixins || (options.mixins = [])).push(renderjs)
  2213. }
  2214. // render functions
  2215. if (render) {
  2216. options.render = render
  2217. options.staticRenderFns = staticRenderFns
  2218. options._compiled = true
  2219. }
  2220. // functional template
  2221. if (functionalTemplate) {
  2222. options.functional = true
  2223. }
  2224. // scopedId
  2225. if (scopeId) {
  2226. options._scopeId = 'data-v-' + scopeId
  2227. }
  2228. var hook
  2229. if (moduleIdentifier) { // server build
  2230. hook = function (context) {
  2231. // 2.3 injection
  2232. context =
  2233. context || // cached call
  2234. (this.$vnode && this.$vnode.ssrContext) || // stateful
  2235. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  2236. // 2.2 with runInNewContext: true
  2237. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  2238. context = __VUE_SSR_CONTEXT__
  2239. }
  2240. // inject component styles
  2241. if (injectStyles) {
  2242. injectStyles.call(this, context)
  2243. }
  2244. // register component module identifier for async chunk inferrence
  2245. if (context && context._registeredComponents) {
  2246. context._registeredComponents.add(moduleIdentifier)
  2247. }
  2248. }
  2249. // used by ssr in case component is cached and beforeCreate
  2250. // never gets called
  2251. options._ssrRegister = hook
  2252. } else if (injectStyles) {
  2253. hook = shadowMode
  2254. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  2255. : injectStyles
  2256. }
  2257. if (hook) {
  2258. if (options.functional) {
  2259. // for template-only hot-reload because in that case the render fn doesn't
  2260. // go through the normalizer
  2261. options._injectStyles = hook
  2262. // register for functioal component in vue file
  2263. var originalRender = options.render
  2264. options.render = function renderWithStyleInjection (h, context) {
  2265. hook.call(context)
  2266. return originalRender(h, context)
  2267. }
  2268. } else {
  2269. // inject component registration as beforeCreate hook
  2270. var existing = options.beforeCreate
  2271. options.beforeCreate = existing
  2272. ? [].concat(existing, hook)
  2273. : [hook]
  2274. }
  2275. }
  2276. return {
  2277. exports: scriptExports,
  2278. options: options
  2279. }
  2280. }
  2281. /***/ }),
  2282. /***/ 146:
  2283. /*!***********************************!*\
  2284. !*** D:/2022/10/hmd/api/order.js ***!
  2285. \***********************************/
  2286. /*! no static exports found */
  2287. /***/ (function(module, exports, __webpack_require__) {
  2288. "use strict";
  2289. Object.defineProperty(exports, "__esModule", { value: true });exports.confirm = confirm;exports.couponsOrder = couponsOrder;exports.getCouponsList = getCouponsList;exports.order_comment = order_comment;exports.product = product;exports.express_query = express_query;exports.upload = upload;exports.orderList = orderList;exports.orderDetail = orderDetail;exports.orderCancel = orderCancel;exports.orderDel = orderDel;exports.refund = refund;exports.refundReason = refundReason;exports.orderTake = orderTake;exports.orderPay = orderPay;exports.createOrderkey = createOrderkey;exports.computedOrderkey = computedOrderkey;var _request = _interopRequireWildcard(__webpack_require__(/*! @/utils/request */ 25));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
  2290. // 订单确认
  2291. function confirm(data) {
  2292. return (0, _request.default)({
  2293. url: '/api/order/confirm',
  2294. method: 'post',
  2295. data: data });
  2296. }
  2297. //获取可使用优惠券
  2298. function couponsOrder(data, price) {
  2299. return (0, _request.default)({
  2300. url: '/api/coupons/order/' + price,
  2301. method: 'get',
  2302. data: data });
  2303. }
  2304. //获取优惠券列表
  2305. function getCouponsList(data, types) {
  2306. //优惠券状态 0全部 1未使用 2已使用
  2307. return (0, _request.default)({
  2308. url: '/api/coupons/user/' + types,
  2309. method: 'get',
  2310. data: data });
  2311. }
  2312. //提交评论
  2313. function order_comment(data) {
  2314. return (0, _request.default)({
  2315. url: '/api/order/comment',
  2316. method: 'post',
  2317. data: data });
  2318. }
  2319. //订单产品信息
  2320. function product(data) {
  2321. return (0, _request.default)({
  2322. url: '/api/order/product',
  2323. method: 'post',
  2324. data: data });
  2325. }
  2326. // 快递查询
  2327. function express_query(data) {
  2328. return (0, _request.default)({
  2329. url: '/api/order/express_query',
  2330. method: 'get',
  2331. data: data });
  2332. }
  2333. //上传图片
  2334. function upload(data) {
  2335. return (0, _request.upFilse)({
  2336. url: '/api/upload/image',
  2337. method: 'post',
  2338. data: data });
  2339. }
  2340. // 订单列表
  2341. function orderList(data) {
  2342. return (0, _request.default)({
  2343. url: '/api/order/list',
  2344. method: 'get',
  2345. data: data });
  2346. }
  2347. // 订单详细
  2348. function orderDetail(data, orderid) {
  2349. return (0, _request.default)({
  2350. url: '/api/order/detail/' + orderid,
  2351. method: 'get',
  2352. data: data });
  2353. }
  2354. // 取消订单
  2355. function orderCancel(data) {
  2356. return (0, _request.default)({
  2357. url: '/api/order/cancel',
  2358. method: 'post',
  2359. data: data });
  2360. }
  2361. // 删除订单
  2362. function orderDel(data) {
  2363. return (0, _request.default)({
  2364. url: '/api/order/del',
  2365. method: 'get',
  2366. data: data });
  2367. }
  2368. // 申请退款
  2369. function refund(data) {
  2370. return (0, _request.default)({
  2371. url: '/api/order/refund/verify',
  2372. method: 'post',
  2373. data: data });
  2374. }
  2375. // 退款理由列表
  2376. function refundReason(data) {
  2377. return (0, _request.default)({
  2378. url: '/api/order/refund/reason',
  2379. method: 'get',
  2380. data: data });
  2381. }
  2382. // 确认收货
  2383. function orderTake(data) {
  2384. return (0, _request.default)({
  2385. url: '/api/order/take',
  2386. method: 'post',
  2387. data: data });
  2388. }
  2389. // 订单支付
  2390. function orderPay(data) {
  2391. return (0, _request.default)({
  2392. url: '/api/order/pay',
  2393. method: 'post',
  2394. data: data });
  2395. }
  2396. // 创建订单
  2397. function createOrderkey(data, key) {
  2398. return (0, _request.default)({
  2399. url: '/api/order/create/' + key,
  2400. method: 'post',
  2401. data: data });
  2402. }
  2403. // 统计订单金额
  2404. function computedOrderkey(data) {
  2405. return (0, _request.default)({
  2406. url: '/api/order/computed/' + data.orderkey,
  2407. method: 'post',
  2408. data: data });
  2409. }
  2410. /***/ }),
  2411. /***/ 171:
  2412. /*!****************************************!*\
  2413. !*** D:/2022/10/hmd/utils/rocessor.js ***!
  2414. \****************************************/
  2415. /*! no static exports found */
  2416. /***/ (function(module, exports, __webpack_require__) {
  2417. "use strict";
  2418. Object.defineProperty(exports, "__esModule", { value: true });exports.isCardNo = isCardNo;exports.getMoneyStyle = getMoneyStyle;exports.timeComputed = timeComputed;exports.openMap = openMap;exports.getTime = getTime; //身份证验证
  2419. function isCardNo(card) {
  2420. // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  2421. var reg =
  2422. /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
  2423. if (reg.test(card) === false) {
  2424. console.log(card);
  2425. return false;
  2426. }
  2427. return true;
  2428. }
  2429. // 金额显示变化
  2430. function getMoneyStyle() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  2431. if (typeof value == 'string') {
  2432. value = (+value).toFixed(2);
  2433. }
  2434. if (typeof value == 'number') {
  2435. value = value.toFixed(2);
  2436. }
  2437. // 将字符串转为数组
  2438. var n = value.split("");
  2439. // 反转数组并复制循环处理
  2440. var arr = n.reverse().map(function (e, ind, ar) {
  2441. // 判断当前下标是否为3的整数倍数且不为最后一个下标
  2442. if (ind % 3 == 0 && ind / 3 > 1 && ind != ar.length) {
  2443. return e + ',';
  2444. } else {
  2445. return e;
  2446. }
  2447. });
  2448. // 反转数组回复原来排序并合并回字符串
  2449. arr = arr.reverse().join('');
  2450. return arr;
  2451. }
  2452. // 倒计时计算
  2453. // 计算倒计时时间
  2454. function timeComputed(time) {
  2455. // 获取当前时间
  2456. var actTime = new Date().getTime();
  2457. // 获取到期时间
  2458. var stopTime = time - actTime;
  2459. // 判断是否小于0
  2460. if (stopTime < 0) {
  2461. stopTime = stopTime * -1;
  2462. }
  2463. var day = Math.floor(stopTime / 1000 / 60 / 60 / 24); //获取剩余天数
  2464. var hours = Math.floor(stopTime / 1000 / 60 / 60 % 24); //获取剩余小时数
  2465. var minutes = Math.floor(stopTime / 1000 / 60 % 60); //获取分钟
  2466. var seconds = Math.floor(stopTime / 1000 % 60); //获取秒数
  2467. return {
  2468. hours: hours, //倒计时小时数
  2469. minutes: minutes, //倒计时分钟数
  2470. seconds: seconds, //倒计时秒数
  2471. day: day //倒计时天数
  2472. };
  2473. }
  2474. // 调用打开地图方法
  2475. function openMap(e) {
  2476. var that = this;
  2477. return new Promise(function (resolve, reject) {
  2478. wx.getSetting({
  2479. success: function success(res) {
  2480. //这里判断是否有地位权限
  2481. if (!res.authSetting['scope.userLocation']) {
  2482. wx.showModal({
  2483. title: '提示',
  2484. content: '请求获取位置权限',
  2485. success: function success(res) {
  2486. if (res.confirm == false) {
  2487. // 授权失败
  2488. reject();
  2489. return false;
  2490. }
  2491. wx.openSetting({
  2492. success: function success(res) {
  2493. //如果再次拒绝则返回页面并提示
  2494. if (!res.authSetting['scope.userLocation']) {
  2495. wx.showToast({
  2496. title: '此功能需获取位置信息,请重新设置',
  2497. duration: 3000,
  2498. icon: 'none' });
  2499. } else {
  2500. //允许授权,调用地图
  2501. resolve();
  2502. }
  2503. } });
  2504. } });
  2505. } else {
  2506. //如果有定位权限,调用地图
  2507. resolve();
  2508. }
  2509. } });
  2510. });
  2511. }
  2512. //时间戳转换成时间
  2513. function getTime(time) {
  2514. var num = 13 - (time + '').length;
  2515. var l = 1; //倍数
  2516. for (var i = 0; i < num; i++) {
  2517. l += '0';
  2518. }
  2519. // 重新解析为数字
  2520. l = parseInt(l);
  2521. var date = new Date(parseInt(time) * l);
  2522. var year = date.getFullYear();
  2523. var mon = date.getMonth() + 1;
  2524. var day = date.getDate();
  2525. var hours = date.getHours();
  2526. var minu = date.getMinutes();
  2527. var sec = date.getSeconds();
  2528. return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
  2529. }
  2530. /***/ }),
  2531. /***/ 172:
  2532. /*!************************************!*\
  2533. !*** D:/2022/10/hmd/api/wallet.js ***!
  2534. \************************************/
  2535. /*! no static exports found */
  2536. /***/ (function(module, exports, __webpack_require__) {
  2537. "use strict";
  2538. Object.defineProperty(exports, "__esModule", { value: true });exports.spreadCommission = spreadCommission;exports.userBalance = userBalance;exports.extractCash = extractCash;exports.extractBank = extractBank;exports.rechargeRoutine = rechargeRoutine;exports.aliInfo = aliInfo;exports.bankInfo = bankInfo;exports.setAliInfo = setAliInfo;exports.setBankInfo = setBankInfo;exports.balance = balance;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2539. // 获取用户消费记录
  2540. function spreadCommission(data, state) {
  2541. return (0, _request.default)({
  2542. url: '/api/spread/commission/' + state,
  2543. method: 'get',
  2544. data: data });
  2545. }
  2546. // 获取账户余额
  2547. function userBalance(data) {
  2548. return (0, _request.default)({
  2549. url: '/api/user/balance',
  2550. method: 'get',
  2551. data: data });
  2552. }
  2553. // 提现
  2554. function extractCash(data) {
  2555. return (0, _request.default)({
  2556. url: '/api/extract/cash',
  2557. method: 'post',
  2558. data: data });
  2559. }
  2560. // 提现信息
  2561. function extractBank(data) {
  2562. return (0, _request.default)({
  2563. url: '/api/extract/bank',
  2564. method: 'get',
  2565. data: data });
  2566. }
  2567. // 小程序充值
  2568. function rechargeRoutine(data) {
  2569. return (0, _request.default)({
  2570. url: '/api/recharge/routine',
  2571. method: 'post',
  2572. data: data });
  2573. }
  2574. // 获取提现支付宝账号
  2575. function aliInfo(data) {
  2576. return (0, _request.default)({
  2577. url: '/api/ali/info',
  2578. method: 'get',
  2579. data: data });
  2580. }
  2581. //获取默认银行卡账号
  2582. function bankInfo(data) {
  2583. return (0, _request.default)({
  2584. url: '/api/bank/info',
  2585. method: 'get',
  2586. data: data });
  2587. }
  2588. // 保存提现支付宝账号
  2589. function setAliInfo(data) {
  2590. return (0, _request.default)({
  2591. url: '/api/ali/edit',
  2592. method: 'post',
  2593. data: data });
  2594. }
  2595. //保存默认银行卡账号
  2596. function setBankInfo(data) {
  2597. return (0, _request.default)({
  2598. url: '/api/bank/edit',
  2599. method: 'post',
  2600. data: data });
  2601. }
  2602. // 账户余额
  2603. function balance(data) {
  2604. return (0, _request.default)({
  2605. url: '/api/user/balance',
  2606. method: 'get',
  2607. data: data });
  2608. }
  2609. /***/ }),
  2610. /***/ 2:
  2611. /*!***********************************!*\
  2612. !*** (webpack)/buildin/global.js ***!
  2613. \***********************************/
  2614. /*! no static exports found */
  2615. /***/ (function(module, exports) {
  2616. var g;
  2617. // This works in non-strict mode
  2618. g = (function() {
  2619. return this;
  2620. })();
  2621. try {
  2622. // This works if eval is allowed (see CSP)
  2623. g = g || new Function("return this")();
  2624. } catch (e) {
  2625. // This works if the window reference is available
  2626. if (typeof window === "object") g = window;
  2627. }
  2628. // g can still be undefined, but nothing to do about it...
  2629. // We return undefined, instead of nothing here, so it's
  2630. // easier to handle this case. if(!global) { ...}
  2631. module.exports = g;
  2632. /***/ }),
  2633. /***/ 21:
  2634. /*!**********************************************************!*\
  2635. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  2636. \**********************************************************/
  2637. /*! no static exports found */
  2638. /***/ (function(module, exports, __webpack_require__) {
  2639. module.exports = __webpack_require__(/*! regenerator-runtime */ 22);
  2640. /***/ }),
  2641. /***/ 22:
  2642. /*!************************************************************!*\
  2643. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  2644. \************************************************************/
  2645. /*! no static exports found */
  2646. /***/ (function(module, exports, __webpack_require__) {
  2647. /**
  2648. * Copyright (c) 2014-present, Facebook, Inc.
  2649. *
  2650. * This source code is licensed under the MIT license found in the
  2651. * LICENSE file in the root directory of this source tree.
  2652. */
  2653. // This method of obtaining a reference to the global object needs to be
  2654. // kept identical to the way it is obtained in runtime.js
  2655. var g = (function() {
  2656. return this || (typeof self === "object" && self);
  2657. })() || Function("return this")();
  2658. // Use `getOwnPropertyNames` because not all browsers support calling
  2659. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  2660. var hadRuntime = g.regeneratorRuntime &&
  2661. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  2662. // Save the old regeneratorRuntime in case it needs to be restored later.
  2663. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  2664. // Force reevalutation of runtime.js.
  2665. g.regeneratorRuntime = undefined;
  2666. module.exports = __webpack_require__(/*! ./runtime */ 23);
  2667. if (hadRuntime) {
  2668. // Restore the original runtime.
  2669. g.regeneratorRuntime = oldRuntime;
  2670. } else {
  2671. // Remove the global property added by runtime.js.
  2672. try {
  2673. delete g.regeneratorRuntime;
  2674. } catch(e) {
  2675. g.regeneratorRuntime = undefined;
  2676. }
  2677. }
  2678. /***/ }),
  2679. /***/ 23:
  2680. /*!*****************************************************!*\
  2681. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  2682. \*****************************************************/
  2683. /*! no static exports found */
  2684. /***/ (function(module, exports) {
  2685. /**
  2686. * Copyright (c) 2014-present, Facebook, Inc.
  2687. *
  2688. * This source code is licensed under the MIT license found in the
  2689. * LICENSE file in the root directory of this source tree.
  2690. */
  2691. !(function(global) {
  2692. "use strict";
  2693. var Op = Object.prototype;
  2694. var hasOwn = Op.hasOwnProperty;
  2695. var undefined; // More compressible than void 0.
  2696. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  2697. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  2698. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  2699. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  2700. var inModule = typeof module === "object";
  2701. var runtime = global.regeneratorRuntime;
  2702. if (runtime) {
  2703. if (inModule) {
  2704. // If regeneratorRuntime is defined globally and we're in a module,
  2705. // make the exports object identical to regeneratorRuntime.
  2706. module.exports = runtime;
  2707. }
  2708. // Don't bother evaluating the rest of this file if the runtime was
  2709. // already defined globally.
  2710. return;
  2711. }
  2712. // Define the runtime globally (as expected by generated code) as either
  2713. // module.exports (if we're in a module) or a new, empty object.
  2714. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  2715. function wrap(innerFn, outerFn, self, tryLocsList) {
  2716. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  2717. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  2718. var generator = Object.create(protoGenerator.prototype);
  2719. var context = new Context(tryLocsList || []);
  2720. // The ._invoke method unifies the implementations of the .next,
  2721. // .throw, and .return methods.
  2722. generator._invoke = makeInvokeMethod(innerFn, self, context);
  2723. return generator;
  2724. }
  2725. runtime.wrap = wrap;
  2726. // Try/catch helper to minimize deoptimizations. Returns a completion
  2727. // record like context.tryEntries[i].completion. This interface could
  2728. // have been (and was previously) designed to take a closure to be
  2729. // invoked without arguments, but in all the cases we care about we
  2730. // already have an existing method we want to call, so there's no need
  2731. // to create a new function object. We can even get away with assuming
  2732. // the method takes exactly one argument, since that happens to be true
  2733. // in every case, so we don't have to touch the arguments object. The
  2734. // only additional allocation required is the completion record, which
  2735. // has a stable shape and so hopefully should be cheap to allocate.
  2736. function tryCatch(fn, obj, arg) {
  2737. try {
  2738. return { type: "normal", arg: fn.call(obj, arg) };
  2739. } catch (err) {
  2740. return { type: "throw", arg: err };
  2741. }
  2742. }
  2743. var GenStateSuspendedStart = "suspendedStart";
  2744. var GenStateSuspendedYield = "suspendedYield";
  2745. var GenStateExecuting = "executing";
  2746. var GenStateCompleted = "completed";
  2747. // Returning this object from the innerFn has the same effect as
  2748. // breaking out of the dispatch switch statement.
  2749. var ContinueSentinel = {};
  2750. // Dummy constructor functions that we use as the .constructor and
  2751. // .constructor.prototype properties for functions that return Generator
  2752. // objects. For full spec compliance, you may wish to configure your
  2753. // minifier not to mangle the names of these two functions.
  2754. function Generator() {}
  2755. function GeneratorFunction() {}
  2756. function GeneratorFunctionPrototype() {}
  2757. // This is a polyfill for %IteratorPrototype% for environments that
  2758. // don't natively support it.
  2759. var IteratorPrototype = {};
  2760. IteratorPrototype[iteratorSymbol] = function () {
  2761. return this;
  2762. };
  2763. var getProto = Object.getPrototypeOf;
  2764. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  2765. if (NativeIteratorPrototype &&
  2766. NativeIteratorPrototype !== Op &&
  2767. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  2768. // This environment has a native %IteratorPrototype%; use it instead
  2769. // of the polyfill.
  2770. IteratorPrototype = NativeIteratorPrototype;
  2771. }
  2772. var Gp = GeneratorFunctionPrototype.prototype =
  2773. Generator.prototype = Object.create(IteratorPrototype);
  2774. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  2775. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  2776. GeneratorFunctionPrototype[toStringTagSymbol] =
  2777. GeneratorFunction.displayName = "GeneratorFunction";
  2778. // Helper for defining the .next, .throw, and .return methods of the
  2779. // Iterator interface in terms of a single ._invoke method.
  2780. function defineIteratorMethods(prototype) {
  2781. ["next", "throw", "return"].forEach(function(method) {
  2782. prototype[method] = function(arg) {
  2783. return this._invoke(method, arg);
  2784. };
  2785. });
  2786. }
  2787. runtime.isGeneratorFunction = function(genFun) {
  2788. var ctor = typeof genFun === "function" && genFun.constructor;
  2789. return ctor
  2790. ? ctor === GeneratorFunction ||
  2791. // For the native GeneratorFunction constructor, the best we can
  2792. // do is to check its .name property.
  2793. (ctor.displayName || ctor.name) === "GeneratorFunction"
  2794. : false;
  2795. };
  2796. runtime.mark = function(genFun) {
  2797. if (Object.setPrototypeOf) {
  2798. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  2799. } else {
  2800. genFun.__proto__ = GeneratorFunctionPrototype;
  2801. if (!(toStringTagSymbol in genFun)) {
  2802. genFun[toStringTagSymbol] = "GeneratorFunction";
  2803. }
  2804. }
  2805. genFun.prototype = Object.create(Gp);
  2806. return genFun;
  2807. };
  2808. // Within the body of any async function, `await x` is transformed to
  2809. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  2810. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  2811. // meant to be awaited.
  2812. runtime.awrap = function(arg) {
  2813. return { __await: arg };
  2814. };
  2815. function AsyncIterator(generator) {
  2816. function invoke(method, arg, resolve, reject) {
  2817. var record = tryCatch(generator[method], generator, arg);
  2818. if (record.type === "throw") {
  2819. reject(record.arg);
  2820. } else {
  2821. var result = record.arg;
  2822. var value = result.value;
  2823. if (value &&
  2824. typeof value === "object" &&
  2825. hasOwn.call(value, "__await")) {
  2826. return Promise.resolve(value.__await).then(function(value) {
  2827. invoke("next", value, resolve, reject);
  2828. }, function(err) {
  2829. invoke("throw", err, resolve, reject);
  2830. });
  2831. }
  2832. return Promise.resolve(value).then(function(unwrapped) {
  2833. // When a yielded Promise is resolved, its final value becomes
  2834. // the .value of the Promise<{value,done}> result for the
  2835. // current iteration.
  2836. result.value = unwrapped;
  2837. resolve(result);
  2838. }, function(error) {
  2839. // If a rejected Promise was yielded, throw the rejection back
  2840. // into the async generator function so it can be handled there.
  2841. return invoke("throw", error, resolve, reject);
  2842. });
  2843. }
  2844. }
  2845. var previousPromise;
  2846. function enqueue(method, arg) {
  2847. function callInvokeWithMethodAndArg() {
  2848. return new Promise(function(resolve, reject) {
  2849. invoke(method, arg, resolve, reject);
  2850. });
  2851. }
  2852. return previousPromise =
  2853. // If enqueue has been called before, then we want to wait until
  2854. // all previous Promises have been resolved before calling invoke,
  2855. // so that results are always delivered in the correct order. If
  2856. // enqueue has not been called before, then it is important to
  2857. // call invoke immediately, without waiting on a callback to fire,
  2858. // so that the async generator function has the opportunity to do
  2859. // any necessary setup in a predictable way. This predictability
  2860. // is why the Promise constructor synchronously invokes its
  2861. // executor callback, and why async functions synchronously
  2862. // execute code before the first await. Since we implement simple
  2863. // async functions in terms of async generators, it is especially
  2864. // important to get this right, even though it requires care.
  2865. previousPromise ? previousPromise.then(
  2866. callInvokeWithMethodAndArg,
  2867. // Avoid propagating failures to Promises returned by later
  2868. // invocations of the iterator.
  2869. callInvokeWithMethodAndArg
  2870. ) : callInvokeWithMethodAndArg();
  2871. }
  2872. // Define the unified helper method that is used to implement .next,
  2873. // .throw, and .return (see defineIteratorMethods).
  2874. this._invoke = enqueue;
  2875. }
  2876. defineIteratorMethods(AsyncIterator.prototype);
  2877. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  2878. return this;
  2879. };
  2880. runtime.AsyncIterator = AsyncIterator;
  2881. // Note that simple async functions are implemented on top of
  2882. // AsyncIterator objects; they just return a Promise for the value of
  2883. // the final result produced by the iterator.
  2884. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  2885. var iter = new AsyncIterator(
  2886. wrap(innerFn, outerFn, self, tryLocsList)
  2887. );
  2888. return runtime.isGeneratorFunction(outerFn)
  2889. ? iter // If outerFn is a generator, return the full iterator.
  2890. : iter.next().then(function(result) {
  2891. return result.done ? result.value : iter.next();
  2892. });
  2893. };
  2894. function makeInvokeMethod(innerFn, self, context) {
  2895. var state = GenStateSuspendedStart;
  2896. return function invoke(method, arg) {
  2897. if (state === GenStateExecuting) {
  2898. throw new Error("Generator is already running");
  2899. }
  2900. if (state === GenStateCompleted) {
  2901. if (method === "throw") {
  2902. throw arg;
  2903. }
  2904. // Be forgiving, per 25.3.3.3.3 of the spec:
  2905. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  2906. return doneResult();
  2907. }
  2908. context.method = method;
  2909. context.arg = arg;
  2910. while (true) {
  2911. var delegate = context.delegate;
  2912. if (delegate) {
  2913. var delegateResult = maybeInvokeDelegate(delegate, context);
  2914. if (delegateResult) {
  2915. if (delegateResult === ContinueSentinel) continue;
  2916. return delegateResult;
  2917. }
  2918. }
  2919. if (context.method === "next") {
  2920. // Setting context._sent for legacy support of Babel's
  2921. // function.sent implementation.
  2922. context.sent = context._sent = context.arg;
  2923. } else if (context.method === "throw") {
  2924. if (state === GenStateSuspendedStart) {
  2925. state = GenStateCompleted;
  2926. throw context.arg;
  2927. }
  2928. context.dispatchException(context.arg);
  2929. } else if (context.method === "return") {
  2930. context.abrupt("return", context.arg);
  2931. }
  2932. state = GenStateExecuting;
  2933. var record = tryCatch(innerFn, self, context);
  2934. if (record.type === "normal") {
  2935. // If an exception is thrown from innerFn, we leave state ===
  2936. // GenStateExecuting and loop back for another invocation.
  2937. state = context.done
  2938. ? GenStateCompleted
  2939. : GenStateSuspendedYield;
  2940. if (record.arg === ContinueSentinel) {
  2941. continue;
  2942. }
  2943. return {
  2944. value: record.arg,
  2945. done: context.done
  2946. };
  2947. } else if (record.type === "throw") {
  2948. state = GenStateCompleted;
  2949. // Dispatch the exception by looping back around to the
  2950. // context.dispatchException(context.arg) call above.
  2951. context.method = "throw";
  2952. context.arg = record.arg;
  2953. }
  2954. }
  2955. };
  2956. }
  2957. // Call delegate.iterator[context.method](context.arg) and handle the
  2958. // result, either by returning a { value, done } result from the
  2959. // delegate iterator, or by modifying context.method and context.arg,
  2960. // setting context.delegate to null, and returning the ContinueSentinel.
  2961. function maybeInvokeDelegate(delegate, context) {
  2962. var method = delegate.iterator[context.method];
  2963. if (method === undefined) {
  2964. // A .throw or .return when the delegate iterator has no .throw
  2965. // method always terminates the yield* loop.
  2966. context.delegate = null;
  2967. if (context.method === "throw") {
  2968. if (delegate.iterator.return) {
  2969. // If the delegate iterator has a return method, give it a
  2970. // chance to clean up.
  2971. context.method = "return";
  2972. context.arg = undefined;
  2973. maybeInvokeDelegate(delegate, context);
  2974. if (context.method === "throw") {
  2975. // If maybeInvokeDelegate(context) changed context.method from
  2976. // "return" to "throw", let that override the TypeError below.
  2977. return ContinueSentinel;
  2978. }
  2979. }
  2980. context.method = "throw";
  2981. context.arg = new TypeError(
  2982. "The iterator does not provide a 'throw' method");
  2983. }
  2984. return ContinueSentinel;
  2985. }
  2986. var record = tryCatch(method, delegate.iterator, context.arg);
  2987. if (record.type === "throw") {
  2988. context.method = "throw";
  2989. context.arg = record.arg;
  2990. context.delegate = null;
  2991. return ContinueSentinel;
  2992. }
  2993. var info = record.arg;
  2994. if (! info) {
  2995. context.method = "throw";
  2996. context.arg = new TypeError("iterator result is not an object");
  2997. context.delegate = null;
  2998. return ContinueSentinel;
  2999. }
  3000. if (info.done) {
  3001. // Assign the result of the finished delegate to the temporary
  3002. // variable specified by delegate.resultName (see delegateYield).
  3003. context[delegate.resultName] = info.value;
  3004. // Resume execution at the desired location (see delegateYield).
  3005. context.next = delegate.nextLoc;
  3006. // If context.method was "throw" but the delegate handled the
  3007. // exception, let the outer generator proceed normally. If
  3008. // context.method was "next", forget context.arg since it has been
  3009. // "consumed" by the delegate iterator. If context.method was
  3010. // "return", allow the original .return call to continue in the
  3011. // outer generator.
  3012. if (context.method !== "return") {
  3013. context.method = "next";
  3014. context.arg = undefined;
  3015. }
  3016. } else {
  3017. // Re-yield the result returned by the delegate method.
  3018. return info;
  3019. }
  3020. // The delegate iterator is finished, so forget it and continue with
  3021. // the outer generator.
  3022. context.delegate = null;
  3023. return ContinueSentinel;
  3024. }
  3025. // Define Generator.prototype.{next,throw,return} in terms of the
  3026. // unified ._invoke helper method.
  3027. defineIteratorMethods(Gp);
  3028. Gp[toStringTagSymbol] = "Generator";
  3029. // A Generator should always return itself as the iterator object when the
  3030. // @@iterator function is called on it. Some browsers' implementations of the
  3031. // iterator prototype chain incorrectly implement this, causing the Generator
  3032. // object to not be returned from this call. This ensures that doesn't happen.
  3033. // See https://github.com/facebook/regenerator/issues/274 for more details.
  3034. Gp[iteratorSymbol] = function() {
  3035. return this;
  3036. };
  3037. Gp.toString = function() {
  3038. return "[object Generator]";
  3039. };
  3040. function pushTryEntry(locs) {
  3041. var entry = { tryLoc: locs[0] };
  3042. if (1 in locs) {
  3043. entry.catchLoc = locs[1];
  3044. }
  3045. if (2 in locs) {
  3046. entry.finallyLoc = locs[2];
  3047. entry.afterLoc = locs[3];
  3048. }
  3049. this.tryEntries.push(entry);
  3050. }
  3051. function resetTryEntry(entry) {
  3052. var record = entry.completion || {};
  3053. record.type = "normal";
  3054. delete record.arg;
  3055. entry.completion = record;
  3056. }
  3057. function Context(tryLocsList) {
  3058. // The root entry object (effectively a try statement without a catch
  3059. // or a finally block) gives us a place to store values thrown from
  3060. // locations where there is no enclosing try statement.
  3061. this.tryEntries = [{ tryLoc: "root" }];
  3062. tryLocsList.forEach(pushTryEntry, this);
  3063. this.reset(true);
  3064. }
  3065. runtime.keys = function(object) {
  3066. var keys = [];
  3067. for (var key in object) {
  3068. keys.push(key);
  3069. }
  3070. keys.reverse();
  3071. // Rather than returning an object with a next method, we keep
  3072. // things simple and return the next function itself.
  3073. return function next() {
  3074. while (keys.length) {
  3075. var key = keys.pop();
  3076. if (key in object) {
  3077. next.value = key;
  3078. next.done = false;
  3079. return next;
  3080. }
  3081. }
  3082. // To avoid creating an additional object, we just hang the .value
  3083. // and .done properties off the next function object itself. This
  3084. // also ensures that the minifier will not anonymize the function.
  3085. next.done = true;
  3086. return next;
  3087. };
  3088. };
  3089. function values(iterable) {
  3090. if (iterable) {
  3091. var iteratorMethod = iterable[iteratorSymbol];
  3092. if (iteratorMethod) {
  3093. return iteratorMethod.call(iterable);
  3094. }
  3095. if (typeof iterable.next === "function") {
  3096. return iterable;
  3097. }
  3098. if (!isNaN(iterable.length)) {
  3099. var i = -1, next = function next() {
  3100. while (++i < iterable.length) {
  3101. if (hasOwn.call(iterable, i)) {
  3102. next.value = iterable[i];
  3103. next.done = false;
  3104. return next;
  3105. }
  3106. }
  3107. next.value = undefined;
  3108. next.done = true;
  3109. return next;
  3110. };
  3111. return next.next = next;
  3112. }
  3113. }
  3114. // Return an iterator with no values.
  3115. return { next: doneResult };
  3116. }
  3117. runtime.values = values;
  3118. function doneResult() {
  3119. return { value: undefined, done: true };
  3120. }
  3121. Context.prototype = {
  3122. constructor: Context,
  3123. reset: function(skipTempReset) {
  3124. this.prev = 0;
  3125. this.next = 0;
  3126. // Resetting context._sent for legacy support of Babel's
  3127. // function.sent implementation.
  3128. this.sent = this._sent = undefined;
  3129. this.done = false;
  3130. this.delegate = null;
  3131. this.method = "next";
  3132. this.arg = undefined;
  3133. this.tryEntries.forEach(resetTryEntry);
  3134. if (!skipTempReset) {
  3135. for (var name in this) {
  3136. // Not sure about the optimal order of these conditions:
  3137. if (name.charAt(0) === "t" &&
  3138. hasOwn.call(this, name) &&
  3139. !isNaN(+name.slice(1))) {
  3140. this[name] = undefined;
  3141. }
  3142. }
  3143. }
  3144. },
  3145. stop: function() {
  3146. this.done = true;
  3147. var rootEntry = this.tryEntries[0];
  3148. var rootRecord = rootEntry.completion;
  3149. if (rootRecord.type === "throw") {
  3150. throw rootRecord.arg;
  3151. }
  3152. return this.rval;
  3153. },
  3154. dispatchException: function(exception) {
  3155. if (this.done) {
  3156. throw exception;
  3157. }
  3158. var context = this;
  3159. function handle(loc, caught) {
  3160. record.type = "throw";
  3161. record.arg = exception;
  3162. context.next = loc;
  3163. if (caught) {
  3164. // If the dispatched exception was caught by a catch block,
  3165. // then let that catch block handle the exception normally.
  3166. context.method = "next";
  3167. context.arg = undefined;
  3168. }
  3169. return !! caught;
  3170. }
  3171. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3172. var entry = this.tryEntries[i];
  3173. var record = entry.completion;
  3174. if (entry.tryLoc === "root") {
  3175. // Exception thrown outside of any try block that could handle
  3176. // it, so set the completion value of the entire function to
  3177. // throw the exception.
  3178. return handle("end");
  3179. }
  3180. if (entry.tryLoc <= this.prev) {
  3181. var hasCatch = hasOwn.call(entry, "catchLoc");
  3182. var hasFinally = hasOwn.call(entry, "finallyLoc");
  3183. if (hasCatch && hasFinally) {
  3184. if (this.prev < entry.catchLoc) {
  3185. return handle(entry.catchLoc, true);
  3186. } else if (this.prev < entry.finallyLoc) {
  3187. return handle(entry.finallyLoc);
  3188. }
  3189. } else if (hasCatch) {
  3190. if (this.prev < entry.catchLoc) {
  3191. return handle(entry.catchLoc, true);
  3192. }
  3193. } else if (hasFinally) {
  3194. if (this.prev < entry.finallyLoc) {
  3195. return handle(entry.finallyLoc);
  3196. }
  3197. } else {
  3198. throw new Error("try statement without catch or finally");
  3199. }
  3200. }
  3201. }
  3202. },
  3203. abrupt: function(type, arg) {
  3204. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3205. var entry = this.tryEntries[i];
  3206. if (entry.tryLoc <= this.prev &&
  3207. hasOwn.call(entry, "finallyLoc") &&
  3208. this.prev < entry.finallyLoc) {
  3209. var finallyEntry = entry;
  3210. break;
  3211. }
  3212. }
  3213. if (finallyEntry &&
  3214. (type === "break" ||
  3215. type === "continue") &&
  3216. finallyEntry.tryLoc <= arg &&
  3217. arg <= finallyEntry.finallyLoc) {
  3218. // Ignore the finally entry if control is not jumping to a
  3219. // location outside the try/catch block.
  3220. finallyEntry = null;
  3221. }
  3222. var record = finallyEntry ? finallyEntry.completion : {};
  3223. record.type = type;
  3224. record.arg = arg;
  3225. if (finallyEntry) {
  3226. this.method = "next";
  3227. this.next = finallyEntry.finallyLoc;
  3228. return ContinueSentinel;
  3229. }
  3230. return this.complete(record);
  3231. },
  3232. complete: function(record, afterLoc) {
  3233. if (record.type === "throw") {
  3234. throw record.arg;
  3235. }
  3236. if (record.type === "break" ||
  3237. record.type === "continue") {
  3238. this.next = record.arg;
  3239. } else if (record.type === "return") {
  3240. this.rval = this.arg = record.arg;
  3241. this.method = "return";
  3242. this.next = "end";
  3243. } else if (record.type === "normal" && afterLoc) {
  3244. this.next = afterLoc;
  3245. }
  3246. return ContinueSentinel;
  3247. },
  3248. finish: function(finallyLoc) {
  3249. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3250. var entry = this.tryEntries[i];
  3251. if (entry.finallyLoc === finallyLoc) {
  3252. this.complete(entry.completion, entry.afterLoc);
  3253. resetTryEntry(entry);
  3254. return ContinueSentinel;
  3255. }
  3256. }
  3257. },
  3258. "catch": function(tryLoc) {
  3259. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3260. var entry = this.tryEntries[i];
  3261. if (entry.tryLoc === tryLoc) {
  3262. var record = entry.completion;
  3263. if (record.type === "throw") {
  3264. var thrown = record.arg;
  3265. resetTryEntry(entry);
  3266. }
  3267. return thrown;
  3268. }
  3269. }
  3270. // The context.catch method must only be called with a location
  3271. // argument that corresponds to a known catch block.
  3272. throw new Error("illegal catch attempt");
  3273. },
  3274. delegateYield: function(iterable, resultName, nextLoc) {
  3275. this.delegate = {
  3276. iterator: values(iterable),
  3277. resultName: resultName,
  3278. nextLoc: nextLoc
  3279. };
  3280. if (this.method === "next") {
  3281. // Deliberately forget the last sent value so that we don't
  3282. // accidentally pass it on to the delegate.
  3283. this.arg = undefined;
  3284. }
  3285. return ContinueSentinel;
  3286. }
  3287. };
  3288. })(
  3289. // In sloppy mode, unbound `this` refers to the global object, fallback to
  3290. // Function constructor if we're in global strict mode. That is sadly a form
  3291. // of indirect eval which violates Content Security Policy.
  3292. (function() {
  3293. return this || (typeof self === "object" && self);
  3294. })() || Function("return this")()
  3295. );
  3296. /***/ }),
  3297. /***/ 24:
  3298. /*!***********************************!*\
  3299. !*** D:/2022/10/hmd/api/index.js ***!
  3300. \***********************************/
  3301. /*! no static exports found */
  3302. /***/ (function(module, exports, __webpack_require__) {
  3303. "use strict";
  3304. Object.defineProperty(exports, "__esModule", { value: true });exports.groom4 = groom4;exports.groom1 = groom1;exports.groom3 = groom3;exports.loadIndexs = loadIndexs;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3305. // 促销商品
  3306. function groom4(data) {
  3307. return (0, _request.default)({
  3308. url: '/api/groom/list/4',
  3309. method: 'get',
  3310. data: data });
  3311. }
  3312. // 精品推荐
  3313. function groom1(data) {
  3314. return (0, _request.default)({
  3315. url: '/api/groom/list/1',
  3316. method: 'get',
  3317. data: data });
  3318. }
  3319. // 新品首发
  3320. function groom3(data) {
  3321. return (0, _request.default)({
  3322. url: '/api/groom/list/3',
  3323. method: 'get',
  3324. data: data });
  3325. }
  3326. // 获取首页信息
  3327. function loadIndexs(data) {
  3328. return (0, _request.default)({
  3329. url: '/api/index',
  3330. method: 'get',
  3331. data: data });
  3332. }
  3333. /***/ }),
  3334. /***/ 25:
  3335. /*!***************************************!*\
  3336. !*** D:/2022/10/hmd/utils/request.js ***!
  3337. \***************************************/
  3338. /*! no static exports found */
  3339. /***/ (function(module, exports, __webpack_require__) {
  3340. "use strict";
  3341. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = exports.upFilse = void 0;var _newRequest = _interopRequireDefault(__webpack_require__(/*! ./newRequest.js */ 26));
  3342. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 6));
  3343. var _loginUtils = __webpack_require__(/*! @/utils/loginUtils.js */ 27);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3344. // 请求完成后拦截
  3345. _newRequest.default.interceptors.response(
  3346. function (response) {
  3347. try {
  3348. var res = response.data;
  3349. // 解析字符串为数字
  3350. if (res.status !== 200) {
  3351. console.log(res.status);
  3352. if (res.status == 410000) {
  3353. // 调用退出登录方法清空用户信息
  3354. _store.default.commit('user/logout');
  3355. // 判断是否开启强制登录
  3356. uni.showModal({
  3357. title: "登陆",
  3358. content: '您未登录!是否马上登录?',
  3359. success: function success(e) {
  3360. // 判断是否点击确认按钮
  3361. if (e.confirm) {
  3362. // 保存当前页面地址
  3363. (0, _loginUtils.saveUrl)();
  3364. // 跳转页面
  3365. (0, _loginUtils.interceptor)();
  3366. }
  3367. } });
  3368. } else {
  3369. if (res.msg != '系统出现异常') {
  3370. uni.showToast({
  3371. title: res.msg,
  3372. duration: 1500,
  3373. mask: false,
  3374. icon: 'none' });
  3375. }
  3376. }
  3377. return Promise.reject(res);
  3378. } else {
  3379. return res;
  3380. }
  3381. } catch (e) {
  3382. console.log(e);
  3383. }
  3384. },
  3385. function (error) {
  3386. uni.showToast({
  3387. title: "加载错误请重试",
  3388. duration: 1500,
  3389. mask: false,
  3390. icon: 'none' });
  3391. return Promise.reject(error);
  3392. });
  3393. // 请求前拦截器
  3394. _newRequest.default.interceptors.request(
  3395. function (config) {
  3396. var token = uni.getStorageSync('token') || '';
  3397. // console.log(config);
  3398. if (!config.header) {
  3399. config.header = {
  3400. "Authori-zation": 'Bearer ' + token };
  3401. } else {
  3402. // 添加key请求头
  3403. config.header["Authori-zation"] = 'Bearer ' + token;
  3404. }
  3405. return config;
  3406. },
  3407. function (error) {
  3408. // 错误处理
  3409. console.log(error);
  3410. return Promise.reject(error);
  3411. });
  3412. var upFilse = _newRequest.default.upFilse;exports.upFilse = upFilse;var _default =
  3413. _newRequest.default.open;exports.default = _default;
  3414. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3415. /***/ }),
  3416. /***/ 26:
  3417. /*!******************************************!*\
  3418. !*** D:/2022/10/hmd/utils/newRequest.js ***!
  3419. \******************************************/
  3420. /*! no static exports found */
  3421. /***/ (function(module, exports, __webpack_require__) {
  3422. "use strict";
  3423. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 21));var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 6));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
  3424. var service = {
  3425. baseURL: _store.default.state.baseURL, // 请求头
  3426. header: {
  3427. 'Content-Type': "application/x-www-form-urlencoded" },
  3428. // 请求拦截器
  3429. interceptors: {
  3430. // 安装请求前拦截
  3431. request: function request(success, iserror) {
  3432. service.request.success = success;
  3433. service.request.error = iserror;
  3434. },
  3435. // 安装请求完成后拦截
  3436. response: function response(success, iserror) {
  3437. service.response.success = success;
  3438. service.response.error = iserror;
  3439. } },
  3440. // 请求前拦截
  3441. request: {
  3442. // 回调成功执行方法
  3443. success: function success(e) {
  3444. return e;
  3445. },
  3446. // 回调失败
  3447. error: function error(e) {
  3448. return e;
  3449. } },
  3450. // 请求完成后拦截
  3451. response: {
  3452. // 回调成功执行方法
  3453. success: function success(e) {
  3454. return e;
  3455. },
  3456. // 回调失败
  3457. error: function error(e) {
  3458. return e;
  3459. } },
  3460. // 开始请求
  3461. open: function () {var _open = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
  3462. new Promise(function (resolve, reject) {
  3463. var requestData = ''; //保存处理完成后请求数据
  3464. var url = ''; //保存链接地址
  3465. //console.log(data);
  3466. // 请求前数据处理
  3467. requestData = service.request.success(data);
  3468. url = service.baseURL + requestData.url;
  3469. // 数据复制用于请求
  3470. uni.request({
  3471. url: url,
  3472. method: requestData.method || 'GET',
  3473. data: requestData.data,
  3474. header: data.header || service.header,
  3475. success: function success(res) {
  3476. if (res.statusCode == 200) {
  3477. try {
  3478. resolve(service.response.success(res));
  3479. } catch (e) {
  3480. service.response.error(e);
  3481. }
  3482. }
  3483. },
  3484. // 请求失败数据处理
  3485. fail: function fail(err) {
  3486. service.response.error(err);
  3487. } });
  3488. }));case 2:return _context.abrupt("return", _context.sent);case 3:case "end":return _context.stop();}}}, _callee);}));function open(_x) {return _open.apply(this, arguments);}return open;}(),
  3489. // 上传文件
  3490. upFilse: function () {var _upFilse = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:_context4.next = 2;return (
  3491. new Promise(function (resolve, reject) {
  3492. var requestData = ''; //保存处理完成后请求数据
  3493. var url = ''; //保存请求地址
  3494. try {
  3495. // 请求前数据处理
  3496. requestData = service.request.success(data);
  3497. } catch (e) {
  3498. // 请求报错拦截
  3499. service.request.error(e);
  3500. }
  3501. url = service.baseURL + requestData.url;
  3502. var config = {
  3503. // 上传图片的API
  3504. upload_img_url: url };
  3505. var Uploader = {
  3506. // 选择图片
  3507. choose: function choose(num) {
  3508. return new Promise(function (resolve, reject) {
  3509. uni.chooseImage({
  3510. count: num,
  3511. success: function success(res) {
  3512. // console.log(res);
  3513. // 缓存文件路径
  3514. resolve(res.tempFilePaths);
  3515. },
  3516. fail: function fail(err) {
  3517. console.log(err);
  3518. reject(err);
  3519. } });
  3520. });
  3521. },
  3522. // 上传图片
  3523. upload_one: function upload_one(path) {
  3524. return new Promise(function (resolve, reject) {
  3525. uni.showLoading({
  3526. title: '上传中' });
  3527. uni.uploadFile({
  3528. url: config.upload_img_url, //仅为示例,非真实的接口地址
  3529. filePath: path,
  3530. name: 'file',
  3531. header: {
  3532. "Authori-zation": 'Bearer ' + uni.getStorageSync('token') },
  3533. success: function success(uploadFileRes) {
  3534. if ("string" === typeof uploadFileRes.data) {
  3535. resolve(JSON.parse(uploadFileRes.data).data);
  3536. } else {
  3537. resolve(uploadFileRes.data.data);
  3538. }
  3539. },
  3540. complete: function complete() {
  3541. uni.hideLoading();
  3542. } });
  3543. });
  3544. },
  3545. // 上传多个图片
  3546. upload: function upload(path_arr) {var _this = this;
  3547. var num = path_arr.length;
  3548. return new Promise( /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {var img_urls, i, img_url;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  3549. img_urls = [];
  3550. i = 0;case 2:if (!(i < num)) {_context2.next = 10;break;}_context2.next = 5;return (
  3551. _this.upload_one(path_arr[i]));case 5:img_url = _context2.sent;
  3552. img_urls.push(img_url);case 7:i++;_context2.next = 2;break;case 10:
  3553. ;
  3554. resolve(img_urls);case 12:case "end":return _context2.stop();}}}, _callee2);}));return function (_x3, _x4) {return _ref.apply(this, arguments);};}());
  3555. },
  3556. // 触发上传图片事件
  3557. choose_and_upload: function choose_and_upload(num) {var _this2 = this;
  3558. return new Promise( /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(resolve, reject) {var path_arr;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return (
  3559. _this2.choose(num));case 2:path_arr = _context3.sent;_context3.next = 5;return (
  3560. _this2.upload(path_arr).then(function (e) {
  3561. resolve(e);
  3562. }).catch(function (e) {
  3563. reject(e);
  3564. }));case 5:case "end":return _context3.stop();}}}, _callee3);}));return function (_x5, _x6) {return _ref2.apply(this, arguments);};}());
  3565. } };
  3566. Uploader.choose_and_upload(1).then(function (e) {
  3567. resolve(e);
  3568. }).catch(function (e) {
  3569. console.log(e);
  3570. });
  3571. }));case 2:return _context4.abrupt("return", _context4.sent);case 3:case "end":return _context4.stop();}}}, _callee4);}));function upFilse(_x2) {return _upFilse.apply(this, arguments);}return upFilse;}() };var _default =
  3572. service;exports.default = _default;
  3573. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3574. /***/ }),
  3575. /***/ 27:
  3576. /*!******************************************!*\
  3577. !*** D:/2022/10/hmd/utils/loginUtils.js ***!
  3578. \******************************************/
  3579. /*! no static exports found */
  3580. /***/ (function(module, exports, __webpack_require__) {
  3581. "use strict";
  3582. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.getActionPage = getActionPage;exports.interceptor = interceptor;exports.saveUrl = saveUrl;exports.getPageUrl = getPageUrl;function getActionPage() {
  3583. var pages = getCurrentPages();
  3584. return pages[pages.length - 1];
  3585. }
  3586. //登录拦截
  3587. function interceptor() {
  3588. var pages = getActionPage();
  3589. // 获取当前页面
  3590. var pageUrl = '/' + pages.route;
  3591. var url = '/pages/public/login';
  3592. url = '/pages/public/wxLogin';
  3593. if (pageUrl != url) {
  3594. uni.navigateTo({
  3595. url: url });
  3596. }
  3597. }
  3598. // 保存页面
  3599. function saveUrl() {
  3600. var path = getPageUrl(true);
  3601. uni.setStorageSync('present', path);
  3602. }
  3603. // 处理分享链接地址
  3604. function getPageUrl() {var showSpeard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  3605. var page = getActionPage();
  3606. var path = '/' + page.route;
  3607. var url = '';
  3608. // 获取对象可枚举键值列表
  3609. var objKeys = Object.keys(page.options);
  3610. // 判断有无传值
  3611. if (objKeys.length > 0) {
  3612. // 循环赋值对象数据
  3613. for (var a in page.options) {
  3614. // 判断有无邀请人
  3615. if (a != 'speard') {
  3616. url += a + "=" + page.options[a] + "&";
  3617. } else {
  3618. // 判断是否需要存储邀请人
  3619. if (showSpeard) {
  3620. url += a + "=" + page.options[a] + "&";
  3621. }
  3622. }
  3623. }
  3624. path += '?' + url.substr(0, url.length - 1);
  3625. }
  3626. // 返回处理邀请人后的邀请地址
  3627. return path;
  3628. }
  3629. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  3630. /***/ }),
  3631. /***/ 28:
  3632. /*!**********************************!*\
  3633. !*** D:/2022/10/hmd/api/user.js ***!
  3634. \**********************************/
  3635. /*! no static exports found */
  3636. /***/ (function(module, exports, __webpack_require__) {
  3637. "use strict";
  3638. Object.defineProperty(exports, "__esModule", { value: true });exports.orderData = orderData;exports.getUserInfo = getUserInfo;exports.spreadBanner = spreadBanner;exports.getAddressList = getAddressList;exports.addressEdit = addressEdit;exports.addressDel = addressDel;exports.setAddressDefault = setAddressDefault;exports.getCartList = getCartList;exports.getCartNum = getCartNum;exports.cartDel = cartDel;exports.getcollectList = getcollectList;exports.delcollect = delcollect;exports.getCommissionInfo = getCommissionInfo;exports.myspread = myspread;exports.sqdl = sqdl;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3639. // 订单统计信息
  3640. function orderData(data) {
  3641. return (0, _request.default)({
  3642. url: '/api/order/data',
  3643. method: 'get',
  3644. data: data });
  3645. }
  3646. // 获取用户信息
  3647. function getUserInfo(data) {
  3648. return (0, _request.default)({
  3649. url: '/api/userinfo',
  3650. method: 'get',
  3651. data: data });
  3652. }
  3653. // 用户分享图
  3654. function spreadBanner(data) {
  3655. return (0, _request.default)({
  3656. url: '/api/spread/banner',
  3657. method: 'get',
  3658. data: data });
  3659. }
  3660. // 获取地址列表
  3661. function getAddressList(data) {
  3662. return (0, _request.default)({
  3663. url: '/api/address/list',
  3664. method: 'get',
  3665. data: data });
  3666. }
  3667. // 修改地址
  3668. function addressEdit(data) {
  3669. return (0, _request.default)({
  3670. url: '/api/address/edit',
  3671. method: 'post',
  3672. data: data });
  3673. }
  3674. // 删除地址
  3675. function addressDel(data) {
  3676. return (0, _request.default)({
  3677. url: '/api/address/del',
  3678. method: 'post',
  3679. data: data });
  3680. }
  3681. // 设为默认地址
  3682. function setAddressDefault(data) {
  3683. return (0, _request.default)({
  3684. url: '/api/address/default/set',
  3685. method: 'post',
  3686. data: data });
  3687. }
  3688. // 购物车列表
  3689. function getCartList(data) {
  3690. return (0, _request.default)({
  3691. url: '/api/cart/list',
  3692. method: 'get',
  3693. data: data });
  3694. }
  3695. // 修改购物车数量
  3696. function getCartNum(data) {
  3697. return (0, _request.default)({
  3698. url: '/api/cart/num',
  3699. method: 'post',
  3700. data: data });
  3701. }
  3702. //删除购物车
  3703. function cartDel(data) {
  3704. return (0, _request.default)({
  3705. url: '/api/cart/del',
  3706. method: 'post',
  3707. data: data });
  3708. }
  3709. //获取收藏夹列表
  3710. function getcollectList(data) {
  3711. return (0, _request.default)({
  3712. url: '/api/collect/user',
  3713. method: 'get',
  3714. data: data });
  3715. }
  3716. // 取消收藏
  3717. function delcollect(data) {
  3718. return (0, _request.default)({
  3719. url: '/api/collect/del',
  3720. method: 'post',
  3721. data: data });
  3722. }
  3723. //http://hmd.frp.liuniu946.com/api/brokerage/list?page=1&limit=10&pm=1
  3724. function getCommissionInfo(data) {
  3725. return (0, _request.default)({
  3726. url: '/api/brokerage/list',
  3727. method: 'get',
  3728. data: data });
  3729. }
  3730. //我的推广
  3731. function myspread(data) {
  3732. return (0, _request.default)({
  3733. url: '/api/spread/people',
  3734. method: 'POST',
  3735. data: data });
  3736. }
  3737. //
  3738. function sqdl(data) {
  3739. return (0, _request.default)({
  3740. url: '/api/user/apply',
  3741. method: 'POST',
  3742. data: data });
  3743. }
  3744. /***/ }),
  3745. /***/ 29:
  3746. /*!*************************************!*\
  3747. !*** D:/2022/10/hmd/api/product.js ***!
  3748. \*************************************/
  3749. /*! no static exports found */
  3750. /***/ (function(module, exports, __webpack_require__) {
  3751. "use strict";
  3752. Object.defineProperty(exports, "__esModule", { value: true });exports.getProducts = getProducts;exports.goodsDetail = goodsDetail;exports.getBargainList = getBargainList;exports.cartAdd = cartAdd;exports.collectAdd = collectAdd;exports.collectDel = collectDel;exports.searchKeyword = searchKeyword;exports.groomList = groomList;exports.seckillGoods = seckillGoods;exports.groupGoods = groupGoods;exports.getCategoryList = getCategoryList;exports.getCombinationList = getCombinationList;exports.getCombinationLisRemove = getCombinationLisRemove;exports.getCombinationLisPink = getCombinationLisPink;exports.getCombinationPoster = getCombinationPoster;exports.getSeckillClass = getSeckillClass;exports.getSeckillList = getSeckillList;exports.reply_config = reply_config;exports.reply_list = reply_list;exports.poster = poster;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3753. // 获取商品列表
  3754. function getProducts(data) {
  3755. // {
  3756. // 参数名称 是否必须 示例 备注
  3757. // sid 否 二级分类编号
  3758. // cid 否 一级分类编号(!)
  3759. // keyword 否 搜索
  3760. // priceOrder 否 价格排序
  3761. // salesOrder 否 销量排序
  3762. // news 否 是否新品
  3763. // page 否 分页参数起始值
  3764. // limit 否 分页数步长值
  3765. // }
  3766. return (0, _request.default)({
  3767. url: '/api/products',
  3768. method: 'get',
  3769. data: data });
  3770. }
  3771. // 获取商品详情
  3772. function goodsDetail(data, id) {
  3773. return (0, _request.default)({
  3774. url: '/api/product/detail/' + id,
  3775. method: 'get',
  3776. data: data });
  3777. }
  3778. // 砍价列表
  3779. function getBargainList(data) {
  3780. return (0, _request.default)({
  3781. url: '/api/bargain/list',
  3782. method: 'get',
  3783. data: data });
  3784. }
  3785. // 加入购物车
  3786. function cartAdd(data) {
  3787. return (0, _request.default)({
  3788. url: '/api/cart/add',
  3789. method: 'post',
  3790. data: data });
  3791. }
  3792. // 收藏商品
  3793. function collectAdd(data) {
  3794. return (0, _request.default)({
  3795. url: '/api/collect/add',
  3796. method: 'post',
  3797. data: data });
  3798. }
  3799. // 取消收藏商品
  3800. function collectDel(data) {
  3801. return (0, _request.default)({
  3802. url: '/api/collect/del',
  3803. method: 'post',
  3804. data: data });
  3805. }
  3806. // 获取搜搜关键字
  3807. function searchKeyword(data) {
  3808. return (0, _request.default)({
  3809. url: '/api/search/keyword',
  3810. method: 'get',
  3811. data: data });
  3812. }
  3813. // 获取热门分类信息
  3814. function groomList(data, type) {
  3815. // 获取产品类型 1 精品推荐 2 热门榜单 3首发新品 4促销单品
  3816. return (0, _request.default)({
  3817. url: '/api/groom/list/' + type,
  3818. method: 'get',
  3819. data: data });
  3820. }
  3821. // 获取秒杀商品详细
  3822. function seckillGoods(data, id) {
  3823. return (0, _request.default)({
  3824. url: '/api/seckill/detail/' + id,
  3825. method: 'get',
  3826. data: data });
  3827. }
  3828. // 获取拼团商品详细
  3829. function groupGoods(data, id) {
  3830. return (0, _request.default)({
  3831. url: '/api/combination/detail/' + id,
  3832. method: 'get',
  3833. data: data });
  3834. }
  3835. // 获取商品分类
  3836. function getCategoryList(data) {
  3837. return (0, _request.default)({
  3838. url: '/api/category',
  3839. method: 'get',
  3840. data: data });
  3841. }
  3842. // 获取拼团列表
  3843. function getCombinationList(data) {
  3844. return (0, _request.default)({
  3845. url: '/api/combination/list',
  3846. method: 'get',
  3847. data: data });
  3848. }
  3849. //取消拼团
  3850. function getCombinationLisRemove(data, id) {
  3851. return (0, _request.default)({
  3852. url: '/api/combination/remove' + id,
  3853. method: 'get',
  3854. data: data });
  3855. }
  3856. //拼团开团页面数据
  3857. function getCombinationLisPink(data, id) {
  3858. return (0, _request.default)({
  3859. url: '/api/combination/pink/' + id,
  3860. method: 'get',
  3861. data: data });
  3862. }
  3863. // 获取拼团海报
  3864. function getCombinationPoster(data) {
  3865. return (0, _request.default)({
  3866. url: '/api/combination/poster',
  3867. method: 'post',
  3868. data: data });
  3869. }
  3870. // 获取秒杀分类
  3871. function getSeckillClass(data) {
  3872. return (0, _request.default)({
  3873. url: '/api/seckill/index',
  3874. method: 'get',
  3875. data: data });
  3876. }
  3877. // 获取秒杀列表
  3878. function getSeckillList(data, id) {
  3879. return (0, _request.default)({
  3880. url: '/api/seckill/list/' + id,
  3881. method: 'get',
  3882. data: data });
  3883. }
  3884. // 产品评价数量和好评度
  3885. function reply_config(data, id) {
  3886. return (0, _request.default)({
  3887. url: '/api/reply/config/' + id,
  3888. method: 'get',
  3889. data: data });
  3890. }
  3891. // 获取产品评论
  3892. function reply_list(data, id) {
  3893. return (0, _request.default)({
  3894. url: '/api/reply/list/' + id,
  3895. method: 'get',
  3896. data: data });
  3897. }
  3898. // 分享海报
  3899. function poster(data) {
  3900. return (0, _request.default)({
  3901. url: '/api/product/poster',
  3902. method: 'post',
  3903. data: data });
  3904. }
  3905. /***/ }),
  3906. /***/ 3:
  3907. /*!*************************************************************!*\
  3908. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  3909. \*************************************************************/
  3910. /*! no static exports found */
  3911. /***/ (function(module, exports, __webpack_require__) {
  3912. "use strict";
  3913. /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var isArray = Array.isArray;
  3914. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  3915. var defaultDelimiters = ['{', '}'];var
  3916. BaseFormatter = /*#__PURE__*/function () {
  3917. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  3918. this._caches = Object.create(null);
  3919. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  3920. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  3921. if (!values) {
  3922. return [message];
  3923. }
  3924. var tokens = this._caches[message];
  3925. if (!tokens) {
  3926. tokens = parse(message, delimiters);
  3927. this._caches[message] = tokens;
  3928. }
  3929. return compile(tokens, values);
  3930. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  3931. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  3932. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  3933. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  3934. var tokens = [];
  3935. var position = 0;
  3936. var text = '';
  3937. while (position < format.length) {
  3938. var char = format[position++];
  3939. if (char === startDelimiter) {
  3940. if (text) {
  3941. tokens.push({ type: 'text', value: text });
  3942. }
  3943. text = '';
  3944. var sub = '';
  3945. char = format[position++];
  3946. while (char !== undefined && char !== endDelimiter) {
  3947. sub += char;
  3948. char = format[position++];
  3949. }
  3950. var isClosed = char === endDelimiter;
  3951. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  3952. 'list' :
  3953. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  3954. 'named' :
  3955. 'unknown';
  3956. tokens.push({ value: sub, type: type });
  3957. }
  3958. // else if (char === '%') {
  3959. // // when found rails i18n syntax, skip text capture
  3960. // if (format[position] !== '{') {
  3961. // text += char
  3962. // }
  3963. // }
  3964. else {
  3965. text += char;
  3966. }
  3967. }
  3968. text && tokens.push({ type: 'text', value: text });
  3969. return tokens;
  3970. }
  3971. function compile(tokens, values) {
  3972. var compiled = [];
  3973. var index = 0;
  3974. var mode = isArray(values) ?
  3975. 'list' :
  3976. isObject(values) ?
  3977. 'named' :
  3978. 'unknown';
  3979. if (mode === 'unknown') {
  3980. return compiled;
  3981. }
  3982. while (index < tokens.length) {
  3983. var token = tokens[index];
  3984. switch (token.type) {
  3985. case 'text':
  3986. compiled.push(token.value);
  3987. break;
  3988. case 'list':
  3989. compiled.push(values[parseInt(token.value, 10)]);
  3990. break;
  3991. case 'named':
  3992. if (mode === 'named') {
  3993. compiled.push(values[token.value]);
  3994. } else
  3995. {
  3996. if (true) {
  3997. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  3998. }
  3999. }
  4000. break;
  4001. case 'unknown':
  4002. if (true) {
  4003. console.warn("Detect 'unknown' type of token!");
  4004. }
  4005. break;}
  4006. index++;
  4007. }
  4008. return compiled;
  4009. }
  4010. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  4011. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  4012. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  4013. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  4014. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  4015. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4016. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  4017. var defaultFormatter = new BaseFormatter();
  4018. function include(str, parts) {
  4019. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  4020. }
  4021. function startsWith(str, parts) {
  4022. return parts.find(function (part) {return str.indexOf(part) === 0;});
  4023. }
  4024. function normalizeLocale(locale, messages) {
  4025. if (!locale) {
  4026. return;
  4027. }
  4028. locale = locale.trim().replace(/_/g, '-');
  4029. if (messages && messages[locale]) {
  4030. return locale;
  4031. }
  4032. locale = locale.toLowerCase();
  4033. if (locale.indexOf('zh') === 0) {
  4034. if (locale.indexOf('-hans') > -1) {
  4035. return LOCALE_ZH_HANS;
  4036. }
  4037. if (locale.indexOf('-hant') > -1) {
  4038. return LOCALE_ZH_HANT;
  4039. }
  4040. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  4041. return LOCALE_ZH_HANT;
  4042. }
  4043. return LOCALE_ZH_HANS;
  4044. }
  4045. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  4046. if (lang) {
  4047. return lang;
  4048. }
  4049. }var
  4050. I18n = /*#__PURE__*/function () {
  4051. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  4052. this.locale = LOCALE_EN;
  4053. this.fallbackLocale = LOCALE_EN;
  4054. this.message = {};
  4055. this.messages = {};
  4056. this.watchers = [];
  4057. if (fallbackLocale) {
  4058. this.fallbackLocale = fallbackLocale;
  4059. }
  4060. this.formater = formater || defaultFormatter;
  4061. this.messages = messages || {};
  4062. this.setLocale(locale || LOCALE_EN);
  4063. if (watcher) {
  4064. this.watchLocale(watcher);
  4065. }
  4066. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  4067. locale) {var _this = this;
  4068. var oldLocale = this.locale;
  4069. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  4070. if (!this.messages[this.locale]) {
  4071. // 可能初始化时不存在
  4072. this.messages[this.locale] = {};
  4073. }
  4074. this.message = this.messages[this.locale];
  4075. // 仅发生变化时,通知
  4076. if (oldLocale !== this.locale) {
  4077. this.watchers.forEach(function (watcher) {
  4078. watcher(_this.locale, oldLocale);
  4079. });
  4080. }
  4081. } }, { key: "getLocale", value: function getLocale()
  4082. {
  4083. return this.locale;
  4084. } }, { key: "watchLocale", value: function watchLocale(
  4085. fn) {var _this2 = this;
  4086. var index = this.watchers.push(fn) - 1;
  4087. return function () {
  4088. _this2.watchers.splice(index, 1);
  4089. };
  4090. } }, { key: "add", value: function add(
  4091. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4092. var curMessages = this.messages[locale];
  4093. if (curMessages) {
  4094. if (override) {
  4095. Object.assign(curMessages, message);
  4096. } else
  4097. {
  4098. Object.keys(message).forEach(function (key) {
  4099. if (!hasOwn(curMessages, key)) {
  4100. curMessages[key] = message[key];
  4101. }
  4102. });
  4103. }
  4104. } else
  4105. {
  4106. this.messages[locale] = message;
  4107. }
  4108. } }, { key: "f", value: function f(
  4109. message, values, delimiters) {
  4110. return this.formater.interpolate(message, values, delimiters).join('');
  4111. } }, { key: "t", value: function t(
  4112. key, locale, values) {
  4113. var message = this.message;
  4114. if (typeof locale === 'string') {
  4115. locale = normalizeLocale(locale, this.messages);
  4116. locale && (message = this.messages[locale]);
  4117. } else
  4118. {
  4119. values = locale;
  4120. }
  4121. if (!hasOwn(message, key)) {
  4122. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  4123. return key;
  4124. }
  4125. return this.formater.interpolate(message[key], values).join('');
  4126. } }]);return I18n;}();exports.I18n = I18n;
  4127. function watchAppLocale(appVm, i18n) {
  4128. // 需要保证 watch 的触发在组件渲染之前
  4129. if (appVm.$watchLocale) {
  4130. // vue2
  4131. appVm.$watchLocale(function (newLocale) {
  4132. i18n.setLocale(newLocale);
  4133. });
  4134. } else
  4135. {
  4136. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  4137. i18n.setLocale(newLocale);
  4138. });
  4139. }
  4140. }
  4141. function getDefaultLocale() {
  4142. if (typeof uni !== 'undefined' && uni.getLocale) {
  4143. return uni.getLocale();
  4144. }
  4145. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  4146. if (typeof global !== 'undefined' && global.getLocale) {
  4147. return global.getLocale();
  4148. }
  4149. return LOCALE_EN;
  4150. }
  4151. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  4152. // 兼容旧版本入参
  4153. if (typeof locale !== 'string') {var _ref4 =
  4154. [
  4155. messages,
  4156. locale];locale = _ref4[0];messages = _ref4[1];
  4157. }
  4158. if (typeof locale !== 'string') {
  4159. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  4160. locale = getDefaultLocale();
  4161. }
  4162. if (typeof fallbackLocale !== 'string') {
  4163. fallbackLocale =
  4164. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  4165. LOCALE_EN;
  4166. }
  4167. var i18n = new I18n({
  4168. locale: locale,
  4169. fallbackLocale: fallbackLocale,
  4170. messages: messages,
  4171. watcher: watcher });
  4172. var _t = function t(key, values) {
  4173. if (typeof getApp !== 'function') {
  4174. // app view
  4175. /* eslint-disable no-func-assign */
  4176. _t = function t(key, values) {
  4177. return i18n.t(key, values);
  4178. };
  4179. } else
  4180. {
  4181. var isWatchedAppLocale = false;
  4182. _t = function t(key, values) {
  4183. var appVm = getApp().$vm;
  4184. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4185. // options: {
  4186. // type: Array,
  4187. // default () {
  4188. // return [{
  4189. // icon: 'shop',
  4190. // text: t("uni-goods-nav.options.shop"),
  4191. // }, {
  4192. // icon: 'cart',
  4193. // text: t("uni-goods-nav.options.cart")
  4194. // }]
  4195. // }
  4196. // },
  4197. if (appVm) {
  4198. // 触发响应式
  4199. appVm.$locale;
  4200. if (!isWatchedAppLocale) {
  4201. isWatchedAppLocale = true;
  4202. watchAppLocale(appVm, i18n);
  4203. }
  4204. }
  4205. return i18n.t(key, values);
  4206. };
  4207. }
  4208. return _t(key, values);
  4209. };
  4210. return {
  4211. i18n: i18n,
  4212. f: function f(message, values, delimiters) {
  4213. return i18n.f(message, values, delimiters);
  4214. },
  4215. t: function t(key, values) {
  4216. return _t(key, values);
  4217. },
  4218. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4219. return i18n.add(locale, message, override);
  4220. },
  4221. watch: function watch(fn) {
  4222. return i18n.watchLocale(fn);
  4223. },
  4224. getLocale: function getLocale() {
  4225. return i18n.getLocale();
  4226. },
  4227. setLocale: function setLocale(newLocale) {
  4228. return i18n.setLocale(newLocale);
  4229. } };
  4230. }
  4231. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  4232. var formater;
  4233. function hasI18nJson(jsonObj, delimiters) {
  4234. if (!formater) {
  4235. formater = new BaseFormatter();
  4236. }
  4237. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4238. var value = jsonObj[key];
  4239. if (isString(value)) {
  4240. if (isI18nStr(value, delimiters)) {
  4241. return true;
  4242. }
  4243. } else
  4244. {
  4245. return hasI18nJson(value, delimiters);
  4246. }
  4247. });
  4248. }
  4249. function parseI18nJson(jsonObj, values, delimiters) {
  4250. if (!formater) {
  4251. formater = new BaseFormatter();
  4252. }
  4253. walkJsonObj(jsonObj, function (jsonObj, key) {
  4254. var value = jsonObj[key];
  4255. if (isString(value)) {
  4256. if (isI18nStr(value, delimiters)) {
  4257. jsonObj[key] = compileStr(value, values, delimiters);
  4258. }
  4259. } else
  4260. {
  4261. parseI18nJson(value, values, delimiters);
  4262. }
  4263. });
  4264. return jsonObj;
  4265. }
  4266. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  4267. if (!isI18nStr(jsonStr, delimiters)) {
  4268. return jsonStr;
  4269. }
  4270. if (!formater) {
  4271. formater = new BaseFormatter();
  4272. }
  4273. var localeValues = [];
  4274. Object.keys(locales).forEach(function (name) {
  4275. if (name !== locale) {
  4276. localeValues.push({
  4277. locale: name,
  4278. values: locales[name] });
  4279. }
  4280. });
  4281. localeValues.unshift({ locale: locale, values: locales[locale] });
  4282. try {
  4283. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4284. }
  4285. catch (e) {}
  4286. return jsonStr;
  4287. }
  4288. function isI18nStr(value, delimiters) {
  4289. return value.indexOf(delimiters[0]) > -1;
  4290. }
  4291. function compileStr(value, values, delimiters) {
  4292. return formater.interpolate(value, values, delimiters).join('');
  4293. }
  4294. function compileValue(jsonObj, key, localeValues, delimiters) {
  4295. var value = jsonObj[key];
  4296. if (isString(value)) {
  4297. // 存在国际化
  4298. if (isI18nStr(value, delimiters)) {
  4299. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4300. if (localeValues.length > 1) {
  4301. // 格式化国际化语言
  4302. var valueLocales = jsonObj[key + 'Locales'] = {};
  4303. localeValues.forEach(function (localValue) {
  4304. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4305. });
  4306. }
  4307. }
  4308. } else
  4309. {
  4310. compileJsonObj(value, localeValues, delimiters);
  4311. }
  4312. }
  4313. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4314. walkJsonObj(jsonObj, function (jsonObj, key) {
  4315. compileValue(jsonObj, key, localeValues, delimiters);
  4316. });
  4317. return jsonObj;
  4318. }
  4319. function walkJsonObj(jsonObj, walk) {
  4320. if (isArray(jsonObj)) {
  4321. for (var i = 0; i < jsonObj.length; i++) {
  4322. if (walk(jsonObj, i)) {
  4323. return true;
  4324. }
  4325. }
  4326. } else
  4327. if (isObject(jsonObj)) {
  4328. for (var key in jsonObj) {
  4329. if (walk(jsonObj, key)) {
  4330. return true;
  4331. }
  4332. }
  4333. }
  4334. return false;
  4335. }
  4336. function resolveLocale(locales) {
  4337. return function (locale) {
  4338. if (!locale) {
  4339. return locale;
  4340. }
  4341. locale = normalizeLocale(locale) || locale;
  4342. return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
  4343. };
  4344. }
  4345. function resolveLocaleChain(locale) {
  4346. var chain = [];
  4347. var tokens = locale.split('-');
  4348. while (tokens.length) {
  4349. chain.push(tokens.join('-'));
  4350. tokens.pop();
  4351. }
  4352. return chain;
  4353. }
  4354. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  4355. /***/ }),
  4356. /***/ 379:
  4357. /*!****************************************************************!*\
  4358. !*** D:/2022/10/hmd/components/wangding-pickerAddress/data.js ***!
  4359. \****************************************************************/
  4360. /*! no static exports found */
  4361. /***/ (function(module, exports, __webpack_require__) {
  4362. "use strict";
  4363. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = [
  4364. {
  4365. "name": "北京市",
  4366. "city": [
  4367. {
  4368. "name": "北京市",
  4369. "area": [
  4370. "东城区",
  4371. "西城区",
  4372. "崇文区",
  4373. "宣武区",
  4374. "朝阳区",
  4375. "丰台区",
  4376. "石景山区",
  4377. "海淀区",
  4378. "门头沟区",
  4379. "房山区",
  4380. "通州区",
  4381. "顺义区",
  4382. "昌平区",
  4383. "大兴区",
  4384. "平谷区",
  4385. "怀柔区",
  4386. "密云县",
  4387. "延庆县"] }] },
  4388. {
  4389. "name": "天津市",
  4390. "city": [
  4391. {
  4392. "name": "天津市",
  4393. "area": [
  4394. "和平区",
  4395. "河东区",
  4396. "河西区",
  4397. "南开区",
  4398. "河北区",
  4399. "红桥区",
  4400. "塘沽区",
  4401. "汉沽区",
  4402. "大港区",
  4403. "东丽区",
  4404. "西青区",
  4405. "津南区",
  4406. "北辰区",
  4407. "武清区",
  4408. "宝坻区",
  4409. "宁河县",
  4410. "静海县",
  4411. "蓟 县"] }] },
  4412. {
  4413. "name": "河北省",
  4414. "city": [
  4415. {
  4416. "name": "石家庄市",
  4417. "area": [
  4418. "长安区",
  4419. "桥东区",
  4420. "桥西区",
  4421. "新华区",
  4422. "郊 区",
  4423. "井陉矿区",
  4424. "井陉县",
  4425. "正定县",
  4426. "栾城县",
  4427. "行唐县",
  4428. "灵寿县",
  4429. "高邑县",
  4430. "深泽县",
  4431. "赞皇县",
  4432. "无极县",
  4433. "平山县",
  4434. "元氏县",
  4435. "赵 县",
  4436. "辛集市",
  4437. "藁",
  4438. "晋州市",
  4439. "新乐市",
  4440. "鹿泉市"] },
  4441. {
  4442. "name": "唐山市",
  4443. "area": [
  4444. "路南区",
  4445. "路北区",
  4446. "古冶区",
  4447. "开平区",
  4448. "新 区",
  4449. "丰润县",
  4450. "滦 县",
  4451. "滦南县",
  4452. "乐亭县",
  4453. "迁西县",
  4454. "玉田县",
  4455. "唐海县",
  4456. "遵化市",
  4457. "丰南市",
  4458. "迁安市"] },
  4459. {
  4460. "name": "秦皇岛市",
  4461. "area": [
  4462. "海港区",
  4463. "山海关区",
  4464. "北戴河区",
  4465. "青龙满族自治县",
  4466. "昌黎县",
  4467. "抚宁县",
  4468. "卢龙县"] },
  4469. {
  4470. "name": "邯郸市",
  4471. "area": [
  4472. "邯山区",
  4473. "丛台区",
  4474. "复兴区",
  4475. "峰峰矿区",
  4476. "邯郸县",
  4477. "临漳县",
  4478. "成安县",
  4479. "大名县",
  4480. "涉 县",
  4481. "磁 县",
  4482. "肥乡县",
  4483. "永年县",
  4484. "邱 县",
  4485. "鸡泽县",
  4486. "广平县",
  4487. "馆陶县",
  4488. "魏 县",
  4489. "曲周县",
  4490. "武安市"] },
  4491. {
  4492. "name": "邢台市",
  4493. "area": [
  4494. "桥东区",
  4495. "桥西区",
  4496. "邢台县",
  4497. "临城县",
  4498. "内丘县",
  4499. "柏乡县",
  4500. "隆尧县",
  4501. "任 县",
  4502. "南和县",
  4503. "宁晋县",
  4504. "巨鹿县",
  4505. "新河县",
  4506. "广宗县",
  4507. "平乡县",
  4508. "威 县",
  4509. "清河县",
  4510. "临西县",
  4511. "南宫市",
  4512. "沙河市"] },
  4513. {
  4514. "name": "保定市",
  4515. "area": [
  4516. "新市区",
  4517. "北市区",
  4518. "南市区",
  4519. "满城县",
  4520. "清苑县",
  4521. "涞水县",
  4522. "阜平县",
  4523. "徐水县",
  4524. "定兴县",
  4525. "唐 县",
  4526. "高阳县",
  4527. "容城县",
  4528. "涞源县",
  4529. "望都县",
  4530. "安新县",
  4531. "易 县",
  4532. "曲阳县",
  4533. "蠡 县",
  4534. "顺平县",
  4535. "博野",
  4536. "雄县",
  4537. "涿州市",
  4538. "定州市",
  4539. "安国市",
  4540. "高碑店市"] },
  4541. {
  4542. "name": "张家口",
  4543. "area": [
  4544. "桥东区",
  4545. "桥西区",
  4546. "宣化区",
  4547. "下花园区",
  4548. "宣化县",
  4549. "张北县",
  4550. "康保县",
  4551. "沽源县",
  4552. "尚义县",
  4553. "蔚 县",
  4554. "阳原县",
  4555. "怀安县",
  4556. "万全县",
  4557. "怀来县",
  4558. "涿鹿县",
  4559. "赤城县",
  4560. "崇礼县"] },
  4561. {
  4562. "name": "承德市",
  4563. "area": [
  4564. "双桥区",
  4565. "双滦区",
  4566. "鹰手营子矿区",
  4567. "承德县",
  4568. "兴隆县",
  4569. "平泉县",
  4570. "滦平县",
  4571. "隆化县",
  4572. "丰宁满族自治县",
  4573. "宽城满族自治县",
  4574. "围场满族蒙古族自治县"] },
  4575. {
  4576. "name": "沧州市",
  4577. "area": [
  4578. "新华区",
  4579. "运河区",
  4580. "沧 县",
  4581. "青 县",
  4582. "东光县",
  4583. "海兴县",
  4584. "盐山县",
  4585. "肃宁县",
  4586. "南皮县",
  4587. "吴桥县",
  4588. "献 县",
  4589. "孟村回族自治县",
  4590. "泊头市",
  4591. "任丘市",
  4592. "黄骅市",
  4593. "河间市"] },
  4594. {
  4595. "name": "廊坊市",
  4596. "area": [
  4597. "安次区",
  4598. "固安县",
  4599. "永清县",
  4600. "香河县",
  4601. "大城县",
  4602. "文安县",
  4603. "大厂回族自治县",
  4604. "霸州市",
  4605. "三河市"] },
  4606. {
  4607. "name": "衡水市",
  4608. "area": [
  4609. "桃城区",
  4610. "枣强县",
  4611. "武邑县",
  4612. "武强县",
  4613. "饶阳县",
  4614. "安平县",
  4615. "故城县",
  4616. "景 县",
  4617. "阜城县",
  4618. "冀州市",
  4619. "深州市"] }] },
  4620. {
  4621. "name": "山西省",
  4622. "city": [
  4623. {
  4624. "name": "太原市",
  4625. "area": [
  4626. "小店区",
  4627. "迎泽区",
  4628. "杏花岭区",
  4629. "尖草坪区",
  4630. "万柏林区",
  4631. "晋源区",
  4632. "清徐县",
  4633. "阳曲县",
  4634. "娄烦县",
  4635. "古交市"] },
  4636. {
  4637. "name": "大同市",
  4638. "area": [
  4639. "城 区",
  4640. "矿 区",
  4641. "南郊区",
  4642. "新荣区",
  4643. "阳高县",
  4644. "天镇县",
  4645. "广灵县",
  4646. "灵丘县",
  4647. "浑源县",
  4648. "左云县",
  4649. "大同县"] },
  4650. {
  4651. "name": "阳泉市",
  4652. "area": [
  4653. "城 区",
  4654. "矿 区",
  4655. "郊 区",
  4656. "平定县",
  4657. "盂 县"] },
  4658. {
  4659. "name": "长治市",
  4660. "area": [
  4661. "城 区",
  4662. "郊 区",
  4663. "长治县",
  4664. "襄垣县",
  4665. "屯留县",
  4666. "平顺县",
  4667. "黎城县",
  4668. "壶关县",
  4669. "长子县",
  4670. "武乡县",
  4671. "沁 县",
  4672. "沁源县",
  4673. "潞城市"] },
  4674. {
  4675. "name": "晋城市",
  4676. "area": [
  4677. "城 区",
  4678. "沁水县",
  4679. "阳城县",
  4680. "陵川县",
  4681. "泽州县",
  4682. "高平市"] },
  4683. {
  4684. "name": "朔州市",
  4685. "area": [
  4686. "朔城区",
  4687. "平鲁区",
  4688. "山阴县",
  4689. "应 县",
  4690. "右玉县",
  4691. "怀仁县"] },
  4692. {
  4693. "name": "忻州市",
  4694. "area": [
  4695. "忻府区",
  4696. "原平市",
  4697. "定襄县",
  4698. "五台县",
  4699. "代 县",
  4700. "繁峙县",
  4701. "宁武县",
  4702. "静乐县",
  4703. "神池县",
  4704. "五寨县",
  4705. "岢岚县",
  4706. "河曲县",
  4707. "保德县",
  4708. "偏关县"] },
  4709. {
  4710. "name": "吕梁市",
  4711. "area": [
  4712. "离石区",
  4713. "孝义市",
  4714. "汾阳市",
  4715. "文水县",
  4716. "交城县",
  4717. "兴 县",
  4718. "临 县",
  4719. "柳林县",
  4720. "石楼县",
  4721. "岚 县",
  4722. "方山县",
  4723. "中阳县",
  4724. "交口县"] },
  4725. {
  4726. "name": "晋中市",
  4727. "area": [
  4728. "榆次市",
  4729. "介休市",
  4730. "榆社县",
  4731. "左权县",
  4732. "和顺县",
  4733. "昔阳县",
  4734. "寿阳县",
  4735. "太谷县",
  4736. "祁 县",
  4737. "平遥县",
  4738. "灵石县"] },
  4739. {
  4740. "name": "临汾市",
  4741. "area": [
  4742. "临汾市",
  4743. "侯马市",
  4744. "霍州市",
  4745. "曲沃县",
  4746. "翼城县",
  4747. "襄汾县",
  4748. "洪洞县",
  4749. "古 县",
  4750. "安泽县",
  4751. "浮山县",
  4752. "吉 县",
  4753. "乡宁县",
  4754. "蒲 县",
  4755. "大宁县",
  4756. "永和县",
  4757. "隰 县",
  4758. "汾西县"] },
  4759. {
  4760. "name": "运城市",
  4761. "area": [
  4762. "运城市",
  4763. "永济市",
  4764. "河津市",
  4765. "芮城县",
  4766. "临猗县",
  4767. "万荣县",
  4768. "新绛县",
  4769. "稷山县",
  4770. "闻喜县",
  4771. "夏 县",
  4772. "绛 县",
  4773. "平陆县",
  4774. "垣曲县"] }] },
  4775. {
  4776. "name": "内蒙古",
  4777. "city": [
  4778. {
  4779. "name": "呼和浩特市",
  4780. "area": [
  4781. "新城区",
  4782. "回民区",
  4783. "玉泉区",
  4784. "郊 区",
  4785. "土默特左旗",
  4786. "托克托县",
  4787. "和林格尔县",
  4788. "清水河县",
  4789. "武川县"] },
  4790. {
  4791. "name": "包头市",
  4792. "area": [
  4793. "东河区",
  4794. "昆都伦区",
  4795. "青山区",
  4796. "石拐矿区",
  4797. "白云矿区",
  4798. "郊 区",
  4799. "土默特右旗",
  4800. "固阳县",
  4801. "达尔罕茂明安联合旗"] },
  4802. {
  4803. "name": "乌海市",
  4804. "area": [
  4805. "海勃湾区",
  4806. "海南区",
  4807. "乌达区"] },
  4808. {
  4809. "name": "赤峰市",
  4810. "area": [
  4811. "红山区",
  4812. "元宝山区",
  4813. "松山区",
  4814. "阿鲁科尔沁旗",
  4815. "巴林左旗",
  4816. "巴林右旗",
  4817. "林西县",
  4818. "克什克腾旗",
  4819. "翁牛特旗",
  4820. "喀喇沁旗",
  4821. "宁城县",
  4822. "敖汉旗"] },
  4823. {
  4824. "name": "呼伦贝尔市",
  4825. "area": [
  4826. "海拉尔市",
  4827. "满洲里市",
  4828. "扎兰屯市",
  4829. "牙克石市",
  4830. "根河市",
  4831. "额尔古纳市",
  4832. "阿荣旗",
  4833. "莫力达瓦达斡尔族自治旗",
  4834. "鄂伦春自治旗",
  4835. "鄂温克族自治旗",
  4836. "新巴尔虎右旗",
  4837. "新巴尔虎左旗",
  4838. "陈巴尔虎旗"] },
  4839. {
  4840. "name": "兴安盟",
  4841. "area": [
  4842. "乌兰浩特市",
  4843. "阿尔山市",
  4844. "科尔沁右翼前旗",
  4845. "科尔沁右翼中旗",
  4846. "扎赉特旗",
  4847. "突泉县"] },
  4848. {
  4849. "name": "通辽市",
  4850. "area": [
  4851. "科尔沁区",
  4852. "霍林郭勒市",
  4853. "科尔沁左翼中旗",
  4854. "科尔沁左翼后旗",
  4855. "开鲁县",
  4856. "库伦旗",
  4857. "奈曼旗",
  4858. "扎鲁特旗"] },
  4859. {
  4860. "name": "锡林郭勒盟",
  4861. "area": [
  4862. "二连浩特市",
  4863. "锡林浩特市",
  4864. "阿巴嘎旗",
  4865. "苏尼特左旗",
  4866. "苏尼特右旗",
  4867. "东乌珠穆沁旗",
  4868. "西乌珠穆沁旗",
  4869. "太仆寺旗",
  4870. "镶黄旗",
  4871. "正镶白旗",
  4872. "正蓝旗",
  4873. "多伦县"] },
  4874. {
  4875. "name": "乌兰察布盟",
  4876. "area": [
  4877. "集宁市",
  4878. "丰镇市",
  4879. "卓资县",
  4880. "化德县",
  4881. "商都县",
  4882. "兴和县",
  4883. "凉城县",
  4884. "察哈尔右翼前旗",
  4885. "察哈尔右翼中旗",
  4886. "察哈尔右翼后旗",
  4887. "四子王旗"] },
  4888. {
  4889. "name": "伊克昭盟",
  4890. "area": [
  4891. "东胜市",
  4892. "达拉特旗",
  4893. "准格尔旗",
  4894. "鄂托克前旗",
  4895. "鄂托克旗",
  4896. "杭锦旗",
  4897. "乌审旗",
  4898. "伊金霍洛旗"] },
  4899. {
  4900. "name": "巴彦淖尔盟",
  4901. "area": [
  4902. "临河市",
  4903. "五原县",
  4904. "磴口县",
  4905. "乌拉特前旗",
  4906. "乌拉特中旗",
  4907. "乌拉特后旗",
  4908. "杭锦后旗"] },
  4909. {
  4910. "name": "阿拉善盟",
  4911. "area": [
  4912. "阿拉善左旗",
  4913. "阿拉善右旗",
  4914. "额济纳旗"] }] },
  4915. {
  4916. "name": "辽宁省",
  4917. "city": [
  4918. {
  4919. "name": "沈阳市",
  4920. "area": [
  4921. "沈河区",
  4922. "皇姑区",
  4923. "和平区",
  4924. "大东区",
  4925. "铁西区",
  4926. "苏家屯区",
  4927. "东陵区",
  4928. "于洪区",
  4929. "新民市",
  4930. "法库县",
  4931. "辽中县",
  4932. "康平县",
  4933. "新城子区"] },
  4934. {
  4935. "name": "大连市",
  4936. "area": [
  4937. "西岗区",
  4938. "中山区",
  4939. "沙河口区",
  4940. "甘井子区",
  4941. "旅顺口区",
  4942. "金州区",
  4943. "瓦房店市",
  4944. "普兰店市",
  4945. "庄河市",
  4946. "长海县"] },
  4947. {
  4948. "name": "鞍山市",
  4949. "area": [
  4950. "铁东区",
  4951. "铁西区",
  4952. "立山区",
  4953. "千山区",
  4954. "海城市",
  4955. "台安县",
  4956. "岫岩满族自治县"] },
  4957. {
  4958. "name": "抚顺市",
  4959. "area": [
  4960. "顺城区",
  4961. "新抚区",
  4962. "东洲区",
  4963. "望花区",
  4964. "抚顺县",
  4965. "清原满族自治县",
  4966. "新宾满族自治县"] },
  4967. {
  4968. "name": "本溪市",
  4969. "area": [
  4970. "平山区",
  4971. "明山区",
  4972. "溪湖区",
  4973. "南芬区",
  4974. "本溪满族自治县",
  4975. "桓仁满族自治县"] },
  4976. {
  4977. "name": "丹东市",
  4978. "area": [
  4979. "振兴区",
  4980. "元宝区",
  4981. "振安区",
  4982. "东港市",
  4983. "凤城市",
  4984. "宽甸满族自治县"] },
  4985. {
  4986. "name": "锦州市",
  4987. "area": [
  4988. "太和区",
  4989. "古塔区",
  4990. "凌河区",
  4991. "凌海市",
  4992. "黑山县",
  4993. "义县",
  4994. "北宁市"] },
  4995. {
  4996. "name": "营口市",
  4997. "area": [
  4998. "站前区",
  4999. "西市区",
  5000. "鲅鱼圈区",
  5001. "老边区",
  5002. "大石桥市",
  5003. "盖州市"] },
  5004. {
  5005. "name": "阜新市",
  5006. "area": [
  5007. "海州区",
  5008. "新邱区",
  5009. "太平区",
  5010. "清河门区",
  5011. "细河区",
  5012. "彰武县",
  5013. "阜新蒙古族自治县"] },
  5014. {
  5015. "name": "辽阳市",
  5016. "area": [
  5017. "白塔区",
  5018. "文圣区",
  5019. "宏伟区",
  5020. "太子河区",
  5021. "弓长岭区",
  5022. "灯塔市",
  5023. "辽阳县"] },
  5024. {
  5025. "name": "盘锦",
  5026. "area": [
  5027. "双台子区",
  5028. "兴隆台区",
  5029. "盘山县",
  5030. "大洼县"] },
  5031. {
  5032. "name": "铁岭市",
  5033. "area": [
  5034. "银州区",
  5035. "清河区",
  5036. "调兵山市",
  5037. "开原市",
  5038. "铁岭县",
  5039. "昌图县",
  5040. "西丰县"] },
  5041. {
  5042. "name": "朝阳市",
  5043. "area": [
  5044. "双塔区",
  5045. "龙城区",
  5046. "凌源市",
  5047. "北票市",
  5048. "朝阳县",
  5049. "建平县",
  5050. "喀喇沁左翼蒙古族自治县"] },
  5051. {
  5052. "name": "葫芦岛市",
  5053. "area": [
  5054. "龙港区",
  5055. "南票区",
  5056. "连山区",
  5057. "兴城市",
  5058. "绥中县",
  5059. "建昌县"] }] },
  5060. {
  5061. "name": "吉林省",
  5062. "city": [
  5063. {
  5064. "name": "长春市",
  5065. "area": [
  5066. "朝阳区",
  5067. "宽城区",
  5068. "二道区",
  5069. "南关区",
  5070. "绿园区",
  5071. "双阳区",
  5072. "九台市",
  5073. "榆树市",
  5074. "德惠市",
  5075. "农安县"] },
  5076. {
  5077. "name": "吉林市",
  5078. "area": [
  5079. "船营区",
  5080. "昌邑区",
  5081. "龙潭区",
  5082. "丰满区",
  5083. "舒兰市",
  5084. "桦甸市",
  5085. "蛟河市",
  5086. "磐石市",
  5087. "永吉县"] },
  5088. {
  5089. "name": "四平",
  5090. "area": [
  5091. "铁西区",
  5092. "铁东区",
  5093. "公主岭市",
  5094. "双辽市",
  5095. "梨树县",
  5096. "伊通满族自治县"] },
  5097. {
  5098. "name": "辽源市",
  5099. "area": [
  5100. "龙山区",
  5101. "西安区",
  5102. "东辽县",
  5103. "东丰县"] },
  5104. {
  5105. "name": "通化市",
  5106. "area": [
  5107. "东昌区",
  5108. "二道江区",
  5109. "梅河口市",
  5110. "集安市",
  5111. "通化县",
  5112. "辉南县",
  5113. "柳河县"] },
  5114. {
  5115. "name": "白山市",
  5116. "area": [
  5117. "八道江区",
  5118. "江源区",
  5119. "临江市",
  5120. "靖宇县",
  5121. "抚松县",
  5122. "长白朝鲜族自治县"] },
  5123. {
  5124. "name": "松原市",
  5125. "area": [
  5126. "宁江区",
  5127. "乾安县",
  5128. "长岭县",
  5129. "扶余县",
  5130. "前郭尔罗斯蒙古族自治县"] },
  5131. {
  5132. "name": "白城市",
  5133. "area": [
  5134. "洮北区",
  5135. "大安市",
  5136. "洮南市",
  5137. "镇赉县",
  5138. "通榆县"] },
  5139. {
  5140. "name": "延边朝鲜族自治州",
  5141. "area": [
  5142. "延吉市",
  5143. "图们市",
  5144. "敦化市",
  5145. "龙井市",
  5146. "珲春市",
  5147. "和龙市",
  5148. "安图县",
  5149. "汪清县"] }] },
  5150. {
  5151. "name": "黑龙江省",
  5152. "city": [
  5153. {
  5154. "name": "哈尔滨市",
  5155. "area": [
  5156. "松北区",
  5157. "道里区",
  5158. "南岗区",
  5159. "平房区",
  5160. "香坊区",
  5161. "道外区",
  5162. "呼兰区",
  5163. "阿城区",
  5164. "双城市",
  5165. "尚志市",
  5166. "五常市",
  5167. "宾县",
  5168. "方正县",
  5169. "通河县",
  5170. "巴彦县",
  5171. "延寿县",
  5172. "木兰县",
  5173. "依兰县"] },
  5174. {
  5175. "name": "齐齐哈尔市",
  5176. "area": [
  5177. "龙沙区",
  5178. "昂昂溪区",
  5179. "铁锋区",
  5180. "建华区",
  5181. "富拉尔基区",
  5182. "碾子山区",
  5183. "梅里斯达斡尔族区",
  5184. "讷河市",
  5185. "富裕县",
  5186. "拜泉县",
  5187. "甘南县",
  5188. "依安县",
  5189. "克山县",
  5190. "泰来县",
  5191. "克东县",
  5192. "龙江县"] },
  5193. {
  5194. "name": "鹤岗市",
  5195. "area": [
  5196. "兴山区",
  5197. "工农区",
  5198. "南山区",
  5199. "兴安区",
  5200. "向阳区",
  5201. "东山区",
  5202. "萝北县",
  5203. "绥滨县"] },
  5204. {
  5205. "name": "双鸭山",
  5206. "area": [
  5207. "尖山区",
  5208. "岭东区",
  5209. "四方台区",
  5210. "宝山区",
  5211. "集贤县",
  5212. "宝清县",
  5213. "友谊县",
  5214. "饶河县"] },
  5215. {
  5216. "name": "鸡西市",
  5217. "area": [
  5218. "鸡冠区",
  5219. "恒山区",
  5220. "城子河区",
  5221. "滴道区",
  5222. "梨树区",
  5223. "麻山区",
  5224. "密山市",
  5225. "虎林市",
  5226. "鸡东县"] },
  5227. {
  5228. "name": "大庆市",
  5229. "area": [
  5230. "萨尔图区",
  5231. "红岗区",
  5232. "龙凤区",
  5233. "让胡路区",
  5234. "大同区",
  5235. "林甸县",
  5236. "肇州县",
  5237. "肇源县",
  5238. "杜尔伯特蒙古族自治县"] },
  5239. {
  5240. "name": "伊春市",
  5241. "area": [
  5242. "伊春区",
  5243. "带岭区",
  5244. "南岔区",
  5245. "金山屯区",
  5246. "西林区",
  5247. "美溪区",
  5248. "乌马河区",
  5249. "翠峦区",
  5250. "友好区",
  5251. "上甘岭区",
  5252. "五营区",
  5253. "红星区",
  5254. "新青区",
  5255. "汤旺河区",
  5256. "乌伊岭区",
  5257. "铁力市",
  5258. "嘉荫县"] },
  5259. {
  5260. "name": "牡丹江市",
  5261. "area": [
  5262. "爱民区",
  5263. "东安区",
  5264. "阳明区",
  5265. "西安区",
  5266. "绥芬河市",
  5267. "宁安市",
  5268. "海林市",
  5269. "穆棱市",
  5270. "林口县",
  5271. "东宁县"] },
  5272. {
  5273. "name": "佳木斯市",
  5274. "area": [
  5275. "向阳区",
  5276. "前进区",
  5277. "东风区",
  5278. "郊区",
  5279. "同江市",
  5280. "富锦市",
  5281. "桦川县",
  5282. "抚远县",
  5283. "桦南县",
  5284. "汤原县"] },
  5285. {
  5286. "name": "七台河市",
  5287. "area": [
  5288. "桃山区",
  5289. "新兴区",
  5290. "茄子河区",
  5291. "勃利县"] },
  5292. {
  5293. "name": "黑河市",
  5294. "area": [
  5295. "爱辉区",
  5296. "北安市",
  5297. "五大连池市",
  5298. "逊克县",
  5299. "嫩江县",
  5300. "孙吴县"] },
  5301. {
  5302. "name": "绥化市",
  5303. "area": [
  5304. "北林区",
  5305. "安达市",
  5306. "肇东市",
  5307. "海伦市",
  5308. "绥棱县",
  5309. "兰西县",
  5310. "明水县",
  5311. "青冈县",
  5312. "庆安县",
  5313. "望奎县"] },
  5314. {
  5315. "name": "大兴安岭地区",
  5316. "area": [
  5317. "呼玛县",
  5318. "塔河县",
  5319. "漠河县",
  5320. "大兴安岭辖区"] }] },
  5321. {
  5322. "name": "上海市",
  5323. "city": [
  5324. {
  5325. "name": "上海市",
  5326. "area": [
  5327. "黄浦区",
  5328. "卢湾区",
  5329. "徐汇区",
  5330. "长宁区",
  5331. "静安区",
  5332. "普陀区",
  5333. "闸北区",
  5334. "虹口区",
  5335. "杨浦区",
  5336. "宝山区",
  5337. "闵行区",
  5338. "嘉定区",
  5339. "松江区",
  5340. "金山区",
  5341. "青浦区",
  5342. "南汇区",
  5343. "奉贤区",
  5344. "浦东新区",
  5345. "崇明县"] }] },
  5346. {
  5347. "name": "江苏省",
  5348. "city": [
  5349. {
  5350. "name": "南京市",
  5351. "area": [
  5352. "玄武区",
  5353. "白下区",
  5354. "秦淮区",
  5355. "建邺区",
  5356. "鼓楼区",
  5357. "下关区",
  5358. "栖霞区",
  5359. "雨花台区",
  5360. "浦口区",
  5361. "江宁区",
  5362. "六合区",
  5363. "溧水县",
  5364. "高淳县"] },
  5365. {
  5366. "name": "苏州市",
  5367. "area": [
  5368. "金阊区",
  5369. "平江区",
  5370. "沧浪区",
  5371. "虎丘区",
  5372. "吴中区",
  5373. "相城区",
  5374. "常熟市",
  5375. "张家港市",
  5376. "昆山市",
  5377. "吴江市",
  5378. "太仓市"] },
  5379. {
  5380. "name": "无锡市",
  5381. "area": [
  5382. "崇安区",
  5383. "南长区",
  5384. "北塘区",
  5385. "滨湖区",
  5386. "锡山区",
  5387. "惠山区",
  5388. "江阴市",
  5389. "宜兴市"] },
  5390. {
  5391. "name": "常州市",
  5392. "area": [
  5393. "钟楼区",
  5394. "天宁区",
  5395. "戚墅堰区",
  5396. "新北区",
  5397. "武进区",
  5398. "金坛市",
  5399. "溧阳市"] },
  5400. {
  5401. "name": "镇江市",
  5402. "area": [
  5403. "京口区",
  5404. "润州区",
  5405. "丹徒区",
  5406. "丹阳市",
  5407. "扬中市",
  5408. "句容市"] },
  5409. {
  5410. "name": "南通市",
  5411. "area": [
  5412. "崇川区",
  5413. "港闸区",
  5414. "通州市",
  5415. "如皋市",
  5416. "海门市",
  5417. "启东市",
  5418. "海安县",
  5419. "如东县"] },
  5420. {
  5421. "name": "泰州市",
  5422. "area": [
  5423. "海陵区",
  5424. "高港区",
  5425. "姜堰市",
  5426. "泰兴市",
  5427. "靖江市",
  5428. "兴化市"] },
  5429. {
  5430. "name": "扬州市",
  5431. "area": [
  5432. "广陵区",
  5433. "维扬区",
  5434. "邗江区",
  5435. "江都市",
  5436. "仪征市",
  5437. "高邮市",
  5438. "宝应县"] },
  5439. {
  5440. "name": "盐城市",
  5441. "area": [
  5442. "亭湖区",
  5443. "盐都区",
  5444. "大丰市",
  5445. "东台市",
  5446. "建湖县",
  5447. "射阳县",
  5448. "阜宁县",
  5449. "滨海县",
  5450. "响水县"] },
  5451. {
  5452. "name": "连云港市",
  5453. "area": [
  5454. "新浦区",
  5455. "海州区",
  5456. "连云区",
  5457. "东海县",
  5458. "灌云县",
  5459. "赣榆县",
  5460. "灌南县"] },
  5461. {
  5462. "name": "徐州市",
  5463. "area": [
  5464. "云龙区",
  5465. "鼓楼区",
  5466. "九里区",
  5467. "泉山区",
  5468. "贾汪区",
  5469. "邳州市",
  5470. "新沂市",
  5471. "铜山县",
  5472. "睢宁县",
  5473. "沛县",
  5474. "丰县"] },
  5475. {
  5476. "name": "淮安市",
  5477. "area": [
  5478. "清河区",
  5479. "清浦区",
  5480. "楚州区",
  5481. "淮阴区",
  5482. "涟水县",
  5483. "洪泽县",
  5484. "金湖县",
  5485. "盱眙县"] },
  5486. {
  5487. "name": "宿迁市",
  5488. "area": [
  5489. "宿城区",
  5490. "宿豫区",
  5491. "沭阳县",
  5492. "泗阳县",
  5493. "泗洪县"] }] },
  5494. {
  5495. "name": "浙江省",
  5496. "city": [
  5497. {
  5498. "name": "杭州市",
  5499. "area": [
  5500. "拱墅区",
  5501. "西湖区",
  5502. "上城区",
  5503. "下城区",
  5504. "江干区",
  5505. "滨江区",
  5506. "余杭区",
  5507. "萧山区",
  5508. "建德市",
  5509. "富阳市",
  5510. "临安市",
  5511. "桐庐县",
  5512. "淳安县"] },
  5513. {
  5514. "name": "宁波市",
  5515. "area": [
  5516. "海曙区",
  5517. "江东区",
  5518. "江北区",
  5519. "镇海区",
  5520. "北仑区",
  5521. "鄞州区",
  5522. "余姚市",
  5523. "慈溪市",
  5524. "奉化市",
  5525. "宁海县",
  5526. "象山县"] },
  5527. {
  5528. "name": "温州市",
  5529. "area": [
  5530. "鹿城区",
  5531. "龙湾区",
  5532. "瓯海区",
  5533. "瑞安市",
  5534. "乐清市",
  5535. "永嘉县",
  5536. "洞头县",
  5537. "平阳县",
  5538. "苍南县",
  5539. "文成县",
  5540. "泰顺县"] },
  5541. {
  5542. "name": "嘉兴市",
  5543. "area": [
  5544. "秀城区",
  5545. "秀洲区",
  5546. "海宁市",
  5547. "平湖市",
  5548. "桐乡市",
  5549. "嘉善县",
  5550. "海盐县"] },
  5551. {
  5552. "name": "湖州市",
  5553. "area": [
  5554. "吴兴区",
  5555. "南浔区",
  5556. "长兴县",
  5557. "德清县",
  5558. "安吉县"] },
  5559. {
  5560. "name": "绍兴市",
  5561. "area": [
  5562. "越城区",
  5563. "诸暨市",
  5564. "上虞市",
  5565. "嵊州市",
  5566. "绍兴县",
  5567. "新昌县"] },
  5568. {
  5569. "name": "金华市",
  5570. "area": [
  5571. "婺城区",
  5572. "金东区",
  5573. "兰溪市",
  5574. "义乌市",
  5575. "东阳市",
  5576. "永康市",
  5577. "武义县",
  5578. "浦江县",
  5579. "磐安县"] },
  5580. {
  5581. "name": "衢州市",
  5582. "area": [
  5583. "柯城区",
  5584. "衢江区",
  5585. "江山市",
  5586. "龙游县",
  5587. "常山县",
  5588. "开化县"] },
  5589. {
  5590. "name": "舟山市",
  5591. "area": [
  5592. "定海区",
  5593. "普陀区",
  5594. "岱山县",
  5595. "嵊泗县"] },
  5596. {
  5597. "name": "台州市",
  5598. "area": [
  5599. "椒江区",
  5600. "黄岩区",
  5601. "路桥区",
  5602. "临海市",
  5603. "温岭市",
  5604. "玉环县",
  5605. "天台县",
  5606. "仙居县",
  5607. "三门县"] },
  5608. {
  5609. "name": "丽水市",
  5610. "area": [
  5611. "莲都区",
  5612. "龙泉市",
  5613. "缙云县",
  5614. "青田县",
  5615. "云和县",
  5616. "遂昌县",
  5617. "松阳县",
  5618. "庆元县",
  5619. "景宁畲族自治县"] }] },
  5620. {
  5621. "name": "安徽省",
  5622. "city": [
  5623. {
  5624. "name": "合肥市",
  5625. "area": [
  5626. "庐阳区",
  5627. "瑶海区",
  5628. "蜀山区",
  5629. "包河区",
  5630. "长丰县",
  5631. "肥东县",
  5632. "肥西县"] },
  5633. {
  5634. "name": "芜湖市",
  5635. "area": [
  5636. "镜湖区",
  5637. "弋江区",
  5638. "鸠江区",
  5639. "三山区",
  5640. "芜湖县",
  5641. "南陵县",
  5642. "繁昌县"] },
  5643. {
  5644. "name": "蚌埠市",
  5645. "area": [
  5646. "蚌山区",
  5647. "龙子湖区",
  5648. "禹会区",
  5649. "淮上区",
  5650. "怀远县",
  5651. "固镇县",
  5652. "五河县"] },
  5653. {
  5654. "name": "淮南市",
  5655. "area": [
  5656. "田家庵区",
  5657. "大通区",
  5658. "谢家集区",
  5659. "八公山区",
  5660. "潘集区",
  5661. "凤台县"] },
  5662. {
  5663. "name": "马鞍山市",
  5664. "area": [
  5665. "雨山区",
  5666. "花山区",
  5667. "金家庄区",
  5668. "当涂县"] },
  5669. {
  5670. "name": "淮北市",
  5671. "area": [
  5672. "相山区",
  5673. "杜集区",
  5674. "烈山区",
  5675. "濉溪县"] },
  5676. {
  5677. "name": "铜陵市",
  5678. "area": [
  5679. "铜官山区",
  5680. "狮子山区",
  5681. "郊区",
  5682. "铜陵县"] },
  5683. {
  5684. "name": "安庆市",
  5685. "area": [
  5686. "迎江区",
  5687. "大观区",
  5688. "宜秀区",
  5689. "桐城市",
  5690. "宿松县",
  5691. "枞阳县",
  5692. "太湖县",
  5693. "怀宁县",
  5694. "岳西县",
  5695. "望江县",
  5696. "潜山县"] },
  5697. {
  5698. "name": "黄山市",
  5699. "area": [
  5700. "屯溪区",
  5701. "黄山区",
  5702. "徽州区",
  5703. "休宁县",
  5704. "歙县",
  5705. "祁门县",
  5706. "黟县"] },
  5707. {
  5708. "name": "滁州市",
  5709. "area": [
  5710. "琅琊区",
  5711. "南谯区",
  5712. "天长市",
  5713. "明光市",
  5714. "全椒县",
  5715. "来安县",
  5716. "定远县",
  5717. "凤阳县"] },
  5718. {
  5719. "name": "阜阳市",
  5720. "area": [
  5721. "颍州区",
  5722. "颍东区",
  5723. "颍泉区",
  5724. "界首市",
  5725. "临泉县",
  5726. "颍上县",
  5727. "阜南县",
  5728. "太和县"] },
  5729. {
  5730. "name": "宿州市",
  5731. "area": [
  5732. "埇桥区",
  5733. "萧县",
  5734. "泗县",
  5735. "砀山县",
  5736. "灵璧县"] },
  5737. {
  5738. "name": "巢湖市",
  5739. "area": [
  5740. "居巢区",
  5741. "含山县",
  5742. "无为县",
  5743. "庐江县",
  5744. "和县"] },
  5745. {
  5746. "name": "六安市",
  5747. "area": [
  5748. "金安区",
  5749. "裕安区",
  5750. "寿县",
  5751. "霍山县",
  5752. "霍邱县",
  5753. "舒城县",
  5754. "金寨县"] },
  5755. {
  5756. "name": "亳州市",
  5757. "area": [
  5758. "谯城区",
  5759. "利辛县",
  5760. "涡阳县",
  5761. "蒙城县"] },
  5762. {
  5763. "name": "池州市",
  5764. "area": [
  5765. "贵池区",
  5766. "东至县",
  5767. "石台县",
  5768. "青阳县"] },
  5769. {
  5770. "name": "宣城市",
  5771. "area": [
  5772. "宣州区",
  5773. "宁国市",
  5774. "广德县",
  5775. "郎溪县",
  5776. "泾县",
  5777. "旌德县",
  5778. "绩溪县"] }] },
  5779. {
  5780. "name": "福建省",
  5781. "city": [
  5782. {
  5783. "name": "福州市",
  5784. "area": [
  5785. "鼓楼区",
  5786. "台江区",
  5787. "仓山区",
  5788. "马尾区",
  5789. "晋安区",
  5790. "福清市",
  5791. "长乐市",
  5792. "闽侯县",
  5793. "闽清县",
  5794. "永泰县",
  5795. "连江县",
  5796. "罗源县",
  5797. "平潭县"] },
  5798. {
  5799. "name": "厦门市",
  5800. "area": [
  5801. "思明区",
  5802. "海沧区",
  5803. "湖里区",
  5804. "集美区",
  5805. "同安区",
  5806. "翔安区"] },
  5807. {
  5808. "name": "莆田市",
  5809. "area": [
  5810. "城厢区",
  5811. "涵江区",
  5812. "荔城区",
  5813. "秀屿区",
  5814. "仙游县"] },
  5815. {
  5816. "name": "三明市",
  5817. "area": [
  5818. "梅列区",
  5819. "三元区",
  5820. "永安市",
  5821. "明溪县",
  5822. "将乐县",
  5823. "大田县",
  5824. "宁化县",
  5825. "建宁县",
  5826. "沙县",
  5827. "尤溪县",
  5828. "清流县",
  5829. "泰宁县"] },
  5830. {
  5831. "name": "泉州市",
  5832. "area": [
  5833. "鲤城区",
  5834. "丰泽区",
  5835. "洛江区",
  5836. "泉港区",
  5837. "石狮市",
  5838. "晋江市",
  5839. "南安市",
  5840. "惠安县",
  5841. "永春县",
  5842. "安溪县",
  5843. "德化县",
  5844. "金门县"] },
  5845. {
  5846. "name": "漳州市",
  5847. "area": [
  5848. "芗城区",
  5849. "龙文区",
  5850. "龙海市",
  5851. "平和县",
  5852. "南靖县",
  5853. "诏安县",
  5854. "漳浦县",
  5855. "华安县",
  5856. "东山县",
  5857. "长泰县",
  5858. "云霄县"] },
  5859. {
  5860. "name": "南平市",
  5861. "area": [
  5862. "延平区",
  5863. "建瓯市",
  5864. "邵武市",
  5865. "武夷山市",
  5866. "建阳市",
  5867. "松溪县",
  5868. "光泽县",
  5869. "顺昌县",
  5870. "浦城县",
  5871. "政和县"] },
  5872. {
  5873. "name": "龙岩市",
  5874. "area": [
  5875. "新罗区",
  5876. "漳平市",
  5877. "长汀县",
  5878. "武平县",
  5879. "上杭县",
  5880. "永定县",
  5881. "连城县"] },
  5882. {
  5883. "name": "宁德市",
  5884. "area": [
  5885. "蕉城区",
  5886. "福安市",
  5887. "福鼎市",
  5888. "寿宁县",
  5889. "霞浦县",
  5890. "柘荣县",
  5891. "屏南县",
  5892. "古田县",
  5893. "周宁县"] }] },
  5894. {
  5895. "name": "江西省",
  5896. "city": [
  5897. {
  5898. "name": "南昌市",
  5899. "area": [
  5900. "东湖区",
  5901. "西湖区",
  5902. "青云谱区",
  5903. "湾里区",
  5904. "青山湖区",
  5905. "新建县",
  5906. "南昌县",
  5907. "进贤县",
  5908. "安义县"] },
  5909. {
  5910. "name": "景德镇市",
  5911. "area": [
  5912. "珠山区",
  5913. "昌江区",
  5914. "乐平市",
  5915. "浮梁县"] },
  5916. {
  5917. "name": "萍乡市",
  5918. "area": [
  5919. "安源区",
  5920. "湘东区",
  5921. "莲花县",
  5922. "上栗县",
  5923. "芦溪县"] },
  5924. {
  5925. "name": "九江市",
  5926. "area": [
  5927. "浔阳区",
  5928. "庐山区",
  5929. "瑞昌市",
  5930. "九江县",
  5931. "星子县",
  5932. "武宁县",
  5933. "彭泽县",
  5934. "永修县",
  5935. "修水县",
  5936. "湖口县",
  5937. "德安县",
  5938. "都昌县"] },
  5939. {
  5940. "name": "新余市",
  5941. "area": [
  5942. "渝水区",
  5943. "分宜县"] },
  5944. {
  5945. "name": "鹰潭市",
  5946. "area": [
  5947. "月湖区",
  5948. "贵溪市",
  5949. "余江县"] },
  5950. {
  5951. "name": "赣州市",
  5952. "area": [
  5953. "章贡区",
  5954. "瑞金市",
  5955. "南康市",
  5956. "石城县",
  5957. "安远县",
  5958. "赣县",
  5959. "宁都县",
  5960. "寻乌县",
  5961. "兴国县",
  5962. "定南县",
  5963. "上犹县",
  5964. "于都县",
  5965. "龙南县",
  5966. "崇义县",
  5967. "信丰县",
  5968. "全南县",
  5969. "大余县",
  5970. "会昌县"] },
  5971. {
  5972. "name": "吉安市",
  5973. "area": [
  5974. "吉州区",
  5975. "青原区",
  5976. "井冈山市",
  5977. "吉安县",
  5978. "永丰县",
  5979. "永新县",
  5980. "新干县",
  5981. "泰和县",
  5982. "峡江县",
  5983. "遂川县",
  5984. "安福县",
  5985. "吉水县",
  5986. "万安县"] },
  5987. {
  5988. "name": "宜春市",
  5989. "area": [
  5990. "袁州区",
  5991. "丰城市",
  5992. "樟树市",
  5993. "高安市",
  5994. "铜鼓县",
  5995. "靖安县",
  5996. "宜丰县",
  5997. "奉新县",
  5998. "万载县",
  5999. "上高县"] },
  6000. {
  6001. "name": "抚州市",
  6002. "area": [
  6003. "临川区",
  6004. "南丰县",
  6005. "乐安县",
  6006. "金溪县",
  6007. "南城县",
  6008. "东乡县",
  6009. "资溪县",
  6010. "宜黄县",
  6011. "广昌县",
  6012. "黎川县",
  6013. "崇仁县"] },
  6014. {
  6015. "name": "上饶市",
  6016. "area": [
  6017. "信州区",
  6018. "德兴市",
  6019. "上饶县",
  6020. "广丰县",
  6021. "鄱阳县",
  6022. "婺源县",
  6023. "铅山县",
  6024. "余干县",
  6025. "横峰县",
  6026. "弋阳县",
  6027. "玉山县",
  6028. "万年县"] }] },
  6029. {
  6030. "name": "山东省",
  6031. "city": [
  6032. {
  6033. "name": "济南市",
  6034. "area": [
  6035. "市中区",
  6036. "历下区",
  6037. "天桥区",
  6038. "槐荫区",
  6039. "历城区",
  6040. "长清区",
  6041. "章丘市",
  6042. "平阴县",
  6043. "济阳县",
  6044. "商河县"] },
  6045. {
  6046. "name": "青岛市",
  6047. "area": [
  6048. "市南区",
  6049. "市北区",
  6050. "城阳区",
  6051. "四方区",
  6052. "李沧区",
  6053. "黄岛区",
  6054. "崂山区",
  6055. "胶南市",
  6056. "胶州市",
  6057. "平度市",
  6058. "莱西市",
  6059. "即墨市"] },
  6060. {
  6061. "name": "淄博市",
  6062. "area": [
  6063. "张店区",
  6064. "临淄区",
  6065. "淄川区",
  6066. "博山区",
  6067. "周村区",
  6068. "桓台县",
  6069. "高青县",
  6070. "沂源县"] },
  6071. {
  6072. "name": "枣庄市",
  6073. "area": [
  6074. "市中区",
  6075. "山亭区",
  6076. "峄城区",
  6077. "台儿庄区",
  6078. "薛城区",
  6079. "滕州市"] },
  6080. {
  6081. "name": "东营市",
  6082. "area": [
  6083. "东营区",
  6084. "河口区",
  6085. "垦利县",
  6086. "广饶县",
  6087. "利津县"] },
  6088. {
  6089. "name": "烟台市",
  6090. "area": [
  6091. "芝罘区",
  6092. "福山区",
  6093. "牟平区",
  6094. "莱山区",
  6095. "龙口市",
  6096. "莱阳市",
  6097. "莱州市",
  6098. "招远市",
  6099. "蓬莱市",
  6100. "栖霞市",
  6101. "海阳市",
  6102. "长岛县"] },
  6103. {
  6104. "name": "潍坊市",
  6105. "area": [
  6106. "潍城区",
  6107. "寒亭区",
  6108. "坊子区",
  6109. "奎文区",
  6110. "青州市",
  6111. "诸城市",
  6112. "寿光市",
  6113. "安丘市",
  6114. "高密市",
  6115. "昌邑市",
  6116. "昌乐县",
  6117. "临朐县"] },
  6118. {
  6119. "name": "济宁市",
  6120. "area": [
  6121. "市中区",
  6122. "任城区",
  6123. "曲阜市",
  6124. "兖州市",
  6125. "邹城市",
  6126. "鱼台县",
  6127. "金乡县",
  6128. "嘉祥县",
  6129. "微山县",
  6130. "汶上县",
  6131. "泗水县",
  6132. "梁山县"] },
  6133. {
  6134. "name": "泰安市",
  6135. "area": [
  6136. "泰山区",
  6137. "岱岳区",
  6138. "新泰市",
  6139. "肥城市",
  6140. "宁阳县",
  6141. "东平县"] },
  6142. {
  6143. "name": "威海市",
  6144. "area": [
  6145. "环翠区",
  6146. "乳山市",
  6147. "文登市",
  6148. "荣成市"] },
  6149. {
  6150. "name": "日照市",
  6151. "area": [
  6152. "东港区",
  6153. "岚山区",
  6154. "五莲县",
  6155. "莒县"] },
  6156. {
  6157. "name": "莱芜市",
  6158. "area": [
  6159. "莱城区",
  6160. "钢城区"] },
  6161. {
  6162. "name": "临沂市",
  6163. "area": [
  6164. "兰山区",
  6165. "罗庄区",
  6166. "河东区",
  6167. "沂南县",
  6168. "郯城县",
  6169. "沂水县",
  6170. "苍山县",
  6171. "费县",
  6172. "平邑县",
  6173. "莒南县",
  6174. "蒙阴县",
  6175. "临沭县"] },
  6176. {
  6177. "name": "德州市",
  6178. "area": [
  6179. "德城区",
  6180. "乐陵市",
  6181. "禹城市",
  6182. "陵县",
  6183. "宁津县",
  6184. "齐河县",
  6185. "武城县",
  6186. "庆云县",
  6187. "平原县",
  6188. "夏津县",
  6189. "临邑县"] },
  6190. {
  6191. "name": "聊城市",
  6192. "area": [
  6193. "东昌府区",
  6194. "临清市",
  6195. "高唐县",
  6196. "阳谷县",
  6197. "茌平县",
  6198. "莘县",
  6199. "东阿县",
  6200. "冠县"] },
  6201. {
  6202. "name": "滨州市",
  6203. "area": [
  6204. "滨城区",
  6205. "邹平县",
  6206. "沾化县",
  6207. "惠民县",
  6208. "博兴县",
  6209. "阳信县",
  6210. "无棣县"] },
  6211. {
  6212. "name": "菏泽市",
  6213. "area": [
  6214. "牡丹区",
  6215. "鄄城县",
  6216. "单县",
  6217. "郓城县",
  6218. "曹县",
  6219. "定陶县",
  6220. "巨野县",
  6221. "东明县",
  6222. "成武县"] }] },
  6223. {
  6224. "name": "河南省",
  6225. "city": [
  6226. {
  6227. "name": "郑州市",
  6228. "area": [
  6229. "中原区",
  6230. "金水区",
  6231. "二七区",
  6232. "管城回族区",
  6233. "上街区",
  6234. "惠济区",
  6235. "巩义市",
  6236. "新郑市",
  6237. "新密市",
  6238. "登封市",
  6239. "荥阳市",
  6240. "中牟县"] },
  6241. {
  6242. "name": "开封市",
  6243. "area": [
  6244. "鼓楼区",
  6245. "龙亭区",
  6246. "顺河回族区",
  6247. "禹王台区",
  6248. "金明区",
  6249. "开封县",
  6250. "尉氏县",
  6251. "兰考县",
  6252. "杞县",
  6253. "通许县"] },
  6254. {
  6255. "name": "洛阳市",
  6256. "area": [
  6257. "西工区",
  6258. "老城区",
  6259. "涧西区",
  6260. "瀍河回族区",
  6261. "洛龙区",
  6262. "吉利区",
  6263. "偃师市",
  6264. "孟津县",
  6265. "汝阳县",
  6266. "伊川县",
  6267. "洛宁县",
  6268. "嵩县",
  6269. "宜阳县",
  6270. "新安县",
  6271. "栾川县"] },
  6272. {
  6273. "name": "平顶山市",
  6274. "area": [
  6275. "新华区",
  6276. "卫东区",
  6277. "湛河区",
  6278. "石龙区",
  6279. "汝州市",
  6280. "舞钢市",
  6281. "宝丰县",
  6282. "叶县",
  6283. "郏县",
  6284. "鲁山县"] },
  6285. {
  6286. "name": "安阳市",
  6287. "area": [
  6288. "北关区",
  6289. "文峰区",
  6290. "殷都区",
  6291. "龙安区",
  6292. "林州市",
  6293. "安阳县",
  6294. "滑县",
  6295. "内黄县",
  6296. "汤阴县"] },
  6297. {
  6298. "name": "鹤壁市",
  6299. "area": [
  6300. "淇滨区",
  6301. "山城区",
  6302. "鹤山区",
  6303. "浚县",
  6304. "淇县"] },
  6305. {
  6306. "name": "新乡市",
  6307. "area": [
  6308. "卫滨区",
  6309. "红旗区",
  6310. "凤泉区",
  6311. "牧野区",
  6312. "卫辉市",
  6313. "辉县市",
  6314. "新乡县",
  6315. "获嘉县",
  6316. "原阳县",
  6317. "长垣县",
  6318. "封丘县",
  6319. "延津县"] },
  6320. {
  6321. "name": "焦作市",
  6322. "area": [
  6323. "解放区",
  6324. "中站区",
  6325. "马村区",
  6326. "山阳区",
  6327. "沁阳市",
  6328. "孟州市",
  6329. "修武县",
  6330. "温县",
  6331. "武陟县",
  6332. "博爱县"] },
  6333. {
  6334. "name": "濮阳市",
  6335. "area": [
  6336. "华龙区",
  6337. "濮阳县",
  6338. "南乐县",
  6339. "台前县",
  6340. "清丰县",
  6341. "范县"] },
  6342. {
  6343. "name": "许昌市",
  6344. "area": [
  6345. "魏都区",
  6346. "禹州市",
  6347. "长葛市",
  6348. "许昌县",
  6349. "鄢陵县",
  6350. "襄城县"] },
  6351. {
  6352. "name": "漯河市",
  6353. "area": [
  6354. "源汇区",
  6355. "郾城区",
  6356. "召陵区",
  6357. "临颍县",
  6358. "舞阳县"] },
  6359. {
  6360. "name": "三门峡市",
  6361. "area": [
  6362. "湖滨区",
  6363. "义马市",
  6364. "灵宝市",
  6365. "渑池县",
  6366. "卢氏县",
  6367. "陕县"] },
  6368. {
  6369. "name": "南阳市",
  6370. "area": [
  6371. "卧龙区",
  6372. "宛城区",
  6373. "邓州市",
  6374. "桐柏县",
  6375. "方城县",
  6376. "淅川县",
  6377. "镇平县",
  6378. "唐河县",
  6379. "南召县",
  6380. "内乡县",
  6381. "新野县",
  6382. "社旗县",
  6383. "西峡县"] },
  6384. {
  6385. "name": "商丘市",
  6386. "area": [
  6387. "梁园区",
  6388. "睢阳区",
  6389. "永城市",
  6390. "宁陵县",
  6391. "虞城县",
  6392. "民权县",
  6393. "夏邑县",
  6394. "柘城县",
  6395. "睢县"] },
  6396. {
  6397. "name": "信阳市",
  6398. "area": [
  6399. "浉河区",
  6400. "平桥区",
  6401. "潢川县",
  6402. "淮滨县",
  6403. "息县",
  6404. "新县",
  6405. "商城县",
  6406. "固始县",
  6407. "罗山县",
  6408. "光山县"] },
  6409. {
  6410. "name": "周口市",
  6411. "area": [
  6412. "川汇区",
  6413. "项城市",
  6414. "商水县",
  6415. "淮阳县",
  6416. "太康县",
  6417. "鹿邑县",
  6418. "西华县",
  6419. "扶沟县",
  6420. "沈丘县",
  6421. "郸城县"] },
  6422. {
  6423. "name": "驻马店市",
  6424. "area": [
  6425. "驿城区",
  6426. "确山县",
  6427. "新蔡县",
  6428. "上蔡县",
  6429. "西平县",
  6430. "泌阳县",
  6431. "平舆县",
  6432. "汝南县",
  6433. "遂平县",
  6434. "正阳县"] },
  6435. {
  6436. "name": "焦作市",
  6437. "area": [
  6438. "济源市"] }] },
  6439. {
  6440. "name": "湖北省",
  6441. "city": [
  6442. {
  6443. "name": "武汉市",
  6444. "area": [
  6445. "江岸区",
  6446. "武昌区",
  6447. "江汉区",
  6448. "硚口区",
  6449. "汉阳区",
  6450. "青山区",
  6451. "洪山区",
  6452. "东西湖区",
  6453. "汉南区",
  6454. "蔡甸区",
  6455. "江夏区",
  6456. "黄陂区",
  6457. "新洲区"] },
  6458. {
  6459. "name": "黄石市",
  6460. "area": [
  6461. "黄石港区",
  6462. "西塞山区",
  6463. "下陆区",
  6464. "铁山区",
  6465. "大冶市",
  6466. "阳新县"] },
  6467. {
  6468. "name": "十堰市",
  6469. "area": [
  6470. "张湾区",
  6471. "茅箭区",
  6472. "丹江口市",
  6473. "郧县",
  6474. "竹山县",
  6475. "房县",
  6476. "郧西县",
  6477. "竹溪县"] },
  6478. {
  6479. "name": "荆州市",
  6480. "area": [
  6481. "沙市区",
  6482. "荆州区",
  6483. "洪湖市",
  6484. "石首市",
  6485. "松滋市",
  6486. "监利县",
  6487. "公安县",
  6488. "江陵县"] },
  6489. {
  6490. "name": "宜昌市",
  6491. "area": [
  6492. "西陵区",
  6493. "伍家岗区",
  6494. "点军区",
  6495. "猇亭区",
  6496. "夷陵区",
  6497. "宜都市",
  6498. "当阳市",
  6499. "枝江市",
  6500. "秭归县",
  6501. "远安县",
  6502. "兴山县",
  6503. "五峰土家族自治县",
  6504. "长阳土家族自治县"] },
  6505. {
  6506. "name": "襄樊市",
  6507. "area": [
  6508. "襄城区",
  6509. "樊城区",
  6510. "襄阳区",
  6511. "老河口市",
  6512. "枣阳市",
  6513. "宜城市",
  6514. "南漳县",
  6515. "谷城县",
  6516. "保康县"] },
  6517. {
  6518. "name": "鄂州市",
  6519. "area": [
  6520. "鄂城区",
  6521. "华容区",
  6522. "梁子湖区"] },
  6523. {
  6524. "name": "荆门市",
  6525. "area": [
  6526. "东宝区",
  6527. "掇刀区",
  6528. "钟祥市",
  6529. "京山县",
  6530. "沙洋县"] },
  6531. {
  6532. "name": "孝感市",
  6533. "area": [
  6534. "孝南区",
  6535. "应城市",
  6536. "安陆市",
  6537. "汉川市",
  6538. "云梦县",
  6539. "大悟县",
  6540. "孝昌县"] },
  6541. {
  6542. "name": "黄冈市",
  6543. "area": [
  6544. "黄州区",
  6545. "麻城市",
  6546. "武穴市",
  6547. "红安县",
  6548. "罗田县",
  6549. "浠水县",
  6550. "蕲春县",
  6551. "黄梅县",
  6552. "英山县",
  6553. "团风县"] },
  6554. {
  6555. "name": "咸宁市",
  6556. "area": [
  6557. "咸安区",
  6558. "赤壁市",
  6559. "嘉鱼县",
  6560. "通山县",
  6561. "崇阳县",
  6562. "通城县"] },
  6563. {
  6564. "name": "随州市",
  6565. "area": [
  6566. "曾都区",
  6567. "广水市"] },
  6568. {
  6569. "name": "恩施土家族苗族自治州",
  6570. "area": [
  6571. "恩施市",
  6572. "利川市",
  6573. "建始县",
  6574. "来凤县",
  6575. "巴东县",
  6576. "鹤峰县",
  6577. "宣恩县",
  6578. "咸丰县"] },
  6579. {
  6580. "name": "仙桃市",
  6581. "area": [
  6582. "仙桃"] },
  6583. {
  6584. "name": "天门市",
  6585. "area": [
  6586. "天门"] },
  6587. {
  6588. "name": "潜江市",
  6589. "area": [
  6590. "潜江"] },
  6591. {
  6592. "name": "神农架林区",
  6593. "area": [
  6594. "神农架林区"] }] },
  6595. {
  6596. "name": "湖南省",
  6597. "city": [
  6598. {
  6599. "name": "长沙市",
  6600. "area": [
  6601. "岳麓区",
  6602. "芙蓉区",
  6603. "天心区",
  6604. "开福区",
  6605. "雨花区",
  6606. "浏阳市",
  6607. "长沙县",
  6608. "望城县",
  6609. "宁乡县"] },
  6610. {
  6611. "name": "株洲市",
  6612. "area": [
  6613. "天元区",
  6614. "荷塘区",
  6615. "芦淞区",
  6616. "石峰区",
  6617. "醴陵市",
  6618. "株洲县",
  6619. "炎陵县",
  6620. "茶陵县",
  6621. "攸县"] },
  6622. {
  6623. "name": "湘潭市",
  6624. "area": [
  6625. "岳塘区",
  6626. "雨湖区",
  6627. "湘乡市",
  6628. "韶山市",
  6629. "湘潭县"] },
  6630. {
  6631. "name": "衡阳市",
  6632. "area": [
  6633. "雁峰区",
  6634. "珠晖区",
  6635. "石鼓区",
  6636. "蒸湘区",
  6637. "南岳区",
  6638. "耒阳市",
  6639. "常宁市",
  6640. "衡阳县",
  6641. "衡东县",
  6642. "衡山县",
  6643. "衡南县",
  6644. "祁东县"] },
  6645. {
  6646. "name": "邵阳市",
  6647. "area": [
  6648. "双清区",
  6649. "大祥区",
  6650. "北塔区",
  6651. "武冈市",
  6652. "邵东县",
  6653. "洞口县",
  6654. "新邵县",
  6655. "绥宁县",
  6656. "新宁县",
  6657. "邵阳县",
  6658. "隆回县",
  6659. "城步苗族自治县"] },
  6660. {
  6661. "name": "岳阳市",
  6662. "area": [
  6663. "岳阳楼区",
  6664. "云溪区",
  6665. "君山区",
  6666. "临湘市",
  6667. "汨罗市",
  6668. "岳阳县",
  6669. "湘阴县",
  6670. "平江县",
  6671. "华容县"] },
  6672. {
  6673. "name": "常德市",
  6674. "area": [
  6675. "武陵区",
  6676. "鼎城区",
  6677. "津市市",
  6678. "澧县",
  6679. "临澧县",
  6680. "桃源县",
  6681. "汉寿县",
  6682. "安乡县",
  6683. "石门县"] },
  6684. {
  6685. "name": "张家界市",
  6686. "area": [
  6687. "永定区",
  6688. "武陵源区",
  6689. "慈利县",
  6690. "桑植县"] },
  6691. {
  6692. "name": "益阳市",
  6693. "area": [
  6694. "赫山区",
  6695. "资阳区",
  6696. "沅江市",
  6697. "桃江县",
  6698. "南县",
  6699. "安化县"] },
  6700. {
  6701. "name": "郴州市",
  6702. "area": [
  6703. "北湖区",
  6704. "苏仙区",
  6705. "资兴市",
  6706. "宜章县",
  6707. "汝城县",
  6708. "安仁县",
  6709. "嘉禾县",
  6710. "临武县",
  6711. "桂东县",
  6712. "永兴县",
  6713. "桂阳县"] },
  6714. {
  6715. "name": "永州市",
  6716. "area": [
  6717. "冷水滩区",
  6718. "零陵区",
  6719. "祁阳县",
  6720. "蓝山县",
  6721. "宁远县",
  6722. "新田县",
  6723. "东安县",
  6724. "江永县",
  6725. "道县",
  6726. "双牌县",
  6727. "江华瑶族自治县"] },
  6728. {
  6729. "name": "怀化市",
  6730. "area": [
  6731. "鹤城区",
  6732. "洪江市",
  6733. "会同县",
  6734. "沅陵县",
  6735. "辰溪县",
  6736. "溆浦县",
  6737. "中方县",
  6738. "新晃侗族自治县",
  6739. "芷江侗族自治县",
  6740. "通道侗族自治县",
  6741. "靖州苗族侗族自治县",
  6742. "麻阳苗族自治县"] },
  6743. {
  6744. "name": "娄底市",
  6745. "area": [
  6746. "娄星区",
  6747. "冷水江市",
  6748. "涟源市",
  6749. "新化县",
  6750. "双峰县"] },
  6751. {
  6752. "name": "湘西土家族苗族自治州",
  6753. "area": [
  6754. "吉首市",
  6755. "古丈县",
  6756. "龙山县",
  6757. "永顺县",
  6758. "凤凰县",
  6759. "泸溪县",
  6760. "保靖县",
  6761. "花垣县"] }] },
  6762. {
  6763. "name": "广东省",
  6764. "city": [
  6765. {
  6766. "name": "广州市",
  6767. "area": [
  6768. "越秀区",
  6769. "荔湾区",
  6770. "海珠区",
  6771. "天河区",
  6772. "白云区",
  6773. "黄埔区",
  6774. "番禺区",
  6775. "花都区",
  6776. "南沙区",
  6777. "萝岗区",
  6778. "增城市",
  6779. "从化市"] },
  6780. {
  6781. "name": "深圳市",
  6782. "area": [
  6783. "福田区",
  6784. "罗湖区",
  6785. "南山区",
  6786. "宝安区",
  6787. "龙岗区",
  6788. "盐田区"] },
  6789. {
  6790. "name": "东莞市",
  6791. "area": [
  6792. "莞城",
  6793. "常平",
  6794. "塘厦",
  6795. "塘厦",
  6796. "塘厦"] },
  6797. {
  6798. "name": "中山市",
  6799. "area": [
  6800. "中山"] },
  6801. {
  6802. "name": "潮州市",
  6803. "area": [
  6804. "湘桥区",
  6805. "潮安县",
  6806. "饶平县"] },
  6807. {
  6808. "name": "揭阳市",
  6809. "area": [
  6810. "榕城区",
  6811. "揭东县",
  6812. "揭西县",
  6813. "惠来县",
  6814. "普宁市"] },
  6815. {
  6816. "name": "云浮市",
  6817. "area": [
  6818. "云城区",
  6819. "新兴县",
  6820. "郁南县",
  6821. "云安县",
  6822. "罗定市"] },
  6823. {
  6824. "name": "珠海市",
  6825. "area": [
  6826. "香洲区",
  6827. "斗门区",
  6828. "金湾区"] },
  6829. {
  6830. "name": "汕头市",
  6831. "area": [
  6832. "金平区",
  6833. "濠江区",
  6834. "龙湖区",
  6835. "潮阳区",
  6836. "潮南区",
  6837. "澄海区",
  6838. "南澳县"] },
  6839. {
  6840. "name": "韶关市",
  6841. "area": [
  6842. "浈江区",
  6843. "武江区",
  6844. "曲江区",
  6845. "乐昌市",
  6846. "南雄市",
  6847. "始兴县",
  6848. "仁化县",
  6849. "翁源县",
  6850. "新丰县",
  6851. "乳源瑶族自治县"] },
  6852. {
  6853. "name": "佛山市",
  6854. "area": [
  6855. "禅城区",
  6856. "南海区",
  6857. "顺德区",
  6858. "三水区",
  6859. "高明区"] },
  6860. {
  6861. "name": "江门市",
  6862. "area": [
  6863. "蓬江区",
  6864. "江海区",
  6865. "新会区",
  6866. "恩平市",
  6867. "台山市",
  6868. "开平市",
  6869. "鹤山市"] },
  6870. {
  6871. "name": "湛江市",
  6872. "area": [
  6873. "赤坎区",
  6874. "霞山区",
  6875. "坡头区",
  6876. "麻章区",
  6877. "吴川市",
  6878. "廉江市",
  6879. "雷州市",
  6880. "遂溪县",
  6881. "徐闻县"] },
  6882. {
  6883. "name": "茂名市",
  6884. "area": [
  6885. "茂南区",
  6886. "茂港区",
  6887. "化州市",
  6888. "信宜市",
  6889. "高州市",
  6890. "电白县"] },
  6891. {
  6892. "name": "肇庆市",
  6893. "area": [
  6894. "端州区",
  6895. "鼎湖区",
  6896. "高要市",
  6897. "四会市",
  6898. "广宁县",
  6899. "怀集县",
  6900. "封开县",
  6901. "德庆县"] },
  6902. {
  6903. "name": "惠州市",
  6904. "area": [
  6905. "惠城区",
  6906. "惠阳区",
  6907. "博罗县",
  6908. "惠东县",
  6909. "龙门县"] },
  6910. {
  6911. "name": "梅州市",
  6912. "area": [
  6913. "梅江区",
  6914. "兴宁市",
  6915. "梅县",
  6916. "大埔县",
  6917. "丰顺县",
  6918. "五华县",
  6919. "平远县",
  6920. "蕉岭县"] },
  6921. {
  6922. "name": "汕尾市",
  6923. "area": [
  6924. "城区",
  6925. "陆丰市",
  6926. "海丰县",
  6927. "陆河县"] },
  6928. {
  6929. "name": "河源市",
  6930. "area": [
  6931. "源城区",
  6932. "紫金县",
  6933. "龙川县",
  6934. "连平县",
  6935. "和平县",
  6936. "东源县"] },
  6937. {
  6938. "name": "阳江市",
  6939. "area": [
  6940. "江城区",
  6941. "阳春市",
  6942. "阳西县",
  6943. "阳东县"] },
  6944. {
  6945. "name": "清远市",
  6946. "area": [
  6947. "清城区",
  6948. "英德市",
  6949. "连州市",
  6950. "佛冈县",
  6951. "阳山县",
  6952. "清新县",
  6953. "连山壮族瑶族自治县",
  6954. "连南瑶族自治县"] }] },
  6955. {
  6956. "name": "广西",
  6957. "city": [
  6958. {
  6959. "name": "南宁市",
  6960. "area": [
  6961. "青秀区",
  6962. "兴宁区",
  6963. "西乡塘区",
  6964. "良庆区",
  6965. "江南区",
  6966. "邕宁区",
  6967. "武鸣县",
  6968. "隆安县",
  6969. "马山县",
  6970. "上林县",
  6971. "宾阳县",
  6972. "横县"] },
  6973. {
  6974. "name": "柳州市",
  6975. "area": [
  6976. "城中区",
  6977. "鱼峰区",
  6978. "柳北区",
  6979. "柳南区",
  6980. "柳江县",
  6981. "柳城县",
  6982. "鹿寨县",
  6983. "融安县",
  6984. "融水苗族自治县",
  6985. "三江侗族自治县"] },
  6986. {
  6987. "name": "桂林市",
  6988. "area": [
  6989. "象山区",
  6990. "秀峰区",
  6991. "叠彩区",
  6992. "七星区",
  6993. "雁山区",
  6994. "阳朔县",
  6995. "临桂县",
  6996. "灵川县",
  6997. "全州县",
  6998. "平乐县",
  6999. "兴安县",
  7000. "灌阳县",
  7001. "荔浦县",
  7002. "资源县",
  7003. "永福县",
  7004. "龙胜各族自治县",
  7005. "恭城瑶族自治县"] },
  7006. {
  7007. "name": "梧州市",
  7008. "area": [
  7009. "万秀区",
  7010. "蝶山区",
  7011. "长洲区",
  7012. "岑溪市",
  7013. "苍梧县",
  7014. "藤县",
  7015. "蒙山县"] },
  7016. {
  7017. "name": "北海市",
  7018. "area": [
  7019. "海城区",
  7020. "银海区",
  7021. "铁山港区",
  7022. "合浦县"] },
  7023. {
  7024. "name": "防城港市",
  7025. "area": [
  7026. "港口区",
  7027. "防城区",
  7028. "东兴市",
  7029. "上思县"] },
  7030. {
  7031. "name": "钦州市",
  7032. "area": [
  7033. "钦南区",
  7034. "钦北区",
  7035. "灵山县",
  7036. "浦北县"] },
  7037. {
  7038. "name": "贵港市",
  7039. "area": [
  7040. "港北区",
  7041. "港南区",
  7042. "覃塘区",
  7043. "桂平市",
  7044. "平南县"] },
  7045. {
  7046. "name": "玉林市",
  7047. "area": [
  7048. "玉州区",
  7049. "北流市",
  7050. "容县",
  7051. "陆川县",
  7052. "博白县",
  7053. "兴业县"] },
  7054. {
  7055. "name": "百色市",
  7056. "area": [
  7057. "右江区",
  7058. "凌云县",
  7059. "平果县",
  7060. "西林县",
  7061. "乐业县",
  7062. "德保县",
  7063. "田林县",
  7064. "田阳县",
  7065. "靖西县",
  7066. "田东县",
  7067. "那坡县",
  7068. "隆林各族自治县"] },
  7069. {
  7070. "name": "贺州市",
  7071. "area": [
  7072. "八步区",
  7073. "钟山县",
  7074. "昭平县",
  7075. "富川瑶族自治县"] },
  7076. {
  7077. "name": "河池市",
  7078. "area": [
  7079. "金城江区",
  7080. "宜州市",
  7081. "天峨县",
  7082. "凤山县",
  7083. "南丹县",
  7084. "东兰县",
  7085. "都安瑶族自治县",
  7086. "罗城仫佬族自治县",
  7087. "巴马瑶族自治县",
  7088. "环江毛南族自治县",
  7089. "大化瑶族自治县"] },
  7090. {
  7091. "name": "来宾市",
  7092. "area": [
  7093. "兴宾区",
  7094. "合山市",
  7095. "象州县",
  7096. "武宣县",
  7097. "忻城县",
  7098. "金秀瑶族自治县"] },
  7099. {
  7100. "name": "崇左市",
  7101. "area": [
  7102. "江州区",
  7103. "凭祥市",
  7104. "宁明县",
  7105. "扶绥县",
  7106. "龙州县",
  7107. "大新县",
  7108. "天等县"] }] },
  7109. {
  7110. "name": "海南省",
  7111. "city": [
  7112. {
  7113. "name": "海口市",
  7114. "area": [
  7115. "龙华区",
  7116. "秀英区",
  7117. "琼山区",
  7118. "美兰区"] },
  7119. {
  7120. "name": "三亚市",
  7121. "area": [
  7122. "三亚市"] },
  7123. {
  7124. "name": "五指山市",
  7125. "area": [
  7126. "五指山"] },
  7127. {
  7128. "name": "琼海市",
  7129. "area": [
  7130. "琼海"] },
  7131. {
  7132. "name": "儋州市",
  7133. "area": [
  7134. "儋州"] },
  7135. {
  7136. "name": "文昌市",
  7137. "area": [
  7138. "文昌"] },
  7139. {
  7140. "name": "万宁市",
  7141. "area": [
  7142. "万宁"] },
  7143. {
  7144. "name": "东方市",
  7145. "area": [
  7146. "东方"] },
  7147. {
  7148. "name": "澄迈县",
  7149. "area": [
  7150. "澄迈县"] },
  7151. {
  7152. "name": "定安县",
  7153. "area": [
  7154. "定安县"] },
  7155. {
  7156. "name": "屯昌县",
  7157. "area": [
  7158. "屯昌县"] },
  7159. {
  7160. "name": "临高县",
  7161. "area": [
  7162. "临高县"] },
  7163. {
  7164. "name": "白沙黎族自治县",
  7165. "area": [
  7166. "白沙黎族自治县"] },
  7167. {
  7168. "name": "昌江黎族自治县",
  7169. "area": [
  7170. "昌江黎族自治县"] },
  7171. {
  7172. "name": "乐东黎族自治县",
  7173. "area": [
  7174. "乐东黎族自治县"] },
  7175. {
  7176. "name": "陵水黎族自治县",
  7177. "area": [
  7178. "陵水黎族自治县"] },
  7179. {
  7180. "name": "保亭黎族苗族自治县",
  7181. "area": [
  7182. "保亭黎族苗族自治县"] },
  7183. {
  7184. "name": "琼中黎族苗族自治县",
  7185. "area": [
  7186. "琼中黎族苗族自治县"] }] },
  7187. {
  7188. "name": "重庆市",
  7189. "city": [
  7190. {
  7191. "name": "重庆市",
  7192. "area": [
  7193. "渝中区",
  7194. "大渡口区",
  7195. "江北区",
  7196. "南岸区",
  7197. "北碚区",
  7198. "渝北区",
  7199. "巴南区",
  7200. "长寿区",
  7201. "双桥区",
  7202. "沙坪坝区",
  7203. "万盛区",
  7204. "万州区",
  7205. "涪陵区",
  7206. "黔江区",
  7207. "永川区",
  7208. "合川区",
  7209. "江津区",
  7210. "九龙坡区",
  7211. "南川区",
  7212. "綦江县",
  7213. "潼南县",
  7214. "荣昌县",
  7215. "璧山县",
  7216. "大足县",
  7217. "铜梁县",
  7218. "梁平县",
  7219. "开县",
  7220. "忠县",
  7221. "城口县",
  7222. "垫江县",
  7223. "武隆县",
  7224. "丰都县",
  7225. "奉节县",
  7226. "云阳县",
  7227. "巫溪县",
  7228. "巫山县",
  7229. "石柱土家族自治县",
  7230. "秀山土家族苗族自治县",
  7231. "酉阳土家族苗族自治县",
  7232. "彭水苗族土家族自治县"] }] },
  7233. {
  7234. "name": "四川省",
  7235. "city": [
  7236. {
  7237. "name": "成都市",
  7238. "area": [
  7239. "青羊区",
  7240. "锦江区",
  7241. "金牛区",
  7242. "武侯区",
  7243. "成华区",
  7244. "龙泉驿区",
  7245. "青白江区",
  7246. "新都区",
  7247. "温江区",
  7248. "都江堰市",
  7249. "彭州市",
  7250. "邛崃市",
  7251. "崇州市",
  7252. "金堂县",
  7253. "郫县",
  7254. "新津县",
  7255. "双流县",
  7256. "蒲江县",
  7257. "大邑县"] },
  7258. {
  7259. "name": "自贡市",
  7260. "area": [
  7261. "大安区",
  7262. "自流井区",
  7263. "贡井区",
  7264. "沿滩区",
  7265. "荣县",
  7266. "富顺县"] },
  7267. {
  7268. "name": "攀枝花市",
  7269. "area": [
  7270. "仁和区",
  7271. "米易县",
  7272. "盐边县",
  7273. "东区",
  7274. "西区"] },
  7275. {
  7276. "name": "泸州市",
  7277. "area": [
  7278. "江阳区",
  7279. "纳溪区",
  7280. "龙马潭区",
  7281. "泸县",
  7282. "合江县",
  7283. "叙永县",
  7284. "古蔺县"] },
  7285. {
  7286. "name": "德阳市",
  7287. "area": [
  7288. "旌阳区",
  7289. "广汉市",
  7290. "什邡市",
  7291. "绵竹市",
  7292. "罗江县",
  7293. "中江县"] },
  7294. {
  7295. "name": "绵阳市",
  7296. "area": [
  7297. "涪城区",
  7298. "游仙区",
  7299. "江油市",
  7300. "盐亭县",
  7301. "三台县",
  7302. "平武县",
  7303. "安县",
  7304. "梓潼县",
  7305. "北川羌族自治县"] },
  7306. {
  7307. "name": "广元市",
  7308. "area": [
  7309. "元坝区",
  7310. "朝天区",
  7311. "青川县",
  7312. "旺苍县",
  7313. "剑阁县",
  7314. "苍溪县",
  7315. "市中区"] },
  7316. {
  7317. "name": "遂宁市",
  7318. "area": [
  7319. "船山区",
  7320. "安居区",
  7321. "射洪县",
  7322. "蓬溪县",
  7323. "大英县"] },
  7324. {
  7325. "name": "内江市",
  7326. "area": [
  7327. "市中区",
  7328. "东兴区",
  7329. "资中县",
  7330. "隆昌县",
  7331. "威远县"] },
  7332. {
  7333. "name": "乐山市",
  7334. "area": [
  7335. "市中区",
  7336. "五通桥区",
  7337. "沙湾区",
  7338. "金口河区",
  7339. "峨眉山市",
  7340. "夹江县",
  7341. "井研县",
  7342. "犍为县",
  7343. "沐川县",
  7344. "马边彝族自治县",
  7345. "峨边彝族自治县"] },
  7346. {
  7347. "name": "南充",
  7348. "area": [
  7349. "顺庆区",
  7350. "高坪区",
  7351. "嘉陵区",
  7352. "阆中市",
  7353. "营山县",
  7354. "蓬安县",
  7355. "仪陇县",
  7356. "南部县",
  7357. "西充县"] },
  7358. {
  7359. "name": "眉山市",
  7360. "area": [
  7361. "东坡区",
  7362. "仁寿县",
  7363. "彭山县",
  7364. "洪雅县",
  7365. "丹棱县",
  7366. "青神县"] },
  7367. {
  7368. "name": "宜宾市",
  7369. "area": [
  7370. "翠屏区",
  7371. "宜宾县",
  7372. "兴文县",
  7373. "南溪县",
  7374. "珙县",
  7375. "长宁县",
  7376. "高县",
  7377. "江安县",
  7378. "筠连县",
  7379. "屏山县"] },
  7380. {
  7381. "name": "广安市",
  7382. "area": [
  7383. "广安区",
  7384. "华蓥市",
  7385. "岳池县",
  7386. "邻水县",
  7387. "武胜县"] },
  7388. {
  7389. "name": "达州市",
  7390. "area": [
  7391. "通川区",
  7392. "万源市",
  7393. "达县",
  7394. "渠县",
  7395. "宣汉县",
  7396. "开江县",
  7397. "大竹县"] },
  7398. {
  7399. "name": "雅安市",
  7400. "area": [
  7401. "雨城区",
  7402. "芦山县",
  7403. "石棉县",
  7404. "名山县",
  7405. "天全县",
  7406. "荥经县",
  7407. "宝兴县",
  7408. "汉源县"] },
  7409. {
  7410. "name": "巴中市",
  7411. "area": [
  7412. "巴州区",
  7413. "南江县",
  7414. "平昌县",
  7415. "通江县"] },
  7416. {
  7417. "name": "资阳市",
  7418. "area": [
  7419. "雁江区",
  7420. "简阳市",
  7421. "安岳县",
  7422. "乐至县"] },
  7423. {
  7424. "name": "阿坝藏族羌族自治州",
  7425. "area": [
  7426. "马尔康县",
  7427. "九寨沟县",
  7428. "红原县",
  7429. "汶川县",
  7430. "阿坝县",
  7431. "理县",
  7432. "若尔盖县",
  7433. "小金县",
  7434. "黑水县",
  7435. "金川县",
  7436. "松潘县",
  7437. "壤塘县",
  7438. "茂县"] },
  7439. {
  7440. "name": "甘孜藏族自治州",
  7441. "area": [
  7442. "康定县",
  7443. "丹巴县",
  7444. "炉霍县",
  7445. "九龙县",
  7446. "甘孜县",
  7447. "雅江县",
  7448. "新龙县",
  7449. "道孚县",
  7450. "白玉县",
  7451. "理塘县",
  7452. "德格县",
  7453. "乡城县",
  7454. "石渠县",
  7455. "稻城县",
  7456. "色达县",
  7457. "巴塘县",
  7458. "泸定县",
  7459. "得荣县"] },
  7460. {
  7461. "name": "凉山彝族自治州",
  7462. "area": [
  7463. "西昌市",
  7464. "美姑县",
  7465. "昭觉县",
  7466. "金阳县",
  7467. "甘洛县",
  7468. "布拖县",
  7469. "雷波县",
  7470. "普格县",
  7471. "宁南县",
  7472. "喜德县",
  7473. "会东县",
  7474. "越西县",
  7475. "会理县",
  7476. "盐源县",
  7477. "德昌县",
  7478. "冕宁县",
  7479. "木里藏族自治县"] }] },
  7480. {
  7481. "name": "贵州省",
  7482. "city": [
  7483. {
  7484. "name": "贵阳市",
  7485. "area": [
  7486. "南明区",
  7487. "云岩区",
  7488. "花溪区",
  7489. "乌当区",
  7490. "白云区",
  7491. "小河区",
  7492. "清镇市",
  7493. "开阳县",
  7494. "修文县",
  7495. "息烽县"] },
  7496. {
  7497. "name": "六盘水市",
  7498. "area": [
  7499. "钟山区",
  7500. "水城县",
  7501. "盘县",
  7502. "六枝特区"] },
  7503. {
  7504. "name": "遵义市",
  7505. "area": [
  7506. "红花岗区",
  7507. "汇川区",
  7508. "赤水市",
  7509. "仁怀市",
  7510. "遵义县",
  7511. "绥阳县",
  7512. "桐梓县",
  7513. "习水县",
  7514. "凤冈县",
  7515. "正安县",
  7516. "余庆县",
  7517. "湄潭县",
  7518. "道真仡佬族苗族自治县",
  7519. "务川仡佬族苗族自治县"] },
  7520. {
  7521. "name": "安顺市",
  7522. "area": [
  7523. "西秀区",
  7524. "普定县",
  7525. "平坝县",
  7526. "镇宁布依族苗族自治县",
  7527. "紫云苗族布依族自治县",
  7528. "关岭布依族苗族自治县"] },
  7529. {
  7530. "name": "铜仁地区",
  7531. "area": [
  7532. "铜仁市",
  7533. "德江县",
  7534. "江口县",
  7535. "思南县",
  7536. "石阡县",
  7537. "玉屏侗族自治县",
  7538. "松桃苗族自治县",
  7539. "印江土家族苗族自治县",
  7540. "沿河土家族自治县",
  7541. "万山特区"] },
  7542. {
  7543. "name": "毕节地区",
  7544. "area": [
  7545. "毕节市",
  7546. "黔西县",
  7547. "大方县",
  7548. "织金县",
  7549. "金沙县",
  7550. "赫章县",
  7551. "纳雍县",
  7552. "威宁彝族回族苗族自治县"] },
  7553. {
  7554. "name": "黔西南布依族苗族自治州",
  7555. "area": [
  7556. "兴义市",
  7557. "望谟县",
  7558. "兴仁县",
  7559. "普安县",
  7560. "册亨县",
  7561. "晴隆县",
  7562. "贞丰县",
  7563. "安龙县"] },
  7564. {
  7565. "name": "黔东南苗族侗族自治州",
  7566. "area": [
  7567. "凯里市",
  7568. "施秉县",
  7569. "从江县",
  7570. "锦屏县",
  7571. "镇远县",
  7572. "麻江县",
  7573. "台江县",
  7574. "天柱县",
  7575. "黄平县",
  7576. "榕江县",
  7577. "剑河县",
  7578. "三穗县",
  7579. "雷山县",
  7580. "黎平县",
  7581. "岑巩县",
  7582. "丹寨县"] },
  7583. {
  7584. "name": "黔南布依族苗族自治州",
  7585. "area": [
  7586. "都匀市",
  7587. "福泉市",
  7588. "贵定县",
  7589. "惠水县",
  7590. "罗甸县",
  7591. "瓮安县",
  7592. "荔波县",
  7593. "龙里县",
  7594. "平塘县",
  7595. "长顺县",
  7596. "独山县",
  7597. "三都水族自治县"] }] },
  7598. {
  7599. "name": "云南省",
  7600. "city": [
  7601. {
  7602. "name": "昆明市",
  7603. "area": [
  7604. "盘龙区",
  7605. "五华区",
  7606. "官渡区",
  7607. "西山区",
  7608. "东川区",
  7609. "安宁市",
  7610. "呈贡县",
  7611. "晋宁县",
  7612. "富民县",
  7613. "宜良县",
  7614. "嵩明县",
  7615. "石林彝族自治县",
  7616. "禄劝彝族苗族自治县",
  7617. "寻甸回族彝族自治县"] },
  7618. {
  7619. "name": "曲靖市",
  7620. "area": [
  7621. "麒麟区",
  7622. "宣威市",
  7623. "马龙县",
  7624. "沾益县",
  7625. "富源县",
  7626. "罗平县",
  7627. "师宗县",
  7628. "陆良县",
  7629. "会泽县"] },
  7630. {
  7631. "name": "玉溪市",
  7632. "area": [
  7633. "红塔区",
  7634. "江川县",
  7635. "澄江县",
  7636. "通海县",
  7637. "华宁县",
  7638. "易门县",
  7639. "峨山彝族自治县",
  7640. "新平彝族傣族自治县",
  7641. "元江哈尼族彝族傣族自治县"] },
  7642. {
  7643. "name": "保山市",
  7644. "area": [
  7645. "隆阳区",
  7646. "施甸县",
  7647. "腾冲县",
  7648. "龙陵县",
  7649. "昌宁县"] },
  7650. {
  7651. "name": "昭通市",
  7652. "area": [
  7653. "昭阳区",
  7654. "鲁甸县",
  7655. "巧家县",
  7656. "盐津县",
  7657. "大关县",
  7658. "永善县",
  7659. "绥江县",
  7660. "镇雄县",
  7661. "彝良县",
  7662. "威信县",
  7663. "水富县"] },
  7664. {
  7665. "name": "丽江市",
  7666. "area": [
  7667. "古城区",
  7668. "永胜县",
  7669. "华坪县",
  7670. "玉龙纳西族自治县",
  7671. "宁蒗彝族自治县"] },
  7672. {
  7673. "name": "普洱市",
  7674. "area": [
  7675. "思茅区",
  7676. "普洱哈尼族彝族自治县",
  7677. "墨江哈尼族自治县",
  7678. "景东彝族自治县",
  7679. "景谷傣族彝族自治县",
  7680. "镇沅彝族哈尼族拉祜族自治县",
  7681. "江城哈尼族彝族自治县",
  7682. "孟连傣族拉祜族佤族自治县",
  7683. "澜沧拉祜族自治县",
  7684. "西盟佤族自治县"] },
  7685. {
  7686. "name": "临沧市",
  7687. "area": [
  7688. "临翔区",
  7689. "凤庆县",
  7690. "云县",
  7691. "永德县",
  7692. "镇康县",
  7693. "双江拉祜族佤族布朗族傣族自治县",
  7694. "耿马傣族佤族自治县",
  7695. "沧源佤族自治县"] },
  7696. {
  7697. "name": "德宏傣族景颇族自治州",
  7698. "area": [
  7699. "潞西市",
  7700. "瑞丽市",
  7701. "梁河县",
  7702. "盈江县",
  7703. "陇川县"] },
  7704. {
  7705. "name": "怒江傈僳族自治州",
  7706. "area": [
  7707. "泸水县",
  7708. "福贡县",
  7709. "贡山独龙族怒族自治县",
  7710. "兰坪白族普米族自治县"] },
  7711. {
  7712. "name": "迪庆藏族自治州",
  7713. "area": [
  7714. "香格里拉县",
  7715. "德钦县",
  7716. "维西傈僳族自治县"] },
  7717. {
  7718. "name": "大理白族自治州",
  7719. "area": [
  7720. "大理市",
  7721. "祥云县",
  7722. "宾川县",
  7723. "弥渡县",
  7724. "永平县",
  7725. "云龙县",
  7726. "洱源县",
  7727. "剑川县",
  7728. "鹤庆县",
  7729. "漾濞彝族自治县",
  7730. "南涧彝族自治县",
  7731. "巍山彝族回族自治县"] },
  7732. {
  7733. "name": "楚雄彝族自治州",
  7734. "area": [
  7735. "楚雄市",
  7736. "双柏县",
  7737. "牟定县",
  7738. "南华县",
  7739. "姚安县",
  7740. "大姚县",
  7741. "永仁县",
  7742. "元谋县",
  7743. "武定县",
  7744. "禄丰县"] },
  7745. {
  7746. "name": "红河哈尼族彝族自治州",
  7747. "area": [
  7748. "蒙自县",
  7749. "个旧市",
  7750. "开远市",
  7751. "绿春县",
  7752. "建水县",
  7753. "石屏县",
  7754. "弥勒县",
  7755. "泸西县",
  7756. "元阳县",
  7757. "红河县",
  7758. "金平苗族瑶族傣族自治县",
  7759. "河口瑶族自治县",
  7760. "屏边苗族自治县"] },
  7761. {
  7762. "name": "文山壮族苗族自治州",
  7763. "area": [
  7764. "文山县",
  7765. "砚山县",
  7766. "西畴县",
  7767. "麻栗坡县",
  7768. "马关县",
  7769. "丘北县",
  7770. "广南县",
  7771. "富宁县"] },
  7772. {
  7773. "name": "西双版纳傣族自治州",
  7774. "area": [
  7775. "景洪市",
  7776. "勐海县",
  7777. "勐腊县"] }] },
  7778. {
  7779. "name": "西藏",
  7780. "city": [
  7781. {
  7782. "name": "拉萨市",
  7783. "area": [
  7784. "城关区",
  7785. "林周县",
  7786. "当雄县",
  7787. "尼木县",
  7788. "曲水县",
  7789. "堆龙德庆县",
  7790. "达孜县",
  7791. "墨竹工卡县"] },
  7792. {
  7793. "name": "那曲地区",
  7794. "area": [
  7795. "那曲县",
  7796. "嘉黎县",
  7797. "比如县",
  7798. "聂荣县",
  7799. "安多县",
  7800. "申扎县",
  7801. "索县",
  7802. "班戈县",
  7803. "巴青县",
  7804. "尼玛县"] },
  7805. {
  7806. "name": "昌都地区",
  7807. "area": [
  7808. "昌都县",
  7809. "江达县",
  7810. "贡觉县",
  7811. "类乌齐县",
  7812. "丁青县",
  7813. "察雅县",
  7814. "八宿县",
  7815. "左贡县",
  7816. "芒康县",
  7817. "洛隆县",
  7818. "边坝县"] },
  7819. {
  7820. "name": "林芝地区",
  7821. "area": [
  7822. "林芝县",
  7823. "工布江达县",
  7824. "米林县",
  7825. "墨脱县",
  7826. "波密县",
  7827. "察隅县",
  7828. "朗县"] },
  7829. {
  7830. "name": "山南地区",
  7831. "area": [
  7832. "乃东县",
  7833. "扎囊县",
  7834. "贡嘎县",
  7835. "桑日县",
  7836. "琼结县",
  7837. "曲松县",
  7838. "措美县",
  7839. "洛扎县",
  7840. "加查县",
  7841. "隆子县",
  7842. "错那县",
  7843. "浪卡子县"] },
  7844. {
  7845. "name": "日喀则地区",
  7846. "area": [
  7847. "日喀则市",
  7848. "南木林县",
  7849. "江孜县",
  7850. "定日县",
  7851. "萨迦县",
  7852. "拉孜县",
  7853. "昂仁县",
  7854. "谢通门县",
  7855. "白朗县",
  7856. "仁布县",
  7857. "康马县",
  7858. "定结县",
  7859. "仲巴县",
  7860. "亚东县",
  7861. "吉隆县",
  7862. "聂拉木县",
  7863. "萨嘎县",
  7864. "岗巴县"] },
  7865. {
  7866. "name": "阿里地区",
  7867. "area": [
  7868. "噶尔县",
  7869. "普兰县",
  7870. "札达县",
  7871. "日土县",
  7872. "革吉县",
  7873. "改则县",
  7874. "措勤县"] }] },
  7875. {
  7876. "name": "陕西省",
  7877. "city": [
  7878. {
  7879. "name": "西安市",
  7880. "area": [
  7881. "莲湖区",
  7882. "新城区",
  7883. "碑林区",
  7884. "雁塔区",
  7885. "灞桥区",
  7886. "未央区",
  7887. "阎良区",
  7888. "临潼区",
  7889. "长安区",
  7890. "高陵县",
  7891. "蓝田县",
  7892. "户县",
  7893. "周至县"] },
  7894. {
  7895. "name": "铜川市",
  7896. "area": [
  7897. "耀州区",
  7898. "王益区",
  7899. "印台区",
  7900. "宜君县"] },
  7901. {
  7902. "name": "宝鸡市",
  7903. "area": [
  7904. "渭滨区",
  7905. "金台区",
  7906. "陈仓区",
  7907. "岐山县",
  7908. "凤翔县",
  7909. "陇县",
  7910. "太白县",
  7911. "麟游县",
  7912. "扶风县",
  7913. "千阳县",
  7914. "眉县",
  7915. "凤县"] },
  7916. {
  7917. "name": "咸阳市",
  7918. "area": [
  7919. "秦都区",
  7920. "渭城区",
  7921. "杨陵区",
  7922. "兴平市",
  7923. "礼泉县",
  7924. "泾阳县",
  7925. "永寿县",
  7926. "三原县",
  7927. "彬县",
  7928. "旬邑县",
  7929. "长武县",
  7930. "乾县",
  7931. "武功县",
  7932. "淳化县"] },
  7933. {
  7934. "name": "渭南市",
  7935. "area": [
  7936. "临渭区",
  7937. "韩城市",
  7938. "华阴市",
  7939. "蒲城县",
  7940. "潼关县",
  7941. "白水县",
  7942. "澄城县",
  7943. "华县",
  7944. "合阳县",
  7945. "富平县",
  7946. "大荔县"] },
  7947. {
  7948. "name": "延安市",
  7949. "area": [
  7950. "宝塔区",
  7951. "安塞县",
  7952. "洛川县",
  7953. "子长县",
  7954. "黄陵县",
  7955. "延川县",
  7956. "富县",
  7957. "延长县",
  7958. "甘泉县",
  7959. "宜川县",
  7960. "志丹县",
  7961. "黄龙县",
  7962. "吴起县"] },
  7963. {
  7964. "name": "汉中市",
  7965. "area": [
  7966. "汉台区",
  7967. "留坝县",
  7968. "镇巴县",
  7969. "城固县",
  7970. "南郑县",
  7971. "洋县",
  7972. "宁强县",
  7973. "佛坪县",
  7974. "勉县",
  7975. "西乡县",
  7976. "略阳县"] },
  7977. {
  7978. "name": "榆林市",
  7979. "area": [
  7980. "榆阳区",
  7981. "清涧县",
  7982. "绥德县",
  7983. "神木县",
  7984. "佳县",
  7985. "府谷县",
  7986. "子洲县",
  7987. "靖边县",
  7988. "横山县",
  7989. "米脂县",
  7990. "吴堡县",
  7991. "定边县"] },
  7992. {
  7993. "name": "安康市",
  7994. "area": [
  7995. "汉滨区",
  7996. "紫阳县",
  7997. "岚皋县",
  7998. "旬阳县",
  7999. "镇坪县",
  8000. "平利县",
  8001. "石泉县",
  8002. "宁陕县",
  8003. "白河县",
  8004. "汉阴县"] },
  8005. {
  8006. "name": "商洛市",
  8007. "area": [
  8008. "商州区",
  8009. "镇安县",
  8010. "山阳县",
  8011. "洛南县",
  8012. "商南县",
  8013. "丹凤县",
  8014. "柞水县"] }] },
  8015. {
  8016. "name": "甘肃省",
  8017. "city": [
  8018. {
  8019. "name": "兰州市",
  8020. "area": [
  8021. "城关区",
  8022. "七里河区",
  8023. "西固区",
  8024. "安宁区",
  8025. "红古区",
  8026. "永登县",
  8027. "皋兰县",
  8028. "榆中县"] },
  8029. {
  8030. "name": "嘉峪关市",
  8031. "area": [
  8032. "嘉峪关市"] },
  8033. {
  8034. "name": "金昌市",
  8035. "area": [
  8036. "金川区",
  8037. "永昌县"] },
  8038. {
  8039. "name": "白银市",
  8040. "area": [
  8041. "白银区",
  8042. "平川区",
  8043. "靖远县",
  8044. "会宁县",
  8045. "景泰县"] },
  8046. {
  8047. "name": "天水市",
  8048. "area": [
  8049. "清水县",
  8050. "秦安县",
  8051. "甘谷县",
  8052. "武山县",
  8053. "张家川回族自治县",
  8054. "北道区",
  8055. "秦城区"] },
  8056. {
  8057. "name": "武威市",
  8058. "area": [
  8059. "凉州区",
  8060. "民勤县",
  8061. "古浪县",
  8062. "天祝藏族自治县"] },
  8063. {
  8064. "name": "酒泉市",
  8065. "area": [
  8066. "肃州区",
  8067. "玉门市",
  8068. "敦煌市",
  8069. "金塔县",
  8070. "肃北蒙古族自治县",
  8071. "阿克塞哈萨克族自治县",
  8072. "安西县"] },
  8073. {
  8074. "name": "张掖市",
  8075. "area": [
  8076. "甘州区",
  8077. "民乐县",
  8078. "临泽县",
  8079. "高台县",
  8080. "山丹县",
  8081. "肃南裕固族自治县"] },
  8082. {
  8083. "name": "庆阳市",
  8084. "area": [
  8085. "西峰区",
  8086. "庆城县",
  8087. "环县",
  8088. "华池县",
  8089. "合水县",
  8090. "正宁县",
  8091. "宁县",
  8092. "镇原县"] },
  8093. {
  8094. "name": "平凉市",
  8095. "area": [
  8096. "崆峒区",
  8097. "泾川县",
  8098. "灵台县",
  8099. "崇信县",
  8100. "华亭县",
  8101. "庄浪县",
  8102. "静宁县"] },
  8103. {
  8104. "name": "定西市",
  8105. "area": [
  8106. "安定区",
  8107. "通渭县",
  8108. "临洮县",
  8109. "漳县",
  8110. "岷县",
  8111. "渭源县",
  8112. "陇西县"] },
  8113. {
  8114. "name": "陇南市",
  8115. "area": [
  8116. "武都区",
  8117. "成县",
  8118. "宕昌县",
  8119. "康县",
  8120. "文县",
  8121. "西和县",
  8122. "礼县",
  8123. "两当县",
  8124. "徽县"] },
  8125. {
  8126. "name": "临夏回族自治州",
  8127. "area": [
  8128. "临夏市",
  8129. "临夏县",
  8130. "康乐县",
  8131. "永靖县",
  8132. "广河县",
  8133. "和政县",
  8134. "东乡族自治县",
  8135. "积石山保安族东乡族撒拉族自治县"] },
  8136. {
  8137. "name": "甘南藏族自治州",
  8138. "area": [
  8139. "合作市",
  8140. "临潭县",
  8141. "卓尼县",
  8142. "舟曲县",
  8143. "迭部县",
  8144. "玛曲县",
  8145. "碌曲县",
  8146. "夏河县"] }] },
  8147. {
  8148. "name": "青海省",
  8149. "city": [
  8150. {
  8151. "name": "西宁市",
  8152. "area": [
  8153. "城中区",
  8154. "城东区",
  8155. "城西区",
  8156. "城北区",
  8157. "湟源县",
  8158. "湟中县",
  8159. "大通回族土族自治县"] },
  8160. {
  8161. "name": "海东地区",
  8162. "area": [
  8163. "平安县",
  8164. "乐都县",
  8165. "民和回族土族自治县",
  8166. "互助土族自治县",
  8167. "化隆回族自治县",
  8168. "循化撒拉族自治县"] },
  8169. {
  8170. "name": "海北藏族自治州",
  8171. "area": [
  8172. "海晏县",
  8173. "祁连县",
  8174. "刚察县",
  8175. "门源回族自治县"] },
  8176. {
  8177. "name": "海南藏族自治州",
  8178. "area": [
  8179. "共和县",
  8180. "同德县",
  8181. "贵德县",
  8182. "兴海县",
  8183. "贵南县"] },
  8184. {
  8185. "name": "黄南藏族自治州",
  8186. "area": [
  8187. "同仁县",
  8188. "尖扎县",
  8189. "泽库县",
  8190. "河南蒙古族自治县"] },
  8191. {
  8192. "name": "果洛藏族自治州",
  8193. "area": [
  8194. "玛沁县",
  8195. "班玛县",
  8196. "甘德县",
  8197. "达日县",
  8198. "久治县",
  8199. "玛多县"] },
  8200. {
  8201. "name": "玉树藏族自治州",
  8202. "area": [
  8203. "玉树县",
  8204. "杂多县",
  8205. "称多县",
  8206. "治多县",
  8207. "囊谦县",
  8208. "曲麻莱县"] },
  8209. {
  8210. "name": "海西蒙古族藏族自治州",
  8211. "area": [
  8212. "德令哈市",
  8213. "格尔木市",
  8214. "乌兰县",
  8215. "都兰县",
  8216. "天峻县"] }] },
  8217. {
  8218. "name": "宁夏",
  8219. "city": [
  8220. {
  8221. "name": "银川市",
  8222. "area": [
  8223. "兴庆区",
  8224. "西夏区",
  8225. "金凤区",
  8226. "灵武市",
  8227. "永宁县",
  8228. "贺兰县"] },
  8229. {
  8230. "name": "石嘴山市",
  8231. "area": [
  8232. "大武口区",
  8233. "惠农区",
  8234. "平罗县"] },
  8235. {
  8236. "name": "吴忠市",
  8237. "area": [
  8238. "利通区",
  8239. "青铜峡市",
  8240. "盐池县",
  8241. "同心县"] },
  8242. {
  8243. "name": "固原市",
  8244. "area": [
  8245. "原州区",
  8246. "西吉县",
  8247. "隆德县",
  8248. "泾源县",
  8249. "彭阳县"] },
  8250. {
  8251. "name": "中卫市",
  8252. "area": [
  8253. "沙坡头区",
  8254. "中宁县",
  8255. "海原县"] }] },
  8256. {
  8257. "name": "新疆",
  8258. "city": [
  8259. {
  8260. "name": "乌鲁木齐市",
  8261. "area": [
  8262. "天山区",
  8263. "沙依巴克区",
  8264. "新市区",
  8265. "水磨沟区",
  8266. "头屯河区",
  8267. "达坂城区",
  8268. "东山区",
  8269. "乌鲁木齐县"] },
  8270. {
  8271. "name": "克拉玛依市",
  8272. "area": [
  8273. "克拉玛依区",
  8274. "独山子区",
  8275. "白碱滩区",
  8276. "乌尔禾区"] },
  8277. {
  8278. "name": "吐鲁番地区",
  8279. "area": [
  8280. "吐鲁番市",
  8281. "托克逊县",
  8282. "鄯善县"] },
  8283. {
  8284. "name": "哈密地区",
  8285. "area": [
  8286. "哈密市",
  8287. "伊吾县",
  8288. "巴里坤哈萨克自治县"] },
  8289. {
  8290. "name": "和田地区",
  8291. "area": [
  8292. "和田市",
  8293. "和田县",
  8294. "洛浦县",
  8295. "民丰县",
  8296. "皮山县",
  8297. "策勒县",
  8298. "于田县",
  8299. "墨玉县"] },
  8300. {
  8301. "name": "阿克苏地区",
  8302. "area": [
  8303. "阿克苏市",
  8304. "温宿县",
  8305. "沙雅县",
  8306. "拜城县",
  8307. "阿瓦提县",
  8308. "库车县",
  8309. "柯坪县",
  8310. "新和县",
  8311. "乌什县"] },
  8312. {
  8313. "name": "喀什地区",
  8314. "area": [
  8315. "喀什市",
  8316. "巴楚县",
  8317. "泽普县",
  8318. "伽师县",
  8319. "叶城县",
  8320. "岳普湖县",
  8321. "疏勒县",
  8322. "麦盖提县",
  8323. "英吉沙县",
  8324. "莎车县",
  8325. "疏附县",
  8326. "塔什库尔干塔吉克自治县"] },
  8327. {
  8328. "name": "克孜勒苏柯尔克孜自治州",
  8329. "area": [
  8330. "阿图什市",
  8331. "阿合奇县",
  8332. "乌恰县",
  8333. "阿克陶县"] },
  8334. {
  8335. "name": "巴音郭楞蒙古自治州",
  8336. "area": [
  8337. "库尔勒市",
  8338. "和静县",
  8339. "尉犁县",
  8340. "和硕县",
  8341. "且末县",
  8342. "博湖县",
  8343. "轮台县",
  8344. "若羌县",
  8345. "焉耆回族自治县"] },
  8346. {
  8347. "name": "昌吉回族自治州",
  8348. "area": [
  8349. "昌吉市",
  8350. "阜康市",
  8351. "奇台县",
  8352. "玛纳斯县",
  8353. "吉木萨尔县",
  8354. "呼图壁县",
  8355. "木垒哈萨克自治县",
  8356. "米泉市"] },
  8357. {
  8358. "name": "博尔塔拉蒙古自治州",
  8359. "area": [
  8360. "博乐市",
  8361. "精河县",
  8362. "温泉县"] },
  8363. {
  8364. "name": "石河子",
  8365. "area": [
  8366. "石河子"] },
  8367. {
  8368. "name": "阿拉尔",
  8369. "area": [
  8370. "阿拉尔"] },
  8371. {
  8372. "name": "图木舒克",
  8373. "area": [
  8374. "图木舒克"] },
  8375. {
  8376. "name": "五家渠",
  8377. "area": [
  8378. "五家渠"] },
  8379. {
  8380. "name": "伊犁哈萨克自治州",
  8381. "area": [
  8382. "伊宁市",
  8383. "奎屯市",
  8384. "伊宁县",
  8385. "特克斯县",
  8386. "尼勒克县",
  8387. "昭苏县",
  8388. "新源县",
  8389. "霍城县",
  8390. "巩留县",
  8391. "察布查尔锡伯自治县",
  8392. "塔城地区",
  8393. "阿勒泰地区"] }] },
  8394. {
  8395. "name": "台湾省",
  8396. "city": [
  8397. {
  8398. "name": "台北市",
  8399. "area": [
  8400. "内湖区",
  8401. "南港区",
  8402. "中正区",
  8403. "万华区",
  8404. "大同区",
  8405. "中山区",
  8406. "松山区",
  8407. "大安区",
  8408. "信义区",
  8409. "文山区",
  8410. "士林区",
  8411. "北投区"] },
  8412. {
  8413. "name": "新北市",
  8414. "area": [
  8415. "板桥区",
  8416. "汐止区",
  8417. "新店区"] },
  8418. {
  8419. "name": "桃园市",
  8420. "area": [
  8421. "其他"] },
  8422. {
  8423. "name": "台中市",
  8424. "area": [
  8425. "其他"] },
  8426. {
  8427. "name": "台南市",
  8428. "area": [
  8429. "其他"] },
  8430. {
  8431. "name": "高雄市",
  8432. "area": [
  8433. "其他"] }] },
  8434. {
  8435. "name": "澳门",
  8436. "city": [
  8437. {
  8438. "name": "澳门",
  8439. "area": [
  8440. "花地玛堂区",
  8441. "圣安多尼堂区",
  8442. "大堂区",
  8443. "望德堂区",
  8444. "风顺堂区",
  8445. "嘉模堂区",
  8446. "圣方济各堂区",
  8447. "路凼"] }] },
  8448. {
  8449. "name": "香港",
  8450. "city": [
  8451. {
  8452. "name": "香港",
  8453. "area": [
  8454. "深水埗区",
  8455. "油尖旺区",
  8456. "九龙城区",
  8457. "黄大仙区",
  8458. "观塘区",
  8459. "北区",
  8460. "大埔区",
  8461. "沙田区",
  8462. "西贡区",
  8463. "元朗区",
  8464. "屯门区",
  8465. "荃湾区",
  8466. "葵青区",
  8467. "离岛区",
  8468. "中西区",
  8469. "湾仔区",
  8470. "东区",
  8471. "南区"] }] }];exports.default = _default;
  8472. /***/ }),
  8473. /***/ 38:
  8474. /*!***********************************!*\
  8475. !*** D:/2022/10/hmd/api/login.js ***!
  8476. \***********************************/
  8477. /*! no static exports found */
  8478. /***/ (function(module, exports, __webpack_require__) {
  8479. "use strict";
  8480. Object.defineProperty(exports, "__esModule", { value: true });exports.login = login;exports.register = register;exports.verify = verify;exports.getUserInfo = getUserInfo;exports.loginMobile = loginMobile;exports.bangding = bangding;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8481. // 登录
  8482. function login(data) {
  8483. return (0, _request.default)({
  8484. url: '/api/login',
  8485. method: 'post',
  8486. data: data });
  8487. }
  8488. // 注册
  8489. function register(data) {
  8490. return (0, _request.default)({
  8491. url: '/api/register',
  8492. method: 'post',
  8493. data: data });
  8494. }
  8495. // 验证码
  8496. function verify(data) {
  8497. // type=register为注册
  8498. // type=login为登录
  8499. return (0, _request.default)({
  8500. url: '/api/register/verify',
  8501. method: 'post',
  8502. data: data });
  8503. }
  8504. // 获取用户信息
  8505. function getUserInfo(data) {
  8506. return (0, _request.default)({
  8507. url: '/api/userinfo',
  8508. method: 'get',
  8509. data: data });
  8510. }
  8511. // 短信登录
  8512. function loginMobile(data) {
  8513. return (0, _request.default)({
  8514. url: '/api/login/mobile',
  8515. method: 'post',
  8516. data: data });
  8517. }
  8518. //绑定手机号
  8519. function bangding(data) {
  8520. return (0, _request.default)({
  8521. url: '/api/binding',
  8522. method: 'POST',
  8523. data: data });
  8524. }
  8525. /***/ }),
  8526. /***/ 4:
  8527. /*!******************************************************************************************!*\
  8528. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  8529. \******************************************************************************************/
  8530. /*! exports provided: default */
  8531. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8532. "use strict";
  8533. __webpack_require__.r(__webpack_exports__);
  8534. /* WEBPACK VAR INJECTION */(function(global) {/*!
  8535. * Vue.js v2.6.11
  8536. * (c) 2014-2022 Evan You
  8537. * Released under the MIT License.
  8538. */
  8539. /* */
  8540. var emptyObject = Object.freeze({});
  8541. // These helpers produce better VM code in JS engines due to their
  8542. // explicitness and function inlining.
  8543. function isUndef (v) {
  8544. return v === undefined || v === null
  8545. }
  8546. function isDef (v) {
  8547. return v !== undefined && v !== null
  8548. }
  8549. function isTrue (v) {
  8550. return v === true
  8551. }
  8552. function isFalse (v) {
  8553. return v === false
  8554. }
  8555. /**
  8556. * Check if value is primitive.
  8557. */
  8558. function isPrimitive (value) {
  8559. return (
  8560. typeof value === 'string' ||
  8561. typeof value === 'number' ||
  8562. // $flow-disable-line
  8563. typeof value === 'symbol' ||
  8564. typeof value === 'boolean'
  8565. )
  8566. }
  8567. /**
  8568. * Quick object check - this is primarily used to tell
  8569. * Objects from primitive values when we know the value
  8570. * is a JSON-compliant type.
  8571. */
  8572. function isObject (obj) {
  8573. return obj !== null && typeof obj === 'object'
  8574. }
  8575. /**
  8576. * Get the raw type string of a value, e.g., [object Object].
  8577. */
  8578. var _toString = Object.prototype.toString;
  8579. function toRawType (value) {
  8580. return _toString.call(value).slice(8, -1)
  8581. }
  8582. /**
  8583. * Strict object type check. Only returns true
  8584. * for plain JavaScript objects.
  8585. */
  8586. function isPlainObject (obj) {
  8587. return _toString.call(obj) === '[object Object]'
  8588. }
  8589. function isRegExp (v) {
  8590. return _toString.call(v) === '[object RegExp]'
  8591. }
  8592. /**
  8593. * Check if val is a valid array index.
  8594. */
  8595. function isValidArrayIndex (val) {
  8596. var n = parseFloat(String(val));
  8597. return n >= 0 && Math.floor(n) === n && isFinite(val)
  8598. }
  8599. function isPromise (val) {
  8600. return (
  8601. isDef(val) &&
  8602. typeof val.then === 'function' &&
  8603. typeof val.catch === 'function'
  8604. )
  8605. }
  8606. /**
  8607. * Convert a value to a string that is actually rendered.
  8608. */
  8609. function toString (val) {
  8610. return val == null
  8611. ? ''
  8612. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  8613. ? JSON.stringify(val, null, 2)
  8614. : String(val)
  8615. }
  8616. /**
  8617. * Convert an input value to a number for persistence.
  8618. * If the conversion fails, return original string.
  8619. */
  8620. function toNumber (val) {
  8621. var n = parseFloat(val);
  8622. return isNaN(n) ? val : n
  8623. }
  8624. /**
  8625. * Make a map and return a function for checking if a key
  8626. * is in that map.
  8627. */
  8628. function makeMap (
  8629. str,
  8630. expectsLowerCase
  8631. ) {
  8632. var map = Object.create(null);
  8633. var list = str.split(',');
  8634. for (var i = 0; i < list.length; i++) {
  8635. map[list[i]] = true;
  8636. }
  8637. return expectsLowerCase
  8638. ? function (val) { return map[val.toLowerCase()]; }
  8639. : function (val) { return map[val]; }
  8640. }
  8641. /**
  8642. * Check if a tag is a built-in tag.
  8643. */
  8644. var isBuiltInTag = makeMap('slot,component', true);
  8645. /**
  8646. * Check if an attribute is a reserved attribute.
  8647. */
  8648. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  8649. /**
  8650. * Remove an item from an array.
  8651. */
  8652. function remove (arr, item) {
  8653. if (arr.length) {
  8654. var index = arr.indexOf(item);
  8655. if (index > -1) {
  8656. return arr.splice(index, 1)
  8657. }
  8658. }
  8659. }
  8660. /**
  8661. * Check whether an object has the property.
  8662. */
  8663. var hasOwnProperty = Object.prototype.hasOwnProperty;
  8664. function hasOwn (obj, key) {
  8665. return hasOwnProperty.call(obj, key)
  8666. }
  8667. /**
  8668. * Create a cached version of a pure function.
  8669. */
  8670. function cached (fn) {
  8671. var cache = Object.create(null);
  8672. return (function cachedFn (str) {
  8673. var hit = cache[str];
  8674. return hit || (cache[str] = fn(str))
  8675. })
  8676. }
  8677. /**
  8678. * Camelize a hyphen-delimited string.
  8679. */
  8680. var camelizeRE = /-(\w)/g;
  8681. var camelize = cached(function (str) {
  8682. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  8683. });
  8684. /**
  8685. * Capitalize a string.
  8686. */
  8687. var capitalize = cached(function (str) {
  8688. return str.charAt(0).toUpperCase() + str.slice(1)
  8689. });
  8690. /**
  8691. * Hyphenate a camelCase string.
  8692. */
  8693. var hyphenateRE = /\B([A-Z])/g;
  8694. var hyphenate = cached(function (str) {
  8695. return str.replace(hyphenateRE, '-$1').toLowerCase()
  8696. });
  8697. /**
  8698. * Simple bind polyfill for environments that do not support it,
  8699. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  8700. * since native bind is now performant enough in most browsers.
  8701. * But removing it would mean breaking code that was able to run in
  8702. * PhantomJS 1.x, so this must be kept for backward compatibility.
  8703. */
  8704. /* istanbul ignore next */
  8705. function polyfillBind (fn, ctx) {
  8706. function boundFn (a) {
  8707. var l = arguments.length;
  8708. return l
  8709. ? l > 1
  8710. ? fn.apply(ctx, arguments)
  8711. : fn.call(ctx, a)
  8712. : fn.call(ctx)
  8713. }
  8714. boundFn._length = fn.length;
  8715. return boundFn
  8716. }
  8717. function nativeBind (fn, ctx) {
  8718. return fn.bind(ctx)
  8719. }
  8720. var bind = Function.prototype.bind
  8721. ? nativeBind
  8722. : polyfillBind;
  8723. /**
  8724. * Convert an Array-like object to a real Array.
  8725. */
  8726. function toArray (list, start) {
  8727. start = start || 0;
  8728. var i = list.length - start;
  8729. var ret = new Array(i);
  8730. while (i--) {
  8731. ret[i] = list[i + start];
  8732. }
  8733. return ret
  8734. }
  8735. /**
  8736. * Mix properties into target object.
  8737. */
  8738. function extend (to, _from) {
  8739. for (var key in _from) {
  8740. to[key] = _from[key];
  8741. }
  8742. return to
  8743. }
  8744. /**
  8745. * Merge an Array of Objects into a single Object.
  8746. */
  8747. function toObject (arr) {
  8748. var res = {};
  8749. for (var i = 0; i < arr.length; i++) {
  8750. if (arr[i]) {
  8751. extend(res, arr[i]);
  8752. }
  8753. }
  8754. return res
  8755. }
  8756. /* eslint-disable no-unused-vars */
  8757. /**
  8758. * Perform no operation.
  8759. * Stubbing args to make Flow happy without leaving useless transpiled code
  8760. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  8761. */
  8762. function noop (a, b, c) {}
  8763. /**
  8764. * Always return false.
  8765. */
  8766. var no = function (a, b, c) { return false; };
  8767. /* eslint-enable no-unused-vars */
  8768. /**
  8769. * Return the same value.
  8770. */
  8771. var identity = function (_) { return _; };
  8772. /**
  8773. * Check if two values are loosely equal - that is,
  8774. * if they are plain objects, do they have the same shape?
  8775. */
  8776. function looseEqual (a, b) {
  8777. if (a === b) { return true }
  8778. var isObjectA = isObject(a);
  8779. var isObjectB = isObject(b);
  8780. if (isObjectA && isObjectB) {
  8781. try {
  8782. var isArrayA = Array.isArray(a);
  8783. var isArrayB = Array.isArray(b);
  8784. if (isArrayA && isArrayB) {
  8785. return a.length === b.length && a.every(function (e, i) {
  8786. return looseEqual(e, b[i])
  8787. })
  8788. } else if (a instanceof Date && b instanceof Date) {
  8789. return a.getTime() === b.getTime()
  8790. } else if (!isArrayA && !isArrayB) {
  8791. var keysA = Object.keys(a);
  8792. var keysB = Object.keys(b);
  8793. return keysA.length === keysB.length && keysA.every(function (key) {
  8794. return looseEqual(a[key], b[key])
  8795. })
  8796. } else {
  8797. /* istanbul ignore next */
  8798. return false
  8799. }
  8800. } catch (e) {
  8801. /* istanbul ignore next */
  8802. return false
  8803. }
  8804. } else if (!isObjectA && !isObjectB) {
  8805. return String(a) === String(b)
  8806. } else {
  8807. return false
  8808. }
  8809. }
  8810. /**
  8811. * Return the first index at which a loosely equal value can be
  8812. * found in the array (if value is a plain object, the array must
  8813. * contain an object of the same shape), or -1 if it is not present.
  8814. */
  8815. function looseIndexOf (arr, val) {
  8816. for (var i = 0; i < arr.length; i++) {
  8817. if (looseEqual(arr[i], val)) { return i }
  8818. }
  8819. return -1
  8820. }
  8821. /**
  8822. * Ensure a function is called only once.
  8823. */
  8824. function once (fn) {
  8825. var called = false;
  8826. return function () {
  8827. if (!called) {
  8828. called = true;
  8829. fn.apply(this, arguments);
  8830. }
  8831. }
  8832. }
  8833. var ASSET_TYPES = [
  8834. 'component',
  8835. 'directive',
  8836. 'filter'
  8837. ];
  8838. var LIFECYCLE_HOOKS = [
  8839. 'beforeCreate',
  8840. 'created',
  8841. 'beforeMount',
  8842. 'mounted',
  8843. 'beforeUpdate',
  8844. 'updated',
  8845. 'beforeDestroy',
  8846. 'destroyed',
  8847. 'activated',
  8848. 'deactivated',
  8849. 'errorCaptured',
  8850. 'serverPrefetch'
  8851. ];
  8852. /* */
  8853. var config = ({
  8854. /**
  8855. * Option merge strategies (used in core/util/options)
  8856. */
  8857. // $flow-disable-line
  8858. optionMergeStrategies: Object.create(null),
  8859. /**
  8860. * Whether to suppress warnings.
  8861. */
  8862. silent: false,
  8863. /**
  8864. * Show production mode tip message on boot?
  8865. */
  8866. productionTip: "development" !== 'production',
  8867. /**
  8868. * Whether to enable devtools
  8869. */
  8870. devtools: "development" !== 'production',
  8871. /**
  8872. * Whether to record perf
  8873. */
  8874. performance: false,
  8875. /**
  8876. * Error handler for watcher errors
  8877. */
  8878. errorHandler: null,
  8879. /**
  8880. * Warn handler for watcher warns
  8881. */
  8882. warnHandler: null,
  8883. /**
  8884. * Ignore certain custom elements
  8885. */
  8886. ignoredElements: [],
  8887. /**
  8888. * Custom user key aliases for v-on
  8889. */
  8890. // $flow-disable-line
  8891. keyCodes: Object.create(null),
  8892. /**
  8893. * Check if a tag is reserved so that it cannot be registered as a
  8894. * component. This is platform-dependent and may be overwritten.
  8895. */
  8896. isReservedTag: no,
  8897. /**
  8898. * Check if an attribute is reserved so that it cannot be used as a component
  8899. * prop. This is platform-dependent and may be overwritten.
  8900. */
  8901. isReservedAttr: no,
  8902. /**
  8903. * Check if a tag is an unknown element.
  8904. * Platform-dependent.
  8905. */
  8906. isUnknownElement: no,
  8907. /**
  8908. * Get the namespace of an element
  8909. */
  8910. getTagNamespace: noop,
  8911. /**
  8912. * Parse the real tag name for the specific platform.
  8913. */
  8914. parsePlatformTagName: identity,
  8915. /**
  8916. * Check if an attribute must be bound using property, e.g. value
  8917. * Platform-dependent.
  8918. */
  8919. mustUseProp: no,
  8920. /**
  8921. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  8922. * This will significantly reduce performance if set to false.
  8923. */
  8924. async: true,
  8925. /**
  8926. * Exposed for legacy reasons
  8927. */
  8928. _lifecycleHooks: LIFECYCLE_HOOKS
  8929. });
  8930. /* */
  8931. /**
  8932. * unicode letters used for parsing html tags, component names and property paths.
  8933. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  8934. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  8935. */
  8936. 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/;
  8937. /**
  8938. * Check if a string starts with $ or _
  8939. */
  8940. function isReserved (str) {
  8941. var c = (str + '').charCodeAt(0);
  8942. return c === 0x24 || c === 0x5F
  8943. }
  8944. /**
  8945. * Define a property.
  8946. */
  8947. function def (obj, key, val, enumerable) {
  8948. Object.defineProperty(obj, key, {
  8949. value: val,
  8950. enumerable: !!enumerable,
  8951. writable: true,
  8952. configurable: true
  8953. });
  8954. }
  8955. /**
  8956. * Parse simple path.
  8957. */
  8958. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  8959. function parsePath (path) {
  8960. if (bailRE.test(path)) {
  8961. return
  8962. }
  8963. var segments = path.split('.');
  8964. return function (obj) {
  8965. for (var i = 0; i < segments.length; i++) {
  8966. if (!obj) { return }
  8967. obj = obj[segments[i]];
  8968. }
  8969. return obj
  8970. }
  8971. }
  8972. /* */
  8973. // can we use __proto__?
  8974. var hasProto = '__proto__' in {};
  8975. // Browser environment sniffing
  8976. var inBrowser = typeof window !== 'undefined';
  8977. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  8978. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  8979. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  8980. var isIE = UA && /msie|trident/.test(UA);
  8981. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  8982. var isEdge = UA && UA.indexOf('edge/') > 0;
  8983. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  8984. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  8985. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  8986. var isPhantomJS = UA && /phantomjs/.test(UA);
  8987. var isFF = UA && UA.match(/firefox\/(\d+)/);
  8988. // Firefox has a "watch" function on Object.prototype...
  8989. var nativeWatch = ({}).watch;
  8990. if (inBrowser) {
  8991. try {
  8992. var opts = {};
  8993. Object.defineProperty(opts, 'passive', ({
  8994. get: function get () {
  8995. }
  8996. })); // https://github.com/facebook/flow/issues/285
  8997. window.addEventListener('test-passive', null, opts);
  8998. } catch (e) {}
  8999. }
  9000. // this needs to be lazy-evaled because vue may be required before
  9001. // vue-server-renderer can set VUE_ENV
  9002. var _isServer;
  9003. var isServerRendering = function () {
  9004. if (_isServer === undefined) {
  9005. /* istanbul ignore if */
  9006. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  9007. // detect presence of vue-server-renderer and avoid
  9008. // Webpack shimming the process
  9009. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  9010. } else {
  9011. _isServer = false;
  9012. }
  9013. }
  9014. return _isServer
  9015. };
  9016. // detect devtools
  9017. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  9018. /* istanbul ignore next */
  9019. function isNative (Ctor) {
  9020. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  9021. }
  9022. var hasSymbol =
  9023. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  9024. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  9025. var _Set;
  9026. /* istanbul ignore if */ // $flow-disable-line
  9027. if (typeof Set !== 'undefined' && isNative(Set)) {
  9028. // use native Set when available.
  9029. _Set = Set;
  9030. } else {
  9031. // a non-standard Set polyfill that only works with primitive keys.
  9032. _Set = /*@__PURE__*/(function () {
  9033. function Set () {
  9034. this.set = Object.create(null);
  9035. }
  9036. Set.prototype.has = function has (key) {
  9037. return this.set[key] === true
  9038. };
  9039. Set.prototype.add = function add (key) {
  9040. this.set[key] = true;
  9041. };
  9042. Set.prototype.clear = function clear () {
  9043. this.set = Object.create(null);
  9044. };
  9045. return Set;
  9046. }());
  9047. }
  9048. /* */
  9049. var warn = noop;
  9050. var tip = noop;
  9051. var generateComponentTrace = (noop); // work around flow check
  9052. var formatComponentName = (noop);
  9053. if (true) {
  9054. var hasConsole = typeof console !== 'undefined';
  9055. var classifyRE = /(?:^|[-_])(\w)/g;
  9056. var classify = function (str) { return str
  9057. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  9058. .replace(/[-_]/g, ''); };
  9059. warn = function (msg, vm) {
  9060. var trace = vm ? generateComponentTrace(vm) : '';
  9061. if (config.warnHandler) {
  9062. config.warnHandler.call(null, msg, vm, trace);
  9063. } else if (hasConsole && (!config.silent)) {
  9064. console.error(("[Vue warn]: " + msg + trace));
  9065. }
  9066. };
  9067. tip = function (msg, vm) {
  9068. if (hasConsole && (!config.silent)) {
  9069. console.warn("[Vue tip]: " + msg + (
  9070. vm ? generateComponentTrace(vm) : ''
  9071. ));
  9072. }
  9073. };
  9074. formatComponentName = function (vm, includeFile) {
  9075. if (vm.$root === vm) {
  9076. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  9077. return ('') + vm.$options.__file
  9078. }
  9079. return '<Root>'
  9080. }
  9081. var options = typeof vm === 'function' && vm.cid != null
  9082. ? vm.options
  9083. : vm._isVue
  9084. ? vm.$options || vm.constructor.options
  9085. : vm;
  9086. var name = options.name || options._componentTag;
  9087. var file = options.__file;
  9088. if (!name && file) {
  9089. var match = file.match(/([^/\\]+)\.vue$/);
  9090. name = match && match[1];
  9091. }
  9092. return (
  9093. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  9094. (file && includeFile !== false ? (" at " + file) : '')
  9095. )
  9096. };
  9097. var repeat = function (str, n) {
  9098. var res = '';
  9099. while (n) {
  9100. if (n % 2 === 1) { res += str; }
  9101. if (n > 1) { str += str; }
  9102. n >>= 1;
  9103. }
  9104. return res
  9105. };
  9106. generateComponentTrace = function (vm) {
  9107. if (vm._isVue && vm.$parent) {
  9108. var tree = [];
  9109. var currentRecursiveSequence = 0;
  9110. while (vm && vm.$options.name !== 'PageBody') {
  9111. if (tree.length > 0) {
  9112. var last = tree[tree.length - 1];
  9113. if (last.constructor === vm.constructor) {
  9114. currentRecursiveSequence++;
  9115. vm = vm.$parent;
  9116. continue
  9117. } else if (currentRecursiveSequence > 0) {
  9118. tree[tree.length - 1] = [last, currentRecursiveSequence];
  9119. currentRecursiveSequence = 0;
  9120. }
  9121. }
  9122. !vm.$options.isReserved && tree.push(vm);
  9123. vm = vm.$parent;
  9124. }
  9125. return '\n\nfound in\n\n' + tree
  9126. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  9127. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  9128. : formatComponentName(vm))); })
  9129. .join('\n')
  9130. } else {
  9131. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  9132. }
  9133. };
  9134. }
  9135. /* */
  9136. var uid = 0;
  9137. /**
  9138. * A dep is an observable that can have multiple
  9139. * directives subscribing to it.
  9140. */
  9141. var Dep = function Dep () {
  9142. this.id = uid++;
  9143. this.subs = [];
  9144. };
  9145. Dep.prototype.addSub = function addSub (sub) {
  9146. this.subs.push(sub);
  9147. };
  9148. Dep.prototype.removeSub = function removeSub (sub) {
  9149. remove(this.subs, sub);
  9150. };
  9151. Dep.prototype.depend = function depend () {
  9152. if (Dep.SharedObject.target) {
  9153. Dep.SharedObject.target.addDep(this);
  9154. }
  9155. };
  9156. Dep.prototype.notify = function notify () {
  9157. // stabilize the subscriber list first
  9158. var subs = this.subs.slice();
  9159. if ( true && !config.async) {
  9160. // subs aren't sorted in scheduler if not running async
  9161. // we need to sort them now to make sure they fire in correct
  9162. // order
  9163. subs.sort(function (a, b) { return a.id - b.id; });
  9164. }
  9165. for (var i = 0, l = subs.length; i < l; i++) {
  9166. subs[i].update();
  9167. }
  9168. };
  9169. // The current target watcher being evaluated.
  9170. // This is globally unique because only one watcher
  9171. // can be evaluated at a time.
  9172. // fixed by xxxxxx (nvue shared vuex)
  9173. /* eslint-disable no-undef */
  9174. Dep.SharedObject = {};
  9175. Dep.SharedObject.target = null;
  9176. Dep.SharedObject.targetStack = [];
  9177. function pushTarget (target) {
  9178. Dep.SharedObject.targetStack.push(target);
  9179. Dep.SharedObject.target = target;
  9180. Dep.target = target;
  9181. }
  9182. function popTarget () {
  9183. Dep.SharedObject.targetStack.pop();
  9184. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  9185. Dep.target = Dep.SharedObject.target;
  9186. }
  9187. /* */
  9188. var VNode = function VNode (
  9189. tag,
  9190. data,
  9191. children,
  9192. text,
  9193. elm,
  9194. context,
  9195. componentOptions,
  9196. asyncFactory
  9197. ) {
  9198. this.tag = tag;
  9199. this.data = data;
  9200. this.children = children;
  9201. this.text = text;
  9202. this.elm = elm;
  9203. this.ns = undefined;
  9204. this.context = context;
  9205. this.fnContext = undefined;
  9206. this.fnOptions = undefined;
  9207. this.fnScopeId = undefined;
  9208. this.key = data && data.key;
  9209. this.componentOptions = componentOptions;
  9210. this.componentInstance = undefined;
  9211. this.parent = undefined;
  9212. this.raw = false;
  9213. this.isStatic = false;
  9214. this.isRootInsert = true;
  9215. this.isComment = false;
  9216. this.isCloned = false;
  9217. this.isOnce = false;
  9218. this.asyncFactory = asyncFactory;
  9219. this.asyncMeta = undefined;
  9220. this.isAsyncPlaceholder = false;
  9221. };
  9222. var prototypeAccessors = { child: { configurable: true } };
  9223. // DEPRECATED: alias for componentInstance for backwards compat.
  9224. /* istanbul ignore next */
  9225. prototypeAccessors.child.get = function () {
  9226. return this.componentInstance
  9227. };
  9228. Object.defineProperties( VNode.prototype, prototypeAccessors );
  9229. var createEmptyVNode = function (text) {
  9230. if ( text === void 0 ) text = '';
  9231. var node = new VNode();
  9232. node.text = text;
  9233. node.isComment = true;
  9234. return node
  9235. };
  9236. function createTextVNode (val) {
  9237. return new VNode(undefined, undefined, undefined, String(val))
  9238. }
  9239. // optimized shallow clone
  9240. // used for static nodes and slot nodes because they may be reused across
  9241. // multiple renders, cloning them avoids errors when DOM manipulations rely
  9242. // on their elm reference.
  9243. function cloneVNode (vnode) {
  9244. var cloned = new VNode(
  9245. vnode.tag,
  9246. vnode.data,
  9247. // #7975
  9248. // clone children array to avoid mutating original in case of cloning
  9249. // a child.
  9250. vnode.children && vnode.children.slice(),
  9251. vnode.text,
  9252. vnode.elm,
  9253. vnode.context,
  9254. vnode.componentOptions,
  9255. vnode.asyncFactory
  9256. );
  9257. cloned.ns = vnode.ns;
  9258. cloned.isStatic = vnode.isStatic;
  9259. cloned.key = vnode.key;
  9260. cloned.isComment = vnode.isComment;
  9261. cloned.fnContext = vnode.fnContext;
  9262. cloned.fnOptions = vnode.fnOptions;
  9263. cloned.fnScopeId = vnode.fnScopeId;
  9264. cloned.asyncMeta = vnode.asyncMeta;
  9265. cloned.isCloned = true;
  9266. return cloned
  9267. }
  9268. /*
  9269. * not type checking this file because flow doesn't play well with
  9270. * dynamically accessing methods on Array prototype
  9271. */
  9272. var arrayProto = Array.prototype;
  9273. var arrayMethods = Object.create(arrayProto);
  9274. var methodsToPatch = [
  9275. 'push',
  9276. 'pop',
  9277. 'shift',
  9278. 'unshift',
  9279. 'splice',
  9280. 'sort',
  9281. 'reverse'
  9282. ];
  9283. /**
  9284. * Intercept mutating methods and emit events
  9285. */
  9286. methodsToPatch.forEach(function (method) {
  9287. // cache original method
  9288. var original = arrayProto[method];
  9289. def(arrayMethods, method, function mutator () {
  9290. var args = [], len = arguments.length;
  9291. while ( len-- ) args[ len ] = arguments[ len ];
  9292. var result = original.apply(this, args);
  9293. var ob = this.__ob__;
  9294. var inserted;
  9295. switch (method) {
  9296. case 'push':
  9297. case 'unshift':
  9298. inserted = args;
  9299. break
  9300. case 'splice':
  9301. inserted = args.slice(2);
  9302. break
  9303. }
  9304. if (inserted) { ob.observeArray(inserted); }
  9305. // notify change
  9306. ob.dep.notify();
  9307. return result
  9308. });
  9309. });
  9310. /* */
  9311. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  9312. /**
  9313. * In some cases we may want to disable observation inside a component's
  9314. * update computation.
  9315. */
  9316. var shouldObserve = true;
  9317. function toggleObserving (value) {
  9318. shouldObserve = value;
  9319. }
  9320. /**
  9321. * Observer class that is attached to each observed
  9322. * object. Once attached, the observer converts the target
  9323. * object's property keys into getter/setters that
  9324. * collect dependencies and dispatch updates.
  9325. */
  9326. var Observer = function Observer (value) {
  9327. this.value = value;
  9328. this.dep = new Dep();
  9329. this.vmCount = 0;
  9330. def(value, '__ob__', this);
  9331. if (Array.isArray(value)) {
  9332. if (hasProto) {
  9333. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  9334. if(value.push !== value.__proto__.push){
  9335. copyAugment(value, arrayMethods, arrayKeys);
  9336. } else {
  9337. protoAugment(value, arrayMethods);
  9338. }
  9339. }
  9340. } else {
  9341. copyAugment(value, arrayMethods, arrayKeys);
  9342. }
  9343. this.observeArray(value);
  9344. } else {
  9345. this.walk(value);
  9346. }
  9347. };
  9348. /**
  9349. * Walk through all properties and convert them into
  9350. * getter/setters. This method should only be called when
  9351. * value type is Object.
  9352. */
  9353. Observer.prototype.walk = function walk (obj) {
  9354. var keys = Object.keys(obj);
  9355. for (var i = 0; i < keys.length; i++) {
  9356. defineReactive$$1(obj, keys[i]);
  9357. }
  9358. };
  9359. /**
  9360. * Observe a list of Array items.
  9361. */
  9362. Observer.prototype.observeArray = function observeArray (items) {
  9363. for (var i = 0, l = items.length; i < l; i++) {
  9364. observe(items[i]);
  9365. }
  9366. };
  9367. // helpers
  9368. /**
  9369. * Augment a target Object or Array by intercepting
  9370. * the prototype chain using __proto__
  9371. */
  9372. function protoAugment (target, src) {
  9373. /* eslint-disable no-proto */
  9374. target.__proto__ = src;
  9375. /* eslint-enable no-proto */
  9376. }
  9377. /**
  9378. * Augment a target Object or Array by defining
  9379. * hidden properties.
  9380. */
  9381. /* istanbul ignore next */
  9382. function copyAugment (target, src, keys) {
  9383. for (var i = 0, l = keys.length; i < l; i++) {
  9384. var key = keys[i];
  9385. def(target, key, src[key]);
  9386. }
  9387. }
  9388. /**
  9389. * Attempt to create an observer instance for a value,
  9390. * returns the new observer if successfully observed,
  9391. * or the existing observer if the value already has one.
  9392. */
  9393. function observe (value, asRootData) {
  9394. if (!isObject(value) || value instanceof VNode) {
  9395. return
  9396. }
  9397. var ob;
  9398. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  9399. ob = value.__ob__;
  9400. } else if (
  9401. shouldObserve &&
  9402. !isServerRendering() &&
  9403. (Array.isArray(value) || isPlainObject(value)) &&
  9404. Object.isExtensible(value) &&
  9405. !value._isVue
  9406. ) {
  9407. ob = new Observer(value);
  9408. }
  9409. if (asRootData && ob) {
  9410. ob.vmCount++;
  9411. }
  9412. return ob
  9413. }
  9414. /**
  9415. * Define a reactive property on an Object.
  9416. */
  9417. function defineReactive$$1 (
  9418. obj,
  9419. key,
  9420. val,
  9421. customSetter,
  9422. shallow
  9423. ) {
  9424. var dep = new Dep();
  9425. var property = Object.getOwnPropertyDescriptor(obj, key);
  9426. if (property && property.configurable === false) {
  9427. return
  9428. }
  9429. // cater for pre-defined getter/setters
  9430. var getter = property && property.get;
  9431. var setter = property && property.set;
  9432. if ((!getter || setter) && arguments.length === 2) {
  9433. val = obj[key];
  9434. }
  9435. var childOb = !shallow && observe(val);
  9436. Object.defineProperty(obj, key, {
  9437. enumerable: true,
  9438. configurable: true,
  9439. get: function reactiveGetter () {
  9440. var value = getter ? getter.call(obj) : val;
  9441. if (Dep.SharedObject.target) { // fixed by xxxxxx
  9442. dep.depend();
  9443. if (childOb) {
  9444. childOb.dep.depend();
  9445. if (Array.isArray(value)) {
  9446. dependArray(value);
  9447. }
  9448. }
  9449. }
  9450. return value
  9451. },
  9452. set: function reactiveSetter (newVal) {
  9453. var value = getter ? getter.call(obj) : val;
  9454. /* eslint-disable no-self-compare */
  9455. if (newVal === value || (newVal !== newVal && value !== value)) {
  9456. return
  9457. }
  9458. /* eslint-enable no-self-compare */
  9459. if ( true && customSetter) {
  9460. customSetter();
  9461. }
  9462. // #7981: for accessor properties without setter
  9463. if (getter && !setter) { return }
  9464. if (setter) {
  9465. setter.call(obj, newVal);
  9466. } else {
  9467. val = newVal;
  9468. }
  9469. childOb = !shallow && observe(newVal);
  9470. dep.notify();
  9471. }
  9472. });
  9473. }
  9474. /**
  9475. * Set a property on an object. Adds the new property and
  9476. * triggers change notification if the property doesn't
  9477. * already exist.
  9478. */
  9479. function set (target, key, val) {
  9480. if ( true &&
  9481. (isUndef(target) || isPrimitive(target))
  9482. ) {
  9483. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  9484. }
  9485. if (Array.isArray(target) && isValidArrayIndex(key)) {
  9486. target.length = Math.max(target.length, key);
  9487. target.splice(key, 1, val);
  9488. return val
  9489. }
  9490. if (key in target && !(key in Object.prototype)) {
  9491. target[key] = val;
  9492. return val
  9493. }
  9494. var ob = (target).__ob__;
  9495. if (target._isVue || (ob && ob.vmCount)) {
  9496. true && warn(
  9497. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  9498. 'at runtime - declare it upfront in the data option.'
  9499. );
  9500. return val
  9501. }
  9502. if (!ob) {
  9503. target[key] = val;
  9504. return val
  9505. }
  9506. defineReactive$$1(ob.value, key, val);
  9507. ob.dep.notify();
  9508. return val
  9509. }
  9510. /**
  9511. * Delete a property and trigger change if necessary.
  9512. */
  9513. function del (target, key) {
  9514. if ( true &&
  9515. (isUndef(target) || isPrimitive(target))
  9516. ) {
  9517. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  9518. }
  9519. if (Array.isArray(target) && isValidArrayIndex(key)) {
  9520. target.splice(key, 1);
  9521. return
  9522. }
  9523. var ob = (target).__ob__;
  9524. if (target._isVue || (ob && ob.vmCount)) {
  9525. true && warn(
  9526. 'Avoid deleting properties on a Vue instance or its root $data ' +
  9527. '- just set it to null.'
  9528. );
  9529. return
  9530. }
  9531. if (!hasOwn(target, key)) {
  9532. return
  9533. }
  9534. delete target[key];
  9535. if (!ob) {
  9536. return
  9537. }
  9538. ob.dep.notify();
  9539. }
  9540. /**
  9541. * Collect dependencies on array elements when the array is touched, since
  9542. * we cannot intercept array element access like property getters.
  9543. */
  9544. function dependArray (value) {
  9545. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  9546. e = value[i];
  9547. e && e.__ob__ && e.__ob__.dep.depend();
  9548. if (Array.isArray(e)) {
  9549. dependArray(e);
  9550. }
  9551. }
  9552. }
  9553. /* */
  9554. /**
  9555. * Option overwriting strategies are functions that handle
  9556. * how to merge a parent option value and a child option
  9557. * value into the final value.
  9558. */
  9559. var strats = config.optionMergeStrategies;
  9560. /**
  9561. * Options with restrictions
  9562. */
  9563. if (true) {
  9564. strats.el = strats.propsData = function (parent, child, vm, key) {
  9565. if (!vm) {
  9566. warn(
  9567. "option \"" + key + "\" can only be used during instance " +
  9568. 'creation with the `new` keyword.'
  9569. );
  9570. }
  9571. return defaultStrat(parent, child)
  9572. };
  9573. }
  9574. /**
  9575. * Helper that recursively merges two data objects together.
  9576. */
  9577. function mergeData (to, from) {
  9578. if (!from) { return to }
  9579. var key, toVal, fromVal;
  9580. var keys = hasSymbol
  9581. ? Reflect.ownKeys(from)
  9582. : Object.keys(from);
  9583. for (var i = 0; i < keys.length; i++) {
  9584. key = keys[i];
  9585. // in case the object is already observed...
  9586. if (key === '__ob__') { continue }
  9587. toVal = to[key];
  9588. fromVal = from[key];
  9589. if (!hasOwn(to, key)) {
  9590. set(to, key, fromVal);
  9591. } else if (
  9592. toVal !== fromVal &&
  9593. isPlainObject(toVal) &&
  9594. isPlainObject(fromVal)
  9595. ) {
  9596. mergeData(toVal, fromVal);
  9597. }
  9598. }
  9599. return to
  9600. }
  9601. /**
  9602. * Data
  9603. */
  9604. function mergeDataOrFn (
  9605. parentVal,
  9606. childVal,
  9607. vm
  9608. ) {
  9609. if (!vm) {
  9610. // in a Vue.extend merge, both should be functions
  9611. if (!childVal) {
  9612. return parentVal
  9613. }
  9614. if (!parentVal) {
  9615. return childVal
  9616. }
  9617. // when parentVal & childVal are both present,
  9618. // we need to return a function that returns the
  9619. // merged result of both functions... no need to
  9620. // check if parentVal is a function here because
  9621. // it has to be a function to pass previous merges.
  9622. return function mergedDataFn () {
  9623. return mergeData(
  9624. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  9625. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  9626. )
  9627. }
  9628. } else {
  9629. return function mergedInstanceDataFn () {
  9630. // instance merge
  9631. var instanceData = typeof childVal === 'function'
  9632. ? childVal.call(vm, vm)
  9633. : childVal;
  9634. var defaultData = typeof parentVal === 'function'
  9635. ? parentVal.call(vm, vm)
  9636. : parentVal;
  9637. if (instanceData) {
  9638. return mergeData(instanceData, defaultData)
  9639. } else {
  9640. return defaultData
  9641. }
  9642. }
  9643. }
  9644. }
  9645. strats.data = function (
  9646. parentVal,
  9647. childVal,
  9648. vm
  9649. ) {
  9650. if (!vm) {
  9651. if (childVal && typeof childVal !== 'function') {
  9652. true && warn(
  9653. 'The "data" option should be a function ' +
  9654. 'that returns a per-instance value in component ' +
  9655. 'definitions.',
  9656. vm
  9657. );
  9658. return parentVal
  9659. }
  9660. return mergeDataOrFn(parentVal, childVal)
  9661. }
  9662. return mergeDataOrFn(parentVal, childVal, vm)
  9663. };
  9664. /**
  9665. * Hooks and props are merged as arrays.
  9666. */
  9667. function mergeHook (
  9668. parentVal,
  9669. childVal
  9670. ) {
  9671. var res = childVal
  9672. ? parentVal
  9673. ? parentVal.concat(childVal)
  9674. : Array.isArray(childVal)
  9675. ? childVal
  9676. : [childVal]
  9677. : parentVal;
  9678. return res
  9679. ? dedupeHooks(res)
  9680. : res
  9681. }
  9682. function dedupeHooks (hooks) {
  9683. var res = [];
  9684. for (var i = 0; i < hooks.length; i++) {
  9685. if (res.indexOf(hooks[i]) === -1) {
  9686. res.push(hooks[i]);
  9687. }
  9688. }
  9689. return res
  9690. }
  9691. LIFECYCLE_HOOKS.forEach(function (hook) {
  9692. strats[hook] = mergeHook;
  9693. });
  9694. /**
  9695. * Assets
  9696. *
  9697. * When a vm is present (instance creation), we need to do
  9698. * a three-way merge between constructor options, instance
  9699. * options and parent options.
  9700. */
  9701. function mergeAssets (
  9702. parentVal,
  9703. childVal,
  9704. vm,
  9705. key
  9706. ) {
  9707. var res = Object.create(parentVal || null);
  9708. if (childVal) {
  9709. true && assertObjectType(key, childVal, vm);
  9710. return extend(res, childVal)
  9711. } else {
  9712. return res
  9713. }
  9714. }
  9715. ASSET_TYPES.forEach(function (type) {
  9716. strats[type + 's'] = mergeAssets;
  9717. });
  9718. /**
  9719. * Watchers.
  9720. *
  9721. * Watchers hashes should not overwrite one
  9722. * another, so we merge them as arrays.
  9723. */
  9724. strats.watch = function (
  9725. parentVal,
  9726. childVal,
  9727. vm,
  9728. key
  9729. ) {
  9730. // work around Firefox's Object.prototype.watch...
  9731. if (parentVal === nativeWatch) { parentVal = undefined; }
  9732. if (childVal === nativeWatch) { childVal = undefined; }
  9733. /* istanbul ignore if */
  9734. if (!childVal) { return Object.create(parentVal || null) }
  9735. if (true) {
  9736. assertObjectType(key, childVal, vm);
  9737. }
  9738. if (!parentVal) { return childVal }
  9739. var ret = {};
  9740. extend(ret, parentVal);
  9741. for (var key$1 in childVal) {
  9742. var parent = ret[key$1];
  9743. var child = childVal[key$1];
  9744. if (parent && !Array.isArray(parent)) {
  9745. parent = [parent];
  9746. }
  9747. ret[key$1] = parent
  9748. ? parent.concat(child)
  9749. : Array.isArray(child) ? child : [child];
  9750. }
  9751. return ret
  9752. };
  9753. /**
  9754. * Other object hashes.
  9755. */
  9756. strats.props =
  9757. strats.methods =
  9758. strats.inject =
  9759. strats.computed = function (
  9760. parentVal,
  9761. childVal,
  9762. vm,
  9763. key
  9764. ) {
  9765. if (childVal && "development" !== 'production') {
  9766. assertObjectType(key, childVal, vm);
  9767. }
  9768. if (!parentVal) { return childVal }
  9769. var ret = Object.create(null);
  9770. extend(ret, parentVal);
  9771. if (childVal) { extend(ret, childVal); }
  9772. return ret
  9773. };
  9774. strats.provide = mergeDataOrFn;
  9775. /**
  9776. * Default strategy.
  9777. */
  9778. var defaultStrat = function (parentVal, childVal) {
  9779. return childVal === undefined
  9780. ? parentVal
  9781. : childVal
  9782. };
  9783. /**
  9784. * Validate component names
  9785. */
  9786. function checkComponents (options) {
  9787. for (var key in options.components) {
  9788. validateComponentName(key);
  9789. }
  9790. }
  9791. function validateComponentName (name) {
  9792. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  9793. warn(
  9794. 'Invalid component name: "' + name + '". Component names ' +
  9795. 'should conform to valid custom element name in html5 specification.'
  9796. );
  9797. }
  9798. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  9799. warn(
  9800. 'Do not use built-in or reserved HTML elements as component ' +
  9801. 'id: ' + name
  9802. );
  9803. }
  9804. }
  9805. /**
  9806. * Ensure all props option syntax are normalized into the
  9807. * Object-based format.
  9808. */
  9809. function normalizeProps (options, vm) {
  9810. var props = options.props;
  9811. if (!props) { return }
  9812. var res = {};
  9813. var i, val, name;
  9814. if (Array.isArray(props)) {
  9815. i = props.length;
  9816. while (i--) {
  9817. val = props[i];
  9818. if (typeof val === 'string') {
  9819. name = camelize(val);
  9820. res[name] = { type: null };
  9821. } else if (true) {
  9822. warn('props must be strings when using array syntax.');
  9823. }
  9824. }
  9825. } else if (isPlainObject(props)) {
  9826. for (var key in props) {
  9827. val = props[key];
  9828. name = camelize(key);
  9829. res[name] = isPlainObject(val)
  9830. ? val
  9831. : { type: val };
  9832. }
  9833. } else if (true) {
  9834. warn(
  9835. "Invalid value for option \"props\": expected an Array or an Object, " +
  9836. "but got " + (toRawType(props)) + ".",
  9837. vm
  9838. );
  9839. }
  9840. options.props = res;
  9841. }
  9842. /**
  9843. * Normalize all injections into Object-based format
  9844. */
  9845. function normalizeInject (options, vm) {
  9846. var inject = options.inject;
  9847. if (!inject) { return }
  9848. var normalized = options.inject = {};
  9849. if (Array.isArray(inject)) {
  9850. for (var i = 0; i < inject.length; i++) {
  9851. normalized[inject[i]] = { from: inject[i] };
  9852. }
  9853. } else if (isPlainObject(inject)) {
  9854. for (var key in inject) {
  9855. var val = inject[key];
  9856. normalized[key] = isPlainObject(val)
  9857. ? extend({ from: key }, val)
  9858. : { from: val };
  9859. }
  9860. } else if (true) {
  9861. warn(
  9862. "Invalid value for option \"inject\": expected an Array or an Object, " +
  9863. "but got " + (toRawType(inject)) + ".",
  9864. vm
  9865. );
  9866. }
  9867. }
  9868. /**
  9869. * Normalize raw function directives into object format.
  9870. */
  9871. function normalizeDirectives (options) {
  9872. var dirs = options.directives;
  9873. if (dirs) {
  9874. for (var key in dirs) {
  9875. var def$$1 = dirs[key];
  9876. if (typeof def$$1 === 'function') {
  9877. dirs[key] = { bind: def$$1, update: def$$1 };
  9878. }
  9879. }
  9880. }
  9881. }
  9882. function assertObjectType (name, value, vm) {
  9883. if (!isPlainObject(value)) {
  9884. warn(
  9885. "Invalid value for option \"" + name + "\": expected an Object, " +
  9886. "but got " + (toRawType(value)) + ".",
  9887. vm
  9888. );
  9889. }
  9890. }
  9891. /**
  9892. * Merge two option objects into a new one.
  9893. * Core utility used in both instantiation and inheritance.
  9894. */
  9895. function mergeOptions (
  9896. parent,
  9897. child,
  9898. vm
  9899. ) {
  9900. if (true) {
  9901. checkComponents(child);
  9902. }
  9903. if (typeof child === 'function') {
  9904. child = child.options;
  9905. }
  9906. normalizeProps(child, vm);
  9907. normalizeInject(child, vm);
  9908. normalizeDirectives(child);
  9909. // Apply extends and mixins on the child options,
  9910. // but only if it is a raw options object that isn't
  9911. // the result of another mergeOptions call.
  9912. // Only merged options has the _base property.
  9913. if (!child._base) {
  9914. if (child.extends) {
  9915. parent = mergeOptions(parent, child.extends, vm);
  9916. }
  9917. if (child.mixins) {
  9918. for (var i = 0, l = child.mixins.length; i < l; i++) {
  9919. parent = mergeOptions(parent, child.mixins[i], vm);
  9920. }
  9921. }
  9922. }
  9923. var options = {};
  9924. var key;
  9925. for (key in parent) {
  9926. mergeField(key);
  9927. }
  9928. for (key in child) {
  9929. if (!hasOwn(parent, key)) {
  9930. mergeField(key);
  9931. }
  9932. }
  9933. function mergeField (key) {
  9934. var strat = strats[key] || defaultStrat;
  9935. options[key] = strat(parent[key], child[key], vm, key);
  9936. }
  9937. return options
  9938. }
  9939. /**
  9940. * Resolve an asset.
  9941. * This function is used because child instances need access
  9942. * to assets defined in its ancestor chain.
  9943. */
  9944. function resolveAsset (
  9945. options,
  9946. type,
  9947. id,
  9948. warnMissing
  9949. ) {
  9950. /* istanbul ignore if */
  9951. if (typeof id !== 'string') {
  9952. return
  9953. }
  9954. var assets = options[type];
  9955. // check local registration variations first
  9956. if (hasOwn(assets, id)) { return assets[id] }
  9957. var camelizedId = camelize(id);
  9958. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  9959. var PascalCaseId = capitalize(camelizedId);
  9960. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  9961. // fallback to prototype chain
  9962. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  9963. if ( true && warnMissing && !res) {
  9964. warn(
  9965. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  9966. options
  9967. );
  9968. }
  9969. return res
  9970. }
  9971. /* */
  9972. function validateProp (
  9973. key,
  9974. propOptions,
  9975. propsData,
  9976. vm
  9977. ) {
  9978. var prop = propOptions[key];
  9979. var absent = !hasOwn(propsData, key);
  9980. var value = propsData[key];
  9981. // boolean casting
  9982. var booleanIndex = getTypeIndex(Boolean, prop.type);
  9983. if (booleanIndex > -1) {
  9984. if (absent && !hasOwn(prop, 'default')) {
  9985. value = false;
  9986. } else if (value === '' || value === hyphenate(key)) {
  9987. // only cast empty string / same name to boolean if
  9988. // boolean has higher priority
  9989. var stringIndex = getTypeIndex(String, prop.type);
  9990. if (stringIndex < 0 || booleanIndex < stringIndex) {
  9991. value = true;
  9992. }
  9993. }
  9994. }
  9995. // check default value
  9996. if (value === undefined) {
  9997. value = getPropDefaultValue(vm, prop, key);
  9998. // since the default value is a fresh copy,
  9999. // make sure to observe it.
  10000. var prevShouldObserve = shouldObserve;
  10001. toggleObserving(true);
  10002. observe(value);
  10003. toggleObserving(prevShouldObserve);
  10004. }
  10005. if (
  10006. true
  10007. ) {
  10008. assertProp(prop, key, value, vm, absent);
  10009. }
  10010. return value
  10011. }
  10012. /**
  10013. * Get the default value of a prop.
  10014. */
  10015. function getPropDefaultValue (vm, prop, key) {
  10016. // no default, return undefined
  10017. if (!hasOwn(prop, 'default')) {
  10018. return undefined
  10019. }
  10020. var def = prop.default;
  10021. // warn against non-factory defaults for Object & Array
  10022. if ( true && isObject(def)) {
  10023. warn(
  10024. 'Invalid default value for prop "' + key + '": ' +
  10025. 'Props with type Object/Array must use a factory function ' +
  10026. 'to return the default value.',
  10027. vm
  10028. );
  10029. }
  10030. // the raw prop value was also undefined from previous render,
  10031. // return previous default value to avoid unnecessary watcher trigger
  10032. if (vm && vm.$options.propsData &&
  10033. vm.$options.propsData[key] === undefined &&
  10034. vm._props[key] !== undefined
  10035. ) {
  10036. return vm._props[key]
  10037. }
  10038. // call factory function for non-Function types
  10039. // a value is Function if its prototype is function even across different execution context
  10040. return typeof def === 'function' && getType(prop.type) !== 'Function'
  10041. ? def.call(vm)
  10042. : def
  10043. }
  10044. /**
  10045. * Assert whether a prop is valid.
  10046. */
  10047. function assertProp (
  10048. prop,
  10049. name,
  10050. value,
  10051. vm,
  10052. absent
  10053. ) {
  10054. if (prop.required && absent) {
  10055. warn(
  10056. 'Missing required prop: "' + name + '"',
  10057. vm
  10058. );
  10059. return
  10060. }
  10061. if (value == null && !prop.required) {
  10062. return
  10063. }
  10064. var type = prop.type;
  10065. var valid = !type || type === true;
  10066. var expectedTypes = [];
  10067. if (type) {
  10068. if (!Array.isArray(type)) {
  10069. type = [type];
  10070. }
  10071. for (var i = 0; i < type.length && !valid; i++) {
  10072. var assertedType = assertType(value, type[i]);
  10073. expectedTypes.push(assertedType.expectedType || '');
  10074. valid = assertedType.valid;
  10075. }
  10076. }
  10077. if (!valid) {
  10078. warn(
  10079. getInvalidTypeMessage(name, value, expectedTypes),
  10080. vm
  10081. );
  10082. return
  10083. }
  10084. var validator = prop.validator;
  10085. if (validator) {
  10086. if (!validator(value)) {
  10087. warn(
  10088. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  10089. vm
  10090. );
  10091. }
  10092. }
  10093. }
  10094. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  10095. function assertType (value, type) {
  10096. var valid;
  10097. var expectedType = getType(type);
  10098. if (simpleCheckRE.test(expectedType)) {
  10099. var t = typeof value;
  10100. valid = t === expectedType.toLowerCase();
  10101. // for primitive wrapper objects
  10102. if (!valid && t === 'object') {
  10103. valid = value instanceof type;
  10104. }
  10105. } else if (expectedType === 'Object') {
  10106. valid = isPlainObject(value);
  10107. } else if (expectedType === 'Array') {
  10108. valid = Array.isArray(value);
  10109. } else {
  10110. valid = value instanceof type;
  10111. }
  10112. return {
  10113. valid: valid,
  10114. expectedType: expectedType
  10115. }
  10116. }
  10117. /**
  10118. * Use function string name to check built-in types,
  10119. * because a simple equality check will fail when running
  10120. * across different vms / iframes.
  10121. */
  10122. function getType (fn) {
  10123. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  10124. return match ? match[1] : ''
  10125. }
  10126. function isSameType (a, b) {
  10127. return getType(a) === getType(b)
  10128. }
  10129. function getTypeIndex (type, expectedTypes) {
  10130. if (!Array.isArray(expectedTypes)) {
  10131. return isSameType(expectedTypes, type) ? 0 : -1
  10132. }
  10133. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  10134. if (isSameType(expectedTypes[i], type)) {
  10135. return i
  10136. }
  10137. }
  10138. return -1
  10139. }
  10140. function getInvalidTypeMessage (name, value, expectedTypes) {
  10141. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  10142. " Expected " + (expectedTypes.map(capitalize).join(', '));
  10143. var expectedType = expectedTypes[0];
  10144. var receivedType = toRawType(value);
  10145. var expectedValue = styleValue(value, expectedType);
  10146. var receivedValue = styleValue(value, receivedType);
  10147. // check if we need to specify expected value
  10148. if (expectedTypes.length === 1 &&
  10149. isExplicable(expectedType) &&
  10150. !isBoolean(expectedType, receivedType)) {
  10151. message += " with value " + expectedValue;
  10152. }
  10153. message += ", got " + receivedType + " ";
  10154. // check if we need to specify received value
  10155. if (isExplicable(receivedType)) {
  10156. message += "with value " + receivedValue + ".";
  10157. }
  10158. return message
  10159. }
  10160. function styleValue (value, type) {
  10161. if (type === 'String') {
  10162. return ("\"" + value + "\"")
  10163. } else if (type === 'Number') {
  10164. return ("" + (Number(value)))
  10165. } else {
  10166. return ("" + value)
  10167. }
  10168. }
  10169. function isExplicable (value) {
  10170. var explicitTypes = ['string', 'number', 'boolean'];
  10171. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  10172. }
  10173. function isBoolean () {
  10174. var args = [], len = arguments.length;
  10175. while ( len-- ) args[ len ] = arguments[ len ];
  10176. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  10177. }
  10178. /* */
  10179. function handleError (err, vm, info) {
  10180. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  10181. // See: https://github.com/vuejs/vuex/issues/1505
  10182. pushTarget();
  10183. try {
  10184. if (vm) {
  10185. var cur = vm;
  10186. while ((cur = cur.$parent)) {
  10187. var hooks = cur.$options.errorCaptured;
  10188. if (hooks) {
  10189. for (var i = 0; i < hooks.length; i++) {
  10190. try {
  10191. var capture = hooks[i].call(cur, err, vm, info) === false;
  10192. if (capture) { return }
  10193. } catch (e) {
  10194. globalHandleError(e, cur, 'errorCaptured hook');
  10195. }
  10196. }
  10197. }
  10198. }
  10199. }
  10200. globalHandleError(err, vm, info);
  10201. } finally {
  10202. popTarget();
  10203. }
  10204. }
  10205. function invokeWithErrorHandling (
  10206. handler,
  10207. context,
  10208. args,
  10209. vm,
  10210. info
  10211. ) {
  10212. var res;
  10213. try {
  10214. res = args ? handler.apply(context, args) : handler.call(context);
  10215. if (res && !res._isVue && isPromise(res) && !res._handled) {
  10216. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  10217. // issue #9511
  10218. // avoid catch triggering multiple times when nested calls
  10219. res._handled = true;
  10220. }
  10221. } catch (e) {
  10222. handleError(e, vm, info);
  10223. }
  10224. return res
  10225. }
  10226. function globalHandleError (err, vm, info) {
  10227. if (config.errorHandler) {
  10228. try {
  10229. return config.errorHandler.call(null, err, vm, info)
  10230. } catch (e) {
  10231. // if the user intentionally throws the original error in the handler,
  10232. // do not log it twice
  10233. if (e !== err) {
  10234. logError(e, null, 'config.errorHandler');
  10235. }
  10236. }
  10237. }
  10238. logError(err, vm, info);
  10239. }
  10240. function logError (err, vm, info) {
  10241. if (true) {
  10242. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  10243. }
  10244. /* istanbul ignore else */
  10245. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  10246. console.error(err);
  10247. } else {
  10248. throw err
  10249. }
  10250. }
  10251. /* */
  10252. var callbacks = [];
  10253. var pending = false;
  10254. function flushCallbacks () {
  10255. pending = false;
  10256. var copies = callbacks.slice(0);
  10257. callbacks.length = 0;
  10258. for (var i = 0; i < copies.length; i++) {
  10259. copies[i]();
  10260. }
  10261. }
  10262. // Here we have async deferring wrappers using microtasks.
  10263. // In 2.5 we used (macro) tasks (in combination with microtasks).
  10264. // However, it has subtle problems when state is changed right before repaint
  10265. // (e.g. #6813, out-in transitions).
  10266. // Also, using (macro) tasks in event handler would cause some weird behaviors
  10267. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  10268. // So we now use microtasks everywhere, again.
  10269. // A major drawback of this tradeoff is that there are some scenarios
  10270. // where microtasks have too high a priority and fire in between supposedly
  10271. // sequential events (e.g. #4521, #6690, which have workarounds)
  10272. // or even between bubbling of the same event (#6566).
  10273. var timerFunc;
  10274. // The nextTick behavior leverages the microtask queue, which can be accessed
  10275. // via either native Promise.then or MutationObserver.
  10276. // MutationObserver has wider support, however it is seriously bugged in
  10277. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  10278. // completely stops working after triggering a few times... so, if native
  10279. // Promise is available, we will use it:
  10280. /* istanbul ignore next, $flow-disable-line */
  10281. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  10282. var p = Promise.resolve();
  10283. timerFunc = function () {
  10284. p.then(flushCallbacks);
  10285. // In problematic UIWebViews, Promise.then doesn't completely break, but
  10286. // it can get stuck in a weird state where callbacks are pushed into the
  10287. // microtask queue but the queue isn't being flushed, until the browser
  10288. // needs to do some other work, e.g. handle a timer. Therefore we can
  10289. // "force" the microtask queue to be flushed by adding an empty timer.
  10290. if (isIOS) { setTimeout(noop); }
  10291. };
  10292. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  10293. isNative(MutationObserver) ||
  10294. // PhantomJS and iOS 7.x
  10295. MutationObserver.toString() === '[object MutationObserverConstructor]'
  10296. )) {
  10297. // Use MutationObserver where native Promise is not available,
  10298. // e.g. PhantomJS, iOS7, Android 4.4
  10299. // (#6466 MutationObserver is unreliable in IE11)
  10300. var counter = 1;
  10301. var observer = new MutationObserver(flushCallbacks);
  10302. var textNode = document.createTextNode(String(counter));
  10303. observer.observe(textNode, {
  10304. characterData: true
  10305. });
  10306. timerFunc = function () {
  10307. counter = (counter + 1) % 2;
  10308. textNode.data = String(counter);
  10309. };
  10310. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  10311. // Fallback to setImmediate.
  10312. // Technically it leverages the (macro) task queue,
  10313. // but it is still a better choice than setTimeout.
  10314. timerFunc = function () {
  10315. setImmediate(flushCallbacks);
  10316. };
  10317. } else {
  10318. // Fallback to setTimeout.
  10319. timerFunc = function () {
  10320. setTimeout(flushCallbacks, 0);
  10321. };
  10322. }
  10323. function nextTick (cb, ctx) {
  10324. var _resolve;
  10325. callbacks.push(function () {
  10326. if (cb) {
  10327. try {
  10328. cb.call(ctx);
  10329. } catch (e) {
  10330. handleError(e, ctx, 'nextTick');
  10331. }
  10332. } else if (_resolve) {
  10333. _resolve(ctx);
  10334. }
  10335. });
  10336. if (!pending) {
  10337. pending = true;
  10338. timerFunc();
  10339. }
  10340. // $flow-disable-line
  10341. if (!cb && typeof Promise !== 'undefined') {
  10342. return new Promise(function (resolve) {
  10343. _resolve = resolve;
  10344. })
  10345. }
  10346. }
  10347. /* */
  10348. /* not type checking this file because flow doesn't play well with Proxy */
  10349. var initProxy;
  10350. if (true) {
  10351. var allowedGlobals = makeMap(
  10352. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  10353. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  10354. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  10355. 'require' // for Webpack/Browserify
  10356. );
  10357. var warnNonPresent = function (target, key) {
  10358. warn(
  10359. "Property or method \"" + key + "\" is not defined on the instance but " +
  10360. 'referenced during render. Make sure that this property is reactive, ' +
  10361. 'either in the data option, or for class-based components, by ' +
  10362. 'initializing the property. ' +
  10363. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  10364. target
  10365. );
  10366. };
  10367. var warnReservedPrefix = function (target, key) {
  10368. warn(
  10369. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  10370. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  10371. 'prevent conflicts with Vue internals. ' +
  10372. 'See: https://vuejs.org/v2/api/#data',
  10373. target
  10374. );
  10375. };
  10376. var hasProxy =
  10377. typeof Proxy !== 'undefined' && isNative(Proxy);
  10378. if (hasProxy) {
  10379. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  10380. config.keyCodes = new Proxy(config.keyCodes, {
  10381. set: function set (target, key, value) {
  10382. if (isBuiltInModifier(key)) {
  10383. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  10384. return false
  10385. } else {
  10386. target[key] = value;
  10387. return true
  10388. }
  10389. }
  10390. });
  10391. }
  10392. var hasHandler = {
  10393. has: function has (target, key) {
  10394. var has = key in target;
  10395. var isAllowed = allowedGlobals(key) ||
  10396. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  10397. if (!has && !isAllowed) {
  10398. if (key in target.$data) { warnReservedPrefix(target, key); }
  10399. else { warnNonPresent(target, key); }
  10400. }
  10401. return has || !isAllowed
  10402. }
  10403. };
  10404. var getHandler = {
  10405. get: function get (target, key) {
  10406. if (typeof key === 'string' && !(key in target)) {
  10407. if (key in target.$data) { warnReservedPrefix(target, key); }
  10408. else { warnNonPresent(target, key); }
  10409. }
  10410. return target[key]
  10411. }
  10412. };
  10413. initProxy = function initProxy (vm) {
  10414. if (hasProxy) {
  10415. // determine which proxy handler to use
  10416. var options = vm.$options;
  10417. var handlers = options.render && options.render._withStripped
  10418. ? getHandler
  10419. : hasHandler;
  10420. vm._renderProxy = new Proxy(vm, handlers);
  10421. } else {
  10422. vm._renderProxy = vm;
  10423. }
  10424. };
  10425. }
  10426. /* */
  10427. var seenObjects = new _Set();
  10428. /**
  10429. * Recursively traverse an object to evoke all converted
  10430. * getters, so that every nested property inside the object
  10431. * is collected as a "deep" dependency.
  10432. */
  10433. function traverse (val) {
  10434. _traverse(val, seenObjects);
  10435. seenObjects.clear();
  10436. }
  10437. function _traverse (val, seen) {
  10438. var i, keys;
  10439. var isA = Array.isArray(val);
  10440. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  10441. return
  10442. }
  10443. if (val.__ob__) {
  10444. var depId = val.__ob__.dep.id;
  10445. if (seen.has(depId)) {
  10446. return
  10447. }
  10448. seen.add(depId);
  10449. }
  10450. if (isA) {
  10451. i = val.length;
  10452. while (i--) { _traverse(val[i], seen); }
  10453. } else {
  10454. keys = Object.keys(val);
  10455. i = keys.length;
  10456. while (i--) { _traverse(val[keys[i]], seen); }
  10457. }
  10458. }
  10459. var mark;
  10460. var measure;
  10461. if (true) {
  10462. var perf = inBrowser && window.performance;
  10463. /* istanbul ignore if */
  10464. if (
  10465. perf &&
  10466. perf.mark &&
  10467. perf.measure &&
  10468. perf.clearMarks &&
  10469. perf.clearMeasures
  10470. ) {
  10471. mark = function (tag) { return perf.mark(tag); };
  10472. measure = function (name, startTag, endTag) {
  10473. perf.measure(name, startTag, endTag);
  10474. perf.clearMarks(startTag);
  10475. perf.clearMarks(endTag);
  10476. // perf.clearMeasures(name)
  10477. };
  10478. }
  10479. }
  10480. /* */
  10481. var normalizeEvent = cached(function (name) {
  10482. var passive = name.charAt(0) === '&';
  10483. name = passive ? name.slice(1) : name;
  10484. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  10485. name = once$$1 ? name.slice(1) : name;
  10486. var capture = name.charAt(0) === '!';
  10487. name = capture ? name.slice(1) : name;
  10488. return {
  10489. name: name,
  10490. once: once$$1,
  10491. capture: capture,
  10492. passive: passive
  10493. }
  10494. });
  10495. function createFnInvoker (fns, vm) {
  10496. function invoker () {
  10497. var arguments$1 = arguments;
  10498. var fns = invoker.fns;
  10499. if (Array.isArray(fns)) {
  10500. var cloned = fns.slice();
  10501. for (var i = 0; i < cloned.length; i++) {
  10502. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  10503. }
  10504. } else {
  10505. // return handler return value for single handlers
  10506. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  10507. }
  10508. }
  10509. invoker.fns = fns;
  10510. return invoker
  10511. }
  10512. function updateListeners (
  10513. on,
  10514. oldOn,
  10515. add,
  10516. remove$$1,
  10517. createOnceHandler,
  10518. vm
  10519. ) {
  10520. var name, def$$1, cur, old, event;
  10521. for (name in on) {
  10522. def$$1 = cur = on[name];
  10523. old = oldOn[name];
  10524. event = normalizeEvent(name);
  10525. if (isUndef(cur)) {
  10526. true && warn(
  10527. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  10528. vm
  10529. );
  10530. } else if (isUndef(old)) {
  10531. if (isUndef(cur.fns)) {
  10532. cur = on[name] = createFnInvoker(cur, vm);
  10533. }
  10534. if (isTrue(event.once)) {
  10535. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  10536. }
  10537. add(event.name, cur, event.capture, event.passive, event.params);
  10538. } else if (cur !== old) {
  10539. old.fns = cur;
  10540. on[name] = old;
  10541. }
  10542. }
  10543. for (name in oldOn) {
  10544. if (isUndef(on[name])) {
  10545. event = normalizeEvent(name);
  10546. remove$$1(event.name, oldOn[name], event.capture);
  10547. }
  10548. }
  10549. }
  10550. /* */
  10551. /* */
  10552. // fixed by xxxxxx (mp properties)
  10553. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  10554. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  10555. if (isUndef(propOptions)) {
  10556. return res
  10557. }
  10558. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  10559. var attrs = data.attrs;
  10560. var props = data.props;
  10561. if (isDef(attrs) || isDef(props)) {
  10562. for (var key in propOptions) {
  10563. var altKey = hyphenate(key);
  10564. var result = checkProp(res, props, key, altKey, true) ||
  10565. checkProp(res, attrs, key, altKey, false);
  10566. // externalClass
  10567. if (
  10568. result &&
  10569. res[key] &&
  10570. externalClasses.indexOf(altKey) !== -1 &&
  10571. context[camelize(res[key])]
  10572. ) {
  10573. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  10574. res[key] = context[camelize(res[key])];
  10575. }
  10576. }
  10577. }
  10578. return res
  10579. }
  10580. function extractPropsFromVNodeData (
  10581. data,
  10582. Ctor,
  10583. tag,
  10584. context// fixed by xxxxxx
  10585. ) {
  10586. // we are only extracting raw values here.
  10587. // validation and default values are handled in the child
  10588. // component itself.
  10589. var propOptions = Ctor.options.props;
  10590. if (isUndef(propOptions)) {
  10591. // fixed by xxxxxx
  10592. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  10593. }
  10594. var res = {};
  10595. var attrs = data.attrs;
  10596. var props = data.props;
  10597. if (isDef(attrs) || isDef(props)) {
  10598. for (var key in propOptions) {
  10599. var altKey = hyphenate(key);
  10600. if (true) {
  10601. var keyInLowerCase = key.toLowerCase();
  10602. if (
  10603. key !== keyInLowerCase &&
  10604. attrs && hasOwn(attrs, keyInLowerCase)
  10605. ) {
  10606. tip(
  10607. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  10608. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  10609. " \"" + key + "\". " +
  10610. "Note that HTML attributes are case-insensitive and camelCased " +
  10611. "props need to use their kebab-case equivalents when using in-DOM " +
  10612. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  10613. );
  10614. }
  10615. }
  10616. checkProp(res, props, key, altKey, true) ||
  10617. checkProp(res, attrs, key, altKey, false);
  10618. }
  10619. }
  10620. // fixed by xxxxxx
  10621. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  10622. }
  10623. function checkProp (
  10624. res,
  10625. hash,
  10626. key,
  10627. altKey,
  10628. preserve
  10629. ) {
  10630. if (isDef(hash)) {
  10631. if (hasOwn(hash, key)) {
  10632. res[key] = hash[key];
  10633. if (!preserve) {
  10634. delete hash[key];
  10635. }
  10636. return true
  10637. } else if (hasOwn(hash, altKey)) {
  10638. res[key] = hash[altKey];
  10639. if (!preserve) {
  10640. delete hash[altKey];
  10641. }
  10642. return true
  10643. }
  10644. }
  10645. return false
  10646. }
  10647. /* */
  10648. // The template compiler attempts to minimize the need for normalization by
  10649. // statically analyzing the template at compile time.
  10650. //
  10651. // For plain HTML markup, normalization can be completely skipped because the
  10652. // generated render function is guaranteed to return Array<VNode>. There are
  10653. // two cases where extra normalization is needed:
  10654. // 1. When the children contains components - because a functional component
  10655. // may return an Array instead of a single root. In this case, just a simple
  10656. // normalization is needed - if any child is an Array, we flatten the whole
  10657. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  10658. // because functional components already normalize their own children.
  10659. function simpleNormalizeChildren (children) {
  10660. for (var i = 0; i < children.length; i++) {
  10661. if (Array.isArray(children[i])) {
  10662. return Array.prototype.concat.apply([], children)
  10663. }
  10664. }
  10665. return children
  10666. }
  10667. // 2. When the children contains constructs that always generated nested Arrays,
  10668. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  10669. // with hand-written render functions / JSX. In such cases a full normalization
  10670. // is needed to cater to all possible types of children values.
  10671. function normalizeChildren (children) {
  10672. return isPrimitive(children)
  10673. ? [createTextVNode(children)]
  10674. : Array.isArray(children)
  10675. ? normalizeArrayChildren(children)
  10676. : undefined
  10677. }
  10678. function isTextNode (node) {
  10679. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  10680. }
  10681. function normalizeArrayChildren (children, nestedIndex) {
  10682. var res = [];
  10683. var i, c, lastIndex, last;
  10684. for (i = 0; i < children.length; i++) {
  10685. c = children[i];
  10686. if (isUndef(c) || typeof c === 'boolean') { continue }
  10687. lastIndex = res.length - 1;
  10688. last = res[lastIndex];
  10689. // nested
  10690. if (Array.isArray(c)) {
  10691. if (c.length > 0) {
  10692. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  10693. // merge adjacent text nodes
  10694. if (isTextNode(c[0]) && isTextNode(last)) {
  10695. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  10696. c.shift();
  10697. }
  10698. res.push.apply(res, c);
  10699. }
  10700. } else if (isPrimitive(c)) {
  10701. if (isTextNode(last)) {
  10702. // merge adjacent text nodes
  10703. // this is necessary for SSR hydration because text nodes are
  10704. // essentially merged when rendered to HTML strings
  10705. res[lastIndex] = createTextVNode(last.text + c);
  10706. } else if (c !== '') {
  10707. // convert primitive to vnode
  10708. res.push(createTextVNode(c));
  10709. }
  10710. } else {
  10711. if (isTextNode(c) && isTextNode(last)) {
  10712. // merge adjacent text nodes
  10713. res[lastIndex] = createTextVNode(last.text + c.text);
  10714. } else {
  10715. // default key for nested array children (likely generated by v-for)
  10716. if (isTrue(children._isVList) &&
  10717. isDef(c.tag) &&
  10718. isUndef(c.key) &&
  10719. isDef(nestedIndex)) {
  10720. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  10721. }
  10722. res.push(c);
  10723. }
  10724. }
  10725. }
  10726. return res
  10727. }
  10728. /* */
  10729. function initProvide (vm) {
  10730. var provide = vm.$options.provide;
  10731. if (provide) {
  10732. vm._provided = typeof provide === 'function'
  10733. ? provide.call(vm)
  10734. : provide;
  10735. }
  10736. }
  10737. function initInjections (vm) {
  10738. var result = resolveInject(vm.$options.inject, vm);
  10739. if (result) {
  10740. toggleObserving(false);
  10741. Object.keys(result).forEach(function (key) {
  10742. /* istanbul ignore else */
  10743. if (true) {
  10744. defineReactive$$1(vm, key, result[key], function () {
  10745. warn(
  10746. "Avoid mutating an injected value directly since the changes will be " +
  10747. "overwritten whenever the provided component re-renders. " +
  10748. "injection being mutated: \"" + key + "\"",
  10749. vm
  10750. );
  10751. });
  10752. } else {}
  10753. });
  10754. toggleObserving(true);
  10755. }
  10756. }
  10757. function resolveInject (inject, vm) {
  10758. if (inject) {
  10759. // inject is :any because flow is not smart enough to figure out cached
  10760. var result = Object.create(null);
  10761. var keys = hasSymbol
  10762. ? Reflect.ownKeys(inject)
  10763. : Object.keys(inject);
  10764. for (var i = 0; i < keys.length; i++) {
  10765. var key = keys[i];
  10766. // #6574 in case the inject object is observed...
  10767. if (key === '__ob__') { continue }
  10768. var provideKey = inject[key].from;
  10769. var source = vm;
  10770. while (source) {
  10771. if (source._provided && hasOwn(source._provided, provideKey)) {
  10772. result[key] = source._provided[provideKey];
  10773. break
  10774. }
  10775. source = source.$parent;
  10776. }
  10777. if (!source) {
  10778. if ('default' in inject[key]) {
  10779. var provideDefault = inject[key].default;
  10780. result[key] = typeof provideDefault === 'function'
  10781. ? provideDefault.call(vm)
  10782. : provideDefault;
  10783. } else if (true) {
  10784. warn(("Injection \"" + key + "\" not found"), vm);
  10785. }
  10786. }
  10787. }
  10788. return result
  10789. }
  10790. }
  10791. /* */
  10792. /**
  10793. * Runtime helper for resolving raw children VNodes into a slot object.
  10794. */
  10795. function resolveSlots (
  10796. children,
  10797. context
  10798. ) {
  10799. if (!children || !children.length) {
  10800. return {}
  10801. }
  10802. var slots = {};
  10803. for (var i = 0, l = children.length; i < l; i++) {
  10804. var child = children[i];
  10805. var data = child.data;
  10806. // remove slot attribute if the node is resolved as a Vue slot node
  10807. if (data && data.attrs && data.attrs.slot) {
  10808. delete data.attrs.slot;
  10809. }
  10810. // named slots should only be respected if the vnode was rendered in the
  10811. // same context.
  10812. if ((child.context === context || child.fnContext === context) &&
  10813. data && data.slot != null
  10814. ) {
  10815. var name = data.slot;
  10816. var slot = (slots[name] || (slots[name] = []));
  10817. if (child.tag === 'template') {
  10818. slot.push.apply(slot, child.children || []);
  10819. } else {
  10820. slot.push(child);
  10821. }
  10822. } else {
  10823. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  10824. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  10825. (slots['page'] || (slots['page'] = [])).push(child);
  10826. }else{
  10827. (slots.default || (slots.default = [])).push(child);
  10828. }
  10829. }
  10830. }
  10831. // ignore slots that contains only whitespace
  10832. for (var name$1 in slots) {
  10833. if (slots[name$1].every(isWhitespace)) {
  10834. delete slots[name$1];
  10835. }
  10836. }
  10837. return slots
  10838. }
  10839. function isWhitespace (node) {
  10840. return (node.isComment && !node.asyncFactory) || node.text === ' '
  10841. }
  10842. /* */
  10843. function normalizeScopedSlots (
  10844. slots,
  10845. normalSlots,
  10846. prevSlots
  10847. ) {
  10848. var res;
  10849. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  10850. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  10851. var key = slots && slots.$key;
  10852. if (!slots) {
  10853. res = {};
  10854. } else if (slots._normalized) {
  10855. // fast path 1: child component re-render only, parent did not change
  10856. return slots._normalized
  10857. } else if (
  10858. isStable &&
  10859. prevSlots &&
  10860. prevSlots !== emptyObject &&
  10861. key === prevSlots.$key &&
  10862. !hasNormalSlots &&
  10863. !prevSlots.$hasNormal
  10864. ) {
  10865. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  10866. // only need to normalize once
  10867. return prevSlots
  10868. } else {
  10869. res = {};
  10870. for (var key$1 in slots) {
  10871. if (slots[key$1] && key$1[0] !== '$') {
  10872. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  10873. }
  10874. }
  10875. }
  10876. // expose normal slots on scopedSlots
  10877. for (var key$2 in normalSlots) {
  10878. if (!(key$2 in res)) {
  10879. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  10880. }
  10881. }
  10882. // avoriaz seems to mock a non-extensible $scopedSlots object
  10883. // and when that is passed down this would cause an error
  10884. if (slots && Object.isExtensible(slots)) {
  10885. (slots)._normalized = res;
  10886. }
  10887. def(res, '$stable', isStable);
  10888. def(res, '$key', key);
  10889. def(res, '$hasNormal', hasNormalSlots);
  10890. return res
  10891. }
  10892. function normalizeScopedSlot(normalSlots, key, fn) {
  10893. var normalized = function () {
  10894. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  10895. res = res && typeof res === 'object' && !Array.isArray(res)
  10896. ? [res] // single vnode
  10897. : normalizeChildren(res);
  10898. return res && (
  10899. res.length === 0 ||
  10900. (res.length === 1 && res[0].isComment) // #9658
  10901. ) ? undefined
  10902. : res
  10903. };
  10904. // this is a slot using the new v-slot syntax without scope. although it is
  10905. // compiled as a scoped slot, render fn users would expect it to be present
  10906. // on this.$slots because the usage is semantically a normal slot.
  10907. if (fn.proxy) {
  10908. Object.defineProperty(normalSlots, key, {
  10909. get: normalized,
  10910. enumerable: true,
  10911. configurable: true
  10912. });
  10913. }
  10914. return normalized
  10915. }
  10916. function proxyNormalSlot(slots, key) {
  10917. return function () { return slots[key]; }
  10918. }
  10919. /* */
  10920. /**
  10921. * Runtime helper for rendering v-for lists.
  10922. */
  10923. function renderList (
  10924. val,
  10925. render
  10926. ) {
  10927. var ret, i, l, keys, key;
  10928. if (Array.isArray(val) || typeof val === 'string') {
  10929. ret = new Array(val.length);
  10930. for (i = 0, l = val.length; i < l; i++) {
  10931. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  10932. }
  10933. } else if (typeof val === 'number') {
  10934. ret = new Array(val);
  10935. for (i = 0; i < val; i++) {
  10936. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  10937. }
  10938. } else if (isObject(val)) {
  10939. if (hasSymbol && val[Symbol.iterator]) {
  10940. ret = [];
  10941. var iterator = val[Symbol.iterator]();
  10942. var result = iterator.next();
  10943. while (!result.done) {
  10944. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  10945. result = iterator.next();
  10946. }
  10947. } else {
  10948. keys = Object.keys(val);
  10949. ret = new Array(keys.length);
  10950. for (i = 0, l = keys.length; i < l; i++) {
  10951. key = keys[i];
  10952. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  10953. }
  10954. }
  10955. }
  10956. if (!isDef(ret)) {
  10957. ret = [];
  10958. }
  10959. (ret)._isVList = true;
  10960. return ret
  10961. }
  10962. /* */
  10963. /**
  10964. * Runtime helper for rendering <slot>
  10965. */
  10966. function renderSlot (
  10967. name,
  10968. fallback,
  10969. props,
  10970. bindObject
  10971. ) {
  10972. var scopedSlotFn = this.$scopedSlots[name];
  10973. var nodes;
  10974. if (scopedSlotFn) { // scoped slot
  10975. props = props || {};
  10976. if (bindObject) {
  10977. if ( true && !isObject(bindObject)) {
  10978. warn(
  10979. 'slot v-bind without argument expects an Object',
  10980. this
  10981. );
  10982. }
  10983. props = extend(extend({}, bindObject), props);
  10984. }
  10985. // fixed by xxxxxx app-plus scopedSlot
  10986. nodes = scopedSlotFn(props, this, props._i) || fallback;
  10987. } else {
  10988. nodes = this.$slots[name] || fallback;
  10989. }
  10990. var target = props && props.slot;
  10991. if (target) {
  10992. return this.$createElement('template', { slot: target }, nodes)
  10993. } else {
  10994. return nodes
  10995. }
  10996. }
  10997. /* */
  10998. /**
  10999. * Runtime helper for resolving filters
  11000. */
  11001. function resolveFilter (id) {
  11002. return resolveAsset(this.$options, 'filters', id, true) || identity
  11003. }
  11004. /* */
  11005. function isKeyNotMatch (expect, actual) {
  11006. if (Array.isArray(expect)) {
  11007. return expect.indexOf(actual) === -1
  11008. } else {
  11009. return expect !== actual
  11010. }
  11011. }
  11012. /**
  11013. * Runtime helper for checking keyCodes from config.
  11014. * exposed as Vue.prototype._k
  11015. * passing in eventKeyName as last argument separately for backwards compat
  11016. */
  11017. function checkKeyCodes (
  11018. eventKeyCode,
  11019. key,
  11020. builtInKeyCode,
  11021. eventKeyName,
  11022. builtInKeyName
  11023. ) {
  11024. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  11025. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  11026. return isKeyNotMatch(builtInKeyName, eventKeyName)
  11027. } else if (mappedKeyCode) {
  11028. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  11029. } else if (eventKeyName) {
  11030. return hyphenate(eventKeyName) !== key
  11031. }
  11032. }
  11033. /* */
  11034. /**
  11035. * Runtime helper for merging v-bind="object" into a VNode's data.
  11036. */
  11037. function bindObjectProps (
  11038. data,
  11039. tag,
  11040. value,
  11041. asProp,
  11042. isSync
  11043. ) {
  11044. if (value) {
  11045. if (!isObject(value)) {
  11046. true && warn(
  11047. 'v-bind without argument expects an Object or Array value',
  11048. this
  11049. );
  11050. } else {
  11051. if (Array.isArray(value)) {
  11052. value = toObject(value);
  11053. }
  11054. var hash;
  11055. var loop = function ( key ) {
  11056. if (
  11057. key === 'class' ||
  11058. key === 'style' ||
  11059. isReservedAttribute(key)
  11060. ) {
  11061. hash = data;
  11062. } else {
  11063. var type = data.attrs && data.attrs.type;
  11064. hash = asProp || config.mustUseProp(tag, type, key)
  11065. ? data.domProps || (data.domProps = {})
  11066. : data.attrs || (data.attrs = {});
  11067. }
  11068. var camelizedKey = camelize(key);
  11069. var hyphenatedKey = hyphenate(key);
  11070. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  11071. hash[key] = value[key];
  11072. if (isSync) {
  11073. var on = data.on || (data.on = {});
  11074. on[("update:" + key)] = function ($event) {
  11075. value[key] = $event;
  11076. };
  11077. }
  11078. }
  11079. };
  11080. for (var key in value) loop( key );
  11081. }
  11082. }
  11083. return data
  11084. }
  11085. /* */
  11086. /**
  11087. * Runtime helper for rendering static trees.
  11088. */
  11089. function renderStatic (
  11090. index,
  11091. isInFor
  11092. ) {
  11093. var cached = this._staticTrees || (this._staticTrees = []);
  11094. var tree = cached[index];
  11095. // if has already-rendered static tree and not inside v-for,
  11096. // we can reuse the same tree.
  11097. if (tree && !isInFor) {
  11098. return tree
  11099. }
  11100. // otherwise, render a fresh tree.
  11101. tree = cached[index] = this.$options.staticRenderFns[index].call(
  11102. this._renderProxy,
  11103. null,
  11104. this // for render fns generated for functional component templates
  11105. );
  11106. markStatic(tree, ("__static__" + index), false);
  11107. return tree
  11108. }
  11109. /**
  11110. * Runtime helper for v-once.
  11111. * Effectively it means marking the node as static with a unique key.
  11112. */
  11113. function markOnce (
  11114. tree,
  11115. index,
  11116. key
  11117. ) {
  11118. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  11119. return tree
  11120. }
  11121. function markStatic (
  11122. tree,
  11123. key,
  11124. isOnce
  11125. ) {
  11126. if (Array.isArray(tree)) {
  11127. for (var i = 0; i < tree.length; i++) {
  11128. if (tree[i] && typeof tree[i] !== 'string') {
  11129. markStaticNode(tree[i], (key + "_" + i), isOnce);
  11130. }
  11131. }
  11132. } else {
  11133. markStaticNode(tree, key, isOnce);
  11134. }
  11135. }
  11136. function markStaticNode (node, key, isOnce) {
  11137. node.isStatic = true;
  11138. node.key = key;
  11139. node.isOnce = isOnce;
  11140. }
  11141. /* */
  11142. function bindObjectListeners (data, value) {
  11143. if (value) {
  11144. if (!isPlainObject(value)) {
  11145. true && warn(
  11146. 'v-on without argument expects an Object value',
  11147. this
  11148. );
  11149. } else {
  11150. var on = data.on = data.on ? extend({}, data.on) : {};
  11151. for (var key in value) {
  11152. var existing = on[key];
  11153. var ours = value[key];
  11154. on[key] = existing ? [].concat(existing, ours) : ours;
  11155. }
  11156. }
  11157. }
  11158. return data
  11159. }
  11160. /* */
  11161. function resolveScopedSlots (
  11162. fns, // see flow/vnode
  11163. res,
  11164. // the following are added in 2.6
  11165. hasDynamicKeys,
  11166. contentHashKey
  11167. ) {
  11168. res = res || { $stable: !hasDynamicKeys };
  11169. for (var i = 0; i < fns.length; i++) {
  11170. var slot = fns[i];
  11171. if (Array.isArray(slot)) {
  11172. resolveScopedSlots(slot, res, hasDynamicKeys);
  11173. } else if (slot) {
  11174. // marker for reverse proxying v-slot without scope on this.$slots
  11175. if (slot.proxy) {
  11176. slot.fn.proxy = true;
  11177. }
  11178. res[slot.key] = slot.fn;
  11179. }
  11180. }
  11181. if (contentHashKey) {
  11182. (res).$key = contentHashKey;
  11183. }
  11184. return res
  11185. }
  11186. /* */
  11187. function bindDynamicKeys (baseObj, values) {
  11188. for (var i = 0; i < values.length; i += 2) {
  11189. var key = values[i];
  11190. if (typeof key === 'string' && key) {
  11191. baseObj[values[i]] = values[i + 1];
  11192. } else if ( true && key !== '' && key !== null) {
  11193. // null is a special value for explicitly removing a binding
  11194. warn(
  11195. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  11196. this
  11197. );
  11198. }
  11199. }
  11200. return baseObj
  11201. }
  11202. // helper to dynamically append modifier runtime markers to event names.
  11203. // ensure only append when value is already string, otherwise it will be cast
  11204. // to string and cause the type check to miss.
  11205. function prependModifier (value, symbol) {
  11206. return typeof value === 'string' ? symbol + value : value
  11207. }
  11208. /* */
  11209. function installRenderHelpers (target) {
  11210. target._o = markOnce;
  11211. target._n = toNumber;
  11212. target._s = toString;
  11213. target._l = renderList;
  11214. target._t = renderSlot;
  11215. target._q = looseEqual;
  11216. target._i = looseIndexOf;
  11217. target._m = renderStatic;
  11218. target._f = resolveFilter;
  11219. target._k = checkKeyCodes;
  11220. target._b = bindObjectProps;
  11221. target._v = createTextVNode;
  11222. target._e = createEmptyVNode;
  11223. target._u = resolveScopedSlots;
  11224. target._g = bindObjectListeners;
  11225. target._d = bindDynamicKeys;
  11226. target._p = prependModifier;
  11227. }
  11228. /* */
  11229. function FunctionalRenderContext (
  11230. data,
  11231. props,
  11232. children,
  11233. parent,
  11234. Ctor
  11235. ) {
  11236. var this$1 = this;
  11237. var options = Ctor.options;
  11238. // ensure the createElement function in functional components
  11239. // gets a unique context - this is necessary for correct named slot check
  11240. var contextVm;
  11241. if (hasOwn(parent, '_uid')) {
  11242. contextVm = Object.create(parent);
  11243. // $flow-disable-line
  11244. contextVm._original = parent;
  11245. } else {
  11246. // the context vm passed in is a functional context as well.
  11247. // in this case we want to make sure we are able to get a hold to the
  11248. // real context instance.
  11249. contextVm = parent;
  11250. // $flow-disable-line
  11251. parent = parent._original;
  11252. }
  11253. var isCompiled = isTrue(options._compiled);
  11254. var needNormalization = !isCompiled;
  11255. this.data = data;
  11256. this.props = props;
  11257. this.children = children;
  11258. this.parent = parent;
  11259. this.listeners = data.on || emptyObject;
  11260. this.injections = resolveInject(options.inject, parent);
  11261. this.slots = function () {
  11262. if (!this$1.$slots) {
  11263. normalizeScopedSlots(
  11264. data.scopedSlots,
  11265. this$1.$slots = resolveSlots(children, parent)
  11266. );
  11267. }
  11268. return this$1.$slots
  11269. };
  11270. Object.defineProperty(this, 'scopedSlots', ({
  11271. enumerable: true,
  11272. get: function get () {
  11273. return normalizeScopedSlots(data.scopedSlots, this.slots())
  11274. }
  11275. }));
  11276. // support for compiled functional template
  11277. if (isCompiled) {
  11278. // exposing $options for renderStatic()
  11279. this.$options = options;
  11280. // pre-resolve slots for renderSlot()
  11281. this.$slots = this.slots();
  11282. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  11283. }
  11284. if (options._scopeId) {
  11285. this._c = function (a, b, c, d) {
  11286. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  11287. if (vnode && !Array.isArray(vnode)) {
  11288. vnode.fnScopeId = options._scopeId;
  11289. vnode.fnContext = parent;
  11290. }
  11291. return vnode
  11292. };
  11293. } else {
  11294. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  11295. }
  11296. }
  11297. installRenderHelpers(FunctionalRenderContext.prototype);
  11298. function createFunctionalComponent (
  11299. Ctor,
  11300. propsData,
  11301. data,
  11302. contextVm,
  11303. children
  11304. ) {
  11305. var options = Ctor.options;
  11306. var props = {};
  11307. var propOptions = options.props;
  11308. if (isDef(propOptions)) {
  11309. for (var key in propOptions) {
  11310. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  11311. }
  11312. } else {
  11313. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  11314. if (isDef(data.props)) { mergeProps(props, data.props); }
  11315. }
  11316. var renderContext = new FunctionalRenderContext(
  11317. data,
  11318. props,
  11319. children,
  11320. contextVm,
  11321. Ctor
  11322. );
  11323. var vnode = options.render.call(null, renderContext._c, renderContext);
  11324. if (vnode instanceof VNode) {
  11325. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  11326. } else if (Array.isArray(vnode)) {
  11327. var vnodes = normalizeChildren(vnode) || [];
  11328. var res = new Array(vnodes.length);
  11329. for (var i = 0; i < vnodes.length; i++) {
  11330. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  11331. }
  11332. return res
  11333. }
  11334. }
  11335. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  11336. // #7817 clone node before setting fnContext, otherwise if the node is reused
  11337. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  11338. // that should not be matched to match.
  11339. var clone = cloneVNode(vnode);
  11340. clone.fnContext = contextVm;
  11341. clone.fnOptions = options;
  11342. if (true) {
  11343. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  11344. }
  11345. if (data.slot) {
  11346. (clone.data || (clone.data = {})).slot = data.slot;
  11347. }
  11348. return clone
  11349. }
  11350. function mergeProps (to, from) {
  11351. for (var key in from) {
  11352. to[camelize(key)] = from[key];
  11353. }
  11354. }
  11355. /* */
  11356. /* */
  11357. /* */
  11358. /* */
  11359. // inline hooks to be invoked on component VNodes during patch
  11360. var componentVNodeHooks = {
  11361. init: function init (vnode, hydrating) {
  11362. if (
  11363. vnode.componentInstance &&
  11364. !vnode.componentInstance._isDestroyed &&
  11365. vnode.data.keepAlive
  11366. ) {
  11367. // kept-alive components, treat as a patch
  11368. var mountedNode = vnode; // work around flow
  11369. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  11370. } else {
  11371. var child = vnode.componentInstance = createComponentInstanceForVnode(
  11372. vnode,
  11373. activeInstance
  11374. );
  11375. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  11376. }
  11377. },
  11378. prepatch: function prepatch (oldVnode, vnode) {
  11379. var options = vnode.componentOptions;
  11380. var child = vnode.componentInstance = oldVnode.componentInstance;
  11381. updateChildComponent(
  11382. child,
  11383. options.propsData, // updated props
  11384. options.listeners, // updated listeners
  11385. vnode, // new parent vnode
  11386. options.children // new children
  11387. );
  11388. },
  11389. insert: function insert (vnode) {
  11390. var context = vnode.context;
  11391. var componentInstance = vnode.componentInstance;
  11392. if (!componentInstance._isMounted) {
  11393. callHook(componentInstance, 'onServiceCreated');
  11394. callHook(componentInstance, 'onServiceAttached');
  11395. componentInstance._isMounted = true;
  11396. callHook(componentInstance, 'mounted');
  11397. }
  11398. if (vnode.data.keepAlive) {
  11399. if (context._isMounted) {
  11400. // vue-router#1212
  11401. // During updates, a kept-alive component's child components may
  11402. // change, so directly walking the tree here may call activated hooks
  11403. // on incorrect children. Instead we push them into a queue which will
  11404. // be processed after the whole patch process ended.
  11405. queueActivatedComponent(componentInstance);
  11406. } else {
  11407. activateChildComponent(componentInstance, true /* direct */);
  11408. }
  11409. }
  11410. },
  11411. destroy: function destroy (vnode) {
  11412. var componentInstance = vnode.componentInstance;
  11413. if (!componentInstance._isDestroyed) {
  11414. if (!vnode.data.keepAlive) {
  11415. componentInstance.$destroy();
  11416. } else {
  11417. deactivateChildComponent(componentInstance, true /* direct */);
  11418. }
  11419. }
  11420. }
  11421. };
  11422. var hooksToMerge = Object.keys(componentVNodeHooks);
  11423. function createComponent (
  11424. Ctor,
  11425. data,
  11426. context,
  11427. children,
  11428. tag
  11429. ) {
  11430. if (isUndef(Ctor)) {
  11431. return
  11432. }
  11433. var baseCtor = context.$options._base;
  11434. // plain options object: turn it into a constructor
  11435. if (isObject(Ctor)) {
  11436. Ctor = baseCtor.extend(Ctor);
  11437. }
  11438. // if at this stage it's not a constructor or an async component factory,
  11439. // reject.
  11440. if (typeof Ctor !== 'function') {
  11441. if (true) {
  11442. warn(("Invalid Component definition: " + (String(Ctor))), context);
  11443. }
  11444. return
  11445. }
  11446. // async component
  11447. var asyncFactory;
  11448. if (isUndef(Ctor.cid)) {
  11449. asyncFactory = Ctor;
  11450. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  11451. if (Ctor === undefined) {
  11452. // return a placeholder node for async component, which is rendered
  11453. // as a comment node but preserves all the raw information for the node.
  11454. // the information will be used for async server-rendering and hydration.
  11455. return createAsyncPlaceholder(
  11456. asyncFactory,
  11457. data,
  11458. context,
  11459. children,
  11460. tag
  11461. )
  11462. }
  11463. }
  11464. data = data || {};
  11465. // resolve constructor options in case global mixins are applied after
  11466. // component constructor creation
  11467. resolveConstructorOptions(Ctor);
  11468. // transform component v-model data into props & events
  11469. if (isDef(data.model)) {
  11470. transformModel(Ctor.options, data);
  11471. }
  11472. // extract props
  11473. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  11474. // functional component
  11475. if (isTrue(Ctor.options.functional)) {
  11476. return createFunctionalComponent(Ctor, propsData, data, context, children)
  11477. }
  11478. // extract listeners, since these needs to be treated as
  11479. // child component listeners instead of DOM listeners
  11480. var listeners = data.on;
  11481. // replace with listeners with .native modifier
  11482. // so it gets processed during parent component patch.
  11483. data.on = data.nativeOn;
  11484. if (isTrue(Ctor.options.abstract)) {
  11485. // abstract components do not keep anything
  11486. // other than props & listeners & slot
  11487. // work around flow
  11488. var slot = data.slot;
  11489. data = {};
  11490. if (slot) {
  11491. data.slot = slot;
  11492. }
  11493. }
  11494. // install component management hooks onto the placeholder node
  11495. installComponentHooks(data);
  11496. // return a placeholder vnode
  11497. var name = Ctor.options.name || tag;
  11498. var vnode = new VNode(
  11499. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  11500. data, undefined, undefined, undefined, context,
  11501. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  11502. asyncFactory
  11503. );
  11504. return vnode
  11505. }
  11506. function createComponentInstanceForVnode (
  11507. vnode, // we know it's MountedComponentVNode but flow doesn't
  11508. parent // activeInstance in lifecycle state
  11509. ) {
  11510. var options = {
  11511. _isComponent: true,
  11512. _parentVnode: vnode,
  11513. parent: parent
  11514. };
  11515. // check inline-template render functions
  11516. var inlineTemplate = vnode.data.inlineTemplate;
  11517. if (isDef(inlineTemplate)) {
  11518. options.render = inlineTemplate.render;
  11519. options.staticRenderFns = inlineTemplate.staticRenderFns;
  11520. }
  11521. return new vnode.componentOptions.Ctor(options)
  11522. }
  11523. function installComponentHooks (data) {
  11524. var hooks = data.hook || (data.hook = {});
  11525. for (var i = 0; i < hooksToMerge.length; i++) {
  11526. var key = hooksToMerge[i];
  11527. var existing = hooks[key];
  11528. var toMerge = componentVNodeHooks[key];
  11529. if (existing !== toMerge && !(existing && existing._merged)) {
  11530. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  11531. }
  11532. }
  11533. }
  11534. function mergeHook$1 (f1, f2) {
  11535. var merged = function (a, b) {
  11536. // flow complains about extra args which is why we use any
  11537. f1(a, b);
  11538. f2(a, b);
  11539. };
  11540. merged._merged = true;
  11541. return merged
  11542. }
  11543. // transform component v-model info (value and callback) into
  11544. // prop and event handler respectively.
  11545. function transformModel (options, data) {
  11546. var prop = (options.model && options.model.prop) || 'value';
  11547. var event = (options.model && options.model.event) || 'input'
  11548. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  11549. var on = data.on || (data.on = {});
  11550. var existing = on[event];
  11551. var callback = data.model.callback;
  11552. if (isDef(existing)) {
  11553. if (
  11554. Array.isArray(existing)
  11555. ? existing.indexOf(callback) === -1
  11556. : existing !== callback
  11557. ) {
  11558. on[event] = [callback].concat(existing);
  11559. }
  11560. } else {
  11561. on[event] = callback;
  11562. }
  11563. }
  11564. /* */
  11565. var SIMPLE_NORMALIZE = 1;
  11566. var ALWAYS_NORMALIZE = 2;
  11567. // wrapper function for providing a more flexible interface
  11568. // without getting yelled at by flow
  11569. function createElement (
  11570. context,
  11571. tag,
  11572. data,
  11573. children,
  11574. normalizationType,
  11575. alwaysNormalize
  11576. ) {
  11577. if (Array.isArray(data) || isPrimitive(data)) {
  11578. normalizationType = children;
  11579. children = data;
  11580. data = undefined;
  11581. }
  11582. if (isTrue(alwaysNormalize)) {
  11583. normalizationType = ALWAYS_NORMALIZE;
  11584. }
  11585. return _createElement(context, tag, data, children, normalizationType)
  11586. }
  11587. function _createElement (
  11588. context,
  11589. tag,
  11590. data,
  11591. children,
  11592. normalizationType
  11593. ) {
  11594. if (isDef(data) && isDef((data).__ob__)) {
  11595. true && warn(
  11596. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  11597. 'Always create fresh vnode data objects in each render!',
  11598. context
  11599. );
  11600. return createEmptyVNode()
  11601. }
  11602. // object syntax in v-bind
  11603. if (isDef(data) && isDef(data.is)) {
  11604. tag = data.is;
  11605. }
  11606. if (!tag) {
  11607. // in case of component :is set to falsy value
  11608. return createEmptyVNode()
  11609. }
  11610. // warn against non-primitive key
  11611. if ( true &&
  11612. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  11613. ) {
  11614. {
  11615. warn(
  11616. 'Avoid using non-primitive value as key, ' +
  11617. 'use string/number value instead.',
  11618. context
  11619. );
  11620. }
  11621. }
  11622. // support single function children as default scoped slot
  11623. if (Array.isArray(children) &&
  11624. typeof children[0] === 'function'
  11625. ) {
  11626. data = data || {};
  11627. data.scopedSlots = { default: children[0] };
  11628. children.length = 0;
  11629. }
  11630. if (normalizationType === ALWAYS_NORMALIZE) {
  11631. children = normalizeChildren(children);
  11632. } else if (normalizationType === SIMPLE_NORMALIZE) {
  11633. children = simpleNormalizeChildren(children);
  11634. }
  11635. var vnode, ns;
  11636. if (typeof tag === 'string') {
  11637. var Ctor;
  11638. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  11639. if (config.isReservedTag(tag)) {
  11640. // platform built-in elements
  11641. if ( true && isDef(data) && isDef(data.nativeOn)) {
  11642. warn(
  11643. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  11644. context
  11645. );
  11646. }
  11647. vnode = new VNode(
  11648. config.parsePlatformTagName(tag), data, children,
  11649. undefined, undefined, context
  11650. );
  11651. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  11652. // component
  11653. vnode = createComponent(Ctor, data, context, children, tag);
  11654. } else {
  11655. // unknown or unlisted namespaced elements
  11656. // check at runtime because it may get assigned a namespace when its
  11657. // parent normalizes children
  11658. vnode = new VNode(
  11659. tag, data, children,
  11660. undefined, undefined, context
  11661. );
  11662. }
  11663. } else {
  11664. // direct component options / constructor
  11665. vnode = createComponent(tag, data, context, children);
  11666. }
  11667. if (Array.isArray(vnode)) {
  11668. return vnode
  11669. } else if (isDef(vnode)) {
  11670. if (isDef(ns)) { applyNS(vnode, ns); }
  11671. if (isDef(data)) { registerDeepBindings(data); }
  11672. return vnode
  11673. } else {
  11674. return createEmptyVNode()
  11675. }
  11676. }
  11677. function applyNS (vnode, ns, force) {
  11678. vnode.ns = ns;
  11679. if (vnode.tag === 'foreignObject') {
  11680. // use default namespace inside foreignObject
  11681. ns = undefined;
  11682. force = true;
  11683. }
  11684. if (isDef(vnode.children)) {
  11685. for (var i = 0, l = vnode.children.length; i < l; i++) {
  11686. var child = vnode.children[i];
  11687. if (isDef(child.tag) && (
  11688. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  11689. applyNS(child, ns, force);
  11690. }
  11691. }
  11692. }
  11693. }
  11694. // ref #5318
  11695. // necessary to ensure parent re-render when deep bindings like :style and
  11696. // :class are used on slot nodes
  11697. function registerDeepBindings (data) {
  11698. if (isObject(data.style)) {
  11699. traverse(data.style);
  11700. }
  11701. if (isObject(data.class)) {
  11702. traverse(data.class);
  11703. }
  11704. }
  11705. /* */
  11706. function initRender (vm) {
  11707. vm._vnode = null; // the root of the child tree
  11708. vm._staticTrees = null; // v-once cached trees
  11709. var options = vm.$options;
  11710. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  11711. var renderContext = parentVnode && parentVnode.context;
  11712. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  11713. vm.$scopedSlots = emptyObject;
  11714. // bind the createElement fn to this instance
  11715. // so that we get proper render context inside it.
  11716. // args order: tag, data, children, normalizationType, alwaysNormalize
  11717. // internal version is used by render functions compiled from templates
  11718. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  11719. // normalization is always applied for the public version, used in
  11720. // user-written render functions.
  11721. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  11722. // $attrs & $listeners are exposed for easier HOC creation.
  11723. // they need to be reactive so that HOCs using them are always updated
  11724. var parentData = parentVnode && parentVnode.data;
  11725. /* istanbul ignore else */
  11726. if (true) {
  11727. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  11728. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  11729. }, true);
  11730. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  11731. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  11732. }, true);
  11733. } else {}
  11734. }
  11735. var currentRenderingInstance = null;
  11736. function renderMixin (Vue) {
  11737. // install runtime convenience helpers
  11738. installRenderHelpers(Vue.prototype);
  11739. Vue.prototype.$nextTick = function (fn) {
  11740. return nextTick(fn, this)
  11741. };
  11742. Vue.prototype._render = function () {
  11743. var vm = this;
  11744. var ref = vm.$options;
  11745. var render = ref.render;
  11746. var _parentVnode = ref._parentVnode;
  11747. if (_parentVnode) {
  11748. vm.$scopedSlots = normalizeScopedSlots(
  11749. _parentVnode.data.scopedSlots,
  11750. vm.$slots,
  11751. vm.$scopedSlots
  11752. );
  11753. }
  11754. // set parent vnode. this allows render functions to have access
  11755. // to the data on the placeholder node.
  11756. vm.$vnode = _parentVnode;
  11757. // render self
  11758. var vnode;
  11759. try {
  11760. // There's no need to maintain a stack because all render fns are called
  11761. // separately from one another. Nested component's render fns are called
  11762. // when parent component is patched.
  11763. currentRenderingInstance = vm;
  11764. vnode = render.call(vm._renderProxy, vm.$createElement);
  11765. } catch (e) {
  11766. handleError(e, vm, "render");
  11767. // return error render result,
  11768. // or previous vnode to prevent render error causing blank component
  11769. /* istanbul ignore else */
  11770. if ( true && vm.$options.renderError) {
  11771. try {
  11772. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  11773. } catch (e) {
  11774. handleError(e, vm, "renderError");
  11775. vnode = vm._vnode;
  11776. }
  11777. } else {
  11778. vnode = vm._vnode;
  11779. }
  11780. } finally {
  11781. currentRenderingInstance = null;
  11782. }
  11783. // if the returned array contains only a single node, allow it
  11784. if (Array.isArray(vnode) && vnode.length === 1) {
  11785. vnode = vnode[0];
  11786. }
  11787. // return empty vnode in case the render function errored out
  11788. if (!(vnode instanceof VNode)) {
  11789. if ( true && Array.isArray(vnode)) {
  11790. warn(
  11791. 'Multiple root nodes returned from render function. Render function ' +
  11792. 'should return a single root node.',
  11793. vm
  11794. );
  11795. }
  11796. vnode = createEmptyVNode();
  11797. }
  11798. // set parent
  11799. vnode.parent = _parentVnode;
  11800. return vnode
  11801. };
  11802. }
  11803. /* */
  11804. function ensureCtor (comp, base) {
  11805. if (
  11806. comp.__esModule ||
  11807. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  11808. ) {
  11809. comp = comp.default;
  11810. }
  11811. return isObject(comp)
  11812. ? base.extend(comp)
  11813. : comp
  11814. }
  11815. function createAsyncPlaceholder (
  11816. factory,
  11817. data,
  11818. context,
  11819. children,
  11820. tag
  11821. ) {
  11822. var node = createEmptyVNode();
  11823. node.asyncFactory = factory;
  11824. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  11825. return node
  11826. }
  11827. function resolveAsyncComponent (
  11828. factory,
  11829. baseCtor
  11830. ) {
  11831. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  11832. return factory.errorComp
  11833. }
  11834. if (isDef(factory.resolved)) {
  11835. return factory.resolved
  11836. }
  11837. var owner = currentRenderingInstance;
  11838. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  11839. // already pending
  11840. factory.owners.push(owner);
  11841. }
  11842. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  11843. return factory.loadingComp
  11844. }
  11845. if (owner && !isDef(factory.owners)) {
  11846. var owners = factory.owners = [owner];
  11847. var sync = true;
  11848. var timerLoading = null;
  11849. var timerTimeout = null
  11850. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  11851. var forceRender = function (renderCompleted) {
  11852. for (var i = 0, l = owners.length; i < l; i++) {
  11853. (owners[i]).$forceUpdate();
  11854. }
  11855. if (renderCompleted) {
  11856. owners.length = 0;
  11857. if (timerLoading !== null) {
  11858. clearTimeout(timerLoading);
  11859. timerLoading = null;
  11860. }
  11861. if (timerTimeout !== null) {
  11862. clearTimeout(timerTimeout);
  11863. timerTimeout = null;
  11864. }
  11865. }
  11866. };
  11867. var resolve = once(function (res) {
  11868. // cache resolved
  11869. factory.resolved = ensureCtor(res, baseCtor);
  11870. // invoke callbacks only if this is not a synchronous resolve
  11871. // (async resolves are shimmed as synchronous during SSR)
  11872. if (!sync) {
  11873. forceRender(true);
  11874. } else {
  11875. owners.length = 0;
  11876. }
  11877. });
  11878. var reject = once(function (reason) {
  11879. true && warn(
  11880. "Failed to resolve async component: " + (String(factory)) +
  11881. (reason ? ("\nReason: " + reason) : '')
  11882. );
  11883. if (isDef(factory.errorComp)) {
  11884. factory.error = true;
  11885. forceRender(true);
  11886. }
  11887. });
  11888. var res = factory(resolve, reject);
  11889. if (isObject(res)) {
  11890. if (isPromise(res)) {
  11891. // () => Promise
  11892. if (isUndef(factory.resolved)) {
  11893. res.then(resolve, reject);
  11894. }
  11895. } else if (isPromise(res.component)) {
  11896. res.component.then(resolve, reject);
  11897. if (isDef(res.error)) {
  11898. factory.errorComp = ensureCtor(res.error, baseCtor);
  11899. }
  11900. if (isDef(res.loading)) {
  11901. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  11902. if (res.delay === 0) {
  11903. factory.loading = true;
  11904. } else {
  11905. timerLoading = setTimeout(function () {
  11906. timerLoading = null;
  11907. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  11908. factory.loading = true;
  11909. forceRender(false);
  11910. }
  11911. }, res.delay || 200);
  11912. }
  11913. }
  11914. if (isDef(res.timeout)) {
  11915. timerTimeout = setTimeout(function () {
  11916. timerTimeout = null;
  11917. if (isUndef(factory.resolved)) {
  11918. reject(
  11919. true
  11920. ? ("timeout (" + (res.timeout) + "ms)")
  11921. : undefined
  11922. );
  11923. }
  11924. }, res.timeout);
  11925. }
  11926. }
  11927. }
  11928. sync = false;
  11929. // return in case resolved synchronously
  11930. return factory.loading
  11931. ? factory.loadingComp
  11932. : factory.resolved
  11933. }
  11934. }
  11935. /* */
  11936. function isAsyncPlaceholder (node) {
  11937. return node.isComment && node.asyncFactory
  11938. }
  11939. /* */
  11940. function getFirstComponentChild (children) {
  11941. if (Array.isArray(children)) {
  11942. for (var i = 0; i < children.length; i++) {
  11943. var c = children[i];
  11944. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  11945. return c
  11946. }
  11947. }
  11948. }
  11949. }
  11950. /* */
  11951. /* */
  11952. function initEvents (vm) {
  11953. vm._events = Object.create(null);
  11954. vm._hasHookEvent = false;
  11955. // init parent attached events
  11956. var listeners = vm.$options._parentListeners;
  11957. if (listeners) {
  11958. updateComponentListeners(vm, listeners);
  11959. }
  11960. }
  11961. var target;
  11962. function add (event, fn) {
  11963. target.$on(event, fn);
  11964. }
  11965. function remove$1 (event, fn) {
  11966. target.$off(event, fn);
  11967. }
  11968. function createOnceHandler (event, fn) {
  11969. var _target = target;
  11970. return function onceHandler () {
  11971. var res = fn.apply(null, arguments);
  11972. if (res !== null) {
  11973. _target.$off(event, onceHandler);
  11974. }
  11975. }
  11976. }
  11977. function updateComponentListeners (
  11978. vm,
  11979. listeners,
  11980. oldListeners
  11981. ) {
  11982. target = vm;
  11983. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  11984. target = undefined;
  11985. }
  11986. function eventsMixin (Vue) {
  11987. var hookRE = /^hook:/;
  11988. Vue.prototype.$on = function (event, fn) {
  11989. var vm = this;
  11990. if (Array.isArray(event)) {
  11991. for (var i = 0, l = event.length; i < l; i++) {
  11992. vm.$on(event[i], fn);
  11993. }
  11994. } else {
  11995. (vm._events[event] || (vm._events[event] = [])).push(fn);
  11996. // optimize hook:event cost by using a boolean flag marked at registration
  11997. // instead of a hash lookup
  11998. if (hookRE.test(event)) {
  11999. vm._hasHookEvent = true;
  12000. }
  12001. }
  12002. return vm
  12003. };
  12004. Vue.prototype.$once = function (event, fn) {
  12005. var vm = this;
  12006. function on () {
  12007. vm.$off(event, on);
  12008. fn.apply(vm, arguments);
  12009. }
  12010. on.fn = fn;
  12011. vm.$on(event, on);
  12012. return vm
  12013. };
  12014. Vue.prototype.$off = function (event, fn) {
  12015. var vm = this;
  12016. // all
  12017. if (!arguments.length) {
  12018. vm._events = Object.create(null);
  12019. return vm
  12020. }
  12021. // array of events
  12022. if (Array.isArray(event)) {
  12023. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  12024. vm.$off(event[i$1], fn);
  12025. }
  12026. return vm
  12027. }
  12028. // specific event
  12029. var cbs = vm._events[event];
  12030. if (!cbs) {
  12031. return vm
  12032. }
  12033. if (!fn) {
  12034. vm._events[event] = null;
  12035. return vm
  12036. }
  12037. // specific handler
  12038. var cb;
  12039. var i = cbs.length;
  12040. while (i--) {
  12041. cb = cbs[i];
  12042. if (cb === fn || cb.fn === fn) {
  12043. cbs.splice(i, 1);
  12044. break
  12045. }
  12046. }
  12047. return vm
  12048. };
  12049. Vue.prototype.$emit = function (event) {
  12050. var vm = this;
  12051. if (true) {
  12052. var lowerCaseEvent = event.toLowerCase();
  12053. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  12054. tip(
  12055. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  12056. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  12057. "Note that HTML attributes are case-insensitive and you cannot use " +
  12058. "v-on to listen to camelCase events when using in-DOM templates. " +
  12059. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  12060. );
  12061. }
  12062. }
  12063. var cbs = vm._events[event];
  12064. if (cbs) {
  12065. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  12066. var args = toArray(arguments, 1);
  12067. var info = "event handler for \"" + event + "\"";
  12068. for (var i = 0, l = cbs.length; i < l; i++) {
  12069. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  12070. }
  12071. }
  12072. return vm
  12073. };
  12074. }
  12075. /* */
  12076. var activeInstance = null;
  12077. var isUpdatingChildComponent = false;
  12078. function setActiveInstance(vm) {
  12079. var prevActiveInstance = activeInstance;
  12080. activeInstance = vm;
  12081. return function () {
  12082. activeInstance = prevActiveInstance;
  12083. }
  12084. }
  12085. function initLifecycle (vm) {
  12086. var options = vm.$options;
  12087. // locate first non-abstract parent
  12088. var parent = options.parent;
  12089. if (parent && !options.abstract) {
  12090. while (parent.$options.abstract && parent.$parent) {
  12091. parent = parent.$parent;
  12092. }
  12093. parent.$children.push(vm);
  12094. }
  12095. vm.$parent = parent;
  12096. vm.$root = parent ? parent.$root : vm;
  12097. vm.$children = [];
  12098. vm.$refs = {};
  12099. vm._watcher = null;
  12100. vm._inactive = null;
  12101. vm._directInactive = false;
  12102. vm._isMounted = false;
  12103. vm._isDestroyed = false;
  12104. vm._isBeingDestroyed = false;
  12105. }
  12106. function lifecycleMixin (Vue) {
  12107. Vue.prototype._update = function (vnode, hydrating) {
  12108. var vm = this;
  12109. var prevEl = vm.$el;
  12110. var prevVnode = vm._vnode;
  12111. var restoreActiveInstance = setActiveInstance(vm);
  12112. vm._vnode = vnode;
  12113. // Vue.prototype.__patch__ is injected in entry points
  12114. // based on the rendering backend used.
  12115. if (!prevVnode) {
  12116. // initial render
  12117. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  12118. } else {
  12119. // updates
  12120. vm.$el = vm.__patch__(prevVnode, vnode);
  12121. }
  12122. restoreActiveInstance();
  12123. // update __vue__ reference
  12124. if (prevEl) {
  12125. prevEl.__vue__ = null;
  12126. }
  12127. if (vm.$el) {
  12128. vm.$el.__vue__ = vm;
  12129. }
  12130. // if parent is an HOC, update its $el as well
  12131. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  12132. vm.$parent.$el = vm.$el;
  12133. }
  12134. // updated hook is called by the scheduler to ensure that children are
  12135. // updated in a parent's updated hook.
  12136. };
  12137. Vue.prototype.$forceUpdate = function () {
  12138. var vm = this;
  12139. if (vm._watcher) {
  12140. vm._watcher.update();
  12141. }
  12142. };
  12143. Vue.prototype.$destroy = function () {
  12144. var vm = this;
  12145. if (vm._isBeingDestroyed) {
  12146. return
  12147. }
  12148. callHook(vm, 'beforeDestroy');
  12149. vm._isBeingDestroyed = true;
  12150. // remove self from parent
  12151. var parent = vm.$parent;
  12152. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  12153. remove(parent.$children, vm);
  12154. }
  12155. // teardown watchers
  12156. if (vm._watcher) {
  12157. vm._watcher.teardown();
  12158. }
  12159. var i = vm._watchers.length;
  12160. while (i--) {
  12161. vm._watchers[i].teardown();
  12162. }
  12163. // remove reference from data ob
  12164. // frozen object may not have observer.
  12165. if (vm._data.__ob__) {
  12166. vm._data.__ob__.vmCount--;
  12167. }
  12168. // call the last hook...
  12169. vm._isDestroyed = true;
  12170. // invoke destroy hooks on current rendered tree
  12171. vm.__patch__(vm._vnode, null);
  12172. // fire destroyed hook
  12173. callHook(vm, 'destroyed');
  12174. // turn off all instance listeners.
  12175. vm.$off();
  12176. // remove __vue__ reference
  12177. if (vm.$el) {
  12178. vm.$el.__vue__ = null;
  12179. }
  12180. // release circular reference (#6759)
  12181. if (vm.$vnode) {
  12182. vm.$vnode.parent = null;
  12183. }
  12184. };
  12185. }
  12186. function updateChildComponent (
  12187. vm,
  12188. propsData,
  12189. listeners,
  12190. parentVnode,
  12191. renderChildren
  12192. ) {
  12193. if (true) {
  12194. isUpdatingChildComponent = true;
  12195. }
  12196. // determine whether component has slot children
  12197. // we need to do this before overwriting $options._renderChildren.
  12198. // check if there are dynamic scopedSlots (hand-written or compiled but with
  12199. // dynamic slot names). Static scoped slots compiled from template has the
  12200. // "$stable" marker.
  12201. var newScopedSlots = parentVnode.data.scopedSlots;
  12202. var oldScopedSlots = vm.$scopedSlots;
  12203. var hasDynamicScopedSlot = !!(
  12204. (newScopedSlots && !newScopedSlots.$stable) ||
  12205. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  12206. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  12207. );
  12208. // Any static slot children from the parent may have changed during parent's
  12209. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  12210. // update is necessary to ensure correctness.
  12211. var needsForceUpdate = !!(
  12212. renderChildren || // has new static slots
  12213. vm.$options._renderChildren || // has old static slots
  12214. hasDynamicScopedSlot
  12215. );
  12216. vm.$options._parentVnode = parentVnode;
  12217. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  12218. if (vm._vnode) { // update child tree's parent
  12219. vm._vnode.parent = parentVnode;
  12220. }
  12221. vm.$options._renderChildren = renderChildren;
  12222. // update $attrs and $listeners hash
  12223. // these are also reactive so they may trigger child update if the child
  12224. // used them during render
  12225. vm.$attrs = parentVnode.data.attrs || emptyObject;
  12226. vm.$listeners = listeners || emptyObject;
  12227. // update props
  12228. if (propsData && vm.$options.props) {
  12229. toggleObserving(false);
  12230. var props = vm._props;
  12231. var propKeys = vm.$options._propKeys || [];
  12232. for (var i = 0; i < propKeys.length; i++) {
  12233. var key = propKeys[i];
  12234. var propOptions = vm.$options.props; // wtf flow?
  12235. props[key] = validateProp(key, propOptions, propsData, vm);
  12236. }
  12237. toggleObserving(true);
  12238. // keep a copy of raw propsData
  12239. vm.$options.propsData = propsData;
  12240. }
  12241. // fixed by xxxxxx update properties(mp runtime)
  12242. vm._$updateProperties && vm._$updateProperties(vm);
  12243. // update listeners
  12244. listeners = listeners || emptyObject;
  12245. var oldListeners = vm.$options._parentListeners;
  12246. vm.$options._parentListeners = listeners;
  12247. updateComponentListeners(vm, listeners, oldListeners);
  12248. // resolve slots + force update if has children
  12249. if (needsForceUpdate) {
  12250. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  12251. vm.$forceUpdate();
  12252. }
  12253. if (true) {
  12254. isUpdatingChildComponent = false;
  12255. }
  12256. }
  12257. function isInInactiveTree (vm) {
  12258. while (vm && (vm = vm.$parent)) {
  12259. if (vm._inactive) { return true }
  12260. }
  12261. return false
  12262. }
  12263. function activateChildComponent (vm, direct) {
  12264. if (direct) {
  12265. vm._directInactive = false;
  12266. if (isInInactiveTree(vm)) {
  12267. return
  12268. }
  12269. } else if (vm._directInactive) {
  12270. return
  12271. }
  12272. if (vm._inactive || vm._inactive === null) {
  12273. vm._inactive = false;
  12274. for (var i = 0; i < vm.$children.length; i++) {
  12275. activateChildComponent(vm.$children[i]);
  12276. }
  12277. callHook(vm, 'activated');
  12278. }
  12279. }
  12280. function deactivateChildComponent (vm, direct) {
  12281. if (direct) {
  12282. vm._directInactive = true;
  12283. if (isInInactiveTree(vm)) {
  12284. return
  12285. }
  12286. }
  12287. if (!vm._inactive) {
  12288. vm._inactive = true;
  12289. for (var i = 0; i < vm.$children.length; i++) {
  12290. deactivateChildComponent(vm.$children[i]);
  12291. }
  12292. callHook(vm, 'deactivated');
  12293. }
  12294. }
  12295. function callHook (vm, hook) {
  12296. // #7573 disable dep collection when invoking lifecycle hooks
  12297. pushTarget();
  12298. var handlers = vm.$options[hook];
  12299. var info = hook + " hook";
  12300. if (handlers) {
  12301. for (var i = 0, j = handlers.length; i < j; i++) {
  12302. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  12303. }
  12304. }
  12305. if (vm._hasHookEvent) {
  12306. vm.$emit('hook:' + hook);
  12307. }
  12308. popTarget();
  12309. }
  12310. /* */
  12311. var MAX_UPDATE_COUNT = 100;
  12312. var queue = [];
  12313. var activatedChildren = [];
  12314. var has = {};
  12315. var circular = {};
  12316. var waiting = false;
  12317. var flushing = false;
  12318. var index = 0;
  12319. /**
  12320. * Reset the scheduler's state.
  12321. */
  12322. function resetSchedulerState () {
  12323. index = queue.length = activatedChildren.length = 0;
  12324. has = {};
  12325. if (true) {
  12326. circular = {};
  12327. }
  12328. waiting = flushing = false;
  12329. }
  12330. // Async edge case #6566 requires saving the timestamp when event listeners are
  12331. // attached. However, calling performance.now() has a perf overhead especially
  12332. // if the page has thousands of event listeners. Instead, we take a timestamp
  12333. // every time the scheduler flushes and use that for all event listeners
  12334. // attached during that flush.
  12335. var currentFlushTimestamp = 0;
  12336. // Async edge case fix requires storing an event listener's attach timestamp.
  12337. var getNow = Date.now;
  12338. // Determine what event timestamp the browser is using. Annoyingly, the
  12339. // timestamp can either be hi-res (relative to page load) or low-res
  12340. // (relative to UNIX epoch), so in order to compare time we have to use the
  12341. // same timestamp type when saving the flush timestamp.
  12342. // All IE versions use low-res event timestamps, and have problematic clock
  12343. // implementations (#9632)
  12344. if (inBrowser && !isIE) {
  12345. var performance = window.performance;
  12346. if (
  12347. performance &&
  12348. typeof performance.now === 'function' &&
  12349. getNow() > document.createEvent('Event').timeStamp
  12350. ) {
  12351. // if the event timestamp, although evaluated AFTER the Date.now(), is
  12352. // smaller than it, it means the event is using a hi-res timestamp,
  12353. // and we need to use the hi-res version for event listener timestamps as
  12354. // well.
  12355. getNow = function () { return performance.now(); };
  12356. }
  12357. }
  12358. /**
  12359. * Flush both queues and run the watchers.
  12360. */
  12361. function flushSchedulerQueue () {
  12362. currentFlushTimestamp = getNow();
  12363. flushing = true;
  12364. var watcher, id;
  12365. // Sort queue before flush.
  12366. // This ensures that:
  12367. // 1. Components are updated from parent to child. (because parent is always
  12368. // created before the child)
  12369. // 2. A component's user watchers are run before its render watcher (because
  12370. // user watchers are created before the render watcher)
  12371. // 3. If a component is destroyed during a parent component's watcher run,
  12372. // its watchers can be skipped.
  12373. queue.sort(function (a, b) { return a.id - b.id; });
  12374. // do not cache length because more watchers might be pushed
  12375. // as we run existing watchers
  12376. for (index = 0; index < queue.length; index++) {
  12377. watcher = queue[index];
  12378. if (watcher.before) {
  12379. watcher.before();
  12380. }
  12381. id = watcher.id;
  12382. has[id] = null;
  12383. watcher.run();
  12384. // in dev build, check and stop circular updates.
  12385. if ( true && has[id] != null) {
  12386. circular[id] = (circular[id] || 0) + 1;
  12387. if (circular[id] > MAX_UPDATE_COUNT) {
  12388. warn(
  12389. 'You may have an infinite update loop ' + (
  12390. watcher.user
  12391. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  12392. : "in a component render function."
  12393. ),
  12394. watcher.vm
  12395. );
  12396. break
  12397. }
  12398. }
  12399. }
  12400. // keep copies of post queues before resetting state
  12401. var activatedQueue = activatedChildren.slice();
  12402. var updatedQueue = queue.slice();
  12403. resetSchedulerState();
  12404. // call component updated and activated hooks
  12405. callActivatedHooks(activatedQueue);
  12406. callUpdatedHooks(updatedQueue);
  12407. // devtool hook
  12408. /* istanbul ignore if */
  12409. if (devtools && config.devtools) {
  12410. devtools.emit('flush');
  12411. }
  12412. }
  12413. function callUpdatedHooks (queue) {
  12414. var i = queue.length;
  12415. while (i--) {
  12416. var watcher = queue[i];
  12417. var vm = watcher.vm;
  12418. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  12419. callHook(vm, 'updated');
  12420. }
  12421. }
  12422. }
  12423. /**
  12424. * Queue a kept-alive component that was activated during patch.
  12425. * The queue will be processed after the entire tree has been patched.
  12426. */
  12427. function queueActivatedComponent (vm) {
  12428. // setting _inactive to false here so that a render function can
  12429. // rely on checking whether it's in an inactive tree (e.g. router-view)
  12430. vm._inactive = false;
  12431. activatedChildren.push(vm);
  12432. }
  12433. function callActivatedHooks (queue) {
  12434. for (var i = 0; i < queue.length; i++) {
  12435. queue[i]._inactive = true;
  12436. activateChildComponent(queue[i], true /* true */);
  12437. }
  12438. }
  12439. /**
  12440. * Push a watcher into the watcher queue.
  12441. * Jobs with duplicate IDs will be skipped unless it's
  12442. * pushed when the queue is being flushed.
  12443. */
  12444. function queueWatcher (watcher) {
  12445. var id = watcher.id;
  12446. if (has[id] == null) {
  12447. has[id] = true;
  12448. if (!flushing) {
  12449. queue.push(watcher);
  12450. } else {
  12451. // if already flushing, splice the watcher based on its id
  12452. // if already past its id, it will be run next immediately.
  12453. var i = queue.length - 1;
  12454. while (i > index && queue[i].id > watcher.id) {
  12455. i--;
  12456. }
  12457. queue.splice(i + 1, 0, watcher);
  12458. }
  12459. // queue the flush
  12460. if (!waiting) {
  12461. waiting = true;
  12462. if ( true && !config.async) {
  12463. flushSchedulerQueue();
  12464. return
  12465. }
  12466. nextTick(flushSchedulerQueue);
  12467. }
  12468. }
  12469. }
  12470. /* */
  12471. var uid$2 = 0;
  12472. /**
  12473. * A watcher parses an expression, collects dependencies,
  12474. * and fires callback when the expression value changes.
  12475. * This is used for both the $watch() api and directives.
  12476. */
  12477. var Watcher = function Watcher (
  12478. vm,
  12479. expOrFn,
  12480. cb,
  12481. options,
  12482. isRenderWatcher
  12483. ) {
  12484. this.vm = vm;
  12485. if (isRenderWatcher) {
  12486. vm._watcher = this;
  12487. }
  12488. vm._watchers.push(this);
  12489. // options
  12490. if (options) {
  12491. this.deep = !!options.deep;
  12492. this.user = !!options.user;
  12493. this.lazy = !!options.lazy;
  12494. this.sync = !!options.sync;
  12495. this.before = options.before;
  12496. } else {
  12497. this.deep = this.user = this.lazy = this.sync = false;
  12498. }
  12499. this.cb = cb;
  12500. this.id = ++uid$2; // uid for batching
  12501. this.active = true;
  12502. this.dirty = this.lazy; // for lazy watchers
  12503. this.deps = [];
  12504. this.newDeps = [];
  12505. this.depIds = new _Set();
  12506. this.newDepIds = new _Set();
  12507. this.expression = true
  12508. ? expOrFn.toString()
  12509. : undefined;
  12510. // parse expression for getter
  12511. if (typeof expOrFn === 'function') {
  12512. this.getter = expOrFn;
  12513. } else {
  12514. this.getter = parsePath(expOrFn);
  12515. if (!this.getter) {
  12516. this.getter = noop;
  12517. true && warn(
  12518. "Failed watching path: \"" + expOrFn + "\" " +
  12519. 'Watcher only accepts simple dot-delimited paths. ' +
  12520. 'For full control, use a function instead.',
  12521. vm
  12522. );
  12523. }
  12524. }
  12525. this.value = this.lazy
  12526. ? undefined
  12527. : this.get();
  12528. };
  12529. /**
  12530. * Evaluate the getter, and re-collect dependencies.
  12531. */
  12532. Watcher.prototype.get = function get () {
  12533. pushTarget(this);
  12534. var value;
  12535. var vm = this.vm;
  12536. try {
  12537. value = this.getter.call(vm, vm);
  12538. } catch (e) {
  12539. if (this.user) {
  12540. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  12541. } else {
  12542. throw e
  12543. }
  12544. } finally {
  12545. // "touch" every property so they are all tracked as
  12546. // dependencies for deep watching
  12547. if (this.deep) {
  12548. traverse(value);
  12549. }
  12550. popTarget();
  12551. this.cleanupDeps();
  12552. }
  12553. return value
  12554. };
  12555. /**
  12556. * Add a dependency to this directive.
  12557. */
  12558. Watcher.prototype.addDep = function addDep (dep) {
  12559. var id = dep.id;
  12560. if (!this.newDepIds.has(id)) {
  12561. this.newDepIds.add(id);
  12562. this.newDeps.push(dep);
  12563. if (!this.depIds.has(id)) {
  12564. dep.addSub(this);
  12565. }
  12566. }
  12567. };
  12568. /**
  12569. * Clean up for dependency collection.
  12570. */
  12571. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  12572. var i = this.deps.length;
  12573. while (i--) {
  12574. var dep = this.deps[i];
  12575. if (!this.newDepIds.has(dep.id)) {
  12576. dep.removeSub(this);
  12577. }
  12578. }
  12579. var tmp = this.depIds;
  12580. this.depIds = this.newDepIds;
  12581. this.newDepIds = tmp;
  12582. this.newDepIds.clear();
  12583. tmp = this.deps;
  12584. this.deps = this.newDeps;
  12585. this.newDeps = tmp;
  12586. this.newDeps.length = 0;
  12587. };
  12588. /**
  12589. * Subscriber interface.
  12590. * Will be called when a dependency changes.
  12591. */
  12592. Watcher.prototype.update = function update () {
  12593. /* istanbul ignore else */
  12594. if (this.lazy) {
  12595. this.dirty = true;
  12596. } else if (this.sync) {
  12597. this.run();
  12598. } else {
  12599. queueWatcher(this);
  12600. }
  12601. };
  12602. /**
  12603. * Scheduler job interface.
  12604. * Will be called by the scheduler.
  12605. */
  12606. Watcher.prototype.run = function run () {
  12607. if (this.active) {
  12608. var value = this.get();
  12609. if (
  12610. value !== this.value ||
  12611. // Deep watchers and watchers on Object/Arrays should fire even
  12612. // when the value is the same, because the value may
  12613. // have mutated.
  12614. isObject(value) ||
  12615. this.deep
  12616. ) {
  12617. // set new value
  12618. var oldValue = this.value;
  12619. this.value = value;
  12620. if (this.user) {
  12621. try {
  12622. this.cb.call(this.vm, value, oldValue);
  12623. } catch (e) {
  12624. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  12625. }
  12626. } else {
  12627. this.cb.call(this.vm, value, oldValue);
  12628. }
  12629. }
  12630. }
  12631. };
  12632. /**
  12633. * Evaluate the value of the watcher.
  12634. * This only gets called for lazy watchers.
  12635. */
  12636. Watcher.prototype.evaluate = function evaluate () {
  12637. this.value = this.get();
  12638. this.dirty = false;
  12639. };
  12640. /**
  12641. * Depend on all deps collected by this watcher.
  12642. */
  12643. Watcher.prototype.depend = function depend () {
  12644. var i = this.deps.length;
  12645. while (i--) {
  12646. this.deps[i].depend();
  12647. }
  12648. };
  12649. /**
  12650. * Remove self from all dependencies' subscriber list.
  12651. */
  12652. Watcher.prototype.teardown = function teardown () {
  12653. if (this.active) {
  12654. // remove self from vm's watcher list
  12655. // this is a somewhat expensive operation so we skip it
  12656. // if the vm is being destroyed.
  12657. if (!this.vm._isBeingDestroyed) {
  12658. remove(this.vm._watchers, this);
  12659. }
  12660. var i = this.deps.length;
  12661. while (i--) {
  12662. this.deps[i].removeSub(this);
  12663. }
  12664. this.active = false;
  12665. }
  12666. };
  12667. /* */
  12668. var sharedPropertyDefinition = {
  12669. enumerable: true,
  12670. configurable: true,
  12671. get: noop,
  12672. set: noop
  12673. };
  12674. function proxy (target, sourceKey, key) {
  12675. sharedPropertyDefinition.get = function proxyGetter () {
  12676. return this[sourceKey][key]
  12677. };
  12678. sharedPropertyDefinition.set = function proxySetter (val) {
  12679. this[sourceKey][key] = val;
  12680. };
  12681. Object.defineProperty(target, key, sharedPropertyDefinition);
  12682. }
  12683. function initState (vm) {
  12684. vm._watchers = [];
  12685. var opts = vm.$options;
  12686. if (opts.props) { initProps(vm, opts.props); }
  12687. if (opts.methods) { initMethods(vm, opts.methods); }
  12688. if (opts.data) {
  12689. initData(vm);
  12690. } else {
  12691. observe(vm._data = {}, true /* asRootData */);
  12692. }
  12693. if (opts.computed) { initComputed(vm, opts.computed); }
  12694. if (opts.watch && opts.watch !== nativeWatch) {
  12695. initWatch(vm, opts.watch);
  12696. }
  12697. }
  12698. function initProps (vm, propsOptions) {
  12699. var propsData = vm.$options.propsData || {};
  12700. var props = vm._props = {};
  12701. // cache prop keys so that future props updates can iterate using Array
  12702. // instead of dynamic object key enumeration.
  12703. var keys = vm.$options._propKeys = [];
  12704. var isRoot = !vm.$parent;
  12705. // root instance props should be converted
  12706. if (!isRoot) {
  12707. toggleObserving(false);
  12708. }
  12709. var loop = function ( key ) {
  12710. keys.push(key);
  12711. var value = validateProp(key, propsOptions, propsData, vm);
  12712. /* istanbul ignore else */
  12713. if (true) {
  12714. var hyphenatedKey = hyphenate(key);
  12715. if (isReservedAttribute(hyphenatedKey) ||
  12716. config.isReservedAttr(hyphenatedKey)) {
  12717. warn(
  12718. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  12719. vm
  12720. );
  12721. }
  12722. defineReactive$$1(props, key, value, function () {
  12723. if (!isRoot && !isUpdatingChildComponent) {
  12724. {
  12725. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  12726. return
  12727. }
  12728. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  12729. if(
  12730. key === 'value' &&
  12731. Array.isArray(vm.$options.behaviors) &&
  12732. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  12733. ){
  12734. return
  12735. }
  12736. if(vm._getFormData){
  12737. return
  12738. }
  12739. var $parent = vm.$parent;
  12740. while($parent){
  12741. if($parent.__next_tick_pending){
  12742. return
  12743. }
  12744. $parent = $parent.$parent;
  12745. }
  12746. }
  12747. warn(
  12748. "Avoid mutating a prop directly since the value will be " +
  12749. "overwritten whenever the parent component re-renders. " +
  12750. "Instead, use a data or computed property based on the prop's " +
  12751. "value. Prop being mutated: \"" + key + "\"",
  12752. vm
  12753. );
  12754. }
  12755. });
  12756. } else {}
  12757. // static props are already proxied on the component's prototype
  12758. // during Vue.extend(). We only need to proxy props defined at
  12759. // instantiation here.
  12760. if (!(key in vm)) {
  12761. proxy(vm, "_props", key);
  12762. }
  12763. };
  12764. for (var key in propsOptions) loop( key );
  12765. toggleObserving(true);
  12766. }
  12767. function initData (vm) {
  12768. var data = vm.$options.data;
  12769. data = vm._data = typeof data === 'function'
  12770. ? getData(data, vm)
  12771. : data || {};
  12772. if (!isPlainObject(data)) {
  12773. data = {};
  12774. true && warn(
  12775. 'data functions should return an object:\n' +
  12776. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  12777. vm
  12778. );
  12779. }
  12780. // proxy data on instance
  12781. var keys = Object.keys(data);
  12782. var props = vm.$options.props;
  12783. var methods = vm.$options.methods;
  12784. var i = keys.length;
  12785. while (i--) {
  12786. var key = keys[i];
  12787. if (true) {
  12788. if (methods && hasOwn(methods, key)) {
  12789. warn(
  12790. ("Method \"" + key + "\" has already been defined as a data property."),
  12791. vm
  12792. );
  12793. }
  12794. }
  12795. if (props && hasOwn(props, key)) {
  12796. true && warn(
  12797. "The data property \"" + key + "\" is already declared as a prop. " +
  12798. "Use prop default value instead.",
  12799. vm
  12800. );
  12801. } else if (!isReserved(key)) {
  12802. proxy(vm, "_data", key);
  12803. }
  12804. }
  12805. // observe data
  12806. observe(data, true /* asRootData */);
  12807. }
  12808. function getData (data, vm) {
  12809. // #7573 disable dep collection when invoking data getters
  12810. pushTarget();
  12811. try {
  12812. return data.call(vm, vm)
  12813. } catch (e) {
  12814. handleError(e, vm, "data()");
  12815. return {}
  12816. } finally {
  12817. popTarget();
  12818. }
  12819. }
  12820. var computedWatcherOptions = { lazy: true };
  12821. function initComputed (vm, computed) {
  12822. // $flow-disable-line
  12823. var watchers = vm._computedWatchers = Object.create(null);
  12824. // computed properties are just getters during SSR
  12825. var isSSR = isServerRendering();
  12826. for (var key in computed) {
  12827. var userDef = computed[key];
  12828. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  12829. if ( true && getter == null) {
  12830. warn(
  12831. ("Getter is missing for computed property \"" + key + "\"."),
  12832. vm
  12833. );
  12834. }
  12835. if (!isSSR) {
  12836. // create internal watcher for the computed property.
  12837. watchers[key] = new Watcher(
  12838. vm,
  12839. getter || noop,
  12840. noop,
  12841. computedWatcherOptions
  12842. );
  12843. }
  12844. // component-defined computed properties are already defined on the
  12845. // component prototype. We only need to define computed properties defined
  12846. // at instantiation here.
  12847. if (!(key in vm)) {
  12848. defineComputed(vm, key, userDef);
  12849. } else if (true) {
  12850. if (key in vm.$data) {
  12851. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  12852. } else if (vm.$options.props && key in vm.$options.props) {
  12853. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  12854. }
  12855. }
  12856. }
  12857. }
  12858. function defineComputed (
  12859. target,
  12860. key,
  12861. userDef
  12862. ) {
  12863. var shouldCache = !isServerRendering();
  12864. if (typeof userDef === 'function') {
  12865. sharedPropertyDefinition.get = shouldCache
  12866. ? createComputedGetter(key)
  12867. : createGetterInvoker(userDef);
  12868. sharedPropertyDefinition.set = noop;
  12869. } else {
  12870. sharedPropertyDefinition.get = userDef.get
  12871. ? shouldCache && userDef.cache !== false
  12872. ? createComputedGetter(key)
  12873. : createGetterInvoker(userDef.get)
  12874. : noop;
  12875. sharedPropertyDefinition.set = userDef.set || noop;
  12876. }
  12877. if ( true &&
  12878. sharedPropertyDefinition.set === noop) {
  12879. sharedPropertyDefinition.set = function () {
  12880. warn(
  12881. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  12882. this
  12883. );
  12884. };
  12885. }
  12886. Object.defineProperty(target, key, sharedPropertyDefinition);
  12887. }
  12888. function createComputedGetter (key) {
  12889. return function computedGetter () {
  12890. var watcher = this._computedWatchers && this._computedWatchers[key];
  12891. if (watcher) {
  12892. if (watcher.dirty) {
  12893. watcher.evaluate();
  12894. }
  12895. if (Dep.SharedObject.target) {// fixed by xxxxxx
  12896. watcher.depend();
  12897. }
  12898. return watcher.value
  12899. }
  12900. }
  12901. }
  12902. function createGetterInvoker(fn) {
  12903. return function computedGetter () {
  12904. return fn.call(this, this)
  12905. }
  12906. }
  12907. function initMethods (vm, methods) {
  12908. var props = vm.$options.props;
  12909. for (var key in methods) {
  12910. if (true) {
  12911. if (typeof methods[key] !== 'function') {
  12912. warn(
  12913. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  12914. "Did you reference the function correctly?",
  12915. vm
  12916. );
  12917. }
  12918. if (props && hasOwn(props, key)) {
  12919. warn(
  12920. ("Method \"" + key + "\" has already been defined as a prop."),
  12921. vm
  12922. );
  12923. }
  12924. if ((key in vm) && isReserved(key)) {
  12925. warn(
  12926. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  12927. "Avoid defining component methods that start with _ or $."
  12928. );
  12929. }
  12930. }
  12931. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  12932. }
  12933. }
  12934. function initWatch (vm, watch) {
  12935. for (var key in watch) {
  12936. var handler = watch[key];
  12937. if (Array.isArray(handler)) {
  12938. for (var i = 0; i < handler.length; i++) {
  12939. createWatcher(vm, key, handler[i]);
  12940. }
  12941. } else {
  12942. createWatcher(vm, key, handler);
  12943. }
  12944. }
  12945. }
  12946. function createWatcher (
  12947. vm,
  12948. expOrFn,
  12949. handler,
  12950. options
  12951. ) {
  12952. if (isPlainObject(handler)) {
  12953. options = handler;
  12954. handler = handler.handler;
  12955. }
  12956. if (typeof handler === 'string') {
  12957. handler = vm[handler];
  12958. }
  12959. return vm.$watch(expOrFn, handler, options)
  12960. }
  12961. function stateMixin (Vue) {
  12962. // flow somehow has problems with directly declared definition object
  12963. // when using Object.defineProperty, so we have to procedurally build up
  12964. // the object here.
  12965. var dataDef = {};
  12966. dataDef.get = function () { return this._data };
  12967. var propsDef = {};
  12968. propsDef.get = function () { return this._props };
  12969. if (true) {
  12970. dataDef.set = function () {
  12971. warn(
  12972. 'Avoid replacing instance root $data. ' +
  12973. 'Use nested data properties instead.',
  12974. this
  12975. );
  12976. };
  12977. propsDef.set = function () {
  12978. warn("$props is readonly.", this);
  12979. };
  12980. }
  12981. Object.defineProperty(Vue.prototype, '$data', dataDef);
  12982. Object.defineProperty(Vue.prototype, '$props', propsDef);
  12983. Vue.prototype.$set = set;
  12984. Vue.prototype.$delete = del;
  12985. Vue.prototype.$watch = function (
  12986. expOrFn,
  12987. cb,
  12988. options
  12989. ) {
  12990. var vm = this;
  12991. if (isPlainObject(cb)) {
  12992. return createWatcher(vm, expOrFn, cb, options)
  12993. }
  12994. options = options || {};
  12995. options.user = true;
  12996. var watcher = new Watcher(vm, expOrFn, cb, options);
  12997. if (options.immediate) {
  12998. try {
  12999. cb.call(vm, watcher.value);
  13000. } catch (error) {
  13001. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  13002. }
  13003. }
  13004. return function unwatchFn () {
  13005. watcher.teardown();
  13006. }
  13007. };
  13008. }
  13009. /* */
  13010. var uid$3 = 0;
  13011. function initMixin (Vue) {
  13012. Vue.prototype._init = function (options) {
  13013. var vm = this;
  13014. // a uid
  13015. vm._uid = uid$3++;
  13016. var startTag, endTag;
  13017. /* istanbul ignore if */
  13018. if ( true && config.performance && mark) {
  13019. startTag = "vue-perf-start:" + (vm._uid);
  13020. endTag = "vue-perf-end:" + (vm._uid);
  13021. mark(startTag);
  13022. }
  13023. // a flag to avoid this being observed
  13024. vm._isVue = true;
  13025. // merge options
  13026. if (options && options._isComponent) {
  13027. // optimize internal component instantiation
  13028. // since dynamic options merging is pretty slow, and none of the
  13029. // internal component options needs special treatment.
  13030. initInternalComponent(vm, options);
  13031. } else {
  13032. vm.$options = mergeOptions(
  13033. resolveConstructorOptions(vm.constructor),
  13034. options || {},
  13035. vm
  13036. );
  13037. }
  13038. /* istanbul ignore else */
  13039. if (true) {
  13040. initProxy(vm);
  13041. } else {}
  13042. // expose real self
  13043. vm._self = vm;
  13044. initLifecycle(vm);
  13045. initEvents(vm);
  13046. initRender(vm);
  13047. callHook(vm, 'beforeCreate');
  13048. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  13049. initState(vm);
  13050. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  13051. !vm._$fallback && callHook(vm, 'created');
  13052. /* istanbul ignore if */
  13053. if ( true && config.performance && mark) {
  13054. vm._name = formatComponentName(vm, false);
  13055. mark(endTag);
  13056. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  13057. }
  13058. if (vm.$options.el) {
  13059. vm.$mount(vm.$options.el);
  13060. }
  13061. };
  13062. }
  13063. function initInternalComponent (vm, options) {
  13064. var opts = vm.$options = Object.create(vm.constructor.options);
  13065. // doing this because it's faster than dynamic enumeration.
  13066. var parentVnode = options._parentVnode;
  13067. opts.parent = options.parent;
  13068. opts._parentVnode = parentVnode;
  13069. var vnodeComponentOptions = parentVnode.componentOptions;
  13070. opts.propsData = vnodeComponentOptions.propsData;
  13071. opts._parentListeners = vnodeComponentOptions.listeners;
  13072. opts._renderChildren = vnodeComponentOptions.children;
  13073. opts._componentTag = vnodeComponentOptions.tag;
  13074. if (options.render) {
  13075. opts.render = options.render;
  13076. opts.staticRenderFns = options.staticRenderFns;
  13077. }
  13078. }
  13079. function resolveConstructorOptions (Ctor) {
  13080. var options = Ctor.options;
  13081. if (Ctor.super) {
  13082. var superOptions = resolveConstructorOptions(Ctor.super);
  13083. var cachedSuperOptions = Ctor.superOptions;
  13084. if (superOptions !== cachedSuperOptions) {
  13085. // super option changed,
  13086. // need to resolve new options.
  13087. Ctor.superOptions = superOptions;
  13088. // check if there are any late-modified/attached options (#4976)
  13089. var modifiedOptions = resolveModifiedOptions(Ctor);
  13090. // update base extend options
  13091. if (modifiedOptions) {
  13092. extend(Ctor.extendOptions, modifiedOptions);
  13093. }
  13094. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  13095. if (options.name) {
  13096. options.components[options.name] = Ctor;
  13097. }
  13098. }
  13099. }
  13100. return options
  13101. }
  13102. function resolveModifiedOptions (Ctor) {
  13103. var modified;
  13104. var latest = Ctor.options;
  13105. var sealed = Ctor.sealedOptions;
  13106. for (var key in latest) {
  13107. if (latest[key] !== sealed[key]) {
  13108. if (!modified) { modified = {}; }
  13109. modified[key] = latest[key];
  13110. }
  13111. }
  13112. return modified
  13113. }
  13114. function Vue (options) {
  13115. if ( true &&
  13116. !(this instanceof Vue)
  13117. ) {
  13118. warn('Vue is a constructor and should be called with the `new` keyword');
  13119. }
  13120. this._init(options);
  13121. }
  13122. initMixin(Vue);
  13123. stateMixin(Vue);
  13124. eventsMixin(Vue);
  13125. lifecycleMixin(Vue);
  13126. renderMixin(Vue);
  13127. /* */
  13128. function initUse (Vue) {
  13129. Vue.use = function (plugin) {
  13130. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  13131. if (installedPlugins.indexOf(plugin) > -1) {
  13132. return this
  13133. }
  13134. // additional parameters
  13135. var args = toArray(arguments, 1);
  13136. args.unshift(this);
  13137. if (typeof plugin.install === 'function') {
  13138. plugin.install.apply(plugin, args);
  13139. } else if (typeof plugin === 'function') {
  13140. plugin.apply(null, args);
  13141. }
  13142. installedPlugins.push(plugin);
  13143. return this
  13144. };
  13145. }
  13146. /* */
  13147. function initMixin$1 (Vue) {
  13148. Vue.mixin = function (mixin) {
  13149. this.options = mergeOptions(this.options, mixin);
  13150. return this
  13151. };
  13152. }
  13153. /* */
  13154. function initExtend (Vue) {
  13155. /**
  13156. * Each instance constructor, including Vue, has a unique
  13157. * cid. This enables us to create wrapped "child
  13158. * constructors" for prototypal inheritance and cache them.
  13159. */
  13160. Vue.cid = 0;
  13161. var cid = 1;
  13162. /**
  13163. * Class inheritance
  13164. */
  13165. Vue.extend = function (extendOptions) {
  13166. extendOptions = extendOptions || {};
  13167. var Super = this;
  13168. var SuperId = Super.cid;
  13169. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  13170. if (cachedCtors[SuperId]) {
  13171. return cachedCtors[SuperId]
  13172. }
  13173. var name = extendOptions.name || Super.options.name;
  13174. if ( true && name) {
  13175. validateComponentName(name);
  13176. }
  13177. var Sub = function VueComponent (options) {
  13178. this._init(options);
  13179. };
  13180. Sub.prototype = Object.create(Super.prototype);
  13181. Sub.prototype.constructor = Sub;
  13182. Sub.cid = cid++;
  13183. Sub.options = mergeOptions(
  13184. Super.options,
  13185. extendOptions
  13186. );
  13187. Sub['super'] = Super;
  13188. // For props and computed properties, we define the proxy getters on
  13189. // the Vue instances at extension time, on the extended prototype. This
  13190. // avoids Object.defineProperty calls for each instance created.
  13191. if (Sub.options.props) {
  13192. initProps$1(Sub);
  13193. }
  13194. if (Sub.options.computed) {
  13195. initComputed$1(Sub);
  13196. }
  13197. // allow further extension/mixin/plugin usage
  13198. Sub.extend = Super.extend;
  13199. Sub.mixin = Super.mixin;
  13200. Sub.use = Super.use;
  13201. // create asset registers, so extended classes
  13202. // can have their private assets too.
  13203. ASSET_TYPES.forEach(function (type) {
  13204. Sub[type] = Super[type];
  13205. });
  13206. // enable recursive self-lookup
  13207. if (name) {
  13208. Sub.options.components[name] = Sub;
  13209. }
  13210. // keep a reference to the super options at extension time.
  13211. // later at instantiation we can check if Super's options have
  13212. // been updated.
  13213. Sub.superOptions = Super.options;
  13214. Sub.extendOptions = extendOptions;
  13215. Sub.sealedOptions = extend({}, Sub.options);
  13216. // cache constructor
  13217. cachedCtors[SuperId] = Sub;
  13218. return Sub
  13219. };
  13220. }
  13221. function initProps$1 (Comp) {
  13222. var props = Comp.options.props;
  13223. for (var key in props) {
  13224. proxy(Comp.prototype, "_props", key);
  13225. }
  13226. }
  13227. function initComputed$1 (Comp) {
  13228. var computed = Comp.options.computed;
  13229. for (var key in computed) {
  13230. defineComputed(Comp.prototype, key, computed[key]);
  13231. }
  13232. }
  13233. /* */
  13234. function initAssetRegisters (Vue) {
  13235. /**
  13236. * Create asset registration methods.
  13237. */
  13238. ASSET_TYPES.forEach(function (type) {
  13239. Vue[type] = function (
  13240. id,
  13241. definition
  13242. ) {
  13243. if (!definition) {
  13244. return this.options[type + 's'][id]
  13245. } else {
  13246. /* istanbul ignore if */
  13247. if ( true && type === 'component') {
  13248. validateComponentName(id);
  13249. }
  13250. if (type === 'component' && isPlainObject(definition)) {
  13251. definition.name = definition.name || id;
  13252. definition = this.options._base.extend(definition);
  13253. }
  13254. if (type === 'directive' && typeof definition === 'function') {
  13255. definition = { bind: definition, update: definition };
  13256. }
  13257. this.options[type + 's'][id] = definition;
  13258. return definition
  13259. }
  13260. };
  13261. });
  13262. }
  13263. /* */
  13264. function getComponentName (opts) {
  13265. return opts && (opts.Ctor.options.name || opts.tag)
  13266. }
  13267. function matches (pattern, name) {
  13268. if (Array.isArray(pattern)) {
  13269. return pattern.indexOf(name) > -1
  13270. } else if (typeof pattern === 'string') {
  13271. return pattern.split(',').indexOf(name) > -1
  13272. } else if (isRegExp(pattern)) {
  13273. return pattern.test(name)
  13274. }
  13275. /* istanbul ignore next */
  13276. return false
  13277. }
  13278. function pruneCache (keepAliveInstance, filter) {
  13279. var cache = keepAliveInstance.cache;
  13280. var keys = keepAliveInstance.keys;
  13281. var _vnode = keepAliveInstance._vnode;
  13282. for (var key in cache) {
  13283. var cachedNode = cache[key];
  13284. if (cachedNode) {
  13285. var name = getComponentName(cachedNode.componentOptions);
  13286. if (name && !filter(name)) {
  13287. pruneCacheEntry(cache, key, keys, _vnode);
  13288. }
  13289. }
  13290. }
  13291. }
  13292. function pruneCacheEntry (
  13293. cache,
  13294. key,
  13295. keys,
  13296. current
  13297. ) {
  13298. var cached$$1 = cache[key];
  13299. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  13300. cached$$1.componentInstance.$destroy();
  13301. }
  13302. cache[key] = null;
  13303. remove(keys, key);
  13304. }
  13305. var patternTypes = [String, RegExp, Array];
  13306. var KeepAlive = {
  13307. name: 'keep-alive',
  13308. abstract: true,
  13309. props: {
  13310. include: patternTypes,
  13311. exclude: patternTypes,
  13312. max: [String, Number]
  13313. },
  13314. created: function created () {
  13315. this.cache = Object.create(null);
  13316. this.keys = [];
  13317. },
  13318. destroyed: function destroyed () {
  13319. for (var key in this.cache) {
  13320. pruneCacheEntry(this.cache, key, this.keys);
  13321. }
  13322. },
  13323. mounted: function mounted () {
  13324. var this$1 = this;
  13325. this.$watch('include', function (val) {
  13326. pruneCache(this$1, function (name) { return matches(val, name); });
  13327. });
  13328. this.$watch('exclude', function (val) {
  13329. pruneCache(this$1, function (name) { return !matches(val, name); });
  13330. });
  13331. },
  13332. render: function render () {
  13333. var slot = this.$slots.default;
  13334. var vnode = getFirstComponentChild(slot);
  13335. var componentOptions = vnode && vnode.componentOptions;
  13336. if (componentOptions) {
  13337. // check pattern
  13338. var name = getComponentName(componentOptions);
  13339. var ref = this;
  13340. var include = ref.include;
  13341. var exclude = ref.exclude;
  13342. if (
  13343. // not included
  13344. (include && (!name || !matches(include, name))) ||
  13345. // excluded
  13346. (exclude && name && matches(exclude, name))
  13347. ) {
  13348. return vnode
  13349. }
  13350. var ref$1 = this;
  13351. var cache = ref$1.cache;
  13352. var keys = ref$1.keys;
  13353. var key = vnode.key == null
  13354. // same constructor may get registered as different local components
  13355. // so cid alone is not enough (#3269)
  13356. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  13357. : vnode.key;
  13358. if (cache[key]) {
  13359. vnode.componentInstance = cache[key].componentInstance;
  13360. // make current key freshest
  13361. remove(keys, key);
  13362. keys.push(key);
  13363. } else {
  13364. cache[key] = vnode;
  13365. keys.push(key);
  13366. // prune oldest entry
  13367. if (this.max && keys.length > parseInt(this.max)) {
  13368. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  13369. }
  13370. }
  13371. vnode.data.keepAlive = true;
  13372. }
  13373. return vnode || (slot && slot[0])
  13374. }
  13375. };
  13376. var builtInComponents = {
  13377. KeepAlive: KeepAlive
  13378. };
  13379. /* */
  13380. function initGlobalAPI (Vue) {
  13381. // config
  13382. var configDef = {};
  13383. configDef.get = function () { return config; };
  13384. if (true) {
  13385. configDef.set = function () {
  13386. warn(
  13387. 'Do not replace the Vue.config object, set individual fields instead.'
  13388. );
  13389. };
  13390. }
  13391. Object.defineProperty(Vue, 'config', configDef);
  13392. // exposed util methods.
  13393. // NOTE: these are not considered part of the public API - avoid relying on
  13394. // them unless you are aware of the risk.
  13395. Vue.util = {
  13396. warn: warn,
  13397. extend: extend,
  13398. mergeOptions: mergeOptions,
  13399. defineReactive: defineReactive$$1
  13400. };
  13401. Vue.set = set;
  13402. Vue.delete = del;
  13403. Vue.nextTick = nextTick;
  13404. // 2.6 explicit observable API
  13405. Vue.observable = function (obj) {
  13406. observe(obj);
  13407. return obj
  13408. };
  13409. Vue.options = Object.create(null);
  13410. ASSET_TYPES.forEach(function (type) {
  13411. Vue.options[type + 's'] = Object.create(null);
  13412. });
  13413. // this is used to identify the "base" constructor to extend all plain-object
  13414. // components with in Weex's multi-instance scenarios.
  13415. Vue.options._base = Vue;
  13416. extend(Vue.options.components, builtInComponents);
  13417. initUse(Vue);
  13418. initMixin$1(Vue);
  13419. initExtend(Vue);
  13420. initAssetRegisters(Vue);
  13421. }
  13422. initGlobalAPI(Vue);
  13423. Object.defineProperty(Vue.prototype, '$isServer', {
  13424. get: isServerRendering
  13425. });
  13426. Object.defineProperty(Vue.prototype, '$ssrContext', {
  13427. get: function get () {
  13428. /* istanbul ignore next */
  13429. return this.$vnode && this.$vnode.ssrContext
  13430. }
  13431. });
  13432. // expose FunctionalRenderContext for ssr runtime helper installation
  13433. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  13434. value: FunctionalRenderContext
  13435. });
  13436. Vue.version = '2.6.11';
  13437. /**
  13438. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  13439. */
  13440. var ARRAYTYPE = '[object Array]';
  13441. var OBJECTTYPE = '[object Object]';
  13442. // const FUNCTIONTYPE = '[object Function]'
  13443. function diff(current, pre) {
  13444. var result = {};
  13445. syncKeys(current, pre);
  13446. _diff(current, pre, '', result);
  13447. return result
  13448. }
  13449. function syncKeys(current, pre) {
  13450. if (current === pre) { return }
  13451. var rootCurrentType = type(current);
  13452. var rootPreType = type(pre);
  13453. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  13454. if(Object.keys(current).length >= Object.keys(pre).length){
  13455. for (var key in pre) {
  13456. var currentValue = current[key];
  13457. if (currentValue === undefined) {
  13458. current[key] = null;
  13459. } else {
  13460. syncKeys(currentValue, pre[key]);
  13461. }
  13462. }
  13463. }
  13464. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  13465. if (current.length >= pre.length) {
  13466. pre.forEach(function (item, index) {
  13467. syncKeys(current[index], item);
  13468. });
  13469. }
  13470. }
  13471. }
  13472. function _diff(current, pre, path, result) {
  13473. if (current === pre) { return }
  13474. var rootCurrentType = type(current);
  13475. var rootPreType = type(pre);
  13476. if (rootCurrentType == OBJECTTYPE) {
  13477. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  13478. setResult(result, path, current);
  13479. } else {
  13480. var loop = function ( key ) {
  13481. var currentValue = current[key];
  13482. var preValue = pre[key];
  13483. var currentType = type(currentValue);
  13484. var preType = type(preValue);
  13485. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  13486. if (currentValue !== pre[key]) {
  13487. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  13488. }
  13489. } else if (currentType == ARRAYTYPE) {
  13490. if (preType != ARRAYTYPE) {
  13491. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  13492. } else {
  13493. if (currentValue.length < preValue.length) {
  13494. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  13495. } else {
  13496. currentValue.forEach(function (item, index) {
  13497. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  13498. });
  13499. }
  13500. }
  13501. } else if (currentType == OBJECTTYPE) {
  13502. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  13503. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  13504. } else {
  13505. for (var subKey in currentValue) {
  13506. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  13507. }
  13508. }
  13509. }
  13510. };
  13511. for (var key in current) loop( key );
  13512. }
  13513. } else if (rootCurrentType == ARRAYTYPE) {
  13514. if (rootPreType != ARRAYTYPE) {
  13515. setResult(result, path, current);
  13516. } else {
  13517. if (current.length < pre.length) {
  13518. setResult(result, path, current);
  13519. } else {
  13520. current.forEach(function (item, index) {
  13521. _diff(item, pre[index], path + '[' + index + ']', result);
  13522. });
  13523. }
  13524. }
  13525. } else {
  13526. setResult(result, path, current);
  13527. }
  13528. }
  13529. function setResult(result, k, v) {
  13530. // if (type(v) != FUNCTIONTYPE) {
  13531. result[k] = v;
  13532. // }
  13533. }
  13534. function type(obj) {
  13535. return Object.prototype.toString.call(obj)
  13536. }
  13537. /* */
  13538. function flushCallbacks$1(vm) {
  13539. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  13540. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"鸿蒙德","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  13541. var mpInstance = vm.$scope;
  13542. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  13543. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  13544. }
  13545. var copies = vm.__next_tick_callbacks.slice(0);
  13546. vm.__next_tick_callbacks.length = 0;
  13547. for (var i = 0; i < copies.length; i++) {
  13548. copies[i]();
  13549. }
  13550. }
  13551. }
  13552. function hasRenderWatcher(vm) {
  13553. return queue.find(function (watcher) { return vm._watcher === watcher; })
  13554. }
  13555. function nextTick$1(vm, cb) {
  13556. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  13557. //2.nextTick 之前存在 render watcher
  13558. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  13559. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"鸿蒙德","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  13560. var mpInstance = vm.$scope;
  13561. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  13562. ']:nextVueTick');
  13563. }
  13564. return nextTick(cb, vm)
  13565. }else{
  13566. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"鸿蒙德","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  13567. var mpInstance$1 = vm.$scope;
  13568. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  13569. ']:nextMPTick');
  13570. }
  13571. }
  13572. var _resolve;
  13573. if (!vm.__next_tick_callbacks) {
  13574. vm.__next_tick_callbacks = [];
  13575. }
  13576. vm.__next_tick_callbacks.push(function () {
  13577. if (cb) {
  13578. try {
  13579. cb.call(vm);
  13580. } catch (e) {
  13581. handleError(e, vm, 'nextTick');
  13582. }
  13583. } else if (_resolve) {
  13584. _resolve(vm);
  13585. }
  13586. });
  13587. // $flow-disable-line
  13588. if (!cb && typeof Promise !== 'undefined') {
  13589. return new Promise(function (resolve) {
  13590. _resolve = resolve;
  13591. })
  13592. }
  13593. }
  13594. /* */
  13595. function cloneWithData(vm) {
  13596. // 确保当前 vm 所有数据被同步
  13597. var ret = Object.create(null);
  13598. var dataKeys = [].concat(
  13599. Object.keys(vm._data || {}),
  13600. Object.keys(vm._computedWatchers || {}));
  13601. dataKeys.reduce(function(ret, key) {
  13602. ret[key] = vm[key];
  13603. return ret
  13604. }, ret);
  13605. // vue-composition-api
  13606. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  13607. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  13608. if (rawBindings) {
  13609. Object.keys(rawBindings).forEach(function (key) {
  13610. ret[key] = vm[key];
  13611. });
  13612. }
  13613. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  13614. Object.assign(ret, vm.$mp.data || {});
  13615. if (
  13616. Array.isArray(vm.$options.behaviors) &&
  13617. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  13618. ) { //form-field
  13619. ret['name'] = vm.name;
  13620. ret['value'] = vm.value;
  13621. }
  13622. return JSON.parse(JSON.stringify(ret))
  13623. }
  13624. var patch = function(oldVnode, vnode) {
  13625. var this$1 = this;
  13626. if (vnode === null) { //destroy
  13627. return
  13628. }
  13629. if (this.mpType === 'page' || this.mpType === 'component') {
  13630. var mpInstance = this.$scope;
  13631. var data = Object.create(null);
  13632. try {
  13633. data = cloneWithData(this);
  13634. } catch (err) {
  13635. console.error(err);
  13636. }
  13637. data.__webviewId__ = mpInstance.data.__webviewId__;
  13638. var mpData = Object.create(null);
  13639. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  13640. mpData[key] = mpInstance.data[key];
  13641. });
  13642. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  13643. if (Object.keys(diffData).length) {
  13644. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"鸿蒙德","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  13645. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  13646. ']差量更新',
  13647. JSON.stringify(diffData));
  13648. }
  13649. this.__next_tick_pending = true;
  13650. mpInstance.setData(diffData, function () {
  13651. this$1.__next_tick_pending = false;
  13652. flushCallbacks$1(this$1);
  13653. });
  13654. } else {
  13655. flushCallbacks$1(this);
  13656. }
  13657. }
  13658. };
  13659. /* */
  13660. function createEmptyRender() {
  13661. }
  13662. function mountComponent$1(
  13663. vm,
  13664. el,
  13665. hydrating
  13666. ) {
  13667. if (!vm.mpType) {//main.js 中的 new Vue
  13668. return vm
  13669. }
  13670. if (vm.mpType === 'app') {
  13671. vm.$options.render = createEmptyRender;
  13672. }
  13673. if (!vm.$options.render) {
  13674. vm.$options.render = createEmptyRender;
  13675. if (true) {
  13676. /* istanbul ignore if */
  13677. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  13678. vm.$options.el || el) {
  13679. warn(
  13680. 'You are using the runtime-only build of Vue where the template ' +
  13681. 'compiler is not available. Either pre-compile the templates into ' +
  13682. 'render functions, or use the compiler-included build.',
  13683. vm
  13684. );
  13685. } else {
  13686. warn(
  13687. 'Failed to mount component: template or render function not defined.',
  13688. vm
  13689. );
  13690. }
  13691. }
  13692. }
  13693. !vm._$fallback && callHook(vm, 'beforeMount');
  13694. var updateComponent = function () {
  13695. vm._update(vm._render(), hydrating);
  13696. };
  13697. // we set this to vm._watcher inside the watcher's constructor
  13698. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  13699. // component's mounted hook), which relies on vm._watcher being already defined
  13700. new Watcher(vm, updateComponent, noop, {
  13701. before: function before() {
  13702. if (vm._isMounted && !vm._isDestroyed) {
  13703. callHook(vm, 'beforeUpdate');
  13704. }
  13705. }
  13706. }, true /* isRenderWatcher */);
  13707. hydrating = false;
  13708. return vm
  13709. }
  13710. /* */
  13711. function renderClass (
  13712. staticClass,
  13713. dynamicClass
  13714. ) {
  13715. if (isDef(staticClass) || isDef(dynamicClass)) {
  13716. return concat(staticClass, stringifyClass(dynamicClass))
  13717. }
  13718. /* istanbul ignore next */
  13719. return ''
  13720. }
  13721. function concat (a, b) {
  13722. return a ? b ? (a + ' ' + b) : a : (b || '')
  13723. }
  13724. function stringifyClass (value) {
  13725. if (Array.isArray(value)) {
  13726. return stringifyArray(value)
  13727. }
  13728. if (isObject(value)) {
  13729. return stringifyObject(value)
  13730. }
  13731. if (typeof value === 'string') {
  13732. return value
  13733. }
  13734. /* istanbul ignore next */
  13735. return ''
  13736. }
  13737. function stringifyArray (value) {
  13738. var res = '';
  13739. var stringified;
  13740. for (var i = 0, l = value.length; i < l; i++) {
  13741. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  13742. if (res) { res += ' '; }
  13743. res += stringified;
  13744. }
  13745. }
  13746. return res
  13747. }
  13748. function stringifyObject (value) {
  13749. var res = '';
  13750. for (var key in value) {
  13751. if (value[key]) {
  13752. if (res) { res += ' '; }
  13753. res += key;
  13754. }
  13755. }
  13756. return res
  13757. }
  13758. /* */
  13759. var parseStyleText = cached(function (cssText) {
  13760. var res = {};
  13761. var listDelimiter = /;(?![^(]*\))/g;
  13762. var propertyDelimiter = /:(.+)/;
  13763. cssText.split(listDelimiter).forEach(function (item) {
  13764. if (item) {
  13765. var tmp = item.split(propertyDelimiter);
  13766. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  13767. }
  13768. });
  13769. return res
  13770. });
  13771. // normalize possible array / string values into Object
  13772. function normalizeStyleBinding (bindingStyle) {
  13773. if (Array.isArray(bindingStyle)) {
  13774. return toObject(bindingStyle)
  13775. }
  13776. if (typeof bindingStyle === 'string') {
  13777. return parseStyleText(bindingStyle)
  13778. }
  13779. return bindingStyle
  13780. }
  13781. /* */
  13782. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  13783. function getTarget(obj, path) {
  13784. var parts = path.split('.');
  13785. var key = parts[0];
  13786. if (key.indexOf('__$n') === 0) { //number index
  13787. key = parseInt(key.replace('__$n', ''));
  13788. }
  13789. if (parts.length === 1) {
  13790. return obj[key]
  13791. }
  13792. return getTarget(obj[key], parts.slice(1).join('.'))
  13793. }
  13794. function internalMixin(Vue) {
  13795. Vue.config.errorHandler = function(err, vm, info) {
  13796. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  13797. console.error(err);
  13798. /* eslint-disable no-undef */
  13799. var app = typeof getApp === 'function' && getApp();
  13800. if (app && app.onError) {
  13801. app.onError(err);
  13802. }
  13803. };
  13804. var oldEmit = Vue.prototype.$emit;
  13805. Vue.prototype.$emit = function(event) {
  13806. if (this.$scope && event) {
  13807. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  13808. if (triggerEvent) {
  13809. triggerEvent.call(this.$scope, event, {
  13810. __args__: toArray(arguments, 1)
  13811. });
  13812. }
  13813. }
  13814. return oldEmit.apply(this, arguments)
  13815. };
  13816. Vue.prototype.$nextTick = function(fn) {
  13817. return nextTick$1(this, fn)
  13818. };
  13819. MP_METHODS.forEach(function (method) {
  13820. Vue.prototype[method] = function(args) {
  13821. if (this.$scope && this.$scope[method]) {
  13822. return this.$scope[method](args)
  13823. }
  13824. // mp-alipay
  13825. if (typeof my === 'undefined') {
  13826. return
  13827. }
  13828. if (method === 'createSelectorQuery') {
  13829. /* eslint-disable no-undef */
  13830. return my.createSelectorQuery(args)
  13831. } else if (method === 'createIntersectionObserver') {
  13832. /* eslint-disable no-undef */
  13833. return my.createIntersectionObserver(args)
  13834. }
  13835. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  13836. };
  13837. });
  13838. Vue.prototype.__init_provide = initProvide;
  13839. Vue.prototype.__init_injections = initInjections;
  13840. Vue.prototype.__call_hook = function(hook, args) {
  13841. var vm = this;
  13842. // #7573 disable dep collection when invoking lifecycle hooks
  13843. pushTarget();
  13844. var handlers = vm.$options[hook];
  13845. var info = hook + " hook";
  13846. var ret;
  13847. if (handlers) {
  13848. for (var i = 0, j = handlers.length; i < j; i++) {
  13849. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  13850. }
  13851. }
  13852. if (vm._hasHookEvent) {
  13853. vm.$emit('hook:' + hook, args);
  13854. }
  13855. popTarget();
  13856. return ret
  13857. };
  13858. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  13859. if (Array.isArray(modifiers)) {
  13860. if (modifiers.indexOf('trim') !== -1) {
  13861. value = value.trim();
  13862. }
  13863. if (modifiers.indexOf('number') !== -1) {
  13864. value = this._n(value);
  13865. }
  13866. }
  13867. if (!target) {
  13868. target = this;
  13869. }
  13870. // 解决动态属性添加
  13871. Vue.set(target, key, value);
  13872. };
  13873. Vue.prototype.__set_sync = function(target, key, value) {
  13874. if (!target) {
  13875. target = this;
  13876. }
  13877. // 解决动态属性添加
  13878. Vue.set(target, key, value);
  13879. };
  13880. Vue.prototype.__get_orig = function(item) {
  13881. if (isPlainObject(item)) {
  13882. return item['$orig'] || item
  13883. }
  13884. return item
  13885. };
  13886. Vue.prototype.__get_value = function(dataPath, target) {
  13887. return getTarget(target || this, dataPath)
  13888. };
  13889. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  13890. return renderClass(staticClass, dynamicClass)
  13891. };
  13892. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  13893. if (!dynamicStyle && !staticStyle) {
  13894. return ''
  13895. }
  13896. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  13897. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  13898. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  13899. };
  13900. Vue.prototype.__map = function(val, iteratee) {
  13901. //TODO 暂不考虑 string
  13902. var ret, i, l, keys, key;
  13903. if (Array.isArray(val)) {
  13904. ret = new Array(val.length);
  13905. for (i = 0, l = val.length; i < l; i++) {
  13906. ret[i] = iteratee(val[i], i);
  13907. }
  13908. return ret
  13909. } else if (isObject(val)) {
  13910. keys = Object.keys(val);
  13911. ret = Object.create(null);
  13912. for (i = 0, l = keys.length; i < l; i++) {
  13913. key = keys[i];
  13914. ret[key] = iteratee(val[key], key, i);
  13915. }
  13916. return ret
  13917. } else if (typeof val === 'number') {
  13918. ret = new Array(val);
  13919. for (i = 0, l = val; i < l; i++) {
  13920. // 第一个参数暂时仍和小程序一致
  13921. ret[i] = iteratee(i, i);
  13922. }
  13923. return ret
  13924. }
  13925. return []
  13926. };
  13927. }
  13928. /* */
  13929. var LIFECYCLE_HOOKS$1 = [
  13930. //App
  13931. 'onLaunch',
  13932. 'onShow',
  13933. 'onHide',
  13934. 'onUniNViewMessage',
  13935. 'onPageNotFound',
  13936. 'onThemeChange',
  13937. 'onError',
  13938. 'onUnhandledRejection',
  13939. //Page
  13940. 'onInit',
  13941. 'onLoad',
  13942. // 'onShow',
  13943. 'onReady',
  13944. // 'onHide',
  13945. 'onUnload',
  13946. 'onPullDownRefresh',
  13947. 'onReachBottom',
  13948. 'onTabItemTap',
  13949. 'onAddToFavorites',
  13950. 'onShareTimeline',
  13951. 'onShareAppMessage',
  13952. 'onResize',
  13953. 'onPageScroll',
  13954. 'onNavigationBarButtonTap',
  13955. 'onBackPress',
  13956. 'onNavigationBarSearchInputChanged',
  13957. 'onNavigationBarSearchInputConfirmed',
  13958. 'onNavigationBarSearchInputClicked',
  13959. //Component
  13960. // 'onReady', // 兼容旧版本,应该移除该事件
  13961. 'onPageShow',
  13962. 'onPageHide',
  13963. 'onPageResize',
  13964. 'onUploadDouyinVideo'
  13965. ];
  13966. function lifecycleMixin$1(Vue) {
  13967. //fixed vue-class-component
  13968. var oldExtend = Vue.extend;
  13969. Vue.extend = function(extendOptions) {
  13970. extendOptions = extendOptions || {};
  13971. var methods = extendOptions.methods;
  13972. if (methods) {
  13973. Object.keys(methods).forEach(function (methodName) {
  13974. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  13975. extendOptions[methodName] = methods[methodName];
  13976. delete methods[methodName];
  13977. }
  13978. });
  13979. }
  13980. return oldExtend.call(this, extendOptions)
  13981. };
  13982. var strategies = Vue.config.optionMergeStrategies;
  13983. var mergeHook = strategies.created;
  13984. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  13985. strategies[hook] = mergeHook;
  13986. });
  13987. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  13988. }
  13989. /* */
  13990. // install platform patch function
  13991. Vue.prototype.__patch__ = patch;
  13992. // public mount method
  13993. Vue.prototype.$mount = function(
  13994. el ,
  13995. hydrating
  13996. ) {
  13997. return mountComponent$1(this, el, hydrating)
  13998. };
  13999. lifecycleMixin$1(Vue);
  14000. internalMixin(Vue);
  14001. /* */
  14002. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  14003. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  14004. /***/ }),
  14005. /***/ 413:
  14006. /*!****************************************************!*\
  14007. !*** D:/2022/10/hmd/components/uni-icons/icons.js ***!
  14008. \****************************************************/
  14009. /*! no static exports found */
  14010. /***/ (function(module, exports, __webpack_require__) {
  14011. "use strict";
  14012. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  14013. 'contact': "\uE100",
  14014. 'person': "\uE101",
  14015. 'personadd': "\uE102",
  14016. 'contact-filled': "\uE130",
  14017. 'person-filled': "\uE131",
  14018. 'personadd-filled': "\uE132",
  14019. 'phone': "\uE200",
  14020. 'email': "\uE201",
  14021. 'chatbubble': "\uE202",
  14022. 'chatboxes': "\uE203",
  14023. 'phone-filled': "\uE230",
  14024. 'email-filled': "\uE231",
  14025. 'chatbubble-filled': "\uE232",
  14026. 'chatboxes-filled': "\uE233",
  14027. 'weibo': "\uE260",
  14028. 'weixin': "\uE261",
  14029. 'pengyouquan': "\uE262",
  14030. 'chat': "\uE263",
  14031. 'qq': "\uE264",
  14032. 'videocam': "\uE300",
  14033. 'camera': "\uE301",
  14034. 'mic': "\uE302",
  14035. 'location': "\uE303",
  14036. 'mic-filled': "\uE332",
  14037. 'speech': "\uE332",
  14038. 'location-filled': "\uE333",
  14039. 'micoff': "\uE360",
  14040. 'image': "\uE363",
  14041. 'map': "\uE364",
  14042. 'compose': "\uE400",
  14043. 'trash': "\uE401",
  14044. 'upload': "\uE402",
  14045. 'download': "\uE403",
  14046. 'close': "\uE404",
  14047. 'redo': "\uE405",
  14048. 'undo': "\uE406",
  14049. 'refresh': "\uE407",
  14050. 'star': "\uE408",
  14051. 'plus': "\uE409",
  14052. 'minus': "\uE410",
  14053. 'circle': "\uE411",
  14054. 'checkbox': "\uE411",
  14055. 'close-filled': "\uE434",
  14056. 'clear': "\uE434",
  14057. 'refresh-filled': "\uE437",
  14058. 'star-filled': "\uE438",
  14059. 'plus-filled': "\uE439",
  14060. 'minus-filled': "\uE440",
  14061. 'circle-filled': "\uE441",
  14062. 'checkbox-filled': "\uE442",
  14063. 'closeempty': "\uE460",
  14064. 'refreshempty': "\uE461",
  14065. 'reload': "\uE462",
  14066. 'starhalf': "\uE463",
  14067. 'spinner': "\uE464",
  14068. 'spinner-cycle': "\uE465",
  14069. 'search': "\uE466",
  14070. 'plusempty': "\uE468",
  14071. 'forward': "\uE470",
  14072. 'back': "\uE471",
  14073. 'left-nav': "\uE471",
  14074. 'checkmarkempty': "\uE472",
  14075. 'home': "\uE500",
  14076. 'navigate': "\uE501",
  14077. 'gear': "\uE502",
  14078. 'paperplane': "\uE503",
  14079. 'info': "\uE504",
  14080. 'help': "\uE505",
  14081. 'locked': "\uE506",
  14082. 'more': "\uE507",
  14083. 'flag': "\uE508",
  14084. 'home-filled': "\uE530",
  14085. 'gear-filled': "\uE532",
  14086. 'info-filled': "\uE534",
  14087. 'help-filled': "\uE535",
  14088. 'more-filled': "\uE537",
  14089. 'settings': "\uE560",
  14090. 'list': "\uE562",
  14091. 'bars': "\uE563",
  14092. 'loop': "\uE565",
  14093. 'paperclip': "\uE567",
  14094. 'eye': "\uE568",
  14095. 'arrowup': "\uE580",
  14096. 'arrowdown': "\uE581",
  14097. 'arrowleft': "\uE582",
  14098. 'arrowright': "\uE583",
  14099. 'arrowthinup': "\uE584",
  14100. 'arrowthindown': "\uE585",
  14101. 'arrowthinleft': "\uE586",
  14102. 'arrowthinright': "\uE587",
  14103. 'pulldown': "\uE588",
  14104. 'closefill': "\uE589",
  14105. 'sound': "\uE590",
  14106. 'scan': "\uE612" };exports.default = _default;
  14107. /***/ }),
  14108. /***/ 5:
  14109. /*!*********************************!*\
  14110. !*** D:/2022/10/hmd/pages.json ***!
  14111. \*********************************/
  14112. /*! no static exports found */
  14113. /***/ (function(module, exports) {
  14114. /***/ }),
  14115. /***/ 55:
  14116. /*!********************************************!*\
  14117. !*** D:/2022/10/hmd/utils/wxMinProgram.js ***!
  14118. \********************************************/
  14119. /*! no static exports found */
  14120. /***/ (function(module, exports, __webpack_require__) {
  14121. "use strict";
  14122. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.loginWinxinMp = loginWinxinMp;var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 6));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  14123. //微信登录
  14124. /**
  14125. * @param {string} 当前页面地址信息
  14126. */
  14127. function loginWinxinMp() {
  14128. var pages = getCurrentPages();
  14129. // 获取跳转前页面
  14130. var page = pages[pages.length - 2];
  14131. var queryUrl = '';
  14132. for (var key in page.options) {
  14133. queryUrl += key + '=' + page.options[key] + "&";
  14134. }
  14135. // 获取当页面路由地址
  14136. var path = '/' + page.route + '?' + queryUrl;
  14137. // 保存跳转前页面
  14138. uni.setStorageSync('present', path);
  14139. return new Promise(function (resolve, reject) {
  14140. wx.login({
  14141. success: function success(e) {
  14142. // uni.showModal({
  14143. // title:'zhi1',
  14144. // content:JSON.stringify(e)
  14145. // })
  14146. console.log(e);
  14147. resolve(e);
  14148. },
  14149. fill: function fill(e) {
  14150. reject(e);
  14151. } });
  14152. });
  14153. };
  14154. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  14155. /***/ }),
  14156. /***/ 56:
  14157. /*!********************************!*\
  14158. !*** D:/2022/10/hmd/api/wx.js ***!
  14159. \********************************/
  14160. /*! no static exports found */
  14161. /***/ (function(module, exports, __webpack_require__) {
  14162. "use strict";
  14163. Object.defineProperty(exports, "__esModule", { value: true });exports.wechatMpAuth = wechatMpAuth;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  14164. // 微信code地址
  14165. function wechatMpAuth(data) {
  14166. return (0, _request.default)({
  14167. url: '/api/wechat/mp_auth',
  14168. method: 'post',
  14169. data: data });
  14170. }
  14171. /***/ }),
  14172. /***/ 6:
  14173. /*!*************************************!*\
  14174. !*** D:/2022/10/hmd/store/index.js ***!
  14175. \*************************************/
  14176. /*! no static exports found */
  14177. /***/ (function(module, exports, __webpack_require__) {
  14178. "use strict";
  14179. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
  14180. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 7));
  14181. var _user = _interopRequireDefault(__webpack_require__(/*! ./model/user */ 8));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  14182. _vue.default.use(_vuex.default);
  14183. var store = new _vuex.default.Store({
  14184. state: {
  14185. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  14186. baseURL: 'https://hongmd.liuniu946.com', //请求地址配置
  14187. urlFile: '/index', //项目部署所在文件夹
  14188. userInfo: {}, //登录信息
  14189. loginInterceptor: false, //是否打开强制登录
  14190. weichatInfo: {}, //保存微信注册信息
  14191. weichatObj: '' //微信对象
  14192. },
  14193. mutations: {
  14194. //保存微信信息
  14195. setWeiChatInfo: function setWeiChatInfo(state, provider) {
  14196. state.weichatInfo = provider;
  14197. },
  14198. //保存微信对象
  14199. setWeiChatObj: function setWeiChatObj(state, provider) {
  14200. state.weichatObj = provider;
  14201. } },
  14202. modules: {
  14203. user: _user.default },
  14204. actions: {} });var _default =
  14205. store;exports.default = _default;
  14206. /***/ }),
  14207. /***/ 7:
  14208. /*!**************************************************************************************!*\
  14209. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  14210. \**************************************************************************************/
  14211. /*! no static exports found */
  14212. /***/ (function(module, exports, __webpack_require__) {
  14213. "use strict";
  14214. /* WEBPACK VAR INJECTION */(function(global) {/*!
  14215. * vuex v3.6.2
  14216. * (c) 2021 Evan You
  14217. * @license MIT
  14218. */
  14219. function applyMixin (Vue) {
  14220. var version = Number(Vue.version.split('.')[0]);
  14221. if (version >= 2) {
  14222. Vue.mixin({ beforeCreate: vuexInit });
  14223. } else {
  14224. // override init and inject vuex init procedure
  14225. // for 1.x backwards compatibility.
  14226. var _init = Vue.prototype._init;
  14227. Vue.prototype._init = function (options) {
  14228. if ( options === void 0 ) options = {};
  14229. options.init = options.init
  14230. ? [vuexInit].concat(options.init)
  14231. : vuexInit;
  14232. _init.call(this, options);
  14233. };
  14234. }
  14235. /**
  14236. * Vuex init hook, injected into each instances init hooks list.
  14237. */
  14238. function vuexInit () {
  14239. var options = this.$options;
  14240. // store injection
  14241. if (options.store) {
  14242. this.$store = typeof options.store === 'function'
  14243. ? options.store()
  14244. : options.store;
  14245. } else if (options.parent && options.parent.$store) {
  14246. this.$store = options.parent.$store;
  14247. }
  14248. }
  14249. }
  14250. var target = typeof window !== 'undefined'
  14251. ? window
  14252. : typeof global !== 'undefined'
  14253. ? global
  14254. : {};
  14255. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  14256. function devtoolPlugin (store) {
  14257. if (!devtoolHook) { return }
  14258. store._devtoolHook = devtoolHook;
  14259. devtoolHook.emit('vuex:init', store);
  14260. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  14261. store.replaceState(targetState);
  14262. });
  14263. store.subscribe(function (mutation, state) {
  14264. devtoolHook.emit('vuex:mutation', mutation, state);
  14265. }, { prepend: true });
  14266. store.subscribeAction(function (action, state) {
  14267. devtoolHook.emit('vuex:action', action, state);
  14268. }, { prepend: true });
  14269. }
  14270. /**
  14271. * Get the first item that pass the test
  14272. * by second argument function
  14273. *
  14274. * @param {Array} list
  14275. * @param {Function} f
  14276. * @return {*}
  14277. */
  14278. function find (list, f) {
  14279. return list.filter(f)[0]
  14280. }
  14281. /**
  14282. * Deep copy the given object considering circular structure.
  14283. * This function caches all nested objects and its copies.
  14284. * If it detects circular structure, use cached copy to avoid infinite loop.
  14285. *
  14286. * @param {*} obj
  14287. * @param {Array<Object>} cache
  14288. * @return {*}
  14289. */
  14290. function deepCopy (obj, cache) {
  14291. if ( cache === void 0 ) cache = [];
  14292. // just return if obj is immutable value
  14293. if (obj === null || typeof obj !== 'object') {
  14294. return obj
  14295. }
  14296. // if obj is hit, it is in circular structure
  14297. var hit = find(cache, function (c) { return c.original === obj; });
  14298. if (hit) {
  14299. return hit.copy
  14300. }
  14301. var copy = Array.isArray(obj) ? [] : {};
  14302. // put the copy into cache at first
  14303. // because we want to refer it in recursive deepCopy
  14304. cache.push({
  14305. original: obj,
  14306. copy: copy
  14307. });
  14308. Object.keys(obj).forEach(function (key) {
  14309. copy[key] = deepCopy(obj[key], cache);
  14310. });
  14311. return copy
  14312. }
  14313. /**
  14314. * forEach for object
  14315. */
  14316. function forEachValue (obj, fn) {
  14317. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  14318. }
  14319. function isObject (obj) {
  14320. return obj !== null && typeof obj === 'object'
  14321. }
  14322. function isPromise (val) {
  14323. return val && typeof val.then === 'function'
  14324. }
  14325. function assert (condition, msg) {
  14326. if (!condition) { throw new Error(("[vuex] " + msg)) }
  14327. }
  14328. function partial (fn, arg) {
  14329. return function () {
  14330. return fn(arg)
  14331. }
  14332. }
  14333. // Base data struct for store's module, package with some attribute and method
  14334. var Module = function Module (rawModule, runtime) {
  14335. this.runtime = runtime;
  14336. // Store some children item
  14337. this._children = Object.create(null);
  14338. // Store the origin module object which passed by programmer
  14339. this._rawModule = rawModule;
  14340. var rawState = rawModule.state;
  14341. // Store the origin module's state
  14342. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  14343. };
  14344. var prototypeAccessors = { namespaced: { configurable: true } };
  14345. prototypeAccessors.namespaced.get = function () {
  14346. return !!this._rawModule.namespaced
  14347. };
  14348. Module.prototype.addChild = function addChild (key, module) {
  14349. this._children[key] = module;
  14350. };
  14351. Module.prototype.removeChild = function removeChild (key) {
  14352. delete this._children[key];
  14353. };
  14354. Module.prototype.getChild = function getChild (key) {
  14355. return this._children[key]
  14356. };
  14357. Module.prototype.hasChild = function hasChild (key) {
  14358. return key in this._children
  14359. };
  14360. Module.prototype.update = function update (rawModule) {
  14361. this._rawModule.namespaced = rawModule.namespaced;
  14362. if (rawModule.actions) {
  14363. this._rawModule.actions = rawModule.actions;
  14364. }
  14365. if (rawModule.mutations) {
  14366. this._rawModule.mutations = rawModule.mutations;
  14367. }
  14368. if (rawModule.getters) {
  14369. this._rawModule.getters = rawModule.getters;
  14370. }
  14371. };
  14372. Module.prototype.forEachChild = function forEachChild (fn) {
  14373. forEachValue(this._children, fn);
  14374. };
  14375. Module.prototype.forEachGetter = function forEachGetter (fn) {
  14376. if (this._rawModule.getters) {
  14377. forEachValue(this._rawModule.getters, fn);
  14378. }
  14379. };
  14380. Module.prototype.forEachAction = function forEachAction (fn) {
  14381. if (this._rawModule.actions) {
  14382. forEachValue(this._rawModule.actions, fn);
  14383. }
  14384. };
  14385. Module.prototype.forEachMutation = function forEachMutation (fn) {
  14386. if (this._rawModule.mutations) {
  14387. forEachValue(this._rawModule.mutations, fn);
  14388. }
  14389. };
  14390. Object.defineProperties( Module.prototype, prototypeAccessors );
  14391. var ModuleCollection = function ModuleCollection (rawRootModule) {
  14392. // register root module (Vuex.Store options)
  14393. this.register([], rawRootModule, false);
  14394. };
  14395. ModuleCollection.prototype.get = function get (path) {
  14396. return path.reduce(function (module, key) {
  14397. return module.getChild(key)
  14398. }, this.root)
  14399. };
  14400. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  14401. var module = this.root;
  14402. return path.reduce(function (namespace, key) {
  14403. module = module.getChild(key);
  14404. return namespace + (module.namespaced ? key + '/' : '')
  14405. }, '')
  14406. };
  14407. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  14408. update([], this.root, rawRootModule);
  14409. };
  14410. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  14411. var this$1 = this;
  14412. if ( runtime === void 0 ) runtime = true;
  14413. if ((true)) {
  14414. assertRawModule(path, rawModule);
  14415. }
  14416. var newModule = new Module(rawModule, runtime);
  14417. if (path.length === 0) {
  14418. this.root = newModule;
  14419. } else {
  14420. var parent = this.get(path.slice(0, -1));
  14421. parent.addChild(path[path.length - 1], newModule);
  14422. }
  14423. // register nested modules
  14424. if (rawModule.modules) {
  14425. forEachValue(rawModule.modules, function (rawChildModule, key) {
  14426. this$1.register(path.concat(key), rawChildModule, runtime);
  14427. });
  14428. }
  14429. };
  14430. ModuleCollection.prototype.unregister = function unregister (path) {
  14431. var parent = this.get(path.slice(0, -1));
  14432. var key = path[path.length - 1];
  14433. var child = parent.getChild(key);
  14434. if (!child) {
  14435. if ((true)) {
  14436. console.warn(
  14437. "[vuex] trying to unregister module '" + key + "', which is " +
  14438. "not registered"
  14439. );
  14440. }
  14441. return
  14442. }
  14443. if (!child.runtime) {
  14444. return
  14445. }
  14446. parent.removeChild(key);
  14447. };
  14448. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  14449. var parent = this.get(path.slice(0, -1));
  14450. var key = path[path.length - 1];
  14451. if (parent) {
  14452. return parent.hasChild(key)
  14453. }
  14454. return false
  14455. };
  14456. function update (path, targetModule, newModule) {
  14457. if ((true)) {
  14458. assertRawModule(path, newModule);
  14459. }
  14460. // update target module
  14461. targetModule.update(newModule);
  14462. // update nested modules
  14463. if (newModule.modules) {
  14464. for (var key in newModule.modules) {
  14465. if (!targetModule.getChild(key)) {
  14466. if ((true)) {
  14467. console.warn(
  14468. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  14469. 'manual reload is needed'
  14470. );
  14471. }
  14472. return
  14473. }
  14474. update(
  14475. path.concat(key),
  14476. targetModule.getChild(key),
  14477. newModule.modules[key]
  14478. );
  14479. }
  14480. }
  14481. }
  14482. var functionAssert = {
  14483. assert: function (value) { return typeof value === 'function'; },
  14484. expected: 'function'
  14485. };
  14486. var objectAssert = {
  14487. assert: function (value) { return typeof value === 'function' ||
  14488. (typeof value === 'object' && typeof value.handler === 'function'); },
  14489. expected: 'function or object with "handler" function'
  14490. };
  14491. var assertTypes = {
  14492. getters: functionAssert,
  14493. mutations: functionAssert,
  14494. actions: objectAssert
  14495. };
  14496. function assertRawModule (path, rawModule) {
  14497. Object.keys(assertTypes).forEach(function (key) {
  14498. if (!rawModule[key]) { return }
  14499. var assertOptions = assertTypes[key];
  14500. forEachValue(rawModule[key], function (value, type) {
  14501. assert(
  14502. assertOptions.assert(value),
  14503. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  14504. );
  14505. });
  14506. });
  14507. }
  14508. function makeAssertionMessage (path, key, type, value, expected) {
  14509. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  14510. if (path.length > 0) {
  14511. buf += " in module \"" + (path.join('.')) + "\"";
  14512. }
  14513. buf += " is " + (JSON.stringify(value)) + ".";
  14514. return buf
  14515. }
  14516. var Vue; // bind on install
  14517. var Store = function Store (options) {
  14518. var this$1 = this;
  14519. if ( options === void 0 ) options = {};
  14520. // Auto install if it is not done yet and `window` has `Vue`.
  14521. // To allow users to avoid auto-installation in some cases,
  14522. // this code should be placed here. See #731
  14523. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  14524. install(window.Vue);
  14525. }
  14526. if ((true)) {
  14527. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  14528. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  14529. assert(this instanceof Store, "store must be called with the new operator.");
  14530. }
  14531. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  14532. var strict = options.strict; if ( strict === void 0 ) strict = false;
  14533. // store internal state
  14534. this._committing = false;
  14535. this._actions = Object.create(null);
  14536. this._actionSubscribers = [];
  14537. this._mutations = Object.create(null);
  14538. this._wrappedGetters = Object.create(null);
  14539. this._modules = new ModuleCollection(options);
  14540. this._modulesNamespaceMap = Object.create(null);
  14541. this._subscribers = [];
  14542. this._watcherVM = new Vue();
  14543. this._makeLocalGettersCache = Object.create(null);
  14544. // bind commit and dispatch to self
  14545. var store = this;
  14546. var ref = this;
  14547. var dispatch = ref.dispatch;
  14548. var commit = ref.commit;
  14549. this.dispatch = function boundDispatch (type, payload) {
  14550. return dispatch.call(store, type, payload)
  14551. };
  14552. this.commit = function boundCommit (type, payload, options) {
  14553. return commit.call(store, type, payload, options)
  14554. };
  14555. // strict mode
  14556. this.strict = strict;
  14557. var state = this._modules.root.state;
  14558. // init root module.
  14559. // this also recursively registers all sub-modules
  14560. // and collects all module getters inside this._wrappedGetters
  14561. installModule(this, state, [], this._modules.root);
  14562. // initialize the store vm, which is responsible for the reactivity
  14563. // (also registers _wrappedGetters as computed properties)
  14564. resetStoreVM(this, state);
  14565. // apply plugins
  14566. plugins.forEach(function (plugin) { return plugin(this$1); });
  14567. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  14568. if (useDevtools) {
  14569. devtoolPlugin(this);
  14570. }
  14571. };
  14572. var prototypeAccessors$1 = { state: { configurable: true } };
  14573. prototypeAccessors$1.state.get = function () {
  14574. return this._vm._data.$$state
  14575. };
  14576. prototypeAccessors$1.state.set = function (v) {
  14577. if ((true)) {
  14578. assert(false, "use store.replaceState() to explicit replace store state.");
  14579. }
  14580. };
  14581. Store.prototype.commit = function commit (_type, _payload, _options) {
  14582. var this$1 = this;
  14583. // check object-style commit
  14584. var ref = unifyObjectStyle(_type, _payload, _options);
  14585. var type = ref.type;
  14586. var payload = ref.payload;
  14587. var options = ref.options;
  14588. var mutation = { type: type, payload: payload };
  14589. var entry = this._mutations[type];
  14590. if (!entry) {
  14591. if ((true)) {
  14592. console.error(("[vuex] unknown mutation type: " + type));
  14593. }
  14594. return
  14595. }
  14596. this._withCommit(function () {
  14597. entry.forEach(function commitIterator (handler) {
  14598. handler(payload);
  14599. });
  14600. });
  14601. this._subscribers
  14602. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  14603. .forEach(function (sub) { return sub(mutation, this$1.state); });
  14604. if (
  14605. ( true) &&
  14606. options && options.silent
  14607. ) {
  14608. console.warn(
  14609. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  14610. 'Use the filter functionality in the vue-devtools'
  14611. );
  14612. }
  14613. };
  14614. Store.prototype.dispatch = function dispatch (_type, _payload) {
  14615. var this$1 = this;
  14616. // check object-style dispatch
  14617. var ref = unifyObjectStyle(_type, _payload);
  14618. var type = ref.type;
  14619. var payload = ref.payload;
  14620. var action = { type: type, payload: payload };
  14621. var entry = this._actions[type];
  14622. if (!entry) {
  14623. if ((true)) {
  14624. console.error(("[vuex] unknown action type: " + type));
  14625. }
  14626. return
  14627. }
  14628. try {
  14629. this._actionSubscribers
  14630. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  14631. .filter(function (sub) { return sub.before; })
  14632. .forEach(function (sub) { return sub.before(action, this$1.state); });
  14633. } catch (e) {
  14634. if ((true)) {
  14635. console.warn("[vuex] error in before action subscribers: ");
  14636. console.error(e);
  14637. }
  14638. }
  14639. var result = entry.length > 1
  14640. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  14641. : entry[0](payload);
  14642. return new Promise(function (resolve, reject) {
  14643. result.then(function (res) {
  14644. try {
  14645. this$1._actionSubscribers
  14646. .filter(function (sub) { return sub.after; })
  14647. .forEach(function (sub) { return sub.after(action, this$1.state); });
  14648. } catch (e) {
  14649. if ((true)) {
  14650. console.warn("[vuex] error in after action subscribers: ");
  14651. console.error(e);
  14652. }
  14653. }
  14654. resolve(res);
  14655. }, function (error) {
  14656. try {
  14657. this$1._actionSubscribers
  14658. .filter(function (sub) { return sub.error; })
  14659. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  14660. } catch (e) {
  14661. if ((true)) {
  14662. console.warn("[vuex] error in error action subscribers: ");
  14663. console.error(e);
  14664. }
  14665. }
  14666. reject(error);
  14667. });
  14668. })
  14669. };
  14670. Store.prototype.subscribe = function subscribe (fn, options) {
  14671. return genericSubscribe(fn, this._subscribers, options)
  14672. };
  14673. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  14674. var subs = typeof fn === 'function' ? { before: fn } : fn;
  14675. return genericSubscribe(subs, this._actionSubscribers, options)
  14676. };
  14677. Store.prototype.watch = function watch (getter, cb, options) {
  14678. var this$1 = this;
  14679. if ((true)) {
  14680. assert(typeof getter === 'function', "store.watch only accepts a function.");
  14681. }
  14682. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  14683. };
  14684. Store.prototype.replaceState = function replaceState (state) {
  14685. var this$1 = this;
  14686. this._withCommit(function () {
  14687. this$1._vm._data.$$state = state;
  14688. });
  14689. };
  14690. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  14691. if ( options === void 0 ) options = {};
  14692. if (typeof path === 'string') { path = [path]; }
  14693. if ((true)) {
  14694. assert(Array.isArray(path), "module path must be a string or an Array.");
  14695. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  14696. }
  14697. this._modules.register(path, rawModule);
  14698. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  14699. // reset store to update getters...
  14700. resetStoreVM(this, this.state);
  14701. };
  14702. Store.prototype.unregisterModule = function unregisterModule (path) {
  14703. var this$1 = this;
  14704. if (typeof path === 'string') { path = [path]; }
  14705. if ((true)) {
  14706. assert(Array.isArray(path), "module path must be a string or an Array.");
  14707. }
  14708. this._modules.unregister(path);
  14709. this._withCommit(function () {
  14710. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  14711. Vue.delete(parentState, path[path.length - 1]);
  14712. });
  14713. resetStore(this);
  14714. };
  14715. Store.prototype.hasModule = function hasModule (path) {
  14716. if (typeof path === 'string') { path = [path]; }
  14717. if ((true)) {
  14718. assert(Array.isArray(path), "module path must be a string or an Array.");
  14719. }
  14720. return this._modules.isRegistered(path)
  14721. };
  14722. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  14723. this._modules.update(newOptions);
  14724. resetStore(this, true);
  14725. };
  14726. Store.prototype._withCommit = function _withCommit (fn) {
  14727. var committing = this._committing;
  14728. this._committing = true;
  14729. fn();
  14730. this._committing = committing;
  14731. };
  14732. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  14733. function genericSubscribe (fn, subs, options) {
  14734. if (subs.indexOf(fn) < 0) {
  14735. options && options.prepend
  14736. ? subs.unshift(fn)
  14737. : subs.push(fn);
  14738. }
  14739. return function () {
  14740. var i = subs.indexOf(fn);
  14741. if (i > -1) {
  14742. subs.splice(i, 1);
  14743. }
  14744. }
  14745. }
  14746. function resetStore (store, hot) {
  14747. store._actions = Object.create(null);
  14748. store._mutations = Object.create(null);
  14749. store._wrappedGetters = Object.create(null);
  14750. store._modulesNamespaceMap = Object.create(null);
  14751. var state = store.state;
  14752. // init all modules
  14753. installModule(store, state, [], store._modules.root, true);
  14754. // reset vm
  14755. resetStoreVM(store, state, hot);
  14756. }
  14757. function resetStoreVM (store, state, hot) {
  14758. var oldVm = store._vm;
  14759. // bind store public getters
  14760. store.getters = {};
  14761. // reset local getters cache
  14762. store._makeLocalGettersCache = Object.create(null);
  14763. var wrappedGetters = store._wrappedGetters;
  14764. var computed = {};
  14765. forEachValue(wrappedGetters, function (fn, key) {
  14766. // use computed to leverage its lazy-caching mechanism
  14767. // direct inline function use will lead to closure preserving oldVm.
  14768. // using partial to return function with only arguments preserved in closure environment.
  14769. computed[key] = partial(fn, store);
  14770. Object.defineProperty(store.getters, key, {
  14771. get: function () { return store._vm[key]; },
  14772. enumerable: true // for local getters
  14773. });
  14774. });
  14775. // use a Vue instance to store the state tree
  14776. // suppress warnings just in case the user has added
  14777. // some funky global mixins
  14778. var silent = Vue.config.silent;
  14779. Vue.config.silent = true;
  14780. store._vm = new Vue({
  14781. data: {
  14782. $$state: state
  14783. },
  14784. computed: computed
  14785. });
  14786. Vue.config.silent = silent;
  14787. // enable strict mode for new vm
  14788. if (store.strict) {
  14789. enableStrictMode(store);
  14790. }
  14791. if (oldVm) {
  14792. if (hot) {
  14793. // dispatch changes in all subscribed watchers
  14794. // to force getter re-evaluation for hot reloading.
  14795. store._withCommit(function () {
  14796. oldVm._data.$$state = null;
  14797. });
  14798. }
  14799. Vue.nextTick(function () { return oldVm.$destroy(); });
  14800. }
  14801. }
  14802. function installModule (store, rootState, path, module, hot) {
  14803. var isRoot = !path.length;
  14804. var namespace = store._modules.getNamespace(path);
  14805. // register in namespace map
  14806. if (module.namespaced) {
  14807. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  14808. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  14809. }
  14810. store._modulesNamespaceMap[namespace] = module;
  14811. }
  14812. // set state
  14813. if (!isRoot && !hot) {
  14814. var parentState = getNestedState(rootState, path.slice(0, -1));
  14815. var moduleName = path[path.length - 1];
  14816. store._withCommit(function () {
  14817. if ((true)) {
  14818. if (moduleName in parentState) {
  14819. console.warn(
  14820. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  14821. );
  14822. }
  14823. }
  14824. Vue.set(parentState, moduleName, module.state);
  14825. });
  14826. }
  14827. var local = module.context = makeLocalContext(store, namespace, path);
  14828. module.forEachMutation(function (mutation, key) {
  14829. var namespacedType = namespace + key;
  14830. registerMutation(store, namespacedType, mutation, local);
  14831. });
  14832. module.forEachAction(function (action, key) {
  14833. var type = action.root ? key : namespace + key;
  14834. var handler = action.handler || action;
  14835. registerAction(store, type, handler, local);
  14836. });
  14837. module.forEachGetter(function (getter, key) {
  14838. var namespacedType = namespace + key;
  14839. registerGetter(store, namespacedType, getter, local);
  14840. });
  14841. module.forEachChild(function (child, key) {
  14842. installModule(store, rootState, path.concat(key), child, hot);
  14843. });
  14844. }
  14845. /**
  14846. * make localized dispatch, commit, getters and state
  14847. * if there is no namespace, just use root ones
  14848. */
  14849. function makeLocalContext (store, namespace, path) {
  14850. var noNamespace = namespace === '';
  14851. var local = {
  14852. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  14853. var args = unifyObjectStyle(_type, _payload, _options);
  14854. var payload = args.payload;
  14855. var options = args.options;
  14856. var type = args.type;
  14857. if (!options || !options.root) {
  14858. type = namespace + type;
  14859. if (( true) && !store._actions[type]) {
  14860. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  14861. return
  14862. }
  14863. }
  14864. return store.dispatch(type, payload)
  14865. },
  14866. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  14867. var args = unifyObjectStyle(_type, _payload, _options);
  14868. var payload = args.payload;
  14869. var options = args.options;
  14870. var type = args.type;
  14871. if (!options || !options.root) {
  14872. type = namespace + type;
  14873. if (( true) && !store._mutations[type]) {
  14874. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  14875. return
  14876. }
  14877. }
  14878. store.commit(type, payload, options);
  14879. }
  14880. };
  14881. // getters and state object must be gotten lazily
  14882. // because they will be changed by vm update
  14883. Object.defineProperties(local, {
  14884. getters: {
  14885. get: noNamespace
  14886. ? function () { return store.getters; }
  14887. : function () { return makeLocalGetters(store, namespace); }
  14888. },
  14889. state: {
  14890. get: function () { return getNestedState(store.state, path); }
  14891. }
  14892. });
  14893. return local
  14894. }
  14895. function makeLocalGetters (store, namespace) {
  14896. if (!store._makeLocalGettersCache[namespace]) {
  14897. var gettersProxy = {};
  14898. var splitPos = namespace.length;
  14899. Object.keys(store.getters).forEach(function (type) {
  14900. // skip if the target getter is not match this namespace
  14901. if (type.slice(0, splitPos) !== namespace) { return }
  14902. // extract local getter type
  14903. var localType = type.slice(splitPos);
  14904. // Add a port to the getters proxy.
  14905. // Define as getter property because
  14906. // we do not want to evaluate the getters in this time.
  14907. Object.defineProperty(gettersProxy, localType, {
  14908. get: function () { return store.getters[type]; },
  14909. enumerable: true
  14910. });
  14911. });
  14912. store._makeLocalGettersCache[namespace] = gettersProxy;
  14913. }
  14914. return store._makeLocalGettersCache[namespace]
  14915. }
  14916. function registerMutation (store, type, handler, local) {
  14917. var entry = store._mutations[type] || (store._mutations[type] = []);
  14918. entry.push(function wrappedMutationHandler (payload) {
  14919. handler.call(store, local.state, payload);
  14920. });
  14921. }
  14922. function registerAction (store, type, handler, local) {
  14923. var entry = store._actions[type] || (store._actions[type] = []);
  14924. entry.push(function wrappedActionHandler (payload) {
  14925. var res = handler.call(store, {
  14926. dispatch: local.dispatch,
  14927. commit: local.commit,
  14928. getters: local.getters,
  14929. state: local.state,
  14930. rootGetters: store.getters,
  14931. rootState: store.state
  14932. }, payload);
  14933. if (!isPromise(res)) {
  14934. res = Promise.resolve(res);
  14935. }
  14936. if (store._devtoolHook) {
  14937. return res.catch(function (err) {
  14938. store._devtoolHook.emit('vuex:error', err);
  14939. throw err
  14940. })
  14941. } else {
  14942. return res
  14943. }
  14944. });
  14945. }
  14946. function registerGetter (store, type, rawGetter, local) {
  14947. if (store._wrappedGetters[type]) {
  14948. if ((true)) {
  14949. console.error(("[vuex] duplicate getter key: " + type));
  14950. }
  14951. return
  14952. }
  14953. store._wrappedGetters[type] = function wrappedGetter (store) {
  14954. return rawGetter(
  14955. local.state, // local state
  14956. local.getters, // local getters
  14957. store.state, // root state
  14958. store.getters // root getters
  14959. )
  14960. };
  14961. }
  14962. function enableStrictMode (store) {
  14963. store._vm.$watch(function () { return this._data.$$state }, function () {
  14964. if ((true)) {
  14965. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  14966. }
  14967. }, { deep: true, sync: true });
  14968. }
  14969. function getNestedState (state, path) {
  14970. return path.reduce(function (state, key) { return state[key]; }, state)
  14971. }
  14972. function unifyObjectStyle (type, payload, options) {
  14973. if (isObject(type) && type.type) {
  14974. options = payload;
  14975. payload = type;
  14976. type = type.type;
  14977. }
  14978. if ((true)) {
  14979. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  14980. }
  14981. return { type: type, payload: payload, options: options }
  14982. }
  14983. function install (_Vue) {
  14984. if (Vue && _Vue === Vue) {
  14985. if ((true)) {
  14986. console.error(
  14987. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  14988. );
  14989. }
  14990. return
  14991. }
  14992. Vue = _Vue;
  14993. applyMixin(Vue);
  14994. }
  14995. /**
  14996. * Reduce the code which written in Vue.js for getting the state.
  14997. * @param {String} [namespace] - Module's namespace
  14998. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  14999. * @param {Object}
  15000. */
  15001. var mapState = normalizeNamespace(function (namespace, states) {
  15002. var res = {};
  15003. if (( true) && !isValidMap(states)) {
  15004. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  15005. }
  15006. normalizeMap(states).forEach(function (ref) {
  15007. var key = ref.key;
  15008. var val = ref.val;
  15009. res[key] = function mappedState () {
  15010. var state = this.$store.state;
  15011. var getters = this.$store.getters;
  15012. if (namespace) {
  15013. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  15014. if (!module) {
  15015. return
  15016. }
  15017. state = module.context.state;
  15018. getters = module.context.getters;
  15019. }
  15020. return typeof val === 'function'
  15021. ? val.call(this, state, getters)
  15022. : state[val]
  15023. };
  15024. // mark vuex getter for devtools
  15025. res[key].vuex = true;
  15026. });
  15027. return res
  15028. });
  15029. /**
  15030. * Reduce the code which written in Vue.js for committing the mutation
  15031. * @param {String} [namespace] - Module's namespace
  15032. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  15033. * @return {Object}
  15034. */
  15035. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  15036. var res = {};
  15037. if (( true) && !isValidMap(mutations)) {
  15038. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  15039. }
  15040. normalizeMap(mutations).forEach(function (ref) {
  15041. var key = ref.key;
  15042. var val = ref.val;
  15043. res[key] = function mappedMutation () {
  15044. var args = [], len = arguments.length;
  15045. while ( len-- ) args[ len ] = arguments[ len ];
  15046. // Get the commit method from store
  15047. var commit = this.$store.commit;
  15048. if (namespace) {
  15049. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  15050. if (!module) {
  15051. return
  15052. }
  15053. commit = module.context.commit;
  15054. }
  15055. return typeof val === 'function'
  15056. ? val.apply(this, [commit].concat(args))
  15057. : commit.apply(this.$store, [val].concat(args))
  15058. };
  15059. });
  15060. return res
  15061. });
  15062. /**
  15063. * Reduce the code which written in Vue.js for getting the getters
  15064. * @param {String} [namespace] - Module's namespace
  15065. * @param {Object|Array} getters
  15066. * @return {Object}
  15067. */
  15068. var mapGetters = normalizeNamespace(function (namespace, getters) {
  15069. var res = {};
  15070. if (( true) && !isValidMap(getters)) {
  15071. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  15072. }
  15073. normalizeMap(getters).forEach(function (ref) {
  15074. var key = ref.key;
  15075. var val = ref.val;
  15076. // The namespace has been mutated by normalizeNamespace
  15077. val = namespace + val;
  15078. res[key] = function mappedGetter () {
  15079. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  15080. return
  15081. }
  15082. if (( true) && !(val in this.$store.getters)) {
  15083. console.error(("[vuex] unknown getter: " + val));
  15084. return
  15085. }
  15086. return this.$store.getters[val]
  15087. };
  15088. // mark vuex getter for devtools
  15089. res[key].vuex = true;
  15090. });
  15091. return res
  15092. });
  15093. /**
  15094. * Reduce the code which written in Vue.js for dispatch the action
  15095. * @param {String} [namespace] - Module's namespace
  15096. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  15097. * @return {Object}
  15098. */
  15099. var mapActions = normalizeNamespace(function (namespace, actions) {
  15100. var res = {};
  15101. if (( true) && !isValidMap(actions)) {
  15102. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  15103. }
  15104. normalizeMap(actions).forEach(function (ref) {
  15105. var key = ref.key;
  15106. var val = ref.val;
  15107. res[key] = function mappedAction () {
  15108. var args = [], len = arguments.length;
  15109. while ( len-- ) args[ len ] = arguments[ len ];
  15110. // get dispatch function from store
  15111. var dispatch = this.$store.dispatch;
  15112. if (namespace) {
  15113. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  15114. if (!module) {
  15115. return
  15116. }
  15117. dispatch = module.context.dispatch;
  15118. }
  15119. return typeof val === 'function'
  15120. ? val.apply(this, [dispatch].concat(args))
  15121. : dispatch.apply(this.$store, [val].concat(args))
  15122. };
  15123. });
  15124. return res
  15125. });
  15126. /**
  15127. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  15128. * @param {String} namespace
  15129. * @return {Object}
  15130. */
  15131. var createNamespacedHelpers = function (namespace) { return ({
  15132. mapState: mapState.bind(null, namespace),
  15133. mapGetters: mapGetters.bind(null, namespace),
  15134. mapMutations: mapMutations.bind(null, namespace),
  15135. mapActions: mapActions.bind(null, namespace)
  15136. }); };
  15137. /**
  15138. * Normalize the map
  15139. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  15140. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  15141. * @param {Array|Object} map
  15142. * @return {Object}
  15143. */
  15144. function normalizeMap (map) {
  15145. if (!isValidMap(map)) {
  15146. return []
  15147. }
  15148. return Array.isArray(map)
  15149. ? map.map(function (key) { return ({ key: key, val: key }); })
  15150. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  15151. }
  15152. /**
  15153. * Validate whether given map is valid or not
  15154. * @param {*} map
  15155. * @return {Boolean}
  15156. */
  15157. function isValidMap (map) {
  15158. return Array.isArray(map) || isObject(map)
  15159. }
  15160. /**
  15161. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  15162. * @param {Function} fn
  15163. * @return {Function}
  15164. */
  15165. function normalizeNamespace (fn) {
  15166. return function (namespace, map) {
  15167. if (typeof namespace !== 'string') {
  15168. map = namespace;
  15169. namespace = '';
  15170. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  15171. namespace += '/';
  15172. }
  15173. return fn(namespace, map)
  15174. }
  15175. }
  15176. /**
  15177. * Search a special module from store by namespace. if module not exist, print error message.
  15178. * @param {Object} store
  15179. * @param {String} helper
  15180. * @param {String} namespace
  15181. * @return {Object}
  15182. */
  15183. function getModuleByNamespace (store, helper, namespace) {
  15184. var module = store._modulesNamespaceMap[namespace];
  15185. if (( true) && !module) {
  15186. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  15187. }
  15188. return module
  15189. }
  15190. // Credits: borrowed code from fcomb/redux-logger
  15191. function createLogger (ref) {
  15192. if ( ref === void 0 ) ref = {};
  15193. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  15194. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  15195. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  15196. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  15197. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  15198. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  15199. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  15200. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  15201. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  15202. return function (store) {
  15203. var prevState = deepCopy(store.state);
  15204. if (typeof logger === 'undefined') {
  15205. return
  15206. }
  15207. if (logMutations) {
  15208. store.subscribe(function (mutation, state) {
  15209. var nextState = deepCopy(state);
  15210. if (filter(mutation, prevState, nextState)) {
  15211. var formattedTime = getFormattedTime();
  15212. var formattedMutation = mutationTransformer(mutation);
  15213. var message = "mutation " + (mutation.type) + formattedTime;
  15214. startMessage(logger, message, collapsed);
  15215. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  15216. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  15217. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  15218. endMessage(logger);
  15219. }
  15220. prevState = nextState;
  15221. });
  15222. }
  15223. if (logActions) {
  15224. store.subscribeAction(function (action, state) {
  15225. if (actionFilter(action, state)) {
  15226. var formattedTime = getFormattedTime();
  15227. var formattedAction = actionTransformer(action);
  15228. var message = "action " + (action.type) + formattedTime;
  15229. startMessage(logger, message, collapsed);
  15230. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  15231. endMessage(logger);
  15232. }
  15233. });
  15234. }
  15235. }
  15236. }
  15237. function startMessage (logger, message, collapsed) {
  15238. var startMessage = collapsed
  15239. ? logger.groupCollapsed
  15240. : logger.group;
  15241. // render
  15242. try {
  15243. startMessage.call(logger, message);
  15244. } catch (e) {
  15245. logger.log(message);
  15246. }
  15247. }
  15248. function endMessage (logger) {
  15249. try {
  15250. logger.groupEnd();
  15251. } catch (e) {
  15252. logger.log('—— log end ——');
  15253. }
  15254. }
  15255. function getFormattedTime () {
  15256. var time = new Date();
  15257. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  15258. }
  15259. function repeat (str, times) {
  15260. return (new Array(times + 1)).join(str)
  15261. }
  15262. function pad (num, maxLength) {
  15263. return repeat('0', maxLength - num.toString().length) + num
  15264. }
  15265. var index_cjs = {
  15266. Store: Store,
  15267. install: install,
  15268. version: '3.6.2',
  15269. mapState: mapState,
  15270. mapMutations: mapMutations,
  15271. mapGetters: mapGetters,
  15272. mapActions: mapActions,
  15273. createNamespacedHelpers: createNamespacedHelpers,
  15274. createLogger: createLogger
  15275. };
  15276. module.exports = index_cjs;
  15277. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  15278. /***/ }),
  15279. /***/ 8:
  15280. /*!******************************************!*\
  15281. !*** D:/2022/10/hmd/store/model/user.js ***!
  15282. \******************************************/
  15283. /*! no static exports found */
  15284. /***/ (function(module, exports, __webpack_require__) {
  15285. "use strict";
  15286. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  15287. userInfo: {}, //用户信息
  15288. orderInfo: {
  15289. complete_count: 0, //完成
  15290. received_count: 0, //待收货
  15291. unshipped_count: 0, //待发货
  15292. order_count: 0, //订单总数
  15293. unpaid_count: 0 //待付款
  15294. }, //订单信息
  15295. hasLogin: false //是否登录
  15296. };
  15297. var mutations = {
  15298. // 登录
  15299. login: function login(state) {
  15300. state.hasLogin = true;
  15301. },
  15302. // 退出登录
  15303. logout: function logout(state, provider) {
  15304. state.hasLogin = false;
  15305. // 清空基础信息
  15306. state.userInfo = {};
  15307. state.orderInfo = {
  15308. complete_count: 0, //完成
  15309. received_count: 0, //待收货
  15310. unshipped_count: 0, //待发货
  15311. order_count: 0, //订单总数
  15312. unpaid_count: 0 //待付款
  15313. };
  15314. // 清除缓存用户信息
  15315. uni.removeStorage({
  15316. key: 'userInfo' });
  15317. // 清除缓存token
  15318. uni.removeStorage({
  15319. key: 'token' });
  15320. },
  15321. // 保存用户信息
  15322. setUserInfo: function setUserInfo(state, provider) {
  15323. state.userInfo = provider;
  15324. uni.setStorage({ //缓存用户登陆状态
  15325. key: 'userInfo',
  15326. data: provider });
  15327. },
  15328. // 保存订单信息
  15329. setOrderInfo: function setOrderInfo(state, provider) {
  15330. state.orderInfo = provider;
  15331. } };
  15332. var getters = {};var _default =
  15333. {
  15334. namespaced: true,
  15335. state: state,
  15336. mutations: mutations,
  15337. getters: getters };exports.default = _default;
  15338. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  15339. /***/ })
  15340. }]);
  15341. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map