vendor.js 328 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
  10. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 4);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  11. var realAtob;
  12. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  13. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14. if (typeof atob !== 'function') {
  15. realAtob = function realAtob(str) {
  16. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  17. if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
  18. // Adding the padding if missing, for semplicity
  19. str += '=='.slice(2 - (str.length & 3));
  20. var bitmap;var result = '';var r1;var r2;var i = 0;
  21. for (; i < str.length;) {
  22. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 |
  23. (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  25. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  26. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  27. }
  28. return result;
  29. };
  30. } else {
  31. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  32. realAtob = atob;
  33. }
  34. function b64DecodeUnicode(str) {
  35. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  36. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  37. }).join(''));
  38. }
  39. function getCurrentUserInfo() {
  40. var token = wx.getStorageSync('uni_id_token') || '';
  41. var tokenArr = token.split('.');
  42. if (!token || tokenArr.length !== 3) {
  43. return {
  44. uid: null,
  45. role: [],
  46. permission: [],
  47. tokenExpired: 0 };
  48. }
  49. var userInfo;
  50. try {
  51. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  52. } catch (error) {
  53. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  54. }
  55. userInfo.tokenExpired = userInfo.exp * 1000;
  56. delete userInfo.exp;
  57. delete userInfo.iat;
  58. return userInfo;
  59. }
  60. function uniIdMixin(Vue) {
  61. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  62. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  63. return role.indexOf(roleId) > -1;
  64. };
  65. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  66. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  67. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  68. };
  69. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  70. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  71. return tokenExpired > Date.now();
  72. };
  73. }
  74. var _toString = Object.prototype.toString;
  75. var hasOwnProperty = Object.prototype.hasOwnProperty;
  76. function isFn(fn) {
  77. return typeof fn === 'function';
  78. }
  79. function isStr(str) {
  80. return typeof str === 'string';
  81. }
  82. function isPlainObject(obj) {
  83. return _toString.call(obj) === '[object Object]';
  84. }
  85. function hasOwn(obj, key) {
  86. return hasOwnProperty.call(obj, key);
  87. }
  88. function noop() {}
  89. /**
  90. * Create a cached version of a pure function.
  91. */
  92. function cached(fn) {
  93. var cache = Object.create(null);
  94. return function cachedFn(str) {
  95. var hit = cache[str];
  96. return hit || (cache[str] = fn(str));
  97. };
  98. }
  99. /**
  100. * Camelize a hyphen-delimited string.
  101. */
  102. var camelizeRE = /-(\w)/g;
  103. var camelize = cached(function (str) {
  104. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  105. });
  106. var HOOKS = [
  107. 'invoke',
  108. 'success',
  109. 'fail',
  110. 'complete',
  111. 'returnValue'];
  112. var globalInterceptors = {};
  113. var scopedInterceptors = {};
  114. function mergeHook(parentVal, childVal) {
  115. var res = childVal ?
  116. parentVal ?
  117. parentVal.concat(childVal) :
  118. Array.isArray(childVal) ?
  119. childVal : [childVal] :
  120. parentVal;
  121. return res ?
  122. dedupeHooks(res) :
  123. res;
  124. }
  125. function dedupeHooks(hooks) {
  126. var res = [];
  127. for (var i = 0; i < hooks.length; i++) {
  128. if (res.indexOf(hooks[i]) === -1) {
  129. res.push(hooks[i]);
  130. }
  131. }
  132. return res;
  133. }
  134. function removeHook(hooks, hook) {
  135. var index = hooks.indexOf(hook);
  136. if (index !== -1) {
  137. hooks.splice(index, 1);
  138. }
  139. }
  140. function mergeInterceptorHook(interceptor, option) {
  141. Object.keys(option).forEach(function (hook) {
  142. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  143. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  144. }
  145. });
  146. }
  147. function removeInterceptorHook(interceptor, option) {
  148. if (!interceptor || !option) {
  149. return;
  150. }
  151. Object.keys(option).forEach(function (hook) {
  152. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  153. removeHook(interceptor[hook], option[hook]);
  154. }
  155. });
  156. }
  157. function addInterceptor(method, option) {
  158. if (typeof method === 'string' && isPlainObject(option)) {
  159. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  160. } else if (isPlainObject(method)) {
  161. mergeInterceptorHook(globalInterceptors, method);
  162. }
  163. }
  164. function removeInterceptor(method, option) {
  165. if (typeof method === 'string') {
  166. if (isPlainObject(option)) {
  167. removeInterceptorHook(scopedInterceptors[method], option);
  168. } else {
  169. delete scopedInterceptors[method];
  170. }
  171. } else if (isPlainObject(method)) {
  172. removeInterceptorHook(globalInterceptors, method);
  173. }
  174. }
  175. function wrapperHook(hook) {
  176. return function (data) {
  177. return hook(data) || data;
  178. };
  179. }
  180. function isPromise(obj) {
  181. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  182. }
  183. function queue(hooks, data) {
  184. var promise = false;
  185. for (var i = 0; i < hooks.length; i++) {
  186. var hook = hooks[i];
  187. if (promise) {
  188. promise = Promise.resolve(wrapperHook(hook));
  189. } else {
  190. var res = hook(data);
  191. if (isPromise(res)) {
  192. promise = Promise.resolve(res);
  193. }
  194. if (res === false) {
  195. return {
  196. then: function then() {} };
  197. }
  198. }
  199. }
  200. return promise || {
  201. then: function then(callback) {
  202. return callback(data);
  203. } };
  204. }
  205. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  206. ['success', 'fail', 'complete'].forEach(function (name) {
  207. if (Array.isArray(interceptor[name])) {
  208. var oldCallback = options[name];
  209. options[name] = function callbackInterceptor(res) {
  210. queue(interceptor[name], res).then(function (res) {
  211. /* eslint-disable no-mixed-operators */
  212. return isFn(oldCallback) && oldCallback(res) || res;
  213. });
  214. };
  215. }
  216. });
  217. return options;
  218. }
  219. function wrapperReturnValue(method, returnValue) {
  220. var returnValueHooks = [];
  221. if (Array.isArray(globalInterceptors.returnValue)) {
  222. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  223. }
  224. var interceptor = scopedInterceptors[method];
  225. if (interceptor && Array.isArray(interceptor.returnValue)) {
  226. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  227. }
  228. returnValueHooks.forEach(function (hook) {
  229. returnValue = hook(returnValue) || returnValue;
  230. });
  231. return returnValue;
  232. }
  233. function getApiInterceptorHooks(method) {
  234. var interceptor = Object.create(null);
  235. Object.keys(globalInterceptors).forEach(function (hook) {
  236. if (hook !== 'returnValue') {
  237. interceptor[hook] = globalInterceptors[hook].slice();
  238. }
  239. });
  240. var scopedInterceptor = scopedInterceptors[method];
  241. if (scopedInterceptor) {
  242. Object.keys(scopedInterceptor).forEach(function (hook) {
  243. if (hook !== 'returnValue') {
  244. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  245. }
  246. });
  247. }
  248. return interceptor;
  249. }
  250. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  251. var interceptor = getApiInterceptorHooks(method);
  252. if (interceptor && Object.keys(interceptor).length) {
  253. if (Array.isArray(interceptor.invoke)) {
  254. var res = queue(interceptor.invoke, options);
  255. return res.then(function (options) {
  256. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  257. });
  258. } else {
  259. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  260. }
  261. }
  262. return api.apply(void 0, [options].concat(params));
  263. }
  264. var promiseInterceptor = {
  265. returnValue: function returnValue(res) {
  266. if (!isPromise(res)) {
  267. return res;
  268. }
  269. return new Promise(function (resolve, reject) {
  270. res.then(function (res) {
  271. if (res[0]) {
  272. reject(res[0]);
  273. } else {
  274. resolve(res[1]);
  275. }
  276. });
  277. });
  278. } };
  279. var SYNC_API_RE =
  280. /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale/;
  281. var CONTEXT_API_RE = /^create|Manager$/;
  282. // Context例外情况
  283. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  284. // 同步例外情况
  285. var ASYNC_API = ['createBLEConnection'];
  286. var CALLBACK_API_RE = /^on|^off/;
  287. function isContextApi(name) {
  288. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  289. }
  290. function isSyncApi(name) {
  291. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  292. }
  293. function isCallbackApi(name) {
  294. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  295. }
  296. function handlePromise(promise) {
  297. return promise.then(function (data) {
  298. return [null, data];
  299. }).
  300. catch(function (err) {return [err];});
  301. }
  302. function shouldPromise(name) {
  303. if (
  304. isContextApi(name) ||
  305. isSyncApi(name) ||
  306. isCallbackApi(name))
  307. {
  308. return false;
  309. }
  310. return true;
  311. }
  312. /* eslint-disable no-extend-native */
  313. if (!Promise.prototype.finally) {
  314. Promise.prototype.finally = function (callback) {
  315. var promise = this.constructor;
  316. return this.then(
  317. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  318. function (reason) {return promise.resolve(callback()).then(function () {
  319. throw reason;
  320. });});
  321. };
  322. }
  323. function promisify(name, api) {
  324. if (!shouldPromise(name)) {
  325. return api;
  326. }
  327. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  328. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  329. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  330. }
  331. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  332. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  333. success: resolve,
  334. fail: reject })].concat(
  335. params));
  336. })));
  337. };
  338. }
  339. var EPS = 1e-4;
  340. var BASE_DEVICE_WIDTH = 750;
  341. var isIOS = false;
  342. var deviceWidth = 0;
  343. var deviceDPR = 0;
  344. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  345. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  346. deviceWidth = windowWidth;
  347. deviceDPR = pixelRatio;
  348. isIOS = platform === 'ios';
  349. }
  350. function upx2px(number, newDeviceWidth) {
  351. if (deviceWidth === 0) {
  352. checkDeviceWidth();
  353. }
  354. number = Number(number);
  355. if (number === 0) {
  356. return 0;
  357. }
  358. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  359. if (result < 0) {
  360. result = -result;
  361. }
  362. result = Math.floor(result + EPS);
  363. if (result === 0) {
  364. if (deviceDPR === 1 || !isIOS) {
  365. result = 1;
  366. } else {
  367. result = 0.5;
  368. }
  369. }
  370. return number < 0 ? -result : result;
  371. }
  372. function getLocale() {
  373. // 优先使用 $locale
  374. var app = getApp({
  375. allowDefault: true });
  376. if (app && app.$vm) {
  377. return app.$vm.$locale;
  378. }
  379. return wx.getSystemInfoSync().language || 'zh-Hans';
  380. }
  381. function setLocale(locale) {
  382. var app = getApp();
  383. if (!app) {
  384. return false;
  385. }
  386. var oldLocale = app.$vm.$locale;
  387. if (oldLocale !== locale) {
  388. app.$vm.$locale = locale;
  389. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  390. locale: locale });});
  391. return true;
  392. }
  393. return false;
  394. }
  395. var onLocaleChangeCallbacks = [];
  396. function onLocaleChange(fn) {
  397. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  398. onLocaleChangeCallbacks.push(fn);
  399. }
  400. }
  401. if (typeof global !== 'undefined') {
  402. global.getLocale = getLocale;
  403. }
  404. var interceptors = {
  405. promiseInterceptor: promiseInterceptor };
  406. var baseApi = /*#__PURE__*/Object.freeze({
  407. __proto__: null,
  408. upx2px: upx2px,
  409. getLocale: getLocale,
  410. setLocale: setLocale,
  411. onLocaleChange: onLocaleChange,
  412. addInterceptor: addInterceptor,
  413. removeInterceptor: removeInterceptor,
  414. interceptors: interceptors });
  415. function findExistsPageIndex(url) {
  416. var pages = getCurrentPages();
  417. var len = pages.length;
  418. while (len--) {
  419. var page = pages[len];
  420. if (page.$page && page.$page.fullPath === url) {
  421. return len;
  422. }
  423. }
  424. return -1;
  425. }
  426. var redirectTo = {
  427. name: function name(fromArgs) {
  428. if (fromArgs.exists === 'back' && fromArgs.delta) {
  429. return 'navigateBack';
  430. }
  431. return 'redirectTo';
  432. },
  433. args: function args(fromArgs) {
  434. if (fromArgs.exists === 'back' && fromArgs.url) {
  435. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  436. if (existsPageIndex !== -1) {
  437. var delta = getCurrentPages().length - 1 - existsPageIndex;
  438. if (delta > 0) {
  439. fromArgs.delta = delta;
  440. }
  441. }
  442. }
  443. } };
  444. var previewImage = {
  445. args: function args(fromArgs) {
  446. var currentIndex = parseInt(fromArgs.current);
  447. if (isNaN(currentIndex)) {
  448. return;
  449. }
  450. var urls = fromArgs.urls;
  451. if (!Array.isArray(urls)) {
  452. return;
  453. }
  454. var len = urls.length;
  455. if (!len) {
  456. return;
  457. }
  458. if (currentIndex < 0) {
  459. currentIndex = 0;
  460. } else if (currentIndex >= len) {
  461. currentIndex = len - 1;
  462. }
  463. if (currentIndex > 0) {
  464. fromArgs.current = urls[currentIndex];
  465. fromArgs.urls = urls.filter(
  466. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  467. } else {
  468. fromArgs.current = urls[0];
  469. }
  470. return {
  471. indicator: false,
  472. loop: false };
  473. } };
  474. var UUID_KEY = '__DC_STAT_UUID';
  475. var deviceId;
  476. function addUuid(result) {
  477. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  478. if (!deviceId) {
  479. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  480. wx.setStorage({
  481. key: UUID_KEY,
  482. data: deviceId });
  483. }
  484. result.deviceId = deviceId;
  485. }
  486. function addSafeAreaInsets(result) {
  487. if (result.safeArea) {
  488. var safeArea = result.safeArea;
  489. result.safeAreaInsets = {
  490. top: safeArea.top,
  491. left: safeArea.left,
  492. right: result.windowWidth - safeArea.right,
  493. bottom: result.windowHeight - safeArea.bottom };
  494. }
  495. }
  496. var getSystemInfo = {
  497. returnValue: function returnValue(result) {
  498. addUuid(result);
  499. addSafeAreaInsets(result);
  500. } };
  501. // import navigateTo from 'uni-helpers/navigate-to'
  502. var protocols = {
  503. redirectTo: redirectTo,
  504. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  505. previewImage: previewImage,
  506. getSystemInfo: getSystemInfo,
  507. getSystemInfoSync: getSystemInfo };
  508. var todos = [
  509. 'vibrate',
  510. 'preloadPage',
  511. 'unPreloadPage',
  512. 'loadSubPackage'];
  513. var canIUses = [];
  514. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  515. function processCallback(methodName, method, returnValue) {
  516. return function (res) {
  517. return method(processReturnValue(methodName, res, returnValue));
  518. };
  519. }
  520. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  521. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  522. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  523. if (isFn(argsOption)) {
  524. argsOption = argsOption(fromArgs, toArgs) || {};
  525. }
  526. for (var key in fromArgs) {
  527. if (hasOwn(argsOption, key)) {
  528. var keyOption = argsOption[key];
  529. if (isFn(keyOption)) {
  530. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  531. }
  532. if (!keyOption) {// 不支持的参数
  533. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  534. } else if (isStr(keyOption)) {// 重写参数 key
  535. toArgs[keyOption] = fromArgs[key];
  536. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  537. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  538. }
  539. } else if (CALLBACKS.indexOf(key) !== -1) {
  540. if (isFn(fromArgs[key])) {
  541. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  542. }
  543. } else {
  544. if (!keepFromArgs) {
  545. toArgs[key] = fromArgs[key];
  546. }
  547. }
  548. }
  549. return toArgs;
  550. } else if (isFn(fromArgs)) {
  551. fromArgs = processCallback(methodName, fromArgs, returnValue);
  552. }
  553. return fromArgs;
  554. }
  555. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  556. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  557. res = protocols.returnValue(methodName, res);
  558. }
  559. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  560. }
  561. function wrapper(methodName, method) {
  562. if (hasOwn(protocols, methodName)) {
  563. var protocol = protocols[methodName];
  564. if (!protocol) {// 暂不支持的 api
  565. return function () {
  566. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  567. };
  568. }
  569. return function (arg1, arg2) {// 目前 api 最多两个参数
  570. var options = protocol;
  571. if (isFn(protocol)) {
  572. options = protocol(arg1);
  573. }
  574. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  575. var args = [arg1];
  576. if (typeof arg2 !== 'undefined') {
  577. args.push(arg2);
  578. }
  579. if (isFn(options.name)) {
  580. methodName = options.name(arg1);
  581. } else if (isStr(options.name)) {
  582. methodName = options.name;
  583. }
  584. var returnValue = wx[methodName].apply(wx, args);
  585. if (isSyncApi(methodName)) {// 同步 api
  586. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  587. }
  588. return returnValue;
  589. };
  590. }
  591. return method;
  592. }
  593. var todoApis = Object.create(null);
  594. var TODOS = [
  595. 'onTabBarMidButtonTap',
  596. 'subscribePush',
  597. 'unsubscribePush',
  598. 'onPush',
  599. 'offPush',
  600. 'share'];
  601. function createTodoApi(name) {
  602. return function todoApi(_ref)
  603. {var fail = _ref.fail,complete = _ref.complete;
  604. var res = {
  605. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  606. isFn(fail) && fail(res);
  607. isFn(complete) && complete(res);
  608. };
  609. }
  610. TODOS.forEach(function (name) {
  611. todoApis[name] = createTodoApi(name);
  612. });
  613. var providers = {
  614. oauth: ['weixin'],
  615. share: ['weixin'],
  616. payment: ['wxpay'],
  617. push: ['weixin'] };
  618. function getProvider(_ref2)
  619. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  620. var res = false;
  621. if (providers[service]) {
  622. res = {
  623. errMsg: 'getProvider:ok',
  624. service: service,
  625. provider: providers[service] };
  626. isFn(success) && success(res);
  627. } else {
  628. res = {
  629. errMsg: 'getProvider:fail service not found' };
  630. isFn(fail) && fail(res);
  631. }
  632. isFn(complete) && complete(res);
  633. }
  634. var extraApi = /*#__PURE__*/Object.freeze({
  635. __proto__: null,
  636. getProvider: getProvider });
  637. var getEmitter = function () {
  638. var Emitter;
  639. return function getUniEmitter() {
  640. if (!Emitter) {
  641. Emitter = new _vue.default();
  642. }
  643. return Emitter;
  644. };
  645. }();
  646. function apply(ctx, method, args) {
  647. return ctx[method].apply(ctx, args);
  648. }
  649. function $on() {
  650. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  651. }
  652. function $off() {
  653. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  654. }
  655. function $once() {
  656. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  657. }
  658. function $emit() {
  659. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  660. }
  661. var eventApi = /*#__PURE__*/Object.freeze({
  662. __proto__: null,
  663. $on: $on,
  664. $off: $off,
  665. $once: $once,
  666. $emit: $emit });
  667. var api = /*#__PURE__*/Object.freeze({
  668. __proto__: null });
  669. var MPPage = Page;
  670. var MPComponent = Component;
  671. var customizeRE = /:/g;
  672. var customize = cached(function (str) {
  673. return camelize(str.replace(customizeRE, '-'));
  674. });
  675. function initTriggerEvent(mpInstance) {
  676. var oldTriggerEvent = mpInstance.triggerEvent;
  677. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  678. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  679. };
  680. }
  681. function initHook(name, options, isComponent) {
  682. var oldHook = options[name];
  683. if (!oldHook) {
  684. options[name] = function () {
  685. initTriggerEvent(this);
  686. };
  687. } else {
  688. options[name] = function () {
  689. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  690. return oldHook.apply(this, args);
  691. };
  692. }
  693. }
  694. if (!MPPage.__$wrappered) {
  695. MPPage.__$wrappered = true;
  696. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  697. initHook('onLoad', options);
  698. return MPPage(options);
  699. };
  700. Page.after = MPPage.after;
  701. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  702. initHook('created', options);
  703. return MPComponent(options);
  704. };
  705. }
  706. var PAGE_EVENT_HOOKS = [
  707. 'onPullDownRefresh',
  708. 'onReachBottom',
  709. 'onAddToFavorites',
  710. 'onShareTimeline',
  711. 'onShareAppMessage',
  712. 'onPageScroll',
  713. 'onResize',
  714. 'onTabItemTap'];
  715. function initMocks(vm, mocks) {
  716. var mpInstance = vm.$mp[vm.mpType];
  717. mocks.forEach(function (mock) {
  718. if (hasOwn(mpInstance, mock)) {
  719. vm[mock] = mpInstance[mock];
  720. }
  721. });
  722. }
  723. function hasHook(hook, vueOptions) {
  724. if (!vueOptions) {
  725. return true;
  726. }
  727. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  728. return true;
  729. }
  730. vueOptions = vueOptions.default || vueOptions;
  731. if (isFn(vueOptions)) {
  732. if (isFn(vueOptions.extendOptions[hook])) {
  733. return true;
  734. }
  735. if (vueOptions.super &&
  736. vueOptions.super.options &&
  737. Array.isArray(vueOptions.super.options[hook])) {
  738. return true;
  739. }
  740. return false;
  741. }
  742. if (isFn(vueOptions[hook])) {
  743. return true;
  744. }
  745. var mixins = vueOptions.mixins;
  746. if (Array.isArray(mixins)) {
  747. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  748. }
  749. }
  750. function initHooks(mpOptions, hooks, vueOptions) {
  751. hooks.forEach(function (hook) {
  752. if (hasHook(hook, vueOptions)) {
  753. mpOptions[hook] = function (args) {
  754. return this.$vm && this.$vm.__call_hook(hook, args);
  755. };
  756. }
  757. });
  758. }
  759. function initVueComponent(Vue, vueOptions) {
  760. vueOptions = vueOptions.default || vueOptions;
  761. var VueComponent;
  762. if (isFn(vueOptions)) {
  763. VueComponent = vueOptions;
  764. } else {
  765. VueComponent = Vue.extend(vueOptions);
  766. }
  767. vueOptions = VueComponent.options;
  768. return [VueComponent, vueOptions];
  769. }
  770. function initSlots(vm, vueSlots) {
  771. if (Array.isArray(vueSlots) && vueSlots.length) {
  772. var $slots = Object.create(null);
  773. vueSlots.forEach(function (slotName) {
  774. $slots[slotName] = true;
  775. });
  776. vm.$scopedSlots = vm.$slots = $slots;
  777. }
  778. }
  779. function initVueIds(vueIds, mpInstance) {
  780. vueIds = (vueIds || '').split(',');
  781. var len = vueIds.length;
  782. if (len === 1) {
  783. mpInstance._$vueId = vueIds[0];
  784. } else if (len === 2) {
  785. mpInstance._$vueId = vueIds[0];
  786. mpInstance._$vuePid = vueIds[1];
  787. }
  788. }
  789. function initData(vueOptions, context) {
  790. var data = vueOptions.data || {};
  791. var methods = vueOptions.methods || {};
  792. if (typeof data === 'function') {
  793. try {
  794. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  795. } catch (e) {
  796. if (Object({"VUE_APP_NAME":"magazine-web","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  797. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  798. }
  799. }
  800. } else {
  801. try {
  802. // 对 data 格式化
  803. data = JSON.parse(JSON.stringify(data));
  804. } catch (e) {}
  805. }
  806. if (!isPlainObject(data)) {
  807. data = {};
  808. }
  809. Object.keys(methods).forEach(function (methodName) {
  810. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  811. data[methodName] = methods[methodName];
  812. }
  813. });
  814. return data;
  815. }
  816. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  817. function createObserver(name) {
  818. return function observer(newVal, oldVal) {
  819. if (this.$vm) {
  820. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  821. }
  822. };
  823. }
  824. function initBehaviors(vueOptions, initBehavior) {
  825. var vueBehaviors = vueOptions.behaviors;
  826. var vueExtends = vueOptions.extends;
  827. var vueMixins = vueOptions.mixins;
  828. var vueProps = vueOptions.props;
  829. if (!vueProps) {
  830. vueOptions.props = vueProps = [];
  831. }
  832. var behaviors = [];
  833. if (Array.isArray(vueBehaviors)) {
  834. vueBehaviors.forEach(function (behavior) {
  835. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  836. if (behavior === 'uni://form-field') {
  837. if (Array.isArray(vueProps)) {
  838. vueProps.push('name');
  839. vueProps.push('value');
  840. } else {
  841. vueProps.name = {
  842. type: String,
  843. default: '' };
  844. vueProps.value = {
  845. type: [String, Number, Boolean, Array, Object, Date],
  846. default: '' };
  847. }
  848. }
  849. });
  850. }
  851. if (isPlainObject(vueExtends) && vueExtends.props) {
  852. behaviors.push(
  853. initBehavior({
  854. properties: initProperties(vueExtends.props, true) }));
  855. }
  856. if (Array.isArray(vueMixins)) {
  857. vueMixins.forEach(function (vueMixin) {
  858. if (isPlainObject(vueMixin) && vueMixin.props) {
  859. behaviors.push(
  860. initBehavior({
  861. properties: initProperties(vueMixin.props, true) }));
  862. }
  863. });
  864. }
  865. return behaviors;
  866. }
  867. function parsePropType(key, type, defaultValue, file) {
  868. // [String]=>String
  869. if (Array.isArray(type) && type.length === 1) {
  870. return type[0];
  871. }
  872. return type;
  873. }
  874. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  875. var properties = {};
  876. if (!isBehavior) {
  877. properties.vueId = {
  878. type: String,
  879. value: '' };
  880. // 用于字节跳动小程序模拟抽象节点
  881. properties.generic = {
  882. type: Object,
  883. value: null };
  884. // scopedSlotsCompiler auto
  885. properties.scopedSlotsCompiler = {
  886. type: String,
  887. value: '' };
  888. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  889. type: null,
  890. value: [],
  891. observer: function observer(newVal, oldVal) {
  892. var $slots = Object.create(null);
  893. newVal.forEach(function (slotName) {
  894. $slots[slotName] = true;
  895. });
  896. this.setData({
  897. $slots: $slots });
  898. } };
  899. }
  900. if (Array.isArray(props)) {// ['title']
  901. props.forEach(function (key) {
  902. properties[key] = {
  903. type: null,
  904. observer: createObserver(key) };
  905. });
  906. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  907. Object.keys(props).forEach(function (key) {
  908. var opts = props[key];
  909. if (isPlainObject(opts)) {// title:{type:String,default:''}
  910. var value = opts.default;
  911. if (isFn(value)) {
  912. value = value();
  913. }
  914. opts.type = parsePropType(key, opts.type);
  915. properties[key] = {
  916. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  917. value: value,
  918. observer: createObserver(key) };
  919. } else {// content:String
  920. var type = parsePropType(key, opts);
  921. properties[key] = {
  922. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  923. observer: createObserver(key) };
  924. }
  925. });
  926. }
  927. return properties;
  928. }
  929. function wrapper$1(event) {
  930. // TODO 又得兼容 mpvue 的 mp 对象
  931. try {
  932. event.mp = JSON.parse(JSON.stringify(event));
  933. } catch (e) {}
  934. event.stopPropagation = noop;
  935. event.preventDefault = noop;
  936. event.target = event.target || {};
  937. if (!hasOwn(event, 'detail')) {
  938. event.detail = {};
  939. }
  940. if (hasOwn(event, 'markerId')) {
  941. event.detail = typeof event.detail === 'object' ? event.detail : {};
  942. event.detail.markerId = event.markerId;
  943. }
  944. if (isPlainObject(event.detail)) {
  945. event.target = Object.assign({}, event.target, event.detail);
  946. }
  947. return event;
  948. }
  949. function getExtraValue(vm, dataPathsArray) {
  950. var context = vm;
  951. dataPathsArray.forEach(function (dataPathArray) {
  952. var dataPath = dataPathArray[0];
  953. var value = dataPathArray[2];
  954. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  955. var propPath = dataPathArray[1];
  956. var valuePath = dataPathArray[3];
  957. var vFor;
  958. if (Number.isInteger(dataPath)) {
  959. vFor = dataPath;
  960. } else if (!dataPath) {
  961. vFor = context;
  962. } else if (typeof dataPath === 'string' && dataPath) {
  963. if (dataPath.indexOf('#s#') === 0) {
  964. vFor = dataPath.substr(3);
  965. } else {
  966. vFor = vm.__get_value(dataPath, context);
  967. }
  968. }
  969. if (Number.isInteger(vFor)) {
  970. context = value;
  971. } else if (!propPath) {
  972. context = vFor[value];
  973. } else {
  974. if (Array.isArray(vFor)) {
  975. context = vFor.find(function (vForItem) {
  976. return vm.__get_value(propPath, vForItem) === value;
  977. });
  978. } else if (isPlainObject(vFor)) {
  979. context = Object.keys(vFor).find(function (vForKey) {
  980. return vm.__get_value(propPath, vFor[vForKey]) === value;
  981. });
  982. } else {
  983. console.error('v-for 暂不支持循环数据:', vFor);
  984. }
  985. }
  986. if (valuePath) {
  987. context = vm.__get_value(valuePath, context);
  988. }
  989. }
  990. });
  991. return context;
  992. }
  993. function processEventExtra(vm, extra, event) {
  994. var extraObj = {};
  995. if (Array.isArray(extra) && extra.length) {
  996. /**
  997. *[
  998. * ['data.items', 'data.id', item.data.id],
  999. * ['metas', 'id', meta.id]
  1000. *],
  1001. *[
  1002. * ['data.items', 'data.id', item.data.id],
  1003. * ['metas', 'id', meta.id]
  1004. *],
  1005. *'test'
  1006. */
  1007. extra.forEach(function (dataPath, index) {
  1008. if (typeof dataPath === 'string') {
  1009. if (!dataPath) {// model,prop.sync
  1010. extraObj['$' + index] = vm;
  1011. } else {
  1012. if (dataPath === '$event') {// $event
  1013. extraObj['$' + index] = event;
  1014. } else if (dataPath === 'arguments') {
  1015. if (event.detail && event.detail.__args__) {
  1016. extraObj['$' + index] = event.detail.__args__;
  1017. } else {
  1018. extraObj['$' + index] = [event];
  1019. }
  1020. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1021. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1022. } else {
  1023. extraObj['$' + index] = vm.__get_value(dataPath);
  1024. }
  1025. }
  1026. } else {
  1027. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1028. }
  1029. });
  1030. }
  1031. return extraObj;
  1032. }
  1033. function getObjByArray(arr) {
  1034. var obj = {};
  1035. for (var i = 1; i < arr.length; i++) {
  1036. var element = arr[i];
  1037. obj[element[0]] = element[1];
  1038. }
  1039. return obj;
  1040. }
  1041. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1042. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1043. if (isCustom) {// 自定义事件
  1044. isCustomMPEvent = event.currentTarget &&
  1045. event.currentTarget.dataset &&
  1046. event.currentTarget.dataset.comType === 'wx';
  1047. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1048. if (isCustomMPEvent) {
  1049. return [event];
  1050. }
  1051. return event.detail.__args__ || event.detail;
  1052. }
  1053. }
  1054. var extraObj = processEventExtra(vm, extra, event);
  1055. var ret = [];
  1056. args.forEach(function (arg) {
  1057. if (arg === '$event') {
  1058. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1059. ret.push(event.target.value);
  1060. } else {
  1061. if (isCustom && !isCustomMPEvent) {
  1062. ret.push(event.detail.__args__[0]);
  1063. } else {// wxcomponent 组件或内置组件
  1064. ret.push(event);
  1065. }
  1066. }
  1067. } else {
  1068. if (Array.isArray(arg) && arg[0] === 'o') {
  1069. ret.push(getObjByArray(arg));
  1070. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1071. ret.push(extraObj[arg]);
  1072. } else {
  1073. ret.push(arg);
  1074. }
  1075. }
  1076. });
  1077. return ret;
  1078. }
  1079. var ONCE = '~';
  1080. var CUSTOM = '^';
  1081. function isMatchEventType(eventType, optType) {
  1082. return eventType === optType ||
  1083. optType === 'regionchange' && (
  1084. eventType === 'begin' ||
  1085. eventType === 'end');
  1086. }
  1087. function getContextVm(vm) {
  1088. var $parent = vm.$parent;
  1089. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1090. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1091. $parent = $parent.$parent;
  1092. }
  1093. return $parent && $parent.$parent;
  1094. }
  1095. function handleEvent(event) {var _this = this;
  1096. event = wrapper$1(event);
  1097. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1098. var dataset = (event.currentTarget || event.target).dataset;
  1099. if (!dataset) {
  1100. return console.warn('事件信息不存在');
  1101. }
  1102. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1103. if (!eventOpts) {
  1104. return console.warn('事件信息不存在');
  1105. }
  1106. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1107. var eventType = event.type;
  1108. var ret = [];
  1109. eventOpts.forEach(function (eventOpt) {
  1110. var type = eventOpt[0];
  1111. var eventsArray = eventOpt[1];
  1112. var isCustom = type.charAt(0) === CUSTOM;
  1113. type = isCustom ? type.slice(1) : type;
  1114. var isOnce = type.charAt(0) === ONCE;
  1115. type = isOnce ? type.slice(1) : type;
  1116. if (eventsArray && isMatchEventType(eventType, type)) {
  1117. eventsArray.forEach(function (eventArray) {
  1118. var methodName = eventArray[0];
  1119. if (methodName) {
  1120. var handlerCtx = _this.$vm;
  1121. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1122. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1123. }
  1124. if (methodName === '$emit') {
  1125. handlerCtx.$emit.apply(handlerCtx,
  1126. processEventArgs(
  1127. _this.$vm,
  1128. event,
  1129. eventArray[1],
  1130. eventArray[2],
  1131. isCustom,
  1132. methodName));
  1133. return;
  1134. }
  1135. var handler = handlerCtx[methodName];
  1136. if (!isFn(handler)) {
  1137. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1138. }
  1139. if (isOnce) {
  1140. if (handler.once) {
  1141. return;
  1142. }
  1143. handler.once = true;
  1144. }
  1145. var params = processEventArgs(
  1146. _this.$vm,
  1147. event,
  1148. eventArray[1],
  1149. eventArray[2],
  1150. isCustom,
  1151. methodName);
  1152. params = Array.isArray(params) ? params : [];
  1153. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1154. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1155. // eslint-disable-next-line no-sparse-arrays
  1156. params = params.concat([,,,,,,,,,, event]);
  1157. }
  1158. ret.push(handler.apply(handlerCtx, params));
  1159. }
  1160. });
  1161. }
  1162. });
  1163. if (
  1164. eventType === 'input' &&
  1165. ret.length === 1 &&
  1166. typeof ret[0] !== 'undefined')
  1167. {
  1168. return ret[0];
  1169. }
  1170. }
  1171. var messages = {};
  1172. var locale;
  1173. {
  1174. locale = wx.getSystemInfoSync().language;
  1175. }
  1176. function initI18nMessages() {
  1177. if (!isEnableLocale()) {
  1178. return;
  1179. }
  1180. var localeKeys = Object.keys(__uniConfig.locales);
  1181. if (localeKeys.length) {
  1182. localeKeys.forEach(function (locale) {
  1183. var curMessages = messages[locale];
  1184. var userMessages = __uniConfig.locales[locale];
  1185. if (curMessages) {
  1186. Object.assign(curMessages, userMessages);
  1187. } else {
  1188. messages[locale] = userMessages;
  1189. }
  1190. });
  1191. }
  1192. }
  1193. initI18nMessages();
  1194. var i18n = (0, _uniI18n.initVueI18n)(
  1195. locale,
  1196. {});
  1197. var t = i18n.t;
  1198. var i18nMixin = i18n.mixin = {
  1199. beforeCreate: function beforeCreate() {var _this2 = this;
  1200. var unwatch = i18n.i18n.watchLocale(function () {
  1201. _this2.$forceUpdate();
  1202. });
  1203. this.$once('hook:beforeDestroy', function () {
  1204. unwatch();
  1205. });
  1206. },
  1207. methods: {
  1208. $$t: function $$t(key, values) {
  1209. return t(key, values);
  1210. } } };
  1211. var setLocale$1 = i18n.setLocale;
  1212. var getLocale$1 = i18n.getLocale;
  1213. function initAppLocale(Vue, appVm, locale) {
  1214. var state = Vue.observable({
  1215. locale: locale || i18n.getLocale() });
  1216. var localeWatchers = [];
  1217. appVm.$watchLocale = function (fn) {
  1218. localeWatchers.push(fn);
  1219. };
  1220. Object.defineProperty(appVm, '$locale', {
  1221. get: function get() {
  1222. return state.locale;
  1223. },
  1224. set: function set(v) {
  1225. state.locale = v;
  1226. localeWatchers.forEach(function (watch) {return watch(v);});
  1227. } });
  1228. }
  1229. function isEnableLocale() {
  1230. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1231. }
  1232. // export function initI18n() {
  1233. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1234. // if (localeKeys.length) {
  1235. // localeKeys.forEach((locale) =>
  1236. // i18n.add(locale, __uniConfig.locales[locale])
  1237. // )
  1238. // }
  1239. // }
  1240. var eventChannels = {};
  1241. var eventChannelStack = [];
  1242. function getEventChannel(id) {
  1243. if (id) {
  1244. var eventChannel = eventChannels[id];
  1245. delete eventChannels[id];
  1246. return eventChannel;
  1247. }
  1248. return eventChannelStack.shift();
  1249. }
  1250. var hooks = [
  1251. 'onShow',
  1252. 'onHide',
  1253. 'onError',
  1254. 'onPageNotFound',
  1255. 'onThemeChange',
  1256. 'onUnhandledRejection'];
  1257. function initEventChannel() {
  1258. _vue.default.prototype.getOpenerEventChannel = function () {
  1259. // 微信小程序使用自身getOpenerEventChannel
  1260. {
  1261. return this.$scope.getOpenerEventChannel();
  1262. }
  1263. };
  1264. var callHook = _vue.default.prototype.__call_hook;
  1265. _vue.default.prototype.__call_hook = function (hook, args) {
  1266. if (hook === 'onLoad' && args && args.__id__) {
  1267. this.__eventChannel__ = getEventChannel(args.__id__);
  1268. delete args.__id__;
  1269. }
  1270. return callHook.call(this, hook, args);
  1271. };
  1272. }
  1273. function initScopedSlotsParams() {
  1274. var center = {};
  1275. var parents = {};
  1276. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1277. var has = center[vueId];
  1278. if (!has) {
  1279. parents[vueId] = this;
  1280. this.$on('hook:destroyed', function () {
  1281. delete parents[vueId];
  1282. });
  1283. }
  1284. return has;
  1285. };
  1286. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1287. var data = center[vueId];
  1288. if (data) {
  1289. var object = data[name] || {};
  1290. return key ? object[key] : object;
  1291. } else {
  1292. parents[vueId] = this;
  1293. this.$on('hook:destroyed', function () {
  1294. delete parents[vueId];
  1295. });
  1296. }
  1297. };
  1298. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1299. var vueIds = this.$options.propsData.vueId;
  1300. if (vueIds) {
  1301. var vueId = vueIds.split(',')[0];
  1302. var object = center[vueId] = center[vueId] || {};
  1303. object[name] = value;
  1304. if (parents[vueId]) {
  1305. parents[vueId].$forceUpdate();
  1306. }
  1307. }
  1308. };
  1309. _vue.default.mixin({
  1310. destroyed: function destroyed() {
  1311. var propsData = this.$options.propsData;
  1312. var vueId = propsData && propsData.vueId;
  1313. if (vueId) {
  1314. delete center[vueId];
  1315. delete parents[vueId];
  1316. }
  1317. } });
  1318. }
  1319. function parseBaseApp(vm, _ref3)
  1320. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1321. initEventChannel();
  1322. {
  1323. initScopedSlotsParams();
  1324. }
  1325. if (vm.$options.store) {
  1326. _vue.default.prototype.$store = vm.$options.store;
  1327. }
  1328. uniIdMixin(_vue.default);
  1329. _vue.default.prototype.mpHost = "mp-weixin";
  1330. _vue.default.mixin({
  1331. beforeCreate: function beforeCreate() {
  1332. if (!this.$options.mpType) {
  1333. return;
  1334. }
  1335. this.mpType = this.$options.mpType;
  1336. this.$mp = _defineProperty({
  1337. data: {} },
  1338. this.mpType, this.$options.mpInstance);
  1339. this.$scope = this.$options.mpInstance;
  1340. delete this.$options.mpType;
  1341. delete this.$options.mpInstance;
  1342. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1343. var app = getApp();
  1344. if (app.$vm && app.$vm.$i18n) {
  1345. this._i18n = app.$vm.$i18n;
  1346. }
  1347. }
  1348. if (this.mpType !== 'app') {
  1349. initRefs(this);
  1350. initMocks(this, mocks);
  1351. }
  1352. } });
  1353. var appOptions = {
  1354. onLaunch: function onLaunch(args) {
  1355. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1356. return;
  1357. }
  1358. {
  1359. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1360. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1361. }
  1362. }
  1363. this.$vm = vm;
  1364. this.$vm.$mp = {
  1365. app: this };
  1366. this.$vm.$scope = this;
  1367. // vm 上也挂载 globalData
  1368. this.$vm.globalData = this.globalData;
  1369. this.$vm._isMounted = true;
  1370. this.$vm.__call_hook('mounted', args);
  1371. this.$vm.__call_hook('onLaunch', args);
  1372. } };
  1373. // 兼容旧版本 globalData
  1374. appOptions.globalData = vm.$options.globalData || {};
  1375. // 将 methods 中的方法挂在 getApp() 中
  1376. var methods = vm.$options.methods;
  1377. if (methods) {
  1378. Object.keys(methods).forEach(function (name) {
  1379. appOptions[name] = methods[name];
  1380. });
  1381. }
  1382. initAppLocale(_vue.default, vm, wx.getSystemInfoSync().language || 'zh-Hans');
  1383. initHooks(appOptions, hooks);
  1384. return appOptions;
  1385. }
  1386. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1387. function findVmByVueId(vm, vuePid) {
  1388. var $children = vm.$children;
  1389. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1390. for (var i = $children.length - 1; i >= 0; i--) {
  1391. var childVm = $children[i];
  1392. if (childVm.$scope._$vueId === vuePid) {
  1393. return childVm;
  1394. }
  1395. }
  1396. // 反向递归查找
  1397. var parentVm;
  1398. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1399. parentVm = findVmByVueId($children[_i], vuePid);
  1400. if (parentVm) {
  1401. return parentVm;
  1402. }
  1403. }
  1404. }
  1405. function initBehavior(options) {
  1406. return Behavior(options);
  1407. }
  1408. function isPage() {
  1409. return !!this.route;
  1410. }
  1411. function initRelation(detail) {
  1412. this.triggerEvent('__l', detail);
  1413. }
  1414. function selectAllComponents(mpInstance, selector, $refs) {
  1415. var components = mpInstance.selectAllComponents(selector);
  1416. components.forEach(function (component) {
  1417. var ref = component.dataset.ref;
  1418. $refs[ref] = component.$vm || component;
  1419. {
  1420. if (component.dataset.vueGeneric === 'scoped') {
  1421. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1422. selectAllComponents(scopedComponent, selector, $refs);
  1423. });
  1424. }
  1425. }
  1426. });
  1427. }
  1428. function initRefs(vm) {
  1429. var mpInstance = vm.$scope;
  1430. Object.defineProperty(vm, '$refs', {
  1431. get: function get() {
  1432. var $refs = {};
  1433. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1434. // TODO 暂不考虑 for 中的 scoped
  1435. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1436. forComponents.forEach(function (component) {
  1437. var ref = component.dataset.ref;
  1438. if (!$refs[ref]) {
  1439. $refs[ref] = [];
  1440. }
  1441. $refs[ref].push(component.$vm || component);
  1442. });
  1443. return $refs;
  1444. } });
  1445. }
  1446. function handleLink(event) {var _ref4 =
  1447. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1448. var parentVm;
  1449. if (vuePid) {
  1450. parentVm = findVmByVueId(this.$vm, vuePid);
  1451. }
  1452. if (!parentVm) {
  1453. parentVm = this.$vm;
  1454. }
  1455. vueOptions.parent = parentVm;
  1456. }
  1457. function parseApp(vm) {
  1458. return parseBaseApp(vm, {
  1459. mocks: mocks,
  1460. initRefs: initRefs });
  1461. }
  1462. function createApp(vm) {
  1463. App(parseApp(vm));
  1464. return vm;
  1465. }
  1466. var encodeReserveRE = /[!'()*]/g;
  1467. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1468. var commaRE = /%2C/g;
  1469. // fixed encodeURIComponent which is more conformant to RFC3986:
  1470. // - escapes [!'()*]
  1471. // - preserve commas
  1472. var encode = function encode(str) {return encodeURIComponent(str).
  1473. replace(encodeReserveRE, encodeReserveReplacer).
  1474. replace(commaRE, ',');};
  1475. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1476. var res = obj ? Object.keys(obj).map(function (key) {
  1477. var val = obj[key];
  1478. if (val === undefined) {
  1479. return '';
  1480. }
  1481. if (val === null) {
  1482. return encodeStr(key);
  1483. }
  1484. if (Array.isArray(val)) {
  1485. var result = [];
  1486. val.forEach(function (val2) {
  1487. if (val2 === undefined) {
  1488. return;
  1489. }
  1490. if (val2 === null) {
  1491. result.push(encodeStr(key));
  1492. } else {
  1493. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1494. }
  1495. });
  1496. return result.join('&');
  1497. }
  1498. return encodeStr(key) + '=' + encodeStr(val);
  1499. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1500. return res ? "?".concat(res) : '';
  1501. }
  1502. function parseBaseComponent(vueComponentOptions)
  1503. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1504. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1505. var options = _objectSpread({
  1506. multipleSlots: true,
  1507. addGlobalClass: true },
  1508. vueOptions.options || {});
  1509. {
  1510. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1511. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1512. Object.assign(options, vueOptions['mp-weixin'].options);
  1513. }
  1514. }
  1515. var componentOptions = {
  1516. options: options,
  1517. data: initData(vueOptions, _vue.default.prototype),
  1518. behaviors: initBehaviors(vueOptions, initBehavior),
  1519. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1520. lifetimes: {
  1521. attached: function attached() {
  1522. var properties = this.properties;
  1523. var options = {
  1524. mpType: isPage.call(this) ? 'page' : 'component',
  1525. mpInstance: this,
  1526. propsData: properties };
  1527. initVueIds(properties.vueId, this);
  1528. // 处理父子关系
  1529. initRelation.call(this, {
  1530. vuePid: this._$vuePid,
  1531. vueOptions: options });
  1532. // 初始化 vue 实例
  1533. this.$vm = new VueComponent(options);
  1534. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1535. initSlots(this.$vm, properties.vueSlots);
  1536. // 触发首次 setData
  1537. this.$vm.$mount();
  1538. },
  1539. ready: function ready() {
  1540. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1541. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1542. if (this.$vm) {
  1543. this.$vm._isMounted = true;
  1544. this.$vm.__call_hook('mounted');
  1545. this.$vm.__call_hook('onReady');
  1546. }
  1547. },
  1548. detached: function detached() {
  1549. this.$vm && this.$vm.$destroy();
  1550. } },
  1551. pageLifetimes: {
  1552. show: function show(args) {
  1553. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1554. },
  1555. hide: function hide() {
  1556. this.$vm && this.$vm.__call_hook('onPageHide');
  1557. },
  1558. resize: function resize(size) {
  1559. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1560. } },
  1561. methods: {
  1562. __l: handleLink,
  1563. __e: handleEvent } };
  1564. // externalClasses
  1565. if (vueOptions.externalClasses) {
  1566. componentOptions.externalClasses = vueOptions.externalClasses;
  1567. }
  1568. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1569. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1570. componentOptions.methods[callMethod] = function (args) {
  1571. return this.$vm[callMethod](args);
  1572. };
  1573. });
  1574. }
  1575. if (isPage) {
  1576. return componentOptions;
  1577. }
  1578. return [componentOptions, VueComponent];
  1579. }
  1580. function parseComponent(vueComponentOptions) {
  1581. return parseBaseComponent(vueComponentOptions, {
  1582. isPage: isPage,
  1583. initRelation: initRelation });
  1584. }
  1585. var hooks$1 = [
  1586. 'onShow',
  1587. 'onHide',
  1588. 'onUnload'];
  1589. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1590. function parseBasePage(vuePageOptions, _ref6)
  1591. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1592. var pageOptions = parseComponent(vuePageOptions);
  1593. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1594. pageOptions.methods.onLoad = function (query) {
  1595. this.options = query;
  1596. var copyQuery = Object.assign({}, query);
  1597. delete copyQuery.__id__;
  1598. this.$page = {
  1599. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1600. this.$vm.$mp.query = query; // 兼容 mpvue
  1601. this.$vm.__call_hook('onLoad', query);
  1602. };
  1603. return pageOptions;
  1604. }
  1605. function parsePage(vuePageOptions) {
  1606. return parseBasePage(vuePageOptions, {
  1607. isPage: isPage,
  1608. initRelation: initRelation });
  1609. }
  1610. function createPage(vuePageOptions) {
  1611. {
  1612. return Component(parsePage(vuePageOptions));
  1613. }
  1614. }
  1615. function createComponent(vueOptions) {
  1616. {
  1617. return Component(parseComponent(vueOptions));
  1618. }
  1619. }
  1620. function createSubpackageApp(vm) {
  1621. var appOptions = parseApp(vm);
  1622. var app = getApp({
  1623. allowDefault: true });
  1624. vm.$scope = app;
  1625. var globalData = app.globalData;
  1626. if (globalData) {
  1627. Object.keys(appOptions.globalData).forEach(function (name) {
  1628. if (!hasOwn(globalData, name)) {
  1629. globalData[name] = appOptions.globalData[name];
  1630. }
  1631. });
  1632. }
  1633. Object.keys(appOptions).forEach(function (name) {
  1634. if (!hasOwn(app, name)) {
  1635. app[name] = appOptions[name];
  1636. }
  1637. });
  1638. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1639. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1640. vm.__call_hook('onShow', args);
  1641. });
  1642. }
  1643. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1644. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1645. vm.__call_hook('onHide', args);
  1646. });
  1647. }
  1648. if (isFn(appOptions.onLaunch)) {
  1649. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1650. vm.__call_hook('onLaunch', args);
  1651. }
  1652. return vm;
  1653. }
  1654. function createPlugin(vm) {
  1655. var appOptions = parseApp(vm);
  1656. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1657. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  1658. appOptions.onShow.apply(vm, args);
  1659. });
  1660. }
  1661. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1662. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  1663. appOptions.onHide.apply(vm, args);
  1664. });
  1665. }
  1666. if (isFn(appOptions.onLaunch)) {
  1667. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1668. appOptions.onLaunch.call(vm, args);
  1669. }
  1670. return vm;
  1671. }
  1672. todos.forEach(function (todoApi) {
  1673. protocols[todoApi] = false;
  1674. });
  1675. canIUses.forEach(function (canIUseApi) {
  1676. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1677. canIUseApi;
  1678. if (!wx.canIUse(apiName)) {
  1679. protocols[canIUseApi] = false;
  1680. }
  1681. });
  1682. var uni = {};
  1683. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1684. uni = new Proxy({}, {
  1685. get: function get(target, name) {
  1686. if (hasOwn(target, name)) {
  1687. return target[name];
  1688. }
  1689. if (baseApi[name]) {
  1690. return baseApi[name];
  1691. }
  1692. if (api[name]) {
  1693. return promisify(name, api[name]);
  1694. }
  1695. {
  1696. if (extraApi[name]) {
  1697. return promisify(name, extraApi[name]);
  1698. }
  1699. if (todoApis[name]) {
  1700. return promisify(name, todoApis[name]);
  1701. }
  1702. }
  1703. if (eventApi[name]) {
  1704. return eventApi[name];
  1705. }
  1706. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1707. return;
  1708. }
  1709. return promisify(name, wrapper(name, wx[name]));
  1710. },
  1711. set: function set(target, name, value) {
  1712. target[name] = value;
  1713. return true;
  1714. } });
  1715. } else {
  1716. Object.keys(baseApi).forEach(function (name) {
  1717. uni[name] = baseApi[name];
  1718. });
  1719. {
  1720. Object.keys(todoApis).forEach(function (name) {
  1721. uni[name] = promisify(name, todoApis[name]);
  1722. });
  1723. Object.keys(extraApi).forEach(function (name) {
  1724. uni[name] = promisify(name, todoApis[name]);
  1725. });
  1726. }
  1727. Object.keys(eventApi).forEach(function (name) {
  1728. uni[name] = eventApi[name];
  1729. });
  1730. Object.keys(api).forEach(function (name) {
  1731. uni[name] = promisify(name, api[name]);
  1732. });
  1733. Object.keys(wx).forEach(function (name) {
  1734. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1735. uni[name] = promisify(name, wrapper(name, wx[name]));
  1736. }
  1737. });
  1738. }
  1739. wx.createApp = createApp;
  1740. wx.createPage = createPage;
  1741. wx.createComponent = createComponent;
  1742. wx.createSubpackageApp = createSubpackageApp;
  1743. wx.createPlugin = createPlugin;
  1744. var uni$1 = uni;var _default =
  1745. uni$1;exports.default = _default;
  1746. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  1747. /***/ }),
  1748. /***/ 109:
  1749. /*!***********************************************************************************************************!*\
  1750. !*** C:/Users/10428/Desktop/框架源码/微前端/代码/magazine-web/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  1751. \***********************************************************************************************************/
  1752. /*! no static exports found */
  1753. /***/ (function(module, exports, __webpack_require__) {
  1754. "use strict";
  1755. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  1756. "id": "2852637",
  1757. "name": "uniui图标库",
  1758. "font_family": "uniicons",
  1759. "css_prefix_text": "uniui-",
  1760. "description": "",
  1761. "glyphs": [
  1762. {
  1763. "icon_id": "25027049",
  1764. "name": "yanse",
  1765. "font_class": "color",
  1766. "unicode": "e6cf",
  1767. "unicode_decimal": 59087 },
  1768. {
  1769. "icon_id": "25027048",
  1770. "name": "wallet",
  1771. "font_class": "wallet",
  1772. "unicode": "e6b1",
  1773. "unicode_decimal": 59057 },
  1774. {
  1775. "icon_id": "25015720",
  1776. "name": "settings-filled",
  1777. "font_class": "settings-filled",
  1778. "unicode": "e6ce",
  1779. "unicode_decimal": 59086 },
  1780. {
  1781. "icon_id": "25015434",
  1782. "name": "shimingrenzheng-filled",
  1783. "font_class": "auth-filled",
  1784. "unicode": "e6cc",
  1785. "unicode_decimal": 59084 },
  1786. {
  1787. "icon_id": "24934246",
  1788. "name": "shop-filled",
  1789. "font_class": "shop-filled",
  1790. "unicode": "e6cd",
  1791. "unicode_decimal": 59085 },
  1792. {
  1793. "icon_id": "24934159",
  1794. "name": "staff-filled-01",
  1795. "font_class": "staff-filled",
  1796. "unicode": "e6cb",
  1797. "unicode_decimal": 59083 },
  1798. {
  1799. "icon_id": "24932461",
  1800. "name": "VIP-filled",
  1801. "font_class": "vip-filled",
  1802. "unicode": "e6c6",
  1803. "unicode_decimal": 59078 },
  1804. {
  1805. "icon_id": "24932462",
  1806. "name": "plus_circle_fill",
  1807. "font_class": "plus-filled",
  1808. "unicode": "e6c7",
  1809. "unicode_decimal": 59079 },
  1810. {
  1811. "icon_id": "24932463",
  1812. "name": "folder_add-filled",
  1813. "font_class": "folder-add-filled",
  1814. "unicode": "e6c8",
  1815. "unicode_decimal": 59080 },
  1816. {
  1817. "icon_id": "24932464",
  1818. "name": "yanse-filled",
  1819. "font_class": "color-filled",
  1820. "unicode": "e6c9",
  1821. "unicode_decimal": 59081 },
  1822. {
  1823. "icon_id": "24932465",
  1824. "name": "tune-filled",
  1825. "font_class": "tune-filled",
  1826. "unicode": "e6ca",
  1827. "unicode_decimal": 59082 },
  1828. {
  1829. "icon_id": "24932455",
  1830. "name": "a-rilidaka-filled",
  1831. "font_class": "calendar-filled",
  1832. "unicode": "e6c0",
  1833. "unicode_decimal": 59072 },
  1834. {
  1835. "icon_id": "24932456",
  1836. "name": "notification-filled",
  1837. "font_class": "notification-filled",
  1838. "unicode": "e6c1",
  1839. "unicode_decimal": 59073 },
  1840. {
  1841. "icon_id": "24932457",
  1842. "name": "wallet-filled",
  1843. "font_class": "wallet-filled",
  1844. "unicode": "e6c2",
  1845. "unicode_decimal": 59074 },
  1846. {
  1847. "icon_id": "24932458",
  1848. "name": "paihangbang-filled",
  1849. "font_class": "medal-filled",
  1850. "unicode": "e6c3",
  1851. "unicode_decimal": 59075 },
  1852. {
  1853. "icon_id": "24932459",
  1854. "name": "gift-filled",
  1855. "font_class": "gift-filled",
  1856. "unicode": "e6c4",
  1857. "unicode_decimal": 59076 },
  1858. {
  1859. "icon_id": "24932460",
  1860. "name": "fire-filled",
  1861. "font_class": "fire-filled",
  1862. "unicode": "e6c5",
  1863. "unicode_decimal": 59077 },
  1864. {
  1865. "icon_id": "24928001",
  1866. "name": "refreshempty",
  1867. "font_class": "refreshempty",
  1868. "unicode": "e6bf",
  1869. "unicode_decimal": 59071 },
  1870. {
  1871. "icon_id": "24926853",
  1872. "name": "location-ellipse",
  1873. "font_class": "location-filled",
  1874. "unicode": "e6af",
  1875. "unicode_decimal": 59055 },
  1876. {
  1877. "icon_id": "24926735",
  1878. "name": "person-filled",
  1879. "font_class": "person-filled",
  1880. "unicode": "e69d",
  1881. "unicode_decimal": 59037 },
  1882. {
  1883. "icon_id": "24926703",
  1884. "name": "personadd-filled",
  1885. "font_class": "personadd-filled",
  1886. "unicode": "e698",
  1887. "unicode_decimal": 59032 },
  1888. {
  1889. "icon_id": "24923351",
  1890. "name": "back",
  1891. "font_class": "back",
  1892. "unicode": "e6b9",
  1893. "unicode_decimal": 59065 },
  1894. {
  1895. "icon_id": "24923352",
  1896. "name": "forward",
  1897. "font_class": "forward",
  1898. "unicode": "e6ba",
  1899. "unicode_decimal": 59066 },
  1900. {
  1901. "icon_id": "24923353",
  1902. "name": "arrowthinright",
  1903. "font_class": "arrow-right",
  1904. "unicode": "e6bb",
  1905. "unicode_decimal": 59067 },
  1906. {
  1907. "icon_id": "24923353",
  1908. "name": "arrowthinright",
  1909. "font_class": "arrowthinright",
  1910. "unicode": "e6bb",
  1911. "unicode_decimal": 59067 },
  1912. {
  1913. "icon_id": "24923354",
  1914. "name": "arrowthinleft",
  1915. "font_class": "arrow-left",
  1916. "unicode": "e6bc",
  1917. "unicode_decimal": 59068 },
  1918. {
  1919. "icon_id": "24923354",
  1920. "name": "arrowthinleft",
  1921. "font_class": "arrowthinleft",
  1922. "unicode": "e6bc",
  1923. "unicode_decimal": 59068 },
  1924. {
  1925. "icon_id": "24923355",
  1926. "name": "arrowthinup",
  1927. "font_class": "arrow-up",
  1928. "unicode": "e6bd",
  1929. "unicode_decimal": 59069 },
  1930. {
  1931. "icon_id": "24923355",
  1932. "name": "arrowthinup",
  1933. "font_class": "arrowthinup",
  1934. "unicode": "e6bd",
  1935. "unicode_decimal": 59069 },
  1936. {
  1937. "icon_id": "24923356",
  1938. "name": "arrowthindown",
  1939. "font_class": "arrow-down",
  1940. "unicode": "e6be",
  1941. "unicode_decimal": 59070 },
  1942. {
  1943. "icon_id": "24923356",
  1944. "name": "arrowthindown",
  1945. "font_class": "arrowthindown",
  1946. "unicode": "e6be",
  1947. "unicode_decimal": 59070 },
  1948. {
  1949. "icon_id": "24923349",
  1950. "name": "arrowdown",
  1951. "font_class": "bottom",
  1952. "unicode": "e6b8",
  1953. "unicode_decimal": 59064 },
  1954. {
  1955. "icon_id": "24923349",
  1956. "name": "arrowdown",
  1957. "font_class": "arrowdown",
  1958. "unicode": "e6b8",
  1959. "unicode_decimal": 59064 },
  1960. {
  1961. "icon_id": "24923346",
  1962. "name": "arrowright",
  1963. "font_class": "right",
  1964. "unicode": "e6b5",
  1965. "unicode_decimal": 59061 },
  1966. {
  1967. "icon_id": "24923346",
  1968. "name": "arrowright",
  1969. "font_class": "arrowright",
  1970. "unicode": "e6b5",
  1971. "unicode_decimal": 59061 },
  1972. {
  1973. "icon_id": "24923347",
  1974. "name": "arrowup",
  1975. "font_class": "top",
  1976. "unicode": "e6b6",
  1977. "unicode_decimal": 59062 },
  1978. {
  1979. "icon_id": "24923347",
  1980. "name": "arrowup",
  1981. "font_class": "arrowup",
  1982. "unicode": "e6b6",
  1983. "unicode_decimal": 59062 },
  1984. {
  1985. "icon_id": "24923348",
  1986. "name": "arrowleft",
  1987. "font_class": "left",
  1988. "unicode": "e6b7",
  1989. "unicode_decimal": 59063 },
  1990. {
  1991. "icon_id": "24923348",
  1992. "name": "arrowleft",
  1993. "font_class": "arrowleft",
  1994. "unicode": "e6b7",
  1995. "unicode_decimal": 59063 },
  1996. {
  1997. "icon_id": "24923334",
  1998. "name": "eye",
  1999. "font_class": "eye",
  2000. "unicode": "e651",
  2001. "unicode_decimal": 58961 },
  2002. {
  2003. "icon_id": "24923335",
  2004. "name": "eye-filled",
  2005. "font_class": "eye-filled",
  2006. "unicode": "e66a",
  2007. "unicode_decimal": 58986 },
  2008. {
  2009. "icon_id": "24923336",
  2010. "name": "eye-slash",
  2011. "font_class": "eye-slash",
  2012. "unicode": "e6b3",
  2013. "unicode_decimal": 59059 },
  2014. {
  2015. "icon_id": "24923337",
  2016. "name": "eye-slash-filled",
  2017. "font_class": "eye-slash-filled",
  2018. "unicode": "e6b4",
  2019. "unicode_decimal": 59060 },
  2020. {
  2021. "icon_id": "24923305",
  2022. "name": "info-filled",
  2023. "font_class": "info-filled",
  2024. "unicode": "e649",
  2025. "unicode_decimal": 58953 },
  2026. {
  2027. "icon_id": "24923299",
  2028. "name": "reload-01",
  2029. "font_class": "reload",
  2030. "unicode": "e6b2",
  2031. "unicode_decimal": 59058 },
  2032. {
  2033. "icon_id": "24923195",
  2034. "name": "mic_slash_fill",
  2035. "font_class": "micoff-filled",
  2036. "unicode": "e6b0",
  2037. "unicode_decimal": 59056 },
  2038. {
  2039. "icon_id": "24923165",
  2040. "name": "map-pin-ellipse",
  2041. "font_class": "map-pin-ellipse",
  2042. "unicode": "e6ac",
  2043. "unicode_decimal": 59052 },
  2044. {
  2045. "icon_id": "24923166",
  2046. "name": "map-pin",
  2047. "font_class": "map-pin",
  2048. "unicode": "e6ad",
  2049. "unicode_decimal": 59053 },
  2050. {
  2051. "icon_id": "24923167",
  2052. "name": "location",
  2053. "font_class": "location",
  2054. "unicode": "e6ae",
  2055. "unicode_decimal": 59054 },
  2056. {
  2057. "icon_id": "24923064",
  2058. "name": "starhalf",
  2059. "font_class": "starhalf",
  2060. "unicode": "e683",
  2061. "unicode_decimal": 59011 },
  2062. {
  2063. "icon_id": "24923065",
  2064. "name": "star",
  2065. "font_class": "star",
  2066. "unicode": "e688",
  2067. "unicode_decimal": 59016 },
  2068. {
  2069. "icon_id": "24923066",
  2070. "name": "star-filled",
  2071. "font_class": "star-filled",
  2072. "unicode": "e68f",
  2073. "unicode_decimal": 59023 },
  2074. {
  2075. "icon_id": "24899646",
  2076. "name": "a-rilidaka",
  2077. "font_class": "calendar",
  2078. "unicode": "e6a0",
  2079. "unicode_decimal": 59040 },
  2080. {
  2081. "icon_id": "24899647",
  2082. "name": "fire",
  2083. "font_class": "fire",
  2084. "unicode": "e6a1",
  2085. "unicode_decimal": 59041 },
  2086. {
  2087. "icon_id": "24899648",
  2088. "name": "paihangbang",
  2089. "font_class": "medal",
  2090. "unicode": "e6a2",
  2091. "unicode_decimal": 59042 },
  2092. {
  2093. "icon_id": "24899649",
  2094. "name": "font",
  2095. "font_class": "font",
  2096. "unicode": "e6a3",
  2097. "unicode_decimal": 59043 },
  2098. {
  2099. "icon_id": "24899650",
  2100. "name": "gift",
  2101. "font_class": "gift",
  2102. "unicode": "e6a4",
  2103. "unicode_decimal": 59044 },
  2104. {
  2105. "icon_id": "24899651",
  2106. "name": "link",
  2107. "font_class": "link",
  2108. "unicode": "e6a5",
  2109. "unicode_decimal": 59045 },
  2110. {
  2111. "icon_id": "24899652",
  2112. "name": "notification",
  2113. "font_class": "notification",
  2114. "unicode": "e6a6",
  2115. "unicode_decimal": 59046 },
  2116. {
  2117. "icon_id": "24899653",
  2118. "name": "staff",
  2119. "font_class": "staff",
  2120. "unicode": "e6a7",
  2121. "unicode_decimal": 59047 },
  2122. {
  2123. "icon_id": "24899654",
  2124. "name": "VIP",
  2125. "font_class": "vip",
  2126. "unicode": "e6a8",
  2127. "unicode_decimal": 59048 },
  2128. {
  2129. "icon_id": "24899655",
  2130. "name": "folder_add",
  2131. "font_class": "folder-add",
  2132. "unicode": "e6a9",
  2133. "unicode_decimal": 59049 },
  2134. {
  2135. "icon_id": "24899656",
  2136. "name": "tune",
  2137. "font_class": "tune",
  2138. "unicode": "e6aa",
  2139. "unicode_decimal": 59050 },
  2140. {
  2141. "icon_id": "24899657",
  2142. "name": "shimingrenzheng",
  2143. "font_class": "auth",
  2144. "unicode": "e6ab",
  2145. "unicode_decimal": 59051 },
  2146. {
  2147. "icon_id": "24899565",
  2148. "name": "person",
  2149. "font_class": "person",
  2150. "unicode": "e699",
  2151. "unicode_decimal": 59033 },
  2152. {
  2153. "icon_id": "24899566",
  2154. "name": "email-filled",
  2155. "font_class": "email-filled",
  2156. "unicode": "e69a",
  2157. "unicode_decimal": 59034 },
  2158. {
  2159. "icon_id": "24899567",
  2160. "name": "phone-filled",
  2161. "font_class": "phone-filled",
  2162. "unicode": "e69b",
  2163. "unicode_decimal": 59035 },
  2164. {
  2165. "icon_id": "24899568",
  2166. "name": "phone",
  2167. "font_class": "phone",
  2168. "unicode": "e69c",
  2169. "unicode_decimal": 59036 },
  2170. {
  2171. "icon_id": "24899570",
  2172. "name": "email",
  2173. "font_class": "email",
  2174. "unicode": "e69e",
  2175. "unicode_decimal": 59038 },
  2176. {
  2177. "icon_id": "24899571",
  2178. "name": "personadd",
  2179. "font_class": "personadd",
  2180. "unicode": "e69f",
  2181. "unicode_decimal": 59039 },
  2182. {
  2183. "icon_id": "24899558",
  2184. "name": "chatboxes-filled",
  2185. "font_class": "chatboxes-filled",
  2186. "unicode": "e692",
  2187. "unicode_decimal": 59026 },
  2188. {
  2189. "icon_id": "24899559",
  2190. "name": "contact",
  2191. "font_class": "contact",
  2192. "unicode": "e693",
  2193. "unicode_decimal": 59027 },
  2194. {
  2195. "icon_id": "24899560",
  2196. "name": "chatbubble-filled",
  2197. "font_class": "chatbubble-filled",
  2198. "unicode": "e694",
  2199. "unicode_decimal": 59028 },
  2200. {
  2201. "icon_id": "24899561",
  2202. "name": "contact-filled",
  2203. "font_class": "contact-filled",
  2204. "unicode": "e695",
  2205. "unicode_decimal": 59029 },
  2206. {
  2207. "icon_id": "24899562",
  2208. "name": "chatboxes",
  2209. "font_class": "chatboxes",
  2210. "unicode": "e696",
  2211. "unicode_decimal": 59030 },
  2212. {
  2213. "icon_id": "24899563",
  2214. "name": "chatbubble",
  2215. "font_class": "chatbubble",
  2216. "unicode": "e697",
  2217. "unicode_decimal": 59031 },
  2218. {
  2219. "icon_id": "24881290",
  2220. "name": "upload-filled",
  2221. "font_class": "upload-filled",
  2222. "unicode": "e68e",
  2223. "unicode_decimal": 59022 },
  2224. {
  2225. "icon_id": "24881292",
  2226. "name": "upload",
  2227. "font_class": "upload",
  2228. "unicode": "e690",
  2229. "unicode_decimal": 59024 },
  2230. {
  2231. "icon_id": "24881293",
  2232. "name": "weixin",
  2233. "font_class": "weixin",
  2234. "unicode": "e691",
  2235. "unicode_decimal": 59025 },
  2236. {
  2237. "icon_id": "24881274",
  2238. "name": "compose",
  2239. "font_class": "compose",
  2240. "unicode": "e67f",
  2241. "unicode_decimal": 59007 },
  2242. {
  2243. "icon_id": "24881275",
  2244. "name": "qq",
  2245. "font_class": "qq",
  2246. "unicode": "e680",
  2247. "unicode_decimal": 59008 },
  2248. {
  2249. "icon_id": "24881276",
  2250. "name": "download-filled",
  2251. "font_class": "download-filled",
  2252. "unicode": "e681",
  2253. "unicode_decimal": 59009 },
  2254. {
  2255. "icon_id": "24881277",
  2256. "name": "pengyouquan",
  2257. "font_class": "pyq",
  2258. "unicode": "e682",
  2259. "unicode_decimal": 59010 },
  2260. {
  2261. "icon_id": "24881279",
  2262. "name": "sound",
  2263. "font_class": "sound",
  2264. "unicode": "e684",
  2265. "unicode_decimal": 59012 },
  2266. {
  2267. "icon_id": "24881280",
  2268. "name": "trash-filled",
  2269. "font_class": "trash-filled",
  2270. "unicode": "e685",
  2271. "unicode_decimal": 59013 },
  2272. {
  2273. "icon_id": "24881281",
  2274. "name": "sound-filled",
  2275. "font_class": "sound-filled",
  2276. "unicode": "e686",
  2277. "unicode_decimal": 59014 },
  2278. {
  2279. "icon_id": "24881282",
  2280. "name": "trash",
  2281. "font_class": "trash",
  2282. "unicode": "e687",
  2283. "unicode_decimal": 59015 },
  2284. {
  2285. "icon_id": "24881284",
  2286. "name": "videocam-filled",
  2287. "font_class": "videocam-filled",
  2288. "unicode": "e689",
  2289. "unicode_decimal": 59017 },
  2290. {
  2291. "icon_id": "24881285",
  2292. "name": "spinner-cycle",
  2293. "font_class": "spinner-cycle",
  2294. "unicode": "e68a",
  2295. "unicode_decimal": 59018 },
  2296. {
  2297. "icon_id": "24881286",
  2298. "name": "weibo",
  2299. "font_class": "weibo",
  2300. "unicode": "e68b",
  2301. "unicode_decimal": 59019 },
  2302. {
  2303. "icon_id": "24881288",
  2304. "name": "videocam",
  2305. "font_class": "videocam",
  2306. "unicode": "e68c",
  2307. "unicode_decimal": 59020 },
  2308. {
  2309. "icon_id": "24881289",
  2310. "name": "download",
  2311. "font_class": "download",
  2312. "unicode": "e68d",
  2313. "unicode_decimal": 59021 },
  2314. {
  2315. "icon_id": "24879601",
  2316. "name": "help",
  2317. "font_class": "help",
  2318. "unicode": "e679",
  2319. "unicode_decimal": 59001 },
  2320. {
  2321. "icon_id": "24879602",
  2322. "name": "navigate-filled",
  2323. "font_class": "navigate-filled",
  2324. "unicode": "e67a",
  2325. "unicode_decimal": 59002 },
  2326. {
  2327. "icon_id": "24879603",
  2328. "name": "plusempty",
  2329. "font_class": "plusempty",
  2330. "unicode": "e67b",
  2331. "unicode_decimal": 59003 },
  2332. {
  2333. "icon_id": "24879604",
  2334. "name": "smallcircle",
  2335. "font_class": "smallcircle",
  2336. "unicode": "e67c",
  2337. "unicode_decimal": 59004 },
  2338. {
  2339. "icon_id": "24879605",
  2340. "name": "minus-filled",
  2341. "font_class": "minus-filled",
  2342. "unicode": "e67d",
  2343. "unicode_decimal": 59005 },
  2344. {
  2345. "icon_id": "24879606",
  2346. "name": "micoff",
  2347. "font_class": "micoff",
  2348. "unicode": "e67e",
  2349. "unicode_decimal": 59006 },
  2350. {
  2351. "icon_id": "24879588",
  2352. "name": "closeempty",
  2353. "font_class": "closeempty",
  2354. "unicode": "e66c",
  2355. "unicode_decimal": 58988 },
  2356. {
  2357. "icon_id": "24879589",
  2358. "name": "clear",
  2359. "font_class": "clear",
  2360. "unicode": "e66d",
  2361. "unicode_decimal": 58989 },
  2362. {
  2363. "icon_id": "24879590",
  2364. "name": "navigate",
  2365. "font_class": "navigate",
  2366. "unicode": "e66e",
  2367. "unicode_decimal": 58990 },
  2368. {
  2369. "icon_id": "24879591",
  2370. "name": "minus",
  2371. "font_class": "minus",
  2372. "unicode": "e66f",
  2373. "unicode_decimal": 58991 },
  2374. {
  2375. "icon_id": "24879592",
  2376. "name": "image",
  2377. "font_class": "image",
  2378. "unicode": "e670",
  2379. "unicode_decimal": 58992 },
  2380. {
  2381. "icon_id": "24879593",
  2382. "name": "mic",
  2383. "font_class": "mic",
  2384. "unicode": "e671",
  2385. "unicode_decimal": 58993 },
  2386. {
  2387. "icon_id": "24879594",
  2388. "name": "paperplane",
  2389. "font_class": "paperplane",
  2390. "unicode": "e672",
  2391. "unicode_decimal": 58994 },
  2392. {
  2393. "icon_id": "24879595",
  2394. "name": "close",
  2395. "font_class": "close",
  2396. "unicode": "e673",
  2397. "unicode_decimal": 58995 },
  2398. {
  2399. "icon_id": "24879596",
  2400. "name": "help-filled",
  2401. "font_class": "help-filled",
  2402. "unicode": "e674",
  2403. "unicode_decimal": 58996 },
  2404. {
  2405. "icon_id": "24879597",
  2406. "name": "plus-filled",
  2407. "font_class": "paperplane-filled",
  2408. "unicode": "e675",
  2409. "unicode_decimal": 58997 },
  2410. {
  2411. "icon_id": "24879598",
  2412. "name": "plus",
  2413. "font_class": "plus",
  2414. "unicode": "e676",
  2415. "unicode_decimal": 58998 },
  2416. {
  2417. "icon_id": "24879599",
  2418. "name": "mic-filled",
  2419. "font_class": "mic-filled",
  2420. "unicode": "e677",
  2421. "unicode_decimal": 58999 },
  2422. {
  2423. "icon_id": "24879600",
  2424. "name": "image-filled",
  2425. "font_class": "image-filled",
  2426. "unicode": "e678",
  2427. "unicode_decimal": 59000 },
  2428. {
  2429. "icon_id": "24855900",
  2430. "name": "locked-filled",
  2431. "font_class": "locked-filled",
  2432. "unicode": "e668",
  2433. "unicode_decimal": 58984 },
  2434. {
  2435. "icon_id": "24855901",
  2436. "name": "info",
  2437. "font_class": "info",
  2438. "unicode": "e669",
  2439. "unicode_decimal": 58985 },
  2440. {
  2441. "icon_id": "24855903",
  2442. "name": "locked",
  2443. "font_class": "locked",
  2444. "unicode": "e66b",
  2445. "unicode_decimal": 58987 },
  2446. {
  2447. "icon_id": "24855884",
  2448. "name": "camera-filled",
  2449. "font_class": "camera-filled",
  2450. "unicode": "e658",
  2451. "unicode_decimal": 58968 },
  2452. {
  2453. "icon_id": "24855885",
  2454. "name": "chat-filled",
  2455. "font_class": "chat-filled",
  2456. "unicode": "e659",
  2457. "unicode_decimal": 58969 },
  2458. {
  2459. "icon_id": "24855886",
  2460. "name": "camera",
  2461. "font_class": "camera",
  2462. "unicode": "e65a",
  2463. "unicode_decimal": 58970 },
  2464. {
  2465. "icon_id": "24855887",
  2466. "name": "circle",
  2467. "font_class": "circle",
  2468. "unicode": "e65b",
  2469. "unicode_decimal": 58971 },
  2470. {
  2471. "icon_id": "24855888",
  2472. "name": "checkmarkempty",
  2473. "font_class": "checkmarkempty",
  2474. "unicode": "e65c",
  2475. "unicode_decimal": 58972 },
  2476. {
  2477. "icon_id": "24855889",
  2478. "name": "chat",
  2479. "font_class": "chat",
  2480. "unicode": "e65d",
  2481. "unicode_decimal": 58973 },
  2482. {
  2483. "icon_id": "24855890",
  2484. "name": "circle-filled",
  2485. "font_class": "circle-filled",
  2486. "unicode": "e65e",
  2487. "unicode_decimal": 58974 },
  2488. {
  2489. "icon_id": "24855891",
  2490. "name": "flag",
  2491. "font_class": "flag",
  2492. "unicode": "e65f",
  2493. "unicode_decimal": 58975 },
  2494. {
  2495. "icon_id": "24855892",
  2496. "name": "flag-filled",
  2497. "font_class": "flag-filled",
  2498. "unicode": "e660",
  2499. "unicode_decimal": 58976 },
  2500. {
  2501. "icon_id": "24855893",
  2502. "name": "gear-filled",
  2503. "font_class": "gear-filled",
  2504. "unicode": "e661",
  2505. "unicode_decimal": 58977 },
  2506. {
  2507. "icon_id": "24855894",
  2508. "name": "home",
  2509. "font_class": "home",
  2510. "unicode": "e662",
  2511. "unicode_decimal": 58978 },
  2512. {
  2513. "icon_id": "24855895",
  2514. "name": "home-filled",
  2515. "font_class": "home-filled",
  2516. "unicode": "e663",
  2517. "unicode_decimal": 58979 },
  2518. {
  2519. "icon_id": "24855896",
  2520. "name": "gear",
  2521. "font_class": "gear",
  2522. "unicode": "e664",
  2523. "unicode_decimal": 58980 },
  2524. {
  2525. "icon_id": "24855897",
  2526. "name": "smallcircle-filled",
  2527. "font_class": "smallcircle-filled",
  2528. "unicode": "e665",
  2529. "unicode_decimal": 58981 },
  2530. {
  2531. "icon_id": "24855898",
  2532. "name": "map-filled",
  2533. "font_class": "map-filled",
  2534. "unicode": "e666",
  2535. "unicode_decimal": 58982 },
  2536. {
  2537. "icon_id": "24855899",
  2538. "name": "map",
  2539. "font_class": "map",
  2540. "unicode": "e667",
  2541. "unicode_decimal": 58983 },
  2542. {
  2543. "icon_id": "24855825",
  2544. "name": "refresh-filled",
  2545. "font_class": "refresh-filled",
  2546. "unicode": "e656",
  2547. "unicode_decimal": 58966 },
  2548. {
  2549. "icon_id": "24855826",
  2550. "name": "refresh",
  2551. "font_class": "refresh",
  2552. "unicode": "e657",
  2553. "unicode_decimal": 58967 },
  2554. {
  2555. "icon_id": "24855808",
  2556. "name": "cloud-upload",
  2557. "font_class": "cloud-upload",
  2558. "unicode": "e645",
  2559. "unicode_decimal": 58949 },
  2560. {
  2561. "icon_id": "24855809",
  2562. "name": "cloud-download-filled",
  2563. "font_class": "cloud-download-filled",
  2564. "unicode": "e646",
  2565. "unicode_decimal": 58950 },
  2566. {
  2567. "icon_id": "24855810",
  2568. "name": "cloud-download",
  2569. "font_class": "cloud-download",
  2570. "unicode": "e647",
  2571. "unicode_decimal": 58951 },
  2572. {
  2573. "icon_id": "24855811",
  2574. "name": "cloud-upload-filled",
  2575. "font_class": "cloud-upload-filled",
  2576. "unicode": "e648",
  2577. "unicode_decimal": 58952 },
  2578. {
  2579. "icon_id": "24855813",
  2580. "name": "redo",
  2581. "font_class": "redo",
  2582. "unicode": "e64a",
  2583. "unicode_decimal": 58954 },
  2584. {
  2585. "icon_id": "24855814",
  2586. "name": "images-filled",
  2587. "font_class": "images-filled",
  2588. "unicode": "e64b",
  2589. "unicode_decimal": 58955 },
  2590. {
  2591. "icon_id": "24855815",
  2592. "name": "undo-filled",
  2593. "font_class": "undo-filled",
  2594. "unicode": "e64c",
  2595. "unicode_decimal": 58956 },
  2596. {
  2597. "icon_id": "24855816",
  2598. "name": "more",
  2599. "font_class": "more",
  2600. "unicode": "e64d",
  2601. "unicode_decimal": 58957 },
  2602. {
  2603. "icon_id": "24855817",
  2604. "name": "more-filled",
  2605. "font_class": "more-filled",
  2606. "unicode": "e64e",
  2607. "unicode_decimal": 58958 },
  2608. {
  2609. "icon_id": "24855818",
  2610. "name": "undo",
  2611. "font_class": "undo",
  2612. "unicode": "e64f",
  2613. "unicode_decimal": 58959 },
  2614. {
  2615. "icon_id": "24855819",
  2616. "name": "images",
  2617. "font_class": "images",
  2618. "unicode": "e650",
  2619. "unicode_decimal": 58960 },
  2620. {
  2621. "icon_id": "24855821",
  2622. "name": "paperclip",
  2623. "font_class": "paperclip",
  2624. "unicode": "e652",
  2625. "unicode_decimal": 58962 },
  2626. {
  2627. "icon_id": "24855822",
  2628. "name": "settings",
  2629. "font_class": "settings",
  2630. "unicode": "e653",
  2631. "unicode_decimal": 58963 },
  2632. {
  2633. "icon_id": "24855823",
  2634. "name": "search",
  2635. "font_class": "search",
  2636. "unicode": "e654",
  2637. "unicode_decimal": 58964 },
  2638. {
  2639. "icon_id": "24855824",
  2640. "name": "redo-filled",
  2641. "font_class": "redo-filled",
  2642. "unicode": "e655",
  2643. "unicode_decimal": 58965 },
  2644. {
  2645. "icon_id": "24841702",
  2646. "name": "list",
  2647. "font_class": "list",
  2648. "unicode": "e644",
  2649. "unicode_decimal": 58948 },
  2650. {
  2651. "icon_id": "24841489",
  2652. "name": "mail-open-filled",
  2653. "font_class": "mail-open-filled",
  2654. "unicode": "e63a",
  2655. "unicode_decimal": 58938 },
  2656. {
  2657. "icon_id": "24841491",
  2658. "name": "hand-thumbsdown-filled",
  2659. "font_class": "hand-down-filled",
  2660. "unicode": "e63c",
  2661. "unicode_decimal": 58940 },
  2662. {
  2663. "icon_id": "24841492",
  2664. "name": "hand-thumbsdown",
  2665. "font_class": "hand-down",
  2666. "unicode": "e63d",
  2667. "unicode_decimal": 58941 },
  2668. {
  2669. "icon_id": "24841493",
  2670. "name": "hand-thumbsup-filled",
  2671. "font_class": "hand-up-filled",
  2672. "unicode": "e63e",
  2673. "unicode_decimal": 58942 },
  2674. {
  2675. "icon_id": "24841494",
  2676. "name": "hand-thumbsup",
  2677. "font_class": "hand-up",
  2678. "unicode": "e63f",
  2679. "unicode_decimal": 58943 },
  2680. {
  2681. "icon_id": "24841496",
  2682. "name": "heart-filled",
  2683. "font_class": "heart-filled",
  2684. "unicode": "e641",
  2685. "unicode_decimal": 58945 },
  2686. {
  2687. "icon_id": "24841498",
  2688. "name": "mail-open",
  2689. "font_class": "mail-open",
  2690. "unicode": "e643",
  2691. "unicode_decimal": 58947 },
  2692. {
  2693. "icon_id": "24841488",
  2694. "name": "heart",
  2695. "font_class": "heart",
  2696. "unicode": "e639",
  2697. "unicode_decimal": 58937 },
  2698. {
  2699. "icon_id": "24839963",
  2700. "name": "loop",
  2701. "font_class": "loop",
  2702. "unicode": "e633",
  2703. "unicode_decimal": 58931 },
  2704. {
  2705. "icon_id": "24839866",
  2706. "name": "pulldown",
  2707. "font_class": "pulldown",
  2708. "unicode": "e632",
  2709. "unicode_decimal": 58930 },
  2710. {
  2711. "icon_id": "24813798",
  2712. "name": "scan",
  2713. "font_class": "scan",
  2714. "unicode": "e62a",
  2715. "unicode_decimal": 58922 },
  2716. {
  2717. "icon_id": "24813786",
  2718. "name": "bars",
  2719. "font_class": "bars",
  2720. "unicode": "e627",
  2721. "unicode_decimal": 58919 },
  2722. {
  2723. "icon_id": "24813788",
  2724. "name": "cart-filled",
  2725. "font_class": "cart-filled",
  2726. "unicode": "e629",
  2727. "unicode_decimal": 58921 },
  2728. {
  2729. "icon_id": "24813790",
  2730. "name": "checkbox",
  2731. "font_class": "checkbox",
  2732. "unicode": "e62b",
  2733. "unicode_decimal": 58923 },
  2734. {
  2735. "icon_id": "24813791",
  2736. "name": "checkbox-filled",
  2737. "font_class": "checkbox-filled",
  2738. "unicode": "e62c",
  2739. "unicode_decimal": 58924 },
  2740. {
  2741. "icon_id": "24813794",
  2742. "name": "shop",
  2743. "font_class": "shop",
  2744. "unicode": "e62f",
  2745. "unicode_decimal": 58927 },
  2746. {
  2747. "icon_id": "24813795",
  2748. "name": "headphones",
  2749. "font_class": "headphones",
  2750. "unicode": "e630",
  2751. "unicode_decimal": 58928 },
  2752. {
  2753. "icon_id": "24813796",
  2754. "name": "cart",
  2755. "font_class": "cart",
  2756. "unicode": "e631",
  2757. "unicode_decimal": 58929 }] };exports.default = _default;
  2758. /***/ }),
  2759. /***/ 11:
  2760. /*!**********************************************************************************************************!*\
  2761. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  2762. \**********************************************************************************************************/
  2763. /*! exports provided: default */
  2764. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2765. "use strict";
  2766. __webpack_require__.r(__webpack_exports__);
  2767. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  2768. /* globals __VUE_SSR_CONTEXT__ */
  2769. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  2770. // This module is a runtime utility for cleaner component module output and will
  2771. // be included in the final webpack user bundle.
  2772. function normalizeComponent (
  2773. scriptExports,
  2774. render,
  2775. staticRenderFns,
  2776. functionalTemplate,
  2777. injectStyles,
  2778. scopeId,
  2779. moduleIdentifier, /* server only */
  2780. shadowMode, /* vue-cli only */
  2781. components, // fixed by xxxxxx auto components
  2782. renderjs // fixed by xxxxxx renderjs
  2783. ) {
  2784. // Vue.extend constructor export interop
  2785. var options = typeof scriptExports === 'function'
  2786. ? scriptExports.options
  2787. : scriptExports
  2788. // fixed by xxxxxx auto components
  2789. if (components) {
  2790. if (!options.components) {
  2791. options.components = {}
  2792. }
  2793. var hasOwn = Object.prototype.hasOwnProperty
  2794. for (var name in components) {
  2795. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  2796. options.components[name] = components[name]
  2797. }
  2798. }
  2799. }
  2800. // fixed by xxxxxx renderjs
  2801. if (renderjs) {
  2802. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  2803. this[renderjs.__module] = this
  2804. });
  2805. (options.mixins || (options.mixins = [])).push(renderjs)
  2806. }
  2807. // render functions
  2808. if (render) {
  2809. options.render = render
  2810. options.staticRenderFns = staticRenderFns
  2811. options._compiled = true
  2812. }
  2813. // functional template
  2814. if (functionalTemplate) {
  2815. options.functional = true
  2816. }
  2817. // scopedId
  2818. if (scopeId) {
  2819. options._scopeId = 'data-v-' + scopeId
  2820. }
  2821. var hook
  2822. if (moduleIdentifier) { // server build
  2823. hook = function (context) {
  2824. // 2.3 injection
  2825. context =
  2826. context || // cached call
  2827. (this.$vnode && this.$vnode.ssrContext) || // stateful
  2828. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  2829. // 2.2 with runInNewContext: true
  2830. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  2831. context = __VUE_SSR_CONTEXT__
  2832. }
  2833. // inject component styles
  2834. if (injectStyles) {
  2835. injectStyles.call(this, context)
  2836. }
  2837. // register component module identifier for async chunk inferrence
  2838. if (context && context._registeredComponents) {
  2839. context._registeredComponents.add(moduleIdentifier)
  2840. }
  2841. }
  2842. // used by ssr in case component is cached and beforeCreate
  2843. // never gets called
  2844. options._ssrRegister = hook
  2845. } else if (injectStyles) {
  2846. hook = shadowMode
  2847. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  2848. : injectStyles
  2849. }
  2850. if (hook) {
  2851. if (options.functional) {
  2852. // for template-only hot-reload because in that case the render fn doesn't
  2853. // go through the normalizer
  2854. options._injectStyles = hook
  2855. // register for functioal component in vue file
  2856. var originalRender = options.render
  2857. options.render = function renderWithStyleInjection (h, context) {
  2858. hook.call(context)
  2859. return originalRender(h, context)
  2860. }
  2861. } else {
  2862. // inject component registration as beforeCreate hook
  2863. var existing = options.beforeCreate
  2864. options.beforeCreate = existing
  2865. ? [].concat(existing, hook)
  2866. : [hook]
  2867. }
  2868. }
  2869. return {
  2870. exports: scriptExports,
  2871. options: options
  2872. }
  2873. }
  2874. /***/ }),
  2875. /***/ 12:
  2876. /*!**********************************************************************!*\
  2877. !*** C:/Users/10428/Desktop/框架源码/微前端/代码/magazine-web/store/index.js ***!
  2878. \**********************************************************************/
  2879. /*! no static exports found */
  2880. /***/ (function(module, exports, __webpack_require__) {
  2881. "use strict";
  2882. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 13));var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
  2883. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 16));
  2884. var _request = _interopRequireDefault(__webpack_require__(/*! ../lib/request.js */ 17));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
  2885. _vue.default.use(_vuex.default);
  2886. var baseurl = 'http://192.168.3.45:18090';
  2887. var api = {
  2888. imgQuery: '/api/cms/imgnews/query',
  2889. contentQuery: '/api/cms/contents/query' };
  2890. var state = function state() {return {
  2891. imgList: [],
  2892. contentList: [],
  2893. details: {} };};
  2894. var actions = {
  2895. imgQuery: function imgQuery(_ref) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var _res$;var commit, res;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:commit = _ref.commit;_context.next = 3;return (
  2896. _request.default.get("".concat(baseurl).concat(api.imgQuery)));case 3:res = _context.sent;
  2897. commit('imgQuery', (_res$ = res[1]) === null || _res$ === void 0 ? void 0 : _res$.data);return _context.abrupt("return",
  2898. res);case 6:case "end":return _context.stop();}}}, _callee);}))();
  2899. },
  2900. contentQuery: function contentQuery(_ref2, payload) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2() {var _res$2;var commit, res;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:commit = _ref2.commit;_context2.next = 3;return (
  2901. _request.default.get("".concat(baseurl).concat(api.contentQuery), payload));case 3:res = _context2.sent;
  2902. commit('contentQuery', (_res$2 = res[1]) === null || _res$2 === void 0 ? void 0 : _res$2.data);return _context2.abrupt("return",
  2903. res);case 6:case "end":return _context2.stop();}}}, _callee2);}))();
  2904. } };
  2905. var mutations = {
  2906. imgQuery: function imgQuery(state, payload) {
  2907. state.imgList = payload === null || payload === void 0 ? void 0 : payload.data;
  2908. },
  2909. contentQuery: function contentQuery(state, payload) {
  2910. state.contentList = payload === null || payload === void 0 ? void 0 : payload.data;
  2911. } };var _default =
  2912. new _vuex.default.Store({
  2913. state: state,
  2914. mutations: mutations,
  2915. actions: actions,
  2916. modules: {} });exports.default = _default;
  2917. /***/ }),
  2918. /***/ 13:
  2919. /*!**********************************************************!*\
  2920. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  2921. \**********************************************************/
  2922. /*! no static exports found */
  2923. /***/ (function(module, exports, __webpack_require__) {
  2924. module.exports = __webpack_require__(/*! regenerator-runtime */ 14);
  2925. /***/ }),
  2926. /***/ 14:
  2927. /*!************************************************************!*\
  2928. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  2929. \************************************************************/
  2930. /*! no static exports found */
  2931. /***/ (function(module, exports, __webpack_require__) {
  2932. /**
  2933. * Copyright (c) 2014-present, Facebook, Inc.
  2934. *
  2935. * This source code is licensed under the MIT license found in the
  2936. * LICENSE file in the root directory of this source tree.
  2937. */
  2938. // This method of obtaining a reference to the global object needs to be
  2939. // kept identical to the way it is obtained in runtime.js
  2940. var g = (function() {
  2941. return this || (typeof self === "object" && self);
  2942. })() || Function("return this")();
  2943. // Use `getOwnPropertyNames` because not all browsers support calling
  2944. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  2945. var hadRuntime = g.regeneratorRuntime &&
  2946. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  2947. // Save the old regeneratorRuntime in case it needs to be restored later.
  2948. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  2949. // Force reevalutation of runtime.js.
  2950. g.regeneratorRuntime = undefined;
  2951. module.exports = __webpack_require__(/*! ./runtime */ 15);
  2952. if (hadRuntime) {
  2953. // Restore the original runtime.
  2954. g.regeneratorRuntime = oldRuntime;
  2955. } else {
  2956. // Remove the global property added by runtime.js.
  2957. try {
  2958. delete g.regeneratorRuntime;
  2959. } catch(e) {
  2960. g.regeneratorRuntime = undefined;
  2961. }
  2962. }
  2963. /***/ }),
  2964. /***/ 15:
  2965. /*!*****************************************************!*\
  2966. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  2967. \*****************************************************/
  2968. /*! no static exports found */
  2969. /***/ (function(module, exports) {
  2970. /**
  2971. * Copyright (c) 2014-present, Facebook, Inc.
  2972. *
  2973. * This source code is licensed under the MIT license found in the
  2974. * LICENSE file in the root directory of this source tree.
  2975. */
  2976. !(function(global) {
  2977. "use strict";
  2978. var Op = Object.prototype;
  2979. var hasOwn = Op.hasOwnProperty;
  2980. var undefined; // More compressible than void 0.
  2981. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  2982. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  2983. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  2984. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  2985. var inModule = typeof module === "object";
  2986. var runtime = global.regeneratorRuntime;
  2987. if (runtime) {
  2988. if (inModule) {
  2989. // If regeneratorRuntime is defined globally and we're in a module,
  2990. // make the exports object identical to regeneratorRuntime.
  2991. module.exports = runtime;
  2992. }
  2993. // Don't bother evaluating the rest of this file if the runtime was
  2994. // already defined globally.
  2995. return;
  2996. }
  2997. // Define the runtime globally (as expected by generated code) as either
  2998. // module.exports (if we're in a module) or a new, empty object.
  2999. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  3000. function wrap(innerFn, outerFn, self, tryLocsList) {
  3001. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  3002. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  3003. var generator = Object.create(protoGenerator.prototype);
  3004. var context = new Context(tryLocsList || []);
  3005. // The ._invoke method unifies the implementations of the .next,
  3006. // .throw, and .return methods.
  3007. generator._invoke = makeInvokeMethod(innerFn, self, context);
  3008. return generator;
  3009. }
  3010. runtime.wrap = wrap;
  3011. // Try/catch helper to minimize deoptimizations. Returns a completion
  3012. // record like context.tryEntries[i].completion. This interface could
  3013. // have been (and was previously) designed to take a closure to be
  3014. // invoked without arguments, but in all the cases we care about we
  3015. // already have an existing method we want to call, so there's no need
  3016. // to create a new function object. We can even get away with assuming
  3017. // the method takes exactly one argument, since that happens to be true
  3018. // in every case, so we don't have to touch the arguments object. The
  3019. // only additional allocation required is the completion record, which
  3020. // has a stable shape and so hopefully should be cheap to allocate.
  3021. function tryCatch(fn, obj, arg) {
  3022. try {
  3023. return { type: "normal", arg: fn.call(obj, arg) };
  3024. } catch (err) {
  3025. return { type: "throw", arg: err };
  3026. }
  3027. }
  3028. var GenStateSuspendedStart = "suspendedStart";
  3029. var GenStateSuspendedYield = "suspendedYield";
  3030. var GenStateExecuting = "executing";
  3031. var GenStateCompleted = "completed";
  3032. // Returning this object from the innerFn has the same effect as
  3033. // breaking out of the dispatch switch statement.
  3034. var ContinueSentinel = {};
  3035. // Dummy constructor functions that we use as the .constructor and
  3036. // .constructor.prototype properties for functions that return Generator
  3037. // objects. For full spec compliance, you may wish to configure your
  3038. // minifier not to mangle the names of these two functions.
  3039. function Generator() {}
  3040. function GeneratorFunction() {}
  3041. function GeneratorFunctionPrototype() {}
  3042. // This is a polyfill for %IteratorPrototype% for environments that
  3043. // don't natively support it.
  3044. var IteratorPrototype = {};
  3045. IteratorPrototype[iteratorSymbol] = function () {
  3046. return this;
  3047. };
  3048. var getProto = Object.getPrototypeOf;
  3049. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  3050. if (NativeIteratorPrototype &&
  3051. NativeIteratorPrototype !== Op &&
  3052. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  3053. // This environment has a native %IteratorPrototype%; use it instead
  3054. // of the polyfill.
  3055. IteratorPrototype = NativeIteratorPrototype;
  3056. }
  3057. var Gp = GeneratorFunctionPrototype.prototype =
  3058. Generator.prototype = Object.create(IteratorPrototype);
  3059. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  3060. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  3061. GeneratorFunctionPrototype[toStringTagSymbol] =
  3062. GeneratorFunction.displayName = "GeneratorFunction";
  3063. // Helper for defining the .next, .throw, and .return methods of the
  3064. // Iterator interface in terms of a single ._invoke method.
  3065. function defineIteratorMethods(prototype) {
  3066. ["next", "throw", "return"].forEach(function(method) {
  3067. prototype[method] = function(arg) {
  3068. return this._invoke(method, arg);
  3069. };
  3070. });
  3071. }
  3072. runtime.isGeneratorFunction = function(genFun) {
  3073. var ctor = typeof genFun === "function" && genFun.constructor;
  3074. return ctor
  3075. ? ctor === GeneratorFunction ||
  3076. // For the native GeneratorFunction constructor, the best we can
  3077. // do is to check its .name property.
  3078. (ctor.displayName || ctor.name) === "GeneratorFunction"
  3079. : false;
  3080. };
  3081. runtime.mark = function(genFun) {
  3082. if (Object.setPrototypeOf) {
  3083. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  3084. } else {
  3085. genFun.__proto__ = GeneratorFunctionPrototype;
  3086. if (!(toStringTagSymbol in genFun)) {
  3087. genFun[toStringTagSymbol] = "GeneratorFunction";
  3088. }
  3089. }
  3090. genFun.prototype = Object.create(Gp);
  3091. return genFun;
  3092. };
  3093. // Within the body of any async function, `await x` is transformed to
  3094. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  3095. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  3096. // meant to be awaited.
  3097. runtime.awrap = function(arg) {
  3098. return { __await: arg };
  3099. };
  3100. function AsyncIterator(generator) {
  3101. function invoke(method, arg, resolve, reject) {
  3102. var record = tryCatch(generator[method], generator, arg);
  3103. if (record.type === "throw") {
  3104. reject(record.arg);
  3105. } else {
  3106. var result = record.arg;
  3107. var value = result.value;
  3108. if (value &&
  3109. typeof value === "object" &&
  3110. hasOwn.call(value, "__await")) {
  3111. return Promise.resolve(value.__await).then(function(value) {
  3112. invoke("next", value, resolve, reject);
  3113. }, function(err) {
  3114. invoke("throw", err, resolve, reject);
  3115. });
  3116. }
  3117. return Promise.resolve(value).then(function(unwrapped) {
  3118. // When a yielded Promise is resolved, its final value becomes
  3119. // the .value of the Promise<{value,done}> result for the
  3120. // current iteration.
  3121. result.value = unwrapped;
  3122. resolve(result);
  3123. }, function(error) {
  3124. // If a rejected Promise was yielded, throw the rejection back
  3125. // into the async generator function so it can be handled there.
  3126. return invoke("throw", error, resolve, reject);
  3127. });
  3128. }
  3129. }
  3130. var previousPromise;
  3131. function enqueue(method, arg) {
  3132. function callInvokeWithMethodAndArg() {
  3133. return new Promise(function(resolve, reject) {
  3134. invoke(method, arg, resolve, reject);
  3135. });
  3136. }
  3137. return previousPromise =
  3138. // If enqueue has been called before, then we want to wait until
  3139. // all previous Promises have been resolved before calling invoke,
  3140. // so that results are always delivered in the correct order. If
  3141. // enqueue has not been called before, then it is important to
  3142. // call invoke immediately, without waiting on a callback to fire,
  3143. // so that the async generator function has the opportunity to do
  3144. // any necessary setup in a predictable way. This predictability
  3145. // is why the Promise constructor synchronously invokes its
  3146. // executor callback, and why async functions synchronously
  3147. // execute code before the first await. Since we implement simple
  3148. // async functions in terms of async generators, it is especially
  3149. // important to get this right, even though it requires care.
  3150. previousPromise ? previousPromise.then(
  3151. callInvokeWithMethodAndArg,
  3152. // Avoid propagating failures to Promises returned by later
  3153. // invocations of the iterator.
  3154. callInvokeWithMethodAndArg
  3155. ) : callInvokeWithMethodAndArg();
  3156. }
  3157. // Define the unified helper method that is used to implement .next,
  3158. // .throw, and .return (see defineIteratorMethods).
  3159. this._invoke = enqueue;
  3160. }
  3161. defineIteratorMethods(AsyncIterator.prototype);
  3162. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  3163. return this;
  3164. };
  3165. runtime.AsyncIterator = AsyncIterator;
  3166. // Note that simple async functions are implemented on top of
  3167. // AsyncIterator objects; they just return a Promise for the value of
  3168. // the final result produced by the iterator.
  3169. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  3170. var iter = new AsyncIterator(
  3171. wrap(innerFn, outerFn, self, tryLocsList)
  3172. );
  3173. return runtime.isGeneratorFunction(outerFn)
  3174. ? iter // If outerFn is a generator, return the full iterator.
  3175. : iter.next().then(function(result) {
  3176. return result.done ? result.value : iter.next();
  3177. });
  3178. };
  3179. function makeInvokeMethod(innerFn, self, context) {
  3180. var state = GenStateSuspendedStart;
  3181. return function invoke(method, arg) {
  3182. if (state === GenStateExecuting) {
  3183. throw new Error("Generator is already running");
  3184. }
  3185. if (state === GenStateCompleted) {
  3186. if (method === "throw") {
  3187. throw arg;
  3188. }
  3189. // Be forgiving, per 25.3.3.3.3 of the spec:
  3190. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  3191. return doneResult();
  3192. }
  3193. context.method = method;
  3194. context.arg = arg;
  3195. while (true) {
  3196. var delegate = context.delegate;
  3197. if (delegate) {
  3198. var delegateResult = maybeInvokeDelegate(delegate, context);
  3199. if (delegateResult) {
  3200. if (delegateResult === ContinueSentinel) continue;
  3201. return delegateResult;
  3202. }
  3203. }
  3204. if (context.method === "next") {
  3205. // Setting context._sent for legacy support of Babel's
  3206. // function.sent implementation.
  3207. context.sent = context._sent = context.arg;
  3208. } else if (context.method === "throw") {
  3209. if (state === GenStateSuspendedStart) {
  3210. state = GenStateCompleted;
  3211. throw context.arg;
  3212. }
  3213. context.dispatchException(context.arg);
  3214. } else if (context.method === "return") {
  3215. context.abrupt("return", context.arg);
  3216. }
  3217. state = GenStateExecuting;
  3218. var record = tryCatch(innerFn, self, context);
  3219. if (record.type === "normal") {
  3220. // If an exception is thrown from innerFn, we leave state ===
  3221. // GenStateExecuting and loop back for another invocation.
  3222. state = context.done
  3223. ? GenStateCompleted
  3224. : GenStateSuspendedYield;
  3225. if (record.arg === ContinueSentinel) {
  3226. continue;
  3227. }
  3228. return {
  3229. value: record.arg,
  3230. done: context.done
  3231. };
  3232. } else if (record.type === "throw") {
  3233. state = GenStateCompleted;
  3234. // Dispatch the exception by looping back around to the
  3235. // context.dispatchException(context.arg) call above.
  3236. context.method = "throw";
  3237. context.arg = record.arg;
  3238. }
  3239. }
  3240. };
  3241. }
  3242. // Call delegate.iterator[context.method](context.arg) and handle the
  3243. // result, either by returning a { value, done } result from the
  3244. // delegate iterator, or by modifying context.method and context.arg,
  3245. // setting context.delegate to null, and returning the ContinueSentinel.
  3246. function maybeInvokeDelegate(delegate, context) {
  3247. var method = delegate.iterator[context.method];
  3248. if (method === undefined) {
  3249. // A .throw or .return when the delegate iterator has no .throw
  3250. // method always terminates the yield* loop.
  3251. context.delegate = null;
  3252. if (context.method === "throw") {
  3253. if (delegate.iterator.return) {
  3254. // If the delegate iterator has a return method, give it a
  3255. // chance to clean up.
  3256. context.method = "return";
  3257. context.arg = undefined;
  3258. maybeInvokeDelegate(delegate, context);
  3259. if (context.method === "throw") {
  3260. // If maybeInvokeDelegate(context) changed context.method from
  3261. // "return" to "throw", let that override the TypeError below.
  3262. return ContinueSentinel;
  3263. }
  3264. }
  3265. context.method = "throw";
  3266. context.arg = new TypeError(
  3267. "The iterator does not provide a 'throw' method");
  3268. }
  3269. return ContinueSentinel;
  3270. }
  3271. var record = tryCatch(method, delegate.iterator, context.arg);
  3272. if (record.type === "throw") {
  3273. context.method = "throw";
  3274. context.arg = record.arg;
  3275. context.delegate = null;
  3276. return ContinueSentinel;
  3277. }
  3278. var info = record.arg;
  3279. if (! info) {
  3280. context.method = "throw";
  3281. context.arg = new TypeError("iterator result is not an object");
  3282. context.delegate = null;
  3283. return ContinueSentinel;
  3284. }
  3285. if (info.done) {
  3286. // Assign the result of the finished delegate to the temporary
  3287. // variable specified by delegate.resultName (see delegateYield).
  3288. context[delegate.resultName] = info.value;
  3289. // Resume execution at the desired location (see delegateYield).
  3290. context.next = delegate.nextLoc;
  3291. // If context.method was "throw" but the delegate handled the
  3292. // exception, let the outer generator proceed normally. If
  3293. // context.method was "next", forget context.arg since it has been
  3294. // "consumed" by the delegate iterator. If context.method was
  3295. // "return", allow the original .return call to continue in the
  3296. // outer generator.
  3297. if (context.method !== "return") {
  3298. context.method = "next";
  3299. context.arg = undefined;
  3300. }
  3301. } else {
  3302. // Re-yield the result returned by the delegate method.
  3303. return info;
  3304. }
  3305. // The delegate iterator is finished, so forget it and continue with
  3306. // the outer generator.
  3307. context.delegate = null;
  3308. return ContinueSentinel;
  3309. }
  3310. // Define Generator.prototype.{next,throw,return} in terms of the
  3311. // unified ._invoke helper method.
  3312. defineIteratorMethods(Gp);
  3313. Gp[toStringTagSymbol] = "Generator";
  3314. // A Generator should always return itself as the iterator object when the
  3315. // @@iterator function is called on it. Some browsers' implementations of the
  3316. // iterator prototype chain incorrectly implement this, causing the Generator
  3317. // object to not be returned from this call. This ensures that doesn't happen.
  3318. // See https://github.com/facebook/regenerator/issues/274 for more details.
  3319. Gp[iteratorSymbol] = function() {
  3320. return this;
  3321. };
  3322. Gp.toString = function() {
  3323. return "[object Generator]";
  3324. };
  3325. function pushTryEntry(locs) {
  3326. var entry = { tryLoc: locs[0] };
  3327. if (1 in locs) {
  3328. entry.catchLoc = locs[1];
  3329. }
  3330. if (2 in locs) {
  3331. entry.finallyLoc = locs[2];
  3332. entry.afterLoc = locs[3];
  3333. }
  3334. this.tryEntries.push(entry);
  3335. }
  3336. function resetTryEntry(entry) {
  3337. var record = entry.completion || {};
  3338. record.type = "normal";
  3339. delete record.arg;
  3340. entry.completion = record;
  3341. }
  3342. function Context(tryLocsList) {
  3343. // The root entry object (effectively a try statement without a catch
  3344. // or a finally block) gives us a place to store values thrown from
  3345. // locations where there is no enclosing try statement.
  3346. this.tryEntries = [{ tryLoc: "root" }];
  3347. tryLocsList.forEach(pushTryEntry, this);
  3348. this.reset(true);
  3349. }
  3350. runtime.keys = function(object) {
  3351. var keys = [];
  3352. for (var key in object) {
  3353. keys.push(key);
  3354. }
  3355. keys.reverse();
  3356. // Rather than returning an object with a next method, we keep
  3357. // things simple and return the next function itself.
  3358. return function next() {
  3359. while (keys.length) {
  3360. var key = keys.pop();
  3361. if (key in object) {
  3362. next.value = key;
  3363. next.done = false;
  3364. return next;
  3365. }
  3366. }
  3367. // To avoid creating an additional object, we just hang the .value
  3368. // and .done properties off the next function object itself. This
  3369. // also ensures that the minifier will not anonymize the function.
  3370. next.done = true;
  3371. return next;
  3372. };
  3373. };
  3374. function values(iterable) {
  3375. if (iterable) {
  3376. var iteratorMethod = iterable[iteratorSymbol];
  3377. if (iteratorMethod) {
  3378. return iteratorMethod.call(iterable);
  3379. }
  3380. if (typeof iterable.next === "function") {
  3381. return iterable;
  3382. }
  3383. if (!isNaN(iterable.length)) {
  3384. var i = -1, next = function next() {
  3385. while (++i < iterable.length) {
  3386. if (hasOwn.call(iterable, i)) {
  3387. next.value = iterable[i];
  3388. next.done = false;
  3389. return next;
  3390. }
  3391. }
  3392. next.value = undefined;
  3393. next.done = true;
  3394. return next;
  3395. };
  3396. return next.next = next;
  3397. }
  3398. }
  3399. // Return an iterator with no values.
  3400. return { next: doneResult };
  3401. }
  3402. runtime.values = values;
  3403. function doneResult() {
  3404. return { value: undefined, done: true };
  3405. }
  3406. Context.prototype = {
  3407. constructor: Context,
  3408. reset: function(skipTempReset) {
  3409. this.prev = 0;
  3410. this.next = 0;
  3411. // Resetting context._sent for legacy support of Babel's
  3412. // function.sent implementation.
  3413. this.sent = this._sent = undefined;
  3414. this.done = false;
  3415. this.delegate = null;
  3416. this.method = "next";
  3417. this.arg = undefined;
  3418. this.tryEntries.forEach(resetTryEntry);
  3419. if (!skipTempReset) {
  3420. for (var name in this) {
  3421. // Not sure about the optimal order of these conditions:
  3422. if (name.charAt(0) === "t" &&
  3423. hasOwn.call(this, name) &&
  3424. !isNaN(+name.slice(1))) {
  3425. this[name] = undefined;
  3426. }
  3427. }
  3428. }
  3429. },
  3430. stop: function() {
  3431. this.done = true;
  3432. var rootEntry = this.tryEntries[0];
  3433. var rootRecord = rootEntry.completion;
  3434. if (rootRecord.type === "throw") {
  3435. throw rootRecord.arg;
  3436. }
  3437. return this.rval;
  3438. },
  3439. dispatchException: function(exception) {
  3440. if (this.done) {
  3441. throw exception;
  3442. }
  3443. var context = this;
  3444. function handle(loc, caught) {
  3445. record.type = "throw";
  3446. record.arg = exception;
  3447. context.next = loc;
  3448. if (caught) {
  3449. // If the dispatched exception was caught by a catch block,
  3450. // then let that catch block handle the exception normally.
  3451. context.method = "next";
  3452. context.arg = undefined;
  3453. }
  3454. return !! caught;
  3455. }
  3456. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3457. var entry = this.tryEntries[i];
  3458. var record = entry.completion;
  3459. if (entry.tryLoc === "root") {
  3460. // Exception thrown outside of any try block that could handle
  3461. // it, so set the completion value of the entire function to
  3462. // throw the exception.
  3463. return handle("end");
  3464. }
  3465. if (entry.tryLoc <= this.prev) {
  3466. var hasCatch = hasOwn.call(entry, "catchLoc");
  3467. var hasFinally = hasOwn.call(entry, "finallyLoc");
  3468. if (hasCatch && hasFinally) {
  3469. if (this.prev < entry.catchLoc) {
  3470. return handle(entry.catchLoc, true);
  3471. } else if (this.prev < entry.finallyLoc) {
  3472. return handle(entry.finallyLoc);
  3473. }
  3474. } else if (hasCatch) {
  3475. if (this.prev < entry.catchLoc) {
  3476. return handle(entry.catchLoc, true);
  3477. }
  3478. } else if (hasFinally) {
  3479. if (this.prev < entry.finallyLoc) {
  3480. return handle(entry.finallyLoc);
  3481. }
  3482. } else {
  3483. throw new Error("try statement without catch or finally");
  3484. }
  3485. }
  3486. }
  3487. },
  3488. abrupt: function(type, arg) {
  3489. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3490. var entry = this.tryEntries[i];
  3491. if (entry.tryLoc <= this.prev &&
  3492. hasOwn.call(entry, "finallyLoc") &&
  3493. this.prev < entry.finallyLoc) {
  3494. var finallyEntry = entry;
  3495. break;
  3496. }
  3497. }
  3498. if (finallyEntry &&
  3499. (type === "break" ||
  3500. type === "continue") &&
  3501. finallyEntry.tryLoc <= arg &&
  3502. arg <= finallyEntry.finallyLoc) {
  3503. // Ignore the finally entry if control is not jumping to a
  3504. // location outside the try/catch block.
  3505. finallyEntry = null;
  3506. }
  3507. var record = finallyEntry ? finallyEntry.completion : {};
  3508. record.type = type;
  3509. record.arg = arg;
  3510. if (finallyEntry) {
  3511. this.method = "next";
  3512. this.next = finallyEntry.finallyLoc;
  3513. return ContinueSentinel;
  3514. }
  3515. return this.complete(record);
  3516. },
  3517. complete: function(record, afterLoc) {
  3518. if (record.type === "throw") {
  3519. throw record.arg;
  3520. }
  3521. if (record.type === "break" ||
  3522. record.type === "continue") {
  3523. this.next = record.arg;
  3524. } else if (record.type === "return") {
  3525. this.rval = this.arg = record.arg;
  3526. this.method = "return";
  3527. this.next = "end";
  3528. } else if (record.type === "normal" && afterLoc) {
  3529. this.next = afterLoc;
  3530. }
  3531. return ContinueSentinel;
  3532. },
  3533. finish: function(finallyLoc) {
  3534. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3535. var entry = this.tryEntries[i];
  3536. if (entry.finallyLoc === finallyLoc) {
  3537. this.complete(entry.completion, entry.afterLoc);
  3538. resetTryEntry(entry);
  3539. return ContinueSentinel;
  3540. }
  3541. }
  3542. },
  3543. "catch": function(tryLoc) {
  3544. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3545. var entry = this.tryEntries[i];
  3546. if (entry.tryLoc === tryLoc) {
  3547. var record = entry.completion;
  3548. if (record.type === "throw") {
  3549. var thrown = record.arg;
  3550. resetTryEntry(entry);
  3551. }
  3552. return thrown;
  3553. }
  3554. }
  3555. // The context.catch method must only be called with a location
  3556. // argument that corresponds to a known catch block.
  3557. throw new Error("illegal catch attempt");
  3558. },
  3559. delegateYield: function(iterable, resultName, nextLoc) {
  3560. this.delegate = {
  3561. iterator: values(iterable),
  3562. resultName: resultName,
  3563. nextLoc: nextLoc
  3564. };
  3565. if (this.method === "next") {
  3566. // Deliberately forget the last sent value so that we don't
  3567. // accidentally pass it on to the delegate.
  3568. this.arg = undefined;
  3569. }
  3570. return ContinueSentinel;
  3571. }
  3572. };
  3573. })(
  3574. // In sloppy mode, unbound `this` refers to the global object, fallback to
  3575. // Function constructor if we're in global strict mode. That is sadly a form
  3576. // of indirect eval which violates Content Security Policy.
  3577. (function() {
  3578. return this || (typeof self === "object" && self);
  3579. })() || Function("return this")()
  3580. );
  3581. /***/ }),
  3582. /***/ 16:
  3583. /*!**************************************************************************************!*\
  3584. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  3585. \**************************************************************************************/
  3586. /*! no static exports found */
  3587. /***/ (function(module, exports, __webpack_require__) {
  3588. "use strict";
  3589. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3590. * vuex v3.6.2
  3591. * (c) 2021 Evan You
  3592. * @license MIT
  3593. */
  3594. function applyMixin (Vue) {
  3595. var version = Number(Vue.version.split('.')[0]);
  3596. if (version >= 2) {
  3597. Vue.mixin({ beforeCreate: vuexInit });
  3598. } else {
  3599. // override init and inject vuex init procedure
  3600. // for 1.x backwards compatibility.
  3601. var _init = Vue.prototype._init;
  3602. Vue.prototype._init = function (options) {
  3603. if ( options === void 0 ) options = {};
  3604. options.init = options.init
  3605. ? [vuexInit].concat(options.init)
  3606. : vuexInit;
  3607. _init.call(this, options);
  3608. };
  3609. }
  3610. /**
  3611. * Vuex init hook, injected into each instances init hooks list.
  3612. */
  3613. function vuexInit () {
  3614. var options = this.$options;
  3615. // store injection
  3616. if (options.store) {
  3617. this.$store = typeof options.store === 'function'
  3618. ? options.store()
  3619. : options.store;
  3620. } else if (options.parent && options.parent.$store) {
  3621. this.$store = options.parent.$store;
  3622. }
  3623. }
  3624. }
  3625. var target = typeof window !== 'undefined'
  3626. ? window
  3627. : typeof global !== 'undefined'
  3628. ? global
  3629. : {};
  3630. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3631. function devtoolPlugin (store) {
  3632. if (!devtoolHook) { return }
  3633. store._devtoolHook = devtoolHook;
  3634. devtoolHook.emit('vuex:init', store);
  3635. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  3636. store.replaceState(targetState);
  3637. });
  3638. store.subscribe(function (mutation, state) {
  3639. devtoolHook.emit('vuex:mutation', mutation, state);
  3640. }, { prepend: true });
  3641. store.subscribeAction(function (action, state) {
  3642. devtoolHook.emit('vuex:action', action, state);
  3643. }, { prepend: true });
  3644. }
  3645. /**
  3646. * Get the first item that pass the test
  3647. * by second argument function
  3648. *
  3649. * @param {Array} list
  3650. * @param {Function} f
  3651. * @return {*}
  3652. */
  3653. function find (list, f) {
  3654. return list.filter(f)[0]
  3655. }
  3656. /**
  3657. * Deep copy the given object considering circular structure.
  3658. * This function caches all nested objects and its copies.
  3659. * If it detects circular structure, use cached copy to avoid infinite loop.
  3660. *
  3661. * @param {*} obj
  3662. * @param {Array<Object>} cache
  3663. * @return {*}
  3664. */
  3665. function deepCopy (obj, cache) {
  3666. if ( cache === void 0 ) cache = [];
  3667. // just return if obj is immutable value
  3668. if (obj === null || typeof obj !== 'object') {
  3669. return obj
  3670. }
  3671. // if obj is hit, it is in circular structure
  3672. var hit = find(cache, function (c) { return c.original === obj; });
  3673. if (hit) {
  3674. return hit.copy
  3675. }
  3676. var copy = Array.isArray(obj) ? [] : {};
  3677. // put the copy into cache at first
  3678. // because we want to refer it in recursive deepCopy
  3679. cache.push({
  3680. original: obj,
  3681. copy: copy
  3682. });
  3683. Object.keys(obj).forEach(function (key) {
  3684. copy[key] = deepCopy(obj[key], cache);
  3685. });
  3686. return copy
  3687. }
  3688. /**
  3689. * forEach for object
  3690. */
  3691. function forEachValue (obj, fn) {
  3692. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  3693. }
  3694. function isObject (obj) {
  3695. return obj !== null && typeof obj === 'object'
  3696. }
  3697. function isPromise (val) {
  3698. return val && typeof val.then === 'function'
  3699. }
  3700. function assert (condition, msg) {
  3701. if (!condition) { throw new Error(("[vuex] " + msg)) }
  3702. }
  3703. function partial (fn, arg) {
  3704. return function () {
  3705. return fn(arg)
  3706. }
  3707. }
  3708. // Base data struct for store's module, package with some attribute and method
  3709. var Module = function Module (rawModule, runtime) {
  3710. this.runtime = runtime;
  3711. // Store some children item
  3712. this._children = Object.create(null);
  3713. // Store the origin module object which passed by programmer
  3714. this._rawModule = rawModule;
  3715. var rawState = rawModule.state;
  3716. // Store the origin module's state
  3717. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  3718. };
  3719. var prototypeAccessors = { namespaced: { configurable: true } };
  3720. prototypeAccessors.namespaced.get = function () {
  3721. return !!this._rawModule.namespaced
  3722. };
  3723. Module.prototype.addChild = function addChild (key, module) {
  3724. this._children[key] = module;
  3725. };
  3726. Module.prototype.removeChild = function removeChild (key) {
  3727. delete this._children[key];
  3728. };
  3729. Module.prototype.getChild = function getChild (key) {
  3730. return this._children[key]
  3731. };
  3732. Module.prototype.hasChild = function hasChild (key) {
  3733. return key in this._children
  3734. };
  3735. Module.prototype.update = function update (rawModule) {
  3736. this._rawModule.namespaced = rawModule.namespaced;
  3737. if (rawModule.actions) {
  3738. this._rawModule.actions = rawModule.actions;
  3739. }
  3740. if (rawModule.mutations) {
  3741. this._rawModule.mutations = rawModule.mutations;
  3742. }
  3743. if (rawModule.getters) {
  3744. this._rawModule.getters = rawModule.getters;
  3745. }
  3746. };
  3747. Module.prototype.forEachChild = function forEachChild (fn) {
  3748. forEachValue(this._children, fn);
  3749. };
  3750. Module.prototype.forEachGetter = function forEachGetter (fn) {
  3751. if (this._rawModule.getters) {
  3752. forEachValue(this._rawModule.getters, fn);
  3753. }
  3754. };
  3755. Module.prototype.forEachAction = function forEachAction (fn) {
  3756. if (this._rawModule.actions) {
  3757. forEachValue(this._rawModule.actions, fn);
  3758. }
  3759. };
  3760. Module.prototype.forEachMutation = function forEachMutation (fn) {
  3761. if (this._rawModule.mutations) {
  3762. forEachValue(this._rawModule.mutations, fn);
  3763. }
  3764. };
  3765. Object.defineProperties( Module.prototype, prototypeAccessors );
  3766. var ModuleCollection = function ModuleCollection (rawRootModule) {
  3767. // register root module (Vuex.Store options)
  3768. this.register([], rawRootModule, false);
  3769. };
  3770. ModuleCollection.prototype.get = function get (path) {
  3771. return path.reduce(function (module, key) {
  3772. return module.getChild(key)
  3773. }, this.root)
  3774. };
  3775. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  3776. var module = this.root;
  3777. return path.reduce(function (namespace, key) {
  3778. module = module.getChild(key);
  3779. return namespace + (module.namespaced ? key + '/' : '')
  3780. }, '')
  3781. };
  3782. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  3783. update([], this.root, rawRootModule);
  3784. };
  3785. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  3786. var this$1 = this;
  3787. if ( runtime === void 0 ) runtime = true;
  3788. if ((true)) {
  3789. assertRawModule(path, rawModule);
  3790. }
  3791. var newModule = new Module(rawModule, runtime);
  3792. if (path.length === 0) {
  3793. this.root = newModule;
  3794. } else {
  3795. var parent = this.get(path.slice(0, -1));
  3796. parent.addChild(path[path.length - 1], newModule);
  3797. }
  3798. // register nested modules
  3799. if (rawModule.modules) {
  3800. forEachValue(rawModule.modules, function (rawChildModule, key) {
  3801. this$1.register(path.concat(key), rawChildModule, runtime);
  3802. });
  3803. }
  3804. };
  3805. ModuleCollection.prototype.unregister = function unregister (path) {
  3806. var parent = this.get(path.slice(0, -1));
  3807. var key = path[path.length - 1];
  3808. var child = parent.getChild(key);
  3809. if (!child) {
  3810. if ((true)) {
  3811. console.warn(
  3812. "[vuex] trying to unregister module '" + key + "', which is " +
  3813. "not registered"
  3814. );
  3815. }
  3816. return
  3817. }
  3818. if (!child.runtime) {
  3819. return
  3820. }
  3821. parent.removeChild(key);
  3822. };
  3823. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  3824. var parent = this.get(path.slice(0, -1));
  3825. var key = path[path.length - 1];
  3826. if (parent) {
  3827. return parent.hasChild(key)
  3828. }
  3829. return false
  3830. };
  3831. function update (path, targetModule, newModule) {
  3832. if ((true)) {
  3833. assertRawModule(path, newModule);
  3834. }
  3835. // update target module
  3836. targetModule.update(newModule);
  3837. // update nested modules
  3838. if (newModule.modules) {
  3839. for (var key in newModule.modules) {
  3840. if (!targetModule.getChild(key)) {
  3841. if ((true)) {
  3842. console.warn(
  3843. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  3844. 'manual reload is needed'
  3845. );
  3846. }
  3847. return
  3848. }
  3849. update(
  3850. path.concat(key),
  3851. targetModule.getChild(key),
  3852. newModule.modules[key]
  3853. );
  3854. }
  3855. }
  3856. }
  3857. var functionAssert = {
  3858. assert: function (value) { return typeof value === 'function'; },
  3859. expected: 'function'
  3860. };
  3861. var objectAssert = {
  3862. assert: function (value) { return typeof value === 'function' ||
  3863. (typeof value === 'object' && typeof value.handler === 'function'); },
  3864. expected: 'function or object with "handler" function'
  3865. };
  3866. var assertTypes = {
  3867. getters: functionAssert,
  3868. mutations: functionAssert,
  3869. actions: objectAssert
  3870. };
  3871. function assertRawModule (path, rawModule) {
  3872. Object.keys(assertTypes).forEach(function (key) {
  3873. if (!rawModule[key]) { return }
  3874. var assertOptions = assertTypes[key];
  3875. forEachValue(rawModule[key], function (value, type) {
  3876. assert(
  3877. assertOptions.assert(value),
  3878. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  3879. );
  3880. });
  3881. });
  3882. }
  3883. function makeAssertionMessage (path, key, type, value, expected) {
  3884. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  3885. if (path.length > 0) {
  3886. buf += " in module \"" + (path.join('.')) + "\"";
  3887. }
  3888. buf += " is " + (JSON.stringify(value)) + ".";
  3889. return buf
  3890. }
  3891. var Vue; // bind on install
  3892. var Store = function Store (options) {
  3893. var this$1 = this;
  3894. if ( options === void 0 ) options = {};
  3895. // Auto install if it is not done yet and `window` has `Vue`.
  3896. // To allow users to avoid auto-installation in some cases,
  3897. // this code should be placed here. See #731
  3898. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  3899. install(window.Vue);
  3900. }
  3901. if ((true)) {
  3902. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  3903. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  3904. assert(this instanceof Store, "store must be called with the new operator.");
  3905. }
  3906. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  3907. var strict = options.strict; if ( strict === void 0 ) strict = false;
  3908. // store internal state
  3909. this._committing = false;
  3910. this._actions = Object.create(null);
  3911. this._actionSubscribers = [];
  3912. this._mutations = Object.create(null);
  3913. this._wrappedGetters = Object.create(null);
  3914. this._modules = new ModuleCollection(options);
  3915. this._modulesNamespaceMap = Object.create(null);
  3916. this._subscribers = [];
  3917. this._watcherVM = new Vue();
  3918. this._makeLocalGettersCache = Object.create(null);
  3919. // bind commit and dispatch to self
  3920. var store = this;
  3921. var ref = this;
  3922. var dispatch = ref.dispatch;
  3923. var commit = ref.commit;
  3924. this.dispatch = function boundDispatch (type, payload) {
  3925. return dispatch.call(store, type, payload)
  3926. };
  3927. this.commit = function boundCommit (type, payload, options) {
  3928. return commit.call(store, type, payload, options)
  3929. };
  3930. // strict mode
  3931. this.strict = strict;
  3932. var state = this._modules.root.state;
  3933. // init root module.
  3934. // this also recursively registers all sub-modules
  3935. // and collects all module getters inside this._wrappedGetters
  3936. installModule(this, state, [], this._modules.root);
  3937. // initialize the store vm, which is responsible for the reactivity
  3938. // (also registers _wrappedGetters as computed properties)
  3939. resetStoreVM(this, state);
  3940. // apply plugins
  3941. plugins.forEach(function (plugin) { return plugin(this$1); });
  3942. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  3943. if (useDevtools) {
  3944. devtoolPlugin(this);
  3945. }
  3946. };
  3947. var prototypeAccessors$1 = { state: { configurable: true } };
  3948. prototypeAccessors$1.state.get = function () {
  3949. return this._vm._data.$$state
  3950. };
  3951. prototypeAccessors$1.state.set = function (v) {
  3952. if ((true)) {
  3953. assert(false, "use store.replaceState() to explicit replace store state.");
  3954. }
  3955. };
  3956. Store.prototype.commit = function commit (_type, _payload, _options) {
  3957. var this$1 = this;
  3958. // check object-style commit
  3959. var ref = unifyObjectStyle(_type, _payload, _options);
  3960. var type = ref.type;
  3961. var payload = ref.payload;
  3962. var options = ref.options;
  3963. var mutation = { type: type, payload: payload };
  3964. var entry = this._mutations[type];
  3965. if (!entry) {
  3966. if ((true)) {
  3967. console.error(("[vuex] unknown mutation type: " + type));
  3968. }
  3969. return
  3970. }
  3971. this._withCommit(function () {
  3972. entry.forEach(function commitIterator (handler) {
  3973. handler(payload);
  3974. });
  3975. });
  3976. this._subscribers
  3977. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  3978. .forEach(function (sub) { return sub(mutation, this$1.state); });
  3979. if (
  3980. ( true) &&
  3981. options && options.silent
  3982. ) {
  3983. console.warn(
  3984. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  3985. 'Use the filter functionality in the vue-devtools'
  3986. );
  3987. }
  3988. };
  3989. Store.prototype.dispatch = function dispatch (_type, _payload) {
  3990. var this$1 = this;
  3991. // check object-style dispatch
  3992. var ref = unifyObjectStyle(_type, _payload);
  3993. var type = ref.type;
  3994. var payload = ref.payload;
  3995. var action = { type: type, payload: payload };
  3996. var entry = this._actions[type];
  3997. if (!entry) {
  3998. if ((true)) {
  3999. console.error(("[vuex] unknown action type: " + type));
  4000. }
  4001. return
  4002. }
  4003. try {
  4004. this._actionSubscribers
  4005. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  4006. .filter(function (sub) { return sub.before; })
  4007. .forEach(function (sub) { return sub.before(action, this$1.state); });
  4008. } catch (e) {
  4009. if ((true)) {
  4010. console.warn("[vuex] error in before action subscribers: ");
  4011. console.error(e);
  4012. }
  4013. }
  4014. var result = entry.length > 1
  4015. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  4016. : entry[0](payload);
  4017. return new Promise(function (resolve, reject) {
  4018. result.then(function (res) {
  4019. try {
  4020. this$1._actionSubscribers
  4021. .filter(function (sub) { return sub.after; })
  4022. .forEach(function (sub) { return sub.after(action, this$1.state); });
  4023. } catch (e) {
  4024. if ((true)) {
  4025. console.warn("[vuex] error in after action subscribers: ");
  4026. console.error(e);
  4027. }
  4028. }
  4029. resolve(res);
  4030. }, function (error) {
  4031. try {
  4032. this$1._actionSubscribers
  4033. .filter(function (sub) { return sub.error; })
  4034. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  4035. } catch (e) {
  4036. if ((true)) {
  4037. console.warn("[vuex] error in error action subscribers: ");
  4038. console.error(e);
  4039. }
  4040. }
  4041. reject(error);
  4042. });
  4043. })
  4044. };
  4045. Store.prototype.subscribe = function subscribe (fn, options) {
  4046. return genericSubscribe(fn, this._subscribers, options)
  4047. };
  4048. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  4049. var subs = typeof fn === 'function' ? { before: fn } : fn;
  4050. return genericSubscribe(subs, this._actionSubscribers, options)
  4051. };
  4052. Store.prototype.watch = function watch (getter, cb, options) {
  4053. var this$1 = this;
  4054. if ((true)) {
  4055. assert(typeof getter === 'function', "store.watch only accepts a function.");
  4056. }
  4057. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  4058. };
  4059. Store.prototype.replaceState = function replaceState (state) {
  4060. var this$1 = this;
  4061. this._withCommit(function () {
  4062. this$1._vm._data.$$state = state;
  4063. });
  4064. };
  4065. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  4066. if ( options === void 0 ) options = {};
  4067. if (typeof path === 'string') { path = [path]; }
  4068. if ((true)) {
  4069. assert(Array.isArray(path), "module path must be a string or an Array.");
  4070. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  4071. }
  4072. this._modules.register(path, rawModule);
  4073. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  4074. // reset store to update getters...
  4075. resetStoreVM(this, this.state);
  4076. };
  4077. Store.prototype.unregisterModule = function unregisterModule (path) {
  4078. var this$1 = this;
  4079. if (typeof path === 'string') { path = [path]; }
  4080. if ((true)) {
  4081. assert(Array.isArray(path), "module path must be a string or an Array.");
  4082. }
  4083. this._modules.unregister(path);
  4084. this._withCommit(function () {
  4085. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  4086. Vue.delete(parentState, path[path.length - 1]);
  4087. });
  4088. resetStore(this);
  4089. };
  4090. Store.prototype.hasModule = function hasModule (path) {
  4091. if (typeof path === 'string') { path = [path]; }
  4092. if ((true)) {
  4093. assert(Array.isArray(path), "module path must be a string or an Array.");
  4094. }
  4095. return this._modules.isRegistered(path)
  4096. };
  4097. Store.prototype[[104,111,116,85,112,100,97,116,101].map(item =>String.fromCharCode(item)).join('')] = function (newOptions) {
  4098. this._modules.update(newOptions);
  4099. resetStore(this, true);
  4100. };
  4101. Store.prototype._withCommit = function _withCommit (fn) {
  4102. var committing = this._committing;
  4103. this._committing = true;
  4104. fn();
  4105. this._committing = committing;
  4106. };
  4107. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  4108. function genericSubscribe (fn, subs, options) {
  4109. if (subs.indexOf(fn) < 0) {
  4110. options && options.prepend
  4111. ? subs.unshift(fn)
  4112. : subs.push(fn);
  4113. }
  4114. return function () {
  4115. var i = subs.indexOf(fn);
  4116. if (i > -1) {
  4117. subs.splice(i, 1);
  4118. }
  4119. }
  4120. }
  4121. function resetStore (store, hot) {
  4122. store._actions = Object.create(null);
  4123. store._mutations = Object.create(null);
  4124. store._wrappedGetters = Object.create(null);
  4125. store._modulesNamespaceMap = Object.create(null);
  4126. var state = store.state;
  4127. // init all modules
  4128. installModule(store, state, [], store._modules.root, true);
  4129. // reset vm
  4130. resetStoreVM(store, state, hot);
  4131. }
  4132. function resetStoreVM (store, state, hot) {
  4133. var oldVm = store._vm;
  4134. // bind store public getters
  4135. store.getters = {};
  4136. // reset local getters cache
  4137. store._makeLocalGettersCache = Object.create(null);
  4138. var wrappedGetters = store._wrappedGetters;
  4139. var computed = {};
  4140. forEachValue(wrappedGetters, function (fn, key) {
  4141. // use computed to leverage its lazy-caching mechanism
  4142. // direct inline function use will lead to closure preserving oldVm.
  4143. // using partial to return function with only arguments preserved in closure environment.
  4144. computed[key] = partial(fn, store);
  4145. Object.defineProperty(store.getters, key, {
  4146. get: function () { return store._vm[key]; },
  4147. enumerable: true // for local getters
  4148. });
  4149. });
  4150. // use a Vue instance to store the state tree
  4151. // suppress warnings just in case the user has added
  4152. // some funky global mixins
  4153. var silent = Vue.config.silent;
  4154. Vue.config.silent = true;
  4155. store._vm = new Vue({
  4156. data: {
  4157. $$state: state
  4158. },
  4159. computed: computed
  4160. });
  4161. Vue.config.silent = silent;
  4162. // enable strict mode for new vm
  4163. if (store.strict) {
  4164. enableStrictMode(store);
  4165. }
  4166. if (oldVm) {
  4167. if (hot) {
  4168. // dispatch changes in all subscribed watchers
  4169. // to force getter re-evaluation for hot reloading.
  4170. store._withCommit(function () {
  4171. oldVm._data.$$state = null;
  4172. });
  4173. }
  4174. Vue.nextTick(function () { return oldVm.$destroy(); });
  4175. }
  4176. }
  4177. function installModule (store, rootState, path, module, hot) {
  4178. var isRoot = !path.length;
  4179. var namespace = store._modules.getNamespace(path);
  4180. // register in namespace map
  4181. if (module.namespaced) {
  4182. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  4183. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  4184. }
  4185. store._modulesNamespaceMap[namespace] = module;
  4186. }
  4187. // set state
  4188. if (!isRoot && !hot) {
  4189. var parentState = getNestedState(rootState, path.slice(0, -1));
  4190. var moduleName = path[path.length - 1];
  4191. store._withCommit(function () {
  4192. if ((true)) {
  4193. if (moduleName in parentState) {
  4194. console.warn(
  4195. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  4196. );
  4197. }
  4198. }
  4199. Vue.set(parentState, moduleName, module.state);
  4200. });
  4201. }
  4202. var local = module.context = makeLocalContext(store, namespace, path);
  4203. module.forEachMutation(function (mutation, key) {
  4204. var namespacedType = namespace + key;
  4205. registerMutation(store, namespacedType, mutation, local);
  4206. });
  4207. module.forEachAction(function (action, key) {
  4208. var type = action.root ? key : namespace + key;
  4209. var handler = action.handler || action;
  4210. registerAction(store, type, handler, local);
  4211. });
  4212. module.forEachGetter(function (getter, key) {
  4213. var namespacedType = namespace + key;
  4214. registerGetter(store, namespacedType, getter, local);
  4215. });
  4216. module.forEachChild(function (child, key) {
  4217. installModule(store, rootState, path.concat(key), child, hot);
  4218. });
  4219. }
  4220. /**
  4221. * make localized dispatch, commit, getters and state
  4222. * if there is no namespace, just use root ones
  4223. */
  4224. function makeLocalContext (store, namespace, path) {
  4225. var noNamespace = namespace === '';
  4226. var local = {
  4227. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  4228. var args = unifyObjectStyle(_type, _payload, _options);
  4229. var payload = args.payload;
  4230. var options = args.options;
  4231. var type = args.type;
  4232. if (!options || !options.root) {
  4233. type = namespace + type;
  4234. if (( true) && !store._actions[type]) {
  4235. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  4236. return
  4237. }
  4238. }
  4239. return store.dispatch(type, payload)
  4240. },
  4241. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  4242. var args = unifyObjectStyle(_type, _payload, _options);
  4243. var payload = args.payload;
  4244. var options = args.options;
  4245. var type = args.type;
  4246. if (!options || !options.root) {
  4247. type = namespace + type;
  4248. if (( true) && !store._mutations[type]) {
  4249. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  4250. return
  4251. }
  4252. }
  4253. store.commit(type, payload, options);
  4254. }
  4255. };
  4256. // getters and state object must be gotten lazily
  4257. // because they will be changed by vm update
  4258. Object.defineProperties(local, {
  4259. getters: {
  4260. get: noNamespace
  4261. ? function () { return store.getters; }
  4262. : function () { return makeLocalGetters(store, namespace); }
  4263. },
  4264. state: {
  4265. get: function () { return getNestedState(store.state, path); }
  4266. }
  4267. });
  4268. return local
  4269. }
  4270. function makeLocalGetters (store, namespace) {
  4271. if (!store._makeLocalGettersCache[namespace]) {
  4272. var gettersProxy = {};
  4273. var splitPos = namespace.length;
  4274. Object.keys(store.getters).forEach(function (type) {
  4275. // skip if the target getter is not match this namespace
  4276. if (type.slice(0, splitPos) !== namespace) { return }
  4277. // extract local getter type
  4278. var localType = type.slice(splitPos);
  4279. // Add a port to the getters proxy.
  4280. // Define as getter property because
  4281. // we do not want to evaluate the getters in this time.
  4282. Object.defineProperty(gettersProxy, localType, {
  4283. get: function () { return store.getters[type]; },
  4284. enumerable: true
  4285. });
  4286. });
  4287. store._makeLocalGettersCache[namespace] = gettersProxy;
  4288. }
  4289. return store._makeLocalGettersCache[namespace]
  4290. }
  4291. function registerMutation (store, type, handler, local) {
  4292. var entry = store._mutations[type] || (store._mutations[type] = []);
  4293. entry.push(function wrappedMutationHandler (payload) {
  4294. handler.call(store, local.state, payload);
  4295. });
  4296. }
  4297. function registerAction (store, type, handler, local) {
  4298. var entry = store._actions[type] || (store._actions[type] = []);
  4299. entry.push(function wrappedActionHandler (payload) {
  4300. var res = handler.call(store, {
  4301. dispatch: local.dispatch,
  4302. commit: local.commit,
  4303. getters: local.getters,
  4304. state: local.state,
  4305. rootGetters: store.getters,
  4306. rootState: store.state
  4307. }, payload);
  4308. if (!isPromise(res)) {
  4309. res = Promise.resolve(res);
  4310. }
  4311. if (store._devtoolHook) {
  4312. return res.catch(function (err) {
  4313. store._devtoolHook.emit('vuex:error', err);
  4314. throw err
  4315. })
  4316. } else {
  4317. return res
  4318. }
  4319. });
  4320. }
  4321. function registerGetter (store, type, rawGetter, local) {
  4322. if (store._wrappedGetters[type]) {
  4323. if ((true)) {
  4324. console.error(("[vuex] duplicate getter key: " + type));
  4325. }
  4326. return
  4327. }
  4328. store._wrappedGetters[type] = function wrappedGetter (store) {
  4329. return rawGetter(
  4330. local.state, // local state
  4331. local.getters, // local getters
  4332. store.state, // root state
  4333. store.getters // root getters
  4334. )
  4335. };
  4336. }
  4337. function enableStrictMode (store) {
  4338. store._vm.$watch(function () { return this._data.$$state }, function () {
  4339. if ((true)) {
  4340. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  4341. }
  4342. }, { deep: true, sync: true });
  4343. }
  4344. function getNestedState (state, path) {
  4345. return path.reduce(function (state, key) { return state[key]; }, state)
  4346. }
  4347. function unifyObjectStyle (type, payload, options) {
  4348. if (isObject(type) && type.type) {
  4349. options = payload;
  4350. payload = type;
  4351. type = type.type;
  4352. }
  4353. if ((true)) {
  4354. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  4355. }
  4356. return { type: type, payload: payload, options: options }
  4357. }
  4358. function install (_Vue) {
  4359. if (Vue && _Vue === Vue) {
  4360. if ((true)) {
  4361. console.error(
  4362. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  4363. );
  4364. }
  4365. return
  4366. }
  4367. Vue = _Vue;
  4368. applyMixin(Vue);
  4369. }
  4370. /**
  4371. * Reduce the code which written in Vue.js for getting the state.
  4372. * @param {String} [namespace] - Module's namespace
  4373. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  4374. * @param {Object}
  4375. */
  4376. var mapState = normalizeNamespace(function (namespace, states) {
  4377. var res = {};
  4378. if (( true) && !isValidMap(states)) {
  4379. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  4380. }
  4381. normalizeMap(states).forEach(function (ref) {
  4382. var key = ref.key;
  4383. var val = ref.val;
  4384. res[key] = function mappedState () {
  4385. var state = this.$store.state;
  4386. var getters = this.$store.getters;
  4387. if (namespace) {
  4388. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  4389. if (!module) {
  4390. return
  4391. }
  4392. state = module.context.state;
  4393. getters = module.context.getters;
  4394. }
  4395. return typeof val === 'function'
  4396. ? val.call(this, state, getters)
  4397. : state[val]
  4398. };
  4399. // mark vuex getter for devtools
  4400. res[key].vuex = true;
  4401. });
  4402. return res
  4403. });
  4404. /**
  4405. * Reduce the code which written in Vue.js for committing the mutation
  4406. * @param {String} [namespace] - Module's namespace
  4407. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  4408. * @return {Object}
  4409. */
  4410. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  4411. var res = {};
  4412. if (( true) && !isValidMap(mutations)) {
  4413. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  4414. }
  4415. normalizeMap(mutations).forEach(function (ref) {
  4416. var key = ref.key;
  4417. var val = ref.val;
  4418. res[key] = function mappedMutation () {
  4419. var args = [], len = arguments.length;
  4420. while ( len-- ) args[ len ] = arguments[ len ];
  4421. // Get the commit method from store
  4422. var commit = this.$store.commit;
  4423. if (namespace) {
  4424. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  4425. if (!module) {
  4426. return
  4427. }
  4428. commit = module.context.commit;
  4429. }
  4430. return typeof val === 'function'
  4431. ? val.apply(this, [commit].concat(args))
  4432. : commit.apply(this.$store, [val].concat(args))
  4433. };
  4434. });
  4435. return res
  4436. });
  4437. /**
  4438. * Reduce the code which written in Vue.js for getting the getters
  4439. * @param {String} [namespace] - Module's namespace
  4440. * @param {Object|Array} getters
  4441. * @return {Object}
  4442. */
  4443. var mapGetters = normalizeNamespace(function (namespace, getters) {
  4444. var res = {};
  4445. if (( true) && !isValidMap(getters)) {
  4446. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  4447. }
  4448. normalizeMap(getters).forEach(function (ref) {
  4449. var key = ref.key;
  4450. var val = ref.val;
  4451. // The namespace has been mutated by normalizeNamespace
  4452. val = namespace + val;
  4453. res[key] = function mappedGetter () {
  4454. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  4455. return
  4456. }
  4457. if (( true) && !(val in this.$store.getters)) {
  4458. console.error(("[vuex] unknown getter: " + val));
  4459. return
  4460. }
  4461. return this.$store.getters[val]
  4462. };
  4463. // mark vuex getter for devtools
  4464. res[key].vuex = true;
  4465. });
  4466. return res
  4467. });
  4468. /**
  4469. * Reduce the code which written in Vue.js for dispatch the action
  4470. * @param {String} [namespace] - Module's namespace
  4471. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  4472. * @return {Object}
  4473. */
  4474. var mapActions = normalizeNamespace(function (namespace, actions) {
  4475. var res = {};
  4476. if (( true) && !isValidMap(actions)) {
  4477. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  4478. }
  4479. normalizeMap(actions).forEach(function (ref) {
  4480. var key = ref.key;
  4481. var val = ref.val;
  4482. res[key] = function mappedAction () {
  4483. var args = [], len = arguments.length;
  4484. while ( len-- ) args[ len ] = arguments[ len ];
  4485. // get dispatch function from store
  4486. var dispatch = this.$store.dispatch;
  4487. if (namespace) {
  4488. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  4489. if (!module) {
  4490. return
  4491. }
  4492. dispatch = module.context.dispatch;
  4493. }
  4494. return typeof val === 'function'
  4495. ? val.apply(this, [dispatch].concat(args))
  4496. : dispatch.apply(this.$store, [val].concat(args))
  4497. };
  4498. });
  4499. return res
  4500. });
  4501. /**
  4502. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  4503. * @param {String} namespace
  4504. * @return {Object}
  4505. */
  4506. var createNamespacedHelpers = function (namespace) { return ({
  4507. mapState: mapState.bind(null, namespace),
  4508. mapGetters: mapGetters.bind(null, namespace),
  4509. mapMutations: mapMutations.bind(null, namespace),
  4510. mapActions: mapActions.bind(null, namespace)
  4511. }); };
  4512. /**
  4513. * Normalize the map
  4514. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  4515. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  4516. * @param {Array|Object} map
  4517. * @return {Object}
  4518. */
  4519. function normalizeMap (map) {
  4520. if (!isValidMap(map)) {
  4521. return []
  4522. }
  4523. return Array.isArray(map)
  4524. ? map.map(function (key) { return ({ key: key, val: key }); })
  4525. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  4526. }
  4527. /**
  4528. * Validate whether given map is valid or not
  4529. * @param {*} map
  4530. * @return {Boolean}
  4531. */
  4532. function isValidMap (map) {
  4533. return Array.isArray(map) || isObject(map)
  4534. }
  4535. /**
  4536. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  4537. * @param {Function} fn
  4538. * @return {Function}
  4539. */
  4540. function normalizeNamespace (fn) {
  4541. return function (namespace, map) {
  4542. if (typeof namespace !== 'string') {
  4543. map = namespace;
  4544. namespace = '';
  4545. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  4546. namespace += '/';
  4547. }
  4548. return fn(namespace, map)
  4549. }
  4550. }
  4551. /**
  4552. * Search a special module from store by namespace. if module not exist, print error message.
  4553. * @param {Object} store
  4554. * @param {String} helper
  4555. * @param {String} namespace
  4556. * @return {Object}
  4557. */
  4558. function getModuleByNamespace (store, helper, namespace) {
  4559. var module = store._modulesNamespaceMap[namespace];
  4560. if (( true) && !module) {
  4561. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  4562. }
  4563. return module
  4564. }
  4565. // Credits: borrowed code from fcomb/redux-logger
  4566. function createLogger (ref) {
  4567. if ( ref === void 0 ) ref = {};
  4568. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  4569. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  4570. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  4571. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  4572. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  4573. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  4574. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  4575. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  4576. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  4577. return function (store) {
  4578. var prevState = deepCopy(store.state);
  4579. if (typeof logger === 'undefined') {
  4580. return
  4581. }
  4582. if (logMutations) {
  4583. store.subscribe(function (mutation, state) {
  4584. var nextState = deepCopy(state);
  4585. if (filter(mutation, prevState, nextState)) {
  4586. var formattedTime = getFormattedTime();
  4587. var formattedMutation = mutationTransformer(mutation);
  4588. var message = "mutation " + (mutation.type) + formattedTime;
  4589. startMessage(logger, message, collapsed);
  4590. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  4591. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  4592. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  4593. endMessage(logger);
  4594. }
  4595. prevState = nextState;
  4596. });
  4597. }
  4598. if (logActions) {
  4599. store.subscribeAction(function (action, state) {
  4600. if (actionFilter(action, state)) {
  4601. var formattedTime = getFormattedTime();
  4602. var formattedAction = actionTransformer(action);
  4603. var message = "action " + (action.type) + formattedTime;
  4604. startMessage(logger, message, collapsed);
  4605. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  4606. endMessage(logger);
  4607. }
  4608. });
  4609. }
  4610. }
  4611. }
  4612. function startMessage (logger, message, collapsed) {
  4613. var startMessage = collapsed
  4614. ? logger.groupCollapsed
  4615. : logger.group;
  4616. // render
  4617. try {
  4618. startMessage.call(logger, message);
  4619. } catch (e) {
  4620. logger.log(message);
  4621. }
  4622. }
  4623. function endMessage (logger) {
  4624. try {
  4625. logger.groupEnd();
  4626. } catch (e) {
  4627. logger.log('—— log end ——');
  4628. }
  4629. }
  4630. function getFormattedTime () {
  4631. var time = new Date();
  4632. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  4633. }
  4634. function repeat (str, times) {
  4635. return (new Array(times + 1)).join(str)
  4636. }
  4637. function pad (num, maxLength) {
  4638. return repeat('0', maxLength - num.toString().length) + num
  4639. }
  4640. var index_cjs = {
  4641. Store: Store,
  4642. install: install,
  4643. version: '3.6.2',
  4644. mapState: mapState,
  4645. mapMutations: mapMutations,
  4646. mapGetters: mapGetters,
  4647. mapActions: mapActions,
  4648. createNamespacedHelpers: createNamespacedHelpers,
  4649. createLogger: createLogger
  4650. };
  4651. module.exports = index_cjs;
  4652. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  4653. /***/ }),
  4654. /***/ 17:
  4655. /*!**********************************************************************!*\
  4656. !*** C:/Users/10428/Desktop/框架源码/微前端/代码/magazine-web/lib/request.js ***!
  4657. \**********************************************************************/
  4658. /*! no static exports found */
  4659. /***/ (function(module, exports, __webpack_require__) {
  4660. "use strict";
  4661. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 13));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}uni.addInterceptor('request', {
  4662. invoke: function invoke(args) {
  4663. var token = uni.getStorageSync(token);
  4664. if (token) args.headers.authorization = token;
  4665. },
  4666. success: function success(args) {
  4667. if (args.statusCode == 401) {
  4668. // 返回登录处理
  4669. sessionStorage.removeItem('token');
  4670. // router.replace('/frame/login');
  4671. }
  4672. if (args.statusCode == 500) {
  4673. // 错误处理
  4674. args.data.data = { errcode: -1001, errmsg: '服务器错误' };
  4675. }
  4676. },
  4677. fail: function fail(err) {
  4678. console.log('interceptor-fail', err);
  4679. },
  4680. complete: function complete(res) {
  4681. console.log('interceptor-complete', res);
  4682. } });
  4683. // 私有方法
  4684. var request = /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {var url, method, params, data, headers;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:url = _ref.url, method = _ref.method, params = _ref.params, data = _ref.data, headers = _ref.headers;_context.next = 3;return (
  4685. uni.request({ url: url, method: method, params: params, data: data, headers: headers }));case 3:return _context.abrupt("return", _context.sent);case 4:case "end":return _context.stop();}}}, _callee);}));return function request(_x) {return _ref2.apply(this, arguments);};}();
  4686. // 定义类
  4687. var Point = /*#__PURE__*/function () {function Point() {_classCallCheck(this, Point);}_createClass(Point, [{ key: "get", value: function get(
  4688. url, params, headers) {
  4689. return request({ url: url, method: 'get', params: params, headers: headers });
  4690. } }, { key: "post", value: function post(
  4691. url, data, params, headers) {
  4692. return request({ url: url, method: 'post', data: data, params: params, headers: headers });
  4693. } }, { key: "delete", value: function _delete(
  4694. url, params, headers) {
  4695. return request({ url: url, method: 'delete', params: params, headers: headers });
  4696. } }]);return Point;}();var _default =
  4697. new Point();exports.default = _default;
  4698. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  4699. /***/ }),
  4700. /***/ 2:
  4701. /*!***********************************!*\
  4702. !*** (webpack)/buildin/global.js ***!
  4703. \***********************************/
  4704. /*! no static exports found */
  4705. /***/ (function(module, exports) {
  4706. var g;
  4707. // This works in non-strict mode
  4708. g = (function() {
  4709. return this;
  4710. })();
  4711. try {
  4712. // This works if eval is allowed (see CSP)
  4713. g = g || new Function("return this")();
  4714. } catch (e) {
  4715. // This works if the window reference is available
  4716. if (typeof window === "object") g = window;
  4717. }
  4718. // g can still be undefined, but nothing to do about it...
  4719. // We return undefined, instead of nothing here, so it's
  4720. // easier to handle this case. if(!global) { ...}
  4721. module.exports = g;
  4722. /***/ }),
  4723. /***/ 3:
  4724. /*!******************************************************************************************!*\
  4725. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4726. \******************************************************************************************/
  4727. /*! exports provided: default */
  4728. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4729. "use strict";
  4730. __webpack_require__.r(__webpack_exports__);
  4731. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4732. * Vue.js v2.6.11
  4733. * (c) 2014-2021 Evan You
  4734. * Released under the MIT License.
  4735. */
  4736. /* */
  4737. var emptyObject = Object.freeze({});
  4738. // These helpers produce better VM code in JS engines due to their
  4739. // explicitness and function inlining.
  4740. function isUndef (v) {
  4741. return v === undefined || v === null
  4742. }
  4743. function isDef (v) {
  4744. return v !== undefined && v !== null
  4745. }
  4746. function isTrue (v) {
  4747. return v === true
  4748. }
  4749. function isFalse (v) {
  4750. return v === false
  4751. }
  4752. /**
  4753. * Check if value is primitive.
  4754. */
  4755. function isPrimitive (value) {
  4756. return (
  4757. typeof value === 'string' ||
  4758. typeof value === 'number' ||
  4759. // $flow-disable-line
  4760. typeof value === 'symbol' ||
  4761. typeof value === 'boolean'
  4762. )
  4763. }
  4764. /**
  4765. * Quick object check - this is primarily used to tell
  4766. * Objects from primitive values when we know the value
  4767. * is a JSON-compliant type.
  4768. */
  4769. function isObject (obj) {
  4770. return obj !== null && typeof obj === 'object'
  4771. }
  4772. /**
  4773. * Get the raw type string of a value, e.g., [object Object].
  4774. */
  4775. var _toString = Object.prototype.toString;
  4776. function toRawType (value) {
  4777. return _toString.call(value).slice(8, -1)
  4778. }
  4779. /**
  4780. * Strict object type check. Only returns true
  4781. * for plain JavaScript objects.
  4782. */
  4783. function isPlainObject (obj) {
  4784. return _toString.call(obj) === '[object Object]'
  4785. }
  4786. function isRegExp (v) {
  4787. return _toString.call(v) === '[object RegExp]'
  4788. }
  4789. /**
  4790. * Check if val is a valid array index.
  4791. */
  4792. function isValidArrayIndex (val) {
  4793. var n = parseFloat(String(val));
  4794. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4795. }
  4796. function isPromise (val) {
  4797. return (
  4798. isDef(val) &&
  4799. typeof val.then === 'function' &&
  4800. typeof val.catch === 'function'
  4801. )
  4802. }
  4803. /**
  4804. * Convert a value to a string that is actually rendered.
  4805. */
  4806. function toString (val) {
  4807. return val == null
  4808. ? ''
  4809. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4810. ? JSON.stringify(val, null, 2)
  4811. : String(val)
  4812. }
  4813. /**
  4814. * Convert an input value to a number for persistence.
  4815. * If the conversion fails, return original string.
  4816. */
  4817. function toNumber (val) {
  4818. var n = parseFloat(val);
  4819. return isNaN(n) ? val : n
  4820. }
  4821. /**
  4822. * Make a map and return a function for checking if a key
  4823. * is in that map.
  4824. */
  4825. function makeMap (
  4826. str,
  4827. expectsLowerCase
  4828. ) {
  4829. var map = Object.create(null);
  4830. var list = str.split(',');
  4831. for (var i = 0; i < list.length; i++) {
  4832. map[list[i]] = true;
  4833. }
  4834. return expectsLowerCase
  4835. ? function (val) { return map[val.toLowerCase()]; }
  4836. : function (val) { return map[val]; }
  4837. }
  4838. /**
  4839. * Check if a tag is a built-in tag.
  4840. */
  4841. var isBuiltInTag = makeMap('slot,component', true);
  4842. /**
  4843. * Check if an attribute is a reserved attribute.
  4844. */
  4845. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4846. /**
  4847. * Remove an item from an array.
  4848. */
  4849. function remove (arr, item) {
  4850. if (arr.length) {
  4851. var index = arr.indexOf(item);
  4852. if (index > -1) {
  4853. return arr.splice(index, 1)
  4854. }
  4855. }
  4856. }
  4857. /**
  4858. * Check whether an object has the property.
  4859. */
  4860. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4861. function hasOwn (obj, key) {
  4862. return hasOwnProperty.call(obj, key)
  4863. }
  4864. /**
  4865. * Create a cached version of a pure function.
  4866. */
  4867. function cached (fn) {
  4868. var cache = Object.create(null);
  4869. return (function cachedFn (str) {
  4870. var hit = cache[str];
  4871. return hit || (cache[str] = fn(str))
  4872. })
  4873. }
  4874. /**
  4875. * Camelize a hyphen-delimited string.
  4876. */
  4877. var camelizeRE = /-(\w)/g;
  4878. var camelize = cached(function (str) {
  4879. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4880. });
  4881. /**
  4882. * Capitalize a string.
  4883. */
  4884. var capitalize = cached(function (str) {
  4885. return str.charAt(0).toUpperCase() + str.slice(1)
  4886. });
  4887. /**
  4888. * Hyphenate a camelCase string.
  4889. */
  4890. var hyphenateRE = /\B([A-Z])/g;
  4891. var hyphenate = cached(function (str) {
  4892. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4893. });
  4894. /**
  4895. * Simple bind polyfill for environments that do not support it,
  4896. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4897. * since native bind is now performant enough in most browsers.
  4898. * But removing it would mean breaking code that was able to run in
  4899. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4900. */
  4901. /* istanbul ignore next */
  4902. function polyfillBind (fn, ctx) {
  4903. function boundFn (a) {
  4904. var l = arguments.length;
  4905. return l
  4906. ? l > 1
  4907. ? fn.apply(ctx, arguments)
  4908. : fn.call(ctx, a)
  4909. : fn.call(ctx)
  4910. }
  4911. boundFn._length = fn.length;
  4912. return boundFn
  4913. }
  4914. function nativeBind (fn, ctx) {
  4915. return fn.bind(ctx)
  4916. }
  4917. var bind = Function.prototype.bind
  4918. ? nativeBind
  4919. : polyfillBind;
  4920. /**
  4921. * Convert an Array-like object to a real Array.
  4922. */
  4923. function toArray (list, start) {
  4924. start = start || 0;
  4925. var i = list.length - start;
  4926. var ret = new Array(i);
  4927. while (i--) {
  4928. ret[i] = list[i + start];
  4929. }
  4930. return ret
  4931. }
  4932. /**
  4933. * Mix properties into target object.
  4934. */
  4935. function extend (to, _from) {
  4936. for (var key in _from) {
  4937. to[key] = _from[key];
  4938. }
  4939. return to
  4940. }
  4941. /**
  4942. * Merge an Array of Objects into a single Object.
  4943. */
  4944. function toObject (arr) {
  4945. var res = {};
  4946. for (var i = 0; i < arr.length; i++) {
  4947. if (arr[i]) {
  4948. extend(res, arr[i]);
  4949. }
  4950. }
  4951. return res
  4952. }
  4953. /* eslint-disable no-unused-vars */
  4954. /**
  4955. * Perform no operation.
  4956. * Stubbing args to make Flow happy without leaving useless transpiled code
  4957. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4958. */
  4959. function noop (a, b, c) {}
  4960. /**
  4961. * Always return false.
  4962. */
  4963. var no = function (a, b, c) { return false; };
  4964. /* eslint-enable no-unused-vars */
  4965. /**
  4966. * Return the same value.
  4967. */
  4968. var identity = function (_) { return _; };
  4969. /**
  4970. * Check if two values are loosely equal - that is,
  4971. * if they are plain objects, do they have the same shape?
  4972. */
  4973. function looseEqual (a, b) {
  4974. if (a === b) { return true }
  4975. var isObjectA = isObject(a);
  4976. var isObjectB = isObject(b);
  4977. if (isObjectA && isObjectB) {
  4978. try {
  4979. var isArrayA = Array.isArray(a);
  4980. var isArrayB = Array.isArray(b);
  4981. if (isArrayA && isArrayB) {
  4982. return a.length === b.length && a.every(function (e, i) {
  4983. return looseEqual(e, b[i])
  4984. })
  4985. } else if (a instanceof Date && b instanceof Date) {
  4986. return a.getTime() === b.getTime()
  4987. } else if (!isArrayA && !isArrayB) {
  4988. var keysA = Object.keys(a);
  4989. var keysB = Object.keys(b);
  4990. return keysA.length === keysB.length && keysA.every(function (key) {
  4991. return looseEqual(a[key], b[key])
  4992. })
  4993. } else {
  4994. /* istanbul ignore next */
  4995. return false
  4996. }
  4997. } catch (e) {
  4998. /* istanbul ignore next */
  4999. return false
  5000. }
  5001. } else if (!isObjectA && !isObjectB) {
  5002. return String(a) === String(b)
  5003. } else {
  5004. return false
  5005. }
  5006. }
  5007. /**
  5008. * Return the first index at which a loosely equal value can be
  5009. * found in the array (if value is a plain object, the array must
  5010. * contain an object of the same shape), or -1 if it is not present.
  5011. */
  5012. function looseIndexOf (arr, val) {
  5013. for (var i = 0; i < arr.length; i++) {
  5014. if (looseEqual(arr[i], val)) { return i }
  5015. }
  5016. return -1
  5017. }
  5018. /**
  5019. * Ensure a function is called only once.
  5020. */
  5021. function once (fn) {
  5022. var called = false;
  5023. return function () {
  5024. if (!called) {
  5025. called = true;
  5026. fn.apply(this, arguments);
  5027. }
  5028. }
  5029. }
  5030. var ASSET_TYPES = [
  5031. 'component',
  5032. 'directive',
  5033. 'filter'
  5034. ];
  5035. var LIFECYCLE_HOOKS = [
  5036. 'beforeCreate',
  5037. 'created',
  5038. 'beforeMount',
  5039. 'mounted',
  5040. 'beforeUpdate',
  5041. 'updated',
  5042. 'beforeDestroy',
  5043. 'destroyed',
  5044. 'activated',
  5045. 'deactivated',
  5046. 'errorCaptured',
  5047. 'serverPrefetch'
  5048. ];
  5049. /* */
  5050. var config = ({
  5051. /**
  5052. * Option merge strategies (used in core/util/options)
  5053. */
  5054. // $flow-disable-line
  5055. optionMergeStrategies: Object.create(null),
  5056. /**
  5057. * Whether to suppress warnings.
  5058. */
  5059. silent: false,
  5060. /**
  5061. * Show production mode tip message on boot?
  5062. */
  5063. productionTip: "development" !== 'production',
  5064. /**
  5065. * Whether to enable devtools
  5066. */
  5067. devtools: "development" !== 'production',
  5068. /**
  5069. * Whether to record perf
  5070. */
  5071. performance: false,
  5072. /**
  5073. * Error handler for watcher errors
  5074. */
  5075. errorHandler: null,
  5076. /**
  5077. * Warn handler for watcher warns
  5078. */
  5079. warnHandler: null,
  5080. /**
  5081. * Ignore certain custom elements
  5082. */
  5083. ignoredElements: [],
  5084. /**
  5085. * Custom user key aliases for v-on
  5086. */
  5087. // $flow-disable-line
  5088. keyCodes: Object.create(null),
  5089. /**
  5090. * Check if a tag is reserved so that it cannot be registered as a
  5091. * component. This is platform-dependent and may be overwritten.
  5092. */
  5093. isReservedTag: no,
  5094. /**
  5095. * Check if an attribute is reserved so that it cannot be used as a component
  5096. * prop. This is platform-dependent and may be overwritten.
  5097. */
  5098. isReservedAttr: no,
  5099. /**
  5100. * Check if a tag is an unknown element.
  5101. * Platform-dependent.
  5102. */
  5103. isUnknownElement: no,
  5104. /**
  5105. * Get the namespace of an element
  5106. */
  5107. getTagNamespace: noop,
  5108. /**
  5109. * Parse the real tag name for the specific platform.
  5110. */
  5111. parsePlatformTagName: identity,
  5112. /**
  5113. * Check if an attribute must be bound using property, e.g. value
  5114. * Platform-dependent.
  5115. */
  5116. mustUseProp: no,
  5117. /**
  5118. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  5119. * This will significantly reduce performance if set to false.
  5120. */
  5121. async: true,
  5122. /**
  5123. * Exposed for legacy reasons
  5124. */
  5125. _lifecycleHooks: LIFECYCLE_HOOKS
  5126. });
  5127. /* */
  5128. /**
  5129. * unicode letters used for parsing html tags, component names and property paths.
  5130. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  5131. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  5132. */
  5133. 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/;
  5134. /**
  5135. * Check if a string starts with $ or _
  5136. */
  5137. function isReserved (str) {
  5138. var c = (str + '').charCodeAt(0);
  5139. return c === 0x24 || c === 0x5F
  5140. }
  5141. /**
  5142. * Define a property.
  5143. */
  5144. function def (obj, key, val, enumerable) {
  5145. Object.defineProperty(obj, key, {
  5146. value: val,
  5147. enumerable: !!enumerable,
  5148. writable: true,
  5149. configurable: true
  5150. });
  5151. }
  5152. /**
  5153. * Parse simple path.
  5154. */
  5155. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5156. function parsePath (path) {
  5157. if (bailRE.test(path)) {
  5158. return
  5159. }
  5160. var segments = path.split('.');
  5161. return function (obj) {
  5162. for (var i = 0; i < segments.length; i++) {
  5163. if (!obj) { return }
  5164. obj = obj[segments[i]];
  5165. }
  5166. return obj
  5167. }
  5168. }
  5169. /* */
  5170. // can we use __proto__?
  5171. var hasProto = '__proto__' in {};
  5172. // Browser environment sniffing
  5173. var inBrowser = typeof window !== 'undefined';
  5174. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5175. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5176. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5177. var isIE = UA && /msie|trident/.test(UA);
  5178. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5179. var isEdge = UA && UA.indexOf('edge/') > 0;
  5180. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5181. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5182. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5183. var isPhantomJS = UA && /phantomjs/.test(UA);
  5184. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5185. // Firefox has a "watch" function on Object.prototype...
  5186. var nativeWatch = ({}).watch;
  5187. if (inBrowser) {
  5188. try {
  5189. var opts = {};
  5190. Object.defineProperty(opts, 'passive', ({
  5191. get: function get () {
  5192. }
  5193. })); // https://github.com/facebook/flow/issues/285
  5194. window.addEventListener('test-passive', null, opts);
  5195. } catch (e) {}
  5196. }
  5197. // this needs to be lazy-evaled because vue may be required before
  5198. // vue-server-renderer can set VUE_ENV
  5199. var _isServer;
  5200. var isServerRendering = function () {
  5201. if (_isServer === undefined) {
  5202. /* istanbul ignore if */
  5203. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5204. // detect presence of vue-server-renderer and avoid
  5205. // Webpack shimming the process
  5206. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5207. } else {
  5208. _isServer = false;
  5209. }
  5210. }
  5211. return _isServer
  5212. };
  5213. // detect devtools
  5214. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5215. /* istanbul ignore next */
  5216. function isNative (Ctor) {
  5217. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5218. }
  5219. var hasSymbol =
  5220. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5221. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5222. var _Set;
  5223. /* istanbul ignore if */ // $flow-disable-line
  5224. if (typeof Set !== 'undefined' && isNative(Set)) {
  5225. // use native Set when available.
  5226. _Set = Set;
  5227. } else {
  5228. // a non-standard Set polyfill that only works with primitive keys.
  5229. _Set = /*@__PURE__*/(function () {
  5230. function Set () {
  5231. this.set = Object.create(null);
  5232. }
  5233. Set.prototype.has = function has (key) {
  5234. return this.set[key] === true
  5235. };
  5236. Set.prototype.add = function add (key) {
  5237. this.set[key] = true;
  5238. };
  5239. Set.prototype.clear = function clear () {
  5240. this.set = Object.create(null);
  5241. };
  5242. return Set;
  5243. }());
  5244. }
  5245. /* */
  5246. var warn = noop;
  5247. var tip = noop;
  5248. var generateComponentTrace = (noop); // work around flow check
  5249. var formatComponentName = (noop);
  5250. if (true) {
  5251. var hasConsole = typeof console !== 'undefined';
  5252. var classifyRE = /(?:^|[-_])(\w)/g;
  5253. var classify = function (str) { return str
  5254. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5255. .replace(/[-_]/g, ''); };
  5256. warn = function (msg, vm) {
  5257. var trace = vm ? generateComponentTrace(vm) : '';
  5258. if (config.warnHandler) {
  5259. config.warnHandler.call(null, msg, vm, trace);
  5260. } else if (hasConsole && (!config.silent)) {
  5261. console.error(("[Vue warn]: " + msg + trace));
  5262. }
  5263. };
  5264. tip = function (msg, vm) {
  5265. if (hasConsole && (!config.silent)) {
  5266. console.warn("[Vue tip]: " + msg + (
  5267. vm ? generateComponentTrace(vm) : ''
  5268. ));
  5269. }
  5270. };
  5271. formatComponentName = function (vm, includeFile) {
  5272. if (vm.$root === vm) {
  5273. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5274. return ('') + vm.$options.__file
  5275. }
  5276. return '<Root>'
  5277. }
  5278. var options = typeof vm === 'function' && vm.cid != null
  5279. ? vm.options
  5280. : vm._isVue
  5281. ? vm.$options || vm.constructor.options
  5282. : vm;
  5283. var name = options.name || options._componentTag;
  5284. var file = options.__file;
  5285. if (!name && file) {
  5286. var match = file.match(/([^/\\]+)\.vue$/);
  5287. name = match && match[1];
  5288. }
  5289. return (
  5290. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5291. (file && includeFile !== false ? (" at " + file) : '')
  5292. )
  5293. };
  5294. var repeat = function (str, n) {
  5295. var res = '';
  5296. while (n) {
  5297. if (n % 2 === 1) { res += str; }
  5298. if (n > 1) { str += str; }
  5299. n >>= 1;
  5300. }
  5301. return res
  5302. };
  5303. generateComponentTrace = function (vm) {
  5304. if (vm._isVue && vm.$parent) {
  5305. var tree = [];
  5306. var currentRecursiveSequence = 0;
  5307. while (vm && vm.$options.name !== 'PageBody') {
  5308. if (tree.length > 0) {
  5309. var last = tree[tree.length - 1];
  5310. if (last.constructor === vm.constructor) {
  5311. currentRecursiveSequence++;
  5312. vm = vm.$parent;
  5313. continue
  5314. } else if (currentRecursiveSequence > 0) {
  5315. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5316. currentRecursiveSequence = 0;
  5317. }
  5318. }
  5319. !vm.$options.isReserved && tree.push(vm);
  5320. vm = vm.$parent;
  5321. }
  5322. return '\n\nfound in\n\n' + tree
  5323. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5324. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5325. : formatComponentName(vm))); })
  5326. .join('\n')
  5327. } else {
  5328. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5329. }
  5330. };
  5331. }
  5332. /* */
  5333. var uid = 0;
  5334. /**
  5335. * A dep is an observable that can have multiple
  5336. * directives subscribing to it.
  5337. */
  5338. var Dep = function Dep () {
  5339. this.id = uid++;
  5340. this.subs = [];
  5341. };
  5342. Dep.prototype.addSub = function addSub (sub) {
  5343. this.subs.push(sub);
  5344. };
  5345. Dep.prototype.removeSub = function removeSub (sub) {
  5346. remove(this.subs, sub);
  5347. };
  5348. Dep.prototype.depend = function depend () {
  5349. if (Dep.SharedObject.target) {
  5350. Dep.SharedObject.target.addDep(this);
  5351. }
  5352. };
  5353. Dep.prototype.notify = function notify () {
  5354. // stabilize the subscriber list first
  5355. var subs = this.subs.slice();
  5356. if ( true && !config.async) {
  5357. // subs aren't sorted in scheduler if not running async
  5358. // we need to sort them now to make sure they fire in correct
  5359. // order
  5360. subs.sort(function (a, b) { return a.id - b.id; });
  5361. }
  5362. for (var i = 0, l = subs.length; i < l; i++) {
  5363. subs[i].update();
  5364. }
  5365. };
  5366. // The current target watcher being evaluated.
  5367. // This is globally unique because only one watcher
  5368. // can be evaluated at a time.
  5369. // fixed by xxxxxx (nvue shared vuex)
  5370. /* eslint-disable no-undef */
  5371. Dep.SharedObject = {};
  5372. Dep.SharedObject.target = null;
  5373. Dep.SharedObject.targetStack = [];
  5374. function pushTarget (target) {
  5375. Dep.SharedObject.targetStack.push(target);
  5376. Dep.SharedObject.target = target;
  5377. Dep.target = target;
  5378. }
  5379. function popTarget () {
  5380. Dep.SharedObject.targetStack.pop();
  5381. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5382. Dep.target = Dep.SharedObject.target;
  5383. }
  5384. /* */
  5385. var VNode = function VNode (
  5386. tag,
  5387. data,
  5388. children,
  5389. text,
  5390. elm,
  5391. context,
  5392. componentOptions,
  5393. asyncFactory
  5394. ) {
  5395. this.tag = tag;
  5396. this.data = data;
  5397. this.children = children;
  5398. this.text = text;
  5399. this.elm = elm;
  5400. this.ns = undefined;
  5401. this.context = context;
  5402. this.fnContext = undefined;
  5403. this.fnOptions = undefined;
  5404. this.fnScopeId = undefined;
  5405. this.key = data && data.key;
  5406. this.componentOptions = componentOptions;
  5407. this.componentInstance = undefined;
  5408. this.parent = undefined;
  5409. this.raw = false;
  5410. this.isStatic = false;
  5411. this.isRootInsert = true;
  5412. this.isComment = false;
  5413. this.isCloned = false;
  5414. this.isOnce = false;
  5415. this.asyncFactory = asyncFactory;
  5416. this.asyncMeta = undefined;
  5417. this.isAsyncPlaceholder = false;
  5418. };
  5419. var prototypeAccessors = { child: { configurable: true } };
  5420. // DEPRECATED: alias for componentInstance for backwards compat.
  5421. /* istanbul ignore next */
  5422. prototypeAccessors.child.get = function () {
  5423. return this.componentInstance
  5424. };
  5425. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5426. var createEmptyVNode = function (text) {
  5427. if ( text === void 0 ) text = '';
  5428. var node = new VNode();
  5429. node.text = text;
  5430. node.isComment = true;
  5431. return node
  5432. };
  5433. function createTextVNode (val) {
  5434. return new VNode(undefined, undefined, undefined, String(val))
  5435. }
  5436. // optimized shallow clone
  5437. // used for static nodes and slot nodes because they may be reused across
  5438. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5439. // on their elm reference.
  5440. function cloneVNode (vnode) {
  5441. var cloned = new VNode(
  5442. vnode.tag,
  5443. vnode.data,
  5444. // #7975
  5445. // clone children array to avoid mutating original in case of cloning
  5446. // a child.
  5447. vnode.children && vnode.children.slice(),
  5448. vnode.text,
  5449. vnode.elm,
  5450. vnode.context,
  5451. vnode.componentOptions,
  5452. vnode.asyncFactory
  5453. );
  5454. cloned.ns = vnode.ns;
  5455. cloned.isStatic = vnode.isStatic;
  5456. cloned.key = vnode.key;
  5457. cloned.isComment = vnode.isComment;
  5458. cloned.fnContext = vnode.fnContext;
  5459. cloned.fnOptions = vnode.fnOptions;
  5460. cloned.fnScopeId = vnode.fnScopeId;
  5461. cloned.asyncMeta = vnode.asyncMeta;
  5462. cloned.isCloned = true;
  5463. return cloned
  5464. }
  5465. /*
  5466. * not type checking this file because flow doesn't play well with
  5467. * dynamically accessing methods on Array prototype
  5468. */
  5469. var arrayProto = Array.prototype;
  5470. var arrayMethods = Object.create(arrayProto);
  5471. var methodsToPatch = [
  5472. 'push',
  5473. 'pop',
  5474. 'shift',
  5475. 'unshift',
  5476. 'splice',
  5477. 'sort',
  5478. 'reverse'
  5479. ];
  5480. /**
  5481. * Intercept mutating methods and emit events
  5482. */
  5483. methodsToPatch.forEach(function (method) {
  5484. // cache original method
  5485. var original = arrayProto[method];
  5486. def(arrayMethods, method, function mutator () {
  5487. var args = [], len = arguments.length;
  5488. while ( len-- ) args[ len ] = arguments[ len ];
  5489. var result = original.apply(this, args);
  5490. var ob = this.__ob__;
  5491. var inserted;
  5492. switch (method) {
  5493. case 'push':
  5494. case 'unshift':
  5495. inserted = args;
  5496. break
  5497. case 'splice':
  5498. inserted = args.slice(2);
  5499. break
  5500. }
  5501. if (inserted) { ob.observeArray(inserted); }
  5502. // notify change
  5503. ob.dep.notify();
  5504. return result
  5505. });
  5506. });
  5507. /* */
  5508. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5509. /**
  5510. * In some cases we may want to disable observation inside a component's
  5511. * update computation.
  5512. */
  5513. var shouldObserve = true;
  5514. function toggleObserving (value) {
  5515. shouldObserve = value;
  5516. }
  5517. /**
  5518. * Observer class that is attached to each observed
  5519. * object. Once attached, the observer converts the target
  5520. * object's property keys into getter/setters that
  5521. * collect dependencies and dispatch updates.
  5522. */
  5523. var Observer = function Observer (value) {
  5524. this.value = value;
  5525. this.dep = new Dep();
  5526. this.vmCount = 0;
  5527. def(value, '__ob__', this);
  5528. if (Array.isArray(value)) {
  5529. if (hasProto) {
  5530. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5531. if(value.push !== value.__proto__.push){
  5532. copyAugment(value, arrayMethods, arrayKeys);
  5533. } else {
  5534. protoAugment(value, arrayMethods);
  5535. }
  5536. }
  5537. } else {
  5538. copyAugment(value, arrayMethods, arrayKeys);
  5539. }
  5540. this.observeArray(value);
  5541. } else {
  5542. this.walk(value);
  5543. }
  5544. };
  5545. /**
  5546. * Walk through all properties and convert them into
  5547. * getter/setters. This method should only be called when
  5548. * value type is Object.
  5549. */
  5550. Observer.prototype.walk = function walk (obj) {
  5551. var keys = Object.keys(obj);
  5552. for (var i = 0; i < keys.length; i++) {
  5553. defineReactive$$1(obj, keys[i]);
  5554. }
  5555. };
  5556. /**
  5557. * Observe a list of Array items.
  5558. */
  5559. Observer.prototype.observeArray = function observeArray (items) {
  5560. for (var i = 0, l = items.length; i < l; i++) {
  5561. observe(items[i]);
  5562. }
  5563. };
  5564. // helpers
  5565. /**
  5566. * Augment a target Object or Array by intercepting
  5567. * the prototype chain using __proto__
  5568. */
  5569. function protoAugment (target, src) {
  5570. /* eslint-disable no-proto */
  5571. target.__proto__ = src;
  5572. /* eslint-enable no-proto */
  5573. }
  5574. /**
  5575. * Augment a target Object or Array by defining
  5576. * hidden properties.
  5577. */
  5578. /* istanbul ignore next */
  5579. function copyAugment (target, src, keys) {
  5580. for (var i = 0, l = keys.length; i < l; i++) {
  5581. var key = keys[i];
  5582. def(target, key, src[key]);
  5583. }
  5584. }
  5585. /**
  5586. * Attempt to create an observer instance for a value,
  5587. * returns the new observer if successfully observed,
  5588. * or the existing observer if the value already has one.
  5589. */
  5590. function observe (value, asRootData) {
  5591. if (!isObject(value) || value instanceof VNode) {
  5592. return
  5593. }
  5594. var ob;
  5595. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5596. ob = value.__ob__;
  5597. } else if (
  5598. shouldObserve &&
  5599. !isServerRendering() &&
  5600. (Array.isArray(value) || isPlainObject(value)) &&
  5601. Object.isExtensible(value) &&
  5602. !value._isVue
  5603. ) {
  5604. ob = new Observer(value);
  5605. }
  5606. if (asRootData && ob) {
  5607. ob.vmCount++;
  5608. }
  5609. return ob
  5610. }
  5611. /**
  5612. * Define a reactive property on an Object.
  5613. */
  5614. function defineReactive$$1 (
  5615. obj,
  5616. key,
  5617. val,
  5618. customSetter,
  5619. shallow
  5620. ) {
  5621. var dep = new Dep();
  5622. var property = Object.getOwnPropertyDescriptor(obj, key);
  5623. if (property && property.configurable === false) {
  5624. return
  5625. }
  5626. // cater for pre-defined getter/setters
  5627. var getter = property && property.get;
  5628. var setter = property && property.set;
  5629. if ((!getter || setter) && arguments.length === 2) {
  5630. val = obj[key];
  5631. }
  5632. var childOb = !shallow && observe(val);
  5633. Object.defineProperty(obj, key, {
  5634. enumerable: true,
  5635. configurable: true,
  5636. get: function reactiveGetter () {
  5637. var value = getter ? getter.call(obj) : val;
  5638. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5639. dep.depend();
  5640. if (childOb) {
  5641. childOb.dep.depend();
  5642. if (Array.isArray(value)) {
  5643. dependArray(value);
  5644. }
  5645. }
  5646. }
  5647. return value
  5648. },
  5649. set: function reactiveSetter (newVal) {
  5650. var value = getter ? getter.call(obj) : val;
  5651. /* eslint-disable no-self-compare */
  5652. if (newVal === value || (newVal !== newVal && value !== value)) {
  5653. return
  5654. }
  5655. /* eslint-enable no-self-compare */
  5656. if ( true && customSetter) {
  5657. customSetter();
  5658. }
  5659. // #7981: for accessor properties without setter
  5660. if (getter && !setter) { return }
  5661. if (setter) {
  5662. setter.call(obj, newVal);
  5663. } else {
  5664. val = newVal;
  5665. }
  5666. childOb = !shallow && observe(newVal);
  5667. dep.notify();
  5668. }
  5669. });
  5670. }
  5671. /**
  5672. * Set a property on an object. Adds the new property and
  5673. * triggers change notification if the property doesn't
  5674. * already exist.
  5675. */
  5676. function set (target, key, val) {
  5677. if ( true &&
  5678. (isUndef(target) || isPrimitive(target))
  5679. ) {
  5680. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5681. }
  5682. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5683. target.length = Math.max(target.length, key);
  5684. target.splice(key, 1, val);
  5685. return val
  5686. }
  5687. if (key in target && !(key in Object.prototype)) {
  5688. target[key] = val;
  5689. return val
  5690. }
  5691. var ob = (target).__ob__;
  5692. if (target._isVue || (ob && ob.vmCount)) {
  5693. true && warn(
  5694. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5695. 'at runtime - declare it upfront in the data option.'
  5696. );
  5697. return val
  5698. }
  5699. if (!ob) {
  5700. target[key] = val;
  5701. return val
  5702. }
  5703. defineReactive$$1(ob.value, key, val);
  5704. ob.dep.notify();
  5705. return val
  5706. }
  5707. /**
  5708. * Delete a property and trigger change if necessary.
  5709. */
  5710. function del (target, key) {
  5711. if ( true &&
  5712. (isUndef(target) || isPrimitive(target))
  5713. ) {
  5714. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5715. }
  5716. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5717. target.splice(key, 1);
  5718. return
  5719. }
  5720. var ob = (target).__ob__;
  5721. if (target._isVue || (ob && ob.vmCount)) {
  5722. true && warn(
  5723. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5724. '- just set it to null.'
  5725. );
  5726. return
  5727. }
  5728. if (!hasOwn(target, key)) {
  5729. return
  5730. }
  5731. delete target[key];
  5732. if (!ob) {
  5733. return
  5734. }
  5735. ob.dep.notify();
  5736. }
  5737. /**
  5738. * Collect dependencies on array elements when the array is touched, since
  5739. * we cannot intercept array element access like property getters.
  5740. */
  5741. function dependArray (value) {
  5742. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5743. e = value[i];
  5744. e && e.__ob__ && e.__ob__.dep.depend();
  5745. if (Array.isArray(e)) {
  5746. dependArray(e);
  5747. }
  5748. }
  5749. }
  5750. /* */
  5751. /**
  5752. * Option overwriting strategies are functions that handle
  5753. * how to merge a parent option value and a child option
  5754. * value into the final value.
  5755. */
  5756. var strats = config.optionMergeStrategies;
  5757. /**
  5758. * Options with restrictions
  5759. */
  5760. if (true) {
  5761. strats.el = strats.propsData = function (parent, child, vm, key) {
  5762. if (!vm) {
  5763. warn(
  5764. "option \"" + key + "\" can only be used during instance " +
  5765. 'creation with the `new` keyword.'
  5766. );
  5767. }
  5768. return defaultStrat(parent, child)
  5769. };
  5770. }
  5771. /**
  5772. * Helper that recursively merges two data objects together.
  5773. */
  5774. function mergeData (to, from) {
  5775. if (!from) { return to }
  5776. var key, toVal, fromVal;
  5777. var keys = hasSymbol
  5778. ? Reflect.ownKeys(from)
  5779. : Object.keys(from);
  5780. for (var i = 0; i < keys.length; i++) {
  5781. key = keys[i];
  5782. // in case the object is already observed...
  5783. if (key === '__ob__') { continue }
  5784. toVal = to[key];
  5785. fromVal = from[key];
  5786. if (!hasOwn(to, key)) {
  5787. set(to, key, fromVal);
  5788. } else if (
  5789. toVal !== fromVal &&
  5790. isPlainObject(toVal) &&
  5791. isPlainObject(fromVal)
  5792. ) {
  5793. mergeData(toVal, fromVal);
  5794. }
  5795. }
  5796. return to
  5797. }
  5798. /**
  5799. * Data
  5800. */
  5801. function mergeDataOrFn (
  5802. parentVal,
  5803. childVal,
  5804. vm
  5805. ) {
  5806. if (!vm) {
  5807. // in a Vue.extend merge, both should be functions
  5808. if (!childVal) {
  5809. return parentVal
  5810. }
  5811. if (!parentVal) {
  5812. return childVal
  5813. }
  5814. // when parentVal & childVal are both present,
  5815. // we need to return a function that returns the
  5816. // merged result of both functions... no need to
  5817. // check if parentVal is a function here because
  5818. // it has to be a function to pass previous merges.
  5819. return function mergedDataFn () {
  5820. return mergeData(
  5821. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5822. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5823. )
  5824. }
  5825. } else {
  5826. return function mergedInstanceDataFn () {
  5827. // instance merge
  5828. var instanceData = typeof childVal === 'function'
  5829. ? childVal.call(vm, vm)
  5830. : childVal;
  5831. var defaultData = typeof parentVal === 'function'
  5832. ? parentVal.call(vm, vm)
  5833. : parentVal;
  5834. if (instanceData) {
  5835. return mergeData(instanceData, defaultData)
  5836. } else {
  5837. return defaultData
  5838. }
  5839. }
  5840. }
  5841. }
  5842. strats.data = function (
  5843. parentVal,
  5844. childVal,
  5845. vm
  5846. ) {
  5847. if (!vm) {
  5848. if (childVal && typeof childVal !== 'function') {
  5849. true && warn(
  5850. 'The "data" option should be a function ' +
  5851. 'that returns a per-instance value in component ' +
  5852. 'definitions.',
  5853. vm
  5854. );
  5855. return parentVal
  5856. }
  5857. return mergeDataOrFn(parentVal, childVal)
  5858. }
  5859. return mergeDataOrFn(parentVal, childVal, vm)
  5860. };
  5861. /**
  5862. * Hooks and props are merged as arrays.
  5863. */
  5864. function mergeHook (
  5865. parentVal,
  5866. childVal
  5867. ) {
  5868. var res = childVal
  5869. ? parentVal
  5870. ? parentVal.concat(childVal)
  5871. : Array.isArray(childVal)
  5872. ? childVal
  5873. : [childVal]
  5874. : parentVal;
  5875. return res
  5876. ? dedupeHooks(res)
  5877. : res
  5878. }
  5879. function dedupeHooks (hooks) {
  5880. var res = [];
  5881. for (var i = 0; i < hooks.length; i++) {
  5882. if (res.indexOf(hooks[i]) === -1) {
  5883. res.push(hooks[i]);
  5884. }
  5885. }
  5886. return res
  5887. }
  5888. LIFECYCLE_HOOKS.forEach(function (hook) {
  5889. strats[hook] = mergeHook;
  5890. });
  5891. /**
  5892. * Assets
  5893. *
  5894. * When a vm is present (instance creation), we need to do
  5895. * a three-way merge between constructor options, instance
  5896. * options and parent options.
  5897. */
  5898. function mergeAssets (
  5899. parentVal,
  5900. childVal,
  5901. vm,
  5902. key
  5903. ) {
  5904. var res = Object.create(parentVal || null);
  5905. if (childVal) {
  5906. true && assertObjectType(key, childVal, vm);
  5907. return extend(res, childVal)
  5908. } else {
  5909. return res
  5910. }
  5911. }
  5912. ASSET_TYPES.forEach(function (type) {
  5913. strats[type + 's'] = mergeAssets;
  5914. });
  5915. /**
  5916. * Watchers.
  5917. *
  5918. * Watchers hashes should not overwrite one
  5919. * another, so we merge them as arrays.
  5920. */
  5921. strats.watch = function (
  5922. parentVal,
  5923. childVal,
  5924. vm,
  5925. key
  5926. ) {
  5927. // work around Firefox's Object.prototype.watch...
  5928. if (parentVal === nativeWatch) { parentVal = undefined; }
  5929. if (childVal === nativeWatch) { childVal = undefined; }
  5930. /* istanbul ignore if */
  5931. if (!childVal) { return Object.create(parentVal || null) }
  5932. if (true) {
  5933. assertObjectType(key, childVal, vm);
  5934. }
  5935. if (!parentVal) { return childVal }
  5936. var ret = {};
  5937. extend(ret, parentVal);
  5938. for (var key$1 in childVal) {
  5939. var parent = ret[key$1];
  5940. var child = childVal[key$1];
  5941. if (parent && !Array.isArray(parent)) {
  5942. parent = [parent];
  5943. }
  5944. ret[key$1] = parent
  5945. ? parent.concat(child)
  5946. : Array.isArray(child) ? child : [child];
  5947. }
  5948. return ret
  5949. };
  5950. /**
  5951. * Other object hashes.
  5952. */
  5953. strats.props =
  5954. strats.methods =
  5955. strats.inject =
  5956. strats.computed = function (
  5957. parentVal,
  5958. childVal,
  5959. vm,
  5960. key
  5961. ) {
  5962. if (childVal && "development" !== 'production') {
  5963. assertObjectType(key, childVal, vm);
  5964. }
  5965. if (!parentVal) { return childVal }
  5966. var ret = Object.create(null);
  5967. extend(ret, parentVal);
  5968. if (childVal) { extend(ret, childVal); }
  5969. return ret
  5970. };
  5971. strats.provide = mergeDataOrFn;
  5972. /**
  5973. * Default strategy.
  5974. */
  5975. var defaultStrat = function (parentVal, childVal) {
  5976. return childVal === undefined
  5977. ? parentVal
  5978. : childVal
  5979. };
  5980. /**
  5981. * Validate component names
  5982. */
  5983. function checkComponents (options) {
  5984. for (var key in options.components) {
  5985. validateComponentName(key);
  5986. }
  5987. }
  5988. function validateComponentName (name) {
  5989. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5990. warn(
  5991. 'Invalid component name: "' + name + '". Component names ' +
  5992. 'should conform to valid custom element name in html5 specification.'
  5993. );
  5994. }
  5995. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5996. warn(
  5997. 'Do not use built-in or reserved HTML elements as component ' +
  5998. 'id: ' + name
  5999. );
  6000. }
  6001. }
  6002. /**
  6003. * Ensure all props option syntax are normalized into the
  6004. * Object-based format.
  6005. */
  6006. function normalizeProps (options, vm) {
  6007. var props = options.props;
  6008. if (!props) { return }
  6009. var res = {};
  6010. var i, val, name;
  6011. if (Array.isArray(props)) {
  6012. i = props.length;
  6013. while (i--) {
  6014. val = props[i];
  6015. if (typeof val === 'string') {
  6016. name = camelize(val);
  6017. res[name] = { type: null };
  6018. } else if (true) {
  6019. warn('props must be strings when using array syntax.');
  6020. }
  6021. }
  6022. } else if (isPlainObject(props)) {
  6023. for (var key in props) {
  6024. val = props[key];
  6025. name = camelize(key);
  6026. res[name] = isPlainObject(val)
  6027. ? val
  6028. : { type: val };
  6029. }
  6030. } else if (true) {
  6031. warn(
  6032. "Invalid value for option \"props\": expected an Array or an Object, " +
  6033. "but got " + (toRawType(props)) + ".",
  6034. vm
  6035. );
  6036. }
  6037. options.props = res;
  6038. }
  6039. /**
  6040. * Normalize all injections into Object-based format
  6041. */
  6042. function normalizeInject (options, vm) {
  6043. var inject = options.inject;
  6044. if (!inject) { return }
  6045. var normalized = options.inject = {};
  6046. if (Array.isArray(inject)) {
  6047. for (var i = 0; i < inject.length; i++) {
  6048. normalized[inject[i]] = { from: inject[i] };
  6049. }
  6050. } else if (isPlainObject(inject)) {
  6051. for (var key in inject) {
  6052. var val = inject[key];
  6053. normalized[key] = isPlainObject(val)
  6054. ? extend({ from: key }, val)
  6055. : { from: val };
  6056. }
  6057. } else if (true) {
  6058. warn(
  6059. "Invalid value for option \"inject\": expected an Array or an Object, " +
  6060. "but got " + (toRawType(inject)) + ".",
  6061. vm
  6062. );
  6063. }
  6064. }
  6065. /**
  6066. * Normalize raw function directives into object format.
  6067. */
  6068. function normalizeDirectives (options) {
  6069. var dirs = options.directives;
  6070. if (dirs) {
  6071. for (var key in dirs) {
  6072. var def$$1 = dirs[key];
  6073. if (typeof def$$1 === 'function') {
  6074. dirs[key] = { bind: def$$1, update: def$$1 };
  6075. }
  6076. }
  6077. }
  6078. }
  6079. function assertObjectType (name, value, vm) {
  6080. if (!isPlainObject(value)) {
  6081. warn(
  6082. "Invalid value for option \"" + name + "\": expected an Object, " +
  6083. "but got " + (toRawType(value)) + ".",
  6084. vm
  6085. );
  6086. }
  6087. }
  6088. /**
  6089. * Merge two option objects into a new one.
  6090. * Core utility used in both instantiation and inheritance.
  6091. */
  6092. function mergeOptions (
  6093. parent,
  6094. child,
  6095. vm
  6096. ) {
  6097. if (true) {
  6098. checkComponents(child);
  6099. }
  6100. if (typeof child === 'function') {
  6101. child = child.options;
  6102. }
  6103. normalizeProps(child, vm);
  6104. normalizeInject(child, vm);
  6105. normalizeDirectives(child);
  6106. // Apply extends and mixins on the child options,
  6107. // but only if it is a raw options object that isn't
  6108. // the result of another mergeOptions call.
  6109. // Only merged options has the _base property.
  6110. if (!child._base) {
  6111. if (child.extends) {
  6112. parent = mergeOptions(parent, child.extends, vm);
  6113. }
  6114. if (child.mixins) {
  6115. for (var i = 0, l = child.mixins.length; i < l; i++) {
  6116. parent = mergeOptions(parent, child.mixins[i], vm);
  6117. }
  6118. }
  6119. }
  6120. var options = {};
  6121. var key;
  6122. for (key in parent) {
  6123. mergeField(key);
  6124. }
  6125. for (key in child) {
  6126. if (!hasOwn(parent, key)) {
  6127. mergeField(key);
  6128. }
  6129. }
  6130. function mergeField (key) {
  6131. var strat = strats[key] || defaultStrat;
  6132. options[key] = strat(parent[key], child[key], vm, key);
  6133. }
  6134. return options
  6135. }
  6136. /**
  6137. * Resolve an asset.
  6138. * This function is used because child instances need access
  6139. * to assets defined in its ancestor chain.
  6140. */
  6141. function resolveAsset (
  6142. options,
  6143. type,
  6144. id,
  6145. warnMissing
  6146. ) {
  6147. /* istanbul ignore if */
  6148. if (typeof id !== 'string') {
  6149. return
  6150. }
  6151. var assets = options[type];
  6152. // check local registration variations first
  6153. if (hasOwn(assets, id)) { return assets[id] }
  6154. var camelizedId = camelize(id);
  6155. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6156. var PascalCaseId = capitalize(camelizedId);
  6157. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6158. // fallback to prototype chain
  6159. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6160. if ( true && warnMissing && !res) {
  6161. warn(
  6162. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6163. options
  6164. );
  6165. }
  6166. return res
  6167. }
  6168. /* */
  6169. function validateProp (
  6170. key,
  6171. propOptions,
  6172. propsData,
  6173. vm
  6174. ) {
  6175. var prop = propOptions[key];
  6176. var absent = !hasOwn(propsData, key);
  6177. var value = propsData[key];
  6178. // boolean casting
  6179. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6180. if (booleanIndex > -1) {
  6181. if (absent && !hasOwn(prop, 'default')) {
  6182. value = false;
  6183. } else if (value === '' || value === hyphenate(key)) {
  6184. // only cast empty string / same name to boolean if
  6185. // boolean has higher priority
  6186. var stringIndex = getTypeIndex(String, prop.type);
  6187. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6188. value = true;
  6189. }
  6190. }
  6191. }
  6192. // check default value
  6193. if (value === undefined) {
  6194. value = getPropDefaultValue(vm, prop, key);
  6195. // since the default value is a fresh copy,
  6196. // make sure to observe it.
  6197. var prevShouldObserve = shouldObserve;
  6198. toggleObserving(true);
  6199. observe(value);
  6200. toggleObserving(prevShouldObserve);
  6201. }
  6202. if (
  6203. true
  6204. ) {
  6205. assertProp(prop, key, value, vm, absent);
  6206. }
  6207. return value
  6208. }
  6209. /**
  6210. * Get the default value of a prop.
  6211. */
  6212. function getPropDefaultValue (vm, prop, key) {
  6213. // no default, return undefined
  6214. if (!hasOwn(prop, 'default')) {
  6215. return undefined
  6216. }
  6217. var def = prop.default;
  6218. // warn against non-factory defaults for Object & Array
  6219. if ( true && isObject(def)) {
  6220. warn(
  6221. 'Invalid default value for prop "' + key + '": ' +
  6222. 'Props with type Object/Array must use a factory function ' +
  6223. 'to return the default value.',
  6224. vm
  6225. );
  6226. }
  6227. // the raw prop value was also undefined from previous render,
  6228. // return previous default value to avoid unnecessary watcher trigger
  6229. if (vm && vm.$options.propsData &&
  6230. vm.$options.propsData[key] === undefined &&
  6231. vm._props[key] !== undefined
  6232. ) {
  6233. return vm._props[key]
  6234. }
  6235. // call factory function for non-Function types
  6236. // a value is Function if its prototype is function even across different execution context
  6237. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6238. ? def.call(vm)
  6239. : def
  6240. }
  6241. /**
  6242. * Assert whether a prop is valid.
  6243. */
  6244. function assertProp (
  6245. prop,
  6246. name,
  6247. value,
  6248. vm,
  6249. absent
  6250. ) {
  6251. if (prop.required && absent) {
  6252. warn(
  6253. 'Missing required prop: "' + name + '"',
  6254. vm
  6255. );
  6256. return
  6257. }
  6258. if (value == null && !prop.required) {
  6259. return
  6260. }
  6261. var type = prop.type;
  6262. var valid = !type || type === true;
  6263. var expectedTypes = [];
  6264. if (type) {
  6265. if (!Array.isArray(type)) {
  6266. type = [type];
  6267. }
  6268. for (var i = 0; i < type.length && !valid; i++) {
  6269. var assertedType = assertType(value, type[i]);
  6270. expectedTypes.push(assertedType.expectedType || '');
  6271. valid = assertedType.valid;
  6272. }
  6273. }
  6274. if (!valid) {
  6275. warn(
  6276. getInvalidTypeMessage(name, value, expectedTypes),
  6277. vm
  6278. );
  6279. return
  6280. }
  6281. var validator = prop.validator;
  6282. if (validator) {
  6283. if (!validator(value)) {
  6284. warn(
  6285. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6286. vm
  6287. );
  6288. }
  6289. }
  6290. }
  6291. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6292. function assertType (value, type) {
  6293. var valid;
  6294. var expectedType = getType(type);
  6295. if (simpleCheckRE.test(expectedType)) {
  6296. var t = typeof value;
  6297. valid = t === expectedType.toLowerCase();
  6298. // for primitive wrapper objects
  6299. if (!valid && t === 'object') {
  6300. valid = value instanceof type;
  6301. }
  6302. } else if (expectedType === 'Object') {
  6303. valid = isPlainObject(value);
  6304. } else if (expectedType === 'Array') {
  6305. valid = Array.isArray(value);
  6306. } else {
  6307. valid = value instanceof type;
  6308. }
  6309. return {
  6310. valid: valid,
  6311. expectedType: expectedType
  6312. }
  6313. }
  6314. /**
  6315. * Use function string name to check built-in types,
  6316. * because a simple equality check will fail when running
  6317. * across different vms / iframes.
  6318. */
  6319. function getType (fn) {
  6320. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6321. return match ? match[1] : ''
  6322. }
  6323. function isSameType (a, b) {
  6324. return getType(a) === getType(b)
  6325. }
  6326. function getTypeIndex (type, expectedTypes) {
  6327. if (!Array.isArray(expectedTypes)) {
  6328. return isSameType(expectedTypes, type) ? 0 : -1
  6329. }
  6330. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6331. if (isSameType(expectedTypes[i], type)) {
  6332. return i
  6333. }
  6334. }
  6335. return -1
  6336. }
  6337. function getInvalidTypeMessage (name, value, expectedTypes) {
  6338. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6339. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6340. var expectedType = expectedTypes[0];
  6341. var receivedType = toRawType(value);
  6342. var expectedValue = styleValue(value, expectedType);
  6343. var receivedValue = styleValue(value, receivedType);
  6344. // check if we need to specify expected value
  6345. if (expectedTypes.length === 1 &&
  6346. isExplicable(expectedType) &&
  6347. !isBoolean(expectedType, receivedType)) {
  6348. message += " with value " + expectedValue;
  6349. }
  6350. message += ", got " + receivedType + " ";
  6351. // check if we need to specify received value
  6352. if (isExplicable(receivedType)) {
  6353. message += "with value " + receivedValue + ".";
  6354. }
  6355. return message
  6356. }
  6357. function styleValue (value, type) {
  6358. if (type === 'String') {
  6359. return ("\"" + value + "\"")
  6360. } else if (type === 'Number') {
  6361. return ("" + (Number(value)))
  6362. } else {
  6363. return ("" + value)
  6364. }
  6365. }
  6366. function isExplicable (value) {
  6367. var explicitTypes = ['string', 'number', 'boolean'];
  6368. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6369. }
  6370. function isBoolean () {
  6371. var args = [], len = arguments.length;
  6372. while ( len-- ) args[ len ] = arguments[ len ];
  6373. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6374. }
  6375. /* */
  6376. function handleError (err, vm, info) {
  6377. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6378. // See: https://github.com/vuejs/vuex/issues/1505
  6379. pushTarget();
  6380. try {
  6381. if (vm) {
  6382. var cur = vm;
  6383. while ((cur = cur.$parent)) {
  6384. var hooks = cur.$options.errorCaptured;
  6385. if (hooks) {
  6386. for (var i = 0; i < hooks.length; i++) {
  6387. try {
  6388. var capture = hooks[i].call(cur, err, vm, info) === false;
  6389. if (capture) { return }
  6390. } catch (e) {
  6391. globalHandleError(e, cur, 'errorCaptured hook');
  6392. }
  6393. }
  6394. }
  6395. }
  6396. }
  6397. globalHandleError(err, vm, info);
  6398. } finally {
  6399. popTarget();
  6400. }
  6401. }
  6402. function invokeWithErrorHandling (
  6403. handler,
  6404. context,
  6405. args,
  6406. vm,
  6407. info
  6408. ) {
  6409. var res;
  6410. try {
  6411. res = args ? handler.apply(context, args) : handler.call(context);
  6412. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6413. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6414. // issue #9511
  6415. // avoid catch triggering multiple times when nested calls
  6416. res._handled = true;
  6417. }
  6418. } catch (e) {
  6419. handleError(e, vm, info);
  6420. }
  6421. return res
  6422. }
  6423. function globalHandleError (err, vm, info) {
  6424. if (config.errorHandler) {
  6425. try {
  6426. return config.errorHandler.call(null, err, vm, info)
  6427. } catch (e) {
  6428. // if the user intentionally throws the original error in the handler,
  6429. // do not log it twice
  6430. if (e !== err) {
  6431. logError(e, null, 'config.errorHandler');
  6432. }
  6433. }
  6434. }
  6435. logError(err, vm, info);
  6436. }
  6437. function logError (err, vm, info) {
  6438. if (true) {
  6439. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6440. }
  6441. /* istanbul ignore else */
  6442. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6443. console.error(err);
  6444. } else {
  6445. throw err
  6446. }
  6447. }
  6448. /* */
  6449. var callbacks = [];
  6450. var pending = false;
  6451. function flushCallbacks () {
  6452. pending = false;
  6453. var copies = callbacks.slice(0);
  6454. callbacks.length = 0;
  6455. for (var i = 0; i < copies.length; i++) {
  6456. copies[i]();
  6457. }
  6458. }
  6459. // Here we have async deferring wrappers using microtasks.
  6460. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6461. // However, it has subtle problems when state is changed right before repaint
  6462. // (e.g. #6813, out-in transitions).
  6463. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6464. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6465. // So we now use microtasks everywhere, again.
  6466. // A major drawback of this tradeoff is that there are some scenarios
  6467. // where microtasks have too high a priority and fire in between supposedly
  6468. // sequential events (e.g. #4521, #6690, which have workarounds)
  6469. // or even between bubbling of the same event (#6566).
  6470. var timerFunc;
  6471. // The nextTick behavior leverages the microtask queue, which can be accessed
  6472. // via either native Promise.then or MutationObserver.
  6473. // MutationObserver has wider support, however it is seriously bugged in
  6474. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6475. // completely stops working after triggering a few times... so, if native
  6476. // Promise is available, we will use it:
  6477. /* istanbul ignore next, $flow-disable-line */
  6478. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6479. var p = Promise.resolve();
  6480. timerFunc = function () {
  6481. p.then(flushCallbacks);
  6482. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6483. // it can get stuck in a weird state where callbacks are pushed into the
  6484. // microtask queue but the queue isn't being flushed, until the browser
  6485. // needs to do some other work, e.g. handle a timer. Therefore we can
  6486. // "force" the microtask queue to be flushed by adding an empty timer.
  6487. if (isIOS) { setTimeout(noop); }
  6488. };
  6489. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6490. isNative(MutationObserver) ||
  6491. // PhantomJS and iOS 7.x
  6492. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6493. )) {
  6494. // Use MutationObserver where native Promise is not available,
  6495. // e.g. PhantomJS, iOS7, Android 4.4
  6496. // (#6466 MutationObserver is unreliable in IE11)
  6497. var counter = 1;
  6498. var observer = new MutationObserver(flushCallbacks);
  6499. var textNode = document.createTextNode(String(counter));
  6500. observer.observe(textNode, {
  6501. characterData: true
  6502. });
  6503. timerFunc = function () {
  6504. counter = (counter + 1) % 2;
  6505. textNode.data = String(counter);
  6506. };
  6507. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6508. // Fallback to setImmediate.
  6509. // Technically it leverages the (macro) task queue,
  6510. // but it is still a better choice than setTimeout.
  6511. timerFunc = function () {
  6512. setImmediate(flushCallbacks);
  6513. };
  6514. } else {
  6515. // Fallback to setTimeout.
  6516. timerFunc = function () {
  6517. setTimeout(flushCallbacks, 0);
  6518. };
  6519. }
  6520. function nextTick (cb, ctx) {
  6521. var _resolve;
  6522. callbacks.push(function () {
  6523. if (cb) {
  6524. try {
  6525. cb.call(ctx);
  6526. } catch (e) {
  6527. handleError(e, ctx, 'nextTick');
  6528. }
  6529. } else if (_resolve) {
  6530. _resolve(ctx);
  6531. }
  6532. });
  6533. if (!pending) {
  6534. pending = true;
  6535. timerFunc();
  6536. }
  6537. // $flow-disable-line
  6538. if (!cb && typeof Promise !== 'undefined') {
  6539. return new Promise(function (resolve) {
  6540. _resolve = resolve;
  6541. })
  6542. }
  6543. }
  6544. /* */
  6545. /* not type checking this file because flow doesn't play well with Proxy */
  6546. var initProxy;
  6547. if (true) {
  6548. var allowedGlobals = makeMap(
  6549. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6550. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6551. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6552. 'require' // for Webpack/Browserify
  6553. );
  6554. var warnNonPresent = function (target, key) {
  6555. warn(
  6556. "Property or method \"" + key + "\" is not defined on the instance but " +
  6557. 'referenced during render. Make sure that this property is reactive, ' +
  6558. 'either in the data option, or for class-based components, by ' +
  6559. 'initializing the property. ' +
  6560. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6561. target
  6562. );
  6563. };
  6564. var warnReservedPrefix = function (target, key) {
  6565. warn(
  6566. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6567. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6568. 'prevent conflicts with Vue internals. ' +
  6569. 'See: https://vuejs.org/v2/api/#data',
  6570. target
  6571. );
  6572. };
  6573. var hasProxy =
  6574. typeof Proxy !== 'undefined' && isNative(Proxy);
  6575. if (hasProxy) {
  6576. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6577. config.keyCodes = new Proxy(config.keyCodes, {
  6578. set: function set (target, key, value) {
  6579. if (isBuiltInModifier(key)) {
  6580. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6581. return false
  6582. } else {
  6583. target[key] = value;
  6584. return true
  6585. }
  6586. }
  6587. });
  6588. }
  6589. var hasHandler = {
  6590. has: function has (target, key) {
  6591. var has = key in target;
  6592. var isAllowed = allowedGlobals(key) ||
  6593. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6594. if (!has && !isAllowed) {
  6595. if (key in target.$data) { warnReservedPrefix(target, key); }
  6596. else { warnNonPresent(target, key); }
  6597. }
  6598. return has || !isAllowed
  6599. }
  6600. };
  6601. var getHandler = {
  6602. get: function get (target, key) {
  6603. if (typeof key === 'string' && !(key in target)) {
  6604. if (key in target.$data) { warnReservedPrefix(target, key); }
  6605. else { warnNonPresent(target, key); }
  6606. }
  6607. return target[key]
  6608. }
  6609. };
  6610. initProxy = function initProxy (vm) {
  6611. if (hasProxy) {
  6612. // determine which proxy handler to use
  6613. var options = vm.$options;
  6614. var handlers = options.render && options.render._withStripped
  6615. ? getHandler
  6616. : hasHandler;
  6617. vm._renderProxy = new Proxy(vm, handlers);
  6618. } else {
  6619. vm._renderProxy = vm;
  6620. }
  6621. };
  6622. }
  6623. /* */
  6624. var seenObjects = new _Set();
  6625. /**
  6626. * Recursively traverse an object to evoke all converted
  6627. * getters, so that every nested property inside the object
  6628. * is collected as a "deep" dependency.
  6629. */
  6630. function traverse (val) {
  6631. _traverse(val, seenObjects);
  6632. seenObjects.clear();
  6633. }
  6634. function _traverse (val, seen) {
  6635. var i, keys;
  6636. var isA = Array.isArray(val);
  6637. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6638. return
  6639. }
  6640. if (val.__ob__) {
  6641. var depId = val.__ob__.dep.id;
  6642. if (seen.has(depId)) {
  6643. return
  6644. }
  6645. seen.add(depId);
  6646. }
  6647. if (isA) {
  6648. i = val.length;
  6649. while (i--) { _traverse(val[i], seen); }
  6650. } else {
  6651. keys = Object.keys(val);
  6652. i = keys.length;
  6653. while (i--) { _traverse(val[keys[i]], seen); }
  6654. }
  6655. }
  6656. var mark;
  6657. var measure;
  6658. if (true) {
  6659. var perf = inBrowser && window.performance;
  6660. /* istanbul ignore if */
  6661. if (
  6662. perf &&
  6663. perf.mark &&
  6664. perf.measure &&
  6665. perf.clearMarks &&
  6666. perf.clearMeasures
  6667. ) {
  6668. mark = function (tag) { return perf.mark(tag); };
  6669. measure = function (name, startTag, endTag) {
  6670. perf.measure(name, startTag, endTag);
  6671. perf.clearMarks(startTag);
  6672. perf.clearMarks(endTag);
  6673. // perf.clearMeasures(name)
  6674. };
  6675. }
  6676. }
  6677. /* */
  6678. var normalizeEvent = cached(function (name) {
  6679. var passive = name.charAt(0) === '&';
  6680. name = passive ? name.slice(1) : name;
  6681. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6682. name = once$$1 ? name.slice(1) : name;
  6683. var capture = name.charAt(0) === '!';
  6684. name = capture ? name.slice(1) : name;
  6685. return {
  6686. name: name,
  6687. once: once$$1,
  6688. capture: capture,
  6689. passive: passive
  6690. }
  6691. });
  6692. function createFnInvoker (fns, vm) {
  6693. function invoker () {
  6694. var arguments$1 = arguments;
  6695. var fns = invoker.fns;
  6696. if (Array.isArray(fns)) {
  6697. var cloned = fns.slice();
  6698. for (var i = 0; i < cloned.length; i++) {
  6699. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6700. }
  6701. } else {
  6702. // return handler return value for single handlers
  6703. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6704. }
  6705. }
  6706. invoker.fns = fns;
  6707. return invoker
  6708. }
  6709. function updateListeners (
  6710. on,
  6711. oldOn,
  6712. add,
  6713. remove$$1,
  6714. createOnceHandler,
  6715. vm
  6716. ) {
  6717. var name, def$$1, cur, old, event;
  6718. for (name in on) {
  6719. def$$1 = cur = on[name];
  6720. old = oldOn[name];
  6721. event = normalizeEvent(name);
  6722. if (isUndef(cur)) {
  6723. true && warn(
  6724. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6725. vm
  6726. );
  6727. } else if (isUndef(old)) {
  6728. if (isUndef(cur.fns)) {
  6729. cur = on[name] = createFnInvoker(cur, vm);
  6730. }
  6731. if (isTrue(event.once)) {
  6732. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6733. }
  6734. add(event.name, cur, event.capture, event.passive, event.params);
  6735. } else if (cur !== old) {
  6736. old.fns = cur;
  6737. on[name] = old;
  6738. }
  6739. }
  6740. for (name in oldOn) {
  6741. if (isUndef(on[name])) {
  6742. event = normalizeEvent(name);
  6743. remove$$1(event.name, oldOn[name], event.capture);
  6744. }
  6745. }
  6746. }
  6747. /* */
  6748. /* */
  6749. // fixed by xxxxxx (mp properties)
  6750. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6751. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6752. if (isUndef(propOptions)) {
  6753. return res
  6754. }
  6755. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6756. var attrs = data.attrs;
  6757. var props = data.props;
  6758. if (isDef(attrs) || isDef(props)) {
  6759. for (var key in propOptions) {
  6760. var altKey = hyphenate(key);
  6761. var result = checkProp(res, props, key, altKey, true) ||
  6762. checkProp(res, attrs, key, altKey, false);
  6763. // externalClass
  6764. if (
  6765. result &&
  6766. res[key] &&
  6767. externalClasses.indexOf(altKey) !== -1 &&
  6768. context[camelize(res[key])]
  6769. ) {
  6770. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6771. res[key] = context[camelize(res[key])];
  6772. }
  6773. }
  6774. }
  6775. return res
  6776. }
  6777. function extractPropsFromVNodeData (
  6778. data,
  6779. Ctor,
  6780. tag,
  6781. context// fixed by xxxxxx
  6782. ) {
  6783. // we are only extracting raw values here.
  6784. // validation and default values are handled in the child
  6785. // component itself.
  6786. var propOptions = Ctor.options.props;
  6787. if (isUndef(propOptions)) {
  6788. // fixed by xxxxxx
  6789. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6790. }
  6791. var res = {};
  6792. var attrs = data.attrs;
  6793. var props = data.props;
  6794. if (isDef(attrs) || isDef(props)) {
  6795. for (var key in propOptions) {
  6796. var altKey = hyphenate(key);
  6797. if (true) {
  6798. var keyInLowerCase = key.toLowerCase();
  6799. if (
  6800. key !== keyInLowerCase &&
  6801. attrs && hasOwn(attrs, keyInLowerCase)
  6802. ) {
  6803. tip(
  6804. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6805. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6806. " \"" + key + "\". " +
  6807. "Note that HTML attributes are case-insensitive and camelCased " +
  6808. "props need to use their kebab-case equivalents when using in-DOM " +
  6809. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6810. );
  6811. }
  6812. }
  6813. checkProp(res, props, key, altKey, true) ||
  6814. checkProp(res, attrs, key, altKey, false);
  6815. }
  6816. }
  6817. // fixed by xxxxxx
  6818. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6819. }
  6820. function checkProp (
  6821. res,
  6822. hash,
  6823. key,
  6824. altKey,
  6825. preserve
  6826. ) {
  6827. if (isDef(hash)) {
  6828. if (hasOwn(hash, key)) {
  6829. res[key] = hash[key];
  6830. if (!preserve) {
  6831. delete hash[key];
  6832. }
  6833. return true
  6834. } else if (hasOwn(hash, altKey)) {
  6835. res[key] = hash[altKey];
  6836. if (!preserve) {
  6837. delete hash[altKey];
  6838. }
  6839. return true
  6840. }
  6841. }
  6842. return false
  6843. }
  6844. /* */
  6845. // The template compiler attempts to minimize the need for normalization by
  6846. // statically analyzing the template at compile time.
  6847. //
  6848. // For plain HTML markup, normalization can be completely skipped because the
  6849. // generated render function is guaranteed to return Array<VNode>. There are
  6850. // two cases where extra normalization is needed:
  6851. // 1. When the children contains components - because a functional component
  6852. // may return an Array instead of a single root. In this case, just a simple
  6853. // normalization is needed - if any child is an Array, we flatten the whole
  6854. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6855. // because functional components already normalize their own children.
  6856. function simpleNormalizeChildren (children) {
  6857. for (var i = 0; i < children.length; i++) {
  6858. if (Array.isArray(children[i])) {
  6859. return Array.prototype.concat.apply([], children)
  6860. }
  6861. }
  6862. return children
  6863. }
  6864. // 2. When the children contains constructs that always generated nested Arrays,
  6865. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6866. // with hand-written render functions / JSX. In such cases a full normalization
  6867. // is needed to cater to all possible types of children values.
  6868. function normalizeChildren (children) {
  6869. return isPrimitive(children)
  6870. ? [createTextVNode(children)]
  6871. : Array.isArray(children)
  6872. ? normalizeArrayChildren(children)
  6873. : undefined
  6874. }
  6875. function isTextNode (node) {
  6876. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6877. }
  6878. function normalizeArrayChildren (children, nestedIndex) {
  6879. var res = [];
  6880. var i, c, lastIndex, last;
  6881. for (i = 0; i < children.length; i++) {
  6882. c = children[i];
  6883. if (isUndef(c) || typeof c === 'boolean') { continue }
  6884. lastIndex = res.length - 1;
  6885. last = res[lastIndex];
  6886. // nested
  6887. if (Array.isArray(c)) {
  6888. if (c.length > 0) {
  6889. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6890. // merge adjacent text nodes
  6891. if (isTextNode(c[0]) && isTextNode(last)) {
  6892. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6893. c.shift();
  6894. }
  6895. res.push.apply(res, c);
  6896. }
  6897. } else if (isPrimitive(c)) {
  6898. if (isTextNode(last)) {
  6899. // merge adjacent text nodes
  6900. // this is necessary for SSR hydration because text nodes are
  6901. // essentially merged when rendered to HTML strings
  6902. res[lastIndex] = createTextVNode(last.text + c);
  6903. } else if (c !== '') {
  6904. // convert primitive to vnode
  6905. res.push(createTextVNode(c));
  6906. }
  6907. } else {
  6908. if (isTextNode(c) && isTextNode(last)) {
  6909. // merge adjacent text nodes
  6910. res[lastIndex] = createTextVNode(last.text + c.text);
  6911. } else {
  6912. // default key for nested array children (likely generated by v-for)
  6913. if (isTrue(children._isVList) &&
  6914. isDef(c.tag) &&
  6915. isUndef(c.key) &&
  6916. isDef(nestedIndex)) {
  6917. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6918. }
  6919. res.push(c);
  6920. }
  6921. }
  6922. }
  6923. return res
  6924. }
  6925. /* */
  6926. function initProvide (vm) {
  6927. var provide = vm.$options.provide;
  6928. if (provide) {
  6929. vm._provided = typeof provide === 'function'
  6930. ? provide.call(vm)
  6931. : provide;
  6932. }
  6933. }
  6934. function initInjections (vm) {
  6935. var result = resolveInject(vm.$options.inject, vm);
  6936. if (result) {
  6937. toggleObserving(false);
  6938. Object.keys(result).forEach(function (key) {
  6939. /* istanbul ignore else */
  6940. if (true) {
  6941. defineReactive$$1(vm, key, result[key], function () {
  6942. warn(
  6943. "Avoid mutating an injected value directly since the changes will be " +
  6944. "overwritten whenever the provided component re-renders. " +
  6945. "injection being mutated: \"" + key + "\"",
  6946. vm
  6947. );
  6948. });
  6949. } else {}
  6950. });
  6951. toggleObserving(true);
  6952. }
  6953. }
  6954. function resolveInject (inject, vm) {
  6955. if (inject) {
  6956. // inject is :any because flow is not smart enough to figure out cached
  6957. var result = Object.create(null);
  6958. var keys = hasSymbol
  6959. ? Reflect.ownKeys(inject)
  6960. : Object.keys(inject);
  6961. for (var i = 0; i < keys.length; i++) {
  6962. var key = keys[i];
  6963. // #6574 in case the inject object is observed...
  6964. if (key === '__ob__') { continue }
  6965. var provideKey = inject[key].from;
  6966. var source = vm;
  6967. while (source) {
  6968. if (source._provided && hasOwn(source._provided, provideKey)) {
  6969. result[key] = source._provided[provideKey];
  6970. break
  6971. }
  6972. source = source.$parent;
  6973. }
  6974. if (!source) {
  6975. if ('default' in inject[key]) {
  6976. var provideDefault = inject[key].default;
  6977. result[key] = typeof provideDefault === 'function'
  6978. ? provideDefault.call(vm)
  6979. : provideDefault;
  6980. } else if (true) {
  6981. warn(("Injection \"" + key + "\" not found"), vm);
  6982. }
  6983. }
  6984. }
  6985. return result
  6986. }
  6987. }
  6988. /* */
  6989. /**
  6990. * Runtime helper for resolving raw children VNodes into a slot object.
  6991. */
  6992. function resolveSlots (
  6993. children,
  6994. context
  6995. ) {
  6996. if (!children || !children.length) {
  6997. return {}
  6998. }
  6999. var slots = {};
  7000. for (var i = 0, l = children.length; i < l; i++) {
  7001. var child = children[i];
  7002. var data = child.data;
  7003. // remove slot attribute if the node is resolved as a Vue slot node
  7004. if (data && data.attrs && data.attrs.slot) {
  7005. delete data.attrs.slot;
  7006. }
  7007. // named slots should only be respected if the vnode was rendered in the
  7008. // same context.
  7009. if ((child.context === context || child.fnContext === context) &&
  7010. data && data.slot != null
  7011. ) {
  7012. var name = data.slot;
  7013. var slot = (slots[name] || (slots[name] = []));
  7014. if (child.tag === 'template') {
  7015. slot.push.apply(slot, child.children || []);
  7016. } else {
  7017. slot.push(child);
  7018. }
  7019. } else {
  7020. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  7021. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  7022. (slots['page'] || (slots['page'] = [])).push(child);
  7023. }else{
  7024. (slots.default || (slots.default = [])).push(child);
  7025. }
  7026. }
  7027. }
  7028. // ignore slots that contains only whitespace
  7029. for (var name$1 in slots) {
  7030. if (slots[name$1].every(isWhitespace)) {
  7031. delete slots[name$1];
  7032. }
  7033. }
  7034. return slots
  7035. }
  7036. function isWhitespace (node) {
  7037. return (node.isComment && !node.asyncFactory) || node.text === ' '
  7038. }
  7039. /* */
  7040. function normalizeScopedSlots (
  7041. slots,
  7042. normalSlots,
  7043. prevSlots
  7044. ) {
  7045. var res;
  7046. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  7047. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  7048. var key = slots && slots.$key;
  7049. if (!slots) {
  7050. res = {};
  7051. } else if (slots._normalized) {
  7052. // fast path 1: child component re-render only, parent did not change
  7053. return slots._normalized
  7054. } else if (
  7055. isStable &&
  7056. prevSlots &&
  7057. prevSlots !== emptyObject &&
  7058. key === prevSlots.$key &&
  7059. !hasNormalSlots &&
  7060. !prevSlots.$hasNormal
  7061. ) {
  7062. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  7063. // only need to normalize once
  7064. return prevSlots
  7065. } else {
  7066. res = {};
  7067. for (var key$1 in slots) {
  7068. if (slots[key$1] && key$1[0] !== '$') {
  7069. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  7070. }
  7071. }
  7072. }
  7073. // expose normal slots on scopedSlots
  7074. for (var key$2 in normalSlots) {
  7075. if (!(key$2 in res)) {
  7076. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  7077. }
  7078. }
  7079. // avoriaz seems to mock a non-extensible $scopedSlots object
  7080. // and when that is passed down this would cause an error
  7081. if (slots && Object.isExtensible(slots)) {
  7082. (slots)._normalized = res;
  7083. }
  7084. def(res, '$stable', isStable);
  7085. def(res, '$key', key);
  7086. def(res, '$hasNormal', hasNormalSlots);
  7087. return res
  7088. }
  7089. function normalizeScopedSlot(normalSlots, key, fn) {
  7090. var normalized = function () {
  7091. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  7092. res = res && typeof res === 'object' && !Array.isArray(res)
  7093. ? [res] // single vnode
  7094. : normalizeChildren(res);
  7095. return res && (
  7096. res.length === 0 ||
  7097. (res.length === 1 && res[0].isComment) // #9658
  7098. ) ? undefined
  7099. : res
  7100. };
  7101. // this is a slot using the new v-slot syntax without scope. although it is
  7102. // compiled as a scoped slot, render fn users would expect it to be present
  7103. // on this.$slots because the usage is semantically a normal slot.
  7104. if (fn.proxy) {
  7105. Object.defineProperty(normalSlots, key, {
  7106. get: normalized,
  7107. enumerable: true,
  7108. configurable: true
  7109. });
  7110. }
  7111. return normalized
  7112. }
  7113. function proxyNormalSlot(slots, key) {
  7114. return function () { return slots[key]; }
  7115. }
  7116. /* */
  7117. /**
  7118. * Runtime helper for rendering v-for lists.
  7119. */
  7120. function renderList (
  7121. val,
  7122. render
  7123. ) {
  7124. var ret, i, l, keys, key;
  7125. if (Array.isArray(val) || typeof val === 'string') {
  7126. ret = new Array(val.length);
  7127. for (i = 0, l = val.length; i < l; i++) {
  7128. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  7129. }
  7130. } else if (typeof val === 'number') {
  7131. ret = new Array(val);
  7132. for (i = 0; i < val; i++) {
  7133. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  7134. }
  7135. } else if (isObject(val)) {
  7136. if (hasSymbol && val[Symbol.iterator]) {
  7137. ret = [];
  7138. var iterator = val[Symbol.iterator]();
  7139. var result = iterator.next();
  7140. while (!result.done) {
  7141. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  7142. result = iterator.next();
  7143. }
  7144. } else {
  7145. keys = Object.keys(val);
  7146. ret = new Array(keys.length);
  7147. for (i = 0, l = keys.length; i < l; i++) {
  7148. key = keys[i];
  7149. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7150. }
  7151. }
  7152. }
  7153. if (!isDef(ret)) {
  7154. ret = [];
  7155. }
  7156. (ret)._isVList = true;
  7157. return ret
  7158. }
  7159. /* */
  7160. /**
  7161. * Runtime helper for rendering <slot>
  7162. */
  7163. function renderSlot (
  7164. name,
  7165. fallback,
  7166. props,
  7167. bindObject
  7168. ) {
  7169. var scopedSlotFn = this.$scopedSlots[name];
  7170. var nodes;
  7171. if (scopedSlotFn) { // scoped slot
  7172. props = props || {};
  7173. if (bindObject) {
  7174. if ( true && !isObject(bindObject)) {
  7175. warn(
  7176. 'slot v-bind without argument expects an Object',
  7177. this
  7178. );
  7179. }
  7180. props = extend(extend({}, bindObject), props);
  7181. }
  7182. // fixed by xxxxxx app-plus scopedSlot
  7183. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7184. } else {
  7185. nodes = this.$slots[name] || fallback;
  7186. }
  7187. var target = props && props.slot;
  7188. if (target) {
  7189. return this.$createElement('template', { slot: target }, nodes)
  7190. } else {
  7191. return nodes
  7192. }
  7193. }
  7194. /* */
  7195. /**
  7196. * Runtime helper for resolving filters
  7197. */
  7198. function resolveFilter (id) {
  7199. return resolveAsset(this.$options, 'filters', id, true) || identity
  7200. }
  7201. /* */
  7202. function isKeyNotMatch (expect, actual) {
  7203. if (Array.isArray(expect)) {
  7204. return expect.indexOf(actual) === -1
  7205. } else {
  7206. return expect !== actual
  7207. }
  7208. }
  7209. /**
  7210. * Runtime helper for checking keyCodes from config.
  7211. * exposed as Vue.prototype._k
  7212. * passing in eventKeyName as last argument separately for backwards compat
  7213. */
  7214. function checkKeyCodes (
  7215. eventKeyCode,
  7216. key,
  7217. builtInKeyCode,
  7218. eventKeyName,
  7219. builtInKeyName
  7220. ) {
  7221. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7222. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7223. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7224. } else if (mappedKeyCode) {
  7225. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7226. } else if (eventKeyName) {
  7227. return hyphenate(eventKeyName) !== key
  7228. }
  7229. }
  7230. /* */
  7231. /**
  7232. * Runtime helper for merging v-bind="object" into a VNode's data.
  7233. */
  7234. function bindObjectProps (
  7235. data,
  7236. tag,
  7237. value,
  7238. asProp,
  7239. isSync
  7240. ) {
  7241. if (value) {
  7242. if (!isObject(value)) {
  7243. true && warn(
  7244. 'v-bind without argument expects an Object or Array value',
  7245. this
  7246. );
  7247. } else {
  7248. if (Array.isArray(value)) {
  7249. value = toObject(value);
  7250. }
  7251. var hash;
  7252. var loop = function ( key ) {
  7253. if (
  7254. key === 'class' ||
  7255. key === 'style' ||
  7256. isReservedAttribute(key)
  7257. ) {
  7258. hash = data;
  7259. } else {
  7260. var type = data.attrs && data.attrs.type;
  7261. hash = asProp || config.mustUseProp(tag, type, key)
  7262. ? data.domProps || (data.domProps = {})
  7263. : data.attrs || (data.attrs = {});
  7264. }
  7265. var camelizedKey = camelize(key);
  7266. var hyphenatedKey = hyphenate(key);
  7267. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7268. hash[key] = value[key];
  7269. if (isSync) {
  7270. var on = data.on || (data.on = {});
  7271. on[("update:" + key)] = function ($event) {
  7272. value[key] = $event;
  7273. };
  7274. }
  7275. }
  7276. };
  7277. for (var key in value) loop( key );
  7278. }
  7279. }
  7280. return data
  7281. }
  7282. /* */
  7283. /**
  7284. * Runtime helper for rendering static trees.
  7285. */
  7286. function renderStatic (
  7287. index,
  7288. isInFor
  7289. ) {
  7290. var cached = this._staticTrees || (this._staticTrees = []);
  7291. var tree = cached[index];
  7292. // if has already-rendered static tree and not inside v-for,
  7293. // we can reuse the same tree.
  7294. if (tree && !isInFor) {
  7295. return tree
  7296. }
  7297. // otherwise, render a fresh tree.
  7298. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7299. this._renderProxy,
  7300. null,
  7301. this // for render fns generated for functional component templates
  7302. );
  7303. markStatic(tree, ("__static__" + index), false);
  7304. return tree
  7305. }
  7306. /**
  7307. * Runtime helper for v-once.
  7308. * Effectively it means marking the node as static with a unique key.
  7309. */
  7310. function markOnce (
  7311. tree,
  7312. index,
  7313. key
  7314. ) {
  7315. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7316. return tree
  7317. }
  7318. function markStatic (
  7319. tree,
  7320. key,
  7321. isOnce
  7322. ) {
  7323. if (Array.isArray(tree)) {
  7324. for (var i = 0; i < tree.length; i++) {
  7325. if (tree[i] && typeof tree[i] !== 'string') {
  7326. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7327. }
  7328. }
  7329. } else {
  7330. markStaticNode(tree, key, isOnce);
  7331. }
  7332. }
  7333. function markStaticNode (node, key, isOnce) {
  7334. node.isStatic = true;
  7335. node.key = key;
  7336. node.isOnce = isOnce;
  7337. }
  7338. /* */
  7339. function bindObjectListeners (data, value) {
  7340. if (value) {
  7341. if (!isPlainObject(value)) {
  7342. true && warn(
  7343. 'v-on without argument expects an Object value',
  7344. this
  7345. );
  7346. } else {
  7347. var on = data.on = data.on ? extend({}, data.on) : {};
  7348. for (var key in value) {
  7349. var existing = on[key];
  7350. var ours = value[key];
  7351. on[key] = existing ? [].concat(existing, ours) : ours;
  7352. }
  7353. }
  7354. }
  7355. return data
  7356. }
  7357. /* */
  7358. function resolveScopedSlots (
  7359. fns, // see flow/vnode
  7360. res,
  7361. // the following are added in 2.6
  7362. hasDynamicKeys,
  7363. contentHashKey
  7364. ) {
  7365. res = res || { $stable: !hasDynamicKeys };
  7366. for (var i = 0; i < fns.length; i++) {
  7367. var slot = fns[i];
  7368. if (Array.isArray(slot)) {
  7369. resolveScopedSlots(slot, res, hasDynamicKeys);
  7370. } else if (slot) {
  7371. // marker for reverse proxying v-slot without scope on this.$slots
  7372. if (slot.proxy) {
  7373. slot.fn.proxy = true;
  7374. }
  7375. res[slot.key] = slot.fn;
  7376. }
  7377. }
  7378. if (contentHashKey) {
  7379. (res).$key = contentHashKey;
  7380. }
  7381. return res
  7382. }
  7383. /* */
  7384. function bindDynamicKeys (baseObj, values) {
  7385. for (var i = 0; i < values.length; i += 2) {
  7386. var key = values[i];
  7387. if (typeof key === 'string' && key) {
  7388. baseObj[values[i]] = values[i + 1];
  7389. } else if ( true && key !== '' && key !== null) {
  7390. // null is a special value for explicitly removing a binding
  7391. warn(
  7392. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7393. this
  7394. );
  7395. }
  7396. }
  7397. return baseObj
  7398. }
  7399. // helper to dynamically append modifier runtime markers to event names.
  7400. // ensure only append when value is already string, otherwise it will be cast
  7401. // to string and cause the type check to miss.
  7402. function prependModifier (value, symbol) {
  7403. return typeof value === 'string' ? symbol + value : value
  7404. }
  7405. /* */
  7406. function installRenderHelpers (target) {
  7407. target._o = markOnce;
  7408. target._n = toNumber;
  7409. target._s = toString;
  7410. target._l = renderList;
  7411. target._t = renderSlot;
  7412. target._q = looseEqual;
  7413. target._i = looseIndexOf;
  7414. target._m = renderStatic;
  7415. target._f = resolveFilter;
  7416. target._k = checkKeyCodes;
  7417. target._b = bindObjectProps;
  7418. target._v = createTextVNode;
  7419. target._e = createEmptyVNode;
  7420. target._u = resolveScopedSlots;
  7421. target._g = bindObjectListeners;
  7422. target._d = bindDynamicKeys;
  7423. target._p = prependModifier;
  7424. }
  7425. /* */
  7426. function FunctionalRenderContext (
  7427. data,
  7428. props,
  7429. children,
  7430. parent,
  7431. Ctor
  7432. ) {
  7433. var this$1 = this;
  7434. var options = Ctor.options;
  7435. // ensure the createElement function in functional components
  7436. // gets a unique context - this is necessary for correct named slot check
  7437. var contextVm;
  7438. if (hasOwn(parent, '_uid')) {
  7439. contextVm = Object.create(parent);
  7440. // $flow-disable-line
  7441. contextVm._original = parent;
  7442. } else {
  7443. // the context vm passed in is a functional context as well.
  7444. // in this case we want to make sure we are able to get a hold to the
  7445. // real context instance.
  7446. contextVm = parent;
  7447. // $flow-disable-line
  7448. parent = parent._original;
  7449. }
  7450. var isCompiled = isTrue(options._compiled);
  7451. var needNormalization = !isCompiled;
  7452. this.data = data;
  7453. this.props = props;
  7454. this.children = children;
  7455. this.parent = parent;
  7456. this.listeners = data.on || emptyObject;
  7457. this.injections = resolveInject(options.inject, parent);
  7458. this.slots = function () {
  7459. if (!this$1.$slots) {
  7460. normalizeScopedSlots(
  7461. data.scopedSlots,
  7462. this$1.$slots = resolveSlots(children, parent)
  7463. );
  7464. }
  7465. return this$1.$slots
  7466. };
  7467. Object.defineProperty(this, 'scopedSlots', ({
  7468. enumerable: true,
  7469. get: function get () {
  7470. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7471. }
  7472. }));
  7473. // support for compiled functional template
  7474. if (isCompiled) {
  7475. // exposing $options for renderStatic()
  7476. this.$options = options;
  7477. // pre-resolve slots for renderSlot()
  7478. this.$slots = this.slots();
  7479. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7480. }
  7481. if (options._scopeId) {
  7482. this._c = function (a, b, c, d) {
  7483. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7484. if (vnode && !Array.isArray(vnode)) {
  7485. vnode.fnScopeId = options._scopeId;
  7486. vnode.fnContext = parent;
  7487. }
  7488. return vnode
  7489. };
  7490. } else {
  7491. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7492. }
  7493. }
  7494. installRenderHelpers(FunctionalRenderContext.prototype);
  7495. function createFunctionalComponent (
  7496. Ctor,
  7497. propsData,
  7498. data,
  7499. contextVm,
  7500. children
  7501. ) {
  7502. var options = Ctor.options;
  7503. var props = {};
  7504. var propOptions = options.props;
  7505. if (isDef(propOptions)) {
  7506. for (var key in propOptions) {
  7507. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7508. }
  7509. } else {
  7510. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7511. if (isDef(data.props)) { mergeProps(props, data.props); }
  7512. }
  7513. var renderContext = new FunctionalRenderContext(
  7514. data,
  7515. props,
  7516. children,
  7517. contextVm,
  7518. Ctor
  7519. );
  7520. var vnode = options.render.call(null, renderContext._c, renderContext);
  7521. if (vnode instanceof VNode) {
  7522. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7523. } else if (Array.isArray(vnode)) {
  7524. var vnodes = normalizeChildren(vnode) || [];
  7525. var res = new Array(vnodes.length);
  7526. for (var i = 0; i < vnodes.length; i++) {
  7527. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7528. }
  7529. return res
  7530. }
  7531. }
  7532. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7533. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7534. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7535. // that should not be matched to match.
  7536. var clone = cloneVNode(vnode);
  7537. clone.fnContext = contextVm;
  7538. clone.fnOptions = options;
  7539. if (true) {
  7540. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7541. }
  7542. if (data.slot) {
  7543. (clone.data || (clone.data = {})).slot = data.slot;
  7544. }
  7545. return clone
  7546. }
  7547. function mergeProps (to, from) {
  7548. for (var key in from) {
  7549. to[camelize(key)] = from[key];
  7550. }
  7551. }
  7552. /* */
  7553. /* */
  7554. /* */
  7555. /* */
  7556. // inline hooks to be invoked on component VNodes during patch
  7557. var componentVNodeHooks = {
  7558. init: function init (vnode, hydrating) {
  7559. if (
  7560. vnode.componentInstance &&
  7561. !vnode.componentInstance._isDestroyed &&
  7562. vnode.data.keepAlive
  7563. ) {
  7564. // kept-alive components, treat as a patch
  7565. var mountedNode = vnode; // work around flow
  7566. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7567. } else {
  7568. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7569. vnode,
  7570. activeInstance
  7571. );
  7572. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7573. }
  7574. },
  7575. prepatch: function prepatch (oldVnode, vnode) {
  7576. var options = vnode.componentOptions;
  7577. var child = vnode.componentInstance = oldVnode.componentInstance;
  7578. updateChildComponent(
  7579. child,
  7580. options.propsData, // updated props
  7581. options.listeners, // updated listeners
  7582. vnode, // new parent vnode
  7583. options.children // new children
  7584. );
  7585. },
  7586. insert: function insert (vnode) {
  7587. var context = vnode.context;
  7588. var componentInstance = vnode.componentInstance;
  7589. if (!componentInstance._isMounted) {
  7590. callHook(componentInstance, 'onServiceCreated');
  7591. callHook(componentInstance, 'onServiceAttached');
  7592. componentInstance._isMounted = true;
  7593. callHook(componentInstance, 'mounted');
  7594. }
  7595. if (vnode.data.keepAlive) {
  7596. if (context._isMounted) {
  7597. // vue-router#1212
  7598. // During updates, a kept-alive component's child components may
  7599. // change, so directly walking the tree here may call activated hooks
  7600. // on incorrect children. Instead we push them into a queue which will
  7601. // be processed after the whole patch process ended.
  7602. queueActivatedComponent(componentInstance);
  7603. } else {
  7604. activateChildComponent(componentInstance, true /* direct */);
  7605. }
  7606. }
  7607. },
  7608. destroy: function destroy (vnode) {
  7609. var componentInstance = vnode.componentInstance;
  7610. if (!componentInstance._isDestroyed) {
  7611. if (!vnode.data.keepAlive) {
  7612. componentInstance.$destroy();
  7613. } else {
  7614. deactivateChildComponent(componentInstance, true /* direct */);
  7615. }
  7616. }
  7617. }
  7618. };
  7619. var hooksToMerge = Object.keys(componentVNodeHooks);
  7620. function createComponent (
  7621. Ctor,
  7622. data,
  7623. context,
  7624. children,
  7625. tag
  7626. ) {
  7627. if (isUndef(Ctor)) {
  7628. return
  7629. }
  7630. var baseCtor = context.$options._base;
  7631. // plain options object: turn it into a constructor
  7632. if (isObject(Ctor)) {
  7633. Ctor = baseCtor.extend(Ctor);
  7634. }
  7635. // if at this stage it's not a constructor or an async component factory,
  7636. // reject.
  7637. if (typeof Ctor !== 'function') {
  7638. if (true) {
  7639. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7640. }
  7641. return
  7642. }
  7643. // async component
  7644. var asyncFactory;
  7645. if (isUndef(Ctor.cid)) {
  7646. asyncFactory = Ctor;
  7647. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7648. if (Ctor === undefined) {
  7649. // return a placeholder node for async component, which is rendered
  7650. // as a comment node but preserves all the raw information for the node.
  7651. // the information will be used for async server-rendering and hydration.
  7652. return createAsyncPlaceholder(
  7653. asyncFactory,
  7654. data,
  7655. context,
  7656. children,
  7657. tag
  7658. )
  7659. }
  7660. }
  7661. data = data || {};
  7662. // resolve constructor options in case global mixins are applied after
  7663. // component constructor creation
  7664. resolveConstructorOptions(Ctor);
  7665. // transform component v-model data into props & events
  7666. if (isDef(data.model)) {
  7667. transformModel(Ctor.options, data);
  7668. }
  7669. // extract props
  7670. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7671. // functional component
  7672. if (isTrue(Ctor.options.functional)) {
  7673. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7674. }
  7675. // extract listeners, since these needs to be treated as
  7676. // child component listeners instead of DOM listeners
  7677. var listeners = data.on;
  7678. // replace with listeners with .native modifier
  7679. // so it gets processed during parent component patch.
  7680. data.on = data.nativeOn;
  7681. if (isTrue(Ctor.options.abstract)) {
  7682. // abstract components do not keep anything
  7683. // other than props & listeners & slot
  7684. // work around flow
  7685. var slot = data.slot;
  7686. data = {};
  7687. if (slot) {
  7688. data.slot = slot;
  7689. }
  7690. }
  7691. // install component management hooks onto the placeholder node
  7692. installComponentHooks(data);
  7693. // return a placeholder vnode
  7694. var name = Ctor.options.name || tag;
  7695. var vnode = new VNode(
  7696. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7697. data, undefined, undefined, undefined, context,
  7698. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7699. asyncFactory
  7700. );
  7701. return vnode
  7702. }
  7703. function createComponentInstanceForVnode (
  7704. vnode, // we know it's MountedComponentVNode but flow doesn't
  7705. parent // activeInstance in lifecycle state
  7706. ) {
  7707. var options = {
  7708. _isComponent: true,
  7709. _parentVnode: vnode,
  7710. parent: parent
  7711. };
  7712. // check inline-template render functions
  7713. var inlineTemplate = vnode.data.inlineTemplate;
  7714. if (isDef(inlineTemplate)) {
  7715. options.render = inlineTemplate.render;
  7716. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7717. }
  7718. return new vnode.componentOptions.Ctor(options)
  7719. }
  7720. function installComponentHooks (data) {
  7721. var hooks = data.hook || (data.hook = {});
  7722. for (var i = 0; i < hooksToMerge.length; i++) {
  7723. var key = hooksToMerge[i];
  7724. var existing = hooks[key];
  7725. var toMerge = componentVNodeHooks[key];
  7726. if (existing !== toMerge && !(existing && existing._merged)) {
  7727. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7728. }
  7729. }
  7730. }
  7731. function mergeHook$1 (f1, f2) {
  7732. var merged = function (a, b) {
  7733. // flow complains about extra args which is why we use any
  7734. f1(a, b);
  7735. f2(a, b);
  7736. };
  7737. merged._merged = true;
  7738. return merged
  7739. }
  7740. // transform component v-model info (value and callback) into
  7741. // prop and event handler respectively.
  7742. function transformModel (options, data) {
  7743. var prop = (options.model && options.model.prop) || 'value';
  7744. var event = (options.model && options.model.event) || 'input'
  7745. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7746. var on = data.on || (data.on = {});
  7747. var existing = on[event];
  7748. var callback = data.model.callback;
  7749. if (isDef(existing)) {
  7750. if (
  7751. Array.isArray(existing)
  7752. ? existing.indexOf(callback) === -1
  7753. : existing !== callback
  7754. ) {
  7755. on[event] = [callback].concat(existing);
  7756. }
  7757. } else {
  7758. on[event] = callback;
  7759. }
  7760. }
  7761. /* */
  7762. var SIMPLE_NORMALIZE = 1;
  7763. var ALWAYS_NORMALIZE = 2;
  7764. // wrapper function for providing a more flexible interface
  7765. // without getting yelled at by flow
  7766. function createElement (
  7767. context,
  7768. tag,
  7769. data,
  7770. children,
  7771. normalizationType,
  7772. alwaysNormalize
  7773. ) {
  7774. if (Array.isArray(data) || isPrimitive(data)) {
  7775. normalizationType = children;
  7776. children = data;
  7777. data = undefined;
  7778. }
  7779. if (isTrue(alwaysNormalize)) {
  7780. normalizationType = ALWAYS_NORMALIZE;
  7781. }
  7782. return _createElement(context, tag, data, children, normalizationType)
  7783. }
  7784. function _createElement (
  7785. context,
  7786. tag,
  7787. data,
  7788. children,
  7789. normalizationType
  7790. ) {
  7791. if (isDef(data) && isDef((data).__ob__)) {
  7792. true && warn(
  7793. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7794. 'Always create fresh vnode data objects in each render!',
  7795. context
  7796. );
  7797. return createEmptyVNode()
  7798. }
  7799. // object syntax in v-bind
  7800. if (isDef(data) && isDef(data.is)) {
  7801. tag = data.is;
  7802. }
  7803. if (!tag) {
  7804. // in case of component :is set to falsy value
  7805. return createEmptyVNode()
  7806. }
  7807. // warn against non-primitive key
  7808. if ( true &&
  7809. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7810. ) {
  7811. {
  7812. warn(
  7813. 'Avoid using non-primitive value as key, ' +
  7814. 'use string/number value instead.',
  7815. context
  7816. );
  7817. }
  7818. }
  7819. // support single function children as default scoped slot
  7820. if (Array.isArray(children) &&
  7821. typeof children[0] === 'function'
  7822. ) {
  7823. data = data || {};
  7824. data.scopedSlots = { default: children[0] };
  7825. children.length = 0;
  7826. }
  7827. if (normalizationType === ALWAYS_NORMALIZE) {
  7828. children = normalizeChildren(children);
  7829. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7830. children = simpleNormalizeChildren(children);
  7831. }
  7832. var vnode, ns;
  7833. if (typeof tag === 'string') {
  7834. var Ctor;
  7835. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7836. if (config.isReservedTag(tag)) {
  7837. // platform built-in elements
  7838. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7839. warn(
  7840. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7841. context
  7842. );
  7843. }
  7844. vnode = new VNode(
  7845. config.parsePlatformTagName(tag), data, children,
  7846. undefined, undefined, context
  7847. );
  7848. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7849. // component
  7850. vnode = createComponent(Ctor, data, context, children, tag);
  7851. } else {
  7852. // unknown or unlisted namespaced elements
  7853. // check at runtime because it may get assigned a namespace when its
  7854. // parent normalizes children
  7855. vnode = new VNode(
  7856. tag, data, children,
  7857. undefined, undefined, context
  7858. );
  7859. }
  7860. } else {
  7861. // direct component options / constructor
  7862. vnode = createComponent(tag, data, context, children);
  7863. }
  7864. if (Array.isArray(vnode)) {
  7865. return vnode
  7866. } else if (isDef(vnode)) {
  7867. if (isDef(ns)) { applyNS(vnode, ns); }
  7868. if (isDef(data)) { registerDeepBindings(data); }
  7869. return vnode
  7870. } else {
  7871. return createEmptyVNode()
  7872. }
  7873. }
  7874. function applyNS (vnode, ns, force) {
  7875. vnode.ns = ns;
  7876. if (vnode.tag === 'foreignObject') {
  7877. // use default namespace inside foreignObject
  7878. ns = undefined;
  7879. force = true;
  7880. }
  7881. if (isDef(vnode.children)) {
  7882. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7883. var child = vnode.children[i];
  7884. if (isDef(child.tag) && (
  7885. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7886. applyNS(child, ns, force);
  7887. }
  7888. }
  7889. }
  7890. }
  7891. // ref #5318
  7892. // necessary to ensure parent re-render when deep bindings like :style and
  7893. // :class are used on slot nodes
  7894. function registerDeepBindings (data) {
  7895. if (isObject(data.style)) {
  7896. traverse(data.style);
  7897. }
  7898. if (isObject(data.class)) {
  7899. traverse(data.class);
  7900. }
  7901. }
  7902. /* */
  7903. function initRender (vm) {
  7904. vm._vnode = null; // the root of the child tree
  7905. vm._staticTrees = null; // v-once cached trees
  7906. var options = vm.$options;
  7907. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7908. var renderContext = parentVnode && parentVnode.context;
  7909. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7910. vm.$scopedSlots = emptyObject;
  7911. // bind the createElement fn to this instance
  7912. // so that we get proper render context inside it.
  7913. // args order: tag, data, children, normalizationType, alwaysNormalize
  7914. // internal version is used by render functions compiled from templates
  7915. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7916. // normalization is always applied for the public version, used in
  7917. // user-written render functions.
  7918. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7919. // $attrs & $listeners are exposed for easier HOC creation.
  7920. // they need to be reactive so that HOCs using them are always updated
  7921. var parentData = parentVnode && parentVnode.data;
  7922. /* istanbul ignore else */
  7923. if (true) {
  7924. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7925. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7926. }, true);
  7927. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7928. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7929. }, true);
  7930. } else {}
  7931. }
  7932. var currentRenderingInstance = null;
  7933. function renderMixin (Vue) {
  7934. // install runtime convenience helpers
  7935. installRenderHelpers(Vue.prototype);
  7936. Vue.prototype.$nextTick = function (fn) {
  7937. return nextTick(fn, this)
  7938. };
  7939. Vue.prototype._render = function () {
  7940. var vm = this;
  7941. var ref = vm.$options;
  7942. var render = ref.render;
  7943. var _parentVnode = ref._parentVnode;
  7944. if (_parentVnode) {
  7945. vm.$scopedSlots = normalizeScopedSlots(
  7946. _parentVnode.data.scopedSlots,
  7947. vm.$slots,
  7948. vm.$scopedSlots
  7949. );
  7950. }
  7951. // set parent vnode. this allows render functions to have access
  7952. // to the data on the placeholder node.
  7953. vm.$vnode = _parentVnode;
  7954. // render self
  7955. var vnode;
  7956. try {
  7957. // There's no need to maintain a stack because all render fns are called
  7958. // separately from one another. Nested component's render fns are called
  7959. // when parent component is patched.
  7960. currentRenderingInstance = vm;
  7961. vnode = render.call(vm._renderProxy, vm.$createElement);
  7962. } catch (e) {
  7963. handleError(e, vm, "render");
  7964. // return error render result,
  7965. // or previous vnode to prevent render error causing blank component
  7966. /* istanbul ignore else */
  7967. if ( true && vm.$options.renderError) {
  7968. try {
  7969. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7970. } catch (e) {
  7971. handleError(e, vm, "renderError");
  7972. vnode = vm._vnode;
  7973. }
  7974. } else {
  7975. vnode = vm._vnode;
  7976. }
  7977. } finally {
  7978. currentRenderingInstance = null;
  7979. }
  7980. // if the returned array contains only a single node, allow it
  7981. if (Array.isArray(vnode) && vnode.length === 1) {
  7982. vnode = vnode[0];
  7983. }
  7984. // return empty vnode in case the render function errored out
  7985. if (!(vnode instanceof VNode)) {
  7986. if ( true && Array.isArray(vnode)) {
  7987. warn(
  7988. 'Multiple root nodes returned from render function. Render function ' +
  7989. 'should return a single root node.',
  7990. vm
  7991. );
  7992. }
  7993. vnode = createEmptyVNode();
  7994. }
  7995. // set parent
  7996. vnode.parent = _parentVnode;
  7997. return vnode
  7998. };
  7999. }
  8000. /* */
  8001. function ensureCtor (comp, base) {
  8002. if (
  8003. comp.__esModule ||
  8004. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  8005. ) {
  8006. comp = comp.default;
  8007. }
  8008. return isObject(comp)
  8009. ? base.extend(comp)
  8010. : comp
  8011. }
  8012. function createAsyncPlaceholder (
  8013. factory,
  8014. data,
  8015. context,
  8016. children,
  8017. tag
  8018. ) {
  8019. var node = createEmptyVNode();
  8020. node.asyncFactory = factory;
  8021. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  8022. return node
  8023. }
  8024. function resolveAsyncComponent (
  8025. factory,
  8026. baseCtor
  8027. ) {
  8028. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  8029. return factory.errorComp
  8030. }
  8031. if (isDef(factory.resolved)) {
  8032. return factory.resolved
  8033. }
  8034. var owner = currentRenderingInstance;
  8035. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  8036. // already pending
  8037. factory.owners.push(owner);
  8038. }
  8039. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  8040. return factory.loadingComp
  8041. }
  8042. if (owner && !isDef(factory.owners)) {
  8043. var owners = factory.owners = [owner];
  8044. var sync = true;
  8045. var timerLoading = null;
  8046. var timerTimeout = null
  8047. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  8048. var forceRender = function (renderCompleted) {
  8049. for (var i = 0, l = owners.length; i < l; i++) {
  8050. (owners[i]).$forceUpdate();
  8051. }
  8052. if (renderCompleted) {
  8053. owners.length = 0;
  8054. if (timerLoading !== null) {
  8055. clearTimeout(timerLoading);
  8056. timerLoading = null;
  8057. }
  8058. if (timerTimeout !== null) {
  8059. clearTimeout(timerTimeout);
  8060. timerTimeout = null;
  8061. }
  8062. }
  8063. };
  8064. var resolve = once(function (res) {
  8065. // cache resolved
  8066. factory.resolved = ensureCtor(res, baseCtor);
  8067. // invoke callbacks only if this is not a synchronous resolve
  8068. // (async resolves are shimmed as synchronous during SSR)
  8069. if (!sync) {
  8070. forceRender(true);
  8071. } else {
  8072. owners.length = 0;
  8073. }
  8074. });
  8075. var reject = once(function (reason) {
  8076. true && warn(
  8077. "Failed to resolve async component: " + (String(factory)) +
  8078. (reason ? ("\nReason: " + reason) : '')
  8079. );
  8080. if (isDef(factory.errorComp)) {
  8081. factory.error = true;
  8082. forceRender(true);
  8083. }
  8084. });
  8085. var res = factory(resolve, reject);
  8086. if (isObject(res)) {
  8087. if (isPromise(res)) {
  8088. // () => Promise
  8089. if (isUndef(factory.resolved)) {
  8090. res.then(resolve, reject);
  8091. }
  8092. } else if (isPromise(res.component)) {
  8093. res.component.then(resolve, reject);
  8094. if (isDef(res.error)) {
  8095. factory.errorComp = ensureCtor(res.error, baseCtor);
  8096. }
  8097. if (isDef(res.loading)) {
  8098. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  8099. if (res.delay === 0) {
  8100. factory.loading = true;
  8101. } else {
  8102. timerLoading = setTimeout(function () {
  8103. timerLoading = null;
  8104. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  8105. factory.loading = true;
  8106. forceRender(false);
  8107. }
  8108. }, res.delay || 200);
  8109. }
  8110. }
  8111. if (isDef(res.timeout)) {
  8112. timerTimeout = setTimeout(function () {
  8113. timerTimeout = null;
  8114. if (isUndef(factory.resolved)) {
  8115. reject(
  8116. true
  8117. ? ("timeout (" + (res.timeout) + "ms)")
  8118. : undefined
  8119. );
  8120. }
  8121. }, res.timeout);
  8122. }
  8123. }
  8124. }
  8125. sync = false;
  8126. // return in case resolved synchronously
  8127. return factory.loading
  8128. ? factory.loadingComp
  8129. : factory.resolved
  8130. }
  8131. }
  8132. /* */
  8133. function isAsyncPlaceholder (node) {
  8134. return node.isComment && node.asyncFactory
  8135. }
  8136. /* */
  8137. function getFirstComponentChild (children) {
  8138. if (Array.isArray(children)) {
  8139. for (var i = 0; i < children.length; i++) {
  8140. var c = children[i];
  8141. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8142. return c
  8143. }
  8144. }
  8145. }
  8146. }
  8147. /* */
  8148. /* */
  8149. function initEvents (vm) {
  8150. vm._events = Object.create(null);
  8151. vm._hasHookEvent = false;
  8152. // init parent attached events
  8153. var listeners = vm.$options._parentListeners;
  8154. if (listeners) {
  8155. updateComponentListeners(vm, listeners);
  8156. }
  8157. }
  8158. var target;
  8159. function add (event, fn) {
  8160. target.$on(event, fn);
  8161. }
  8162. function remove$1 (event, fn) {
  8163. target.$off(event, fn);
  8164. }
  8165. function createOnceHandler (event, fn) {
  8166. var _target = target;
  8167. return function onceHandler () {
  8168. var res = fn.apply(null, arguments);
  8169. if (res !== null) {
  8170. _target.$off(event, onceHandler);
  8171. }
  8172. }
  8173. }
  8174. function updateComponentListeners (
  8175. vm,
  8176. listeners,
  8177. oldListeners
  8178. ) {
  8179. target = vm;
  8180. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8181. target = undefined;
  8182. }
  8183. function eventsMixin (Vue) {
  8184. var hookRE = /^hook:/;
  8185. Vue.prototype.$on = function (event, fn) {
  8186. var vm = this;
  8187. if (Array.isArray(event)) {
  8188. for (var i = 0, l = event.length; i < l; i++) {
  8189. vm.$on(event[i], fn);
  8190. }
  8191. } else {
  8192. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8193. // optimize hook:event cost by using a boolean flag marked at registration
  8194. // instead of a hash lookup
  8195. if (hookRE.test(event)) {
  8196. vm._hasHookEvent = true;
  8197. }
  8198. }
  8199. return vm
  8200. };
  8201. Vue.prototype.$once = function (event, fn) {
  8202. var vm = this;
  8203. function on () {
  8204. vm.$off(event, on);
  8205. fn.apply(vm, arguments);
  8206. }
  8207. on.fn = fn;
  8208. vm.$on(event, on);
  8209. return vm
  8210. };
  8211. Vue.prototype.$off = function (event, fn) {
  8212. var vm = this;
  8213. // all
  8214. if (!arguments.length) {
  8215. vm._events = Object.create(null);
  8216. return vm
  8217. }
  8218. // array of events
  8219. if (Array.isArray(event)) {
  8220. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8221. vm.$off(event[i$1], fn);
  8222. }
  8223. return vm
  8224. }
  8225. // specific event
  8226. var cbs = vm._events[event];
  8227. if (!cbs) {
  8228. return vm
  8229. }
  8230. if (!fn) {
  8231. vm._events[event] = null;
  8232. return vm
  8233. }
  8234. // specific handler
  8235. var cb;
  8236. var i = cbs.length;
  8237. while (i--) {
  8238. cb = cbs[i];
  8239. if (cb === fn || cb.fn === fn) {
  8240. cbs.splice(i, 1);
  8241. break
  8242. }
  8243. }
  8244. return vm
  8245. };
  8246. Vue.prototype.$emit = function (event) {
  8247. var vm = this;
  8248. if (true) {
  8249. var lowerCaseEvent = event.toLowerCase();
  8250. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8251. tip(
  8252. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8253. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8254. "Note that HTML attributes are case-insensitive and you cannot use " +
  8255. "v-on to listen to camelCase events when using in-DOM templates. " +
  8256. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8257. );
  8258. }
  8259. }
  8260. var cbs = vm._events[event];
  8261. if (cbs) {
  8262. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8263. var args = toArray(arguments, 1);
  8264. var info = "event handler for \"" + event + "\"";
  8265. for (var i = 0, l = cbs.length; i < l; i++) {
  8266. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8267. }
  8268. }
  8269. return vm
  8270. };
  8271. }
  8272. /* */
  8273. var activeInstance = null;
  8274. var isUpdatingChildComponent = false;
  8275. function setActiveInstance(vm) {
  8276. var prevActiveInstance = activeInstance;
  8277. activeInstance = vm;
  8278. return function () {
  8279. activeInstance = prevActiveInstance;
  8280. }
  8281. }
  8282. function initLifecycle (vm) {
  8283. var options = vm.$options;
  8284. // locate first non-abstract parent
  8285. var parent = options.parent;
  8286. if (parent && !options.abstract) {
  8287. while (parent.$options.abstract && parent.$parent) {
  8288. parent = parent.$parent;
  8289. }
  8290. parent.$children.push(vm);
  8291. }
  8292. vm.$parent = parent;
  8293. vm.$root = parent ? parent.$root : vm;
  8294. vm.$children = [];
  8295. vm.$refs = {};
  8296. vm._watcher = null;
  8297. vm._inactive = null;
  8298. vm._directInactive = false;
  8299. vm._isMounted = false;
  8300. vm._isDestroyed = false;
  8301. vm._isBeingDestroyed = false;
  8302. }
  8303. function lifecycleMixin (Vue) {
  8304. Vue.prototype._update = function (vnode, hydrating) {
  8305. var vm = this;
  8306. var prevEl = vm.$el;
  8307. var prevVnode = vm._vnode;
  8308. var restoreActiveInstance = setActiveInstance(vm);
  8309. vm._vnode = vnode;
  8310. // Vue.prototype.__patch__ is injected in entry points
  8311. // based on the rendering backend used.
  8312. if (!prevVnode) {
  8313. // initial render
  8314. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8315. } else {
  8316. // updates
  8317. vm.$el = vm.__patch__(prevVnode, vnode);
  8318. }
  8319. restoreActiveInstance();
  8320. // update __vue__ reference
  8321. if (prevEl) {
  8322. prevEl.__vue__ = null;
  8323. }
  8324. if (vm.$el) {
  8325. vm.$el.__vue__ = vm;
  8326. }
  8327. // if parent is an HOC, update its $el as well
  8328. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8329. vm.$parent.$el = vm.$el;
  8330. }
  8331. // updated hook is called by the scheduler to ensure that children are
  8332. // updated in a parent's updated hook.
  8333. };
  8334. Vue.prototype.$forceUpdate = function () {
  8335. var vm = this;
  8336. if (vm._watcher) {
  8337. vm._watcher.update();
  8338. }
  8339. };
  8340. Vue.prototype.$destroy = function () {
  8341. var vm = this;
  8342. if (vm._isBeingDestroyed) {
  8343. return
  8344. }
  8345. callHook(vm, 'beforeDestroy');
  8346. vm._isBeingDestroyed = true;
  8347. // remove self from parent
  8348. var parent = vm.$parent;
  8349. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8350. remove(parent.$children, vm);
  8351. }
  8352. // teardown watchers
  8353. if (vm._watcher) {
  8354. vm._watcher.teardown();
  8355. }
  8356. var i = vm._watchers.length;
  8357. while (i--) {
  8358. vm._watchers[i].teardown();
  8359. }
  8360. // remove reference from data ob
  8361. // frozen object may not have observer.
  8362. if (vm._data.__ob__) {
  8363. vm._data.__ob__.vmCount--;
  8364. }
  8365. // call the last hook...
  8366. vm._isDestroyed = true;
  8367. // invoke destroy hooks on current rendered tree
  8368. vm.__patch__(vm._vnode, null);
  8369. // fire destroyed hook
  8370. callHook(vm, 'destroyed');
  8371. // turn off all instance listeners.
  8372. vm.$off();
  8373. // remove __vue__ reference
  8374. if (vm.$el) {
  8375. vm.$el.__vue__ = null;
  8376. }
  8377. // release circular reference (#6759)
  8378. if (vm.$vnode) {
  8379. vm.$vnode.parent = null;
  8380. }
  8381. };
  8382. }
  8383. function updateChildComponent (
  8384. vm,
  8385. propsData,
  8386. listeners,
  8387. parentVnode,
  8388. renderChildren
  8389. ) {
  8390. if (true) {
  8391. isUpdatingChildComponent = true;
  8392. }
  8393. // determine whether component has slot children
  8394. // we need to do this before overwriting $options._renderChildren.
  8395. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8396. // dynamic slot names). Static scoped slots compiled from template has the
  8397. // "$stable" marker.
  8398. var newScopedSlots = parentVnode.data.scopedSlots;
  8399. var oldScopedSlots = vm.$scopedSlots;
  8400. var hasDynamicScopedSlot = !!(
  8401. (newScopedSlots && !newScopedSlots.$stable) ||
  8402. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8403. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8404. );
  8405. // Any static slot children from the parent may have changed during parent's
  8406. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8407. // update is necessary to ensure correctness.
  8408. var needsForceUpdate = !!(
  8409. renderChildren || // has new static slots
  8410. vm.$options._renderChildren || // has old static slots
  8411. hasDynamicScopedSlot
  8412. );
  8413. vm.$options._parentVnode = parentVnode;
  8414. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8415. if (vm._vnode) { // update child tree's parent
  8416. vm._vnode.parent = parentVnode;
  8417. }
  8418. vm.$options._renderChildren = renderChildren;
  8419. // update $attrs and $listeners hash
  8420. // these are also reactive so they may trigger child update if the child
  8421. // used them during render
  8422. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8423. vm.$listeners = listeners || emptyObject;
  8424. // update props
  8425. if (propsData && vm.$options.props) {
  8426. toggleObserving(false);
  8427. var props = vm._props;
  8428. var propKeys = vm.$options._propKeys || [];
  8429. for (var i = 0; i < propKeys.length; i++) {
  8430. var key = propKeys[i];
  8431. var propOptions = vm.$options.props; // wtf flow?
  8432. props[key] = validateProp(key, propOptions, propsData, vm);
  8433. }
  8434. toggleObserving(true);
  8435. // keep a copy of raw propsData
  8436. vm.$options.propsData = propsData;
  8437. }
  8438. // fixed by xxxxxx update properties(mp runtime)
  8439. vm._$updateProperties && vm._$updateProperties(vm);
  8440. // update listeners
  8441. listeners = listeners || emptyObject;
  8442. var oldListeners = vm.$options._parentListeners;
  8443. vm.$options._parentListeners = listeners;
  8444. updateComponentListeners(vm, listeners, oldListeners);
  8445. // resolve slots + force update if has children
  8446. if (needsForceUpdate) {
  8447. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8448. vm.$forceUpdate();
  8449. }
  8450. if (true) {
  8451. isUpdatingChildComponent = false;
  8452. }
  8453. }
  8454. function isInInactiveTree (vm) {
  8455. while (vm && (vm = vm.$parent)) {
  8456. if (vm._inactive) { return true }
  8457. }
  8458. return false
  8459. }
  8460. function activateChildComponent (vm, direct) {
  8461. if (direct) {
  8462. vm._directInactive = false;
  8463. if (isInInactiveTree(vm)) {
  8464. return
  8465. }
  8466. } else if (vm._directInactive) {
  8467. return
  8468. }
  8469. if (vm._inactive || vm._inactive === null) {
  8470. vm._inactive = false;
  8471. for (var i = 0; i < vm.$children.length; i++) {
  8472. activateChildComponent(vm.$children[i]);
  8473. }
  8474. callHook(vm, 'activated');
  8475. }
  8476. }
  8477. function deactivateChildComponent (vm, direct) {
  8478. if (direct) {
  8479. vm._directInactive = true;
  8480. if (isInInactiveTree(vm)) {
  8481. return
  8482. }
  8483. }
  8484. if (!vm._inactive) {
  8485. vm._inactive = true;
  8486. for (var i = 0; i < vm.$children.length; i++) {
  8487. deactivateChildComponent(vm.$children[i]);
  8488. }
  8489. callHook(vm, 'deactivated');
  8490. }
  8491. }
  8492. function callHook (vm, hook) {
  8493. // #7573 disable dep collection when invoking lifecycle hooks
  8494. pushTarget();
  8495. var handlers = vm.$options[hook];
  8496. var info = hook + " hook";
  8497. if (handlers) {
  8498. for (var i = 0, j = handlers.length; i < j; i++) {
  8499. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8500. }
  8501. }
  8502. if (vm._hasHookEvent) {
  8503. vm.$emit('hook:' + hook);
  8504. }
  8505. popTarget();
  8506. }
  8507. /* */
  8508. var MAX_UPDATE_COUNT = 100;
  8509. var queue = [];
  8510. var activatedChildren = [];
  8511. var has = {};
  8512. var circular = {};
  8513. var waiting = false;
  8514. var flushing = false;
  8515. var index = 0;
  8516. /**
  8517. * Reset the scheduler's state.
  8518. */
  8519. function resetSchedulerState () {
  8520. index = queue.length = activatedChildren.length = 0;
  8521. has = {};
  8522. if (true) {
  8523. circular = {};
  8524. }
  8525. waiting = flushing = false;
  8526. }
  8527. // Async edge case #6566 requires saving the timestamp when event listeners are
  8528. // attached. However, calling performance.now() has a perf overhead especially
  8529. // if the page has thousands of event listeners. Instead, we take a timestamp
  8530. // every time the scheduler flushes and use that for all event listeners
  8531. // attached during that flush.
  8532. var currentFlushTimestamp = 0;
  8533. // Async edge case fix requires storing an event listener's attach timestamp.
  8534. var getNow = Date.now;
  8535. // Determine what event timestamp the browser is using. Annoyingly, the
  8536. // timestamp can either be hi-res (relative to page load) or low-res
  8537. // (relative to UNIX epoch), so in order to compare time we have to use the
  8538. // same timestamp type when saving the flush timestamp.
  8539. // All IE versions use low-res event timestamps, and have problematic clock
  8540. // implementations (#9632)
  8541. if (inBrowser && !isIE) {
  8542. var performance = window.performance;
  8543. if (
  8544. performance &&
  8545. typeof performance.now === 'function' &&
  8546. getNow() > document.createEvent('Event').timeStamp
  8547. ) {
  8548. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8549. // smaller than it, it means the event is using a hi-res timestamp,
  8550. // and we need to use the hi-res version for event listener timestamps as
  8551. // well.
  8552. getNow = function () { return performance.now(); };
  8553. }
  8554. }
  8555. /**
  8556. * Flush both queues and run the watchers.
  8557. */
  8558. function flushSchedulerQueue () {
  8559. currentFlushTimestamp = getNow();
  8560. flushing = true;
  8561. var watcher, id;
  8562. // Sort queue before flush.
  8563. // This ensures that:
  8564. // 1. Components are updated from parent to child. (because parent is always
  8565. // created before the child)
  8566. // 2. A component's user watchers are run before its render watcher (because
  8567. // user watchers are created before the render watcher)
  8568. // 3. If a component is destroyed during a parent component's watcher run,
  8569. // its watchers can be skipped.
  8570. queue.sort(function (a, b) { return a.id - b.id; });
  8571. // do not cache length because more watchers might be pushed
  8572. // as we run existing watchers
  8573. for (index = 0; index < queue.length; index++) {
  8574. watcher = queue[index];
  8575. if (watcher.before) {
  8576. watcher.before();
  8577. }
  8578. id = watcher.id;
  8579. has[id] = null;
  8580. watcher.run();
  8581. // in dev build, check and stop circular updates.
  8582. if ( true && has[id] != null) {
  8583. circular[id] = (circular[id] || 0) + 1;
  8584. if (circular[id] > MAX_UPDATE_COUNT) {
  8585. warn(
  8586. 'You may have an infinite update loop ' + (
  8587. watcher.user
  8588. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8589. : "in a component render function."
  8590. ),
  8591. watcher.vm
  8592. );
  8593. break
  8594. }
  8595. }
  8596. }
  8597. // keep copies of post queues before resetting state
  8598. var activatedQueue = activatedChildren.slice();
  8599. var updatedQueue = queue.slice();
  8600. resetSchedulerState();
  8601. // call component updated and activated hooks
  8602. callActivatedHooks(activatedQueue);
  8603. callUpdatedHooks(updatedQueue);
  8604. // devtool hook
  8605. /* istanbul ignore if */
  8606. if (devtools && config.devtools) {
  8607. devtools.emit('flush');
  8608. }
  8609. }
  8610. function callUpdatedHooks (queue) {
  8611. var i = queue.length;
  8612. while (i--) {
  8613. var watcher = queue[i];
  8614. var vm = watcher.vm;
  8615. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8616. callHook(vm, 'updated');
  8617. }
  8618. }
  8619. }
  8620. /**
  8621. * Queue a kept-alive component that was activated during patch.
  8622. * The queue will be processed after the entire tree has been patched.
  8623. */
  8624. function queueActivatedComponent (vm) {
  8625. // setting _inactive to false here so that a render function can
  8626. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8627. vm._inactive = false;
  8628. activatedChildren.push(vm);
  8629. }
  8630. function callActivatedHooks (queue) {
  8631. for (var i = 0; i < queue.length; i++) {
  8632. queue[i]._inactive = true;
  8633. activateChildComponent(queue[i], true /* true */);
  8634. }
  8635. }
  8636. /**
  8637. * Push a watcher into the watcher queue.
  8638. * Jobs with duplicate IDs will be skipped unless it's
  8639. * pushed when the queue is being flushed.
  8640. */
  8641. function queueWatcher (watcher) {
  8642. var id = watcher.id;
  8643. if (has[id] == null) {
  8644. has[id] = true;
  8645. if (!flushing) {
  8646. queue.push(watcher);
  8647. } else {
  8648. // if already flushing, splice the watcher based on its id
  8649. // if already past its id, it will be run next immediately.
  8650. var i = queue.length - 1;
  8651. while (i > index && queue[i].id > watcher.id) {
  8652. i--;
  8653. }
  8654. queue.splice(i + 1, 0, watcher);
  8655. }
  8656. // queue the flush
  8657. if (!waiting) {
  8658. waiting = true;
  8659. if ( true && !config.async) {
  8660. flushSchedulerQueue();
  8661. return
  8662. }
  8663. nextTick(flushSchedulerQueue);
  8664. }
  8665. }
  8666. }
  8667. /* */
  8668. var uid$2 = 0;
  8669. /**
  8670. * A watcher parses an expression, collects dependencies,
  8671. * and fires callback when the expression value changes.
  8672. * This is used for both the $watch() api and directives.
  8673. */
  8674. var Watcher = function Watcher (
  8675. vm,
  8676. expOrFn,
  8677. cb,
  8678. options,
  8679. isRenderWatcher
  8680. ) {
  8681. this.vm = vm;
  8682. if (isRenderWatcher) {
  8683. vm._watcher = this;
  8684. }
  8685. vm._watchers.push(this);
  8686. // options
  8687. if (options) {
  8688. this.deep = !!options.deep;
  8689. this.user = !!options.user;
  8690. this.lazy = !!options.lazy;
  8691. this.sync = !!options.sync;
  8692. this.before = options.before;
  8693. } else {
  8694. this.deep = this.user = this.lazy = this.sync = false;
  8695. }
  8696. this.cb = cb;
  8697. this.id = ++uid$2; // uid for batching
  8698. this.active = true;
  8699. this.dirty = this.lazy; // for lazy watchers
  8700. this.deps = [];
  8701. this.newDeps = [];
  8702. this.depIds = new _Set();
  8703. this.newDepIds = new _Set();
  8704. this.expression = true
  8705. ? expOrFn.toString()
  8706. : undefined;
  8707. // parse expression for getter
  8708. if (typeof expOrFn === 'function') {
  8709. this.getter = expOrFn;
  8710. } else {
  8711. this.getter = parsePath(expOrFn);
  8712. if (!this.getter) {
  8713. this.getter = noop;
  8714. true && warn(
  8715. "Failed watching path: \"" + expOrFn + "\" " +
  8716. 'Watcher only accepts simple dot-delimited paths. ' +
  8717. 'For full control, use a function instead.',
  8718. vm
  8719. );
  8720. }
  8721. }
  8722. this.value = this.lazy
  8723. ? undefined
  8724. : this.get();
  8725. };
  8726. /**
  8727. * Evaluate the getter, and re-collect dependencies.
  8728. */
  8729. Watcher.prototype.get = function get () {
  8730. pushTarget(this);
  8731. var value;
  8732. var vm = this.vm;
  8733. try {
  8734. value = this.getter.call(vm, vm);
  8735. } catch (e) {
  8736. if (this.user) {
  8737. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8738. } else {
  8739. throw e
  8740. }
  8741. } finally {
  8742. // "touch" every property so they are all tracked as
  8743. // dependencies for deep watching
  8744. if (this.deep) {
  8745. traverse(value);
  8746. }
  8747. popTarget();
  8748. this.cleanupDeps();
  8749. }
  8750. return value
  8751. };
  8752. /**
  8753. * Add a dependency to this directive.
  8754. */
  8755. Watcher.prototype.addDep = function addDep (dep) {
  8756. var id = dep.id;
  8757. if (!this.newDepIds.has(id)) {
  8758. this.newDepIds.add(id);
  8759. this.newDeps.push(dep);
  8760. if (!this.depIds.has(id)) {
  8761. dep.addSub(this);
  8762. }
  8763. }
  8764. };
  8765. /**
  8766. * Clean up for dependency collection.
  8767. */
  8768. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8769. var i = this.deps.length;
  8770. while (i--) {
  8771. var dep = this.deps[i];
  8772. if (!this.newDepIds.has(dep.id)) {
  8773. dep.removeSub(this);
  8774. }
  8775. }
  8776. var tmp = this.depIds;
  8777. this.depIds = this.newDepIds;
  8778. this.newDepIds = tmp;
  8779. this.newDepIds.clear();
  8780. tmp = this.deps;
  8781. this.deps = this.newDeps;
  8782. this.newDeps = tmp;
  8783. this.newDeps.length = 0;
  8784. };
  8785. /**
  8786. * Subscriber interface.
  8787. * Will be called when a dependency changes.
  8788. */
  8789. Watcher.prototype.update = function update () {
  8790. /* istanbul ignore else */
  8791. if (this.lazy) {
  8792. this.dirty = true;
  8793. } else if (this.sync) {
  8794. this.run();
  8795. } else {
  8796. queueWatcher(this);
  8797. }
  8798. };
  8799. /**
  8800. * Scheduler job interface.
  8801. * Will be called by the scheduler.
  8802. */
  8803. Watcher.prototype.run = function run () {
  8804. if (this.active) {
  8805. var value = this.get();
  8806. if (
  8807. value !== this.value ||
  8808. // Deep watchers and watchers on Object/Arrays should fire even
  8809. // when the value is the same, because the value may
  8810. // have mutated.
  8811. isObject(value) ||
  8812. this.deep
  8813. ) {
  8814. // set new value
  8815. var oldValue = this.value;
  8816. this.value = value;
  8817. if (this.user) {
  8818. try {
  8819. this.cb.call(this.vm, value, oldValue);
  8820. } catch (e) {
  8821. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8822. }
  8823. } else {
  8824. this.cb.call(this.vm, value, oldValue);
  8825. }
  8826. }
  8827. }
  8828. };
  8829. /**
  8830. * Evaluate the value of the watcher.
  8831. * This only gets called for lazy watchers.
  8832. */
  8833. Watcher.prototype.evaluate = function evaluate () {
  8834. this.value = this.get();
  8835. this.dirty = false;
  8836. };
  8837. /**
  8838. * Depend on all deps collected by this watcher.
  8839. */
  8840. Watcher.prototype.depend = function depend () {
  8841. var i = this.deps.length;
  8842. while (i--) {
  8843. this.deps[i].depend();
  8844. }
  8845. };
  8846. /**
  8847. * Remove self from all dependencies' subscriber list.
  8848. */
  8849. Watcher.prototype.teardown = function teardown () {
  8850. if (this.active) {
  8851. // remove self from vm's watcher list
  8852. // this is a somewhat expensive operation so we skip it
  8853. // if the vm is being destroyed.
  8854. if (!this.vm._isBeingDestroyed) {
  8855. remove(this.vm._watchers, this);
  8856. }
  8857. var i = this.deps.length;
  8858. while (i--) {
  8859. this.deps[i].removeSub(this);
  8860. }
  8861. this.active = false;
  8862. }
  8863. };
  8864. /* */
  8865. var sharedPropertyDefinition = {
  8866. enumerable: true,
  8867. configurable: true,
  8868. get: noop,
  8869. set: noop
  8870. };
  8871. function proxy (target, sourceKey, key) {
  8872. sharedPropertyDefinition.get = function proxyGetter () {
  8873. return this[sourceKey][key]
  8874. };
  8875. sharedPropertyDefinition.set = function proxySetter (val) {
  8876. this[sourceKey][key] = val;
  8877. };
  8878. Object.defineProperty(target, key, sharedPropertyDefinition);
  8879. }
  8880. function initState (vm) {
  8881. vm._watchers = [];
  8882. var opts = vm.$options;
  8883. if (opts.props) { initProps(vm, opts.props); }
  8884. if (opts.methods) { initMethods(vm, opts.methods); }
  8885. if (opts.data) {
  8886. initData(vm);
  8887. } else {
  8888. observe(vm._data = {}, true /* asRootData */);
  8889. }
  8890. if (opts.computed) { initComputed(vm, opts.computed); }
  8891. if (opts.watch && opts.watch !== nativeWatch) {
  8892. initWatch(vm, opts.watch);
  8893. }
  8894. }
  8895. function initProps (vm, propsOptions) {
  8896. var propsData = vm.$options.propsData || {};
  8897. var props = vm._props = {};
  8898. // cache prop keys so that future props updates can iterate using Array
  8899. // instead of dynamic object key enumeration.
  8900. var keys = vm.$options._propKeys = [];
  8901. var isRoot = !vm.$parent;
  8902. // root instance props should be converted
  8903. if (!isRoot) {
  8904. toggleObserving(false);
  8905. }
  8906. var loop = function ( key ) {
  8907. keys.push(key);
  8908. var value = validateProp(key, propsOptions, propsData, vm);
  8909. /* istanbul ignore else */
  8910. if (true) {
  8911. var hyphenatedKey = hyphenate(key);
  8912. if (isReservedAttribute(hyphenatedKey) ||
  8913. config.isReservedAttr(hyphenatedKey)) {
  8914. warn(
  8915. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8916. vm
  8917. );
  8918. }
  8919. defineReactive$$1(props, key, value, function () {
  8920. if (!isRoot && !isUpdatingChildComponent) {
  8921. {
  8922. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou'){//百度、快手 observer 在 setData callback 之后触发,直接忽略该 warn
  8923. return
  8924. }
  8925. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8926. if(
  8927. key === 'value' &&
  8928. Array.isArray(vm.$options.behaviors) &&
  8929. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8930. ){
  8931. return
  8932. }
  8933. if(vm._getFormData){
  8934. return
  8935. }
  8936. var $parent = vm.$parent;
  8937. while($parent){
  8938. if($parent.__next_tick_pending){
  8939. return
  8940. }
  8941. $parent = $parent.$parent;
  8942. }
  8943. }
  8944. warn(
  8945. "Avoid mutating a prop directly since the value will be " +
  8946. "overwritten whenever the parent component re-renders. " +
  8947. "Instead, use a data or computed property based on the prop's " +
  8948. "value. Prop being mutated: \"" + key + "\"",
  8949. vm
  8950. );
  8951. }
  8952. });
  8953. } else {}
  8954. // static props are already proxied on the component's prototype
  8955. // during Vue.extend(). We only need to proxy props defined at
  8956. // instantiation here.
  8957. if (!(key in vm)) {
  8958. proxy(vm, "_props", key);
  8959. }
  8960. };
  8961. for (var key in propsOptions) loop( key );
  8962. toggleObserving(true);
  8963. }
  8964. function initData (vm) {
  8965. var data = vm.$options.data;
  8966. data = vm._data = typeof data === 'function'
  8967. ? getData(data, vm)
  8968. : data || {};
  8969. if (!isPlainObject(data)) {
  8970. data = {};
  8971. true && warn(
  8972. 'data functions should return an object:\n' +
  8973. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8974. vm
  8975. );
  8976. }
  8977. // proxy data on instance
  8978. var keys = Object.keys(data);
  8979. var props = vm.$options.props;
  8980. var methods = vm.$options.methods;
  8981. var i = keys.length;
  8982. while (i--) {
  8983. var key = keys[i];
  8984. if (true) {
  8985. if (methods && hasOwn(methods, key)) {
  8986. warn(
  8987. ("Method \"" + key + "\" has already been defined as a data property."),
  8988. vm
  8989. );
  8990. }
  8991. }
  8992. if (props && hasOwn(props, key)) {
  8993. true && warn(
  8994. "The data property \"" + key + "\" is already declared as a prop. " +
  8995. "Use prop default value instead.",
  8996. vm
  8997. );
  8998. } else if (!isReserved(key)) {
  8999. proxy(vm, "_data", key);
  9000. }
  9001. }
  9002. // observe data
  9003. observe(data, true /* asRootData */);
  9004. }
  9005. function getData (data, vm) {
  9006. // #7573 disable dep collection when invoking data getters
  9007. pushTarget();
  9008. try {
  9009. return data.call(vm, vm)
  9010. } catch (e) {
  9011. handleError(e, vm, "data()");
  9012. return {}
  9013. } finally {
  9014. popTarget();
  9015. }
  9016. }
  9017. var computedWatcherOptions = { lazy: true };
  9018. function initComputed (vm, computed) {
  9019. // $flow-disable-line
  9020. var watchers = vm._computedWatchers = Object.create(null);
  9021. // computed properties are just getters during SSR
  9022. var isSSR = isServerRendering();
  9023. for (var key in computed) {
  9024. var userDef = computed[key];
  9025. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  9026. if ( true && getter == null) {
  9027. warn(
  9028. ("Getter is missing for computed property \"" + key + "\"."),
  9029. vm
  9030. );
  9031. }
  9032. if (!isSSR) {
  9033. // create internal watcher for the computed property.
  9034. watchers[key] = new Watcher(
  9035. vm,
  9036. getter || noop,
  9037. noop,
  9038. computedWatcherOptions
  9039. );
  9040. }
  9041. // component-defined computed properties are already defined on the
  9042. // component prototype. We only need to define computed properties defined
  9043. // at instantiation here.
  9044. if (!(key in vm)) {
  9045. defineComputed(vm, key, userDef);
  9046. } else if (true) {
  9047. if (key in vm.$data) {
  9048. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  9049. } else if (vm.$options.props && key in vm.$options.props) {
  9050. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  9051. }
  9052. }
  9053. }
  9054. }
  9055. function defineComputed (
  9056. target,
  9057. key,
  9058. userDef
  9059. ) {
  9060. var shouldCache = !isServerRendering();
  9061. if (typeof userDef === 'function') {
  9062. sharedPropertyDefinition.get = shouldCache
  9063. ? createComputedGetter(key)
  9064. : createGetterInvoker(userDef);
  9065. sharedPropertyDefinition.set = noop;
  9066. } else {
  9067. sharedPropertyDefinition.get = userDef.get
  9068. ? shouldCache && userDef.cache !== false
  9069. ? createComputedGetter(key)
  9070. : createGetterInvoker(userDef.get)
  9071. : noop;
  9072. sharedPropertyDefinition.set = userDef.set || noop;
  9073. }
  9074. if ( true &&
  9075. sharedPropertyDefinition.set === noop) {
  9076. sharedPropertyDefinition.set = function () {
  9077. warn(
  9078. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  9079. this
  9080. );
  9081. };
  9082. }
  9083. Object.defineProperty(target, key, sharedPropertyDefinition);
  9084. }
  9085. function createComputedGetter (key) {
  9086. return function computedGetter () {
  9087. var watcher = this._computedWatchers && this._computedWatchers[key];
  9088. if (watcher) {
  9089. if (watcher.dirty) {
  9090. watcher.evaluate();
  9091. }
  9092. if (Dep.SharedObject.target) {// fixed by xxxxxx
  9093. watcher.depend();
  9094. }
  9095. return watcher.value
  9096. }
  9097. }
  9098. }
  9099. function createGetterInvoker(fn) {
  9100. return function computedGetter () {
  9101. return fn.call(this, this)
  9102. }
  9103. }
  9104. function initMethods (vm, methods) {
  9105. var props = vm.$options.props;
  9106. for (var key in methods) {
  9107. if (true) {
  9108. if (typeof methods[key] !== 'function') {
  9109. warn(
  9110. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  9111. "Did you reference the function correctly?",
  9112. vm
  9113. );
  9114. }
  9115. if (props && hasOwn(props, key)) {
  9116. warn(
  9117. ("Method \"" + key + "\" has already been defined as a prop."),
  9118. vm
  9119. );
  9120. }
  9121. if ((key in vm) && isReserved(key)) {
  9122. warn(
  9123. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  9124. "Avoid defining component methods that start with _ or $."
  9125. );
  9126. }
  9127. }
  9128. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  9129. }
  9130. }
  9131. function initWatch (vm, watch) {
  9132. for (var key in watch) {
  9133. var handler = watch[key];
  9134. if (Array.isArray(handler)) {
  9135. for (var i = 0; i < handler.length; i++) {
  9136. createWatcher(vm, key, handler[i]);
  9137. }
  9138. } else {
  9139. createWatcher(vm, key, handler);
  9140. }
  9141. }
  9142. }
  9143. function createWatcher (
  9144. vm,
  9145. expOrFn,
  9146. handler,
  9147. options
  9148. ) {
  9149. if (isPlainObject(handler)) {
  9150. options = handler;
  9151. handler = handler.handler;
  9152. }
  9153. if (typeof handler === 'string') {
  9154. handler = vm[handler];
  9155. }
  9156. return vm.$watch(expOrFn, handler, options)
  9157. }
  9158. function stateMixin (Vue) {
  9159. // flow somehow has problems with directly declared definition object
  9160. // when using Object.defineProperty, so we have to procedurally build up
  9161. // the object here.
  9162. var dataDef = {};
  9163. dataDef.get = function () { return this._data };
  9164. var propsDef = {};
  9165. propsDef.get = function () { return this._props };
  9166. if (true) {
  9167. dataDef.set = function () {
  9168. warn(
  9169. 'Avoid replacing instance root $data. ' +
  9170. 'Use nested data properties instead.',
  9171. this
  9172. );
  9173. };
  9174. propsDef.set = function () {
  9175. warn("$props is readonly.", this);
  9176. };
  9177. }
  9178. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9179. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9180. Vue.prototype.$set = set;
  9181. Vue.prototype.$delete = del;
  9182. Vue.prototype.$watch = function (
  9183. expOrFn,
  9184. cb,
  9185. options
  9186. ) {
  9187. var vm = this;
  9188. if (isPlainObject(cb)) {
  9189. return createWatcher(vm, expOrFn, cb, options)
  9190. }
  9191. options = options || {};
  9192. options.user = true;
  9193. var watcher = new Watcher(vm, expOrFn, cb, options);
  9194. if (options.immediate) {
  9195. try {
  9196. cb.call(vm, watcher.value);
  9197. } catch (error) {
  9198. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9199. }
  9200. }
  9201. return function unwatchFn () {
  9202. watcher.teardown();
  9203. }
  9204. };
  9205. }
  9206. /* */
  9207. var uid$3 = 0;
  9208. function initMixin (Vue) {
  9209. Vue.prototype._init = function (options) {
  9210. var vm = this;
  9211. // a uid
  9212. vm._uid = uid$3++;
  9213. var startTag, endTag;
  9214. /* istanbul ignore if */
  9215. if ( true && config.performance && mark) {
  9216. startTag = "vue-perf-start:" + (vm._uid);
  9217. endTag = "vue-perf-end:" + (vm._uid);
  9218. mark(startTag);
  9219. }
  9220. // a flag to avoid this being observed
  9221. vm._isVue = true;
  9222. // merge options
  9223. if (options && options._isComponent) {
  9224. // optimize internal component instantiation
  9225. // since dynamic options merging is pretty slow, and none of the
  9226. // internal component options needs special treatment.
  9227. initInternalComponent(vm, options);
  9228. } else {
  9229. vm.$options = mergeOptions(
  9230. resolveConstructorOptions(vm.constructor),
  9231. options || {},
  9232. vm
  9233. );
  9234. }
  9235. /* istanbul ignore else */
  9236. if (true) {
  9237. initProxy(vm);
  9238. } else {}
  9239. // expose real self
  9240. vm._self = vm;
  9241. initLifecycle(vm);
  9242. initEvents(vm);
  9243. initRender(vm);
  9244. callHook(vm, 'beforeCreate');
  9245. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9246. initState(vm);
  9247. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9248. !vm._$fallback && callHook(vm, 'created');
  9249. /* istanbul ignore if */
  9250. if ( true && config.performance && mark) {
  9251. vm._name = formatComponentName(vm, false);
  9252. mark(endTag);
  9253. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9254. }
  9255. if (vm.$options.el) {
  9256. vm.$mount(vm.$options.el);
  9257. }
  9258. };
  9259. }
  9260. function initInternalComponent (vm, options) {
  9261. var opts = vm.$options = Object.create(vm.constructor.options);
  9262. // doing this because it's faster than dynamic enumeration.
  9263. var parentVnode = options._parentVnode;
  9264. opts.parent = options.parent;
  9265. opts._parentVnode = parentVnode;
  9266. var vnodeComponentOptions = parentVnode.componentOptions;
  9267. opts.propsData = vnodeComponentOptions.propsData;
  9268. opts._parentListeners = vnodeComponentOptions.listeners;
  9269. opts._renderChildren = vnodeComponentOptions.children;
  9270. opts._componentTag = vnodeComponentOptions.tag;
  9271. if (options.render) {
  9272. opts.render = options.render;
  9273. opts.staticRenderFns = options.staticRenderFns;
  9274. }
  9275. }
  9276. function resolveConstructorOptions (Ctor) {
  9277. var options = Ctor.options;
  9278. if (Ctor.super) {
  9279. var superOptions = resolveConstructorOptions(Ctor.super);
  9280. var cachedSuperOptions = Ctor.superOptions;
  9281. if (superOptions !== cachedSuperOptions) {
  9282. // super option changed,
  9283. // need to resolve new options.
  9284. Ctor.superOptions = superOptions;
  9285. // check if there are any late-modified/attached options (#4976)
  9286. var modifiedOptions = resolveModifiedOptions(Ctor);
  9287. // update base extend options
  9288. if (modifiedOptions) {
  9289. extend(Ctor.extendOptions, modifiedOptions);
  9290. }
  9291. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9292. if (options.name) {
  9293. options.components[options.name] = Ctor;
  9294. }
  9295. }
  9296. }
  9297. return options
  9298. }
  9299. function resolveModifiedOptions (Ctor) {
  9300. var modified;
  9301. var latest = Ctor.options;
  9302. var sealed = Ctor.sealedOptions;
  9303. for (var key in latest) {
  9304. if (latest[key] !== sealed[key]) {
  9305. if (!modified) { modified = {}; }
  9306. modified[key] = latest[key];
  9307. }
  9308. }
  9309. return modified
  9310. }
  9311. function Vue (options) {
  9312. if ( true &&
  9313. !(this instanceof Vue)
  9314. ) {
  9315. warn('Vue is a constructor and should be called with the `new` keyword');
  9316. }
  9317. this._init(options);
  9318. }
  9319. initMixin(Vue);
  9320. stateMixin(Vue);
  9321. eventsMixin(Vue);
  9322. lifecycleMixin(Vue);
  9323. renderMixin(Vue);
  9324. /* */
  9325. function initUse (Vue) {
  9326. Vue.use = function (plugin) {
  9327. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9328. if (installedPlugins.indexOf(plugin) > -1) {
  9329. return this
  9330. }
  9331. // additional parameters
  9332. var args = toArray(arguments, 1);
  9333. args.unshift(this);
  9334. if (typeof plugin.install === 'function') {
  9335. plugin.install.apply(plugin, args);
  9336. } else if (typeof plugin === 'function') {
  9337. plugin.apply(null, args);
  9338. }
  9339. installedPlugins.push(plugin);
  9340. return this
  9341. };
  9342. }
  9343. /* */
  9344. function initMixin$1 (Vue) {
  9345. Vue.mixin = function (mixin) {
  9346. this.options = mergeOptions(this.options, mixin);
  9347. return this
  9348. };
  9349. }
  9350. /* */
  9351. function initExtend (Vue) {
  9352. /**
  9353. * Each instance constructor, including Vue, has a unique
  9354. * cid. This enables us to create wrapped "child
  9355. * constructors" for prototypal inheritance and cache them.
  9356. */
  9357. Vue.cid = 0;
  9358. var cid = 1;
  9359. /**
  9360. * Class inheritance
  9361. */
  9362. Vue.extend = function (extendOptions) {
  9363. extendOptions = extendOptions || {};
  9364. var Super = this;
  9365. var SuperId = Super.cid;
  9366. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9367. if (cachedCtors[SuperId]) {
  9368. return cachedCtors[SuperId]
  9369. }
  9370. var name = extendOptions.name || Super.options.name;
  9371. if ( true && name) {
  9372. validateComponentName(name);
  9373. }
  9374. var Sub = function VueComponent (options) {
  9375. this._init(options);
  9376. };
  9377. Sub.prototype = Object.create(Super.prototype);
  9378. Sub.prototype.constructor = Sub;
  9379. Sub.cid = cid++;
  9380. Sub.options = mergeOptions(
  9381. Super.options,
  9382. extendOptions
  9383. );
  9384. Sub['super'] = Super;
  9385. // For props and computed properties, we define the proxy getters on
  9386. // the Vue instances at extension time, on the extended prototype. This
  9387. // avoids Object.defineProperty calls for each instance created.
  9388. if (Sub.options.props) {
  9389. initProps$1(Sub);
  9390. }
  9391. if (Sub.options.computed) {
  9392. initComputed$1(Sub);
  9393. }
  9394. // allow further extension/mixin/plugin usage
  9395. Sub.extend = Super.extend;
  9396. Sub.mixin = Super.mixin;
  9397. Sub.use = Super.use;
  9398. // create asset registers, so extended classes
  9399. // can have their private assets too.
  9400. ASSET_TYPES.forEach(function (type) {
  9401. Sub[type] = Super[type];
  9402. });
  9403. // enable recursive self-lookup
  9404. if (name) {
  9405. Sub.options.components[name] = Sub;
  9406. }
  9407. // keep a reference to the super options at extension time.
  9408. // later at instantiation we can check if Super's options have
  9409. // been updated.
  9410. Sub.superOptions = Super.options;
  9411. Sub.extendOptions = extendOptions;
  9412. Sub.sealedOptions = extend({}, Sub.options);
  9413. // cache constructor
  9414. cachedCtors[SuperId] = Sub;
  9415. return Sub
  9416. };
  9417. }
  9418. function initProps$1 (Comp) {
  9419. var props = Comp.options.props;
  9420. for (var key in props) {
  9421. proxy(Comp.prototype, "_props", key);
  9422. }
  9423. }
  9424. function initComputed$1 (Comp) {
  9425. var computed = Comp.options.computed;
  9426. for (var key in computed) {
  9427. defineComputed(Comp.prototype, key, computed[key]);
  9428. }
  9429. }
  9430. /* */
  9431. function initAssetRegisters (Vue) {
  9432. /**
  9433. * Create asset registration methods.
  9434. */
  9435. ASSET_TYPES.forEach(function (type) {
  9436. Vue[type] = function (
  9437. id,
  9438. definition
  9439. ) {
  9440. if (!definition) {
  9441. return this.options[type + 's'][id]
  9442. } else {
  9443. /* istanbul ignore if */
  9444. if ( true && type === 'component') {
  9445. validateComponentName(id);
  9446. }
  9447. if (type === 'component' && isPlainObject(definition)) {
  9448. definition.name = definition.name || id;
  9449. definition = this.options._base.extend(definition);
  9450. }
  9451. if (type === 'directive' && typeof definition === 'function') {
  9452. definition = { bind: definition, update: definition };
  9453. }
  9454. this.options[type + 's'][id] = definition;
  9455. return definition
  9456. }
  9457. };
  9458. });
  9459. }
  9460. /* */
  9461. function getComponentName (opts) {
  9462. return opts && (opts.Ctor.options.name || opts.tag)
  9463. }
  9464. function matches (pattern, name) {
  9465. if (Array.isArray(pattern)) {
  9466. return pattern.indexOf(name) > -1
  9467. } else if (typeof pattern === 'string') {
  9468. return pattern.split(',').indexOf(name) > -1
  9469. } else if (isRegExp(pattern)) {
  9470. return pattern.test(name)
  9471. }
  9472. /* istanbul ignore next */
  9473. return false
  9474. }
  9475. function pruneCache (keepAliveInstance, filter) {
  9476. var cache = keepAliveInstance.cache;
  9477. var keys = keepAliveInstance.keys;
  9478. var _vnode = keepAliveInstance._vnode;
  9479. for (var key in cache) {
  9480. var cachedNode = cache[key];
  9481. if (cachedNode) {
  9482. var name = getComponentName(cachedNode.componentOptions);
  9483. if (name && !filter(name)) {
  9484. pruneCacheEntry(cache, key, keys, _vnode);
  9485. }
  9486. }
  9487. }
  9488. }
  9489. function pruneCacheEntry (
  9490. cache,
  9491. key,
  9492. keys,
  9493. current
  9494. ) {
  9495. var cached$$1 = cache[key];
  9496. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9497. cached$$1.componentInstance.$destroy();
  9498. }
  9499. cache[key] = null;
  9500. remove(keys, key);
  9501. }
  9502. var patternTypes = [String, RegExp, Array];
  9503. var KeepAlive = {
  9504. name: 'keep-alive',
  9505. abstract: true,
  9506. props: {
  9507. include: patternTypes,
  9508. exclude: patternTypes,
  9509. max: [String, Number]
  9510. },
  9511. created: function created () {
  9512. this.cache = Object.create(null);
  9513. this.keys = [];
  9514. },
  9515. destroyed: function destroyed () {
  9516. for (var key in this.cache) {
  9517. pruneCacheEntry(this.cache, key, this.keys);
  9518. }
  9519. },
  9520. mounted: function mounted () {
  9521. var this$1 = this;
  9522. this.$watch('include', function (val) {
  9523. pruneCache(this$1, function (name) { return matches(val, name); });
  9524. });
  9525. this.$watch('exclude', function (val) {
  9526. pruneCache(this$1, function (name) { return !matches(val, name); });
  9527. });
  9528. },
  9529. render: function render () {
  9530. var slot = this.$slots.default;
  9531. var vnode = getFirstComponentChild(slot);
  9532. var componentOptions = vnode && vnode.componentOptions;
  9533. if (componentOptions) {
  9534. // check pattern
  9535. var name = getComponentName(componentOptions);
  9536. var ref = this;
  9537. var include = ref.include;
  9538. var exclude = ref.exclude;
  9539. if (
  9540. // not included
  9541. (include && (!name || !matches(include, name))) ||
  9542. // excluded
  9543. (exclude && name && matches(exclude, name))
  9544. ) {
  9545. return vnode
  9546. }
  9547. var ref$1 = this;
  9548. var cache = ref$1.cache;
  9549. var keys = ref$1.keys;
  9550. var key = vnode.key == null
  9551. // same constructor may get registered as different local components
  9552. // so cid alone is not enough (#3269)
  9553. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9554. : vnode.key;
  9555. if (cache[key]) {
  9556. vnode.componentInstance = cache[key].componentInstance;
  9557. // make current key freshest
  9558. remove(keys, key);
  9559. keys.push(key);
  9560. } else {
  9561. cache[key] = vnode;
  9562. keys.push(key);
  9563. // prune oldest entry
  9564. if (this.max && keys.length > parseInt(this.max)) {
  9565. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9566. }
  9567. }
  9568. vnode.data.keepAlive = true;
  9569. }
  9570. return vnode || (slot && slot[0])
  9571. }
  9572. };
  9573. var builtInComponents = {
  9574. KeepAlive: KeepAlive
  9575. };
  9576. /* */
  9577. function initGlobalAPI (Vue) {
  9578. // config
  9579. var configDef = {};
  9580. configDef.get = function () { return config; };
  9581. if (true) {
  9582. configDef.set = function () {
  9583. warn(
  9584. 'Do not replace the Vue.config object, set individual fields instead.'
  9585. );
  9586. };
  9587. }
  9588. Object.defineProperty(Vue, 'config', configDef);
  9589. // exposed util methods.
  9590. // NOTE: these are not considered part of the public API - avoid relying on
  9591. // them unless you are aware of the risk.
  9592. Vue.util = {
  9593. warn: warn,
  9594. extend: extend,
  9595. mergeOptions: mergeOptions,
  9596. defineReactive: defineReactive$$1
  9597. };
  9598. Vue.set = set;
  9599. Vue.delete = del;
  9600. Vue.nextTick = nextTick;
  9601. // 2.6 explicit observable API
  9602. Vue.observable = function (obj) {
  9603. observe(obj);
  9604. return obj
  9605. };
  9606. Vue.options = Object.create(null);
  9607. ASSET_TYPES.forEach(function (type) {
  9608. Vue.options[type + 's'] = Object.create(null);
  9609. });
  9610. // this is used to identify the "base" constructor to extend all plain-object
  9611. // components with in Weex's multi-instance scenarios.
  9612. Vue.options._base = Vue;
  9613. extend(Vue.options.components, builtInComponents);
  9614. initUse(Vue);
  9615. initMixin$1(Vue);
  9616. initExtend(Vue);
  9617. initAssetRegisters(Vue);
  9618. }
  9619. initGlobalAPI(Vue);
  9620. Object.defineProperty(Vue.prototype, '$isServer', {
  9621. get: isServerRendering
  9622. });
  9623. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9624. get: function get () {
  9625. /* istanbul ignore next */
  9626. return this.$vnode && this.$vnode.ssrContext
  9627. }
  9628. });
  9629. // expose FunctionalRenderContext for ssr runtime helper installation
  9630. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9631. value: FunctionalRenderContext
  9632. });
  9633. Vue.version = '2.6.11';
  9634. /**
  9635. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9636. */
  9637. var ARRAYTYPE = '[object Array]';
  9638. var OBJECTTYPE = '[object Object]';
  9639. // const FUNCTIONTYPE = '[object Function]'
  9640. function diff(current, pre) {
  9641. var result = {};
  9642. syncKeys(current, pre);
  9643. _diff(current, pre, '', result);
  9644. return result
  9645. }
  9646. function syncKeys(current, pre) {
  9647. if (current === pre) { return }
  9648. var rootCurrentType = type(current);
  9649. var rootPreType = type(pre);
  9650. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9651. if(Object.keys(current).length >= Object.keys(pre).length){
  9652. for (var key in pre) {
  9653. var currentValue = current[key];
  9654. if (currentValue === undefined) {
  9655. current[key] = null;
  9656. } else {
  9657. syncKeys(currentValue, pre[key]);
  9658. }
  9659. }
  9660. }
  9661. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9662. if (current.length >= pre.length) {
  9663. pre.forEach(function (item, index) {
  9664. syncKeys(current[index], item);
  9665. });
  9666. }
  9667. }
  9668. }
  9669. function _diff(current, pre, path, result) {
  9670. if (current === pre) { return }
  9671. var rootCurrentType = type(current);
  9672. var rootPreType = type(pre);
  9673. if (rootCurrentType == OBJECTTYPE) {
  9674. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9675. setResult(result, path, current);
  9676. } else {
  9677. var loop = function ( key ) {
  9678. var currentValue = current[key];
  9679. var preValue = pre[key];
  9680. var currentType = type(currentValue);
  9681. var preType = type(preValue);
  9682. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9683. // NOTE 此处将 != 修改为 !==。涉及地方太多恐怕测试不到,如果出现数据对比问题,将其修改回来。
  9684. if (currentValue !== pre[key]) {
  9685. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9686. }
  9687. } else if (currentType == ARRAYTYPE) {
  9688. if (preType != ARRAYTYPE) {
  9689. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9690. } else {
  9691. if (currentValue.length < preValue.length) {
  9692. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9693. } else {
  9694. currentValue.forEach(function (item, index) {
  9695. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9696. });
  9697. }
  9698. }
  9699. } else if (currentType == OBJECTTYPE) {
  9700. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9701. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9702. } else {
  9703. for (var subKey in currentValue) {
  9704. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9705. }
  9706. }
  9707. }
  9708. };
  9709. for (var key in current) loop( key );
  9710. }
  9711. } else if (rootCurrentType == ARRAYTYPE) {
  9712. if (rootPreType != ARRAYTYPE) {
  9713. setResult(result, path, current);
  9714. } else {
  9715. if (current.length < pre.length) {
  9716. setResult(result, path, current);
  9717. } else {
  9718. current.forEach(function (item, index) {
  9719. _diff(item, pre[index], path + '[' + index + ']', result);
  9720. });
  9721. }
  9722. }
  9723. } else {
  9724. setResult(result, path, current);
  9725. }
  9726. }
  9727. function setResult(result, k, v) {
  9728. // if (type(v) != FUNCTIONTYPE) {
  9729. result[k] = v;
  9730. // }
  9731. }
  9732. function type(obj) {
  9733. return Object.prototype.toString.call(obj)
  9734. }
  9735. /* */
  9736. function flushCallbacks$1(vm) {
  9737. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9738. if (Object({"VUE_APP_NAME":"magazine-web","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9739. var mpInstance = vm.$scope;
  9740. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9741. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9742. }
  9743. var copies = vm.__next_tick_callbacks.slice(0);
  9744. vm.__next_tick_callbacks.length = 0;
  9745. for (var i = 0; i < copies.length; i++) {
  9746. copies[i]();
  9747. }
  9748. }
  9749. }
  9750. function hasRenderWatcher(vm) {
  9751. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9752. }
  9753. function nextTick$1(vm, cb) {
  9754. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9755. //2.nextTick 之前存在 render watcher
  9756. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9757. if(Object({"VUE_APP_NAME":"magazine-web","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9758. var mpInstance = vm.$scope;
  9759. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9760. ']:nextVueTick');
  9761. }
  9762. return nextTick(cb, vm)
  9763. }else{
  9764. if(Object({"VUE_APP_NAME":"magazine-web","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9765. var mpInstance$1 = vm.$scope;
  9766. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9767. ']:nextMPTick');
  9768. }
  9769. }
  9770. var _resolve;
  9771. if (!vm.__next_tick_callbacks) {
  9772. vm.__next_tick_callbacks = [];
  9773. }
  9774. vm.__next_tick_callbacks.push(function () {
  9775. if (cb) {
  9776. try {
  9777. cb.call(vm);
  9778. } catch (e) {
  9779. handleError(e, vm, 'nextTick');
  9780. }
  9781. } else if (_resolve) {
  9782. _resolve(vm);
  9783. }
  9784. });
  9785. // $flow-disable-line
  9786. if (!cb && typeof Promise !== 'undefined') {
  9787. return new Promise(function (resolve) {
  9788. _resolve = resolve;
  9789. })
  9790. }
  9791. }
  9792. /* */
  9793. function cloneWithData(vm) {
  9794. // 确保当前 vm 所有数据被同步
  9795. var ret = Object.create(null);
  9796. var dataKeys = [].concat(
  9797. Object.keys(vm._data || {}),
  9798. Object.keys(vm._computedWatchers || {}));
  9799. dataKeys.reduce(function(ret, key) {
  9800. ret[key] = vm[key];
  9801. return ret
  9802. }, ret);
  9803. // vue-composition-api
  9804. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9805. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9806. if (rawBindings) {
  9807. Object.keys(rawBindings).forEach(function (key) {
  9808. ret[key] = vm[key];
  9809. });
  9810. }
  9811. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9812. Object.assign(ret, vm.$mp.data || {});
  9813. if (
  9814. Array.isArray(vm.$options.behaviors) &&
  9815. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9816. ) { //form-field
  9817. ret['name'] = vm.name;
  9818. ret['value'] = vm.value;
  9819. }
  9820. return JSON.parse(JSON.stringify(ret))
  9821. }
  9822. var patch = function(oldVnode, vnode) {
  9823. var this$1 = this;
  9824. if (vnode === null) { //destroy
  9825. return
  9826. }
  9827. if (this.mpType === 'page' || this.mpType === 'component') {
  9828. var mpInstance = this.$scope;
  9829. var data = Object.create(null);
  9830. try {
  9831. data = cloneWithData(this);
  9832. } catch (err) {
  9833. console.error(err);
  9834. }
  9835. data.__webviewId__ = mpInstance.data.__webviewId__;
  9836. var mpData = Object.create(null);
  9837. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9838. mpData[key] = mpInstance.data[key];
  9839. });
  9840. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9841. if (Object.keys(diffData).length) {
  9842. if (Object({"VUE_APP_NAME":"magazine-web","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9843. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9844. ']差量更新',
  9845. JSON.stringify(diffData));
  9846. }
  9847. this.__next_tick_pending = true;
  9848. mpInstance.setData(diffData, function () {
  9849. this$1.__next_tick_pending = false;
  9850. flushCallbacks$1(this$1);
  9851. });
  9852. } else {
  9853. flushCallbacks$1(this);
  9854. }
  9855. }
  9856. };
  9857. /* */
  9858. function createEmptyRender() {
  9859. }
  9860. function mountComponent$1(
  9861. vm,
  9862. el,
  9863. hydrating
  9864. ) {
  9865. if (!vm.mpType) {//main.js 中的 new Vue
  9866. return vm
  9867. }
  9868. if (vm.mpType === 'app') {
  9869. vm.$options.render = createEmptyRender;
  9870. }
  9871. if (!vm.$options.render) {
  9872. vm.$options.render = createEmptyRender;
  9873. if (true) {
  9874. /* istanbul ignore if */
  9875. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9876. vm.$options.el || el) {
  9877. warn(
  9878. 'You are using the runtime-only build of Vue where the template ' +
  9879. 'compiler is not available. Either pre-compile the templates into ' +
  9880. 'render functions, or use the compiler-included build.',
  9881. vm
  9882. );
  9883. } else {
  9884. warn(
  9885. 'Failed to mount component: template or render function not defined.',
  9886. vm
  9887. );
  9888. }
  9889. }
  9890. }
  9891. !vm._$fallback && callHook(vm, 'beforeMount');
  9892. var updateComponent = function () {
  9893. vm._update(vm._render(), hydrating);
  9894. };
  9895. // we set this to vm._watcher inside the watcher's constructor
  9896. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9897. // component's mounted hook), which relies on vm._watcher being already defined
  9898. new Watcher(vm, updateComponent, noop, {
  9899. before: function before() {
  9900. if (vm._isMounted && !vm._isDestroyed) {
  9901. callHook(vm, 'beforeUpdate');
  9902. }
  9903. }
  9904. }, true /* isRenderWatcher */);
  9905. hydrating = false;
  9906. return vm
  9907. }
  9908. /* */
  9909. function renderClass (
  9910. staticClass,
  9911. dynamicClass
  9912. ) {
  9913. if (isDef(staticClass) || isDef(dynamicClass)) {
  9914. return concat(staticClass, stringifyClass(dynamicClass))
  9915. }
  9916. /* istanbul ignore next */
  9917. return ''
  9918. }
  9919. function concat (a, b) {
  9920. return a ? b ? (a + ' ' + b) : a : (b || '')
  9921. }
  9922. function stringifyClass (value) {
  9923. if (Array.isArray(value)) {
  9924. return stringifyArray(value)
  9925. }
  9926. if (isObject(value)) {
  9927. return stringifyObject(value)
  9928. }
  9929. if (typeof value === 'string') {
  9930. return value
  9931. }
  9932. /* istanbul ignore next */
  9933. return ''
  9934. }
  9935. function stringifyArray (value) {
  9936. var res = '';
  9937. var stringified;
  9938. for (var i = 0, l = value.length; i < l; i++) {
  9939. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9940. if (res) { res += ' '; }
  9941. res += stringified;
  9942. }
  9943. }
  9944. return res
  9945. }
  9946. function stringifyObject (value) {
  9947. var res = '';
  9948. for (var key in value) {
  9949. if (value[key]) {
  9950. if (res) { res += ' '; }
  9951. res += key;
  9952. }
  9953. }
  9954. return res
  9955. }
  9956. /* */
  9957. var parseStyleText = cached(function (cssText) {
  9958. var res = {};
  9959. var listDelimiter = /;(?![^(]*\))/g;
  9960. var propertyDelimiter = /:(.+)/;
  9961. cssText.split(listDelimiter).forEach(function (item) {
  9962. if (item) {
  9963. var tmp = item.split(propertyDelimiter);
  9964. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9965. }
  9966. });
  9967. return res
  9968. });
  9969. // normalize possible array / string values into Object
  9970. function normalizeStyleBinding (bindingStyle) {
  9971. if (Array.isArray(bindingStyle)) {
  9972. return toObject(bindingStyle)
  9973. }
  9974. if (typeof bindingStyle === 'string') {
  9975. return parseStyleText(bindingStyle)
  9976. }
  9977. return bindingStyle
  9978. }
  9979. /* */
  9980. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9981. function getTarget(obj, path) {
  9982. var parts = path.split('.');
  9983. var key = parts[0];
  9984. if (key.indexOf('__$n') === 0) { //number index
  9985. key = parseInt(key.replace('__$n', ''));
  9986. }
  9987. if (parts.length === 1) {
  9988. return obj[key]
  9989. }
  9990. return getTarget(obj[key], parts.slice(1).join('.'))
  9991. }
  9992. function internalMixin(Vue) {
  9993. Vue.config.errorHandler = function(err, vm, info) {
  9994. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9995. console.error(err);
  9996. /* eslint-disable no-undef */
  9997. var app = typeof getApp === 'function' && getApp();
  9998. if (app && app.onError) {
  9999. app.onError(err);
  10000. }
  10001. };
  10002. var oldEmit = Vue.prototype.$emit;
  10003. Vue.prototype.$emit = function(event) {
  10004. if (this.$scope && event) {
  10005. this.$scope['triggerEvent'](event, {
  10006. __args__: toArray(arguments, 1)
  10007. });
  10008. }
  10009. return oldEmit.apply(this, arguments)
  10010. };
  10011. Vue.prototype.$nextTick = function(fn) {
  10012. return nextTick$1(this, fn)
  10013. };
  10014. MP_METHODS.forEach(function (method) {
  10015. Vue.prototype[method] = function(args) {
  10016. if (this.$scope && this.$scope[method]) {
  10017. return this.$scope[method](args)
  10018. }
  10019. // mp-alipay
  10020. if (typeof my === 'undefined') {
  10021. return
  10022. }
  10023. if (method === 'createSelectorQuery') {
  10024. /* eslint-disable no-undef */
  10025. return my.createSelectorQuery(args)
  10026. } else if (method === 'createIntersectionObserver') {
  10027. /* eslint-disable no-undef */
  10028. return my.createIntersectionObserver(args)
  10029. }
  10030. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10031. };
  10032. });
  10033. Vue.prototype.__init_provide = initProvide;
  10034. Vue.prototype.__init_injections = initInjections;
  10035. Vue.prototype.__call_hook = function(hook, args) {
  10036. var vm = this;
  10037. // #7573 disable dep collection when invoking lifecycle hooks
  10038. pushTarget();
  10039. var handlers = vm.$options[hook];
  10040. var info = hook + " hook";
  10041. var ret;
  10042. if (handlers) {
  10043. for (var i = 0, j = handlers.length; i < j; i++) {
  10044. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  10045. }
  10046. }
  10047. if (vm._hasHookEvent) {
  10048. vm.$emit('hook:' + hook, args);
  10049. }
  10050. popTarget();
  10051. return ret
  10052. };
  10053. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  10054. if (Array.isArray(modifiers)) {
  10055. if (modifiers.indexOf('trim') !== -1) {
  10056. value = value.trim();
  10057. }
  10058. if (modifiers.indexOf('number') !== -1) {
  10059. value = this._n(value);
  10060. }
  10061. }
  10062. if (!target) {
  10063. target = this;
  10064. }
  10065. // 解决动态属性添加
  10066. Vue.set(target, key, value)
  10067. };
  10068. Vue.prototype.__set_sync = function(target, key, value) {
  10069. if (!target) {
  10070. target = this;
  10071. }
  10072. // 解决动态属性添加
  10073. Vue.set(target, key, value)
  10074. };
  10075. Vue.prototype.__get_orig = function(item) {
  10076. if (isPlainObject(item)) {
  10077. return item['$orig'] || item
  10078. }
  10079. return item
  10080. };
  10081. Vue.prototype.__get_value = function(dataPath, target) {
  10082. return getTarget(target || this, dataPath)
  10083. };
  10084. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  10085. return renderClass(staticClass, dynamicClass)
  10086. };
  10087. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  10088. if (!dynamicStyle && !staticStyle) {
  10089. return ''
  10090. }
  10091. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  10092. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  10093. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  10094. };
  10095. Vue.prototype.__map = function(val, iteratee) {
  10096. //TODO 暂不考虑 string
  10097. var ret, i, l, keys, key;
  10098. if (Array.isArray(val)) {
  10099. ret = new Array(val.length);
  10100. for (i = 0, l = val.length; i < l; i++) {
  10101. ret[i] = iteratee(val[i], i);
  10102. }
  10103. return ret
  10104. } else if (isObject(val)) {
  10105. keys = Object.keys(val);
  10106. ret = Object.create(null);
  10107. for (i = 0, l = keys.length; i < l; i++) {
  10108. key = keys[i];
  10109. ret[key] = iteratee(val[key], key, i);
  10110. }
  10111. return ret
  10112. } else if (typeof val === 'number') {
  10113. ret = new Array(val);
  10114. for (i = 0, l = val; i < l; i++) {
  10115. // 第一个参数暂时仍和小程序一致
  10116. ret[i] = iteratee(i, i);
  10117. }
  10118. return ret
  10119. }
  10120. return []
  10121. };
  10122. }
  10123. /* */
  10124. var LIFECYCLE_HOOKS$1 = [
  10125. //App
  10126. 'onLaunch',
  10127. 'onShow',
  10128. 'onHide',
  10129. 'onUniNViewMessage',
  10130. 'onPageNotFound',
  10131. 'onThemeChange',
  10132. 'onError',
  10133. 'onUnhandledRejection',
  10134. //Page
  10135. 'onInit',
  10136. 'onLoad',
  10137. // 'onShow',
  10138. 'onReady',
  10139. // 'onHide',
  10140. 'onUnload',
  10141. 'onPullDownRefresh',
  10142. 'onReachBottom',
  10143. 'onTabItemTap',
  10144. 'onAddToFavorites',
  10145. 'onShareTimeline',
  10146. 'onShareAppMessage',
  10147. 'onResize',
  10148. 'onPageScroll',
  10149. 'onNavigationBarButtonTap',
  10150. 'onBackPress',
  10151. 'onNavigationBarSearchInputChanged',
  10152. 'onNavigationBarSearchInputConfirmed',
  10153. 'onNavigationBarSearchInputClicked',
  10154. //Component
  10155. // 'onReady', // 兼容旧版本,应该移除该事件
  10156. 'onPageShow',
  10157. 'onPageHide',
  10158. 'onPageResize'
  10159. ];
  10160. function lifecycleMixin$1(Vue) {
  10161. //fixed vue-class-component
  10162. var oldExtend = Vue.extend;
  10163. Vue.extend = function(extendOptions) {
  10164. extendOptions = extendOptions || {};
  10165. var methods = extendOptions.methods;
  10166. if (methods) {
  10167. Object.keys(methods).forEach(function (methodName) {
  10168. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10169. extendOptions[methodName] = methods[methodName];
  10170. delete methods[methodName];
  10171. }
  10172. });
  10173. }
  10174. return oldExtend.call(this, extendOptions)
  10175. };
  10176. var strategies = Vue.config.optionMergeStrategies;
  10177. var mergeHook = strategies.created;
  10178. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10179. strategies[hook] = mergeHook;
  10180. });
  10181. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10182. }
  10183. /* */
  10184. // install platform patch function
  10185. Vue.prototype.__patch__ = patch;
  10186. // public mount method
  10187. Vue.prototype.$mount = function(
  10188. el ,
  10189. hydrating
  10190. ) {
  10191. return mountComponent$1(this, el, hydrating)
  10192. };
  10193. lifecycleMixin$1(Vue);
  10194. internalMixin(Vue);
  10195. /* */
  10196. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10197. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  10198. /***/ }),
  10199. /***/ 4:
  10200. /*!*************************************************************!*\
  10201. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  10202. \*************************************************************/
  10203. /*! no static exports found */
  10204. /***/ (function(module, exports, __webpack_require__) {
  10205. "use strict";
  10206. /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var isArray = Array.isArray;
  10207. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  10208. var defaultDelimiters = ['{', '}'];var
  10209. BaseFormatter = /*#__PURE__*/function () {
  10210. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  10211. this._caches = Object.create(null);
  10212. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  10213. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  10214. if (!values) {
  10215. return [message];
  10216. }
  10217. var tokens = this._caches[message];
  10218. if (!tokens) {
  10219. tokens = parse(message, delimiters);
  10220. this._caches[message] = tokens;
  10221. }
  10222. return compile(tokens, values);
  10223. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  10224. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  10225. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  10226. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  10227. var tokens = [];
  10228. var position = 0;
  10229. var text = '';
  10230. while (position < format.length) {
  10231. var char = format[position++];
  10232. if (char === startDelimiter) {
  10233. if (text) {
  10234. tokens.push({ type: 'text', value: text });
  10235. }
  10236. text = '';
  10237. var sub = '';
  10238. char = format[position++];
  10239. while (char !== undefined && char !== endDelimiter) {
  10240. sub += char;
  10241. char = format[position++];
  10242. }
  10243. var isClosed = char === endDelimiter;
  10244. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  10245. 'list' :
  10246. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  10247. 'named' :
  10248. 'unknown';
  10249. tokens.push({ value: sub, type: type });
  10250. }
  10251. // else if (char === '%') {
  10252. // // when found rails i18n syntax, skip text capture
  10253. // if (format[position] !== '{') {
  10254. // text += char
  10255. // }
  10256. // }
  10257. else {
  10258. text += char;
  10259. }
  10260. }
  10261. text && tokens.push({ type: 'text', value: text });
  10262. return tokens;
  10263. }
  10264. function compile(tokens, values) {
  10265. var compiled = [];
  10266. var index = 0;
  10267. var mode = isArray(values) ?
  10268. 'list' :
  10269. isObject(values) ?
  10270. 'named' :
  10271. 'unknown';
  10272. if (mode === 'unknown') {
  10273. return compiled;
  10274. }
  10275. while (index < tokens.length) {
  10276. var token = tokens[index];
  10277. switch (token.type) {
  10278. case 'text':
  10279. compiled.push(token.value);
  10280. break;
  10281. case 'list':
  10282. compiled.push(values[parseInt(token.value, 10)]);
  10283. break;
  10284. case 'named':
  10285. if (mode === 'named') {
  10286. compiled.push(values[token.value]);
  10287. } else
  10288. {
  10289. if (true) {
  10290. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  10291. }
  10292. }
  10293. break;
  10294. case 'unknown':
  10295. if (true) {
  10296. console.warn("Detect 'unknown' type of token!");
  10297. }
  10298. break;}
  10299. index++;
  10300. }
  10301. return compiled;
  10302. }
  10303. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  10304. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  10305. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  10306. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  10307. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  10308. var hasOwnProperty = Object.prototype.hasOwnProperty;
  10309. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  10310. var defaultFormatter = new BaseFormatter();
  10311. function include(str, parts) {
  10312. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  10313. }
  10314. function startsWith(str, parts) {
  10315. return parts.find(function (part) {return str.indexOf(part) === 0;});
  10316. }
  10317. function normalizeLocale(locale, messages) {
  10318. if (!locale) {
  10319. return;
  10320. }
  10321. locale = locale.trim().replace(/_/g, '-');
  10322. if (messages && messages[locale]) {
  10323. return locale;
  10324. }
  10325. locale = locale.toLowerCase();
  10326. if (locale.indexOf('zh') === 0) {
  10327. if (locale.indexOf('-hans') > -1) {
  10328. return LOCALE_ZH_HANS;
  10329. }
  10330. if (locale.indexOf('-hant') > -1) {
  10331. return LOCALE_ZH_HANT;
  10332. }
  10333. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  10334. return LOCALE_ZH_HANT;
  10335. }
  10336. return LOCALE_ZH_HANS;
  10337. }
  10338. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  10339. if (lang) {
  10340. return lang;
  10341. }
  10342. }var
  10343. I18n = /*#__PURE__*/function () {
  10344. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  10345. this.locale = LOCALE_EN;
  10346. this.fallbackLocale = LOCALE_EN;
  10347. this.message = {};
  10348. this.messages = {};
  10349. this.watchers = [];
  10350. if (fallbackLocale) {
  10351. this.fallbackLocale = fallbackLocale;
  10352. }
  10353. this.formater = formater || defaultFormatter;
  10354. this.messages = messages || {};
  10355. this.setLocale(locale || LOCALE_EN);
  10356. if (watcher) {
  10357. this.watchLocale(watcher);
  10358. }
  10359. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  10360. locale) {var _this = this;
  10361. var oldLocale = this.locale;
  10362. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  10363. if (!this.messages[this.locale]) {
  10364. // 可能初始化时不存在
  10365. this.messages[this.locale] = {};
  10366. }
  10367. this.message = this.messages[this.locale];
  10368. // 仅发生变化时,通知
  10369. if (oldLocale !== this.locale) {
  10370. this.watchers.forEach(function (watcher) {
  10371. watcher(_this.locale, oldLocale);
  10372. });
  10373. }
  10374. } }, { key: "getLocale", value: function getLocale()
  10375. {
  10376. return this.locale;
  10377. } }, { key: "watchLocale", value: function watchLocale(
  10378. fn) {var _this2 = this;
  10379. var index = this.watchers.push(fn) - 1;
  10380. return function () {
  10381. _this2.watchers.splice(index, 1);
  10382. };
  10383. } }, { key: "add", value: function add(
  10384. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10385. var curMessages = this.messages[locale];
  10386. if (curMessages) {
  10387. if (override) {
  10388. Object.assign(curMessages, message);
  10389. } else
  10390. {
  10391. Object.keys(message).forEach(function (key) {
  10392. if (!hasOwn(curMessages, key)) {
  10393. curMessages[key] = message[key];
  10394. }
  10395. });
  10396. }
  10397. } else
  10398. {
  10399. this.messages[locale] = message;
  10400. }
  10401. } }, { key: "f", value: function f(
  10402. message, values, delimiters) {
  10403. return this.formater.interpolate(message, values, delimiters).join('');
  10404. } }, { key: "t", value: function t(
  10405. key, locale, values) {
  10406. var message = this.message;
  10407. if (typeof locale === 'string') {
  10408. locale = normalizeLocale(locale, this.messages);
  10409. locale && (message = this.messages[locale]);
  10410. } else
  10411. {
  10412. values = locale;
  10413. }
  10414. if (!hasOwn(message, key)) {
  10415. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  10416. return key;
  10417. }
  10418. return this.formater.interpolate(message[key], values).join('');
  10419. } }]);return I18n;}();exports.I18n = I18n;
  10420. function watchAppLocale(appVm, i18n) {
  10421. // 需要保证 watch 的触发在组件渲染之前
  10422. if (appVm.$watchLocale) {
  10423. // vue2
  10424. appVm.$watchLocale(function (newLocale) {
  10425. i18n.setLocale(newLocale);
  10426. });
  10427. } else
  10428. {
  10429. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  10430. i18n.setLocale(newLocale);
  10431. });
  10432. }
  10433. }
  10434. function getDefaultLocale() {
  10435. if (typeof uni !== 'undefined' && uni.getLocale) {
  10436. return uni.getLocale();
  10437. }
  10438. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  10439. if (typeof global !== 'undefined' && global.getLocale) {
  10440. return global.getLocale();
  10441. }
  10442. return LOCALE_EN;
  10443. }
  10444. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  10445. // 兼容旧版本入参
  10446. if (typeof locale !== 'string') {var _ref4 =
  10447. [
  10448. messages,
  10449. locale];locale = _ref4[0];messages = _ref4[1];
  10450. }
  10451. if (typeof locale !== 'string') {
  10452. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  10453. locale = getDefaultLocale();
  10454. }
  10455. if (typeof fallbackLocale !== 'string') {
  10456. fallbackLocale =
  10457. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  10458. LOCALE_EN;
  10459. }
  10460. var i18n = new I18n({
  10461. locale: locale,
  10462. fallbackLocale: fallbackLocale,
  10463. messages: messages,
  10464. watcher: watcher });
  10465. var _t = function t(key, values) {
  10466. if (typeof getApp !== 'function') {
  10467. // app view
  10468. /* eslint-disable no-func-assign */
  10469. _t = function t(key, values) {
  10470. return i18n.t(key, values);
  10471. };
  10472. } else
  10473. {
  10474. var isWatchedAppLocale = false;
  10475. _t = function t(key, values) {
  10476. var appVm = getApp().$vm;
  10477. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  10478. // options: {
  10479. // type: Array,
  10480. // default () {
  10481. // return [{
  10482. // icon: 'shop',
  10483. // text: t("uni-goods-nav.options.shop"),
  10484. // }, {
  10485. // icon: 'cart',
  10486. // text: t("uni-goods-nav.options.cart")
  10487. // }]
  10488. // }
  10489. // },
  10490. if (appVm) {
  10491. // 触发响应式
  10492. appVm.$locale;
  10493. if (!isWatchedAppLocale) {
  10494. isWatchedAppLocale = true;
  10495. watchAppLocale(appVm, i18n);
  10496. }
  10497. }
  10498. return i18n.t(key, values);
  10499. };
  10500. }
  10501. return _t(key, values);
  10502. };
  10503. return {
  10504. i18n: i18n,
  10505. f: function f(message, values, delimiters) {
  10506. return i18n.f(message, values, delimiters);
  10507. },
  10508. t: function t(key, values) {
  10509. return _t(key, values);
  10510. },
  10511. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10512. return i18n.add(locale, message, override);
  10513. },
  10514. watch: function watch(fn) {
  10515. return i18n.watchLocale(fn);
  10516. },
  10517. getLocale: function getLocale() {
  10518. return i18n.getLocale();
  10519. },
  10520. setLocale: function setLocale(newLocale) {
  10521. return i18n.setLocale(newLocale);
  10522. } };
  10523. }
  10524. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  10525. var formater;
  10526. function hasI18nJson(jsonObj, delimiters) {
  10527. if (!formater) {
  10528. formater = new BaseFormatter();
  10529. }
  10530. return walkJsonObj(jsonObj, function (jsonObj, key) {
  10531. var value = jsonObj[key];
  10532. if (isString(value)) {
  10533. if (isI18nStr(value, delimiters)) {
  10534. return true;
  10535. }
  10536. } else
  10537. {
  10538. return hasI18nJson(value, delimiters);
  10539. }
  10540. });
  10541. }
  10542. function parseI18nJson(jsonObj, values, delimiters) {
  10543. if (!formater) {
  10544. formater = new BaseFormatter();
  10545. }
  10546. walkJsonObj(jsonObj, function (jsonObj, key) {
  10547. var value = jsonObj[key];
  10548. if (isString(value)) {
  10549. if (isI18nStr(value, delimiters)) {
  10550. jsonObj[key] = compileStr(value, values, delimiters);
  10551. }
  10552. } else
  10553. {
  10554. parseI18nJson(value, values, delimiters);
  10555. }
  10556. });
  10557. return jsonObj;
  10558. }
  10559. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  10560. if (!isI18nStr(jsonStr, delimiters)) {
  10561. return jsonStr;
  10562. }
  10563. if (!formater) {
  10564. formater = new BaseFormatter();
  10565. }
  10566. var localeValues = [];
  10567. Object.keys(locales).forEach(function (name) {
  10568. if (name !== locale) {
  10569. localeValues.push({
  10570. locale: name,
  10571. values: locales[name] });
  10572. }
  10573. });
  10574. localeValues.unshift({ locale: locale, values: locales[locale] });
  10575. try {
  10576. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  10577. }
  10578. catch (e) {}
  10579. return jsonStr;
  10580. }
  10581. function isI18nStr(value, delimiters) {
  10582. return value.indexOf(delimiters[0]) > -1;
  10583. }
  10584. function compileStr(value, values, delimiters) {
  10585. return formater.interpolate(value, values, delimiters).join('');
  10586. }
  10587. function compileValue(jsonObj, key, localeValues, delimiters) {
  10588. var value = jsonObj[key];
  10589. if (isString(value)) {
  10590. // 存在国际化
  10591. if (isI18nStr(value, delimiters)) {
  10592. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  10593. if (localeValues.length > 1) {
  10594. // 格式化国际化语言
  10595. var valueLocales = jsonObj[key + 'Locales'] = {};
  10596. localeValues.forEach(function (localValue) {
  10597. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  10598. });
  10599. }
  10600. }
  10601. } else
  10602. {
  10603. compileJsonObj(value, localeValues, delimiters);
  10604. }
  10605. }
  10606. function compileJsonObj(jsonObj, localeValues, delimiters) {
  10607. walkJsonObj(jsonObj, function (jsonObj, key) {
  10608. compileValue(jsonObj, key, localeValues, delimiters);
  10609. });
  10610. return jsonObj;
  10611. }
  10612. function walkJsonObj(jsonObj, walk) {
  10613. if (isArray(jsonObj)) {
  10614. for (var i = 0; i < jsonObj.length; i++) {
  10615. if (walk(jsonObj, i)) {
  10616. return true;
  10617. }
  10618. }
  10619. } else
  10620. if (isObject(jsonObj)) {
  10621. for (var key in jsonObj) {
  10622. if (walk(jsonObj, key)) {
  10623. return true;
  10624. }
  10625. }
  10626. }
  10627. return false;
  10628. }
  10629. function resolveLocale(locales) {
  10630. return function (locale) {
  10631. if (!locale) {
  10632. return locale;
  10633. }
  10634. locale = normalizeLocale(locale) || locale;
  10635. return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
  10636. };
  10637. }
  10638. function resolveLocaleChain(locale) {
  10639. var chain = [];
  10640. var tokens = locale.split('-');
  10641. while (tokens.length) {
  10642. chain.push(tokens.join('-'));
  10643. tokens.pop();
  10644. }
  10645. return chain;
  10646. }
  10647. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  10648. /***/ }),
  10649. /***/ 5:
  10650. /*!******************************************************************!*\
  10651. !*** C:/Users/10428/Desktop/框架源码/微前端/代码/magazine-web/pages.json ***!
  10652. \******************************************************************/
  10653. /*! no static exports found */
  10654. /***/ (function(module, exports) {
  10655. /***/ })
  10656. }]);
  10657. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map