vendor.js 354 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 104:
  53. /*!**********************************************************************************************************************!*\
  54. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  55. \**********************************************************************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. "use strict";
  59. Object.defineProperty(exports, "__esModule", {
  60. value: true
  61. });
  62. exports.default = void 0;
  63. var _default = {
  64. "id": "2852637",
  65. "name": "uniui图标库",
  66. "font_family": "uniicons",
  67. "css_prefix_text": "uniui-",
  68. "description": "",
  69. "glyphs": [{
  70. "icon_id": "25027049",
  71. "name": "yanse",
  72. "font_class": "color",
  73. "unicode": "e6cf",
  74. "unicode_decimal": 59087
  75. }, {
  76. "icon_id": "25027048",
  77. "name": "wallet",
  78. "font_class": "wallet",
  79. "unicode": "e6b1",
  80. "unicode_decimal": 59057
  81. }, {
  82. "icon_id": "25015720",
  83. "name": "settings-filled",
  84. "font_class": "settings-filled",
  85. "unicode": "e6ce",
  86. "unicode_decimal": 59086
  87. }, {
  88. "icon_id": "25015434",
  89. "name": "shimingrenzheng-filled",
  90. "font_class": "auth-filled",
  91. "unicode": "e6cc",
  92. "unicode_decimal": 59084
  93. }, {
  94. "icon_id": "24934246",
  95. "name": "shop-filled",
  96. "font_class": "shop-filled",
  97. "unicode": "e6cd",
  98. "unicode_decimal": 59085
  99. }, {
  100. "icon_id": "24934159",
  101. "name": "staff-filled-01",
  102. "font_class": "staff-filled",
  103. "unicode": "e6cb",
  104. "unicode_decimal": 59083
  105. }, {
  106. "icon_id": "24932461",
  107. "name": "VIP-filled",
  108. "font_class": "vip-filled",
  109. "unicode": "e6c6",
  110. "unicode_decimal": 59078
  111. }, {
  112. "icon_id": "24932462",
  113. "name": "plus_circle_fill",
  114. "font_class": "plus-filled",
  115. "unicode": "e6c7",
  116. "unicode_decimal": 59079
  117. }, {
  118. "icon_id": "24932463",
  119. "name": "folder_add-filled",
  120. "font_class": "folder-add-filled",
  121. "unicode": "e6c8",
  122. "unicode_decimal": 59080
  123. }, {
  124. "icon_id": "24932464",
  125. "name": "yanse-filled",
  126. "font_class": "color-filled",
  127. "unicode": "e6c9",
  128. "unicode_decimal": 59081
  129. }, {
  130. "icon_id": "24932465",
  131. "name": "tune-filled",
  132. "font_class": "tune-filled",
  133. "unicode": "e6ca",
  134. "unicode_decimal": 59082
  135. }, {
  136. "icon_id": "24932455",
  137. "name": "a-rilidaka-filled",
  138. "font_class": "calendar-filled",
  139. "unicode": "e6c0",
  140. "unicode_decimal": 59072
  141. }, {
  142. "icon_id": "24932456",
  143. "name": "notification-filled",
  144. "font_class": "notification-filled",
  145. "unicode": "e6c1",
  146. "unicode_decimal": 59073
  147. }, {
  148. "icon_id": "24932457",
  149. "name": "wallet-filled",
  150. "font_class": "wallet-filled",
  151. "unicode": "e6c2",
  152. "unicode_decimal": 59074
  153. }, {
  154. "icon_id": "24932458",
  155. "name": "paihangbang-filled",
  156. "font_class": "medal-filled",
  157. "unicode": "e6c3",
  158. "unicode_decimal": 59075
  159. }, {
  160. "icon_id": "24932459",
  161. "name": "gift-filled",
  162. "font_class": "gift-filled",
  163. "unicode": "e6c4",
  164. "unicode_decimal": 59076
  165. }, {
  166. "icon_id": "24932460",
  167. "name": "fire-filled",
  168. "font_class": "fire-filled",
  169. "unicode": "e6c5",
  170. "unicode_decimal": 59077
  171. }, {
  172. "icon_id": "24928001",
  173. "name": "refreshempty",
  174. "font_class": "refreshempty",
  175. "unicode": "e6bf",
  176. "unicode_decimal": 59071
  177. }, {
  178. "icon_id": "24926853",
  179. "name": "location-ellipse",
  180. "font_class": "location-filled",
  181. "unicode": "e6af",
  182. "unicode_decimal": 59055
  183. }, {
  184. "icon_id": "24926735",
  185. "name": "person-filled",
  186. "font_class": "person-filled",
  187. "unicode": "e69d",
  188. "unicode_decimal": 59037
  189. }, {
  190. "icon_id": "24926703",
  191. "name": "personadd-filled",
  192. "font_class": "personadd-filled",
  193. "unicode": "e698",
  194. "unicode_decimal": 59032
  195. }, {
  196. "icon_id": "24923351",
  197. "name": "back",
  198. "font_class": "back",
  199. "unicode": "e6b9",
  200. "unicode_decimal": 59065
  201. }, {
  202. "icon_id": "24923352",
  203. "name": "forward",
  204. "font_class": "forward",
  205. "unicode": "e6ba",
  206. "unicode_decimal": 59066
  207. }, {
  208. "icon_id": "24923353",
  209. "name": "arrowthinright",
  210. "font_class": "arrow-right",
  211. "unicode": "e6bb",
  212. "unicode_decimal": 59067
  213. }, {
  214. "icon_id": "24923353",
  215. "name": "arrowthinright",
  216. "font_class": "arrowthinright",
  217. "unicode": "e6bb",
  218. "unicode_decimal": 59067
  219. }, {
  220. "icon_id": "24923354",
  221. "name": "arrowthinleft",
  222. "font_class": "arrow-left",
  223. "unicode": "e6bc",
  224. "unicode_decimal": 59068
  225. }, {
  226. "icon_id": "24923354",
  227. "name": "arrowthinleft",
  228. "font_class": "arrowthinleft",
  229. "unicode": "e6bc",
  230. "unicode_decimal": 59068
  231. }, {
  232. "icon_id": "24923355",
  233. "name": "arrowthinup",
  234. "font_class": "arrow-up",
  235. "unicode": "e6bd",
  236. "unicode_decimal": 59069
  237. }, {
  238. "icon_id": "24923355",
  239. "name": "arrowthinup",
  240. "font_class": "arrowthinup",
  241. "unicode": "e6bd",
  242. "unicode_decimal": 59069
  243. }, {
  244. "icon_id": "24923356",
  245. "name": "arrowthindown",
  246. "font_class": "arrow-down",
  247. "unicode": "e6be",
  248. "unicode_decimal": 59070
  249. }, {
  250. "icon_id": "24923356",
  251. "name": "arrowthindown",
  252. "font_class": "arrowthindown",
  253. "unicode": "e6be",
  254. "unicode_decimal": 59070
  255. }, {
  256. "icon_id": "24923349",
  257. "name": "arrowdown",
  258. "font_class": "bottom",
  259. "unicode": "e6b8",
  260. "unicode_decimal": 59064
  261. }, {
  262. "icon_id": "24923349",
  263. "name": "arrowdown",
  264. "font_class": "arrowdown",
  265. "unicode": "e6b8",
  266. "unicode_decimal": 59064
  267. }, {
  268. "icon_id": "24923346",
  269. "name": "arrowright",
  270. "font_class": "right",
  271. "unicode": "e6b5",
  272. "unicode_decimal": 59061
  273. }, {
  274. "icon_id": "24923346",
  275. "name": "arrowright",
  276. "font_class": "arrowright",
  277. "unicode": "e6b5",
  278. "unicode_decimal": 59061
  279. }, {
  280. "icon_id": "24923347",
  281. "name": "arrowup",
  282. "font_class": "top",
  283. "unicode": "e6b6",
  284. "unicode_decimal": 59062
  285. }, {
  286. "icon_id": "24923347",
  287. "name": "arrowup",
  288. "font_class": "arrowup",
  289. "unicode": "e6b6",
  290. "unicode_decimal": 59062
  291. }, {
  292. "icon_id": "24923348",
  293. "name": "arrowleft",
  294. "font_class": "left",
  295. "unicode": "e6b7",
  296. "unicode_decimal": 59063
  297. }, {
  298. "icon_id": "24923348",
  299. "name": "arrowleft",
  300. "font_class": "arrowleft",
  301. "unicode": "e6b7",
  302. "unicode_decimal": 59063
  303. }, {
  304. "icon_id": "24923334",
  305. "name": "eye",
  306. "font_class": "eye",
  307. "unicode": "e651",
  308. "unicode_decimal": 58961
  309. }, {
  310. "icon_id": "24923335",
  311. "name": "eye-filled",
  312. "font_class": "eye-filled",
  313. "unicode": "e66a",
  314. "unicode_decimal": 58986
  315. }, {
  316. "icon_id": "24923336",
  317. "name": "eye-slash",
  318. "font_class": "eye-slash",
  319. "unicode": "e6b3",
  320. "unicode_decimal": 59059
  321. }, {
  322. "icon_id": "24923337",
  323. "name": "eye-slash-filled",
  324. "font_class": "eye-slash-filled",
  325. "unicode": "e6b4",
  326. "unicode_decimal": 59060
  327. }, {
  328. "icon_id": "24923305",
  329. "name": "info-filled",
  330. "font_class": "info-filled",
  331. "unicode": "e649",
  332. "unicode_decimal": 58953
  333. }, {
  334. "icon_id": "24923299",
  335. "name": "reload-01",
  336. "font_class": "reload",
  337. "unicode": "e6b2",
  338. "unicode_decimal": 59058
  339. }, {
  340. "icon_id": "24923195",
  341. "name": "mic_slash_fill",
  342. "font_class": "micoff-filled",
  343. "unicode": "e6b0",
  344. "unicode_decimal": 59056
  345. }, {
  346. "icon_id": "24923165",
  347. "name": "map-pin-ellipse",
  348. "font_class": "map-pin-ellipse",
  349. "unicode": "e6ac",
  350. "unicode_decimal": 59052
  351. }, {
  352. "icon_id": "24923166",
  353. "name": "map-pin",
  354. "font_class": "map-pin",
  355. "unicode": "e6ad",
  356. "unicode_decimal": 59053
  357. }, {
  358. "icon_id": "24923167",
  359. "name": "location",
  360. "font_class": "location",
  361. "unicode": "e6ae",
  362. "unicode_decimal": 59054
  363. }, {
  364. "icon_id": "24923064",
  365. "name": "starhalf",
  366. "font_class": "starhalf",
  367. "unicode": "e683",
  368. "unicode_decimal": 59011
  369. }, {
  370. "icon_id": "24923065",
  371. "name": "star",
  372. "font_class": "star",
  373. "unicode": "e688",
  374. "unicode_decimal": 59016
  375. }, {
  376. "icon_id": "24923066",
  377. "name": "star-filled",
  378. "font_class": "star-filled",
  379. "unicode": "e68f",
  380. "unicode_decimal": 59023
  381. }, {
  382. "icon_id": "24899646",
  383. "name": "a-rilidaka",
  384. "font_class": "calendar",
  385. "unicode": "e6a0",
  386. "unicode_decimal": 59040
  387. }, {
  388. "icon_id": "24899647",
  389. "name": "fire",
  390. "font_class": "fire",
  391. "unicode": "e6a1",
  392. "unicode_decimal": 59041
  393. }, {
  394. "icon_id": "24899648",
  395. "name": "paihangbang",
  396. "font_class": "medal",
  397. "unicode": "e6a2",
  398. "unicode_decimal": 59042
  399. }, {
  400. "icon_id": "24899649",
  401. "name": "font",
  402. "font_class": "font",
  403. "unicode": "e6a3",
  404. "unicode_decimal": 59043
  405. }, {
  406. "icon_id": "24899650",
  407. "name": "gift",
  408. "font_class": "gift",
  409. "unicode": "e6a4",
  410. "unicode_decimal": 59044
  411. }, {
  412. "icon_id": "24899651",
  413. "name": "link",
  414. "font_class": "link",
  415. "unicode": "e6a5",
  416. "unicode_decimal": 59045
  417. }, {
  418. "icon_id": "24899652",
  419. "name": "notification",
  420. "font_class": "notification",
  421. "unicode": "e6a6",
  422. "unicode_decimal": 59046
  423. }, {
  424. "icon_id": "24899653",
  425. "name": "staff",
  426. "font_class": "staff",
  427. "unicode": "e6a7",
  428. "unicode_decimal": 59047
  429. }, {
  430. "icon_id": "24899654",
  431. "name": "VIP",
  432. "font_class": "vip",
  433. "unicode": "e6a8",
  434. "unicode_decimal": 59048
  435. }, {
  436. "icon_id": "24899655",
  437. "name": "folder_add",
  438. "font_class": "folder-add",
  439. "unicode": "e6a9",
  440. "unicode_decimal": 59049
  441. }, {
  442. "icon_id": "24899656",
  443. "name": "tune",
  444. "font_class": "tune",
  445. "unicode": "e6aa",
  446. "unicode_decimal": 59050
  447. }, {
  448. "icon_id": "24899657",
  449. "name": "shimingrenzheng",
  450. "font_class": "auth",
  451. "unicode": "e6ab",
  452. "unicode_decimal": 59051
  453. }, {
  454. "icon_id": "24899565",
  455. "name": "person",
  456. "font_class": "person",
  457. "unicode": "e699",
  458. "unicode_decimal": 59033
  459. }, {
  460. "icon_id": "24899566",
  461. "name": "email-filled",
  462. "font_class": "email-filled",
  463. "unicode": "e69a",
  464. "unicode_decimal": 59034
  465. }, {
  466. "icon_id": "24899567",
  467. "name": "phone-filled",
  468. "font_class": "phone-filled",
  469. "unicode": "e69b",
  470. "unicode_decimal": 59035
  471. }, {
  472. "icon_id": "24899568",
  473. "name": "phone",
  474. "font_class": "phone",
  475. "unicode": "e69c",
  476. "unicode_decimal": 59036
  477. }, {
  478. "icon_id": "24899570",
  479. "name": "email",
  480. "font_class": "email",
  481. "unicode": "e69e",
  482. "unicode_decimal": 59038
  483. }, {
  484. "icon_id": "24899571",
  485. "name": "personadd",
  486. "font_class": "personadd",
  487. "unicode": "e69f",
  488. "unicode_decimal": 59039
  489. }, {
  490. "icon_id": "24899558",
  491. "name": "chatboxes-filled",
  492. "font_class": "chatboxes-filled",
  493. "unicode": "e692",
  494. "unicode_decimal": 59026
  495. }, {
  496. "icon_id": "24899559",
  497. "name": "contact",
  498. "font_class": "contact",
  499. "unicode": "e693",
  500. "unicode_decimal": 59027
  501. }, {
  502. "icon_id": "24899560",
  503. "name": "chatbubble-filled",
  504. "font_class": "chatbubble-filled",
  505. "unicode": "e694",
  506. "unicode_decimal": 59028
  507. }, {
  508. "icon_id": "24899561",
  509. "name": "contact-filled",
  510. "font_class": "contact-filled",
  511. "unicode": "e695",
  512. "unicode_decimal": 59029
  513. }, {
  514. "icon_id": "24899562",
  515. "name": "chatboxes",
  516. "font_class": "chatboxes",
  517. "unicode": "e696",
  518. "unicode_decimal": 59030
  519. }, {
  520. "icon_id": "24899563",
  521. "name": "chatbubble",
  522. "font_class": "chatbubble",
  523. "unicode": "e697",
  524. "unicode_decimal": 59031
  525. }, {
  526. "icon_id": "24881290",
  527. "name": "upload-filled",
  528. "font_class": "upload-filled",
  529. "unicode": "e68e",
  530. "unicode_decimal": 59022
  531. }, {
  532. "icon_id": "24881292",
  533. "name": "upload",
  534. "font_class": "upload",
  535. "unicode": "e690",
  536. "unicode_decimal": 59024
  537. }, {
  538. "icon_id": "24881293",
  539. "name": "weixin",
  540. "font_class": "weixin",
  541. "unicode": "e691",
  542. "unicode_decimal": 59025
  543. }, {
  544. "icon_id": "24881274",
  545. "name": "compose",
  546. "font_class": "compose",
  547. "unicode": "e67f",
  548. "unicode_decimal": 59007
  549. }, {
  550. "icon_id": "24881275",
  551. "name": "qq",
  552. "font_class": "qq",
  553. "unicode": "e680",
  554. "unicode_decimal": 59008
  555. }, {
  556. "icon_id": "24881276",
  557. "name": "download-filled",
  558. "font_class": "download-filled",
  559. "unicode": "e681",
  560. "unicode_decimal": 59009
  561. }, {
  562. "icon_id": "24881277",
  563. "name": "pengyouquan",
  564. "font_class": "pyq",
  565. "unicode": "e682",
  566. "unicode_decimal": 59010
  567. }, {
  568. "icon_id": "24881279",
  569. "name": "sound",
  570. "font_class": "sound",
  571. "unicode": "e684",
  572. "unicode_decimal": 59012
  573. }, {
  574. "icon_id": "24881280",
  575. "name": "trash-filled",
  576. "font_class": "trash-filled",
  577. "unicode": "e685",
  578. "unicode_decimal": 59013
  579. }, {
  580. "icon_id": "24881281",
  581. "name": "sound-filled",
  582. "font_class": "sound-filled",
  583. "unicode": "e686",
  584. "unicode_decimal": 59014
  585. }, {
  586. "icon_id": "24881282",
  587. "name": "trash",
  588. "font_class": "trash",
  589. "unicode": "e687",
  590. "unicode_decimal": 59015
  591. }, {
  592. "icon_id": "24881284",
  593. "name": "videocam-filled",
  594. "font_class": "videocam-filled",
  595. "unicode": "e689",
  596. "unicode_decimal": 59017
  597. }, {
  598. "icon_id": "24881285",
  599. "name": "spinner-cycle",
  600. "font_class": "spinner-cycle",
  601. "unicode": "e68a",
  602. "unicode_decimal": 59018
  603. }, {
  604. "icon_id": "24881286",
  605. "name": "weibo",
  606. "font_class": "weibo",
  607. "unicode": "e68b",
  608. "unicode_decimal": 59019
  609. }, {
  610. "icon_id": "24881288",
  611. "name": "videocam",
  612. "font_class": "videocam",
  613. "unicode": "e68c",
  614. "unicode_decimal": 59020
  615. }, {
  616. "icon_id": "24881289",
  617. "name": "download",
  618. "font_class": "download",
  619. "unicode": "e68d",
  620. "unicode_decimal": 59021
  621. }, {
  622. "icon_id": "24879601",
  623. "name": "help",
  624. "font_class": "help",
  625. "unicode": "e679",
  626. "unicode_decimal": 59001
  627. }, {
  628. "icon_id": "24879602",
  629. "name": "navigate-filled",
  630. "font_class": "navigate-filled",
  631. "unicode": "e67a",
  632. "unicode_decimal": 59002
  633. }, {
  634. "icon_id": "24879603",
  635. "name": "plusempty",
  636. "font_class": "plusempty",
  637. "unicode": "e67b",
  638. "unicode_decimal": 59003
  639. }, {
  640. "icon_id": "24879604",
  641. "name": "smallcircle",
  642. "font_class": "smallcircle",
  643. "unicode": "e67c",
  644. "unicode_decimal": 59004
  645. }, {
  646. "icon_id": "24879605",
  647. "name": "minus-filled",
  648. "font_class": "minus-filled",
  649. "unicode": "e67d",
  650. "unicode_decimal": 59005
  651. }, {
  652. "icon_id": "24879606",
  653. "name": "micoff",
  654. "font_class": "micoff",
  655. "unicode": "e67e",
  656. "unicode_decimal": 59006
  657. }, {
  658. "icon_id": "24879588",
  659. "name": "closeempty",
  660. "font_class": "closeempty",
  661. "unicode": "e66c",
  662. "unicode_decimal": 58988
  663. }, {
  664. "icon_id": "24879589",
  665. "name": "clear",
  666. "font_class": "clear",
  667. "unicode": "e66d",
  668. "unicode_decimal": 58989
  669. }, {
  670. "icon_id": "24879590",
  671. "name": "navigate",
  672. "font_class": "navigate",
  673. "unicode": "e66e",
  674. "unicode_decimal": 58990
  675. }, {
  676. "icon_id": "24879591",
  677. "name": "minus",
  678. "font_class": "minus",
  679. "unicode": "e66f",
  680. "unicode_decimal": 58991
  681. }, {
  682. "icon_id": "24879592",
  683. "name": "image",
  684. "font_class": "image",
  685. "unicode": "e670",
  686. "unicode_decimal": 58992
  687. }, {
  688. "icon_id": "24879593",
  689. "name": "mic",
  690. "font_class": "mic",
  691. "unicode": "e671",
  692. "unicode_decimal": 58993
  693. }, {
  694. "icon_id": "24879594",
  695. "name": "paperplane",
  696. "font_class": "paperplane",
  697. "unicode": "e672",
  698. "unicode_decimal": 58994
  699. }, {
  700. "icon_id": "24879595",
  701. "name": "close",
  702. "font_class": "close",
  703. "unicode": "e673",
  704. "unicode_decimal": 58995
  705. }, {
  706. "icon_id": "24879596",
  707. "name": "help-filled",
  708. "font_class": "help-filled",
  709. "unicode": "e674",
  710. "unicode_decimal": 58996
  711. }, {
  712. "icon_id": "24879597",
  713. "name": "plus-filled",
  714. "font_class": "paperplane-filled",
  715. "unicode": "e675",
  716. "unicode_decimal": 58997
  717. }, {
  718. "icon_id": "24879598",
  719. "name": "plus",
  720. "font_class": "plus",
  721. "unicode": "e676",
  722. "unicode_decimal": 58998
  723. }, {
  724. "icon_id": "24879599",
  725. "name": "mic-filled",
  726. "font_class": "mic-filled",
  727. "unicode": "e677",
  728. "unicode_decimal": 58999
  729. }, {
  730. "icon_id": "24879600",
  731. "name": "image-filled",
  732. "font_class": "image-filled",
  733. "unicode": "e678",
  734. "unicode_decimal": 59000
  735. }, {
  736. "icon_id": "24855900",
  737. "name": "locked-filled",
  738. "font_class": "locked-filled",
  739. "unicode": "e668",
  740. "unicode_decimal": 58984
  741. }, {
  742. "icon_id": "24855901",
  743. "name": "info",
  744. "font_class": "info",
  745. "unicode": "e669",
  746. "unicode_decimal": 58985
  747. }, {
  748. "icon_id": "24855903",
  749. "name": "locked",
  750. "font_class": "locked",
  751. "unicode": "e66b",
  752. "unicode_decimal": 58987
  753. }, {
  754. "icon_id": "24855884",
  755. "name": "camera-filled",
  756. "font_class": "camera-filled",
  757. "unicode": "e658",
  758. "unicode_decimal": 58968
  759. }, {
  760. "icon_id": "24855885",
  761. "name": "chat-filled",
  762. "font_class": "chat-filled",
  763. "unicode": "e659",
  764. "unicode_decimal": 58969
  765. }, {
  766. "icon_id": "24855886",
  767. "name": "camera",
  768. "font_class": "camera",
  769. "unicode": "e65a",
  770. "unicode_decimal": 58970
  771. }, {
  772. "icon_id": "24855887",
  773. "name": "circle",
  774. "font_class": "circle",
  775. "unicode": "e65b",
  776. "unicode_decimal": 58971
  777. }, {
  778. "icon_id": "24855888",
  779. "name": "checkmarkempty",
  780. "font_class": "checkmarkempty",
  781. "unicode": "e65c",
  782. "unicode_decimal": 58972
  783. }, {
  784. "icon_id": "24855889",
  785. "name": "chat",
  786. "font_class": "chat",
  787. "unicode": "e65d",
  788. "unicode_decimal": 58973
  789. }, {
  790. "icon_id": "24855890",
  791. "name": "circle-filled",
  792. "font_class": "circle-filled",
  793. "unicode": "e65e",
  794. "unicode_decimal": 58974
  795. }, {
  796. "icon_id": "24855891",
  797. "name": "flag",
  798. "font_class": "flag",
  799. "unicode": "e65f",
  800. "unicode_decimal": 58975
  801. }, {
  802. "icon_id": "24855892",
  803. "name": "flag-filled",
  804. "font_class": "flag-filled",
  805. "unicode": "e660",
  806. "unicode_decimal": 58976
  807. }, {
  808. "icon_id": "24855893",
  809. "name": "gear-filled",
  810. "font_class": "gear-filled",
  811. "unicode": "e661",
  812. "unicode_decimal": 58977
  813. }, {
  814. "icon_id": "24855894",
  815. "name": "home",
  816. "font_class": "home",
  817. "unicode": "e662",
  818. "unicode_decimal": 58978
  819. }, {
  820. "icon_id": "24855895",
  821. "name": "home-filled",
  822. "font_class": "home-filled",
  823. "unicode": "e663",
  824. "unicode_decimal": 58979
  825. }, {
  826. "icon_id": "24855896",
  827. "name": "gear",
  828. "font_class": "gear",
  829. "unicode": "e664",
  830. "unicode_decimal": 58980
  831. }, {
  832. "icon_id": "24855897",
  833. "name": "smallcircle-filled",
  834. "font_class": "smallcircle-filled",
  835. "unicode": "e665",
  836. "unicode_decimal": 58981
  837. }, {
  838. "icon_id": "24855898",
  839. "name": "map-filled",
  840. "font_class": "map-filled",
  841. "unicode": "e666",
  842. "unicode_decimal": 58982
  843. }, {
  844. "icon_id": "24855899",
  845. "name": "map",
  846. "font_class": "map",
  847. "unicode": "e667",
  848. "unicode_decimal": 58983
  849. }, {
  850. "icon_id": "24855825",
  851. "name": "refresh-filled",
  852. "font_class": "refresh-filled",
  853. "unicode": "e656",
  854. "unicode_decimal": 58966
  855. }, {
  856. "icon_id": "24855826",
  857. "name": "refresh",
  858. "font_class": "refresh",
  859. "unicode": "e657",
  860. "unicode_decimal": 58967
  861. }, {
  862. "icon_id": "24855808",
  863. "name": "cloud-upload",
  864. "font_class": "cloud-upload",
  865. "unicode": "e645",
  866. "unicode_decimal": 58949
  867. }, {
  868. "icon_id": "24855809",
  869. "name": "cloud-download-filled",
  870. "font_class": "cloud-download-filled",
  871. "unicode": "e646",
  872. "unicode_decimal": 58950
  873. }, {
  874. "icon_id": "24855810",
  875. "name": "cloud-download",
  876. "font_class": "cloud-download",
  877. "unicode": "e647",
  878. "unicode_decimal": 58951
  879. }, {
  880. "icon_id": "24855811",
  881. "name": "cloud-upload-filled",
  882. "font_class": "cloud-upload-filled",
  883. "unicode": "e648",
  884. "unicode_decimal": 58952
  885. }, {
  886. "icon_id": "24855813",
  887. "name": "redo",
  888. "font_class": "redo",
  889. "unicode": "e64a",
  890. "unicode_decimal": 58954
  891. }, {
  892. "icon_id": "24855814",
  893. "name": "images-filled",
  894. "font_class": "images-filled",
  895. "unicode": "e64b",
  896. "unicode_decimal": 58955
  897. }, {
  898. "icon_id": "24855815",
  899. "name": "undo-filled",
  900. "font_class": "undo-filled",
  901. "unicode": "e64c",
  902. "unicode_decimal": 58956
  903. }, {
  904. "icon_id": "24855816",
  905. "name": "more",
  906. "font_class": "more",
  907. "unicode": "e64d",
  908. "unicode_decimal": 58957
  909. }, {
  910. "icon_id": "24855817",
  911. "name": "more-filled",
  912. "font_class": "more-filled",
  913. "unicode": "e64e",
  914. "unicode_decimal": 58958
  915. }, {
  916. "icon_id": "24855818",
  917. "name": "undo",
  918. "font_class": "undo",
  919. "unicode": "e64f",
  920. "unicode_decimal": 58959
  921. }, {
  922. "icon_id": "24855819",
  923. "name": "images",
  924. "font_class": "images",
  925. "unicode": "e650",
  926. "unicode_decimal": 58960
  927. }, {
  928. "icon_id": "24855821",
  929. "name": "paperclip",
  930. "font_class": "paperclip",
  931. "unicode": "e652",
  932. "unicode_decimal": 58962
  933. }, {
  934. "icon_id": "24855822",
  935. "name": "settings",
  936. "font_class": "settings",
  937. "unicode": "e653",
  938. "unicode_decimal": 58963
  939. }, {
  940. "icon_id": "24855823",
  941. "name": "search",
  942. "font_class": "search",
  943. "unicode": "e654",
  944. "unicode_decimal": 58964
  945. }, {
  946. "icon_id": "24855824",
  947. "name": "redo-filled",
  948. "font_class": "redo-filled",
  949. "unicode": "e655",
  950. "unicode_decimal": 58965
  951. }, {
  952. "icon_id": "24841702",
  953. "name": "list",
  954. "font_class": "list",
  955. "unicode": "e644",
  956. "unicode_decimal": 58948
  957. }, {
  958. "icon_id": "24841489",
  959. "name": "mail-open-filled",
  960. "font_class": "mail-open-filled",
  961. "unicode": "e63a",
  962. "unicode_decimal": 58938
  963. }, {
  964. "icon_id": "24841491",
  965. "name": "hand-thumbsdown-filled",
  966. "font_class": "hand-down-filled",
  967. "unicode": "e63c",
  968. "unicode_decimal": 58940
  969. }, {
  970. "icon_id": "24841492",
  971. "name": "hand-thumbsdown",
  972. "font_class": "hand-down",
  973. "unicode": "e63d",
  974. "unicode_decimal": 58941
  975. }, {
  976. "icon_id": "24841493",
  977. "name": "hand-thumbsup-filled",
  978. "font_class": "hand-up-filled",
  979. "unicode": "e63e",
  980. "unicode_decimal": 58942
  981. }, {
  982. "icon_id": "24841494",
  983. "name": "hand-thumbsup",
  984. "font_class": "hand-up",
  985. "unicode": "e63f",
  986. "unicode_decimal": 58943
  987. }, {
  988. "icon_id": "24841496",
  989. "name": "heart-filled",
  990. "font_class": "heart-filled",
  991. "unicode": "e641",
  992. "unicode_decimal": 58945
  993. }, {
  994. "icon_id": "24841498",
  995. "name": "mail-open",
  996. "font_class": "mail-open",
  997. "unicode": "e643",
  998. "unicode_decimal": 58947
  999. }, {
  1000. "icon_id": "24841488",
  1001. "name": "heart",
  1002. "font_class": "heart",
  1003. "unicode": "e639",
  1004. "unicode_decimal": 58937
  1005. }, {
  1006. "icon_id": "24839963",
  1007. "name": "loop",
  1008. "font_class": "loop",
  1009. "unicode": "e633",
  1010. "unicode_decimal": 58931
  1011. }, {
  1012. "icon_id": "24839866",
  1013. "name": "pulldown",
  1014. "font_class": "pulldown",
  1015. "unicode": "e632",
  1016. "unicode_decimal": 58930
  1017. }, {
  1018. "icon_id": "24813798",
  1019. "name": "scan",
  1020. "font_class": "scan",
  1021. "unicode": "e62a",
  1022. "unicode_decimal": 58922
  1023. }, {
  1024. "icon_id": "24813786",
  1025. "name": "bars",
  1026. "font_class": "bars",
  1027. "unicode": "e627",
  1028. "unicode_decimal": 58919
  1029. }, {
  1030. "icon_id": "24813788",
  1031. "name": "cart-filled",
  1032. "font_class": "cart-filled",
  1033. "unicode": "e629",
  1034. "unicode_decimal": 58921
  1035. }, {
  1036. "icon_id": "24813790",
  1037. "name": "checkbox",
  1038. "font_class": "checkbox",
  1039. "unicode": "e62b",
  1040. "unicode_decimal": 58923
  1041. }, {
  1042. "icon_id": "24813791",
  1043. "name": "checkbox-filled",
  1044. "font_class": "checkbox-filled",
  1045. "unicode": "e62c",
  1046. "unicode_decimal": 58924
  1047. }, {
  1048. "icon_id": "24813794",
  1049. "name": "shop",
  1050. "font_class": "shop",
  1051. "unicode": "e62f",
  1052. "unicode_decimal": 58927
  1053. }, {
  1054. "icon_id": "24813795",
  1055. "name": "headphones",
  1056. "font_class": "headphones",
  1057. "unicode": "e630",
  1058. "unicode_decimal": 58928
  1059. }, {
  1060. "icon_id": "24813796",
  1061. "name": "cart",
  1062. "font_class": "cart",
  1063. "unicode": "e631",
  1064. "unicode_decimal": 58929
  1065. }]
  1066. };
  1067. exports.default = _default;
  1068. /***/ }),
  1069. /***/ 11:
  1070. /*!***************************************************************!*\
  1071. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  1072. \***************************************************************/
  1073. /*! no static exports found */
  1074. /***/ (function(module, exports, __webpack_require__) {
  1075. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  1076. function _defineProperty(obj, key, value) {
  1077. key = toPropertyKey(key);
  1078. if (key in obj) {
  1079. Object.defineProperty(obj, key, {
  1080. value: value,
  1081. enumerable: true,
  1082. configurable: true,
  1083. writable: true
  1084. });
  1085. } else {
  1086. obj[key] = value;
  1087. }
  1088. return obj;
  1089. }
  1090. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1091. /***/ }),
  1092. /***/ 12:
  1093. /*!**************************************************************!*\
  1094. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  1095. \**************************************************************/
  1096. /*! no static exports found */
  1097. /***/ (function(module, exports, __webpack_require__) {
  1098. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  1099. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  1100. function toPropertyKey(t) {
  1101. var i = toPrimitive(t, "string");
  1102. return "symbol" == _typeof(i) ? i : i + "";
  1103. }
  1104. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1105. /***/ }),
  1106. /***/ 13:
  1107. /*!*******************************************************!*\
  1108. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  1109. \*******************************************************/
  1110. /*! no static exports found */
  1111. /***/ (function(module, exports) {
  1112. function _typeof(o) {
  1113. "@babel/helpers - typeof";
  1114. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  1115. return typeof o;
  1116. } : function (o) {
  1117. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  1118. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  1119. }
  1120. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1121. /***/ }),
  1122. /***/ 14:
  1123. /*!************************************************************!*\
  1124. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  1125. \************************************************************/
  1126. /*! no static exports found */
  1127. /***/ (function(module, exports, __webpack_require__) {
  1128. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  1129. function toPrimitive(t, r) {
  1130. if ("object" != _typeof(t) || !t) return t;
  1131. var e = t[Symbol.toPrimitive];
  1132. if (void 0 !== e) {
  1133. var i = e.call(t, r || "default");
  1134. if ("object" != _typeof(i)) return i;
  1135. throw new TypeError("@@toPrimitive must return a primitive value.");
  1136. }
  1137. return ("string" === r ? String : Number)(t);
  1138. }
  1139. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1140. /***/ }),
  1141. /***/ 147:
  1142. /*!****************************************************************************************************************!*\
  1143. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uni_modules/iRainna-dayjs/js_sdk/dayjs.min.js ***!
  1144. \****************************************************************************************************************/
  1145. /*! no static exports found */
  1146. /***/ (function(module, exports, __webpack_require__) {
  1147. "use strict";
  1148. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1149. Object.defineProperty(exports, "__esModule", {
  1150. value: true
  1151. });
  1152. exports.dayjs = void 0;
  1153. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1154. var fn = function fn() {
  1155. "use strict";
  1156. var t = 1e3,
  1157. e = 6e4,
  1158. n = 36e5,
  1159. r = "millisecond",
  1160. i = "second",
  1161. s = "minute",
  1162. u = "hour",
  1163. a = "day",
  1164. o = "week",
  1165. c = "month",
  1166. f = "quarter",
  1167. h = "year",
  1168. d = "date",
  1169. l = "Invalid Date",
  1170. $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
  1171. y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
  1172. M = {
  1173. name: "en",
  1174. weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  1175. months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  1176. ordinal: function ordinal(t) {
  1177. var e = ["th", "st", "nd", "rd"],
  1178. n = t % 100;
  1179. return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
  1180. }
  1181. },
  1182. m = function m(t, e, n) {
  1183. var r = String(t);
  1184. return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
  1185. },
  1186. v = {
  1187. s: m,
  1188. z: function z(t) {
  1189. var e = -t.utcOffset(),
  1190. n = Math.abs(e),
  1191. r = Math.floor(n / 60),
  1192. i = n % 60;
  1193. return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
  1194. },
  1195. m: function t(e, n) {
  1196. if (e.date() < n.date()) return -t(n, e);
  1197. var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),
  1198. i = e.clone().add(r, c),
  1199. s = n - i < 0,
  1200. u = e.clone().add(r + (s ? -1 : 1), c);
  1201. return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
  1202. },
  1203. a: function a(t) {
  1204. return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
  1205. },
  1206. p: function p(t) {
  1207. return {
  1208. M: c,
  1209. y: h,
  1210. w: o,
  1211. d: a,
  1212. D: d,
  1213. h: u,
  1214. m: s,
  1215. s: i,
  1216. ms: r,
  1217. Q: f
  1218. }[t] || String(t || "").toLowerCase().replace(/s$/, "");
  1219. },
  1220. u: function u(t) {
  1221. return void 0 === t;
  1222. }
  1223. },
  1224. g = "en",
  1225. D = {};
  1226. D[g] = M;
  1227. var p = function p(t) {
  1228. return t instanceof b;
  1229. },
  1230. S = function t(e, n, r) {
  1231. var i;
  1232. if (!e) return g;
  1233. if ("string" == typeof e) {
  1234. var s = e.toLowerCase();
  1235. D[s] && (i = s), n && (D[s] = n, i = s);
  1236. var u = e.split("-");
  1237. if (!i && u.length > 1) return t(u[0]);
  1238. } else {
  1239. var a = e.name;
  1240. D[a] = e, i = a;
  1241. }
  1242. return !r && i && (g = i), i || !r && g;
  1243. },
  1244. w = function w(t, e) {
  1245. if (p(t)) return t.clone();
  1246. var n = "object" == (0, _typeof2.default)(e) ? e : {};
  1247. return n.date = t, n.args = arguments, new b(n);
  1248. },
  1249. O = v;
  1250. O.l = S, O.i = p, O.w = function (t, e) {
  1251. return w(t, {
  1252. locale: e.$L,
  1253. utc: e.$u,
  1254. x: e.$x,
  1255. $offset: e.$offset
  1256. });
  1257. };
  1258. var b = function () {
  1259. function M(t) {
  1260. this.$L = S(t.locale, null, !0), this.parse(t);
  1261. }
  1262. var m = M.prototype;
  1263. return m.parse = function (t) {
  1264. this.$d = function (t) {
  1265. var e = t.date,
  1266. n = t.utc;
  1267. if (null === e) return new Date(NaN);
  1268. if (O.u(e)) return new Date();
  1269. if (e instanceof Date) return new Date(e);
  1270. if ("string" == typeof e && !/Z$/i.test(e)) {
  1271. var r = e.match($);
  1272. if (r) {
  1273. var i = r[2] - 1 || 0,
  1274. s = (r[7] || "0").substring(0, 3);
  1275. return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
  1276. }
  1277. }
  1278. return new Date(e);
  1279. }(t), this.$x = t.x || {}, this.init();
  1280. }, m.init = function () {
  1281. var t = this.$d;
  1282. this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
  1283. }, m.$utils = function () {
  1284. return O;
  1285. }, m.isValid = function () {
  1286. return !(this.$d.toString() === l);
  1287. }, m.isSame = function (t, e) {
  1288. var n = w(t);
  1289. return this.startOf(e) <= n && n <= this.endOf(e);
  1290. }, m.isAfter = function (t, e) {
  1291. return w(t) < this.startOf(e);
  1292. }, m.isBefore = function (t, e) {
  1293. return this.endOf(e) < w(t);
  1294. }, m.$g = function (t, e, n) {
  1295. return O.u(t) ? this[e] : this.set(n, t);
  1296. }, m.unix = function () {
  1297. return Math.floor(this.valueOf() / 1e3);
  1298. }, m.valueOf = function () {
  1299. return this.$d.getTime();
  1300. }, m.startOf = function (t, e) {
  1301. var n = this,
  1302. r = !!O.u(e) || e,
  1303. f = O.p(t),
  1304. l = function l(t, e) {
  1305. var i = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
  1306. return r ? i : i.endOf(a);
  1307. },
  1308. $ = function $(t, e) {
  1309. return O.w(n.toDate()[t].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);
  1310. },
  1311. y = this.$W,
  1312. M = this.$M,
  1313. m = this.$D,
  1314. v = "set" + (this.$u ? "UTC" : "");
  1315. switch (f) {
  1316. case h:
  1317. return r ? l(1, 0) : l(31, 11);
  1318. case c:
  1319. return r ? l(1, M) : l(0, M + 1);
  1320. case o:
  1321. var g = this.$locale().weekStart || 0,
  1322. D = (y < g ? y + 7 : y) - g;
  1323. return l(r ? m - D : m + (6 - D), M);
  1324. case a:
  1325. case d:
  1326. return $(v + "Hours", 0);
  1327. case u:
  1328. return $(v + "Minutes", 1);
  1329. case s:
  1330. return $(v + "Seconds", 2);
  1331. case i:
  1332. return $(v + "Milliseconds", 3);
  1333. default:
  1334. return this.clone();
  1335. }
  1336. }, m.endOf = function (t) {
  1337. return this.startOf(t, !1);
  1338. }, m.$set = function (t, e) {
  1339. var n,
  1340. o = O.p(t),
  1341. f = "set" + (this.$u ? "UTC" : ""),
  1342. l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o],
  1343. $ = o === a ? this.$D + (e - this.$W) : e;
  1344. if (o === c || o === h) {
  1345. var y = this.clone().set(d, 1);
  1346. y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
  1347. } else l && this.$d[l]($);
  1348. return this.init(), this;
  1349. }, m.set = function (t, e) {
  1350. return this.clone().$set(t, e);
  1351. }, m.get = function (t) {
  1352. return this[O.p(t)]();
  1353. }, m.add = function (r, f) {
  1354. var d,
  1355. l = this;
  1356. r = Number(r);
  1357. var $ = O.p(f),
  1358. y = function y(t) {
  1359. var e = w(l);
  1360. return O.w(e.date(e.date() + Math.round(t * r)), l);
  1361. };
  1362. if ($ === c) return this.set(c, this.$M + r);
  1363. if ($ === h) return this.set(h, this.$y + r);
  1364. if ($ === a) return y(1);
  1365. if ($ === o) return y(7);
  1366. var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1,
  1367. m = this.$d.getTime() + r * M;
  1368. return O.w(m, this);
  1369. }, m.subtract = function (t, e) {
  1370. return this.add(-1 * t, e);
  1371. }, m.format = function (t) {
  1372. var e = this,
  1373. n = this.$locale();
  1374. if (!this.isValid()) return n.invalidDate || l;
  1375. var r = t || "YYYY-MM-DDTHH:mm:ssZ",
  1376. i = O.z(this),
  1377. s = this.$H,
  1378. u = this.$m,
  1379. a = this.$M,
  1380. o = n.weekdays,
  1381. c = n.months,
  1382. f = n.meridiem,
  1383. h = function h(t, n, i, s) {
  1384. return t && (t[n] || t(e, r)) || i[n].slice(0, s);
  1385. },
  1386. d = function d(t) {
  1387. return O.s(s % 12 || 12, t, "0");
  1388. },
  1389. $ = f || function (t, e, n) {
  1390. var r = t < 12 ? "AM" : "PM";
  1391. return n ? r.toLowerCase() : r;
  1392. };
  1393. return r.replace(y, function (t, r) {
  1394. return r || function (t) {
  1395. switch (t) {
  1396. case "YY":
  1397. return String(e.$y).slice(-2);
  1398. case "YYYY":
  1399. return O.s(e.$y, 4, "0");
  1400. case "M":
  1401. return a + 1;
  1402. case "MM":
  1403. return O.s(a + 1, 2, "0");
  1404. case "MMM":
  1405. return h(n.monthsShort, a, c, 3);
  1406. case "MMMM":
  1407. return h(c, a);
  1408. case "D":
  1409. return e.$D;
  1410. case "DD":
  1411. return O.s(e.$D, 2, "0");
  1412. case "d":
  1413. return String(e.$W);
  1414. case "dd":
  1415. return h(n.weekdaysMin, e.$W, o, 2);
  1416. case "ddd":
  1417. return h(n.weekdaysShort, e.$W, o, 3);
  1418. case "dddd":
  1419. return o[e.$W];
  1420. case "H":
  1421. return String(s);
  1422. case "HH":
  1423. return O.s(s, 2, "0");
  1424. case "h":
  1425. return d(1);
  1426. case "hh":
  1427. return d(2);
  1428. case "a":
  1429. return $(s, u, !0);
  1430. case "A":
  1431. return $(s, u, !1);
  1432. case "m":
  1433. return String(u);
  1434. case "mm":
  1435. return O.s(u, 2, "0");
  1436. case "s":
  1437. return String(e.$s);
  1438. case "ss":
  1439. return O.s(e.$s, 2, "0");
  1440. case "SSS":
  1441. return O.s(e.$ms, 3, "0");
  1442. case "Z":
  1443. return i;
  1444. }
  1445. return null;
  1446. }(t) || i.replace(":", "");
  1447. });
  1448. }, m.utcOffset = function () {
  1449. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  1450. }, m.diff = function (r, d, l) {
  1451. var $,
  1452. y = this,
  1453. M = O.p(d),
  1454. m = w(r),
  1455. v = (m.utcOffset() - this.utcOffset()) * e,
  1456. g = this - m,
  1457. D = function D() {
  1458. return O.m(y, m);
  1459. };
  1460. switch (M) {
  1461. case h:
  1462. $ = D() / 12;
  1463. break;
  1464. case c:
  1465. $ = D();
  1466. break;
  1467. case f:
  1468. $ = D() / 3;
  1469. break;
  1470. case o:
  1471. $ = (g - v) / 6048e5;
  1472. break;
  1473. case a:
  1474. $ = (g - v) / 864e5;
  1475. break;
  1476. case u:
  1477. $ = g / n;
  1478. break;
  1479. case s:
  1480. $ = g / e;
  1481. break;
  1482. case i:
  1483. $ = g / t;
  1484. break;
  1485. default:
  1486. $ = g;
  1487. }
  1488. return l ? $ : O.a($);
  1489. }, m.daysInMonth = function () {
  1490. return this.endOf(c).$D;
  1491. }, m.$locale = function () {
  1492. return D[this.$L];
  1493. }, m.locale = function (t, e) {
  1494. if (!t) return this.$L;
  1495. var n = this.clone(),
  1496. r = S(t, e, !0);
  1497. return r && (n.$L = r), n;
  1498. }, m.clone = function () {
  1499. return O.w(this.$d, this);
  1500. }, m.toDate = function () {
  1501. return new Date(this.valueOf());
  1502. }, m.toJSON = function () {
  1503. return this.isValid() ? this.toISOString() : null;
  1504. }, m.toISOString = function () {
  1505. return this.$d.toISOString();
  1506. }, m.toString = function () {
  1507. return this.$d.toUTCString();
  1508. }, M;
  1509. }(),
  1510. _ = b.prototype;
  1511. return w.prototype = _, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function (t) {
  1512. _[t[1]] = function (e) {
  1513. return this.$g(e, t[0], t[1]);
  1514. };
  1515. }), w.extend = function (t, e) {
  1516. return t.$i || (t(e, b, w), t.$i = !0), w;
  1517. }, w.locale = S, w.isDayjs = p, w.unix = function (t) {
  1518. return w(1e3 * t);
  1519. }, w.en = D[g], w.Ls = D, w.p = {}, w;
  1520. };
  1521. var dayjs = fn();
  1522. exports.dayjs = dayjs;
  1523. /***/ }),
  1524. /***/ 15:
  1525. /*!**********************************************************!*\
  1526. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  1527. \**********************************************************/
  1528. /*! no static exports found */
  1529. /***/ (function(module, exports, __webpack_require__) {
  1530. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  1531. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  1532. function _construct(t, e, r) {
  1533. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  1534. var o = [null];
  1535. o.push.apply(o, e);
  1536. var p = new (t.bind.apply(t, o))();
  1537. return r && setPrototypeOf(p, r.prototype), p;
  1538. }
  1539. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1540. /***/ }),
  1541. /***/ 151:
  1542. /*!*****************************************************************************************!*\
  1543. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/message.js ***!
  1544. \*****************************************************************************************/
  1545. /*! no static exports found */
  1546. /***/ (function(module, exports, __webpack_require__) {
  1547. "use strict";
  1548. Object.defineProperty(exports, "__esModule", {
  1549. value: true
  1550. });
  1551. exports.bindProject = bindProject;
  1552. exports.getMessageDetailById = getMessageDetailById;
  1553. exports.getMessageList = getMessageList;
  1554. exports.setMessageViewed = setMessageViewed;
  1555. var _request = __webpack_require__(/*! @/request/request.js */ 46);
  1556. /*
  1557. * 获取消息列表
  1558. *
  1559. */
  1560. function getMessageList(userId, messageType) {
  1561. return (0, _request.request)({
  1562. url: "/manager/message/messageType/".concat(userId, "/").concat(messageType),
  1563. method: 'get'
  1564. });
  1565. }
  1566. /*
  1567. * 设置消息已读
  1568. *
  1569. */
  1570. function setMessageViewed(id) {
  1571. return (0, _request.request)({
  1572. url: "/manager/message/".concat(id),
  1573. method: 'put'
  1574. });
  1575. }
  1576. /*
  1577. * 通过id获取消息详情
  1578. *
  1579. */
  1580. function getMessageDetailById(id) {
  1581. return (0, _request.request)({
  1582. url: "/manager/message/".concat(id),
  1583. method: 'get'
  1584. });
  1585. }
  1586. /*
  1587. * 绑定客户至组织项目
  1588. *
  1589. *
  1590. */
  1591. function bindProject(data) {
  1592. return (0, _request.request)({
  1593. url: "/manager/bindProject",
  1594. method: 'post',
  1595. data: data
  1596. });
  1597. }
  1598. /***/ }),
  1599. /***/ 16:
  1600. /*!***************************************************************!*\
  1601. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  1602. \***************************************************************/
  1603. /*! no static exports found */
  1604. /***/ (function(module, exports) {
  1605. function _setPrototypeOf(o, p) {
  1606. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  1607. o.__proto__ = p;
  1608. return o;
  1609. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1610. return _setPrototypeOf(o, p);
  1611. }
  1612. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1613. /***/ }),
  1614. /***/ 17:
  1615. /*!*************************************************************************!*\
  1616. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  1617. \*************************************************************************/
  1618. /*! no static exports found */
  1619. /***/ (function(module, exports) {
  1620. function _isNativeReflectConstruct() {
  1621. try {
  1622. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  1623. } catch (t) {}
  1624. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  1625. return !!t;
  1626. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  1627. }
  1628. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1629. /***/ }),
  1630. /***/ 170:
  1631. /*!*****************************************************************************************!*\
  1632. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/project.js ***!
  1633. \*****************************************************************************************/
  1634. /*! no static exports found */
  1635. /***/ (function(module, exports, __webpack_require__) {
  1636. "use strict";
  1637. Object.defineProperty(exports, "__esModule", {
  1638. value: true
  1639. });
  1640. exports.getProjectList = getProjectList;
  1641. var _request = __webpack_require__(/*! @/request/request.js */ 46);
  1642. /*
  1643. * 获取项目列表
  1644. *
  1645. *
  1646. */
  1647. function getProjectList() {
  1648. var promise = new Promise(function (result, rej) {
  1649. (0, _request.request)({
  1650. url: "/manager/userContext/allProject",
  1651. method: 'get'
  1652. }).then(function (res) {
  1653. if (res.code === 200) {
  1654. if (res.data.length === 0) return result({
  1655. code: 200,
  1656. data: null,
  1657. message: null
  1658. });
  1659. (0, _request.request)({
  1660. url: "/api/project/getIds",
  1661. method: 'post',
  1662. data: res.data
  1663. }).then(function (node) {
  1664. result(node);
  1665. });
  1666. } else {
  1667. result({
  1668. code: 200,
  1669. data: null,
  1670. message: null
  1671. });
  1672. }
  1673. });
  1674. });
  1675. return promise;
  1676. }
  1677. /***/ }),
  1678. /***/ 18:
  1679. /*!******************************************************************!*\
  1680. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  1681. \******************************************************************/
  1682. /*! no static exports found */
  1683. /***/ (function(module, exports, __webpack_require__) {
  1684. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  1685. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  1686. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  1687. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  1688. function _toConsumableArray(arr) {
  1689. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  1690. }
  1691. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1692. /***/ }),
  1693. /***/ 19:
  1694. /*!******************************************************************!*\
  1695. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  1696. \******************************************************************/
  1697. /*! no static exports found */
  1698. /***/ (function(module, exports, __webpack_require__) {
  1699. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  1700. function _arrayWithoutHoles(arr) {
  1701. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  1702. }
  1703. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1704. /***/ }),
  1705. /***/ 2:
  1706. /*!************************************************************!*\
  1707. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  1708. \************************************************************/
  1709. /*! no static exports found */
  1710. /***/ (function(module, exports, __webpack_require__) {
  1711. "use strict";
  1712. /* WEBPACK VAR INJECTION */(function(wx, global) {
  1713. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1714. Object.defineProperty(exports, "__esModule", {
  1715. value: true
  1716. });
  1717. exports.createApp = createApp;
  1718. exports.createComponent = createComponent;
  1719. exports.createPage = createPage;
  1720. exports.createPlugin = createPlugin;
  1721. exports.createSubpackageApp = createSubpackageApp;
  1722. exports.default = void 0;
  1723. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  1724. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1725. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  1726. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  1727. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1728. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  1729. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  1730. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  1731. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  1732. var realAtob;
  1733. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1734. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  1735. if (typeof atob !== 'function') {
  1736. realAtob = function realAtob(str) {
  1737. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  1738. if (!b64re.test(str)) {
  1739. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  1740. }
  1741. // Adding the padding if missing, for semplicity
  1742. str += '=='.slice(2 - (str.length & 3));
  1743. var bitmap;
  1744. var result = '';
  1745. var r1;
  1746. var r2;
  1747. var i = 0;
  1748. for (; i < str.length;) {
  1749. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  1750. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  1751. }
  1752. return result;
  1753. };
  1754. } else {
  1755. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  1756. realAtob = atob;
  1757. }
  1758. function b64DecodeUnicode(str) {
  1759. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  1760. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  1761. }).join(''));
  1762. }
  1763. function getCurrentUserInfo() {
  1764. var token = wx.getStorageSync('uni_id_token') || '';
  1765. var tokenArr = token.split('.');
  1766. if (!token || tokenArr.length !== 3) {
  1767. return {
  1768. uid: null,
  1769. role: [],
  1770. permission: [],
  1771. tokenExpired: 0
  1772. };
  1773. }
  1774. var userInfo;
  1775. try {
  1776. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  1777. } catch (error) {
  1778. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  1779. }
  1780. userInfo.tokenExpired = userInfo.exp * 1000;
  1781. delete userInfo.exp;
  1782. delete userInfo.iat;
  1783. return userInfo;
  1784. }
  1785. function uniIdMixin(Vue) {
  1786. Vue.prototype.uniIDHasRole = function (roleId) {
  1787. var _getCurrentUserInfo = getCurrentUserInfo(),
  1788. role = _getCurrentUserInfo.role;
  1789. return role.indexOf(roleId) > -1;
  1790. };
  1791. Vue.prototype.uniIDHasPermission = function (permissionId) {
  1792. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  1793. permission = _getCurrentUserInfo2.permission;
  1794. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  1795. };
  1796. Vue.prototype.uniIDTokenValid = function () {
  1797. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  1798. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  1799. return tokenExpired > Date.now();
  1800. };
  1801. }
  1802. var _toString = Object.prototype.toString;
  1803. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1804. function isFn(fn) {
  1805. return typeof fn === 'function';
  1806. }
  1807. function isStr(str) {
  1808. return typeof str === 'string';
  1809. }
  1810. function isObject(obj) {
  1811. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  1812. }
  1813. function isPlainObject(obj) {
  1814. return _toString.call(obj) === '[object Object]';
  1815. }
  1816. function hasOwn(obj, key) {
  1817. return hasOwnProperty.call(obj, key);
  1818. }
  1819. function noop() {}
  1820. /**
  1821. * Create a cached version of a pure function.
  1822. */
  1823. function cached(fn) {
  1824. var cache = Object.create(null);
  1825. return function cachedFn(str) {
  1826. var hit = cache[str];
  1827. return hit || (cache[str] = fn(str));
  1828. };
  1829. }
  1830. /**
  1831. * Camelize a hyphen-delimited string.
  1832. */
  1833. var camelizeRE = /-(\w)/g;
  1834. var camelize = cached(function (str) {
  1835. return str.replace(camelizeRE, function (_, c) {
  1836. return c ? c.toUpperCase() : '';
  1837. });
  1838. });
  1839. function sortObject(obj) {
  1840. var sortObj = {};
  1841. if (isPlainObject(obj)) {
  1842. Object.keys(obj).sort().forEach(function (key) {
  1843. sortObj[key] = obj[key];
  1844. });
  1845. }
  1846. return !Object.keys(sortObj) ? obj : sortObj;
  1847. }
  1848. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  1849. var globalInterceptors = {};
  1850. var scopedInterceptors = {};
  1851. function mergeHook(parentVal, childVal) {
  1852. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  1853. return res ? dedupeHooks(res) : res;
  1854. }
  1855. function dedupeHooks(hooks) {
  1856. var res = [];
  1857. for (var i = 0; i < hooks.length; i++) {
  1858. if (res.indexOf(hooks[i]) === -1) {
  1859. res.push(hooks[i]);
  1860. }
  1861. }
  1862. return res;
  1863. }
  1864. function removeHook(hooks, hook) {
  1865. var index = hooks.indexOf(hook);
  1866. if (index !== -1) {
  1867. hooks.splice(index, 1);
  1868. }
  1869. }
  1870. function mergeInterceptorHook(interceptor, option) {
  1871. Object.keys(option).forEach(function (hook) {
  1872. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1873. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  1874. }
  1875. });
  1876. }
  1877. function removeInterceptorHook(interceptor, option) {
  1878. if (!interceptor || !option) {
  1879. return;
  1880. }
  1881. Object.keys(option).forEach(function (hook) {
  1882. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1883. removeHook(interceptor[hook], option[hook]);
  1884. }
  1885. });
  1886. }
  1887. function addInterceptor(method, option) {
  1888. if (typeof method === 'string' && isPlainObject(option)) {
  1889. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  1890. } else if (isPlainObject(method)) {
  1891. mergeInterceptorHook(globalInterceptors, method);
  1892. }
  1893. }
  1894. function removeInterceptor(method, option) {
  1895. if (typeof method === 'string') {
  1896. if (isPlainObject(option)) {
  1897. removeInterceptorHook(scopedInterceptors[method], option);
  1898. } else {
  1899. delete scopedInterceptors[method];
  1900. }
  1901. } else if (isPlainObject(method)) {
  1902. removeInterceptorHook(globalInterceptors, method);
  1903. }
  1904. }
  1905. function wrapperHook(hook, params) {
  1906. return function (data) {
  1907. return hook(data, params) || data;
  1908. };
  1909. }
  1910. function isPromise(obj) {
  1911. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  1912. }
  1913. function queue(hooks, data, params) {
  1914. var promise = false;
  1915. for (var i = 0; i < hooks.length; i++) {
  1916. var hook = hooks[i];
  1917. if (promise) {
  1918. promise = Promise.resolve(wrapperHook(hook, params));
  1919. } else {
  1920. var res = hook(data, params);
  1921. if (isPromise(res)) {
  1922. promise = Promise.resolve(res);
  1923. }
  1924. if (res === false) {
  1925. return {
  1926. then: function then() {}
  1927. };
  1928. }
  1929. }
  1930. }
  1931. return promise || {
  1932. then: function then(callback) {
  1933. return callback(data);
  1934. }
  1935. };
  1936. }
  1937. function wrapperOptions(interceptor) {
  1938. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1939. ['success', 'fail', 'complete'].forEach(function (name) {
  1940. if (Array.isArray(interceptor[name])) {
  1941. var oldCallback = options[name];
  1942. options[name] = function callbackInterceptor(res) {
  1943. queue(interceptor[name], res, options).then(function (res) {
  1944. /* eslint-disable no-mixed-operators */
  1945. return isFn(oldCallback) && oldCallback(res) || res;
  1946. });
  1947. };
  1948. }
  1949. });
  1950. return options;
  1951. }
  1952. function wrapperReturnValue(method, returnValue) {
  1953. var returnValueHooks = [];
  1954. if (Array.isArray(globalInterceptors.returnValue)) {
  1955. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  1956. }
  1957. var interceptor = scopedInterceptors[method];
  1958. if (interceptor && Array.isArray(interceptor.returnValue)) {
  1959. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  1960. }
  1961. returnValueHooks.forEach(function (hook) {
  1962. returnValue = hook(returnValue) || returnValue;
  1963. });
  1964. return returnValue;
  1965. }
  1966. function getApiInterceptorHooks(method) {
  1967. var interceptor = Object.create(null);
  1968. Object.keys(globalInterceptors).forEach(function (hook) {
  1969. if (hook !== 'returnValue') {
  1970. interceptor[hook] = globalInterceptors[hook].slice();
  1971. }
  1972. });
  1973. var scopedInterceptor = scopedInterceptors[method];
  1974. if (scopedInterceptor) {
  1975. Object.keys(scopedInterceptor).forEach(function (hook) {
  1976. if (hook !== 'returnValue') {
  1977. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  1978. }
  1979. });
  1980. }
  1981. return interceptor;
  1982. }
  1983. function invokeApi(method, api, options) {
  1984. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  1985. params[_key - 3] = arguments[_key];
  1986. }
  1987. var interceptor = getApiInterceptorHooks(method);
  1988. if (interceptor && Object.keys(interceptor).length) {
  1989. if (Array.isArray(interceptor.invoke)) {
  1990. var res = queue(interceptor.invoke, options);
  1991. return res.then(function (options) {
  1992. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  1993. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  1994. });
  1995. } else {
  1996. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  1997. }
  1998. }
  1999. return api.apply(void 0, [options].concat(params));
  2000. }
  2001. var promiseInterceptor = {
  2002. returnValue: function returnValue(res) {
  2003. if (!isPromise(res)) {
  2004. return res;
  2005. }
  2006. return new Promise(function (resolve, reject) {
  2007. res.then(function (res) {
  2008. if (res[0]) {
  2009. reject(res[0]);
  2010. } else {
  2011. resolve(res[1]);
  2012. }
  2013. });
  2014. });
  2015. }
  2016. };
  2017. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  2018. var CONTEXT_API_RE = /^create|Manager$/;
  2019. // Context例外情况
  2020. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  2021. // 同步例外情况
  2022. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  2023. var CALLBACK_API_RE = /^on|^off/;
  2024. function isContextApi(name) {
  2025. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  2026. }
  2027. function isSyncApi(name) {
  2028. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  2029. }
  2030. function isCallbackApi(name) {
  2031. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  2032. }
  2033. function handlePromise(promise) {
  2034. return promise.then(function (data) {
  2035. return [null, data];
  2036. }).catch(function (err) {
  2037. return [err];
  2038. });
  2039. }
  2040. function shouldPromise(name) {
  2041. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  2042. return false;
  2043. }
  2044. return true;
  2045. }
  2046. /* eslint-disable no-extend-native */
  2047. if (!Promise.prototype.finally) {
  2048. Promise.prototype.finally = function (callback) {
  2049. var promise = this.constructor;
  2050. return this.then(function (value) {
  2051. return promise.resolve(callback()).then(function () {
  2052. return value;
  2053. });
  2054. }, function (reason) {
  2055. return promise.resolve(callback()).then(function () {
  2056. throw reason;
  2057. });
  2058. });
  2059. };
  2060. }
  2061. function promisify(name, api) {
  2062. if (!shouldPromise(name) || !isFn(api)) {
  2063. return api;
  2064. }
  2065. return function promiseApi() {
  2066. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2067. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  2068. params[_key2 - 1] = arguments[_key2];
  2069. }
  2070. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  2071. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  2072. }
  2073. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  2074. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  2075. success: resolve,
  2076. fail: reject
  2077. })].concat(params));
  2078. })));
  2079. };
  2080. }
  2081. var EPS = 1e-4;
  2082. var BASE_DEVICE_WIDTH = 750;
  2083. var isIOS = false;
  2084. var deviceWidth = 0;
  2085. var deviceDPR = 0;
  2086. function checkDeviceWidth() {
  2087. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  2088. platform = _wx$getSystemInfoSync.platform,
  2089. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  2090. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  2091. deviceWidth = windowWidth;
  2092. deviceDPR = pixelRatio;
  2093. isIOS = platform === 'ios';
  2094. }
  2095. function upx2px(number, newDeviceWidth) {
  2096. if (deviceWidth === 0) {
  2097. checkDeviceWidth();
  2098. }
  2099. number = Number(number);
  2100. if (number === 0) {
  2101. return 0;
  2102. }
  2103. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  2104. if (result < 0) {
  2105. result = -result;
  2106. }
  2107. result = Math.floor(result + EPS);
  2108. if (result === 0) {
  2109. if (deviceDPR === 1 || !isIOS) {
  2110. result = 1;
  2111. } else {
  2112. result = 0.5;
  2113. }
  2114. }
  2115. return number < 0 ? -result : result;
  2116. }
  2117. var LOCALE_ZH_HANS = 'zh-Hans';
  2118. var LOCALE_ZH_HANT = 'zh-Hant';
  2119. var LOCALE_EN = 'en';
  2120. var LOCALE_FR = 'fr';
  2121. var LOCALE_ES = 'es';
  2122. var messages = {};
  2123. var locale;
  2124. {
  2125. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2126. }
  2127. function initI18nMessages() {
  2128. if (!isEnableLocale()) {
  2129. return;
  2130. }
  2131. var localeKeys = Object.keys(__uniConfig.locales);
  2132. if (localeKeys.length) {
  2133. localeKeys.forEach(function (locale) {
  2134. var curMessages = messages[locale];
  2135. var userMessages = __uniConfig.locales[locale];
  2136. if (curMessages) {
  2137. Object.assign(curMessages, userMessages);
  2138. } else {
  2139. messages[locale] = userMessages;
  2140. }
  2141. });
  2142. }
  2143. }
  2144. initI18nMessages();
  2145. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  2146. var t = i18n.t;
  2147. var i18nMixin = i18n.mixin = {
  2148. beforeCreate: function beforeCreate() {
  2149. var _this = this;
  2150. var unwatch = i18n.i18n.watchLocale(function () {
  2151. _this.$forceUpdate();
  2152. });
  2153. this.$once('hook:beforeDestroy', function () {
  2154. unwatch();
  2155. });
  2156. },
  2157. methods: {
  2158. $$t: function $$t(key, values) {
  2159. return t(key, values);
  2160. }
  2161. }
  2162. };
  2163. var setLocale = i18n.setLocale;
  2164. var getLocale = i18n.getLocale;
  2165. function initAppLocale(Vue, appVm, locale) {
  2166. var state = Vue.observable({
  2167. locale: locale || i18n.getLocale()
  2168. });
  2169. var localeWatchers = [];
  2170. appVm.$watchLocale = function (fn) {
  2171. localeWatchers.push(fn);
  2172. };
  2173. Object.defineProperty(appVm, '$locale', {
  2174. get: function get() {
  2175. return state.locale;
  2176. },
  2177. set: function set(v) {
  2178. state.locale = v;
  2179. localeWatchers.forEach(function (watch) {
  2180. return watch(v);
  2181. });
  2182. }
  2183. });
  2184. }
  2185. function isEnableLocale() {
  2186. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  2187. }
  2188. function include(str, parts) {
  2189. return !!parts.find(function (part) {
  2190. return str.indexOf(part) !== -1;
  2191. });
  2192. }
  2193. function startsWith(str, parts) {
  2194. return parts.find(function (part) {
  2195. return str.indexOf(part) === 0;
  2196. });
  2197. }
  2198. function normalizeLocale(locale, messages) {
  2199. if (!locale) {
  2200. return;
  2201. }
  2202. locale = locale.trim().replace(/_/g, '-');
  2203. if (messages && messages[locale]) {
  2204. return locale;
  2205. }
  2206. locale = locale.toLowerCase();
  2207. if (locale === 'chinese') {
  2208. // 支付宝
  2209. return LOCALE_ZH_HANS;
  2210. }
  2211. if (locale.indexOf('zh') === 0) {
  2212. if (locale.indexOf('-hans') > -1) {
  2213. return LOCALE_ZH_HANS;
  2214. }
  2215. if (locale.indexOf('-hant') > -1) {
  2216. return LOCALE_ZH_HANT;
  2217. }
  2218. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2219. return LOCALE_ZH_HANT;
  2220. }
  2221. return LOCALE_ZH_HANS;
  2222. }
  2223. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  2224. if (lang) {
  2225. return lang;
  2226. }
  2227. }
  2228. // export function initI18n() {
  2229. // const localeKeys = Object.keys(__uniConfig.locales || {})
  2230. // if (localeKeys.length) {
  2231. // localeKeys.forEach((locale) =>
  2232. // i18n.add(locale, __uniConfig.locales[locale])
  2233. // )
  2234. // }
  2235. // }
  2236. function getLocale$1() {
  2237. // 优先使用 $locale
  2238. if (isFn(getApp)) {
  2239. var app = getApp({
  2240. allowDefault: true
  2241. });
  2242. if (app && app.$vm) {
  2243. return app.$vm.$locale;
  2244. }
  2245. }
  2246. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2247. }
  2248. function setLocale$1(locale) {
  2249. var app = isFn(getApp) ? getApp() : false;
  2250. if (!app) {
  2251. return false;
  2252. }
  2253. var oldLocale = app.$vm.$locale;
  2254. if (oldLocale !== locale) {
  2255. app.$vm.$locale = locale;
  2256. onLocaleChangeCallbacks.forEach(function (fn) {
  2257. return fn({
  2258. locale: locale
  2259. });
  2260. });
  2261. return true;
  2262. }
  2263. return false;
  2264. }
  2265. var onLocaleChangeCallbacks = [];
  2266. function onLocaleChange(fn) {
  2267. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  2268. onLocaleChangeCallbacks.push(fn);
  2269. }
  2270. }
  2271. if (typeof global !== 'undefined') {
  2272. global.getLocale = getLocale$1;
  2273. }
  2274. var interceptors = {
  2275. promiseInterceptor: promiseInterceptor
  2276. };
  2277. var baseApi = /*#__PURE__*/Object.freeze({
  2278. __proto__: null,
  2279. upx2px: upx2px,
  2280. getLocale: getLocale$1,
  2281. setLocale: setLocale$1,
  2282. onLocaleChange: onLocaleChange,
  2283. addInterceptor: addInterceptor,
  2284. removeInterceptor: removeInterceptor,
  2285. interceptors: interceptors
  2286. });
  2287. function findExistsPageIndex(url) {
  2288. var pages = getCurrentPages();
  2289. var len = pages.length;
  2290. while (len--) {
  2291. var page = pages[len];
  2292. if (page.$page && page.$page.fullPath === url) {
  2293. return len;
  2294. }
  2295. }
  2296. return -1;
  2297. }
  2298. var redirectTo = {
  2299. name: function name(fromArgs) {
  2300. if (fromArgs.exists === 'back' && fromArgs.delta) {
  2301. return 'navigateBack';
  2302. }
  2303. return 'redirectTo';
  2304. },
  2305. args: function args(fromArgs) {
  2306. if (fromArgs.exists === 'back' && fromArgs.url) {
  2307. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  2308. if (existsPageIndex !== -1) {
  2309. var delta = getCurrentPages().length - 1 - existsPageIndex;
  2310. if (delta > 0) {
  2311. fromArgs.delta = delta;
  2312. }
  2313. }
  2314. }
  2315. }
  2316. };
  2317. var previewImage = {
  2318. args: function args(fromArgs) {
  2319. var currentIndex = parseInt(fromArgs.current);
  2320. if (isNaN(currentIndex)) {
  2321. return;
  2322. }
  2323. var urls = fromArgs.urls;
  2324. if (!Array.isArray(urls)) {
  2325. return;
  2326. }
  2327. var len = urls.length;
  2328. if (!len) {
  2329. return;
  2330. }
  2331. if (currentIndex < 0) {
  2332. currentIndex = 0;
  2333. } else if (currentIndex >= len) {
  2334. currentIndex = len - 1;
  2335. }
  2336. if (currentIndex > 0) {
  2337. fromArgs.current = urls[currentIndex];
  2338. fromArgs.urls = urls.filter(function (item, index) {
  2339. return index < currentIndex ? item !== urls[currentIndex] : true;
  2340. });
  2341. } else {
  2342. fromArgs.current = urls[0];
  2343. }
  2344. return {
  2345. indicator: false,
  2346. loop: false
  2347. };
  2348. }
  2349. };
  2350. var UUID_KEY = '__DC_STAT_UUID';
  2351. var deviceId;
  2352. function useDeviceId(result) {
  2353. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  2354. if (!deviceId) {
  2355. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  2356. wx.setStorage({
  2357. key: UUID_KEY,
  2358. data: deviceId
  2359. });
  2360. }
  2361. result.deviceId = deviceId;
  2362. }
  2363. function addSafeAreaInsets(result) {
  2364. if (result.safeArea) {
  2365. var safeArea = result.safeArea;
  2366. result.safeAreaInsets = {
  2367. top: safeArea.top,
  2368. left: safeArea.left,
  2369. right: result.windowWidth - safeArea.right,
  2370. bottom: result.screenHeight - safeArea.bottom
  2371. };
  2372. }
  2373. }
  2374. function populateParameters(result) {
  2375. var _result$brand = result.brand,
  2376. brand = _result$brand === void 0 ? '' : _result$brand,
  2377. _result$model = result.model,
  2378. model = _result$model === void 0 ? '' : _result$model,
  2379. _result$system = result.system,
  2380. system = _result$system === void 0 ? '' : _result$system,
  2381. _result$language = result.language,
  2382. language = _result$language === void 0 ? '' : _result$language,
  2383. theme = result.theme,
  2384. version = result.version,
  2385. platform = result.platform,
  2386. fontSizeSetting = result.fontSizeSetting,
  2387. SDKVersion = result.SDKVersion,
  2388. pixelRatio = result.pixelRatio,
  2389. deviceOrientation = result.deviceOrientation;
  2390. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  2391. var extraParam = {};
  2392. // osName osVersion
  2393. var osName = '';
  2394. var osVersion = '';
  2395. {
  2396. osName = system.split(' ')[0] || '';
  2397. osVersion = system.split(' ')[1] || '';
  2398. }
  2399. var hostVersion = version;
  2400. // deviceType
  2401. var deviceType = getGetDeviceType(result, model);
  2402. // deviceModel
  2403. var deviceBrand = getDeviceBrand(brand);
  2404. // hostName
  2405. var _hostName = getHostName(result);
  2406. // deviceOrientation
  2407. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  2408. // devicePixelRatio
  2409. var _devicePixelRatio = pixelRatio;
  2410. // SDKVersion
  2411. var _SDKVersion = SDKVersion;
  2412. // hostLanguage
  2413. var hostLanguage = language.replace(/_/g, '-');
  2414. // wx.getAccountInfoSync
  2415. var parameters = {
  2416. appId: "__UNI__E00CD61",
  2417. appName: "wx",
  2418. appVersion: "1.0.0",
  2419. appVersionCode: "100",
  2420. appLanguage: getAppLanguage(hostLanguage),
  2421. uniCompileVersion: "4.15",
  2422. uniRuntimeVersion: "4.15",
  2423. uniPlatform: undefined || "mp-weixin",
  2424. deviceBrand: deviceBrand,
  2425. deviceModel: model,
  2426. deviceType: deviceType,
  2427. devicePixelRatio: _devicePixelRatio,
  2428. deviceOrientation: _deviceOrientation,
  2429. osName: osName.toLocaleLowerCase(),
  2430. osVersion: osVersion,
  2431. hostTheme: theme,
  2432. hostVersion: hostVersion,
  2433. hostLanguage: hostLanguage,
  2434. hostName: _hostName,
  2435. hostSDKVersion: _SDKVersion,
  2436. hostFontSizeSetting: fontSizeSetting,
  2437. windowTop: 0,
  2438. windowBottom: 0,
  2439. // TODO
  2440. osLanguage: undefined,
  2441. osTheme: undefined,
  2442. ua: undefined,
  2443. hostPackageName: undefined,
  2444. browserName: undefined,
  2445. browserVersion: undefined
  2446. };
  2447. Object.assign(result, parameters, extraParam);
  2448. }
  2449. function getGetDeviceType(result, model) {
  2450. var deviceType = result.deviceType || 'phone';
  2451. {
  2452. var deviceTypeMaps = {
  2453. ipad: 'pad',
  2454. windows: 'pc',
  2455. mac: 'pc'
  2456. };
  2457. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  2458. var _model = model.toLocaleLowerCase();
  2459. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  2460. var _m = deviceTypeMapsKeys[index];
  2461. if (_model.indexOf(_m) !== -1) {
  2462. deviceType = deviceTypeMaps[_m];
  2463. break;
  2464. }
  2465. }
  2466. }
  2467. return deviceType;
  2468. }
  2469. function getDeviceBrand(brand) {
  2470. var deviceBrand = brand;
  2471. if (deviceBrand) {
  2472. deviceBrand = brand.toLocaleLowerCase();
  2473. }
  2474. return deviceBrand;
  2475. }
  2476. function getAppLanguage(defaultLanguage) {
  2477. return getLocale$1 ? getLocale$1() : defaultLanguage;
  2478. }
  2479. function getHostName(result) {
  2480. var _platform = 'WeChat';
  2481. var _hostName = result.hostName || _platform; // mp-jd
  2482. {
  2483. if (result.environment) {
  2484. _hostName = result.environment;
  2485. } else if (result.host && result.host.env) {
  2486. _hostName = result.host.env;
  2487. }
  2488. }
  2489. return _hostName;
  2490. }
  2491. var getSystemInfo = {
  2492. returnValue: function returnValue(result) {
  2493. useDeviceId(result);
  2494. addSafeAreaInsets(result);
  2495. populateParameters(result);
  2496. }
  2497. };
  2498. var showActionSheet = {
  2499. args: function args(fromArgs) {
  2500. if ((0, _typeof2.default)(fromArgs) === 'object') {
  2501. fromArgs.alertText = fromArgs.title;
  2502. }
  2503. }
  2504. };
  2505. var getAppBaseInfo = {
  2506. returnValue: function returnValue(result) {
  2507. var _result = result,
  2508. version = _result.version,
  2509. language = _result.language,
  2510. SDKVersion = _result.SDKVersion,
  2511. theme = _result.theme;
  2512. var _hostName = getHostName(result);
  2513. var hostLanguage = language.replace('_', '-');
  2514. result = sortObject(Object.assign(result, {
  2515. appId: "__UNI__E00CD61",
  2516. appName: "wx",
  2517. appVersion: "1.0.0",
  2518. appVersionCode: "100",
  2519. appLanguage: getAppLanguage(hostLanguage),
  2520. hostVersion: version,
  2521. hostLanguage: hostLanguage,
  2522. hostName: _hostName,
  2523. hostSDKVersion: SDKVersion,
  2524. hostTheme: theme
  2525. }));
  2526. }
  2527. };
  2528. var getDeviceInfo = {
  2529. returnValue: function returnValue(result) {
  2530. var _result2 = result,
  2531. brand = _result2.brand,
  2532. model = _result2.model;
  2533. var deviceType = getGetDeviceType(result, model);
  2534. var deviceBrand = getDeviceBrand(brand);
  2535. useDeviceId(result);
  2536. result = sortObject(Object.assign(result, {
  2537. deviceType: deviceType,
  2538. deviceBrand: deviceBrand,
  2539. deviceModel: model
  2540. }));
  2541. }
  2542. };
  2543. var getWindowInfo = {
  2544. returnValue: function returnValue(result) {
  2545. addSafeAreaInsets(result);
  2546. result = sortObject(Object.assign(result, {
  2547. windowTop: 0,
  2548. windowBottom: 0
  2549. }));
  2550. }
  2551. };
  2552. var getAppAuthorizeSetting = {
  2553. returnValue: function returnValue(result) {
  2554. var locationReducedAccuracy = result.locationReducedAccuracy;
  2555. result.locationAccuracy = 'unsupported';
  2556. if (locationReducedAccuracy === true) {
  2557. result.locationAccuracy = 'reduced';
  2558. } else if (locationReducedAccuracy === false) {
  2559. result.locationAccuracy = 'full';
  2560. }
  2561. }
  2562. };
  2563. // import navigateTo from 'uni-helpers/navigate-to'
  2564. var compressImage = {
  2565. args: function args(fromArgs) {
  2566. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  2567. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  2568. fromArgs.compressHeight = fromArgs.compressedHeight;
  2569. }
  2570. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  2571. fromArgs.compressWidth = fromArgs.compressedWidth;
  2572. }
  2573. }
  2574. };
  2575. var protocols = {
  2576. redirectTo: redirectTo,
  2577. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  2578. previewImage: previewImage,
  2579. getSystemInfo: getSystemInfo,
  2580. getSystemInfoSync: getSystemInfo,
  2581. showActionSheet: showActionSheet,
  2582. getAppBaseInfo: getAppBaseInfo,
  2583. getDeviceInfo: getDeviceInfo,
  2584. getWindowInfo: getWindowInfo,
  2585. getAppAuthorizeSetting: getAppAuthorizeSetting,
  2586. compressImage: compressImage
  2587. };
  2588. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  2589. var canIUses = [];
  2590. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  2591. function processCallback(methodName, method, returnValue) {
  2592. return function (res) {
  2593. return method(processReturnValue(methodName, res, returnValue));
  2594. };
  2595. }
  2596. function processArgs(methodName, fromArgs) {
  2597. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2598. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  2599. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  2600. if (isPlainObject(fromArgs)) {
  2601. // 一般 api 的参数解析
  2602. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  2603. if (isFn(argsOption)) {
  2604. argsOption = argsOption(fromArgs, toArgs) || {};
  2605. }
  2606. for (var key in fromArgs) {
  2607. if (hasOwn(argsOption, key)) {
  2608. var keyOption = argsOption[key];
  2609. if (isFn(keyOption)) {
  2610. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  2611. }
  2612. if (!keyOption) {
  2613. // 不支持的参数
  2614. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  2615. } else if (isStr(keyOption)) {
  2616. // 重写参数 key
  2617. toArgs[keyOption] = fromArgs[key];
  2618. } else if (isPlainObject(keyOption)) {
  2619. // {name:newName,value:value}可重新指定参数 key:value
  2620. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  2621. }
  2622. } else if (CALLBACKS.indexOf(key) !== -1) {
  2623. if (isFn(fromArgs[key])) {
  2624. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  2625. }
  2626. } else {
  2627. if (!keepFromArgs) {
  2628. toArgs[key] = fromArgs[key];
  2629. }
  2630. }
  2631. }
  2632. return toArgs;
  2633. } else if (isFn(fromArgs)) {
  2634. fromArgs = processCallback(methodName, fromArgs, returnValue);
  2635. }
  2636. return fromArgs;
  2637. }
  2638. function processReturnValue(methodName, res, returnValue) {
  2639. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  2640. if (isFn(protocols.returnValue)) {
  2641. // 处理通用 returnValue
  2642. res = protocols.returnValue(methodName, res);
  2643. }
  2644. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  2645. }
  2646. function wrapper(methodName, method) {
  2647. if (hasOwn(protocols, methodName)) {
  2648. var protocol = protocols[methodName];
  2649. if (!protocol) {
  2650. // 暂不支持的 api
  2651. return function () {
  2652. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  2653. };
  2654. }
  2655. return function (arg1, arg2) {
  2656. // 目前 api 最多两个参数
  2657. var options = protocol;
  2658. if (isFn(protocol)) {
  2659. options = protocol(arg1);
  2660. }
  2661. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  2662. var args = [arg1];
  2663. if (typeof arg2 !== 'undefined') {
  2664. args.push(arg2);
  2665. }
  2666. if (isFn(options.name)) {
  2667. methodName = options.name(arg1);
  2668. } else if (isStr(options.name)) {
  2669. methodName = options.name;
  2670. }
  2671. var returnValue = wx[methodName].apply(wx, args);
  2672. if (isSyncApi(methodName)) {
  2673. // 同步 api
  2674. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  2675. }
  2676. return returnValue;
  2677. };
  2678. }
  2679. return method;
  2680. }
  2681. var todoApis = Object.create(null);
  2682. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  2683. function createTodoApi(name) {
  2684. return function todoApi(_ref) {
  2685. var fail = _ref.fail,
  2686. complete = _ref.complete;
  2687. var res = {
  2688. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  2689. };
  2690. isFn(fail) && fail(res);
  2691. isFn(complete) && complete(res);
  2692. };
  2693. }
  2694. TODOS.forEach(function (name) {
  2695. todoApis[name] = createTodoApi(name);
  2696. });
  2697. var providers = {
  2698. oauth: ['weixin'],
  2699. share: ['weixin'],
  2700. payment: ['wxpay'],
  2701. push: ['weixin']
  2702. };
  2703. function getProvider(_ref2) {
  2704. var service = _ref2.service,
  2705. success = _ref2.success,
  2706. fail = _ref2.fail,
  2707. complete = _ref2.complete;
  2708. var res = false;
  2709. if (providers[service]) {
  2710. res = {
  2711. errMsg: 'getProvider:ok',
  2712. service: service,
  2713. provider: providers[service]
  2714. };
  2715. isFn(success) && success(res);
  2716. } else {
  2717. res = {
  2718. errMsg: 'getProvider:fail service not found'
  2719. };
  2720. isFn(fail) && fail(res);
  2721. }
  2722. isFn(complete) && complete(res);
  2723. }
  2724. var extraApi = /*#__PURE__*/Object.freeze({
  2725. __proto__: null,
  2726. getProvider: getProvider
  2727. });
  2728. var getEmitter = function () {
  2729. var Emitter;
  2730. return function getUniEmitter() {
  2731. if (!Emitter) {
  2732. Emitter = new _vue.default();
  2733. }
  2734. return Emitter;
  2735. };
  2736. }();
  2737. function apply(ctx, method, args) {
  2738. return ctx[method].apply(ctx, args);
  2739. }
  2740. function $on() {
  2741. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  2742. }
  2743. function $off() {
  2744. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  2745. }
  2746. function $once() {
  2747. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  2748. }
  2749. function $emit() {
  2750. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  2751. }
  2752. var eventApi = /*#__PURE__*/Object.freeze({
  2753. __proto__: null,
  2754. $on: $on,
  2755. $off: $off,
  2756. $once: $once,
  2757. $emit: $emit
  2758. });
  2759. /**
  2760. * 框架内 try-catch
  2761. */
  2762. /**
  2763. * 开发者 try-catch
  2764. */
  2765. function tryCatch(fn) {
  2766. return function () {
  2767. try {
  2768. return fn.apply(fn, arguments);
  2769. } catch (e) {
  2770. // TODO
  2771. console.error(e);
  2772. }
  2773. };
  2774. }
  2775. function getApiCallbacks(params) {
  2776. var apiCallbacks = {};
  2777. for (var name in params) {
  2778. var param = params[name];
  2779. if (isFn(param)) {
  2780. apiCallbacks[name] = tryCatch(param);
  2781. delete params[name];
  2782. }
  2783. }
  2784. return apiCallbacks;
  2785. }
  2786. var cid;
  2787. var cidErrMsg;
  2788. var enabled;
  2789. function normalizePushMessage(message) {
  2790. try {
  2791. return JSON.parse(message);
  2792. } catch (e) {}
  2793. return message;
  2794. }
  2795. function invokePushCallback(args) {
  2796. if (args.type === 'enabled') {
  2797. enabled = true;
  2798. } else if (args.type === 'clientId') {
  2799. cid = args.cid;
  2800. cidErrMsg = args.errMsg;
  2801. invokeGetPushCidCallbacks(cid, args.errMsg);
  2802. } else if (args.type === 'pushMsg') {
  2803. var message = {
  2804. type: 'receive',
  2805. data: normalizePushMessage(args.message)
  2806. };
  2807. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  2808. var callback = onPushMessageCallbacks[i];
  2809. callback(message);
  2810. // 该消息已被阻止
  2811. if (message.stopped) {
  2812. break;
  2813. }
  2814. }
  2815. } else if (args.type === 'click') {
  2816. onPushMessageCallbacks.forEach(function (callback) {
  2817. callback({
  2818. type: 'click',
  2819. data: normalizePushMessage(args.message)
  2820. });
  2821. });
  2822. }
  2823. }
  2824. var getPushCidCallbacks = [];
  2825. function invokeGetPushCidCallbacks(cid, errMsg) {
  2826. getPushCidCallbacks.forEach(function (callback) {
  2827. callback(cid, errMsg);
  2828. });
  2829. getPushCidCallbacks.length = 0;
  2830. }
  2831. function getPushClientId(args) {
  2832. if (!isPlainObject(args)) {
  2833. args = {};
  2834. }
  2835. var _getApiCallbacks = getApiCallbacks(args),
  2836. success = _getApiCallbacks.success,
  2837. fail = _getApiCallbacks.fail,
  2838. complete = _getApiCallbacks.complete;
  2839. var hasSuccess = isFn(success);
  2840. var hasFail = isFn(fail);
  2841. var hasComplete = isFn(complete);
  2842. Promise.resolve().then(function () {
  2843. if (typeof enabled === 'undefined') {
  2844. enabled = false;
  2845. cid = '';
  2846. cidErrMsg = 'uniPush is not enabled';
  2847. }
  2848. getPushCidCallbacks.push(function (cid, errMsg) {
  2849. var res;
  2850. if (cid) {
  2851. res = {
  2852. errMsg: 'getPushClientId:ok',
  2853. cid: cid
  2854. };
  2855. hasSuccess && success(res);
  2856. } else {
  2857. res = {
  2858. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  2859. };
  2860. hasFail && fail(res);
  2861. }
  2862. hasComplete && complete(res);
  2863. });
  2864. if (typeof cid !== 'undefined') {
  2865. invokeGetPushCidCallbacks(cid, cidErrMsg);
  2866. }
  2867. });
  2868. }
  2869. var onPushMessageCallbacks = [];
  2870. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  2871. var onPushMessage = function onPushMessage(fn) {
  2872. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  2873. onPushMessageCallbacks.push(fn);
  2874. }
  2875. };
  2876. var offPushMessage = function offPushMessage(fn) {
  2877. if (!fn) {
  2878. onPushMessageCallbacks.length = 0;
  2879. } else {
  2880. var index = onPushMessageCallbacks.indexOf(fn);
  2881. if (index > -1) {
  2882. onPushMessageCallbacks.splice(index, 1);
  2883. }
  2884. }
  2885. };
  2886. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  2887. if (!baseInfo) {
  2888. baseInfo = wx.getSystemInfoSync();
  2889. }
  2890. var host = baseInfo ? baseInfo.host : null;
  2891. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  2892. var api = /*#__PURE__*/Object.freeze({
  2893. __proto__: null,
  2894. shareVideoMessage: shareVideoMessage,
  2895. getPushClientId: getPushClientId,
  2896. onPushMessage: onPushMessage,
  2897. offPushMessage: offPushMessage,
  2898. invokePushCallback: invokePushCallback
  2899. });
  2900. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  2901. function findVmByVueId(vm, vuePid) {
  2902. var $children = vm.$children;
  2903. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  2904. for (var i = $children.length - 1; i >= 0; i--) {
  2905. var childVm = $children[i];
  2906. if (childVm.$scope._$vueId === vuePid) {
  2907. return childVm;
  2908. }
  2909. }
  2910. // 反向递归查找
  2911. var parentVm;
  2912. for (var _i = $children.length - 1; _i >= 0; _i--) {
  2913. parentVm = findVmByVueId($children[_i], vuePid);
  2914. if (parentVm) {
  2915. return parentVm;
  2916. }
  2917. }
  2918. }
  2919. function initBehavior(options) {
  2920. return Behavior(options);
  2921. }
  2922. function isPage() {
  2923. return !!this.route;
  2924. }
  2925. function initRelation(detail) {
  2926. this.triggerEvent('__l', detail);
  2927. }
  2928. function selectAllComponents(mpInstance, selector, $refs) {
  2929. var components = mpInstance.selectAllComponents(selector) || [];
  2930. components.forEach(function (component) {
  2931. var ref = component.dataset.ref;
  2932. $refs[ref] = component.$vm || toSkip(component);
  2933. {
  2934. if (component.dataset.vueGeneric === 'scoped') {
  2935. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  2936. selectAllComponents(scopedComponent, selector, $refs);
  2937. });
  2938. }
  2939. }
  2940. });
  2941. }
  2942. function syncRefs(refs, newRefs) {
  2943. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  2944. var newKeys = Object.keys(newRefs);
  2945. newKeys.forEach(function (key) {
  2946. var oldValue = refs[key];
  2947. var newValue = newRefs[key];
  2948. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  2949. return oldValue.includes(value);
  2950. })) {
  2951. return;
  2952. }
  2953. refs[key] = newValue;
  2954. oldKeys.delete(key);
  2955. });
  2956. oldKeys.forEach(function (key) {
  2957. delete refs[key];
  2958. });
  2959. return refs;
  2960. }
  2961. function initRefs(vm) {
  2962. var mpInstance = vm.$scope;
  2963. var refs = {};
  2964. Object.defineProperty(vm, '$refs', {
  2965. get: function get() {
  2966. var $refs = {};
  2967. selectAllComponents(mpInstance, '.vue-ref', $refs);
  2968. // TODO 暂不考虑 for 中的 scoped
  2969. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  2970. forComponents.forEach(function (component) {
  2971. var ref = component.dataset.ref;
  2972. if (!$refs[ref]) {
  2973. $refs[ref] = [];
  2974. }
  2975. $refs[ref].push(component.$vm || toSkip(component));
  2976. });
  2977. return syncRefs(refs, $refs);
  2978. }
  2979. });
  2980. }
  2981. function handleLink(event) {
  2982. var _ref3 = event.detail || event.value,
  2983. vuePid = _ref3.vuePid,
  2984. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  2985. var parentVm;
  2986. if (vuePid) {
  2987. parentVm = findVmByVueId(this.$vm, vuePid);
  2988. }
  2989. if (!parentVm) {
  2990. parentVm = this.$vm;
  2991. }
  2992. vueOptions.parent = parentVm;
  2993. }
  2994. function markMPComponent(component) {
  2995. // 在 Vue 中标记为小程序组件
  2996. var IS_MP = '__v_isMPComponent';
  2997. Object.defineProperty(component, IS_MP, {
  2998. configurable: true,
  2999. enumerable: false,
  3000. value: true
  3001. });
  3002. return component;
  3003. }
  3004. function toSkip(obj) {
  3005. var OB = '__ob__';
  3006. var SKIP = '__v_skip';
  3007. if (isObject(obj) && Object.isExtensible(obj)) {
  3008. // 避免被 @vue/composition-api 观测
  3009. Object.defineProperty(obj, OB, {
  3010. configurable: true,
  3011. enumerable: false,
  3012. value: (0, _defineProperty2.default)({}, SKIP, true)
  3013. });
  3014. }
  3015. return obj;
  3016. }
  3017. var WORKLET_RE = /_(.*)_worklet_factory_/;
  3018. function initWorkletMethods(mpMethods, vueMethods) {
  3019. if (vueMethods) {
  3020. Object.keys(vueMethods).forEach(function (name) {
  3021. var matches = name.match(WORKLET_RE);
  3022. if (matches) {
  3023. var workletName = matches[1];
  3024. mpMethods[name] = vueMethods[name];
  3025. mpMethods[workletName] = vueMethods[workletName];
  3026. }
  3027. });
  3028. }
  3029. }
  3030. var MPPage = Page;
  3031. var MPComponent = Component;
  3032. var customizeRE = /:/g;
  3033. var customize = cached(function (str) {
  3034. return camelize(str.replace(customizeRE, '-'));
  3035. });
  3036. function initTriggerEvent(mpInstance) {
  3037. var oldTriggerEvent = mpInstance.triggerEvent;
  3038. var newTriggerEvent = function newTriggerEvent(event) {
  3039. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  3040. args[_key3 - 1] = arguments[_key3];
  3041. }
  3042. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  3043. if (this.$vm || this.dataset && this.dataset.comType) {
  3044. event = customize(event);
  3045. } else {
  3046. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  3047. var newEvent = customize(event);
  3048. if (newEvent !== event) {
  3049. oldTriggerEvent.apply(this, [newEvent].concat(args));
  3050. }
  3051. }
  3052. return oldTriggerEvent.apply(this, [event].concat(args));
  3053. };
  3054. try {
  3055. // 京东小程序 triggerEvent 为只读
  3056. mpInstance.triggerEvent = newTriggerEvent;
  3057. } catch (error) {
  3058. mpInstance._triggerEvent = newTriggerEvent;
  3059. }
  3060. }
  3061. function initHook(name, options, isComponent) {
  3062. var oldHook = options[name];
  3063. options[name] = function () {
  3064. markMPComponent(this);
  3065. initTriggerEvent(this);
  3066. if (oldHook) {
  3067. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  3068. args[_key4] = arguments[_key4];
  3069. }
  3070. return oldHook.apply(this, args);
  3071. }
  3072. };
  3073. }
  3074. if (!MPPage.__$wrappered) {
  3075. MPPage.__$wrappered = true;
  3076. Page = function Page() {
  3077. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3078. initHook('onLoad', options);
  3079. return MPPage(options);
  3080. };
  3081. Page.after = MPPage.after;
  3082. Component = function Component() {
  3083. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3084. initHook('created', options);
  3085. return MPComponent(options);
  3086. };
  3087. }
  3088. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  3089. function initMocks(vm, mocks) {
  3090. var mpInstance = vm.$mp[vm.mpType];
  3091. mocks.forEach(function (mock) {
  3092. if (hasOwn(mpInstance, mock)) {
  3093. vm[mock] = mpInstance[mock];
  3094. }
  3095. });
  3096. }
  3097. function hasHook(hook, vueOptions) {
  3098. if (!vueOptions) {
  3099. return true;
  3100. }
  3101. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  3102. return true;
  3103. }
  3104. vueOptions = vueOptions.default || vueOptions;
  3105. if (isFn(vueOptions)) {
  3106. if (isFn(vueOptions.extendOptions[hook])) {
  3107. return true;
  3108. }
  3109. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  3110. return true;
  3111. }
  3112. return false;
  3113. }
  3114. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  3115. return true;
  3116. }
  3117. var mixins = vueOptions.mixins;
  3118. if (Array.isArray(mixins)) {
  3119. return !!mixins.find(function (mixin) {
  3120. return hasHook(hook, mixin);
  3121. });
  3122. }
  3123. }
  3124. function initHooks(mpOptions, hooks, vueOptions) {
  3125. hooks.forEach(function (hook) {
  3126. if (hasHook(hook, vueOptions)) {
  3127. mpOptions[hook] = function (args) {
  3128. return this.$vm && this.$vm.__call_hook(hook, args);
  3129. };
  3130. }
  3131. });
  3132. }
  3133. function initUnknownHooks(mpOptions, vueOptions) {
  3134. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3135. findHooks(vueOptions).forEach(function (hook) {
  3136. return initHook$1(mpOptions, hook, excludes);
  3137. });
  3138. }
  3139. function findHooks(vueOptions) {
  3140. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  3141. if (vueOptions) {
  3142. Object.keys(vueOptions).forEach(function (name) {
  3143. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  3144. hooks.push(name);
  3145. }
  3146. });
  3147. }
  3148. return hooks;
  3149. }
  3150. function initHook$1(mpOptions, hook, excludes) {
  3151. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  3152. mpOptions[hook] = function (args) {
  3153. return this.$vm && this.$vm.__call_hook(hook, args);
  3154. };
  3155. }
  3156. }
  3157. function initVueComponent(Vue, vueOptions) {
  3158. vueOptions = vueOptions.default || vueOptions;
  3159. var VueComponent;
  3160. if (isFn(vueOptions)) {
  3161. VueComponent = vueOptions;
  3162. } else {
  3163. VueComponent = Vue.extend(vueOptions);
  3164. }
  3165. vueOptions = VueComponent.options;
  3166. return [VueComponent, vueOptions];
  3167. }
  3168. function initSlots(vm, vueSlots) {
  3169. if (Array.isArray(vueSlots) && vueSlots.length) {
  3170. var $slots = Object.create(null);
  3171. vueSlots.forEach(function (slotName) {
  3172. $slots[slotName] = true;
  3173. });
  3174. vm.$scopedSlots = vm.$slots = $slots;
  3175. }
  3176. }
  3177. function initVueIds(vueIds, mpInstance) {
  3178. vueIds = (vueIds || '').split(',');
  3179. var len = vueIds.length;
  3180. if (len === 1) {
  3181. mpInstance._$vueId = vueIds[0];
  3182. } else if (len === 2) {
  3183. mpInstance._$vueId = vueIds[0];
  3184. mpInstance._$vuePid = vueIds[1];
  3185. }
  3186. }
  3187. function initData(vueOptions, context) {
  3188. var data = vueOptions.data || {};
  3189. var methods = vueOptions.methods || {};
  3190. if (typeof data === 'function') {
  3191. try {
  3192. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  3193. } catch (e) {
  3194. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  3195. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  3196. }
  3197. }
  3198. } else {
  3199. try {
  3200. // 对 data 格式化
  3201. data = JSON.parse(JSON.stringify(data));
  3202. } catch (e) {}
  3203. }
  3204. if (!isPlainObject(data)) {
  3205. data = {};
  3206. }
  3207. Object.keys(methods).forEach(function (methodName) {
  3208. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  3209. data[methodName] = methods[methodName];
  3210. }
  3211. });
  3212. return data;
  3213. }
  3214. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  3215. function createObserver(name) {
  3216. return function observer(newVal, oldVal) {
  3217. if (this.$vm) {
  3218. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  3219. }
  3220. };
  3221. }
  3222. function initBehaviors(vueOptions, initBehavior) {
  3223. var vueBehaviors = vueOptions.behaviors;
  3224. var vueExtends = vueOptions.extends;
  3225. var vueMixins = vueOptions.mixins;
  3226. var vueProps = vueOptions.props;
  3227. if (!vueProps) {
  3228. vueOptions.props = vueProps = [];
  3229. }
  3230. var behaviors = [];
  3231. if (Array.isArray(vueBehaviors)) {
  3232. vueBehaviors.forEach(function (behavior) {
  3233. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  3234. if (behavior === 'uni://form-field') {
  3235. if (Array.isArray(vueProps)) {
  3236. vueProps.push('name');
  3237. vueProps.push('value');
  3238. } else {
  3239. vueProps.name = {
  3240. type: String,
  3241. default: ''
  3242. };
  3243. vueProps.value = {
  3244. type: [String, Number, Boolean, Array, Object, Date],
  3245. default: ''
  3246. };
  3247. }
  3248. }
  3249. });
  3250. }
  3251. if (isPlainObject(vueExtends) && vueExtends.props) {
  3252. behaviors.push(initBehavior({
  3253. properties: initProperties(vueExtends.props, true)
  3254. }));
  3255. }
  3256. if (Array.isArray(vueMixins)) {
  3257. vueMixins.forEach(function (vueMixin) {
  3258. if (isPlainObject(vueMixin) && vueMixin.props) {
  3259. behaviors.push(initBehavior({
  3260. properties: initProperties(vueMixin.props, true)
  3261. }));
  3262. }
  3263. });
  3264. }
  3265. return behaviors;
  3266. }
  3267. function parsePropType(key, type, defaultValue, file) {
  3268. // [String]=>String
  3269. if (Array.isArray(type) && type.length === 1) {
  3270. return type[0];
  3271. }
  3272. return type;
  3273. }
  3274. function initProperties(props) {
  3275. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3276. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  3277. var options = arguments.length > 3 ? arguments[3] : undefined;
  3278. var properties = {};
  3279. if (!isBehavior) {
  3280. properties.vueId = {
  3281. type: String,
  3282. value: ''
  3283. };
  3284. {
  3285. if (options.virtualHost) {
  3286. properties.virtualHostStyle = {
  3287. type: null,
  3288. value: ''
  3289. };
  3290. properties.virtualHostClass = {
  3291. type: null,
  3292. value: ''
  3293. };
  3294. }
  3295. }
  3296. // scopedSlotsCompiler auto
  3297. properties.scopedSlotsCompiler = {
  3298. type: String,
  3299. value: ''
  3300. };
  3301. properties.vueSlots = {
  3302. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  3303. type: null,
  3304. value: [],
  3305. observer: function observer(newVal, oldVal) {
  3306. var $slots = Object.create(null);
  3307. newVal.forEach(function (slotName) {
  3308. $slots[slotName] = true;
  3309. });
  3310. this.setData({
  3311. $slots: $slots
  3312. });
  3313. }
  3314. };
  3315. }
  3316. if (Array.isArray(props)) {
  3317. // ['title']
  3318. props.forEach(function (key) {
  3319. properties[key] = {
  3320. type: null,
  3321. observer: createObserver(key)
  3322. };
  3323. });
  3324. } else if (isPlainObject(props)) {
  3325. // {title:{type:String,default:''},content:String}
  3326. Object.keys(props).forEach(function (key) {
  3327. var opts = props[key];
  3328. if (isPlainObject(opts)) {
  3329. // title:{type:String,default:''}
  3330. var value = opts.default;
  3331. if (isFn(value)) {
  3332. value = value();
  3333. }
  3334. opts.type = parsePropType(key, opts.type);
  3335. properties[key] = {
  3336. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  3337. value: value,
  3338. observer: createObserver(key)
  3339. };
  3340. } else {
  3341. // content:String
  3342. var type = parsePropType(key, opts);
  3343. properties[key] = {
  3344. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  3345. observer: createObserver(key)
  3346. };
  3347. }
  3348. });
  3349. }
  3350. return properties;
  3351. }
  3352. function wrapper$1(event) {
  3353. // TODO 又得兼容 mpvue 的 mp 对象
  3354. try {
  3355. event.mp = JSON.parse(JSON.stringify(event));
  3356. } catch (e) {}
  3357. event.stopPropagation = noop;
  3358. event.preventDefault = noop;
  3359. event.target = event.target || {};
  3360. if (!hasOwn(event, 'detail')) {
  3361. event.detail = {};
  3362. }
  3363. if (hasOwn(event, 'markerId')) {
  3364. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  3365. event.detail.markerId = event.markerId;
  3366. }
  3367. if (isPlainObject(event.detail)) {
  3368. event.target = Object.assign({}, event.target, event.detail);
  3369. }
  3370. return event;
  3371. }
  3372. function getExtraValue(vm, dataPathsArray) {
  3373. var context = vm;
  3374. dataPathsArray.forEach(function (dataPathArray) {
  3375. var dataPath = dataPathArray[0];
  3376. var value = dataPathArray[2];
  3377. if (dataPath || typeof value !== 'undefined') {
  3378. // ['','',index,'disable']
  3379. var propPath = dataPathArray[1];
  3380. var valuePath = dataPathArray[3];
  3381. var vFor;
  3382. if (Number.isInteger(dataPath)) {
  3383. vFor = dataPath;
  3384. } else if (!dataPath) {
  3385. vFor = context;
  3386. } else if (typeof dataPath === 'string' && dataPath) {
  3387. if (dataPath.indexOf('#s#') === 0) {
  3388. vFor = dataPath.substr(3);
  3389. } else {
  3390. vFor = vm.__get_value(dataPath, context);
  3391. }
  3392. }
  3393. if (Number.isInteger(vFor)) {
  3394. context = value;
  3395. } else if (!propPath) {
  3396. context = vFor[value];
  3397. } else {
  3398. if (Array.isArray(vFor)) {
  3399. context = vFor.find(function (vForItem) {
  3400. return vm.__get_value(propPath, vForItem) === value;
  3401. });
  3402. } else if (isPlainObject(vFor)) {
  3403. context = Object.keys(vFor).find(function (vForKey) {
  3404. return vm.__get_value(propPath, vFor[vForKey]) === value;
  3405. });
  3406. } else {
  3407. console.error('v-for 暂不支持循环数据:', vFor);
  3408. }
  3409. }
  3410. if (valuePath) {
  3411. context = vm.__get_value(valuePath, context);
  3412. }
  3413. }
  3414. });
  3415. return context;
  3416. }
  3417. function processEventExtra(vm, extra, event, __args__) {
  3418. var extraObj = {};
  3419. if (Array.isArray(extra) && extra.length) {
  3420. /**
  3421. *[
  3422. * ['data.items', 'data.id', item.data.id],
  3423. * ['metas', 'id', meta.id]
  3424. *],
  3425. *[
  3426. * ['data.items', 'data.id', item.data.id],
  3427. * ['metas', 'id', meta.id]
  3428. *],
  3429. *'test'
  3430. */
  3431. extra.forEach(function (dataPath, index) {
  3432. if (typeof dataPath === 'string') {
  3433. if (!dataPath) {
  3434. // model,prop.sync
  3435. extraObj['$' + index] = vm;
  3436. } else {
  3437. if (dataPath === '$event') {
  3438. // $event
  3439. extraObj['$' + index] = event;
  3440. } else if (dataPath === 'arguments') {
  3441. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  3442. } else if (dataPath.indexOf('$event.') === 0) {
  3443. // $event.target.value
  3444. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  3445. } else {
  3446. extraObj['$' + index] = vm.__get_value(dataPath);
  3447. }
  3448. }
  3449. } else {
  3450. extraObj['$' + index] = getExtraValue(vm, dataPath);
  3451. }
  3452. });
  3453. }
  3454. return extraObj;
  3455. }
  3456. function getObjByArray(arr) {
  3457. var obj = {};
  3458. for (var i = 1; i < arr.length; i++) {
  3459. var element = arr[i];
  3460. obj[element[0]] = element[1];
  3461. }
  3462. return obj;
  3463. }
  3464. function processEventArgs(vm, event) {
  3465. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3466. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  3467. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  3468. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  3469. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  3470. // fixed 用户直接触发 mpInstance.triggerEvent
  3471. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  3472. if (isCustom) {
  3473. // 自定义事件
  3474. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  3475. if (!args.length) {
  3476. // 无参数,直接传入 event 或 detail 数组
  3477. if (isCustomMPEvent) {
  3478. return [event];
  3479. }
  3480. return __args__;
  3481. }
  3482. }
  3483. var extraObj = processEventExtra(vm, extra, event, __args__);
  3484. var ret = [];
  3485. args.forEach(function (arg) {
  3486. if (arg === '$event') {
  3487. if (methodName === '__set_model' && !isCustom) {
  3488. // input v-model value
  3489. ret.push(event.target.value);
  3490. } else {
  3491. if (isCustom && !isCustomMPEvent) {
  3492. ret.push(__args__[0]);
  3493. } else {
  3494. // wxcomponent 组件或内置组件
  3495. ret.push(event);
  3496. }
  3497. }
  3498. } else {
  3499. if (Array.isArray(arg) && arg[0] === 'o') {
  3500. ret.push(getObjByArray(arg));
  3501. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  3502. ret.push(extraObj[arg]);
  3503. } else {
  3504. ret.push(arg);
  3505. }
  3506. }
  3507. });
  3508. return ret;
  3509. }
  3510. var ONCE = '~';
  3511. var CUSTOM = '^';
  3512. function isMatchEventType(eventType, optType) {
  3513. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  3514. }
  3515. function getContextVm(vm) {
  3516. var $parent = vm.$parent;
  3517. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  3518. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  3519. $parent = $parent.$parent;
  3520. }
  3521. return $parent && $parent.$parent;
  3522. }
  3523. function handleEvent(event) {
  3524. var _this2 = this;
  3525. event = wrapper$1(event);
  3526. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  3527. var dataset = (event.currentTarget || event.target).dataset;
  3528. if (!dataset) {
  3529. return console.warn('事件信息不存在');
  3530. }
  3531. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  3532. if (!eventOpts) {
  3533. return console.warn('事件信息不存在');
  3534. }
  3535. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  3536. var eventType = event.type;
  3537. var ret = [];
  3538. eventOpts.forEach(function (eventOpt) {
  3539. var type = eventOpt[0];
  3540. var eventsArray = eventOpt[1];
  3541. var isCustom = type.charAt(0) === CUSTOM;
  3542. type = isCustom ? type.slice(1) : type;
  3543. var isOnce = type.charAt(0) === ONCE;
  3544. type = isOnce ? type.slice(1) : type;
  3545. if (eventsArray && isMatchEventType(eventType, type)) {
  3546. eventsArray.forEach(function (eventArray) {
  3547. var methodName = eventArray[0];
  3548. if (methodName) {
  3549. var handlerCtx = _this2.$vm;
  3550. if (handlerCtx.$options.generic) {
  3551. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  3552. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  3553. }
  3554. if (methodName === '$emit') {
  3555. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  3556. return;
  3557. }
  3558. var handler = handlerCtx[methodName];
  3559. if (!isFn(handler)) {
  3560. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  3561. var path = _this2.route || _this2.is;
  3562. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  3563. }
  3564. if (isOnce) {
  3565. if (handler.once) {
  3566. return;
  3567. }
  3568. handler.once = true;
  3569. }
  3570. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  3571. params = Array.isArray(params) ? params : [];
  3572. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  3573. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  3574. // eslint-disable-next-line no-sparse-arrays
  3575. params = params.concat([,,,,,,,,,, event]);
  3576. }
  3577. ret.push(handler.apply(handlerCtx, params));
  3578. }
  3579. });
  3580. }
  3581. });
  3582. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  3583. return ret[0];
  3584. }
  3585. }
  3586. var eventChannels = {};
  3587. function getEventChannel(id) {
  3588. var eventChannel = eventChannels[id];
  3589. delete eventChannels[id];
  3590. return eventChannel;
  3591. }
  3592. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  3593. function initEventChannel() {
  3594. _vue.default.prototype.getOpenerEventChannel = function () {
  3595. // 微信小程序使用自身getOpenerEventChannel
  3596. {
  3597. return this.$scope.getOpenerEventChannel();
  3598. }
  3599. };
  3600. var callHook = _vue.default.prototype.__call_hook;
  3601. _vue.default.prototype.__call_hook = function (hook, args) {
  3602. if (hook === 'onLoad' && args && args.__id__) {
  3603. this.__eventChannel__ = getEventChannel(args.__id__);
  3604. delete args.__id__;
  3605. }
  3606. return callHook.call(this, hook, args);
  3607. };
  3608. }
  3609. function initScopedSlotsParams() {
  3610. var center = {};
  3611. var parents = {};
  3612. function currentId(fn) {
  3613. var vueIds = this.$options.propsData.vueId;
  3614. if (vueIds) {
  3615. var vueId = vueIds.split(',')[0];
  3616. fn(vueId);
  3617. }
  3618. }
  3619. _vue.default.prototype.$hasSSP = function (vueId) {
  3620. var slot = center[vueId];
  3621. if (!slot) {
  3622. parents[vueId] = this;
  3623. this.$on('hook:destroyed', function () {
  3624. delete parents[vueId];
  3625. });
  3626. }
  3627. return slot;
  3628. };
  3629. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  3630. var slot = center[vueId];
  3631. if (slot) {
  3632. var params = slot[name] || [];
  3633. if (needAll) {
  3634. return params;
  3635. }
  3636. return params[0];
  3637. }
  3638. };
  3639. _vue.default.prototype.$setSSP = function (name, value) {
  3640. var index = 0;
  3641. currentId.call(this, function (vueId) {
  3642. var slot = center[vueId];
  3643. var params = slot[name] = slot[name] || [];
  3644. params.push(value);
  3645. index = params.length - 1;
  3646. });
  3647. return index;
  3648. };
  3649. _vue.default.prototype.$initSSP = function () {
  3650. currentId.call(this, function (vueId) {
  3651. center[vueId] = {};
  3652. });
  3653. };
  3654. _vue.default.prototype.$callSSP = function () {
  3655. currentId.call(this, function (vueId) {
  3656. if (parents[vueId]) {
  3657. parents[vueId].$forceUpdate();
  3658. }
  3659. });
  3660. };
  3661. _vue.default.mixin({
  3662. destroyed: function destroyed() {
  3663. var propsData = this.$options.propsData;
  3664. var vueId = propsData && propsData.vueId;
  3665. if (vueId) {
  3666. delete center[vueId];
  3667. delete parents[vueId];
  3668. }
  3669. }
  3670. });
  3671. }
  3672. function parseBaseApp(vm, _ref4) {
  3673. var mocks = _ref4.mocks,
  3674. initRefs = _ref4.initRefs;
  3675. initEventChannel();
  3676. {
  3677. initScopedSlotsParams();
  3678. }
  3679. if (vm.$options.store) {
  3680. _vue.default.prototype.$store = vm.$options.store;
  3681. }
  3682. uniIdMixin(_vue.default);
  3683. _vue.default.prototype.mpHost = "mp-weixin";
  3684. _vue.default.mixin({
  3685. beforeCreate: function beforeCreate() {
  3686. if (!this.$options.mpType) {
  3687. return;
  3688. }
  3689. this.mpType = this.$options.mpType;
  3690. this.$mp = (0, _defineProperty2.default)({
  3691. data: {}
  3692. }, this.mpType, this.$options.mpInstance);
  3693. this.$scope = this.$options.mpInstance;
  3694. delete this.$options.mpType;
  3695. delete this.$options.mpInstance;
  3696. if (this.mpType === 'page' && typeof getApp === 'function') {
  3697. // hack vue-i18n
  3698. var app = getApp();
  3699. if (app.$vm && app.$vm.$i18n) {
  3700. this._i18n = app.$vm.$i18n;
  3701. }
  3702. }
  3703. if (this.mpType !== 'app') {
  3704. initRefs(this);
  3705. initMocks(this, mocks);
  3706. }
  3707. }
  3708. });
  3709. var appOptions = {
  3710. onLaunch: function onLaunch(args) {
  3711. if (this.$vm) {
  3712. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  3713. return;
  3714. }
  3715. {
  3716. if (wx.canIUse && !wx.canIUse('nextTick')) {
  3717. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  3718. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  3719. }
  3720. }
  3721. this.$vm = vm;
  3722. this.$vm.$mp = {
  3723. app: this
  3724. };
  3725. this.$vm.$scope = this;
  3726. // vm 上也挂载 globalData
  3727. this.$vm.globalData = this.globalData;
  3728. this.$vm._isMounted = true;
  3729. this.$vm.__call_hook('mounted', args);
  3730. this.$vm.__call_hook('onLaunch', args);
  3731. }
  3732. };
  3733. // 兼容旧版本 globalData
  3734. appOptions.globalData = vm.$options.globalData || {};
  3735. // 将 methods 中的方法挂在 getApp() 中
  3736. var methods = vm.$options.methods;
  3737. if (methods) {
  3738. Object.keys(methods).forEach(function (name) {
  3739. appOptions[name] = methods[name];
  3740. });
  3741. }
  3742. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  3743. initHooks(appOptions, hooks);
  3744. initUnknownHooks(appOptions, vm.$options);
  3745. return appOptions;
  3746. }
  3747. function parseApp(vm) {
  3748. return parseBaseApp(vm, {
  3749. mocks: mocks,
  3750. initRefs: initRefs
  3751. });
  3752. }
  3753. function createApp(vm) {
  3754. App(parseApp(vm));
  3755. return vm;
  3756. }
  3757. var encodeReserveRE = /[!'()*]/g;
  3758. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  3759. return '%' + c.charCodeAt(0).toString(16);
  3760. };
  3761. var commaRE = /%2C/g;
  3762. // fixed encodeURIComponent which is more conformant to RFC3986:
  3763. // - escapes [!'()*]
  3764. // - preserve commas
  3765. var encode = function encode(str) {
  3766. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  3767. };
  3768. function stringifyQuery(obj) {
  3769. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  3770. var res = obj ? Object.keys(obj).map(function (key) {
  3771. var val = obj[key];
  3772. if (val === undefined) {
  3773. return '';
  3774. }
  3775. if (val === null) {
  3776. return encodeStr(key);
  3777. }
  3778. if (Array.isArray(val)) {
  3779. var result = [];
  3780. val.forEach(function (val2) {
  3781. if (val2 === undefined) {
  3782. return;
  3783. }
  3784. if (val2 === null) {
  3785. result.push(encodeStr(key));
  3786. } else {
  3787. result.push(encodeStr(key) + '=' + encodeStr(val2));
  3788. }
  3789. });
  3790. return result.join('&');
  3791. }
  3792. return encodeStr(key) + '=' + encodeStr(val);
  3793. }).filter(function (x) {
  3794. return x.length > 0;
  3795. }).join('&') : null;
  3796. return res ? "?".concat(res) : '';
  3797. }
  3798. function parseBaseComponent(vueComponentOptions) {
  3799. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  3800. isPage = _ref5.isPage,
  3801. initRelation = _ref5.initRelation;
  3802. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  3803. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  3804. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  3805. VueComponent = _initVueComponent2[0],
  3806. vueOptions = _initVueComponent2[1];
  3807. var options = _objectSpread({
  3808. multipleSlots: true,
  3809. // styleIsolation: 'apply-shared',
  3810. addGlobalClass: true
  3811. }, vueOptions.options || {});
  3812. {
  3813. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  3814. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  3815. Object.assign(options, vueOptions['mp-weixin'].options);
  3816. }
  3817. }
  3818. var componentOptions = {
  3819. options: options,
  3820. data: initData(vueOptions, _vue.default.prototype),
  3821. behaviors: initBehaviors(vueOptions, initBehavior),
  3822. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  3823. lifetimes: {
  3824. attached: function attached() {
  3825. var properties = this.properties;
  3826. var options = {
  3827. mpType: isPage.call(this) ? 'page' : 'component',
  3828. mpInstance: this,
  3829. propsData: properties
  3830. };
  3831. initVueIds(properties.vueId, this);
  3832. // 处理父子关系
  3833. initRelation.call(this, {
  3834. vuePid: this._$vuePid,
  3835. vueOptions: options
  3836. });
  3837. // 初始化 vue 实例
  3838. this.$vm = new VueComponent(options);
  3839. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  3840. initSlots(this.$vm, properties.vueSlots);
  3841. // 触发首次 setData
  3842. this.$vm.$mount();
  3843. },
  3844. ready: function ready() {
  3845. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  3846. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  3847. if (this.$vm) {
  3848. this.$vm._isMounted = true;
  3849. this.$vm.__call_hook('mounted');
  3850. this.$vm.__call_hook('onReady');
  3851. }
  3852. },
  3853. detached: function detached() {
  3854. this.$vm && this.$vm.$destroy();
  3855. }
  3856. },
  3857. pageLifetimes: {
  3858. show: function show(args) {
  3859. this.$vm && this.$vm.__call_hook('onPageShow', args);
  3860. },
  3861. hide: function hide() {
  3862. this.$vm && this.$vm.__call_hook('onPageHide');
  3863. },
  3864. resize: function resize(size) {
  3865. this.$vm && this.$vm.__call_hook('onPageResize', size);
  3866. }
  3867. },
  3868. methods: {
  3869. __l: handleLink,
  3870. __e: handleEvent
  3871. }
  3872. };
  3873. // externalClasses
  3874. if (vueOptions.externalClasses) {
  3875. componentOptions.externalClasses = vueOptions.externalClasses;
  3876. }
  3877. if (Array.isArray(vueOptions.wxsCallMethods)) {
  3878. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  3879. componentOptions.methods[callMethod] = function (args) {
  3880. return this.$vm[callMethod](args);
  3881. };
  3882. });
  3883. }
  3884. if (needVueOptions) {
  3885. return [componentOptions, vueOptions, VueComponent];
  3886. }
  3887. if (isPage) {
  3888. return componentOptions;
  3889. }
  3890. return [componentOptions, VueComponent];
  3891. }
  3892. function parseComponent(vueComponentOptions, needVueOptions) {
  3893. return parseBaseComponent(vueComponentOptions, {
  3894. isPage: isPage,
  3895. initRelation: initRelation
  3896. }, needVueOptions);
  3897. }
  3898. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  3899. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  3900. function parseBasePage(vuePageOptions) {
  3901. var _parseComponent = parseComponent(vuePageOptions, true),
  3902. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  3903. pageOptions = _parseComponent2[0],
  3904. vueOptions = _parseComponent2[1];
  3905. initHooks(pageOptions.methods, hooks$1, vueOptions);
  3906. pageOptions.methods.onLoad = function (query) {
  3907. this.options = query;
  3908. var copyQuery = Object.assign({}, query);
  3909. delete copyQuery.__id__;
  3910. this.$page = {
  3911. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  3912. };
  3913. this.$vm.$mp.query = query; // 兼容 mpvue
  3914. this.$vm.__call_hook('onLoad', query);
  3915. };
  3916. {
  3917. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  3918. }
  3919. {
  3920. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  3921. }
  3922. return pageOptions;
  3923. }
  3924. function parsePage(vuePageOptions) {
  3925. return parseBasePage(vuePageOptions);
  3926. }
  3927. function createPage(vuePageOptions) {
  3928. {
  3929. return Component(parsePage(vuePageOptions));
  3930. }
  3931. }
  3932. function createComponent(vueOptions) {
  3933. {
  3934. return Component(parseComponent(vueOptions));
  3935. }
  3936. }
  3937. function createSubpackageApp(vm) {
  3938. var appOptions = parseApp(vm);
  3939. var app = getApp({
  3940. allowDefault: true
  3941. });
  3942. vm.$scope = app;
  3943. var globalData = app.globalData;
  3944. if (globalData) {
  3945. Object.keys(appOptions.globalData).forEach(function (name) {
  3946. if (!hasOwn(globalData, name)) {
  3947. globalData[name] = appOptions.globalData[name];
  3948. }
  3949. });
  3950. }
  3951. Object.keys(appOptions).forEach(function (name) {
  3952. if (!hasOwn(app, name)) {
  3953. app[name] = appOptions[name];
  3954. }
  3955. });
  3956. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3957. wx.onAppShow(function () {
  3958. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  3959. args[_key5] = arguments[_key5];
  3960. }
  3961. vm.__call_hook('onShow', args);
  3962. });
  3963. }
  3964. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3965. wx.onAppHide(function () {
  3966. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  3967. args[_key6] = arguments[_key6];
  3968. }
  3969. vm.__call_hook('onHide', args);
  3970. });
  3971. }
  3972. if (isFn(appOptions.onLaunch)) {
  3973. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3974. vm.__call_hook('onLaunch', args);
  3975. }
  3976. return vm;
  3977. }
  3978. function createPlugin(vm) {
  3979. var appOptions = parseApp(vm);
  3980. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3981. wx.onAppShow(function () {
  3982. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  3983. args[_key7] = arguments[_key7];
  3984. }
  3985. vm.__call_hook('onShow', args);
  3986. });
  3987. }
  3988. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3989. wx.onAppHide(function () {
  3990. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  3991. args[_key8] = arguments[_key8];
  3992. }
  3993. vm.__call_hook('onHide', args);
  3994. });
  3995. }
  3996. if (isFn(appOptions.onLaunch)) {
  3997. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3998. vm.__call_hook('onLaunch', args);
  3999. }
  4000. return vm;
  4001. }
  4002. todos.forEach(function (todoApi) {
  4003. protocols[todoApi] = false;
  4004. });
  4005. canIUses.forEach(function (canIUseApi) {
  4006. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  4007. if (!wx.canIUse(apiName)) {
  4008. protocols[canIUseApi] = false;
  4009. }
  4010. });
  4011. var uni = {};
  4012. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  4013. uni = new Proxy({}, {
  4014. get: function get(target, name) {
  4015. if (hasOwn(target, name)) {
  4016. return target[name];
  4017. }
  4018. if (baseApi[name]) {
  4019. return baseApi[name];
  4020. }
  4021. if (api[name]) {
  4022. return promisify(name, api[name]);
  4023. }
  4024. {
  4025. if (extraApi[name]) {
  4026. return promisify(name, extraApi[name]);
  4027. }
  4028. if (todoApis[name]) {
  4029. return promisify(name, todoApis[name]);
  4030. }
  4031. }
  4032. if (eventApi[name]) {
  4033. return eventApi[name];
  4034. }
  4035. return promisify(name, wrapper(name, wx[name]));
  4036. },
  4037. set: function set(target, name, value) {
  4038. target[name] = value;
  4039. return true;
  4040. }
  4041. });
  4042. } else {
  4043. Object.keys(baseApi).forEach(function (name) {
  4044. uni[name] = baseApi[name];
  4045. });
  4046. {
  4047. Object.keys(todoApis).forEach(function (name) {
  4048. uni[name] = promisify(name, todoApis[name]);
  4049. });
  4050. Object.keys(extraApi).forEach(function (name) {
  4051. uni[name] = promisify(name, extraApi[name]);
  4052. });
  4053. }
  4054. Object.keys(eventApi).forEach(function (name) {
  4055. uni[name] = eventApi[name];
  4056. });
  4057. Object.keys(api).forEach(function (name) {
  4058. uni[name] = promisify(name, api[name]);
  4059. });
  4060. Object.keys(wx).forEach(function (name) {
  4061. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  4062. uni[name] = promisify(name, wrapper(name, wx[name]));
  4063. }
  4064. });
  4065. }
  4066. wx.createApp = createApp;
  4067. wx.createPage = createPage;
  4068. wx.createComponent = createComponent;
  4069. wx.createSubpackageApp = createSubpackageApp;
  4070. wx.createPlugin = createPlugin;
  4071. var uni$1 = uni;
  4072. var _default = uni$1;
  4073. exports.default = _default;
  4074. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  4075. /***/ }),
  4076. /***/ 20:
  4077. /*!****************************************************************!*\
  4078. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  4079. \****************************************************************/
  4080. /*! no static exports found */
  4081. /***/ (function(module, exports) {
  4082. function _iterableToArray(iter) {
  4083. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  4084. }
  4085. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4086. /***/ }),
  4087. /***/ 21:
  4088. /*!******************************************************************!*\
  4089. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  4090. \******************************************************************/
  4091. /*! no static exports found */
  4092. /***/ (function(module, exports) {
  4093. function _nonIterableSpread() {
  4094. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  4095. }
  4096. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4097. /***/ }),
  4098. /***/ 22:
  4099. /*!*************************************************************!*\
  4100. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  4101. \*************************************************************/
  4102. /*! no static exports found */
  4103. /***/ (function(module, exports, __webpack_require__) {
  4104. "use strict";
  4105. /* WEBPACK VAR INJECTION */(function(uni, global) {
  4106. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  4107. Object.defineProperty(exports, "__esModule", {
  4108. value: true
  4109. });
  4110. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  4111. exports.compileI18nJsonStr = compileI18nJsonStr;
  4112. exports.hasI18nJson = hasI18nJson;
  4113. exports.initVueI18n = initVueI18n;
  4114. exports.isI18nStr = isI18nStr;
  4115. exports.isString = void 0;
  4116. exports.normalizeLocale = normalizeLocale;
  4117. exports.parseI18nJson = parseI18nJson;
  4118. exports.resolveLocale = resolveLocale;
  4119. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  4120. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  4121. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  4122. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  4123. var isObject = function isObject(val) {
  4124. return val !== null && (0, _typeof2.default)(val) === 'object';
  4125. };
  4126. var defaultDelimiters = ['{', '}'];
  4127. var BaseFormatter = /*#__PURE__*/function () {
  4128. function BaseFormatter() {
  4129. (0, _classCallCheck2.default)(this, BaseFormatter);
  4130. this._caches = Object.create(null);
  4131. }
  4132. (0, _createClass2.default)(BaseFormatter, [{
  4133. key: "interpolate",
  4134. value: function interpolate(message, values) {
  4135. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  4136. if (!values) {
  4137. return [message];
  4138. }
  4139. var tokens = this._caches[message];
  4140. if (!tokens) {
  4141. tokens = parse(message, delimiters);
  4142. this._caches[message] = tokens;
  4143. }
  4144. return compile(tokens, values);
  4145. }
  4146. }]);
  4147. return BaseFormatter;
  4148. }();
  4149. exports.Formatter = BaseFormatter;
  4150. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  4151. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  4152. function parse(format, _ref) {
  4153. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  4154. startDelimiter = _ref2[0],
  4155. endDelimiter = _ref2[1];
  4156. var tokens = [];
  4157. var position = 0;
  4158. var text = '';
  4159. while (position < format.length) {
  4160. var char = format[position++];
  4161. if (char === startDelimiter) {
  4162. if (text) {
  4163. tokens.push({
  4164. type: 'text',
  4165. value: text
  4166. });
  4167. }
  4168. text = '';
  4169. var sub = '';
  4170. char = format[position++];
  4171. while (char !== undefined && char !== endDelimiter) {
  4172. sub += char;
  4173. char = format[position++];
  4174. }
  4175. var isClosed = char === endDelimiter;
  4176. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  4177. tokens.push({
  4178. value: sub,
  4179. type: type
  4180. });
  4181. }
  4182. // else if (char === '%') {
  4183. // // when found rails i18n syntax, skip text capture
  4184. // if (format[position] !== '{') {
  4185. // text += char
  4186. // }
  4187. // }
  4188. else {
  4189. text += char;
  4190. }
  4191. }
  4192. text && tokens.push({
  4193. type: 'text',
  4194. value: text
  4195. });
  4196. return tokens;
  4197. }
  4198. function compile(tokens, values) {
  4199. var compiled = [];
  4200. var index = 0;
  4201. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  4202. if (mode === 'unknown') {
  4203. return compiled;
  4204. }
  4205. while (index < tokens.length) {
  4206. var token = tokens[index];
  4207. switch (token.type) {
  4208. case 'text':
  4209. compiled.push(token.value);
  4210. break;
  4211. case 'list':
  4212. compiled.push(values[parseInt(token.value, 10)]);
  4213. break;
  4214. case 'named':
  4215. if (mode === 'named') {
  4216. compiled.push(values[token.value]);
  4217. } else {
  4218. if (true) {
  4219. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  4220. }
  4221. }
  4222. break;
  4223. case 'unknown':
  4224. if (true) {
  4225. console.warn("Detect 'unknown' type of token!");
  4226. }
  4227. break;
  4228. }
  4229. index++;
  4230. }
  4231. return compiled;
  4232. }
  4233. var LOCALE_ZH_HANS = 'zh-Hans';
  4234. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  4235. var LOCALE_ZH_HANT = 'zh-Hant';
  4236. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  4237. var LOCALE_EN = 'en';
  4238. exports.LOCALE_EN = LOCALE_EN;
  4239. var LOCALE_FR = 'fr';
  4240. exports.LOCALE_FR = LOCALE_FR;
  4241. var LOCALE_ES = 'es';
  4242. exports.LOCALE_ES = LOCALE_ES;
  4243. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4244. var hasOwn = function hasOwn(val, key) {
  4245. return hasOwnProperty.call(val, key);
  4246. };
  4247. var defaultFormatter = new BaseFormatter();
  4248. function include(str, parts) {
  4249. return !!parts.find(function (part) {
  4250. return str.indexOf(part) !== -1;
  4251. });
  4252. }
  4253. function startsWith(str, parts) {
  4254. return parts.find(function (part) {
  4255. return str.indexOf(part) === 0;
  4256. });
  4257. }
  4258. function normalizeLocale(locale, messages) {
  4259. if (!locale) {
  4260. return;
  4261. }
  4262. locale = locale.trim().replace(/_/g, '-');
  4263. if (messages && messages[locale]) {
  4264. return locale;
  4265. }
  4266. locale = locale.toLowerCase();
  4267. if (locale === 'chinese') {
  4268. // 支付宝
  4269. return LOCALE_ZH_HANS;
  4270. }
  4271. if (locale.indexOf('zh') === 0) {
  4272. if (locale.indexOf('-hans') > -1) {
  4273. return LOCALE_ZH_HANS;
  4274. }
  4275. if (locale.indexOf('-hant') > -1) {
  4276. return LOCALE_ZH_HANT;
  4277. }
  4278. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  4279. return LOCALE_ZH_HANT;
  4280. }
  4281. return LOCALE_ZH_HANS;
  4282. }
  4283. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  4284. if (messages && Object.keys(messages).length > 0) {
  4285. locales = Object.keys(messages);
  4286. }
  4287. var lang = startsWith(locale, locales);
  4288. if (lang) {
  4289. return lang;
  4290. }
  4291. }
  4292. var I18n = /*#__PURE__*/function () {
  4293. function I18n(_ref3) {
  4294. var locale = _ref3.locale,
  4295. fallbackLocale = _ref3.fallbackLocale,
  4296. messages = _ref3.messages,
  4297. watcher = _ref3.watcher,
  4298. formater = _ref3.formater;
  4299. (0, _classCallCheck2.default)(this, I18n);
  4300. this.locale = LOCALE_EN;
  4301. this.fallbackLocale = LOCALE_EN;
  4302. this.message = {};
  4303. this.messages = {};
  4304. this.watchers = [];
  4305. if (fallbackLocale) {
  4306. this.fallbackLocale = fallbackLocale;
  4307. }
  4308. this.formater = formater || defaultFormatter;
  4309. this.messages = messages || {};
  4310. this.setLocale(locale || LOCALE_EN);
  4311. if (watcher) {
  4312. this.watchLocale(watcher);
  4313. }
  4314. }
  4315. (0, _createClass2.default)(I18n, [{
  4316. key: "setLocale",
  4317. value: function setLocale(locale) {
  4318. var _this = this;
  4319. var oldLocale = this.locale;
  4320. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  4321. if (!this.messages[this.locale]) {
  4322. // 可能初始化时不存在
  4323. this.messages[this.locale] = {};
  4324. }
  4325. this.message = this.messages[this.locale];
  4326. // 仅发生变化时,通知
  4327. if (oldLocale !== this.locale) {
  4328. this.watchers.forEach(function (watcher) {
  4329. watcher(_this.locale, oldLocale);
  4330. });
  4331. }
  4332. }
  4333. }, {
  4334. key: "getLocale",
  4335. value: function getLocale() {
  4336. return this.locale;
  4337. }
  4338. }, {
  4339. key: "watchLocale",
  4340. value: function watchLocale(fn) {
  4341. var _this2 = this;
  4342. var index = this.watchers.push(fn) - 1;
  4343. return function () {
  4344. _this2.watchers.splice(index, 1);
  4345. };
  4346. }
  4347. }, {
  4348. key: "add",
  4349. value: function add(locale, message) {
  4350. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4351. var curMessages = this.messages[locale];
  4352. if (curMessages) {
  4353. if (override) {
  4354. Object.assign(curMessages, message);
  4355. } else {
  4356. Object.keys(message).forEach(function (key) {
  4357. if (!hasOwn(curMessages, key)) {
  4358. curMessages[key] = message[key];
  4359. }
  4360. });
  4361. }
  4362. } else {
  4363. this.messages[locale] = message;
  4364. }
  4365. }
  4366. }, {
  4367. key: "f",
  4368. value: function f(message, values, delimiters) {
  4369. return this.formater.interpolate(message, values, delimiters).join('');
  4370. }
  4371. }, {
  4372. key: "t",
  4373. value: function t(key, locale, values) {
  4374. var message = this.message;
  4375. if (typeof locale === 'string') {
  4376. locale = normalizeLocale(locale, this.messages);
  4377. locale && (message = this.messages[locale]);
  4378. } else {
  4379. values = locale;
  4380. }
  4381. if (!hasOwn(message, key)) {
  4382. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  4383. return key;
  4384. }
  4385. return this.formater.interpolate(message[key], values).join('');
  4386. }
  4387. }]);
  4388. return I18n;
  4389. }();
  4390. exports.I18n = I18n;
  4391. function watchAppLocale(appVm, i18n) {
  4392. // 需要保证 watch 的触发在组件渲染之前
  4393. if (appVm.$watchLocale) {
  4394. // vue2
  4395. appVm.$watchLocale(function (newLocale) {
  4396. i18n.setLocale(newLocale);
  4397. });
  4398. } else {
  4399. appVm.$watch(function () {
  4400. return appVm.$locale;
  4401. }, function (newLocale) {
  4402. i18n.setLocale(newLocale);
  4403. });
  4404. }
  4405. }
  4406. function getDefaultLocale() {
  4407. if (typeof uni !== 'undefined' && uni.getLocale) {
  4408. return uni.getLocale();
  4409. }
  4410. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  4411. if (typeof global !== 'undefined' && global.getLocale) {
  4412. return global.getLocale();
  4413. }
  4414. return LOCALE_EN;
  4415. }
  4416. function initVueI18n(locale) {
  4417. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4418. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  4419. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  4420. // 兼容旧版本入参
  4421. if (typeof locale !== 'string') {
  4422. var _ref4 = [messages, locale];
  4423. locale = _ref4[0];
  4424. messages = _ref4[1];
  4425. }
  4426. if (typeof locale !== 'string') {
  4427. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  4428. locale = getDefaultLocale();
  4429. }
  4430. if (typeof fallbackLocale !== 'string') {
  4431. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  4432. }
  4433. var i18n = new I18n({
  4434. locale: locale,
  4435. fallbackLocale: fallbackLocale,
  4436. messages: messages,
  4437. watcher: watcher
  4438. });
  4439. var _t = function t(key, values) {
  4440. if (typeof getApp !== 'function') {
  4441. // app view
  4442. /* eslint-disable no-func-assign */
  4443. _t = function t(key, values) {
  4444. return i18n.t(key, values);
  4445. };
  4446. } else {
  4447. var isWatchedAppLocale = false;
  4448. _t = function t(key, values) {
  4449. var appVm = getApp().$vm;
  4450. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4451. // options: {
  4452. // type: Array,
  4453. // default () {
  4454. // return [{
  4455. // icon: 'shop',
  4456. // text: t("uni-goods-nav.options.shop"),
  4457. // }, {
  4458. // icon: 'cart',
  4459. // text: t("uni-goods-nav.options.cart")
  4460. // }]
  4461. // }
  4462. // },
  4463. if (appVm) {
  4464. // 触发响应式
  4465. appVm.$locale;
  4466. if (!isWatchedAppLocale) {
  4467. isWatchedAppLocale = true;
  4468. watchAppLocale(appVm, i18n);
  4469. }
  4470. }
  4471. return i18n.t(key, values);
  4472. };
  4473. }
  4474. return _t(key, values);
  4475. };
  4476. return {
  4477. i18n: i18n,
  4478. f: function f(message, values, delimiters) {
  4479. return i18n.f(message, values, delimiters);
  4480. },
  4481. t: function t(key, values) {
  4482. return _t(key, values);
  4483. },
  4484. add: function add(locale, message) {
  4485. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4486. return i18n.add(locale, message, override);
  4487. },
  4488. watch: function watch(fn) {
  4489. return i18n.watchLocale(fn);
  4490. },
  4491. getLocale: function getLocale() {
  4492. return i18n.getLocale();
  4493. },
  4494. setLocale: function setLocale(newLocale) {
  4495. return i18n.setLocale(newLocale);
  4496. }
  4497. };
  4498. }
  4499. var isString = function isString(val) {
  4500. return typeof val === 'string';
  4501. };
  4502. exports.isString = isString;
  4503. var formater;
  4504. function hasI18nJson(jsonObj, delimiters) {
  4505. if (!formater) {
  4506. formater = new BaseFormatter();
  4507. }
  4508. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4509. var value = jsonObj[key];
  4510. if (isString(value)) {
  4511. if (isI18nStr(value, delimiters)) {
  4512. return true;
  4513. }
  4514. } else {
  4515. return hasI18nJson(value, delimiters);
  4516. }
  4517. });
  4518. }
  4519. function parseI18nJson(jsonObj, values, delimiters) {
  4520. if (!formater) {
  4521. formater = new BaseFormatter();
  4522. }
  4523. walkJsonObj(jsonObj, function (jsonObj, key) {
  4524. var value = jsonObj[key];
  4525. if (isString(value)) {
  4526. if (isI18nStr(value, delimiters)) {
  4527. jsonObj[key] = compileStr(value, values, delimiters);
  4528. }
  4529. } else {
  4530. parseI18nJson(value, values, delimiters);
  4531. }
  4532. });
  4533. return jsonObj;
  4534. }
  4535. function compileI18nJsonStr(jsonStr, _ref5) {
  4536. var locale = _ref5.locale,
  4537. locales = _ref5.locales,
  4538. delimiters = _ref5.delimiters;
  4539. if (!isI18nStr(jsonStr, delimiters)) {
  4540. return jsonStr;
  4541. }
  4542. if (!formater) {
  4543. formater = new BaseFormatter();
  4544. }
  4545. var localeValues = [];
  4546. Object.keys(locales).forEach(function (name) {
  4547. if (name !== locale) {
  4548. localeValues.push({
  4549. locale: name,
  4550. values: locales[name]
  4551. });
  4552. }
  4553. });
  4554. localeValues.unshift({
  4555. locale: locale,
  4556. values: locales[locale]
  4557. });
  4558. try {
  4559. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4560. } catch (e) {}
  4561. return jsonStr;
  4562. }
  4563. function isI18nStr(value, delimiters) {
  4564. return value.indexOf(delimiters[0]) > -1;
  4565. }
  4566. function compileStr(value, values, delimiters) {
  4567. return formater.interpolate(value, values, delimiters).join('');
  4568. }
  4569. function compileValue(jsonObj, key, localeValues, delimiters) {
  4570. var value = jsonObj[key];
  4571. if (isString(value)) {
  4572. // 存在国际化
  4573. if (isI18nStr(value, delimiters)) {
  4574. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4575. if (localeValues.length > 1) {
  4576. // 格式化国际化语言
  4577. var valueLocales = jsonObj[key + 'Locales'] = {};
  4578. localeValues.forEach(function (localValue) {
  4579. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4580. });
  4581. }
  4582. }
  4583. } else {
  4584. compileJsonObj(value, localeValues, delimiters);
  4585. }
  4586. }
  4587. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4588. walkJsonObj(jsonObj, function (jsonObj, key) {
  4589. compileValue(jsonObj, key, localeValues, delimiters);
  4590. });
  4591. return jsonObj;
  4592. }
  4593. function walkJsonObj(jsonObj, walk) {
  4594. if (Array.isArray(jsonObj)) {
  4595. for (var i = 0; i < jsonObj.length; i++) {
  4596. if (walk(jsonObj, i)) {
  4597. return true;
  4598. }
  4599. }
  4600. } else if (isObject(jsonObj)) {
  4601. for (var key in jsonObj) {
  4602. if (walk(jsonObj, key)) {
  4603. return true;
  4604. }
  4605. }
  4606. }
  4607. return false;
  4608. }
  4609. function resolveLocale(locales) {
  4610. return function (locale) {
  4611. if (!locale) {
  4612. return locale;
  4613. }
  4614. locale = normalizeLocale(locale) || locale;
  4615. return resolveLocaleChain(locale).find(function (locale) {
  4616. return locales.indexOf(locale) > -1;
  4617. });
  4618. };
  4619. }
  4620. function resolveLocaleChain(locale) {
  4621. var chain = [];
  4622. var tokens = locale.split('-');
  4623. while (tokens.length) {
  4624. chain.push(tokens.join('-'));
  4625. tokens.pop();
  4626. }
  4627. return chain;
  4628. }
  4629. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  4630. /***/ }),
  4631. /***/ 23:
  4632. /*!***************************************************************!*\
  4633. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4634. \***************************************************************/
  4635. /*! no static exports found */
  4636. /***/ (function(module, exports) {
  4637. function _classCallCheck(instance, Constructor) {
  4638. if (!(instance instanceof Constructor)) {
  4639. throw new TypeError("Cannot call a class as a function");
  4640. }
  4641. }
  4642. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4643. /***/ }),
  4644. /***/ 24:
  4645. /*!************************************************************!*\
  4646. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4647. \************************************************************/
  4648. /*! no static exports found */
  4649. /***/ (function(module, exports, __webpack_require__) {
  4650. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4651. function _defineProperties(target, props) {
  4652. for (var i = 0; i < props.length; i++) {
  4653. var descriptor = props[i];
  4654. descriptor.enumerable = descriptor.enumerable || false;
  4655. descriptor.configurable = true;
  4656. if ("value" in descriptor) descriptor.writable = true;
  4657. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4658. }
  4659. }
  4660. function _createClass(Constructor, protoProps, staticProps) {
  4661. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4662. if (staticProps) _defineProperties(Constructor, staticProps);
  4663. Object.defineProperty(Constructor, "prototype", {
  4664. writable: false
  4665. });
  4666. return Constructor;
  4667. }
  4668. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4669. /***/ }),
  4670. /***/ 25:
  4671. /*!******************************************************************************************!*\
  4672. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4673. \******************************************************************************************/
  4674. /*! exports provided: default */
  4675. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4676. "use strict";
  4677. __webpack_require__.r(__webpack_exports__);
  4678. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4679. * Vue.js v2.6.11
  4680. * (c) 2014-2023 Evan You
  4681. * Released under the MIT License.
  4682. */
  4683. /* */
  4684. var emptyObject = Object.freeze({});
  4685. // These helpers produce better VM code in JS engines due to their
  4686. // explicitness and function inlining.
  4687. function isUndef (v) {
  4688. return v === undefined || v === null
  4689. }
  4690. function isDef (v) {
  4691. return v !== undefined && v !== null
  4692. }
  4693. function isTrue (v) {
  4694. return v === true
  4695. }
  4696. function isFalse (v) {
  4697. return v === false
  4698. }
  4699. /**
  4700. * Check if value is primitive.
  4701. */
  4702. function isPrimitive (value) {
  4703. return (
  4704. typeof value === 'string' ||
  4705. typeof value === 'number' ||
  4706. // $flow-disable-line
  4707. typeof value === 'symbol' ||
  4708. typeof value === 'boolean'
  4709. )
  4710. }
  4711. /**
  4712. * Quick object check - this is primarily used to tell
  4713. * Objects from primitive values when we know the value
  4714. * is a JSON-compliant type.
  4715. */
  4716. function isObject (obj) {
  4717. return obj !== null && typeof obj === 'object'
  4718. }
  4719. /**
  4720. * Get the raw type string of a value, e.g., [object Object].
  4721. */
  4722. var _toString = Object.prototype.toString;
  4723. function toRawType (value) {
  4724. return _toString.call(value).slice(8, -1)
  4725. }
  4726. /**
  4727. * Strict object type check. Only returns true
  4728. * for plain JavaScript objects.
  4729. */
  4730. function isPlainObject (obj) {
  4731. return _toString.call(obj) === '[object Object]'
  4732. }
  4733. function isRegExp (v) {
  4734. return _toString.call(v) === '[object RegExp]'
  4735. }
  4736. /**
  4737. * Check if val is a valid array index.
  4738. */
  4739. function isValidArrayIndex (val) {
  4740. var n = parseFloat(String(val));
  4741. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4742. }
  4743. function isPromise (val) {
  4744. return (
  4745. isDef(val) &&
  4746. typeof val.then === 'function' &&
  4747. typeof val.catch === 'function'
  4748. )
  4749. }
  4750. /**
  4751. * Convert a value to a string that is actually rendered.
  4752. */
  4753. function toString (val) {
  4754. return val == null
  4755. ? ''
  4756. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4757. ? JSON.stringify(val, null, 2)
  4758. : String(val)
  4759. }
  4760. /**
  4761. * Convert an input value to a number for persistence.
  4762. * If the conversion fails, return original string.
  4763. */
  4764. function toNumber (val) {
  4765. var n = parseFloat(val);
  4766. return isNaN(n) ? val : n
  4767. }
  4768. /**
  4769. * Make a map and return a function for checking if a key
  4770. * is in that map.
  4771. */
  4772. function makeMap (
  4773. str,
  4774. expectsLowerCase
  4775. ) {
  4776. var map = Object.create(null);
  4777. var list = str.split(',');
  4778. for (var i = 0; i < list.length; i++) {
  4779. map[list[i]] = true;
  4780. }
  4781. return expectsLowerCase
  4782. ? function (val) { return map[val.toLowerCase()]; }
  4783. : function (val) { return map[val]; }
  4784. }
  4785. /**
  4786. * Check if a tag is a built-in tag.
  4787. */
  4788. var isBuiltInTag = makeMap('slot,component', true);
  4789. /**
  4790. * Check if an attribute is a reserved attribute.
  4791. */
  4792. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4793. /**
  4794. * Remove an item from an array.
  4795. */
  4796. function remove (arr, item) {
  4797. if (arr.length) {
  4798. var index = arr.indexOf(item);
  4799. if (index > -1) {
  4800. return arr.splice(index, 1)
  4801. }
  4802. }
  4803. }
  4804. /**
  4805. * Check whether an object has the property.
  4806. */
  4807. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4808. function hasOwn (obj, key) {
  4809. return hasOwnProperty.call(obj, key)
  4810. }
  4811. /**
  4812. * Create a cached version of a pure function.
  4813. */
  4814. function cached (fn) {
  4815. var cache = Object.create(null);
  4816. return (function cachedFn (str) {
  4817. var hit = cache[str];
  4818. return hit || (cache[str] = fn(str))
  4819. })
  4820. }
  4821. /**
  4822. * Camelize a hyphen-delimited string.
  4823. */
  4824. var camelizeRE = /-(\w)/g;
  4825. var camelize = cached(function (str) {
  4826. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4827. });
  4828. /**
  4829. * Capitalize a string.
  4830. */
  4831. var capitalize = cached(function (str) {
  4832. return str.charAt(0).toUpperCase() + str.slice(1)
  4833. });
  4834. /**
  4835. * Hyphenate a camelCase string.
  4836. */
  4837. var hyphenateRE = /\B([A-Z])/g;
  4838. var hyphenate = cached(function (str) {
  4839. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4840. });
  4841. /**
  4842. * Simple bind polyfill for environments that do not support it,
  4843. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4844. * since native bind is now performant enough in most browsers.
  4845. * But removing it would mean breaking code that was able to run in
  4846. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4847. */
  4848. /* istanbul ignore next */
  4849. function polyfillBind (fn, ctx) {
  4850. function boundFn (a) {
  4851. var l = arguments.length;
  4852. return l
  4853. ? l > 1
  4854. ? fn.apply(ctx, arguments)
  4855. : fn.call(ctx, a)
  4856. : fn.call(ctx)
  4857. }
  4858. boundFn._length = fn.length;
  4859. return boundFn
  4860. }
  4861. function nativeBind (fn, ctx) {
  4862. return fn.bind(ctx)
  4863. }
  4864. var bind = Function.prototype.bind
  4865. ? nativeBind
  4866. : polyfillBind;
  4867. /**
  4868. * Convert an Array-like object to a real Array.
  4869. */
  4870. function toArray (list, start) {
  4871. start = start || 0;
  4872. var i = list.length - start;
  4873. var ret = new Array(i);
  4874. while (i--) {
  4875. ret[i] = list[i + start];
  4876. }
  4877. return ret
  4878. }
  4879. /**
  4880. * Mix properties into target object.
  4881. */
  4882. function extend (to, _from) {
  4883. for (var key in _from) {
  4884. to[key] = _from[key];
  4885. }
  4886. return to
  4887. }
  4888. /**
  4889. * Merge an Array of Objects into a single Object.
  4890. */
  4891. function toObject (arr) {
  4892. var res = {};
  4893. for (var i = 0; i < arr.length; i++) {
  4894. if (arr[i]) {
  4895. extend(res, arr[i]);
  4896. }
  4897. }
  4898. return res
  4899. }
  4900. /* eslint-disable no-unused-vars */
  4901. /**
  4902. * Perform no operation.
  4903. * Stubbing args to make Flow happy without leaving useless transpiled code
  4904. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4905. */
  4906. function noop (a, b, c) {}
  4907. /**
  4908. * Always return false.
  4909. */
  4910. var no = function (a, b, c) { return false; };
  4911. /* eslint-enable no-unused-vars */
  4912. /**
  4913. * Return the same value.
  4914. */
  4915. var identity = function (_) { return _; };
  4916. /**
  4917. * Check if two values are loosely equal - that is,
  4918. * if they are plain objects, do they have the same shape?
  4919. */
  4920. function looseEqual (a, b) {
  4921. if (a === b) { return true }
  4922. var isObjectA = isObject(a);
  4923. var isObjectB = isObject(b);
  4924. if (isObjectA && isObjectB) {
  4925. try {
  4926. var isArrayA = Array.isArray(a);
  4927. var isArrayB = Array.isArray(b);
  4928. if (isArrayA && isArrayB) {
  4929. return a.length === b.length && a.every(function (e, i) {
  4930. return looseEqual(e, b[i])
  4931. })
  4932. } else if (a instanceof Date && b instanceof Date) {
  4933. return a.getTime() === b.getTime()
  4934. } else if (!isArrayA && !isArrayB) {
  4935. var keysA = Object.keys(a);
  4936. var keysB = Object.keys(b);
  4937. return keysA.length === keysB.length && keysA.every(function (key) {
  4938. return looseEqual(a[key], b[key])
  4939. })
  4940. } else {
  4941. /* istanbul ignore next */
  4942. return false
  4943. }
  4944. } catch (e) {
  4945. /* istanbul ignore next */
  4946. return false
  4947. }
  4948. } else if (!isObjectA && !isObjectB) {
  4949. return String(a) === String(b)
  4950. } else {
  4951. return false
  4952. }
  4953. }
  4954. /**
  4955. * Return the first index at which a loosely equal value can be
  4956. * found in the array (if value is a plain object, the array must
  4957. * contain an object of the same shape), or -1 if it is not present.
  4958. */
  4959. function looseIndexOf (arr, val) {
  4960. for (var i = 0; i < arr.length; i++) {
  4961. if (looseEqual(arr[i], val)) { return i }
  4962. }
  4963. return -1
  4964. }
  4965. /**
  4966. * Ensure a function is called only once.
  4967. */
  4968. function once (fn) {
  4969. var called = false;
  4970. return function () {
  4971. if (!called) {
  4972. called = true;
  4973. fn.apply(this, arguments);
  4974. }
  4975. }
  4976. }
  4977. var ASSET_TYPES = [
  4978. 'component',
  4979. 'directive',
  4980. 'filter'
  4981. ];
  4982. var LIFECYCLE_HOOKS = [
  4983. 'beforeCreate',
  4984. 'created',
  4985. 'beforeMount',
  4986. 'mounted',
  4987. 'beforeUpdate',
  4988. 'updated',
  4989. 'beforeDestroy',
  4990. 'destroyed',
  4991. 'activated',
  4992. 'deactivated',
  4993. 'errorCaptured',
  4994. 'serverPrefetch'
  4995. ];
  4996. /* */
  4997. var config = ({
  4998. /**
  4999. * Option merge strategies (used in core/util/options)
  5000. */
  5001. // $flow-disable-line
  5002. optionMergeStrategies: Object.create(null),
  5003. /**
  5004. * Whether to suppress warnings.
  5005. */
  5006. silent: false,
  5007. /**
  5008. * Show production mode tip message on boot?
  5009. */
  5010. productionTip: "development" !== 'production',
  5011. /**
  5012. * Whether to enable devtools
  5013. */
  5014. devtools: "development" !== 'production',
  5015. /**
  5016. * Whether to record perf
  5017. */
  5018. performance: false,
  5019. /**
  5020. * Error handler for watcher errors
  5021. */
  5022. errorHandler: null,
  5023. /**
  5024. * Warn handler for watcher warns
  5025. */
  5026. warnHandler: null,
  5027. /**
  5028. * Ignore certain custom elements
  5029. */
  5030. ignoredElements: [],
  5031. /**
  5032. * Custom user key aliases for v-on
  5033. */
  5034. // $flow-disable-line
  5035. keyCodes: Object.create(null),
  5036. /**
  5037. * Check if a tag is reserved so that it cannot be registered as a
  5038. * component. This is platform-dependent and may be overwritten.
  5039. */
  5040. isReservedTag: no,
  5041. /**
  5042. * Check if an attribute is reserved so that it cannot be used as a component
  5043. * prop. This is platform-dependent and may be overwritten.
  5044. */
  5045. isReservedAttr: no,
  5046. /**
  5047. * Check if a tag is an unknown element.
  5048. * Platform-dependent.
  5049. */
  5050. isUnknownElement: no,
  5051. /**
  5052. * Get the namespace of an element
  5053. */
  5054. getTagNamespace: noop,
  5055. /**
  5056. * Parse the real tag name for the specific platform.
  5057. */
  5058. parsePlatformTagName: identity,
  5059. /**
  5060. * Check if an attribute must be bound using property, e.g. value
  5061. * Platform-dependent.
  5062. */
  5063. mustUseProp: no,
  5064. /**
  5065. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  5066. * This will significantly reduce performance if set to false.
  5067. */
  5068. async: true,
  5069. /**
  5070. * Exposed for legacy reasons
  5071. */
  5072. _lifecycleHooks: LIFECYCLE_HOOKS
  5073. });
  5074. /* */
  5075. /**
  5076. * unicode letters used for parsing html tags, component names and property paths.
  5077. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  5078. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  5079. */
  5080. 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/;
  5081. /**
  5082. * Check if a string starts with $ or _
  5083. */
  5084. function isReserved (str) {
  5085. var c = (str + '').charCodeAt(0);
  5086. return c === 0x24 || c === 0x5F
  5087. }
  5088. /**
  5089. * Define a property.
  5090. */
  5091. function def (obj, key, val, enumerable) {
  5092. Object.defineProperty(obj, key, {
  5093. value: val,
  5094. enumerable: !!enumerable,
  5095. writable: true,
  5096. configurable: true
  5097. });
  5098. }
  5099. /**
  5100. * Parse simple path.
  5101. */
  5102. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5103. function parsePath (path) {
  5104. if (bailRE.test(path)) {
  5105. return
  5106. }
  5107. var segments = path.split('.');
  5108. return function (obj) {
  5109. for (var i = 0; i < segments.length; i++) {
  5110. if (!obj) { return }
  5111. obj = obj[segments[i]];
  5112. }
  5113. return obj
  5114. }
  5115. }
  5116. /* */
  5117. // can we use __proto__?
  5118. var hasProto = '__proto__' in {};
  5119. // Browser environment sniffing
  5120. var inBrowser = typeof window !== 'undefined';
  5121. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5122. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5123. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5124. var isIE = UA && /msie|trident/.test(UA);
  5125. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5126. var isEdge = UA && UA.indexOf('edge/') > 0;
  5127. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5128. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5129. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5130. var isPhantomJS = UA && /phantomjs/.test(UA);
  5131. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5132. // Firefox has a "watch" function on Object.prototype...
  5133. var nativeWatch = ({}).watch;
  5134. if (inBrowser) {
  5135. try {
  5136. var opts = {};
  5137. Object.defineProperty(opts, 'passive', ({
  5138. get: function get () {
  5139. }
  5140. })); // https://github.com/facebook/flow/issues/285
  5141. window.addEventListener('test-passive', null, opts);
  5142. } catch (e) {}
  5143. }
  5144. // this needs to be lazy-evaled because vue may be required before
  5145. // vue-server-renderer can set VUE_ENV
  5146. var _isServer;
  5147. var isServerRendering = function () {
  5148. if (_isServer === undefined) {
  5149. /* istanbul ignore if */
  5150. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5151. // detect presence of vue-server-renderer and avoid
  5152. // Webpack shimming the process
  5153. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5154. } else {
  5155. _isServer = false;
  5156. }
  5157. }
  5158. return _isServer
  5159. };
  5160. // detect devtools
  5161. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5162. /* istanbul ignore next */
  5163. function isNative (Ctor) {
  5164. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5165. }
  5166. var hasSymbol =
  5167. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5168. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5169. var _Set;
  5170. /* istanbul ignore if */ // $flow-disable-line
  5171. if (typeof Set !== 'undefined' && isNative(Set)) {
  5172. // use native Set when available.
  5173. _Set = Set;
  5174. } else {
  5175. // a non-standard Set polyfill that only works with primitive keys.
  5176. _Set = /*@__PURE__*/(function () {
  5177. function Set () {
  5178. this.set = Object.create(null);
  5179. }
  5180. Set.prototype.has = function has (key) {
  5181. return this.set[key] === true
  5182. };
  5183. Set.prototype.add = function add (key) {
  5184. this.set[key] = true;
  5185. };
  5186. Set.prototype.clear = function clear () {
  5187. this.set = Object.create(null);
  5188. };
  5189. return Set;
  5190. }());
  5191. }
  5192. /* */
  5193. var warn = noop;
  5194. var tip = noop;
  5195. var generateComponentTrace = (noop); // work around flow check
  5196. var formatComponentName = (noop);
  5197. if (true) {
  5198. var hasConsole = typeof console !== 'undefined';
  5199. var classifyRE = /(?:^|[-_])(\w)/g;
  5200. var classify = function (str) { return str
  5201. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5202. .replace(/[-_]/g, ''); };
  5203. warn = function (msg, vm) {
  5204. var trace = vm ? generateComponentTrace(vm) : '';
  5205. if (config.warnHandler) {
  5206. config.warnHandler.call(null, msg, vm, trace);
  5207. } else if (hasConsole && (!config.silent)) {
  5208. console.error(("[Vue warn]: " + msg + trace));
  5209. }
  5210. };
  5211. tip = function (msg, vm) {
  5212. if (hasConsole && (!config.silent)) {
  5213. console.warn("[Vue tip]: " + msg + (
  5214. vm ? generateComponentTrace(vm) : ''
  5215. ));
  5216. }
  5217. };
  5218. formatComponentName = function (vm, includeFile) {
  5219. if (vm.$root === vm) {
  5220. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5221. return ('') + vm.$options.__file
  5222. }
  5223. return '<Root>'
  5224. }
  5225. var options = typeof vm === 'function' && vm.cid != null
  5226. ? vm.options
  5227. : vm._isVue
  5228. ? vm.$options || vm.constructor.options
  5229. : vm;
  5230. var name = options.name || options._componentTag;
  5231. var file = options.__file;
  5232. if (!name && file) {
  5233. var match = file.match(/([^/\\]+)\.vue$/);
  5234. name = match && match[1];
  5235. }
  5236. return (
  5237. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5238. (file && includeFile !== false ? (" at " + file) : '')
  5239. )
  5240. };
  5241. var repeat = function (str, n) {
  5242. var res = '';
  5243. while (n) {
  5244. if (n % 2 === 1) { res += str; }
  5245. if (n > 1) { str += str; }
  5246. n >>= 1;
  5247. }
  5248. return res
  5249. };
  5250. generateComponentTrace = function (vm) {
  5251. if (vm._isVue && vm.$parent) {
  5252. var tree = [];
  5253. var currentRecursiveSequence = 0;
  5254. while (vm && vm.$options.name !== 'PageBody') {
  5255. if (tree.length > 0) {
  5256. var last = tree[tree.length - 1];
  5257. if (last.constructor === vm.constructor) {
  5258. currentRecursiveSequence++;
  5259. vm = vm.$parent;
  5260. continue
  5261. } else if (currentRecursiveSequence > 0) {
  5262. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5263. currentRecursiveSequence = 0;
  5264. }
  5265. }
  5266. !vm.$options.isReserved && tree.push(vm);
  5267. vm = vm.$parent;
  5268. }
  5269. return '\n\nfound in\n\n' + tree
  5270. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5271. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5272. : formatComponentName(vm))); })
  5273. .join('\n')
  5274. } else {
  5275. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5276. }
  5277. };
  5278. }
  5279. /* */
  5280. var uid = 0;
  5281. /**
  5282. * A dep is an observable that can have multiple
  5283. * directives subscribing to it.
  5284. */
  5285. var Dep = function Dep () {
  5286. this.id = uid++;
  5287. this.subs = [];
  5288. };
  5289. Dep.prototype.addSub = function addSub (sub) {
  5290. this.subs.push(sub);
  5291. };
  5292. Dep.prototype.removeSub = function removeSub (sub) {
  5293. remove(this.subs, sub);
  5294. };
  5295. Dep.prototype.depend = function depend () {
  5296. if (Dep.SharedObject.target) {
  5297. Dep.SharedObject.target.addDep(this);
  5298. }
  5299. };
  5300. Dep.prototype.notify = function notify () {
  5301. // stabilize the subscriber list first
  5302. var subs = this.subs.slice();
  5303. if ( true && !config.async) {
  5304. // subs aren't sorted in scheduler if not running async
  5305. // we need to sort them now to make sure they fire in correct
  5306. // order
  5307. subs.sort(function (a, b) { return a.id - b.id; });
  5308. }
  5309. for (var i = 0, l = subs.length; i < l; i++) {
  5310. subs[i].update();
  5311. }
  5312. };
  5313. // The current target watcher being evaluated.
  5314. // This is globally unique because only one watcher
  5315. // can be evaluated at a time.
  5316. // fixed by xxxxxx (nvue shared vuex)
  5317. /* eslint-disable no-undef */
  5318. Dep.SharedObject = {};
  5319. Dep.SharedObject.target = null;
  5320. Dep.SharedObject.targetStack = [];
  5321. function pushTarget (target) {
  5322. Dep.SharedObject.targetStack.push(target);
  5323. Dep.SharedObject.target = target;
  5324. Dep.target = target;
  5325. }
  5326. function popTarget () {
  5327. Dep.SharedObject.targetStack.pop();
  5328. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5329. Dep.target = Dep.SharedObject.target;
  5330. }
  5331. /* */
  5332. var VNode = function VNode (
  5333. tag,
  5334. data,
  5335. children,
  5336. text,
  5337. elm,
  5338. context,
  5339. componentOptions,
  5340. asyncFactory
  5341. ) {
  5342. this.tag = tag;
  5343. this.data = data;
  5344. this.children = children;
  5345. this.text = text;
  5346. this.elm = elm;
  5347. this.ns = undefined;
  5348. this.context = context;
  5349. this.fnContext = undefined;
  5350. this.fnOptions = undefined;
  5351. this.fnScopeId = undefined;
  5352. this.key = data && data.key;
  5353. this.componentOptions = componentOptions;
  5354. this.componentInstance = undefined;
  5355. this.parent = undefined;
  5356. this.raw = false;
  5357. this.isStatic = false;
  5358. this.isRootInsert = true;
  5359. this.isComment = false;
  5360. this.isCloned = false;
  5361. this.isOnce = false;
  5362. this.asyncFactory = asyncFactory;
  5363. this.asyncMeta = undefined;
  5364. this.isAsyncPlaceholder = false;
  5365. };
  5366. var prototypeAccessors = { child: { configurable: true } };
  5367. // DEPRECATED: alias for componentInstance for backwards compat.
  5368. /* istanbul ignore next */
  5369. prototypeAccessors.child.get = function () {
  5370. return this.componentInstance
  5371. };
  5372. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5373. var createEmptyVNode = function (text) {
  5374. if ( text === void 0 ) text = '';
  5375. var node = new VNode();
  5376. node.text = text;
  5377. node.isComment = true;
  5378. return node
  5379. };
  5380. function createTextVNode (val) {
  5381. return new VNode(undefined, undefined, undefined, String(val))
  5382. }
  5383. // optimized shallow clone
  5384. // used for static nodes and slot nodes because they may be reused across
  5385. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5386. // on their elm reference.
  5387. function cloneVNode (vnode) {
  5388. var cloned = new VNode(
  5389. vnode.tag,
  5390. vnode.data,
  5391. // #7975
  5392. // clone children array to avoid mutating original in case of cloning
  5393. // a child.
  5394. vnode.children && vnode.children.slice(),
  5395. vnode.text,
  5396. vnode.elm,
  5397. vnode.context,
  5398. vnode.componentOptions,
  5399. vnode.asyncFactory
  5400. );
  5401. cloned.ns = vnode.ns;
  5402. cloned.isStatic = vnode.isStatic;
  5403. cloned.key = vnode.key;
  5404. cloned.isComment = vnode.isComment;
  5405. cloned.fnContext = vnode.fnContext;
  5406. cloned.fnOptions = vnode.fnOptions;
  5407. cloned.fnScopeId = vnode.fnScopeId;
  5408. cloned.asyncMeta = vnode.asyncMeta;
  5409. cloned.isCloned = true;
  5410. return cloned
  5411. }
  5412. /*
  5413. * not type checking this file because flow doesn't play well with
  5414. * dynamically accessing methods on Array prototype
  5415. */
  5416. var arrayProto = Array.prototype;
  5417. var arrayMethods = Object.create(arrayProto);
  5418. var methodsToPatch = [
  5419. 'push',
  5420. 'pop',
  5421. 'shift',
  5422. 'unshift',
  5423. 'splice',
  5424. 'sort',
  5425. 'reverse'
  5426. ];
  5427. /**
  5428. * Intercept mutating methods and emit events
  5429. */
  5430. methodsToPatch.forEach(function (method) {
  5431. // cache original method
  5432. var original = arrayProto[method];
  5433. def(arrayMethods, method, function mutator () {
  5434. var args = [], len = arguments.length;
  5435. while ( len-- ) args[ len ] = arguments[ len ];
  5436. var result = original.apply(this, args);
  5437. var ob = this.__ob__;
  5438. var inserted;
  5439. switch (method) {
  5440. case 'push':
  5441. case 'unshift':
  5442. inserted = args;
  5443. break
  5444. case 'splice':
  5445. inserted = args.slice(2);
  5446. break
  5447. }
  5448. if (inserted) { ob.observeArray(inserted); }
  5449. // notify change
  5450. ob.dep.notify();
  5451. return result
  5452. });
  5453. });
  5454. /* */
  5455. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5456. /**
  5457. * In some cases we may want to disable observation inside a component's
  5458. * update computation.
  5459. */
  5460. var shouldObserve = true;
  5461. function toggleObserving (value) {
  5462. shouldObserve = value;
  5463. }
  5464. /**
  5465. * Observer class that is attached to each observed
  5466. * object. Once attached, the observer converts the target
  5467. * object's property keys into getter/setters that
  5468. * collect dependencies and dispatch updates.
  5469. */
  5470. var Observer = function Observer (value) {
  5471. this.value = value;
  5472. this.dep = new Dep();
  5473. this.vmCount = 0;
  5474. def(value, '__ob__', this);
  5475. if (Array.isArray(value)) {
  5476. if (hasProto) {
  5477. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5478. if(value.push !== value.__proto__.push){
  5479. copyAugment(value, arrayMethods, arrayKeys);
  5480. } else {
  5481. protoAugment(value, arrayMethods);
  5482. }
  5483. }
  5484. } else {
  5485. copyAugment(value, arrayMethods, arrayKeys);
  5486. }
  5487. this.observeArray(value);
  5488. } else {
  5489. this.walk(value);
  5490. }
  5491. };
  5492. /**
  5493. * Walk through all properties and convert them into
  5494. * getter/setters. This method should only be called when
  5495. * value type is Object.
  5496. */
  5497. Observer.prototype.walk = function walk (obj) {
  5498. var keys = Object.keys(obj);
  5499. for (var i = 0; i < keys.length; i++) {
  5500. defineReactive$$1(obj, keys[i]);
  5501. }
  5502. };
  5503. /**
  5504. * Observe a list of Array items.
  5505. */
  5506. Observer.prototype.observeArray = function observeArray (items) {
  5507. for (var i = 0, l = items.length; i < l; i++) {
  5508. observe(items[i]);
  5509. }
  5510. };
  5511. // helpers
  5512. /**
  5513. * Augment a target Object or Array by intercepting
  5514. * the prototype chain using __proto__
  5515. */
  5516. function protoAugment (target, src) {
  5517. /* eslint-disable no-proto */
  5518. target.__proto__ = src;
  5519. /* eslint-enable no-proto */
  5520. }
  5521. /**
  5522. * Augment a target Object or Array by defining
  5523. * hidden properties.
  5524. */
  5525. /* istanbul ignore next */
  5526. function copyAugment (target, src, keys) {
  5527. for (var i = 0, l = keys.length; i < l; i++) {
  5528. var key = keys[i];
  5529. def(target, key, src[key]);
  5530. }
  5531. }
  5532. /**
  5533. * Attempt to create an observer instance for a value,
  5534. * returns the new observer if successfully observed,
  5535. * or the existing observer if the value already has one.
  5536. */
  5537. function observe (value, asRootData) {
  5538. if (!isObject(value) || value instanceof VNode) {
  5539. return
  5540. }
  5541. var ob;
  5542. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5543. ob = value.__ob__;
  5544. } else if (
  5545. shouldObserve &&
  5546. !isServerRendering() &&
  5547. (Array.isArray(value) || isPlainObject(value)) &&
  5548. Object.isExtensible(value) &&
  5549. !value._isVue &&
  5550. !value.__v_isMPComponent
  5551. ) {
  5552. ob = new Observer(value);
  5553. }
  5554. if (asRootData && ob) {
  5555. ob.vmCount++;
  5556. }
  5557. return ob
  5558. }
  5559. /**
  5560. * Define a reactive property on an Object.
  5561. */
  5562. function defineReactive$$1 (
  5563. obj,
  5564. key,
  5565. val,
  5566. customSetter,
  5567. shallow
  5568. ) {
  5569. var dep = new Dep();
  5570. var property = Object.getOwnPropertyDescriptor(obj, key);
  5571. if (property && property.configurable === false) {
  5572. return
  5573. }
  5574. // cater for pre-defined getter/setters
  5575. var getter = property && property.get;
  5576. var setter = property && property.set;
  5577. if ((!getter || setter) && arguments.length === 2) {
  5578. val = obj[key];
  5579. }
  5580. var childOb = !shallow && observe(val);
  5581. Object.defineProperty(obj, key, {
  5582. enumerable: true,
  5583. configurable: true,
  5584. get: function reactiveGetter () {
  5585. var value = getter ? getter.call(obj) : val;
  5586. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5587. dep.depend();
  5588. if (childOb) {
  5589. childOb.dep.depend();
  5590. if (Array.isArray(value)) {
  5591. dependArray(value);
  5592. }
  5593. }
  5594. }
  5595. return value
  5596. },
  5597. set: function reactiveSetter (newVal) {
  5598. var value = getter ? getter.call(obj) : val;
  5599. /* eslint-disable no-self-compare */
  5600. if (newVal === value || (newVal !== newVal && value !== value)) {
  5601. return
  5602. }
  5603. /* eslint-enable no-self-compare */
  5604. if ( true && customSetter) {
  5605. customSetter();
  5606. }
  5607. // #7981: for accessor properties without setter
  5608. if (getter && !setter) { return }
  5609. if (setter) {
  5610. setter.call(obj, newVal);
  5611. } else {
  5612. val = newVal;
  5613. }
  5614. childOb = !shallow && observe(newVal);
  5615. dep.notify();
  5616. }
  5617. });
  5618. }
  5619. /**
  5620. * Set a property on an object. Adds the new property and
  5621. * triggers change notification if the property doesn't
  5622. * already exist.
  5623. */
  5624. function set (target, key, val) {
  5625. if ( true &&
  5626. (isUndef(target) || isPrimitive(target))
  5627. ) {
  5628. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5629. }
  5630. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5631. target.length = Math.max(target.length, key);
  5632. target.splice(key, 1, val);
  5633. return val
  5634. }
  5635. if (key in target && !(key in Object.prototype)) {
  5636. target[key] = val;
  5637. return val
  5638. }
  5639. var ob = (target).__ob__;
  5640. if (target._isVue || (ob && ob.vmCount)) {
  5641. true && warn(
  5642. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5643. 'at runtime - declare it upfront in the data option.'
  5644. );
  5645. return val
  5646. }
  5647. if (!ob) {
  5648. target[key] = val;
  5649. return val
  5650. }
  5651. defineReactive$$1(ob.value, key, val);
  5652. ob.dep.notify();
  5653. return val
  5654. }
  5655. /**
  5656. * Delete a property and trigger change if necessary.
  5657. */
  5658. function del (target, key) {
  5659. if ( true &&
  5660. (isUndef(target) || isPrimitive(target))
  5661. ) {
  5662. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5663. }
  5664. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5665. target.splice(key, 1);
  5666. return
  5667. }
  5668. var ob = (target).__ob__;
  5669. if (target._isVue || (ob && ob.vmCount)) {
  5670. true && warn(
  5671. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5672. '- just set it to null.'
  5673. );
  5674. return
  5675. }
  5676. if (!hasOwn(target, key)) {
  5677. return
  5678. }
  5679. delete target[key];
  5680. if (!ob) {
  5681. return
  5682. }
  5683. ob.dep.notify();
  5684. }
  5685. /**
  5686. * Collect dependencies on array elements when the array is touched, since
  5687. * we cannot intercept array element access like property getters.
  5688. */
  5689. function dependArray (value) {
  5690. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5691. e = value[i];
  5692. e && e.__ob__ && e.__ob__.dep.depend();
  5693. if (Array.isArray(e)) {
  5694. dependArray(e);
  5695. }
  5696. }
  5697. }
  5698. /* */
  5699. /**
  5700. * Option overwriting strategies are functions that handle
  5701. * how to merge a parent option value and a child option
  5702. * value into the final value.
  5703. */
  5704. var strats = config.optionMergeStrategies;
  5705. /**
  5706. * Options with restrictions
  5707. */
  5708. if (true) {
  5709. strats.el = strats.propsData = function (parent, child, vm, key) {
  5710. if (!vm) {
  5711. warn(
  5712. "option \"" + key + "\" can only be used during instance " +
  5713. 'creation with the `new` keyword.'
  5714. );
  5715. }
  5716. return defaultStrat(parent, child)
  5717. };
  5718. }
  5719. /**
  5720. * Helper that recursively merges two data objects together.
  5721. */
  5722. function mergeData (to, from) {
  5723. if (!from) { return to }
  5724. var key, toVal, fromVal;
  5725. var keys = hasSymbol
  5726. ? Reflect.ownKeys(from)
  5727. : Object.keys(from);
  5728. for (var i = 0; i < keys.length; i++) {
  5729. key = keys[i];
  5730. // in case the object is already observed...
  5731. if (key === '__ob__') { continue }
  5732. toVal = to[key];
  5733. fromVal = from[key];
  5734. if (!hasOwn(to, key)) {
  5735. set(to, key, fromVal);
  5736. } else if (
  5737. toVal !== fromVal &&
  5738. isPlainObject(toVal) &&
  5739. isPlainObject(fromVal)
  5740. ) {
  5741. mergeData(toVal, fromVal);
  5742. }
  5743. }
  5744. return to
  5745. }
  5746. /**
  5747. * Data
  5748. */
  5749. function mergeDataOrFn (
  5750. parentVal,
  5751. childVal,
  5752. vm
  5753. ) {
  5754. if (!vm) {
  5755. // in a Vue.extend merge, both should be functions
  5756. if (!childVal) {
  5757. return parentVal
  5758. }
  5759. if (!parentVal) {
  5760. return childVal
  5761. }
  5762. // when parentVal & childVal are both present,
  5763. // we need to return a function that returns the
  5764. // merged result of both functions... no need to
  5765. // check if parentVal is a function here because
  5766. // it has to be a function to pass previous merges.
  5767. return function mergedDataFn () {
  5768. return mergeData(
  5769. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5770. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5771. )
  5772. }
  5773. } else {
  5774. return function mergedInstanceDataFn () {
  5775. // instance merge
  5776. var instanceData = typeof childVal === 'function'
  5777. ? childVal.call(vm, vm)
  5778. : childVal;
  5779. var defaultData = typeof parentVal === 'function'
  5780. ? parentVal.call(vm, vm)
  5781. : parentVal;
  5782. if (instanceData) {
  5783. return mergeData(instanceData, defaultData)
  5784. } else {
  5785. return defaultData
  5786. }
  5787. }
  5788. }
  5789. }
  5790. strats.data = function (
  5791. parentVal,
  5792. childVal,
  5793. vm
  5794. ) {
  5795. if (!vm) {
  5796. if (childVal && typeof childVal !== 'function') {
  5797. true && warn(
  5798. 'The "data" option should be a function ' +
  5799. 'that returns a per-instance value in component ' +
  5800. 'definitions.',
  5801. vm
  5802. );
  5803. return parentVal
  5804. }
  5805. return mergeDataOrFn(parentVal, childVal)
  5806. }
  5807. return mergeDataOrFn(parentVal, childVal, vm)
  5808. };
  5809. /**
  5810. * Hooks and props are merged as arrays.
  5811. */
  5812. function mergeHook (
  5813. parentVal,
  5814. childVal
  5815. ) {
  5816. var res = childVal
  5817. ? parentVal
  5818. ? parentVal.concat(childVal)
  5819. : Array.isArray(childVal)
  5820. ? childVal
  5821. : [childVal]
  5822. : parentVal;
  5823. return res
  5824. ? dedupeHooks(res)
  5825. : res
  5826. }
  5827. function dedupeHooks (hooks) {
  5828. var res = [];
  5829. for (var i = 0; i < hooks.length; i++) {
  5830. if (res.indexOf(hooks[i]) === -1) {
  5831. res.push(hooks[i]);
  5832. }
  5833. }
  5834. return res
  5835. }
  5836. LIFECYCLE_HOOKS.forEach(function (hook) {
  5837. strats[hook] = mergeHook;
  5838. });
  5839. /**
  5840. * Assets
  5841. *
  5842. * When a vm is present (instance creation), we need to do
  5843. * a three-way merge between constructor options, instance
  5844. * options and parent options.
  5845. */
  5846. function mergeAssets (
  5847. parentVal,
  5848. childVal,
  5849. vm,
  5850. key
  5851. ) {
  5852. var res = Object.create(parentVal || null);
  5853. if (childVal) {
  5854. true && assertObjectType(key, childVal, vm);
  5855. return extend(res, childVal)
  5856. } else {
  5857. return res
  5858. }
  5859. }
  5860. ASSET_TYPES.forEach(function (type) {
  5861. strats[type + 's'] = mergeAssets;
  5862. });
  5863. /**
  5864. * Watchers.
  5865. *
  5866. * Watchers hashes should not overwrite one
  5867. * another, so we merge them as arrays.
  5868. */
  5869. strats.watch = function (
  5870. parentVal,
  5871. childVal,
  5872. vm,
  5873. key
  5874. ) {
  5875. // work around Firefox's Object.prototype.watch...
  5876. if (parentVal === nativeWatch) { parentVal = undefined; }
  5877. if (childVal === nativeWatch) { childVal = undefined; }
  5878. /* istanbul ignore if */
  5879. if (!childVal) { return Object.create(parentVal || null) }
  5880. if (true) {
  5881. assertObjectType(key, childVal, vm);
  5882. }
  5883. if (!parentVal) { return childVal }
  5884. var ret = {};
  5885. extend(ret, parentVal);
  5886. for (var key$1 in childVal) {
  5887. var parent = ret[key$1];
  5888. var child = childVal[key$1];
  5889. if (parent && !Array.isArray(parent)) {
  5890. parent = [parent];
  5891. }
  5892. ret[key$1] = parent
  5893. ? parent.concat(child)
  5894. : Array.isArray(child) ? child : [child];
  5895. }
  5896. return ret
  5897. };
  5898. /**
  5899. * Other object hashes.
  5900. */
  5901. strats.props =
  5902. strats.methods =
  5903. strats.inject =
  5904. strats.computed = function (
  5905. parentVal,
  5906. childVal,
  5907. vm,
  5908. key
  5909. ) {
  5910. if (childVal && "development" !== 'production') {
  5911. assertObjectType(key, childVal, vm);
  5912. }
  5913. if (!parentVal) { return childVal }
  5914. var ret = Object.create(null);
  5915. extend(ret, parentVal);
  5916. if (childVal) { extend(ret, childVal); }
  5917. return ret
  5918. };
  5919. strats.provide = mergeDataOrFn;
  5920. /**
  5921. * Default strategy.
  5922. */
  5923. var defaultStrat = function (parentVal, childVal) {
  5924. return childVal === undefined
  5925. ? parentVal
  5926. : childVal
  5927. };
  5928. /**
  5929. * Validate component names
  5930. */
  5931. function checkComponents (options) {
  5932. for (var key in options.components) {
  5933. validateComponentName(key);
  5934. }
  5935. }
  5936. function validateComponentName (name) {
  5937. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5938. warn(
  5939. 'Invalid component name: "' + name + '". Component names ' +
  5940. 'should conform to valid custom element name in html5 specification.'
  5941. );
  5942. }
  5943. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5944. warn(
  5945. 'Do not use built-in or reserved HTML elements as component ' +
  5946. 'id: ' + name
  5947. );
  5948. }
  5949. }
  5950. /**
  5951. * Ensure all props option syntax are normalized into the
  5952. * Object-based format.
  5953. */
  5954. function normalizeProps (options, vm) {
  5955. var props = options.props;
  5956. if (!props) { return }
  5957. var res = {};
  5958. var i, val, name;
  5959. if (Array.isArray(props)) {
  5960. i = props.length;
  5961. while (i--) {
  5962. val = props[i];
  5963. if (typeof val === 'string') {
  5964. name = camelize(val);
  5965. res[name] = { type: null };
  5966. } else if (true) {
  5967. warn('props must be strings when using array syntax.');
  5968. }
  5969. }
  5970. } else if (isPlainObject(props)) {
  5971. for (var key in props) {
  5972. val = props[key];
  5973. name = camelize(key);
  5974. res[name] = isPlainObject(val)
  5975. ? val
  5976. : { type: val };
  5977. }
  5978. } else if (true) {
  5979. warn(
  5980. "Invalid value for option \"props\": expected an Array or an Object, " +
  5981. "but got " + (toRawType(props)) + ".",
  5982. vm
  5983. );
  5984. }
  5985. options.props = res;
  5986. }
  5987. /**
  5988. * Normalize all injections into Object-based format
  5989. */
  5990. function normalizeInject (options, vm) {
  5991. var inject = options.inject;
  5992. if (!inject) { return }
  5993. var normalized = options.inject = {};
  5994. if (Array.isArray(inject)) {
  5995. for (var i = 0; i < inject.length; i++) {
  5996. normalized[inject[i]] = { from: inject[i] };
  5997. }
  5998. } else if (isPlainObject(inject)) {
  5999. for (var key in inject) {
  6000. var val = inject[key];
  6001. normalized[key] = isPlainObject(val)
  6002. ? extend({ from: key }, val)
  6003. : { from: val };
  6004. }
  6005. } else if (true) {
  6006. warn(
  6007. "Invalid value for option \"inject\": expected an Array or an Object, " +
  6008. "but got " + (toRawType(inject)) + ".",
  6009. vm
  6010. );
  6011. }
  6012. }
  6013. /**
  6014. * Normalize raw function directives into object format.
  6015. */
  6016. function normalizeDirectives (options) {
  6017. var dirs = options.directives;
  6018. if (dirs) {
  6019. for (var key in dirs) {
  6020. var def$$1 = dirs[key];
  6021. if (typeof def$$1 === 'function') {
  6022. dirs[key] = { bind: def$$1, update: def$$1 };
  6023. }
  6024. }
  6025. }
  6026. }
  6027. function assertObjectType (name, value, vm) {
  6028. if (!isPlainObject(value)) {
  6029. warn(
  6030. "Invalid value for option \"" + name + "\": expected an Object, " +
  6031. "but got " + (toRawType(value)) + ".",
  6032. vm
  6033. );
  6034. }
  6035. }
  6036. /**
  6037. * Merge two option objects into a new one.
  6038. * Core utility used in both instantiation and inheritance.
  6039. */
  6040. function mergeOptions (
  6041. parent,
  6042. child,
  6043. vm
  6044. ) {
  6045. if (true) {
  6046. checkComponents(child);
  6047. }
  6048. if (typeof child === 'function') {
  6049. child = child.options;
  6050. }
  6051. normalizeProps(child, vm);
  6052. normalizeInject(child, vm);
  6053. normalizeDirectives(child);
  6054. // Apply extends and mixins on the child options,
  6055. // but only if it is a raw options object that isn't
  6056. // the result of another mergeOptions call.
  6057. // Only merged options has the _base property.
  6058. if (!child._base) {
  6059. if (child.extends) {
  6060. parent = mergeOptions(parent, child.extends, vm);
  6061. }
  6062. if (child.mixins) {
  6063. for (var i = 0, l = child.mixins.length; i < l; i++) {
  6064. parent = mergeOptions(parent, child.mixins[i], vm);
  6065. }
  6066. }
  6067. }
  6068. var options = {};
  6069. var key;
  6070. for (key in parent) {
  6071. mergeField(key);
  6072. }
  6073. for (key in child) {
  6074. if (!hasOwn(parent, key)) {
  6075. mergeField(key);
  6076. }
  6077. }
  6078. function mergeField (key) {
  6079. var strat = strats[key] || defaultStrat;
  6080. options[key] = strat(parent[key], child[key], vm, key);
  6081. }
  6082. return options
  6083. }
  6084. /**
  6085. * Resolve an asset.
  6086. * This function is used because child instances need access
  6087. * to assets defined in its ancestor chain.
  6088. */
  6089. function resolveAsset (
  6090. options,
  6091. type,
  6092. id,
  6093. warnMissing
  6094. ) {
  6095. /* istanbul ignore if */
  6096. if (typeof id !== 'string') {
  6097. return
  6098. }
  6099. var assets = options[type];
  6100. // check local registration variations first
  6101. if (hasOwn(assets, id)) { return assets[id] }
  6102. var camelizedId = camelize(id);
  6103. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6104. var PascalCaseId = capitalize(camelizedId);
  6105. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6106. // fallback to prototype chain
  6107. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6108. if ( true && warnMissing && !res) {
  6109. warn(
  6110. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6111. options
  6112. );
  6113. }
  6114. return res
  6115. }
  6116. /* */
  6117. function validateProp (
  6118. key,
  6119. propOptions,
  6120. propsData,
  6121. vm
  6122. ) {
  6123. var prop = propOptions[key];
  6124. var absent = !hasOwn(propsData, key);
  6125. var value = propsData[key];
  6126. // boolean casting
  6127. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6128. if (booleanIndex > -1) {
  6129. if (absent && !hasOwn(prop, 'default')) {
  6130. value = false;
  6131. } else if (value === '' || value === hyphenate(key)) {
  6132. // only cast empty string / same name to boolean if
  6133. // boolean has higher priority
  6134. var stringIndex = getTypeIndex(String, prop.type);
  6135. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6136. value = true;
  6137. }
  6138. }
  6139. }
  6140. // check default value
  6141. if (value === undefined) {
  6142. value = getPropDefaultValue(vm, prop, key);
  6143. // since the default value is a fresh copy,
  6144. // make sure to observe it.
  6145. var prevShouldObserve = shouldObserve;
  6146. toggleObserving(true);
  6147. observe(value);
  6148. toggleObserving(prevShouldObserve);
  6149. }
  6150. if (
  6151. true
  6152. ) {
  6153. assertProp(prop, key, value, vm, absent);
  6154. }
  6155. return value
  6156. }
  6157. /**
  6158. * Get the default value of a prop.
  6159. */
  6160. function getPropDefaultValue (vm, prop, key) {
  6161. // no default, return undefined
  6162. if (!hasOwn(prop, 'default')) {
  6163. return undefined
  6164. }
  6165. var def = prop.default;
  6166. // warn against non-factory defaults for Object & Array
  6167. if ( true && isObject(def)) {
  6168. warn(
  6169. 'Invalid default value for prop "' + key + '": ' +
  6170. 'Props with type Object/Array must use a factory function ' +
  6171. 'to return the default value.',
  6172. vm
  6173. );
  6174. }
  6175. // the raw prop value was also undefined from previous render,
  6176. // return previous default value to avoid unnecessary watcher trigger
  6177. if (vm && vm.$options.propsData &&
  6178. vm.$options.propsData[key] === undefined &&
  6179. vm._props[key] !== undefined
  6180. ) {
  6181. return vm._props[key]
  6182. }
  6183. // call factory function for non-Function types
  6184. // a value is Function if its prototype is function even across different execution context
  6185. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6186. ? def.call(vm)
  6187. : def
  6188. }
  6189. /**
  6190. * Assert whether a prop is valid.
  6191. */
  6192. function assertProp (
  6193. prop,
  6194. name,
  6195. value,
  6196. vm,
  6197. absent
  6198. ) {
  6199. if (prop.required && absent) {
  6200. warn(
  6201. 'Missing required prop: "' + name + '"',
  6202. vm
  6203. );
  6204. return
  6205. }
  6206. if (value == null && !prop.required) {
  6207. return
  6208. }
  6209. var type = prop.type;
  6210. var valid = !type || type === true;
  6211. var expectedTypes = [];
  6212. if (type) {
  6213. if (!Array.isArray(type)) {
  6214. type = [type];
  6215. }
  6216. for (var i = 0; i < type.length && !valid; i++) {
  6217. var assertedType = assertType(value, type[i]);
  6218. expectedTypes.push(assertedType.expectedType || '');
  6219. valid = assertedType.valid;
  6220. }
  6221. }
  6222. if (!valid) {
  6223. warn(
  6224. getInvalidTypeMessage(name, value, expectedTypes),
  6225. vm
  6226. );
  6227. return
  6228. }
  6229. var validator = prop.validator;
  6230. if (validator) {
  6231. if (!validator(value)) {
  6232. warn(
  6233. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6234. vm
  6235. );
  6236. }
  6237. }
  6238. }
  6239. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6240. function assertType (value, type) {
  6241. var valid;
  6242. var expectedType = getType(type);
  6243. if (simpleCheckRE.test(expectedType)) {
  6244. var t = typeof value;
  6245. valid = t === expectedType.toLowerCase();
  6246. // for primitive wrapper objects
  6247. if (!valid && t === 'object') {
  6248. valid = value instanceof type;
  6249. }
  6250. } else if (expectedType === 'Object') {
  6251. valid = isPlainObject(value);
  6252. } else if (expectedType === 'Array') {
  6253. valid = Array.isArray(value);
  6254. } else {
  6255. valid = value instanceof type;
  6256. }
  6257. return {
  6258. valid: valid,
  6259. expectedType: expectedType
  6260. }
  6261. }
  6262. /**
  6263. * Use function string name to check built-in types,
  6264. * because a simple equality check will fail when running
  6265. * across different vms / iframes.
  6266. */
  6267. function getType (fn) {
  6268. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6269. return match ? match[1] : ''
  6270. }
  6271. function isSameType (a, b) {
  6272. return getType(a) === getType(b)
  6273. }
  6274. function getTypeIndex (type, expectedTypes) {
  6275. if (!Array.isArray(expectedTypes)) {
  6276. return isSameType(expectedTypes, type) ? 0 : -1
  6277. }
  6278. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6279. if (isSameType(expectedTypes[i], type)) {
  6280. return i
  6281. }
  6282. }
  6283. return -1
  6284. }
  6285. function getInvalidTypeMessage (name, value, expectedTypes) {
  6286. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6287. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6288. var expectedType = expectedTypes[0];
  6289. var receivedType = toRawType(value);
  6290. var expectedValue = styleValue(value, expectedType);
  6291. var receivedValue = styleValue(value, receivedType);
  6292. // check if we need to specify expected value
  6293. if (expectedTypes.length === 1 &&
  6294. isExplicable(expectedType) &&
  6295. !isBoolean(expectedType, receivedType)) {
  6296. message += " with value " + expectedValue;
  6297. }
  6298. message += ", got " + receivedType + " ";
  6299. // check if we need to specify received value
  6300. if (isExplicable(receivedType)) {
  6301. message += "with value " + receivedValue + ".";
  6302. }
  6303. return message
  6304. }
  6305. function styleValue (value, type) {
  6306. if (type === 'String') {
  6307. return ("\"" + value + "\"")
  6308. } else if (type === 'Number') {
  6309. return ("" + (Number(value)))
  6310. } else {
  6311. return ("" + value)
  6312. }
  6313. }
  6314. function isExplicable (value) {
  6315. var explicitTypes = ['string', 'number', 'boolean'];
  6316. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6317. }
  6318. function isBoolean () {
  6319. var args = [], len = arguments.length;
  6320. while ( len-- ) args[ len ] = arguments[ len ];
  6321. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6322. }
  6323. /* */
  6324. function handleError (err, vm, info) {
  6325. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6326. // See: https://github.com/vuejs/vuex/issues/1505
  6327. pushTarget();
  6328. try {
  6329. if (vm) {
  6330. var cur = vm;
  6331. while ((cur = cur.$parent)) {
  6332. var hooks = cur.$options.errorCaptured;
  6333. if (hooks) {
  6334. for (var i = 0; i < hooks.length; i++) {
  6335. try {
  6336. var capture = hooks[i].call(cur, err, vm, info) === false;
  6337. if (capture) { return }
  6338. } catch (e) {
  6339. globalHandleError(e, cur, 'errorCaptured hook');
  6340. }
  6341. }
  6342. }
  6343. }
  6344. }
  6345. globalHandleError(err, vm, info);
  6346. } finally {
  6347. popTarget();
  6348. }
  6349. }
  6350. function invokeWithErrorHandling (
  6351. handler,
  6352. context,
  6353. args,
  6354. vm,
  6355. info
  6356. ) {
  6357. var res;
  6358. try {
  6359. res = args ? handler.apply(context, args) : handler.call(context);
  6360. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6361. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6362. // issue #9511
  6363. // avoid catch triggering multiple times when nested calls
  6364. res._handled = true;
  6365. }
  6366. } catch (e) {
  6367. handleError(e, vm, info);
  6368. }
  6369. return res
  6370. }
  6371. function globalHandleError (err, vm, info) {
  6372. if (config.errorHandler) {
  6373. try {
  6374. return config.errorHandler.call(null, err, vm, info)
  6375. } catch (e) {
  6376. // if the user intentionally throws the original error in the handler,
  6377. // do not log it twice
  6378. if (e !== err) {
  6379. logError(e, null, 'config.errorHandler');
  6380. }
  6381. }
  6382. }
  6383. logError(err, vm, info);
  6384. }
  6385. function logError (err, vm, info) {
  6386. if (true) {
  6387. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6388. }
  6389. /* istanbul ignore else */
  6390. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6391. console.error(err);
  6392. } else {
  6393. throw err
  6394. }
  6395. }
  6396. /* */
  6397. var callbacks = [];
  6398. var pending = false;
  6399. function flushCallbacks () {
  6400. pending = false;
  6401. var copies = callbacks.slice(0);
  6402. callbacks.length = 0;
  6403. for (var i = 0; i < copies.length; i++) {
  6404. copies[i]();
  6405. }
  6406. }
  6407. // Here we have async deferring wrappers using microtasks.
  6408. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6409. // However, it has subtle problems when state is changed right before repaint
  6410. // (e.g. #6813, out-in transitions).
  6411. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6412. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6413. // So we now use microtasks everywhere, again.
  6414. // A major drawback of this tradeoff is that there are some scenarios
  6415. // where microtasks have too high a priority and fire in between supposedly
  6416. // sequential events (e.g. #4521, #6690, which have workarounds)
  6417. // or even between bubbling of the same event (#6566).
  6418. var timerFunc;
  6419. // The nextTick behavior leverages the microtask queue, which can be accessed
  6420. // via either native Promise.then or MutationObserver.
  6421. // MutationObserver has wider support, however it is seriously bugged in
  6422. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6423. // completely stops working after triggering a few times... so, if native
  6424. // Promise is available, we will use it:
  6425. /* istanbul ignore next, $flow-disable-line */
  6426. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6427. var p = Promise.resolve();
  6428. timerFunc = function () {
  6429. p.then(flushCallbacks);
  6430. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6431. // it can get stuck in a weird state where callbacks are pushed into the
  6432. // microtask queue but the queue isn't being flushed, until the browser
  6433. // needs to do some other work, e.g. handle a timer. Therefore we can
  6434. // "force" the microtask queue to be flushed by adding an empty timer.
  6435. if (isIOS) { setTimeout(noop); }
  6436. };
  6437. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6438. isNative(MutationObserver) ||
  6439. // PhantomJS and iOS 7.x
  6440. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6441. )) {
  6442. // Use MutationObserver where native Promise is not available,
  6443. // e.g. PhantomJS, iOS7, Android 4.4
  6444. // (#6466 MutationObserver is unreliable in IE11)
  6445. var counter = 1;
  6446. var observer = new MutationObserver(flushCallbacks);
  6447. var textNode = document.createTextNode(String(counter));
  6448. observer.observe(textNode, {
  6449. characterData: true
  6450. });
  6451. timerFunc = function () {
  6452. counter = (counter + 1) % 2;
  6453. textNode.data = String(counter);
  6454. };
  6455. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6456. // Fallback to setImmediate.
  6457. // Technically it leverages the (macro) task queue,
  6458. // but it is still a better choice than setTimeout.
  6459. timerFunc = function () {
  6460. setImmediate(flushCallbacks);
  6461. };
  6462. } else {
  6463. // Fallback to setTimeout.
  6464. timerFunc = function () {
  6465. setTimeout(flushCallbacks, 0);
  6466. };
  6467. }
  6468. function nextTick (cb, ctx) {
  6469. var _resolve;
  6470. callbacks.push(function () {
  6471. if (cb) {
  6472. try {
  6473. cb.call(ctx);
  6474. } catch (e) {
  6475. handleError(e, ctx, 'nextTick');
  6476. }
  6477. } else if (_resolve) {
  6478. _resolve(ctx);
  6479. }
  6480. });
  6481. if (!pending) {
  6482. pending = true;
  6483. timerFunc();
  6484. }
  6485. // $flow-disable-line
  6486. if (!cb && typeof Promise !== 'undefined') {
  6487. return new Promise(function (resolve) {
  6488. _resolve = resolve;
  6489. })
  6490. }
  6491. }
  6492. /* */
  6493. /* not type checking this file because flow doesn't play well with Proxy */
  6494. var initProxy;
  6495. if (true) {
  6496. var allowedGlobals = makeMap(
  6497. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6498. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6499. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6500. 'require' // for Webpack/Browserify
  6501. );
  6502. var warnNonPresent = function (target, key) {
  6503. warn(
  6504. "Property or method \"" + key + "\" is not defined on the instance but " +
  6505. 'referenced during render. Make sure that this property is reactive, ' +
  6506. 'either in the data option, or for class-based components, by ' +
  6507. 'initializing the property. ' +
  6508. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6509. target
  6510. );
  6511. };
  6512. var warnReservedPrefix = function (target, key) {
  6513. warn(
  6514. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6515. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6516. 'prevent conflicts with Vue internals. ' +
  6517. 'See: https://vuejs.org/v2/api/#data',
  6518. target
  6519. );
  6520. };
  6521. var hasProxy =
  6522. typeof Proxy !== 'undefined' && isNative(Proxy);
  6523. if (hasProxy) {
  6524. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6525. config.keyCodes = new Proxy(config.keyCodes, {
  6526. set: function set (target, key, value) {
  6527. if (isBuiltInModifier(key)) {
  6528. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6529. return false
  6530. } else {
  6531. target[key] = value;
  6532. return true
  6533. }
  6534. }
  6535. });
  6536. }
  6537. var hasHandler = {
  6538. has: function has (target, key) {
  6539. var has = key in target;
  6540. var isAllowed = allowedGlobals(key) ||
  6541. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6542. if (!has && !isAllowed) {
  6543. if (key in target.$data) { warnReservedPrefix(target, key); }
  6544. else { warnNonPresent(target, key); }
  6545. }
  6546. return has || !isAllowed
  6547. }
  6548. };
  6549. var getHandler = {
  6550. get: function get (target, key) {
  6551. if (typeof key === 'string' && !(key in target)) {
  6552. if (key in target.$data) { warnReservedPrefix(target, key); }
  6553. else { warnNonPresent(target, key); }
  6554. }
  6555. return target[key]
  6556. }
  6557. };
  6558. initProxy = function initProxy (vm) {
  6559. if (hasProxy) {
  6560. // determine which proxy handler to use
  6561. var options = vm.$options;
  6562. var handlers = options.render && options.render._withStripped
  6563. ? getHandler
  6564. : hasHandler;
  6565. vm._renderProxy = new Proxy(vm, handlers);
  6566. } else {
  6567. vm._renderProxy = vm;
  6568. }
  6569. };
  6570. }
  6571. /* */
  6572. var seenObjects = new _Set();
  6573. /**
  6574. * Recursively traverse an object to evoke all converted
  6575. * getters, so that every nested property inside the object
  6576. * is collected as a "deep" dependency.
  6577. */
  6578. function traverse (val) {
  6579. _traverse(val, seenObjects);
  6580. seenObjects.clear();
  6581. }
  6582. function _traverse (val, seen) {
  6583. var i, keys;
  6584. var isA = Array.isArray(val);
  6585. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6586. return
  6587. }
  6588. if (val.__ob__) {
  6589. var depId = val.__ob__.dep.id;
  6590. if (seen.has(depId)) {
  6591. return
  6592. }
  6593. seen.add(depId);
  6594. }
  6595. if (isA) {
  6596. i = val.length;
  6597. while (i--) { _traverse(val[i], seen); }
  6598. } else {
  6599. keys = Object.keys(val);
  6600. i = keys.length;
  6601. while (i--) { _traverse(val[keys[i]], seen); }
  6602. }
  6603. }
  6604. var mark;
  6605. var measure;
  6606. if (true) {
  6607. var perf = inBrowser && window.performance;
  6608. /* istanbul ignore if */
  6609. if (
  6610. perf &&
  6611. perf.mark &&
  6612. perf.measure &&
  6613. perf.clearMarks &&
  6614. perf.clearMeasures
  6615. ) {
  6616. mark = function (tag) { return perf.mark(tag); };
  6617. measure = function (name, startTag, endTag) {
  6618. perf.measure(name, startTag, endTag);
  6619. perf.clearMarks(startTag);
  6620. perf.clearMarks(endTag);
  6621. // perf.clearMeasures(name)
  6622. };
  6623. }
  6624. }
  6625. /* */
  6626. var normalizeEvent = cached(function (name) {
  6627. var passive = name.charAt(0) === '&';
  6628. name = passive ? name.slice(1) : name;
  6629. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6630. name = once$$1 ? name.slice(1) : name;
  6631. var capture = name.charAt(0) === '!';
  6632. name = capture ? name.slice(1) : name;
  6633. return {
  6634. name: name,
  6635. once: once$$1,
  6636. capture: capture,
  6637. passive: passive
  6638. }
  6639. });
  6640. function createFnInvoker (fns, vm) {
  6641. function invoker () {
  6642. var arguments$1 = arguments;
  6643. var fns = invoker.fns;
  6644. if (Array.isArray(fns)) {
  6645. var cloned = fns.slice();
  6646. for (var i = 0; i < cloned.length; i++) {
  6647. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6648. }
  6649. } else {
  6650. // return handler return value for single handlers
  6651. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6652. }
  6653. }
  6654. invoker.fns = fns;
  6655. return invoker
  6656. }
  6657. function updateListeners (
  6658. on,
  6659. oldOn,
  6660. add,
  6661. remove$$1,
  6662. createOnceHandler,
  6663. vm
  6664. ) {
  6665. var name, def$$1, cur, old, event;
  6666. for (name in on) {
  6667. def$$1 = cur = on[name];
  6668. old = oldOn[name];
  6669. event = normalizeEvent(name);
  6670. if (isUndef(cur)) {
  6671. true && warn(
  6672. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6673. vm
  6674. );
  6675. } else if (isUndef(old)) {
  6676. if (isUndef(cur.fns)) {
  6677. cur = on[name] = createFnInvoker(cur, vm);
  6678. }
  6679. if (isTrue(event.once)) {
  6680. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6681. }
  6682. add(event.name, cur, event.capture, event.passive, event.params);
  6683. } else if (cur !== old) {
  6684. old.fns = cur;
  6685. on[name] = old;
  6686. }
  6687. }
  6688. for (name in oldOn) {
  6689. if (isUndef(on[name])) {
  6690. event = normalizeEvent(name);
  6691. remove$$1(event.name, oldOn[name], event.capture);
  6692. }
  6693. }
  6694. }
  6695. /* */
  6696. /* */
  6697. // fixed by xxxxxx (mp properties)
  6698. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6699. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6700. if (isUndef(propOptions)) {
  6701. return res
  6702. }
  6703. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6704. var attrs = data.attrs;
  6705. var props = data.props;
  6706. if (isDef(attrs) || isDef(props)) {
  6707. for (var key in propOptions) {
  6708. var altKey = hyphenate(key);
  6709. var result = checkProp(res, props, key, altKey, true) ||
  6710. checkProp(res, attrs, key, altKey, false);
  6711. // externalClass
  6712. if (
  6713. result &&
  6714. res[key] &&
  6715. externalClasses.indexOf(altKey) !== -1 &&
  6716. context[camelize(res[key])]
  6717. ) {
  6718. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6719. res[key] = context[camelize(res[key])];
  6720. }
  6721. }
  6722. }
  6723. return res
  6724. }
  6725. function extractPropsFromVNodeData (
  6726. data,
  6727. Ctor,
  6728. tag,
  6729. context// fixed by xxxxxx
  6730. ) {
  6731. // we are only extracting raw values here.
  6732. // validation and default values are handled in the child
  6733. // component itself.
  6734. var propOptions = Ctor.options.props;
  6735. if (isUndef(propOptions)) {
  6736. // fixed by xxxxxx
  6737. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6738. }
  6739. var res = {};
  6740. var attrs = data.attrs;
  6741. var props = data.props;
  6742. if (isDef(attrs) || isDef(props)) {
  6743. for (var key in propOptions) {
  6744. var altKey = hyphenate(key);
  6745. if (true) {
  6746. var keyInLowerCase = key.toLowerCase();
  6747. if (
  6748. key !== keyInLowerCase &&
  6749. attrs && hasOwn(attrs, keyInLowerCase)
  6750. ) {
  6751. tip(
  6752. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6753. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6754. " \"" + key + "\". " +
  6755. "Note that HTML attributes are case-insensitive and camelCased " +
  6756. "props need to use their kebab-case equivalents when using in-DOM " +
  6757. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6758. );
  6759. }
  6760. }
  6761. checkProp(res, props, key, altKey, true) ||
  6762. checkProp(res, attrs, key, altKey, false);
  6763. }
  6764. }
  6765. // fixed by xxxxxx
  6766. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6767. }
  6768. function checkProp (
  6769. res,
  6770. hash,
  6771. key,
  6772. altKey,
  6773. preserve
  6774. ) {
  6775. if (isDef(hash)) {
  6776. if (hasOwn(hash, key)) {
  6777. res[key] = hash[key];
  6778. if (!preserve) {
  6779. delete hash[key];
  6780. }
  6781. return true
  6782. } else if (hasOwn(hash, altKey)) {
  6783. res[key] = hash[altKey];
  6784. if (!preserve) {
  6785. delete hash[altKey];
  6786. }
  6787. return true
  6788. }
  6789. }
  6790. return false
  6791. }
  6792. /* */
  6793. // The template compiler attempts to minimize the need for normalization by
  6794. // statically analyzing the template at compile time.
  6795. //
  6796. // For plain HTML markup, normalization can be completely skipped because the
  6797. // generated render function is guaranteed to return Array<VNode>. There are
  6798. // two cases where extra normalization is needed:
  6799. // 1. When the children contains components - because a functional component
  6800. // may return an Array instead of a single root. In this case, just a simple
  6801. // normalization is needed - if any child is an Array, we flatten the whole
  6802. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6803. // because functional components already normalize their own children.
  6804. function simpleNormalizeChildren (children) {
  6805. for (var i = 0; i < children.length; i++) {
  6806. if (Array.isArray(children[i])) {
  6807. return Array.prototype.concat.apply([], children)
  6808. }
  6809. }
  6810. return children
  6811. }
  6812. // 2. When the children contains constructs that always generated nested Arrays,
  6813. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6814. // with hand-written render functions / JSX. In such cases a full normalization
  6815. // is needed to cater to all possible types of children values.
  6816. function normalizeChildren (children) {
  6817. return isPrimitive(children)
  6818. ? [createTextVNode(children)]
  6819. : Array.isArray(children)
  6820. ? normalizeArrayChildren(children)
  6821. : undefined
  6822. }
  6823. function isTextNode (node) {
  6824. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6825. }
  6826. function normalizeArrayChildren (children, nestedIndex) {
  6827. var res = [];
  6828. var i, c, lastIndex, last;
  6829. for (i = 0; i < children.length; i++) {
  6830. c = children[i];
  6831. if (isUndef(c) || typeof c === 'boolean') { continue }
  6832. lastIndex = res.length - 1;
  6833. last = res[lastIndex];
  6834. // nested
  6835. if (Array.isArray(c)) {
  6836. if (c.length > 0) {
  6837. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6838. // merge adjacent text nodes
  6839. if (isTextNode(c[0]) && isTextNode(last)) {
  6840. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6841. c.shift();
  6842. }
  6843. res.push.apply(res, c);
  6844. }
  6845. } else if (isPrimitive(c)) {
  6846. if (isTextNode(last)) {
  6847. // merge adjacent text nodes
  6848. // this is necessary for SSR hydration because text nodes are
  6849. // essentially merged when rendered to HTML strings
  6850. res[lastIndex] = createTextVNode(last.text + c);
  6851. } else if (c !== '') {
  6852. // convert primitive to vnode
  6853. res.push(createTextVNode(c));
  6854. }
  6855. } else {
  6856. if (isTextNode(c) && isTextNode(last)) {
  6857. // merge adjacent text nodes
  6858. res[lastIndex] = createTextVNode(last.text + c.text);
  6859. } else {
  6860. // default key for nested array children (likely generated by v-for)
  6861. if (isTrue(children._isVList) &&
  6862. isDef(c.tag) &&
  6863. isUndef(c.key) &&
  6864. isDef(nestedIndex)) {
  6865. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6866. }
  6867. res.push(c);
  6868. }
  6869. }
  6870. }
  6871. return res
  6872. }
  6873. /* */
  6874. function initProvide (vm) {
  6875. var provide = vm.$options.provide;
  6876. if (provide) {
  6877. vm._provided = typeof provide === 'function'
  6878. ? provide.call(vm)
  6879. : provide;
  6880. }
  6881. }
  6882. function initInjections (vm) {
  6883. var result = resolveInject(vm.$options.inject, vm);
  6884. if (result) {
  6885. toggleObserving(false);
  6886. Object.keys(result).forEach(function (key) {
  6887. /* istanbul ignore else */
  6888. if (true) {
  6889. defineReactive$$1(vm, key, result[key], function () {
  6890. warn(
  6891. "Avoid mutating an injected value directly since the changes will be " +
  6892. "overwritten whenever the provided component re-renders. " +
  6893. "injection being mutated: \"" + key + "\"",
  6894. vm
  6895. );
  6896. });
  6897. } else {}
  6898. });
  6899. toggleObserving(true);
  6900. }
  6901. }
  6902. function resolveInject (inject, vm) {
  6903. if (inject) {
  6904. // inject is :any because flow is not smart enough to figure out cached
  6905. var result = Object.create(null);
  6906. var keys = hasSymbol
  6907. ? Reflect.ownKeys(inject)
  6908. : Object.keys(inject);
  6909. for (var i = 0; i < keys.length; i++) {
  6910. var key = keys[i];
  6911. // #6574 in case the inject object is observed...
  6912. if (key === '__ob__') { continue }
  6913. var provideKey = inject[key].from;
  6914. var source = vm;
  6915. while (source) {
  6916. if (source._provided && hasOwn(source._provided, provideKey)) {
  6917. result[key] = source._provided[provideKey];
  6918. break
  6919. }
  6920. source = source.$parent;
  6921. }
  6922. if (!source) {
  6923. if ('default' in inject[key]) {
  6924. var provideDefault = inject[key].default;
  6925. result[key] = typeof provideDefault === 'function'
  6926. ? provideDefault.call(vm)
  6927. : provideDefault;
  6928. } else if (true) {
  6929. warn(("Injection \"" + key + "\" not found"), vm);
  6930. }
  6931. }
  6932. }
  6933. return result
  6934. }
  6935. }
  6936. /* */
  6937. /**
  6938. * Runtime helper for resolving raw children VNodes into a slot object.
  6939. */
  6940. function resolveSlots (
  6941. children,
  6942. context
  6943. ) {
  6944. if (!children || !children.length) {
  6945. return {}
  6946. }
  6947. var slots = {};
  6948. for (var i = 0, l = children.length; i < l; i++) {
  6949. var child = children[i];
  6950. var data = child.data;
  6951. // remove slot attribute if the node is resolved as a Vue slot node
  6952. if (data && data.attrs && data.attrs.slot) {
  6953. delete data.attrs.slot;
  6954. }
  6955. // named slots should only be respected if the vnode was rendered in the
  6956. // same context.
  6957. if ((child.context === context || child.fnContext === context) &&
  6958. data && data.slot != null
  6959. ) {
  6960. var name = data.slot;
  6961. var slot = (slots[name] || (slots[name] = []));
  6962. if (child.tag === 'template') {
  6963. slot.push.apply(slot, child.children || []);
  6964. } else {
  6965. slot.push(child);
  6966. }
  6967. } else {
  6968. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6969. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6970. (slots['page'] || (slots['page'] = [])).push(child);
  6971. }else{
  6972. (slots.default || (slots.default = [])).push(child);
  6973. }
  6974. }
  6975. }
  6976. // ignore slots that contains only whitespace
  6977. for (var name$1 in slots) {
  6978. if (slots[name$1].every(isWhitespace)) {
  6979. delete slots[name$1];
  6980. }
  6981. }
  6982. return slots
  6983. }
  6984. function isWhitespace (node) {
  6985. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6986. }
  6987. /* */
  6988. function normalizeScopedSlots (
  6989. slots,
  6990. normalSlots,
  6991. prevSlots
  6992. ) {
  6993. var res;
  6994. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6995. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6996. var key = slots && slots.$key;
  6997. if (!slots) {
  6998. res = {};
  6999. } else if (slots._normalized) {
  7000. // fast path 1: child component re-render only, parent did not change
  7001. return slots._normalized
  7002. } else if (
  7003. isStable &&
  7004. prevSlots &&
  7005. prevSlots !== emptyObject &&
  7006. key === prevSlots.$key &&
  7007. !hasNormalSlots &&
  7008. !prevSlots.$hasNormal
  7009. ) {
  7010. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  7011. // only need to normalize once
  7012. return prevSlots
  7013. } else {
  7014. res = {};
  7015. for (var key$1 in slots) {
  7016. if (slots[key$1] && key$1[0] !== '$') {
  7017. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  7018. }
  7019. }
  7020. }
  7021. // expose normal slots on scopedSlots
  7022. for (var key$2 in normalSlots) {
  7023. if (!(key$2 in res)) {
  7024. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  7025. }
  7026. }
  7027. // avoriaz seems to mock a non-extensible $scopedSlots object
  7028. // and when that is passed down this would cause an error
  7029. if (slots && Object.isExtensible(slots)) {
  7030. (slots)._normalized = res;
  7031. }
  7032. def(res, '$stable', isStable);
  7033. def(res, '$key', key);
  7034. def(res, '$hasNormal', hasNormalSlots);
  7035. return res
  7036. }
  7037. function normalizeScopedSlot(normalSlots, key, fn) {
  7038. var normalized = function () {
  7039. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  7040. res = res && typeof res === 'object' && !Array.isArray(res)
  7041. ? [res] // single vnode
  7042. : normalizeChildren(res);
  7043. return res && (
  7044. res.length === 0 ||
  7045. (res.length === 1 && res[0].isComment) // #9658
  7046. ) ? undefined
  7047. : res
  7048. };
  7049. // this is a slot using the new v-slot syntax without scope. although it is
  7050. // compiled as a scoped slot, render fn users would expect it to be present
  7051. // on this.$slots because the usage is semantically a normal slot.
  7052. if (fn.proxy) {
  7053. Object.defineProperty(normalSlots, key, {
  7054. get: normalized,
  7055. enumerable: true,
  7056. configurable: true
  7057. });
  7058. }
  7059. return normalized
  7060. }
  7061. function proxyNormalSlot(slots, key) {
  7062. return function () { return slots[key]; }
  7063. }
  7064. /* */
  7065. /**
  7066. * Runtime helper for rendering v-for lists.
  7067. */
  7068. function renderList (
  7069. val,
  7070. render
  7071. ) {
  7072. var ret, i, l, keys, key;
  7073. if (Array.isArray(val) || typeof val === 'string') {
  7074. ret = new Array(val.length);
  7075. for (i = 0, l = val.length; i < l; i++) {
  7076. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  7077. }
  7078. } else if (typeof val === 'number') {
  7079. ret = new Array(val);
  7080. for (i = 0; i < val; i++) {
  7081. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  7082. }
  7083. } else if (isObject(val)) {
  7084. if (hasSymbol && val[Symbol.iterator]) {
  7085. ret = [];
  7086. var iterator = val[Symbol.iterator]();
  7087. var result = iterator.next();
  7088. while (!result.done) {
  7089. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  7090. result = iterator.next();
  7091. }
  7092. } else {
  7093. keys = Object.keys(val);
  7094. ret = new Array(keys.length);
  7095. for (i = 0, l = keys.length; i < l; i++) {
  7096. key = keys[i];
  7097. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7098. }
  7099. }
  7100. }
  7101. if (!isDef(ret)) {
  7102. ret = [];
  7103. }
  7104. (ret)._isVList = true;
  7105. return ret
  7106. }
  7107. /* */
  7108. /**
  7109. * Runtime helper for rendering <slot>
  7110. */
  7111. function renderSlot (
  7112. name,
  7113. fallback,
  7114. props,
  7115. bindObject
  7116. ) {
  7117. var scopedSlotFn = this.$scopedSlots[name];
  7118. var nodes;
  7119. if (scopedSlotFn) { // scoped slot
  7120. props = props || {};
  7121. if (bindObject) {
  7122. if ( true && !isObject(bindObject)) {
  7123. warn(
  7124. 'slot v-bind without argument expects an Object',
  7125. this
  7126. );
  7127. }
  7128. props = extend(extend({}, bindObject), props);
  7129. }
  7130. // fixed by xxxxxx app-plus scopedSlot
  7131. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7132. } else {
  7133. nodes = this.$slots[name] || fallback;
  7134. }
  7135. var target = props && props.slot;
  7136. if (target) {
  7137. return this.$createElement('template', { slot: target }, nodes)
  7138. } else {
  7139. return nodes
  7140. }
  7141. }
  7142. /* */
  7143. /**
  7144. * Runtime helper for resolving filters
  7145. */
  7146. function resolveFilter (id) {
  7147. return resolveAsset(this.$options, 'filters', id, true) || identity
  7148. }
  7149. /* */
  7150. function isKeyNotMatch (expect, actual) {
  7151. if (Array.isArray(expect)) {
  7152. return expect.indexOf(actual) === -1
  7153. } else {
  7154. return expect !== actual
  7155. }
  7156. }
  7157. /**
  7158. * Runtime helper for checking keyCodes from config.
  7159. * exposed as Vue.prototype._k
  7160. * passing in eventKeyName as last argument separately for backwards compat
  7161. */
  7162. function checkKeyCodes (
  7163. eventKeyCode,
  7164. key,
  7165. builtInKeyCode,
  7166. eventKeyName,
  7167. builtInKeyName
  7168. ) {
  7169. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7170. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7171. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7172. } else if (mappedKeyCode) {
  7173. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7174. } else if (eventKeyName) {
  7175. return hyphenate(eventKeyName) !== key
  7176. }
  7177. }
  7178. /* */
  7179. /**
  7180. * Runtime helper for merging v-bind="object" into a VNode's data.
  7181. */
  7182. function bindObjectProps (
  7183. data,
  7184. tag,
  7185. value,
  7186. asProp,
  7187. isSync
  7188. ) {
  7189. if (value) {
  7190. if (!isObject(value)) {
  7191. true && warn(
  7192. 'v-bind without argument expects an Object or Array value',
  7193. this
  7194. );
  7195. } else {
  7196. if (Array.isArray(value)) {
  7197. value = toObject(value);
  7198. }
  7199. var hash;
  7200. var loop = function ( key ) {
  7201. if (
  7202. key === 'class' ||
  7203. key === 'style' ||
  7204. isReservedAttribute(key)
  7205. ) {
  7206. hash = data;
  7207. } else {
  7208. var type = data.attrs && data.attrs.type;
  7209. hash = asProp || config.mustUseProp(tag, type, key)
  7210. ? data.domProps || (data.domProps = {})
  7211. : data.attrs || (data.attrs = {});
  7212. }
  7213. var camelizedKey = camelize(key);
  7214. var hyphenatedKey = hyphenate(key);
  7215. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7216. hash[key] = value[key];
  7217. if (isSync) {
  7218. var on = data.on || (data.on = {});
  7219. on[("update:" + key)] = function ($event) {
  7220. value[key] = $event;
  7221. };
  7222. }
  7223. }
  7224. };
  7225. for (var key in value) loop( key );
  7226. }
  7227. }
  7228. return data
  7229. }
  7230. /* */
  7231. /**
  7232. * Runtime helper for rendering static trees.
  7233. */
  7234. function renderStatic (
  7235. index,
  7236. isInFor
  7237. ) {
  7238. var cached = this._staticTrees || (this._staticTrees = []);
  7239. var tree = cached[index];
  7240. // if has already-rendered static tree and not inside v-for,
  7241. // we can reuse the same tree.
  7242. if (tree && !isInFor) {
  7243. return tree
  7244. }
  7245. // otherwise, render a fresh tree.
  7246. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7247. this._renderProxy,
  7248. null,
  7249. this // for render fns generated for functional component templates
  7250. );
  7251. markStatic(tree, ("__static__" + index), false);
  7252. return tree
  7253. }
  7254. /**
  7255. * Runtime helper for v-once.
  7256. * Effectively it means marking the node as static with a unique key.
  7257. */
  7258. function markOnce (
  7259. tree,
  7260. index,
  7261. key
  7262. ) {
  7263. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7264. return tree
  7265. }
  7266. function markStatic (
  7267. tree,
  7268. key,
  7269. isOnce
  7270. ) {
  7271. if (Array.isArray(tree)) {
  7272. for (var i = 0; i < tree.length; i++) {
  7273. if (tree[i] && typeof tree[i] !== 'string') {
  7274. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7275. }
  7276. }
  7277. } else {
  7278. markStaticNode(tree, key, isOnce);
  7279. }
  7280. }
  7281. function markStaticNode (node, key, isOnce) {
  7282. node.isStatic = true;
  7283. node.key = key;
  7284. node.isOnce = isOnce;
  7285. }
  7286. /* */
  7287. function bindObjectListeners (data, value) {
  7288. if (value) {
  7289. if (!isPlainObject(value)) {
  7290. true && warn(
  7291. 'v-on without argument expects an Object value',
  7292. this
  7293. );
  7294. } else {
  7295. var on = data.on = data.on ? extend({}, data.on) : {};
  7296. for (var key in value) {
  7297. var existing = on[key];
  7298. var ours = value[key];
  7299. on[key] = existing ? [].concat(existing, ours) : ours;
  7300. }
  7301. }
  7302. }
  7303. return data
  7304. }
  7305. /* */
  7306. function resolveScopedSlots (
  7307. fns, // see flow/vnode
  7308. res,
  7309. // the following are added in 2.6
  7310. hasDynamicKeys,
  7311. contentHashKey
  7312. ) {
  7313. res = res || { $stable: !hasDynamicKeys };
  7314. for (var i = 0; i < fns.length; i++) {
  7315. var slot = fns[i];
  7316. if (Array.isArray(slot)) {
  7317. resolveScopedSlots(slot, res, hasDynamicKeys);
  7318. } else if (slot) {
  7319. // marker for reverse proxying v-slot without scope on this.$slots
  7320. if (slot.proxy) {
  7321. slot.fn.proxy = true;
  7322. }
  7323. res[slot.key] = slot.fn;
  7324. }
  7325. }
  7326. if (contentHashKey) {
  7327. (res).$key = contentHashKey;
  7328. }
  7329. return res
  7330. }
  7331. /* */
  7332. function bindDynamicKeys (baseObj, values) {
  7333. for (var i = 0; i < values.length; i += 2) {
  7334. var key = values[i];
  7335. if (typeof key === 'string' && key) {
  7336. baseObj[values[i]] = values[i + 1];
  7337. } else if ( true && key !== '' && key !== null) {
  7338. // null is a special value for explicitly removing a binding
  7339. warn(
  7340. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7341. this
  7342. );
  7343. }
  7344. }
  7345. return baseObj
  7346. }
  7347. // helper to dynamically append modifier runtime markers to event names.
  7348. // ensure only append when value is already string, otherwise it will be cast
  7349. // to string and cause the type check to miss.
  7350. function prependModifier (value, symbol) {
  7351. return typeof value === 'string' ? symbol + value : value
  7352. }
  7353. /* */
  7354. function installRenderHelpers (target) {
  7355. target._o = markOnce;
  7356. target._n = toNumber;
  7357. target._s = toString;
  7358. target._l = renderList;
  7359. target._t = renderSlot;
  7360. target._q = looseEqual;
  7361. target._i = looseIndexOf;
  7362. target._m = renderStatic;
  7363. target._f = resolveFilter;
  7364. target._k = checkKeyCodes;
  7365. target._b = bindObjectProps;
  7366. target._v = createTextVNode;
  7367. target._e = createEmptyVNode;
  7368. target._u = resolveScopedSlots;
  7369. target._g = bindObjectListeners;
  7370. target._d = bindDynamicKeys;
  7371. target._p = prependModifier;
  7372. }
  7373. /* */
  7374. function FunctionalRenderContext (
  7375. data,
  7376. props,
  7377. children,
  7378. parent,
  7379. Ctor
  7380. ) {
  7381. var this$1 = this;
  7382. var options = Ctor.options;
  7383. // ensure the createElement function in functional components
  7384. // gets a unique context - this is necessary for correct named slot check
  7385. var contextVm;
  7386. if (hasOwn(parent, '_uid')) {
  7387. contextVm = Object.create(parent);
  7388. // $flow-disable-line
  7389. contextVm._original = parent;
  7390. } else {
  7391. // the context vm passed in is a functional context as well.
  7392. // in this case we want to make sure we are able to get a hold to the
  7393. // real context instance.
  7394. contextVm = parent;
  7395. // $flow-disable-line
  7396. parent = parent._original;
  7397. }
  7398. var isCompiled = isTrue(options._compiled);
  7399. var needNormalization = !isCompiled;
  7400. this.data = data;
  7401. this.props = props;
  7402. this.children = children;
  7403. this.parent = parent;
  7404. this.listeners = data.on || emptyObject;
  7405. this.injections = resolveInject(options.inject, parent);
  7406. this.slots = function () {
  7407. if (!this$1.$slots) {
  7408. normalizeScopedSlots(
  7409. data.scopedSlots,
  7410. this$1.$slots = resolveSlots(children, parent)
  7411. );
  7412. }
  7413. return this$1.$slots
  7414. };
  7415. Object.defineProperty(this, 'scopedSlots', ({
  7416. enumerable: true,
  7417. get: function get () {
  7418. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7419. }
  7420. }));
  7421. // support for compiled functional template
  7422. if (isCompiled) {
  7423. // exposing $options for renderStatic()
  7424. this.$options = options;
  7425. // pre-resolve slots for renderSlot()
  7426. this.$slots = this.slots();
  7427. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7428. }
  7429. if (options._scopeId) {
  7430. this._c = function (a, b, c, d) {
  7431. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7432. if (vnode && !Array.isArray(vnode)) {
  7433. vnode.fnScopeId = options._scopeId;
  7434. vnode.fnContext = parent;
  7435. }
  7436. return vnode
  7437. };
  7438. } else {
  7439. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7440. }
  7441. }
  7442. installRenderHelpers(FunctionalRenderContext.prototype);
  7443. function createFunctionalComponent (
  7444. Ctor,
  7445. propsData,
  7446. data,
  7447. contextVm,
  7448. children
  7449. ) {
  7450. var options = Ctor.options;
  7451. var props = {};
  7452. var propOptions = options.props;
  7453. if (isDef(propOptions)) {
  7454. for (var key in propOptions) {
  7455. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7456. }
  7457. } else {
  7458. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7459. if (isDef(data.props)) { mergeProps(props, data.props); }
  7460. }
  7461. var renderContext = new FunctionalRenderContext(
  7462. data,
  7463. props,
  7464. children,
  7465. contextVm,
  7466. Ctor
  7467. );
  7468. var vnode = options.render.call(null, renderContext._c, renderContext);
  7469. if (vnode instanceof VNode) {
  7470. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7471. } else if (Array.isArray(vnode)) {
  7472. var vnodes = normalizeChildren(vnode) || [];
  7473. var res = new Array(vnodes.length);
  7474. for (var i = 0; i < vnodes.length; i++) {
  7475. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7476. }
  7477. return res
  7478. }
  7479. }
  7480. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7481. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7482. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7483. // that should not be matched to match.
  7484. var clone = cloneVNode(vnode);
  7485. clone.fnContext = contextVm;
  7486. clone.fnOptions = options;
  7487. if (true) {
  7488. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7489. }
  7490. if (data.slot) {
  7491. (clone.data || (clone.data = {})).slot = data.slot;
  7492. }
  7493. return clone
  7494. }
  7495. function mergeProps (to, from) {
  7496. for (var key in from) {
  7497. to[camelize(key)] = from[key];
  7498. }
  7499. }
  7500. /* */
  7501. /* */
  7502. /* */
  7503. /* */
  7504. // inline hooks to be invoked on component VNodes during patch
  7505. var componentVNodeHooks = {
  7506. init: function init (vnode, hydrating) {
  7507. if (
  7508. vnode.componentInstance &&
  7509. !vnode.componentInstance._isDestroyed &&
  7510. vnode.data.keepAlive
  7511. ) {
  7512. // kept-alive components, treat as a patch
  7513. var mountedNode = vnode; // work around flow
  7514. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7515. } else {
  7516. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7517. vnode,
  7518. activeInstance
  7519. );
  7520. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7521. }
  7522. },
  7523. prepatch: function prepatch (oldVnode, vnode) {
  7524. var options = vnode.componentOptions;
  7525. var child = vnode.componentInstance = oldVnode.componentInstance;
  7526. updateChildComponent(
  7527. child,
  7528. options.propsData, // updated props
  7529. options.listeners, // updated listeners
  7530. vnode, // new parent vnode
  7531. options.children // new children
  7532. );
  7533. },
  7534. insert: function insert (vnode) {
  7535. var context = vnode.context;
  7536. var componentInstance = vnode.componentInstance;
  7537. if (!componentInstance._isMounted) {
  7538. callHook(componentInstance, 'onServiceCreated');
  7539. callHook(componentInstance, 'onServiceAttached');
  7540. componentInstance._isMounted = true;
  7541. callHook(componentInstance, 'mounted');
  7542. }
  7543. if (vnode.data.keepAlive) {
  7544. if (context._isMounted) {
  7545. // vue-router#1212
  7546. // During updates, a kept-alive component's child components may
  7547. // change, so directly walking the tree here may call activated hooks
  7548. // on incorrect children. Instead we push them into a queue which will
  7549. // be processed after the whole patch process ended.
  7550. queueActivatedComponent(componentInstance);
  7551. } else {
  7552. activateChildComponent(componentInstance, true /* direct */);
  7553. }
  7554. }
  7555. },
  7556. destroy: function destroy (vnode) {
  7557. var componentInstance = vnode.componentInstance;
  7558. if (!componentInstance._isDestroyed) {
  7559. if (!vnode.data.keepAlive) {
  7560. componentInstance.$destroy();
  7561. } else {
  7562. deactivateChildComponent(componentInstance, true /* direct */);
  7563. }
  7564. }
  7565. }
  7566. };
  7567. var hooksToMerge = Object.keys(componentVNodeHooks);
  7568. function createComponent (
  7569. Ctor,
  7570. data,
  7571. context,
  7572. children,
  7573. tag
  7574. ) {
  7575. if (isUndef(Ctor)) {
  7576. return
  7577. }
  7578. var baseCtor = context.$options._base;
  7579. // plain options object: turn it into a constructor
  7580. if (isObject(Ctor)) {
  7581. Ctor = baseCtor.extend(Ctor);
  7582. }
  7583. // if at this stage it's not a constructor or an async component factory,
  7584. // reject.
  7585. if (typeof Ctor !== 'function') {
  7586. if (true) {
  7587. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7588. }
  7589. return
  7590. }
  7591. // async component
  7592. var asyncFactory;
  7593. if (isUndef(Ctor.cid)) {
  7594. asyncFactory = Ctor;
  7595. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7596. if (Ctor === undefined) {
  7597. // return a placeholder node for async component, which is rendered
  7598. // as a comment node but preserves all the raw information for the node.
  7599. // the information will be used for async server-rendering and hydration.
  7600. return createAsyncPlaceholder(
  7601. asyncFactory,
  7602. data,
  7603. context,
  7604. children,
  7605. tag
  7606. )
  7607. }
  7608. }
  7609. data = data || {};
  7610. // resolve constructor options in case global mixins are applied after
  7611. // component constructor creation
  7612. resolveConstructorOptions(Ctor);
  7613. // transform component v-model data into props & events
  7614. if (isDef(data.model)) {
  7615. transformModel(Ctor.options, data);
  7616. }
  7617. // extract props
  7618. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7619. // functional component
  7620. if (isTrue(Ctor.options.functional)) {
  7621. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7622. }
  7623. // extract listeners, since these needs to be treated as
  7624. // child component listeners instead of DOM listeners
  7625. var listeners = data.on;
  7626. // replace with listeners with .native modifier
  7627. // so it gets processed during parent component patch.
  7628. data.on = data.nativeOn;
  7629. if (isTrue(Ctor.options.abstract)) {
  7630. // abstract components do not keep anything
  7631. // other than props & listeners & slot
  7632. // work around flow
  7633. var slot = data.slot;
  7634. data = {};
  7635. if (slot) {
  7636. data.slot = slot;
  7637. }
  7638. }
  7639. // install component management hooks onto the placeholder node
  7640. installComponentHooks(data);
  7641. // return a placeholder vnode
  7642. var name = Ctor.options.name || tag;
  7643. var vnode = new VNode(
  7644. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7645. data, undefined, undefined, undefined, context,
  7646. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7647. asyncFactory
  7648. );
  7649. return vnode
  7650. }
  7651. function createComponentInstanceForVnode (
  7652. vnode, // we know it's MountedComponentVNode but flow doesn't
  7653. parent // activeInstance in lifecycle state
  7654. ) {
  7655. var options = {
  7656. _isComponent: true,
  7657. _parentVnode: vnode,
  7658. parent: parent
  7659. };
  7660. // check inline-template render functions
  7661. var inlineTemplate = vnode.data.inlineTemplate;
  7662. if (isDef(inlineTemplate)) {
  7663. options.render = inlineTemplate.render;
  7664. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7665. }
  7666. return new vnode.componentOptions.Ctor(options)
  7667. }
  7668. function installComponentHooks (data) {
  7669. var hooks = data.hook || (data.hook = {});
  7670. for (var i = 0; i < hooksToMerge.length; i++) {
  7671. var key = hooksToMerge[i];
  7672. var existing = hooks[key];
  7673. var toMerge = componentVNodeHooks[key];
  7674. if (existing !== toMerge && !(existing && existing._merged)) {
  7675. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7676. }
  7677. }
  7678. }
  7679. function mergeHook$1 (f1, f2) {
  7680. var merged = function (a, b) {
  7681. // flow complains about extra args which is why we use any
  7682. f1(a, b);
  7683. f2(a, b);
  7684. };
  7685. merged._merged = true;
  7686. return merged
  7687. }
  7688. // transform component v-model info (value and callback) into
  7689. // prop and event handler respectively.
  7690. function transformModel (options, data) {
  7691. var prop = (options.model && options.model.prop) || 'value';
  7692. var event = (options.model && options.model.event) || 'input'
  7693. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7694. var on = data.on || (data.on = {});
  7695. var existing = on[event];
  7696. var callback = data.model.callback;
  7697. if (isDef(existing)) {
  7698. if (
  7699. Array.isArray(existing)
  7700. ? existing.indexOf(callback) === -1
  7701. : existing !== callback
  7702. ) {
  7703. on[event] = [callback].concat(existing);
  7704. }
  7705. } else {
  7706. on[event] = callback;
  7707. }
  7708. }
  7709. /* */
  7710. var SIMPLE_NORMALIZE = 1;
  7711. var ALWAYS_NORMALIZE = 2;
  7712. // wrapper function for providing a more flexible interface
  7713. // without getting yelled at by flow
  7714. function createElement (
  7715. context,
  7716. tag,
  7717. data,
  7718. children,
  7719. normalizationType,
  7720. alwaysNormalize
  7721. ) {
  7722. if (Array.isArray(data) || isPrimitive(data)) {
  7723. normalizationType = children;
  7724. children = data;
  7725. data = undefined;
  7726. }
  7727. if (isTrue(alwaysNormalize)) {
  7728. normalizationType = ALWAYS_NORMALIZE;
  7729. }
  7730. return _createElement(context, tag, data, children, normalizationType)
  7731. }
  7732. function _createElement (
  7733. context,
  7734. tag,
  7735. data,
  7736. children,
  7737. normalizationType
  7738. ) {
  7739. if (isDef(data) && isDef((data).__ob__)) {
  7740. true && warn(
  7741. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7742. 'Always create fresh vnode data objects in each render!',
  7743. context
  7744. );
  7745. return createEmptyVNode()
  7746. }
  7747. // object syntax in v-bind
  7748. if (isDef(data) && isDef(data.is)) {
  7749. tag = data.is;
  7750. }
  7751. if (!tag) {
  7752. // in case of component :is set to falsy value
  7753. return createEmptyVNode()
  7754. }
  7755. // warn against non-primitive key
  7756. if ( true &&
  7757. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7758. ) {
  7759. {
  7760. warn(
  7761. 'Avoid using non-primitive value as key, ' +
  7762. 'use string/number value instead.',
  7763. context
  7764. );
  7765. }
  7766. }
  7767. // support single function children as default scoped slot
  7768. if (Array.isArray(children) &&
  7769. typeof children[0] === 'function'
  7770. ) {
  7771. data = data || {};
  7772. data.scopedSlots = { default: children[0] };
  7773. children.length = 0;
  7774. }
  7775. if (normalizationType === ALWAYS_NORMALIZE) {
  7776. children = normalizeChildren(children);
  7777. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7778. children = simpleNormalizeChildren(children);
  7779. }
  7780. var vnode, ns;
  7781. if (typeof tag === 'string') {
  7782. var Ctor;
  7783. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7784. if (config.isReservedTag(tag)) {
  7785. // platform built-in elements
  7786. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7787. warn(
  7788. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7789. context
  7790. );
  7791. }
  7792. vnode = new VNode(
  7793. config.parsePlatformTagName(tag), data, children,
  7794. undefined, undefined, context
  7795. );
  7796. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7797. // component
  7798. vnode = createComponent(Ctor, data, context, children, tag);
  7799. } else {
  7800. // unknown or unlisted namespaced elements
  7801. // check at runtime because it may get assigned a namespace when its
  7802. // parent normalizes children
  7803. vnode = new VNode(
  7804. tag, data, children,
  7805. undefined, undefined, context
  7806. );
  7807. }
  7808. } else {
  7809. // direct component options / constructor
  7810. vnode = createComponent(tag, data, context, children);
  7811. }
  7812. if (Array.isArray(vnode)) {
  7813. return vnode
  7814. } else if (isDef(vnode)) {
  7815. if (isDef(ns)) { applyNS(vnode, ns); }
  7816. if (isDef(data)) { registerDeepBindings(data); }
  7817. return vnode
  7818. } else {
  7819. return createEmptyVNode()
  7820. }
  7821. }
  7822. function applyNS (vnode, ns, force) {
  7823. vnode.ns = ns;
  7824. if (vnode.tag === 'foreignObject') {
  7825. // use default namespace inside foreignObject
  7826. ns = undefined;
  7827. force = true;
  7828. }
  7829. if (isDef(vnode.children)) {
  7830. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7831. var child = vnode.children[i];
  7832. if (isDef(child.tag) && (
  7833. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7834. applyNS(child, ns, force);
  7835. }
  7836. }
  7837. }
  7838. }
  7839. // ref #5318
  7840. // necessary to ensure parent re-render when deep bindings like :style and
  7841. // :class are used on slot nodes
  7842. function registerDeepBindings (data) {
  7843. if (isObject(data.style)) {
  7844. traverse(data.style);
  7845. }
  7846. if (isObject(data.class)) {
  7847. traverse(data.class);
  7848. }
  7849. }
  7850. /* */
  7851. function initRender (vm) {
  7852. vm._vnode = null; // the root of the child tree
  7853. vm._staticTrees = null; // v-once cached trees
  7854. var options = vm.$options;
  7855. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7856. var renderContext = parentVnode && parentVnode.context;
  7857. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7858. vm.$scopedSlots = emptyObject;
  7859. // bind the createElement fn to this instance
  7860. // so that we get proper render context inside it.
  7861. // args order: tag, data, children, normalizationType, alwaysNormalize
  7862. // internal version is used by render functions compiled from templates
  7863. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7864. // normalization is always applied for the public version, used in
  7865. // user-written render functions.
  7866. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7867. // $attrs & $listeners are exposed for easier HOC creation.
  7868. // they need to be reactive so that HOCs using them are always updated
  7869. var parentData = parentVnode && parentVnode.data;
  7870. /* istanbul ignore else */
  7871. if (true) {
  7872. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7873. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7874. }, true);
  7875. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7876. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7877. }, true);
  7878. } else {}
  7879. }
  7880. var currentRenderingInstance = null;
  7881. function renderMixin (Vue) {
  7882. // install runtime convenience helpers
  7883. installRenderHelpers(Vue.prototype);
  7884. Vue.prototype.$nextTick = function (fn) {
  7885. return nextTick(fn, this)
  7886. };
  7887. Vue.prototype._render = function () {
  7888. var vm = this;
  7889. var ref = vm.$options;
  7890. var render = ref.render;
  7891. var _parentVnode = ref._parentVnode;
  7892. if (_parentVnode) {
  7893. vm.$scopedSlots = normalizeScopedSlots(
  7894. _parentVnode.data.scopedSlots,
  7895. vm.$slots,
  7896. vm.$scopedSlots
  7897. );
  7898. }
  7899. // set parent vnode. this allows render functions to have access
  7900. // to the data on the placeholder node.
  7901. vm.$vnode = _parentVnode;
  7902. // render self
  7903. var vnode;
  7904. try {
  7905. // There's no need to maintain a stack because all render fns are called
  7906. // separately from one another. Nested component's render fns are called
  7907. // when parent component is patched.
  7908. currentRenderingInstance = vm;
  7909. vnode = render.call(vm._renderProxy, vm.$createElement);
  7910. } catch (e) {
  7911. handleError(e, vm, "render");
  7912. // return error render result,
  7913. // or previous vnode to prevent render error causing blank component
  7914. /* istanbul ignore else */
  7915. if ( true && vm.$options.renderError) {
  7916. try {
  7917. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7918. } catch (e) {
  7919. handleError(e, vm, "renderError");
  7920. vnode = vm._vnode;
  7921. }
  7922. } else {
  7923. vnode = vm._vnode;
  7924. }
  7925. } finally {
  7926. currentRenderingInstance = null;
  7927. }
  7928. // if the returned array contains only a single node, allow it
  7929. if (Array.isArray(vnode) && vnode.length === 1) {
  7930. vnode = vnode[0];
  7931. }
  7932. // return empty vnode in case the render function errored out
  7933. if (!(vnode instanceof VNode)) {
  7934. if ( true && Array.isArray(vnode)) {
  7935. warn(
  7936. 'Multiple root nodes returned from render function. Render function ' +
  7937. 'should return a single root node.',
  7938. vm
  7939. );
  7940. }
  7941. vnode = createEmptyVNode();
  7942. }
  7943. // set parent
  7944. vnode.parent = _parentVnode;
  7945. return vnode
  7946. };
  7947. }
  7948. /* */
  7949. function ensureCtor (comp, base) {
  7950. if (
  7951. comp.__esModule ||
  7952. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7953. ) {
  7954. comp = comp.default;
  7955. }
  7956. return isObject(comp)
  7957. ? base.extend(comp)
  7958. : comp
  7959. }
  7960. function createAsyncPlaceholder (
  7961. factory,
  7962. data,
  7963. context,
  7964. children,
  7965. tag
  7966. ) {
  7967. var node = createEmptyVNode();
  7968. node.asyncFactory = factory;
  7969. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7970. return node
  7971. }
  7972. function resolveAsyncComponent (
  7973. factory,
  7974. baseCtor
  7975. ) {
  7976. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7977. return factory.errorComp
  7978. }
  7979. if (isDef(factory.resolved)) {
  7980. return factory.resolved
  7981. }
  7982. var owner = currentRenderingInstance;
  7983. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7984. // already pending
  7985. factory.owners.push(owner);
  7986. }
  7987. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7988. return factory.loadingComp
  7989. }
  7990. if (owner && !isDef(factory.owners)) {
  7991. var owners = factory.owners = [owner];
  7992. var sync = true;
  7993. var timerLoading = null;
  7994. var timerTimeout = null
  7995. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7996. var forceRender = function (renderCompleted) {
  7997. for (var i = 0, l = owners.length; i < l; i++) {
  7998. (owners[i]).$forceUpdate();
  7999. }
  8000. if (renderCompleted) {
  8001. owners.length = 0;
  8002. if (timerLoading !== null) {
  8003. clearTimeout(timerLoading);
  8004. timerLoading = null;
  8005. }
  8006. if (timerTimeout !== null) {
  8007. clearTimeout(timerTimeout);
  8008. timerTimeout = null;
  8009. }
  8010. }
  8011. };
  8012. var resolve = once(function (res) {
  8013. // cache resolved
  8014. factory.resolved = ensureCtor(res, baseCtor);
  8015. // invoke callbacks only if this is not a synchronous resolve
  8016. // (async resolves are shimmed as synchronous during SSR)
  8017. if (!sync) {
  8018. forceRender(true);
  8019. } else {
  8020. owners.length = 0;
  8021. }
  8022. });
  8023. var reject = once(function (reason) {
  8024. true && warn(
  8025. "Failed to resolve async component: " + (String(factory)) +
  8026. (reason ? ("\nReason: " + reason) : '')
  8027. );
  8028. if (isDef(factory.errorComp)) {
  8029. factory.error = true;
  8030. forceRender(true);
  8031. }
  8032. });
  8033. var res = factory(resolve, reject);
  8034. if (isObject(res)) {
  8035. if (isPromise(res)) {
  8036. // () => Promise
  8037. if (isUndef(factory.resolved)) {
  8038. res.then(resolve, reject);
  8039. }
  8040. } else if (isPromise(res.component)) {
  8041. res.component.then(resolve, reject);
  8042. if (isDef(res.error)) {
  8043. factory.errorComp = ensureCtor(res.error, baseCtor);
  8044. }
  8045. if (isDef(res.loading)) {
  8046. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  8047. if (res.delay === 0) {
  8048. factory.loading = true;
  8049. } else {
  8050. timerLoading = setTimeout(function () {
  8051. timerLoading = null;
  8052. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  8053. factory.loading = true;
  8054. forceRender(false);
  8055. }
  8056. }, res.delay || 200);
  8057. }
  8058. }
  8059. if (isDef(res.timeout)) {
  8060. timerTimeout = setTimeout(function () {
  8061. timerTimeout = null;
  8062. if (isUndef(factory.resolved)) {
  8063. reject(
  8064. true
  8065. ? ("timeout (" + (res.timeout) + "ms)")
  8066. : undefined
  8067. );
  8068. }
  8069. }, res.timeout);
  8070. }
  8071. }
  8072. }
  8073. sync = false;
  8074. // return in case resolved synchronously
  8075. return factory.loading
  8076. ? factory.loadingComp
  8077. : factory.resolved
  8078. }
  8079. }
  8080. /* */
  8081. function isAsyncPlaceholder (node) {
  8082. return node.isComment && node.asyncFactory
  8083. }
  8084. /* */
  8085. function getFirstComponentChild (children) {
  8086. if (Array.isArray(children)) {
  8087. for (var i = 0; i < children.length; i++) {
  8088. var c = children[i];
  8089. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8090. return c
  8091. }
  8092. }
  8093. }
  8094. }
  8095. /* */
  8096. /* */
  8097. function initEvents (vm) {
  8098. vm._events = Object.create(null);
  8099. vm._hasHookEvent = false;
  8100. // init parent attached events
  8101. var listeners = vm.$options._parentListeners;
  8102. if (listeners) {
  8103. updateComponentListeners(vm, listeners);
  8104. }
  8105. }
  8106. var target;
  8107. function add (event, fn) {
  8108. target.$on(event, fn);
  8109. }
  8110. function remove$1 (event, fn) {
  8111. target.$off(event, fn);
  8112. }
  8113. function createOnceHandler (event, fn) {
  8114. var _target = target;
  8115. return function onceHandler () {
  8116. var res = fn.apply(null, arguments);
  8117. if (res !== null) {
  8118. _target.$off(event, onceHandler);
  8119. }
  8120. }
  8121. }
  8122. function updateComponentListeners (
  8123. vm,
  8124. listeners,
  8125. oldListeners
  8126. ) {
  8127. target = vm;
  8128. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8129. target = undefined;
  8130. }
  8131. function eventsMixin (Vue) {
  8132. var hookRE = /^hook:/;
  8133. Vue.prototype.$on = function (event, fn) {
  8134. var vm = this;
  8135. if (Array.isArray(event)) {
  8136. for (var i = 0, l = event.length; i < l; i++) {
  8137. vm.$on(event[i], fn);
  8138. }
  8139. } else {
  8140. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8141. // optimize hook:event cost by using a boolean flag marked at registration
  8142. // instead of a hash lookup
  8143. if (hookRE.test(event)) {
  8144. vm._hasHookEvent = true;
  8145. }
  8146. }
  8147. return vm
  8148. };
  8149. Vue.prototype.$once = function (event, fn) {
  8150. var vm = this;
  8151. function on () {
  8152. vm.$off(event, on);
  8153. fn.apply(vm, arguments);
  8154. }
  8155. on.fn = fn;
  8156. vm.$on(event, on);
  8157. return vm
  8158. };
  8159. Vue.prototype.$off = function (event, fn) {
  8160. var vm = this;
  8161. // all
  8162. if (!arguments.length) {
  8163. vm._events = Object.create(null);
  8164. return vm
  8165. }
  8166. // array of events
  8167. if (Array.isArray(event)) {
  8168. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8169. vm.$off(event[i$1], fn);
  8170. }
  8171. return vm
  8172. }
  8173. // specific event
  8174. var cbs = vm._events[event];
  8175. if (!cbs) {
  8176. return vm
  8177. }
  8178. if (!fn) {
  8179. vm._events[event] = null;
  8180. return vm
  8181. }
  8182. // specific handler
  8183. var cb;
  8184. var i = cbs.length;
  8185. while (i--) {
  8186. cb = cbs[i];
  8187. if (cb === fn || cb.fn === fn) {
  8188. cbs.splice(i, 1);
  8189. break
  8190. }
  8191. }
  8192. return vm
  8193. };
  8194. Vue.prototype.$emit = function (event) {
  8195. var vm = this;
  8196. if (true) {
  8197. var lowerCaseEvent = event.toLowerCase();
  8198. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8199. tip(
  8200. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8201. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8202. "Note that HTML attributes are case-insensitive and you cannot use " +
  8203. "v-on to listen to camelCase events when using in-DOM templates. " +
  8204. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8205. );
  8206. }
  8207. }
  8208. var cbs = vm._events[event];
  8209. if (cbs) {
  8210. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8211. var args = toArray(arguments, 1);
  8212. var info = "event handler for \"" + event + "\"";
  8213. for (var i = 0, l = cbs.length; i < l; i++) {
  8214. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8215. }
  8216. }
  8217. return vm
  8218. };
  8219. }
  8220. /* */
  8221. var activeInstance = null;
  8222. var isUpdatingChildComponent = false;
  8223. function setActiveInstance(vm) {
  8224. var prevActiveInstance = activeInstance;
  8225. activeInstance = vm;
  8226. return function () {
  8227. activeInstance = prevActiveInstance;
  8228. }
  8229. }
  8230. function initLifecycle (vm) {
  8231. var options = vm.$options;
  8232. // locate first non-abstract parent
  8233. var parent = options.parent;
  8234. if (parent && !options.abstract) {
  8235. while (parent.$options.abstract && parent.$parent) {
  8236. parent = parent.$parent;
  8237. }
  8238. parent.$children.push(vm);
  8239. }
  8240. vm.$parent = parent;
  8241. vm.$root = parent ? parent.$root : vm;
  8242. vm.$children = [];
  8243. vm.$refs = {};
  8244. vm._watcher = null;
  8245. vm._inactive = null;
  8246. vm._directInactive = false;
  8247. vm._isMounted = false;
  8248. vm._isDestroyed = false;
  8249. vm._isBeingDestroyed = false;
  8250. }
  8251. function lifecycleMixin (Vue) {
  8252. Vue.prototype._update = function (vnode, hydrating) {
  8253. var vm = this;
  8254. var prevEl = vm.$el;
  8255. var prevVnode = vm._vnode;
  8256. var restoreActiveInstance = setActiveInstance(vm);
  8257. vm._vnode = vnode;
  8258. // Vue.prototype.__patch__ is injected in entry points
  8259. // based on the rendering backend used.
  8260. if (!prevVnode) {
  8261. // initial render
  8262. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8263. } else {
  8264. // updates
  8265. vm.$el = vm.__patch__(prevVnode, vnode);
  8266. }
  8267. restoreActiveInstance();
  8268. // update __vue__ reference
  8269. if (prevEl) {
  8270. prevEl.__vue__ = null;
  8271. }
  8272. if (vm.$el) {
  8273. vm.$el.__vue__ = vm;
  8274. }
  8275. // if parent is an HOC, update its $el as well
  8276. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8277. vm.$parent.$el = vm.$el;
  8278. }
  8279. // updated hook is called by the scheduler to ensure that children are
  8280. // updated in a parent's updated hook.
  8281. };
  8282. Vue.prototype.$forceUpdate = function () {
  8283. var vm = this;
  8284. if (vm._watcher) {
  8285. vm._watcher.update();
  8286. }
  8287. };
  8288. Vue.prototype.$destroy = function () {
  8289. var vm = this;
  8290. if (vm._isBeingDestroyed) {
  8291. return
  8292. }
  8293. callHook(vm, 'beforeDestroy');
  8294. vm._isBeingDestroyed = true;
  8295. // remove self from parent
  8296. var parent = vm.$parent;
  8297. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8298. remove(parent.$children, vm);
  8299. }
  8300. // teardown watchers
  8301. if (vm._watcher) {
  8302. vm._watcher.teardown();
  8303. }
  8304. var i = vm._watchers.length;
  8305. while (i--) {
  8306. vm._watchers[i].teardown();
  8307. }
  8308. // remove reference from data ob
  8309. // frozen object may not have observer.
  8310. if (vm._data.__ob__) {
  8311. vm._data.__ob__.vmCount--;
  8312. }
  8313. // call the last hook...
  8314. vm._isDestroyed = true;
  8315. // invoke destroy hooks on current rendered tree
  8316. vm.__patch__(vm._vnode, null);
  8317. // fire destroyed hook
  8318. callHook(vm, 'destroyed');
  8319. // turn off all instance listeners.
  8320. vm.$off();
  8321. // remove __vue__ reference
  8322. if (vm.$el) {
  8323. vm.$el.__vue__ = null;
  8324. }
  8325. // release circular reference (#6759)
  8326. if (vm.$vnode) {
  8327. vm.$vnode.parent = null;
  8328. }
  8329. };
  8330. }
  8331. function updateChildComponent (
  8332. vm,
  8333. propsData,
  8334. listeners,
  8335. parentVnode,
  8336. renderChildren
  8337. ) {
  8338. if (true) {
  8339. isUpdatingChildComponent = true;
  8340. }
  8341. // determine whether component has slot children
  8342. // we need to do this before overwriting $options._renderChildren.
  8343. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8344. // dynamic slot names). Static scoped slots compiled from template has the
  8345. // "$stable" marker.
  8346. var newScopedSlots = parentVnode.data.scopedSlots;
  8347. var oldScopedSlots = vm.$scopedSlots;
  8348. var hasDynamicScopedSlot = !!(
  8349. (newScopedSlots && !newScopedSlots.$stable) ||
  8350. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8351. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8352. );
  8353. // Any static slot children from the parent may have changed during parent's
  8354. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8355. // update is necessary to ensure correctness.
  8356. var needsForceUpdate = !!(
  8357. renderChildren || // has new static slots
  8358. vm.$options._renderChildren || // has old static slots
  8359. hasDynamicScopedSlot
  8360. );
  8361. vm.$options._parentVnode = parentVnode;
  8362. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8363. if (vm._vnode) { // update child tree's parent
  8364. vm._vnode.parent = parentVnode;
  8365. }
  8366. vm.$options._renderChildren = renderChildren;
  8367. // update $attrs and $listeners hash
  8368. // these are also reactive so they may trigger child update if the child
  8369. // used them during render
  8370. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8371. vm.$listeners = listeners || emptyObject;
  8372. // update props
  8373. if (propsData && vm.$options.props) {
  8374. toggleObserving(false);
  8375. var props = vm._props;
  8376. var propKeys = vm.$options._propKeys || [];
  8377. for (var i = 0; i < propKeys.length; i++) {
  8378. var key = propKeys[i];
  8379. var propOptions = vm.$options.props; // wtf flow?
  8380. props[key] = validateProp(key, propOptions, propsData, vm);
  8381. }
  8382. toggleObserving(true);
  8383. // keep a copy of raw propsData
  8384. vm.$options.propsData = propsData;
  8385. }
  8386. // fixed by xxxxxx update properties(mp runtime)
  8387. vm._$updateProperties && vm._$updateProperties(vm);
  8388. // update listeners
  8389. listeners = listeners || emptyObject;
  8390. var oldListeners = vm.$options._parentListeners;
  8391. vm.$options._parentListeners = listeners;
  8392. updateComponentListeners(vm, listeners, oldListeners);
  8393. // resolve slots + force update if has children
  8394. if (needsForceUpdate) {
  8395. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8396. vm.$forceUpdate();
  8397. }
  8398. if (true) {
  8399. isUpdatingChildComponent = false;
  8400. }
  8401. }
  8402. function isInInactiveTree (vm) {
  8403. while (vm && (vm = vm.$parent)) {
  8404. if (vm._inactive) { return true }
  8405. }
  8406. return false
  8407. }
  8408. function activateChildComponent (vm, direct) {
  8409. if (direct) {
  8410. vm._directInactive = false;
  8411. if (isInInactiveTree(vm)) {
  8412. return
  8413. }
  8414. } else if (vm._directInactive) {
  8415. return
  8416. }
  8417. if (vm._inactive || vm._inactive === null) {
  8418. vm._inactive = false;
  8419. for (var i = 0; i < vm.$children.length; i++) {
  8420. activateChildComponent(vm.$children[i]);
  8421. }
  8422. callHook(vm, 'activated');
  8423. }
  8424. }
  8425. function deactivateChildComponent (vm, direct) {
  8426. if (direct) {
  8427. vm._directInactive = true;
  8428. if (isInInactiveTree(vm)) {
  8429. return
  8430. }
  8431. }
  8432. if (!vm._inactive) {
  8433. vm._inactive = true;
  8434. for (var i = 0; i < vm.$children.length; i++) {
  8435. deactivateChildComponent(vm.$children[i]);
  8436. }
  8437. callHook(vm, 'deactivated');
  8438. }
  8439. }
  8440. function callHook (vm, hook) {
  8441. // #7573 disable dep collection when invoking lifecycle hooks
  8442. pushTarget();
  8443. var handlers = vm.$options[hook];
  8444. var info = hook + " hook";
  8445. if (handlers) {
  8446. for (var i = 0, j = handlers.length; i < j; i++) {
  8447. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8448. }
  8449. }
  8450. if (vm._hasHookEvent) {
  8451. vm.$emit('hook:' + hook);
  8452. }
  8453. popTarget();
  8454. }
  8455. /* */
  8456. var MAX_UPDATE_COUNT = 100;
  8457. var queue = [];
  8458. var activatedChildren = [];
  8459. var has = {};
  8460. var circular = {};
  8461. var waiting = false;
  8462. var flushing = false;
  8463. var index = 0;
  8464. /**
  8465. * Reset the scheduler's state.
  8466. */
  8467. function resetSchedulerState () {
  8468. index = queue.length = activatedChildren.length = 0;
  8469. has = {};
  8470. if (true) {
  8471. circular = {};
  8472. }
  8473. waiting = flushing = false;
  8474. }
  8475. // Async edge case #6566 requires saving the timestamp when event listeners are
  8476. // attached. However, calling performance.now() has a perf overhead especially
  8477. // if the page has thousands of event listeners. Instead, we take a timestamp
  8478. // every time the scheduler flushes and use that for all event listeners
  8479. // attached during that flush.
  8480. var currentFlushTimestamp = 0;
  8481. // Async edge case fix requires storing an event listener's attach timestamp.
  8482. var getNow = Date.now;
  8483. // Determine what event timestamp the browser is using. Annoyingly, the
  8484. // timestamp can either be hi-res (relative to page load) or low-res
  8485. // (relative to UNIX epoch), so in order to compare time we have to use the
  8486. // same timestamp type when saving the flush timestamp.
  8487. // All IE versions use low-res event timestamps, and have problematic clock
  8488. // implementations (#9632)
  8489. if (inBrowser && !isIE) {
  8490. var performance = window.performance;
  8491. if (
  8492. performance &&
  8493. typeof performance.now === 'function' &&
  8494. getNow() > document.createEvent('Event').timeStamp
  8495. ) {
  8496. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8497. // smaller than it, it means the event is using a hi-res timestamp,
  8498. // and we need to use the hi-res version for event listener timestamps as
  8499. // well.
  8500. getNow = function () { return performance.now(); };
  8501. }
  8502. }
  8503. /**
  8504. * Flush both queues and run the watchers.
  8505. */
  8506. function flushSchedulerQueue () {
  8507. currentFlushTimestamp = getNow();
  8508. flushing = true;
  8509. var watcher, id;
  8510. // Sort queue before flush.
  8511. // This ensures that:
  8512. // 1. Components are updated from parent to child. (because parent is always
  8513. // created before the child)
  8514. // 2. A component's user watchers are run before its render watcher (because
  8515. // user watchers are created before the render watcher)
  8516. // 3. If a component is destroyed during a parent component's watcher run,
  8517. // its watchers can be skipped.
  8518. queue.sort(function (a, b) { return a.id - b.id; });
  8519. // do not cache length because more watchers might be pushed
  8520. // as we run existing watchers
  8521. for (index = 0; index < queue.length; index++) {
  8522. watcher = queue[index];
  8523. if (watcher.before) {
  8524. watcher.before();
  8525. }
  8526. id = watcher.id;
  8527. has[id] = null;
  8528. watcher.run();
  8529. // in dev build, check and stop circular updates.
  8530. if ( true && has[id] != null) {
  8531. circular[id] = (circular[id] || 0) + 1;
  8532. if (circular[id] > MAX_UPDATE_COUNT) {
  8533. warn(
  8534. 'You may have an infinite update loop ' + (
  8535. watcher.user
  8536. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8537. : "in a component render function."
  8538. ),
  8539. watcher.vm
  8540. );
  8541. break
  8542. }
  8543. }
  8544. }
  8545. // keep copies of post queues before resetting state
  8546. var activatedQueue = activatedChildren.slice();
  8547. var updatedQueue = queue.slice();
  8548. resetSchedulerState();
  8549. // call component updated and activated hooks
  8550. callActivatedHooks(activatedQueue);
  8551. callUpdatedHooks(updatedQueue);
  8552. // devtool hook
  8553. /* istanbul ignore if */
  8554. if (devtools && config.devtools) {
  8555. devtools.emit('flush');
  8556. }
  8557. }
  8558. function callUpdatedHooks (queue) {
  8559. var i = queue.length;
  8560. while (i--) {
  8561. var watcher = queue[i];
  8562. var vm = watcher.vm;
  8563. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8564. callHook(vm, 'updated');
  8565. }
  8566. }
  8567. }
  8568. /**
  8569. * Queue a kept-alive component that was activated during patch.
  8570. * The queue will be processed after the entire tree has been patched.
  8571. */
  8572. function queueActivatedComponent (vm) {
  8573. // setting _inactive to false here so that a render function can
  8574. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8575. vm._inactive = false;
  8576. activatedChildren.push(vm);
  8577. }
  8578. function callActivatedHooks (queue) {
  8579. for (var i = 0; i < queue.length; i++) {
  8580. queue[i]._inactive = true;
  8581. activateChildComponent(queue[i], true /* true */);
  8582. }
  8583. }
  8584. /**
  8585. * Push a watcher into the watcher queue.
  8586. * Jobs with duplicate IDs will be skipped unless it's
  8587. * pushed when the queue is being flushed.
  8588. */
  8589. function queueWatcher (watcher) {
  8590. var id = watcher.id;
  8591. if (has[id] == null) {
  8592. has[id] = true;
  8593. if (!flushing) {
  8594. queue.push(watcher);
  8595. } else {
  8596. // if already flushing, splice the watcher based on its id
  8597. // if already past its id, it will be run next immediately.
  8598. var i = queue.length - 1;
  8599. while (i > index && queue[i].id > watcher.id) {
  8600. i--;
  8601. }
  8602. queue.splice(i + 1, 0, watcher);
  8603. }
  8604. // queue the flush
  8605. if (!waiting) {
  8606. waiting = true;
  8607. if ( true && !config.async) {
  8608. flushSchedulerQueue();
  8609. return
  8610. }
  8611. nextTick(flushSchedulerQueue);
  8612. }
  8613. }
  8614. }
  8615. /* */
  8616. var uid$2 = 0;
  8617. /**
  8618. * A watcher parses an expression, collects dependencies,
  8619. * and fires callback when the expression value changes.
  8620. * This is used for both the $watch() api and directives.
  8621. */
  8622. var Watcher = function Watcher (
  8623. vm,
  8624. expOrFn,
  8625. cb,
  8626. options,
  8627. isRenderWatcher
  8628. ) {
  8629. this.vm = vm;
  8630. if (isRenderWatcher) {
  8631. vm._watcher = this;
  8632. }
  8633. vm._watchers.push(this);
  8634. // options
  8635. if (options) {
  8636. this.deep = !!options.deep;
  8637. this.user = !!options.user;
  8638. this.lazy = !!options.lazy;
  8639. this.sync = !!options.sync;
  8640. this.before = options.before;
  8641. } else {
  8642. this.deep = this.user = this.lazy = this.sync = false;
  8643. }
  8644. this.cb = cb;
  8645. this.id = ++uid$2; // uid for batching
  8646. this.active = true;
  8647. this.dirty = this.lazy; // for lazy watchers
  8648. this.deps = [];
  8649. this.newDeps = [];
  8650. this.depIds = new _Set();
  8651. this.newDepIds = new _Set();
  8652. this.expression = true
  8653. ? expOrFn.toString()
  8654. : undefined;
  8655. // parse expression for getter
  8656. if (typeof expOrFn === 'function') {
  8657. this.getter = expOrFn;
  8658. } else {
  8659. this.getter = parsePath(expOrFn);
  8660. if (!this.getter) {
  8661. this.getter = noop;
  8662. true && warn(
  8663. "Failed watching path: \"" + expOrFn + "\" " +
  8664. 'Watcher only accepts simple dot-delimited paths. ' +
  8665. 'For full control, use a function instead.',
  8666. vm
  8667. );
  8668. }
  8669. }
  8670. this.value = this.lazy
  8671. ? undefined
  8672. : this.get();
  8673. };
  8674. /**
  8675. * Evaluate the getter, and re-collect dependencies.
  8676. */
  8677. Watcher.prototype.get = function get () {
  8678. pushTarget(this);
  8679. var value;
  8680. var vm = this.vm;
  8681. try {
  8682. value = this.getter.call(vm, vm);
  8683. } catch (e) {
  8684. if (this.user) {
  8685. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8686. } else {
  8687. throw e
  8688. }
  8689. } finally {
  8690. // "touch" every property so they are all tracked as
  8691. // dependencies for deep watching
  8692. if (this.deep) {
  8693. traverse(value);
  8694. }
  8695. popTarget();
  8696. this.cleanupDeps();
  8697. }
  8698. return value
  8699. };
  8700. /**
  8701. * Add a dependency to this directive.
  8702. */
  8703. Watcher.prototype.addDep = function addDep (dep) {
  8704. var id = dep.id;
  8705. if (!this.newDepIds.has(id)) {
  8706. this.newDepIds.add(id);
  8707. this.newDeps.push(dep);
  8708. if (!this.depIds.has(id)) {
  8709. dep.addSub(this);
  8710. }
  8711. }
  8712. };
  8713. /**
  8714. * Clean up for dependency collection.
  8715. */
  8716. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8717. var i = this.deps.length;
  8718. while (i--) {
  8719. var dep = this.deps[i];
  8720. if (!this.newDepIds.has(dep.id)) {
  8721. dep.removeSub(this);
  8722. }
  8723. }
  8724. var tmp = this.depIds;
  8725. this.depIds = this.newDepIds;
  8726. this.newDepIds = tmp;
  8727. this.newDepIds.clear();
  8728. tmp = this.deps;
  8729. this.deps = this.newDeps;
  8730. this.newDeps = tmp;
  8731. this.newDeps.length = 0;
  8732. };
  8733. /**
  8734. * Subscriber interface.
  8735. * Will be called when a dependency changes.
  8736. */
  8737. Watcher.prototype.update = function update () {
  8738. /* istanbul ignore else */
  8739. if (this.lazy) {
  8740. this.dirty = true;
  8741. } else if (this.sync) {
  8742. this.run();
  8743. } else {
  8744. queueWatcher(this);
  8745. }
  8746. };
  8747. /**
  8748. * Scheduler job interface.
  8749. * Will be called by the scheduler.
  8750. */
  8751. Watcher.prototype.run = function run () {
  8752. if (this.active) {
  8753. var value = this.get();
  8754. if (
  8755. value !== this.value ||
  8756. // Deep watchers and watchers on Object/Arrays should fire even
  8757. // when the value is the same, because the value may
  8758. // have mutated.
  8759. isObject(value) ||
  8760. this.deep
  8761. ) {
  8762. // set new value
  8763. var oldValue = this.value;
  8764. this.value = value;
  8765. if (this.user) {
  8766. try {
  8767. this.cb.call(this.vm, value, oldValue);
  8768. } catch (e) {
  8769. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8770. }
  8771. } else {
  8772. this.cb.call(this.vm, value, oldValue);
  8773. }
  8774. }
  8775. }
  8776. };
  8777. /**
  8778. * Evaluate the value of the watcher.
  8779. * This only gets called for lazy watchers.
  8780. */
  8781. Watcher.prototype.evaluate = function evaluate () {
  8782. this.value = this.get();
  8783. this.dirty = false;
  8784. };
  8785. /**
  8786. * Depend on all deps collected by this watcher.
  8787. */
  8788. Watcher.prototype.depend = function depend () {
  8789. var i = this.deps.length;
  8790. while (i--) {
  8791. this.deps[i].depend();
  8792. }
  8793. };
  8794. /**
  8795. * Remove self from all dependencies' subscriber list.
  8796. */
  8797. Watcher.prototype.teardown = function teardown () {
  8798. if (this.active) {
  8799. // remove self from vm's watcher list
  8800. // this is a somewhat expensive operation so we skip it
  8801. // if the vm is being destroyed.
  8802. if (!this.vm._isBeingDestroyed) {
  8803. remove(this.vm._watchers, this);
  8804. }
  8805. var i = this.deps.length;
  8806. while (i--) {
  8807. this.deps[i].removeSub(this);
  8808. }
  8809. this.active = false;
  8810. }
  8811. };
  8812. /* */
  8813. var sharedPropertyDefinition = {
  8814. enumerable: true,
  8815. configurable: true,
  8816. get: noop,
  8817. set: noop
  8818. };
  8819. function proxy (target, sourceKey, key) {
  8820. sharedPropertyDefinition.get = function proxyGetter () {
  8821. return this[sourceKey][key]
  8822. };
  8823. sharedPropertyDefinition.set = function proxySetter (val) {
  8824. this[sourceKey][key] = val;
  8825. };
  8826. Object.defineProperty(target, key, sharedPropertyDefinition);
  8827. }
  8828. function initState (vm) {
  8829. vm._watchers = [];
  8830. var opts = vm.$options;
  8831. if (opts.props) { initProps(vm, opts.props); }
  8832. if (opts.methods) { initMethods(vm, opts.methods); }
  8833. if (opts.data) {
  8834. initData(vm);
  8835. } else {
  8836. observe(vm._data = {}, true /* asRootData */);
  8837. }
  8838. if (opts.computed) { initComputed(vm, opts.computed); }
  8839. if (opts.watch && opts.watch !== nativeWatch) {
  8840. initWatch(vm, opts.watch);
  8841. }
  8842. }
  8843. function initProps (vm, propsOptions) {
  8844. var propsData = vm.$options.propsData || {};
  8845. var props = vm._props = {};
  8846. // cache prop keys so that future props updates can iterate using Array
  8847. // instead of dynamic object key enumeration.
  8848. var keys = vm.$options._propKeys = [];
  8849. var isRoot = !vm.$parent;
  8850. // root instance props should be converted
  8851. if (!isRoot) {
  8852. toggleObserving(false);
  8853. }
  8854. var loop = function ( key ) {
  8855. keys.push(key);
  8856. var value = validateProp(key, propsOptions, propsData, vm);
  8857. /* istanbul ignore else */
  8858. if (true) {
  8859. var hyphenatedKey = hyphenate(key);
  8860. if (isReservedAttribute(hyphenatedKey) ||
  8861. config.isReservedAttr(hyphenatedKey)) {
  8862. warn(
  8863. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8864. vm
  8865. );
  8866. }
  8867. defineReactive$$1(props, key, value, function () {
  8868. if (!isRoot && !isUpdatingChildComponent) {
  8869. {
  8870. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8871. return
  8872. }
  8873. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8874. if(
  8875. key === 'value' &&
  8876. Array.isArray(vm.$options.behaviors) &&
  8877. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8878. ){
  8879. return
  8880. }
  8881. if(vm._getFormData){
  8882. return
  8883. }
  8884. var $parent = vm.$parent;
  8885. while($parent){
  8886. if($parent.__next_tick_pending){
  8887. return
  8888. }
  8889. $parent = $parent.$parent;
  8890. }
  8891. }
  8892. warn(
  8893. "Avoid mutating a prop directly since the value will be " +
  8894. "overwritten whenever the parent component re-renders. " +
  8895. "Instead, use a data or computed property based on the prop's " +
  8896. "value. Prop being mutated: \"" + key + "\"",
  8897. vm
  8898. );
  8899. }
  8900. });
  8901. } else {}
  8902. // static props are already proxied on the component's prototype
  8903. // during Vue.extend(). We only need to proxy props defined at
  8904. // instantiation here.
  8905. if (!(key in vm)) {
  8906. proxy(vm, "_props", key);
  8907. }
  8908. };
  8909. for (var key in propsOptions) loop( key );
  8910. toggleObserving(true);
  8911. }
  8912. function initData (vm) {
  8913. var data = vm.$options.data;
  8914. data = vm._data = typeof data === 'function'
  8915. ? getData(data, vm)
  8916. : data || {};
  8917. if (!isPlainObject(data)) {
  8918. data = {};
  8919. true && warn(
  8920. 'data functions should return an object:\n' +
  8921. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8922. vm
  8923. );
  8924. }
  8925. // proxy data on instance
  8926. var keys = Object.keys(data);
  8927. var props = vm.$options.props;
  8928. var methods = vm.$options.methods;
  8929. var i = keys.length;
  8930. while (i--) {
  8931. var key = keys[i];
  8932. if (true) {
  8933. if (methods && hasOwn(methods, key)) {
  8934. warn(
  8935. ("Method \"" + key + "\" has already been defined as a data property."),
  8936. vm
  8937. );
  8938. }
  8939. }
  8940. if (props && hasOwn(props, key)) {
  8941. true && warn(
  8942. "The data property \"" + key + "\" is already declared as a prop. " +
  8943. "Use prop default value instead.",
  8944. vm
  8945. );
  8946. } else if (!isReserved(key)) {
  8947. proxy(vm, "_data", key);
  8948. }
  8949. }
  8950. // observe data
  8951. observe(data, true /* asRootData */);
  8952. }
  8953. function getData (data, vm) {
  8954. // #7573 disable dep collection when invoking data getters
  8955. pushTarget();
  8956. try {
  8957. return data.call(vm, vm)
  8958. } catch (e) {
  8959. handleError(e, vm, "data()");
  8960. return {}
  8961. } finally {
  8962. popTarget();
  8963. }
  8964. }
  8965. var computedWatcherOptions = { lazy: true };
  8966. function initComputed (vm, computed) {
  8967. // $flow-disable-line
  8968. var watchers = vm._computedWatchers = Object.create(null);
  8969. // computed properties are just getters during SSR
  8970. var isSSR = isServerRendering();
  8971. for (var key in computed) {
  8972. var userDef = computed[key];
  8973. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8974. if ( true && getter == null) {
  8975. warn(
  8976. ("Getter is missing for computed property \"" + key + "\"."),
  8977. vm
  8978. );
  8979. }
  8980. if (!isSSR) {
  8981. // create internal watcher for the computed property.
  8982. watchers[key] = new Watcher(
  8983. vm,
  8984. getter || noop,
  8985. noop,
  8986. computedWatcherOptions
  8987. );
  8988. }
  8989. // component-defined computed properties are already defined on the
  8990. // component prototype. We only need to define computed properties defined
  8991. // at instantiation here.
  8992. if (!(key in vm)) {
  8993. defineComputed(vm, key, userDef);
  8994. } else if (true) {
  8995. if (key in vm.$data) {
  8996. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8997. } else if (vm.$options.props && key in vm.$options.props) {
  8998. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8999. }
  9000. }
  9001. }
  9002. }
  9003. function defineComputed (
  9004. target,
  9005. key,
  9006. userDef
  9007. ) {
  9008. var shouldCache = !isServerRendering();
  9009. if (typeof userDef === 'function') {
  9010. sharedPropertyDefinition.get = shouldCache
  9011. ? createComputedGetter(key)
  9012. : createGetterInvoker(userDef);
  9013. sharedPropertyDefinition.set = noop;
  9014. } else {
  9015. sharedPropertyDefinition.get = userDef.get
  9016. ? shouldCache && userDef.cache !== false
  9017. ? createComputedGetter(key)
  9018. : createGetterInvoker(userDef.get)
  9019. : noop;
  9020. sharedPropertyDefinition.set = userDef.set || noop;
  9021. }
  9022. if ( true &&
  9023. sharedPropertyDefinition.set === noop) {
  9024. sharedPropertyDefinition.set = function () {
  9025. warn(
  9026. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  9027. this
  9028. );
  9029. };
  9030. }
  9031. Object.defineProperty(target, key, sharedPropertyDefinition);
  9032. }
  9033. function createComputedGetter (key) {
  9034. return function computedGetter () {
  9035. var watcher = this._computedWatchers && this._computedWatchers[key];
  9036. if (watcher) {
  9037. if (watcher.dirty) {
  9038. watcher.evaluate();
  9039. }
  9040. if (Dep.SharedObject.target) {// fixed by xxxxxx
  9041. watcher.depend();
  9042. }
  9043. return watcher.value
  9044. }
  9045. }
  9046. }
  9047. function createGetterInvoker(fn) {
  9048. return function computedGetter () {
  9049. return fn.call(this, this)
  9050. }
  9051. }
  9052. function initMethods (vm, methods) {
  9053. var props = vm.$options.props;
  9054. for (var key in methods) {
  9055. if (true) {
  9056. if (typeof methods[key] !== 'function') {
  9057. warn(
  9058. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  9059. "Did you reference the function correctly?",
  9060. vm
  9061. );
  9062. }
  9063. if (props && hasOwn(props, key)) {
  9064. warn(
  9065. ("Method \"" + key + "\" has already been defined as a prop."),
  9066. vm
  9067. );
  9068. }
  9069. if ((key in vm) && isReserved(key)) {
  9070. warn(
  9071. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  9072. "Avoid defining component methods that start with _ or $."
  9073. );
  9074. }
  9075. }
  9076. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  9077. }
  9078. }
  9079. function initWatch (vm, watch) {
  9080. for (var key in watch) {
  9081. var handler = watch[key];
  9082. if (Array.isArray(handler)) {
  9083. for (var i = 0; i < handler.length; i++) {
  9084. createWatcher(vm, key, handler[i]);
  9085. }
  9086. } else {
  9087. createWatcher(vm, key, handler);
  9088. }
  9089. }
  9090. }
  9091. function createWatcher (
  9092. vm,
  9093. expOrFn,
  9094. handler,
  9095. options
  9096. ) {
  9097. if (isPlainObject(handler)) {
  9098. options = handler;
  9099. handler = handler.handler;
  9100. }
  9101. if (typeof handler === 'string') {
  9102. handler = vm[handler];
  9103. }
  9104. return vm.$watch(expOrFn, handler, options)
  9105. }
  9106. function stateMixin (Vue) {
  9107. // flow somehow has problems with directly declared definition object
  9108. // when using Object.defineProperty, so we have to procedurally build up
  9109. // the object here.
  9110. var dataDef = {};
  9111. dataDef.get = function () { return this._data };
  9112. var propsDef = {};
  9113. propsDef.get = function () { return this._props };
  9114. if (true) {
  9115. dataDef.set = function () {
  9116. warn(
  9117. 'Avoid replacing instance root $data. ' +
  9118. 'Use nested data properties instead.',
  9119. this
  9120. );
  9121. };
  9122. propsDef.set = function () {
  9123. warn("$props is readonly.", this);
  9124. };
  9125. }
  9126. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9127. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9128. Vue.prototype.$set = set;
  9129. Vue.prototype.$delete = del;
  9130. Vue.prototype.$watch = function (
  9131. expOrFn,
  9132. cb,
  9133. options
  9134. ) {
  9135. var vm = this;
  9136. if (isPlainObject(cb)) {
  9137. return createWatcher(vm, expOrFn, cb, options)
  9138. }
  9139. options = options || {};
  9140. options.user = true;
  9141. var watcher = new Watcher(vm, expOrFn, cb, options);
  9142. if (options.immediate) {
  9143. try {
  9144. cb.call(vm, watcher.value);
  9145. } catch (error) {
  9146. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9147. }
  9148. }
  9149. return function unwatchFn () {
  9150. watcher.teardown();
  9151. }
  9152. };
  9153. }
  9154. /* */
  9155. var uid$3 = 0;
  9156. function initMixin (Vue) {
  9157. Vue.prototype._init = function (options) {
  9158. var vm = this;
  9159. // a uid
  9160. vm._uid = uid$3++;
  9161. var startTag, endTag;
  9162. /* istanbul ignore if */
  9163. if ( true && config.performance && mark) {
  9164. startTag = "vue-perf-start:" + (vm._uid);
  9165. endTag = "vue-perf-end:" + (vm._uid);
  9166. mark(startTag);
  9167. }
  9168. // a flag to avoid this being observed
  9169. vm._isVue = true;
  9170. // merge options
  9171. if (options && options._isComponent) {
  9172. // optimize internal component instantiation
  9173. // since dynamic options merging is pretty slow, and none of the
  9174. // internal component options needs special treatment.
  9175. initInternalComponent(vm, options);
  9176. } else {
  9177. vm.$options = mergeOptions(
  9178. resolveConstructorOptions(vm.constructor),
  9179. options || {},
  9180. vm
  9181. );
  9182. }
  9183. /* istanbul ignore else */
  9184. if (true) {
  9185. initProxy(vm);
  9186. } else {}
  9187. // expose real self
  9188. vm._self = vm;
  9189. initLifecycle(vm);
  9190. initEvents(vm);
  9191. initRender(vm);
  9192. callHook(vm, 'beforeCreate');
  9193. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9194. initState(vm);
  9195. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9196. !vm._$fallback && callHook(vm, 'created');
  9197. /* istanbul ignore if */
  9198. if ( true && config.performance && mark) {
  9199. vm._name = formatComponentName(vm, false);
  9200. mark(endTag);
  9201. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9202. }
  9203. if (vm.$options.el) {
  9204. vm.$mount(vm.$options.el);
  9205. }
  9206. };
  9207. }
  9208. function initInternalComponent (vm, options) {
  9209. var opts = vm.$options = Object.create(vm.constructor.options);
  9210. // doing this because it's faster than dynamic enumeration.
  9211. var parentVnode = options._parentVnode;
  9212. opts.parent = options.parent;
  9213. opts._parentVnode = parentVnode;
  9214. var vnodeComponentOptions = parentVnode.componentOptions;
  9215. opts.propsData = vnodeComponentOptions.propsData;
  9216. opts._parentListeners = vnodeComponentOptions.listeners;
  9217. opts._renderChildren = vnodeComponentOptions.children;
  9218. opts._componentTag = vnodeComponentOptions.tag;
  9219. if (options.render) {
  9220. opts.render = options.render;
  9221. opts.staticRenderFns = options.staticRenderFns;
  9222. }
  9223. }
  9224. function resolveConstructorOptions (Ctor) {
  9225. var options = Ctor.options;
  9226. if (Ctor.super) {
  9227. var superOptions = resolveConstructorOptions(Ctor.super);
  9228. var cachedSuperOptions = Ctor.superOptions;
  9229. if (superOptions !== cachedSuperOptions) {
  9230. // super option changed,
  9231. // need to resolve new options.
  9232. Ctor.superOptions = superOptions;
  9233. // check if there are any late-modified/attached options (#4976)
  9234. var modifiedOptions = resolveModifiedOptions(Ctor);
  9235. // update base extend options
  9236. if (modifiedOptions) {
  9237. extend(Ctor.extendOptions, modifiedOptions);
  9238. }
  9239. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9240. if (options.name) {
  9241. options.components[options.name] = Ctor;
  9242. }
  9243. }
  9244. }
  9245. return options
  9246. }
  9247. function resolveModifiedOptions (Ctor) {
  9248. var modified;
  9249. var latest = Ctor.options;
  9250. var sealed = Ctor.sealedOptions;
  9251. for (var key in latest) {
  9252. if (latest[key] !== sealed[key]) {
  9253. if (!modified) { modified = {}; }
  9254. modified[key] = latest[key];
  9255. }
  9256. }
  9257. return modified
  9258. }
  9259. function Vue (options) {
  9260. if ( true &&
  9261. !(this instanceof Vue)
  9262. ) {
  9263. warn('Vue is a constructor and should be called with the `new` keyword');
  9264. }
  9265. this._init(options);
  9266. }
  9267. initMixin(Vue);
  9268. stateMixin(Vue);
  9269. eventsMixin(Vue);
  9270. lifecycleMixin(Vue);
  9271. renderMixin(Vue);
  9272. /* */
  9273. function initUse (Vue) {
  9274. Vue.use = function (plugin) {
  9275. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9276. if (installedPlugins.indexOf(plugin) > -1) {
  9277. return this
  9278. }
  9279. // additional parameters
  9280. var args = toArray(arguments, 1);
  9281. args.unshift(this);
  9282. if (typeof plugin.install === 'function') {
  9283. plugin.install.apply(plugin, args);
  9284. } else if (typeof plugin === 'function') {
  9285. plugin.apply(null, args);
  9286. }
  9287. installedPlugins.push(plugin);
  9288. return this
  9289. };
  9290. }
  9291. /* */
  9292. function initMixin$1 (Vue) {
  9293. Vue.mixin = function (mixin) {
  9294. this.options = mergeOptions(this.options, mixin);
  9295. return this
  9296. };
  9297. }
  9298. /* */
  9299. function initExtend (Vue) {
  9300. /**
  9301. * Each instance constructor, including Vue, has a unique
  9302. * cid. This enables us to create wrapped "child
  9303. * constructors" for prototypal inheritance and cache them.
  9304. */
  9305. Vue.cid = 0;
  9306. var cid = 1;
  9307. /**
  9308. * Class inheritance
  9309. */
  9310. Vue.extend = function (extendOptions) {
  9311. extendOptions = extendOptions || {};
  9312. var Super = this;
  9313. var SuperId = Super.cid;
  9314. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9315. if (cachedCtors[SuperId]) {
  9316. return cachedCtors[SuperId]
  9317. }
  9318. var name = extendOptions.name || Super.options.name;
  9319. if ( true && name) {
  9320. validateComponentName(name);
  9321. }
  9322. var Sub = function VueComponent (options) {
  9323. this._init(options);
  9324. };
  9325. Sub.prototype = Object.create(Super.prototype);
  9326. Sub.prototype.constructor = Sub;
  9327. Sub.cid = cid++;
  9328. Sub.options = mergeOptions(
  9329. Super.options,
  9330. extendOptions
  9331. );
  9332. Sub['super'] = Super;
  9333. // For props and computed properties, we define the proxy getters on
  9334. // the Vue instances at extension time, on the extended prototype. This
  9335. // avoids Object.defineProperty calls for each instance created.
  9336. if (Sub.options.props) {
  9337. initProps$1(Sub);
  9338. }
  9339. if (Sub.options.computed) {
  9340. initComputed$1(Sub);
  9341. }
  9342. // allow further extension/mixin/plugin usage
  9343. Sub.extend = Super.extend;
  9344. Sub.mixin = Super.mixin;
  9345. Sub.use = Super.use;
  9346. // create asset registers, so extended classes
  9347. // can have their private assets too.
  9348. ASSET_TYPES.forEach(function (type) {
  9349. Sub[type] = Super[type];
  9350. });
  9351. // enable recursive self-lookup
  9352. if (name) {
  9353. Sub.options.components[name] = Sub;
  9354. }
  9355. // keep a reference to the super options at extension time.
  9356. // later at instantiation we can check if Super's options have
  9357. // been updated.
  9358. Sub.superOptions = Super.options;
  9359. Sub.extendOptions = extendOptions;
  9360. Sub.sealedOptions = extend({}, Sub.options);
  9361. // cache constructor
  9362. cachedCtors[SuperId] = Sub;
  9363. return Sub
  9364. };
  9365. }
  9366. function initProps$1 (Comp) {
  9367. var props = Comp.options.props;
  9368. for (var key in props) {
  9369. proxy(Comp.prototype, "_props", key);
  9370. }
  9371. }
  9372. function initComputed$1 (Comp) {
  9373. var computed = Comp.options.computed;
  9374. for (var key in computed) {
  9375. defineComputed(Comp.prototype, key, computed[key]);
  9376. }
  9377. }
  9378. /* */
  9379. function initAssetRegisters (Vue) {
  9380. /**
  9381. * Create asset registration methods.
  9382. */
  9383. ASSET_TYPES.forEach(function (type) {
  9384. Vue[type] = function (
  9385. id,
  9386. definition
  9387. ) {
  9388. if (!definition) {
  9389. return this.options[type + 's'][id]
  9390. } else {
  9391. /* istanbul ignore if */
  9392. if ( true && type === 'component') {
  9393. validateComponentName(id);
  9394. }
  9395. if (type === 'component' && isPlainObject(definition)) {
  9396. definition.name = definition.name || id;
  9397. definition = this.options._base.extend(definition);
  9398. }
  9399. if (type === 'directive' && typeof definition === 'function') {
  9400. definition = { bind: definition, update: definition };
  9401. }
  9402. this.options[type + 's'][id] = definition;
  9403. return definition
  9404. }
  9405. };
  9406. });
  9407. }
  9408. /* */
  9409. function getComponentName (opts) {
  9410. return opts && (opts.Ctor.options.name || opts.tag)
  9411. }
  9412. function matches (pattern, name) {
  9413. if (Array.isArray(pattern)) {
  9414. return pattern.indexOf(name) > -1
  9415. } else if (typeof pattern === 'string') {
  9416. return pattern.split(',').indexOf(name) > -1
  9417. } else if (isRegExp(pattern)) {
  9418. return pattern.test(name)
  9419. }
  9420. /* istanbul ignore next */
  9421. return false
  9422. }
  9423. function pruneCache (keepAliveInstance, filter) {
  9424. var cache = keepAliveInstance.cache;
  9425. var keys = keepAliveInstance.keys;
  9426. var _vnode = keepAliveInstance._vnode;
  9427. for (var key in cache) {
  9428. var cachedNode = cache[key];
  9429. if (cachedNode) {
  9430. var name = getComponentName(cachedNode.componentOptions);
  9431. if (name && !filter(name)) {
  9432. pruneCacheEntry(cache, key, keys, _vnode);
  9433. }
  9434. }
  9435. }
  9436. }
  9437. function pruneCacheEntry (
  9438. cache,
  9439. key,
  9440. keys,
  9441. current
  9442. ) {
  9443. var cached$$1 = cache[key];
  9444. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9445. cached$$1.componentInstance.$destroy();
  9446. }
  9447. cache[key] = null;
  9448. remove(keys, key);
  9449. }
  9450. var patternTypes = [String, RegExp, Array];
  9451. var KeepAlive = {
  9452. name: 'keep-alive',
  9453. abstract: true,
  9454. props: {
  9455. include: patternTypes,
  9456. exclude: patternTypes,
  9457. max: [String, Number]
  9458. },
  9459. created: function created () {
  9460. this.cache = Object.create(null);
  9461. this.keys = [];
  9462. },
  9463. destroyed: function destroyed () {
  9464. for (var key in this.cache) {
  9465. pruneCacheEntry(this.cache, key, this.keys);
  9466. }
  9467. },
  9468. mounted: function mounted () {
  9469. var this$1 = this;
  9470. this.$watch('include', function (val) {
  9471. pruneCache(this$1, function (name) { return matches(val, name); });
  9472. });
  9473. this.$watch('exclude', function (val) {
  9474. pruneCache(this$1, function (name) { return !matches(val, name); });
  9475. });
  9476. },
  9477. render: function render () {
  9478. var slot = this.$slots.default;
  9479. var vnode = getFirstComponentChild(slot);
  9480. var componentOptions = vnode && vnode.componentOptions;
  9481. if (componentOptions) {
  9482. // check pattern
  9483. var name = getComponentName(componentOptions);
  9484. var ref = this;
  9485. var include = ref.include;
  9486. var exclude = ref.exclude;
  9487. if (
  9488. // not included
  9489. (include && (!name || !matches(include, name))) ||
  9490. // excluded
  9491. (exclude && name && matches(exclude, name))
  9492. ) {
  9493. return vnode
  9494. }
  9495. var ref$1 = this;
  9496. var cache = ref$1.cache;
  9497. var keys = ref$1.keys;
  9498. var key = vnode.key == null
  9499. // same constructor may get registered as different local components
  9500. // so cid alone is not enough (#3269)
  9501. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9502. : vnode.key;
  9503. if (cache[key]) {
  9504. vnode.componentInstance = cache[key].componentInstance;
  9505. // make current key freshest
  9506. remove(keys, key);
  9507. keys.push(key);
  9508. } else {
  9509. cache[key] = vnode;
  9510. keys.push(key);
  9511. // prune oldest entry
  9512. if (this.max && keys.length > parseInt(this.max)) {
  9513. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9514. }
  9515. }
  9516. vnode.data.keepAlive = true;
  9517. }
  9518. return vnode || (slot && slot[0])
  9519. }
  9520. };
  9521. var builtInComponents = {
  9522. KeepAlive: KeepAlive
  9523. };
  9524. /* */
  9525. function initGlobalAPI (Vue) {
  9526. // config
  9527. var configDef = {};
  9528. configDef.get = function () { return config; };
  9529. if (true) {
  9530. configDef.set = function () {
  9531. warn(
  9532. 'Do not replace the Vue.config object, set individual fields instead.'
  9533. );
  9534. };
  9535. }
  9536. Object.defineProperty(Vue, 'config', configDef);
  9537. // exposed util methods.
  9538. // NOTE: these are not considered part of the public API - avoid relying on
  9539. // them unless you are aware of the risk.
  9540. Vue.util = {
  9541. warn: warn,
  9542. extend: extend,
  9543. mergeOptions: mergeOptions,
  9544. defineReactive: defineReactive$$1
  9545. };
  9546. Vue.set = set;
  9547. Vue.delete = del;
  9548. Vue.nextTick = nextTick;
  9549. // 2.6 explicit observable API
  9550. Vue.observable = function (obj) {
  9551. observe(obj);
  9552. return obj
  9553. };
  9554. Vue.options = Object.create(null);
  9555. ASSET_TYPES.forEach(function (type) {
  9556. Vue.options[type + 's'] = Object.create(null);
  9557. });
  9558. // this is used to identify the "base" constructor to extend all plain-object
  9559. // components with in Weex's multi-instance scenarios.
  9560. Vue.options._base = Vue;
  9561. extend(Vue.options.components, builtInComponents);
  9562. initUse(Vue);
  9563. initMixin$1(Vue);
  9564. initExtend(Vue);
  9565. initAssetRegisters(Vue);
  9566. }
  9567. initGlobalAPI(Vue);
  9568. Object.defineProperty(Vue.prototype, '$isServer', {
  9569. get: isServerRendering
  9570. });
  9571. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9572. get: function get () {
  9573. /* istanbul ignore next */
  9574. return this.$vnode && this.$vnode.ssrContext
  9575. }
  9576. });
  9577. // expose FunctionalRenderContext for ssr runtime helper installation
  9578. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9579. value: FunctionalRenderContext
  9580. });
  9581. Vue.version = '2.6.11';
  9582. /**
  9583. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9584. */
  9585. var ARRAYTYPE = '[object Array]';
  9586. var OBJECTTYPE = '[object Object]';
  9587. var NULLTYPE = '[object Null]';
  9588. var UNDEFINEDTYPE = '[object Undefined]';
  9589. // const FUNCTIONTYPE = '[object Function]'
  9590. function diff(current, pre) {
  9591. var result = {};
  9592. syncKeys(current, pre);
  9593. _diff(current, pre, '', result);
  9594. return result
  9595. }
  9596. function syncKeys(current, pre) {
  9597. if (current === pre) { return }
  9598. var rootCurrentType = type(current);
  9599. var rootPreType = type(pre);
  9600. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9601. if(Object.keys(current).length >= Object.keys(pre).length){
  9602. for (var key in pre) {
  9603. var currentValue = current[key];
  9604. if (currentValue === undefined) {
  9605. current[key] = null;
  9606. } else {
  9607. syncKeys(currentValue, pre[key]);
  9608. }
  9609. }
  9610. }
  9611. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9612. if (current.length >= pre.length) {
  9613. pre.forEach(function (item, index) {
  9614. syncKeys(current[index], item);
  9615. });
  9616. }
  9617. }
  9618. }
  9619. function nullOrUndefined(currentType, preType) {
  9620. if(
  9621. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9622. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9623. ) {
  9624. return false
  9625. }
  9626. return true
  9627. }
  9628. function _diff(current, pre, path, result) {
  9629. if (current === pre) { return }
  9630. var rootCurrentType = type(current);
  9631. var rootPreType = type(pre);
  9632. if (rootCurrentType == OBJECTTYPE) {
  9633. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9634. setResult(result, path, current);
  9635. } else {
  9636. var loop = function ( key ) {
  9637. var currentValue = current[key];
  9638. var preValue = pre[key];
  9639. var currentType = type(currentValue);
  9640. var preType = type(preValue);
  9641. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9642. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9643. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9644. }
  9645. } else if (currentType == ARRAYTYPE) {
  9646. if (preType != ARRAYTYPE) {
  9647. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9648. } else {
  9649. if (currentValue.length < preValue.length) {
  9650. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9651. } else {
  9652. currentValue.forEach(function (item, index) {
  9653. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9654. });
  9655. }
  9656. }
  9657. } else if (currentType == OBJECTTYPE) {
  9658. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9659. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9660. } else {
  9661. for (var subKey in currentValue) {
  9662. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9663. }
  9664. }
  9665. }
  9666. };
  9667. for (var key in current) loop( key );
  9668. }
  9669. } else if (rootCurrentType == ARRAYTYPE) {
  9670. if (rootPreType != ARRAYTYPE) {
  9671. setResult(result, path, current);
  9672. } else {
  9673. if (current.length < pre.length) {
  9674. setResult(result, path, current);
  9675. } else {
  9676. current.forEach(function (item, index) {
  9677. _diff(item, pre[index], path + '[' + index + ']', result);
  9678. });
  9679. }
  9680. }
  9681. } else {
  9682. setResult(result, path, current);
  9683. }
  9684. }
  9685. function setResult(result, k, v) {
  9686. // if (type(v) != FUNCTIONTYPE) {
  9687. result[k] = v;
  9688. // }
  9689. }
  9690. function type(obj) {
  9691. return Object.prototype.toString.call(obj)
  9692. }
  9693. /* */
  9694. function flushCallbacks$1(vm) {
  9695. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9696. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9697. var mpInstance = vm.$scope;
  9698. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9699. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9700. }
  9701. var copies = vm.__next_tick_callbacks.slice(0);
  9702. vm.__next_tick_callbacks.length = 0;
  9703. for (var i = 0; i < copies.length; i++) {
  9704. copies[i]();
  9705. }
  9706. }
  9707. }
  9708. function hasRenderWatcher(vm) {
  9709. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9710. }
  9711. function nextTick$1(vm, cb) {
  9712. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9713. //2.nextTick 之前存在 render watcher
  9714. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9715. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9716. var mpInstance = vm.$scope;
  9717. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9718. ']:nextVueTick');
  9719. }
  9720. return nextTick(cb, vm)
  9721. }else{
  9722. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9723. var mpInstance$1 = vm.$scope;
  9724. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9725. ']:nextMPTick');
  9726. }
  9727. }
  9728. var _resolve;
  9729. if (!vm.__next_tick_callbacks) {
  9730. vm.__next_tick_callbacks = [];
  9731. }
  9732. vm.__next_tick_callbacks.push(function () {
  9733. if (cb) {
  9734. try {
  9735. cb.call(vm);
  9736. } catch (e) {
  9737. handleError(e, vm, 'nextTick');
  9738. }
  9739. } else if (_resolve) {
  9740. _resolve(vm);
  9741. }
  9742. });
  9743. // $flow-disable-line
  9744. if (!cb && typeof Promise !== 'undefined') {
  9745. return new Promise(function (resolve) {
  9746. _resolve = resolve;
  9747. })
  9748. }
  9749. }
  9750. /* */
  9751. function clearInstance(key, value) {
  9752. // 简易去除 Vue 和小程序组件实例
  9753. if (value) {
  9754. if (value._isVue || value.__v_isMPComponent) {
  9755. return {}
  9756. }
  9757. }
  9758. return value
  9759. }
  9760. function cloneWithData(vm) {
  9761. // 确保当前 vm 所有数据被同步
  9762. var ret = Object.create(null);
  9763. var dataKeys = [].concat(
  9764. Object.keys(vm._data || {}),
  9765. Object.keys(vm._computedWatchers || {}));
  9766. dataKeys.reduce(function(ret, key) {
  9767. ret[key] = vm[key];
  9768. return ret
  9769. }, ret);
  9770. // vue-composition-api
  9771. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9772. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9773. if (rawBindings) {
  9774. Object.keys(rawBindings).forEach(function (key) {
  9775. ret[key] = vm[key];
  9776. });
  9777. }
  9778. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9779. Object.assign(ret, vm.$mp.data || {});
  9780. if (
  9781. Array.isArray(vm.$options.behaviors) &&
  9782. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9783. ) { //form-field
  9784. ret['name'] = vm.name;
  9785. ret['value'] = vm.value;
  9786. }
  9787. return JSON.parse(JSON.stringify(ret, clearInstance))
  9788. }
  9789. var patch = function(oldVnode, vnode) {
  9790. var this$1 = this;
  9791. if (vnode === null) { //destroy
  9792. return
  9793. }
  9794. if (this.mpType === 'page' || this.mpType === 'component') {
  9795. var mpInstance = this.$scope;
  9796. var data = Object.create(null);
  9797. try {
  9798. data = cloneWithData(this);
  9799. } catch (err) {
  9800. console.error(err);
  9801. }
  9802. data.__webviewId__ = mpInstance.data.__webviewId__;
  9803. var mpData = Object.create(null);
  9804. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9805. mpData[key] = mpInstance.data[key];
  9806. });
  9807. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9808. if (Object.keys(diffData).length) {
  9809. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"wx","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9810. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9811. ']差量更新',
  9812. JSON.stringify(diffData));
  9813. }
  9814. this.__next_tick_pending = true;
  9815. mpInstance.setData(diffData, function () {
  9816. this$1.__next_tick_pending = false;
  9817. flushCallbacks$1(this$1);
  9818. });
  9819. } else {
  9820. flushCallbacks$1(this);
  9821. }
  9822. }
  9823. };
  9824. /* */
  9825. function createEmptyRender() {
  9826. }
  9827. function mountComponent$1(
  9828. vm,
  9829. el,
  9830. hydrating
  9831. ) {
  9832. if (!vm.mpType) {//main.js 中的 new Vue
  9833. return vm
  9834. }
  9835. if (vm.mpType === 'app') {
  9836. vm.$options.render = createEmptyRender;
  9837. }
  9838. if (!vm.$options.render) {
  9839. vm.$options.render = createEmptyRender;
  9840. if (true) {
  9841. /* istanbul ignore if */
  9842. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9843. vm.$options.el || el) {
  9844. warn(
  9845. 'You are using the runtime-only build of Vue where the template ' +
  9846. 'compiler is not available. Either pre-compile the templates into ' +
  9847. 'render functions, or use the compiler-included build.',
  9848. vm
  9849. );
  9850. } else {
  9851. warn(
  9852. 'Failed to mount component: template or render function not defined.',
  9853. vm
  9854. );
  9855. }
  9856. }
  9857. }
  9858. !vm._$fallback && callHook(vm, 'beforeMount');
  9859. var updateComponent = function () {
  9860. vm._update(vm._render(), hydrating);
  9861. };
  9862. // we set this to vm._watcher inside the watcher's constructor
  9863. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9864. // component's mounted hook), which relies on vm._watcher being already defined
  9865. new Watcher(vm, updateComponent, noop, {
  9866. before: function before() {
  9867. if (vm._isMounted && !vm._isDestroyed) {
  9868. callHook(vm, 'beforeUpdate');
  9869. }
  9870. }
  9871. }, true /* isRenderWatcher */);
  9872. hydrating = false;
  9873. return vm
  9874. }
  9875. /* */
  9876. function renderClass (
  9877. staticClass,
  9878. dynamicClass
  9879. ) {
  9880. if (isDef(staticClass) || isDef(dynamicClass)) {
  9881. return concat(staticClass, stringifyClass(dynamicClass))
  9882. }
  9883. /* istanbul ignore next */
  9884. return ''
  9885. }
  9886. function concat (a, b) {
  9887. return a ? b ? (a + ' ' + b) : a : (b || '')
  9888. }
  9889. function stringifyClass (value) {
  9890. if (Array.isArray(value)) {
  9891. return stringifyArray(value)
  9892. }
  9893. if (isObject(value)) {
  9894. return stringifyObject(value)
  9895. }
  9896. if (typeof value === 'string') {
  9897. return value
  9898. }
  9899. /* istanbul ignore next */
  9900. return ''
  9901. }
  9902. function stringifyArray (value) {
  9903. var res = '';
  9904. var stringified;
  9905. for (var i = 0, l = value.length; i < l; i++) {
  9906. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9907. if (res) { res += ' '; }
  9908. res += stringified;
  9909. }
  9910. }
  9911. return res
  9912. }
  9913. function stringifyObject (value) {
  9914. var res = '';
  9915. for (var key in value) {
  9916. if (value[key]) {
  9917. if (res) { res += ' '; }
  9918. res += key;
  9919. }
  9920. }
  9921. return res
  9922. }
  9923. /* */
  9924. var parseStyleText = cached(function (cssText) {
  9925. var res = {};
  9926. var listDelimiter = /;(?![^(]*\))/g;
  9927. var propertyDelimiter = /:(.+)/;
  9928. cssText.split(listDelimiter).forEach(function (item) {
  9929. if (item) {
  9930. var tmp = item.split(propertyDelimiter);
  9931. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9932. }
  9933. });
  9934. return res
  9935. });
  9936. // normalize possible array / string values into Object
  9937. function normalizeStyleBinding (bindingStyle) {
  9938. if (Array.isArray(bindingStyle)) {
  9939. return toObject(bindingStyle)
  9940. }
  9941. if (typeof bindingStyle === 'string') {
  9942. return parseStyleText(bindingStyle)
  9943. }
  9944. return bindingStyle
  9945. }
  9946. /* */
  9947. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9948. function getTarget(obj, path) {
  9949. var parts = path.split('.');
  9950. var key = parts[0];
  9951. if (key.indexOf('__$n') === 0) { //number index
  9952. key = parseInt(key.replace('__$n', ''));
  9953. }
  9954. if (parts.length === 1) {
  9955. return obj[key]
  9956. }
  9957. return getTarget(obj[key], parts.slice(1).join('.'))
  9958. }
  9959. function internalMixin(Vue) {
  9960. Vue.config.errorHandler = function(err, vm, info) {
  9961. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9962. console.error(err);
  9963. /* eslint-disable no-undef */
  9964. var app = typeof getApp === 'function' && getApp();
  9965. if (app && app.onError) {
  9966. app.onError(err);
  9967. }
  9968. };
  9969. var oldEmit = Vue.prototype.$emit;
  9970. Vue.prototype.$emit = function(event) {
  9971. if (this.$scope && event) {
  9972. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9973. if (triggerEvent) {
  9974. try {
  9975. triggerEvent.call(this.$scope, event, {
  9976. __args__: toArray(arguments, 1)
  9977. });
  9978. } catch (error) {
  9979. }
  9980. }
  9981. }
  9982. return oldEmit.apply(this, arguments)
  9983. };
  9984. Vue.prototype.$nextTick = function(fn) {
  9985. return nextTick$1(this, fn)
  9986. };
  9987. MP_METHODS.forEach(function (method) {
  9988. Vue.prototype[method] = function(args) {
  9989. if (this.$scope && this.$scope[method]) {
  9990. return this.$scope[method](args)
  9991. }
  9992. // mp-alipay
  9993. if (typeof my === 'undefined') {
  9994. return
  9995. }
  9996. if (method === 'createSelectorQuery') {
  9997. /* eslint-disable no-undef */
  9998. return my.createSelectorQuery(args)
  9999. } else if (method === 'createIntersectionObserver') {
  10000. /* eslint-disable no-undef */
  10001. return my.createIntersectionObserver(args)
  10002. }
  10003. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10004. };
  10005. });
  10006. Vue.prototype.__init_provide = initProvide;
  10007. Vue.prototype.__init_injections = initInjections;
  10008. Vue.prototype.__call_hook = function(hook, args) {
  10009. var vm = this;
  10010. // #7573 disable dep collection when invoking lifecycle hooks
  10011. pushTarget();
  10012. var handlers = vm.$options[hook];
  10013. var info = hook + " hook";
  10014. var ret;
  10015. if (handlers) {
  10016. for (var i = 0, j = handlers.length; i < j; i++) {
  10017. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  10018. }
  10019. }
  10020. if (vm._hasHookEvent) {
  10021. vm.$emit('hook:' + hook, args);
  10022. }
  10023. popTarget();
  10024. return ret
  10025. };
  10026. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  10027. if (Array.isArray(modifiers)) {
  10028. if (modifiers.indexOf('trim') !== -1) {
  10029. value = value.trim();
  10030. }
  10031. if (modifiers.indexOf('number') !== -1) {
  10032. value = this._n(value);
  10033. }
  10034. }
  10035. if (!target) {
  10036. target = this;
  10037. }
  10038. // 解决动态属性添加
  10039. Vue.set(target, key, value);
  10040. };
  10041. Vue.prototype.__set_sync = function(target, key, value) {
  10042. if (!target) {
  10043. target = this;
  10044. }
  10045. // 解决动态属性添加
  10046. Vue.set(target, key, value);
  10047. };
  10048. Vue.prototype.__get_orig = function(item) {
  10049. if (isPlainObject(item)) {
  10050. return item['$orig'] || item
  10051. }
  10052. return item
  10053. };
  10054. Vue.prototype.__get_value = function(dataPath, target) {
  10055. return getTarget(target || this, dataPath)
  10056. };
  10057. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  10058. return renderClass(staticClass, dynamicClass)
  10059. };
  10060. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  10061. if (!dynamicStyle && !staticStyle) {
  10062. return ''
  10063. }
  10064. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  10065. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  10066. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  10067. };
  10068. Vue.prototype.__map = function(val, iteratee) {
  10069. //TODO 暂不考虑 string
  10070. var ret, i, l, keys, key;
  10071. if (Array.isArray(val)) {
  10072. ret = new Array(val.length);
  10073. for (i = 0, l = val.length; i < l; i++) {
  10074. ret[i] = iteratee(val[i], i);
  10075. }
  10076. return ret
  10077. } else if (isObject(val)) {
  10078. keys = Object.keys(val);
  10079. ret = Object.create(null);
  10080. for (i = 0, l = keys.length; i < l; i++) {
  10081. key = keys[i];
  10082. ret[key] = iteratee(val[key], key, i);
  10083. }
  10084. return ret
  10085. } else if (typeof val === 'number') {
  10086. ret = new Array(val);
  10087. for (i = 0, l = val; i < l; i++) {
  10088. // 第一个参数暂时仍和小程序一致
  10089. ret[i] = iteratee(i, i);
  10090. }
  10091. return ret
  10092. }
  10093. return []
  10094. };
  10095. }
  10096. /* */
  10097. var LIFECYCLE_HOOKS$1 = [
  10098. //App
  10099. 'onLaunch',
  10100. 'onShow',
  10101. 'onHide',
  10102. 'onUniNViewMessage',
  10103. 'onPageNotFound',
  10104. 'onThemeChange',
  10105. 'onError',
  10106. 'onUnhandledRejection',
  10107. //Page
  10108. 'onInit',
  10109. 'onLoad',
  10110. // 'onShow',
  10111. 'onReady',
  10112. // 'onHide',
  10113. 'onUnload',
  10114. 'onPullDownRefresh',
  10115. 'onReachBottom',
  10116. 'onTabItemTap',
  10117. 'onAddToFavorites',
  10118. 'onShareTimeline',
  10119. 'onShareAppMessage',
  10120. 'onResize',
  10121. 'onPageScroll',
  10122. 'onNavigationBarButtonTap',
  10123. 'onBackPress',
  10124. 'onNavigationBarSearchInputChanged',
  10125. 'onNavigationBarSearchInputConfirmed',
  10126. 'onNavigationBarSearchInputClicked',
  10127. 'onUploadDouyinVideo',
  10128. 'onNFCReadMessage',
  10129. //Component
  10130. // 'onReady', // 兼容旧版本,应该移除该事件
  10131. 'onPageShow',
  10132. 'onPageHide',
  10133. 'onPageResize'
  10134. ];
  10135. function lifecycleMixin$1(Vue) {
  10136. //fixed vue-class-component
  10137. var oldExtend = Vue.extend;
  10138. Vue.extend = function(extendOptions) {
  10139. extendOptions = extendOptions || {};
  10140. var methods = extendOptions.methods;
  10141. if (methods) {
  10142. Object.keys(methods).forEach(function (methodName) {
  10143. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10144. extendOptions[methodName] = methods[methodName];
  10145. delete methods[methodName];
  10146. }
  10147. });
  10148. }
  10149. return oldExtend.call(this, extendOptions)
  10150. };
  10151. var strategies = Vue.config.optionMergeStrategies;
  10152. var mergeHook = strategies.created;
  10153. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10154. strategies[hook] = mergeHook;
  10155. });
  10156. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10157. }
  10158. /* */
  10159. // install platform patch function
  10160. Vue.prototype.__patch__ = patch;
  10161. // public mount method
  10162. Vue.prototype.$mount = function(
  10163. el ,
  10164. hydrating
  10165. ) {
  10166. return mountComponent$1(this, el, hydrating)
  10167. };
  10168. lifecycleMixin$1(Vue);
  10169. internalMixin(Vue);
  10170. /* */
  10171. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10172. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10173. /***/ }),
  10174. /***/ 26:
  10175. /*!*****************************************************************************!*\
  10176. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/pages.json ***!
  10177. \*****************************************************************************/
  10178. /*! no static exports found */
  10179. /***/ (function(module, exports) {
  10180. /***/ }),
  10181. /***/ 3:
  10182. /*!***********************************!*\
  10183. !*** (webpack)/buildin/global.js ***!
  10184. \***********************************/
  10185. /*! no static exports found */
  10186. /***/ (function(module, exports) {
  10187. var g;
  10188. // This works in non-strict mode
  10189. g = (function() {
  10190. return this;
  10191. })();
  10192. try {
  10193. // This works if eval is allowed (see CSP)
  10194. g = g || new Function("return this")();
  10195. } catch (e) {
  10196. // This works if the window reference is available
  10197. if (typeof window === "object") g = window;
  10198. }
  10199. // g can still be undefined, but nothing to do about it...
  10200. // We return undefined, instead of nothing here, so it's
  10201. // easier to handle this case. if(!global) { ...}
  10202. module.exports = g;
  10203. /***/ }),
  10204. /***/ 32:
  10205. /*!**********************************************************************************************************!*\
  10206. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  10207. \**********************************************************************************************************/
  10208. /*! exports provided: default */
  10209. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10210. "use strict";
  10211. __webpack_require__.r(__webpack_exports__);
  10212. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  10213. /* globals __VUE_SSR_CONTEXT__ */
  10214. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  10215. // This module is a runtime utility for cleaner component module output and will
  10216. // be included in the final webpack user bundle.
  10217. function normalizeComponent (
  10218. scriptExports,
  10219. render,
  10220. staticRenderFns,
  10221. functionalTemplate,
  10222. injectStyles,
  10223. scopeId,
  10224. moduleIdentifier, /* server only */
  10225. shadowMode, /* vue-cli only */
  10226. components, // fixed by xxxxxx auto components
  10227. renderjs // fixed by xxxxxx renderjs
  10228. ) {
  10229. // Vue.extend constructor export interop
  10230. var options = typeof scriptExports === 'function'
  10231. ? scriptExports.options
  10232. : scriptExports
  10233. // fixed by xxxxxx auto components
  10234. if (components) {
  10235. if (!options.components) {
  10236. options.components = {}
  10237. }
  10238. var hasOwn = Object.prototype.hasOwnProperty
  10239. for (var name in components) {
  10240. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  10241. options.components[name] = components[name]
  10242. }
  10243. }
  10244. }
  10245. // fixed by xxxxxx renderjs
  10246. if (renderjs) {
  10247. if(typeof renderjs.beforeCreate === 'function'){
  10248. renderjs.beforeCreate = [renderjs.beforeCreate]
  10249. }
  10250. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  10251. this[renderjs.__module] = this
  10252. });
  10253. (options.mixins || (options.mixins = [])).push(renderjs)
  10254. }
  10255. // render functions
  10256. if (render) {
  10257. options.render = render
  10258. options.staticRenderFns = staticRenderFns
  10259. options._compiled = true
  10260. }
  10261. // functional template
  10262. if (functionalTemplate) {
  10263. options.functional = true
  10264. }
  10265. // scopedId
  10266. if (scopeId) {
  10267. options._scopeId = 'data-v-' + scopeId
  10268. }
  10269. var hook
  10270. if (moduleIdentifier) { // server build
  10271. hook = function (context) {
  10272. // 2.3 injection
  10273. context =
  10274. context || // cached call
  10275. (this.$vnode && this.$vnode.ssrContext) || // stateful
  10276. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  10277. // 2.2 with runInNewContext: true
  10278. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  10279. context = __VUE_SSR_CONTEXT__
  10280. }
  10281. // inject component styles
  10282. if (injectStyles) {
  10283. injectStyles.call(this, context)
  10284. }
  10285. // register component module identifier for async chunk inferrence
  10286. if (context && context._registeredComponents) {
  10287. context._registeredComponents.add(moduleIdentifier)
  10288. }
  10289. }
  10290. // used by ssr in case component is cached and beforeCreate
  10291. // never gets called
  10292. options._ssrRegister = hook
  10293. } else if (injectStyles) {
  10294. hook = shadowMode
  10295. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  10296. : injectStyles
  10297. }
  10298. if (hook) {
  10299. if (options.functional) {
  10300. // for template-only hot-reload because in that case the render fn doesn't
  10301. // go through the normalizer
  10302. options._injectStyles = hook
  10303. // register for functioal component in vue file
  10304. var originalRender = options.render
  10305. options.render = function renderWithStyleInjection (h, context) {
  10306. hook.call(context)
  10307. return originalRender(h, context)
  10308. }
  10309. } else {
  10310. // inject component registration as beforeCreate hook
  10311. var existing = options.beforeCreate
  10312. options.beforeCreate = existing
  10313. ? [].concat(existing, hook)
  10314. : [hook]
  10315. }
  10316. }
  10317. return {
  10318. exports: scriptExports,
  10319. options: options
  10320. }
  10321. }
  10322. /***/ }),
  10323. /***/ 33:
  10324. /*!*********************************************************************************!*\
  10325. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/index.js ***!
  10326. \*********************************************************************************/
  10327. /*! no static exports found */
  10328. /***/ (function(module, exports, __webpack_require__) {
  10329. "use strict";
  10330. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10331. Object.defineProperty(exports, "__esModule", {
  10332. value: true
  10333. });
  10334. exports.default = void 0;
  10335. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  10336. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 34));
  10337. var _getters = _interopRequireDefault(__webpack_require__(/*! ./getters */ 35));
  10338. _vue.default.use(_vuex.default);
  10339. var modulesFiles = __webpack_require__(36);
  10340. var modules = modulesFiles.keys().reduce(function (modules, modulePath) {
  10341. var moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1');
  10342. var value = modulesFiles(modulePath);
  10343. modules[moduleName] = value.default;
  10344. return modules;
  10345. }, {});
  10346. var store = new _vuex.default.Store({
  10347. modules: modules,
  10348. getters: _getters.default
  10349. });
  10350. var _default = store;
  10351. exports.default = _default;
  10352. /***/ }),
  10353. /***/ 34:
  10354. /*!**************************************************************************************!*\
  10355. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  10356. \**************************************************************************************/
  10357. /*! no static exports found */
  10358. /***/ (function(module, exports, __webpack_require__) {
  10359. "use strict";
  10360. /* WEBPACK VAR INJECTION */(function(global) {/*!
  10361. * vuex v3.6.2
  10362. * (c) 2021 Evan You
  10363. * @license MIT
  10364. */
  10365. function applyMixin (Vue) {
  10366. var version = Number(Vue.version.split('.')[0]);
  10367. if (version >= 2) {
  10368. Vue.mixin({ beforeCreate: vuexInit });
  10369. } else {
  10370. // override init and inject vuex init procedure
  10371. // for 1.x backwards compatibility.
  10372. var _init = Vue.prototype._init;
  10373. Vue.prototype._init = function (options) {
  10374. if ( options === void 0 ) options = {};
  10375. options.init = options.init
  10376. ? [vuexInit].concat(options.init)
  10377. : vuexInit;
  10378. _init.call(this, options);
  10379. };
  10380. }
  10381. /**
  10382. * Vuex init hook, injected into each instances init hooks list.
  10383. */
  10384. function vuexInit () {
  10385. var options = this.$options;
  10386. // store injection
  10387. if (options.store) {
  10388. this.$store = typeof options.store === 'function'
  10389. ? options.store()
  10390. : options.store;
  10391. } else if (options.parent && options.parent.$store) {
  10392. this.$store = options.parent.$store;
  10393. }
  10394. }
  10395. }
  10396. var target = typeof window !== 'undefined'
  10397. ? window
  10398. : typeof global !== 'undefined'
  10399. ? global
  10400. : {};
  10401. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  10402. function devtoolPlugin (store) {
  10403. if (!devtoolHook) { return }
  10404. store._devtoolHook = devtoolHook;
  10405. devtoolHook.emit('vuex:init', store);
  10406. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  10407. store.replaceState(targetState);
  10408. });
  10409. store.subscribe(function (mutation, state) {
  10410. devtoolHook.emit('vuex:mutation', mutation, state);
  10411. }, { prepend: true });
  10412. store.subscribeAction(function (action, state) {
  10413. devtoolHook.emit('vuex:action', action, state);
  10414. }, { prepend: true });
  10415. }
  10416. /**
  10417. * Get the first item that pass the test
  10418. * by second argument function
  10419. *
  10420. * @param {Array} list
  10421. * @param {Function} f
  10422. * @return {*}
  10423. */
  10424. function find (list, f) {
  10425. return list.filter(f)[0]
  10426. }
  10427. /**
  10428. * Deep copy the given object considering circular structure.
  10429. * This function caches all nested objects and its copies.
  10430. * If it detects circular structure, use cached copy to avoid infinite loop.
  10431. *
  10432. * @param {*} obj
  10433. * @param {Array<Object>} cache
  10434. * @return {*}
  10435. */
  10436. function deepCopy (obj, cache) {
  10437. if ( cache === void 0 ) cache = [];
  10438. // just return if obj is immutable value
  10439. if (obj === null || typeof obj !== 'object') {
  10440. return obj
  10441. }
  10442. // if obj is hit, it is in circular structure
  10443. var hit = find(cache, function (c) { return c.original === obj; });
  10444. if (hit) {
  10445. return hit.copy
  10446. }
  10447. var copy = Array.isArray(obj) ? [] : {};
  10448. // put the copy into cache at first
  10449. // because we want to refer it in recursive deepCopy
  10450. cache.push({
  10451. original: obj,
  10452. copy: copy
  10453. });
  10454. Object.keys(obj).forEach(function (key) {
  10455. copy[key] = deepCopy(obj[key], cache);
  10456. });
  10457. return copy
  10458. }
  10459. /**
  10460. * forEach for object
  10461. */
  10462. function forEachValue (obj, fn) {
  10463. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  10464. }
  10465. function isObject (obj) {
  10466. return obj !== null && typeof obj === 'object'
  10467. }
  10468. function isPromise (val) {
  10469. return val && typeof val.then === 'function'
  10470. }
  10471. function assert (condition, msg) {
  10472. if (!condition) { throw new Error(("[vuex] " + msg)) }
  10473. }
  10474. function partial (fn, arg) {
  10475. return function () {
  10476. return fn(arg)
  10477. }
  10478. }
  10479. // Base data struct for store's module, package with some attribute and method
  10480. var Module = function Module (rawModule, runtime) {
  10481. this.runtime = runtime;
  10482. // Store some children item
  10483. this._children = Object.create(null);
  10484. // Store the origin module object which passed by programmer
  10485. this._rawModule = rawModule;
  10486. var rawState = rawModule.state;
  10487. // Store the origin module's state
  10488. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  10489. };
  10490. var prototypeAccessors = { namespaced: { configurable: true } };
  10491. prototypeAccessors.namespaced.get = function () {
  10492. return !!this._rawModule.namespaced
  10493. };
  10494. Module.prototype.addChild = function addChild (key, module) {
  10495. this._children[key] = module;
  10496. };
  10497. Module.prototype.removeChild = function removeChild (key) {
  10498. delete this._children[key];
  10499. };
  10500. Module.prototype.getChild = function getChild (key) {
  10501. return this._children[key]
  10502. };
  10503. Module.prototype.hasChild = function hasChild (key) {
  10504. return key in this._children
  10505. };
  10506. Module.prototype.update = function update (rawModule) {
  10507. this._rawModule.namespaced = rawModule.namespaced;
  10508. if (rawModule.actions) {
  10509. this._rawModule.actions = rawModule.actions;
  10510. }
  10511. if (rawModule.mutations) {
  10512. this._rawModule.mutations = rawModule.mutations;
  10513. }
  10514. if (rawModule.getters) {
  10515. this._rawModule.getters = rawModule.getters;
  10516. }
  10517. };
  10518. Module.prototype.forEachChild = function forEachChild (fn) {
  10519. forEachValue(this._children, fn);
  10520. };
  10521. Module.prototype.forEachGetter = function forEachGetter (fn) {
  10522. if (this._rawModule.getters) {
  10523. forEachValue(this._rawModule.getters, fn);
  10524. }
  10525. };
  10526. Module.prototype.forEachAction = function forEachAction (fn) {
  10527. if (this._rawModule.actions) {
  10528. forEachValue(this._rawModule.actions, fn);
  10529. }
  10530. };
  10531. Module.prototype.forEachMutation = function forEachMutation (fn) {
  10532. if (this._rawModule.mutations) {
  10533. forEachValue(this._rawModule.mutations, fn);
  10534. }
  10535. };
  10536. Object.defineProperties( Module.prototype, prototypeAccessors );
  10537. var ModuleCollection = function ModuleCollection (rawRootModule) {
  10538. // register root module (Vuex.Store options)
  10539. this.register([], rawRootModule, false);
  10540. };
  10541. ModuleCollection.prototype.get = function get (path) {
  10542. return path.reduce(function (module, key) {
  10543. return module.getChild(key)
  10544. }, this.root)
  10545. };
  10546. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  10547. var module = this.root;
  10548. return path.reduce(function (namespace, key) {
  10549. module = module.getChild(key);
  10550. return namespace + (module.namespaced ? key + '/' : '')
  10551. }, '')
  10552. };
  10553. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  10554. update([], this.root, rawRootModule);
  10555. };
  10556. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  10557. var this$1 = this;
  10558. if ( runtime === void 0 ) runtime = true;
  10559. if ((true)) {
  10560. assertRawModule(path, rawModule);
  10561. }
  10562. var newModule = new Module(rawModule, runtime);
  10563. if (path.length === 0) {
  10564. this.root = newModule;
  10565. } else {
  10566. var parent = this.get(path.slice(0, -1));
  10567. parent.addChild(path[path.length - 1], newModule);
  10568. }
  10569. // register nested modules
  10570. if (rawModule.modules) {
  10571. forEachValue(rawModule.modules, function (rawChildModule, key) {
  10572. this$1.register(path.concat(key), rawChildModule, runtime);
  10573. });
  10574. }
  10575. };
  10576. ModuleCollection.prototype.unregister = function unregister (path) {
  10577. var parent = this.get(path.slice(0, -1));
  10578. var key = path[path.length - 1];
  10579. var child = parent.getChild(key);
  10580. if (!child) {
  10581. if ((true)) {
  10582. console.warn(
  10583. "[vuex] trying to unregister module '" + key + "', which is " +
  10584. "not registered"
  10585. );
  10586. }
  10587. return
  10588. }
  10589. if (!child.runtime) {
  10590. return
  10591. }
  10592. parent.removeChild(key);
  10593. };
  10594. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  10595. var parent = this.get(path.slice(0, -1));
  10596. var key = path[path.length - 1];
  10597. if (parent) {
  10598. return parent.hasChild(key)
  10599. }
  10600. return false
  10601. };
  10602. function update (path, targetModule, newModule) {
  10603. if ((true)) {
  10604. assertRawModule(path, newModule);
  10605. }
  10606. // update target module
  10607. targetModule.update(newModule);
  10608. // update nested modules
  10609. if (newModule.modules) {
  10610. for (var key in newModule.modules) {
  10611. if (!targetModule.getChild(key)) {
  10612. if ((true)) {
  10613. console.warn(
  10614. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  10615. 'manual reload is needed'
  10616. );
  10617. }
  10618. return
  10619. }
  10620. update(
  10621. path.concat(key),
  10622. targetModule.getChild(key),
  10623. newModule.modules[key]
  10624. );
  10625. }
  10626. }
  10627. }
  10628. var functionAssert = {
  10629. assert: function (value) { return typeof value === 'function'; },
  10630. expected: 'function'
  10631. };
  10632. var objectAssert = {
  10633. assert: function (value) { return typeof value === 'function' ||
  10634. (typeof value === 'object' && typeof value.handler === 'function'); },
  10635. expected: 'function or object with "handler" function'
  10636. };
  10637. var assertTypes = {
  10638. getters: functionAssert,
  10639. mutations: functionAssert,
  10640. actions: objectAssert
  10641. };
  10642. function assertRawModule (path, rawModule) {
  10643. Object.keys(assertTypes).forEach(function (key) {
  10644. if (!rawModule[key]) { return }
  10645. var assertOptions = assertTypes[key];
  10646. forEachValue(rawModule[key], function (value, type) {
  10647. assert(
  10648. assertOptions.assert(value),
  10649. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  10650. );
  10651. });
  10652. });
  10653. }
  10654. function makeAssertionMessage (path, key, type, value, expected) {
  10655. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  10656. if (path.length > 0) {
  10657. buf += " in module \"" + (path.join('.')) + "\"";
  10658. }
  10659. buf += " is " + (JSON.stringify(value)) + ".";
  10660. return buf
  10661. }
  10662. var Vue; // bind on install
  10663. var Store = function Store (options) {
  10664. var this$1 = this;
  10665. if ( options === void 0 ) options = {};
  10666. // Auto install if it is not done yet and `window` has `Vue`.
  10667. // To allow users to avoid auto-installation in some cases,
  10668. // this code should be placed here. See #731
  10669. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  10670. install(window.Vue);
  10671. }
  10672. if ((true)) {
  10673. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  10674. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  10675. assert(this instanceof Store, "store must be called with the new operator.");
  10676. }
  10677. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  10678. var strict = options.strict; if ( strict === void 0 ) strict = false;
  10679. // store internal state
  10680. this._committing = false;
  10681. this._actions = Object.create(null);
  10682. this._actionSubscribers = [];
  10683. this._mutations = Object.create(null);
  10684. this._wrappedGetters = Object.create(null);
  10685. this._modules = new ModuleCollection(options);
  10686. this._modulesNamespaceMap = Object.create(null);
  10687. this._subscribers = [];
  10688. this._watcherVM = new Vue();
  10689. this._makeLocalGettersCache = Object.create(null);
  10690. // bind commit and dispatch to self
  10691. var store = this;
  10692. var ref = this;
  10693. var dispatch = ref.dispatch;
  10694. var commit = ref.commit;
  10695. this.dispatch = function boundDispatch (type, payload) {
  10696. return dispatch.call(store, type, payload)
  10697. };
  10698. this.commit = function boundCommit (type, payload, options) {
  10699. return commit.call(store, type, payload, options)
  10700. };
  10701. // strict mode
  10702. this.strict = strict;
  10703. var state = this._modules.root.state;
  10704. // init root module.
  10705. // this also recursively registers all sub-modules
  10706. // and collects all module getters inside this._wrappedGetters
  10707. installModule(this, state, [], this._modules.root);
  10708. // initialize the store vm, which is responsible for the reactivity
  10709. // (also registers _wrappedGetters as computed properties)
  10710. resetStoreVM(this, state);
  10711. // apply plugins
  10712. plugins.forEach(function (plugin) { return plugin(this$1); });
  10713. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  10714. if (useDevtools) {
  10715. devtoolPlugin(this);
  10716. }
  10717. };
  10718. var prototypeAccessors$1 = { state: { configurable: true } };
  10719. prototypeAccessors$1.state.get = function () {
  10720. return this._vm._data.$$state
  10721. };
  10722. prototypeAccessors$1.state.set = function (v) {
  10723. if ((true)) {
  10724. assert(false, "use store.replaceState() to explicit replace store state.");
  10725. }
  10726. };
  10727. Store.prototype.commit = function commit (_type, _payload, _options) {
  10728. var this$1 = this;
  10729. // check object-style commit
  10730. var ref = unifyObjectStyle(_type, _payload, _options);
  10731. var type = ref.type;
  10732. var payload = ref.payload;
  10733. var options = ref.options;
  10734. var mutation = { type: type, payload: payload };
  10735. var entry = this._mutations[type];
  10736. if (!entry) {
  10737. if ((true)) {
  10738. console.error(("[vuex] unknown mutation type: " + type));
  10739. }
  10740. return
  10741. }
  10742. this._withCommit(function () {
  10743. entry.forEach(function commitIterator (handler) {
  10744. handler(payload);
  10745. });
  10746. });
  10747. this._subscribers
  10748. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  10749. .forEach(function (sub) { return sub(mutation, this$1.state); });
  10750. if (
  10751. ( true) &&
  10752. options && options.silent
  10753. ) {
  10754. console.warn(
  10755. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  10756. 'Use the filter functionality in the vue-devtools'
  10757. );
  10758. }
  10759. };
  10760. Store.prototype.dispatch = function dispatch (_type, _payload) {
  10761. var this$1 = this;
  10762. // check object-style dispatch
  10763. var ref = unifyObjectStyle(_type, _payload);
  10764. var type = ref.type;
  10765. var payload = ref.payload;
  10766. var action = { type: type, payload: payload };
  10767. var entry = this._actions[type];
  10768. if (!entry) {
  10769. if ((true)) {
  10770. console.error(("[vuex] unknown action type: " + type));
  10771. }
  10772. return
  10773. }
  10774. try {
  10775. this._actionSubscribers
  10776. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  10777. .filter(function (sub) { return sub.before; })
  10778. .forEach(function (sub) { return sub.before(action, this$1.state); });
  10779. } catch (e) {
  10780. if ((true)) {
  10781. console.warn("[vuex] error in before action subscribers: ");
  10782. console.error(e);
  10783. }
  10784. }
  10785. var result = entry.length > 1
  10786. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  10787. : entry[0](payload);
  10788. return new Promise(function (resolve, reject) {
  10789. result.then(function (res) {
  10790. try {
  10791. this$1._actionSubscribers
  10792. .filter(function (sub) { return sub.after; })
  10793. .forEach(function (sub) { return sub.after(action, this$1.state); });
  10794. } catch (e) {
  10795. if ((true)) {
  10796. console.warn("[vuex] error in after action subscribers: ");
  10797. console.error(e);
  10798. }
  10799. }
  10800. resolve(res);
  10801. }, function (error) {
  10802. try {
  10803. this$1._actionSubscribers
  10804. .filter(function (sub) { return sub.error; })
  10805. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  10806. } catch (e) {
  10807. if ((true)) {
  10808. console.warn("[vuex] error in error action subscribers: ");
  10809. console.error(e);
  10810. }
  10811. }
  10812. reject(error);
  10813. });
  10814. })
  10815. };
  10816. Store.prototype.subscribe = function subscribe (fn, options) {
  10817. return genericSubscribe(fn, this._subscribers, options)
  10818. };
  10819. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  10820. var subs = typeof fn === 'function' ? { before: fn } : fn;
  10821. return genericSubscribe(subs, this._actionSubscribers, options)
  10822. };
  10823. Store.prototype.watch = function watch (getter, cb, options) {
  10824. var this$1 = this;
  10825. if ((true)) {
  10826. assert(typeof getter === 'function', "store.watch only accepts a function.");
  10827. }
  10828. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  10829. };
  10830. Store.prototype.replaceState = function replaceState (state) {
  10831. var this$1 = this;
  10832. this._withCommit(function () {
  10833. this$1._vm._data.$$state = state;
  10834. });
  10835. };
  10836. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  10837. if ( options === void 0 ) options = {};
  10838. if (typeof path === 'string') { path = [path]; }
  10839. if ((true)) {
  10840. assert(Array.isArray(path), "module path must be a string or an Array.");
  10841. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  10842. }
  10843. this._modules.register(path, rawModule);
  10844. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  10845. // reset store to update getters...
  10846. resetStoreVM(this, this.state);
  10847. };
  10848. Store.prototype.unregisterModule = function unregisterModule (path) {
  10849. var this$1 = this;
  10850. if (typeof path === 'string') { path = [path]; }
  10851. if ((true)) {
  10852. assert(Array.isArray(path), "module path must be a string or an Array.");
  10853. }
  10854. this._modules.unregister(path);
  10855. this._withCommit(function () {
  10856. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  10857. Vue.delete(parentState, path[path.length - 1]);
  10858. });
  10859. resetStore(this);
  10860. };
  10861. Store.prototype.hasModule = function hasModule (path) {
  10862. if (typeof path === 'string') { path = [path]; }
  10863. if ((true)) {
  10864. assert(Array.isArray(path), "module path must be a string or an Array.");
  10865. }
  10866. return this._modules.isRegistered(path)
  10867. };
  10868. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  10869. this._modules.update(newOptions);
  10870. resetStore(this, true);
  10871. };
  10872. Store.prototype._withCommit = function _withCommit (fn) {
  10873. var committing = this._committing;
  10874. this._committing = true;
  10875. fn();
  10876. this._committing = committing;
  10877. };
  10878. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  10879. function genericSubscribe (fn, subs, options) {
  10880. if (subs.indexOf(fn) < 0) {
  10881. options && options.prepend
  10882. ? subs.unshift(fn)
  10883. : subs.push(fn);
  10884. }
  10885. return function () {
  10886. var i = subs.indexOf(fn);
  10887. if (i > -1) {
  10888. subs.splice(i, 1);
  10889. }
  10890. }
  10891. }
  10892. function resetStore (store, hot) {
  10893. store._actions = Object.create(null);
  10894. store._mutations = Object.create(null);
  10895. store._wrappedGetters = Object.create(null);
  10896. store._modulesNamespaceMap = Object.create(null);
  10897. var state = store.state;
  10898. // init all modules
  10899. installModule(store, state, [], store._modules.root, true);
  10900. // reset vm
  10901. resetStoreVM(store, state, hot);
  10902. }
  10903. function resetStoreVM (store, state, hot) {
  10904. var oldVm = store._vm;
  10905. // bind store public getters
  10906. store.getters = {};
  10907. // reset local getters cache
  10908. store._makeLocalGettersCache = Object.create(null);
  10909. var wrappedGetters = store._wrappedGetters;
  10910. var computed = {};
  10911. forEachValue(wrappedGetters, function (fn, key) {
  10912. // use computed to leverage its lazy-caching mechanism
  10913. // direct inline function use will lead to closure preserving oldVm.
  10914. // using partial to return function with only arguments preserved in closure environment.
  10915. computed[key] = partial(fn, store);
  10916. Object.defineProperty(store.getters, key, {
  10917. get: function () { return store._vm[key]; },
  10918. enumerable: true // for local getters
  10919. });
  10920. });
  10921. // use a Vue instance to store the state tree
  10922. // suppress warnings just in case the user has added
  10923. // some funky global mixins
  10924. var silent = Vue.config.silent;
  10925. Vue.config.silent = true;
  10926. store._vm = new Vue({
  10927. data: {
  10928. $$state: state
  10929. },
  10930. computed: computed
  10931. });
  10932. Vue.config.silent = silent;
  10933. // enable strict mode for new vm
  10934. if (store.strict) {
  10935. enableStrictMode(store);
  10936. }
  10937. if (oldVm) {
  10938. if (hot) {
  10939. // dispatch changes in all subscribed watchers
  10940. // to force getter re-evaluation for hot reloading.
  10941. store._withCommit(function () {
  10942. oldVm._data.$$state = null;
  10943. });
  10944. }
  10945. Vue.nextTick(function () { return oldVm.$destroy(); });
  10946. }
  10947. }
  10948. function installModule (store, rootState, path, module, hot) {
  10949. var isRoot = !path.length;
  10950. var namespace = store._modules.getNamespace(path);
  10951. // register in namespace map
  10952. if (module.namespaced) {
  10953. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  10954. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  10955. }
  10956. store._modulesNamespaceMap[namespace] = module;
  10957. }
  10958. // set state
  10959. if (!isRoot && !hot) {
  10960. var parentState = getNestedState(rootState, path.slice(0, -1));
  10961. var moduleName = path[path.length - 1];
  10962. store._withCommit(function () {
  10963. if ((true)) {
  10964. if (moduleName in parentState) {
  10965. console.warn(
  10966. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  10967. );
  10968. }
  10969. }
  10970. Vue.set(parentState, moduleName, module.state);
  10971. });
  10972. }
  10973. var local = module.context = makeLocalContext(store, namespace, path);
  10974. module.forEachMutation(function (mutation, key) {
  10975. var namespacedType = namespace + key;
  10976. registerMutation(store, namespacedType, mutation, local);
  10977. });
  10978. module.forEachAction(function (action, key) {
  10979. var type = action.root ? key : namespace + key;
  10980. var handler = action.handler || action;
  10981. registerAction(store, type, handler, local);
  10982. });
  10983. module.forEachGetter(function (getter, key) {
  10984. var namespacedType = namespace + key;
  10985. registerGetter(store, namespacedType, getter, local);
  10986. });
  10987. module.forEachChild(function (child, key) {
  10988. installModule(store, rootState, path.concat(key), child, hot);
  10989. });
  10990. }
  10991. /**
  10992. * make localized dispatch, commit, getters and state
  10993. * if there is no namespace, just use root ones
  10994. */
  10995. function makeLocalContext (store, namespace, path) {
  10996. var noNamespace = namespace === '';
  10997. var local = {
  10998. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  10999. var args = unifyObjectStyle(_type, _payload, _options);
  11000. var payload = args.payload;
  11001. var options = args.options;
  11002. var type = args.type;
  11003. if (!options || !options.root) {
  11004. type = namespace + type;
  11005. if (( true) && !store._actions[type]) {
  11006. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  11007. return
  11008. }
  11009. }
  11010. return store.dispatch(type, payload)
  11011. },
  11012. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  11013. var args = unifyObjectStyle(_type, _payload, _options);
  11014. var payload = args.payload;
  11015. var options = args.options;
  11016. var type = args.type;
  11017. if (!options || !options.root) {
  11018. type = namespace + type;
  11019. if (( true) && !store._mutations[type]) {
  11020. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  11021. return
  11022. }
  11023. }
  11024. store.commit(type, payload, options);
  11025. }
  11026. };
  11027. // getters and state object must be gotten lazily
  11028. // because they will be changed by vm update
  11029. Object.defineProperties(local, {
  11030. getters: {
  11031. get: noNamespace
  11032. ? function () { return store.getters; }
  11033. : function () { return makeLocalGetters(store, namespace); }
  11034. },
  11035. state: {
  11036. get: function () { return getNestedState(store.state, path); }
  11037. }
  11038. });
  11039. return local
  11040. }
  11041. function makeLocalGetters (store, namespace) {
  11042. if (!store._makeLocalGettersCache[namespace]) {
  11043. var gettersProxy = {};
  11044. var splitPos = namespace.length;
  11045. Object.keys(store.getters).forEach(function (type) {
  11046. // skip if the target getter is not match this namespace
  11047. if (type.slice(0, splitPos) !== namespace) { return }
  11048. // extract local getter type
  11049. var localType = type.slice(splitPos);
  11050. // Add a port to the getters proxy.
  11051. // Define as getter property because
  11052. // we do not want to evaluate the getters in this time.
  11053. Object.defineProperty(gettersProxy, localType, {
  11054. get: function () { return store.getters[type]; },
  11055. enumerable: true
  11056. });
  11057. });
  11058. store._makeLocalGettersCache[namespace] = gettersProxy;
  11059. }
  11060. return store._makeLocalGettersCache[namespace]
  11061. }
  11062. function registerMutation (store, type, handler, local) {
  11063. var entry = store._mutations[type] || (store._mutations[type] = []);
  11064. entry.push(function wrappedMutationHandler (payload) {
  11065. handler.call(store, local.state, payload);
  11066. });
  11067. }
  11068. function registerAction (store, type, handler, local) {
  11069. var entry = store._actions[type] || (store._actions[type] = []);
  11070. entry.push(function wrappedActionHandler (payload) {
  11071. var res = handler.call(store, {
  11072. dispatch: local.dispatch,
  11073. commit: local.commit,
  11074. getters: local.getters,
  11075. state: local.state,
  11076. rootGetters: store.getters,
  11077. rootState: store.state
  11078. }, payload);
  11079. if (!isPromise(res)) {
  11080. res = Promise.resolve(res);
  11081. }
  11082. if (store._devtoolHook) {
  11083. return res.catch(function (err) {
  11084. store._devtoolHook.emit('vuex:error', err);
  11085. throw err
  11086. })
  11087. } else {
  11088. return res
  11089. }
  11090. });
  11091. }
  11092. function registerGetter (store, type, rawGetter, local) {
  11093. if (store._wrappedGetters[type]) {
  11094. if ((true)) {
  11095. console.error(("[vuex] duplicate getter key: " + type));
  11096. }
  11097. return
  11098. }
  11099. store._wrappedGetters[type] = function wrappedGetter (store) {
  11100. return rawGetter(
  11101. local.state, // local state
  11102. local.getters, // local getters
  11103. store.state, // root state
  11104. store.getters // root getters
  11105. )
  11106. };
  11107. }
  11108. function enableStrictMode (store) {
  11109. store._vm.$watch(function () { return this._data.$$state }, function () {
  11110. if ((true)) {
  11111. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  11112. }
  11113. }, { deep: true, sync: true });
  11114. }
  11115. function getNestedState (state, path) {
  11116. return path.reduce(function (state, key) { return state[key]; }, state)
  11117. }
  11118. function unifyObjectStyle (type, payload, options) {
  11119. if (isObject(type) && type.type) {
  11120. options = payload;
  11121. payload = type;
  11122. type = type.type;
  11123. }
  11124. if ((true)) {
  11125. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  11126. }
  11127. return { type: type, payload: payload, options: options }
  11128. }
  11129. function install (_Vue) {
  11130. if (Vue && _Vue === Vue) {
  11131. if ((true)) {
  11132. console.error(
  11133. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  11134. );
  11135. }
  11136. return
  11137. }
  11138. Vue = _Vue;
  11139. applyMixin(Vue);
  11140. }
  11141. /**
  11142. * Reduce the code which written in Vue.js for getting the state.
  11143. * @param {String} [namespace] - Module's namespace
  11144. * @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.
  11145. * @param {Object}
  11146. */
  11147. var mapState = normalizeNamespace(function (namespace, states) {
  11148. var res = {};
  11149. if (( true) && !isValidMap(states)) {
  11150. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  11151. }
  11152. normalizeMap(states).forEach(function (ref) {
  11153. var key = ref.key;
  11154. var val = ref.val;
  11155. res[key] = function mappedState () {
  11156. var state = this.$store.state;
  11157. var getters = this.$store.getters;
  11158. if (namespace) {
  11159. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  11160. if (!module) {
  11161. return
  11162. }
  11163. state = module.context.state;
  11164. getters = module.context.getters;
  11165. }
  11166. return typeof val === 'function'
  11167. ? val.call(this, state, getters)
  11168. : state[val]
  11169. };
  11170. // mark vuex getter for devtools
  11171. res[key].vuex = true;
  11172. });
  11173. return res
  11174. });
  11175. /**
  11176. * Reduce the code which written in Vue.js for committing the mutation
  11177. * @param {String} [namespace] - Module's namespace
  11178. * @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.
  11179. * @return {Object}
  11180. */
  11181. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  11182. var res = {};
  11183. if (( true) && !isValidMap(mutations)) {
  11184. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  11185. }
  11186. normalizeMap(mutations).forEach(function (ref) {
  11187. var key = ref.key;
  11188. var val = ref.val;
  11189. res[key] = function mappedMutation () {
  11190. var args = [], len = arguments.length;
  11191. while ( len-- ) args[ len ] = arguments[ len ];
  11192. // Get the commit method from store
  11193. var commit = this.$store.commit;
  11194. if (namespace) {
  11195. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  11196. if (!module) {
  11197. return
  11198. }
  11199. commit = module.context.commit;
  11200. }
  11201. return typeof val === 'function'
  11202. ? val.apply(this, [commit].concat(args))
  11203. : commit.apply(this.$store, [val].concat(args))
  11204. };
  11205. });
  11206. return res
  11207. });
  11208. /**
  11209. * Reduce the code which written in Vue.js for getting the getters
  11210. * @param {String} [namespace] - Module's namespace
  11211. * @param {Object|Array} getters
  11212. * @return {Object}
  11213. */
  11214. var mapGetters = normalizeNamespace(function (namespace, getters) {
  11215. var res = {};
  11216. if (( true) && !isValidMap(getters)) {
  11217. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  11218. }
  11219. normalizeMap(getters).forEach(function (ref) {
  11220. var key = ref.key;
  11221. var val = ref.val;
  11222. // The namespace has been mutated by normalizeNamespace
  11223. val = namespace + val;
  11224. res[key] = function mappedGetter () {
  11225. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  11226. return
  11227. }
  11228. if (( true) && !(val in this.$store.getters)) {
  11229. console.error(("[vuex] unknown getter: " + val));
  11230. return
  11231. }
  11232. return this.$store.getters[val]
  11233. };
  11234. // mark vuex getter for devtools
  11235. res[key].vuex = true;
  11236. });
  11237. return res
  11238. });
  11239. /**
  11240. * Reduce the code which written in Vue.js for dispatch the action
  11241. * @param {String} [namespace] - Module's namespace
  11242. * @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.
  11243. * @return {Object}
  11244. */
  11245. var mapActions = normalizeNamespace(function (namespace, actions) {
  11246. var res = {};
  11247. if (( true) && !isValidMap(actions)) {
  11248. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  11249. }
  11250. normalizeMap(actions).forEach(function (ref) {
  11251. var key = ref.key;
  11252. var val = ref.val;
  11253. res[key] = function mappedAction () {
  11254. var args = [], len = arguments.length;
  11255. while ( len-- ) args[ len ] = arguments[ len ];
  11256. // get dispatch function from store
  11257. var dispatch = this.$store.dispatch;
  11258. if (namespace) {
  11259. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  11260. if (!module) {
  11261. return
  11262. }
  11263. dispatch = module.context.dispatch;
  11264. }
  11265. return typeof val === 'function'
  11266. ? val.apply(this, [dispatch].concat(args))
  11267. : dispatch.apply(this.$store, [val].concat(args))
  11268. };
  11269. });
  11270. return res
  11271. });
  11272. /**
  11273. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  11274. * @param {String} namespace
  11275. * @return {Object}
  11276. */
  11277. var createNamespacedHelpers = function (namespace) { return ({
  11278. mapState: mapState.bind(null, namespace),
  11279. mapGetters: mapGetters.bind(null, namespace),
  11280. mapMutations: mapMutations.bind(null, namespace),
  11281. mapActions: mapActions.bind(null, namespace)
  11282. }); };
  11283. /**
  11284. * Normalize the map
  11285. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  11286. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  11287. * @param {Array|Object} map
  11288. * @return {Object}
  11289. */
  11290. function normalizeMap (map) {
  11291. if (!isValidMap(map)) {
  11292. return []
  11293. }
  11294. return Array.isArray(map)
  11295. ? map.map(function (key) { return ({ key: key, val: key }); })
  11296. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  11297. }
  11298. /**
  11299. * Validate whether given map is valid or not
  11300. * @param {*} map
  11301. * @return {Boolean}
  11302. */
  11303. function isValidMap (map) {
  11304. return Array.isArray(map) || isObject(map)
  11305. }
  11306. /**
  11307. * 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.
  11308. * @param {Function} fn
  11309. * @return {Function}
  11310. */
  11311. function normalizeNamespace (fn) {
  11312. return function (namespace, map) {
  11313. if (typeof namespace !== 'string') {
  11314. map = namespace;
  11315. namespace = '';
  11316. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  11317. namespace += '/';
  11318. }
  11319. return fn(namespace, map)
  11320. }
  11321. }
  11322. /**
  11323. * Search a special module from store by namespace. if module not exist, print error message.
  11324. * @param {Object} store
  11325. * @param {String} helper
  11326. * @param {String} namespace
  11327. * @return {Object}
  11328. */
  11329. function getModuleByNamespace (store, helper, namespace) {
  11330. var module = store._modulesNamespaceMap[namespace];
  11331. if (( true) && !module) {
  11332. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  11333. }
  11334. return module
  11335. }
  11336. // Credits: borrowed code from fcomb/redux-logger
  11337. function createLogger (ref) {
  11338. if ( ref === void 0 ) ref = {};
  11339. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  11340. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  11341. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  11342. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  11343. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  11344. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  11345. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  11346. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  11347. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  11348. return function (store) {
  11349. var prevState = deepCopy(store.state);
  11350. if (typeof logger === 'undefined') {
  11351. return
  11352. }
  11353. if (logMutations) {
  11354. store.subscribe(function (mutation, state) {
  11355. var nextState = deepCopy(state);
  11356. if (filter(mutation, prevState, nextState)) {
  11357. var formattedTime = getFormattedTime();
  11358. var formattedMutation = mutationTransformer(mutation);
  11359. var message = "mutation " + (mutation.type) + formattedTime;
  11360. startMessage(logger, message, collapsed);
  11361. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  11362. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  11363. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  11364. endMessage(logger);
  11365. }
  11366. prevState = nextState;
  11367. });
  11368. }
  11369. if (logActions) {
  11370. store.subscribeAction(function (action, state) {
  11371. if (actionFilter(action, state)) {
  11372. var formattedTime = getFormattedTime();
  11373. var formattedAction = actionTransformer(action);
  11374. var message = "action " + (action.type) + formattedTime;
  11375. startMessage(logger, message, collapsed);
  11376. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  11377. endMessage(logger);
  11378. }
  11379. });
  11380. }
  11381. }
  11382. }
  11383. function startMessage (logger, message, collapsed) {
  11384. var startMessage = collapsed
  11385. ? logger.groupCollapsed
  11386. : logger.group;
  11387. // render
  11388. try {
  11389. startMessage.call(logger, message);
  11390. } catch (e) {
  11391. logger.log(message);
  11392. }
  11393. }
  11394. function endMessage (logger) {
  11395. try {
  11396. logger.groupEnd();
  11397. } catch (e) {
  11398. logger.log('—— log end ——');
  11399. }
  11400. }
  11401. function getFormattedTime () {
  11402. var time = new Date();
  11403. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  11404. }
  11405. function repeat (str, times) {
  11406. return (new Array(times + 1)).join(str)
  11407. }
  11408. function pad (num, maxLength) {
  11409. return repeat('0', maxLength - num.toString().length) + num
  11410. }
  11411. var index_cjs = {
  11412. Store: Store,
  11413. install: install,
  11414. version: '3.6.2',
  11415. mapState: mapState,
  11416. mapMutations: mapMutations,
  11417. mapGetters: mapGetters,
  11418. mapActions: mapActions,
  11419. createNamespacedHelpers: createNamespacedHelpers,
  11420. createLogger: createLogger
  11421. };
  11422. module.exports = index_cjs;
  11423. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  11424. /***/ }),
  11425. /***/ 35:
  11426. /*!***********************************************************************************!*\
  11427. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/getters.js ***!
  11428. \***********************************************************************************/
  11429. /*! no static exports found */
  11430. /***/ (function(module, exports, __webpack_require__) {
  11431. "use strict";
  11432. Object.defineProperty(exports, "__esModule", {
  11433. value: true
  11434. });
  11435. exports.default = void 0;
  11436. var getters = {
  11437. codeNumber: function codeNumber(state) {
  11438. return state.app.codeNumber;
  11439. },
  11440. //获取验证码倒计时-防止刷新页面重置倒计时
  11441. user: function user(state) {
  11442. return state.app.user;
  11443. },
  11444. //用户基本信息
  11445. organization: function organization(state) {
  11446. return state.app.organization;
  11447. },
  11448. //所属组织信息
  11449. project: function project(state) {
  11450. return state.app.project;
  11451. } //项目
  11452. };
  11453. var _default = getters;
  11454. exports.default = _default;
  11455. /***/ }),
  11456. /***/ 36:
  11457. /*!*******************************************************************************************!*\
  11458. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/modules sync \.js$ ***!
  11459. \*******************************************************************************************/
  11460. /*! no static exports found */
  11461. /***/ (function(module, exports, __webpack_require__) {
  11462. var map = {
  11463. "./app.js": 37
  11464. };
  11465. function webpackContext(req) {
  11466. var id = webpackContextResolve(req);
  11467. return __webpack_require__(id);
  11468. }
  11469. function webpackContextResolve(req) {
  11470. if(!__webpack_require__.o(map, req)) {
  11471. var e = new Error("Cannot find module '" + req + "'");
  11472. e.code = 'MODULE_NOT_FOUND';
  11473. throw e;
  11474. }
  11475. return map[req];
  11476. }
  11477. webpackContext.keys = function webpackContextKeys() {
  11478. return Object.keys(map);
  11479. };
  11480. webpackContext.resolve = webpackContextResolve;
  11481. module.exports = webpackContext;
  11482. webpackContext.id = 36;
  11483. /***/ }),
  11484. /***/ 37:
  11485. /*!***************************************************************************************!*\
  11486. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/store/modules/app.js ***!
  11487. \***************************************************************************************/
  11488. /*! no static exports found */
  11489. /***/ (function(module, exports, __webpack_require__) {
  11490. "use strict";
  11491. Object.defineProperty(exports, "__esModule", {
  11492. value: true
  11493. });
  11494. exports.default = void 0;
  11495. /*
  11496. * app基本信息
  11497. *
  11498. */
  11499. var state = {
  11500. user: {},
  11501. organization: {},
  11502. project: {},
  11503. codeNumber: 60
  11504. };
  11505. var mutations = {
  11506. CHANGE_USER: function CHANGE_USER(state, user) {
  11507. state.user = user;
  11508. },
  11509. CHANGE_ORGANIZATION: function CHANGE_ORGANIZATION(state, organization) {
  11510. state.organization = organization;
  11511. },
  11512. CHANGE_PROJECT: function CHANGE_PROJECT(state, project) {
  11513. state.project = project;
  11514. },
  11515. CHANGE_CODENUMBER: function CHANGE_CODENUMBER(state, num) {
  11516. state.codeNumber = num;
  11517. }
  11518. };
  11519. var actions = {
  11520. changeUser: function changeUser(_ref, user) {
  11521. var commit = _ref.commit;
  11522. commit('CHANGE_USER', user);
  11523. },
  11524. changeOrganization: function changeOrganization(_ref2, organization) {
  11525. var commit = _ref2.commit;
  11526. commit('CHANGE_ORGANIZATION', organization);
  11527. },
  11528. changeProject: function changeProject(_ref3, project) {
  11529. var commit = _ref3.commit;
  11530. commit('CHANGE_PROJECT', project);
  11531. },
  11532. changeCodeNumber: function changeCodeNumber(_ref4, num) {
  11533. var commit = _ref4.commit;
  11534. commit('CHANGE_CODENUMBER', num < 0 ? 60 : num);
  11535. }
  11536. };
  11537. var _default = {
  11538. namespaced: true,
  11539. state: state,
  11540. mutations: mutations,
  11541. actions: actions
  11542. };
  11543. exports.default = _default;
  11544. /***/ }),
  11545. /***/ 38:
  11546. /*!**********************************************************************************!*\
  11547. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/config/field.js ***!
  11548. \**********************************************************************************/
  11549. /*! no static exports found */
  11550. /***/ (function(module, exports, __webpack_require__) {
  11551. "use strict";
  11552. Object.defineProperty(exports, "__esModule", {
  11553. value: true
  11554. });
  11555. exports.default = void 0;
  11556. var houseType = [{
  11557. id: 1,
  11558. name: '纯写字楼'
  11559. }, {
  11560. id: 2,
  11561. name: '商住两用'
  11562. }, {
  11563. id: 3,
  11564. name: '商业裙楼'
  11565. }, {
  11566. id: 4,
  11567. name: '厂房改造'
  11568. }];
  11569. var payWay = [{
  11570. id: 1,
  11571. name: '公对公转账'
  11572. }, {
  11573. id: 2,
  11574. name: '微信小程序支付'
  11575. }];
  11576. var findItem = function findItem(type, id) {
  11577. if (type === 'houseType') {
  11578. return houseType.find(function (node) {
  11579. return node.id === id;
  11580. }) || {
  11581. id: 0,
  11582. name: '-'
  11583. };
  11584. } else if (type === 'payWay') {
  11585. return payWay.find(function (node) {
  11586. return node.id === id;
  11587. }) || {
  11588. id: 0,
  11589. name: '-'
  11590. };
  11591. }
  11592. };
  11593. var _default = {
  11594. field: {
  11595. houseType: houseType,
  11596. payWay: payWay
  11597. },
  11598. findHouseTypeName: function findHouseTypeName(id) {
  11599. return findItem('houseType', id).name;
  11600. },
  11601. findPayWayName: function findPayWayName(id) {
  11602. return findItem('payWay', id).name;
  11603. }
  11604. };
  11605. exports.default = _default;
  11606. /***/ }),
  11607. /***/ 4:
  11608. /*!**********************************************************************!*\
  11609. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  11610. \**********************************************************************/
  11611. /*! no static exports found */
  11612. /***/ (function(module, exports) {
  11613. function _interopRequireDefault(obj) {
  11614. return obj && obj.__esModule ? obj : {
  11615. "default": obj
  11616. };
  11617. }
  11618. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11619. /***/ }),
  11620. /***/ 45:
  11621. /*!***************************************************************************************!*\
  11622. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/house.js ***!
  11623. \***************************************************************************************/
  11624. /*! no static exports found */
  11625. /***/ (function(module, exports, __webpack_require__) {
  11626. "use strict";
  11627. Object.defineProperty(exports, "__esModule", {
  11628. value: true
  11629. });
  11630. exports.getHouseDetailById = getHouseDetailById;
  11631. exports.getHouseListByPage = getHouseListByPage;
  11632. var _request = __webpack_require__(/*! @/request/request.js */ 46);
  11633. /*
  11634. * 获取房源列表
  11635. *
  11636. *
  11637. */
  11638. function getHouseListByPage(data) {
  11639. return (0, _request.request)({
  11640. url: "/api/projectItemTargetRoom/".concat(data.currPage, "/").concat(data.pageSize),
  11641. method: 'post',
  11642. data: data
  11643. });
  11644. }
  11645. /*
  11646. * 获取房源详情
  11647. *
  11648. *
  11649. */
  11650. function getHouseDetailById(id) {
  11651. return (0, _request.request)({
  11652. url: "/api/projectItemTargetRoom/".concat(id),
  11653. method: 'get'
  11654. });
  11655. }
  11656. /***/ }),
  11657. /***/ 46:
  11658. /*!*************************************************************************************!*\
  11659. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/request.js ***!
  11660. \*************************************************************************************/
  11661. /*! no static exports found */
  11662. /***/ (function(module, exports, __webpack_require__) {
  11663. "use strict";
  11664. /* WEBPACK VAR INJECTION */(function(uni) {
  11665. Object.defineProperty(exports, "__esModule", {
  11666. value: true
  11667. });
  11668. exports.request = request;
  11669. var BASE_URL = 'https://www.waywish.com';
  11670. function request(options) {
  11671. return new Promise(function (resolve, reject) {
  11672. var header = options.header || {
  11673. 'Content-Type': 'application/json'
  11674. };
  11675. if (uni.getStorageSync('token')) header['token'] = uni.getStorageSync('token');
  11676. uni.request({
  11677. url: BASE_URL + options.url,
  11678. // 服务器url
  11679. method: options.method || 'GET',
  11680. // 请求方法,默认为GET
  11681. data: options.data || {},
  11682. // 请求参数
  11683. header: header,
  11684. // 设置请求的 header
  11685. success: function success(res) {
  11686. // 请求成功
  11687. if (res.statusCode === 200) {
  11688. resolve(res.data);
  11689. } else {
  11690. // 可以根据项目要求修改错误处理
  11691. reject(res.data);
  11692. }
  11693. },
  11694. fail: function fail(err) {
  11695. // 请求失败处理
  11696. uni.showToast({
  11697. title: '出错了,请联系管理员~',
  11698. icon: 'none'
  11699. });
  11700. reject(err);
  11701. }
  11702. });
  11703. });
  11704. }
  11705. ;
  11706. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  11707. /***/ }),
  11708. /***/ 5:
  11709. /*!**************************************************************!*\
  11710. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  11711. \**************************************************************/
  11712. /*! no static exports found */
  11713. /***/ (function(module, exports, __webpack_require__) {
  11714. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  11715. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  11716. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  11717. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  11718. function _slicedToArray(arr, i) {
  11719. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  11720. }
  11721. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11722. /***/ }),
  11723. /***/ 55:
  11724. /*!***************************************************************************************!*\
  11725. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/request/api/login.js ***!
  11726. \***************************************************************************************/
  11727. /*! no static exports found */
  11728. /***/ (function(module, exports, __webpack_require__) {
  11729. "use strict";
  11730. Object.defineProperty(exports, "__esModule", {
  11731. value: true
  11732. });
  11733. exports.getImgCode = getImgCode;
  11734. exports.getUserInfo = getUserInfo;
  11735. exports.login = login;
  11736. exports.sendPhoneCode = sendPhoneCode;
  11737. var _request = __webpack_require__(/*! @/request/request.js */ 46);
  11738. /*
  11739. * 登录
  11740. *
  11741. */
  11742. function login(data) {
  11743. return (0, _request.request)({
  11744. url: "/manager/login",
  11745. method: 'post',
  11746. data: data
  11747. });
  11748. }
  11749. /*
  11750. * 获取图片验证码
  11751. *
  11752. */
  11753. function getImgCode() {
  11754. return (0, _request.request)({
  11755. url: "/manager/pCode",
  11756. method: 'get'
  11757. });
  11758. }
  11759. /*
  11760. * 发送手机验证码
  11761. *
  11762. */
  11763. function sendPhoneCode(phone, vCode) {
  11764. return (0, _request.request)({
  11765. url: "/manager/send/".concat(phone, "/").concat(vCode),
  11766. method: 'get'
  11767. });
  11768. }
  11769. /*
  11770. * 获取当前登录者信息
  11771. * @param null
  11772. *
  11773. */
  11774. function getUserInfo(data) {
  11775. return (0, _request.request)({
  11776. url: "/manager/userContext",
  11777. method: 'get'
  11778. });
  11779. }
  11780. /***/ }),
  11781. /***/ 56:
  11782. /*!************************************************************************************!*\
  11783. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/uitls/validate.js ***!
  11784. \************************************************************************************/
  11785. /*! no static exports found */
  11786. /***/ (function(module, exports, __webpack_require__) {
  11787. "use strict";
  11788. Object.defineProperty(exports, "__esModule", {
  11789. value: true
  11790. });
  11791. exports.isArray = isArray;
  11792. exports.isExternal = isExternal;
  11793. exports.isString = isString;
  11794. exports.isTel = isTel;
  11795. exports.validAlphabets = validAlphabets;
  11796. exports.validEmail = validEmail;
  11797. exports.validLowerCase = validLowerCase;
  11798. exports.validURL = validURL;
  11799. exports.validUpperCase = validUpperCase;
  11800. exports.validUsername = validUsername;
  11801. /**
  11802. * @param {string} path
  11803. * @returns {Boolean}
  11804. */
  11805. function isExternal(path) {
  11806. return /^(https?:|mailto:|tel:)/.test(path);
  11807. }
  11808. /**
  11809. * @param {string} str
  11810. * @returns {Boolean}
  11811. */
  11812. function validUsername(str) {
  11813. var valid_map = ['admin', 'editor'];
  11814. return valid_map.indexOf(str.trim()) >= 0;
  11815. }
  11816. /**
  11817. * @param {string} url
  11818. * @returns {Boolean}
  11819. */
  11820. function validURL(url) {
  11821. var reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
  11822. return reg.test(url);
  11823. }
  11824. /**
  11825. * @param {string} str
  11826. * @returns {Boolean}
  11827. */
  11828. function validLowerCase(str) {
  11829. var reg = /^[a-z]+$/;
  11830. return reg.test(str);
  11831. }
  11832. /**
  11833. * @param {string} str
  11834. * @returns {Boolean}
  11835. */
  11836. function validUpperCase(str) {
  11837. var reg = /^[A-Z]+$/;
  11838. return reg.test(str);
  11839. }
  11840. /**
  11841. * @param {string} str
  11842. * @returns {Boolean}
  11843. */
  11844. function validAlphabets(str) {
  11845. var reg = /^[A-Za-z]+$/;
  11846. return reg.test(str);
  11847. }
  11848. /**
  11849. * @param {string} email
  11850. * @returns {Boolean}
  11851. */
  11852. function validEmail(email) {
  11853. var reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
  11854. return reg.test(email);
  11855. }
  11856. /**
  11857. * @param {string} str
  11858. * @returns {Boolean}
  11859. */
  11860. function isString(str) {
  11861. if (typeof str === 'string' || str instanceof String) {
  11862. return true;
  11863. }
  11864. return false;
  11865. }
  11866. /**
  11867. * @param {Array} arg
  11868. * @returns {Boolean}
  11869. */
  11870. function isArray(arg) {
  11871. if (typeof Array.isArray === 'undefined') {
  11872. return Object.prototype.toString.call(arg) === '[object Array]';
  11873. }
  11874. return Array.isArray(arg);
  11875. }
  11876. /**
  11877. * @param {Number} phone
  11878. * @returns {Boolean}
  11879. */
  11880. function isTel(phone) {
  11881. var reg = /^1[1-9]\d{9}$/;
  11882. return reg.test(phone);
  11883. }
  11884. /***/ }),
  11885. /***/ 57:
  11886. /*!**********************************************************************************************!*\
  11887. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/static/image/login/logo.png ***!
  11888. \**********************************************************************************************/
  11889. /*! no static exports found */
  11890. /***/ (function(module, exports, __webpack_require__) {
  11891. module.exports = __webpack_require__.p + "static/image/login/logo.png";
  11892. /***/ }),
  11893. /***/ 6:
  11894. /*!***************************************************************!*\
  11895. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  11896. \***************************************************************/
  11897. /*! no static exports found */
  11898. /***/ (function(module, exports) {
  11899. function _arrayWithHoles(arr) {
  11900. if (Array.isArray(arr)) return arr;
  11901. }
  11902. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11903. /***/ }),
  11904. /***/ 7:
  11905. /*!*********************************************************************!*\
  11906. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  11907. \*********************************************************************/
  11908. /*! no static exports found */
  11909. /***/ (function(module, exports) {
  11910. function _iterableToArrayLimit(r, l) {
  11911. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  11912. if (null != t) {
  11913. var e,
  11914. n,
  11915. i,
  11916. u,
  11917. a = [],
  11918. f = !0,
  11919. o = !1;
  11920. try {
  11921. if (i = (t = t.call(r)).next, 0 === l) {
  11922. if (Object(t) !== t) return;
  11923. f = !1;
  11924. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  11925. ;
  11926. }
  11927. } catch (r) {
  11928. o = !0, n = r;
  11929. } finally {
  11930. try {
  11931. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  11932. } finally {
  11933. if (o) throw n;
  11934. }
  11935. }
  11936. return a;
  11937. }
  11938. }
  11939. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11940. /***/ }),
  11941. /***/ 74:
  11942. /*!*********************************************************************************************!*\
  11943. !*** /Users/whx/Documents/yuiProject/realty/virgo.wzfrontend/wx/static/image/my/banner.png ***!
  11944. \*********************************************************************************************/
  11945. /*! no static exports found */
  11946. /***/ (function(module, exports, __webpack_require__) {
  11947. module.exports = __webpack_require__.p + "static/image/my/banner.png";
  11948. /***/ }),
  11949. /***/ 8:
  11950. /*!***************************************************************************!*\
  11951. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  11952. \***************************************************************************/
  11953. /*! no static exports found */
  11954. /***/ (function(module, exports, __webpack_require__) {
  11955. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  11956. function _unsupportedIterableToArray(o, minLen) {
  11957. if (!o) return;
  11958. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  11959. var n = Object.prototype.toString.call(o).slice(8, -1);
  11960. if (n === "Object" && o.constructor) n = o.constructor.name;
  11961. if (n === "Map" || n === "Set") return Array.from(o);
  11962. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  11963. }
  11964. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11965. /***/ }),
  11966. /***/ 9:
  11967. /*!*****************************************************************!*\
  11968. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  11969. \*****************************************************************/
  11970. /*! no static exports found */
  11971. /***/ (function(module, exports) {
  11972. function _arrayLikeToArray(arr, len) {
  11973. if (len == null || len > arr.length) len = arr.length;
  11974. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  11975. arr2[i] = arr[i];
  11976. }
  11977. return arr2;
  11978. }
  11979. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11980. /***/ })
  11981. }]);
  11982. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map