vendor.js 203 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 0:
  3. /*!******************************************************************!*\
  4. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js ***!
  5. \******************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. /* WEBPACK VAR INJECTION */(function(createApp) {__webpack_require__(/*! uni-pages */ 4);
  10. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  11. var _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 5));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};var ownKeys = Object.keys(source);if (typeof Object.getOwnPropertySymbols === 'function') {ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {return Object.getOwnPropertyDescriptor(source, sym).enumerable;}));}ownKeys.forEach(function (key) {_defineProperty(target, key, source[key]);});}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
  12. _vue.default.config.productionTip = false;
  13. _App.default.mpType = 'app';
  14. var app = new _vue.default(_objectSpread({},
  15. _App.default));
  16. createApp(app).$mount();
  17. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createApp"]))
  18. /***/ }),
  19. /***/ 1:
  20. /*!************************************************************!*\
  21. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  22. \************************************************************/
  23. /*! no static exports found */
  24. /***/ (function(module, exports, __webpack_require__) {
  25. "use strict";
  26. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance");}function _iterableToArray(iter) {if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;}}
  27. var _toString = Object.prototype.toString;
  28. var hasOwnProperty = Object.prototype.hasOwnProperty;
  29. function isFn(fn) {
  30. return typeof fn === 'function';
  31. }
  32. function isStr(str) {
  33. return typeof str === 'string';
  34. }
  35. function isPlainObject(obj) {
  36. return _toString.call(obj) === '[object Object]';
  37. }
  38. function hasOwn(obj, key) {
  39. return hasOwnProperty.call(obj, key);
  40. }
  41. function noop() {}
  42. /**
  43. * Create a cached version of a pure function.
  44. */
  45. function cached(fn) {
  46. var cache = Object.create(null);
  47. return function cachedFn(str) {
  48. var hit = cache[str];
  49. return hit || (cache[str] = fn(str));
  50. };
  51. }
  52. /**
  53. * Camelize a hyphen-delimited string.
  54. */
  55. var camelizeRE = /-(\w)/g;
  56. var camelize = cached(function (str) {
  57. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  58. });
  59. var HOOKS = [
  60. 'invoke',
  61. 'success',
  62. 'fail',
  63. 'complete',
  64. 'returnValue'];
  65. var globalInterceptors = {};
  66. var scopedInterceptors = {};
  67. function mergeHook(parentVal, childVal) {
  68. var res = childVal ?
  69. parentVal ?
  70. parentVal.concat(childVal) :
  71. Array.isArray(childVal) ?
  72. childVal : [childVal] :
  73. parentVal;
  74. return res ?
  75. dedupeHooks(res) :
  76. res;
  77. }
  78. function dedupeHooks(hooks) {
  79. var res = [];
  80. for (var i = 0; i < hooks.length; i++) {
  81. if (res.indexOf(hooks[i]) === -1) {
  82. res.push(hooks[i]);
  83. }
  84. }
  85. return res;
  86. }
  87. function removeHook(hooks, hook) {
  88. var index = hooks.indexOf(hook);
  89. if (index !== -1) {
  90. hooks.splice(index, 1);
  91. }
  92. }
  93. function mergeInterceptorHook(interceptor, option) {
  94. Object.keys(option).forEach(function (hook) {
  95. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  96. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  97. }
  98. });
  99. }
  100. function removeInterceptorHook(interceptor, option) {
  101. if (!interceptor || !option) {
  102. return;
  103. }
  104. Object.keys(option).forEach(function (hook) {
  105. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  106. removeHook(interceptor[hook], option[hook]);
  107. }
  108. });
  109. }
  110. function addInterceptor(method, option) {
  111. if (typeof method === 'string' && isPlainObject(option)) {
  112. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  113. } else if (isPlainObject(method)) {
  114. mergeInterceptorHook(globalInterceptors, method);
  115. }
  116. }
  117. function removeInterceptor(method, option) {
  118. if (typeof method === 'string') {
  119. if (isPlainObject(option)) {
  120. removeInterceptorHook(scopedInterceptors[method], option);
  121. } else {
  122. delete scopedInterceptors[method];
  123. }
  124. } else if (isPlainObject(method)) {
  125. removeInterceptorHook(globalInterceptors, method);
  126. }
  127. }
  128. function wrapperHook(hook) {
  129. return function (data) {
  130. return hook(data) || data;
  131. };
  132. }
  133. function isPromise(obj) {
  134. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  135. }
  136. function queue(hooks, data) {
  137. var promise = false;
  138. for (var i = 0; i < hooks.length; i++) {
  139. var hook = hooks[i];
  140. if (promise) {
  141. promise = Promise.then(wrapperHook(hook));
  142. } else {
  143. var res = hook(data);
  144. if (isPromise(res)) {
  145. promise = Promise.resolve(res);
  146. }
  147. if (res === false) {
  148. return {
  149. then: function then() {} };
  150. }
  151. }
  152. }
  153. return promise || {
  154. then: function then(callback) {
  155. return callback(data);
  156. } };
  157. }
  158. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  159. ['success', 'fail', 'complete'].forEach(function (name) {
  160. if (Array.isArray(interceptor[name])) {
  161. var oldCallback = options[name];
  162. options[name] = function callbackInterceptor(res) {
  163. queue(interceptor[name], res).then(function (res) {
  164. /* eslint-disable no-mixed-operators */
  165. return isFn(oldCallback) && oldCallback(res) || res;
  166. });
  167. };
  168. }
  169. });
  170. return options;
  171. }
  172. function wrapperReturnValue(method, returnValue) {
  173. var returnValueHooks = [];
  174. if (Array.isArray(globalInterceptors.returnValue)) {
  175. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  176. }
  177. var interceptor = scopedInterceptors[method];
  178. if (interceptor && Array.isArray(interceptor.returnValue)) {
  179. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  180. }
  181. returnValueHooks.forEach(function (hook) {
  182. returnValue = hook(returnValue) || returnValue;
  183. });
  184. return returnValue;
  185. }
  186. function getApiInterceptorHooks(method) {
  187. var interceptor = Object.create(null);
  188. Object.keys(globalInterceptors).forEach(function (hook) {
  189. if (hook !== 'returnValue') {
  190. interceptor[hook] = globalInterceptors[hook].slice();
  191. }
  192. });
  193. var scopedInterceptor = scopedInterceptors[method];
  194. if (scopedInterceptor) {
  195. Object.keys(scopedInterceptor).forEach(function (hook) {
  196. if (hook !== 'returnValue') {
  197. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  198. }
  199. });
  200. }
  201. return interceptor;
  202. }
  203. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  204. var interceptor = getApiInterceptorHooks(method);
  205. if (interceptor && Object.keys(interceptor).length) {
  206. if (Array.isArray(interceptor.invoke)) {
  207. var res = queue(interceptor.invoke, options);
  208. return res.then(function (options) {
  209. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  210. });
  211. } else {
  212. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  213. }
  214. }
  215. return api.apply(void 0, [options].concat(params));
  216. }
  217. var promiseInterceptor = {
  218. returnValue: function returnValue(res) {
  219. if (!isPromise(res)) {
  220. return res;
  221. }
  222. return res.then(function (res) {
  223. return res[1];
  224. }).catch(function (res) {
  225. return res[0];
  226. });
  227. } };
  228. var SYNC_API_RE =
  229. /^\$|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  230. var CONTEXT_API_RE = /^create|Manager$/;
  231. var CALLBACK_API_RE = /^on/;
  232. function isContextApi(name) {
  233. return CONTEXT_API_RE.test(name);
  234. }
  235. function isSyncApi(name) {
  236. return SYNC_API_RE.test(name);
  237. }
  238. function isCallbackApi(name) {
  239. return CALLBACK_API_RE.test(name);
  240. }
  241. function handlePromise(promise) {
  242. return promise.then(function (data) {
  243. return [null, data];
  244. }).
  245. catch(function (err) {return [err];});
  246. }
  247. function shouldPromise(name) {
  248. if (
  249. isContextApi(name) ||
  250. isSyncApi(name) ||
  251. isCallbackApi(name))
  252. {
  253. return false;
  254. }
  255. return true;
  256. }
  257. function promisify(name, api) {
  258. if (!shouldPromise(name)) {
  259. return api;
  260. }
  261. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  262. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  263. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  264. }
  265. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  266. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  267. success: resolve,
  268. fail: reject })].concat(
  269. params));
  270. /* eslint-disable no-extend-native */
  271. if (!Promise.prototype.finally) {
  272. Promise.prototype.finally = function (callback) {
  273. var promise = this.constructor;
  274. return this.then(
  275. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  276. function (reason) {return promise.resolve(callback()).then(function () {
  277. throw reason;
  278. });});
  279. };
  280. }
  281. })));
  282. };
  283. }
  284. var EPS = 1e-4;
  285. var BASE_DEVICE_WIDTH = 750;
  286. var isIOS = false;
  287. var deviceWidth = 0;
  288. var deviceDPR = 0;
  289. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  290. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  291. deviceWidth = windowWidth;
  292. deviceDPR = pixelRatio;
  293. isIOS = platform === 'ios';
  294. }
  295. function upx2px(number, newDeviceWidth) {
  296. if (deviceWidth === 0) {
  297. checkDeviceWidth();
  298. }
  299. number = Number(number);
  300. if (number === 0) {
  301. return 0;
  302. }
  303. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  304. if (result < 0) {
  305. result = -result;
  306. }
  307. result = Math.floor(result + EPS);
  308. if (result === 0) {
  309. if (deviceDPR === 1 || !isIOS) {
  310. return 1;
  311. } else {
  312. return 0.5;
  313. }
  314. }
  315. return number < 0 ? -result : result;
  316. }
  317. var interceptors = {
  318. promiseInterceptor: promiseInterceptor };
  319. var baseApi = /*#__PURE__*/Object.freeze({
  320. upx2px: upx2px,
  321. interceptors: interceptors,
  322. addInterceptor: addInterceptor,
  323. removeInterceptor: removeInterceptor });
  324. var previewImage = {
  325. args: function args(fromArgs) {
  326. var currentIndex = parseInt(fromArgs.current);
  327. if (isNaN(currentIndex)) {
  328. return;
  329. }
  330. var urls = fromArgs.urls;
  331. if (!Array.isArray(urls)) {
  332. return;
  333. }
  334. var len = urls.length;
  335. if (!len) {
  336. return;
  337. }
  338. if (currentIndex < 0) {
  339. currentIndex = 0;
  340. } else if (currentIndex >= len) {
  341. currentIndex = len - 1;
  342. }
  343. if (currentIndex > 0) {
  344. fromArgs.current = urls[currentIndex];
  345. fromArgs.urls = urls.filter(
  346. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  347. } else {
  348. fromArgs.current = urls[0];
  349. }
  350. return {
  351. indicator: false,
  352. loop: false };
  353. } };
  354. var protocols = {
  355. previewImage: previewImage };
  356. var todos = [];
  357. var canIUses = [];
  358. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  359. function processCallback(methodName, method, returnValue) {
  360. return function (res) {
  361. return method(processReturnValue(methodName, res, returnValue));
  362. };
  363. }
  364. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  365. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  366. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  367. if (isFn(argsOption)) {
  368. argsOption = argsOption(fromArgs, toArgs) || {};
  369. }
  370. for (var key in fromArgs) {
  371. if (hasOwn(argsOption, key)) {
  372. var keyOption = argsOption[key];
  373. if (isFn(keyOption)) {
  374. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  375. }
  376. if (!keyOption) {// 不支持的参数
  377. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  378. } else if (isStr(keyOption)) {// 重写参数 key
  379. toArgs[keyOption] = fromArgs[key];
  380. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  381. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  382. }
  383. } else if (CALLBACKS.indexOf(key) !== -1) {
  384. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  385. } else {
  386. if (!keepFromArgs) {
  387. toArgs[key] = fromArgs[key];
  388. }
  389. }
  390. }
  391. return toArgs;
  392. } else if (isFn(fromArgs)) {
  393. fromArgs = processCallback(methodName, fromArgs, returnValue);
  394. }
  395. return fromArgs;
  396. }
  397. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  398. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  399. res = protocols.returnValue(methodName, res);
  400. }
  401. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  402. }
  403. function wrapper(methodName, method) {
  404. if (hasOwn(protocols, methodName)) {
  405. var protocol = protocols[methodName];
  406. if (!protocol) {// 暂不支持的 api
  407. return function () {
  408. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  409. };
  410. }
  411. return function (arg1, arg2) {// 目前 api 最多两个参数
  412. var options = protocol;
  413. if (isFn(protocol)) {
  414. options = protocol(arg1);
  415. }
  416. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  417. var args = [arg1];
  418. if (typeof arg2 !== 'undefined') {
  419. args.push(arg2);
  420. }
  421. var returnValue = wx[options.name || methodName].apply(wx, args);
  422. if (isSyncApi(methodName)) {// 同步 api
  423. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  424. }
  425. return returnValue;
  426. };
  427. }
  428. return method;
  429. }
  430. var todoApis = Object.create(null);
  431. var TODOS = [
  432. 'subscribePush',
  433. 'unsubscribePush',
  434. 'onPush',
  435. 'offPush',
  436. 'share'];
  437. function createTodoApi(name) {
  438. return function todoApi(_ref)
  439. {var fail = _ref.fail,complete = _ref.complete;
  440. var res = {
  441. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  442. isFn(fail) && fail(res);
  443. isFn(complete) && complete(res);
  444. };
  445. }
  446. TODOS.forEach(function (name) {
  447. todoApis[name] = createTodoApi(name);
  448. });
  449. var providers = {
  450. oauth: ['weixin'],
  451. share: ['weixin'],
  452. payment: ['wxpay'],
  453. push: ['weixin'] };
  454. function getProvider(_ref2)
  455. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  456. var res = false;
  457. if (providers[service]) {
  458. res = {
  459. errMsg: 'getProvider:ok',
  460. service: service,
  461. provider: providers[service] };
  462. isFn(success) && success(res);
  463. } else {
  464. res = {
  465. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  466. isFn(fail) && fail(res);
  467. }
  468. isFn(complete) && complete(res);
  469. }
  470. var extraApi = /*#__PURE__*/Object.freeze({
  471. getProvider: getProvider });
  472. var getEmitter = function () {
  473. if (typeof getUniEmitter === 'function') {
  474. /* eslint-disable no-undef */
  475. return getUniEmitter;
  476. }
  477. var Emitter;
  478. return function getUniEmitter() {
  479. if (!Emitter) {
  480. Emitter = new _vue.default();
  481. }
  482. return Emitter;
  483. };
  484. }();
  485. function apply(ctx, method, args) {
  486. return ctx[method].apply(ctx, args);
  487. }
  488. function $on() {
  489. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  490. }
  491. function $off() {
  492. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  493. }
  494. function $once() {
  495. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  496. }
  497. function $emit() {
  498. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  499. }
  500. var eventApi = /*#__PURE__*/Object.freeze({
  501. $on: $on,
  502. $off: $off,
  503. $once: $once,
  504. $emit: $emit });
  505. var api = /*#__PURE__*/Object.freeze({});
  506. var MPPage = Page;
  507. var MPComponent = Component;
  508. var customizeRE = /:/g;
  509. var customize = cached(function (str) {
  510. return camelize(str.replace(customizeRE, '-'));
  511. });
  512. function initTriggerEvent(mpInstance) {
  513. {
  514. if (!wx.canIUse('nextTick')) {
  515. return;
  516. }
  517. }
  518. var oldTriggerEvent = mpInstance.triggerEvent;
  519. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  520. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  521. };
  522. }
  523. function initHook(name, options) {
  524. var oldHook = options[name];
  525. if (!oldHook) {
  526. options[name] = function () {
  527. initTriggerEvent(this);
  528. };
  529. } else {
  530. options[name] = function () {
  531. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  532. return oldHook.apply(this, args);
  533. };
  534. }
  535. }
  536. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  537. initHook('onLoad', options);
  538. return MPPage(options);
  539. };
  540. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  541. initHook('created', options);
  542. return MPComponent(options);
  543. };
  544. var PAGE_EVENT_HOOKS = [
  545. 'onPullDownRefresh',
  546. 'onReachBottom',
  547. 'onShareAppMessage',
  548. 'onPageScroll',
  549. 'onResize',
  550. 'onTabItemTap'];
  551. function initMocks(vm, mocks) {
  552. var mpInstance = vm.$mp[vm.mpType];
  553. mocks.forEach(function (mock) {
  554. if (hasOwn(mpInstance, mock)) {
  555. vm[mock] = mpInstance[mock];
  556. }
  557. });
  558. }
  559. function hasHook(hook, vueOptions) {
  560. if (!vueOptions) {
  561. return true;
  562. }
  563. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  564. return true;
  565. }
  566. vueOptions = vueOptions.default || vueOptions;
  567. if (isFn(vueOptions)) {
  568. if (isFn(vueOptions.extendOptions[hook])) {
  569. return true;
  570. }
  571. if (vueOptions.super &&
  572. vueOptions.super.options &&
  573. Array.isArray(vueOptions.super.options[hook])) {
  574. return true;
  575. }
  576. return false;
  577. }
  578. if (isFn(vueOptions[hook])) {
  579. return true;
  580. }
  581. var mixins = vueOptions.mixins;
  582. if (Array.isArray(mixins)) {
  583. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  584. }
  585. }
  586. function initHooks(mpOptions, hooks, vueOptions) {
  587. hooks.forEach(function (hook) {
  588. if (hasHook(hook, vueOptions)) {
  589. mpOptions[hook] = function (args) {
  590. return this.$vm && this.$vm.__call_hook(hook, args);
  591. };
  592. }
  593. });
  594. }
  595. function initVueComponent(Vue, vueOptions) {
  596. vueOptions = vueOptions.default || vueOptions;
  597. var VueComponent;
  598. if (isFn(vueOptions)) {
  599. VueComponent = vueOptions;
  600. vueOptions = VueComponent.extendOptions;
  601. } else {
  602. VueComponent = Vue.extend(vueOptions);
  603. }
  604. return [VueComponent, vueOptions];
  605. }
  606. function initSlots(vm, vueSlots) {
  607. if (Array.isArray(vueSlots) && vueSlots.length) {
  608. var $slots = Object.create(null);
  609. vueSlots.forEach(function (slotName) {
  610. $slots[slotName] = true;
  611. });
  612. vm.$scopedSlots = vm.$slots = $slots;
  613. }
  614. }
  615. function initVueIds(vueIds, mpInstance) {
  616. vueIds = (vueIds || '').split(',');
  617. var len = vueIds.length;
  618. if (len === 1) {
  619. mpInstance._$vueId = vueIds[0];
  620. } else if (len === 2) {
  621. mpInstance._$vueId = vueIds[0];
  622. mpInstance._$vuePid = vueIds[1];
  623. }
  624. }
  625. function initData(vueOptions, context) {
  626. var data = vueOptions.data || {};
  627. var methods = vueOptions.methods || {};
  628. if (typeof data === 'function') {
  629. try {
  630. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  631. } catch (e) {
  632. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  633. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  634. }
  635. }
  636. } else {
  637. try {
  638. // 对 data 格式化
  639. data = JSON.parse(JSON.stringify(data));
  640. } catch (e) {}
  641. }
  642. if (!isPlainObject(data)) {
  643. data = {};
  644. }
  645. Object.keys(methods).forEach(function (methodName) {
  646. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  647. data[methodName] = methods[methodName];
  648. }
  649. });
  650. return data;
  651. }
  652. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  653. function createObserver(name) {
  654. return function observer(newVal, oldVal) {
  655. if (this.$vm) {
  656. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  657. }
  658. };
  659. }
  660. function initBehaviors(vueOptions, initBehavior) {
  661. var vueBehaviors = vueOptions['behaviors'];
  662. var vueExtends = vueOptions['extends'];
  663. var vueMixins = vueOptions['mixins'];
  664. var vueProps = vueOptions['props'];
  665. if (!vueProps) {
  666. vueOptions['props'] = vueProps = [];
  667. }
  668. var behaviors = [];
  669. if (Array.isArray(vueBehaviors)) {
  670. vueBehaviors.forEach(function (behavior) {
  671. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  672. if (behavior === 'uni://form-field') {
  673. if (Array.isArray(vueProps)) {
  674. vueProps.push('name');
  675. vueProps.push('value');
  676. } else {
  677. vueProps['name'] = {
  678. type: String,
  679. default: '' };
  680. vueProps['value'] = {
  681. type: [String, Number, Boolean, Array, Object, Date],
  682. default: '' };
  683. }
  684. }
  685. });
  686. }
  687. if (isPlainObject(vueExtends) && vueExtends.props) {
  688. behaviors.push(
  689. initBehavior({
  690. properties: initProperties(vueExtends.props, true) }));
  691. }
  692. if (Array.isArray(vueMixins)) {
  693. vueMixins.forEach(function (vueMixin) {
  694. if (isPlainObject(vueMixin) && vueMixin.props) {
  695. behaviors.push(
  696. initBehavior({
  697. properties: initProperties(vueMixin.props, true) }));
  698. }
  699. });
  700. }
  701. return behaviors;
  702. }
  703. function parsePropType(key, type, defaultValue, file) {
  704. // [String]=>String
  705. if (Array.isArray(type) && type.length === 1) {
  706. return type[0];
  707. }
  708. return type;
  709. }
  710. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  711. var properties = {};
  712. if (!isBehavior) {
  713. properties.vueId = {
  714. type: String,
  715. value: '' };
  716. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  717. type: null,
  718. value: [],
  719. observer: function observer(newVal, oldVal) {
  720. var $slots = Object.create(null);
  721. newVal.forEach(function (slotName) {
  722. $slots[slotName] = true;
  723. });
  724. this.setData({
  725. $slots: $slots });
  726. } };
  727. }
  728. if (Array.isArray(props)) {// ['title']
  729. props.forEach(function (key) {
  730. properties[key] = {
  731. type: null,
  732. observer: createObserver(key) };
  733. });
  734. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  735. Object.keys(props).forEach(function (key) {
  736. var opts = props[key];
  737. if (isPlainObject(opts)) {// title:{type:String,default:''}
  738. var value = opts['default'];
  739. if (isFn(value)) {
  740. value = value();
  741. }
  742. opts.type = parsePropType(key, opts.type);
  743. properties[key] = {
  744. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  745. value: value,
  746. observer: createObserver(key) };
  747. } else {// content:String
  748. var type = parsePropType(key, opts);
  749. properties[key] = {
  750. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  751. observer: createObserver(key) };
  752. }
  753. });
  754. }
  755. return properties;
  756. }
  757. function wrapper$1(event) {
  758. // TODO 又得兼容 mpvue 的 mp 对象
  759. try {
  760. event.mp = JSON.parse(JSON.stringify(event));
  761. } catch (e) {}
  762. event.stopPropagation = noop;
  763. event.preventDefault = noop;
  764. event.target = event.target || {};
  765. if (!hasOwn(event, 'detail')) {
  766. event.detail = {};
  767. }
  768. if (isPlainObject(event.detail)) {
  769. event.target = Object.assign({}, event.target, event.detail);
  770. }
  771. return event;
  772. }
  773. function getExtraValue(vm, dataPathsArray) {
  774. var context = vm;
  775. dataPathsArray.forEach(function (dataPathArray) {
  776. var dataPath = dataPathArray[0];
  777. var value = dataPathArray[2];
  778. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  779. var propPath = dataPathArray[1];
  780. var valuePath = dataPathArray[3];
  781. var vFor = dataPath ? vm.__get_value(dataPath, context) : context;
  782. if (Number.isInteger(vFor)) {
  783. context = value;
  784. } else if (!propPath) {
  785. context = vFor[value];
  786. } else {
  787. if (Array.isArray(vFor)) {
  788. context = vFor.find(function (vForItem) {
  789. return vm.__get_value(propPath, vForItem) === value;
  790. });
  791. } else if (isPlainObject(vFor)) {
  792. context = Object.keys(vFor).find(function (vForKey) {
  793. return vm.__get_value(propPath, vFor[vForKey]) === value;
  794. });
  795. } else {
  796. console.error('v-for 暂不支持循环数据:', vFor);
  797. }
  798. }
  799. if (valuePath) {
  800. context = vm.__get_value(valuePath, context);
  801. }
  802. }
  803. });
  804. return context;
  805. }
  806. function processEventExtra(vm, extra, event) {
  807. var extraObj = {};
  808. if (Array.isArray(extra) && extra.length) {
  809. /**
  810. *[
  811. * ['data.items', 'data.id', item.data.id],
  812. * ['metas', 'id', meta.id]
  813. *],
  814. *[
  815. * ['data.items', 'data.id', item.data.id],
  816. * ['metas', 'id', meta.id]
  817. *],
  818. *'test'
  819. */
  820. extra.forEach(function (dataPath, index) {
  821. if (typeof dataPath === 'string') {
  822. if (!dataPath) {// model,prop.sync
  823. extraObj['$' + index] = vm;
  824. } else {
  825. if (dataPath === '$event') {// $event
  826. extraObj['$' + index] = event;
  827. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  828. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  829. } else {
  830. extraObj['$' + index] = vm.__get_value(dataPath);
  831. }
  832. }
  833. } else {
  834. extraObj['$' + index] = getExtraValue(vm, dataPath);
  835. }
  836. });
  837. }
  838. return extraObj;
  839. }
  840. function getObjByArray(arr) {
  841. var obj = {};
  842. for (var i = 1; i < arr.length; i++) {
  843. var element = arr[i];
  844. obj[element[0]] = element[1];
  845. }
  846. return obj;
  847. }
  848. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  849. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  850. if (isCustom) {// 自定义事件
  851. isCustomMPEvent = event.currentTarget &&
  852. event.currentTarget.dataset &&
  853. event.currentTarget.dataset.comType === 'wx';
  854. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  855. if (isCustomMPEvent) {
  856. return [event];
  857. }
  858. return event.detail.__args__ || event.detail;
  859. }
  860. }
  861. var extraObj = processEventExtra(vm, extra, event);
  862. var ret = [];
  863. args.forEach(function (arg) {
  864. if (arg === '$event') {
  865. if (methodName === '__set_model' && !isCustom) {// input v-model value
  866. ret.push(event.target.value);
  867. } else {
  868. if (isCustom && !isCustomMPEvent) {
  869. ret.push(event.detail.__args__[0]);
  870. } else {// wxcomponent 组件或内置组件
  871. ret.push(event);
  872. }
  873. }
  874. } else {
  875. if (Array.isArray(arg) && arg[0] === 'o') {
  876. ret.push(getObjByArray(arg));
  877. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  878. ret.push(extraObj[arg]);
  879. } else {
  880. ret.push(arg);
  881. }
  882. }
  883. });
  884. return ret;
  885. }
  886. var ONCE = '~';
  887. var CUSTOM = '^';
  888. function isMatchEventType(eventType, optType) {
  889. return eventType === optType ||
  890. optType === 'regionchange' && (
  891. eventType === 'begin' ||
  892. eventType === 'end');
  893. }
  894. function handleEvent(event) {var _this = this;
  895. event = wrapper$1(event);
  896. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  897. var dataset = (event.currentTarget || event.target).dataset;
  898. if (!dataset) {
  899. return console.warn("\u4E8B\u4EF6\u4FE1\u606F\u4E0D\u5B58\u5728");
  900. }
  901. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  902. if (!eventOpts) {
  903. return console.warn("\u4E8B\u4EF6\u4FE1\u606F\u4E0D\u5B58\u5728");
  904. }
  905. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  906. var eventType = event.type;
  907. var ret = [];
  908. eventOpts.forEach(function (eventOpt) {
  909. var type = eventOpt[0];
  910. var eventsArray = eventOpt[1];
  911. var isCustom = type.charAt(0) === CUSTOM;
  912. type = isCustom ? type.slice(1) : type;
  913. var isOnce = type.charAt(0) === ONCE;
  914. type = isOnce ? type.slice(1) : type;
  915. if (eventsArray && isMatchEventType(eventType, type)) {
  916. eventsArray.forEach(function (eventArray) {
  917. var methodName = eventArray[0];
  918. if (methodName) {
  919. var handlerCtx = _this.$vm;
  920. if (
  921. handlerCtx.$options.generic &&
  922. handlerCtx.$parent &&
  923. handlerCtx.$parent.$parent)
  924. {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  925. handlerCtx = handlerCtx.$parent.$parent;
  926. }
  927. var handler = handlerCtx[methodName];
  928. if (!isFn(handler)) {
  929. throw new Error(" _vm.".concat(methodName, " is not a function"));
  930. }
  931. if (isOnce) {
  932. if (handler.once) {
  933. return;
  934. }
  935. handler.once = true;
  936. }
  937. ret.push(handler.apply(handlerCtx, processEventArgs(
  938. _this.$vm,
  939. event,
  940. eventArray[1],
  941. eventArray[2],
  942. isCustom,
  943. methodName)));
  944. }
  945. });
  946. }
  947. });
  948. if (
  949. eventType === 'input' &&
  950. ret.length === 1 &&
  951. typeof ret[0] !== 'undefined')
  952. {
  953. return ret[0];
  954. }
  955. }
  956. var hooks = [
  957. 'onShow',
  958. 'onHide',
  959. 'onError',
  960. 'onPageNotFound'];
  961. function parseBaseApp(vm, _ref3)
  962. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  963. _vue.default.prototype.mpHost = "mp-weixin";
  964. _vue.default.mixin({
  965. beforeCreate: function beforeCreate() {
  966. if (!this.$options.mpType) {
  967. return;
  968. }
  969. this.mpType = this.$options.mpType;
  970. this.$mp = _defineProperty({
  971. data: {} },
  972. this.mpType, this.$options.mpInstance);
  973. this.$scope = this.$options.mpInstance;
  974. delete this.$options.mpType;
  975. delete this.$options.mpInstance;
  976. if (this.mpType !== 'app') {
  977. initRefs(this);
  978. initMocks(this, mocks);
  979. }
  980. } });
  981. var appOptions = {
  982. onLaunch: function onLaunch(args) {
  983. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  984. return;
  985. }
  986. {
  987. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  988. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  989. }
  990. }
  991. this.$vm = vm;
  992. this.$vm.$mp = {
  993. app: this };
  994. this.$vm.$scope = this;
  995. this.$vm._isMounted = true;
  996. this.$vm.__call_hook('mounted', args);
  997. this.$vm.__call_hook('onLaunch', args);
  998. } };
  999. // 兼容旧版本 globalData
  1000. appOptions.globalData = vm.$options.globalData || {};
  1001. initHooks(appOptions, hooks);
  1002. return appOptions;
  1003. }
  1004. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1005. function findVmByVueId(vm, vuePid) {
  1006. var $children = vm.$children;
  1007. // 优先查找直属
  1008. var parentVm = $children.find(function (childVm) {return childVm.$scope._$vueId === vuePid;});
  1009. if (parentVm) {
  1010. return parentVm;
  1011. }
  1012. // 反向递归查找
  1013. for (var i = $children.length - 1; i >= 0; i--) {
  1014. parentVm = findVmByVueId($children[i], vuePid);
  1015. if (parentVm) {
  1016. return parentVm;
  1017. }
  1018. }
  1019. }
  1020. function initBehavior(options) {
  1021. return Behavior(options);
  1022. }
  1023. function isPage() {
  1024. return !!this.route;
  1025. }
  1026. function initRelation(detail) {
  1027. this.triggerEvent('__l', detail);
  1028. }
  1029. function initRefs(vm) {
  1030. var mpInstance = vm.$scope;
  1031. Object.defineProperty(vm, '$refs', {
  1032. get: function get() {
  1033. var $refs = {};
  1034. var components = mpInstance.selectAllComponents('.vue-ref');
  1035. components.forEach(function (component) {
  1036. var ref = component.dataset.ref;
  1037. $refs[ref] = component.$vm || component;
  1038. });
  1039. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1040. forComponents.forEach(function (component) {
  1041. var ref = component.dataset.ref;
  1042. if (!$refs[ref]) {
  1043. $refs[ref] = [];
  1044. }
  1045. $refs[ref].push(component.$vm || component);
  1046. });
  1047. return $refs;
  1048. } });
  1049. }
  1050. function handleLink(event) {var _ref4 =
  1051. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1052. var parentVm;
  1053. if (vuePid) {
  1054. parentVm = findVmByVueId(this.$vm, vuePid);
  1055. }
  1056. if (!parentVm) {
  1057. parentVm = this.$vm;
  1058. }
  1059. vueOptions.parent = parentVm;
  1060. }
  1061. function parseApp(vm) {
  1062. return parseBaseApp(vm, {
  1063. mocks: mocks,
  1064. initRefs: initRefs });
  1065. }
  1066. function createApp(vm) {
  1067. App(parseApp(vm));
  1068. return vm;
  1069. }
  1070. function parseBaseComponent(vueComponentOptions)
  1071. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1072. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1073. var componentOptions = {
  1074. options: {
  1075. multipleSlots: true,
  1076. addGlobalClass: true },
  1077. data: initData(vueOptions, _vue.default.prototype),
  1078. behaviors: initBehaviors(vueOptions, initBehavior),
  1079. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1080. lifetimes: {
  1081. attached: function attached() {
  1082. var properties = this.properties;
  1083. var options = {
  1084. mpType: isPage.call(this) ? 'page' : 'component',
  1085. mpInstance: this,
  1086. propsData: properties };
  1087. initVueIds(properties.vueId, this);
  1088. // 处理父子关系
  1089. initRelation.call(this, {
  1090. vuePid: this._$vuePid,
  1091. vueOptions: options });
  1092. // 初始化 vue 实例
  1093. this.$vm = new VueComponent(options);
  1094. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1095. initSlots(this.$vm, properties.vueSlots);
  1096. // 触发首次 setData
  1097. this.$vm.$mount();
  1098. },
  1099. ready: function ready() {
  1100. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1101. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1102. if (this.$vm) {
  1103. this.$vm._isMounted = true;
  1104. this.$vm.__call_hook('mounted');
  1105. this.$vm.__call_hook('onReady');
  1106. }
  1107. },
  1108. detached: function detached() {
  1109. this.$vm.$destroy();
  1110. } },
  1111. pageLifetimes: {
  1112. show: function show(args) {
  1113. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1114. },
  1115. hide: function hide() {
  1116. this.$vm && this.$vm.__call_hook('onPageHide');
  1117. },
  1118. resize: function resize(size) {
  1119. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1120. } },
  1121. methods: {
  1122. __l: handleLink,
  1123. __e: handleEvent } };
  1124. if (isPage) {
  1125. return componentOptions;
  1126. }
  1127. return [componentOptions, VueComponent];
  1128. }
  1129. function parseComponent(vueComponentOptions) {
  1130. return parseBaseComponent(vueComponentOptions, {
  1131. isPage: isPage,
  1132. initRelation: initRelation });
  1133. }
  1134. var hooks$1 = [
  1135. 'onShow',
  1136. 'onHide',
  1137. 'onUnload'];
  1138. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1139. function parseBasePage(vuePageOptions, _ref6)
  1140. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1141. var pageOptions = parseComponent(vuePageOptions);
  1142. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1143. pageOptions.methods.onLoad = function (args) {
  1144. this.$vm.$mp.query = args; // 兼容 mpvue
  1145. this.$vm.__call_hook('onLoad', args);
  1146. };
  1147. return pageOptions;
  1148. }
  1149. function parsePage(vuePageOptions) {
  1150. return parseBasePage(vuePageOptions, {
  1151. isPage: isPage,
  1152. initRelation: initRelation });
  1153. }
  1154. function createPage(vuePageOptions) {
  1155. {
  1156. return Component(parsePage(vuePageOptions));
  1157. }
  1158. }
  1159. function createComponent(vueOptions) {
  1160. {
  1161. return Component(parseComponent(vueOptions));
  1162. }
  1163. }
  1164. todos.forEach(function (todoApi) {
  1165. protocols[todoApi] = false;
  1166. });
  1167. canIUses.forEach(function (canIUseApi) {
  1168. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1169. canIUseApi;
  1170. if (!wx.canIUse(apiName)) {
  1171. protocols[canIUseApi] = false;
  1172. }
  1173. });
  1174. var uni = {};
  1175. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1176. uni = new Proxy({}, {
  1177. get: function get(target, name) {
  1178. if (baseApi[name]) {
  1179. return baseApi[name];
  1180. }
  1181. if (api[name]) {
  1182. return promisify(name, api[name]);
  1183. }
  1184. {
  1185. if (extraApi[name]) {
  1186. return promisify(name, extraApi[name]);
  1187. }
  1188. if (todoApis[name]) {
  1189. return promisify(name, todoApis[name]);
  1190. }
  1191. }
  1192. if (eventApi[name]) {
  1193. return eventApi[name];
  1194. }
  1195. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1196. return;
  1197. }
  1198. return promisify(name, wrapper(name, wx[name]));
  1199. } });
  1200. } else {
  1201. Object.keys(baseApi).forEach(function (name) {
  1202. uni[name] = baseApi[name];
  1203. });
  1204. {
  1205. Object.keys(todoApis).forEach(function (name) {
  1206. uni[name] = promisify(name, todoApis[name]);
  1207. });
  1208. Object.keys(extraApi).forEach(function (name) {
  1209. uni[name] = promisify(name, todoApis[name]);
  1210. });
  1211. }
  1212. Object.keys(eventApi).forEach(function (name) {
  1213. uni[name] = eventApi[name];
  1214. });
  1215. Object.keys(api).forEach(function (name) {
  1216. uni[name] = promisify(name, api[name]);
  1217. });
  1218. Object.keys(wx).forEach(function (name) {
  1219. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1220. uni[name] = promisify(name, wrapper(name, wx[name]));
  1221. }
  1222. });
  1223. }
  1224. wx.createApp = createApp;
  1225. wx.createPage = createPage;
  1226. wx.createComponent = createComponent;
  1227. var uni$1 = uni;var _default =
  1228. uni$1;exports.default = _default;
  1229. /***/ }),
  1230. /***/ 10:
  1231. /*!********************************************************************!*\
  1232. !*** ./node_modules/vue-loader/lib/runtime/componentNormalizer.js ***!
  1233. \********************************************************************/
  1234. /*! exports provided: default */
  1235. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1236. "use strict";
  1237. __webpack_require__.r(__webpack_exports__);
  1238. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1239. /* globals __VUE_SSR_CONTEXT__ */
  1240. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1241. // This module is a runtime utility for cleaner component module output and will
  1242. // be included in the final webpack user bundle.
  1243. function normalizeComponent (
  1244. scriptExports,
  1245. render,
  1246. staticRenderFns,
  1247. functionalTemplate,
  1248. injectStyles,
  1249. scopeId,
  1250. moduleIdentifier, /* server only */
  1251. shadowMode /* vue-cli only */
  1252. ) {
  1253. // Vue.extend constructor export interop
  1254. var options = typeof scriptExports === 'function'
  1255. ? scriptExports.options
  1256. : scriptExports
  1257. // render functions
  1258. if (render) {
  1259. options.render = render
  1260. options.staticRenderFns = staticRenderFns
  1261. options._compiled = true
  1262. }
  1263. // functional template
  1264. if (functionalTemplate) {
  1265. options.functional = true
  1266. }
  1267. // scopedId
  1268. if (scopeId) {
  1269. options._scopeId = 'data-v-' + scopeId
  1270. }
  1271. var hook
  1272. if (moduleIdentifier) { // server build
  1273. hook = function (context) {
  1274. // 2.3 injection
  1275. context =
  1276. context || // cached call
  1277. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1278. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1279. // 2.2 with runInNewContext: true
  1280. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1281. context = __VUE_SSR_CONTEXT__
  1282. }
  1283. // inject component styles
  1284. if (injectStyles) {
  1285. injectStyles.call(this, context)
  1286. }
  1287. // register component module identifier for async chunk inferrence
  1288. if (context && context._registeredComponents) {
  1289. context._registeredComponents.add(moduleIdentifier)
  1290. }
  1291. }
  1292. // used by ssr in case component is cached and beforeCreate
  1293. // never gets called
  1294. options._ssrRegister = hook
  1295. } else if (injectStyles) {
  1296. hook = shadowMode
  1297. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1298. : injectStyles
  1299. }
  1300. if (hook) {
  1301. if (options.functional) {
  1302. // for template-only hot-reload because in that case the render fn doesn't
  1303. // go through the normalizer
  1304. options._injectStyles = hook
  1305. // register for functioal component in vue file
  1306. var originalRender = options.render
  1307. options.render = function renderWithStyleInjection (h, context) {
  1308. hook.call(context)
  1309. return originalRender(h, context)
  1310. }
  1311. } else {
  1312. // inject component registration as beforeCreate hook
  1313. var existing = options.beforeCreate
  1314. options.beforeCreate = existing
  1315. ? [].concat(existing, hook)
  1316. : [hook]
  1317. }
  1318. }
  1319. return {
  1320. exports: scriptExports,
  1321. options: options
  1322. }
  1323. }
  1324. /***/ }),
  1325. /***/ 11:
  1326. /*!***************************************************************************************************!*\
  1327. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2Findex%2Findex"} ***!
  1328. \***************************************************************************************************/
  1329. /*! no static exports found */
  1330. /***/ (function(module, exports, __webpack_require__) {
  1331. "use strict";
  1332. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  1333. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  1334. var _index = _interopRequireDefault(__webpack_require__(/*! ./pages/index/index.vue */ 12));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1335. createPage(_index.default);
  1336. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  1337. /***/ }),
  1338. /***/ 19:
  1339. /*!*******************************************************************************************************!*\
  1340. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2Fpredict%2Fpredict"} ***!
  1341. \*******************************************************************************************************/
  1342. /*! no static exports found */
  1343. /***/ (function(module, exports, __webpack_require__) {
  1344. "use strict";
  1345. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  1346. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  1347. var _predict = _interopRequireDefault(__webpack_require__(/*! ./pages/predict/predict.vue */ 20));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1348. createPage(_predict.default);
  1349. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  1350. /***/ }),
  1351. /***/ 2:
  1352. /*!******************************************************************************************!*\
  1353. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  1354. \******************************************************************************************/
  1355. /*! exports provided: default */
  1356. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1357. "use strict";
  1358. __webpack_require__.r(__webpack_exports__);
  1359. /* WEBPACK VAR INJECTION */(function(global) {/*!
  1360. * Vue.js v2.6.10
  1361. * (c) 2014-2019 Evan You
  1362. * Released under the MIT License.
  1363. */
  1364. /* */
  1365. var emptyObject = Object.freeze({});
  1366. // These helpers produce better VM code in JS engines due to their
  1367. // explicitness and function inlining.
  1368. function isUndef (v) {
  1369. return v === undefined || v === null
  1370. }
  1371. function isDef (v) {
  1372. return v !== undefined && v !== null
  1373. }
  1374. function isTrue (v) {
  1375. return v === true
  1376. }
  1377. function isFalse (v) {
  1378. return v === false
  1379. }
  1380. /**
  1381. * Check if value is primitive.
  1382. */
  1383. function isPrimitive (value) {
  1384. return (
  1385. typeof value === 'string' ||
  1386. typeof value === 'number' ||
  1387. // $flow-disable-line
  1388. typeof value === 'symbol' ||
  1389. typeof value === 'boolean'
  1390. )
  1391. }
  1392. /**
  1393. * Quick object check - this is primarily used to tell
  1394. * Objects from primitive values when we know the value
  1395. * is a JSON-compliant type.
  1396. */
  1397. function isObject (obj) {
  1398. return obj !== null && typeof obj === 'object'
  1399. }
  1400. /**
  1401. * Get the raw type string of a value, e.g., [object Object].
  1402. */
  1403. var _toString = Object.prototype.toString;
  1404. function toRawType (value) {
  1405. return _toString.call(value).slice(8, -1)
  1406. }
  1407. /**
  1408. * Strict object type check. Only returns true
  1409. * for plain JavaScript objects.
  1410. */
  1411. function isPlainObject (obj) {
  1412. return _toString.call(obj) === '[object Object]'
  1413. }
  1414. function isRegExp (v) {
  1415. return _toString.call(v) === '[object RegExp]'
  1416. }
  1417. /**
  1418. * Check if val is a valid array index.
  1419. */
  1420. function isValidArrayIndex (val) {
  1421. var n = parseFloat(String(val));
  1422. return n >= 0 && Math.floor(n) === n && isFinite(val)
  1423. }
  1424. function isPromise (val) {
  1425. return (
  1426. isDef(val) &&
  1427. typeof val.then === 'function' &&
  1428. typeof val.catch === 'function'
  1429. )
  1430. }
  1431. /**
  1432. * Convert a value to a string that is actually rendered.
  1433. */
  1434. function toString (val) {
  1435. return val == null
  1436. ? ''
  1437. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  1438. ? JSON.stringify(val, null, 2)
  1439. : String(val)
  1440. }
  1441. /**
  1442. * Convert an input value to a number for persistence.
  1443. * If the conversion fails, return original string.
  1444. */
  1445. function toNumber (val) {
  1446. var n = parseFloat(val);
  1447. return isNaN(n) ? val : n
  1448. }
  1449. /**
  1450. * Make a map and return a function for checking if a key
  1451. * is in that map.
  1452. */
  1453. function makeMap (
  1454. str,
  1455. expectsLowerCase
  1456. ) {
  1457. var map = Object.create(null);
  1458. var list = str.split(',');
  1459. for (var i = 0; i < list.length; i++) {
  1460. map[list[i]] = true;
  1461. }
  1462. return expectsLowerCase
  1463. ? function (val) { return map[val.toLowerCase()]; }
  1464. : function (val) { return map[val]; }
  1465. }
  1466. /**
  1467. * Check if a tag is a built-in tag.
  1468. */
  1469. var isBuiltInTag = makeMap('slot,component', true);
  1470. /**
  1471. * Check if an attribute is a reserved attribute.
  1472. */
  1473. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  1474. /**
  1475. * Remove an item from an array.
  1476. */
  1477. function remove (arr, item) {
  1478. if (arr.length) {
  1479. var index = arr.indexOf(item);
  1480. if (index > -1) {
  1481. return arr.splice(index, 1)
  1482. }
  1483. }
  1484. }
  1485. /**
  1486. * Check whether an object has the property.
  1487. */
  1488. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1489. function hasOwn (obj, key) {
  1490. return hasOwnProperty.call(obj, key)
  1491. }
  1492. /**
  1493. * Create a cached version of a pure function.
  1494. */
  1495. function cached (fn) {
  1496. var cache = Object.create(null);
  1497. return (function cachedFn (str) {
  1498. var hit = cache[str];
  1499. return hit || (cache[str] = fn(str))
  1500. })
  1501. }
  1502. /**
  1503. * Camelize a hyphen-delimited string.
  1504. */
  1505. var camelizeRE = /-(\w)/g;
  1506. var camelize = cached(function (str) {
  1507. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  1508. });
  1509. /**
  1510. * Capitalize a string.
  1511. */
  1512. var capitalize = cached(function (str) {
  1513. return str.charAt(0).toUpperCase() + str.slice(1)
  1514. });
  1515. /**
  1516. * Hyphenate a camelCase string.
  1517. */
  1518. var hyphenateRE = /\B([A-Z])/g;
  1519. var hyphenate = cached(function (str) {
  1520. return str.replace(hyphenateRE, '-$1').toLowerCase()
  1521. });
  1522. /**
  1523. * Simple bind polyfill for environments that do not support it,
  1524. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  1525. * since native bind is now performant enough in most browsers.
  1526. * But removing it would mean breaking code that was able to run in
  1527. * PhantomJS 1.x, so this must be kept for backward compatibility.
  1528. */
  1529. /* istanbul ignore next */
  1530. function polyfillBind (fn, ctx) {
  1531. function boundFn (a) {
  1532. var l = arguments.length;
  1533. return l
  1534. ? l > 1
  1535. ? fn.apply(ctx, arguments)
  1536. : fn.call(ctx, a)
  1537. : fn.call(ctx)
  1538. }
  1539. boundFn._length = fn.length;
  1540. return boundFn
  1541. }
  1542. function nativeBind (fn, ctx) {
  1543. return fn.bind(ctx)
  1544. }
  1545. var bind = Function.prototype.bind
  1546. ? nativeBind
  1547. : polyfillBind;
  1548. /**
  1549. * Convert an Array-like object to a real Array.
  1550. */
  1551. function toArray (list, start) {
  1552. start = start || 0;
  1553. var i = list.length - start;
  1554. var ret = new Array(i);
  1555. while (i--) {
  1556. ret[i] = list[i + start];
  1557. }
  1558. return ret
  1559. }
  1560. /**
  1561. * Mix properties into target object.
  1562. */
  1563. function extend (to, _from) {
  1564. for (var key in _from) {
  1565. to[key] = _from[key];
  1566. }
  1567. return to
  1568. }
  1569. /**
  1570. * Merge an Array of Objects into a single Object.
  1571. */
  1572. function toObject (arr) {
  1573. var res = {};
  1574. for (var i = 0; i < arr.length; i++) {
  1575. if (arr[i]) {
  1576. extend(res, arr[i]);
  1577. }
  1578. }
  1579. return res
  1580. }
  1581. /* eslint-disable no-unused-vars */
  1582. /**
  1583. * Perform no operation.
  1584. * Stubbing args to make Flow happy without leaving useless transpiled code
  1585. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  1586. */
  1587. function noop (a, b, c) {}
  1588. /**
  1589. * Always return false.
  1590. */
  1591. var no = function (a, b, c) { return false; };
  1592. /* eslint-enable no-unused-vars */
  1593. /**
  1594. * Return the same value.
  1595. */
  1596. var identity = function (_) { return _; };
  1597. /**
  1598. * Check if two values are loosely equal - that is,
  1599. * if they are plain objects, do they have the same shape?
  1600. */
  1601. function looseEqual (a, b) {
  1602. if (a === b) { return true }
  1603. var isObjectA = isObject(a);
  1604. var isObjectB = isObject(b);
  1605. if (isObjectA && isObjectB) {
  1606. try {
  1607. var isArrayA = Array.isArray(a);
  1608. var isArrayB = Array.isArray(b);
  1609. if (isArrayA && isArrayB) {
  1610. return a.length === b.length && a.every(function (e, i) {
  1611. return looseEqual(e, b[i])
  1612. })
  1613. } else if (a instanceof Date && b instanceof Date) {
  1614. return a.getTime() === b.getTime()
  1615. } else if (!isArrayA && !isArrayB) {
  1616. var keysA = Object.keys(a);
  1617. var keysB = Object.keys(b);
  1618. return keysA.length === keysB.length && keysA.every(function (key) {
  1619. return looseEqual(a[key], b[key])
  1620. })
  1621. } else {
  1622. /* istanbul ignore next */
  1623. return false
  1624. }
  1625. } catch (e) {
  1626. /* istanbul ignore next */
  1627. return false
  1628. }
  1629. } else if (!isObjectA && !isObjectB) {
  1630. return String(a) === String(b)
  1631. } else {
  1632. return false
  1633. }
  1634. }
  1635. /**
  1636. * Return the first index at which a loosely equal value can be
  1637. * found in the array (if value is a plain object, the array must
  1638. * contain an object of the same shape), or -1 if it is not present.
  1639. */
  1640. function looseIndexOf (arr, val) {
  1641. for (var i = 0; i < arr.length; i++) {
  1642. if (looseEqual(arr[i], val)) { return i }
  1643. }
  1644. return -1
  1645. }
  1646. /**
  1647. * Ensure a function is called only once.
  1648. */
  1649. function once (fn) {
  1650. var called = false;
  1651. return function () {
  1652. if (!called) {
  1653. called = true;
  1654. fn.apply(this, arguments);
  1655. }
  1656. }
  1657. }
  1658. var ASSET_TYPES = [
  1659. 'component',
  1660. 'directive',
  1661. 'filter'
  1662. ];
  1663. var LIFECYCLE_HOOKS = [
  1664. 'beforeCreate',
  1665. 'created',
  1666. 'beforeMount',
  1667. 'mounted',
  1668. 'beforeUpdate',
  1669. 'updated',
  1670. 'beforeDestroy',
  1671. 'destroyed',
  1672. 'activated',
  1673. 'deactivated',
  1674. 'errorCaptured',
  1675. 'serverPrefetch'
  1676. ];
  1677. /* */
  1678. var config = ({
  1679. /**
  1680. * Option merge strategies (used in core/util/options)
  1681. */
  1682. // $flow-disable-line
  1683. optionMergeStrategies: Object.create(null),
  1684. /**
  1685. * Whether to suppress warnings.
  1686. */
  1687. silent: false,
  1688. /**
  1689. * Show production mode tip message on boot?
  1690. */
  1691. productionTip: "development" !== 'production',
  1692. /**
  1693. * Whether to enable devtools
  1694. */
  1695. devtools: "development" !== 'production',
  1696. /**
  1697. * Whether to record perf
  1698. */
  1699. performance: false,
  1700. /**
  1701. * Error handler for watcher errors
  1702. */
  1703. errorHandler: null,
  1704. /**
  1705. * Warn handler for watcher warns
  1706. */
  1707. warnHandler: null,
  1708. /**
  1709. * Ignore certain custom elements
  1710. */
  1711. ignoredElements: [],
  1712. /**
  1713. * Custom user key aliases for v-on
  1714. */
  1715. // $flow-disable-line
  1716. keyCodes: Object.create(null),
  1717. /**
  1718. * Check if a tag is reserved so that it cannot be registered as a
  1719. * component. This is platform-dependent and may be overwritten.
  1720. */
  1721. isReservedTag: no,
  1722. /**
  1723. * Check if an attribute is reserved so that it cannot be used as a component
  1724. * prop. This is platform-dependent and may be overwritten.
  1725. */
  1726. isReservedAttr: no,
  1727. /**
  1728. * Check if a tag is an unknown element.
  1729. * Platform-dependent.
  1730. */
  1731. isUnknownElement: no,
  1732. /**
  1733. * Get the namespace of an element
  1734. */
  1735. getTagNamespace: noop,
  1736. /**
  1737. * Parse the real tag name for the specific platform.
  1738. */
  1739. parsePlatformTagName: identity,
  1740. /**
  1741. * Check if an attribute must be bound using property, e.g. value
  1742. * Platform-dependent.
  1743. */
  1744. mustUseProp: no,
  1745. /**
  1746. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  1747. * This will significantly reduce performance if set to false.
  1748. */
  1749. async: true,
  1750. /**
  1751. * Exposed for legacy reasons
  1752. */
  1753. _lifecycleHooks: LIFECYCLE_HOOKS
  1754. });
  1755. /* */
  1756. /**
  1757. * unicode letters used for parsing html tags, component names and property paths.
  1758. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  1759. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  1760. */
  1761. 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/;
  1762. /**
  1763. * Check if a string starts with $ or _
  1764. */
  1765. function isReserved (str) {
  1766. var c = (str + '').charCodeAt(0);
  1767. return c === 0x24 || c === 0x5F
  1768. }
  1769. /**
  1770. * Define a property.
  1771. */
  1772. function def (obj, key, val, enumerable) {
  1773. Object.defineProperty(obj, key, {
  1774. value: val,
  1775. enumerable: !!enumerable,
  1776. writable: true,
  1777. configurable: true
  1778. });
  1779. }
  1780. /**
  1781. * Parse simple path.
  1782. */
  1783. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  1784. function parsePath (path) {
  1785. if (bailRE.test(path)) {
  1786. return
  1787. }
  1788. var segments = path.split('.');
  1789. return function (obj) {
  1790. for (var i = 0; i < segments.length; i++) {
  1791. if (!obj) { return }
  1792. obj = obj[segments[i]];
  1793. }
  1794. return obj
  1795. }
  1796. }
  1797. /* */
  1798. // can we use __proto__?
  1799. var hasProto = '__proto__' in {};
  1800. // Browser environment sniffing
  1801. var inBrowser = typeof window !== 'undefined';
  1802. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  1803. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  1804. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  1805. var isIE = UA && /msie|trident/.test(UA);
  1806. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  1807. var isEdge = UA && UA.indexOf('edge/') > 0;
  1808. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  1809. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  1810. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  1811. var isPhantomJS = UA && /phantomjs/.test(UA);
  1812. var isFF = UA && UA.match(/firefox\/(\d+)/);
  1813. // Firefox has a "watch" function on Object.prototype...
  1814. var nativeWatch = ({}).watch;
  1815. if (inBrowser) {
  1816. try {
  1817. var opts = {};
  1818. Object.defineProperty(opts, 'passive', ({
  1819. get: function get () {
  1820. }
  1821. })); // https://github.com/facebook/flow/issues/285
  1822. window.addEventListener('test-passive', null, opts);
  1823. } catch (e) {}
  1824. }
  1825. // this needs to be lazy-evaled because vue may be required before
  1826. // vue-server-renderer can set VUE_ENV
  1827. var _isServer;
  1828. var isServerRendering = function () {
  1829. if (_isServer === undefined) {
  1830. /* istanbul ignore if */
  1831. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  1832. // detect presence of vue-server-renderer and avoid
  1833. // Webpack shimming the process
  1834. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  1835. } else {
  1836. _isServer = false;
  1837. }
  1838. }
  1839. return _isServer
  1840. };
  1841. // detect devtools
  1842. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  1843. /* istanbul ignore next */
  1844. function isNative (Ctor) {
  1845. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  1846. }
  1847. var hasSymbol =
  1848. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  1849. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  1850. var _Set;
  1851. /* istanbul ignore if */ // $flow-disable-line
  1852. if (typeof Set !== 'undefined' && isNative(Set)) {
  1853. // use native Set when available.
  1854. _Set = Set;
  1855. } else {
  1856. // a non-standard Set polyfill that only works with primitive keys.
  1857. _Set = /*@__PURE__*/(function () {
  1858. function Set () {
  1859. this.set = Object.create(null);
  1860. }
  1861. Set.prototype.has = function has (key) {
  1862. return this.set[key] === true
  1863. };
  1864. Set.prototype.add = function add (key) {
  1865. this.set[key] = true;
  1866. };
  1867. Set.prototype.clear = function clear () {
  1868. this.set = Object.create(null);
  1869. };
  1870. return Set;
  1871. }());
  1872. }
  1873. /* */
  1874. var warn = noop;
  1875. var tip = noop;
  1876. var generateComponentTrace = (noop); // work around flow check
  1877. var formatComponentName = (noop);
  1878. if (true) {
  1879. var hasConsole = typeof console !== 'undefined';
  1880. var classifyRE = /(?:^|[-_])(\w)/g;
  1881. var classify = function (str) { return str
  1882. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  1883. .replace(/[-_]/g, ''); };
  1884. warn = function (msg, vm) {
  1885. var trace = vm ? generateComponentTrace(vm) : '';
  1886. if (config.warnHandler) {
  1887. config.warnHandler.call(null, msg, vm, trace);
  1888. } else if (hasConsole && (!config.silent)) {
  1889. console.error(("[Vue warn]: " + msg + trace));
  1890. }
  1891. };
  1892. tip = function (msg, vm) {
  1893. if (hasConsole && (!config.silent)) {
  1894. console.warn("[Vue tip]: " + msg + (
  1895. vm ? generateComponentTrace(vm) : ''
  1896. ));
  1897. }
  1898. };
  1899. formatComponentName = function (vm, includeFile) {
  1900. {
  1901. if(vm.$scope && vm.$scope.is){
  1902. return vm.$scope.is
  1903. }
  1904. }
  1905. if (vm.$root === vm) {
  1906. return '<Root>'
  1907. }
  1908. var options = typeof vm === 'function' && vm.cid != null
  1909. ? vm.options
  1910. : vm._isVue
  1911. ? vm.$options || vm.constructor.options
  1912. : vm;
  1913. var name = options.name || options._componentTag;
  1914. var file = options.__file;
  1915. if (!name && file) {
  1916. var match = file.match(/([^/\\]+)\.vue$/);
  1917. name = match && match[1];
  1918. }
  1919. return (
  1920. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  1921. (file && includeFile !== false ? (" at " + file) : '')
  1922. )
  1923. };
  1924. var repeat = function (str, n) {
  1925. var res = '';
  1926. while (n) {
  1927. if (n % 2 === 1) { res += str; }
  1928. if (n > 1) { str += str; }
  1929. n >>= 1;
  1930. }
  1931. return res
  1932. };
  1933. generateComponentTrace = function (vm) {
  1934. if (vm._isVue && vm.$parent) {
  1935. var tree = [];
  1936. var currentRecursiveSequence = 0;
  1937. while (vm) {
  1938. if (tree.length > 0) {
  1939. var last = tree[tree.length - 1];
  1940. if (last.constructor === vm.constructor) {
  1941. currentRecursiveSequence++;
  1942. vm = vm.$parent;
  1943. continue
  1944. } else if (currentRecursiveSequence > 0) {
  1945. tree[tree.length - 1] = [last, currentRecursiveSequence];
  1946. currentRecursiveSequence = 0;
  1947. }
  1948. }
  1949. tree.push(vm);
  1950. vm = vm.$parent;
  1951. }
  1952. return '\n\nfound in\n\n' + tree
  1953. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  1954. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  1955. : formatComponentName(vm))); })
  1956. .join('\n')
  1957. } else {
  1958. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  1959. }
  1960. };
  1961. }
  1962. /* */
  1963. var uid = 0;
  1964. /**
  1965. * A dep is an observable that can have multiple
  1966. * directives subscribing to it.
  1967. */
  1968. var Dep = function Dep () {
  1969. this.id = uid++;
  1970. this.subs = [];
  1971. };
  1972. Dep.prototype.addSub = function addSub (sub) {
  1973. this.subs.push(sub);
  1974. };
  1975. Dep.prototype.removeSub = function removeSub (sub) {
  1976. remove(this.subs, sub);
  1977. };
  1978. Dep.prototype.depend = function depend () {
  1979. if (Dep.target) {
  1980. Dep.target.addDep(this);
  1981. }
  1982. };
  1983. Dep.prototype.notify = function notify () {
  1984. // stabilize the subscriber list first
  1985. var subs = this.subs.slice();
  1986. if ( true && !config.async) {
  1987. // subs aren't sorted in scheduler if not running async
  1988. // we need to sort them now to make sure they fire in correct
  1989. // order
  1990. subs.sort(function (a, b) { return a.id - b.id; });
  1991. }
  1992. for (var i = 0, l = subs.length; i < l; i++) {
  1993. subs[i].update();
  1994. }
  1995. };
  1996. // The current target watcher being evaluated.
  1997. // This is globally unique because only one watcher
  1998. // can be evaluated at a time.
  1999. Dep.target = null;
  2000. var targetStack = [];
  2001. function pushTarget (target) {
  2002. targetStack.push(target);
  2003. Dep.target = target;
  2004. }
  2005. function popTarget () {
  2006. targetStack.pop();
  2007. Dep.target = targetStack[targetStack.length - 1];
  2008. }
  2009. /* */
  2010. var VNode = function VNode (
  2011. tag,
  2012. data,
  2013. children,
  2014. text,
  2015. elm,
  2016. context,
  2017. componentOptions,
  2018. asyncFactory
  2019. ) {
  2020. this.tag = tag;
  2021. this.data = data;
  2022. this.children = children;
  2023. this.text = text;
  2024. this.elm = elm;
  2025. this.ns = undefined;
  2026. this.context = context;
  2027. this.fnContext = undefined;
  2028. this.fnOptions = undefined;
  2029. this.fnScopeId = undefined;
  2030. this.key = data && data.key;
  2031. this.componentOptions = componentOptions;
  2032. this.componentInstance = undefined;
  2033. this.parent = undefined;
  2034. this.raw = false;
  2035. this.isStatic = false;
  2036. this.isRootInsert = true;
  2037. this.isComment = false;
  2038. this.isCloned = false;
  2039. this.isOnce = false;
  2040. this.asyncFactory = asyncFactory;
  2041. this.asyncMeta = undefined;
  2042. this.isAsyncPlaceholder = false;
  2043. };
  2044. var prototypeAccessors = { child: { configurable: true } };
  2045. // DEPRECATED: alias for componentInstance for backwards compat.
  2046. /* istanbul ignore next */
  2047. prototypeAccessors.child.get = function () {
  2048. return this.componentInstance
  2049. };
  2050. Object.defineProperties( VNode.prototype, prototypeAccessors );
  2051. var createEmptyVNode = function (text) {
  2052. if ( text === void 0 ) text = '';
  2053. var node = new VNode();
  2054. node.text = text;
  2055. node.isComment = true;
  2056. return node
  2057. };
  2058. function createTextVNode (val) {
  2059. return new VNode(undefined, undefined, undefined, String(val))
  2060. }
  2061. // optimized shallow clone
  2062. // used for static nodes and slot nodes because they may be reused across
  2063. // multiple renders, cloning them avoids errors when DOM manipulations rely
  2064. // on their elm reference.
  2065. function cloneVNode (vnode) {
  2066. var cloned = new VNode(
  2067. vnode.tag,
  2068. vnode.data,
  2069. // #7975
  2070. // clone children array to avoid mutating original in case of cloning
  2071. // a child.
  2072. vnode.children && vnode.children.slice(),
  2073. vnode.text,
  2074. vnode.elm,
  2075. vnode.context,
  2076. vnode.componentOptions,
  2077. vnode.asyncFactory
  2078. );
  2079. cloned.ns = vnode.ns;
  2080. cloned.isStatic = vnode.isStatic;
  2081. cloned.key = vnode.key;
  2082. cloned.isComment = vnode.isComment;
  2083. cloned.fnContext = vnode.fnContext;
  2084. cloned.fnOptions = vnode.fnOptions;
  2085. cloned.fnScopeId = vnode.fnScopeId;
  2086. cloned.asyncMeta = vnode.asyncMeta;
  2087. cloned.isCloned = true;
  2088. return cloned
  2089. }
  2090. /*
  2091. * not type checking this file because flow doesn't play well with
  2092. * dynamically accessing methods on Array prototype
  2093. */
  2094. var arrayProto = Array.prototype;
  2095. var arrayMethods = Object.create(arrayProto);
  2096. var methodsToPatch = [
  2097. 'push',
  2098. 'pop',
  2099. 'shift',
  2100. 'unshift',
  2101. 'splice',
  2102. 'sort',
  2103. 'reverse'
  2104. ];
  2105. /**
  2106. * Intercept mutating methods and emit events
  2107. */
  2108. methodsToPatch.forEach(function (method) {
  2109. // cache original method
  2110. var original = arrayProto[method];
  2111. def(arrayMethods, method, function mutator () {
  2112. var args = [], len = arguments.length;
  2113. while ( len-- ) args[ len ] = arguments[ len ];
  2114. var result = original.apply(this, args);
  2115. var ob = this.__ob__;
  2116. var inserted;
  2117. switch (method) {
  2118. case 'push':
  2119. case 'unshift':
  2120. inserted = args;
  2121. break
  2122. case 'splice':
  2123. inserted = args.slice(2);
  2124. break
  2125. }
  2126. if (inserted) { ob.observeArray(inserted); }
  2127. // notify change
  2128. ob.dep.notify();
  2129. return result
  2130. });
  2131. });
  2132. /* */
  2133. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2134. /**
  2135. * In some cases we may want to disable observation inside a component's
  2136. * update computation.
  2137. */
  2138. var shouldObserve = true;
  2139. function toggleObserving (value) {
  2140. shouldObserve = value;
  2141. }
  2142. /**
  2143. * Observer class that is attached to each observed
  2144. * object. Once attached, the observer converts the target
  2145. * object's property keys into getter/setters that
  2146. * collect dependencies and dispatch updates.
  2147. */
  2148. var Observer = function Observer (value) {
  2149. this.value = value;
  2150. this.dep = new Dep();
  2151. this.vmCount = 0;
  2152. def(value, '__ob__', this);
  2153. if (Array.isArray(value)) {
  2154. if (hasProto) {
  2155. protoAugment(value, arrayMethods);
  2156. } else {
  2157. copyAugment(value, arrayMethods, arrayKeys);
  2158. }
  2159. this.observeArray(value);
  2160. } else {
  2161. this.walk(value);
  2162. }
  2163. };
  2164. /**
  2165. * Walk through all properties and convert them into
  2166. * getter/setters. This method should only be called when
  2167. * value type is Object.
  2168. */
  2169. Observer.prototype.walk = function walk (obj) {
  2170. var keys = Object.keys(obj);
  2171. for (var i = 0; i < keys.length; i++) {
  2172. defineReactive$$1(obj, keys[i]);
  2173. }
  2174. };
  2175. /**
  2176. * Observe a list of Array items.
  2177. */
  2178. Observer.prototype.observeArray = function observeArray (items) {
  2179. for (var i = 0, l = items.length; i < l; i++) {
  2180. observe(items[i]);
  2181. }
  2182. };
  2183. // helpers
  2184. /**
  2185. * Augment a target Object or Array by intercepting
  2186. * the prototype chain using __proto__
  2187. */
  2188. function protoAugment (target, src) {
  2189. /* eslint-disable no-proto */
  2190. target.__proto__ = src;
  2191. /* eslint-enable no-proto */
  2192. }
  2193. /**
  2194. * Augment a target Object or Array by defining
  2195. * hidden properties.
  2196. */
  2197. /* istanbul ignore next */
  2198. function copyAugment (target, src, keys) {
  2199. for (var i = 0, l = keys.length; i < l; i++) {
  2200. var key = keys[i];
  2201. def(target, key, src[key]);
  2202. }
  2203. }
  2204. /**
  2205. * Attempt to create an observer instance for a value,
  2206. * returns the new observer if successfully observed,
  2207. * or the existing observer if the value already has one.
  2208. */
  2209. function observe (value, asRootData) {
  2210. if (!isObject(value) || value instanceof VNode) {
  2211. return
  2212. }
  2213. var ob;
  2214. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2215. ob = value.__ob__;
  2216. } else if (
  2217. shouldObserve &&
  2218. !isServerRendering() &&
  2219. (Array.isArray(value) || isPlainObject(value)) &&
  2220. Object.isExtensible(value) &&
  2221. !value._isVue
  2222. ) {
  2223. ob = new Observer(value);
  2224. }
  2225. if (asRootData && ob) {
  2226. ob.vmCount++;
  2227. }
  2228. return ob
  2229. }
  2230. /**
  2231. * Define a reactive property on an Object.
  2232. */
  2233. function defineReactive$$1 (
  2234. obj,
  2235. key,
  2236. val,
  2237. customSetter,
  2238. shallow
  2239. ) {
  2240. var dep = new Dep();
  2241. var property = Object.getOwnPropertyDescriptor(obj, key);
  2242. if (property && property.configurable === false) {
  2243. return
  2244. }
  2245. // cater for pre-defined getter/setters
  2246. var getter = property && property.get;
  2247. var setter = property && property.set;
  2248. if ((!getter || setter) && arguments.length === 2) {
  2249. val = obj[key];
  2250. }
  2251. var childOb = !shallow && observe(val);
  2252. Object.defineProperty(obj, key, {
  2253. enumerable: true,
  2254. configurable: true,
  2255. get: function reactiveGetter () {
  2256. var value = getter ? getter.call(obj) : val;
  2257. if (Dep.target) {
  2258. dep.depend();
  2259. if (childOb) {
  2260. childOb.dep.depend();
  2261. if (Array.isArray(value)) {
  2262. dependArray(value);
  2263. }
  2264. }
  2265. }
  2266. return value
  2267. },
  2268. set: function reactiveSetter (newVal) {
  2269. var value = getter ? getter.call(obj) : val;
  2270. /* eslint-disable no-self-compare */
  2271. if (newVal === value || (newVal !== newVal && value !== value)) {
  2272. return
  2273. }
  2274. /* eslint-enable no-self-compare */
  2275. if ( true && customSetter) {
  2276. customSetter();
  2277. }
  2278. // #7981: for accessor properties without setter
  2279. if (getter && !setter) { return }
  2280. if (setter) {
  2281. setter.call(obj, newVal);
  2282. } else {
  2283. val = newVal;
  2284. }
  2285. childOb = !shallow && observe(newVal);
  2286. dep.notify();
  2287. }
  2288. });
  2289. }
  2290. /**
  2291. * Set a property on an object. Adds the new property and
  2292. * triggers change notification if the property doesn't
  2293. * already exist.
  2294. */
  2295. function set (target, key, val) {
  2296. if ( true &&
  2297. (isUndef(target) || isPrimitive(target))
  2298. ) {
  2299. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  2300. }
  2301. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2302. target.length = Math.max(target.length, key);
  2303. target.splice(key, 1, val);
  2304. return val
  2305. }
  2306. if (key in target && !(key in Object.prototype)) {
  2307. target[key] = val;
  2308. return val
  2309. }
  2310. var ob = (target).__ob__;
  2311. if (target._isVue || (ob && ob.vmCount)) {
  2312. true && warn(
  2313. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2314. 'at runtime - declare it upfront in the data option.'
  2315. );
  2316. return val
  2317. }
  2318. if (!ob) {
  2319. target[key] = val;
  2320. return val
  2321. }
  2322. defineReactive$$1(ob.value, key, val);
  2323. ob.dep.notify();
  2324. return val
  2325. }
  2326. /**
  2327. * Delete a property and trigger change if necessary.
  2328. */
  2329. function del (target, key) {
  2330. if ( true &&
  2331. (isUndef(target) || isPrimitive(target))
  2332. ) {
  2333. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  2334. }
  2335. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2336. target.splice(key, 1);
  2337. return
  2338. }
  2339. var ob = (target).__ob__;
  2340. if (target._isVue || (ob && ob.vmCount)) {
  2341. true && warn(
  2342. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2343. '- just set it to null.'
  2344. );
  2345. return
  2346. }
  2347. if (!hasOwn(target, key)) {
  2348. return
  2349. }
  2350. delete target[key];
  2351. if (!ob) {
  2352. return
  2353. }
  2354. ob.dep.notify();
  2355. }
  2356. /**
  2357. * Collect dependencies on array elements when the array is touched, since
  2358. * we cannot intercept array element access like property getters.
  2359. */
  2360. function dependArray (value) {
  2361. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2362. e = value[i];
  2363. e && e.__ob__ && e.__ob__.dep.depend();
  2364. if (Array.isArray(e)) {
  2365. dependArray(e);
  2366. }
  2367. }
  2368. }
  2369. /* */
  2370. /**
  2371. * Option overwriting strategies are functions that handle
  2372. * how to merge a parent option value and a child option
  2373. * value into the final value.
  2374. */
  2375. var strats = config.optionMergeStrategies;
  2376. /**
  2377. * Options with restrictions
  2378. */
  2379. if (true) {
  2380. strats.el = strats.propsData = function (parent, child, vm, key) {
  2381. if (!vm) {
  2382. warn(
  2383. "option \"" + key + "\" can only be used during instance " +
  2384. 'creation with the `new` keyword.'
  2385. );
  2386. }
  2387. return defaultStrat(parent, child)
  2388. };
  2389. }
  2390. /**
  2391. * Helper that recursively merges two data objects together.
  2392. */
  2393. function mergeData (to, from) {
  2394. if (!from) { return to }
  2395. var key, toVal, fromVal;
  2396. var keys = hasSymbol
  2397. ? Reflect.ownKeys(from)
  2398. : Object.keys(from);
  2399. for (var i = 0; i < keys.length; i++) {
  2400. key = keys[i];
  2401. // in case the object is already observed...
  2402. if (key === '__ob__') { continue }
  2403. toVal = to[key];
  2404. fromVal = from[key];
  2405. if (!hasOwn(to, key)) {
  2406. set(to, key, fromVal);
  2407. } else if (
  2408. toVal !== fromVal &&
  2409. isPlainObject(toVal) &&
  2410. isPlainObject(fromVal)
  2411. ) {
  2412. mergeData(toVal, fromVal);
  2413. }
  2414. }
  2415. return to
  2416. }
  2417. /**
  2418. * Data
  2419. */
  2420. function mergeDataOrFn (
  2421. parentVal,
  2422. childVal,
  2423. vm
  2424. ) {
  2425. if (!vm) {
  2426. // in a Vue.extend merge, both should be functions
  2427. if (!childVal) {
  2428. return parentVal
  2429. }
  2430. if (!parentVal) {
  2431. return childVal
  2432. }
  2433. // when parentVal & childVal are both present,
  2434. // we need to return a function that returns the
  2435. // merged result of both functions... no need to
  2436. // check if parentVal is a function here because
  2437. // it has to be a function to pass previous merges.
  2438. return function mergedDataFn () {
  2439. return mergeData(
  2440. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  2441. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  2442. )
  2443. }
  2444. } else {
  2445. return function mergedInstanceDataFn () {
  2446. // instance merge
  2447. var instanceData = typeof childVal === 'function'
  2448. ? childVal.call(vm, vm)
  2449. : childVal;
  2450. var defaultData = typeof parentVal === 'function'
  2451. ? parentVal.call(vm, vm)
  2452. : parentVal;
  2453. if (instanceData) {
  2454. return mergeData(instanceData, defaultData)
  2455. } else {
  2456. return defaultData
  2457. }
  2458. }
  2459. }
  2460. }
  2461. strats.data = function (
  2462. parentVal,
  2463. childVal,
  2464. vm
  2465. ) {
  2466. if (!vm) {
  2467. if (childVal && typeof childVal !== 'function') {
  2468. true && warn(
  2469. 'The "data" option should be a function ' +
  2470. 'that returns a per-instance value in component ' +
  2471. 'definitions.',
  2472. vm
  2473. );
  2474. return parentVal
  2475. }
  2476. return mergeDataOrFn(parentVal, childVal)
  2477. }
  2478. return mergeDataOrFn(parentVal, childVal, vm)
  2479. };
  2480. /**
  2481. * Hooks and props are merged as arrays.
  2482. */
  2483. function mergeHook (
  2484. parentVal,
  2485. childVal
  2486. ) {
  2487. var res = childVal
  2488. ? parentVal
  2489. ? parentVal.concat(childVal)
  2490. : Array.isArray(childVal)
  2491. ? childVal
  2492. : [childVal]
  2493. : parentVal;
  2494. return res
  2495. ? dedupeHooks(res)
  2496. : res
  2497. }
  2498. function dedupeHooks (hooks) {
  2499. var res = [];
  2500. for (var i = 0; i < hooks.length; i++) {
  2501. if (res.indexOf(hooks[i]) === -1) {
  2502. res.push(hooks[i]);
  2503. }
  2504. }
  2505. return res
  2506. }
  2507. LIFECYCLE_HOOKS.forEach(function (hook) {
  2508. strats[hook] = mergeHook;
  2509. });
  2510. /**
  2511. * Assets
  2512. *
  2513. * When a vm is present (instance creation), we need to do
  2514. * a three-way merge between constructor options, instance
  2515. * options and parent options.
  2516. */
  2517. function mergeAssets (
  2518. parentVal,
  2519. childVal,
  2520. vm,
  2521. key
  2522. ) {
  2523. var res = Object.create(parentVal || null);
  2524. if (childVal) {
  2525. true && assertObjectType(key, childVal, vm);
  2526. return extend(res, childVal)
  2527. } else {
  2528. return res
  2529. }
  2530. }
  2531. ASSET_TYPES.forEach(function (type) {
  2532. strats[type + 's'] = mergeAssets;
  2533. });
  2534. /**
  2535. * Watchers.
  2536. *
  2537. * Watchers hashes should not overwrite one
  2538. * another, so we merge them as arrays.
  2539. */
  2540. strats.watch = function (
  2541. parentVal,
  2542. childVal,
  2543. vm,
  2544. key
  2545. ) {
  2546. // work around Firefox's Object.prototype.watch...
  2547. if (parentVal === nativeWatch) { parentVal = undefined; }
  2548. if (childVal === nativeWatch) { childVal = undefined; }
  2549. /* istanbul ignore if */
  2550. if (!childVal) { return Object.create(parentVal || null) }
  2551. if (true) {
  2552. assertObjectType(key, childVal, vm);
  2553. }
  2554. if (!parentVal) { return childVal }
  2555. var ret = {};
  2556. extend(ret, parentVal);
  2557. for (var key$1 in childVal) {
  2558. var parent = ret[key$1];
  2559. var child = childVal[key$1];
  2560. if (parent && !Array.isArray(parent)) {
  2561. parent = [parent];
  2562. }
  2563. ret[key$1] = parent
  2564. ? parent.concat(child)
  2565. : Array.isArray(child) ? child : [child];
  2566. }
  2567. return ret
  2568. };
  2569. /**
  2570. * Other object hashes.
  2571. */
  2572. strats.props =
  2573. strats.methods =
  2574. strats.inject =
  2575. strats.computed = function (
  2576. parentVal,
  2577. childVal,
  2578. vm,
  2579. key
  2580. ) {
  2581. if (childVal && "development" !== 'production') {
  2582. assertObjectType(key, childVal, vm);
  2583. }
  2584. if (!parentVal) { return childVal }
  2585. var ret = Object.create(null);
  2586. extend(ret, parentVal);
  2587. if (childVal) { extend(ret, childVal); }
  2588. return ret
  2589. };
  2590. strats.provide = mergeDataOrFn;
  2591. /**
  2592. * Default strategy.
  2593. */
  2594. var defaultStrat = function (parentVal, childVal) {
  2595. return childVal === undefined
  2596. ? parentVal
  2597. : childVal
  2598. };
  2599. /**
  2600. * Validate component names
  2601. */
  2602. function checkComponents (options) {
  2603. for (var key in options.components) {
  2604. validateComponentName(key);
  2605. }
  2606. }
  2607. function validateComponentName (name) {
  2608. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  2609. warn(
  2610. 'Invalid component name: "' + name + '". Component names ' +
  2611. 'should conform to valid custom element name in html5 specification.'
  2612. );
  2613. }
  2614. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  2615. warn(
  2616. 'Do not use built-in or reserved HTML elements as component ' +
  2617. 'id: ' + name
  2618. );
  2619. }
  2620. }
  2621. /**
  2622. * Ensure all props option syntax are normalized into the
  2623. * Object-based format.
  2624. */
  2625. function normalizeProps (options, vm) {
  2626. var props = options.props;
  2627. if (!props) { return }
  2628. var res = {};
  2629. var i, val, name;
  2630. if (Array.isArray(props)) {
  2631. i = props.length;
  2632. while (i--) {
  2633. val = props[i];
  2634. if (typeof val === 'string') {
  2635. name = camelize(val);
  2636. res[name] = { type: null };
  2637. } else if (true) {
  2638. warn('props must be strings when using array syntax.');
  2639. }
  2640. }
  2641. } else if (isPlainObject(props)) {
  2642. for (var key in props) {
  2643. val = props[key];
  2644. name = camelize(key);
  2645. res[name] = isPlainObject(val)
  2646. ? val
  2647. : { type: val };
  2648. }
  2649. } else if (true) {
  2650. warn(
  2651. "Invalid value for option \"props\": expected an Array or an Object, " +
  2652. "but got " + (toRawType(props)) + ".",
  2653. vm
  2654. );
  2655. }
  2656. options.props = res;
  2657. }
  2658. /**
  2659. * Normalize all injections into Object-based format
  2660. */
  2661. function normalizeInject (options, vm) {
  2662. var inject = options.inject;
  2663. if (!inject) { return }
  2664. var normalized = options.inject = {};
  2665. if (Array.isArray(inject)) {
  2666. for (var i = 0; i < inject.length; i++) {
  2667. normalized[inject[i]] = { from: inject[i] };
  2668. }
  2669. } else if (isPlainObject(inject)) {
  2670. for (var key in inject) {
  2671. var val = inject[key];
  2672. normalized[key] = isPlainObject(val)
  2673. ? extend({ from: key }, val)
  2674. : { from: val };
  2675. }
  2676. } else if (true) {
  2677. warn(
  2678. "Invalid value for option \"inject\": expected an Array or an Object, " +
  2679. "but got " + (toRawType(inject)) + ".",
  2680. vm
  2681. );
  2682. }
  2683. }
  2684. /**
  2685. * Normalize raw function directives into object format.
  2686. */
  2687. function normalizeDirectives (options) {
  2688. var dirs = options.directives;
  2689. if (dirs) {
  2690. for (var key in dirs) {
  2691. var def$$1 = dirs[key];
  2692. if (typeof def$$1 === 'function') {
  2693. dirs[key] = { bind: def$$1, update: def$$1 };
  2694. }
  2695. }
  2696. }
  2697. }
  2698. function assertObjectType (name, value, vm) {
  2699. if (!isPlainObject(value)) {
  2700. warn(
  2701. "Invalid value for option \"" + name + "\": expected an Object, " +
  2702. "but got " + (toRawType(value)) + ".",
  2703. vm
  2704. );
  2705. }
  2706. }
  2707. /**
  2708. * Merge two option objects into a new one.
  2709. * Core utility used in both instantiation and inheritance.
  2710. */
  2711. function mergeOptions (
  2712. parent,
  2713. child,
  2714. vm
  2715. ) {
  2716. if (true) {
  2717. checkComponents(child);
  2718. }
  2719. if (typeof child === 'function') {
  2720. child = child.options;
  2721. }
  2722. normalizeProps(child, vm);
  2723. normalizeInject(child, vm);
  2724. normalizeDirectives(child);
  2725. // Apply extends and mixins on the child options,
  2726. // but only if it is a raw options object that isn't
  2727. // the result of another mergeOptions call.
  2728. // Only merged options has the _base property.
  2729. if (!child._base) {
  2730. if (child.extends) {
  2731. parent = mergeOptions(parent, child.extends, vm);
  2732. }
  2733. if (child.mixins) {
  2734. for (var i = 0, l = child.mixins.length; i < l; i++) {
  2735. parent = mergeOptions(parent, child.mixins[i], vm);
  2736. }
  2737. }
  2738. }
  2739. var options = {};
  2740. var key;
  2741. for (key in parent) {
  2742. mergeField(key);
  2743. }
  2744. for (key in child) {
  2745. if (!hasOwn(parent, key)) {
  2746. mergeField(key);
  2747. }
  2748. }
  2749. function mergeField (key) {
  2750. var strat = strats[key] || defaultStrat;
  2751. options[key] = strat(parent[key], child[key], vm, key);
  2752. }
  2753. return options
  2754. }
  2755. /**
  2756. * Resolve an asset.
  2757. * This function is used because child instances need access
  2758. * to assets defined in its ancestor chain.
  2759. */
  2760. function resolveAsset (
  2761. options,
  2762. type,
  2763. id,
  2764. warnMissing
  2765. ) {
  2766. /* istanbul ignore if */
  2767. if (typeof id !== 'string') {
  2768. return
  2769. }
  2770. var assets = options[type];
  2771. // check local registration variations first
  2772. if (hasOwn(assets, id)) { return assets[id] }
  2773. var camelizedId = camelize(id);
  2774. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  2775. var PascalCaseId = capitalize(camelizedId);
  2776. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  2777. // fallback to prototype chain
  2778. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  2779. if ( true && warnMissing && !res) {
  2780. warn(
  2781. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  2782. options
  2783. );
  2784. }
  2785. return res
  2786. }
  2787. /* */
  2788. function validateProp (
  2789. key,
  2790. propOptions,
  2791. propsData,
  2792. vm
  2793. ) {
  2794. var prop = propOptions[key];
  2795. var absent = !hasOwn(propsData, key);
  2796. var value = propsData[key];
  2797. // boolean casting
  2798. var booleanIndex = getTypeIndex(Boolean, prop.type);
  2799. if (booleanIndex > -1) {
  2800. if (absent && !hasOwn(prop, 'default')) {
  2801. value = false;
  2802. } else if (value === '' || value === hyphenate(key)) {
  2803. // only cast empty string / same name to boolean if
  2804. // boolean has higher priority
  2805. var stringIndex = getTypeIndex(String, prop.type);
  2806. if (stringIndex < 0 || booleanIndex < stringIndex) {
  2807. value = true;
  2808. }
  2809. }
  2810. }
  2811. // check default value
  2812. if (value === undefined) {
  2813. value = getPropDefaultValue(vm, prop, key);
  2814. // since the default value is a fresh copy,
  2815. // make sure to observe it.
  2816. var prevShouldObserve = shouldObserve;
  2817. toggleObserving(true);
  2818. observe(value);
  2819. toggleObserving(prevShouldObserve);
  2820. }
  2821. if (
  2822. true
  2823. ) {
  2824. assertProp(prop, key, value, vm, absent);
  2825. }
  2826. return value
  2827. }
  2828. /**
  2829. * Get the default value of a prop.
  2830. */
  2831. function getPropDefaultValue (vm, prop, key) {
  2832. // no default, return undefined
  2833. if (!hasOwn(prop, 'default')) {
  2834. return undefined
  2835. }
  2836. var def = prop.default;
  2837. // warn against non-factory defaults for Object & Array
  2838. if ( true && isObject(def)) {
  2839. warn(
  2840. 'Invalid default value for prop "' + key + '": ' +
  2841. 'Props with type Object/Array must use a factory function ' +
  2842. 'to return the default value.',
  2843. vm
  2844. );
  2845. }
  2846. // the raw prop value was also undefined from previous render,
  2847. // return previous default value to avoid unnecessary watcher trigger
  2848. if (vm && vm.$options.propsData &&
  2849. vm.$options.propsData[key] === undefined &&
  2850. vm._props[key] !== undefined
  2851. ) {
  2852. return vm._props[key]
  2853. }
  2854. // call factory function for non-Function types
  2855. // a value is Function if its prototype is function even across different execution context
  2856. return typeof def === 'function' && getType(prop.type) !== 'Function'
  2857. ? def.call(vm)
  2858. : def
  2859. }
  2860. /**
  2861. * Assert whether a prop is valid.
  2862. */
  2863. function assertProp (
  2864. prop,
  2865. name,
  2866. value,
  2867. vm,
  2868. absent
  2869. ) {
  2870. if (prop.required && absent) {
  2871. warn(
  2872. 'Missing required prop: "' + name + '"',
  2873. vm
  2874. );
  2875. return
  2876. }
  2877. if (value == null && !prop.required) {
  2878. return
  2879. }
  2880. var type = prop.type;
  2881. var valid = !type || type === true;
  2882. var expectedTypes = [];
  2883. if (type) {
  2884. if (!Array.isArray(type)) {
  2885. type = [type];
  2886. }
  2887. for (var i = 0; i < type.length && !valid; i++) {
  2888. var assertedType = assertType(value, type[i]);
  2889. expectedTypes.push(assertedType.expectedType || '');
  2890. valid = assertedType.valid;
  2891. }
  2892. }
  2893. if (!valid) {
  2894. warn(
  2895. getInvalidTypeMessage(name, value, expectedTypes),
  2896. vm
  2897. );
  2898. return
  2899. }
  2900. var validator = prop.validator;
  2901. if (validator) {
  2902. if (!validator(value)) {
  2903. warn(
  2904. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  2905. vm
  2906. );
  2907. }
  2908. }
  2909. }
  2910. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  2911. function assertType (value, type) {
  2912. var valid;
  2913. var expectedType = getType(type);
  2914. if (simpleCheckRE.test(expectedType)) {
  2915. var t = typeof value;
  2916. valid = t === expectedType.toLowerCase();
  2917. // for primitive wrapper objects
  2918. if (!valid && t === 'object') {
  2919. valid = value instanceof type;
  2920. }
  2921. } else if (expectedType === 'Object') {
  2922. valid = isPlainObject(value);
  2923. } else if (expectedType === 'Array') {
  2924. valid = Array.isArray(value);
  2925. } else {
  2926. valid = value instanceof type;
  2927. }
  2928. return {
  2929. valid: valid,
  2930. expectedType: expectedType
  2931. }
  2932. }
  2933. /**
  2934. * Use function string name to check built-in types,
  2935. * because a simple equality check will fail when running
  2936. * across different vms / iframes.
  2937. */
  2938. function getType (fn) {
  2939. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  2940. return match ? match[1] : ''
  2941. }
  2942. function isSameType (a, b) {
  2943. return getType(a) === getType(b)
  2944. }
  2945. function getTypeIndex (type, expectedTypes) {
  2946. if (!Array.isArray(expectedTypes)) {
  2947. return isSameType(expectedTypes, type) ? 0 : -1
  2948. }
  2949. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  2950. if (isSameType(expectedTypes[i], type)) {
  2951. return i
  2952. }
  2953. }
  2954. return -1
  2955. }
  2956. function getInvalidTypeMessage (name, value, expectedTypes) {
  2957. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  2958. " Expected " + (expectedTypes.map(capitalize).join(', '));
  2959. var expectedType = expectedTypes[0];
  2960. var receivedType = toRawType(value);
  2961. var expectedValue = styleValue(value, expectedType);
  2962. var receivedValue = styleValue(value, receivedType);
  2963. // check if we need to specify expected value
  2964. if (expectedTypes.length === 1 &&
  2965. isExplicable(expectedType) &&
  2966. !isBoolean(expectedType, receivedType)) {
  2967. message += " with value " + expectedValue;
  2968. }
  2969. message += ", got " + receivedType + " ";
  2970. // check if we need to specify received value
  2971. if (isExplicable(receivedType)) {
  2972. message += "with value " + receivedValue + ".";
  2973. }
  2974. return message
  2975. }
  2976. function styleValue (value, type) {
  2977. if (type === 'String') {
  2978. return ("\"" + value + "\"")
  2979. } else if (type === 'Number') {
  2980. return ("" + (Number(value)))
  2981. } else {
  2982. return ("" + value)
  2983. }
  2984. }
  2985. function isExplicable (value) {
  2986. var explicitTypes = ['string', 'number', 'boolean'];
  2987. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  2988. }
  2989. function isBoolean () {
  2990. var args = [], len = arguments.length;
  2991. while ( len-- ) args[ len ] = arguments[ len ];
  2992. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  2993. }
  2994. /* */
  2995. function handleError (err, vm, info) {
  2996. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  2997. // See: https://github.com/vuejs/vuex/issues/1505
  2998. pushTarget();
  2999. try {
  3000. if (vm) {
  3001. var cur = vm;
  3002. while ((cur = cur.$parent)) {
  3003. var hooks = cur.$options.errorCaptured;
  3004. if (hooks) {
  3005. for (var i = 0; i < hooks.length; i++) {
  3006. try {
  3007. var capture = hooks[i].call(cur, err, vm, info) === false;
  3008. if (capture) { return }
  3009. } catch (e) {
  3010. globalHandleError(e, cur, 'errorCaptured hook');
  3011. }
  3012. }
  3013. }
  3014. }
  3015. }
  3016. globalHandleError(err, vm, info);
  3017. } finally {
  3018. popTarget();
  3019. }
  3020. }
  3021. function invokeWithErrorHandling (
  3022. handler,
  3023. context,
  3024. args,
  3025. vm,
  3026. info
  3027. ) {
  3028. var res;
  3029. try {
  3030. res = args ? handler.apply(context, args) : handler.call(context);
  3031. if (res && !res._isVue && isPromise(res) && !res._handled) {
  3032. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  3033. // issue #9511
  3034. // avoid catch triggering multiple times when nested calls
  3035. res._handled = true;
  3036. }
  3037. } catch (e) {
  3038. handleError(e, vm, info);
  3039. }
  3040. return res
  3041. }
  3042. function globalHandleError (err, vm, info) {
  3043. if (config.errorHandler) {
  3044. try {
  3045. return config.errorHandler.call(null, err, vm, info)
  3046. } catch (e) {
  3047. // if the user intentionally throws the original error in the handler,
  3048. // do not log it twice
  3049. if (e !== err) {
  3050. logError(e, null, 'config.errorHandler');
  3051. }
  3052. }
  3053. }
  3054. logError(err, vm, info);
  3055. }
  3056. function logError (err, vm, info) {
  3057. if (true) {
  3058. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  3059. }
  3060. /* istanbul ignore else */
  3061. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  3062. console.error(err);
  3063. } else {
  3064. throw err
  3065. }
  3066. }
  3067. /* */
  3068. var callbacks = [];
  3069. var pending = false;
  3070. function flushCallbacks () {
  3071. pending = false;
  3072. var copies = callbacks.slice(0);
  3073. callbacks.length = 0;
  3074. for (var i = 0; i < copies.length; i++) {
  3075. copies[i]();
  3076. }
  3077. }
  3078. // Here we have async deferring wrappers using microtasks.
  3079. // In 2.5 we used (macro) tasks (in combination with microtasks).
  3080. // However, it has subtle problems when state is changed right before repaint
  3081. // (e.g. #6813, out-in transitions).
  3082. // Also, using (macro) tasks in event handler would cause some weird behaviors
  3083. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  3084. // So we now use microtasks everywhere, again.
  3085. // A major drawback of this tradeoff is that there are some scenarios
  3086. // where microtasks have too high a priority and fire in between supposedly
  3087. // sequential events (e.g. #4521, #6690, which have workarounds)
  3088. // or even between bubbling of the same event (#6566).
  3089. var timerFunc;
  3090. // The nextTick behavior leverages the microtask queue, which can be accessed
  3091. // via either native Promise.then or MutationObserver.
  3092. // MutationObserver has wider support, however it is seriously bugged in
  3093. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  3094. // completely stops working after triggering a few times... so, if native
  3095. // Promise is available, we will use it:
  3096. /* istanbul ignore next, $flow-disable-line */
  3097. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  3098. var p = Promise.resolve();
  3099. timerFunc = function () {
  3100. p.then(flushCallbacks);
  3101. // In problematic UIWebViews, Promise.then doesn't completely break, but
  3102. // it can get stuck in a weird state where callbacks are pushed into the
  3103. // microtask queue but the queue isn't being flushed, until the browser
  3104. // needs to do some other work, e.g. handle a timer. Therefore we can
  3105. // "force" the microtask queue to be flushed by adding an empty timer.
  3106. if (isIOS) { setTimeout(noop); }
  3107. };
  3108. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  3109. isNative(MutationObserver) ||
  3110. // PhantomJS and iOS 7.x
  3111. MutationObserver.toString() === '[object MutationObserverConstructor]'
  3112. )) {
  3113. // Use MutationObserver where native Promise is not available,
  3114. // e.g. PhantomJS, iOS7, Android 4.4
  3115. // (#6466 MutationObserver is unreliable in IE11)
  3116. var counter = 1;
  3117. var observer = new MutationObserver(flushCallbacks);
  3118. var textNode = document.createTextNode(String(counter));
  3119. observer.observe(textNode, {
  3120. characterData: true
  3121. });
  3122. timerFunc = function () {
  3123. counter = (counter + 1) % 2;
  3124. textNode.data = String(counter);
  3125. };
  3126. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  3127. // Fallback to setImmediate.
  3128. // Techinically it leverages the (macro) task queue,
  3129. // but it is still a better choice than setTimeout.
  3130. timerFunc = function () {
  3131. setImmediate(flushCallbacks);
  3132. };
  3133. } else {
  3134. // Fallback to setTimeout.
  3135. timerFunc = function () {
  3136. setTimeout(flushCallbacks, 0);
  3137. };
  3138. }
  3139. function nextTick (cb, ctx) {
  3140. var _resolve;
  3141. callbacks.push(function () {
  3142. if (cb) {
  3143. try {
  3144. cb.call(ctx);
  3145. } catch (e) {
  3146. handleError(e, ctx, 'nextTick');
  3147. }
  3148. } else if (_resolve) {
  3149. _resolve(ctx);
  3150. }
  3151. });
  3152. if (!pending) {
  3153. pending = true;
  3154. timerFunc();
  3155. }
  3156. // $flow-disable-line
  3157. if (!cb && typeof Promise !== 'undefined') {
  3158. return new Promise(function (resolve) {
  3159. _resolve = resolve;
  3160. })
  3161. }
  3162. }
  3163. /* */
  3164. /* not type checking this file because flow doesn't play well with Proxy */
  3165. var initProxy;
  3166. if (true) {
  3167. var allowedGlobals = makeMap(
  3168. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3169. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3170. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3171. 'require' // for Webpack/Browserify
  3172. );
  3173. var warnNonPresent = function (target, key) {
  3174. warn(
  3175. "Property or method \"" + key + "\" is not defined on the instance but " +
  3176. 'referenced during render. Make sure that this property is reactive, ' +
  3177. 'either in the data option, or for class-based components, by ' +
  3178. 'initializing the property. ' +
  3179. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  3180. target
  3181. );
  3182. };
  3183. var warnReservedPrefix = function (target, key) {
  3184. warn(
  3185. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  3186. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  3187. 'prevent conflicts with Vue internals' +
  3188. 'See: https://vuejs.org/v2/api/#data',
  3189. target
  3190. );
  3191. };
  3192. var hasProxy =
  3193. typeof Proxy !== 'undefined' && isNative(Proxy);
  3194. if (hasProxy) {
  3195. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  3196. config.keyCodes = new Proxy(config.keyCodes, {
  3197. set: function set (target, key, value) {
  3198. if (isBuiltInModifier(key)) {
  3199. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3200. return false
  3201. } else {
  3202. target[key] = value;
  3203. return true
  3204. }
  3205. }
  3206. });
  3207. }
  3208. var hasHandler = {
  3209. has: function has (target, key) {
  3210. var has = key in target;
  3211. var isAllowed = allowedGlobals(key) ||
  3212. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  3213. if (!has && !isAllowed) {
  3214. if (key in target.$data) { warnReservedPrefix(target, key); }
  3215. else { warnNonPresent(target, key); }
  3216. }
  3217. return has || !isAllowed
  3218. }
  3219. };
  3220. var getHandler = {
  3221. get: function get (target, key) {
  3222. if (typeof key === 'string' && !(key in target)) {
  3223. if (key in target.$data) { warnReservedPrefix(target, key); }
  3224. else { warnNonPresent(target, key); }
  3225. }
  3226. return target[key]
  3227. }
  3228. };
  3229. initProxy = function initProxy (vm) {
  3230. if (hasProxy) {
  3231. // determine which proxy handler to use
  3232. var options = vm.$options;
  3233. var handlers = options.render && options.render._withStripped
  3234. ? getHandler
  3235. : hasHandler;
  3236. vm._renderProxy = new Proxy(vm, handlers);
  3237. } else {
  3238. vm._renderProxy = vm;
  3239. }
  3240. };
  3241. }
  3242. /* */
  3243. var seenObjects = new _Set();
  3244. /**
  3245. * Recursively traverse an object to evoke all converted
  3246. * getters, so that every nested property inside the object
  3247. * is collected as a "deep" dependency.
  3248. */
  3249. function traverse (val) {
  3250. _traverse(val, seenObjects);
  3251. seenObjects.clear();
  3252. }
  3253. function _traverse (val, seen) {
  3254. var i, keys;
  3255. var isA = Array.isArray(val);
  3256. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  3257. return
  3258. }
  3259. if (val.__ob__) {
  3260. var depId = val.__ob__.dep.id;
  3261. if (seen.has(depId)) {
  3262. return
  3263. }
  3264. seen.add(depId);
  3265. }
  3266. if (isA) {
  3267. i = val.length;
  3268. while (i--) { _traverse(val[i], seen); }
  3269. } else {
  3270. keys = Object.keys(val);
  3271. i = keys.length;
  3272. while (i--) { _traverse(val[keys[i]], seen); }
  3273. }
  3274. }
  3275. var mark;
  3276. var measure;
  3277. if (true) {
  3278. var perf = inBrowser && window.performance;
  3279. /* istanbul ignore if */
  3280. if (
  3281. perf &&
  3282. perf.mark &&
  3283. perf.measure &&
  3284. perf.clearMarks &&
  3285. perf.clearMeasures
  3286. ) {
  3287. mark = function (tag) { return perf.mark(tag); };
  3288. measure = function (name, startTag, endTag) {
  3289. perf.measure(name, startTag, endTag);
  3290. perf.clearMarks(startTag);
  3291. perf.clearMarks(endTag);
  3292. // perf.clearMeasures(name)
  3293. };
  3294. }
  3295. }
  3296. /* */
  3297. var normalizeEvent = cached(function (name) {
  3298. var passive = name.charAt(0) === '&';
  3299. name = passive ? name.slice(1) : name;
  3300. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3301. name = once$$1 ? name.slice(1) : name;
  3302. var capture = name.charAt(0) === '!';
  3303. name = capture ? name.slice(1) : name;
  3304. return {
  3305. name: name,
  3306. once: once$$1,
  3307. capture: capture,
  3308. passive: passive
  3309. }
  3310. });
  3311. function createFnInvoker (fns, vm) {
  3312. function invoker () {
  3313. var arguments$1 = arguments;
  3314. var fns = invoker.fns;
  3315. if (Array.isArray(fns)) {
  3316. var cloned = fns.slice();
  3317. for (var i = 0; i < cloned.length; i++) {
  3318. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  3319. }
  3320. } else {
  3321. // return handler return value for single handlers
  3322. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  3323. }
  3324. }
  3325. invoker.fns = fns;
  3326. return invoker
  3327. }
  3328. function updateListeners (
  3329. on,
  3330. oldOn,
  3331. add,
  3332. remove$$1,
  3333. createOnceHandler,
  3334. vm
  3335. ) {
  3336. var name, def$$1, cur, old, event;
  3337. for (name in on) {
  3338. def$$1 = cur = on[name];
  3339. old = oldOn[name];
  3340. event = normalizeEvent(name);
  3341. if (isUndef(cur)) {
  3342. true && warn(
  3343. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3344. vm
  3345. );
  3346. } else if (isUndef(old)) {
  3347. if (isUndef(cur.fns)) {
  3348. cur = on[name] = createFnInvoker(cur, vm);
  3349. }
  3350. if (isTrue(event.once)) {
  3351. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  3352. }
  3353. add(event.name, cur, event.capture, event.passive, event.params);
  3354. } else if (cur !== old) {
  3355. old.fns = cur;
  3356. on[name] = old;
  3357. }
  3358. }
  3359. for (name in oldOn) {
  3360. if (isUndef(on[name])) {
  3361. event = normalizeEvent(name);
  3362. remove$$1(event.name, oldOn[name], event.capture);
  3363. }
  3364. }
  3365. }
  3366. /* */
  3367. /* */
  3368. function extractPropsFromVNodeData (
  3369. data,
  3370. Ctor,
  3371. tag
  3372. ) {
  3373. // we are only extracting raw values here.
  3374. // validation and default values are handled in the child
  3375. // component itself.
  3376. var propOptions = Ctor.options.props;
  3377. if (isUndef(propOptions)) {
  3378. return
  3379. }
  3380. var res = {};
  3381. var attrs = data.attrs;
  3382. var props = data.props;
  3383. if (isDef(attrs) || isDef(props)) {
  3384. for (var key in propOptions) {
  3385. var altKey = hyphenate(key);
  3386. if (true) {
  3387. var keyInLowerCase = key.toLowerCase();
  3388. if (
  3389. key !== keyInLowerCase &&
  3390. attrs && hasOwn(attrs, keyInLowerCase)
  3391. ) {
  3392. tip(
  3393. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  3394. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  3395. " \"" + key + "\". " +
  3396. "Note that HTML attributes are case-insensitive and camelCased " +
  3397. "props need to use their kebab-case equivalents when using in-DOM " +
  3398. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  3399. );
  3400. }
  3401. }
  3402. checkProp(res, props, key, altKey, true) ||
  3403. checkProp(res, attrs, key, altKey, false);
  3404. }
  3405. }
  3406. return res
  3407. }
  3408. function checkProp (
  3409. res,
  3410. hash,
  3411. key,
  3412. altKey,
  3413. preserve
  3414. ) {
  3415. if (isDef(hash)) {
  3416. if (hasOwn(hash, key)) {
  3417. res[key] = hash[key];
  3418. if (!preserve) {
  3419. delete hash[key];
  3420. }
  3421. return true
  3422. } else if (hasOwn(hash, altKey)) {
  3423. res[key] = hash[altKey];
  3424. if (!preserve) {
  3425. delete hash[altKey];
  3426. }
  3427. return true
  3428. }
  3429. }
  3430. return false
  3431. }
  3432. /* */
  3433. // The template compiler attempts to minimize the need for normalization by
  3434. // statically analyzing the template at compile time.
  3435. //
  3436. // For plain HTML markup, normalization can be completely skipped because the
  3437. // generated render function is guaranteed to return Array<VNode>. There are
  3438. // two cases where extra normalization is needed:
  3439. // 1. When the children contains components - because a functional component
  3440. // may return an Array instead of a single root. In this case, just a simple
  3441. // normalization is needed - if any child is an Array, we flatten the whole
  3442. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3443. // because functional components already normalize their own children.
  3444. function simpleNormalizeChildren (children) {
  3445. for (var i = 0; i < children.length; i++) {
  3446. if (Array.isArray(children[i])) {
  3447. return Array.prototype.concat.apply([], children)
  3448. }
  3449. }
  3450. return children
  3451. }
  3452. // 2. When the children contains constructs that always generated nested Arrays,
  3453. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3454. // with hand-written render functions / JSX. In such cases a full normalization
  3455. // is needed to cater to all possible types of children values.
  3456. function normalizeChildren (children) {
  3457. return isPrimitive(children)
  3458. ? [createTextVNode(children)]
  3459. : Array.isArray(children)
  3460. ? normalizeArrayChildren(children)
  3461. : undefined
  3462. }
  3463. function isTextNode (node) {
  3464. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  3465. }
  3466. function normalizeArrayChildren (children, nestedIndex) {
  3467. var res = [];
  3468. var i, c, lastIndex, last;
  3469. for (i = 0; i < children.length; i++) {
  3470. c = children[i];
  3471. if (isUndef(c) || typeof c === 'boolean') { continue }
  3472. lastIndex = res.length - 1;
  3473. last = res[lastIndex];
  3474. // nested
  3475. if (Array.isArray(c)) {
  3476. if (c.length > 0) {
  3477. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  3478. // merge adjacent text nodes
  3479. if (isTextNode(c[0]) && isTextNode(last)) {
  3480. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  3481. c.shift();
  3482. }
  3483. res.push.apply(res, c);
  3484. }
  3485. } else if (isPrimitive(c)) {
  3486. if (isTextNode(last)) {
  3487. // merge adjacent text nodes
  3488. // this is necessary for SSR hydration because text nodes are
  3489. // essentially merged when rendered to HTML strings
  3490. res[lastIndex] = createTextVNode(last.text + c);
  3491. } else if (c !== '') {
  3492. // convert primitive to vnode
  3493. res.push(createTextVNode(c));
  3494. }
  3495. } else {
  3496. if (isTextNode(c) && isTextNode(last)) {
  3497. // merge adjacent text nodes
  3498. res[lastIndex] = createTextVNode(last.text + c.text);
  3499. } else {
  3500. // default key for nested array children (likely generated by v-for)
  3501. if (isTrue(children._isVList) &&
  3502. isDef(c.tag) &&
  3503. isUndef(c.key) &&
  3504. isDef(nestedIndex)) {
  3505. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  3506. }
  3507. res.push(c);
  3508. }
  3509. }
  3510. }
  3511. return res
  3512. }
  3513. /* */
  3514. function initProvide (vm) {
  3515. var provide = vm.$options.provide;
  3516. if (provide) {
  3517. vm._provided = typeof provide === 'function'
  3518. ? provide.call(vm)
  3519. : provide;
  3520. }
  3521. }
  3522. function initInjections (vm) {
  3523. var result = resolveInject(vm.$options.inject, vm);
  3524. if (result) {
  3525. toggleObserving(false);
  3526. Object.keys(result).forEach(function (key) {
  3527. /* istanbul ignore else */
  3528. if (true) {
  3529. defineReactive$$1(vm, key, result[key], function () {
  3530. warn(
  3531. "Avoid mutating an injected value directly since the changes will be " +
  3532. "overwritten whenever the provided component re-renders. " +
  3533. "injection being mutated: \"" + key + "\"",
  3534. vm
  3535. );
  3536. });
  3537. } else {}
  3538. });
  3539. toggleObserving(true);
  3540. }
  3541. }
  3542. function resolveInject (inject, vm) {
  3543. if (inject) {
  3544. // inject is :any because flow is not smart enough to figure out cached
  3545. var result = Object.create(null);
  3546. var keys = hasSymbol
  3547. ? Reflect.ownKeys(inject)
  3548. : Object.keys(inject);
  3549. for (var i = 0; i < keys.length; i++) {
  3550. var key = keys[i];
  3551. // #6574 in case the inject object is observed...
  3552. if (key === '__ob__') { continue }
  3553. var provideKey = inject[key].from;
  3554. var source = vm;
  3555. while (source) {
  3556. if (source._provided && hasOwn(source._provided, provideKey)) {
  3557. result[key] = source._provided[provideKey];
  3558. break
  3559. }
  3560. source = source.$parent;
  3561. }
  3562. if (!source) {
  3563. if ('default' in inject[key]) {
  3564. var provideDefault = inject[key].default;
  3565. result[key] = typeof provideDefault === 'function'
  3566. ? provideDefault.call(vm)
  3567. : provideDefault;
  3568. } else if (true) {
  3569. warn(("Injection \"" + key + "\" not found"), vm);
  3570. }
  3571. }
  3572. }
  3573. return result
  3574. }
  3575. }
  3576. /* */
  3577. /**
  3578. * Runtime helper for resolving raw children VNodes into a slot object.
  3579. */
  3580. function resolveSlots (
  3581. children,
  3582. context
  3583. ) {
  3584. if (!children || !children.length) {
  3585. return {}
  3586. }
  3587. var slots = {};
  3588. for (var i = 0, l = children.length; i < l; i++) {
  3589. var child = children[i];
  3590. var data = child.data;
  3591. // remove slot attribute if the node is resolved as a Vue slot node
  3592. if (data && data.attrs && data.attrs.slot) {
  3593. delete data.attrs.slot;
  3594. }
  3595. // named slots should only be respected if the vnode was rendered in the
  3596. // same context.
  3597. if ((child.context === context || child.fnContext === context) &&
  3598. data && data.slot != null
  3599. ) {
  3600. var name = data.slot;
  3601. var slot = (slots[name] || (slots[name] = []));
  3602. if (child.tag === 'template') {
  3603. slot.push.apply(slot, child.children || []);
  3604. } else {
  3605. slot.push(child);
  3606. }
  3607. } else {
  3608. (slots.default || (slots.default = [])).push(child);
  3609. }
  3610. }
  3611. // ignore slots that contains only whitespace
  3612. for (var name$1 in slots) {
  3613. if (slots[name$1].every(isWhitespace)) {
  3614. delete slots[name$1];
  3615. }
  3616. }
  3617. return slots
  3618. }
  3619. function isWhitespace (node) {
  3620. return (node.isComment && !node.asyncFactory) || node.text === ' '
  3621. }
  3622. /* */
  3623. function normalizeScopedSlots (
  3624. slots,
  3625. normalSlots,
  3626. prevSlots
  3627. ) {
  3628. var res;
  3629. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  3630. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  3631. var key = slots && slots.$key;
  3632. if (!slots) {
  3633. res = {};
  3634. } else if (slots._normalized) {
  3635. // fast path 1: child component re-render only, parent did not change
  3636. return slots._normalized
  3637. } else if (
  3638. isStable &&
  3639. prevSlots &&
  3640. prevSlots !== emptyObject &&
  3641. key === prevSlots.$key &&
  3642. !hasNormalSlots &&
  3643. !prevSlots.$hasNormal
  3644. ) {
  3645. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  3646. // only need to normalize once
  3647. return prevSlots
  3648. } else {
  3649. res = {};
  3650. for (var key$1 in slots) {
  3651. if (slots[key$1] && key$1[0] !== '$') {
  3652. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  3653. }
  3654. }
  3655. }
  3656. // expose normal slots on scopedSlots
  3657. for (var key$2 in normalSlots) {
  3658. if (!(key$2 in res)) {
  3659. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  3660. }
  3661. }
  3662. // avoriaz seems to mock a non-extensible $scopedSlots object
  3663. // and when that is passed down this would cause an error
  3664. if (slots && Object.isExtensible(slots)) {
  3665. (slots)._normalized = res;
  3666. }
  3667. def(res, '$stable', isStable);
  3668. def(res, '$key', key);
  3669. def(res, '$hasNormal', hasNormalSlots);
  3670. return res
  3671. }
  3672. function normalizeScopedSlot(normalSlots, key, fn) {
  3673. var normalized = function () {
  3674. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  3675. res = res && typeof res === 'object' && !Array.isArray(res)
  3676. ? [res] // single vnode
  3677. : normalizeChildren(res);
  3678. return res && (
  3679. res.length === 0 ||
  3680. (res.length === 1 && res[0].isComment) // #9658
  3681. ) ? undefined
  3682. : res
  3683. };
  3684. // this is a slot using the new v-slot syntax without scope. although it is
  3685. // compiled as a scoped slot, render fn users would expect it to be present
  3686. // on this.$slots because the usage is semantically a normal slot.
  3687. if (fn.proxy) {
  3688. Object.defineProperty(normalSlots, key, {
  3689. get: normalized,
  3690. enumerable: true,
  3691. configurable: true
  3692. });
  3693. }
  3694. return normalized
  3695. }
  3696. function proxyNormalSlot(slots, key) {
  3697. return function () { return slots[key]; }
  3698. }
  3699. /* */
  3700. /**
  3701. * Runtime helper for rendering v-for lists.
  3702. */
  3703. function renderList (
  3704. val,
  3705. render
  3706. ) {
  3707. var ret, i, l, keys, key;
  3708. if (Array.isArray(val) || typeof val === 'string') {
  3709. ret = new Array(val.length);
  3710. for (i = 0, l = val.length; i < l; i++) {
  3711. ret[i] = render(val[i], i);
  3712. }
  3713. } else if (typeof val === 'number') {
  3714. ret = new Array(val);
  3715. for (i = 0; i < val; i++) {
  3716. ret[i] = render(i + 1, i);
  3717. }
  3718. } else if (isObject(val)) {
  3719. if (hasSymbol && val[Symbol.iterator]) {
  3720. ret = [];
  3721. var iterator = val[Symbol.iterator]();
  3722. var result = iterator.next();
  3723. while (!result.done) {
  3724. ret.push(render(result.value, ret.length));
  3725. result = iterator.next();
  3726. }
  3727. } else {
  3728. keys = Object.keys(val);
  3729. ret = new Array(keys.length);
  3730. for (i = 0, l = keys.length; i < l; i++) {
  3731. key = keys[i];
  3732. ret[i] = render(val[key], key, i);
  3733. }
  3734. }
  3735. }
  3736. if (!isDef(ret)) {
  3737. ret = [];
  3738. }
  3739. (ret)._isVList = true;
  3740. return ret
  3741. }
  3742. /* */
  3743. /**
  3744. * Runtime helper for rendering <slot>
  3745. */
  3746. function renderSlot (
  3747. name,
  3748. fallback,
  3749. props,
  3750. bindObject
  3751. ) {
  3752. var scopedSlotFn = this.$scopedSlots[name];
  3753. var nodes;
  3754. if (scopedSlotFn) { // scoped slot
  3755. props = props || {};
  3756. if (bindObject) {
  3757. if ( true && !isObject(bindObject)) {
  3758. warn(
  3759. 'slot v-bind without argument expects an Object',
  3760. this
  3761. );
  3762. }
  3763. props = extend(extend({}, bindObject), props);
  3764. }
  3765. nodes = scopedSlotFn(props) || fallback;
  3766. } else {
  3767. nodes = this.$slots[name] || fallback;
  3768. }
  3769. var target = props && props.slot;
  3770. if (target) {
  3771. return this.$createElement('template', { slot: target }, nodes)
  3772. } else {
  3773. return nodes
  3774. }
  3775. }
  3776. /* */
  3777. /**
  3778. * Runtime helper for resolving filters
  3779. */
  3780. function resolveFilter (id) {
  3781. return resolveAsset(this.$options, 'filters', id, true) || identity
  3782. }
  3783. /* */
  3784. function isKeyNotMatch (expect, actual) {
  3785. if (Array.isArray(expect)) {
  3786. return expect.indexOf(actual) === -1
  3787. } else {
  3788. return expect !== actual
  3789. }
  3790. }
  3791. /**
  3792. * Runtime helper for checking keyCodes from config.
  3793. * exposed as Vue.prototype._k
  3794. * passing in eventKeyName as last argument separately for backwards compat
  3795. */
  3796. function checkKeyCodes (
  3797. eventKeyCode,
  3798. key,
  3799. builtInKeyCode,
  3800. eventKeyName,
  3801. builtInKeyName
  3802. ) {
  3803. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  3804. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  3805. return isKeyNotMatch(builtInKeyName, eventKeyName)
  3806. } else if (mappedKeyCode) {
  3807. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  3808. } else if (eventKeyName) {
  3809. return hyphenate(eventKeyName) !== key
  3810. }
  3811. }
  3812. /* */
  3813. /**
  3814. * Runtime helper for merging v-bind="object" into a VNode's data.
  3815. */
  3816. function bindObjectProps (
  3817. data,
  3818. tag,
  3819. value,
  3820. asProp,
  3821. isSync
  3822. ) {
  3823. if (value) {
  3824. if (!isObject(value)) {
  3825. true && warn(
  3826. 'v-bind without argument expects an Object or Array value',
  3827. this
  3828. );
  3829. } else {
  3830. if (Array.isArray(value)) {
  3831. value = toObject(value);
  3832. }
  3833. var hash;
  3834. var loop = function ( key ) {
  3835. if (
  3836. key === 'class' ||
  3837. key === 'style' ||
  3838. isReservedAttribute(key)
  3839. ) {
  3840. hash = data;
  3841. } else {
  3842. var type = data.attrs && data.attrs.type;
  3843. hash = asProp || config.mustUseProp(tag, type, key)
  3844. ? data.domProps || (data.domProps = {})
  3845. : data.attrs || (data.attrs = {});
  3846. }
  3847. var camelizedKey = camelize(key);
  3848. var hyphenatedKey = hyphenate(key);
  3849. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  3850. hash[key] = value[key];
  3851. if (isSync) {
  3852. var on = data.on || (data.on = {});
  3853. on[("update:" + key)] = function ($event) {
  3854. value[key] = $event;
  3855. };
  3856. }
  3857. }
  3858. };
  3859. for (var key in value) loop( key );
  3860. }
  3861. }
  3862. return data
  3863. }
  3864. /* */
  3865. /**
  3866. * Runtime helper for rendering static trees.
  3867. */
  3868. function renderStatic (
  3869. index,
  3870. isInFor
  3871. ) {
  3872. var cached = this._staticTrees || (this._staticTrees = []);
  3873. var tree = cached[index];
  3874. // if has already-rendered static tree and not inside v-for,
  3875. // we can reuse the same tree.
  3876. if (tree && !isInFor) {
  3877. return tree
  3878. }
  3879. // otherwise, render a fresh tree.
  3880. tree = cached[index] = this.$options.staticRenderFns[index].call(
  3881. this._renderProxy,
  3882. null,
  3883. this // for render fns generated for functional component templates
  3884. );
  3885. markStatic(tree, ("__static__" + index), false);
  3886. return tree
  3887. }
  3888. /**
  3889. * Runtime helper for v-once.
  3890. * Effectively it means marking the node as static with a unique key.
  3891. */
  3892. function markOnce (
  3893. tree,
  3894. index,
  3895. key
  3896. ) {
  3897. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  3898. return tree
  3899. }
  3900. function markStatic (
  3901. tree,
  3902. key,
  3903. isOnce
  3904. ) {
  3905. if (Array.isArray(tree)) {
  3906. for (var i = 0; i < tree.length; i++) {
  3907. if (tree[i] && typeof tree[i] !== 'string') {
  3908. markStaticNode(tree[i], (key + "_" + i), isOnce);
  3909. }
  3910. }
  3911. } else {
  3912. markStaticNode(tree, key, isOnce);
  3913. }
  3914. }
  3915. function markStaticNode (node, key, isOnce) {
  3916. node.isStatic = true;
  3917. node.key = key;
  3918. node.isOnce = isOnce;
  3919. }
  3920. /* */
  3921. function bindObjectListeners (data, value) {
  3922. if (value) {
  3923. if (!isPlainObject(value)) {
  3924. true && warn(
  3925. 'v-on without argument expects an Object value',
  3926. this
  3927. );
  3928. } else {
  3929. var on = data.on = data.on ? extend({}, data.on) : {};
  3930. for (var key in value) {
  3931. var existing = on[key];
  3932. var ours = value[key];
  3933. on[key] = existing ? [].concat(existing, ours) : ours;
  3934. }
  3935. }
  3936. }
  3937. return data
  3938. }
  3939. /* */
  3940. function resolveScopedSlots (
  3941. fns, // see flow/vnode
  3942. res,
  3943. // the following are added in 2.6
  3944. hasDynamicKeys,
  3945. contentHashKey
  3946. ) {
  3947. res = res || { $stable: !hasDynamicKeys };
  3948. for (var i = 0; i < fns.length; i++) {
  3949. var slot = fns[i];
  3950. if (Array.isArray(slot)) {
  3951. resolveScopedSlots(slot, res, hasDynamicKeys);
  3952. } else if (slot) {
  3953. // marker for reverse proxying v-slot without scope on this.$slots
  3954. if (slot.proxy) {
  3955. slot.fn.proxy = true;
  3956. }
  3957. res[slot.key] = slot.fn;
  3958. }
  3959. }
  3960. if (contentHashKey) {
  3961. (res).$key = contentHashKey;
  3962. }
  3963. return res
  3964. }
  3965. /* */
  3966. function bindDynamicKeys (baseObj, values) {
  3967. for (var i = 0; i < values.length; i += 2) {
  3968. var key = values[i];
  3969. if (typeof key === 'string' && key) {
  3970. baseObj[values[i]] = values[i + 1];
  3971. } else if ( true && key !== '' && key !== null) {
  3972. // null is a speical value for explicitly removing a binding
  3973. warn(
  3974. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  3975. this
  3976. );
  3977. }
  3978. }
  3979. return baseObj
  3980. }
  3981. // helper to dynamically append modifier runtime markers to event names.
  3982. // ensure only append when value is already string, otherwise it will be cast
  3983. // to string and cause the type check to miss.
  3984. function prependModifier (value, symbol) {
  3985. return typeof value === 'string' ? symbol + value : value
  3986. }
  3987. /* */
  3988. function installRenderHelpers (target) {
  3989. target._o = markOnce;
  3990. target._n = toNumber;
  3991. target._s = toString;
  3992. target._l = renderList;
  3993. target._t = renderSlot;
  3994. target._q = looseEqual;
  3995. target._i = looseIndexOf;
  3996. target._m = renderStatic;
  3997. target._f = resolveFilter;
  3998. target._k = checkKeyCodes;
  3999. target._b = bindObjectProps;
  4000. target._v = createTextVNode;
  4001. target._e = createEmptyVNode;
  4002. target._u = resolveScopedSlots;
  4003. target._g = bindObjectListeners;
  4004. target._d = bindDynamicKeys;
  4005. target._p = prependModifier;
  4006. }
  4007. /* */
  4008. function FunctionalRenderContext (
  4009. data,
  4010. props,
  4011. children,
  4012. parent,
  4013. Ctor
  4014. ) {
  4015. var this$1 = this;
  4016. var options = Ctor.options;
  4017. // ensure the createElement function in functional components
  4018. // gets a unique context - this is necessary for correct named slot check
  4019. var contextVm;
  4020. if (hasOwn(parent, '_uid')) {
  4021. contextVm = Object.create(parent);
  4022. // $flow-disable-line
  4023. contextVm._original = parent;
  4024. } else {
  4025. // the context vm passed in is a functional context as well.
  4026. // in this case we want to make sure we are able to get a hold to the
  4027. // real context instance.
  4028. contextVm = parent;
  4029. // $flow-disable-line
  4030. parent = parent._original;
  4031. }
  4032. var isCompiled = isTrue(options._compiled);
  4033. var needNormalization = !isCompiled;
  4034. this.data = data;
  4035. this.props = props;
  4036. this.children = children;
  4037. this.parent = parent;
  4038. this.listeners = data.on || emptyObject;
  4039. this.injections = resolveInject(options.inject, parent);
  4040. this.slots = function () {
  4041. if (!this$1.$slots) {
  4042. normalizeScopedSlots(
  4043. data.scopedSlots,
  4044. this$1.$slots = resolveSlots(children, parent)
  4045. );
  4046. }
  4047. return this$1.$slots
  4048. };
  4049. Object.defineProperty(this, 'scopedSlots', ({
  4050. enumerable: true,
  4051. get: function get () {
  4052. return normalizeScopedSlots(data.scopedSlots, this.slots())
  4053. }
  4054. }));
  4055. // support for compiled functional template
  4056. if (isCompiled) {
  4057. // exposing $options for renderStatic()
  4058. this.$options = options;
  4059. // pre-resolve slots for renderSlot()
  4060. this.$slots = this.slots();
  4061. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  4062. }
  4063. if (options._scopeId) {
  4064. this._c = function (a, b, c, d) {
  4065. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  4066. if (vnode && !Array.isArray(vnode)) {
  4067. vnode.fnScopeId = options._scopeId;
  4068. vnode.fnContext = parent;
  4069. }
  4070. return vnode
  4071. };
  4072. } else {
  4073. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  4074. }
  4075. }
  4076. installRenderHelpers(FunctionalRenderContext.prototype);
  4077. function createFunctionalComponent (
  4078. Ctor,
  4079. propsData,
  4080. data,
  4081. contextVm,
  4082. children
  4083. ) {
  4084. var options = Ctor.options;
  4085. var props = {};
  4086. var propOptions = options.props;
  4087. if (isDef(propOptions)) {
  4088. for (var key in propOptions) {
  4089. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  4090. }
  4091. } else {
  4092. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4093. if (isDef(data.props)) { mergeProps(props, data.props); }
  4094. }
  4095. var renderContext = new FunctionalRenderContext(
  4096. data,
  4097. props,
  4098. children,
  4099. contextVm,
  4100. Ctor
  4101. );
  4102. var vnode = options.render.call(null, renderContext._c, renderContext);
  4103. if (vnode instanceof VNode) {
  4104. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  4105. } else if (Array.isArray(vnode)) {
  4106. var vnodes = normalizeChildren(vnode) || [];
  4107. var res = new Array(vnodes.length);
  4108. for (var i = 0; i < vnodes.length; i++) {
  4109. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  4110. }
  4111. return res
  4112. }
  4113. }
  4114. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  4115. // #7817 clone node before setting fnContext, otherwise if the node is reused
  4116. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  4117. // that should not be matched to match.
  4118. var clone = cloneVNode(vnode);
  4119. clone.fnContext = contextVm;
  4120. clone.fnOptions = options;
  4121. if (true) {
  4122. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  4123. }
  4124. if (data.slot) {
  4125. (clone.data || (clone.data = {})).slot = data.slot;
  4126. }
  4127. return clone
  4128. }
  4129. function mergeProps (to, from) {
  4130. for (var key in from) {
  4131. to[camelize(key)] = from[key];
  4132. }
  4133. }
  4134. /* */
  4135. /* */
  4136. /* */
  4137. /* */
  4138. // inline hooks to be invoked on component VNodes during patch
  4139. var componentVNodeHooks = {
  4140. init: function init (vnode, hydrating) {
  4141. if (
  4142. vnode.componentInstance &&
  4143. !vnode.componentInstance._isDestroyed &&
  4144. vnode.data.keepAlive
  4145. ) {
  4146. // kept-alive components, treat as a patch
  4147. var mountedNode = vnode; // work around flow
  4148. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4149. } else {
  4150. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4151. vnode,
  4152. activeInstance
  4153. );
  4154. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4155. }
  4156. },
  4157. prepatch: function prepatch (oldVnode, vnode) {
  4158. var options = vnode.componentOptions;
  4159. var child = vnode.componentInstance = oldVnode.componentInstance;
  4160. updateChildComponent(
  4161. child,
  4162. options.propsData, // updated props
  4163. options.listeners, // updated listeners
  4164. vnode, // new parent vnode
  4165. options.children // new children
  4166. );
  4167. },
  4168. insert: function insert (vnode) {
  4169. var context = vnode.context;
  4170. var componentInstance = vnode.componentInstance;
  4171. if (!componentInstance._isMounted) {
  4172. componentInstance._isMounted = true;
  4173. callHook(componentInstance, 'mounted');
  4174. }
  4175. if (vnode.data.keepAlive) {
  4176. if (context._isMounted) {
  4177. // vue-router#1212
  4178. // During updates, a kept-alive component's child components may
  4179. // change, so directly walking the tree here may call activated hooks
  4180. // on incorrect children. Instead we push them into a queue which will
  4181. // be processed after the whole patch process ended.
  4182. queueActivatedComponent(componentInstance);
  4183. } else {
  4184. activateChildComponent(componentInstance, true /* direct */);
  4185. }
  4186. }
  4187. },
  4188. destroy: function destroy (vnode) {
  4189. var componentInstance = vnode.componentInstance;
  4190. if (!componentInstance._isDestroyed) {
  4191. if (!vnode.data.keepAlive) {
  4192. componentInstance.$destroy();
  4193. } else {
  4194. deactivateChildComponent(componentInstance, true /* direct */);
  4195. }
  4196. }
  4197. }
  4198. };
  4199. var hooksToMerge = Object.keys(componentVNodeHooks);
  4200. function createComponent (
  4201. Ctor,
  4202. data,
  4203. context,
  4204. children,
  4205. tag
  4206. ) {
  4207. if (isUndef(Ctor)) {
  4208. return
  4209. }
  4210. var baseCtor = context.$options._base;
  4211. // plain options object: turn it into a constructor
  4212. if (isObject(Ctor)) {
  4213. Ctor = baseCtor.extend(Ctor);
  4214. }
  4215. // if at this stage it's not a constructor or an async component factory,
  4216. // reject.
  4217. if (typeof Ctor !== 'function') {
  4218. if (true) {
  4219. warn(("Invalid Component definition: " + (String(Ctor))), context);
  4220. }
  4221. return
  4222. }
  4223. // async component
  4224. var asyncFactory;
  4225. if (isUndef(Ctor.cid)) {
  4226. asyncFactory = Ctor;
  4227. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  4228. if (Ctor === undefined) {
  4229. // return a placeholder node for async component, which is rendered
  4230. // as a comment node but preserves all the raw information for the node.
  4231. // the information will be used for async server-rendering and hydration.
  4232. return createAsyncPlaceholder(
  4233. asyncFactory,
  4234. data,
  4235. context,
  4236. children,
  4237. tag
  4238. )
  4239. }
  4240. }
  4241. data = data || {};
  4242. // resolve constructor options in case global mixins are applied after
  4243. // component constructor creation
  4244. resolveConstructorOptions(Ctor);
  4245. // transform component v-model data into props & events
  4246. if (isDef(data.model)) {
  4247. transformModel(Ctor.options, data);
  4248. }
  4249. // extract props
  4250. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  4251. // functional component
  4252. if (isTrue(Ctor.options.functional)) {
  4253. return createFunctionalComponent(Ctor, propsData, data, context, children)
  4254. }
  4255. // extract listeners, since these needs to be treated as
  4256. // child component listeners instead of DOM listeners
  4257. var listeners = data.on;
  4258. // replace with listeners with .native modifier
  4259. // so it gets processed during parent component patch.
  4260. data.on = data.nativeOn;
  4261. if (isTrue(Ctor.options.abstract)) {
  4262. // abstract components do not keep anything
  4263. // other than props & listeners & slot
  4264. // work around flow
  4265. var slot = data.slot;
  4266. data = {};
  4267. if (slot) {
  4268. data.slot = slot;
  4269. }
  4270. }
  4271. // install component management hooks onto the placeholder node
  4272. installComponentHooks(data);
  4273. // return a placeholder vnode
  4274. var name = Ctor.options.name || tag;
  4275. var vnode = new VNode(
  4276. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  4277. data, undefined, undefined, undefined, context,
  4278. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  4279. asyncFactory
  4280. );
  4281. return vnode
  4282. }
  4283. function createComponentInstanceForVnode (
  4284. vnode, // we know it's MountedComponentVNode but flow doesn't
  4285. parent // activeInstance in lifecycle state
  4286. ) {
  4287. var options = {
  4288. _isComponent: true,
  4289. _parentVnode: vnode,
  4290. parent: parent
  4291. };
  4292. // check inline-template render functions
  4293. var inlineTemplate = vnode.data.inlineTemplate;
  4294. if (isDef(inlineTemplate)) {
  4295. options.render = inlineTemplate.render;
  4296. options.staticRenderFns = inlineTemplate.staticRenderFns;
  4297. }
  4298. return new vnode.componentOptions.Ctor(options)
  4299. }
  4300. function installComponentHooks (data) {
  4301. var hooks = data.hook || (data.hook = {});
  4302. for (var i = 0; i < hooksToMerge.length; i++) {
  4303. var key = hooksToMerge[i];
  4304. var existing = hooks[key];
  4305. var toMerge = componentVNodeHooks[key];
  4306. if (existing !== toMerge && !(existing && existing._merged)) {
  4307. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  4308. }
  4309. }
  4310. }
  4311. function mergeHook$1 (f1, f2) {
  4312. var merged = function (a, b) {
  4313. // flow complains about extra args which is why we use any
  4314. f1(a, b);
  4315. f2(a, b);
  4316. };
  4317. merged._merged = true;
  4318. return merged
  4319. }
  4320. // transform component v-model info (value and callback) into
  4321. // prop and event handler respectively.
  4322. function transformModel (options, data) {
  4323. var prop = (options.model && options.model.prop) || 'value';
  4324. var event = (options.model && options.model.event) || 'input'
  4325. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  4326. var on = data.on || (data.on = {});
  4327. var existing = on[event];
  4328. var callback = data.model.callback;
  4329. if (isDef(existing)) {
  4330. if (
  4331. Array.isArray(existing)
  4332. ? existing.indexOf(callback) === -1
  4333. : existing !== callback
  4334. ) {
  4335. on[event] = [callback].concat(existing);
  4336. }
  4337. } else {
  4338. on[event] = callback;
  4339. }
  4340. }
  4341. /* */
  4342. var SIMPLE_NORMALIZE = 1;
  4343. var ALWAYS_NORMALIZE = 2;
  4344. // wrapper function for providing a more flexible interface
  4345. // without getting yelled at by flow
  4346. function createElement (
  4347. context,
  4348. tag,
  4349. data,
  4350. children,
  4351. normalizationType,
  4352. alwaysNormalize
  4353. ) {
  4354. if (Array.isArray(data) || isPrimitive(data)) {
  4355. normalizationType = children;
  4356. children = data;
  4357. data = undefined;
  4358. }
  4359. if (isTrue(alwaysNormalize)) {
  4360. normalizationType = ALWAYS_NORMALIZE;
  4361. }
  4362. return _createElement(context, tag, data, children, normalizationType)
  4363. }
  4364. function _createElement (
  4365. context,
  4366. tag,
  4367. data,
  4368. children,
  4369. normalizationType
  4370. ) {
  4371. if (isDef(data) && isDef((data).__ob__)) {
  4372. true && warn(
  4373. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  4374. 'Always create fresh vnode data objects in each render!',
  4375. context
  4376. );
  4377. return createEmptyVNode()
  4378. }
  4379. // object syntax in v-bind
  4380. if (isDef(data) && isDef(data.is)) {
  4381. tag = data.is;
  4382. }
  4383. if (!tag) {
  4384. // in case of component :is set to falsy value
  4385. return createEmptyVNode()
  4386. }
  4387. // warn against non-primitive key
  4388. if ( true &&
  4389. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  4390. ) {
  4391. {
  4392. warn(
  4393. 'Avoid using non-primitive value as key, ' +
  4394. 'use string/number value instead.',
  4395. context
  4396. );
  4397. }
  4398. }
  4399. // support single function children as default scoped slot
  4400. if (Array.isArray(children) &&
  4401. typeof children[0] === 'function'
  4402. ) {
  4403. data = data || {};
  4404. data.scopedSlots = { default: children[0] };
  4405. children.length = 0;
  4406. }
  4407. if (normalizationType === ALWAYS_NORMALIZE) {
  4408. children = normalizeChildren(children);
  4409. } else if (normalizationType === SIMPLE_NORMALIZE) {
  4410. children = simpleNormalizeChildren(children);
  4411. }
  4412. var vnode, ns;
  4413. if (typeof tag === 'string') {
  4414. var Ctor;
  4415. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  4416. if (config.isReservedTag(tag)) {
  4417. // platform built-in elements
  4418. vnode = new VNode(
  4419. config.parsePlatformTagName(tag), data, children,
  4420. undefined, undefined, context
  4421. );
  4422. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  4423. // component
  4424. vnode = createComponent(Ctor, data, context, children, tag);
  4425. } else {
  4426. // unknown or unlisted namespaced elements
  4427. // check at runtime because it may get assigned a namespace when its
  4428. // parent normalizes children
  4429. vnode = new VNode(
  4430. tag, data, children,
  4431. undefined, undefined, context
  4432. );
  4433. }
  4434. } else {
  4435. // direct component options / constructor
  4436. vnode = createComponent(tag, data, context, children);
  4437. }
  4438. if (Array.isArray(vnode)) {
  4439. return vnode
  4440. } else if (isDef(vnode)) {
  4441. if (isDef(ns)) { applyNS(vnode, ns); }
  4442. if (isDef(data)) { registerDeepBindings(data); }
  4443. return vnode
  4444. } else {
  4445. return createEmptyVNode()
  4446. }
  4447. }
  4448. function applyNS (vnode, ns, force) {
  4449. vnode.ns = ns;
  4450. if (vnode.tag === 'foreignObject') {
  4451. // use default namespace inside foreignObject
  4452. ns = undefined;
  4453. force = true;
  4454. }
  4455. if (isDef(vnode.children)) {
  4456. for (var i = 0, l = vnode.children.length; i < l; i++) {
  4457. var child = vnode.children[i];
  4458. if (isDef(child.tag) && (
  4459. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  4460. applyNS(child, ns, force);
  4461. }
  4462. }
  4463. }
  4464. }
  4465. // ref #5318
  4466. // necessary to ensure parent re-render when deep bindings like :style and
  4467. // :class are used on slot nodes
  4468. function registerDeepBindings (data) {
  4469. if (isObject(data.style)) {
  4470. traverse(data.style);
  4471. }
  4472. if (isObject(data.class)) {
  4473. traverse(data.class);
  4474. }
  4475. }
  4476. /* */
  4477. function initRender (vm) {
  4478. vm._vnode = null; // the root of the child tree
  4479. vm._staticTrees = null; // v-once cached trees
  4480. var options = vm.$options;
  4481. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  4482. var renderContext = parentVnode && parentVnode.context;
  4483. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  4484. vm.$scopedSlots = emptyObject;
  4485. // bind the createElement fn to this instance
  4486. // so that we get proper render context inside it.
  4487. // args order: tag, data, children, normalizationType, alwaysNormalize
  4488. // internal version is used by render functions compiled from templates
  4489. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  4490. // normalization is always applied for the public version, used in
  4491. // user-written render functions.
  4492. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  4493. // $attrs & $listeners are exposed for easier HOC creation.
  4494. // they need to be reactive so that HOCs using them are always updated
  4495. var parentData = parentVnode && parentVnode.data;
  4496. /* istanbul ignore else */
  4497. if (true) {
  4498. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  4499. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  4500. }, true);
  4501. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  4502. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  4503. }, true);
  4504. } else {}
  4505. }
  4506. var currentRenderingInstance = null;
  4507. function renderMixin (Vue) {
  4508. // install runtime convenience helpers
  4509. installRenderHelpers(Vue.prototype);
  4510. Vue.prototype.$nextTick = function (fn) {
  4511. return nextTick(fn, this)
  4512. };
  4513. Vue.prototype._render = function () {
  4514. var vm = this;
  4515. var ref = vm.$options;
  4516. var render = ref.render;
  4517. var _parentVnode = ref._parentVnode;
  4518. if (_parentVnode) {
  4519. vm.$scopedSlots = normalizeScopedSlots(
  4520. _parentVnode.data.scopedSlots,
  4521. vm.$slots,
  4522. vm.$scopedSlots
  4523. );
  4524. }
  4525. // set parent vnode. this allows render functions to have access
  4526. // to the data on the placeholder node.
  4527. vm.$vnode = _parentVnode;
  4528. // render self
  4529. var vnode;
  4530. try {
  4531. // There's no need to maintain a stack becaues all render fns are called
  4532. // separately from one another. Nested component's render fns are called
  4533. // when parent component is patched.
  4534. currentRenderingInstance = vm;
  4535. vnode = render.call(vm._renderProxy, vm.$createElement);
  4536. } catch (e) {
  4537. handleError(e, vm, "render");
  4538. // return error render result,
  4539. // or previous vnode to prevent render error causing blank component
  4540. /* istanbul ignore else */
  4541. if ( true && vm.$options.renderError) {
  4542. try {
  4543. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  4544. } catch (e) {
  4545. handleError(e, vm, "renderError");
  4546. vnode = vm._vnode;
  4547. }
  4548. } else {
  4549. vnode = vm._vnode;
  4550. }
  4551. } finally {
  4552. currentRenderingInstance = null;
  4553. }
  4554. // if the returned array contains only a single node, allow it
  4555. if (Array.isArray(vnode) && vnode.length === 1) {
  4556. vnode = vnode[0];
  4557. }
  4558. // return empty vnode in case the render function errored out
  4559. if (!(vnode instanceof VNode)) {
  4560. if ( true && Array.isArray(vnode)) {
  4561. warn(
  4562. 'Multiple root nodes returned from render function. Render function ' +
  4563. 'should return a single root node.',
  4564. vm
  4565. );
  4566. }
  4567. vnode = createEmptyVNode();
  4568. }
  4569. // set parent
  4570. vnode.parent = _parentVnode;
  4571. return vnode
  4572. };
  4573. }
  4574. /* */
  4575. function ensureCtor (comp, base) {
  4576. if (
  4577. comp.__esModule ||
  4578. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  4579. ) {
  4580. comp = comp.default;
  4581. }
  4582. return isObject(comp)
  4583. ? base.extend(comp)
  4584. : comp
  4585. }
  4586. function createAsyncPlaceholder (
  4587. factory,
  4588. data,
  4589. context,
  4590. children,
  4591. tag
  4592. ) {
  4593. var node = createEmptyVNode();
  4594. node.asyncFactory = factory;
  4595. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  4596. return node
  4597. }
  4598. function resolveAsyncComponent (
  4599. factory,
  4600. baseCtor
  4601. ) {
  4602. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  4603. return factory.errorComp
  4604. }
  4605. if (isDef(factory.resolved)) {
  4606. return factory.resolved
  4607. }
  4608. var owner = currentRenderingInstance;
  4609. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  4610. // already pending
  4611. factory.owners.push(owner);
  4612. }
  4613. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  4614. return factory.loadingComp
  4615. }
  4616. if (owner && !isDef(factory.owners)) {
  4617. var owners = factory.owners = [owner];
  4618. var sync = true;
  4619. var timerLoading = null;
  4620. var timerTimeout = null
  4621. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  4622. var forceRender = function (renderCompleted) {
  4623. for (var i = 0, l = owners.length; i < l; i++) {
  4624. (owners[i]).$forceUpdate();
  4625. }
  4626. if (renderCompleted) {
  4627. owners.length = 0;
  4628. if (timerLoading !== null) {
  4629. clearTimeout(timerLoading);
  4630. timerLoading = null;
  4631. }
  4632. if (timerTimeout !== null) {
  4633. clearTimeout(timerTimeout);
  4634. timerTimeout = null;
  4635. }
  4636. }
  4637. };
  4638. var resolve = once(function (res) {
  4639. // cache resolved
  4640. factory.resolved = ensureCtor(res, baseCtor);
  4641. // invoke callbacks only if this is not a synchronous resolve
  4642. // (async resolves are shimmed as synchronous during SSR)
  4643. if (!sync) {
  4644. forceRender(true);
  4645. } else {
  4646. owners.length = 0;
  4647. }
  4648. });
  4649. var reject = once(function (reason) {
  4650. true && warn(
  4651. "Failed to resolve async component: " + (String(factory)) +
  4652. (reason ? ("\nReason: " + reason) : '')
  4653. );
  4654. if (isDef(factory.errorComp)) {
  4655. factory.error = true;
  4656. forceRender(true);
  4657. }
  4658. });
  4659. var res = factory(resolve, reject);
  4660. if (isObject(res)) {
  4661. if (isPromise(res)) {
  4662. // () => Promise
  4663. if (isUndef(factory.resolved)) {
  4664. res.then(resolve, reject);
  4665. }
  4666. } else if (isPromise(res.component)) {
  4667. res.component.then(resolve, reject);
  4668. if (isDef(res.error)) {
  4669. factory.errorComp = ensureCtor(res.error, baseCtor);
  4670. }
  4671. if (isDef(res.loading)) {
  4672. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  4673. if (res.delay === 0) {
  4674. factory.loading = true;
  4675. } else {
  4676. timerLoading = setTimeout(function () {
  4677. timerLoading = null;
  4678. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  4679. factory.loading = true;
  4680. forceRender(false);
  4681. }
  4682. }, res.delay || 200);
  4683. }
  4684. }
  4685. if (isDef(res.timeout)) {
  4686. timerTimeout = setTimeout(function () {
  4687. timerTimeout = null;
  4688. if (isUndef(factory.resolved)) {
  4689. reject(
  4690. true
  4691. ? ("timeout (" + (res.timeout) + "ms)")
  4692. : undefined
  4693. );
  4694. }
  4695. }, res.timeout);
  4696. }
  4697. }
  4698. }
  4699. sync = false;
  4700. // return in case resolved synchronously
  4701. return factory.loading
  4702. ? factory.loadingComp
  4703. : factory.resolved
  4704. }
  4705. }
  4706. /* */
  4707. function isAsyncPlaceholder (node) {
  4708. return node.isComment && node.asyncFactory
  4709. }
  4710. /* */
  4711. function getFirstComponentChild (children) {
  4712. if (Array.isArray(children)) {
  4713. for (var i = 0; i < children.length; i++) {
  4714. var c = children[i];
  4715. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  4716. return c
  4717. }
  4718. }
  4719. }
  4720. }
  4721. /* */
  4722. /* */
  4723. function initEvents (vm) {
  4724. vm._events = Object.create(null);
  4725. vm._hasHookEvent = false;
  4726. // init parent attached events
  4727. var listeners = vm.$options._parentListeners;
  4728. if (listeners) {
  4729. updateComponentListeners(vm, listeners);
  4730. }
  4731. }
  4732. var target;
  4733. function add (event, fn) {
  4734. target.$on(event, fn);
  4735. }
  4736. function remove$1 (event, fn) {
  4737. target.$off(event, fn);
  4738. }
  4739. function createOnceHandler (event, fn) {
  4740. var _target = target;
  4741. return function onceHandler () {
  4742. var res = fn.apply(null, arguments);
  4743. if (res !== null) {
  4744. _target.$off(event, onceHandler);
  4745. }
  4746. }
  4747. }
  4748. function updateComponentListeners (
  4749. vm,
  4750. listeners,
  4751. oldListeners
  4752. ) {
  4753. target = vm;
  4754. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  4755. target = undefined;
  4756. }
  4757. function eventsMixin (Vue) {
  4758. var hookRE = /^hook:/;
  4759. Vue.prototype.$on = function (event, fn) {
  4760. var vm = this;
  4761. if (Array.isArray(event)) {
  4762. for (var i = 0, l = event.length; i < l; i++) {
  4763. vm.$on(event[i], fn);
  4764. }
  4765. } else {
  4766. (vm._events[event] || (vm._events[event] = [])).push(fn);
  4767. // optimize hook:event cost by using a boolean flag marked at registration
  4768. // instead of a hash lookup
  4769. if (hookRE.test(event)) {
  4770. vm._hasHookEvent = true;
  4771. }
  4772. }
  4773. return vm
  4774. };
  4775. Vue.prototype.$once = function (event, fn) {
  4776. var vm = this;
  4777. function on () {
  4778. vm.$off(event, on);
  4779. fn.apply(vm, arguments);
  4780. }
  4781. on.fn = fn;
  4782. vm.$on(event, on);
  4783. return vm
  4784. };
  4785. Vue.prototype.$off = function (event, fn) {
  4786. var vm = this;
  4787. // all
  4788. if (!arguments.length) {
  4789. vm._events = Object.create(null);
  4790. return vm
  4791. }
  4792. // array of events
  4793. if (Array.isArray(event)) {
  4794. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  4795. vm.$off(event[i$1], fn);
  4796. }
  4797. return vm
  4798. }
  4799. // specific event
  4800. var cbs = vm._events[event];
  4801. if (!cbs) {
  4802. return vm
  4803. }
  4804. if (!fn) {
  4805. vm._events[event] = null;
  4806. return vm
  4807. }
  4808. // specific handler
  4809. var cb;
  4810. var i = cbs.length;
  4811. while (i--) {
  4812. cb = cbs[i];
  4813. if (cb === fn || cb.fn === fn) {
  4814. cbs.splice(i, 1);
  4815. break
  4816. }
  4817. }
  4818. return vm
  4819. };
  4820. Vue.prototype.$emit = function (event) {
  4821. var vm = this;
  4822. if (true) {
  4823. var lowerCaseEvent = event.toLowerCase();
  4824. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  4825. tip(
  4826. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  4827. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  4828. "Note that HTML attributes are case-insensitive and you cannot use " +
  4829. "v-on to listen to camelCase events when using in-DOM templates. " +
  4830. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  4831. );
  4832. }
  4833. }
  4834. var cbs = vm._events[event];
  4835. if (cbs) {
  4836. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  4837. var args = toArray(arguments, 1);
  4838. var info = "event handler for \"" + event + "\"";
  4839. for (var i = 0, l = cbs.length; i < l; i++) {
  4840. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  4841. }
  4842. }
  4843. return vm
  4844. };
  4845. }
  4846. /* */
  4847. var activeInstance = null;
  4848. var isUpdatingChildComponent = false;
  4849. function setActiveInstance(vm) {
  4850. var prevActiveInstance = activeInstance;
  4851. activeInstance = vm;
  4852. return function () {
  4853. activeInstance = prevActiveInstance;
  4854. }
  4855. }
  4856. function initLifecycle (vm) {
  4857. var options = vm.$options;
  4858. // locate first non-abstract parent
  4859. var parent = options.parent;
  4860. if (parent && !options.abstract) {
  4861. while (parent.$options.abstract && parent.$parent) {
  4862. parent = parent.$parent;
  4863. }
  4864. parent.$children.push(vm);
  4865. }
  4866. vm.$parent = parent;
  4867. vm.$root = parent ? parent.$root : vm;
  4868. vm.$children = [];
  4869. vm.$refs = {};
  4870. vm._watcher = null;
  4871. vm._inactive = null;
  4872. vm._directInactive = false;
  4873. vm._isMounted = false;
  4874. vm._isDestroyed = false;
  4875. vm._isBeingDestroyed = false;
  4876. }
  4877. function lifecycleMixin (Vue) {
  4878. Vue.prototype._update = function (vnode, hydrating) {
  4879. var vm = this;
  4880. var prevEl = vm.$el;
  4881. var prevVnode = vm._vnode;
  4882. var restoreActiveInstance = setActiveInstance(vm);
  4883. vm._vnode = vnode;
  4884. // Vue.prototype.__patch__ is injected in entry points
  4885. // based on the rendering backend used.
  4886. if (!prevVnode) {
  4887. // initial render
  4888. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  4889. } else {
  4890. // updates
  4891. vm.$el = vm.__patch__(prevVnode, vnode);
  4892. }
  4893. restoreActiveInstance();
  4894. // update __vue__ reference
  4895. if (prevEl) {
  4896. prevEl.__vue__ = null;
  4897. }
  4898. if (vm.$el) {
  4899. vm.$el.__vue__ = vm;
  4900. }
  4901. // if parent is an HOC, update its $el as well
  4902. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  4903. vm.$parent.$el = vm.$el;
  4904. }
  4905. // updated hook is called by the scheduler to ensure that children are
  4906. // updated in a parent's updated hook.
  4907. };
  4908. Vue.prototype.$forceUpdate = function () {
  4909. var vm = this;
  4910. if (vm._watcher) {
  4911. vm._watcher.update();
  4912. }
  4913. };
  4914. Vue.prototype.$destroy = function () {
  4915. var vm = this;
  4916. if (vm._isBeingDestroyed) {
  4917. return
  4918. }
  4919. callHook(vm, 'beforeDestroy');
  4920. vm._isBeingDestroyed = true;
  4921. // remove self from parent
  4922. var parent = vm.$parent;
  4923. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  4924. remove(parent.$children, vm);
  4925. }
  4926. // teardown watchers
  4927. if (vm._watcher) {
  4928. vm._watcher.teardown();
  4929. }
  4930. var i = vm._watchers.length;
  4931. while (i--) {
  4932. vm._watchers[i].teardown();
  4933. }
  4934. // remove reference from data ob
  4935. // frozen object may not have observer.
  4936. if (vm._data.__ob__) {
  4937. vm._data.__ob__.vmCount--;
  4938. }
  4939. // call the last hook...
  4940. vm._isDestroyed = true;
  4941. // invoke destroy hooks on current rendered tree
  4942. vm.__patch__(vm._vnode, null);
  4943. // fire destroyed hook
  4944. callHook(vm, 'destroyed');
  4945. // turn off all instance listeners.
  4946. vm.$off();
  4947. // remove __vue__ reference
  4948. if (vm.$el) {
  4949. vm.$el.__vue__ = null;
  4950. }
  4951. // release circular reference (#6759)
  4952. if (vm.$vnode) {
  4953. vm.$vnode.parent = null;
  4954. }
  4955. };
  4956. }
  4957. function updateChildComponent (
  4958. vm,
  4959. propsData,
  4960. listeners,
  4961. parentVnode,
  4962. renderChildren
  4963. ) {
  4964. if (true) {
  4965. isUpdatingChildComponent = true;
  4966. }
  4967. // determine whether component has slot children
  4968. // we need to do this before overwriting $options._renderChildren.
  4969. // check if there are dynamic scopedSlots (hand-written or compiled but with
  4970. // dynamic slot names). Static scoped slots compiled from template has the
  4971. // "$stable" marker.
  4972. var newScopedSlots = parentVnode.data.scopedSlots;
  4973. var oldScopedSlots = vm.$scopedSlots;
  4974. var hasDynamicScopedSlot = !!(
  4975. (newScopedSlots && !newScopedSlots.$stable) ||
  4976. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  4977. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  4978. );
  4979. // Any static slot children from the parent may have changed during parent's
  4980. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  4981. // update is necessary to ensure correctness.
  4982. var needsForceUpdate = !!(
  4983. renderChildren || // has new static slots
  4984. vm.$options._renderChildren || // has old static slots
  4985. hasDynamicScopedSlot
  4986. );
  4987. vm.$options._parentVnode = parentVnode;
  4988. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  4989. if (vm._vnode) { // update child tree's parent
  4990. vm._vnode.parent = parentVnode;
  4991. }
  4992. vm.$options._renderChildren = renderChildren;
  4993. // update $attrs and $listeners hash
  4994. // these are also reactive so they may trigger child update if the child
  4995. // used them during render
  4996. vm.$attrs = parentVnode.data.attrs || emptyObject;
  4997. vm.$listeners = listeners || emptyObject;
  4998. // update props
  4999. if (propsData && vm.$options.props) {
  5000. toggleObserving(false);
  5001. var props = vm._props;
  5002. var propKeys = vm.$options._propKeys || [];
  5003. for (var i = 0; i < propKeys.length; i++) {
  5004. var key = propKeys[i];
  5005. var propOptions = vm.$options.props; // wtf flow?
  5006. props[key] = validateProp(key, propOptions, propsData, vm);
  5007. }
  5008. toggleObserving(true);
  5009. // keep a copy of raw propsData
  5010. vm.$options.propsData = propsData;
  5011. }
  5012. // update listeners
  5013. listeners = listeners || emptyObject;
  5014. var oldListeners = vm.$options._parentListeners;
  5015. vm.$options._parentListeners = listeners;
  5016. updateComponentListeners(vm, listeners, oldListeners);
  5017. // resolve slots + force update if has children
  5018. if (needsForceUpdate) {
  5019. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  5020. vm.$forceUpdate();
  5021. }
  5022. if (true) {
  5023. isUpdatingChildComponent = false;
  5024. }
  5025. }
  5026. function isInInactiveTree (vm) {
  5027. while (vm && (vm = vm.$parent)) {
  5028. if (vm._inactive) { return true }
  5029. }
  5030. return false
  5031. }
  5032. function activateChildComponent (vm, direct) {
  5033. if (direct) {
  5034. vm._directInactive = false;
  5035. if (isInInactiveTree(vm)) {
  5036. return
  5037. }
  5038. } else if (vm._directInactive) {
  5039. return
  5040. }
  5041. if (vm._inactive || vm._inactive === null) {
  5042. vm._inactive = false;
  5043. for (var i = 0; i < vm.$children.length; i++) {
  5044. activateChildComponent(vm.$children[i]);
  5045. }
  5046. callHook(vm, 'activated');
  5047. }
  5048. }
  5049. function deactivateChildComponent (vm, direct) {
  5050. if (direct) {
  5051. vm._directInactive = true;
  5052. if (isInInactiveTree(vm)) {
  5053. return
  5054. }
  5055. }
  5056. if (!vm._inactive) {
  5057. vm._inactive = true;
  5058. for (var i = 0; i < vm.$children.length; i++) {
  5059. deactivateChildComponent(vm.$children[i]);
  5060. }
  5061. callHook(vm, 'deactivated');
  5062. }
  5063. }
  5064. function callHook (vm, hook) {
  5065. // #7573 disable dep collection when invoking lifecycle hooks
  5066. pushTarget();
  5067. var handlers = vm.$options[hook];
  5068. var info = hook + " hook";
  5069. if (handlers) {
  5070. for (var i = 0, j = handlers.length; i < j; i++) {
  5071. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  5072. }
  5073. }
  5074. if (vm._hasHookEvent) {
  5075. vm.$emit('hook:' + hook);
  5076. }
  5077. popTarget();
  5078. }
  5079. /* */
  5080. var MAX_UPDATE_COUNT = 100;
  5081. var queue = [];
  5082. var activatedChildren = [];
  5083. var has = {};
  5084. var circular = {};
  5085. var waiting = false;
  5086. var flushing = false;
  5087. var index = 0;
  5088. /**
  5089. * Reset the scheduler's state.
  5090. */
  5091. function resetSchedulerState () {
  5092. index = queue.length = activatedChildren.length = 0;
  5093. has = {};
  5094. if (true) {
  5095. circular = {};
  5096. }
  5097. waiting = flushing = false;
  5098. }
  5099. // Async edge case #6566 requires saving the timestamp when event listeners are
  5100. // attached. However, calling performance.now() has a perf overhead especially
  5101. // if the page has thousands of event listeners. Instead, we take a timestamp
  5102. // every time the scheduler flushes and use that for all event listeners
  5103. // attached during that flush.
  5104. var currentFlushTimestamp = 0;
  5105. // Async edge case fix requires storing an event listener's attach timestamp.
  5106. var getNow = Date.now;
  5107. // Determine what event timestamp the browser is using. Annoyingly, the
  5108. // timestamp can either be hi-res (relative to page load) or low-res
  5109. // (relative to UNIX epoch), so in order to compare time we have to use the
  5110. // same timestamp type when saving the flush timestamp.
  5111. // All IE versions use low-res event timestamps, and have problematic clock
  5112. // implementations (#9632)
  5113. if (inBrowser && !isIE) {
  5114. var performance = window.performance;
  5115. if (
  5116. performance &&
  5117. typeof performance.now === 'function' &&
  5118. getNow() > document.createEvent('Event').timeStamp
  5119. ) {
  5120. // if the event timestamp, although evaluated AFTER the Date.now(), is
  5121. // smaller than it, it means the event is using a hi-res timestamp,
  5122. // and we need to use the hi-res version for event listener timestamps as
  5123. // well.
  5124. getNow = function () { return performance.now(); };
  5125. }
  5126. }
  5127. /**
  5128. * Flush both queues and run the watchers.
  5129. */
  5130. function flushSchedulerQueue () {
  5131. currentFlushTimestamp = getNow();
  5132. flushing = true;
  5133. var watcher, id;
  5134. // Sort queue before flush.
  5135. // This ensures that:
  5136. // 1. Components are updated from parent to child. (because parent is always
  5137. // created before the child)
  5138. // 2. A component's user watchers are run before its render watcher (because
  5139. // user watchers are created before the render watcher)
  5140. // 3. If a component is destroyed during a parent component's watcher run,
  5141. // its watchers can be skipped.
  5142. queue.sort(function (a, b) { return a.id - b.id; });
  5143. // do not cache length because more watchers might be pushed
  5144. // as we run existing watchers
  5145. for (index = 0; index < queue.length; index++) {
  5146. watcher = queue[index];
  5147. if (watcher.before) {
  5148. watcher.before();
  5149. }
  5150. id = watcher.id;
  5151. has[id] = null;
  5152. watcher.run();
  5153. // in dev build, check and stop circular updates.
  5154. if ( true && has[id] != null) {
  5155. circular[id] = (circular[id] || 0) + 1;
  5156. if (circular[id] > MAX_UPDATE_COUNT) {
  5157. warn(
  5158. 'You may have an infinite update loop ' + (
  5159. watcher.user
  5160. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  5161. : "in a component render function."
  5162. ),
  5163. watcher.vm
  5164. );
  5165. break
  5166. }
  5167. }
  5168. }
  5169. // keep copies of post queues before resetting state
  5170. var activatedQueue = activatedChildren.slice();
  5171. var updatedQueue = queue.slice();
  5172. resetSchedulerState();
  5173. // call component updated and activated hooks
  5174. callActivatedHooks(activatedQueue);
  5175. callUpdatedHooks(updatedQueue);
  5176. // devtool hook
  5177. /* istanbul ignore if */
  5178. if (devtools && config.devtools) {
  5179. devtools.emit('flush');
  5180. }
  5181. }
  5182. function callUpdatedHooks (queue) {
  5183. var i = queue.length;
  5184. while (i--) {
  5185. var watcher = queue[i];
  5186. var vm = watcher.vm;
  5187. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  5188. callHook(vm, 'updated');
  5189. }
  5190. }
  5191. }
  5192. /**
  5193. * Queue a kept-alive component that was activated during patch.
  5194. * The queue will be processed after the entire tree has been patched.
  5195. */
  5196. function queueActivatedComponent (vm) {
  5197. // setting _inactive to false here so that a render function can
  5198. // rely on checking whether it's in an inactive tree (e.g. router-view)
  5199. vm._inactive = false;
  5200. activatedChildren.push(vm);
  5201. }
  5202. function callActivatedHooks (queue) {
  5203. for (var i = 0; i < queue.length; i++) {
  5204. queue[i]._inactive = true;
  5205. activateChildComponent(queue[i], true /* true */);
  5206. }
  5207. }
  5208. /**
  5209. * Push a watcher into the watcher queue.
  5210. * Jobs with duplicate IDs will be skipped unless it's
  5211. * pushed when the queue is being flushed.
  5212. */
  5213. function queueWatcher (watcher) {
  5214. var id = watcher.id;
  5215. if (has[id] == null) {
  5216. has[id] = true;
  5217. if (!flushing) {
  5218. queue.push(watcher);
  5219. } else {
  5220. // if already flushing, splice the watcher based on its id
  5221. // if already past its id, it will be run next immediately.
  5222. var i = queue.length - 1;
  5223. while (i > index && queue[i].id > watcher.id) {
  5224. i--;
  5225. }
  5226. queue.splice(i + 1, 0, watcher);
  5227. }
  5228. // queue the flush
  5229. if (!waiting) {
  5230. waiting = true;
  5231. if ( true && !config.async) {
  5232. flushSchedulerQueue();
  5233. return
  5234. }
  5235. nextTick(flushSchedulerQueue);
  5236. }
  5237. }
  5238. }
  5239. /* */
  5240. var uid$2 = 0;
  5241. /**
  5242. * A watcher parses an expression, collects dependencies,
  5243. * and fires callback when the expression value changes.
  5244. * This is used for both the $watch() api and directives.
  5245. */
  5246. var Watcher = function Watcher (
  5247. vm,
  5248. expOrFn,
  5249. cb,
  5250. options,
  5251. isRenderWatcher
  5252. ) {
  5253. this.vm = vm;
  5254. if (isRenderWatcher) {
  5255. vm._watcher = this;
  5256. }
  5257. vm._watchers.push(this);
  5258. // options
  5259. if (options) {
  5260. this.deep = !!options.deep;
  5261. this.user = !!options.user;
  5262. this.lazy = !!options.lazy;
  5263. this.sync = !!options.sync;
  5264. this.before = options.before;
  5265. } else {
  5266. this.deep = this.user = this.lazy = this.sync = false;
  5267. }
  5268. this.cb = cb;
  5269. this.id = ++uid$2; // uid for batching
  5270. this.active = true;
  5271. this.dirty = this.lazy; // for lazy watchers
  5272. this.deps = [];
  5273. this.newDeps = [];
  5274. this.depIds = new _Set();
  5275. this.newDepIds = new _Set();
  5276. this.expression = true
  5277. ? expOrFn.toString()
  5278. : undefined;
  5279. // parse expression for getter
  5280. if (typeof expOrFn === 'function') {
  5281. this.getter = expOrFn;
  5282. } else {
  5283. this.getter = parsePath(expOrFn);
  5284. if (!this.getter) {
  5285. this.getter = noop;
  5286. true && warn(
  5287. "Failed watching path: \"" + expOrFn + "\" " +
  5288. 'Watcher only accepts simple dot-delimited paths. ' +
  5289. 'For full control, use a function instead.',
  5290. vm
  5291. );
  5292. }
  5293. }
  5294. this.value = this.lazy
  5295. ? undefined
  5296. : this.get();
  5297. };
  5298. /**
  5299. * Evaluate the getter, and re-collect dependencies.
  5300. */
  5301. Watcher.prototype.get = function get () {
  5302. pushTarget(this);
  5303. var value;
  5304. var vm = this.vm;
  5305. try {
  5306. value = this.getter.call(vm, vm);
  5307. } catch (e) {
  5308. if (this.user) {
  5309. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  5310. } else {
  5311. throw e
  5312. }
  5313. } finally {
  5314. // "touch" every property so they are all tracked as
  5315. // dependencies for deep watching
  5316. if (this.deep) {
  5317. traverse(value);
  5318. }
  5319. popTarget();
  5320. this.cleanupDeps();
  5321. }
  5322. return value
  5323. };
  5324. /**
  5325. * Add a dependency to this directive.
  5326. */
  5327. Watcher.prototype.addDep = function addDep (dep) {
  5328. var id = dep.id;
  5329. if (!this.newDepIds.has(id)) {
  5330. this.newDepIds.add(id);
  5331. this.newDeps.push(dep);
  5332. if (!this.depIds.has(id)) {
  5333. dep.addSub(this);
  5334. }
  5335. }
  5336. };
  5337. /**
  5338. * Clean up for dependency collection.
  5339. */
  5340. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  5341. var i = this.deps.length;
  5342. while (i--) {
  5343. var dep = this.deps[i];
  5344. if (!this.newDepIds.has(dep.id)) {
  5345. dep.removeSub(this);
  5346. }
  5347. }
  5348. var tmp = this.depIds;
  5349. this.depIds = this.newDepIds;
  5350. this.newDepIds = tmp;
  5351. this.newDepIds.clear();
  5352. tmp = this.deps;
  5353. this.deps = this.newDeps;
  5354. this.newDeps = tmp;
  5355. this.newDeps.length = 0;
  5356. };
  5357. /**
  5358. * Subscriber interface.
  5359. * Will be called when a dependency changes.
  5360. */
  5361. Watcher.prototype.update = function update () {
  5362. /* istanbul ignore else */
  5363. if (this.lazy) {
  5364. this.dirty = true;
  5365. } else if (this.sync) {
  5366. this.run();
  5367. } else {
  5368. queueWatcher(this);
  5369. }
  5370. };
  5371. /**
  5372. * Scheduler job interface.
  5373. * Will be called by the scheduler.
  5374. */
  5375. Watcher.prototype.run = function run () {
  5376. if (this.active) {
  5377. var value = this.get();
  5378. if (
  5379. value !== this.value ||
  5380. // Deep watchers and watchers on Object/Arrays should fire even
  5381. // when the value is the same, because the value may
  5382. // have mutated.
  5383. isObject(value) ||
  5384. this.deep
  5385. ) {
  5386. // set new value
  5387. var oldValue = this.value;
  5388. this.value = value;
  5389. if (this.user) {
  5390. try {
  5391. this.cb.call(this.vm, value, oldValue);
  5392. } catch (e) {
  5393. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  5394. }
  5395. } else {
  5396. this.cb.call(this.vm, value, oldValue);
  5397. }
  5398. }
  5399. }
  5400. };
  5401. /**
  5402. * Evaluate the value of the watcher.
  5403. * This only gets called for lazy watchers.
  5404. */
  5405. Watcher.prototype.evaluate = function evaluate () {
  5406. this.value = this.get();
  5407. this.dirty = false;
  5408. };
  5409. /**
  5410. * Depend on all deps collected by this watcher.
  5411. */
  5412. Watcher.prototype.depend = function depend () {
  5413. var i = this.deps.length;
  5414. while (i--) {
  5415. this.deps[i].depend();
  5416. }
  5417. };
  5418. /**
  5419. * Remove self from all dependencies' subscriber list.
  5420. */
  5421. Watcher.prototype.teardown = function teardown () {
  5422. if (this.active) {
  5423. // remove self from vm's watcher list
  5424. // this is a somewhat expensive operation so we skip it
  5425. // if the vm is being destroyed.
  5426. if (!this.vm._isBeingDestroyed) {
  5427. remove(this.vm._watchers, this);
  5428. }
  5429. var i = this.deps.length;
  5430. while (i--) {
  5431. this.deps[i].removeSub(this);
  5432. }
  5433. this.active = false;
  5434. }
  5435. };
  5436. /* */
  5437. var sharedPropertyDefinition = {
  5438. enumerable: true,
  5439. configurable: true,
  5440. get: noop,
  5441. set: noop
  5442. };
  5443. function proxy (target, sourceKey, key) {
  5444. sharedPropertyDefinition.get = function proxyGetter () {
  5445. return this[sourceKey][key]
  5446. };
  5447. sharedPropertyDefinition.set = function proxySetter (val) {
  5448. this[sourceKey][key] = val;
  5449. };
  5450. Object.defineProperty(target, key, sharedPropertyDefinition);
  5451. }
  5452. function initState (vm) {
  5453. vm._watchers = [];
  5454. var opts = vm.$options;
  5455. if (opts.props) { initProps(vm, opts.props); }
  5456. if (opts.methods) { initMethods(vm, opts.methods); }
  5457. if (opts.data) {
  5458. initData(vm);
  5459. } else {
  5460. observe(vm._data = {}, true /* asRootData */);
  5461. }
  5462. if (opts.computed) { initComputed(vm, opts.computed); }
  5463. if (opts.watch && opts.watch !== nativeWatch) {
  5464. initWatch(vm, opts.watch);
  5465. }
  5466. }
  5467. function initProps (vm, propsOptions) {
  5468. var propsData = vm.$options.propsData || {};
  5469. var props = vm._props = {};
  5470. // cache prop keys so that future props updates can iterate using Array
  5471. // instead of dynamic object key enumeration.
  5472. var keys = vm.$options._propKeys = [];
  5473. var isRoot = !vm.$parent;
  5474. // root instance props should be converted
  5475. if (!isRoot) {
  5476. toggleObserving(false);
  5477. }
  5478. var loop = function ( key ) {
  5479. keys.push(key);
  5480. var value = validateProp(key, propsOptions, propsData, vm);
  5481. /* istanbul ignore else */
  5482. if (true) {
  5483. var hyphenatedKey = hyphenate(key);
  5484. if (isReservedAttribute(hyphenatedKey) ||
  5485. config.isReservedAttr(hyphenatedKey)) {
  5486. warn(
  5487. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  5488. vm
  5489. );
  5490. }
  5491. defineReactive$$1(props, key, value, function () {
  5492. if (!isRoot && !isUpdatingChildComponent) {
  5493. {
  5494. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  5495. return
  5496. }
  5497. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  5498. if(
  5499. key === 'value' &&
  5500. Array.isArray(vm.$options.behaviors) &&
  5501. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  5502. ){
  5503. return
  5504. }
  5505. if(vm._getFormData){
  5506. return
  5507. }
  5508. var $parent = vm.$parent;
  5509. while($parent){
  5510. if($parent.__next_tick_pending){
  5511. return
  5512. }
  5513. $parent = $parent.$parent;
  5514. }
  5515. }
  5516. warn(
  5517. "Avoid mutating a prop directly since the value will be " +
  5518. "overwritten whenever the parent component re-renders. " +
  5519. "Instead, use a data or computed property based on the prop's " +
  5520. "value. Prop being mutated: \"" + key + "\"",
  5521. vm
  5522. );
  5523. }
  5524. });
  5525. } else {}
  5526. // static props are already proxied on the component's prototype
  5527. // during Vue.extend(). We only need to proxy props defined at
  5528. // instantiation here.
  5529. if (!(key in vm)) {
  5530. proxy(vm, "_props", key);
  5531. }
  5532. };
  5533. for (var key in propsOptions) loop( key );
  5534. toggleObserving(true);
  5535. }
  5536. function initData (vm) {
  5537. var data = vm.$options.data;
  5538. data = vm._data = typeof data === 'function'
  5539. ? getData(data, vm)
  5540. : data || {};
  5541. if (!isPlainObject(data)) {
  5542. data = {};
  5543. true && warn(
  5544. 'data functions should return an object:\n' +
  5545. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  5546. vm
  5547. );
  5548. }
  5549. // proxy data on instance
  5550. var keys = Object.keys(data);
  5551. var props = vm.$options.props;
  5552. var methods = vm.$options.methods;
  5553. var i = keys.length;
  5554. while (i--) {
  5555. var key = keys[i];
  5556. if (true) {
  5557. if (methods && hasOwn(methods, key)) {
  5558. warn(
  5559. ("Method \"" + key + "\" has already been defined as a data property."),
  5560. vm
  5561. );
  5562. }
  5563. }
  5564. if (props && hasOwn(props, key)) {
  5565. true && warn(
  5566. "The data property \"" + key + "\" is already declared as a prop. " +
  5567. "Use prop default value instead.",
  5568. vm
  5569. );
  5570. } else if (!isReserved(key)) {
  5571. proxy(vm, "_data", key);
  5572. }
  5573. }
  5574. // observe data
  5575. observe(data, true /* asRootData */);
  5576. }
  5577. function getData (data, vm) {
  5578. // #7573 disable dep collection when invoking data getters
  5579. pushTarget();
  5580. try {
  5581. return data.call(vm, vm)
  5582. } catch (e) {
  5583. handleError(e, vm, "data()");
  5584. return {}
  5585. } finally {
  5586. popTarget();
  5587. }
  5588. }
  5589. var computedWatcherOptions = { lazy: true };
  5590. function initComputed (vm, computed) {
  5591. // $flow-disable-line
  5592. var watchers = vm._computedWatchers = Object.create(null);
  5593. // computed properties are just getters during SSR
  5594. var isSSR = isServerRendering();
  5595. for (var key in computed) {
  5596. var userDef = computed[key];
  5597. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  5598. if ( true && getter == null) {
  5599. warn(
  5600. ("Getter is missing for computed property \"" + key + "\"."),
  5601. vm
  5602. );
  5603. }
  5604. if (!isSSR) {
  5605. // create internal watcher for the computed property.
  5606. watchers[key] = new Watcher(
  5607. vm,
  5608. getter || noop,
  5609. noop,
  5610. computedWatcherOptions
  5611. );
  5612. }
  5613. // component-defined computed properties are already defined on the
  5614. // component prototype. We only need to define computed properties defined
  5615. // at instantiation here.
  5616. if (!(key in vm)) {
  5617. defineComputed(vm, key, userDef);
  5618. } else if (true) {
  5619. if (key in vm.$data) {
  5620. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  5621. } else if (vm.$options.props && key in vm.$options.props) {
  5622. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  5623. }
  5624. }
  5625. }
  5626. }
  5627. function defineComputed (
  5628. target,
  5629. key,
  5630. userDef
  5631. ) {
  5632. var shouldCache = !isServerRendering();
  5633. if (typeof userDef === 'function') {
  5634. sharedPropertyDefinition.get = shouldCache
  5635. ? createComputedGetter(key)
  5636. : createGetterInvoker(userDef);
  5637. sharedPropertyDefinition.set = noop;
  5638. } else {
  5639. sharedPropertyDefinition.get = userDef.get
  5640. ? shouldCache && userDef.cache !== false
  5641. ? createComputedGetter(key)
  5642. : createGetterInvoker(userDef.get)
  5643. : noop;
  5644. sharedPropertyDefinition.set = userDef.set || noop;
  5645. }
  5646. if ( true &&
  5647. sharedPropertyDefinition.set === noop) {
  5648. sharedPropertyDefinition.set = function () {
  5649. warn(
  5650. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  5651. this
  5652. );
  5653. };
  5654. }
  5655. Object.defineProperty(target, key, sharedPropertyDefinition);
  5656. }
  5657. function createComputedGetter (key) {
  5658. return function computedGetter () {
  5659. var watcher = this._computedWatchers && this._computedWatchers[key];
  5660. if (watcher) {
  5661. if (watcher.dirty) {
  5662. watcher.evaluate();
  5663. }
  5664. if (Dep.target) {
  5665. watcher.depend();
  5666. }
  5667. return watcher.value
  5668. }
  5669. }
  5670. }
  5671. function createGetterInvoker(fn) {
  5672. return function computedGetter () {
  5673. return fn.call(this, this)
  5674. }
  5675. }
  5676. function initMethods (vm, methods) {
  5677. var props = vm.$options.props;
  5678. for (var key in methods) {
  5679. if (true) {
  5680. if (typeof methods[key] !== 'function') {
  5681. warn(
  5682. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  5683. "Did you reference the function correctly?",
  5684. vm
  5685. );
  5686. }
  5687. if (props && hasOwn(props, key)) {
  5688. warn(
  5689. ("Method \"" + key + "\" has already been defined as a prop."),
  5690. vm
  5691. );
  5692. }
  5693. if ((key in vm) && isReserved(key)) {
  5694. warn(
  5695. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  5696. "Avoid defining component methods that start with _ or $."
  5697. );
  5698. }
  5699. }
  5700. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  5701. }
  5702. }
  5703. function initWatch (vm, watch) {
  5704. for (var key in watch) {
  5705. var handler = watch[key];
  5706. if (Array.isArray(handler)) {
  5707. for (var i = 0; i < handler.length; i++) {
  5708. createWatcher(vm, key, handler[i]);
  5709. }
  5710. } else {
  5711. createWatcher(vm, key, handler);
  5712. }
  5713. }
  5714. }
  5715. function createWatcher (
  5716. vm,
  5717. expOrFn,
  5718. handler,
  5719. options
  5720. ) {
  5721. if (isPlainObject(handler)) {
  5722. options = handler;
  5723. handler = handler.handler;
  5724. }
  5725. if (typeof handler === 'string') {
  5726. handler = vm[handler];
  5727. }
  5728. return vm.$watch(expOrFn, handler, options)
  5729. }
  5730. function stateMixin (Vue) {
  5731. // flow somehow has problems with directly declared definition object
  5732. // when using Object.defineProperty, so we have to procedurally build up
  5733. // the object here.
  5734. var dataDef = {};
  5735. dataDef.get = function () { return this._data };
  5736. var propsDef = {};
  5737. propsDef.get = function () { return this._props };
  5738. if (true) {
  5739. dataDef.set = function () {
  5740. warn(
  5741. 'Avoid replacing instance root $data. ' +
  5742. 'Use nested data properties instead.',
  5743. this
  5744. );
  5745. };
  5746. propsDef.set = function () {
  5747. warn("$props is readonly.", this);
  5748. };
  5749. }
  5750. Object.defineProperty(Vue.prototype, '$data', dataDef);
  5751. Object.defineProperty(Vue.prototype, '$props', propsDef);
  5752. Vue.prototype.$set = set;
  5753. Vue.prototype.$delete = del;
  5754. Vue.prototype.$watch = function (
  5755. expOrFn,
  5756. cb,
  5757. options
  5758. ) {
  5759. var vm = this;
  5760. if (isPlainObject(cb)) {
  5761. return createWatcher(vm, expOrFn, cb, options)
  5762. }
  5763. options = options || {};
  5764. options.user = true;
  5765. var watcher = new Watcher(vm, expOrFn, cb, options);
  5766. if (options.immediate) {
  5767. try {
  5768. cb.call(vm, watcher.value);
  5769. } catch (error) {
  5770. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  5771. }
  5772. }
  5773. return function unwatchFn () {
  5774. watcher.teardown();
  5775. }
  5776. };
  5777. }
  5778. /* */
  5779. var uid$3 = 0;
  5780. function initMixin (Vue) {
  5781. Vue.prototype._init = function (options) {
  5782. var vm = this;
  5783. // a uid
  5784. vm._uid = uid$3++;
  5785. var startTag, endTag;
  5786. /* istanbul ignore if */
  5787. if ( true && config.performance && mark) {
  5788. startTag = "vue-perf-start:" + (vm._uid);
  5789. endTag = "vue-perf-end:" + (vm._uid);
  5790. mark(startTag);
  5791. }
  5792. // a flag to avoid this being observed
  5793. vm._isVue = true;
  5794. // merge options
  5795. if (options && options._isComponent) {
  5796. // optimize internal component instantiation
  5797. // since dynamic options merging is pretty slow, and none of the
  5798. // internal component options needs special treatment.
  5799. initInternalComponent(vm, options);
  5800. } else {
  5801. vm.$options = mergeOptions(
  5802. resolveConstructorOptions(vm.constructor),
  5803. options || {},
  5804. vm
  5805. );
  5806. }
  5807. /* istanbul ignore else */
  5808. if (true) {
  5809. initProxy(vm);
  5810. } else {}
  5811. // expose real self
  5812. vm._self = vm;
  5813. initLifecycle(vm);
  5814. initEvents(vm);
  5815. initRender(vm);
  5816. callHook(vm, 'beforeCreate');
  5817. vm.mpHost !== 'mp-toutiao' && initInjections(vm); // resolve injections before data/props
  5818. initState(vm);
  5819. vm.mpHost !== 'mp-toutiao' && initProvide(vm); // resolve provide after data/props
  5820. vm.mpHost !== 'mp-toutiao' && callHook(vm, 'created');
  5821. /* istanbul ignore if */
  5822. if ( true && config.performance && mark) {
  5823. vm._name = formatComponentName(vm, false);
  5824. mark(endTag);
  5825. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  5826. }
  5827. if (vm.$options.el) {
  5828. vm.$mount(vm.$options.el);
  5829. }
  5830. };
  5831. }
  5832. function initInternalComponent (vm, options) {
  5833. var opts = vm.$options = Object.create(vm.constructor.options);
  5834. // doing this because it's faster than dynamic enumeration.
  5835. var parentVnode = options._parentVnode;
  5836. opts.parent = options.parent;
  5837. opts._parentVnode = parentVnode;
  5838. var vnodeComponentOptions = parentVnode.componentOptions;
  5839. opts.propsData = vnodeComponentOptions.propsData;
  5840. opts._parentListeners = vnodeComponentOptions.listeners;
  5841. opts._renderChildren = vnodeComponentOptions.children;
  5842. opts._componentTag = vnodeComponentOptions.tag;
  5843. if (options.render) {
  5844. opts.render = options.render;
  5845. opts.staticRenderFns = options.staticRenderFns;
  5846. }
  5847. }
  5848. function resolveConstructorOptions (Ctor) {
  5849. var options = Ctor.options;
  5850. if (Ctor.super) {
  5851. var superOptions = resolveConstructorOptions(Ctor.super);
  5852. var cachedSuperOptions = Ctor.superOptions;
  5853. if (superOptions !== cachedSuperOptions) {
  5854. // super option changed,
  5855. // need to resolve new options.
  5856. Ctor.superOptions = superOptions;
  5857. // check if there are any late-modified/attached options (#4976)
  5858. var modifiedOptions = resolveModifiedOptions(Ctor);
  5859. // update base extend options
  5860. if (modifiedOptions) {
  5861. extend(Ctor.extendOptions, modifiedOptions);
  5862. }
  5863. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  5864. if (options.name) {
  5865. options.components[options.name] = Ctor;
  5866. }
  5867. }
  5868. }
  5869. return options
  5870. }
  5871. function resolveModifiedOptions (Ctor) {
  5872. var modified;
  5873. var latest = Ctor.options;
  5874. var sealed = Ctor.sealedOptions;
  5875. for (var key in latest) {
  5876. if (latest[key] !== sealed[key]) {
  5877. if (!modified) { modified = {}; }
  5878. modified[key] = latest[key];
  5879. }
  5880. }
  5881. return modified
  5882. }
  5883. function Vue (options) {
  5884. if ( true &&
  5885. !(this instanceof Vue)
  5886. ) {
  5887. warn('Vue is a constructor and should be called with the `new` keyword');
  5888. }
  5889. this._init(options);
  5890. }
  5891. initMixin(Vue);
  5892. stateMixin(Vue);
  5893. eventsMixin(Vue);
  5894. lifecycleMixin(Vue);
  5895. renderMixin(Vue);
  5896. /* */
  5897. function initUse (Vue) {
  5898. Vue.use = function (plugin) {
  5899. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  5900. if (installedPlugins.indexOf(plugin) > -1) {
  5901. return this
  5902. }
  5903. // additional parameters
  5904. var args = toArray(arguments, 1);
  5905. args.unshift(this);
  5906. if (typeof plugin.install === 'function') {
  5907. plugin.install.apply(plugin, args);
  5908. } else if (typeof plugin === 'function') {
  5909. plugin.apply(null, args);
  5910. }
  5911. installedPlugins.push(plugin);
  5912. return this
  5913. };
  5914. }
  5915. /* */
  5916. function initMixin$1 (Vue) {
  5917. Vue.mixin = function (mixin) {
  5918. this.options = mergeOptions(this.options, mixin);
  5919. return this
  5920. };
  5921. }
  5922. /* */
  5923. function initExtend (Vue) {
  5924. /**
  5925. * Each instance constructor, including Vue, has a unique
  5926. * cid. This enables us to create wrapped "child
  5927. * constructors" for prototypal inheritance and cache them.
  5928. */
  5929. Vue.cid = 0;
  5930. var cid = 1;
  5931. /**
  5932. * Class inheritance
  5933. */
  5934. Vue.extend = function (extendOptions) {
  5935. extendOptions = extendOptions || {};
  5936. var Super = this;
  5937. var SuperId = Super.cid;
  5938. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  5939. if (cachedCtors[SuperId]) {
  5940. return cachedCtors[SuperId]
  5941. }
  5942. var name = extendOptions.name || Super.options.name;
  5943. if ( true && name) {
  5944. validateComponentName(name);
  5945. }
  5946. var Sub = function VueComponent (options) {
  5947. this._init(options);
  5948. };
  5949. Sub.prototype = Object.create(Super.prototype);
  5950. Sub.prototype.constructor = Sub;
  5951. Sub.cid = cid++;
  5952. Sub.options = mergeOptions(
  5953. Super.options,
  5954. extendOptions
  5955. );
  5956. Sub['super'] = Super;
  5957. // For props and computed properties, we define the proxy getters on
  5958. // the Vue instances at extension time, on the extended prototype. This
  5959. // avoids Object.defineProperty calls for each instance created.
  5960. if (Sub.options.props) {
  5961. initProps$1(Sub);
  5962. }
  5963. if (Sub.options.computed) {
  5964. initComputed$1(Sub);
  5965. }
  5966. // allow further extension/mixin/plugin usage
  5967. Sub.extend = Super.extend;
  5968. Sub.mixin = Super.mixin;
  5969. Sub.use = Super.use;
  5970. // create asset registers, so extended classes
  5971. // can have their private assets too.
  5972. ASSET_TYPES.forEach(function (type) {
  5973. Sub[type] = Super[type];
  5974. });
  5975. // enable recursive self-lookup
  5976. if (name) {
  5977. Sub.options.components[name] = Sub;
  5978. }
  5979. // keep a reference to the super options at extension time.
  5980. // later at instantiation we can check if Super's options have
  5981. // been updated.
  5982. Sub.superOptions = Super.options;
  5983. Sub.extendOptions = extendOptions;
  5984. Sub.sealedOptions = extend({}, Sub.options);
  5985. // cache constructor
  5986. cachedCtors[SuperId] = Sub;
  5987. return Sub
  5988. };
  5989. }
  5990. function initProps$1 (Comp) {
  5991. var props = Comp.options.props;
  5992. for (var key in props) {
  5993. proxy(Comp.prototype, "_props", key);
  5994. }
  5995. }
  5996. function initComputed$1 (Comp) {
  5997. var computed = Comp.options.computed;
  5998. for (var key in computed) {
  5999. defineComputed(Comp.prototype, key, computed[key]);
  6000. }
  6001. }
  6002. /* */
  6003. function initAssetRegisters (Vue) {
  6004. /**
  6005. * Create asset registration methods.
  6006. */
  6007. ASSET_TYPES.forEach(function (type) {
  6008. Vue[type] = function (
  6009. id,
  6010. definition
  6011. ) {
  6012. if (!definition) {
  6013. return this.options[type + 's'][id]
  6014. } else {
  6015. /* istanbul ignore if */
  6016. if ( true && type === 'component') {
  6017. validateComponentName(id);
  6018. }
  6019. if (type === 'component' && isPlainObject(definition)) {
  6020. definition.name = definition.name || id;
  6021. definition = this.options._base.extend(definition);
  6022. }
  6023. if (type === 'directive' && typeof definition === 'function') {
  6024. definition = { bind: definition, update: definition };
  6025. }
  6026. this.options[type + 's'][id] = definition;
  6027. return definition
  6028. }
  6029. };
  6030. });
  6031. }
  6032. /* */
  6033. function getComponentName (opts) {
  6034. return opts && (opts.Ctor.options.name || opts.tag)
  6035. }
  6036. function matches (pattern, name) {
  6037. if (Array.isArray(pattern)) {
  6038. return pattern.indexOf(name) > -1
  6039. } else if (typeof pattern === 'string') {
  6040. return pattern.split(',').indexOf(name) > -1
  6041. } else if (isRegExp(pattern)) {
  6042. return pattern.test(name)
  6043. }
  6044. /* istanbul ignore next */
  6045. return false
  6046. }
  6047. function pruneCache (keepAliveInstance, filter) {
  6048. var cache = keepAliveInstance.cache;
  6049. var keys = keepAliveInstance.keys;
  6050. var _vnode = keepAliveInstance._vnode;
  6051. for (var key in cache) {
  6052. var cachedNode = cache[key];
  6053. if (cachedNode) {
  6054. var name = getComponentName(cachedNode.componentOptions);
  6055. if (name && !filter(name)) {
  6056. pruneCacheEntry(cache, key, keys, _vnode);
  6057. }
  6058. }
  6059. }
  6060. }
  6061. function pruneCacheEntry (
  6062. cache,
  6063. key,
  6064. keys,
  6065. current
  6066. ) {
  6067. var cached$$1 = cache[key];
  6068. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  6069. cached$$1.componentInstance.$destroy();
  6070. }
  6071. cache[key] = null;
  6072. remove(keys, key);
  6073. }
  6074. var patternTypes = [String, RegExp, Array];
  6075. var KeepAlive = {
  6076. name: 'keep-alive',
  6077. abstract: true,
  6078. props: {
  6079. include: patternTypes,
  6080. exclude: patternTypes,
  6081. max: [String, Number]
  6082. },
  6083. created: function created () {
  6084. this.cache = Object.create(null);
  6085. this.keys = [];
  6086. },
  6087. destroyed: function destroyed () {
  6088. for (var key in this.cache) {
  6089. pruneCacheEntry(this.cache, key, this.keys);
  6090. }
  6091. },
  6092. mounted: function mounted () {
  6093. var this$1 = this;
  6094. this.$watch('include', function (val) {
  6095. pruneCache(this$1, function (name) { return matches(val, name); });
  6096. });
  6097. this.$watch('exclude', function (val) {
  6098. pruneCache(this$1, function (name) { return !matches(val, name); });
  6099. });
  6100. },
  6101. render: function render () {
  6102. var slot = this.$slots.default;
  6103. var vnode = getFirstComponentChild(slot);
  6104. var componentOptions = vnode && vnode.componentOptions;
  6105. if (componentOptions) {
  6106. // check pattern
  6107. var name = getComponentName(componentOptions);
  6108. var ref = this;
  6109. var include = ref.include;
  6110. var exclude = ref.exclude;
  6111. if (
  6112. // not included
  6113. (include && (!name || !matches(include, name))) ||
  6114. // excluded
  6115. (exclude && name && matches(exclude, name))
  6116. ) {
  6117. return vnode
  6118. }
  6119. var ref$1 = this;
  6120. var cache = ref$1.cache;
  6121. var keys = ref$1.keys;
  6122. var key = vnode.key == null
  6123. // same constructor may get registered as different local components
  6124. // so cid alone is not enough (#3269)
  6125. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  6126. : vnode.key;
  6127. if (cache[key]) {
  6128. vnode.componentInstance = cache[key].componentInstance;
  6129. // make current key freshest
  6130. remove(keys, key);
  6131. keys.push(key);
  6132. } else {
  6133. cache[key] = vnode;
  6134. keys.push(key);
  6135. // prune oldest entry
  6136. if (this.max && keys.length > parseInt(this.max)) {
  6137. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  6138. }
  6139. }
  6140. vnode.data.keepAlive = true;
  6141. }
  6142. return vnode || (slot && slot[0])
  6143. }
  6144. };
  6145. var builtInComponents = {
  6146. KeepAlive: KeepAlive
  6147. };
  6148. /* */
  6149. function initGlobalAPI (Vue) {
  6150. // config
  6151. var configDef = {};
  6152. configDef.get = function () { return config; };
  6153. if (true) {
  6154. configDef.set = function () {
  6155. warn(
  6156. 'Do not replace the Vue.config object, set individual fields instead.'
  6157. );
  6158. };
  6159. }
  6160. Object.defineProperty(Vue, 'config', configDef);
  6161. // exposed util methods.
  6162. // NOTE: these are not considered part of the public API - avoid relying on
  6163. // them unless you are aware of the risk.
  6164. Vue.util = {
  6165. warn: warn,
  6166. extend: extend,
  6167. mergeOptions: mergeOptions,
  6168. defineReactive: defineReactive$$1
  6169. };
  6170. Vue.set = set;
  6171. Vue.delete = del;
  6172. Vue.nextTick = nextTick;
  6173. // 2.6 explicit observable API
  6174. Vue.observable = function (obj) {
  6175. observe(obj);
  6176. return obj
  6177. };
  6178. Vue.options = Object.create(null);
  6179. ASSET_TYPES.forEach(function (type) {
  6180. Vue.options[type + 's'] = Object.create(null);
  6181. });
  6182. // this is used to identify the "base" constructor to extend all plain-object
  6183. // components with in Weex's multi-instance scenarios.
  6184. Vue.options._base = Vue;
  6185. extend(Vue.options.components, builtInComponents);
  6186. initUse(Vue);
  6187. initMixin$1(Vue);
  6188. initExtend(Vue);
  6189. initAssetRegisters(Vue);
  6190. }
  6191. initGlobalAPI(Vue);
  6192. Object.defineProperty(Vue.prototype, '$isServer', {
  6193. get: isServerRendering
  6194. });
  6195. Object.defineProperty(Vue.prototype, '$ssrContext', {
  6196. get: function get () {
  6197. /* istanbul ignore next */
  6198. return this.$vnode && this.$vnode.ssrContext
  6199. }
  6200. });
  6201. // expose FunctionalRenderContext for ssr runtime helper installation
  6202. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  6203. value: FunctionalRenderContext
  6204. });
  6205. Vue.version = '2.6.10';
  6206. /**
  6207. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  6208. */
  6209. var ARRAYTYPE = '[object Array]';
  6210. var OBJECTTYPE = '[object Object]';
  6211. // const FUNCTIONTYPE = '[object Function]'
  6212. function diff(current, pre) {
  6213. var result = {};
  6214. syncKeys(current, pre);
  6215. _diff(current, pre, '', result);
  6216. return result
  6217. }
  6218. function syncKeys(current, pre) {
  6219. if (current === pre) { return }
  6220. var rootCurrentType = type(current);
  6221. var rootPreType = type(pre);
  6222. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  6223. if(Object.keys(current).length >= Object.keys(pre).length){
  6224. for (var key in pre) {
  6225. var currentValue = current[key];
  6226. if (currentValue === undefined) {
  6227. current[key] = null;
  6228. } else {
  6229. syncKeys(currentValue, pre[key]);
  6230. }
  6231. }
  6232. }
  6233. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  6234. if (current.length >= pre.length) {
  6235. pre.forEach(function (item, index) {
  6236. syncKeys(current[index], item);
  6237. });
  6238. }
  6239. }
  6240. }
  6241. function _diff(current, pre, path, result) {
  6242. if (current === pre) { return }
  6243. var rootCurrentType = type(current);
  6244. var rootPreType = type(pre);
  6245. if (rootCurrentType == OBJECTTYPE) {
  6246. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  6247. setResult(result, path, current);
  6248. } else {
  6249. var loop = function ( key ) {
  6250. var currentValue = current[key];
  6251. var preValue = pre[key];
  6252. var currentType = type(currentValue);
  6253. var preType = type(preValue);
  6254. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  6255. if (currentValue != pre[key]) {
  6256. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6257. }
  6258. } else if (currentType == ARRAYTYPE) {
  6259. if (preType != ARRAYTYPE) {
  6260. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6261. } else {
  6262. if (currentValue.length < preValue.length) {
  6263. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6264. } else {
  6265. currentValue.forEach(function (item, index) {
  6266. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  6267. });
  6268. }
  6269. }
  6270. } else if (currentType == OBJECTTYPE) {
  6271. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  6272. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6273. } else {
  6274. for (var subKey in currentValue) {
  6275. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  6276. }
  6277. }
  6278. }
  6279. };
  6280. for (var key in current) loop( key );
  6281. }
  6282. } else if (rootCurrentType == ARRAYTYPE) {
  6283. if (rootPreType != ARRAYTYPE) {
  6284. setResult(result, path, current);
  6285. } else {
  6286. if (current.length < pre.length) {
  6287. setResult(result, path, current);
  6288. } else {
  6289. current.forEach(function (item, index) {
  6290. _diff(item, pre[index], path + '[' + index + ']', result);
  6291. });
  6292. }
  6293. }
  6294. } else {
  6295. setResult(result, path, current);
  6296. }
  6297. }
  6298. function setResult(result, k, v) {
  6299. // if (type(v) != FUNCTIONTYPE) {
  6300. result[k] = v;
  6301. // }
  6302. }
  6303. function type(obj) {
  6304. return Object.prototype.toString.call(obj)
  6305. }
  6306. /* */
  6307. function flushCallbacks$1(vm) {
  6308. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  6309. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6310. var mpInstance = vm.$scope;
  6311. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6312. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  6313. }
  6314. var copies = vm.__next_tick_callbacks.slice(0);
  6315. vm.__next_tick_callbacks.length = 0;
  6316. for (var i = 0; i < copies.length; i++) {
  6317. copies[i]();
  6318. }
  6319. }
  6320. }
  6321. function hasRenderWatcher(vm) {
  6322. return queue.find(function (watcher) { return vm._watcher === watcher; })
  6323. }
  6324. function nextTick$1(vm, cb) {
  6325. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  6326. //2.nextTick 之前存在 render watcher
  6327. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  6328. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6329. var mpInstance = vm.$scope;
  6330. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6331. ']:nextVueTick');
  6332. }
  6333. return nextTick(cb, vm)
  6334. }else{
  6335. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6336. var mpInstance$1 = vm.$scope;
  6337. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  6338. ']:nextMPTick');
  6339. }
  6340. }
  6341. var _resolve;
  6342. if (!vm.__next_tick_callbacks) {
  6343. vm.__next_tick_callbacks = [];
  6344. }
  6345. vm.__next_tick_callbacks.push(function () {
  6346. if (cb) {
  6347. try {
  6348. cb.call(vm);
  6349. } catch (e) {
  6350. handleError(e, vm, 'nextTick');
  6351. }
  6352. } else if (_resolve) {
  6353. _resolve(vm);
  6354. }
  6355. });
  6356. // $flow-disable-line
  6357. if (!cb && typeof Promise !== 'undefined') {
  6358. return new Promise(function (resolve) {
  6359. _resolve = resolve;
  6360. })
  6361. }
  6362. }
  6363. /* */
  6364. function cloneWithData(vm) {
  6365. // 确保当前 vm 所有数据被同步
  6366. var ret = Object.create(null);
  6367. var dataKeys = [].concat(
  6368. Object.keys(vm._data || {}),
  6369. Object.keys(vm._computedWatchers || {}));
  6370. dataKeys.reduce(function(ret, key) {
  6371. ret[key] = vm[key];
  6372. return ret
  6373. }, ret);
  6374. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  6375. Object.assign(ret, vm.$mp.data || {});
  6376. if (
  6377. Array.isArray(vm.$options.behaviors) &&
  6378. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6379. ) { //form-field
  6380. ret['name'] = vm.name;
  6381. ret['value'] = vm.value;
  6382. }
  6383. return JSON.parse(JSON.stringify(ret))
  6384. }
  6385. var patch = function(oldVnode, vnode) {
  6386. var this$1 = this;
  6387. if (vnode === null) { //destroy
  6388. return
  6389. }
  6390. if (this.mpType === 'page' || this.mpType === 'component') {
  6391. var mpInstance = this.$scope;
  6392. var data = Object.create(null);
  6393. try {
  6394. data = cloneWithData(this);
  6395. } catch (err) {
  6396. console.error(err);
  6397. }
  6398. data.__webviewId__ = mpInstance.data.__webviewId__;
  6399. var mpData = Object.create(null);
  6400. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  6401. mpData[key] = mpInstance.data[key];
  6402. });
  6403. var diffData = diff(data, mpData);
  6404. if (Object.keys(diffData).length) {
  6405. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6406. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  6407. ']差量更新',
  6408. JSON.stringify(diffData));
  6409. }
  6410. this.__next_tick_pending = true;
  6411. mpInstance.setData(diffData, function () {
  6412. this$1.__next_tick_pending = false;
  6413. flushCallbacks$1(this$1);
  6414. });
  6415. } else {
  6416. flushCallbacks$1(this);
  6417. }
  6418. }
  6419. };
  6420. /* */
  6421. function createEmptyRender() {
  6422. }
  6423. function mountComponent$1(
  6424. vm,
  6425. el,
  6426. hydrating
  6427. ) {
  6428. if (!vm.mpType) {//main.js 中的 new Vue
  6429. return vm
  6430. }
  6431. if (vm.mpType === 'app') {
  6432. vm.$options.render = createEmptyRender;
  6433. }
  6434. if (!vm.$options.render) {
  6435. vm.$options.render = createEmptyRender;
  6436. if (true) {
  6437. /* istanbul ignore if */
  6438. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  6439. vm.$options.el || el) {
  6440. warn(
  6441. 'You are using the runtime-only build of Vue where the template ' +
  6442. 'compiler is not available. Either pre-compile the templates into ' +
  6443. 'render functions, or use the compiler-included build.',
  6444. vm
  6445. );
  6446. } else {
  6447. warn(
  6448. 'Failed to mount component: template or render function not defined.',
  6449. vm
  6450. );
  6451. }
  6452. }
  6453. }
  6454. vm.mpHost !== 'mp-toutiao' && callHook(vm, 'beforeMount');
  6455. var updateComponent = function () {
  6456. vm._update(vm._render(), hydrating);
  6457. };
  6458. // we set this to vm._watcher inside the watcher's constructor
  6459. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  6460. // component's mounted hook), which relies on vm._watcher being already defined
  6461. new Watcher(vm, updateComponent, noop, {
  6462. before: function before() {
  6463. if (vm._isMounted && !vm._isDestroyed) {
  6464. callHook(vm, 'beforeUpdate');
  6465. }
  6466. }
  6467. }, true /* isRenderWatcher */);
  6468. hydrating = false;
  6469. return vm
  6470. }
  6471. /* */
  6472. function renderClass (
  6473. staticClass,
  6474. dynamicClass
  6475. ) {
  6476. if (isDef(staticClass) || isDef(dynamicClass)) {
  6477. return concat(staticClass, stringifyClass(dynamicClass))
  6478. }
  6479. /* istanbul ignore next */
  6480. return ''
  6481. }
  6482. function concat (a, b) {
  6483. return a ? b ? (a + ' ' + b) : a : (b || '')
  6484. }
  6485. function stringifyClass (value) {
  6486. if (Array.isArray(value)) {
  6487. return stringifyArray(value)
  6488. }
  6489. if (isObject(value)) {
  6490. return stringifyObject(value)
  6491. }
  6492. if (typeof value === 'string') {
  6493. return value
  6494. }
  6495. /* istanbul ignore next */
  6496. return ''
  6497. }
  6498. function stringifyArray (value) {
  6499. var res = '';
  6500. var stringified;
  6501. for (var i = 0, l = value.length; i < l; i++) {
  6502. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  6503. if (res) { res += ' '; }
  6504. res += stringified;
  6505. }
  6506. }
  6507. return res
  6508. }
  6509. function stringifyObject (value) {
  6510. var res = '';
  6511. for (var key in value) {
  6512. if (value[key]) {
  6513. if (res) { res += ' '; }
  6514. res += key;
  6515. }
  6516. }
  6517. return res
  6518. }
  6519. /* */
  6520. var parseStyleText = cached(function (cssText) {
  6521. var res = {};
  6522. var listDelimiter = /;(?![^(]*\))/g;
  6523. var propertyDelimiter = /:(.+)/;
  6524. cssText.split(listDelimiter).forEach(function (item) {
  6525. if (item) {
  6526. var tmp = item.split(propertyDelimiter);
  6527. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  6528. }
  6529. });
  6530. return res
  6531. });
  6532. // normalize possible array / string values into Object
  6533. function normalizeStyleBinding (bindingStyle) {
  6534. if (Array.isArray(bindingStyle)) {
  6535. return toObject(bindingStyle)
  6536. }
  6537. if (typeof bindingStyle === 'string') {
  6538. return parseStyleText(bindingStyle)
  6539. }
  6540. return bindingStyle
  6541. }
  6542. /* */
  6543. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  6544. function getTarget(obj, path) {
  6545. var parts = path.split('.');
  6546. var key = parts[0];
  6547. if (key.indexOf('__$n') === 0) { //number index
  6548. key = parseInt(key.replace('__$n', ''));
  6549. }
  6550. if (parts.length === 1) {
  6551. return obj[key]
  6552. }
  6553. return getTarget(obj[key], parts.slice(1).join('.'))
  6554. }
  6555. function internalMixin(Vue) {
  6556. Vue.config.errorHandler = function(err) {
  6557. console.error(err);
  6558. };
  6559. var oldEmit = Vue.prototype.$emit;
  6560. Vue.prototype.$emit = function(event) {
  6561. if (this.$scope && event) {
  6562. this.$scope['triggerEvent'](event, {
  6563. __args__: toArray(arguments, 1)
  6564. });
  6565. }
  6566. return oldEmit.apply(this, arguments)
  6567. };
  6568. Vue.prototype.$nextTick = function(fn) {
  6569. return nextTick$1(this, fn)
  6570. };
  6571. MP_METHODS.forEach(function (method) {
  6572. Vue.prototype[method] = function(args) {
  6573. if (this.$scope) {
  6574. return this.$scope[method](args)
  6575. }
  6576. };
  6577. });
  6578. Vue.prototype.__init_provide = initProvide;
  6579. Vue.prototype.__init_injections = initInjections;
  6580. Vue.prototype.__call_hook = function(hook, args) {
  6581. var vm = this;
  6582. // #7573 disable dep collection when invoking lifecycle hooks
  6583. pushTarget();
  6584. var handlers = vm.$options[hook];
  6585. var info = hook + " hook";
  6586. var ret;
  6587. if (handlers) {
  6588. for (var i = 0, j = handlers.length; i < j; i++) {
  6589. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  6590. }
  6591. }
  6592. if (vm._hasHookEvent) {
  6593. vm.$emit('hook:' + hook);
  6594. }
  6595. popTarget();
  6596. return ret
  6597. };
  6598. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  6599. if (Array.isArray(modifiers)) {
  6600. if (modifiers.indexOf('trim') !== -1) {
  6601. value = value.trim();
  6602. }
  6603. if (modifiers.indexOf('number') !== -1) {
  6604. value = this._n(value);
  6605. }
  6606. }
  6607. if (!target) {
  6608. target = this;
  6609. }
  6610. target[key] = value;
  6611. };
  6612. Vue.prototype.__set_sync = function(target, key, value) {
  6613. if (!target) {
  6614. target = this;
  6615. }
  6616. target[key] = value;
  6617. };
  6618. Vue.prototype.__get_orig = function(item) {
  6619. if (isPlainObject(item)) {
  6620. return item['$orig'] || item
  6621. }
  6622. return item
  6623. };
  6624. Vue.prototype.__get_value = function(dataPath, target) {
  6625. return getTarget(target || this, dataPath)
  6626. };
  6627. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  6628. return renderClass(staticClass, dynamicClass)
  6629. };
  6630. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  6631. if (!dynamicStyle && !staticStyle) {
  6632. return ''
  6633. }
  6634. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  6635. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  6636. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  6637. };
  6638. Vue.prototype.__map = function(val, iteratee) {
  6639. //TODO 暂不考虑 string,number
  6640. var ret, i, l, keys, key;
  6641. if (Array.isArray(val)) {
  6642. ret = new Array(val.length);
  6643. for (i = 0, l = val.length; i < l; i++) {
  6644. ret[i] = iteratee(val[i], i);
  6645. }
  6646. return ret
  6647. } else if (isObject(val)) {
  6648. keys = Object.keys(val);
  6649. ret = Object.create(null);
  6650. for (i = 0, l = keys.length; i < l; i++) {
  6651. key = keys[i];
  6652. ret[key] = iteratee(val[key], key, i);
  6653. }
  6654. return ret
  6655. }
  6656. return []
  6657. };
  6658. }
  6659. /* */
  6660. var LIFECYCLE_HOOKS$1 = [
  6661. //App
  6662. 'onLaunch',
  6663. 'onShow',
  6664. 'onHide',
  6665. 'onUniNViewMessage',
  6666. 'onError',
  6667. //Page
  6668. 'onLoad',
  6669. // 'onShow',
  6670. 'onReady',
  6671. // 'onHide',
  6672. 'onUnload',
  6673. 'onPullDownRefresh',
  6674. 'onReachBottom',
  6675. 'onTabItemTap',
  6676. 'onShareAppMessage',
  6677. 'onResize',
  6678. 'onPageScroll',
  6679. 'onNavigationBarButtonTap',
  6680. 'onBackPress',
  6681. 'onNavigationBarSearchInputChanged',
  6682. 'onNavigationBarSearchInputConfirmed',
  6683. 'onNavigationBarSearchInputClicked',
  6684. //Component
  6685. // 'onReady', // 兼容旧版本,应该移除该事件
  6686. 'onPageShow',
  6687. 'onPageHide',
  6688. 'onPageResize'
  6689. ];
  6690. function lifecycleMixin$1(Vue) {
  6691. //fixed vue-class-component
  6692. var oldExtend = Vue.extend;
  6693. Vue.extend = function(extendOptions) {
  6694. extendOptions = extendOptions || {};
  6695. var methods = extendOptions.methods;
  6696. if (methods) {
  6697. Object.keys(methods).forEach(function (methodName) {
  6698. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  6699. extendOptions[methodName] = methods[methodName];
  6700. delete methods[methodName];
  6701. }
  6702. });
  6703. }
  6704. return oldExtend.call(this, extendOptions)
  6705. };
  6706. var strategies = Vue.config.optionMergeStrategies;
  6707. var mergeHook = strategies.created;
  6708. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  6709. strategies[hook] = mergeHook;
  6710. });
  6711. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  6712. }
  6713. /* */
  6714. // install platform patch function
  6715. Vue.prototype.__patch__ = patch;
  6716. // public mount method
  6717. Vue.prototype.$mount = function(
  6718. el ,
  6719. hydrating
  6720. ) {
  6721. return mountComponent$1(this, el, hydrating)
  6722. };
  6723. lifecycleMixin$1(Vue);
  6724. internalMixin(Vue);
  6725. /* */
  6726. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  6727. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  6728. /***/ }),
  6729. /***/ 27:
  6730. /*!*****************************************************************************************************!*\
  6731. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2Fmyinfo%2Fmyinfo"} ***!
  6732. \*****************************************************************************************************/
  6733. /*! no static exports found */
  6734. /***/ (function(module, exports, __webpack_require__) {
  6735. "use strict";
  6736. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  6737. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  6738. var _myinfo = _interopRequireDefault(__webpack_require__(/*! ./pages/myinfo/myinfo.vue */ 28));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  6739. createPage(_myinfo.default);
  6740. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  6741. /***/ }),
  6742. /***/ 3:
  6743. /*!***********************************!*\
  6744. !*** (webpack)/buildin/global.js ***!
  6745. \***********************************/
  6746. /*! no static exports found */
  6747. /***/ (function(module, exports) {
  6748. var g;
  6749. // This works in non-strict mode
  6750. g = (function() {
  6751. return this;
  6752. })();
  6753. try {
  6754. // This works if eval is allowed (see CSP)
  6755. g = g || new Function("return this")();
  6756. } catch (e) {
  6757. // This works if the window reference is available
  6758. if (typeof window === "object") g = window;
  6759. }
  6760. // g can still be undefined, but nothing to do about it...
  6761. // We return undefined, instead of nothing here, so it's
  6762. // easier to handle this case. if(!global) { ...}
  6763. module.exports = g;
  6764. /***/ }),
  6765. /***/ 35:
  6766. /*!*******************************************************************************************************!*\
  6767. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2Fmyinfo2%2Fmyinfo2"} ***!
  6768. \*******************************************************************************************************/
  6769. /*! no static exports found */
  6770. /***/ (function(module, exports, __webpack_require__) {
  6771. "use strict";
  6772. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  6773. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  6774. var _myinfo = _interopRequireDefault(__webpack_require__(/*! ./pages/myinfo2/myinfo2.vue */ 36));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  6775. createPage(_myinfo.default);
  6776. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  6777. /***/ }),
  6778. /***/ 4:
  6779. /*!*********************************************************************!*\
  6780. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/pages.json ***!
  6781. \*********************************************************************/
  6782. /*! no static exports found */
  6783. /***/ (function(module, exports, __webpack_require__) {
  6784. "use strict";
  6785. /***/ }),
  6786. /***/ 43:
  6787. /*!*************************************************************************************************************!*\
  6788. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2FchangeInfo%2FchangeInfo"} ***!
  6789. \*************************************************************************************************************/
  6790. /*! no static exports found */
  6791. /***/ (function(module, exports, __webpack_require__) {
  6792. "use strict";
  6793. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  6794. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  6795. var _changeInfo = _interopRequireDefault(__webpack_require__(/*! ./pages/changeInfo/changeInfo.vue */ 44));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  6796. createPage(_changeInfo.default);
  6797. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  6798. /***/ }),
  6799. /***/ 51:
  6800. /*!*************************************************************************************************************!*\
  6801. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2Fcollection%2Fcollection"} ***!
  6802. \*************************************************************************************************************/
  6803. /*! no static exports found */
  6804. /***/ (function(module, exports, __webpack_require__) {
  6805. "use strict";
  6806. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  6807. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  6808. var _collection = _interopRequireDefault(__webpack_require__(/*! ./pages/collection/collection.vue */ 52));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  6809. createPage(_collection.default);
  6810. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  6811. /***/ }),
  6812. /***/ 59:
  6813. /*!*****************************************************************************************************************!*\
  6814. !*** C:/Users/Administrator/Desktop/gaobao/gaobaoUniApp/main.js?{"page":"pages%2Fyuan-xiao-ku%2Fyuan-xiao-ku"} ***!
  6815. \*****************************************************************************************************************/
  6816. /*! no static exports found */
  6817. /***/ (function(module, exports, __webpack_require__) {
  6818. "use strict";
  6819. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
  6820. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  6821. var _yuanXiaoKu = _interopRequireDefault(__webpack_require__(/*! ./pages/yuan-xiao-ku/yuan-xiao-ku.vue */ 60));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  6822. createPage(_yuanXiaoKu.default);
  6823. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  6824. /***/ })
  6825. }]);
  6826. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map