vendor.js 308 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. function isWxKey(key) {
  21. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  22. }
  23. function initWx() {
  24. var newWx = {};
  25. for (var _key in oldWx) {
  26. if (isWxKey(_key)) {
  27. // TODO wrapper function
  28. newWx[_key] = oldWx[_key];
  29. }
  30. }
  31. return newWx;
  32. }
  33. target[key] = initWx();
  34. var _default = target[key];
  35. exports.default = _default;
  36. /***/ }),
  37. /* 2 */
  38. /*!************************************************************!*\
  39. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  40. \************************************************************/
  41. /*! no static exports found */
  42. /***/ (function(module, exports, __webpack_require__) {
  43. "use strict";
  44. /* WEBPACK VAR INJECTION */(function(wx, global) {
  45. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  46. Object.defineProperty(exports, "__esModule", {
  47. value: true
  48. });
  49. exports.createApp = createApp;
  50. exports.createComponent = createComponent;
  51. exports.createPage = createPage;
  52. exports.createPlugin = createPlugin;
  53. exports.createSubpackageApp = createSubpackageApp;
  54. exports.default = void 0;
  55. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  56. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  57. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  58. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  59. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  60. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  61. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  62. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  63. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  64. var realAtob;
  65. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  66. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  67. if (typeof atob !== 'function') {
  68. realAtob = function realAtob(str) {
  69. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  70. if (!b64re.test(str)) {
  71. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  72. }
  73. // Adding the padding if missing, for semplicity
  74. str += '=='.slice(2 - (str.length & 3));
  75. var bitmap;
  76. var result = '';
  77. var r1;
  78. var r2;
  79. var i = 0;
  80. for (; i < str.length;) {
  81. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  82. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  83. }
  84. return result;
  85. };
  86. } else {
  87. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  88. realAtob = atob;
  89. }
  90. function b64DecodeUnicode(str) {
  91. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  92. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  93. }).join(''));
  94. }
  95. function getCurrentUserInfo() {
  96. var token = wx.getStorageSync('uni_id_token') || '';
  97. var tokenArr = token.split('.');
  98. if (!token || tokenArr.length !== 3) {
  99. return {
  100. uid: null,
  101. role: [],
  102. permission: [],
  103. tokenExpired: 0
  104. };
  105. }
  106. var userInfo;
  107. try {
  108. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  109. } catch (error) {
  110. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  111. }
  112. userInfo.tokenExpired = userInfo.exp * 1000;
  113. delete userInfo.exp;
  114. delete userInfo.iat;
  115. return userInfo;
  116. }
  117. function uniIdMixin(Vue) {
  118. Vue.prototype.uniIDHasRole = function (roleId) {
  119. var _getCurrentUserInfo = getCurrentUserInfo(),
  120. role = _getCurrentUserInfo.role;
  121. return role.indexOf(roleId) > -1;
  122. };
  123. Vue.prototype.uniIDHasPermission = function (permissionId) {
  124. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  125. permission = _getCurrentUserInfo2.permission;
  126. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  127. };
  128. Vue.prototype.uniIDTokenValid = function () {
  129. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  130. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  131. return tokenExpired > Date.now();
  132. };
  133. }
  134. var _toString = Object.prototype.toString;
  135. var hasOwnProperty = Object.prototype.hasOwnProperty;
  136. function isFn(fn) {
  137. return typeof fn === 'function';
  138. }
  139. function isStr(str) {
  140. return typeof str === 'string';
  141. }
  142. function isObject(obj) {
  143. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  144. }
  145. function isPlainObject(obj) {
  146. return _toString.call(obj) === '[object Object]';
  147. }
  148. function hasOwn(obj, key) {
  149. return hasOwnProperty.call(obj, key);
  150. }
  151. function noop() {}
  152. /**
  153. * Create a cached version of a pure function.
  154. */
  155. function cached(fn) {
  156. var cache = Object.create(null);
  157. return function cachedFn(str) {
  158. var hit = cache[str];
  159. return hit || (cache[str] = fn(str));
  160. };
  161. }
  162. /**
  163. * Camelize a hyphen-delimited string.
  164. */
  165. var camelizeRE = /-(\w)/g;
  166. var camelize = cached(function (str) {
  167. return str.replace(camelizeRE, function (_, c) {
  168. return c ? c.toUpperCase() : '';
  169. });
  170. });
  171. function sortObject(obj) {
  172. var sortObj = {};
  173. if (isPlainObject(obj)) {
  174. Object.keys(obj).sort().forEach(function (key) {
  175. sortObj[key] = obj[key];
  176. });
  177. }
  178. return !Object.keys(sortObj) ? obj : sortObj;
  179. }
  180. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  181. var globalInterceptors = {};
  182. var scopedInterceptors = {};
  183. function mergeHook(parentVal, childVal) {
  184. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  185. return res ? dedupeHooks(res) : res;
  186. }
  187. function dedupeHooks(hooks) {
  188. var res = [];
  189. for (var i = 0; i < hooks.length; i++) {
  190. if (res.indexOf(hooks[i]) === -1) {
  191. res.push(hooks[i]);
  192. }
  193. }
  194. return res;
  195. }
  196. function removeHook(hooks, hook) {
  197. var index = hooks.indexOf(hook);
  198. if (index !== -1) {
  199. hooks.splice(index, 1);
  200. }
  201. }
  202. function mergeInterceptorHook(interceptor, option) {
  203. Object.keys(option).forEach(function (hook) {
  204. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  205. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  206. }
  207. });
  208. }
  209. function removeInterceptorHook(interceptor, option) {
  210. if (!interceptor || !option) {
  211. return;
  212. }
  213. Object.keys(option).forEach(function (hook) {
  214. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  215. removeHook(interceptor[hook], option[hook]);
  216. }
  217. });
  218. }
  219. function addInterceptor(method, option) {
  220. if (typeof method === 'string' && isPlainObject(option)) {
  221. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  222. } else if (isPlainObject(method)) {
  223. mergeInterceptorHook(globalInterceptors, method);
  224. }
  225. }
  226. function removeInterceptor(method, option) {
  227. if (typeof method === 'string') {
  228. if (isPlainObject(option)) {
  229. removeInterceptorHook(scopedInterceptors[method], option);
  230. } else {
  231. delete scopedInterceptors[method];
  232. }
  233. } else if (isPlainObject(method)) {
  234. removeInterceptorHook(globalInterceptors, method);
  235. }
  236. }
  237. function wrapperHook(hook) {
  238. return function (data) {
  239. return hook(data) || data;
  240. };
  241. }
  242. function isPromise(obj) {
  243. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  244. }
  245. function queue(hooks, data) {
  246. var promise = false;
  247. for (var i = 0; i < hooks.length; i++) {
  248. var hook = hooks[i];
  249. if (promise) {
  250. promise = Promise.resolve(wrapperHook(hook));
  251. } else {
  252. var res = hook(data);
  253. if (isPromise(res)) {
  254. promise = Promise.resolve(res);
  255. }
  256. if (res === false) {
  257. return {
  258. then: function then() {}
  259. };
  260. }
  261. }
  262. }
  263. return promise || {
  264. then: function then(callback) {
  265. return callback(data);
  266. }
  267. };
  268. }
  269. function wrapperOptions(interceptor) {
  270. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  271. ['success', 'fail', 'complete'].forEach(function (name) {
  272. if (Array.isArray(interceptor[name])) {
  273. var oldCallback = options[name];
  274. options[name] = function callbackInterceptor(res) {
  275. queue(interceptor[name], res).then(function (res) {
  276. /* eslint-disable no-mixed-operators */
  277. return isFn(oldCallback) && oldCallback(res) || res;
  278. });
  279. };
  280. }
  281. });
  282. return options;
  283. }
  284. function wrapperReturnValue(method, returnValue) {
  285. var returnValueHooks = [];
  286. if (Array.isArray(globalInterceptors.returnValue)) {
  287. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  288. }
  289. var interceptor = scopedInterceptors[method];
  290. if (interceptor && Array.isArray(interceptor.returnValue)) {
  291. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  292. }
  293. returnValueHooks.forEach(function (hook) {
  294. returnValue = hook(returnValue) || returnValue;
  295. });
  296. return returnValue;
  297. }
  298. function getApiInterceptorHooks(method) {
  299. var interceptor = Object.create(null);
  300. Object.keys(globalInterceptors).forEach(function (hook) {
  301. if (hook !== 'returnValue') {
  302. interceptor[hook] = globalInterceptors[hook].slice();
  303. }
  304. });
  305. var scopedInterceptor = scopedInterceptors[method];
  306. if (scopedInterceptor) {
  307. Object.keys(scopedInterceptor).forEach(function (hook) {
  308. if (hook !== 'returnValue') {
  309. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  310. }
  311. });
  312. }
  313. return interceptor;
  314. }
  315. function invokeApi(method, api, options) {
  316. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  317. params[_key - 3] = arguments[_key];
  318. }
  319. var interceptor = getApiInterceptorHooks(method);
  320. if (interceptor && Object.keys(interceptor).length) {
  321. if (Array.isArray(interceptor.invoke)) {
  322. var res = queue(interceptor.invoke, options);
  323. return res.then(function (options) {
  324. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  325. });
  326. } else {
  327. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  328. }
  329. }
  330. return api.apply(void 0, [options].concat(params));
  331. }
  332. var promiseInterceptor = {
  333. returnValue: function returnValue(res) {
  334. if (!isPromise(res)) {
  335. return res;
  336. }
  337. return new Promise(function (resolve, reject) {
  338. res.then(function (res) {
  339. if (res[0]) {
  340. reject(res[0]);
  341. } else {
  342. resolve(res[1]);
  343. }
  344. });
  345. });
  346. }
  347. };
  348. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting/;
  349. var CONTEXT_API_RE = /^create|Manager$/;
  350. // Context例外情况
  351. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  352. // 同步例外情况
  353. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  354. var CALLBACK_API_RE = /^on|^off/;
  355. function isContextApi(name) {
  356. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  357. }
  358. function isSyncApi(name) {
  359. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  360. }
  361. function isCallbackApi(name) {
  362. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  363. }
  364. function handlePromise(promise) {
  365. return promise.then(function (data) {
  366. return [null, data];
  367. }).catch(function (err) {
  368. return [err];
  369. });
  370. }
  371. function shouldPromise(name) {
  372. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  373. return false;
  374. }
  375. return true;
  376. }
  377. /* eslint-disable no-extend-native */
  378. if (!Promise.prototype.finally) {
  379. Promise.prototype.finally = function (callback) {
  380. var promise = this.constructor;
  381. return this.then(function (value) {
  382. return promise.resolve(callback()).then(function () {
  383. return value;
  384. });
  385. }, function (reason) {
  386. return promise.resolve(callback()).then(function () {
  387. throw reason;
  388. });
  389. });
  390. };
  391. }
  392. function promisify(name, api) {
  393. if (!shouldPromise(name) || !isFn(api)) {
  394. return api;
  395. }
  396. return function promiseApi() {
  397. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  398. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  399. params[_key2 - 1] = arguments[_key2];
  400. }
  401. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  402. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  403. }
  404. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  405. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  406. success: resolve,
  407. fail: reject
  408. })].concat(params));
  409. })));
  410. };
  411. }
  412. var EPS = 1e-4;
  413. var BASE_DEVICE_WIDTH = 750;
  414. var isIOS = false;
  415. var deviceWidth = 0;
  416. var deviceDPR = 0;
  417. function checkDeviceWidth() {
  418. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  419. platform = _wx$getSystemInfoSync.platform,
  420. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  421. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  422. deviceWidth = windowWidth;
  423. deviceDPR = pixelRatio;
  424. isIOS = platform === 'ios';
  425. }
  426. function upx2px(number, newDeviceWidth) {
  427. if (deviceWidth === 0) {
  428. checkDeviceWidth();
  429. }
  430. number = Number(number);
  431. if (number === 0) {
  432. return 0;
  433. }
  434. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  435. if (result < 0) {
  436. result = -result;
  437. }
  438. result = Math.floor(result + EPS);
  439. if (result === 0) {
  440. if (deviceDPR === 1 || !isIOS) {
  441. result = 1;
  442. } else {
  443. result = 0.5;
  444. }
  445. }
  446. return number < 0 ? -result : result;
  447. }
  448. var LOCALE_ZH_HANS = 'zh-Hans';
  449. var LOCALE_ZH_HANT = 'zh-Hant';
  450. var LOCALE_EN = 'en';
  451. var LOCALE_FR = 'fr';
  452. var LOCALE_ES = 'es';
  453. var messages = {};
  454. var locale;
  455. {
  456. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  457. }
  458. function initI18nMessages() {
  459. if (!isEnableLocale()) {
  460. return;
  461. }
  462. var localeKeys = Object.keys(__uniConfig.locales);
  463. if (localeKeys.length) {
  464. localeKeys.forEach(function (locale) {
  465. var curMessages = messages[locale];
  466. var userMessages = __uniConfig.locales[locale];
  467. if (curMessages) {
  468. Object.assign(curMessages, userMessages);
  469. } else {
  470. messages[locale] = userMessages;
  471. }
  472. });
  473. }
  474. }
  475. initI18nMessages();
  476. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  477. var t = i18n.t;
  478. var i18nMixin = i18n.mixin = {
  479. beforeCreate: function beforeCreate() {
  480. var _this = this;
  481. var unwatch = i18n.i18n.watchLocale(function () {
  482. _this.$forceUpdate();
  483. });
  484. this.$once('hook:beforeDestroy', function () {
  485. unwatch();
  486. });
  487. },
  488. methods: {
  489. $$t: function $$t(key, values) {
  490. return t(key, values);
  491. }
  492. }
  493. };
  494. var setLocale = i18n.setLocale;
  495. var getLocale = i18n.getLocale;
  496. function initAppLocale(Vue, appVm, locale) {
  497. var state = Vue.observable({
  498. locale: locale || i18n.getLocale()
  499. });
  500. var localeWatchers = [];
  501. appVm.$watchLocale = function (fn) {
  502. localeWatchers.push(fn);
  503. };
  504. Object.defineProperty(appVm, '$locale', {
  505. get: function get() {
  506. return state.locale;
  507. },
  508. set: function set(v) {
  509. state.locale = v;
  510. localeWatchers.forEach(function (watch) {
  511. return watch(v);
  512. });
  513. }
  514. });
  515. }
  516. function isEnableLocale() {
  517. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  518. }
  519. function include(str, parts) {
  520. return !!parts.find(function (part) {
  521. return str.indexOf(part) !== -1;
  522. });
  523. }
  524. function startsWith(str, parts) {
  525. return parts.find(function (part) {
  526. return str.indexOf(part) === 0;
  527. });
  528. }
  529. function normalizeLocale(locale, messages) {
  530. if (!locale) {
  531. return;
  532. }
  533. locale = locale.trim().replace(/_/g, '-');
  534. if (messages && messages[locale]) {
  535. return locale;
  536. }
  537. locale = locale.toLowerCase();
  538. if (locale === 'chinese') {
  539. // 支付宝
  540. return LOCALE_ZH_HANS;
  541. }
  542. if (locale.indexOf('zh') === 0) {
  543. if (locale.indexOf('-hans') > -1) {
  544. return LOCALE_ZH_HANS;
  545. }
  546. if (locale.indexOf('-hant') > -1) {
  547. return LOCALE_ZH_HANT;
  548. }
  549. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  550. return LOCALE_ZH_HANT;
  551. }
  552. return LOCALE_ZH_HANS;
  553. }
  554. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  555. if (lang) {
  556. return lang;
  557. }
  558. }
  559. // export function initI18n() {
  560. // const localeKeys = Object.keys(__uniConfig.locales || {})
  561. // if (localeKeys.length) {
  562. // localeKeys.forEach((locale) =>
  563. // i18n.add(locale, __uniConfig.locales[locale])
  564. // )
  565. // }
  566. // }
  567. function getLocale$1() {
  568. // 优先使用 $locale
  569. if (isFn(getApp)) {
  570. var app = getApp({
  571. allowDefault: true
  572. });
  573. if (app && app.$vm) {
  574. return app.$vm.$locale;
  575. }
  576. }
  577. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  578. }
  579. function setLocale$1(locale) {
  580. var app = isFn(getApp) ? getApp() : false;
  581. if (!app) {
  582. return false;
  583. }
  584. var oldLocale = app.$vm.$locale;
  585. if (oldLocale !== locale) {
  586. app.$vm.$locale = locale;
  587. onLocaleChangeCallbacks.forEach(function (fn) {
  588. return fn({
  589. locale: locale
  590. });
  591. });
  592. return true;
  593. }
  594. return false;
  595. }
  596. var onLocaleChangeCallbacks = [];
  597. function onLocaleChange(fn) {
  598. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  599. onLocaleChangeCallbacks.push(fn);
  600. }
  601. }
  602. if (typeof global !== 'undefined') {
  603. global.getLocale = getLocale$1;
  604. }
  605. var interceptors = {
  606. promiseInterceptor: promiseInterceptor
  607. };
  608. var baseApi = /*#__PURE__*/Object.freeze({
  609. __proto__: null,
  610. upx2px: upx2px,
  611. getLocale: getLocale$1,
  612. setLocale: setLocale$1,
  613. onLocaleChange: onLocaleChange,
  614. addInterceptor: addInterceptor,
  615. removeInterceptor: removeInterceptor,
  616. interceptors: interceptors
  617. });
  618. function findExistsPageIndex(url) {
  619. var pages = getCurrentPages();
  620. var len = pages.length;
  621. while (len--) {
  622. var page = pages[len];
  623. if (page.$page && page.$page.fullPath === url) {
  624. return len;
  625. }
  626. }
  627. return -1;
  628. }
  629. var redirectTo = {
  630. name: function name(fromArgs) {
  631. if (fromArgs.exists === 'back' && fromArgs.delta) {
  632. return 'navigateBack';
  633. }
  634. return 'redirectTo';
  635. },
  636. args: function args(fromArgs) {
  637. if (fromArgs.exists === 'back' && fromArgs.url) {
  638. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  639. if (existsPageIndex !== -1) {
  640. var delta = getCurrentPages().length - 1 - existsPageIndex;
  641. if (delta > 0) {
  642. fromArgs.delta = delta;
  643. }
  644. }
  645. }
  646. }
  647. };
  648. var previewImage = {
  649. args: function args(fromArgs) {
  650. var currentIndex = parseInt(fromArgs.current);
  651. if (isNaN(currentIndex)) {
  652. return;
  653. }
  654. var urls = fromArgs.urls;
  655. if (!Array.isArray(urls)) {
  656. return;
  657. }
  658. var len = urls.length;
  659. if (!len) {
  660. return;
  661. }
  662. if (currentIndex < 0) {
  663. currentIndex = 0;
  664. } else if (currentIndex >= len) {
  665. currentIndex = len - 1;
  666. }
  667. if (currentIndex > 0) {
  668. fromArgs.current = urls[currentIndex];
  669. fromArgs.urls = urls.filter(function (item, index) {
  670. return index < currentIndex ? item !== urls[currentIndex] : true;
  671. });
  672. } else {
  673. fromArgs.current = urls[0];
  674. }
  675. return {
  676. indicator: false,
  677. loop: false
  678. };
  679. }
  680. };
  681. var UUID_KEY = '__DC_STAT_UUID';
  682. var deviceId;
  683. function useDeviceId(result) {
  684. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  685. if (!deviceId) {
  686. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  687. wx.setStorage({
  688. key: UUID_KEY,
  689. data: deviceId
  690. });
  691. }
  692. result.deviceId = deviceId;
  693. }
  694. function addSafeAreaInsets(result) {
  695. if (result.safeArea) {
  696. var safeArea = result.safeArea;
  697. result.safeAreaInsets = {
  698. top: safeArea.top,
  699. left: safeArea.left,
  700. right: result.windowWidth - safeArea.right,
  701. bottom: result.screenHeight - safeArea.bottom
  702. };
  703. }
  704. }
  705. function populateParameters(result) {
  706. var _result$brand = result.brand,
  707. brand = _result$brand === void 0 ? '' : _result$brand,
  708. _result$model = result.model,
  709. model = _result$model === void 0 ? '' : _result$model,
  710. _result$system = result.system,
  711. system = _result$system === void 0 ? '' : _result$system,
  712. _result$language = result.language,
  713. language = _result$language === void 0 ? '' : _result$language,
  714. theme = result.theme,
  715. version = result.version,
  716. platform = result.platform,
  717. fontSizeSetting = result.fontSizeSetting,
  718. SDKVersion = result.SDKVersion,
  719. pixelRatio = result.pixelRatio,
  720. deviceOrientation = result.deviceOrientation;
  721. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  722. // osName osVersion
  723. var osName = '';
  724. var osVersion = '';
  725. {
  726. osName = system.split(' ')[0] || '';
  727. osVersion = system.split(' ')[1] || '';
  728. }
  729. var hostVersion = version;
  730. // deviceType
  731. var deviceType = getGetDeviceType(result, model);
  732. // deviceModel
  733. var deviceBrand = getDeviceBrand(brand);
  734. // hostName
  735. var _hostName = getHostName(result);
  736. // deviceOrientation
  737. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  738. // devicePixelRatio
  739. var _devicePixelRatio = pixelRatio;
  740. // SDKVersion
  741. var _SDKVersion = SDKVersion;
  742. // hostLanguage
  743. var hostLanguage = language.replace(/_/g, '-');
  744. // wx.getAccountInfoSync
  745. var parameters = {
  746. appId: "__UNI__2080341",
  747. appName: "益智游戏",
  748. appVersion: "1.1.0",
  749. appVersionCode: "110",
  750. appLanguage: getAppLanguage(hostLanguage),
  751. uniCompileVersion: "3.6.18",
  752. uniRuntimeVersion: "3.6.18",
  753. uniPlatform: undefined || "mp-weixin",
  754. deviceBrand: deviceBrand,
  755. deviceModel: model,
  756. deviceType: deviceType,
  757. devicePixelRatio: _devicePixelRatio,
  758. deviceOrientation: _deviceOrientation,
  759. osName: osName.toLocaleLowerCase(),
  760. osVersion: osVersion,
  761. hostTheme: theme,
  762. hostVersion: hostVersion,
  763. hostLanguage: hostLanguage,
  764. hostName: _hostName,
  765. hostSDKVersion: _SDKVersion,
  766. hostFontSizeSetting: fontSizeSetting,
  767. windowTop: 0,
  768. windowBottom: 0,
  769. // TODO
  770. osLanguage: undefined,
  771. osTheme: undefined,
  772. ua: undefined,
  773. hostPackageName: undefined,
  774. browserName: undefined,
  775. browserVersion: undefined
  776. };
  777. Object.assign(result, parameters);
  778. }
  779. function getGetDeviceType(result, model) {
  780. var deviceType = result.deviceType || 'phone';
  781. {
  782. var deviceTypeMaps = {
  783. ipad: 'pad',
  784. windows: 'pc',
  785. mac: 'pc'
  786. };
  787. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  788. var _model = model.toLocaleLowerCase();
  789. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  790. var _m = deviceTypeMapsKeys[index];
  791. if (_model.indexOf(_m) !== -1) {
  792. deviceType = deviceTypeMaps[_m];
  793. break;
  794. }
  795. }
  796. }
  797. return deviceType;
  798. }
  799. function getDeviceBrand(brand) {
  800. var deviceBrand = brand;
  801. if (deviceBrand) {
  802. deviceBrand = brand.toLocaleLowerCase();
  803. }
  804. return deviceBrand;
  805. }
  806. function getAppLanguage(defaultLanguage) {
  807. return getLocale$1 ? getLocale$1() : defaultLanguage;
  808. }
  809. function getHostName(result) {
  810. var _platform = 'WeChat';
  811. var _hostName = result.hostName || _platform; // mp-jd
  812. {
  813. if (result.environment) {
  814. _hostName = result.environment;
  815. } else if (result.host && result.host.env) {
  816. _hostName = result.host.env;
  817. }
  818. }
  819. return _hostName;
  820. }
  821. var getSystemInfo = {
  822. returnValue: function returnValue(result) {
  823. useDeviceId(result);
  824. addSafeAreaInsets(result);
  825. populateParameters(result);
  826. }
  827. };
  828. var showActionSheet = {
  829. args: function args(fromArgs) {
  830. if ((0, _typeof2.default)(fromArgs) === 'object') {
  831. fromArgs.alertText = fromArgs.title;
  832. }
  833. }
  834. };
  835. var getAppBaseInfo = {
  836. returnValue: function returnValue(result) {
  837. var _result = result,
  838. version = _result.version,
  839. language = _result.language,
  840. SDKVersion = _result.SDKVersion,
  841. theme = _result.theme;
  842. var _hostName = getHostName(result);
  843. var hostLanguage = language.replace('_', '-');
  844. result = sortObject(Object.assign(result, {
  845. appId: "__UNI__2080341",
  846. appName: "益智游戏",
  847. appVersion: "1.1.0",
  848. appVersionCode: "110",
  849. appLanguage: getAppLanguage(hostLanguage),
  850. hostVersion: version,
  851. hostLanguage: hostLanguage,
  852. hostName: _hostName,
  853. hostSDKVersion: SDKVersion,
  854. hostTheme: theme
  855. }));
  856. }
  857. };
  858. var getDeviceInfo = {
  859. returnValue: function returnValue(result) {
  860. var _result2 = result,
  861. brand = _result2.brand,
  862. model = _result2.model;
  863. var deviceType = getGetDeviceType(result, model);
  864. var deviceBrand = getDeviceBrand(brand);
  865. useDeviceId(result);
  866. result = sortObject(Object.assign(result, {
  867. deviceType: deviceType,
  868. deviceBrand: deviceBrand,
  869. deviceModel: model
  870. }));
  871. }
  872. };
  873. var getWindowInfo = {
  874. returnValue: function returnValue(result) {
  875. addSafeAreaInsets(result);
  876. result = sortObject(Object.assign(result, {
  877. windowTop: 0,
  878. windowBottom: 0
  879. }));
  880. }
  881. };
  882. var getAppAuthorizeSetting = {
  883. returnValue: function returnValue(result) {
  884. var locationReducedAccuracy = result.locationReducedAccuracy;
  885. result.locationAccuracy = 'unsupported';
  886. if (locationReducedAccuracy === true) {
  887. result.locationAccuracy = 'reduced';
  888. } else if (locationReducedAccuracy === false) {
  889. result.locationAccuracy = 'full';
  890. }
  891. }
  892. };
  893. // import navigateTo from 'uni-helpers/navigate-to'
  894. var protocols = {
  895. redirectTo: redirectTo,
  896. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  897. previewImage: previewImage,
  898. getSystemInfo: getSystemInfo,
  899. getSystemInfoSync: getSystemInfo,
  900. showActionSheet: showActionSheet,
  901. getAppBaseInfo: getAppBaseInfo,
  902. getDeviceInfo: getDeviceInfo,
  903. getWindowInfo: getWindowInfo,
  904. getAppAuthorizeSetting: getAppAuthorizeSetting
  905. };
  906. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  907. var canIUses = [];
  908. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  909. function processCallback(methodName, method, returnValue) {
  910. return function (res) {
  911. return method(processReturnValue(methodName, res, returnValue));
  912. };
  913. }
  914. function processArgs(methodName, fromArgs) {
  915. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  916. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  917. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  918. if (isPlainObject(fromArgs)) {
  919. // 一般 api 的参数解析
  920. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  921. if (isFn(argsOption)) {
  922. argsOption = argsOption(fromArgs, toArgs) || {};
  923. }
  924. for (var key in fromArgs) {
  925. if (hasOwn(argsOption, key)) {
  926. var keyOption = argsOption[key];
  927. if (isFn(keyOption)) {
  928. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  929. }
  930. if (!keyOption) {
  931. // 不支持的参数
  932. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  933. } else if (isStr(keyOption)) {
  934. // 重写参数 key
  935. toArgs[keyOption] = fromArgs[key];
  936. } else if (isPlainObject(keyOption)) {
  937. // {name:newName,value:value}可重新指定参数 key:value
  938. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  939. }
  940. } else if (CALLBACKS.indexOf(key) !== -1) {
  941. if (isFn(fromArgs[key])) {
  942. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  943. }
  944. } else {
  945. if (!keepFromArgs) {
  946. toArgs[key] = fromArgs[key];
  947. }
  948. }
  949. }
  950. return toArgs;
  951. } else if (isFn(fromArgs)) {
  952. fromArgs = processCallback(methodName, fromArgs, returnValue);
  953. }
  954. return fromArgs;
  955. }
  956. function processReturnValue(methodName, res, returnValue) {
  957. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  958. if (isFn(protocols.returnValue)) {
  959. // 处理通用 returnValue
  960. res = protocols.returnValue(methodName, res);
  961. }
  962. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  963. }
  964. function wrapper(methodName, method) {
  965. if (hasOwn(protocols, methodName)) {
  966. var protocol = protocols[methodName];
  967. if (!protocol) {
  968. // 暂不支持的 api
  969. return function () {
  970. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  971. };
  972. }
  973. return function (arg1, arg2) {
  974. // 目前 api 最多两个参数
  975. var options = protocol;
  976. if (isFn(protocol)) {
  977. options = protocol(arg1);
  978. }
  979. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  980. var args = [arg1];
  981. if (typeof arg2 !== 'undefined') {
  982. args.push(arg2);
  983. }
  984. if (isFn(options.name)) {
  985. methodName = options.name(arg1);
  986. } else if (isStr(options.name)) {
  987. methodName = options.name;
  988. }
  989. var returnValue = wx[methodName].apply(wx, args);
  990. if (isSyncApi(methodName)) {
  991. // 同步 api
  992. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  993. }
  994. return returnValue;
  995. };
  996. }
  997. return method;
  998. }
  999. var todoApis = Object.create(null);
  1000. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1001. function createTodoApi(name) {
  1002. return function todoApi(_ref) {
  1003. var fail = _ref.fail,
  1004. complete = _ref.complete;
  1005. var res = {
  1006. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1007. };
  1008. isFn(fail) && fail(res);
  1009. isFn(complete) && complete(res);
  1010. };
  1011. }
  1012. TODOS.forEach(function (name) {
  1013. todoApis[name] = createTodoApi(name);
  1014. });
  1015. var providers = {
  1016. oauth: ['weixin'],
  1017. share: ['weixin'],
  1018. payment: ['wxpay'],
  1019. push: ['weixin']
  1020. };
  1021. function getProvider(_ref2) {
  1022. var service = _ref2.service,
  1023. success = _ref2.success,
  1024. fail = _ref2.fail,
  1025. complete = _ref2.complete;
  1026. var res = false;
  1027. if (providers[service]) {
  1028. res = {
  1029. errMsg: 'getProvider:ok',
  1030. service: service,
  1031. provider: providers[service]
  1032. };
  1033. isFn(success) && success(res);
  1034. } else {
  1035. res = {
  1036. errMsg: 'getProvider:fail service not found'
  1037. };
  1038. isFn(fail) && fail(res);
  1039. }
  1040. isFn(complete) && complete(res);
  1041. }
  1042. var extraApi = /*#__PURE__*/Object.freeze({
  1043. __proto__: null,
  1044. getProvider: getProvider
  1045. });
  1046. var getEmitter = function () {
  1047. var Emitter;
  1048. return function getUniEmitter() {
  1049. if (!Emitter) {
  1050. Emitter = new _vue.default();
  1051. }
  1052. return Emitter;
  1053. };
  1054. }();
  1055. function apply(ctx, method, args) {
  1056. return ctx[method].apply(ctx, args);
  1057. }
  1058. function $on() {
  1059. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1060. }
  1061. function $off() {
  1062. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1063. }
  1064. function $once() {
  1065. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1066. }
  1067. function $emit() {
  1068. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1069. }
  1070. var eventApi = /*#__PURE__*/Object.freeze({
  1071. __proto__: null,
  1072. $on: $on,
  1073. $off: $off,
  1074. $once: $once,
  1075. $emit: $emit
  1076. });
  1077. /**
  1078. * 框架内 try-catch
  1079. */
  1080. /**
  1081. * 开发者 try-catch
  1082. */
  1083. function tryCatch(fn) {
  1084. return function () {
  1085. try {
  1086. return fn.apply(fn, arguments);
  1087. } catch (e) {
  1088. // TODO
  1089. console.error(e);
  1090. }
  1091. };
  1092. }
  1093. function getApiCallbacks(params) {
  1094. var apiCallbacks = {};
  1095. for (var name in params) {
  1096. var param = params[name];
  1097. if (isFn(param)) {
  1098. apiCallbacks[name] = tryCatch(param);
  1099. delete params[name];
  1100. }
  1101. }
  1102. return apiCallbacks;
  1103. }
  1104. var cid;
  1105. var cidErrMsg;
  1106. var enabled;
  1107. function normalizePushMessage(message) {
  1108. try {
  1109. return JSON.parse(message);
  1110. } catch (e) {}
  1111. return message;
  1112. }
  1113. function invokePushCallback(args) {
  1114. if (args.type === 'enabled') {
  1115. enabled = true;
  1116. } else if (args.type === 'clientId') {
  1117. cid = args.cid;
  1118. cidErrMsg = args.errMsg;
  1119. invokeGetPushCidCallbacks(cid, args.errMsg);
  1120. } else if (args.type === 'pushMsg') {
  1121. var message = {
  1122. type: 'receive',
  1123. data: normalizePushMessage(args.message)
  1124. };
  1125. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1126. var callback = onPushMessageCallbacks[i];
  1127. callback(message);
  1128. // 该消息已被阻止
  1129. if (message.stopped) {
  1130. break;
  1131. }
  1132. }
  1133. } else if (args.type === 'click') {
  1134. onPushMessageCallbacks.forEach(function (callback) {
  1135. callback({
  1136. type: 'click',
  1137. data: normalizePushMessage(args.message)
  1138. });
  1139. });
  1140. }
  1141. }
  1142. var getPushCidCallbacks = [];
  1143. function invokeGetPushCidCallbacks(cid, errMsg) {
  1144. getPushCidCallbacks.forEach(function (callback) {
  1145. callback(cid, errMsg);
  1146. });
  1147. getPushCidCallbacks.length = 0;
  1148. }
  1149. function getPushClientId(args) {
  1150. if (!isPlainObject(args)) {
  1151. args = {};
  1152. }
  1153. var _getApiCallbacks = getApiCallbacks(args),
  1154. success = _getApiCallbacks.success,
  1155. fail = _getApiCallbacks.fail,
  1156. complete = _getApiCallbacks.complete;
  1157. var hasSuccess = isFn(success);
  1158. var hasFail = isFn(fail);
  1159. var hasComplete = isFn(complete);
  1160. Promise.resolve().then(function () {
  1161. if (typeof enabled === 'undefined') {
  1162. enabled = false;
  1163. cid = '';
  1164. cidErrMsg = 'uniPush is not enabled';
  1165. }
  1166. getPushCidCallbacks.push(function (cid, errMsg) {
  1167. var res;
  1168. if (cid) {
  1169. res = {
  1170. errMsg: 'getPushClientId:ok',
  1171. cid: cid
  1172. };
  1173. hasSuccess && success(res);
  1174. } else {
  1175. res = {
  1176. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1177. };
  1178. hasFail && fail(res);
  1179. }
  1180. hasComplete && complete(res);
  1181. });
  1182. if (typeof cid !== 'undefined') {
  1183. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1184. }
  1185. });
  1186. }
  1187. var onPushMessageCallbacks = [];
  1188. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1189. var onPushMessage = function onPushMessage(fn) {
  1190. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1191. onPushMessageCallbacks.push(fn);
  1192. }
  1193. };
  1194. var offPushMessage = function offPushMessage(fn) {
  1195. if (!fn) {
  1196. onPushMessageCallbacks.length = 0;
  1197. } else {
  1198. var index = onPushMessageCallbacks.indexOf(fn);
  1199. if (index > -1) {
  1200. onPushMessageCallbacks.splice(index, 1);
  1201. }
  1202. }
  1203. };
  1204. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1205. if (!baseInfo) {
  1206. baseInfo = wx.getSystemInfoSync();
  1207. }
  1208. var host = baseInfo ? baseInfo.host : null;
  1209. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1210. var api = /*#__PURE__*/Object.freeze({
  1211. __proto__: null,
  1212. shareVideoMessage: shareVideoMessage,
  1213. getPushClientId: getPushClientId,
  1214. onPushMessage: onPushMessage,
  1215. offPushMessage: offPushMessage,
  1216. invokePushCallback: invokePushCallback
  1217. });
  1218. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1219. function findVmByVueId(vm, vuePid) {
  1220. var $children = vm.$children;
  1221. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1222. for (var i = $children.length - 1; i >= 0; i--) {
  1223. var childVm = $children[i];
  1224. if (childVm.$scope._$vueId === vuePid) {
  1225. return childVm;
  1226. }
  1227. }
  1228. // 反向递归查找
  1229. var parentVm;
  1230. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1231. parentVm = findVmByVueId($children[_i], vuePid);
  1232. if (parentVm) {
  1233. return parentVm;
  1234. }
  1235. }
  1236. }
  1237. function initBehavior(options) {
  1238. return Behavior(options);
  1239. }
  1240. function isPage() {
  1241. return !!this.route;
  1242. }
  1243. function initRelation(detail) {
  1244. this.triggerEvent('__l', detail);
  1245. }
  1246. function selectAllComponents(mpInstance, selector, $refs) {
  1247. var components = mpInstance.selectAllComponents(selector) || [];
  1248. components.forEach(function (component) {
  1249. var ref = component.dataset.ref;
  1250. $refs[ref] = component.$vm || toSkip(component);
  1251. {
  1252. if (component.dataset.vueGeneric === 'scoped') {
  1253. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1254. selectAllComponents(scopedComponent, selector, $refs);
  1255. });
  1256. }
  1257. }
  1258. });
  1259. }
  1260. function syncRefs(refs, newRefs) {
  1261. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1262. var newKeys = Object.keys(newRefs);
  1263. newKeys.forEach(function (key) {
  1264. var oldValue = refs[key];
  1265. var newValue = newRefs[key];
  1266. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1267. return oldValue.includes(value);
  1268. })) {
  1269. return;
  1270. }
  1271. refs[key] = newValue;
  1272. oldKeys.delete(key);
  1273. });
  1274. oldKeys.forEach(function (key) {
  1275. delete refs[key];
  1276. });
  1277. return refs;
  1278. }
  1279. function initRefs(vm) {
  1280. var mpInstance = vm.$scope;
  1281. var refs = {};
  1282. Object.defineProperty(vm, '$refs', {
  1283. get: function get() {
  1284. var $refs = {};
  1285. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1286. // TODO 暂不考虑 for 中的 scoped
  1287. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1288. forComponents.forEach(function (component) {
  1289. var ref = component.dataset.ref;
  1290. if (!$refs[ref]) {
  1291. $refs[ref] = [];
  1292. }
  1293. $refs[ref].push(component.$vm || toSkip(component));
  1294. });
  1295. return syncRefs(refs, $refs);
  1296. }
  1297. });
  1298. }
  1299. function handleLink(event) {
  1300. var _ref3 = event.detail || event.value,
  1301. vuePid = _ref3.vuePid,
  1302. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1303. var parentVm;
  1304. if (vuePid) {
  1305. parentVm = findVmByVueId(this.$vm, vuePid);
  1306. }
  1307. if (!parentVm) {
  1308. parentVm = this.$vm;
  1309. }
  1310. vueOptions.parent = parentVm;
  1311. }
  1312. function markMPComponent(component) {
  1313. // 在 Vue 中标记为小程序组件
  1314. var IS_MP = '__v_isMPComponent';
  1315. Object.defineProperty(component, IS_MP, {
  1316. configurable: true,
  1317. enumerable: false,
  1318. value: true
  1319. });
  1320. return component;
  1321. }
  1322. function toSkip(obj) {
  1323. var OB = '__ob__';
  1324. var SKIP = '__v_skip';
  1325. if (isObject(obj) && Object.isExtensible(obj)) {
  1326. // 避免被 @vue/composition-api 观测
  1327. Object.defineProperty(obj, OB, {
  1328. configurable: true,
  1329. enumerable: false,
  1330. value: (0, _defineProperty2.default)({}, SKIP, true)
  1331. });
  1332. }
  1333. return obj;
  1334. }
  1335. var MPPage = Page;
  1336. var MPComponent = Component;
  1337. var customizeRE = /:/g;
  1338. var customize = cached(function (str) {
  1339. return camelize(str.replace(customizeRE, '-'));
  1340. });
  1341. function initTriggerEvent(mpInstance) {
  1342. var oldTriggerEvent = mpInstance.triggerEvent;
  1343. var newTriggerEvent = function newTriggerEvent(event) {
  1344. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1345. args[_key3 - 1] = arguments[_key3];
  1346. }
  1347. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1348. if (this.$vm || this.dataset && this.dataset.comType) {
  1349. event = customize(event);
  1350. } else {
  1351. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1352. var newEvent = customize(event);
  1353. if (newEvent !== event) {
  1354. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1355. }
  1356. }
  1357. return oldTriggerEvent.apply(this, [event].concat(args));
  1358. };
  1359. try {
  1360. // 京东小程序 triggerEvent 为只读
  1361. mpInstance.triggerEvent = newTriggerEvent;
  1362. } catch (error) {
  1363. mpInstance._triggerEvent = newTriggerEvent;
  1364. }
  1365. }
  1366. function initHook(name, options, isComponent) {
  1367. var oldHook = options[name];
  1368. options[name] = function () {
  1369. markMPComponent(this);
  1370. initTriggerEvent(this);
  1371. if (oldHook) {
  1372. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1373. args[_key4] = arguments[_key4];
  1374. }
  1375. return oldHook.apply(this, args);
  1376. }
  1377. };
  1378. }
  1379. if (!MPPage.__$wrappered) {
  1380. MPPage.__$wrappered = true;
  1381. Page = function Page() {
  1382. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1383. initHook('onLoad', options);
  1384. return MPPage(options);
  1385. };
  1386. Page.after = MPPage.after;
  1387. Component = function Component() {
  1388. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1389. initHook('created', options);
  1390. return MPComponent(options);
  1391. };
  1392. }
  1393. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1394. function initMocks(vm, mocks) {
  1395. var mpInstance = vm.$mp[vm.mpType];
  1396. mocks.forEach(function (mock) {
  1397. if (hasOwn(mpInstance, mock)) {
  1398. vm[mock] = mpInstance[mock];
  1399. }
  1400. });
  1401. }
  1402. function hasHook(hook, vueOptions) {
  1403. if (!vueOptions) {
  1404. return true;
  1405. }
  1406. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1407. return true;
  1408. }
  1409. vueOptions = vueOptions.default || vueOptions;
  1410. if (isFn(vueOptions)) {
  1411. if (isFn(vueOptions.extendOptions[hook])) {
  1412. return true;
  1413. }
  1414. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1415. return true;
  1416. }
  1417. return false;
  1418. }
  1419. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1420. return true;
  1421. }
  1422. var mixins = vueOptions.mixins;
  1423. if (Array.isArray(mixins)) {
  1424. return !!mixins.find(function (mixin) {
  1425. return hasHook(hook, mixin);
  1426. });
  1427. }
  1428. }
  1429. function initHooks(mpOptions, hooks, vueOptions) {
  1430. hooks.forEach(function (hook) {
  1431. if (hasHook(hook, vueOptions)) {
  1432. mpOptions[hook] = function (args) {
  1433. return this.$vm && this.$vm.__call_hook(hook, args);
  1434. };
  1435. }
  1436. });
  1437. }
  1438. function initUnknownHooks(mpOptions, vueOptions) {
  1439. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1440. findHooks(vueOptions).forEach(function (hook) {
  1441. return initHook$1(mpOptions, hook, excludes);
  1442. });
  1443. }
  1444. function findHooks(vueOptions) {
  1445. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1446. if (vueOptions) {
  1447. Object.keys(vueOptions).forEach(function (name) {
  1448. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1449. hooks.push(name);
  1450. }
  1451. });
  1452. }
  1453. return hooks;
  1454. }
  1455. function initHook$1(mpOptions, hook, excludes) {
  1456. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1457. mpOptions[hook] = function (args) {
  1458. return this.$vm && this.$vm.__call_hook(hook, args);
  1459. };
  1460. }
  1461. }
  1462. function initVueComponent(Vue, vueOptions) {
  1463. vueOptions = vueOptions.default || vueOptions;
  1464. var VueComponent;
  1465. if (isFn(vueOptions)) {
  1466. VueComponent = vueOptions;
  1467. } else {
  1468. VueComponent = Vue.extend(vueOptions);
  1469. }
  1470. vueOptions = VueComponent.options;
  1471. return [VueComponent, vueOptions];
  1472. }
  1473. function initSlots(vm, vueSlots) {
  1474. if (Array.isArray(vueSlots) && vueSlots.length) {
  1475. var $slots = Object.create(null);
  1476. vueSlots.forEach(function (slotName) {
  1477. $slots[slotName] = true;
  1478. });
  1479. vm.$scopedSlots = vm.$slots = $slots;
  1480. }
  1481. }
  1482. function initVueIds(vueIds, mpInstance) {
  1483. vueIds = (vueIds || '').split(',');
  1484. var len = vueIds.length;
  1485. if (len === 1) {
  1486. mpInstance._$vueId = vueIds[0];
  1487. } else if (len === 2) {
  1488. mpInstance._$vueId = vueIds[0];
  1489. mpInstance._$vuePid = vueIds[1];
  1490. }
  1491. }
  1492. function initData(vueOptions, context) {
  1493. var data = vueOptions.data || {};
  1494. var methods = vueOptions.methods || {};
  1495. if (typeof data === 'function') {
  1496. try {
  1497. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1498. } catch (e) {
  1499. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1500. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1501. }
  1502. }
  1503. } else {
  1504. try {
  1505. // 对 data 格式化
  1506. data = JSON.parse(JSON.stringify(data));
  1507. } catch (e) {}
  1508. }
  1509. if (!isPlainObject(data)) {
  1510. data = {};
  1511. }
  1512. Object.keys(methods).forEach(function (methodName) {
  1513. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1514. data[methodName] = methods[methodName];
  1515. }
  1516. });
  1517. return data;
  1518. }
  1519. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1520. function createObserver(name) {
  1521. return function observer(newVal, oldVal) {
  1522. if (this.$vm) {
  1523. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1524. }
  1525. };
  1526. }
  1527. function initBehaviors(vueOptions, initBehavior) {
  1528. var vueBehaviors = vueOptions.behaviors;
  1529. var vueExtends = vueOptions.extends;
  1530. var vueMixins = vueOptions.mixins;
  1531. var vueProps = vueOptions.props;
  1532. if (!vueProps) {
  1533. vueOptions.props = vueProps = [];
  1534. }
  1535. var behaviors = [];
  1536. if (Array.isArray(vueBehaviors)) {
  1537. vueBehaviors.forEach(function (behavior) {
  1538. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1539. if (behavior === 'uni://form-field') {
  1540. if (Array.isArray(vueProps)) {
  1541. vueProps.push('name');
  1542. vueProps.push('value');
  1543. } else {
  1544. vueProps.name = {
  1545. type: String,
  1546. default: ''
  1547. };
  1548. vueProps.value = {
  1549. type: [String, Number, Boolean, Array, Object, Date],
  1550. default: ''
  1551. };
  1552. }
  1553. }
  1554. });
  1555. }
  1556. if (isPlainObject(vueExtends) && vueExtends.props) {
  1557. behaviors.push(initBehavior({
  1558. properties: initProperties(vueExtends.props, true)
  1559. }));
  1560. }
  1561. if (Array.isArray(vueMixins)) {
  1562. vueMixins.forEach(function (vueMixin) {
  1563. if (isPlainObject(vueMixin) && vueMixin.props) {
  1564. behaviors.push(initBehavior({
  1565. properties: initProperties(vueMixin.props, true)
  1566. }));
  1567. }
  1568. });
  1569. }
  1570. return behaviors;
  1571. }
  1572. function parsePropType(key, type, defaultValue, file) {
  1573. // [String]=>String
  1574. if (Array.isArray(type) && type.length === 1) {
  1575. return type[0];
  1576. }
  1577. return type;
  1578. }
  1579. function initProperties(props) {
  1580. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1581. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1582. var options = arguments.length > 3 ? arguments[3] : undefined;
  1583. var properties = {};
  1584. if (!isBehavior) {
  1585. properties.vueId = {
  1586. type: String,
  1587. value: ''
  1588. };
  1589. {
  1590. if (options.virtualHost) {
  1591. properties.virtualHostStyle = {
  1592. type: null,
  1593. value: ''
  1594. };
  1595. properties.virtualHostClass = {
  1596. type: null,
  1597. value: ''
  1598. };
  1599. }
  1600. }
  1601. // scopedSlotsCompiler auto
  1602. properties.scopedSlotsCompiler = {
  1603. type: String,
  1604. value: ''
  1605. };
  1606. properties.vueSlots = {
  1607. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1608. type: null,
  1609. value: [],
  1610. observer: function observer(newVal, oldVal) {
  1611. var $slots = Object.create(null);
  1612. newVal.forEach(function (slotName) {
  1613. $slots[slotName] = true;
  1614. });
  1615. this.setData({
  1616. $slots: $slots
  1617. });
  1618. }
  1619. };
  1620. }
  1621. if (Array.isArray(props)) {
  1622. // ['title']
  1623. props.forEach(function (key) {
  1624. properties[key] = {
  1625. type: null,
  1626. observer: createObserver(key)
  1627. };
  1628. });
  1629. } else if (isPlainObject(props)) {
  1630. // {title:{type:String,default:''},content:String}
  1631. Object.keys(props).forEach(function (key) {
  1632. var opts = props[key];
  1633. if (isPlainObject(opts)) {
  1634. // title:{type:String,default:''}
  1635. var value = opts.default;
  1636. if (isFn(value)) {
  1637. value = value();
  1638. }
  1639. opts.type = parsePropType(key, opts.type);
  1640. properties[key] = {
  1641. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1642. value: value,
  1643. observer: createObserver(key)
  1644. };
  1645. } else {
  1646. // content:String
  1647. var type = parsePropType(key, opts);
  1648. properties[key] = {
  1649. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1650. observer: createObserver(key)
  1651. };
  1652. }
  1653. });
  1654. }
  1655. return properties;
  1656. }
  1657. function wrapper$1(event) {
  1658. // TODO 又得兼容 mpvue 的 mp 对象
  1659. try {
  1660. event.mp = JSON.parse(JSON.stringify(event));
  1661. } catch (e) {}
  1662. event.stopPropagation = noop;
  1663. event.preventDefault = noop;
  1664. event.target = event.target || {};
  1665. if (!hasOwn(event, 'detail')) {
  1666. event.detail = {};
  1667. }
  1668. if (hasOwn(event, 'markerId')) {
  1669. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1670. event.detail.markerId = event.markerId;
  1671. }
  1672. if (isPlainObject(event.detail)) {
  1673. event.target = Object.assign({}, event.target, event.detail);
  1674. }
  1675. return event;
  1676. }
  1677. function getExtraValue(vm, dataPathsArray) {
  1678. var context = vm;
  1679. dataPathsArray.forEach(function (dataPathArray) {
  1680. var dataPath = dataPathArray[0];
  1681. var value = dataPathArray[2];
  1682. if (dataPath || typeof value !== 'undefined') {
  1683. // ['','',index,'disable']
  1684. var propPath = dataPathArray[1];
  1685. var valuePath = dataPathArray[3];
  1686. var vFor;
  1687. if (Number.isInteger(dataPath)) {
  1688. vFor = dataPath;
  1689. } else if (!dataPath) {
  1690. vFor = context;
  1691. } else if (typeof dataPath === 'string' && dataPath) {
  1692. if (dataPath.indexOf('#s#') === 0) {
  1693. vFor = dataPath.substr(3);
  1694. } else {
  1695. vFor = vm.__get_value(dataPath, context);
  1696. }
  1697. }
  1698. if (Number.isInteger(vFor)) {
  1699. context = value;
  1700. } else if (!propPath) {
  1701. context = vFor[value];
  1702. } else {
  1703. if (Array.isArray(vFor)) {
  1704. context = vFor.find(function (vForItem) {
  1705. return vm.__get_value(propPath, vForItem) === value;
  1706. });
  1707. } else if (isPlainObject(vFor)) {
  1708. context = Object.keys(vFor).find(function (vForKey) {
  1709. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1710. });
  1711. } else {
  1712. console.error('v-for 暂不支持循环数据:', vFor);
  1713. }
  1714. }
  1715. if (valuePath) {
  1716. context = vm.__get_value(valuePath, context);
  1717. }
  1718. }
  1719. });
  1720. return context;
  1721. }
  1722. function processEventExtra(vm, extra, event, __args__) {
  1723. var extraObj = {};
  1724. if (Array.isArray(extra) && extra.length) {
  1725. /**
  1726. *[
  1727. * ['data.items', 'data.id', item.data.id],
  1728. * ['metas', 'id', meta.id]
  1729. *],
  1730. *[
  1731. * ['data.items', 'data.id', item.data.id],
  1732. * ['metas', 'id', meta.id]
  1733. *],
  1734. *'test'
  1735. */
  1736. extra.forEach(function (dataPath, index) {
  1737. if (typeof dataPath === 'string') {
  1738. if (!dataPath) {
  1739. // model,prop.sync
  1740. extraObj['$' + index] = vm;
  1741. } else {
  1742. if (dataPath === '$event') {
  1743. // $event
  1744. extraObj['$' + index] = event;
  1745. } else if (dataPath === 'arguments') {
  1746. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1747. } else if (dataPath.indexOf('$event.') === 0) {
  1748. // $event.target.value
  1749. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1750. } else {
  1751. extraObj['$' + index] = vm.__get_value(dataPath);
  1752. }
  1753. }
  1754. } else {
  1755. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1756. }
  1757. });
  1758. }
  1759. return extraObj;
  1760. }
  1761. function getObjByArray(arr) {
  1762. var obj = {};
  1763. for (var i = 1; i < arr.length; i++) {
  1764. var element = arr[i];
  1765. obj[element[0]] = element[1];
  1766. }
  1767. return obj;
  1768. }
  1769. function processEventArgs(vm, event) {
  1770. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1771. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1772. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1773. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1774. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1775. // fixed 用户直接触发 mpInstance.triggerEvent
  1776. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1777. if (isCustom) {
  1778. // 自定义事件
  1779. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1780. if (!args.length) {
  1781. // 无参数,直接传入 event 或 detail 数组
  1782. if (isCustomMPEvent) {
  1783. return [event];
  1784. }
  1785. return __args__;
  1786. }
  1787. }
  1788. var extraObj = processEventExtra(vm, extra, event, __args__);
  1789. var ret = [];
  1790. args.forEach(function (arg) {
  1791. if (arg === '$event') {
  1792. if (methodName === '__set_model' && !isCustom) {
  1793. // input v-model value
  1794. ret.push(event.target.value);
  1795. } else {
  1796. if (isCustom && !isCustomMPEvent) {
  1797. ret.push(__args__[0]);
  1798. } else {
  1799. // wxcomponent 组件或内置组件
  1800. ret.push(event);
  1801. }
  1802. }
  1803. } else {
  1804. if (Array.isArray(arg) && arg[0] === 'o') {
  1805. ret.push(getObjByArray(arg));
  1806. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1807. ret.push(extraObj[arg]);
  1808. } else {
  1809. ret.push(arg);
  1810. }
  1811. }
  1812. });
  1813. return ret;
  1814. }
  1815. var ONCE = '~';
  1816. var CUSTOM = '^';
  1817. function isMatchEventType(eventType, optType) {
  1818. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1819. }
  1820. function getContextVm(vm) {
  1821. var $parent = vm.$parent;
  1822. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1823. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1824. $parent = $parent.$parent;
  1825. }
  1826. return $parent && $parent.$parent;
  1827. }
  1828. function handleEvent(event) {
  1829. var _this2 = this;
  1830. event = wrapper$1(event);
  1831. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1832. var dataset = (event.currentTarget || event.target).dataset;
  1833. if (!dataset) {
  1834. return console.warn('事件信息不存在');
  1835. }
  1836. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1837. if (!eventOpts) {
  1838. return console.warn('事件信息不存在');
  1839. }
  1840. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1841. var eventType = event.type;
  1842. var ret = [];
  1843. eventOpts.forEach(function (eventOpt) {
  1844. var type = eventOpt[0];
  1845. var eventsArray = eventOpt[1];
  1846. var isCustom = type.charAt(0) === CUSTOM;
  1847. type = isCustom ? type.slice(1) : type;
  1848. var isOnce = type.charAt(0) === ONCE;
  1849. type = isOnce ? type.slice(1) : type;
  1850. if (eventsArray && isMatchEventType(eventType, type)) {
  1851. eventsArray.forEach(function (eventArray) {
  1852. var methodName = eventArray[0];
  1853. if (methodName) {
  1854. var handlerCtx = _this2.$vm;
  1855. if (handlerCtx.$options.generic) {
  1856. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1857. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1858. }
  1859. if (methodName === '$emit') {
  1860. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1861. return;
  1862. }
  1863. var handler = handlerCtx[methodName];
  1864. if (!isFn(handler)) {
  1865. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1866. var path = _this2.route || _this2.is;
  1867. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1868. }
  1869. if (isOnce) {
  1870. if (handler.once) {
  1871. return;
  1872. }
  1873. handler.once = true;
  1874. }
  1875. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1876. params = Array.isArray(params) ? params : [];
  1877. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1878. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1879. // eslint-disable-next-line no-sparse-arrays
  1880. params = params.concat([,,,,,,,,,, event]);
  1881. }
  1882. ret.push(handler.apply(handlerCtx, params));
  1883. }
  1884. });
  1885. }
  1886. });
  1887. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  1888. return ret[0];
  1889. }
  1890. }
  1891. var eventChannels = {};
  1892. var eventChannelStack = [];
  1893. function getEventChannel(id) {
  1894. if (id) {
  1895. var eventChannel = eventChannels[id];
  1896. delete eventChannels[id];
  1897. return eventChannel;
  1898. }
  1899. return eventChannelStack.shift();
  1900. }
  1901. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  1902. function initEventChannel() {
  1903. _vue.default.prototype.getOpenerEventChannel = function () {
  1904. // 微信小程序使用自身getOpenerEventChannel
  1905. {
  1906. return this.$scope.getOpenerEventChannel();
  1907. }
  1908. };
  1909. var callHook = _vue.default.prototype.__call_hook;
  1910. _vue.default.prototype.__call_hook = function (hook, args) {
  1911. if (hook === 'onLoad' && args && args.__id__) {
  1912. this.__eventChannel__ = getEventChannel(args.__id__);
  1913. delete args.__id__;
  1914. }
  1915. return callHook.call(this, hook, args);
  1916. };
  1917. }
  1918. function initScopedSlotsParams() {
  1919. var center = {};
  1920. var parents = {};
  1921. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1922. var has = center[vueId];
  1923. if (!has) {
  1924. parents[vueId] = this;
  1925. this.$on('hook:destroyed', function () {
  1926. delete parents[vueId];
  1927. });
  1928. }
  1929. return has;
  1930. };
  1931. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1932. var data = center[vueId];
  1933. if (data) {
  1934. var object = data[name] || {};
  1935. return key ? object[key] : object;
  1936. } else {
  1937. parents[vueId] = this;
  1938. this.$on('hook:destroyed', function () {
  1939. delete parents[vueId];
  1940. });
  1941. }
  1942. };
  1943. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1944. var vueIds = this.$options.propsData.vueId;
  1945. if (vueIds) {
  1946. var vueId = vueIds.split(',')[0];
  1947. var object = center[vueId] = center[vueId] || {};
  1948. object[name] = value;
  1949. if (parents[vueId]) {
  1950. parents[vueId].$forceUpdate();
  1951. }
  1952. }
  1953. };
  1954. _vue.default.mixin({
  1955. destroyed: function destroyed() {
  1956. var propsData = this.$options.propsData;
  1957. var vueId = propsData && propsData.vueId;
  1958. if (vueId) {
  1959. delete center[vueId];
  1960. delete parents[vueId];
  1961. }
  1962. }
  1963. });
  1964. }
  1965. function parseBaseApp(vm, _ref4) {
  1966. var mocks = _ref4.mocks,
  1967. initRefs = _ref4.initRefs;
  1968. initEventChannel();
  1969. {
  1970. initScopedSlotsParams();
  1971. }
  1972. if (vm.$options.store) {
  1973. _vue.default.prototype.$store = vm.$options.store;
  1974. }
  1975. uniIdMixin(_vue.default);
  1976. _vue.default.prototype.mpHost = "mp-weixin";
  1977. _vue.default.mixin({
  1978. beforeCreate: function beforeCreate() {
  1979. if (!this.$options.mpType) {
  1980. return;
  1981. }
  1982. this.mpType = this.$options.mpType;
  1983. this.$mp = (0, _defineProperty2.default)({
  1984. data: {}
  1985. }, this.mpType, this.$options.mpInstance);
  1986. this.$scope = this.$options.mpInstance;
  1987. delete this.$options.mpType;
  1988. delete this.$options.mpInstance;
  1989. if (this.mpType === 'page' && typeof getApp === 'function') {
  1990. // hack vue-i18n
  1991. var app = getApp();
  1992. if (app.$vm && app.$vm.$i18n) {
  1993. this._i18n = app.$vm.$i18n;
  1994. }
  1995. }
  1996. if (this.mpType !== 'app') {
  1997. initRefs(this);
  1998. initMocks(this, mocks);
  1999. }
  2000. }
  2001. });
  2002. var appOptions = {
  2003. onLaunch: function onLaunch(args) {
  2004. if (this.$vm) {
  2005. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2006. return;
  2007. }
  2008. {
  2009. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2010. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2011. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2012. }
  2013. }
  2014. this.$vm = vm;
  2015. this.$vm.$mp = {
  2016. app: this
  2017. };
  2018. this.$vm.$scope = this;
  2019. // vm 上也挂载 globalData
  2020. this.$vm.globalData = this.globalData;
  2021. this.$vm._isMounted = true;
  2022. this.$vm.__call_hook('mounted', args);
  2023. this.$vm.__call_hook('onLaunch', args);
  2024. }
  2025. };
  2026. // 兼容旧版本 globalData
  2027. appOptions.globalData = vm.$options.globalData || {};
  2028. // 将 methods 中的方法挂在 getApp() 中
  2029. var methods = vm.$options.methods;
  2030. if (methods) {
  2031. Object.keys(methods).forEach(function (name) {
  2032. appOptions[name] = methods[name];
  2033. });
  2034. }
  2035. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2036. initHooks(appOptions, hooks);
  2037. initUnknownHooks(appOptions, vm.$options);
  2038. return appOptions;
  2039. }
  2040. function parseApp(vm) {
  2041. return parseBaseApp(vm, {
  2042. mocks: mocks,
  2043. initRefs: initRefs
  2044. });
  2045. }
  2046. function createApp(vm) {
  2047. App(parseApp(vm));
  2048. return vm;
  2049. }
  2050. var encodeReserveRE = /[!'()*]/g;
  2051. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2052. return '%' + c.charCodeAt(0).toString(16);
  2053. };
  2054. var commaRE = /%2C/g;
  2055. // fixed encodeURIComponent which is more conformant to RFC3986:
  2056. // - escapes [!'()*]
  2057. // - preserve commas
  2058. var encode = function encode(str) {
  2059. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2060. };
  2061. function stringifyQuery(obj) {
  2062. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2063. var res = obj ? Object.keys(obj).map(function (key) {
  2064. var val = obj[key];
  2065. if (val === undefined) {
  2066. return '';
  2067. }
  2068. if (val === null) {
  2069. return encodeStr(key);
  2070. }
  2071. if (Array.isArray(val)) {
  2072. var result = [];
  2073. val.forEach(function (val2) {
  2074. if (val2 === undefined) {
  2075. return;
  2076. }
  2077. if (val2 === null) {
  2078. result.push(encodeStr(key));
  2079. } else {
  2080. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2081. }
  2082. });
  2083. return result.join('&');
  2084. }
  2085. return encodeStr(key) + '=' + encodeStr(val);
  2086. }).filter(function (x) {
  2087. return x.length > 0;
  2088. }).join('&') : null;
  2089. return res ? "?".concat(res) : '';
  2090. }
  2091. function parseBaseComponent(vueComponentOptions) {
  2092. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2093. isPage = _ref5.isPage,
  2094. initRelation = _ref5.initRelation;
  2095. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2096. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2097. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2098. VueComponent = _initVueComponent2[0],
  2099. vueOptions = _initVueComponent2[1];
  2100. var options = _objectSpread({
  2101. multipleSlots: true,
  2102. addGlobalClass: true
  2103. }, vueOptions.options || {});
  2104. {
  2105. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2106. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2107. Object.assign(options, vueOptions['mp-weixin'].options);
  2108. }
  2109. }
  2110. var componentOptions = {
  2111. options: options,
  2112. data: initData(vueOptions, _vue.default.prototype),
  2113. behaviors: initBehaviors(vueOptions, initBehavior),
  2114. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2115. lifetimes: {
  2116. attached: function attached() {
  2117. var properties = this.properties;
  2118. var options = {
  2119. mpType: isPage.call(this) ? 'page' : 'component',
  2120. mpInstance: this,
  2121. propsData: properties
  2122. };
  2123. initVueIds(properties.vueId, this);
  2124. // 处理父子关系
  2125. initRelation.call(this, {
  2126. vuePid: this._$vuePid,
  2127. vueOptions: options
  2128. });
  2129. // 初始化 vue 实例
  2130. this.$vm = new VueComponent(options);
  2131. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2132. initSlots(this.$vm, properties.vueSlots);
  2133. // 触发首次 setData
  2134. this.$vm.$mount();
  2135. },
  2136. ready: function ready() {
  2137. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2138. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2139. if (this.$vm) {
  2140. this.$vm._isMounted = true;
  2141. this.$vm.__call_hook('mounted');
  2142. this.$vm.__call_hook('onReady');
  2143. }
  2144. },
  2145. detached: function detached() {
  2146. this.$vm && this.$vm.$destroy();
  2147. }
  2148. },
  2149. pageLifetimes: {
  2150. show: function show(args) {
  2151. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2152. },
  2153. hide: function hide() {
  2154. this.$vm && this.$vm.__call_hook('onPageHide');
  2155. },
  2156. resize: function resize(size) {
  2157. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2158. }
  2159. },
  2160. methods: {
  2161. __l: handleLink,
  2162. __e: handleEvent
  2163. }
  2164. };
  2165. // externalClasses
  2166. if (vueOptions.externalClasses) {
  2167. componentOptions.externalClasses = vueOptions.externalClasses;
  2168. }
  2169. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2170. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2171. componentOptions.methods[callMethod] = function (args) {
  2172. return this.$vm[callMethod](args);
  2173. };
  2174. });
  2175. }
  2176. if (needVueOptions) {
  2177. return [componentOptions, vueOptions, VueComponent];
  2178. }
  2179. if (isPage) {
  2180. return componentOptions;
  2181. }
  2182. return [componentOptions, VueComponent];
  2183. }
  2184. function parseComponent(vueComponentOptions, needVueOptions) {
  2185. return parseBaseComponent(vueComponentOptions, {
  2186. isPage: isPage,
  2187. initRelation: initRelation
  2188. }, needVueOptions);
  2189. }
  2190. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2191. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2192. function parseBasePage(vuePageOptions) {
  2193. var _parseComponent = parseComponent(vuePageOptions, true),
  2194. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2195. pageOptions = _parseComponent2[0],
  2196. vueOptions = _parseComponent2[1];
  2197. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2198. pageOptions.methods.onLoad = function (query) {
  2199. this.options = query;
  2200. var copyQuery = Object.assign({}, query);
  2201. delete copyQuery.__id__;
  2202. this.$page = {
  2203. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2204. };
  2205. this.$vm.$mp.query = query; // 兼容 mpvue
  2206. this.$vm.__call_hook('onLoad', query);
  2207. };
  2208. {
  2209. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2210. }
  2211. return pageOptions;
  2212. }
  2213. function parsePage(vuePageOptions) {
  2214. return parseBasePage(vuePageOptions);
  2215. }
  2216. function createPage(vuePageOptions) {
  2217. {
  2218. return Component(parsePage(vuePageOptions));
  2219. }
  2220. }
  2221. function createComponent(vueOptions) {
  2222. {
  2223. return Component(parseComponent(vueOptions));
  2224. }
  2225. }
  2226. function createSubpackageApp(vm) {
  2227. var appOptions = parseApp(vm);
  2228. var app = getApp({
  2229. allowDefault: true
  2230. });
  2231. vm.$scope = app;
  2232. var globalData = app.globalData;
  2233. if (globalData) {
  2234. Object.keys(appOptions.globalData).forEach(function (name) {
  2235. if (!hasOwn(globalData, name)) {
  2236. globalData[name] = appOptions.globalData[name];
  2237. }
  2238. });
  2239. }
  2240. Object.keys(appOptions).forEach(function (name) {
  2241. if (!hasOwn(app, name)) {
  2242. app[name] = appOptions[name];
  2243. }
  2244. });
  2245. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2246. wx.onAppShow(function () {
  2247. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2248. args[_key5] = arguments[_key5];
  2249. }
  2250. vm.__call_hook('onShow', args);
  2251. });
  2252. }
  2253. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2254. wx.onAppHide(function () {
  2255. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2256. args[_key6] = arguments[_key6];
  2257. }
  2258. vm.__call_hook('onHide', args);
  2259. });
  2260. }
  2261. if (isFn(appOptions.onLaunch)) {
  2262. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2263. vm.__call_hook('onLaunch', args);
  2264. }
  2265. return vm;
  2266. }
  2267. function createPlugin(vm) {
  2268. var appOptions = parseApp(vm);
  2269. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2270. wx.onAppShow(function () {
  2271. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2272. args[_key7] = arguments[_key7];
  2273. }
  2274. vm.__call_hook('onShow', args);
  2275. });
  2276. }
  2277. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2278. wx.onAppHide(function () {
  2279. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2280. args[_key8] = arguments[_key8];
  2281. }
  2282. vm.__call_hook('onHide', args);
  2283. });
  2284. }
  2285. if (isFn(appOptions.onLaunch)) {
  2286. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2287. vm.__call_hook('onLaunch', args);
  2288. }
  2289. return vm;
  2290. }
  2291. todos.forEach(function (todoApi) {
  2292. protocols[todoApi] = false;
  2293. });
  2294. canIUses.forEach(function (canIUseApi) {
  2295. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2296. if (!wx.canIUse(apiName)) {
  2297. protocols[canIUseApi] = false;
  2298. }
  2299. });
  2300. var uni = {};
  2301. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2302. uni = new Proxy({}, {
  2303. get: function get(target, name) {
  2304. if (hasOwn(target, name)) {
  2305. return target[name];
  2306. }
  2307. if (baseApi[name]) {
  2308. return baseApi[name];
  2309. }
  2310. if (api[name]) {
  2311. return promisify(name, api[name]);
  2312. }
  2313. {
  2314. if (extraApi[name]) {
  2315. return promisify(name, extraApi[name]);
  2316. }
  2317. if (todoApis[name]) {
  2318. return promisify(name, todoApis[name]);
  2319. }
  2320. }
  2321. if (eventApi[name]) {
  2322. return eventApi[name];
  2323. }
  2324. return promisify(name, wrapper(name, wx[name]));
  2325. },
  2326. set: function set(target, name, value) {
  2327. target[name] = value;
  2328. return true;
  2329. }
  2330. });
  2331. } else {
  2332. Object.keys(baseApi).forEach(function (name) {
  2333. uni[name] = baseApi[name];
  2334. });
  2335. {
  2336. Object.keys(todoApis).forEach(function (name) {
  2337. uni[name] = promisify(name, todoApis[name]);
  2338. });
  2339. Object.keys(extraApi).forEach(function (name) {
  2340. uni[name] = promisify(name, todoApis[name]);
  2341. });
  2342. }
  2343. Object.keys(eventApi).forEach(function (name) {
  2344. uni[name] = eventApi[name];
  2345. });
  2346. Object.keys(api).forEach(function (name) {
  2347. uni[name] = promisify(name, api[name]);
  2348. });
  2349. Object.keys(wx).forEach(function (name) {
  2350. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2351. uni[name] = promisify(name, wrapper(name, wx[name]));
  2352. }
  2353. });
  2354. }
  2355. wx.createApp = createApp;
  2356. wx.createPage = createPage;
  2357. wx.createComponent = createComponent;
  2358. wx.createSubpackageApp = createSubpackageApp;
  2359. wx.createPlugin = createPlugin;
  2360. var uni$1 = uni;
  2361. var _default = uni$1;
  2362. exports.default = _default;
  2363. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2364. /***/ }),
  2365. /* 3 */
  2366. /*!***********************************!*\
  2367. !*** (webpack)/buildin/global.js ***!
  2368. \***********************************/
  2369. /*! no static exports found */
  2370. /***/ (function(module, exports) {
  2371. var g;
  2372. // This works in non-strict mode
  2373. g = (function() {
  2374. return this;
  2375. })();
  2376. try {
  2377. // This works if eval is allowed (see CSP)
  2378. g = g || new Function("return this")();
  2379. } catch (e) {
  2380. // This works if the window reference is available
  2381. if (typeof window === "object") g = window;
  2382. }
  2383. // g can still be undefined, but nothing to do about it...
  2384. // We return undefined, instead of nothing here, so it's
  2385. // easier to handle this case. if(!global) { ...}
  2386. module.exports = g;
  2387. /***/ }),
  2388. /* 4 */
  2389. /*!**********************************************************************!*\
  2390. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2391. \**********************************************************************/
  2392. /*! no static exports found */
  2393. /***/ (function(module, exports) {
  2394. function _interopRequireDefault(obj) {
  2395. return obj && obj.__esModule ? obj : {
  2396. "default": obj
  2397. };
  2398. }
  2399. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2400. /***/ }),
  2401. /* 5 */
  2402. /*!**************************************************************!*\
  2403. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2404. \**************************************************************/
  2405. /*! no static exports found */
  2406. /***/ (function(module, exports, __webpack_require__) {
  2407. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2408. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2409. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2410. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2411. function _slicedToArray(arr, i) {
  2412. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2413. }
  2414. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2415. /***/ }),
  2416. /* 6 */
  2417. /*!***************************************************************!*\
  2418. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2419. \***************************************************************/
  2420. /*! no static exports found */
  2421. /***/ (function(module, exports) {
  2422. function _arrayWithHoles(arr) {
  2423. if (Array.isArray(arr)) return arr;
  2424. }
  2425. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2426. /***/ }),
  2427. /* 7 */
  2428. /*!*********************************************************************!*\
  2429. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2430. \*********************************************************************/
  2431. /*! no static exports found */
  2432. /***/ (function(module, exports) {
  2433. function _iterableToArrayLimit(arr, i) {
  2434. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  2435. if (null != _i) {
  2436. var _s,
  2437. _e,
  2438. _x,
  2439. _r,
  2440. _arr = [],
  2441. _n = !0,
  2442. _d = !1;
  2443. try {
  2444. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  2445. if (Object(_i) !== _i) return;
  2446. _n = !1;
  2447. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  2448. ;
  2449. }
  2450. } catch (err) {
  2451. _d = !0, _e = err;
  2452. } finally {
  2453. try {
  2454. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  2455. } finally {
  2456. if (_d) throw _e;
  2457. }
  2458. }
  2459. return _arr;
  2460. }
  2461. }
  2462. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2463. /***/ }),
  2464. /* 8 */
  2465. /*!***************************************************************************!*\
  2466. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2467. \***************************************************************************/
  2468. /*! no static exports found */
  2469. /***/ (function(module, exports, __webpack_require__) {
  2470. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2471. function _unsupportedIterableToArray(o, minLen) {
  2472. if (!o) return;
  2473. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2474. var n = Object.prototype.toString.call(o).slice(8, -1);
  2475. if (n === "Object" && o.constructor) n = o.constructor.name;
  2476. if (n === "Map" || n === "Set") return Array.from(o);
  2477. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2478. }
  2479. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2480. /***/ }),
  2481. /* 9 */
  2482. /*!*****************************************************************!*\
  2483. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2484. \*****************************************************************/
  2485. /*! no static exports found */
  2486. /***/ (function(module, exports) {
  2487. function _arrayLikeToArray(arr, len) {
  2488. if (len == null || len > arr.length) len = arr.length;
  2489. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2490. arr2[i] = arr[i];
  2491. }
  2492. return arr2;
  2493. }
  2494. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2495. /***/ }),
  2496. /* 10 */
  2497. /*!****************************************************************!*\
  2498. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2499. \****************************************************************/
  2500. /*! no static exports found */
  2501. /***/ (function(module, exports) {
  2502. function _nonIterableRest() {
  2503. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2504. }
  2505. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2506. /***/ }),
  2507. /* 11 */
  2508. /*!***************************************************************!*\
  2509. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2510. \***************************************************************/
  2511. /*! no static exports found */
  2512. /***/ (function(module, exports, __webpack_require__) {
  2513. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2514. function _defineProperty(obj, key, value) {
  2515. key = toPropertyKey(key);
  2516. if (key in obj) {
  2517. Object.defineProperty(obj, key, {
  2518. value: value,
  2519. enumerable: true,
  2520. configurable: true,
  2521. writable: true
  2522. });
  2523. } else {
  2524. obj[key] = value;
  2525. }
  2526. return obj;
  2527. }
  2528. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2529. /***/ }),
  2530. /* 12 */
  2531. /*!**************************************************************!*\
  2532. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2533. \**************************************************************/
  2534. /*! no static exports found */
  2535. /***/ (function(module, exports, __webpack_require__) {
  2536. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2537. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2538. function _toPropertyKey(arg) {
  2539. var key = toPrimitive(arg, "string");
  2540. return _typeof(key) === "symbol" ? key : String(key);
  2541. }
  2542. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2543. /***/ }),
  2544. /* 13 */
  2545. /*!*******************************************************!*\
  2546. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2547. \*******************************************************/
  2548. /*! no static exports found */
  2549. /***/ (function(module, exports) {
  2550. function _typeof(obj) {
  2551. "@babel/helpers - typeof";
  2552. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  2553. return typeof obj;
  2554. } : function (obj) {
  2555. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  2556. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  2557. }
  2558. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2559. /***/ }),
  2560. /* 14 */
  2561. /*!************************************************************!*\
  2562. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2563. \************************************************************/
  2564. /*! no static exports found */
  2565. /***/ (function(module, exports, __webpack_require__) {
  2566. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2567. function _toPrimitive(input, hint) {
  2568. if (_typeof(input) !== "object" || input === null) return input;
  2569. var prim = input[Symbol.toPrimitive];
  2570. if (prim !== undefined) {
  2571. var res = prim.call(input, hint || "default");
  2572. if (_typeof(res) !== "object") return res;
  2573. throw new TypeError("@@toPrimitive must return a primitive value.");
  2574. }
  2575. return (hint === "string" ? String : Number)(input);
  2576. }
  2577. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2578. /***/ }),
  2579. /* 15 */
  2580. /*!**********************************************************!*\
  2581. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2582. \**********************************************************/
  2583. /*! no static exports found */
  2584. /***/ (function(module, exports, __webpack_require__) {
  2585. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2586. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2587. function _construct(Parent, args, Class) {
  2588. if (isNativeReflectConstruct()) {
  2589. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  2590. } else {
  2591. module.exports = _construct = function _construct(Parent, args, Class) {
  2592. var a = [null];
  2593. a.push.apply(a, args);
  2594. var Constructor = Function.bind.apply(Parent, a);
  2595. var instance = new Constructor();
  2596. if (Class) setPrototypeOf(instance, Class.prototype);
  2597. return instance;
  2598. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2599. }
  2600. return _construct.apply(null, arguments);
  2601. }
  2602. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2603. /***/ }),
  2604. /* 16 */
  2605. /*!***************************************************************!*\
  2606. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2607. \***************************************************************/
  2608. /*! no static exports found */
  2609. /***/ (function(module, exports) {
  2610. function _setPrototypeOf(o, p) {
  2611. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2612. o.__proto__ = p;
  2613. return o;
  2614. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2615. return _setPrototypeOf(o, p);
  2616. }
  2617. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2618. /***/ }),
  2619. /* 17 */
  2620. /*!*************************************************************************!*\
  2621. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2622. \*************************************************************************/
  2623. /*! no static exports found */
  2624. /***/ (function(module, exports) {
  2625. function _isNativeReflectConstruct() {
  2626. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  2627. if (Reflect.construct.sham) return false;
  2628. if (typeof Proxy === "function") return true;
  2629. try {
  2630. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2631. return true;
  2632. } catch (e) {
  2633. return false;
  2634. }
  2635. }
  2636. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2637. /***/ }),
  2638. /* 18 */
  2639. /*!******************************************************************!*\
  2640. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2641. \******************************************************************/
  2642. /*! no static exports found */
  2643. /***/ (function(module, exports, __webpack_require__) {
  2644. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2645. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2646. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2647. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2648. function _toConsumableArray(arr) {
  2649. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2650. }
  2651. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2652. /***/ }),
  2653. /* 19 */
  2654. /*!******************************************************************!*\
  2655. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2656. \******************************************************************/
  2657. /*! no static exports found */
  2658. /***/ (function(module, exports, __webpack_require__) {
  2659. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2660. function _arrayWithoutHoles(arr) {
  2661. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2662. }
  2663. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2664. /***/ }),
  2665. /* 20 */
  2666. /*!****************************************************************!*\
  2667. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2668. \****************************************************************/
  2669. /*! no static exports found */
  2670. /***/ (function(module, exports) {
  2671. function _iterableToArray(iter) {
  2672. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2673. }
  2674. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2675. /***/ }),
  2676. /* 21 */
  2677. /*!******************************************************************!*\
  2678. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2679. \******************************************************************/
  2680. /*! no static exports found */
  2681. /***/ (function(module, exports) {
  2682. function _nonIterableSpread() {
  2683. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2684. }
  2685. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2686. /***/ }),
  2687. /* 22 */
  2688. /*!*************************************************************!*\
  2689. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2690. \*************************************************************/
  2691. /*! no static exports found */
  2692. /***/ (function(module, exports, __webpack_require__) {
  2693. "use strict";
  2694. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2695. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2696. Object.defineProperty(exports, "__esModule", {
  2697. value: true
  2698. });
  2699. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2700. exports.compileI18nJsonStr = compileI18nJsonStr;
  2701. exports.hasI18nJson = hasI18nJson;
  2702. exports.initVueI18n = initVueI18n;
  2703. exports.isI18nStr = isI18nStr;
  2704. exports.isString = void 0;
  2705. exports.normalizeLocale = normalizeLocale;
  2706. exports.parseI18nJson = parseI18nJson;
  2707. exports.resolveLocale = resolveLocale;
  2708. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2709. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2710. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2711. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2712. var isArray = Array.isArray;
  2713. var isObject = function isObject(val) {
  2714. return val !== null && (0, _typeof2.default)(val) === 'object';
  2715. };
  2716. var defaultDelimiters = ['{', '}'];
  2717. var BaseFormatter = /*#__PURE__*/function () {
  2718. function BaseFormatter() {
  2719. (0, _classCallCheck2.default)(this, BaseFormatter);
  2720. this._caches = Object.create(null);
  2721. }
  2722. (0, _createClass2.default)(BaseFormatter, [{
  2723. key: "interpolate",
  2724. value: function interpolate(message, values) {
  2725. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2726. if (!values) {
  2727. return [message];
  2728. }
  2729. var tokens = this._caches[message];
  2730. if (!tokens) {
  2731. tokens = parse(message, delimiters);
  2732. this._caches[message] = tokens;
  2733. }
  2734. return compile(tokens, values);
  2735. }
  2736. }]);
  2737. return BaseFormatter;
  2738. }();
  2739. exports.Formatter = BaseFormatter;
  2740. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2741. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2742. function parse(format, _ref) {
  2743. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2744. startDelimiter = _ref2[0],
  2745. endDelimiter = _ref2[1];
  2746. var tokens = [];
  2747. var position = 0;
  2748. var text = '';
  2749. while (position < format.length) {
  2750. var char = format[position++];
  2751. if (char === startDelimiter) {
  2752. if (text) {
  2753. tokens.push({
  2754. type: 'text',
  2755. value: text
  2756. });
  2757. }
  2758. text = '';
  2759. var sub = '';
  2760. char = format[position++];
  2761. while (char !== undefined && char !== endDelimiter) {
  2762. sub += char;
  2763. char = format[position++];
  2764. }
  2765. var isClosed = char === endDelimiter;
  2766. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2767. tokens.push({
  2768. value: sub,
  2769. type: type
  2770. });
  2771. }
  2772. // else if (char === '%') {
  2773. // // when found rails i18n syntax, skip text capture
  2774. // if (format[position] !== '{') {
  2775. // text += char
  2776. // }
  2777. // }
  2778. else {
  2779. text += char;
  2780. }
  2781. }
  2782. text && tokens.push({
  2783. type: 'text',
  2784. value: text
  2785. });
  2786. return tokens;
  2787. }
  2788. function compile(tokens, values) {
  2789. var compiled = [];
  2790. var index = 0;
  2791. var mode = isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2792. if (mode === 'unknown') {
  2793. return compiled;
  2794. }
  2795. while (index < tokens.length) {
  2796. var token = tokens[index];
  2797. switch (token.type) {
  2798. case 'text':
  2799. compiled.push(token.value);
  2800. break;
  2801. case 'list':
  2802. compiled.push(values[parseInt(token.value, 10)]);
  2803. break;
  2804. case 'named':
  2805. if (mode === 'named') {
  2806. compiled.push(values[token.value]);
  2807. } else {
  2808. if (true) {
  2809. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2810. }
  2811. }
  2812. break;
  2813. case 'unknown':
  2814. if (true) {
  2815. console.warn("Detect 'unknown' type of token!");
  2816. }
  2817. break;
  2818. }
  2819. index++;
  2820. }
  2821. return compiled;
  2822. }
  2823. var LOCALE_ZH_HANS = 'zh-Hans';
  2824. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2825. var LOCALE_ZH_HANT = 'zh-Hant';
  2826. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2827. var LOCALE_EN = 'en';
  2828. exports.LOCALE_EN = LOCALE_EN;
  2829. var LOCALE_FR = 'fr';
  2830. exports.LOCALE_FR = LOCALE_FR;
  2831. var LOCALE_ES = 'es';
  2832. exports.LOCALE_ES = LOCALE_ES;
  2833. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2834. var hasOwn = function hasOwn(val, key) {
  2835. return hasOwnProperty.call(val, key);
  2836. };
  2837. var defaultFormatter = new BaseFormatter();
  2838. function include(str, parts) {
  2839. return !!parts.find(function (part) {
  2840. return str.indexOf(part) !== -1;
  2841. });
  2842. }
  2843. function startsWith(str, parts) {
  2844. return parts.find(function (part) {
  2845. return str.indexOf(part) === 0;
  2846. });
  2847. }
  2848. function normalizeLocale(locale, messages) {
  2849. if (!locale) {
  2850. return;
  2851. }
  2852. locale = locale.trim().replace(/_/g, '-');
  2853. if (messages && messages[locale]) {
  2854. return locale;
  2855. }
  2856. locale = locale.toLowerCase();
  2857. if (locale.indexOf('zh') === 0) {
  2858. if (locale.indexOf('-hans') > -1) {
  2859. return LOCALE_ZH_HANS;
  2860. }
  2861. if (locale.indexOf('-hant') > -1) {
  2862. return LOCALE_ZH_HANT;
  2863. }
  2864. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2865. return LOCALE_ZH_HANT;
  2866. }
  2867. return LOCALE_ZH_HANS;
  2868. }
  2869. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  2870. if (lang) {
  2871. return lang;
  2872. }
  2873. }
  2874. var I18n = /*#__PURE__*/function () {
  2875. function I18n(_ref3) {
  2876. var locale = _ref3.locale,
  2877. fallbackLocale = _ref3.fallbackLocale,
  2878. messages = _ref3.messages,
  2879. watcher = _ref3.watcher,
  2880. formater = _ref3.formater;
  2881. (0, _classCallCheck2.default)(this, I18n);
  2882. this.locale = LOCALE_EN;
  2883. this.fallbackLocale = LOCALE_EN;
  2884. this.message = {};
  2885. this.messages = {};
  2886. this.watchers = [];
  2887. if (fallbackLocale) {
  2888. this.fallbackLocale = fallbackLocale;
  2889. }
  2890. this.formater = formater || defaultFormatter;
  2891. this.messages = messages || {};
  2892. this.setLocale(locale || LOCALE_EN);
  2893. if (watcher) {
  2894. this.watchLocale(watcher);
  2895. }
  2896. }
  2897. (0, _createClass2.default)(I18n, [{
  2898. key: "setLocale",
  2899. value: function setLocale(locale) {
  2900. var _this = this;
  2901. var oldLocale = this.locale;
  2902. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2903. if (!this.messages[this.locale]) {
  2904. // 可能初始化时不存在
  2905. this.messages[this.locale] = {};
  2906. }
  2907. this.message = this.messages[this.locale];
  2908. // 仅发生变化时,通知
  2909. if (oldLocale !== this.locale) {
  2910. this.watchers.forEach(function (watcher) {
  2911. watcher(_this.locale, oldLocale);
  2912. });
  2913. }
  2914. }
  2915. }, {
  2916. key: "getLocale",
  2917. value: function getLocale() {
  2918. return this.locale;
  2919. }
  2920. }, {
  2921. key: "watchLocale",
  2922. value: function watchLocale(fn) {
  2923. var _this2 = this;
  2924. var index = this.watchers.push(fn) - 1;
  2925. return function () {
  2926. _this2.watchers.splice(index, 1);
  2927. };
  2928. }
  2929. }, {
  2930. key: "add",
  2931. value: function add(locale, message) {
  2932. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2933. var curMessages = this.messages[locale];
  2934. if (curMessages) {
  2935. if (override) {
  2936. Object.assign(curMessages, message);
  2937. } else {
  2938. Object.keys(message).forEach(function (key) {
  2939. if (!hasOwn(curMessages, key)) {
  2940. curMessages[key] = message[key];
  2941. }
  2942. });
  2943. }
  2944. } else {
  2945. this.messages[locale] = message;
  2946. }
  2947. }
  2948. }, {
  2949. key: "f",
  2950. value: function f(message, values, delimiters) {
  2951. return this.formater.interpolate(message, values, delimiters).join('');
  2952. }
  2953. }, {
  2954. key: "t",
  2955. value: function t(key, locale, values) {
  2956. var message = this.message;
  2957. if (typeof locale === 'string') {
  2958. locale = normalizeLocale(locale, this.messages);
  2959. locale && (message = this.messages[locale]);
  2960. } else {
  2961. values = locale;
  2962. }
  2963. if (!hasOwn(message, key)) {
  2964. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2965. return key;
  2966. }
  2967. return this.formater.interpolate(message[key], values).join('');
  2968. }
  2969. }]);
  2970. return I18n;
  2971. }();
  2972. exports.I18n = I18n;
  2973. function watchAppLocale(appVm, i18n) {
  2974. // 需要保证 watch 的触发在组件渲染之前
  2975. if (appVm.$watchLocale) {
  2976. // vue2
  2977. appVm.$watchLocale(function (newLocale) {
  2978. i18n.setLocale(newLocale);
  2979. });
  2980. } else {
  2981. appVm.$watch(function () {
  2982. return appVm.$locale;
  2983. }, function (newLocale) {
  2984. i18n.setLocale(newLocale);
  2985. });
  2986. }
  2987. }
  2988. function getDefaultLocale() {
  2989. if (typeof uni !== 'undefined' && uni.getLocale) {
  2990. return uni.getLocale();
  2991. }
  2992. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2993. if (typeof global !== 'undefined' && global.getLocale) {
  2994. return global.getLocale();
  2995. }
  2996. return LOCALE_EN;
  2997. }
  2998. function initVueI18n(locale) {
  2999. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3000. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3001. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3002. // 兼容旧版本入参
  3003. if (typeof locale !== 'string') {
  3004. var _ref4 = [messages, locale];
  3005. locale = _ref4[0];
  3006. messages = _ref4[1];
  3007. }
  3008. if (typeof locale !== 'string') {
  3009. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3010. locale = getDefaultLocale();
  3011. }
  3012. if (typeof fallbackLocale !== 'string') {
  3013. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3014. }
  3015. var i18n = new I18n({
  3016. locale: locale,
  3017. fallbackLocale: fallbackLocale,
  3018. messages: messages,
  3019. watcher: watcher
  3020. });
  3021. var _t = function t(key, values) {
  3022. if (typeof getApp !== 'function') {
  3023. // app view
  3024. /* eslint-disable no-func-assign */
  3025. _t = function t(key, values) {
  3026. return i18n.t(key, values);
  3027. };
  3028. } else {
  3029. var isWatchedAppLocale = false;
  3030. _t = function t(key, values) {
  3031. var appVm = getApp().$vm;
  3032. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3033. // options: {
  3034. // type: Array,
  3035. // default () {
  3036. // return [{
  3037. // icon: 'shop',
  3038. // text: t("uni-goods-nav.options.shop"),
  3039. // }, {
  3040. // icon: 'cart',
  3041. // text: t("uni-goods-nav.options.cart")
  3042. // }]
  3043. // }
  3044. // },
  3045. if (appVm) {
  3046. // 触发响应式
  3047. appVm.$locale;
  3048. if (!isWatchedAppLocale) {
  3049. isWatchedAppLocale = true;
  3050. watchAppLocale(appVm, i18n);
  3051. }
  3052. }
  3053. return i18n.t(key, values);
  3054. };
  3055. }
  3056. return _t(key, values);
  3057. };
  3058. return {
  3059. i18n: i18n,
  3060. f: function f(message, values, delimiters) {
  3061. return i18n.f(message, values, delimiters);
  3062. },
  3063. t: function t(key, values) {
  3064. return _t(key, values);
  3065. },
  3066. add: function add(locale, message) {
  3067. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3068. return i18n.add(locale, message, override);
  3069. },
  3070. watch: function watch(fn) {
  3071. return i18n.watchLocale(fn);
  3072. },
  3073. getLocale: function getLocale() {
  3074. return i18n.getLocale();
  3075. },
  3076. setLocale: function setLocale(newLocale) {
  3077. return i18n.setLocale(newLocale);
  3078. }
  3079. };
  3080. }
  3081. var isString = function isString(val) {
  3082. return typeof val === 'string';
  3083. };
  3084. exports.isString = isString;
  3085. var formater;
  3086. function hasI18nJson(jsonObj, delimiters) {
  3087. if (!formater) {
  3088. formater = new BaseFormatter();
  3089. }
  3090. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3091. var value = jsonObj[key];
  3092. if (isString(value)) {
  3093. if (isI18nStr(value, delimiters)) {
  3094. return true;
  3095. }
  3096. } else {
  3097. return hasI18nJson(value, delimiters);
  3098. }
  3099. });
  3100. }
  3101. function parseI18nJson(jsonObj, values, delimiters) {
  3102. if (!formater) {
  3103. formater = new BaseFormatter();
  3104. }
  3105. walkJsonObj(jsonObj, function (jsonObj, key) {
  3106. var value = jsonObj[key];
  3107. if (isString(value)) {
  3108. if (isI18nStr(value, delimiters)) {
  3109. jsonObj[key] = compileStr(value, values, delimiters);
  3110. }
  3111. } else {
  3112. parseI18nJson(value, values, delimiters);
  3113. }
  3114. });
  3115. return jsonObj;
  3116. }
  3117. function compileI18nJsonStr(jsonStr, _ref5) {
  3118. var locale = _ref5.locale,
  3119. locales = _ref5.locales,
  3120. delimiters = _ref5.delimiters;
  3121. if (!isI18nStr(jsonStr, delimiters)) {
  3122. return jsonStr;
  3123. }
  3124. if (!formater) {
  3125. formater = new BaseFormatter();
  3126. }
  3127. var localeValues = [];
  3128. Object.keys(locales).forEach(function (name) {
  3129. if (name !== locale) {
  3130. localeValues.push({
  3131. locale: name,
  3132. values: locales[name]
  3133. });
  3134. }
  3135. });
  3136. localeValues.unshift({
  3137. locale: locale,
  3138. values: locales[locale]
  3139. });
  3140. try {
  3141. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3142. } catch (e) {}
  3143. return jsonStr;
  3144. }
  3145. function isI18nStr(value, delimiters) {
  3146. return value.indexOf(delimiters[0]) > -1;
  3147. }
  3148. function compileStr(value, values, delimiters) {
  3149. return formater.interpolate(value, values, delimiters).join('');
  3150. }
  3151. function compileValue(jsonObj, key, localeValues, delimiters) {
  3152. var value = jsonObj[key];
  3153. if (isString(value)) {
  3154. // 存在国际化
  3155. if (isI18nStr(value, delimiters)) {
  3156. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3157. if (localeValues.length > 1) {
  3158. // 格式化国际化语言
  3159. var valueLocales = jsonObj[key + 'Locales'] = {};
  3160. localeValues.forEach(function (localValue) {
  3161. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3162. });
  3163. }
  3164. }
  3165. } else {
  3166. compileJsonObj(value, localeValues, delimiters);
  3167. }
  3168. }
  3169. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3170. walkJsonObj(jsonObj, function (jsonObj, key) {
  3171. compileValue(jsonObj, key, localeValues, delimiters);
  3172. });
  3173. return jsonObj;
  3174. }
  3175. function walkJsonObj(jsonObj, walk) {
  3176. if (isArray(jsonObj)) {
  3177. for (var i = 0; i < jsonObj.length; i++) {
  3178. if (walk(jsonObj, i)) {
  3179. return true;
  3180. }
  3181. }
  3182. } else if (isObject(jsonObj)) {
  3183. for (var key in jsonObj) {
  3184. if (walk(jsonObj, key)) {
  3185. return true;
  3186. }
  3187. }
  3188. }
  3189. return false;
  3190. }
  3191. function resolveLocale(locales) {
  3192. return function (locale) {
  3193. if (!locale) {
  3194. return locale;
  3195. }
  3196. locale = normalizeLocale(locale) || locale;
  3197. return resolveLocaleChain(locale).find(function (locale) {
  3198. return locales.indexOf(locale) > -1;
  3199. });
  3200. };
  3201. }
  3202. function resolveLocaleChain(locale) {
  3203. var chain = [];
  3204. var tokens = locale.split('-');
  3205. while (tokens.length) {
  3206. chain.push(tokens.join('-'));
  3207. tokens.pop();
  3208. }
  3209. return chain;
  3210. }
  3211. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3212. /***/ }),
  3213. /* 23 */
  3214. /*!***************************************************************!*\
  3215. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3216. \***************************************************************/
  3217. /*! no static exports found */
  3218. /***/ (function(module, exports) {
  3219. function _classCallCheck(instance, Constructor) {
  3220. if (!(instance instanceof Constructor)) {
  3221. throw new TypeError("Cannot call a class as a function");
  3222. }
  3223. }
  3224. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3225. /***/ }),
  3226. /* 24 */
  3227. /*!************************************************************!*\
  3228. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3229. \************************************************************/
  3230. /*! no static exports found */
  3231. /***/ (function(module, exports, __webpack_require__) {
  3232. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3233. function _defineProperties(target, props) {
  3234. for (var i = 0; i < props.length; i++) {
  3235. var descriptor = props[i];
  3236. descriptor.enumerable = descriptor.enumerable || false;
  3237. descriptor.configurable = true;
  3238. if ("value" in descriptor) descriptor.writable = true;
  3239. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3240. }
  3241. }
  3242. function _createClass(Constructor, protoProps, staticProps) {
  3243. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3244. if (staticProps) _defineProperties(Constructor, staticProps);
  3245. Object.defineProperty(Constructor, "prototype", {
  3246. writable: false
  3247. });
  3248. return Constructor;
  3249. }
  3250. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3251. /***/ }),
  3252. /* 25 */
  3253. /*!******************************************************************************************!*\
  3254. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3255. \******************************************************************************************/
  3256. /*! exports provided: default */
  3257. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3258. "use strict";
  3259. __webpack_require__.r(__webpack_exports__);
  3260. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3261. * Vue.js v2.6.11
  3262. * (c) 2014-2022 Evan You
  3263. * Released under the MIT License.
  3264. */
  3265. /* */
  3266. var emptyObject = Object.freeze({});
  3267. // These helpers produce better VM code in JS engines due to their
  3268. // explicitness and function inlining.
  3269. function isUndef (v) {
  3270. return v === undefined || v === null
  3271. }
  3272. function isDef (v) {
  3273. return v !== undefined && v !== null
  3274. }
  3275. function isTrue (v) {
  3276. return v === true
  3277. }
  3278. function isFalse (v) {
  3279. return v === false
  3280. }
  3281. /**
  3282. * Check if value is primitive.
  3283. */
  3284. function isPrimitive (value) {
  3285. return (
  3286. typeof value === 'string' ||
  3287. typeof value === 'number' ||
  3288. // $flow-disable-line
  3289. typeof value === 'symbol' ||
  3290. typeof value === 'boolean'
  3291. )
  3292. }
  3293. /**
  3294. * Quick object check - this is primarily used to tell
  3295. * Objects from primitive values when we know the value
  3296. * is a JSON-compliant type.
  3297. */
  3298. function isObject (obj) {
  3299. return obj !== null && typeof obj === 'object'
  3300. }
  3301. /**
  3302. * Get the raw type string of a value, e.g., [object Object].
  3303. */
  3304. var _toString = Object.prototype.toString;
  3305. function toRawType (value) {
  3306. return _toString.call(value).slice(8, -1)
  3307. }
  3308. /**
  3309. * Strict object type check. Only returns true
  3310. * for plain JavaScript objects.
  3311. */
  3312. function isPlainObject (obj) {
  3313. return _toString.call(obj) === '[object Object]'
  3314. }
  3315. function isRegExp (v) {
  3316. return _toString.call(v) === '[object RegExp]'
  3317. }
  3318. /**
  3319. * Check if val is a valid array index.
  3320. */
  3321. function isValidArrayIndex (val) {
  3322. var n = parseFloat(String(val));
  3323. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3324. }
  3325. function isPromise (val) {
  3326. return (
  3327. isDef(val) &&
  3328. typeof val.then === 'function' &&
  3329. typeof val.catch === 'function'
  3330. )
  3331. }
  3332. /**
  3333. * Convert a value to a string that is actually rendered.
  3334. */
  3335. function toString (val) {
  3336. return val == null
  3337. ? ''
  3338. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3339. ? JSON.stringify(val, null, 2)
  3340. : String(val)
  3341. }
  3342. /**
  3343. * Convert an input value to a number for persistence.
  3344. * If the conversion fails, return original string.
  3345. */
  3346. function toNumber (val) {
  3347. var n = parseFloat(val);
  3348. return isNaN(n) ? val : n
  3349. }
  3350. /**
  3351. * Make a map and return a function for checking if a key
  3352. * is in that map.
  3353. */
  3354. function makeMap (
  3355. str,
  3356. expectsLowerCase
  3357. ) {
  3358. var map = Object.create(null);
  3359. var list = str.split(',');
  3360. for (var i = 0; i < list.length; i++) {
  3361. map[list[i]] = true;
  3362. }
  3363. return expectsLowerCase
  3364. ? function (val) { return map[val.toLowerCase()]; }
  3365. : function (val) { return map[val]; }
  3366. }
  3367. /**
  3368. * Check if a tag is a built-in tag.
  3369. */
  3370. var isBuiltInTag = makeMap('slot,component', true);
  3371. /**
  3372. * Check if an attribute is a reserved attribute.
  3373. */
  3374. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3375. /**
  3376. * Remove an item from an array.
  3377. */
  3378. function remove (arr, item) {
  3379. if (arr.length) {
  3380. var index = arr.indexOf(item);
  3381. if (index > -1) {
  3382. return arr.splice(index, 1)
  3383. }
  3384. }
  3385. }
  3386. /**
  3387. * Check whether an object has the property.
  3388. */
  3389. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3390. function hasOwn (obj, key) {
  3391. return hasOwnProperty.call(obj, key)
  3392. }
  3393. /**
  3394. * Create a cached version of a pure function.
  3395. */
  3396. function cached (fn) {
  3397. var cache = Object.create(null);
  3398. return (function cachedFn (str) {
  3399. var hit = cache[str];
  3400. return hit || (cache[str] = fn(str))
  3401. })
  3402. }
  3403. /**
  3404. * Camelize a hyphen-delimited string.
  3405. */
  3406. var camelizeRE = /-(\w)/g;
  3407. var camelize = cached(function (str) {
  3408. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3409. });
  3410. /**
  3411. * Capitalize a string.
  3412. */
  3413. var capitalize = cached(function (str) {
  3414. return str.charAt(0).toUpperCase() + str.slice(1)
  3415. });
  3416. /**
  3417. * Hyphenate a camelCase string.
  3418. */
  3419. var hyphenateRE = /\B([A-Z])/g;
  3420. var hyphenate = cached(function (str) {
  3421. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3422. });
  3423. /**
  3424. * Simple bind polyfill for environments that do not support it,
  3425. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3426. * since native bind is now performant enough in most browsers.
  3427. * But removing it would mean breaking code that was able to run in
  3428. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3429. */
  3430. /* istanbul ignore next */
  3431. function polyfillBind (fn, ctx) {
  3432. function boundFn (a) {
  3433. var l = arguments.length;
  3434. return l
  3435. ? l > 1
  3436. ? fn.apply(ctx, arguments)
  3437. : fn.call(ctx, a)
  3438. : fn.call(ctx)
  3439. }
  3440. boundFn._length = fn.length;
  3441. return boundFn
  3442. }
  3443. function nativeBind (fn, ctx) {
  3444. return fn.bind(ctx)
  3445. }
  3446. var bind = Function.prototype.bind
  3447. ? nativeBind
  3448. : polyfillBind;
  3449. /**
  3450. * Convert an Array-like object to a real Array.
  3451. */
  3452. function toArray (list, start) {
  3453. start = start || 0;
  3454. var i = list.length - start;
  3455. var ret = new Array(i);
  3456. while (i--) {
  3457. ret[i] = list[i + start];
  3458. }
  3459. return ret
  3460. }
  3461. /**
  3462. * Mix properties into target object.
  3463. */
  3464. function extend (to, _from) {
  3465. for (var key in _from) {
  3466. to[key] = _from[key];
  3467. }
  3468. return to
  3469. }
  3470. /**
  3471. * Merge an Array of Objects into a single Object.
  3472. */
  3473. function toObject (arr) {
  3474. var res = {};
  3475. for (var i = 0; i < arr.length; i++) {
  3476. if (arr[i]) {
  3477. extend(res, arr[i]);
  3478. }
  3479. }
  3480. return res
  3481. }
  3482. /* eslint-disable no-unused-vars */
  3483. /**
  3484. * Perform no operation.
  3485. * Stubbing args to make Flow happy without leaving useless transpiled code
  3486. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3487. */
  3488. function noop (a, b, c) {}
  3489. /**
  3490. * Always return false.
  3491. */
  3492. var no = function (a, b, c) { return false; };
  3493. /* eslint-enable no-unused-vars */
  3494. /**
  3495. * Return the same value.
  3496. */
  3497. var identity = function (_) { return _; };
  3498. /**
  3499. * Check if two values are loosely equal - that is,
  3500. * if they are plain objects, do they have the same shape?
  3501. */
  3502. function looseEqual (a, b) {
  3503. if (a === b) { return true }
  3504. var isObjectA = isObject(a);
  3505. var isObjectB = isObject(b);
  3506. if (isObjectA && isObjectB) {
  3507. try {
  3508. var isArrayA = Array.isArray(a);
  3509. var isArrayB = Array.isArray(b);
  3510. if (isArrayA && isArrayB) {
  3511. return a.length === b.length && a.every(function (e, i) {
  3512. return looseEqual(e, b[i])
  3513. })
  3514. } else if (a instanceof Date && b instanceof Date) {
  3515. return a.getTime() === b.getTime()
  3516. } else if (!isArrayA && !isArrayB) {
  3517. var keysA = Object.keys(a);
  3518. var keysB = Object.keys(b);
  3519. return keysA.length === keysB.length && keysA.every(function (key) {
  3520. return looseEqual(a[key], b[key])
  3521. })
  3522. } else {
  3523. /* istanbul ignore next */
  3524. return false
  3525. }
  3526. } catch (e) {
  3527. /* istanbul ignore next */
  3528. return false
  3529. }
  3530. } else if (!isObjectA && !isObjectB) {
  3531. return String(a) === String(b)
  3532. } else {
  3533. return false
  3534. }
  3535. }
  3536. /**
  3537. * Return the first index at which a loosely equal value can be
  3538. * found in the array (if value is a plain object, the array must
  3539. * contain an object of the same shape), or -1 if it is not present.
  3540. */
  3541. function looseIndexOf (arr, val) {
  3542. for (var i = 0; i < arr.length; i++) {
  3543. if (looseEqual(arr[i], val)) { return i }
  3544. }
  3545. return -1
  3546. }
  3547. /**
  3548. * Ensure a function is called only once.
  3549. */
  3550. function once (fn) {
  3551. var called = false;
  3552. return function () {
  3553. if (!called) {
  3554. called = true;
  3555. fn.apply(this, arguments);
  3556. }
  3557. }
  3558. }
  3559. var ASSET_TYPES = [
  3560. 'component',
  3561. 'directive',
  3562. 'filter'
  3563. ];
  3564. var LIFECYCLE_HOOKS = [
  3565. 'beforeCreate',
  3566. 'created',
  3567. 'beforeMount',
  3568. 'mounted',
  3569. 'beforeUpdate',
  3570. 'updated',
  3571. 'beforeDestroy',
  3572. 'destroyed',
  3573. 'activated',
  3574. 'deactivated',
  3575. 'errorCaptured',
  3576. 'serverPrefetch'
  3577. ];
  3578. /* */
  3579. var config = ({
  3580. /**
  3581. * Option merge strategies (used in core/util/options)
  3582. */
  3583. // $flow-disable-line
  3584. optionMergeStrategies: Object.create(null),
  3585. /**
  3586. * Whether to suppress warnings.
  3587. */
  3588. silent: false,
  3589. /**
  3590. * Show production mode tip message on boot?
  3591. */
  3592. productionTip: "development" !== 'production',
  3593. /**
  3594. * Whether to enable devtools
  3595. */
  3596. devtools: "development" !== 'production',
  3597. /**
  3598. * Whether to record perf
  3599. */
  3600. performance: false,
  3601. /**
  3602. * Error handler for watcher errors
  3603. */
  3604. errorHandler: null,
  3605. /**
  3606. * Warn handler for watcher warns
  3607. */
  3608. warnHandler: null,
  3609. /**
  3610. * Ignore certain custom elements
  3611. */
  3612. ignoredElements: [],
  3613. /**
  3614. * Custom user key aliases for v-on
  3615. */
  3616. // $flow-disable-line
  3617. keyCodes: Object.create(null),
  3618. /**
  3619. * Check if a tag is reserved so that it cannot be registered as a
  3620. * component. This is platform-dependent and may be overwritten.
  3621. */
  3622. isReservedTag: no,
  3623. /**
  3624. * Check if an attribute is reserved so that it cannot be used as a component
  3625. * prop. This is platform-dependent and may be overwritten.
  3626. */
  3627. isReservedAttr: no,
  3628. /**
  3629. * Check if a tag is an unknown element.
  3630. * Platform-dependent.
  3631. */
  3632. isUnknownElement: no,
  3633. /**
  3634. * Get the namespace of an element
  3635. */
  3636. getTagNamespace: noop,
  3637. /**
  3638. * Parse the real tag name for the specific platform.
  3639. */
  3640. parsePlatformTagName: identity,
  3641. /**
  3642. * Check if an attribute must be bound using property, e.g. value
  3643. * Platform-dependent.
  3644. */
  3645. mustUseProp: no,
  3646. /**
  3647. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3648. * This will significantly reduce performance if set to false.
  3649. */
  3650. async: true,
  3651. /**
  3652. * Exposed for legacy reasons
  3653. */
  3654. _lifecycleHooks: LIFECYCLE_HOOKS
  3655. });
  3656. /* */
  3657. /**
  3658. * unicode letters used for parsing html tags, component names and property paths.
  3659. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3660. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3661. */
  3662. 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/;
  3663. /**
  3664. * Check if a string starts with $ or _
  3665. */
  3666. function isReserved (str) {
  3667. var c = (str + '').charCodeAt(0);
  3668. return c === 0x24 || c === 0x5F
  3669. }
  3670. /**
  3671. * Define a property.
  3672. */
  3673. function def (obj, key, val, enumerable) {
  3674. Object.defineProperty(obj, key, {
  3675. value: val,
  3676. enumerable: !!enumerable,
  3677. writable: true,
  3678. configurable: true
  3679. });
  3680. }
  3681. /**
  3682. * Parse simple path.
  3683. */
  3684. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3685. function parsePath (path) {
  3686. if (bailRE.test(path)) {
  3687. return
  3688. }
  3689. var segments = path.split('.');
  3690. return function (obj) {
  3691. for (var i = 0; i < segments.length; i++) {
  3692. if (!obj) { return }
  3693. obj = obj[segments[i]];
  3694. }
  3695. return obj
  3696. }
  3697. }
  3698. /* */
  3699. // can we use __proto__?
  3700. var hasProto = '__proto__' in {};
  3701. // Browser environment sniffing
  3702. var inBrowser = typeof window !== 'undefined';
  3703. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3704. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3705. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3706. var isIE = UA && /msie|trident/.test(UA);
  3707. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3708. var isEdge = UA && UA.indexOf('edge/') > 0;
  3709. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3710. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3711. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3712. var isPhantomJS = UA && /phantomjs/.test(UA);
  3713. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3714. // Firefox has a "watch" function on Object.prototype...
  3715. var nativeWatch = ({}).watch;
  3716. if (inBrowser) {
  3717. try {
  3718. var opts = {};
  3719. Object.defineProperty(opts, 'passive', ({
  3720. get: function get () {
  3721. }
  3722. })); // https://github.com/facebook/flow/issues/285
  3723. window.addEventListener('test-passive', null, opts);
  3724. } catch (e) {}
  3725. }
  3726. // this needs to be lazy-evaled because vue may be required before
  3727. // vue-server-renderer can set VUE_ENV
  3728. var _isServer;
  3729. var isServerRendering = function () {
  3730. if (_isServer === undefined) {
  3731. /* istanbul ignore if */
  3732. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3733. // detect presence of vue-server-renderer and avoid
  3734. // Webpack shimming the process
  3735. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3736. } else {
  3737. _isServer = false;
  3738. }
  3739. }
  3740. return _isServer
  3741. };
  3742. // detect devtools
  3743. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3744. /* istanbul ignore next */
  3745. function isNative (Ctor) {
  3746. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3747. }
  3748. var hasSymbol =
  3749. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3750. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3751. var _Set;
  3752. /* istanbul ignore if */ // $flow-disable-line
  3753. if (typeof Set !== 'undefined' && isNative(Set)) {
  3754. // use native Set when available.
  3755. _Set = Set;
  3756. } else {
  3757. // a non-standard Set polyfill that only works with primitive keys.
  3758. _Set = /*@__PURE__*/(function () {
  3759. function Set () {
  3760. this.set = Object.create(null);
  3761. }
  3762. Set.prototype.has = function has (key) {
  3763. return this.set[key] === true
  3764. };
  3765. Set.prototype.add = function add (key) {
  3766. this.set[key] = true;
  3767. };
  3768. Set.prototype.clear = function clear () {
  3769. this.set = Object.create(null);
  3770. };
  3771. return Set;
  3772. }());
  3773. }
  3774. /* */
  3775. var warn = noop;
  3776. var tip = noop;
  3777. var generateComponentTrace = (noop); // work around flow check
  3778. var formatComponentName = (noop);
  3779. if (true) {
  3780. var hasConsole = typeof console !== 'undefined';
  3781. var classifyRE = /(?:^|[-_])(\w)/g;
  3782. var classify = function (str) { return str
  3783. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3784. .replace(/[-_]/g, ''); };
  3785. warn = function (msg, vm) {
  3786. var trace = vm ? generateComponentTrace(vm) : '';
  3787. if (config.warnHandler) {
  3788. config.warnHandler.call(null, msg, vm, trace);
  3789. } else if (hasConsole && (!config.silent)) {
  3790. console.error(("[Vue warn]: " + msg + trace));
  3791. }
  3792. };
  3793. tip = function (msg, vm) {
  3794. if (hasConsole && (!config.silent)) {
  3795. console.warn("[Vue tip]: " + msg + (
  3796. vm ? generateComponentTrace(vm) : ''
  3797. ));
  3798. }
  3799. };
  3800. formatComponentName = function (vm, includeFile) {
  3801. if (vm.$root === vm) {
  3802. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3803. return ('') + vm.$options.__file
  3804. }
  3805. return '<Root>'
  3806. }
  3807. var options = typeof vm === 'function' && vm.cid != null
  3808. ? vm.options
  3809. : vm._isVue
  3810. ? vm.$options || vm.constructor.options
  3811. : vm;
  3812. var name = options.name || options._componentTag;
  3813. var file = options.__file;
  3814. if (!name && file) {
  3815. var match = file.match(/([^/\\]+)\.vue$/);
  3816. name = match && match[1];
  3817. }
  3818. return (
  3819. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3820. (file && includeFile !== false ? (" at " + file) : '')
  3821. )
  3822. };
  3823. var repeat = function (str, n) {
  3824. var res = '';
  3825. while (n) {
  3826. if (n % 2 === 1) { res += str; }
  3827. if (n > 1) { str += str; }
  3828. n >>= 1;
  3829. }
  3830. return res
  3831. };
  3832. generateComponentTrace = function (vm) {
  3833. if (vm._isVue && vm.$parent) {
  3834. var tree = [];
  3835. var currentRecursiveSequence = 0;
  3836. while (vm && vm.$options.name !== 'PageBody') {
  3837. if (tree.length > 0) {
  3838. var last = tree[tree.length - 1];
  3839. if (last.constructor === vm.constructor) {
  3840. currentRecursiveSequence++;
  3841. vm = vm.$parent;
  3842. continue
  3843. } else if (currentRecursiveSequence > 0) {
  3844. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3845. currentRecursiveSequence = 0;
  3846. }
  3847. }
  3848. !vm.$options.isReserved && tree.push(vm);
  3849. vm = vm.$parent;
  3850. }
  3851. return '\n\nfound in\n\n' + tree
  3852. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3853. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3854. : formatComponentName(vm))); })
  3855. .join('\n')
  3856. } else {
  3857. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3858. }
  3859. };
  3860. }
  3861. /* */
  3862. var uid = 0;
  3863. /**
  3864. * A dep is an observable that can have multiple
  3865. * directives subscribing to it.
  3866. */
  3867. var Dep = function Dep () {
  3868. this.id = uid++;
  3869. this.subs = [];
  3870. };
  3871. Dep.prototype.addSub = function addSub (sub) {
  3872. this.subs.push(sub);
  3873. };
  3874. Dep.prototype.removeSub = function removeSub (sub) {
  3875. remove(this.subs, sub);
  3876. };
  3877. Dep.prototype.depend = function depend () {
  3878. if (Dep.SharedObject.target) {
  3879. Dep.SharedObject.target.addDep(this);
  3880. }
  3881. };
  3882. Dep.prototype.notify = function notify () {
  3883. // stabilize the subscriber list first
  3884. var subs = this.subs.slice();
  3885. if ( true && !config.async) {
  3886. // subs aren't sorted in scheduler if not running async
  3887. // we need to sort them now to make sure they fire in correct
  3888. // order
  3889. subs.sort(function (a, b) { return a.id - b.id; });
  3890. }
  3891. for (var i = 0, l = subs.length; i < l; i++) {
  3892. subs[i].update();
  3893. }
  3894. };
  3895. // The current target watcher being evaluated.
  3896. // This is globally unique because only one watcher
  3897. // can be evaluated at a time.
  3898. // fixed by xxxxxx (nvue shared vuex)
  3899. /* eslint-disable no-undef */
  3900. Dep.SharedObject = {};
  3901. Dep.SharedObject.target = null;
  3902. Dep.SharedObject.targetStack = [];
  3903. function pushTarget (target) {
  3904. Dep.SharedObject.targetStack.push(target);
  3905. Dep.SharedObject.target = target;
  3906. Dep.target = target;
  3907. }
  3908. function popTarget () {
  3909. Dep.SharedObject.targetStack.pop();
  3910. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3911. Dep.target = Dep.SharedObject.target;
  3912. }
  3913. /* */
  3914. var VNode = function VNode (
  3915. tag,
  3916. data,
  3917. children,
  3918. text,
  3919. elm,
  3920. context,
  3921. componentOptions,
  3922. asyncFactory
  3923. ) {
  3924. this.tag = tag;
  3925. this.data = data;
  3926. this.children = children;
  3927. this.text = text;
  3928. this.elm = elm;
  3929. this.ns = undefined;
  3930. this.context = context;
  3931. this.fnContext = undefined;
  3932. this.fnOptions = undefined;
  3933. this.fnScopeId = undefined;
  3934. this.key = data && data.key;
  3935. this.componentOptions = componentOptions;
  3936. this.componentInstance = undefined;
  3937. this.parent = undefined;
  3938. this.raw = false;
  3939. this.isStatic = false;
  3940. this.isRootInsert = true;
  3941. this.isComment = false;
  3942. this.isCloned = false;
  3943. this.isOnce = false;
  3944. this.asyncFactory = asyncFactory;
  3945. this.asyncMeta = undefined;
  3946. this.isAsyncPlaceholder = false;
  3947. };
  3948. var prototypeAccessors = { child: { configurable: true } };
  3949. // DEPRECATED: alias for componentInstance for backwards compat.
  3950. /* istanbul ignore next */
  3951. prototypeAccessors.child.get = function () {
  3952. return this.componentInstance
  3953. };
  3954. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3955. var createEmptyVNode = function (text) {
  3956. if ( text === void 0 ) text = '';
  3957. var node = new VNode();
  3958. node.text = text;
  3959. node.isComment = true;
  3960. return node
  3961. };
  3962. function createTextVNode (val) {
  3963. return new VNode(undefined, undefined, undefined, String(val))
  3964. }
  3965. // optimized shallow clone
  3966. // used for static nodes and slot nodes because they may be reused across
  3967. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3968. // on their elm reference.
  3969. function cloneVNode (vnode) {
  3970. var cloned = new VNode(
  3971. vnode.tag,
  3972. vnode.data,
  3973. // #7975
  3974. // clone children array to avoid mutating original in case of cloning
  3975. // a child.
  3976. vnode.children && vnode.children.slice(),
  3977. vnode.text,
  3978. vnode.elm,
  3979. vnode.context,
  3980. vnode.componentOptions,
  3981. vnode.asyncFactory
  3982. );
  3983. cloned.ns = vnode.ns;
  3984. cloned.isStatic = vnode.isStatic;
  3985. cloned.key = vnode.key;
  3986. cloned.isComment = vnode.isComment;
  3987. cloned.fnContext = vnode.fnContext;
  3988. cloned.fnOptions = vnode.fnOptions;
  3989. cloned.fnScopeId = vnode.fnScopeId;
  3990. cloned.asyncMeta = vnode.asyncMeta;
  3991. cloned.isCloned = true;
  3992. return cloned
  3993. }
  3994. /*
  3995. * not type checking this file because flow doesn't play well with
  3996. * dynamically accessing methods on Array prototype
  3997. */
  3998. var arrayProto = Array.prototype;
  3999. var arrayMethods = Object.create(arrayProto);
  4000. var methodsToPatch = [
  4001. 'push',
  4002. 'pop',
  4003. 'shift',
  4004. 'unshift',
  4005. 'splice',
  4006. 'sort',
  4007. 'reverse'
  4008. ];
  4009. /**
  4010. * Intercept mutating methods and emit events
  4011. */
  4012. methodsToPatch.forEach(function (method) {
  4013. // cache original method
  4014. var original = arrayProto[method];
  4015. def(arrayMethods, method, function mutator () {
  4016. var args = [], len = arguments.length;
  4017. while ( len-- ) args[ len ] = arguments[ len ];
  4018. var result = original.apply(this, args);
  4019. var ob = this.__ob__;
  4020. var inserted;
  4021. switch (method) {
  4022. case 'push':
  4023. case 'unshift':
  4024. inserted = args;
  4025. break
  4026. case 'splice':
  4027. inserted = args.slice(2);
  4028. break
  4029. }
  4030. if (inserted) { ob.observeArray(inserted); }
  4031. // notify change
  4032. ob.dep.notify();
  4033. return result
  4034. });
  4035. });
  4036. /* */
  4037. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4038. /**
  4039. * In some cases we may want to disable observation inside a component's
  4040. * update computation.
  4041. */
  4042. var shouldObserve = true;
  4043. function toggleObserving (value) {
  4044. shouldObserve = value;
  4045. }
  4046. /**
  4047. * Observer class that is attached to each observed
  4048. * object. Once attached, the observer converts the target
  4049. * object's property keys into getter/setters that
  4050. * collect dependencies and dispatch updates.
  4051. */
  4052. var Observer = function Observer (value) {
  4053. this.value = value;
  4054. this.dep = new Dep();
  4055. this.vmCount = 0;
  4056. def(value, '__ob__', this);
  4057. if (Array.isArray(value)) {
  4058. if (hasProto) {
  4059. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4060. if(value.push !== value.__proto__.push){
  4061. copyAugment(value, arrayMethods, arrayKeys);
  4062. } else {
  4063. protoAugment(value, arrayMethods);
  4064. }
  4065. }
  4066. } else {
  4067. copyAugment(value, arrayMethods, arrayKeys);
  4068. }
  4069. this.observeArray(value);
  4070. } else {
  4071. this.walk(value);
  4072. }
  4073. };
  4074. /**
  4075. * Walk through all properties and convert them into
  4076. * getter/setters. This method should only be called when
  4077. * value type is Object.
  4078. */
  4079. Observer.prototype.walk = function walk (obj) {
  4080. var keys = Object.keys(obj);
  4081. for (var i = 0; i < keys.length; i++) {
  4082. defineReactive$$1(obj, keys[i]);
  4083. }
  4084. };
  4085. /**
  4086. * Observe a list of Array items.
  4087. */
  4088. Observer.prototype.observeArray = function observeArray (items) {
  4089. for (var i = 0, l = items.length; i < l; i++) {
  4090. observe(items[i]);
  4091. }
  4092. };
  4093. // helpers
  4094. /**
  4095. * Augment a target Object or Array by intercepting
  4096. * the prototype chain using __proto__
  4097. */
  4098. function protoAugment (target, src) {
  4099. /* eslint-disable no-proto */
  4100. target.__proto__ = src;
  4101. /* eslint-enable no-proto */
  4102. }
  4103. /**
  4104. * Augment a target Object or Array by defining
  4105. * hidden properties.
  4106. */
  4107. /* istanbul ignore next */
  4108. function copyAugment (target, src, keys) {
  4109. for (var i = 0, l = keys.length; i < l; i++) {
  4110. var key = keys[i];
  4111. def(target, key, src[key]);
  4112. }
  4113. }
  4114. /**
  4115. * Attempt to create an observer instance for a value,
  4116. * returns the new observer if successfully observed,
  4117. * or the existing observer if the value already has one.
  4118. */
  4119. function observe (value, asRootData) {
  4120. if (!isObject(value) || value instanceof VNode) {
  4121. return
  4122. }
  4123. var ob;
  4124. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4125. ob = value.__ob__;
  4126. } else if (
  4127. shouldObserve &&
  4128. !isServerRendering() &&
  4129. (Array.isArray(value) || isPlainObject(value)) &&
  4130. Object.isExtensible(value) &&
  4131. !value._isVue &&
  4132. !value.__v_isMPComponent
  4133. ) {
  4134. ob = new Observer(value);
  4135. }
  4136. if (asRootData && ob) {
  4137. ob.vmCount++;
  4138. }
  4139. return ob
  4140. }
  4141. /**
  4142. * Define a reactive property on an Object.
  4143. */
  4144. function defineReactive$$1 (
  4145. obj,
  4146. key,
  4147. val,
  4148. customSetter,
  4149. shallow
  4150. ) {
  4151. var dep = new Dep();
  4152. var property = Object.getOwnPropertyDescriptor(obj, key);
  4153. if (property && property.configurable === false) {
  4154. return
  4155. }
  4156. // cater for pre-defined getter/setters
  4157. var getter = property && property.get;
  4158. var setter = property && property.set;
  4159. if ((!getter || setter) && arguments.length === 2) {
  4160. val = obj[key];
  4161. }
  4162. var childOb = !shallow && observe(val);
  4163. Object.defineProperty(obj, key, {
  4164. enumerable: true,
  4165. configurable: true,
  4166. get: function reactiveGetter () {
  4167. var value = getter ? getter.call(obj) : val;
  4168. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4169. dep.depend();
  4170. if (childOb) {
  4171. childOb.dep.depend();
  4172. if (Array.isArray(value)) {
  4173. dependArray(value);
  4174. }
  4175. }
  4176. }
  4177. return value
  4178. },
  4179. set: function reactiveSetter (newVal) {
  4180. var value = getter ? getter.call(obj) : val;
  4181. /* eslint-disable no-self-compare */
  4182. if (newVal === value || (newVal !== newVal && value !== value)) {
  4183. return
  4184. }
  4185. /* eslint-enable no-self-compare */
  4186. if ( true && customSetter) {
  4187. customSetter();
  4188. }
  4189. // #7981: for accessor properties without setter
  4190. if (getter && !setter) { return }
  4191. if (setter) {
  4192. setter.call(obj, newVal);
  4193. } else {
  4194. val = newVal;
  4195. }
  4196. childOb = !shallow && observe(newVal);
  4197. dep.notify();
  4198. }
  4199. });
  4200. }
  4201. /**
  4202. * Set a property on an object. Adds the new property and
  4203. * triggers change notification if the property doesn't
  4204. * already exist.
  4205. */
  4206. function set (target, key, val) {
  4207. if ( true &&
  4208. (isUndef(target) || isPrimitive(target))
  4209. ) {
  4210. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4211. }
  4212. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4213. target.length = Math.max(target.length, key);
  4214. target.splice(key, 1, val);
  4215. return val
  4216. }
  4217. if (key in target && !(key in Object.prototype)) {
  4218. target[key] = val;
  4219. return val
  4220. }
  4221. var ob = (target).__ob__;
  4222. if (target._isVue || (ob && ob.vmCount)) {
  4223. true && warn(
  4224. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4225. 'at runtime - declare it upfront in the data option.'
  4226. );
  4227. return val
  4228. }
  4229. if (!ob) {
  4230. target[key] = val;
  4231. return val
  4232. }
  4233. defineReactive$$1(ob.value, key, val);
  4234. ob.dep.notify();
  4235. return val
  4236. }
  4237. /**
  4238. * Delete a property and trigger change if necessary.
  4239. */
  4240. function del (target, key) {
  4241. if ( true &&
  4242. (isUndef(target) || isPrimitive(target))
  4243. ) {
  4244. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4245. }
  4246. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4247. target.splice(key, 1);
  4248. return
  4249. }
  4250. var ob = (target).__ob__;
  4251. if (target._isVue || (ob && ob.vmCount)) {
  4252. true && warn(
  4253. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4254. '- just set it to null.'
  4255. );
  4256. return
  4257. }
  4258. if (!hasOwn(target, key)) {
  4259. return
  4260. }
  4261. delete target[key];
  4262. if (!ob) {
  4263. return
  4264. }
  4265. ob.dep.notify();
  4266. }
  4267. /**
  4268. * Collect dependencies on array elements when the array is touched, since
  4269. * we cannot intercept array element access like property getters.
  4270. */
  4271. function dependArray (value) {
  4272. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4273. e = value[i];
  4274. e && e.__ob__ && e.__ob__.dep.depend();
  4275. if (Array.isArray(e)) {
  4276. dependArray(e);
  4277. }
  4278. }
  4279. }
  4280. /* */
  4281. /**
  4282. * Option overwriting strategies are functions that handle
  4283. * how to merge a parent option value and a child option
  4284. * value into the final value.
  4285. */
  4286. var strats = config.optionMergeStrategies;
  4287. /**
  4288. * Options with restrictions
  4289. */
  4290. if (true) {
  4291. strats.el = strats.propsData = function (parent, child, vm, key) {
  4292. if (!vm) {
  4293. warn(
  4294. "option \"" + key + "\" can only be used during instance " +
  4295. 'creation with the `new` keyword.'
  4296. );
  4297. }
  4298. return defaultStrat(parent, child)
  4299. };
  4300. }
  4301. /**
  4302. * Helper that recursively merges two data objects together.
  4303. */
  4304. function mergeData (to, from) {
  4305. if (!from) { return to }
  4306. var key, toVal, fromVal;
  4307. var keys = hasSymbol
  4308. ? Reflect.ownKeys(from)
  4309. : Object.keys(from);
  4310. for (var i = 0; i < keys.length; i++) {
  4311. key = keys[i];
  4312. // in case the object is already observed...
  4313. if (key === '__ob__') { continue }
  4314. toVal = to[key];
  4315. fromVal = from[key];
  4316. if (!hasOwn(to, key)) {
  4317. set(to, key, fromVal);
  4318. } else if (
  4319. toVal !== fromVal &&
  4320. isPlainObject(toVal) &&
  4321. isPlainObject(fromVal)
  4322. ) {
  4323. mergeData(toVal, fromVal);
  4324. }
  4325. }
  4326. return to
  4327. }
  4328. /**
  4329. * Data
  4330. */
  4331. function mergeDataOrFn (
  4332. parentVal,
  4333. childVal,
  4334. vm
  4335. ) {
  4336. if (!vm) {
  4337. // in a Vue.extend merge, both should be functions
  4338. if (!childVal) {
  4339. return parentVal
  4340. }
  4341. if (!parentVal) {
  4342. return childVal
  4343. }
  4344. // when parentVal & childVal are both present,
  4345. // we need to return a function that returns the
  4346. // merged result of both functions... no need to
  4347. // check if parentVal is a function here because
  4348. // it has to be a function to pass previous merges.
  4349. return function mergedDataFn () {
  4350. return mergeData(
  4351. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4352. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4353. )
  4354. }
  4355. } else {
  4356. return function mergedInstanceDataFn () {
  4357. // instance merge
  4358. var instanceData = typeof childVal === 'function'
  4359. ? childVal.call(vm, vm)
  4360. : childVal;
  4361. var defaultData = typeof parentVal === 'function'
  4362. ? parentVal.call(vm, vm)
  4363. : parentVal;
  4364. if (instanceData) {
  4365. return mergeData(instanceData, defaultData)
  4366. } else {
  4367. return defaultData
  4368. }
  4369. }
  4370. }
  4371. }
  4372. strats.data = function (
  4373. parentVal,
  4374. childVal,
  4375. vm
  4376. ) {
  4377. if (!vm) {
  4378. if (childVal && typeof childVal !== 'function') {
  4379. true && warn(
  4380. 'The "data" option should be a function ' +
  4381. 'that returns a per-instance value in component ' +
  4382. 'definitions.',
  4383. vm
  4384. );
  4385. return parentVal
  4386. }
  4387. return mergeDataOrFn(parentVal, childVal)
  4388. }
  4389. return mergeDataOrFn(parentVal, childVal, vm)
  4390. };
  4391. /**
  4392. * Hooks and props are merged as arrays.
  4393. */
  4394. function mergeHook (
  4395. parentVal,
  4396. childVal
  4397. ) {
  4398. var res = childVal
  4399. ? parentVal
  4400. ? parentVal.concat(childVal)
  4401. : Array.isArray(childVal)
  4402. ? childVal
  4403. : [childVal]
  4404. : parentVal;
  4405. return res
  4406. ? dedupeHooks(res)
  4407. : res
  4408. }
  4409. function dedupeHooks (hooks) {
  4410. var res = [];
  4411. for (var i = 0; i < hooks.length; i++) {
  4412. if (res.indexOf(hooks[i]) === -1) {
  4413. res.push(hooks[i]);
  4414. }
  4415. }
  4416. return res
  4417. }
  4418. LIFECYCLE_HOOKS.forEach(function (hook) {
  4419. strats[hook] = mergeHook;
  4420. });
  4421. /**
  4422. * Assets
  4423. *
  4424. * When a vm is present (instance creation), we need to do
  4425. * a three-way merge between constructor options, instance
  4426. * options and parent options.
  4427. */
  4428. function mergeAssets (
  4429. parentVal,
  4430. childVal,
  4431. vm,
  4432. key
  4433. ) {
  4434. var res = Object.create(parentVal || null);
  4435. if (childVal) {
  4436. true && assertObjectType(key, childVal, vm);
  4437. return extend(res, childVal)
  4438. } else {
  4439. return res
  4440. }
  4441. }
  4442. ASSET_TYPES.forEach(function (type) {
  4443. strats[type + 's'] = mergeAssets;
  4444. });
  4445. /**
  4446. * Watchers.
  4447. *
  4448. * Watchers hashes should not overwrite one
  4449. * another, so we merge them as arrays.
  4450. */
  4451. strats.watch = function (
  4452. parentVal,
  4453. childVal,
  4454. vm,
  4455. key
  4456. ) {
  4457. // work around Firefox's Object.prototype.watch...
  4458. if (parentVal === nativeWatch) { parentVal = undefined; }
  4459. if (childVal === nativeWatch) { childVal = undefined; }
  4460. /* istanbul ignore if */
  4461. if (!childVal) { return Object.create(parentVal || null) }
  4462. if (true) {
  4463. assertObjectType(key, childVal, vm);
  4464. }
  4465. if (!parentVal) { return childVal }
  4466. var ret = {};
  4467. extend(ret, parentVal);
  4468. for (var key$1 in childVal) {
  4469. var parent = ret[key$1];
  4470. var child = childVal[key$1];
  4471. if (parent && !Array.isArray(parent)) {
  4472. parent = [parent];
  4473. }
  4474. ret[key$1] = parent
  4475. ? parent.concat(child)
  4476. : Array.isArray(child) ? child : [child];
  4477. }
  4478. return ret
  4479. };
  4480. /**
  4481. * Other object hashes.
  4482. */
  4483. strats.props =
  4484. strats.methods =
  4485. strats.inject =
  4486. strats.computed = function (
  4487. parentVal,
  4488. childVal,
  4489. vm,
  4490. key
  4491. ) {
  4492. if (childVal && "development" !== 'production') {
  4493. assertObjectType(key, childVal, vm);
  4494. }
  4495. if (!parentVal) { return childVal }
  4496. var ret = Object.create(null);
  4497. extend(ret, parentVal);
  4498. if (childVal) { extend(ret, childVal); }
  4499. return ret
  4500. };
  4501. strats.provide = mergeDataOrFn;
  4502. /**
  4503. * Default strategy.
  4504. */
  4505. var defaultStrat = function (parentVal, childVal) {
  4506. return childVal === undefined
  4507. ? parentVal
  4508. : childVal
  4509. };
  4510. /**
  4511. * Validate component names
  4512. */
  4513. function checkComponents (options) {
  4514. for (var key in options.components) {
  4515. validateComponentName(key);
  4516. }
  4517. }
  4518. function validateComponentName (name) {
  4519. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4520. warn(
  4521. 'Invalid component name: "' + name + '". Component names ' +
  4522. 'should conform to valid custom element name in html5 specification.'
  4523. );
  4524. }
  4525. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4526. warn(
  4527. 'Do not use built-in or reserved HTML elements as component ' +
  4528. 'id: ' + name
  4529. );
  4530. }
  4531. }
  4532. /**
  4533. * Ensure all props option syntax are normalized into the
  4534. * Object-based format.
  4535. */
  4536. function normalizeProps (options, vm) {
  4537. var props = options.props;
  4538. if (!props) { return }
  4539. var res = {};
  4540. var i, val, name;
  4541. if (Array.isArray(props)) {
  4542. i = props.length;
  4543. while (i--) {
  4544. val = props[i];
  4545. if (typeof val === 'string') {
  4546. name = camelize(val);
  4547. res[name] = { type: null };
  4548. } else if (true) {
  4549. warn('props must be strings when using array syntax.');
  4550. }
  4551. }
  4552. } else if (isPlainObject(props)) {
  4553. for (var key in props) {
  4554. val = props[key];
  4555. name = camelize(key);
  4556. res[name] = isPlainObject(val)
  4557. ? val
  4558. : { type: val };
  4559. }
  4560. } else if (true) {
  4561. warn(
  4562. "Invalid value for option \"props\": expected an Array or an Object, " +
  4563. "but got " + (toRawType(props)) + ".",
  4564. vm
  4565. );
  4566. }
  4567. options.props = res;
  4568. }
  4569. /**
  4570. * Normalize all injections into Object-based format
  4571. */
  4572. function normalizeInject (options, vm) {
  4573. var inject = options.inject;
  4574. if (!inject) { return }
  4575. var normalized = options.inject = {};
  4576. if (Array.isArray(inject)) {
  4577. for (var i = 0; i < inject.length; i++) {
  4578. normalized[inject[i]] = { from: inject[i] };
  4579. }
  4580. } else if (isPlainObject(inject)) {
  4581. for (var key in inject) {
  4582. var val = inject[key];
  4583. normalized[key] = isPlainObject(val)
  4584. ? extend({ from: key }, val)
  4585. : { from: val };
  4586. }
  4587. } else if (true) {
  4588. warn(
  4589. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4590. "but got " + (toRawType(inject)) + ".",
  4591. vm
  4592. );
  4593. }
  4594. }
  4595. /**
  4596. * Normalize raw function directives into object format.
  4597. */
  4598. function normalizeDirectives (options) {
  4599. var dirs = options.directives;
  4600. if (dirs) {
  4601. for (var key in dirs) {
  4602. var def$$1 = dirs[key];
  4603. if (typeof def$$1 === 'function') {
  4604. dirs[key] = { bind: def$$1, update: def$$1 };
  4605. }
  4606. }
  4607. }
  4608. }
  4609. function assertObjectType (name, value, vm) {
  4610. if (!isPlainObject(value)) {
  4611. warn(
  4612. "Invalid value for option \"" + name + "\": expected an Object, " +
  4613. "but got " + (toRawType(value)) + ".",
  4614. vm
  4615. );
  4616. }
  4617. }
  4618. /**
  4619. * Merge two option objects into a new one.
  4620. * Core utility used in both instantiation and inheritance.
  4621. */
  4622. function mergeOptions (
  4623. parent,
  4624. child,
  4625. vm
  4626. ) {
  4627. if (true) {
  4628. checkComponents(child);
  4629. }
  4630. if (typeof child === 'function') {
  4631. child = child.options;
  4632. }
  4633. normalizeProps(child, vm);
  4634. normalizeInject(child, vm);
  4635. normalizeDirectives(child);
  4636. // Apply extends and mixins on the child options,
  4637. // but only if it is a raw options object that isn't
  4638. // the result of another mergeOptions call.
  4639. // Only merged options has the _base property.
  4640. if (!child._base) {
  4641. if (child.extends) {
  4642. parent = mergeOptions(parent, child.extends, vm);
  4643. }
  4644. if (child.mixins) {
  4645. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4646. parent = mergeOptions(parent, child.mixins[i], vm);
  4647. }
  4648. }
  4649. }
  4650. var options = {};
  4651. var key;
  4652. for (key in parent) {
  4653. mergeField(key);
  4654. }
  4655. for (key in child) {
  4656. if (!hasOwn(parent, key)) {
  4657. mergeField(key);
  4658. }
  4659. }
  4660. function mergeField (key) {
  4661. var strat = strats[key] || defaultStrat;
  4662. options[key] = strat(parent[key], child[key], vm, key);
  4663. }
  4664. return options
  4665. }
  4666. /**
  4667. * Resolve an asset.
  4668. * This function is used because child instances need access
  4669. * to assets defined in its ancestor chain.
  4670. */
  4671. function resolveAsset (
  4672. options,
  4673. type,
  4674. id,
  4675. warnMissing
  4676. ) {
  4677. /* istanbul ignore if */
  4678. if (typeof id !== 'string') {
  4679. return
  4680. }
  4681. var assets = options[type];
  4682. // check local registration variations first
  4683. if (hasOwn(assets, id)) { return assets[id] }
  4684. var camelizedId = camelize(id);
  4685. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4686. var PascalCaseId = capitalize(camelizedId);
  4687. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4688. // fallback to prototype chain
  4689. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4690. if ( true && warnMissing && !res) {
  4691. warn(
  4692. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4693. options
  4694. );
  4695. }
  4696. return res
  4697. }
  4698. /* */
  4699. function validateProp (
  4700. key,
  4701. propOptions,
  4702. propsData,
  4703. vm
  4704. ) {
  4705. var prop = propOptions[key];
  4706. var absent = !hasOwn(propsData, key);
  4707. var value = propsData[key];
  4708. // boolean casting
  4709. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4710. if (booleanIndex > -1) {
  4711. if (absent && !hasOwn(prop, 'default')) {
  4712. value = false;
  4713. } else if (value === '' || value === hyphenate(key)) {
  4714. // only cast empty string / same name to boolean if
  4715. // boolean has higher priority
  4716. var stringIndex = getTypeIndex(String, prop.type);
  4717. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4718. value = true;
  4719. }
  4720. }
  4721. }
  4722. // check default value
  4723. if (value === undefined) {
  4724. value = getPropDefaultValue(vm, prop, key);
  4725. // since the default value is a fresh copy,
  4726. // make sure to observe it.
  4727. var prevShouldObserve = shouldObserve;
  4728. toggleObserving(true);
  4729. observe(value);
  4730. toggleObserving(prevShouldObserve);
  4731. }
  4732. if (
  4733. true
  4734. ) {
  4735. assertProp(prop, key, value, vm, absent);
  4736. }
  4737. return value
  4738. }
  4739. /**
  4740. * Get the default value of a prop.
  4741. */
  4742. function getPropDefaultValue (vm, prop, key) {
  4743. // no default, return undefined
  4744. if (!hasOwn(prop, 'default')) {
  4745. return undefined
  4746. }
  4747. var def = prop.default;
  4748. // warn against non-factory defaults for Object & Array
  4749. if ( true && isObject(def)) {
  4750. warn(
  4751. 'Invalid default value for prop "' + key + '": ' +
  4752. 'Props with type Object/Array must use a factory function ' +
  4753. 'to return the default value.',
  4754. vm
  4755. );
  4756. }
  4757. // the raw prop value was also undefined from previous render,
  4758. // return previous default value to avoid unnecessary watcher trigger
  4759. if (vm && vm.$options.propsData &&
  4760. vm.$options.propsData[key] === undefined &&
  4761. vm._props[key] !== undefined
  4762. ) {
  4763. return vm._props[key]
  4764. }
  4765. // call factory function for non-Function types
  4766. // a value is Function if its prototype is function even across different execution context
  4767. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4768. ? def.call(vm)
  4769. : def
  4770. }
  4771. /**
  4772. * Assert whether a prop is valid.
  4773. */
  4774. function assertProp (
  4775. prop,
  4776. name,
  4777. value,
  4778. vm,
  4779. absent
  4780. ) {
  4781. if (prop.required && absent) {
  4782. warn(
  4783. 'Missing required prop: "' + name + '"',
  4784. vm
  4785. );
  4786. return
  4787. }
  4788. if (value == null && !prop.required) {
  4789. return
  4790. }
  4791. var type = prop.type;
  4792. var valid = !type || type === true;
  4793. var expectedTypes = [];
  4794. if (type) {
  4795. if (!Array.isArray(type)) {
  4796. type = [type];
  4797. }
  4798. for (var i = 0; i < type.length && !valid; i++) {
  4799. var assertedType = assertType(value, type[i]);
  4800. expectedTypes.push(assertedType.expectedType || '');
  4801. valid = assertedType.valid;
  4802. }
  4803. }
  4804. if (!valid) {
  4805. warn(
  4806. getInvalidTypeMessage(name, value, expectedTypes),
  4807. vm
  4808. );
  4809. return
  4810. }
  4811. var validator = prop.validator;
  4812. if (validator) {
  4813. if (!validator(value)) {
  4814. warn(
  4815. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4816. vm
  4817. );
  4818. }
  4819. }
  4820. }
  4821. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4822. function assertType (value, type) {
  4823. var valid;
  4824. var expectedType = getType(type);
  4825. if (simpleCheckRE.test(expectedType)) {
  4826. var t = typeof value;
  4827. valid = t === expectedType.toLowerCase();
  4828. // for primitive wrapper objects
  4829. if (!valid && t === 'object') {
  4830. valid = value instanceof type;
  4831. }
  4832. } else if (expectedType === 'Object') {
  4833. valid = isPlainObject(value);
  4834. } else if (expectedType === 'Array') {
  4835. valid = Array.isArray(value);
  4836. } else {
  4837. valid = value instanceof type;
  4838. }
  4839. return {
  4840. valid: valid,
  4841. expectedType: expectedType
  4842. }
  4843. }
  4844. /**
  4845. * Use function string name to check built-in types,
  4846. * because a simple equality check will fail when running
  4847. * across different vms / iframes.
  4848. */
  4849. function getType (fn) {
  4850. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4851. return match ? match[1] : ''
  4852. }
  4853. function isSameType (a, b) {
  4854. return getType(a) === getType(b)
  4855. }
  4856. function getTypeIndex (type, expectedTypes) {
  4857. if (!Array.isArray(expectedTypes)) {
  4858. return isSameType(expectedTypes, type) ? 0 : -1
  4859. }
  4860. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4861. if (isSameType(expectedTypes[i], type)) {
  4862. return i
  4863. }
  4864. }
  4865. return -1
  4866. }
  4867. function getInvalidTypeMessage (name, value, expectedTypes) {
  4868. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4869. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4870. var expectedType = expectedTypes[0];
  4871. var receivedType = toRawType(value);
  4872. var expectedValue = styleValue(value, expectedType);
  4873. var receivedValue = styleValue(value, receivedType);
  4874. // check if we need to specify expected value
  4875. if (expectedTypes.length === 1 &&
  4876. isExplicable(expectedType) &&
  4877. !isBoolean(expectedType, receivedType)) {
  4878. message += " with value " + expectedValue;
  4879. }
  4880. message += ", got " + receivedType + " ";
  4881. // check if we need to specify received value
  4882. if (isExplicable(receivedType)) {
  4883. message += "with value " + receivedValue + ".";
  4884. }
  4885. return message
  4886. }
  4887. function styleValue (value, type) {
  4888. if (type === 'String') {
  4889. return ("\"" + value + "\"")
  4890. } else if (type === 'Number') {
  4891. return ("" + (Number(value)))
  4892. } else {
  4893. return ("" + value)
  4894. }
  4895. }
  4896. function isExplicable (value) {
  4897. var explicitTypes = ['string', 'number', 'boolean'];
  4898. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4899. }
  4900. function isBoolean () {
  4901. var args = [], len = arguments.length;
  4902. while ( len-- ) args[ len ] = arguments[ len ];
  4903. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4904. }
  4905. /* */
  4906. function handleError (err, vm, info) {
  4907. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4908. // See: https://github.com/vuejs/vuex/issues/1505
  4909. pushTarget();
  4910. try {
  4911. if (vm) {
  4912. var cur = vm;
  4913. while ((cur = cur.$parent)) {
  4914. var hooks = cur.$options.errorCaptured;
  4915. if (hooks) {
  4916. for (var i = 0; i < hooks.length; i++) {
  4917. try {
  4918. var capture = hooks[i].call(cur, err, vm, info) === false;
  4919. if (capture) { return }
  4920. } catch (e) {
  4921. globalHandleError(e, cur, 'errorCaptured hook');
  4922. }
  4923. }
  4924. }
  4925. }
  4926. }
  4927. globalHandleError(err, vm, info);
  4928. } finally {
  4929. popTarget();
  4930. }
  4931. }
  4932. function invokeWithErrorHandling (
  4933. handler,
  4934. context,
  4935. args,
  4936. vm,
  4937. info
  4938. ) {
  4939. var res;
  4940. try {
  4941. res = args ? handler.apply(context, args) : handler.call(context);
  4942. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4943. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4944. // issue #9511
  4945. // avoid catch triggering multiple times when nested calls
  4946. res._handled = true;
  4947. }
  4948. } catch (e) {
  4949. handleError(e, vm, info);
  4950. }
  4951. return res
  4952. }
  4953. function globalHandleError (err, vm, info) {
  4954. if (config.errorHandler) {
  4955. try {
  4956. return config.errorHandler.call(null, err, vm, info)
  4957. } catch (e) {
  4958. // if the user intentionally throws the original error in the handler,
  4959. // do not log it twice
  4960. if (e !== err) {
  4961. logError(e, null, 'config.errorHandler');
  4962. }
  4963. }
  4964. }
  4965. logError(err, vm, info);
  4966. }
  4967. function logError (err, vm, info) {
  4968. if (true) {
  4969. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4970. }
  4971. /* istanbul ignore else */
  4972. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4973. console.error(err);
  4974. } else {
  4975. throw err
  4976. }
  4977. }
  4978. /* */
  4979. var callbacks = [];
  4980. var pending = false;
  4981. function flushCallbacks () {
  4982. pending = false;
  4983. var copies = callbacks.slice(0);
  4984. callbacks.length = 0;
  4985. for (var i = 0; i < copies.length; i++) {
  4986. copies[i]();
  4987. }
  4988. }
  4989. // Here we have async deferring wrappers using microtasks.
  4990. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4991. // However, it has subtle problems when state is changed right before repaint
  4992. // (e.g. #6813, out-in transitions).
  4993. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4994. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4995. // So we now use microtasks everywhere, again.
  4996. // A major drawback of this tradeoff is that there are some scenarios
  4997. // where microtasks have too high a priority and fire in between supposedly
  4998. // sequential events (e.g. #4521, #6690, which have workarounds)
  4999. // or even between bubbling of the same event (#6566).
  5000. var timerFunc;
  5001. // The nextTick behavior leverages the microtask queue, which can be accessed
  5002. // via either native Promise.then or MutationObserver.
  5003. // MutationObserver has wider support, however it is seriously bugged in
  5004. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5005. // completely stops working after triggering a few times... so, if native
  5006. // Promise is available, we will use it:
  5007. /* istanbul ignore next, $flow-disable-line */
  5008. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5009. var p = Promise.resolve();
  5010. timerFunc = function () {
  5011. p.then(flushCallbacks);
  5012. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5013. // it can get stuck in a weird state where callbacks are pushed into the
  5014. // microtask queue but the queue isn't being flushed, until the browser
  5015. // needs to do some other work, e.g. handle a timer. Therefore we can
  5016. // "force" the microtask queue to be flushed by adding an empty timer.
  5017. if (isIOS) { setTimeout(noop); }
  5018. };
  5019. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5020. isNative(MutationObserver) ||
  5021. // PhantomJS and iOS 7.x
  5022. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5023. )) {
  5024. // Use MutationObserver where native Promise is not available,
  5025. // e.g. PhantomJS, iOS7, Android 4.4
  5026. // (#6466 MutationObserver is unreliable in IE11)
  5027. var counter = 1;
  5028. var observer = new MutationObserver(flushCallbacks);
  5029. var textNode = document.createTextNode(String(counter));
  5030. observer.observe(textNode, {
  5031. characterData: true
  5032. });
  5033. timerFunc = function () {
  5034. counter = (counter + 1) % 2;
  5035. textNode.data = String(counter);
  5036. };
  5037. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5038. // Fallback to setImmediate.
  5039. // Technically it leverages the (macro) task queue,
  5040. // but it is still a better choice than setTimeout.
  5041. timerFunc = function () {
  5042. setImmediate(flushCallbacks);
  5043. };
  5044. } else {
  5045. // Fallback to setTimeout.
  5046. timerFunc = function () {
  5047. setTimeout(flushCallbacks, 0);
  5048. };
  5049. }
  5050. function nextTick (cb, ctx) {
  5051. var _resolve;
  5052. callbacks.push(function () {
  5053. if (cb) {
  5054. try {
  5055. cb.call(ctx);
  5056. } catch (e) {
  5057. handleError(e, ctx, 'nextTick');
  5058. }
  5059. } else if (_resolve) {
  5060. _resolve(ctx);
  5061. }
  5062. });
  5063. if (!pending) {
  5064. pending = true;
  5065. timerFunc();
  5066. }
  5067. // $flow-disable-line
  5068. if (!cb && typeof Promise !== 'undefined') {
  5069. return new Promise(function (resolve) {
  5070. _resolve = resolve;
  5071. })
  5072. }
  5073. }
  5074. /* */
  5075. /* not type checking this file because flow doesn't play well with Proxy */
  5076. var initProxy;
  5077. if (true) {
  5078. var allowedGlobals = makeMap(
  5079. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5080. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5081. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5082. 'require' // for Webpack/Browserify
  5083. );
  5084. var warnNonPresent = function (target, key) {
  5085. warn(
  5086. "Property or method \"" + key + "\" is not defined on the instance but " +
  5087. 'referenced during render. Make sure that this property is reactive, ' +
  5088. 'either in the data option, or for class-based components, by ' +
  5089. 'initializing the property. ' +
  5090. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5091. target
  5092. );
  5093. };
  5094. var warnReservedPrefix = function (target, key) {
  5095. warn(
  5096. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5097. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5098. 'prevent conflicts with Vue internals. ' +
  5099. 'See: https://vuejs.org/v2/api/#data',
  5100. target
  5101. );
  5102. };
  5103. var hasProxy =
  5104. typeof Proxy !== 'undefined' && isNative(Proxy);
  5105. if (hasProxy) {
  5106. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5107. config.keyCodes = new Proxy(config.keyCodes, {
  5108. set: function set (target, key, value) {
  5109. if (isBuiltInModifier(key)) {
  5110. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5111. return false
  5112. } else {
  5113. target[key] = value;
  5114. return true
  5115. }
  5116. }
  5117. });
  5118. }
  5119. var hasHandler = {
  5120. has: function has (target, key) {
  5121. var has = key in target;
  5122. var isAllowed = allowedGlobals(key) ||
  5123. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5124. if (!has && !isAllowed) {
  5125. if (key in target.$data) { warnReservedPrefix(target, key); }
  5126. else { warnNonPresent(target, key); }
  5127. }
  5128. return has || !isAllowed
  5129. }
  5130. };
  5131. var getHandler = {
  5132. get: function get (target, key) {
  5133. if (typeof key === 'string' && !(key in target)) {
  5134. if (key in target.$data) { warnReservedPrefix(target, key); }
  5135. else { warnNonPresent(target, key); }
  5136. }
  5137. return target[key]
  5138. }
  5139. };
  5140. initProxy = function initProxy (vm) {
  5141. if (hasProxy) {
  5142. // determine which proxy handler to use
  5143. var options = vm.$options;
  5144. var handlers = options.render && options.render._withStripped
  5145. ? getHandler
  5146. : hasHandler;
  5147. vm._renderProxy = new Proxy(vm, handlers);
  5148. } else {
  5149. vm._renderProxy = vm;
  5150. }
  5151. };
  5152. }
  5153. /* */
  5154. var seenObjects = new _Set();
  5155. /**
  5156. * Recursively traverse an object to evoke all converted
  5157. * getters, so that every nested property inside the object
  5158. * is collected as a "deep" dependency.
  5159. */
  5160. function traverse (val) {
  5161. _traverse(val, seenObjects);
  5162. seenObjects.clear();
  5163. }
  5164. function _traverse (val, seen) {
  5165. var i, keys;
  5166. var isA = Array.isArray(val);
  5167. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5168. return
  5169. }
  5170. if (val.__ob__) {
  5171. var depId = val.__ob__.dep.id;
  5172. if (seen.has(depId)) {
  5173. return
  5174. }
  5175. seen.add(depId);
  5176. }
  5177. if (isA) {
  5178. i = val.length;
  5179. while (i--) { _traverse(val[i], seen); }
  5180. } else {
  5181. keys = Object.keys(val);
  5182. i = keys.length;
  5183. while (i--) { _traverse(val[keys[i]], seen); }
  5184. }
  5185. }
  5186. var mark;
  5187. var measure;
  5188. if (true) {
  5189. var perf = inBrowser && window.performance;
  5190. /* istanbul ignore if */
  5191. if (
  5192. perf &&
  5193. perf.mark &&
  5194. perf.measure &&
  5195. perf.clearMarks &&
  5196. perf.clearMeasures
  5197. ) {
  5198. mark = function (tag) { return perf.mark(tag); };
  5199. measure = function (name, startTag, endTag) {
  5200. perf.measure(name, startTag, endTag);
  5201. perf.clearMarks(startTag);
  5202. perf.clearMarks(endTag);
  5203. // perf.clearMeasures(name)
  5204. };
  5205. }
  5206. }
  5207. /* */
  5208. var normalizeEvent = cached(function (name) {
  5209. var passive = name.charAt(0) === '&';
  5210. name = passive ? name.slice(1) : name;
  5211. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5212. name = once$$1 ? name.slice(1) : name;
  5213. var capture = name.charAt(0) === '!';
  5214. name = capture ? name.slice(1) : name;
  5215. return {
  5216. name: name,
  5217. once: once$$1,
  5218. capture: capture,
  5219. passive: passive
  5220. }
  5221. });
  5222. function createFnInvoker (fns, vm) {
  5223. function invoker () {
  5224. var arguments$1 = arguments;
  5225. var fns = invoker.fns;
  5226. if (Array.isArray(fns)) {
  5227. var cloned = fns.slice();
  5228. for (var i = 0; i < cloned.length; i++) {
  5229. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5230. }
  5231. } else {
  5232. // return handler return value for single handlers
  5233. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5234. }
  5235. }
  5236. invoker.fns = fns;
  5237. return invoker
  5238. }
  5239. function updateListeners (
  5240. on,
  5241. oldOn,
  5242. add,
  5243. remove$$1,
  5244. createOnceHandler,
  5245. vm
  5246. ) {
  5247. var name, def$$1, cur, old, event;
  5248. for (name in on) {
  5249. def$$1 = cur = on[name];
  5250. old = oldOn[name];
  5251. event = normalizeEvent(name);
  5252. if (isUndef(cur)) {
  5253. true && warn(
  5254. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5255. vm
  5256. );
  5257. } else if (isUndef(old)) {
  5258. if (isUndef(cur.fns)) {
  5259. cur = on[name] = createFnInvoker(cur, vm);
  5260. }
  5261. if (isTrue(event.once)) {
  5262. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5263. }
  5264. add(event.name, cur, event.capture, event.passive, event.params);
  5265. } else if (cur !== old) {
  5266. old.fns = cur;
  5267. on[name] = old;
  5268. }
  5269. }
  5270. for (name in oldOn) {
  5271. if (isUndef(on[name])) {
  5272. event = normalizeEvent(name);
  5273. remove$$1(event.name, oldOn[name], event.capture);
  5274. }
  5275. }
  5276. }
  5277. /* */
  5278. /* */
  5279. // fixed by xxxxxx (mp properties)
  5280. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5281. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5282. if (isUndef(propOptions)) {
  5283. return res
  5284. }
  5285. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5286. var attrs = data.attrs;
  5287. var props = data.props;
  5288. if (isDef(attrs) || isDef(props)) {
  5289. for (var key in propOptions) {
  5290. var altKey = hyphenate(key);
  5291. var result = checkProp(res, props, key, altKey, true) ||
  5292. checkProp(res, attrs, key, altKey, false);
  5293. // externalClass
  5294. if (
  5295. result &&
  5296. res[key] &&
  5297. externalClasses.indexOf(altKey) !== -1 &&
  5298. context[camelize(res[key])]
  5299. ) {
  5300. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5301. res[key] = context[camelize(res[key])];
  5302. }
  5303. }
  5304. }
  5305. return res
  5306. }
  5307. function extractPropsFromVNodeData (
  5308. data,
  5309. Ctor,
  5310. tag,
  5311. context// fixed by xxxxxx
  5312. ) {
  5313. // we are only extracting raw values here.
  5314. // validation and default values are handled in the child
  5315. // component itself.
  5316. var propOptions = Ctor.options.props;
  5317. if (isUndef(propOptions)) {
  5318. // fixed by xxxxxx
  5319. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5320. }
  5321. var res = {};
  5322. var attrs = data.attrs;
  5323. var props = data.props;
  5324. if (isDef(attrs) || isDef(props)) {
  5325. for (var key in propOptions) {
  5326. var altKey = hyphenate(key);
  5327. if (true) {
  5328. var keyInLowerCase = key.toLowerCase();
  5329. if (
  5330. key !== keyInLowerCase &&
  5331. attrs && hasOwn(attrs, keyInLowerCase)
  5332. ) {
  5333. tip(
  5334. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5335. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5336. " \"" + key + "\". " +
  5337. "Note that HTML attributes are case-insensitive and camelCased " +
  5338. "props need to use their kebab-case equivalents when using in-DOM " +
  5339. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5340. );
  5341. }
  5342. }
  5343. checkProp(res, props, key, altKey, true) ||
  5344. checkProp(res, attrs, key, altKey, false);
  5345. }
  5346. }
  5347. // fixed by xxxxxx
  5348. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5349. }
  5350. function checkProp (
  5351. res,
  5352. hash,
  5353. key,
  5354. altKey,
  5355. preserve
  5356. ) {
  5357. if (isDef(hash)) {
  5358. if (hasOwn(hash, key)) {
  5359. res[key] = hash[key];
  5360. if (!preserve) {
  5361. delete hash[key];
  5362. }
  5363. return true
  5364. } else if (hasOwn(hash, altKey)) {
  5365. res[key] = hash[altKey];
  5366. if (!preserve) {
  5367. delete hash[altKey];
  5368. }
  5369. return true
  5370. }
  5371. }
  5372. return false
  5373. }
  5374. /* */
  5375. // The template compiler attempts to minimize the need for normalization by
  5376. // statically analyzing the template at compile time.
  5377. //
  5378. // For plain HTML markup, normalization can be completely skipped because the
  5379. // generated render function is guaranteed to return Array<VNode>. There are
  5380. // two cases where extra normalization is needed:
  5381. // 1. When the children contains components - because a functional component
  5382. // may return an Array instead of a single root. In this case, just a simple
  5383. // normalization is needed - if any child is an Array, we flatten the whole
  5384. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5385. // because functional components already normalize their own children.
  5386. function simpleNormalizeChildren (children) {
  5387. for (var i = 0; i < children.length; i++) {
  5388. if (Array.isArray(children[i])) {
  5389. return Array.prototype.concat.apply([], children)
  5390. }
  5391. }
  5392. return children
  5393. }
  5394. // 2. When the children contains constructs that always generated nested Arrays,
  5395. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5396. // with hand-written render functions / JSX. In such cases a full normalization
  5397. // is needed to cater to all possible types of children values.
  5398. function normalizeChildren (children) {
  5399. return isPrimitive(children)
  5400. ? [createTextVNode(children)]
  5401. : Array.isArray(children)
  5402. ? normalizeArrayChildren(children)
  5403. : undefined
  5404. }
  5405. function isTextNode (node) {
  5406. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5407. }
  5408. function normalizeArrayChildren (children, nestedIndex) {
  5409. var res = [];
  5410. var i, c, lastIndex, last;
  5411. for (i = 0; i < children.length; i++) {
  5412. c = children[i];
  5413. if (isUndef(c) || typeof c === 'boolean') { continue }
  5414. lastIndex = res.length - 1;
  5415. last = res[lastIndex];
  5416. // nested
  5417. if (Array.isArray(c)) {
  5418. if (c.length > 0) {
  5419. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5420. // merge adjacent text nodes
  5421. if (isTextNode(c[0]) && isTextNode(last)) {
  5422. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5423. c.shift();
  5424. }
  5425. res.push.apply(res, c);
  5426. }
  5427. } else if (isPrimitive(c)) {
  5428. if (isTextNode(last)) {
  5429. // merge adjacent text nodes
  5430. // this is necessary for SSR hydration because text nodes are
  5431. // essentially merged when rendered to HTML strings
  5432. res[lastIndex] = createTextVNode(last.text + c);
  5433. } else if (c !== '') {
  5434. // convert primitive to vnode
  5435. res.push(createTextVNode(c));
  5436. }
  5437. } else {
  5438. if (isTextNode(c) && isTextNode(last)) {
  5439. // merge adjacent text nodes
  5440. res[lastIndex] = createTextVNode(last.text + c.text);
  5441. } else {
  5442. // default key for nested array children (likely generated by v-for)
  5443. if (isTrue(children._isVList) &&
  5444. isDef(c.tag) &&
  5445. isUndef(c.key) &&
  5446. isDef(nestedIndex)) {
  5447. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5448. }
  5449. res.push(c);
  5450. }
  5451. }
  5452. }
  5453. return res
  5454. }
  5455. /* */
  5456. function initProvide (vm) {
  5457. var provide = vm.$options.provide;
  5458. if (provide) {
  5459. vm._provided = typeof provide === 'function'
  5460. ? provide.call(vm)
  5461. : provide;
  5462. }
  5463. }
  5464. function initInjections (vm) {
  5465. var result = resolveInject(vm.$options.inject, vm);
  5466. if (result) {
  5467. toggleObserving(false);
  5468. Object.keys(result).forEach(function (key) {
  5469. /* istanbul ignore else */
  5470. if (true) {
  5471. defineReactive$$1(vm, key, result[key], function () {
  5472. warn(
  5473. "Avoid mutating an injected value directly since the changes will be " +
  5474. "overwritten whenever the provided component re-renders. " +
  5475. "injection being mutated: \"" + key + "\"",
  5476. vm
  5477. );
  5478. });
  5479. } else {}
  5480. });
  5481. toggleObserving(true);
  5482. }
  5483. }
  5484. function resolveInject (inject, vm) {
  5485. if (inject) {
  5486. // inject is :any because flow is not smart enough to figure out cached
  5487. var result = Object.create(null);
  5488. var keys = hasSymbol
  5489. ? Reflect.ownKeys(inject)
  5490. : Object.keys(inject);
  5491. for (var i = 0; i < keys.length; i++) {
  5492. var key = keys[i];
  5493. // #6574 in case the inject object is observed...
  5494. if (key === '__ob__') { continue }
  5495. var provideKey = inject[key].from;
  5496. var source = vm;
  5497. while (source) {
  5498. if (source._provided && hasOwn(source._provided, provideKey)) {
  5499. result[key] = source._provided[provideKey];
  5500. break
  5501. }
  5502. source = source.$parent;
  5503. }
  5504. if (!source) {
  5505. if ('default' in inject[key]) {
  5506. var provideDefault = inject[key].default;
  5507. result[key] = typeof provideDefault === 'function'
  5508. ? provideDefault.call(vm)
  5509. : provideDefault;
  5510. } else if (true) {
  5511. warn(("Injection \"" + key + "\" not found"), vm);
  5512. }
  5513. }
  5514. }
  5515. return result
  5516. }
  5517. }
  5518. /* */
  5519. /**
  5520. * Runtime helper for resolving raw children VNodes into a slot object.
  5521. */
  5522. function resolveSlots (
  5523. children,
  5524. context
  5525. ) {
  5526. if (!children || !children.length) {
  5527. return {}
  5528. }
  5529. var slots = {};
  5530. for (var i = 0, l = children.length; i < l; i++) {
  5531. var child = children[i];
  5532. var data = child.data;
  5533. // remove slot attribute if the node is resolved as a Vue slot node
  5534. if (data && data.attrs && data.attrs.slot) {
  5535. delete data.attrs.slot;
  5536. }
  5537. // named slots should only be respected if the vnode was rendered in the
  5538. // same context.
  5539. if ((child.context === context || child.fnContext === context) &&
  5540. data && data.slot != null
  5541. ) {
  5542. var name = data.slot;
  5543. var slot = (slots[name] || (slots[name] = []));
  5544. if (child.tag === 'template') {
  5545. slot.push.apply(slot, child.children || []);
  5546. } else {
  5547. slot.push(child);
  5548. }
  5549. } else {
  5550. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5551. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5552. (slots['page'] || (slots['page'] = [])).push(child);
  5553. }else{
  5554. (slots.default || (slots.default = [])).push(child);
  5555. }
  5556. }
  5557. }
  5558. // ignore slots that contains only whitespace
  5559. for (var name$1 in slots) {
  5560. if (slots[name$1].every(isWhitespace)) {
  5561. delete slots[name$1];
  5562. }
  5563. }
  5564. return slots
  5565. }
  5566. function isWhitespace (node) {
  5567. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5568. }
  5569. /* */
  5570. function normalizeScopedSlots (
  5571. slots,
  5572. normalSlots,
  5573. prevSlots
  5574. ) {
  5575. var res;
  5576. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5577. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5578. var key = slots && slots.$key;
  5579. if (!slots) {
  5580. res = {};
  5581. } else if (slots._normalized) {
  5582. // fast path 1: child component re-render only, parent did not change
  5583. return slots._normalized
  5584. } else if (
  5585. isStable &&
  5586. prevSlots &&
  5587. prevSlots !== emptyObject &&
  5588. key === prevSlots.$key &&
  5589. !hasNormalSlots &&
  5590. !prevSlots.$hasNormal
  5591. ) {
  5592. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5593. // only need to normalize once
  5594. return prevSlots
  5595. } else {
  5596. res = {};
  5597. for (var key$1 in slots) {
  5598. if (slots[key$1] && key$1[0] !== '$') {
  5599. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5600. }
  5601. }
  5602. }
  5603. // expose normal slots on scopedSlots
  5604. for (var key$2 in normalSlots) {
  5605. if (!(key$2 in res)) {
  5606. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5607. }
  5608. }
  5609. // avoriaz seems to mock a non-extensible $scopedSlots object
  5610. // and when that is passed down this would cause an error
  5611. if (slots && Object.isExtensible(slots)) {
  5612. (slots)._normalized = res;
  5613. }
  5614. def(res, '$stable', isStable);
  5615. def(res, '$key', key);
  5616. def(res, '$hasNormal', hasNormalSlots);
  5617. return res
  5618. }
  5619. function normalizeScopedSlot(normalSlots, key, fn) {
  5620. var normalized = function () {
  5621. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5622. res = res && typeof res === 'object' && !Array.isArray(res)
  5623. ? [res] // single vnode
  5624. : normalizeChildren(res);
  5625. return res && (
  5626. res.length === 0 ||
  5627. (res.length === 1 && res[0].isComment) // #9658
  5628. ) ? undefined
  5629. : res
  5630. };
  5631. // this is a slot using the new v-slot syntax without scope. although it is
  5632. // compiled as a scoped slot, render fn users would expect it to be present
  5633. // on this.$slots because the usage is semantically a normal slot.
  5634. if (fn.proxy) {
  5635. Object.defineProperty(normalSlots, key, {
  5636. get: normalized,
  5637. enumerable: true,
  5638. configurable: true
  5639. });
  5640. }
  5641. return normalized
  5642. }
  5643. function proxyNormalSlot(slots, key) {
  5644. return function () { return slots[key]; }
  5645. }
  5646. /* */
  5647. /**
  5648. * Runtime helper for rendering v-for lists.
  5649. */
  5650. function renderList (
  5651. val,
  5652. render
  5653. ) {
  5654. var ret, i, l, keys, key;
  5655. if (Array.isArray(val) || typeof val === 'string') {
  5656. ret = new Array(val.length);
  5657. for (i = 0, l = val.length; i < l; i++) {
  5658. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5659. }
  5660. } else if (typeof val === 'number') {
  5661. ret = new Array(val);
  5662. for (i = 0; i < val; i++) {
  5663. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5664. }
  5665. } else if (isObject(val)) {
  5666. if (hasSymbol && val[Symbol.iterator]) {
  5667. ret = [];
  5668. var iterator = val[Symbol.iterator]();
  5669. var result = iterator.next();
  5670. while (!result.done) {
  5671. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5672. result = iterator.next();
  5673. }
  5674. } else {
  5675. keys = Object.keys(val);
  5676. ret = new Array(keys.length);
  5677. for (i = 0, l = keys.length; i < l; i++) {
  5678. key = keys[i];
  5679. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5680. }
  5681. }
  5682. }
  5683. if (!isDef(ret)) {
  5684. ret = [];
  5685. }
  5686. (ret)._isVList = true;
  5687. return ret
  5688. }
  5689. /* */
  5690. /**
  5691. * Runtime helper for rendering <slot>
  5692. */
  5693. function renderSlot (
  5694. name,
  5695. fallback,
  5696. props,
  5697. bindObject
  5698. ) {
  5699. var scopedSlotFn = this.$scopedSlots[name];
  5700. var nodes;
  5701. if (scopedSlotFn) { // scoped slot
  5702. props = props || {};
  5703. if (bindObject) {
  5704. if ( true && !isObject(bindObject)) {
  5705. warn(
  5706. 'slot v-bind without argument expects an Object',
  5707. this
  5708. );
  5709. }
  5710. props = extend(extend({}, bindObject), props);
  5711. }
  5712. // fixed by xxxxxx app-plus scopedSlot
  5713. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5714. } else {
  5715. nodes = this.$slots[name] || fallback;
  5716. }
  5717. var target = props && props.slot;
  5718. if (target) {
  5719. return this.$createElement('template', { slot: target }, nodes)
  5720. } else {
  5721. return nodes
  5722. }
  5723. }
  5724. /* */
  5725. /**
  5726. * Runtime helper for resolving filters
  5727. */
  5728. function resolveFilter (id) {
  5729. return resolveAsset(this.$options, 'filters', id, true) || identity
  5730. }
  5731. /* */
  5732. function isKeyNotMatch (expect, actual) {
  5733. if (Array.isArray(expect)) {
  5734. return expect.indexOf(actual) === -1
  5735. } else {
  5736. return expect !== actual
  5737. }
  5738. }
  5739. /**
  5740. * Runtime helper for checking keyCodes from config.
  5741. * exposed as Vue.prototype._k
  5742. * passing in eventKeyName as last argument separately for backwards compat
  5743. */
  5744. function checkKeyCodes (
  5745. eventKeyCode,
  5746. key,
  5747. builtInKeyCode,
  5748. eventKeyName,
  5749. builtInKeyName
  5750. ) {
  5751. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5752. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5753. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5754. } else if (mappedKeyCode) {
  5755. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5756. } else if (eventKeyName) {
  5757. return hyphenate(eventKeyName) !== key
  5758. }
  5759. }
  5760. /* */
  5761. /**
  5762. * Runtime helper for merging v-bind="object" into a VNode's data.
  5763. */
  5764. function bindObjectProps (
  5765. data,
  5766. tag,
  5767. value,
  5768. asProp,
  5769. isSync
  5770. ) {
  5771. if (value) {
  5772. if (!isObject(value)) {
  5773. true && warn(
  5774. 'v-bind without argument expects an Object or Array value',
  5775. this
  5776. );
  5777. } else {
  5778. if (Array.isArray(value)) {
  5779. value = toObject(value);
  5780. }
  5781. var hash;
  5782. var loop = function ( key ) {
  5783. if (
  5784. key === 'class' ||
  5785. key === 'style' ||
  5786. isReservedAttribute(key)
  5787. ) {
  5788. hash = data;
  5789. } else {
  5790. var type = data.attrs && data.attrs.type;
  5791. hash = asProp || config.mustUseProp(tag, type, key)
  5792. ? data.domProps || (data.domProps = {})
  5793. : data.attrs || (data.attrs = {});
  5794. }
  5795. var camelizedKey = camelize(key);
  5796. var hyphenatedKey = hyphenate(key);
  5797. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5798. hash[key] = value[key];
  5799. if (isSync) {
  5800. var on = data.on || (data.on = {});
  5801. on[("update:" + key)] = function ($event) {
  5802. value[key] = $event;
  5803. };
  5804. }
  5805. }
  5806. };
  5807. for (var key in value) loop( key );
  5808. }
  5809. }
  5810. return data
  5811. }
  5812. /* */
  5813. /**
  5814. * Runtime helper for rendering static trees.
  5815. */
  5816. function renderStatic (
  5817. index,
  5818. isInFor
  5819. ) {
  5820. var cached = this._staticTrees || (this._staticTrees = []);
  5821. var tree = cached[index];
  5822. // if has already-rendered static tree and not inside v-for,
  5823. // we can reuse the same tree.
  5824. if (tree && !isInFor) {
  5825. return tree
  5826. }
  5827. // otherwise, render a fresh tree.
  5828. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5829. this._renderProxy,
  5830. null,
  5831. this // for render fns generated for functional component templates
  5832. );
  5833. markStatic(tree, ("__static__" + index), false);
  5834. return tree
  5835. }
  5836. /**
  5837. * Runtime helper for v-once.
  5838. * Effectively it means marking the node as static with a unique key.
  5839. */
  5840. function markOnce (
  5841. tree,
  5842. index,
  5843. key
  5844. ) {
  5845. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5846. return tree
  5847. }
  5848. function markStatic (
  5849. tree,
  5850. key,
  5851. isOnce
  5852. ) {
  5853. if (Array.isArray(tree)) {
  5854. for (var i = 0; i < tree.length; i++) {
  5855. if (tree[i] && typeof tree[i] !== 'string') {
  5856. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5857. }
  5858. }
  5859. } else {
  5860. markStaticNode(tree, key, isOnce);
  5861. }
  5862. }
  5863. function markStaticNode (node, key, isOnce) {
  5864. node.isStatic = true;
  5865. node.key = key;
  5866. node.isOnce = isOnce;
  5867. }
  5868. /* */
  5869. function bindObjectListeners (data, value) {
  5870. if (value) {
  5871. if (!isPlainObject(value)) {
  5872. true && warn(
  5873. 'v-on without argument expects an Object value',
  5874. this
  5875. );
  5876. } else {
  5877. var on = data.on = data.on ? extend({}, data.on) : {};
  5878. for (var key in value) {
  5879. var existing = on[key];
  5880. var ours = value[key];
  5881. on[key] = existing ? [].concat(existing, ours) : ours;
  5882. }
  5883. }
  5884. }
  5885. return data
  5886. }
  5887. /* */
  5888. function resolveScopedSlots (
  5889. fns, // see flow/vnode
  5890. res,
  5891. // the following are added in 2.6
  5892. hasDynamicKeys,
  5893. contentHashKey
  5894. ) {
  5895. res = res || { $stable: !hasDynamicKeys };
  5896. for (var i = 0; i < fns.length; i++) {
  5897. var slot = fns[i];
  5898. if (Array.isArray(slot)) {
  5899. resolveScopedSlots(slot, res, hasDynamicKeys);
  5900. } else if (slot) {
  5901. // marker for reverse proxying v-slot without scope on this.$slots
  5902. if (slot.proxy) {
  5903. slot.fn.proxy = true;
  5904. }
  5905. res[slot.key] = slot.fn;
  5906. }
  5907. }
  5908. if (contentHashKey) {
  5909. (res).$key = contentHashKey;
  5910. }
  5911. return res
  5912. }
  5913. /* */
  5914. function bindDynamicKeys (baseObj, values) {
  5915. for (var i = 0; i < values.length; i += 2) {
  5916. var key = values[i];
  5917. if (typeof key === 'string' && key) {
  5918. baseObj[values[i]] = values[i + 1];
  5919. } else if ( true && key !== '' && key !== null) {
  5920. // null is a special value for explicitly removing a binding
  5921. warn(
  5922. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5923. this
  5924. );
  5925. }
  5926. }
  5927. return baseObj
  5928. }
  5929. // helper to dynamically append modifier runtime markers to event names.
  5930. // ensure only append when value is already string, otherwise it will be cast
  5931. // to string and cause the type check to miss.
  5932. function prependModifier (value, symbol) {
  5933. return typeof value === 'string' ? symbol + value : value
  5934. }
  5935. /* */
  5936. function installRenderHelpers (target) {
  5937. target._o = markOnce;
  5938. target._n = toNumber;
  5939. target._s = toString;
  5940. target._l = renderList;
  5941. target._t = renderSlot;
  5942. target._q = looseEqual;
  5943. target._i = looseIndexOf;
  5944. target._m = renderStatic;
  5945. target._f = resolveFilter;
  5946. target._k = checkKeyCodes;
  5947. target._b = bindObjectProps;
  5948. target._v = createTextVNode;
  5949. target._e = createEmptyVNode;
  5950. target._u = resolveScopedSlots;
  5951. target._g = bindObjectListeners;
  5952. target._d = bindDynamicKeys;
  5953. target._p = prependModifier;
  5954. }
  5955. /* */
  5956. function FunctionalRenderContext (
  5957. data,
  5958. props,
  5959. children,
  5960. parent,
  5961. Ctor
  5962. ) {
  5963. var this$1 = this;
  5964. var options = Ctor.options;
  5965. // ensure the createElement function in functional components
  5966. // gets a unique context - this is necessary for correct named slot check
  5967. var contextVm;
  5968. if (hasOwn(parent, '_uid')) {
  5969. contextVm = Object.create(parent);
  5970. // $flow-disable-line
  5971. contextVm._original = parent;
  5972. } else {
  5973. // the context vm passed in is a functional context as well.
  5974. // in this case we want to make sure we are able to get a hold to the
  5975. // real context instance.
  5976. contextVm = parent;
  5977. // $flow-disable-line
  5978. parent = parent._original;
  5979. }
  5980. var isCompiled = isTrue(options._compiled);
  5981. var needNormalization = !isCompiled;
  5982. this.data = data;
  5983. this.props = props;
  5984. this.children = children;
  5985. this.parent = parent;
  5986. this.listeners = data.on || emptyObject;
  5987. this.injections = resolveInject(options.inject, parent);
  5988. this.slots = function () {
  5989. if (!this$1.$slots) {
  5990. normalizeScopedSlots(
  5991. data.scopedSlots,
  5992. this$1.$slots = resolveSlots(children, parent)
  5993. );
  5994. }
  5995. return this$1.$slots
  5996. };
  5997. Object.defineProperty(this, 'scopedSlots', ({
  5998. enumerable: true,
  5999. get: function get () {
  6000. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6001. }
  6002. }));
  6003. // support for compiled functional template
  6004. if (isCompiled) {
  6005. // exposing $options for renderStatic()
  6006. this.$options = options;
  6007. // pre-resolve slots for renderSlot()
  6008. this.$slots = this.slots();
  6009. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6010. }
  6011. if (options._scopeId) {
  6012. this._c = function (a, b, c, d) {
  6013. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6014. if (vnode && !Array.isArray(vnode)) {
  6015. vnode.fnScopeId = options._scopeId;
  6016. vnode.fnContext = parent;
  6017. }
  6018. return vnode
  6019. };
  6020. } else {
  6021. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6022. }
  6023. }
  6024. installRenderHelpers(FunctionalRenderContext.prototype);
  6025. function createFunctionalComponent (
  6026. Ctor,
  6027. propsData,
  6028. data,
  6029. contextVm,
  6030. children
  6031. ) {
  6032. var options = Ctor.options;
  6033. var props = {};
  6034. var propOptions = options.props;
  6035. if (isDef(propOptions)) {
  6036. for (var key in propOptions) {
  6037. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6038. }
  6039. } else {
  6040. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6041. if (isDef(data.props)) { mergeProps(props, data.props); }
  6042. }
  6043. var renderContext = new FunctionalRenderContext(
  6044. data,
  6045. props,
  6046. children,
  6047. contextVm,
  6048. Ctor
  6049. );
  6050. var vnode = options.render.call(null, renderContext._c, renderContext);
  6051. if (vnode instanceof VNode) {
  6052. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6053. } else if (Array.isArray(vnode)) {
  6054. var vnodes = normalizeChildren(vnode) || [];
  6055. var res = new Array(vnodes.length);
  6056. for (var i = 0; i < vnodes.length; i++) {
  6057. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6058. }
  6059. return res
  6060. }
  6061. }
  6062. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6063. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6064. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6065. // that should not be matched to match.
  6066. var clone = cloneVNode(vnode);
  6067. clone.fnContext = contextVm;
  6068. clone.fnOptions = options;
  6069. if (true) {
  6070. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6071. }
  6072. if (data.slot) {
  6073. (clone.data || (clone.data = {})).slot = data.slot;
  6074. }
  6075. return clone
  6076. }
  6077. function mergeProps (to, from) {
  6078. for (var key in from) {
  6079. to[camelize(key)] = from[key];
  6080. }
  6081. }
  6082. /* */
  6083. /* */
  6084. /* */
  6085. /* */
  6086. // inline hooks to be invoked on component VNodes during patch
  6087. var componentVNodeHooks = {
  6088. init: function init (vnode, hydrating) {
  6089. if (
  6090. vnode.componentInstance &&
  6091. !vnode.componentInstance._isDestroyed &&
  6092. vnode.data.keepAlive
  6093. ) {
  6094. // kept-alive components, treat as a patch
  6095. var mountedNode = vnode; // work around flow
  6096. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6097. } else {
  6098. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6099. vnode,
  6100. activeInstance
  6101. );
  6102. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6103. }
  6104. },
  6105. prepatch: function prepatch (oldVnode, vnode) {
  6106. var options = vnode.componentOptions;
  6107. var child = vnode.componentInstance = oldVnode.componentInstance;
  6108. updateChildComponent(
  6109. child,
  6110. options.propsData, // updated props
  6111. options.listeners, // updated listeners
  6112. vnode, // new parent vnode
  6113. options.children // new children
  6114. );
  6115. },
  6116. insert: function insert (vnode) {
  6117. var context = vnode.context;
  6118. var componentInstance = vnode.componentInstance;
  6119. if (!componentInstance._isMounted) {
  6120. callHook(componentInstance, 'onServiceCreated');
  6121. callHook(componentInstance, 'onServiceAttached');
  6122. componentInstance._isMounted = true;
  6123. callHook(componentInstance, 'mounted');
  6124. }
  6125. if (vnode.data.keepAlive) {
  6126. if (context._isMounted) {
  6127. // vue-router#1212
  6128. // During updates, a kept-alive component's child components may
  6129. // change, so directly walking the tree here may call activated hooks
  6130. // on incorrect children. Instead we push them into a queue which will
  6131. // be processed after the whole patch process ended.
  6132. queueActivatedComponent(componentInstance);
  6133. } else {
  6134. activateChildComponent(componentInstance, true /* direct */);
  6135. }
  6136. }
  6137. },
  6138. destroy: function destroy (vnode) {
  6139. var componentInstance = vnode.componentInstance;
  6140. if (!componentInstance._isDestroyed) {
  6141. if (!vnode.data.keepAlive) {
  6142. componentInstance.$destroy();
  6143. } else {
  6144. deactivateChildComponent(componentInstance, true /* direct */);
  6145. }
  6146. }
  6147. }
  6148. };
  6149. var hooksToMerge = Object.keys(componentVNodeHooks);
  6150. function createComponent (
  6151. Ctor,
  6152. data,
  6153. context,
  6154. children,
  6155. tag
  6156. ) {
  6157. if (isUndef(Ctor)) {
  6158. return
  6159. }
  6160. var baseCtor = context.$options._base;
  6161. // plain options object: turn it into a constructor
  6162. if (isObject(Ctor)) {
  6163. Ctor = baseCtor.extend(Ctor);
  6164. }
  6165. // if at this stage it's not a constructor or an async component factory,
  6166. // reject.
  6167. if (typeof Ctor !== 'function') {
  6168. if (true) {
  6169. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6170. }
  6171. return
  6172. }
  6173. // async component
  6174. var asyncFactory;
  6175. if (isUndef(Ctor.cid)) {
  6176. asyncFactory = Ctor;
  6177. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6178. if (Ctor === undefined) {
  6179. // return a placeholder node for async component, which is rendered
  6180. // as a comment node but preserves all the raw information for the node.
  6181. // the information will be used for async server-rendering and hydration.
  6182. return createAsyncPlaceholder(
  6183. asyncFactory,
  6184. data,
  6185. context,
  6186. children,
  6187. tag
  6188. )
  6189. }
  6190. }
  6191. data = data || {};
  6192. // resolve constructor options in case global mixins are applied after
  6193. // component constructor creation
  6194. resolveConstructorOptions(Ctor);
  6195. // transform component v-model data into props & events
  6196. if (isDef(data.model)) {
  6197. transformModel(Ctor.options, data);
  6198. }
  6199. // extract props
  6200. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6201. // functional component
  6202. if (isTrue(Ctor.options.functional)) {
  6203. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6204. }
  6205. // extract listeners, since these needs to be treated as
  6206. // child component listeners instead of DOM listeners
  6207. var listeners = data.on;
  6208. // replace with listeners with .native modifier
  6209. // so it gets processed during parent component patch.
  6210. data.on = data.nativeOn;
  6211. if (isTrue(Ctor.options.abstract)) {
  6212. // abstract components do not keep anything
  6213. // other than props & listeners & slot
  6214. // work around flow
  6215. var slot = data.slot;
  6216. data = {};
  6217. if (slot) {
  6218. data.slot = slot;
  6219. }
  6220. }
  6221. // install component management hooks onto the placeholder node
  6222. installComponentHooks(data);
  6223. // return a placeholder vnode
  6224. var name = Ctor.options.name || tag;
  6225. var vnode = new VNode(
  6226. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6227. data, undefined, undefined, undefined, context,
  6228. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6229. asyncFactory
  6230. );
  6231. return vnode
  6232. }
  6233. function createComponentInstanceForVnode (
  6234. vnode, // we know it's MountedComponentVNode but flow doesn't
  6235. parent // activeInstance in lifecycle state
  6236. ) {
  6237. var options = {
  6238. _isComponent: true,
  6239. _parentVnode: vnode,
  6240. parent: parent
  6241. };
  6242. // check inline-template render functions
  6243. var inlineTemplate = vnode.data.inlineTemplate;
  6244. if (isDef(inlineTemplate)) {
  6245. options.render = inlineTemplate.render;
  6246. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6247. }
  6248. return new vnode.componentOptions.Ctor(options)
  6249. }
  6250. function installComponentHooks (data) {
  6251. var hooks = data.hook || (data.hook = {});
  6252. for (var i = 0; i < hooksToMerge.length; i++) {
  6253. var key = hooksToMerge[i];
  6254. var existing = hooks[key];
  6255. var toMerge = componentVNodeHooks[key];
  6256. if (existing !== toMerge && !(existing && existing._merged)) {
  6257. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6258. }
  6259. }
  6260. }
  6261. function mergeHook$1 (f1, f2) {
  6262. var merged = function (a, b) {
  6263. // flow complains about extra args which is why we use any
  6264. f1(a, b);
  6265. f2(a, b);
  6266. };
  6267. merged._merged = true;
  6268. return merged
  6269. }
  6270. // transform component v-model info (value and callback) into
  6271. // prop and event handler respectively.
  6272. function transformModel (options, data) {
  6273. var prop = (options.model && options.model.prop) || 'value';
  6274. var event = (options.model && options.model.event) || 'input'
  6275. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6276. var on = data.on || (data.on = {});
  6277. var existing = on[event];
  6278. var callback = data.model.callback;
  6279. if (isDef(existing)) {
  6280. if (
  6281. Array.isArray(existing)
  6282. ? existing.indexOf(callback) === -1
  6283. : existing !== callback
  6284. ) {
  6285. on[event] = [callback].concat(existing);
  6286. }
  6287. } else {
  6288. on[event] = callback;
  6289. }
  6290. }
  6291. /* */
  6292. var SIMPLE_NORMALIZE = 1;
  6293. var ALWAYS_NORMALIZE = 2;
  6294. // wrapper function for providing a more flexible interface
  6295. // without getting yelled at by flow
  6296. function createElement (
  6297. context,
  6298. tag,
  6299. data,
  6300. children,
  6301. normalizationType,
  6302. alwaysNormalize
  6303. ) {
  6304. if (Array.isArray(data) || isPrimitive(data)) {
  6305. normalizationType = children;
  6306. children = data;
  6307. data = undefined;
  6308. }
  6309. if (isTrue(alwaysNormalize)) {
  6310. normalizationType = ALWAYS_NORMALIZE;
  6311. }
  6312. return _createElement(context, tag, data, children, normalizationType)
  6313. }
  6314. function _createElement (
  6315. context,
  6316. tag,
  6317. data,
  6318. children,
  6319. normalizationType
  6320. ) {
  6321. if (isDef(data) && isDef((data).__ob__)) {
  6322. true && warn(
  6323. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6324. 'Always create fresh vnode data objects in each render!',
  6325. context
  6326. );
  6327. return createEmptyVNode()
  6328. }
  6329. // object syntax in v-bind
  6330. if (isDef(data) && isDef(data.is)) {
  6331. tag = data.is;
  6332. }
  6333. if (!tag) {
  6334. // in case of component :is set to falsy value
  6335. return createEmptyVNode()
  6336. }
  6337. // warn against non-primitive key
  6338. if ( true &&
  6339. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6340. ) {
  6341. {
  6342. warn(
  6343. 'Avoid using non-primitive value as key, ' +
  6344. 'use string/number value instead.',
  6345. context
  6346. );
  6347. }
  6348. }
  6349. // support single function children as default scoped slot
  6350. if (Array.isArray(children) &&
  6351. typeof children[0] === 'function'
  6352. ) {
  6353. data = data || {};
  6354. data.scopedSlots = { default: children[0] };
  6355. children.length = 0;
  6356. }
  6357. if (normalizationType === ALWAYS_NORMALIZE) {
  6358. children = normalizeChildren(children);
  6359. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6360. children = simpleNormalizeChildren(children);
  6361. }
  6362. var vnode, ns;
  6363. if (typeof tag === 'string') {
  6364. var Ctor;
  6365. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6366. if (config.isReservedTag(tag)) {
  6367. // platform built-in elements
  6368. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6369. warn(
  6370. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6371. context
  6372. );
  6373. }
  6374. vnode = new VNode(
  6375. config.parsePlatformTagName(tag), data, children,
  6376. undefined, undefined, context
  6377. );
  6378. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6379. // component
  6380. vnode = createComponent(Ctor, data, context, children, tag);
  6381. } else {
  6382. // unknown or unlisted namespaced elements
  6383. // check at runtime because it may get assigned a namespace when its
  6384. // parent normalizes children
  6385. vnode = new VNode(
  6386. tag, data, children,
  6387. undefined, undefined, context
  6388. );
  6389. }
  6390. } else {
  6391. // direct component options / constructor
  6392. vnode = createComponent(tag, data, context, children);
  6393. }
  6394. if (Array.isArray(vnode)) {
  6395. return vnode
  6396. } else if (isDef(vnode)) {
  6397. if (isDef(ns)) { applyNS(vnode, ns); }
  6398. if (isDef(data)) { registerDeepBindings(data); }
  6399. return vnode
  6400. } else {
  6401. return createEmptyVNode()
  6402. }
  6403. }
  6404. function applyNS (vnode, ns, force) {
  6405. vnode.ns = ns;
  6406. if (vnode.tag === 'foreignObject') {
  6407. // use default namespace inside foreignObject
  6408. ns = undefined;
  6409. force = true;
  6410. }
  6411. if (isDef(vnode.children)) {
  6412. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6413. var child = vnode.children[i];
  6414. if (isDef(child.tag) && (
  6415. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6416. applyNS(child, ns, force);
  6417. }
  6418. }
  6419. }
  6420. }
  6421. // ref #5318
  6422. // necessary to ensure parent re-render when deep bindings like :style and
  6423. // :class are used on slot nodes
  6424. function registerDeepBindings (data) {
  6425. if (isObject(data.style)) {
  6426. traverse(data.style);
  6427. }
  6428. if (isObject(data.class)) {
  6429. traverse(data.class);
  6430. }
  6431. }
  6432. /* */
  6433. function initRender (vm) {
  6434. vm._vnode = null; // the root of the child tree
  6435. vm._staticTrees = null; // v-once cached trees
  6436. var options = vm.$options;
  6437. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6438. var renderContext = parentVnode && parentVnode.context;
  6439. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6440. vm.$scopedSlots = emptyObject;
  6441. // bind the createElement fn to this instance
  6442. // so that we get proper render context inside it.
  6443. // args order: tag, data, children, normalizationType, alwaysNormalize
  6444. // internal version is used by render functions compiled from templates
  6445. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6446. // normalization is always applied for the public version, used in
  6447. // user-written render functions.
  6448. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6449. // $attrs & $listeners are exposed for easier HOC creation.
  6450. // they need to be reactive so that HOCs using them are always updated
  6451. var parentData = parentVnode && parentVnode.data;
  6452. /* istanbul ignore else */
  6453. if (true) {
  6454. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6455. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6456. }, true);
  6457. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6458. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6459. }, true);
  6460. } else {}
  6461. }
  6462. var currentRenderingInstance = null;
  6463. function renderMixin (Vue) {
  6464. // install runtime convenience helpers
  6465. installRenderHelpers(Vue.prototype);
  6466. Vue.prototype.$nextTick = function (fn) {
  6467. return nextTick(fn, this)
  6468. };
  6469. Vue.prototype._render = function () {
  6470. var vm = this;
  6471. var ref = vm.$options;
  6472. var render = ref.render;
  6473. var _parentVnode = ref._parentVnode;
  6474. if (_parentVnode) {
  6475. vm.$scopedSlots = normalizeScopedSlots(
  6476. _parentVnode.data.scopedSlots,
  6477. vm.$slots,
  6478. vm.$scopedSlots
  6479. );
  6480. }
  6481. // set parent vnode. this allows render functions to have access
  6482. // to the data on the placeholder node.
  6483. vm.$vnode = _parentVnode;
  6484. // render self
  6485. var vnode;
  6486. try {
  6487. // There's no need to maintain a stack because all render fns are called
  6488. // separately from one another. Nested component's render fns are called
  6489. // when parent component is patched.
  6490. currentRenderingInstance = vm;
  6491. vnode = render.call(vm._renderProxy, vm.$createElement);
  6492. } catch (e) {
  6493. handleError(e, vm, "render");
  6494. // return error render result,
  6495. // or previous vnode to prevent render error causing blank component
  6496. /* istanbul ignore else */
  6497. if ( true && vm.$options.renderError) {
  6498. try {
  6499. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6500. } catch (e) {
  6501. handleError(e, vm, "renderError");
  6502. vnode = vm._vnode;
  6503. }
  6504. } else {
  6505. vnode = vm._vnode;
  6506. }
  6507. } finally {
  6508. currentRenderingInstance = null;
  6509. }
  6510. // if the returned array contains only a single node, allow it
  6511. if (Array.isArray(vnode) && vnode.length === 1) {
  6512. vnode = vnode[0];
  6513. }
  6514. // return empty vnode in case the render function errored out
  6515. if (!(vnode instanceof VNode)) {
  6516. if ( true && Array.isArray(vnode)) {
  6517. warn(
  6518. 'Multiple root nodes returned from render function. Render function ' +
  6519. 'should return a single root node.',
  6520. vm
  6521. );
  6522. }
  6523. vnode = createEmptyVNode();
  6524. }
  6525. // set parent
  6526. vnode.parent = _parentVnode;
  6527. return vnode
  6528. };
  6529. }
  6530. /* */
  6531. function ensureCtor (comp, base) {
  6532. if (
  6533. comp.__esModule ||
  6534. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6535. ) {
  6536. comp = comp.default;
  6537. }
  6538. return isObject(comp)
  6539. ? base.extend(comp)
  6540. : comp
  6541. }
  6542. function createAsyncPlaceholder (
  6543. factory,
  6544. data,
  6545. context,
  6546. children,
  6547. tag
  6548. ) {
  6549. var node = createEmptyVNode();
  6550. node.asyncFactory = factory;
  6551. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6552. return node
  6553. }
  6554. function resolveAsyncComponent (
  6555. factory,
  6556. baseCtor
  6557. ) {
  6558. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6559. return factory.errorComp
  6560. }
  6561. if (isDef(factory.resolved)) {
  6562. return factory.resolved
  6563. }
  6564. var owner = currentRenderingInstance;
  6565. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6566. // already pending
  6567. factory.owners.push(owner);
  6568. }
  6569. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6570. return factory.loadingComp
  6571. }
  6572. if (owner && !isDef(factory.owners)) {
  6573. var owners = factory.owners = [owner];
  6574. var sync = true;
  6575. var timerLoading = null;
  6576. var timerTimeout = null
  6577. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6578. var forceRender = function (renderCompleted) {
  6579. for (var i = 0, l = owners.length; i < l; i++) {
  6580. (owners[i]).$forceUpdate();
  6581. }
  6582. if (renderCompleted) {
  6583. owners.length = 0;
  6584. if (timerLoading !== null) {
  6585. clearTimeout(timerLoading);
  6586. timerLoading = null;
  6587. }
  6588. if (timerTimeout !== null) {
  6589. clearTimeout(timerTimeout);
  6590. timerTimeout = null;
  6591. }
  6592. }
  6593. };
  6594. var resolve = once(function (res) {
  6595. // cache resolved
  6596. factory.resolved = ensureCtor(res, baseCtor);
  6597. // invoke callbacks only if this is not a synchronous resolve
  6598. // (async resolves are shimmed as synchronous during SSR)
  6599. if (!sync) {
  6600. forceRender(true);
  6601. } else {
  6602. owners.length = 0;
  6603. }
  6604. });
  6605. var reject = once(function (reason) {
  6606. true && warn(
  6607. "Failed to resolve async component: " + (String(factory)) +
  6608. (reason ? ("\nReason: " + reason) : '')
  6609. );
  6610. if (isDef(factory.errorComp)) {
  6611. factory.error = true;
  6612. forceRender(true);
  6613. }
  6614. });
  6615. var res = factory(resolve, reject);
  6616. if (isObject(res)) {
  6617. if (isPromise(res)) {
  6618. // () => Promise
  6619. if (isUndef(factory.resolved)) {
  6620. res.then(resolve, reject);
  6621. }
  6622. } else if (isPromise(res.component)) {
  6623. res.component.then(resolve, reject);
  6624. if (isDef(res.error)) {
  6625. factory.errorComp = ensureCtor(res.error, baseCtor);
  6626. }
  6627. if (isDef(res.loading)) {
  6628. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6629. if (res.delay === 0) {
  6630. factory.loading = true;
  6631. } else {
  6632. timerLoading = setTimeout(function () {
  6633. timerLoading = null;
  6634. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6635. factory.loading = true;
  6636. forceRender(false);
  6637. }
  6638. }, res.delay || 200);
  6639. }
  6640. }
  6641. if (isDef(res.timeout)) {
  6642. timerTimeout = setTimeout(function () {
  6643. timerTimeout = null;
  6644. if (isUndef(factory.resolved)) {
  6645. reject(
  6646. true
  6647. ? ("timeout (" + (res.timeout) + "ms)")
  6648. : undefined
  6649. );
  6650. }
  6651. }, res.timeout);
  6652. }
  6653. }
  6654. }
  6655. sync = false;
  6656. // return in case resolved synchronously
  6657. return factory.loading
  6658. ? factory.loadingComp
  6659. : factory.resolved
  6660. }
  6661. }
  6662. /* */
  6663. function isAsyncPlaceholder (node) {
  6664. return node.isComment && node.asyncFactory
  6665. }
  6666. /* */
  6667. function getFirstComponentChild (children) {
  6668. if (Array.isArray(children)) {
  6669. for (var i = 0; i < children.length; i++) {
  6670. var c = children[i];
  6671. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6672. return c
  6673. }
  6674. }
  6675. }
  6676. }
  6677. /* */
  6678. /* */
  6679. function initEvents (vm) {
  6680. vm._events = Object.create(null);
  6681. vm._hasHookEvent = false;
  6682. // init parent attached events
  6683. var listeners = vm.$options._parentListeners;
  6684. if (listeners) {
  6685. updateComponentListeners(vm, listeners);
  6686. }
  6687. }
  6688. var target;
  6689. function add (event, fn) {
  6690. target.$on(event, fn);
  6691. }
  6692. function remove$1 (event, fn) {
  6693. target.$off(event, fn);
  6694. }
  6695. function createOnceHandler (event, fn) {
  6696. var _target = target;
  6697. return function onceHandler () {
  6698. var res = fn.apply(null, arguments);
  6699. if (res !== null) {
  6700. _target.$off(event, onceHandler);
  6701. }
  6702. }
  6703. }
  6704. function updateComponentListeners (
  6705. vm,
  6706. listeners,
  6707. oldListeners
  6708. ) {
  6709. target = vm;
  6710. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6711. target = undefined;
  6712. }
  6713. function eventsMixin (Vue) {
  6714. var hookRE = /^hook:/;
  6715. Vue.prototype.$on = function (event, fn) {
  6716. var vm = this;
  6717. if (Array.isArray(event)) {
  6718. for (var i = 0, l = event.length; i < l; i++) {
  6719. vm.$on(event[i], fn);
  6720. }
  6721. } else {
  6722. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6723. // optimize hook:event cost by using a boolean flag marked at registration
  6724. // instead of a hash lookup
  6725. if (hookRE.test(event)) {
  6726. vm._hasHookEvent = true;
  6727. }
  6728. }
  6729. return vm
  6730. };
  6731. Vue.prototype.$once = function (event, fn) {
  6732. var vm = this;
  6733. function on () {
  6734. vm.$off(event, on);
  6735. fn.apply(vm, arguments);
  6736. }
  6737. on.fn = fn;
  6738. vm.$on(event, on);
  6739. return vm
  6740. };
  6741. Vue.prototype.$off = function (event, fn) {
  6742. var vm = this;
  6743. // all
  6744. if (!arguments.length) {
  6745. vm._events = Object.create(null);
  6746. return vm
  6747. }
  6748. // array of events
  6749. if (Array.isArray(event)) {
  6750. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6751. vm.$off(event[i$1], fn);
  6752. }
  6753. return vm
  6754. }
  6755. // specific event
  6756. var cbs = vm._events[event];
  6757. if (!cbs) {
  6758. return vm
  6759. }
  6760. if (!fn) {
  6761. vm._events[event] = null;
  6762. return vm
  6763. }
  6764. // specific handler
  6765. var cb;
  6766. var i = cbs.length;
  6767. while (i--) {
  6768. cb = cbs[i];
  6769. if (cb === fn || cb.fn === fn) {
  6770. cbs.splice(i, 1);
  6771. break
  6772. }
  6773. }
  6774. return vm
  6775. };
  6776. Vue.prototype.$emit = function (event) {
  6777. var vm = this;
  6778. if (true) {
  6779. var lowerCaseEvent = event.toLowerCase();
  6780. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6781. tip(
  6782. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6783. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6784. "Note that HTML attributes are case-insensitive and you cannot use " +
  6785. "v-on to listen to camelCase events when using in-DOM templates. " +
  6786. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6787. );
  6788. }
  6789. }
  6790. var cbs = vm._events[event];
  6791. if (cbs) {
  6792. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6793. var args = toArray(arguments, 1);
  6794. var info = "event handler for \"" + event + "\"";
  6795. for (var i = 0, l = cbs.length; i < l; i++) {
  6796. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6797. }
  6798. }
  6799. return vm
  6800. };
  6801. }
  6802. /* */
  6803. var activeInstance = null;
  6804. var isUpdatingChildComponent = false;
  6805. function setActiveInstance(vm) {
  6806. var prevActiveInstance = activeInstance;
  6807. activeInstance = vm;
  6808. return function () {
  6809. activeInstance = prevActiveInstance;
  6810. }
  6811. }
  6812. function initLifecycle (vm) {
  6813. var options = vm.$options;
  6814. // locate first non-abstract parent
  6815. var parent = options.parent;
  6816. if (parent && !options.abstract) {
  6817. while (parent.$options.abstract && parent.$parent) {
  6818. parent = parent.$parent;
  6819. }
  6820. parent.$children.push(vm);
  6821. }
  6822. vm.$parent = parent;
  6823. vm.$root = parent ? parent.$root : vm;
  6824. vm.$children = [];
  6825. vm.$refs = {};
  6826. vm._watcher = null;
  6827. vm._inactive = null;
  6828. vm._directInactive = false;
  6829. vm._isMounted = false;
  6830. vm._isDestroyed = false;
  6831. vm._isBeingDestroyed = false;
  6832. }
  6833. function lifecycleMixin (Vue) {
  6834. Vue.prototype._update = function (vnode, hydrating) {
  6835. var vm = this;
  6836. var prevEl = vm.$el;
  6837. var prevVnode = vm._vnode;
  6838. var restoreActiveInstance = setActiveInstance(vm);
  6839. vm._vnode = vnode;
  6840. // Vue.prototype.__patch__ is injected in entry points
  6841. // based on the rendering backend used.
  6842. if (!prevVnode) {
  6843. // initial render
  6844. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6845. } else {
  6846. // updates
  6847. vm.$el = vm.__patch__(prevVnode, vnode);
  6848. }
  6849. restoreActiveInstance();
  6850. // update __vue__ reference
  6851. if (prevEl) {
  6852. prevEl.__vue__ = null;
  6853. }
  6854. if (vm.$el) {
  6855. vm.$el.__vue__ = vm;
  6856. }
  6857. // if parent is an HOC, update its $el as well
  6858. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6859. vm.$parent.$el = vm.$el;
  6860. }
  6861. // updated hook is called by the scheduler to ensure that children are
  6862. // updated in a parent's updated hook.
  6863. };
  6864. Vue.prototype.$forceUpdate = function () {
  6865. var vm = this;
  6866. if (vm._watcher) {
  6867. vm._watcher.update();
  6868. }
  6869. };
  6870. Vue.prototype.$destroy = function () {
  6871. var vm = this;
  6872. if (vm._isBeingDestroyed) {
  6873. return
  6874. }
  6875. callHook(vm, 'beforeDestroy');
  6876. vm._isBeingDestroyed = true;
  6877. // remove self from parent
  6878. var parent = vm.$parent;
  6879. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6880. remove(parent.$children, vm);
  6881. }
  6882. // teardown watchers
  6883. if (vm._watcher) {
  6884. vm._watcher.teardown();
  6885. }
  6886. var i = vm._watchers.length;
  6887. while (i--) {
  6888. vm._watchers[i].teardown();
  6889. }
  6890. // remove reference from data ob
  6891. // frozen object may not have observer.
  6892. if (vm._data.__ob__) {
  6893. vm._data.__ob__.vmCount--;
  6894. }
  6895. // call the last hook...
  6896. vm._isDestroyed = true;
  6897. // invoke destroy hooks on current rendered tree
  6898. vm.__patch__(vm._vnode, null);
  6899. // fire destroyed hook
  6900. callHook(vm, 'destroyed');
  6901. // turn off all instance listeners.
  6902. vm.$off();
  6903. // remove __vue__ reference
  6904. if (vm.$el) {
  6905. vm.$el.__vue__ = null;
  6906. }
  6907. // release circular reference (#6759)
  6908. if (vm.$vnode) {
  6909. vm.$vnode.parent = null;
  6910. }
  6911. };
  6912. }
  6913. function updateChildComponent (
  6914. vm,
  6915. propsData,
  6916. listeners,
  6917. parentVnode,
  6918. renderChildren
  6919. ) {
  6920. if (true) {
  6921. isUpdatingChildComponent = true;
  6922. }
  6923. // determine whether component has slot children
  6924. // we need to do this before overwriting $options._renderChildren.
  6925. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6926. // dynamic slot names). Static scoped slots compiled from template has the
  6927. // "$stable" marker.
  6928. var newScopedSlots = parentVnode.data.scopedSlots;
  6929. var oldScopedSlots = vm.$scopedSlots;
  6930. var hasDynamicScopedSlot = !!(
  6931. (newScopedSlots && !newScopedSlots.$stable) ||
  6932. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6933. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6934. );
  6935. // Any static slot children from the parent may have changed during parent's
  6936. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6937. // update is necessary to ensure correctness.
  6938. var needsForceUpdate = !!(
  6939. renderChildren || // has new static slots
  6940. vm.$options._renderChildren || // has old static slots
  6941. hasDynamicScopedSlot
  6942. );
  6943. vm.$options._parentVnode = parentVnode;
  6944. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6945. if (vm._vnode) { // update child tree's parent
  6946. vm._vnode.parent = parentVnode;
  6947. }
  6948. vm.$options._renderChildren = renderChildren;
  6949. // update $attrs and $listeners hash
  6950. // these are also reactive so they may trigger child update if the child
  6951. // used them during render
  6952. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6953. vm.$listeners = listeners || emptyObject;
  6954. // update props
  6955. if (propsData && vm.$options.props) {
  6956. toggleObserving(false);
  6957. var props = vm._props;
  6958. var propKeys = vm.$options._propKeys || [];
  6959. for (var i = 0; i < propKeys.length; i++) {
  6960. var key = propKeys[i];
  6961. var propOptions = vm.$options.props; // wtf flow?
  6962. props[key] = validateProp(key, propOptions, propsData, vm);
  6963. }
  6964. toggleObserving(true);
  6965. // keep a copy of raw propsData
  6966. vm.$options.propsData = propsData;
  6967. }
  6968. // fixed by xxxxxx update properties(mp runtime)
  6969. vm._$updateProperties && vm._$updateProperties(vm);
  6970. // update listeners
  6971. listeners = listeners || emptyObject;
  6972. var oldListeners = vm.$options._parentListeners;
  6973. vm.$options._parentListeners = listeners;
  6974. updateComponentListeners(vm, listeners, oldListeners);
  6975. // resolve slots + force update if has children
  6976. if (needsForceUpdate) {
  6977. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6978. vm.$forceUpdate();
  6979. }
  6980. if (true) {
  6981. isUpdatingChildComponent = false;
  6982. }
  6983. }
  6984. function isInInactiveTree (vm) {
  6985. while (vm && (vm = vm.$parent)) {
  6986. if (vm._inactive) { return true }
  6987. }
  6988. return false
  6989. }
  6990. function activateChildComponent (vm, direct) {
  6991. if (direct) {
  6992. vm._directInactive = false;
  6993. if (isInInactiveTree(vm)) {
  6994. return
  6995. }
  6996. } else if (vm._directInactive) {
  6997. return
  6998. }
  6999. if (vm._inactive || vm._inactive === null) {
  7000. vm._inactive = false;
  7001. for (var i = 0; i < vm.$children.length; i++) {
  7002. activateChildComponent(vm.$children[i]);
  7003. }
  7004. callHook(vm, 'activated');
  7005. }
  7006. }
  7007. function deactivateChildComponent (vm, direct) {
  7008. if (direct) {
  7009. vm._directInactive = true;
  7010. if (isInInactiveTree(vm)) {
  7011. return
  7012. }
  7013. }
  7014. if (!vm._inactive) {
  7015. vm._inactive = true;
  7016. for (var i = 0; i < vm.$children.length; i++) {
  7017. deactivateChildComponent(vm.$children[i]);
  7018. }
  7019. callHook(vm, 'deactivated');
  7020. }
  7021. }
  7022. function callHook (vm, hook) {
  7023. // #7573 disable dep collection when invoking lifecycle hooks
  7024. pushTarget();
  7025. var handlers = vm.$options[hook];
  7026. var info = hook + " hook";
  7027. if (handlers) {
  7028. for (var i = 0, j = handlers.length; i < j; i++) {
  7029. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7030. }
  7031. }
  7032. if (vm._hasHookEvent) {
  7033. vm.$emit('hook:' + hook);
  7034. }
  7035. popTarget();
  7036. }
  7037. /* */
  7038. var MAX_UPDATE_COUNT = 100;
  7039. var queue = [];
  7040. var activatedChildren = [];
  7041. var has = {};
  7042. var circular = {};
  7043. var waiting = false;
  7044. var flushing = false;
  7045. var index = 0;
  7046. /**
  7047. * Reset the scheduler's state.
  7048. */
  7049. function resetSchedulerState () {
  7050. index = queue.length = activatedChildren.length = 0;
  7051. has = {};
  7052. if (true) {
  7053. circular = {};
  7054. }
  7055. waiting = flushing = false;
  7056. }
  7057. // Async edge case #6566 requires saving the timestamp when event listeners are
  7058. // attached. However, calling performance.now() has a perf overhead especially
  7059. // if the page has thousands of event listeners. Instead, we take a timestamp
  7060. // every time the scheduler flushes and use that for all event listeners
  7061. // attached during that flush.
  7062. var currentFlushTimestamp = 0;
  7063. // Async edge case fix requires storing an event listener's attach timestamp.
  7064. var getNow = Date.now;
  7065. // Determine what event timestamp the browser is using. Annoyingly, the
  7066. // timestamp can either be hi-res (relative to page load) or low-res
  7067. // (relative to UNIX epoch), so in order to compare time we have to use the
  7068. // same timestamp type when saving the flush timestamp.
  7069. // All IE versions use low-res event timestamps, and have problematic clock
  7070. // implementations (#9632)
  7071. if (inBrowser && !isIE) {
  7072. var performance = window.performance;
  7073. if (
  7074. performance &&
  7075. typeof performance.now === 'function' &&
  7076. getNow() > document.createEvent('Event').timeStamp
  7077. ) {
  7078. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7079. // smaller than it, it means the event is using a hi-res timestamp,
  7080. // and we need to use the hi-res version for event listener timestamps as
  7081. // well.
  7082. getNow = function () { return performance.now(); };
  7083. }
  7084. }
  7085. /**
  7086. * Flush both queues and run the watchers.
  7087. */
  7088. function flushSchedulerQueue () {
  7089. currentFlushTimestamp = getNow();
  7090. flushing = true;
  7091. var watcher, id;
  7092. // Sort queue before flush.
  7093. // This ensures that:
  7094. // 1. Components are updated from parent to child. (because parent is always
  7095. // created before the child)
  7096. // 2. A component's user watchers are run before its render watcher (because
  7097. // user watchers are created before the render watcher)
  7098. // 3. If a component is destroyed during a parent component's watcher run,
  7099. // its watchers can be skipped.
  7100. queue.sort(function (a, b) { return a.id - b.id; });
  7101. // do not cache length because more watchers might be pushed
  7102. // as we run existing watchers
  7103. for (index = 0; index < queue.length; index++) {
  7104. watcher = queue[index];
  7105. if (watcher.before) {
  7106. watcher.before();
  7107. }
  7108. id = watcher.id;
  7109. has[id] = null;
  7110. watcher.run();
  7111. // in dev build, check and stop circular updates.
  7112. if ( true && has[id] != null) {
  7113. circular[id] = (circular[id] || 0) + 1;
  7114. if (circular[id] > MAX_UPDATE_COUNT) {
  7115. warn(
  7116. 'You may have an infinite update loop ' + (
  7117. watcher.user
  7118. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7119. : "in a component render function."
  7120. ),
  7121. watcher.vm
  7122. );
  7123. break
  7124. }
  7125. }
  7126. }
  7127. // keep copies of post queues before resetting state
  7128. var activatedQueue = activatedChildren.slice();
  7129. var updatedQueue = queue.slice();
  7130. resetSchedulerState();
  7131. // call component updated and activated hooks
  7132. callActivatedHooks(activatedQueue);
  7133. callUpdatedHooks(updatedQueue);
  7134. // devtool hook
  7135. /* istanbul ignore if */
  7136. if (devtools && config.devtools) {
  7137. devtools.emit('flush');
  7138. }
  7139. }
  7140. function callUpdatedHooks (queue) {
  7141. var i = queue.length;
  7142. while (i--) {
  7143. var watcher = queue[i];
  7144. var vm = watcher.vm;
  7145. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7146. callHook(vm, 'updated');
  7147. }
  7148. }
  7149. }
  7150. /**
  7151. * Queue a kept-alive component that was activated during patch.
  7152. * The queue will be processed after the entire tree has been patched.
  7153. */
  7154. function queueActivatedComponent (vm) {
  7155. // setting _inactive to false here so that a render function can
  7156. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7157. vm._inactive = false;
  7158. activatedChildren.push(vm);
  7159. }
  7160. function callActivatedHooks (queue) {
  7161. for (var i = 0; i < queue.length; i++) {
  7162. queue[i]._inactive = true;
  7163. activateChildComponent(queue[i], true /* true */);
  7164. }
  7165. }
  7166. /**
  7167. * Push a watcher into the watcher queue.
  7168. * Jobs with duplicate IDs will be skipped unless it's
  7169. * pushed when the queue is being flushed.
  7170. */
  7171. function queueWatcher (watcher) {
  7172. var id = watcher.id;
  7173. if (has[id] == null) {
  7174. has[id] = true;
  7175. if (!flushing) {
  7176. queue.push(watcher);
  7177. } else {
  7178. // if already flushing, splice the watcher based on its id
  7179. // if already past its id, it will be run next immediately.
  7180. var i = queue.length - 1;
  7181. while (i > index && queue[i].id > watcher.id) {
  7182. i--;
  7183. }
  7184. queue.splice(i + 1, 0, watcher);
  7185. }
  7186. // queue the flush
  7187. if (!waiting) {
  7188. waiting = true;
  7189. if ( true && !config.async) {
  7190. flushSchedulerQueue();
  7191. return
  7192. }
  7193. nextTick(flushSchedulerQueue);
  7194. }
  7195. }
  7196. }
  7197. /* */
  7198. var uid$2 = 0;
  7199. /**
  7200. * A watcher parses an expression, collects dependencies,
  7201. * and fires callback when the expression value changes.
  7202. * This is used for both the $watch() api and directives.
  7203. */
  7204. var Watcher = function Watcher (
  7205. vm,
  7206. expOrFn,
  7207. cb,
  7208. options,
  7209. isRenderWatcher
  7210. ) {
  7211. this.vm = vm;
  7212. if (isRenderWatcher) {
  7213. vm._watcher = this;
  7214. }
  7215. vm._watchers.push(this);
  7216. // options
  7217. if (options) {
  7218. this.deep = !!options.deep;
  7219. this.user = !!options.user;
  7220. this.lazy = !!options.lazy;
  7221. this.sync = !!options.sync;
  7222. this.before = options.before;
  7223. } else {
  7224. this.deep = this.user = this.lazy = this.sync = false;
  7225. }
  7226. this.cb = cb;
  7227. this.id = ++uid$2; // uid for batching
  7228. this.active = true;
  7229. this.dirty = this.lazy; // for lazy watchers
  7230. this.deps = [];
  7231. this.newDeps = [];
  7232. this.depIds = new _Set();
  7233. this.newDepIds = new _Set();
  7234. this.expression = true
  7235. ? expOrFn.toString()
  7236. : undefined;
  7237. // parse expression for getter
  7238. if (typeof expOrFn === 'function') {
  7239. this.getter = expOrFn;
  7240. } else {
  7241. this.getter = parsePath(expOrFn);
  7242. if (!this.getter) {
  7243. this.getter = noop;
  7244. true && warn(
  7245. "Failed watching path: \"" + expOrFn + "\" " +
  7246. 'Watcher only accepts simple dot-delimited paths. ' +
  7247. 'For full control, use a function instead.',
  7248. vm
  7249. );
  7250. }
  7251. }
  7252. this.value = this.lazy
  7253. ? undefined
  7254. : this.get();
  7255. };
  7256. /**
  7257. * Evaluate the getter, and re-collect dependencies.
  7258. */
  7259. Watcher.prototype.get = function get () {
  7260. pushTarget(this);
  7261. var value;
  7262. var vm = this.vm;
  7263. try {
  7264. value = this.getter.call(vm, vm);
  7265. } catch (e) {
  7266. if (this.user) {
  7267. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7268. } else {
  7269. throw e
  7270. }
  7271. } finally {
  7272. // "touch" every property so they are all tracked as
  7273. // dependencies for deep watching
  7274. if (this.deep) {
  7275. traverse(value);
  7276. }
  7277. popTarget();
  7278. this.cleanupDeps();
  7279. }
  7280. return value
  7281. };
  7282. /**
  7283. * Add a dependency to this directive.
  7284. */
  7285. Watcher.prototype.addDep = function addDep (dep) {
  7286. var id = dep.id;
  7287. if (!this.newDepIds.has(id)) {
  7288. this.newDepIds.add(id);
  7289. this.newDeps.push(dep);
  7290. if (!this.depIds.has(id)) {
  7291. dep.addSub(this);
  7292. }
  7293. }
  7294. };
  7295. /**
  7296. * Clean up for dependency collection.
  7297. */
  7298. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7299. var i = this.deps.length;
  7300. while (i--) {
  7301. var dep = this.deps[i];
  7302. if (!this.newDepIds.has(dep.id)) {
  7303. dep.removeSub(this);
  7304. }
  7305. }
  7306. var tmp = this.depIds;
  7307. this.depIds = this.newDepIds;
  7308. this.newDepIds = tmp;
  7309. this.newDepIds.clear();
  7310. tmp = this.deps;
  7311. this.deps = this.newDeps;
  7312. this.newDeps = tmp;
  7313. this.newDeps.length = 0;
  7314. };
  7315. /**
  7316. * Subscriber interface.
  7317. * Will be called when a dependency changes.
  7318. */
  7319. Watcher.prototype.update = function update () {
  7320. /* istanbul ignore else */
  7321. if (this.lazy) {
  7322. this.dirty = true;
  7323. } else if (this.sync) {
  7324. this.run();
  7325. } else {
  7326. queueWatcher(this);
  7327. }
  7328. };
  7329. /**
  7330. * Scheduler job interface.
  7331. * Will be called by the scheduler.
  7332. */
  7333. Watcher.prototype.run = function run () {
  7334. if (this.active) {
  7335. var value = this.get();
  7336. if (
  7337. value !== this.value ||
  7338. // Deep watchers and watchers on Object/Arrays should fire even
  7339. // when the value is the same, because the value may
  7340. // have mutated.
  7341. isObject(value) ||
  7342. this.deep
  7343. ) {
  7344. // set new value
  7345. var oldValue = this.value;
  7346. this.value = value;
  7347. if (this.user) {
  7348. try {
  7349. this.cb.call(this.vm, value, oldValue);
  7350. } catch (e) {
  7351. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7352. }
  7353. } else {
  7354. this.cb.call(this.vm, value, oldValue);
  7355. }
  7356. }
  7357. }
  7358. };
  7359. /**
  7360. * Evaluate the value of the watcher.
  7361. * This only gets called for lazy watchers.
  7362. */
  7363. Watcher.prototype.evaluate = function evaluate () {
  7364. this.value = this.get();
  7365. this.dirty = false;
  7366. };
  7367. /**
  7368. * Depend on all deps collected by this watcher.
  7369. */
  7370. Watcher.prototype.depend = function depend () {
  7371. var i = this.deps.length;
  7372. while (i--) {
  7373. this.deps[i].depend();
  7374. }
  7375. };
  7376. /**
  7377. * Remove self from all dependencies' subscriber list.
  7378. */
  7379. Watcher.prototype.teardown = function teardown () {
  7380. if (this.active) {
  7381. // remove self from vm's watcher list
  7382. // this is a somewhat expensive operation so we skip it
  7383. // if the vm is being destroyed.
  7384. if (!this.vm._isBeingDestroyed) {
  7385. remove(this.vm._watchers, this);
  7386. }
  7387. var i = this.deps.length;
  7388. while (i--) {
  7389. this.deps[i].removeSub(this);
  7390. }
  7391. this.active = false;
  7392. }
  7393. };
  7394. /* */
  7395. var sharedPropertyDefinition = {
  7396. enumerable: true,
  7397. configurable: true,
  7398. get: noop,
  7399. set: noop
  7400. };
  7401. function proxy (target, sourceKey, key) {
  7402. sharedPropertyDefinition.get = function proxyGetter () {
  7403. return this[sourceKey][key]
  7404. };
  7405. sharedPropertyDefinition.set = function proxySetter (val) {
  7406. this[sourceKey][key] = val;
  7407. };
  7408. Object.defineProperty(target, key, sharedPropertyDefinition);
  7409. }
  7410. function initState (vm) {
  7411. vm._watchers = [];
  7412. var opts = vm.$options;
  7413. if (opts.props) { initProps(vm, opts.props); }
  7414. if (opts.methods) { initMethods(vm, opts.methods); }
  7415. if (opts.data) {
  7416. initData(vm);
  7417. } else {
  7418. observe(vm._data = {}, true /* asRootData */);
  7419. }
  7420. if (opts.computed) { initComputed(vm, opts.computed); }
  7421. if (opts.watch && opts.watch !== nativeWatch) {
  7422. initWatch(vm, opts.watch);
  7423. }
  7424. }
  7425. function initProps (vm, propsOptions) {
  7426. var propsData = vm.$options.propsData || {};
  7427. var props = vm._props = {};
  7428. // cache prop keys so that future props updates can iterate using Array
  7429. // instead of dynamic object key enumeration.
  7430. var keys = vm.$options._propKeys = [];
  7431. var isRoot = !vm.$parent;
  7432. // root instance props should be converted
  7433. if (!isRoot) {
  7434. toggleObserving(false);
  7435. }
  7436. var loop = function ( key ) {
  7437. keys.push(key);
  7438. var value = validateProp(key, propsOptions, propsData, vm);
  7439. /* istanbul ignore else */
  7440. if (true) {
  7441. var hyphenatedKey = hyphenate(key);
  7442. if (isReservedAttribute(hyphenatedKey) ||
  7443. config.isReservedAttr(hyphenatedKey)) {
  7444. warn(
  7445. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7446. vm
  7447. );
  7448. }
  7449. defineReactive$$1(props, key, value, function () {
  7450. if (!isRoot && !isUpdatingChildComponent) {
  7451. {
  7452. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7453. return
  7454. }
  7455. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7456. if(
  7457. key === 'value' &&
  7458. Array.isArray(vm.$options.behaviors) &&
  7459. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7460. ){
  7461. return
  7462. }
  7463. if(vm._getFormData){
  7464. return
  7465. }
  7466. var $parent = vm.$parent;
  7467. while($parent){
  7468. if($parent.__next_tick_pending){
  7469. return
  7470. }
  7471. $parent = $parent.$parent;
  7472. }
  7473. }
  7474. warn(
  7475. "Avoid mutating a prop directly since the value will be " +
  7476. "overwritten whenever the parent component re-renders. " +
  7477. "Instead, use a data or computed property based on the prop's " +
  7478. "value. Prop being mutated: \"" + key + "\"",
  7479. vm
  7480. );
  7481. }
  7482. });
  7483. } else {}
  7484. // static props are already proxied on the component's prototype
  7485. // during Vue.extend(). We only need to proxy props defined at
  7486. // instantiation here.
  7487. if (!(key in vm)) {
  7488. proxy(vm, "_props", key);
  7489. }
  7490. };
  7491. for (var key in propsOptions) loop( key );
  7492. toggleObserving(true);
  7493. }
  7494. function initData (vm) {
  7495. var data = vm.$options.data;
  7496. data = vm._data = typeof data === 'function'
  7497. ? getData(data, vm)
  7498. : data || {};
  7499. if (!isPlainObject(data)) {
  7500. data = {};
  7501. true && warn(
  7502. 'data functions should return an object:\n' +
  7503. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7504. vm
  7505. );
  7506. }
  7507. // proxy data on instance
  7508. var keys = Object.keys(data);
  7509. var props = vm.$options.props;
  7510. var methods = vm.$options.methods;
  7511. var i = keys.length;
  7512. while (i--) {
  7513. var key = keys[i];
  7514. if (true) {
  7515. if (methods && hasOwn(methods, key)) {
  7516. warn(
  7517. ("Method \"" + key + "\" has already been defined as a data property."),
  7518. vm
  7519. );
  7520. }
  7521. }
  7522. if (props && hasOwn(props, key)) {
  7523. true && warn(
  7524. "The data property \"" + key + "\" is already declared as a prop. " +
  7525. "Use prop default value instead.",
  7526. vm
  7527. );
  7528. } else if (!isReserved(key)) {
  7529. proxy(vm, "_data", key);
  7530. }
  7531. }
  7532. // observe data
  7533. observe(data, true /* asRootData */);
  7534. }
  7535. function getData (data, vm) {
  7536. // #7573 disable dep collection when invoking data getters
  7537. pushTarget();
  7538. try {
  7539. return data.call(vm, vm)
  7540. } catch (e) {
  7541. handleError(e, vm, "data()");
  7542. return {}
  7543. } finally {
  7544. popTarget();
  7545. }
  7546. }
  7547. var computedWatcherOptions = { lazy: true };
  7548. function initComputed (vm, computed) {
  7549. // $flow-disable-line
  7550. var watchers = vm._computedWatchers = Object.create(null);
  7551. // computed properties are just getters during SSR
  7552. var isSSR = isServerRendering();
  7553. for (var key in computed) {
  7554. var userDef = computed[key];
  7555. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7556. if ( true && getter == null) {
  7557. warn(
  7558. ("Getter is missing for computed property \"" + key + "\"."),
  7559. vm
  7560. );
  7561. }
  7562. if (!isSSR) {
  7563. // create internal watcher for the computed property.
  7564. watchers[key] = new Watcher(
  7565. vm,
  7566. getter || noop,
  7567. noop,
  7568. computedWatcherOptions
  7569. );
  7570. }
  7571. // component-defined computed properties are already defined on the
  7572. // component prototype. We only need to define computed properties defined
  7573. // at instantiation here.
  7574. if (!(key in vm)) {
  7575. defineComputed(vm, key, userDef);
  7576. } else if (true) {
  7577. if (key in vm.$data) {
  7578. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7579. } else if (vm.$options.props && key in vm.$options.props) {
  7580. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7581. }
  7582. }
  7583. }
  7584. }
  7585. function defineComputed (
  7586. target,
  7587. key,
  7588. userDef
  7589. ) {
  7590. var shouldCache = !isServerRendering();
  7591. if (typeof userDef === 'function') {
  7592. sharedPropertyDefinition.get = shouldCache
  7593. ? createComputedGetter(key)
  7594. : createGetterInvoker(userDef);
  7595. sharedPropertyDefinition.set = noop;
  7596. } else {
  7597. sharedPropertyDefinition.get = userDef.get
  7598. ? shouldCache && userDef.cache !== false
  7599. ? createComputedGetter(key)
  7600. : createGetterInvoker(userDef.get)
  7601. : noop;
  7602. sharedPropertyDefinition.set = userDef.set || noop;
  7603. }
  7604. if ( true &&
  7605. sharedPropertyDefinition.set === noop) {
  7606. sharedPropertyDefinition.set = function () {
  7607. warn(
  7608. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7609. this
  7610. );
  7611. };
  7612. }
  7613. Object.defineProperty(target, key, sharedPropertyDefinition);
  7614. }
  7615. function createComputedGetter (key) {
  7616. return function computedGetter () {
  7617. var watcher = this._computedWatchers && this._computedWatchers[key];
  7618. if (watcher) {
  7619. if (watcher.dirty) {
  7620. watcher.evaluate();
  7621. }
  7622. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7623. watcher.depend();
  7624. }
  7625. return watcher.value
  7626. }
  7627. }
  7628. }
  7629. function createGetterInvoker(fn) {
  7630. return function computedGetter () {
  7631. return fn.call(this, this)
  7632. }
  7633. }
  7634. function initMethods (vm, methods) {
  7635. var props = vm.$options.props;
  7636. for (var key in methods) {
  7637. if (true) {
  7638. if (typeof methods[key] !== 'function') {
  7639. warn(
  7640. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7641. "Did you reference the function correctly?",
  7642. vm
  7643. );
  7644. }
  7645. if (props && hasOwn(props, key)) {
  7646. warn(
  7647. ("Method \"" + key + "\" has already been defined as a prop."),
  7648. vm
  7649. );
  7650. }
  7651. if ((key in vm) && isReserved(key)) {
  7652. warn(
  7653. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7654. "Avoid defining component methods that start with _ or $."
  7655. );
  7656. }
  7657. }
  7658. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7659. }
  7660. }
  7661. function initWatch (vm, watch) {
  7662. for (var key in watch) {
  7663. var handler = watch[key];
  7664. if (Array.isArray(handler)) {
  7665. for (var i = 0; i < handler.length; i++) {
  7666. createWatcher(vm, key, handler[i]);
  7667. }
  7668. } else {
  7669. createWatcher(vm, key, handler);
  7670. }
  7671. }
  7672. }
  7673. function createWatcher (
  7674. vm,
  7675. expOrFn,
  7676. handler,
  7677. options
  7678. ) {
  7679. if (isPlainObject(handler)) {
  7680. options = handler;
  7681. handler = handler.handler;
  7682. }
  7683. if (typeof handler === 'string') {
  7684. handler = vm[handler];
  7685. }
  7686. return vm.$watch(expOrFn, handler, options)
  7687. }
  7688. function stateMixin (Vue) {
  7689. // flow somehow has problems with directly declared definition object
  7690. // when using Object.defineProperty, so we have to procedurally build up
  7691. // the object here.
  7692. var dataDef = {};
  7693. dataDef.get = function () { return this._data };
  7694. var propsDef = {};
  7695. propsDef.get = function () { return this._props };
  7696. if (true) {
  7697. dataDef.set = function () {
  7698. warn(
  7699. 'Avoid replacing instance root $data. ' +
  7700. 'Use nested data properties instead.',
  7701. this
  7702. );
  7703. };
  7704. propsDef.set = function () {
  7705. warn("$props is readonly.", this);
  7706. };
  7707. }
  7708. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7709. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7710. Vue.prototype.$set = set;
  7711. Vue.prototype.$delete = del;
  7712. Vue.prototype.$watch = function (
  7713. expOrFn,
  7714. cb,
  7715. options
  7716. ) {
  7717. var vm = this;
  7718. if (isPlainObject(cb)) {
  7719. return createWatcher(vm, expOrFn, cb, options)
  7720. }
  7721. options = options || {};
  7722. options.user = true;
  7723. var watcher = new Watcher(vm, expOrFn, cb, options);
  7724. if (options.immediate) {
  7725. try {
  7726. cb.call(vm, watcher.value);
  7727. } catch (error) {
  7728. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7729. }
  7730. }
  7731. return function unwatchFn () {
  7732. watcher.teardown();
  7733. }
  7734. };
  7735. }
  7736. /* */
  7737. var uid$3 = 0;
  7738. function initMixin (Vue) {
  7739. Vue.prototype._init = function (options) {
  7740. var vm = this;
  7741. // a uid
  7742. vm._uid = uid$3++;
  7743. var startTag, endTag;
  7744. /* istanbul ignore if */
  7745. if ( true && config.performance && mark) {
  7746. startTag = "vue-perf-start:" + (vm._uid);
  7747. endTag = "vue-perf-end:" + (vm._uid);
  7748. mark(startTag);
  7749. }
  7750. // a flag to avoid this being observed
  7751. vm._isVue = true;
  7752. // merge options
  7753. if (options && options._isComponent) {
  7754. // optimize internal component instantiation
  7755. // since dynamic options merging is pretty slow, and none of the
  7756. // internal component options needs special treatment.
  7757. initInternalComponent(vm, options);
  7758. } else {
  7759. vm.$options = mergeOptions(
  7760. resolveConstructorOptions(vm.constructor),
  7761. options || {},
  7762. vm
  7763. );
  7764. }
  7765. /* istanbul ignore else */
  7766. if (true) {
  7767. initProxy(vm);
  7768. } else {}
  7769. // expose real self
  7770. vm._self = vm;
  7771. initLifecycle(vm);
  7772. initEvents(vm);
  7773. initRender(vm);
  7774. callHook(vm, 'beforeCreate');
  7775. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7776. initState(vm);
  7777. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7778. !vm._$fallback && callHook(vm, 'created');
  7779. /* istanbul ignore if */
  7780. if ( true && config.performance && mark) {
  7781. vm._name = formatComponentName(vm, false);
  7782. mark(endTag);
  7783. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7784. }
  7785. if (vm.$options.el) {
  7786. vm.$mount(vm.$options.el);
  7787. }
  7788. };
  7789. }
  7790. function initInternalComponent (vm, options) {
  7791. var opts = vm.$options = Object.create(vm.constructor.options);
  7792. // doing this because it's faster than dynamic enumeration.
  7793. var parentVnode = options._parentVnode;
  7794. opts.parent = options.parent;
  7795. opts._parentVnode = parentVnode;
  7796. var vnodeComponentOptions = parentVnode.componentOptions;
  7797. opts.propsData = vnodeComponentOptions.propsData;
  7798. opts._parentListeners = vnodeComponentOptions.listeners;
  7799. opts._renderChildren = vnodeComponentOptions.children;
  7800. opts._componentTag = vnodeComponentOptions.tag;
  7801. if (options.render) {
  7802. opts.render = options.render;
  7803. opts.staticRenderFns = options.staticRenderFns;
  7804. }
  7805. }
  7806. function resolveConstructorOptions (Ctor) {
  7807. var options = Ctor.options;
  7808. if (Ctor.super) {
  7809. var superOptions = resolveConstructorOptions(Ctor.super);
  7810. var cachedSuperOptions = Ctor.superOptions;
  7811. if (superOptions !== cachedSuperOptions) {
  7812. // super option changed,
  7813. // need to resolve new options.
  7814. Ctor.superOptions = superOptions;
  7815. // check if there are any late-modified/attached options (#4976)
  7816. var modifiedOptions = resolveModifiedOptions(Ctor);
  7817. // update base extend options
  7818. if (modifiedOptions) {
  7819. extend(Ctor.extendOptions, modifiedOptions);
  7820. }
  7821. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7822. if (options.name) {
  7823. options.components[options.name] = Ctor;
  7824. }
  7825. }
  7826. }
  7827. return options
  7828. }
  7829. function resolveModifiedOptions (Ctor) {
  7830. var modified;
  7831. var latest = Ctor.options;
  7832. var sealed = Ctor.sealedOptions;
  7833. for (var key in latest) {
  7834. if (latest[key] !== sealed[key]) {
  7835. if (!modified) { modified = {}; }
  7836. modified[key] = latest[key];
  7837. }
  7838. }
  7839. return modified
  7840. }
  7841. function Vue (options) {
  7842. if ( true &&
  7843. !(this instanceof Vue)
  7844. ) {
  7845. warn('Vue is a constructor and should be called with the `new` keyword');
  7846. }
  7847. this._init(options);
  7848. }
  7849. initMixin(Vue);
  7850. stateMixin(Vue);
  7851. eventsMixin(Vue);
  7852. lifecycleMixin(Vue);
  7853. renderMixin(Vue);
  7854. /* */
  7855. function initUse (Vue) {
  7856. Vue.use = function (plugin) {
  7857. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7858. if (installedPlugins.indexOf(plugin) > -1) {
  7859. return this
  7860. }
  7861. // additional parameters
  7862. var args = toArray(arguments, 1);
  7863. args.unshift(this);
  7864. if (typeof plugin.install === 'function') {
  7865. plugin.install.apply(plugin, args);
  7866. } else if (typeof plugin === 'function') {
  7867. plugin.apply(null, args);
  7868. }
  7869. installedPlugins.push(plugin);
  7870. return this
  7871. };
  7872. }
  7873. /* */
  7874. function initMixin$1 (Vue) {
  7875. Vue.mixin = function (mixin) {
  7876. this.options = mergeOptions(this.options, mixin);
  7877. return this
  7878. };
  7879. }
  7880. /* */
  7881. function initExtend (Vue) {
  7882. /**
  7883. * Each instance constructor, including Vue, has a unique
  7884. * cid. This enables us to create wrapped "child
  7885. * constructors" for prototypal inheritance and cache them.
  7886. */
  7887. Vue.cid = 0;
  7888. var cid = 1;
  7889. /**
  7890. * Class inheritance
  7891. */
  7892. Vue.extend = function (extendOptions) {
  7893. extendOptions = extendOptions || {};
  7894. var Super = this;
  7895. var SuperId = Super.cid;
  7896. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7897. if (cachedCtors[SuperId]) {
  7898. return cachedCtors[SuperId]
  7899. }
  7900. var name = extendOptions.name || Super.options.name;
  7901. if ( true && name) {
  7902. validateComponentName(name);
  7903. }
  7904. var Sub = function VueComponent (options) {
  7905. this._init(options);
  7906. };
  7907. Sub.prototype = Object.create(Super.prototype);
  7908. Sub.prototype.constructor = Sub;
  7909. Sub.cid = cid++;
  7910. Sub.options = mergeOptions(
  7911. Super.options,
  7912. extendOptions
  7913. );
  7914. Sub['super'] = Super;
  7915. // For props and computed properties, we define the proxy getters on
  7916. // the Vue instances at extension time, on the extended prototype. This
  7917. // avoids Object.defineProperty calls for each instance created.
  7918. if (Sub.options.props) {
  7919. initProps$1(Sub);
  7920. }
  7921. if (Sub.options.computed) {
  7922. initComputed$1(Sub);
  7923. }
  7924. // allow further extension/mixin/plugin usage
  7925. Sub.extend = Super.extend;
  7926. Sub.mixin = Super.mixin;
  7927. Sub.use = Super.use;
  7928. // create asset registers, so extended classes
  7929. // can have their private assets too.
  7930. ASSET_TYPES.forEach(function (type) {
  7931. Sub[type] = Super[type];
  7932. });
  7933. // enable recursive self-lookup
  7934. if (name) {
  7935. Sub.options.components[name] = Sub;
  7936. }
  7937. // keep a reference to the super options at extension time.
  7938. // later at instantiation we can check if Super's options have
  7939. // been updated.
  7940. Sub.superOptions = Super.options;
  7941. Sub.extendOptions = extendOptions;
  7942. Sub.sealedOptions = extend({}, Sub.options);
  7943. // cache constructor
  7944. cachedCtors[SuperId] = Sub;
  7945. return Sub
  7946. };
  7947. }
  7948. function initProps$1 (Comp) {
  7949. var props = Comp.options.props;
  7950. for (var key in props) {
  7951. proxy(Comp.prototype, "_props", key);
  7952. }
  7953. }
  7954. function initComputed$1 (Comp) {
  7955. var computed = Comp.options.computed;
  7956. for (var key in computed) {
  7957. defineComputed(Comp.prototype, key, computed[key]);
  7958. }
  7959. }
  7960. /* */
  7961. function initAssetRegisters (Vue) {
  7962. /**
  7963. * Create asset registration methods.
  7964. */
  7965. ASSET_TYPES.forEach(function (type) {
  7966. Vue[type] = function (
  7967. id,
  7968. definition
  7969. ) {
  7970. if (!definition) {
  7971. return this.options[type + 's'][id]
  7972. } else {
  7973. /* istanbul ignore if */
  7974. if ( true && type === 'component') {
  7975. validateComponentName(id);
  7976. }
  7977. if (type === 'component' && isPlainObject(definition)) {
  7978. definition.name = definition.name || id;
  7979. definition = this.options._base.extend(definition);
  7980. }
  7981. if (type === 'directive' && typeof definition === 'function') {
  7982. definition = { bind: definition, update: definition };
  7983. }
  7984. this.options[type + 's'][id] = definition;
  7985. return definition
  7986. }
  7987. };
  7988. });
  7989. }
  7990. /* */
  7991. function getComponentName (opts) {
  7992. return opts && (opts.Ctor.options.name || opts.tag)
  7993. }
  7994. function matches (pattern, name) {
  7995. if (Array.isArray(pattern)) {
  7996. return pattern.indexOf(name) > -1
  7997. } else if (typeof pattern === 'string') {
  7998. return pattern.split(',').indexOf(name) > -1
  7999. } else if (isRegExp(pattern)) {
  8000. return pattern.test(name)
  8001. }
  8002. /* istanbul ignore next */
  8003. return false
  8004. }
  8005. function pruneCache (keepAliveInstance, filter) {
  8006. var cache = keepAliveInstance.cache;
  8007. var keys = keepAliveInstance.keys;
  8008. var _vnode = keepAliveInstance._vnode;
  8009. for (var key in cache) {
  8010. var cachedNode = cache[key];
  8011. if (cachedNode) {
  8012. var name = getComponentName(cachedNode.componentOptions);
  8013. if (name && !filter(name)) {
  8014. pruneCacheEntry(cache, key, keys, _vnode);
  8015. }
  8016. }
  8017. }
  8018. }
  8019. function pruneCacheEntry (
  8020. cache,
  8021. key,
  8022. keys,
  8023. current
  8024. ) {
  8025. var cached$$1 = cache[key];
  8026. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8027. cached$$1.componentInstance.$destroy();
  8028. }
  8029. cache[key] = null;
  8030. remove(keys, key);
  8031. }
  8032. var patternTypes = [String, RegExp, Array];
  8033. var KeepAlive = {
  8034. name: 'keep-alive',
  8035. abstract: true,
  8036. props: {
  8037. include: patternTypes,
  8038. exclude: patternTypes,
  8039. max: [String, Number]
  8040. },
  8041. created: function created () {
  8042. this.cache = Object.create(null);
  8043. this.keys = [];
  8044. },
  8045. destroyed: function destroyed () {
  8046. for (var key in this.cache) {
  8047. pruneCacheEntry(this.cache, key, this.keys);
  8048. }
  8049. },
  8050. mounted: function mounted () {
  8051. var this$1 = this;
  8052. this.$watch('include', function (val) {
  8053. pruneCache(this$1, function (name) { return matches(val, name); });
  8054. });
  8055. this.$watch('exclude', function (val) {
  8056. pruneCache(this$1, function (name) { return !matches(val, name); });
  8057. });
  8058. },
  8059. render: function render () {
  8060. var slot = this.$slots.default;
  8061. var vnode = getFirstComponentChild(slot);
  8062. var componentOptions = vnode && vnode.componentOptions;
  8063. if (componentOptions) {
  8064. // check pattern
  8065. var name = getComponentName(componentOptions);
  8066. var ref = this;
  8067. var include = ref.include;
  8068. var exclude = ref.exclude;
  8069. if (
  8070. // not included
  8071. (include && (!name || !matches(include, name))) ||
  8072. // excluded
  8073. (exclude && name && matches(exclude, name))
  8074. ) {
  8075. return vnode
  8076. }
  8077. var ref$1 = this;
  8078. var cache = ref$1.cache;
  8079. var keys = ref$1.keys;
  8080. var key = vnode.key == null
  8081. // same constructor may get registered as different local components
  8082. // so cid alone is not enough (#3269)
  8083. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8084. : vnode.key;
  8085. if (cache[key]) {
  8086. vnode.componentInstance = cache[key].componentInstance;
  8087. // make current key freshest
  8088. remove(keys, key);
  8089. keys.push(key);
  8090. } else {
  8091. cache[key] = vnode;
  8092. keys.push(key);
  8093. // prune oldest entry
  8094. if (this.max && keys.length > parseInt(this.max)) {
  8095. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8096. }
  8097. }
  8098. vnode.data.keepAlive = true;
  8099. }
  8100. return vnode || (slot && slot[0])
  8101. }
  8102. };
  8103. var builtInComponents = {
  8104. KeepAlive: KeepAlive
  8105. };
  8106. /* */
  8107. function initGlobalAPI (Vue) {
  8108. // config
  8109. var configDef = {};
  8110. configDef.get = function () { return config; };
  8111. if (true) {
  8112. configDef.set = function () {
  8113. warn(
  8114. 'Do not replace the Vue.config object, set individual fields instead.'
  8115. );
  8116. };
  8117. }
  8118. Object.defineProperty(Vue, 'config', configDef);
  8119. // exposed util methods.
  8120. // NOTE: these are not considered part of the public API - avoid relying on
  8121. // them unless you are aware of the risk.
  8122. Vue.util = {
  8123. warn: warn,
  8124. extend: extend,
  8125. mergeOptions: mergeOptions,
  8126. defineReactive: defineReactive$$1
  8127. };
  8128. Vue.set = set;
  8129. Vue.delete = del;
  8130. Vue.nextTick = nextTick;
  8131. // 2.6 explicit observable API
  8132. Vue.observable = function (obj) {
  8133. observe(obj);
  8134. return obj
  8135. };
  8136. Vue.options = Object.create(null);
  8137. ASSET_TYPES.forEach(function (type) {
  8138. Vue.options[type + 's'] = Object.create(null);
  8139. });
  8140. // this is used to identify the "base" constructor to extend all plain-object
  8141. // components with in Weex's multi-instance scenarios.
  8142. Vue.options._base = Vue;
  8143. extend(Vue.options.components, builtInComponents);
  8144. initUse(Vue);
  8145. initMixin$1(Vue);
  8146. initExtend(Vue);
  8147. initAssetRegisters(Vue);
  8148. }
  8149. initGlobalAPI(Vue);
  8150. Object.defineProperty(Vue.prototype, '$isServer', {
  8151. get: isServerRendering
  8152. });
  8153. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8154. get: function get () {
  8155. /* istanbul ignore next */
  8156. return this.$vnode && this.$vnode.ssrContext
  8157. }
  8158. });
  8159. // expose FunctionalRenderContext for ssr runtime helper installation
  8160. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8161. value: FunctionalRenderContext
  8162. });
  8163. Vue.version = '2.6.11';
  8164. /**
  8165. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8166. */
  8167. var ARRAYTYPE = '[object Array]';
  8168. var OBJECTTYPE = '[object Object]';
  8169. var NULLTYPE = '[object Null]';
  8170. var UNDEFINEDTYPE = '[object Undefined]';
  8171. // const FUNCTIONTYPE = '[object Function]'
  8172. function diff(current, pre) {
  8173. var result = {};
  8174. syncKeys(current, pre);
  8175. _diff(current, pre, '', result);
  8176. return result
  8177. }
  8178. function syncKeys(current, pre) {
  8179. if (current === pre) { return }
  8180. var rootCurrentType = type(current);
  8181. var rootPreType = type(pre);
  8182. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8183. if(Object.keys(current).length >= Object.keys(pre).length){
  8184. for (var key in pre) {
  8185. var currentValue = current[key];
  8186. if (currentValue === undefined) {
  8187. current[key] = null;
  8188. } else {
  8189. syncKeys(currentValue, pre[key]);
  8190. }
  8191. }
  8192. }
  8193. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8194. if (current.length >= pre.length) {
  8195. pre.forEach(function (item, index) {
  8196. syncKeys(current[index], item);
  8197. });
  8198. }
  8199. }
  8200. }
  8201. function nullOrUndefined(currentType, preType) {
  8202. if(
  8203. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8204. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8205. ) {
  8206. return false
  8207. }
  8208. return true
  8209. }
  8210. function _diff(current, pre, path, result) {
  8211. if (current === pre) { return }
  8212. var rootCurrentType = type(current);
  8213. var rootPreType = type(pre);
  8214. if (rootCurrentType == OBJECTTYPE) {
  8215. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8216. setResult(result, path, current);
  8217. } else {
  8218. var loop = function ( key ) {
  8219. var currentValue = current[key];
  8220. var preValue = pre[key];
  8221. var currentType = type(currentValue);
  8222. var preType = type(preValue);
  8223. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8224. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8225. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8226. }
  8227. } else if (currentType == ARRAYTYPE) {
  8228. if (preType != ARRAYTYPE) {
  8229. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8230. } else {
  8231. if (currentValue.length < preValue.length) {
  8232. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8233. } else {
  8234. currentValue.forEach(function (item, index) {
  8235. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8236. });
  8237. }
  8238. }
  8239. } else if (currentType == OBJECTTYPE) {
  8240. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8241. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8242. } else {
  8243. for (var subKey in currentValue) {
  8244. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8245. }
  8246. }
  8247. }
  8248. };
  8249. for (var key in current) loop( key );
  8250. }
  8251. } else if (rootCurrentType == ARRAYTYPE) {
  8252. if (rootPreType != ARRAYTYPE) {
  8253. setResult(result, path, current);
  8254. } else {
  8255. if (current.length < pre.length) {
  8256. setResult(result, path, current);
  8257. } else {
  8258. current.forEach(function (item, index) {
  8259. _diff(item, pre[index], path + '[' + index + ']', result);
  8260. });
  8261. }
  8262. }
  8263. } else {
  8264. setResult(result, path, current);
  8265. }
  8266. }
  8267. function setResult(result, k, v) {
  8268. // if (type(v) != FUNCTIONTYPE) {
  8269. result[k] = v;
  8270. // }
  8271. }
  8272. function type(obj) {
  8273. return Object.prototype.toString.call(obj)
  8274. }
  8275. /* */
  8276. function flushCallbacks$1(vm) {
  8277. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8278. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8279. var mpInstance = vm.$scope;
  8280. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8281. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8282. }
  8283. var copies = vm.__next_tick_callbacks.slice(0);
  8284. vm.__next_tick_callbacks.length = 0;
  8285. for (var i = 0; i < copies.length; i++) {
  8286. copies[i]();
  8287. }
  8288. }
  8289. }
  8290. function hasRenderWatcher(vm) {
  8291. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8292. }
  8293. function nextTick$1(vm, cb) {
  8294. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8295. //2.nextTick 之前存在 render watcher
  8296. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8297. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8298. var mpInstance = vm.$scope;
  8299. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8300. ']:nextVueTick');
  8301. }
  8302. return nextTick(cb, vm)
  8303. }else{
  8304. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8305. var mpInstance$1 = vm.$scope;
  8306. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8307. ']:nextMPTick');
  8308. }
  8309. }
  8310. var _resolve;
  8311. if (!vm.__next_tick_callbacks) {
  8312. vm.__next_tick_callbacks = [];
  8313. }
  8314. vm.__next_tick_callbacks.push(function () {
  8315. if (cb) {
  8316. try {
  8317. cb.call(vm);
  8318. } catch (e) {
  8319. handleError(e, vm, 'nextTick');
  8320. }
  8321. } else if (_resolve) {
  8322. _resolve(vm);
  8323. }
  8324. });
  8325. // $flow-disable-line
  8326. if (!cb && typeof Promise !== 'undefined') {
  8327. return new Promise(function (resolve) {
  8328. _resolve = resolve;
  8329. })
  8330. }
  8331. }
  8332. /* */
  8333. function clearInstance(key, value) {
  8334. // 简易去除 Vue 和小程序组件实例
  8335. if (value) {
  8336. if (value._isVue || value.__v_isMPComponent) {
  8337. return {}
  8338. }
  8339. }
  8340. return value
  8341. }
  8342. function cloneWithData(vm) {
  8343. // 确保当前 vm 所有数据被同步
  8344. var ret = Object.create(null);
  8345. var dataKeys = [].concat(
  8346. Object.keys(vm._data || {}),
  8347. Object.keys(vm._computedWatchers || {}));
  8348. dataKeys.reduce(function(ret, key) {
  8349. ret[key] = vm[key];
  8350. return ret
  8351. }, ret);
  8352. // vue-composition-api
  8353. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8354. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8355. if (rawBindings) {
  8356. Object.keys(rawBindings).forEach(function (key) {
  8357. ret[key] = vm[key];
  8358. });
  8359. }
  8360. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8361. Object.assign(ret, vm.$mp.data || {});
  8362. if (
  8363. Array.isArray(vm.$options.behaviors) &&
  8364. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8365. ) { //form-field
  8366. ret['name'] = vm.name;
  8367. ret['value'] = vm.value;
  8368. }
  8369. return JSON.parse(JSON.stringify(ret, clearInstance))
  8370. }
  8371. var patch = function(oldVnode, vnode) {
  8372. var this$1 = this;
  8373. if (vnode === null) { //destroy
  8374. return
  8375. }
  8376. if (this.mpType === 'page' || this.mpType === 'component') {
  8377. var mpInstance = this.$scope;
  8378. var data = Object.create(null);
  8379. try {
  8380. data = cloneWithData(this);
  8381. } catch (err) {
  8382. console.error(err);
  8383. }
  8384. data.__webviewId__ = mpInstance.data.__webviewId__;
  8385. var mpData = Object.create(null);
  8386. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8387. mpData[key] = mpInstance.data[key];
  8388. });
  8389. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8390. if (Object.keys(diffData).length) {
  8391. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8392. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8393. ']差量更新',
  8394. JSON.stringify(diffData));
  8395. }
  8396. this.__next_tick_pending = true;
  8397. mpInstance.setData(diffData, function () {
  8398. this$1.__next_tick_pending = false;
  8399. flushCallbacks$1(this$1);
  8400. });
  8401. } else {
  8402. flushCallbacks$1(this);
  8403. }
  8404. }
  8405. };
  8406. /* */
  8407. function createEmptyRender() {
  8408. }
  8409. function mountComponent$1(
  8410. vm,
  8411. el,
  8412. hydrating
  8413. ) {
  8414. if (!vm.mpType) {//main.js 中的 new Vue
  8415. return vm
  8416. }
  8417. if (vm.mpType === 'app') {
  8418. vm.$options.render = createEmptyRender;
  8419. }
  8420. if (!vm.$options.render) {
  8421. vm.$options.render = createEmptyRender;
  8422. if (true) {
  8423. /* istanbul ignore if */
  8424. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8425. vm.$options.el || el) {
  8426. warn(
  8427. 'You are using the runtime-only build of Vue where the template ' +
  8428. 'compiler is not available. Either pre-compile the templates into ' +
  8429. 'render functions, or use the compiler-included build.',
  8430. vm
  8431. );
  8432. } else {
  8433. warn(
  8434. 'Failed to mount component: template or render function not defined.',
  8435. vm
  8436. );
  8437. }
  8438. }
  8439. }
  8440. !vm._$fallback && callHook(vm, 'beforeMount');
  8441. var updateComponent = function () {
  8442. vm._update(vm._render(), hydrating);
  8443. };
  8444. // we set this to vm._watcher inside the watcher's constructor
  8445. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8446. // component's mounted hook), which relies on vm._watcher being already defined
  8447. new Watcher(vm, updateComponent, noop, {
  8448. before: function before() {
  8449. if (vm._isMounted && !vm._isDestroyed) {
  8450. callHook(vm, 'beforeUpdate');
  8451. }
  8452. }
  8453. }, true /* isRenderWatcher */);
  8454. hydrating = false;
  8455. return vm
  8456. }
  8457. /* */
  8458. function renderClass (
  8459. staticClass,
  8460. dynamicClass
  8461. ) {
  8462. if (isDef(staticClass) || isDef(dynamicClass)) {
  8463. return concat(staticClass, stringifyClass(dynamicClass))
  8464. }
  8465. /* istanbul ignore next */
  8466. return ''
  8467. }
  8468. function concat (a, b) {
  8469. return a ? b ? (a + ' ' + b) : a : (b || '')
  8470. }
  8471. function stringifyClass (value) {
  8472. if (Array.isArray(value)) {
  8473. return stringifyArray(value)
  8474. }
  8475. if (isObject(value)) {
  8476. return stringifyObject(value)
  8477. }
  8478. if (typeof value === 'string') {
  8479. return value
  8480. }
  8481. /* istanbul ignore next */
  8482. return ''
  8483. }
  8484. function stringifyArray (value) {
  8485. var res = '';
  8486. var stringified;
  8487. for (var i = 0, l = value.length; i < l; i++) {
  8488. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8489. if (res) { res += ' '; }
  8490. res += stringified;
  8491. }
  8492. }
  8493. return res
  8494. }
  8495. function stringifyObject (value) {
  8496. var res = '';
  8497. for (var key in value) {
  8498. if (value[key]) {
  8499. if (res) { res += ' '; }
  8500. res += key;
  8501. }
  8502. }
  8503. return res
  8504. }
  8505. /* */
  8506. var parseStyleText = cached(function (cssText) {
  8507. var res = {};
  8508. var listDelimiter = /;(?![^(]*\))/g;
  8509. var propertyDelimiter = /:(.+)/;
  8510. cssText.split(listDelimiter).forEach(function (item) {
  8511. if (item) {
  8512. var tmp = item.split(propertyDelimiter);
  8513. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8514. }
  8515. });
  8516. return res
  8517. });
  8518. // normalize possible array / string values into Object
  8519. function normalizeStyleBinding (bindingStyle) {
  8520. if (Array.isArray(bindingStyle)) {
  8521. return toObject(bindingStyle)
  8522. }
  8523. if (typeof bindingStyle === 'string') {
  8524. return parseStyleText(bindingStyle)
  8525. }
  8526. return bindingStyle
  8527. }
  8528. /* */
  8529. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8530. function getTarget(obj, path) {
  8531. var parts = path.split('.');
  8532. var key = parts[0];
  8533. if (key.indexOf('__$n') === 0) { //number index
  8534. key = parseInt(key.replace('__$n', ''));
  8535. }
  8536. if (parts.length === 1) {
  8537. return obj[key]
  8538. }
  8539. return getTarget(obj[key], parts.slice(1).join('.'))
  8540. }
  8541. function internalMixin(Vue) {
  8542. Vue.config.errorHandler = function(err, vm, info) {
  8543. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8544. console.error(err);
  8545. /* eslint-disable no-undef */
  8546. var app = typeof getApp === 'function' && getApp();
  8547. if (app && app.onError) {
  8548. app.onError(err);
  8549. }
  8550. };
  8551. var oldEmit = Vue.prototype.$emit;
  8552. Vue.prototype.$emit = function(event) {
  8553. if (this.$scope && event) {
  8554. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8555. if (triggerEvent) {
  8556. try {
  8557. triggerEvent.call(this.$scope, event, {
  8558. __args__: toArray(arguments, 1)
  8559. });
  8560. } catch (error) {
  8561. }
  8562. }
  8563. }
  8564. return oldEmit.apply(this, arguments)
  8565. };
  8566. Vue.prototype.$nextTick = function(fn) {
  8567. return nextTick$1(this, fn)
  8568. };
  8569. MP_METHODS.forEach(function (method) {
  8570. Vue.prototype[method] = function(args) {
  8571. if (this.$scope && this.$scope[method]) {
  8572. return this.$scope[method](args)
  8573. }
  8574. // mp-alipay
  8575. if (typeof my === 'undefined') {
  8576. return
  8577. }
  8578. if (method === 'createSelectorQuery') {
  8579. /* eslint-disable no-undef */
  8580. return my.createSelectorQuery(args)
  8581. } else if (method === 'createIntersectionObserver') {
  8582. /* eslint-disable no-undef */
  8583. return my.createIntersectionObserver(args)
  8584. }
  8585. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8586. };
  8587. });
  8588. Vue.prototype.__init_provide = initProvide;
  8589. Vue.prototype.__init_injections = initInjections;
  8590. Vue.prototype.__call_hook = function(hook, args) {
  8591. var vm = this;
  8592. // #7573 disable dep collection when invoking lifecycle hooks
  8593. pushTarget();
  8594. var handlers = vm.$options[hook];
  8595. var info = hook + " hook";
  8596. var ret;
  8597. if (handlers) {
  8598. for (var i = 0, j = handlers.length; i < j; i++) {
  8599. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8600. }
  8601. }
  8602. if (vm._hasHookEvent) {
  8603. vm.$emit('hook:' + hook, args);
  8604. }
  8605. popTarget();
  8606. return ret
  8607. };
  8608. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8609. if (Array.isArray(modifiers)) {
  8610. if (modifiers.indexOf('trim') !== -1) {
  8611. value = value.trim();
  8612. }
  8613. if (modifiers.indexOf('number') !== -1) {
  8614. value = this._n(value);
  8615. }
  8616. }
  8617. if (!target) {
  8618. target = this;
  8619. }
  8620. // 解决动态属性添加
  8621. Vue.set(target, key, value);
  8622. };
  8623. Vue.prototype.__set_sync = function(target, key, value) {
  8624. if (!target) {
  8625. target = this;
  8626. }
  8627. // 解决动态属性添加
  8628. Vue.set(target, key, value);
  8629. };
  8630. Vue.prototype.__get_orig = function(item) {
  8631. if (isPlainObject(item)) {
  8632. return item['$orig'] || item
  8633. }
  8634. return item
  8635. };
  8636. Vue.prototype.__get_value = function(dataPath, target) {
  8637. return getTarget(target || this, dataPath)
  8638. };
  8639. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8640. return renderClass(staticClass, dynamicClass)
  8641. };
  8642. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8643. if (!dynamicStyle && !staticStyle) {
  8644. return ''
  8645. }
  8646. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8647. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8648. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8649. };
  8650. Vue.prototype.__map = function(val, iteratee) {
  8651. //TODO 暂不考虑 string
  8652. var ret, i, l, keys, key;
  8653. if (Array.isArray(val)) {
  8654. ret = new Array(val.length);
  8655. for (i = 0, l = val.length; i < l; i++) {
  8656. ret[i] = iteratee(val[i], i);
  8657. }
  8658. return ret
  8659. } else if (isObject(val)) {
  8660. keys = Object.keys(val);
  8661. ret = Object.create(null);
  8662. for (i = 0, l = keys.length; i < l; i++) {
  8663. key = keys[i];
  8664. ret[key] = iteratee(val[key], key, i);
  8665. }
  8666. return ret
  8667. } else if (typeof val === 'number') {
  8668. ret = new Array(val);
  8669. for (i = 0, l = val; i < l; i++) {
  8670. // 第一个参数暂时仍和小程序一致
  8671. ret[i] = iteratee(i, i);
  8672. }
  8673. return ret
  8674. }
  8675. return []
  8676. };
  8677. }
  8678. /* */
  8679. var LIFECYCLE_HOOKS$1 = [
  8680. //App
  8681. 'onLaunch',
  8682. 'onShow',
  8683. 'onHide',
  8684. 'onUniNViewMessage',
  8685. 'onPageNotFound',
  8686. 'onThemeChange',
  8687. 'onError',
  8688. 'onUnhandledRejection',
  8689. //Page
  8690. 'onInit',
  8691. 'onLoad',
  8692. // 'onShow',
  8693. 'onReady',
  8694. // 'onHide',
  8695. 'onUnload',
  8696. 'onPullDownRefresh',
  8697. 'onReachBottom',
  8698. 'onTabItemTap',
  8699. 'onAddToFavorites',
  8700. 'onShareTimeline',
  8701. 'onShareAppMessage',
  8702. 'onResize',
  8703. 'onPageScroll',
  8704. 'onNavigationBarButtonTap',
  8705. 'onBackPress',
  8706. 'onNavigationBarSearchInputChanged',
  8707. 'onNavigationBarSearchInputConfirmed',
  8708. 'onNavigationBarSearchInputClicked',
  8709. //Component
  8710. // 'onReady', // 兼容旧版本,应该移除该事件
  8711. 'onPageShow',
  8712. 'onPageHide',
  8713. 'onPageResize',
  8714. 'onUploadDouyinVideo'
  8715. ];
  8716. function lifecycleMixin$1(Vue) {
  8717. //fixed vue-class-component
  8718. var oldExtend = Vue.extend;
  8719. Vue.extend = function(extendOptions) {
  8720. extendOptions = extendOptions || {};
  8721. var methods = extendOptions.methods;
  8722. if (methods) {
  8723. Object.keys(methods).forEach(function (methodName) {
  8724. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8725. extendOptions[methodName] = methods[methodName];
  8726. delete methods[methodName];
  8727. }
  8728. });
  8729. }
  8730. return oldExtend.call(this, extendOptions)
  8731. };
  8732. var strategies = Vue.config.optionMergeStrategies;
  8733. var mergeHook = strategies.created;
  8734. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8735. strategies[hook] = mergeHook;
  8736. });
  8737. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8738. }
  8739. /* */
  8740. // install platform patch function
  8741. Vue.prototype.__patch__ = patch;
  8742. // public mount method
  8743. Vue.prototype.$mount = function(
  8744. el ,
  8745. hydrating
  8746. ) {
  8747. return mountComponent$1(this, el, hydrating)
  8748. };
  8749. lifecycleMixin$1(Vue);
  8750. internalMixin(Vue);
  8751. /* */
  8752. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8753. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8754. /***/ }),
  8755. /* 26 */
  8756. /*!*****************************************!*\
  8757. !*** D:/project/项目模板/uniapp/pages.json ***!
  8758. \*****************************************/
  8759. /*! no static exports found */
  8760. /***/ (function(module, exports) {
  8761. /***/ }),
  8762. /* 27 */,
  8763. /* 28 */,
  8764. /* 29 */,
  8765. /* 30 */,
  8766. /* 31 */,
  8767. /* 32 */
  8768. /*!**********************************************************************************************************!*\
  8769. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8770. \**********************************************************************************************************/
  8771. /*! exports provided: default */
  8772. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8773. "use strict";
  8774. __webpack_require__.r(__webpack_exports__);
  8775. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8776. /* globals __VUE_SSR_CONTEXT__ */
  8777. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8778. // This module is a runtime utility for cleaner component module output and will
  8779. // be included in the final webpack user bundle.
  8780. function normalizeComponent (
  8781. scriptExports,
  8782. render,
  8783. staticRenderFns,
  8784. functionalTemplate,
  8785. injectStyles,
  8786. scopeId,
  8787. moduleIdentifier, /* server only */
  8788. shadowMode, /* vue-cli only */
  8789. components, // fixed by xxxxxx auto components
  8790. renderjs // fixed by xxxxxx renderjs
  8791. ) {
  8792. // Vue.extend constructor export interop
  8793. var options = typeof scriptExports === 'function'
  8794. ? scriptExports.options
  8795. : scriptExports
  8796. // fixed by xxxxxx auto components
  8797. if (components) {
  8798. if (!options.components) {
  8799. options.components = {}
  8800. }
  8801. var hasOwn = Object.prototype.hasOwnProperty
  8802. for (var name in components) {
  8803. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8804. options.components[name] = components[name]
  8805. }
  8806. }
  8807. }
  8808. // fixed by xxxxxx renderjs
  8809. if (renderjs) {
  8810. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8811. this[renderjs.__module] = this
  8812. });
  8813. (options.mixins || (options.mixins = [])).push(renderjs)
  8814. }
  8815. // render functions
  8816. if (render) {
  8817. options.render = render
  8818. options.staticRenderFns = staticRenderFns
  8819. options._compiled = true
  8820. }
  8821. // functional template
  8822. if (functionalTemplate) {
  8823. options.functional = true
  8824. }
  8825. // scopedId
  8826. if (scopeId) {
  8827. options._scopeId = 'data-v-' + scopeId
  8828. }
  8829. var hook
  8830. if (moduleIdentifier) { // server build
  8831. hook = function (context) {
  8832. // 2.3 injection
  8833. context =
  8834. context || // cached call
  8835. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8836. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8837. // 2.2 with runInNewContext: true
  8838. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8839. context = __VUE_SSR_CONTEXT__
  8840. }
  8841. // inject component styles
  8842. if (injectStyles) {
  8843. injectStyles.call(this, context)
  8844. }
  8845. // register component module identifier for async chunk inferrence
  8846. if (context && context._registeredComponents) {
  8847. context._registeredComponents.add(moduleIdentifier)
  8848. }
  8849. }
  8850. // used by ssr in case component is cached and beforeCreate
  8851. // never gets called
  8852. options._ssrRegister = hook
  8853. } else if (injectStyles) {
  8854. hook = shadowMode
  8855. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8856. : injectStyles
  8857. }
  8858. if (hook) {
  8859. if (options.functional) {
  8860. // for template-only hot-reload because in that case the render fn doesn't
  8861. // go through the normalizer
  8862. options._injectStyles = hook
  8863. // register for functioal component in vue file
  8864. var originalRender = options.render
  8865. options.render = function renderWithStyleInjection (h, context) {
  8866. hook.call(context)
  8867. return originalRender(h, context)
  8868. }
  8869. } else {
  8870. // inject component registration as beforeCreate hook
  8871. var existing = options.beforeCreate
  8872. options.beforeCreate = existing
  8873. ? [].concat(existing, hook)
  8874. : [hook]
  8875. }
  8876. }
  8877. return {
  8878. exports: scriptExports,
  8879. options: options
  8880. }
  8881. }
  8882. /***/ }),
  8883. /* 33 */
  8884. /*!***********************************************!*\
  8885. !*** D:/project/项目模板/uniapp/common/config.js ***!
  8886. \***********************************************/
  8887. /*! no static exports found */
  8888. /***/ (function(module, exports, __webpack_require__) {
  8889. "use strict";
  8890. /* WEBPACK VAR INJECTION */(function(uni) {
  8891. Object.defineProperty(exports, "__esModule", {
  8892. value: true
  8893. });
  8894. exports.default = void 0;
  8895. var _default = {
  8896. // 接口地址
  8897. serverUrl: "http://47.93.34.200",
  8898. //http://47.93.34.200 http://www.freeskyghw.cn http://192.168.1.144:10102
  8899. wechatUrl: "http://47.93.34.200",
  8900. // 设备信息
  8901. system: uni.getSystemInfoSync(),
  8902. // 节目类型
  8903. pro_type: [
  8904. //
  8905. {
  8906. dict_label: '电视节目',
  8907. dict_value: '0'
  8908. }, {
  8909. dict_label: '电影节目',
  8910. dict_value: '1'
  8911. }]
  8912. };
  8913. exports.default = _default;
  8914. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  8915. /***/ }),
  8916. /* 34 */
  8917. /*!********************************************!*\
  8918. !*** D:/project/项目模板/uniapp/common/api.js ***!
  8919. \********************************************/
  8920. /*! no static exports found */
  8921. /***/ (function(module, exports, __webpack_require__) {
  8922. "use strict";
  8923. /* WEBPACK VAR INJECTION */(function(uni) {
  8924. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8925. Object.defineProperty(exports, "__esModule", {
  8926. value: true
  8927. });
  8928. exports.requestFile = exports.requestBase = void 0;
  8929. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 35));
  8930. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 37));
  8931. var _config = _interopRequireDefault(__webpack_require__(/*! ../common/config */ 33));
  8932. var getDomain = function getDomain(uri, type) {
  8933. var serverUrl = _config.default.serverUrl,
  8934. wechatUrl = _config.default.wechatUrl;
  8935. // 自定义
  8936. if (uri.includes("http")) return uri;
  8937. // 微信
  8938. if (uri.startsWith("/wechat/api")) return wechatUrl + uri;
  8939. // 地址前缀
  8940. else if (type) return serverUrl + "/projectadmin/".concat(type, "/api/") + uri;
  8941. // 常规
  8942. return serverUrl + "/projectadmin/api/" + uri;
  8943. };
  8944. // 常规请求
  8945. var requestBase = /*#__PURE__*/function () {
  8946. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(uri) {
  8947. var method,
  8948. data,
  8949. type,
  8950. baseUrl,
  8951. header,
  8952. token,
  8953. _args = arguments;
  8954. return _regenerator.default.wrap(function _callee$(_context) {
  8955. while (1) {
  8956. switch (_context.prev = _context.next) {
  8957. case 0:
  8958. method = _args.length > 1 && _args[1] !== undefined ? _args[1] : "GET";
  8959. data = _args.length > 2 ? _args[2] : undefined;
  8960. type = _args.length > 3 ? _args[3] : undefined;
  8961. // 请求地址
  8962. baseUrl = getDomain(uri, type); // 请求头
  8963. header = {}; // 用户信息
  8964. token = "";
  8965. if (token) header.token = token;
  8966. return _context.abrupt("return", new Promise(function (resolve, reject) {
  8967. uni.request({
  8968. url: baseUrl,
  8969. method: method,
  8970. data: data,
  8971. header: header,
  8972. success: function success(res) {
  8973. return toResolve(resolve, res);
  8974. },
  8975. fail: function fail(err) {
  8976. console.log(err);
  8977. }
  8978. });
  8979. }));
  8980. case 8:
  8981. case "end":
  8982. return _context.stop();
  8983. }
  8984. }
  8985. }, _callee);
  8986. }));
  8987. return function requestBase(_x) {
  8988. return _ref.apply(this, arguments);
  8989. };
  8990. }();
  8991. // 图片请求
  8992. exports.requestBase = requestBase;
  8993. var requestFile = function requestFile(uri, method, data, type) {
  8994. // 请求地址
  8995. var baseUrl = getDomain(uri, type);
  8996. return new Promise(function (resolve, reject) {
  8997. uni.uploadFile({
  8998. url: "https://broadcast.waityou24.cn/".concat(uri),
  8999. filePath: data,
  9000. name: 'file',
  9001. formData: {},
  9002. success: function success(res) {
  9003. return toResolve(resolve, res);
  9004. },
  9005. error: function error(e) {
  9006. return toReject(reject, e);
  9007. }
  9008. });
  9009. });
  9010. };
  9011. exports.requestFile = requestFile;
  9012. var toResolve = function toResolve(resolve, result) {
  9013. if (result.statusCode === 200) resolve(result.data);
  9014. };
  9015. var toReject = function toReject(reject, result) {
  9016. reject(result);
  9017. };
  9018. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9019. /***/ }),
  9020. /* 35 */
  9021. /*!************************************************************************************************!*\
  9022. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  9023. \************************************************************************************************/
  9024. /*! no static exports found */
  9025. /***/ (function(module, exports, __webpack_require__) {
  9026. // TODO(Babel 8): Remove this file.
  9027. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 36)();
  9028. module.exports = runtime;
  9029. /***/ }),
  9030. /* 36 */
  9031. /*!*******************************************************************!*\
  9032. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  9033. \*******************************************************************/
  9034. /*! no static exports found */
  9035. /***/ (function(module, exports, __webpack_require__) {
  9036. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  9037. function _regeneratorRuntime() {
  9038. "use strict";
  9039. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  9040. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  9041. return exports;
  9042. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9043. var exports = {},
  9044. Op = Object.prototype,
  9045. hasOwn = Op.hasOwnProperty,
  9046. defineProperty = Object.defineProperty || function (obj, key, desc) {
  9047. obj[key] = desc.value;
  9048. },
  9049. $Symbol = "function" == typeof Symbol ? Symbol : {},
  9050. iteratorSymbol = $Symbol.iterator || "@@iterator",
  9051. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  9052. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  9053. function define(obj, key, value) {
  9054. return Object.defineProperty(obj, key, {
  9055. value: value,
  9056. enumerable: !0,
  9057. configurable: !0,
  9058. writable: !0
  9059. }), obj[key];
  9060. }
  9061. try {
  9062. define({}, "");
  9063. } catch (err) {
  9064. define = function define(obj, key, value) {
  9065. return obj[key] = value;
  9066. };
  9067. }
  9068. function wrap(innerFn, outerFn, self, tryLocsList) {
  9069. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  9070. generator = Object.create(protoGenerator.prototype),
  9071. context = new Context(tryLocsList || []);
  9072. return defineProperty(generator, "_invoke", {
  9073. value: makeInvokeMethod(innerFn, self, context)
  9074. }), generator;
  9075. }
  9076. function tryCatch(fn, obj, arg) {
  9077. try {
  9078. return {
  9079. type: "normal",
  9080. arg: fn.call(obj, arg)
  9081. };
  9082. } catch (err) {
  9083. return {
  9084. type: "throw",
  9085. arg: err
  9086. };
  9087. }
  9088. }
  9089. exports.wrap = wrap;
  9090. var ContinueSentinel = {};
  9091. function Generator() {}
  9092. function GeneratorFunction() {}
  9093. function GeneratorFunctionPrototype() {}
  9094. var IteratorPrototype = {};
  9095. define(IteratorPrototype, iteratorSymbol, function () {
  9096. return this;
  9097. });
  9098. var getProto = Object.getPrototypeOf,
  9099. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  9100. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  9101. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  9102. function defineIteratorMethods(prototype) {
  9103. ["next", "throw", "return"].forEach(function (method) {
  9104. define(prototype, method, function (arg) {
  9105. return this._invoke(method, arg);
  9106. });
  9107. });
  9108. }
  9109. function AsyncIterator(generator, PromiseImpl) {
  9110. function invoke(method, arg, resolve, reject) {
  9111. var record = tryCatch(generator[method], generator, arg);
  9112. if ("throw" !== record.type) {
  9113. var result = record.arg,
  9114. value = result.value;
  9115. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  9116. invoke("next", value, resolve, reject);
  9117. }, function (err) {
  9118. invoke("throw", err, resolve, reject);
  9119. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  9120. result.value = unwrapped, resolve(result);
  9121. }, function (error) {
  9122. return invoke("throw", error, resolve, reject);
  9123. });
  9124. }
  9125. reject(record.arg);
  9126. }
  9127. var previousPromise;
  9128. defineProperty(this, "_invoke", {
  9129. value: function value(method, arg) {
  9130. function callInvokeWithMethodAndArg() {
  9131. return new PromiseImpl(function (resolve, reject) {
  9132. invoke(method, arg, resolve, reject);
  9133. });
  9134. }
  9135. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  9136. }
  9137. });
  9138. }
  9139. function makeInvokeMethod(innerFn, self, context) {
  9140. var state = "suspendedStart";
  9141. return function (method, arg) {
  9142. if ("executing" === state) throw new Error("Generator is already running");
  9143. if ("completed" === state) {
  9144. if ("throw" === method) throw arg;
  9145. return doneResult();
  9146. }
  9147. for (context.method = method, context.arg = arg;;) {
  9148. var delegate = context.delegate;
  9149. if (delegate) {
  9150. var delegateResult = maybeInvokeDelegate(delegate, context);
  9151. if (delegateResult) {
  9152. if (delegateResult === ContinueSentinel) continue;
  9153. return delegateResult;
  9154. }
  9155. }
  9156. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  9157. if ("suspendedStart" === state) throw state = "completed", context.arg;
  9158. context.dispatchException(context.arg);
  9159. } else "return" === context.method && context.abrupt("return", context.arg);
  9160. state = "executing";
  9161. var record = tryCatch(innerFn, self, context);
  9162. if ("normal" === record.type) {
  9163. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  9164. return {
  9165. value: record.arg,
  9166. done: context.done
  9167. };
  9168. }
  9169. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  9170. }
  9171. };
  9172. }
  9173. function maybeInvokeDelegate(delegate, context) {
  9174. var methodName = context.method,
  9175. method = delegate.iterator[methodName];
  9176. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  9177. var record = tryCatch(method, delegate.iterator, context.arg);
  9178. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  9179. var info = record.arg;
  9180. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  9181. }
  9182. function pushTryEntry(locs) {
  9183. var entry = {
  9184. tryLoc: locs[0]
  9185. };
  9186. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  9187. }
  9188. function resetTryEntry(entry) {
  9189. var record = entry.completion || {};
  9190. record.type = "normal", delete record.arg, entry.completion = record;
  9191. }
  9192. function Context(tryLocsList) {
  9193. this.tryEntries = [{
  9194. tryLoc: "root"
  9195. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  9196. }
  9197. function values(iterable) {
  9198. if (iterable) {
  9199. var iteratorMethod = iterable[iteratorSymbol];
  9200. if (iteratorMethod) return iteratorMethod.call(iterable);
  9201. if ("function" == typeof iterable.next) return iterable;
  9202. if (!isNaN(iterable.length)) {
  9203. var i = -1,
  9204. next = function next() {
  9205. for (; ++i < iterable.length;) {
  9206. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  9207. }
  9208. return next.value = undefined, next.done = !0, next;
  9209. };
  9210. return next.next = next;
  9211. }
  9212. }
  9213. return {
  9214. next: doneResult
  9215. };
  9216. }
  9217. function doneResult() {
  9218. return {
  9219. value: undefined,
  9220. done: !0
  9221. };
  9222. }
  9223. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  9224. value: GeneratorFunctionPrototype,
  9225. configurable: !0
  9226. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  9227. value: GeneratorFunction,
  9228. configurable: !0
  9229. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  9230. var ctor = "function" == typeof genFun && genFun.constructor;
  9231. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  9232. }, exports.mark = function (genFun) {
  9233. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  9234. }, exports.awrap = function (arg) {
  9235. return {
  9236. __await: arg
  9237. };
  9238. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  9239. return this;
  9240. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  9241. void 0 === PromiseImpl && (PromiseImpl = Promise);
  9242. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  9243. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  9244. return result.done ? result.value : iter.next();
  9245. });
  9246. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  9247. return this;
  9248. }), define(Gp, "toString", function () {
  9249. return "[object Generator]";
  9250. }), exports.keys = function (val) {
  9251. var object = Object(val),
  9252. keys = [];
  9253. for (var key in object) {
  9254. keys.push(key);
  9255. }
  9256. return keys.reverse(), function next() {
  9257. for (; keys.length;) {
  9258. var key = keys.pop();
  9259. if (key in object) return next.value = key, next.done = !1, next;
  9260. }
  9261. return next.done = !0, next;
  9262. };
  9263. }, exports.values = values, Context.prototype = {
  9264. constructor: Context,
  9265. reset: function reset(skipTempReset) {
  9266. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  9267. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  9268. }
  9269. },
  9270. stop: function stop() {
  9271. this.done = !0;
  9272. var rootRecord = this.tryEntries[0].completion;
  9273. if ("throw" === rootRecord.type) throw rootRecord.arg;
  9274. return this.rval;
  9275. },
  9276. dispatchException: function dispatchException(exception) {
  9277. if (this.done) throw exception;
  9278. var context = this;
  9279. function handle(loc, caught) {
  9280. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  9281. }
  9282. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9283. var entry = this.tryEntries[i],
  9284. record = entry.completion;
  9285. if ("root" === entry.tryLoc) return handle("end");
  9286. if (entry.tryLoc <= this.prev) {
  9287. var hasCatch = hasOwn.call(entry, "catchLoc"),
  9288. hasFinally = hasOwn.call(entry, "finallyLoc");
  9289. if (hasCatch && hasFinally) {
  9290. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  9291. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  9292. } else if (hasCatch) {
  9293. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  9294. } else {
  9295. if (!hasFinally) throw new Error("try statement without catch or finally");
  9296. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  9297. }
  9298. }
  9299. }
  9300. },
  9301. abrupt: function abrupt(type, arg) {
  9302. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9303. var entry = this.tryEntries[i];
  9304. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  9305. var finallyEntry = entry;
  9306. break;
  9307. }
  9308. }
  9309. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  9310. var record = finallyEntry ? finallyEntry.completion : {};
  9311. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  9312. },
  9313. complete: function complete(record, afterLoc) {
  9314. if ("throw" === record.type) throw record.arg;
  9315. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  9316. },
  9317. finish: function finish(finallyLoc) {
  9318. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9319. var entry = this.tryEntries[i];
  9320. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  9321. }
  9322. },
  9323. "catch": function _catch(tryLoc) {
  9324. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9325. var entry = this.tryEntries[i];
  9326. if (entry.tryLoc === tryLoc) {
  9327. var record = entry.completion;
  9328. if ("throw" === record.type) {
  9329. var thrown = record.arg;
  9330. resetTryEntry(entry);
  9331. }
  9332. return thrown;
  9333. }
  9334. }
  9335. throw new Error("illegal catch attempt");
  9336. },
  9337. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  9338. return this.delegate = {
  9339. iterator: values(iterable),
  9340. resultName: resultName,
  9341. nextLoc: nextLoc
  9342. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  9343. }
  9344. }, exports;
  9345. }
  9346. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9347. /***/ }),
  9348. /* 37 */
  9349. /*!*****************************************************************!*\
  9350. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  9351. \*****************************************************************/
  9352. /*! no static exports found */
  9353. /***/ (function(module, exports) {
  9354. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  9355. try {
  9356. var info = gen[key](arg);
  9357. var value = info.value;
  9358. } catch (error) {
  9359. reject(error);
  9360. return;
  9361. }
  9362. if (info.done) {
  9363. resolve(value);
  9364. } else {
  9365. Promise.resolve(value).then(_next, _throw);
  9366. }
  9367. }
  9368. function _asyncToGenerator(fn) {
  9369. return function () {
  9370. var self = this,
  9371. args = arguments;
  9372. return new Promise(function (resolve, reject) {
  9373. var gen = fn.apply(self, args);
  9374. function _next(value) {
  9375. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  9376. }
  9377. function _throw(err) {
  9378. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  9379. }
  9380. _next(undefined);
  9381. });
  9382. };
  9383. }
  9384. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9385. /***/ }),
  9386. /* 38 */,
  9387. /* 39 */,
  9388. /* 40 */,
  9389. /* 41 */,
  9390. /* 42 */,
  9391. /* 43 */,
  9392. /* 44 */,
  9393. /* 45 */,
  9394. /* 46 */,
  9395. /* 47 */,
  9396. /* 48 */,
  9397. /* 49 */,
  9398. /* 50 */,
  9399. /* 51 */,
  9400. /* 52 */,
  9401. /* 53 */,
  9402. /* 54 */,
  9403. /* 55 */,
  9404. /* 56 */,
  9405. /* 57 */,
  9406. /* 58 */,
  9407. /* 59 */,
  9408. /* 60 */,
  9409. /* 61 */,
  9410. /* 62 */,
  9411. /* 63 */,
  9412. /* 64 */,
  9413. /* 65 */,
  9414. /* 66 */,
  9415. /* 67 */,
  9416. /* 68 */,
  9417. /* 69 */,
  9418. /* 70 */,
  9419. /* 71 */,
  9420. /* 72 */,
  9421. /* 73 */,
  9422. /* 74 */,
  9423. /* 75 */,
  9424. /* 76 */,
  9425. /* 77 */,
  9426. /* 78 */,
  9427. /* 79 */,
  9428. /* 80 */,
  9429. /* 81 */,
  9430. /* 82 */,
  9431. /* 83 */,
  9432. /* 84 */,
  9433. /* 85 */,
  9434. /* 86 */,
  9435. /* 87 */,
  9436. /* 88 */,
  9437. /* 89 */,
  9438. /* 90 */,
  9439. /* 91 */,
  9440. /* 92 */,
  9441. /* 93 */,
  9442. /* 94 */,
  9443. /* 95 */,
  9444. /* 96 */,
  9445. /* 97 */,
  9446. /* 98 */,
  9447. /* 99 */,
  9448. /* 100 */,
  9449. /* 101 */,
  9450. /* 102 */,
  9451. /* 103 */,
  9452. /* 104 */
  9453. /*!**********************************************************************************!*\
  9454. !*** D:/project/项目模板/uniapp/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  9455. \**********************************************************************************/
  9456. /*! no static exports found */
  9457. /***/ (function(module, exports, __webpack_require__) {
  9458. "use strict";
  9459. Object.defineProperty(exports, "__esModule", {
  9460. value: true
  9461. });
  9462. exports.default = void 0;
  9463. var _default = {
  9464. "id": "2852637",
  9465. "name": "uniui图标库",
  9466. "font_family": "uniicons",
  9467. "css_prefix_text": "uniui-",
  9468. "description": "",
  9469. "glyphs": [{
  9470. "icon_id": "25027049",
  9471. "name": "yanse",
  9472. "font_class": "color",
  9473. "unicode": "e6cf",
  9474. "unicode_decimal": 59087
  9475. }, {
  9476. "icon_id": "25027048",
  9477. "name": "wallet",
  9478. "font_class": "wallet",
  9479. "unicode": "e6b1",
  9480. "unicode_decimal": 59057
  9481. }, {
  9482. "icon_id": "25015720",
  9483. "name": "settings-filled",
  9484. "font_class": "settings-filled",
  9485. "unicode": "e6ce",
  9486. "unicode_decimal": 59086
  9487. }, {
  9488. "icon_id": "25015434",
  9489. "name": "shimingrenzheng-filled",
  9490. "font_class": "auth-filled",
  9491. "unicode": "e6cc",
  9492. "unicode_decimal": 59084
  9493. }, {
  9494. "icon_id": "24934246",
  9495. "name": "shop-filled",
  9496. "font_class": "shop-filled",
  9497. "unicode": "e6cd",
  9498. "unicode_decimal": 59085
  9499. }, {
  9500. "icon_id": "24934159",
  9501. "name": "staff-filled-01",
  9502. "font_class": "staff-filled",
  9503. "unicode": "e6cb",
  9504. "unicode_decimal": 59083
  9505. }, {
  9506. "icon_id": "24932461",
  9507. "name": "VIP-filled",
  9508. "font_class": "vip-filled",
  9509. "unicode": "e6c6",
  9510. "unicode_decimal": 59078
  9511. }, {
  9512. "icon_id": "24932462",
  9513. "name": "plus_circle_fill",
  9514. "font_class": "plus-filled",
  9515. "unicode": "e6c7",
  9516. "unicode_decimal": 59079
  9517. }, {
  9518. "icon_id": "24932463",
  9519. "name": "folder_add-filled",
  9520. "font_class": "folder-add-filled",
  9521. "unicode": "e6c8",
  9522. "unicode_decimal": 59080
  9523. }, {
  9524. "icon_id": "24932464",
  9525. "name": "yanse-filled",
  9526. "font_class": "color-filled",
  9527. "unicode": "e6c9",
  9528. "unicode_decimal": 59081
  9529. }, {
  9530. "icon_id": "24932465",
  9531. "name": "tune-filled",
  9532. "font_class": "tune-filled",
  9533. "unicode": "e6ca",
  9534. "unicode_decimal": 59082
  9535. }, {
  9536. "icon_id": "24932455",
  9537. "name": "a-rilidaka-filled",
  9538. "font_class": "calendar-filled",
  9539. "unicode": "e6c0",
  9540. "unicode_decimal": 59072
  9541. }, {
  9542. "icon_id": "24932456",
  9543. "name": "notification-filled",
  9544. "font_class": "notification-filled",
  9545. "unicode": "e6c1",
  9546. "unicode_decimal": 59073
  9547. }, {
  9548. "icon_id": "24932457",
  9549. "name": "wallet-filled",
  9550. "font_class": "wallet-filled",
  9551. "unicode": "e6c2",
  9552. "unicode_decimal": 59074
  9553. }, {
  9554. "icon_id": "24932458",
  9555. "name": "paihangbang-filled",
  9556. "font_class": "medal-filled",
  9557. "unicode": "e6c3",
  9558. "unicode_decimal": 59075
  9559. }, {
  9560. "icon_id": "24932459",
  9561. "name": "gift-filled",
  9562. "font_class": "gift-filled",
  9563. "unicode": "e6c4",
  9564. "unicode_decimal": 59076
  9565. }, {
  9566. "icon_id": "24932460",
  9567. "name": "fire-filled",
  9568. "font_class": "fire-filled",
  9569. "unicode": "e6c5",
  9570. "unicode_decimal": 59077
  9571. }, {
  9572. "icon_id": "24928001",
  9573. "name": "refreshempty",
  9574. "font_class": "refreshempty",
  9575. "unicode": "e6bf",
  9576. "unicode_decimal": 59071
  9577. }, {
  9578. "icon_id": "24926853",
  9579. "name": "location-ellipse",
  9580. "font_class": "location-filled",
  9581. "unicode": "e6af",
  9582. "unicode_decimal": 59055
  9583. }, {
  9584. "icon_id": "24926735",
  9585. "name": "person-filled",
  9586. "font_class": "person-filled",
  9587. "unicode": "e69d",
  9588. "unicode_decimal": 59037
  9589. }, {
  9590. "icon_id": "24926703",
  9591. "name": "personadd-filled",
  9592. "font_class": "personadd-filled",
  9593. "unicode": "e698",
  9594. "unicode_decimal": 59032
  9595. }, {
  9596. "icon_id": "24923351",
  9597. "name": "back",
  9598. "font_class": "back",
  9599. "unicode": "e6b9",
  9600. "unicode_decimal": 59065
  9601. }, {
  9602. "icon_id": "24923352",
  9603. "name": "forward",
  9604. "font_class": "forward",
  9605. "unicode": "e6ba",
  9606. "unicode_decimal": 59066
  9607. }, {
  9608. "icon_id": "24923353",
  9609. "name": "arrowthinright",
  9610. "font_class": "arrow-right",
  9611. "unicode": "e6bb",
  9612. "unicode_decimal": 59067
  9613. }, {
  9614. "icon_id": "24923353",
  9615. "name": "arrowthinright",
  9616. "font_class": "arrowthinright",
  9617. "unicode": "e6bb",
  9618. "unicode_decimal": 59067
  9619. }, {
  9620. "icon_id": "24923354",
  9621. "name": "arrowthinleft",
  9622. "font_class": "arrow-left",
  9623. "unicode": "e6bc",
  9624. "unicode_decimal": 59068
  9625. }, {
  9626. "icon_id": "24923354",
  9627. "name": "arrowthinleft",
  9628. "font_class": "arrowthinleft",
  9629. "unicode": "e6bc",
  9630. "unicode_decimal": 59068
  9631. }, {
  9632. "icon_id": "24923355",
  9633. "name": "arrowthinup",
  9634. "font_class": "arrow-up",
  9635. "unicode": "e6bd",
  9636. "unicode_decimal": 59069
  9637. }, {
  9638. "icon_id": "24923355",
  9639. "name": "arrowthinup",
  9640. "font_class": "arrowthinup",
  9641. "unicode": "e6bd",
  9642. "unicode_decimal": 59069
  9643. }, {
  9644. "icon_id": "24923356",
  9645. "name": "arrowthindown",
  9646. "font_class": "arrow-down",
  9647. "unicode": "e6be",
  9648. "unicode_decimal": 59070
  9649. }, {
  9650. "icon_id": "24923356",
  9651. "name": "arrowthindown",
  9652. "font_class": "arrowthindown",
  9653. "unicode": "e6be",
  9654. "unicode_decimal": 59070
  9655. }, {
  9656. "icon_id": "24923349",
  9657. "name": "arrowdown",
  9658. "font_class": "bottom",
  9659. "unicode": "e6b8",
  9660. "unicode_decimal": 59064
  9661. }, {
  9662. "icon_id": "24923349",
  9663. "name": "arrowdown",
  9664. "font_class": "arrowdown",
  9665. "unicode": "e6b8",
  9666. "unicode_decimal": 59064
  9667. }, {
  9668. "icon_id": "24923346",
  9669. "name": "arrowright",
  9670. "font_class": "right",
  9671. "unicode": "e6b5",
  9672. "unicode_decimal": 59061
  9673. }, {
  9674. "icon_id": "24923346",
  9675. "name": "arrowright",
  9676. "font_class": "arrowright",
  9677. "unicode": "e6b5",
  9678. "unicode_decimal": 59061
  9679. }, {
  9680. "icon_id": "24923347",
  9681. "name": "arrowup",
  9682. "font_class": "top",
  9683. "unicode": "e6b6",
  9684. "unicode_decimal": 59062
  9685. }, {
  9686. "icon_id": "24923347",
  9687. "name": "arrowup",
  9688. "font_class": "arrowup",
  9689. "unicode": "e6b6",
  9690. "unicode_decimal": 59062
  9691. }, {
  9692. "icon_id": "24923348",
  9693. "name": "arrowleft",
  9694. "font_class": "left",
  9695. "unicode": "e6b7",
  9696. "unicode_decimal": 59063
  9697. }, {
  9698. "icon_id": "24923348",
  9699. "name": "arrowleft",
  9700. "font_class": "arrowleft",
  9701. "unicode": "e6b7",
  9702. "unicode_decimal": 59063
  9703. }, {
  9704. "icon_id": "24923334",
  9705. "name": "eye",
  9706. "font_class": "eye",
  9707. "unicode": "e651",
  9708. "unicode_decimal": 58961
  9709. }, {
  9710. "icon_id": "24923335",
  9711. "name": "eye-filled",
  9712. "font_class": "eye-filled",
  9713. "unicode": "e66a",
  9714. "unicode_decimal": 58986
  9715. }, {
  9716. "icon_id": "24923336",
  9717. "name": "eye-slash",
  9718. "font_class": "eye-slash",
  9719. "unicode": "e6b3",
  9720. "unicode_decimal": 59059
  9721. }, {
  9722. "icon_id": "24923337",
  9723. "name": "eye-slash-filled",
  9724. "font_class": "eye-slash-filled",
  9725. "unicode": "e6b4",
  9726. "unicode_decimal": 59060
  9727. }, {
  9728. "icon_id": "24923305",
  9729. "name": "info-filled",
  9730. "font_class": "info-filled",
  9731. "unicode": "e649",
  9732. "unicode_decimal": 58953
  9733. }, {
  9734. "icon_id": "24923299",
  9735. "name": "reload-01",
  9736. "font_class": "reload",
  9737. "unicode": "e6b2",
  9738. "unicode_decimal": 59058
  9739. }, {
  9740. "icon_id": "24923195",
  9741. "name": "mic_slash_fill",
  9742. "font_class": "micoff-filled",
  9743. "unicode": "e6b0",
  9744. "unicode_decimal": 59056
  9745. }, {
  9746. "icon_id": "24923165",
  9747. "name": "map-pin-ellipse",
  9748. "font_class": "map-pin-ellipse",
  9749. "unicode": "e6ac",
  9750. "unicode_decimal": 59052
  9751. }, {
  9752. "icon_id": "24923166",
  9753. "name": "map-pin",
  9754. "font_class": "map-pin",
  9755. "unicode": "e6ad",
  9756. "unicode_decimal": 59053
  9757. }, {
  9758. "icon_id": "24923167",
  9759. "name": "location",
  9760. "font_class": "location",
  9761. "unicode": "e6ae",
  9762. "unicode_decimal": 59054
  9763. }, {
  9764. "icon_id": "24923064",
  9765. "name": "starhalf",
  9766. "font_class": "starhalf",
  9767. "unicode": "e683",
  9768. "unicode_decimal": 59011
  9769. }, {
  9770. "icon_id": "24923065",
  9771. "name": "star",
  9772. "font_class": "star",
  9773. "unicode": "e688",
  9774. "unicode_decimal": 59016
  9775. }, {
  9776. "icon_id": "24923066",
  9777. "name": "star-filled",
  9778. "font_class": "star-filled",
  9779. "unicode": "e68f",
  9780. "unicode_decimal": 59023
  9781. }, {
  9782. "icon_id": "24899646",
  9783. "name": "a-rilidaka",
  9784. "font_class": "calendar",
  9785. "unicode": "e6a0",
  9786. "unicode_decimal": 59040
  9787. }, {
  9788. "icon_id": "24899647",
  9789. "name": "fire",
  9790. "font_class": "fire",
  9791. "unicode": "e6a1",
  9792. "unicode_decimal": 59041
  9793. }, {
  9794. "icon_id": "24899648",
  9795. "name": "paihangbang",
  9796. "font_class": "medal",
  9797. "unicode": "e6a2",
  9798. "unicode_decimal": 59042
  9799. }, {
  9800. "icon_id": "24899649",
  9801. "name": "font",
  9802. "font_class": "font",
  9803. "unicode": "e6a3",
  9804. "unicode_decimal": 59043
  9805. }, {
  9806. "icon_id": "24899650",
  9807. "name": "gift",
  9808. "font_class": "gift",
  9809. "unicode": "e6a4",
  9810. "unicode_decimal": 59044
  9811. }, {
  9812. "icon_id": "24899651",
  9813. "name": "link",
  9814. "font_class": "link",
  9815. "unicode": "e6a5",
  9816. "unicode_decimal": 59045
  9817. }, {
  9818. "icon_id": "24899652",
  9819. "name": "notification",
  9820. "font_class": "notification",
  9821. "unicode": "e6a6",
  9822. "unicode_decimal": 59046
  9823. }, {
  9824. "icon_id": "24899653",
  9825. "name": "staff",
  9826. "font_class": "staff",
  9827. "unicode": "e6a7",
  9828. "unicode_decimal": 59047
  9829. }, {
  9830. "icon_id": "24899654",
  9831. "name": "VIP",
  9832. "font_class": "vip",
  9833. "unicode": "e6a8",
  9834. "unicode_decimal": 59048
  9835. }, {
  9836. "icon_id": "24899655",
  9837. "name": "folder_add",
  9838. "font_class": "folder-add",
  9839. "unicode": "e6a9",
  9840. "unicode_decimal": 59049
  9841. }, {
  9842. "icon_id": "24899656",
  9843. "name": "tune",
  9844. "font_class": "tune",
  9845. "unicode": "e6aa",
  9846. "unicode_decimal": 59050
  9847. }, {
  9848. "icon_id": "24899657",
  9849. "name": "shimingrenzheng",
  9850. "font_class": "auth",
  9851. "unicode": "e6ab",
  9852. "unicode_decimal": 59051
  9853. }, {
  9854. "icon_id": "24899565",
  9855. "name": "person",
  9856. "font_class": "person",
  9857. "unicode": "e699",
  9858. "unicode_decimal": 59033
  9859. }, {
  9860. "icon_id": "24899566",
  9861. "name": "email-filled",
  9862. "font_class": "email-filled",
  9863. "unicode": "e69a",
  9864. "unicode_decimal": 59034
  9865. }, {
  9866. "icon_id": "24899567",
  9867. "name": "phone-filled",
  9868. "font_class": "phone-filled",
  9869. "unicode": "e69b",
  9870. "unicode_decimal": 59035
  9871. }, {
  9872. "icon_id": "24899568",
  9873. "name": "phone",
  9874. "font_class": "phone",
  9875. "unicode": "e69c",
  9876. "unicode_decimal": 59036
  9877. }, {
  9878. "icon_id": "24899570",
  9879. "name": "email",
  9880. "font_class": "email",
  9881. "unicode": "e69e",
  9882. "unicode_decimal": 59038
  9883. }, {
  9884. "icon_id": "24899571",
  9885. "name": "personadd",
  9886. "font_class": "personadd",
  9887. "unicode": "e69f",
  9888. "unicode_decimal": 59039
  9889. }, {
  9890. "icon_id": "24899558",
  9891. "name": "chatboxes-filled",
  9892. "font_class": "chatboxes-filled",
  9893. "unicode": "e692",
  9894. "unicode_decimal": 59026
  9895. }, {
  9896. "icon_id": "24899559",
  9897. "name": "contact",
  9898. "font_class": "contact",
  9899. "unicode": "e693",
  9900. "unicode_decimal": 59027
  9901. }, {
  9902. "icon_id": "24899560",
  9903. "name": "chatbubble-filled",
  9904. "font_class": "chatbubble-filled",
  9905. "unicode": "e694",
  9906. "unicode_decimal": 59028
  9907. }, {
  9908. "icon_id": "24899561",
  9909. "name": "contact-filled",
  9910. "font_class": "contact-filled",
  9911. "unicode": "e695",
  9912. "unicode_decimal": 59029
  9913. }, {
  9914. "icon_id": "24899562",
  9915. "name": "chatboxes",
  9916. "font_class": "chatboxes",
  9917. "unicode": "e696",
  9918. "unicode_decimal": 59030
  9919. }, {
  9920. "icon_id": "24899563",
  9921. "name": "chatbubble",
  9922. "font_class": "chatbubble",
  9923. "unicode": "e697",
  9924. "unicode_decimal": 59031
  9925. }, {
  9926. "icon_id": "24881290",
  9927. "name": "upload-filled",
  9928. "font_class": "upload-filled",
  9929. "unicode": "e68e",
  9930. "unicode_decimal": 59022
  9931. }, {
  9932. "icon_id": "24881292",
  9933. "name": "upload",
  9934. "font_class": "upload",
  9935. "unicode": "e690",
  9936. "unicode_decimal": 59024
  9937. }, {
  9938. "icon_id": "24881293",
  9939. "name": "weixin",
  9940. "font_class": "weixin",
  9941. "unicode": "e691",
  9942. "unicode_decimal": 59025
  9943. }, {
  9944. "icon_id": "24881274",
  9945. "name": "compose",
  9946. "font_class": "compose",
  9947. "unicode": "e67f",
  9948. "unicode_decimal": 59007
  9949. }, {
  9950. "icon_id": "24881275",
  9951. "name": "qq",
  9952. "font_class": "qq",
  9953. "unicode": "e680",
  9954. "unicode_decimal": 59008
  9955. }, {
  9956. "icon_id": "24881276",
  9957. "name": "download-filled",
  9958. "font_class": "download-filled",
  9959. "unicode": "e681",
  9960. "unicode_decimal": 59009
  9961. }, {
  9962. "icon_id": "24881277",
  9963. "name": "pengyouquan",
  9964. "font_class": "pyq",
  9965. "unicode": "e682",
  9966. "unicode_decimal": 59010
  9967. }, {
  9968. "icon_id": "24881279",
  9969. "name": "sound",
  9970. "font_class": "sound",
  9971. "unicode": "e684",
  9972. "unicode_decimal": 59012
  9973. }, {
  9974. "icon_id": "24881280",
  9975. "name": "trash-filled",
  9976. "font_class": "trash-filled",
  9977. "unicode": "e685",
  9978. "unicode_decimal": 59013
  9979. }, {
  9980. "icon_id": "24881281",
  9981. "name": "sound-filled",
  9982. "font_class": "sound-filled",
  9983. "unicode": "e686",
  9984. "unicode_decimal": 59014
  9985. }, {
  9986. "icon_id": "24881282",
  9987. "name": "trash",
  9988. "font_class": "trash",
  9989. "unicode": "e687",
  9990. "unicode_decimal": 59015
  9991. }, {
  9992. "icon_id": "24881284",
  9993. "name": "videocam-filled",
  9994. "font_class": "videocam-filled",
  9995. "unicode": "e689",
  9996. "unicode_decimal": 59017
  9997. }, {
  9998. "icon_id": "24881285",
  9999. "name": "spinner-cycle",
  10000. "font_class": "spinner-cycle",
  10001. "unicode": "e68a",
  10002. "unicode_decimal": 59018
  10003. }, {
  10004. "icon_id": "24881286",
  10005. "name": "weibo",
  10006. "font_class": "weibo",
  10007. "unicode": "e68b",
  10008. "unicode_decimal": 59019
  10009. }, {
  10010. "icon_id": "24881288",
  10011. "name": "videocam",
  10012. "font_class": "videocam",
  10013. "unicode": "e68c",
  10014. "unicode_decimal": 59020
  10015. }, {
  10016. "icon_id": "24881289",
  10017. "name": "download",
  10018. "font_class": "download",
  10019. "unicode": "e68d",
  10020. "unicode_decimal": 59021
  10021. }, {
  10022. "icon_id": "24879601",
  10023. "name": "help",
  10024. "font_class": "help",
  10025. "unicode": "e679",
  10026. "unicode_decimal": 59001
  10027. }, {
  10028. "icon_id": "24879602",
  10029. "name": "navigate-filled",
  10030. "font_class": "navigate-filled",
  10031. "unicode": "e67a",
  10032. "unicode_decimal": 59002
  10033. }, {
  10034. "icon_id": "24879603",
  10035. "name": "plusempty",
  10036. "font_class": "plusempty",
  10037. "unicode": "e67b",
  10038. "unicode_decimal": 59003
  10039. }, {
  10040. "icon_id": "24879604",
  10041. "name": "smallcircle",
  10042. "font_class": "smallcircle",
  10043. "unicode": "e67c",
  10044. "unicode_decimal": 59004
  10045. }, {
  10046. "icon_id": "24879605",
  10047. "name": "minus-filled",
  10048. "font_class": "minus-filled",
  10049. "unicode": "e67d",
  10050. "unicode_decimal": 59005
  10051. }, {
  10052. "icon_id": "24879606",
  10053. "name": "micoff",
  10054. "font_class": "micoff",
  10055. "unicode": "e67e",
  10056. "unicode_decimal": 59006
  10057. }, {
  10058. "icon_id": "24879588",
  10059. "name": "closeempty",
  10060. "font_class": "closeempty",
  10061. "unicode": "e66c",
  10062. "unicode_decimal": 58988
  10063. }, {
  10064. "icon_id": "24879589",
  10065. "name": "clear",
  10066. "font_class": "clear",
  10067. "unicode": "e66d",
  10068. "unicode_decimal": 58989
  10069. }, {
  10070. "icon_id": "24879590",
  10071. "name": "navigate",
  10072. "font_class": "navigate",
  10073. "unicode": "e66e",
  10074. "unicode_decimal": 58990
  10075. }, {
  10076. "icon_id": "24879591",
  10077. "name": "minus",
  10078. "font_class": "minus",
  10079. "unicode": "e66f",
  10080. "unicode_decimal": 58991
  10081. }, {
  10082. "icon_id": "24879592",
  10083. "name": "image",
  10084. "font_class": "image",
  10085. "unicode": "e670",
  10086. "unicode_decimal": 58992
  10087. }, {
  10088. "icon_id": "24879593",
  10089. "name": "mic",
  10090. "font_class": "mic",
  10091. "unicode": "e671",
  10092. "unicode_decimal": 58993
  10093. }, {
  10094. "icon_id": "24879594",
  10095. "name": "paperplane",
  10096. "font_class": "paperplane",
  10097. "unicode": "e672",
  10098. "unicode_decimal": 58994
  10099. }, {
  10100. "icon_id": "24879595",
  10101. "name": "close",
  10102. "font_class": "close",
  10103. "unicode": "e673",
  10104. "unicode_decimal": 58995
  10105. }, {
  10106. "icon_id": "24879596",
  10107. "name": "help-filled",
  10108. "font_class": "help-filled",
  10109. "unicode": "e674",
  10110. "unicode_decimal": 58996
  10111. }, {
  10112. "icon_id": "24879597",
  10113. "name": "plus-filled",
  10114. "font_class": "paperplane-filled",
  10115. "unicode": "e675",
  10116. "unicode_decimal": 58997
  10117. }, {
  10118. "icon_id": "24879598",
  10119. "name": "plus",
  10120. "font_class": "plus",
  10121. "unicode": "e676",
  10122. "unicode_decimal": 58998
  10123. }, {
  10124. "icon_id": "24879599",
  10125. "name": "mic-filled",
  10126. "font_class": "mic-filled",
  10127. "unicode": "e677",
  10128. "unicode_decimal": 58999
  10129. }, {
  10130. "icon_id": "24879600",
  10131. "name": "image-filled",
  10132. "font_class": "image-filled",
  10133. "unicode": "e678",
  10134. "unicode_decimal": 59000
  10135. }, {
  10136. "icon_id": "24855900",
  10137. "name": "locked-filled",
  10138. "font_class": "locked-filled",
  10139. "unicode": "e668",
  10140. "unicode_decimal": 58984
  10141. }, {
  10142. "icon_id": "24855901",
  10143. "name": "info",
  10144. "font_class": "info",
  10145. "unicode": "e669",
  10146. "unicode_decimal": 58985
  10147. }, {
  10148. "icon_id": "24855903",
  10149. "name": "locked",
  10150. "font_class": "locked",
  10151. "unicode": "e66b",
  10152. "unicode_decimal": 58987
  10153. }, {
  10154. "icon_id": "24855884",
  10155. "name": "camera-filled",
  10156. "font_class": "camera-filled",
  10157. "unicode": "e658",
  10158. "unicode_decimal": 58968
  10159. }, {
  10160. "icon_id": "24855885",
  10161. "name": "chat-filled",
  10162. "font_class": "chat-filled",
  10163. "unicode": "e659",
  10164. "unicode_decimal": 58969
  10165. }, {
  10166. "icon_id": "24855886",
  10167. "name": "camera",
  10168. "font_class": "camera",
  10169. "unicode": "e65a",
  10170. "unicode_decimal": 58970
  10171. }, {
  10172. "icon_id": "24855887",
  10173. "name": "circle",
  10174. "font_class": "circle",
  10175. "unicode": "e65b",
  10176. "unicode_decimal": 58971
  10177. }, {
  10178. "icon_id": "24855888",
  10179. "name": "checkmarkempty",
  10180. "font_class": "checkmarkempty",
  10181. "unicode": "e65c",
  10182. "unicode_decimal": 58972
  10183. }, {
  10184. "icon_id": "24855889",
  10185. "name": "chat",
  10186. "font_class": "chat",
  10187. "unicode": "e65d",
  10188. "unicode_decimal": 58973
  10189. }, {
  10190. "icon_id": "24855890",
  10191. "name": "circle-filled",
  10192. "font_class": "circle-filled",
  10193. "unicode": "e65e",
  10194. "unicode_decimal": 58974
  10195. }, {
  10196. "icon_id": "24855891",
  10197. "name": "flag",
  10198. "font_class": "flag",
  10199. "unicode": "e65f",
  10200. "unicode_decimal": 58975
  10201. }, {
  10202. "icon_id": "24855892",
  10203. "name": "flag-filled",
  10204. "font_class": "flag-filled",
  10205. "unicode": "e660",
  10206. "unicode_decimal": 58976
  10207. }, {
  10208. "icon_id": "24855893",
  10209. "name": "gear-filled",
  10210. "font_class": "gear-filled",
  10211. "unicode": "e661",
  10212. "unicode_decimal": 58977
  10213. }, {
  10214. "icon_id": "24855894",
  10215. "name": "home",
  10216. "font_class": "home",
  10217. "unicode": "e662",
  10218. "unicode_decimal": 58978
  10219. }, {
  10220. "icon_id": "24855895",
  10221. "name": "home-filled",
  10222. "font_class": "home-filled",
  10223. "unicode": "e663",
  10224. "unicode_decimal": 58979
  10225. }, {
  10226. "icon_id": "24855896",
  10227. "name": "gear",
  10228. "font_class": "gear",
  10229. "unicode": "e664",
  10230. "unicode_decimal": 58980
  10231. }, {
  10232. "icon_id": "24855897",
  10233. "name": "smallcircle-filled",
  10234. "font_class": "smallcircle-filled",
  10235. "unicode": "e665",
  10236. "unicode_decimal": 58981
  10237. }, {
  10238. "icon_id": "24855898",
  10239. "name": "map-filled",
  10240. "font_class": "map-filled",
  10241. "unicode": "e666",
  10242. "unicode_decimal": 58982
  10243. }, {
  10244. "icon_id": "24855899",
  10245. "name": "map",
  10246. "font_class": "map",
  10247. "unicode": "e667",
  10248. "unicode_decimal": 58983
  10249. }, {
  10250. "icon_id": "24855825",
  10251. "name": "refresh-filled",
  10252. "font_class": "refresh-filled",
  10253. "unicode": "e656",
  10254. "unicode_decimal": 58966
  10255. }, {
  10256. "icon_id": "24855826",
  10257. "name": "refresh",
  10258. "font_class": "refresh",
  10259. "unicode": "e657",
  10260. "unicode_decimal": 58967
  10261. }, {
  10262. "icon_id": "24855808",
  10263. "name": "cloud-upload",
  10264. "font_class": "cloud-upload",
  10265. "unicode": "e645",
  10266. "unicode_decimal": 58949
  10267. }, {
  10268. "icon_id": "24855809",
  10269. "name": "cloud-download-filled",
  10270. "font_class": "cloud-download-filled",
  10271. "unicode": "e646",
  10272. "unicode_decimal": 58950
  10273. }, {
  10274. "icon_id": "24855810",
  10275. "name": "cloud-download",
  10276. "font_class": "cloud-download",
  10277. "unicode": "e647",
  10278. "unicode_decimal": 58951
  10279. }, {
  10280. "icon_id": "24855811",
  10281. "name": "cloud-upload-filled",
  10282. "font_class": "cloud-upload-filled",
  10283. "unicode": "e648",
  10284. "unicode_decimal": 58952
  10285. }, {
  10286. "icon_id": "24855813",
  10287. "name": "redo",
  10288. "font_class": "redo",
  10289. "unicode": "e64a",
  10290. "unicode_decimal": 58954
  10291. }, {
  10292. "icon_id": "24855814",
  10293. "name": "images-filled",
  10294. "font_class": "images-filled",
  10295. "unicode": "e64b",
  10296. "unicode_decimal": 58955
  10297. }, {
  10298. "icon_id": "24855815",
  10299. "name": "undo-filled",
  10300. "font_class": "undo-filled",
  10301. "unicode": "e64c",
  10302. "unicode_decimal": 58956
  10303. }, {
  10304. "icon_id": "24855816",
  10305. "name": "more",
  10306. "font_class": "more",
  10307. "unicode": "e64d",
  10308. "unicode_decimal": 58957
  10309. }, {
  10310. "icon_id": "24855817",
  10311. "name": "more-filled",
  10312. "font_class": "more-filled",
  10313. "unicode": "e64e",
  10314. "unicode_decimal": 58958
  10315. }, {
  10316. "icon_id": "24855818",
  10317. "name": "undo",
  10318. "font_class": "undo",
  10319. "unicode": "e64f",
  10320. "unicode_decimal": 58959
  10321. }, {
  10322. "icon_id": "24855819",
  10323. "name": "images",
  10324. "font_class": "images",
  10325. "unicode": "e650",
  10326. "unicode_decimal": 58960
  10327. }, {
  10328. "icon_id": "24855821",
  10329. "name": "paperclip",
  10330. "font_class": "paperclip",
  10331. "unicode": "e652",
  10332. "unicode_decimal": 58962
  10333. }, {
  10334. "icon_id": "24855822",
  10335. "name": "settings",
  10336. "font_class": "settings",
  10337. "unicode": "e653",
  10338. "unicode_decimal": 58963
  10339. }, {
  10340. "icon_id": "24855823",
  10341. "name": "search",
  10342. "font_class": "search",
  10343. "unicode": "e654",
  10344. "unicode_decimal": 58964
  10345. }, {
  10346. "icon_id": "24855824",
  10347. "name": "redo-filled",
  10348. "font_class": "redo-filled",
  10349. "unicode": "e655",
  10350. "unicode_decimal": 58965
  10351. }, {
  10352. "icon_id": "24841702",
  10353. "name": "list",
  10354. "font_class": "list",
  10355. "unicode": "e644",
  10356. "unicode_decimal": 58948
  10357. }, {
  10358. "icon_id": "24841489",
  10359. "name": "mail-open-filled",
  10360. "font_class": "mail-open-filled",
  10361. "unicode": "e63a",
  10362. "unicode_decimal": 58938
  10363. }, {
  10364. "icon_id": "24841491",
  10365. "name": "hand-thumbsdown-filled",
  10366. "font_class": "hand-down-filled",
  10367. "unicode": "e63c",
  10368. "unicode_decimal": 58940
  10369. }, {
  10370. "icon_id": "24841492",
  10371. "name": "hand-thumbsdown",
  10372. "font_class": "hand-down",
  10373. "unicode": "e63d",
  10374. "unicode_decimal": 58941
  10375. }, {
  10376. "icon_id": "24841493",
  10377. "name": "hand-thumbsup-filled",
  10378. "font_class": "hand-up-filled",
  10379. "unicode": "e63e",
  10380. "unicode_decimal": 58942
  10381. }, {
  10382. "icon_id": "24841494",
  10383. "name": "hand-thumbsup",
  10384. "font_class": "hand-up",
  10385. "unicode": "e63f",
  10386. "unicode_decimal": 58943
  10387. }, {
  10388. "icon_id": "24841496",
  10389. "name": "heart-filled",
  10390. "font_class": "heart-filled",
  10391. "unicode": "e641",
  10392. "unicode_decimal": 58945
  10393. }, {
  10394. "icon_id": "24841498",
  10395. "name": "mail-open",
  10396. "font_class": "mail-open",
  10397. "unicode": "e643",
  10398. "unicode_decimal": 58947
  10399. }, {
  10400. "icon_id": "24841488",
  10401. "name": "heart",
  10402. "font_class": "heart",
  10403. "unicode": "e639",
  10404. "unicode_decimal": 58937
  10405. }, {
  10406. "icon_id": "24839963",
  10407. "name": "loop",
  10408. "font_class": "loop",
  10409. "unicode": "e633",
  10410. "unicode_decimal": 58931
  10411. }, {
  10412. "icon_id": "24839866",
  10413. "name": "pulldown",
  10414. "font_class": "pulldown",
  10415. "unicode": "e632",
  10416. "unicode_decimal": 58930
  10417. }, {
  10418. "icon_id": "24813798",
  10419. "name": "scan",
  10420. "font_class": "scan",
  10421. "unicode": "e62a",
  10422. "unicode_decimal": 58922
  10423. }, {
  10424. "icon_id": "24813786",
  10425. "name": "bars",
  10426. "font_class": "bars",
  10427. "unicode": "e627",
  10428. "unicode_decimal": 58919
  10429. }, {
  10430. "icon_id": "24813788",
  10431. "name": "cart-filled",
  10432. "font_class": "cart-filled",
  10433. "unicode": "e629",
  10434. "unicode_decimal": 58921
  10435. }, {
  10436. "icon_id": "24813790",
  10437. "name": "checkbox",
  10438. "font_class": "checkbox",
  10439. "unicode": "e62b",
  10440. "unicode_decimal": 58923
  10441. }, {
  10442. "icon_id": "24813791",
  10443. "name": "checkbox-filled",
  10444. "font_class": "checkbox-filled",
  10445. "unicode": "e62c",
  10446. "unicode_decimal": 58924
  10447. }, {
  10448. "icon_id": "24813794",
  10449. "name": "shop",
  10450. "font_class": "shop",
  10451. "unicode": "e62f",
  10452. "unicode_decimal": 58927
  10453. }, {
  10454. "icon_id": "24813795",
  10455. "name": "headphones",
  10456. "font_class": "headphones",
  10457. "unicode": "e630",
  10458. "unicode_decimal": 58928
  10459. }, {
  10460. "icon_id": "24813796",
  10461. "name": "cart",
  10462. "font_class": "cart",
  10463. "unicode": "e631",
  10464. "unicode_decimal": 58929
  10465. }]
  10466. };
  10467. exports.default = _default;
  10468. /***/ })
  10469. ]]);
  10470. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map