vendor.js 293 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 142:
  125. /*!****************************************************************************!*\
  126. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/static/jys/jys.png ***!
  127. \****************************************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports) {
  130. module.exports = "/static/jys/jys.png";
  131. /***/ }),
  132. /***/ 15:
  133. /*!**********************************************************!*\
  134. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  135. \**********************************************************/
  136. /*! no static exports found */
  137. /***/ (function(module, exports, __webpack_require__) {
  138. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  139. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  140. function _construct(Parent, args, Class) {
  141. if (isNativeReflectConstruct()) {
  142. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  143. } else {
  144. module.exports = _construct = function _construct(Parent, args, Class) {
  145. var a = [null];
  146. a.push.apply(a, args);
  147. var Constructor = Function.bind.apply(Parent, a);
  148. var instance = new Constructor();
  149. if (Class) setPrototypeOf(instance, Class.prototype);
  150. return instance;
  151. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  152. }
  153. return _construct.apply(null, arguments);
  154. }
  155. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  156. /***/ }),
  157. /***/ 16:
  158. /*!***************************************************************!*\
  159. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  160. \***************************************************************/
  161. /*! no static exports found */
  162. /***/ (function(module, exports) {
  163. function _setPrototypeOf(o, p) {
  164. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  165. o.__proto__ = p;
  166. return o;
  167. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  168. return _setPrototypeOf(o, p);
  169. }
  170. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  171. /***/ }),
  172. /***/ 17:
  173. /*!*************************************************************************!*\
  174. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  175. \*************************************************************************/
  176. /*! no static exports found */
  177. /***/ (function(module, exports) {
  178. function _isNativeReflectConstruct() {
  179. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  180. if (Reflect.construct.sham) return false;
  181. if (typeof Proxy === "function") return true;
  182. try {
  183. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  184. return true;
  185. } catch (e) {
  186. return false;
  187. }
  188. }
  189. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  190. /***/ }),
  191. /***/ 18:
  192. /*!******************************************************************!*\
  193. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  194. \******************************************************************/
  195. /*! no static exports found */
  196. /***/ (function(module, exports, __webpack_require__) {
  197. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  198. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  199. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  200. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  201. function _toConsumableArray(arr) {
  202. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  203. }
  204. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  205. /***/ }),
  206. /***/ 19:
  207. /*!******************************************************************!*\
  208. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  209. \******************************************************************/
  210. /*! no static exports found */
  211. /***/ (function(module, exports, __webpack_require__) {
  212. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  213. function _arrayWithoutHoles(arr) {
  214. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  215. }
  216. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  217. /***/ }),
  218. /***/ 2:
  219. /*!************************************************************!*\
  220. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  221. \************************************************************/
  222. /*! no static exports found */
  223. /***/ (function(module, exports, __webpack_require__) {
  224. "use strict";
  225. /* WEBPACK VAR INJECTION */(function(wx, global) {
  226. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  227. Object.defineProperty(exports, "__esModule", {
  228. value: true
  229. });
  230. exports.createApp = createApp;
  231. exports.createComponent = createComponent;
  232. exports.createPage = createPage;
  233. exports.createPlugin = createPlugin;
  234. exports.createSubpackageApp = createSubpackageApp;
  235. exports.default = void 0;
  236. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  237. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  238. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  239. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  240. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  241. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  242. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  243. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  244. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  245. var realAtob;
  246. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  247. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  248. if (typeof atob !== 'function') {
  249. realAtob = function realAtob(str) {
  250. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  251. if (!b64re.test(str)) {
  252. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  253. }
  254. // Adding the padding if missing, for semplicity
  255. str += '=='.slice(2 - (str.length & 3));
  256. var bitmap;
  257. var result = '';
  258. var r1;
  259. var r2;
  260. var i = 0;
  261. for (; i < str.length;) {
  262. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  263. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  264. }
  265. return result;
  266. };
  267. } else {
  268. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  269. realAtob = atob;
  270. }
  271. function b64DecodeUnicode(str) {
  272. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  273. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  274. }).join(''));
  275. }
  276. function getCurrentUserInfo() {
  277. var token = wx.getStorageSync('uni_id_token') || '';
  278. var tokenArr = token.split('.');
  279. if (!token || tokenArr.length !== 3) {
  280. return {
  281. uid: null,
  282. role: [],
  283. permission: [],
  284. tokenExpired: 0
  285. };
  286. }
  287. var userInfo;
  288. try {
  289. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  290. } catch (error) {
  291. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  292. }
  293. userInfo.tokenExpired = userInfo.exp * 1000;
  294. delete userInfo.exp;
  295. delete userInfo.iat;
  296. return userInfo;
  297. }
  298. function uniIdMixin(Vue) {
  299. Vue.prototype.uniIDHasRole = function (roleId) {
  300. var _getCurrentUserInfo = getCurrentUserInfo(),
  301. role = _getCurrentUserInfo.role;
  302. return role.indexOf(roleId) > -1;
  303. };
  304. Vue.prototype.uniIDHasPermission = function (permissionId) {
  305. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  306. permission = _getCurrentUserInfo2.permission;
  307. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  308. };
  309. Vue.prototype.uniIDTokenValid = function () {
  310. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  311. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  312. return tokenExpired > Date.now();
  313. };
  314. }
  315. var _toString = Object.prototype.toString;
  316. var hasOwnProperty = Object.prototype.hasOwnProperty;
  317. function isFn(fn) {
  318. return typeof fn === 'function';
  319. }
  320. function isStr(str) {
  321. return typeof str === 'string';
  322. }
  323. function isObject(obj) {
  324. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  325. }
  326. function isPlainObject(obj) {
  327. return _toString.call(obj) === '[object Object]';
  328. }
  329. function hasOwn(obj, key) {
  330. return hasOwnProperty.call(obj, key);
  331. }
  332. function noop() {}
  333. /**
  334. * Create a cached version of a pure function.
  335. */
  336. function cached(fn) {
  337. var cache = Object.create(null);
  338. return function cachedFn(str) {
  339. var hit = cache[str];
  340. return hit || (cache[str] = fn(str));
  341. };
  342. }
  343. /**
  344. * Camelize a hyphen-delimited string.
  345. */
  346. var camelizeRE = /-(\w)/g;
  347. var camelize = cached(function (str) {
  348. return str.replace(camelizeRE, function (_, c) {
  349. return c ? c.toUpperCase() : '';
  350. });
  351. });
  352. function sortObject(obj) {
  353. var sortObj = {};
  354. if (isPlainObject(obj)) {
  355. Object.keys(obj).sort().forEach(function (key) {
  356. sortObj[key] = obj[key];
  357. });
  358. }
  359. return !Object.keys(sortObj) ? obj : sortObj;
  360. }
  361. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  362. var globalInterceptors = {};
  363. var scopedInterceptors = {};
  364. function mergeHook(parentVal, childVal) {
  365. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  366. return res ? dedupeHooks(res) : res;
  367. }
  368. function dedupeHooks(hooks) {
  369. var res = [];
  370. for (var i = 0; i < hooks.length; i++) {
  371. if (res.indexOf(hooks[i]) === -1) {
  372. res.push(hooks[i]);
  373. }
  374. }
  375. return res;
  376. }
  377. function removeHook(hooks, hook) {
  378. var index = hooks.indexOf(hook);
  379. if (index !== -1) {
  380. hooks.splice(index, 1);
  381. }
  382. }
  383. function mergeInterceptorHook(interceptor, option) {
  384. Object.keys(option).forEach(function (hook) {
  385. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  386. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  387. }
  388. });
  389. }
  390. function removeInterceptorHook(interceptor, option) {
  391. if (!interceptor || !option) {
  392. return;
  393. }
  394. Object.keys(option).forEach(function (hook) {
  395. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  396. removeHook(interceptor[hook], option[hook]);
  397. }
  398. });
  399. }
  400. function addInterceptor(method, option) {
  401. if (typeof method === 'string' && isPlainObject(option)) {
  402. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  403. } else if (isPlainObject(method)) {
  404. mergeInterceptorHook(globalInterceptors, method);
  405. }
  406. }
  407. function removeInterceptor(method, option) {
  408. if (typeof method === 'string') {
  409. if (isPlainObject(option)) {
  410. removeInterceptorHook(scopedInterceptors[method], option);
  411. } else {
  412. delete scopedInterceptors[method];
  413. }
  414. } else if (isPlainObject(method)) {
  415. removeInterceptorHook(globalInterceptors, method);
  416. }
  417. }
  418. function wrapperHook(hook, params) {
  419. return function (data) {
  420. return hook(data, params) || data;
  421. };
  422. }
  423. function isPromise(obj) {
  424. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  425. }
  426. function queue(hooks, data, params) {
  427. var promise = false;
  428. for (var i = 0; i < hooks.length; i++) {
  429. var hook = hooks[i];
  430. if (promise) {
  431. promise = Promise.resolve(wrapperHook(hook, params));
  432. } else {
  433. var res = hook(data, params);
  434. if (isPromise(res)) {
  435. promise = Promise.resolve(res);
  436. }
  437. if (res === false) {
  438. return {
  439. then: function then() {}
  440. };
  441. }
  442. }
  443. }
  444. return promise || {
  445. then: function then(callback) {
  446. return callback(data);
  447. }
  448. };
  449. }
  450. function wrapperOptions(interceptor) {
  451. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  452. ['success', 'fail', 'complete'].forEach(function (name) {
  453. if (Array.isArray(interceptor[name])) {
  454. var oldCallback = options[name];
  455. options[name] = function callbackInterceptor(res) {
  456. queue(interceptor[name], res, options).then(function (res) {
  457. /* eslint-disable no-mixed-operators */
  458. return isFn(oldCallback) && oldCallback(res) || res;
  459. });
  460. };
  461. }
  462. });
  463. return options;
  464. }
  465. function wrapperReturnValue(method, returnValue) {
  466. var returnValueHooks = [];
  467. if (Array.isArray(globalInterceptors.returnValue)) {
  468. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  469. }
  470. var interceptor = scopedInterceptors[method];
  471. if (interceptor && Array.isArray(interceptor.returnValue)) {
  472. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  473. }
  474. returnValueHooks.forEach(function (hook) {
  475. returnValue = hook(returnValue) || returnValue;
  476. });
  477. return returnValue;
  478. }
  479. function getApiInterceptorHooks(method) {
  480. var interceptor = Object.create(null);
  481. Object.keys(globalInterceptors).forEach(function (hook) {
  482. if (hook !== 'returnValue') {
  483. interceptor[hook] = globalInterceptors[hook].slice();
  484. }
  485. });
  486. var scopedInterceptor = scopedInterceptors[method];
  487. if (scopedInterceptor) {
  488. Object.keys(scopedInterceptor).forEach(function (hook) {
  489. if (hook !== 'returnValue') {
  490. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  491. }
  492. });
  493. }
  494. return interceptor;
  495. }
  496. function invokeApi(method, api, options) {
  497. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  498. params[_key - 3] = arguments[_key];
  499. }
  500. var interceptor = getApiInterceptorHooks(method);
  501. if (interceptor && Object.keys(interceptor).length) {
  502. if (Array.isArray(interceptor.invoke)) {
  503. var res = queue(interceptor.invoke, options);
  504. return res.then(function (options) {
  505. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  506. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  507. });
  508. } else {
  509. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  510. }
  511. }
  512. return api.apply(void 0, [options].concat(params));
  513. }
  514. var promiseInterceptor = {
  515. returnValue: function returnValue(res) {
  516. if (!isPromise(res)) {
  517. return res;
  518. }
  519. return new Promise(function (resolve, reject) {
  520. res.then(function (res) {
  521. if (res[0]) {
  522. reject(res[0]);
  523. } else {
  524. resolve(res[1]);
  525. }
  526. });
  527. });
  528. }
  529. };
  530. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  531. var CONTEXT_API_RE = /^create|Manager$/;
  532. // Context例外情况
  533. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  534. // 同步例外情况
  535. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  536. var CALLBACK_API_RE = /^on|^off/;
  537. function isContextApi(name) {
  538. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  539. }
  540. function isSyncApi(name) {
  541. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  542. }
  543. function isCallbackApi(name) {
  544. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  545. }
  546. function handlePromise(promise) {
  547. return promise.then(function (data) {
  548. return [null, data];
  549. }).catch(function (err) {
  550. return [err];
  551. });
  552. }
  553. function shouldPromise(name) {
  554. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  555. return false;
  556. }
  557. return true;
  558. }
  559. /* eslint-disable no-extend-native */
  560. if (!Promise.prototype.finally) {
  561. Promise.prototype.finally = function (callback) {
  562. var promise = this.constructor;
  563. return this.then(function (value) {
  564. return promise.resolve(callback()).then(function () {
  565. return value;
  566. });
  567. }, function (reason) {
  568. return promise.resolve(callback()).then(function () {
  569. throw reason;
  570. });
  571. });
  572. };
  573. }
  574. function promisify(name, api) {
  575. if (!shouldPromise(name) || !isFn(api)) {
  576. return api;
  577. }
  578. return function promiseApi() {
  579. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  580. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  581. params[_key2 - 1] = arguments[_key2];
  582. }
  583. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  584. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  585. }
  586. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  587. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  588. success: resolve,
  589. fail: reject
  590. })].concat(params));
  591. })));
  592. };
  593. }
  594. var EPS = 1e-4;
  595. var BASE_DEVICE_WIDTH = 750;
  596. var isIOS = false;
  597. var deviceWidth = 0;
  598. var deviceDPR = 0;
  599. function checkDeviceWidth() {
  600. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  601. platform = _wx$getSystemInfoSync.platform,
  602. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  603. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  604. deviceWidth = windowWidth;
  605. deviceDPR = pixelRatio;
  606. isIOS = platform === 'ios';
  607. }
  608. function upx2px(number, newDeviceWidth) {
  609. if (deviceWidth === 0) {
  610. checkDeviceWidth();
  611. }
  612. number = Number(number);
  613. if (number === 0) {
  614. return 0;
  615. }
  616. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  617. if (result < 0) {
  618. result = -result;
  619. }
  620. result = Math.floor(result + EPS);
  621. if (result === 0) {
  622. if (deviceDPR === 1 || !isIOS) {
  623. result = 1;
  624. } else {
  625. result = 0.5;
  626. }
  627. }
  628. return number < 0 ? -result : result;
  629. }
  630. var LOCALE_ZH_HANS = 'zh-Hans';
  631. var LOCALE_ZH_HANT = 'zh-Hant';
  632. var LOCALE_EN = 'en';
  633. var LOCALE_FR = 'fr';
  634. var LOCALE_ES = 'es';
  635. var messages = {};
  636. var locale;
  637. {
  638. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  639. }
  640. function initI18nMessages() {
  641. if (!isEnableLocale()) {
  642. return;
  643. }
  644. var localeKeys = Object.keys(__uniConfig.locales);
  645. if (localeKeys.length) {
  646. localeKeys.forEach(function (locale) {
  647. var curMessages = messages[locale];
  648. var userMessages = __uniConfig.locales[locale];
  649. if (curMessages) {
  650. Object.assign(curMessages, userMessages);
  651. } else {
  652. messages[locale] = userMessages;
  653. }
  654. });
  655. }
  656. }
  657. initI18nMessages();
  658. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  659. var t = i18n.t;
  660. var i18nMixin = i18n.mixin = {
  661. beforeCreate: function beforeCreate() {
  662. var _this = this;
  663. var unwatch = i18n.i18n.watchLocale(function () {
  664. _this.$forceUpdate();
  665. });
  666. this.$once('hook:beforeDestroy', function () {
  667. unwatch();
  668. });
  669. },
  670. methods: {
  671. $$t: function $$t(key, values) {
  672. return t(key, values);
  673. }
  674. }
  675. };
  676. var setLocale = i18n.setLocale;
  677. var getLocale = i18n.getLocale;
  678. function initAppLocale(Vue, appVm, locale) {
  679. var state = Vue.observable({
  680. locale: locale || i18n.getLocale()
  681. });
  682. var localeWatchers = [];
  683. appVm.$watchLocale = function (fn) {
  684. localeWatchers.push(fn);
  685. };
  686. Object.defineProperty(appVm, '$locale', {
  687. get: function get() {
  688. return state.locale;
  689. },
  690. set: function set(v) {
  691. state.locale = v;
  692. localeWatchers.forEach(function (watch) {
  693. return watch(v);
  694. });
  695. }
  696. });
  697. }
  698. function isEnableLocale() {
  699. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  700. }
  701. function include(str, parts) {
  702. return !!parts.find(function (part) {
  703. return str.indexOf(part) !== -1;
  704. });
  705. }
  706. function startsWith(str, parts) {
  707. return parts.find(function (part) {
  708. return str.indexOf(part) === 0;
  709. });
  710. }
  711. function normalizeLocale(locale, messages) {
  712. if (!locale) {
  713. return;
  714. }
  715. locale = locale.trim().replace(/_/g, '-');
  716. if (messages && messages[locale]) {
  717. return locale;
  718. }
  719. locale = locale.toLowerCase();
  720. if (locale === 'chinese') {
  721. // 支付宝
  722. return LOCALE_ZH_HANS;
  723. }
  724. if (locale.indexOf('zh') === 0) {
  725. if (locale.indexOf('-hans') > -1) {
  726. return LOCALE_ZH_HANS;
  727. }
  728. if (locale.indexOf('-hant') > -1) {
  729. return LOCALE_ZH_HANT;
  730. }
  731. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  732. return LOCALE_ZH_HANT;
  733. }
  734. return LOCALE_ZH_HANS;
  735. }
  736. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  737. if (lang) {
  738. return lang;
  739. }
  740. }
  741. // export function initI18n() {
  742. // const localeKeys = Object.keys(__uniConfig.locales || {})
  743. // if (localeKeys.length) {
  744. // localeKeys.forEach((locale) =>
  745. // i18n.add(locale, __uniConfig.locales[locale])
  746. // )
  747. // }
  748. // }
  749. function getLocale$1() {
  750. // 优先使用 $locale
  751. if (isFn(getApp)) {
  752. var app = getApp({
  753. allowDefault: true
  754. });
  755. if (app && app.$vm) {
  756. return app.$vm.$locale;
  757. }
  758. }
  759. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  760. }
  761. function setLocale$1(locale) {
  762. var app = isFn(getApp) ? getApp() : false;
  763. if (!app) {
  764. return false;
  765. }
  766. var oldLocale = app.$vm.$locale;
  767. if (oldLocale !== locale) {
  768. app.$vm.$locale = locale;
  769. onLocaleChangeCallbacks.forEach(function (fn) {
  770. return fn({
  771. locale: locale
  772. });
  773. });
  774. return true;
  775. }
  776. return false;
  777. }
  778. var onLocaleChangeCallbacks = [];
  779. function onLocaleChange(fn) {
  780. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  781. onLocaleChangeCallbacks.push(fn);
  782. }
  783. }
  784. if (typeof global !== 'undefined') {
  785. global.getLocale = getLocale$1;
  786. }
  787. var interceptors = {
  788. promiseInterceptor: promiseInterceptor
  789. };
  790. var baseApi = /*#__PURE__*/Object.freeze({
  791. __proto__: null,
  792. upx2px: upx2px,
  793. getLocale: getLocale$1,
  794. setLocale: setLocale$1,
  795. onLocaleChange: onLocaleChange,
  796. addInterceptor: addInterceptor,
  797. removeInterceptor: removeInterceptor,
  798. interceptors: interceptors
  799. });
  800. function findExistsPageIndex(url) {
  801. var pages = getCurrentPages();
  802. var len = pages.length;
  803. while (len--) {
  804. var page = pages[len];
  805. if (page.$page && page.$page.fullPath === url) {
  806. return len;
  807. }
  808. }
  809. return -1;
  810. }
  811. var redirectTo = {
  812. name: function name(fromArgs) {
  813. if (fromArgs.exists === 'back' && fromArgs.delta) {
  814. return 'navigateBack';
  815. }
  816. return 'redirectTo';
  817. },
  818. args: function args(fromArgs) {
  819. if (fromArgs.exists === 'back' && fromArgs.url) {
  820. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  821. if (existsPageIndex !== -1) {
  822. var delta = getCurrentPages().length - 1 - existsPageIndex;
  823. if (delta > 0) {
  824. fromArgs.delta = delta;
  825. }
  826. }
  827. }
  828. }
  829. };
  830. var previewImage = {
  831. args: function args(fromArgs) {
  832. var currentIndex = parseInt(fromArgs.current);
  833. if (isNaN(currentIndex)) {
  834. return;
  835. }
  836. var urls = fromArgs.urls;
  837. if (!Array.isArray(urls)) {
  838. return;
  839. }
  840. var len = urls.length;
  841. if (!len) {
  842. return;
  843. }
  844. if (currentIndex < 0) {
  845. currentIndex = 0;
  846. } else if (currentIndex >= len) {
  847. currentIndex = len - 1;
  848. }
  849. if (currentIndex > 0) {
  850. fromArgs.current = urls[currentIndex];
  851. fromArgs.urls = urls.filter(function (item, index) {
  852. return index < currentIndex ? item !== urls[currentIndex] : true;
  853. });
  854. } else {
  855. fromArgs.current = urls[0];
  856. }
  857. return {
  858. indicator: false,
  859. loop: false
  860. };
  861. }
  862. };
  863. var UUID_KEY = '__DC_STAT_UUID';
  864. var deviceId;
  865. function useDeviceId(result) {
  866. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  867. if (!deviceId) {
  868. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  869. wx.setStorage({
  870. key: UUID_KEY,
  871. data: deviceId
  872. });
  873. }
  874. result.deviceId = deviceId;
  875. }
  876. function addSafeAreaInsets(result) {
  877. if (result.safeArea) {
  878. var safeArea = result.safeArea;
  879. result.safeAreaInsets = {
  880. top: safeArea.top,
  881. left: safeArea.left,
  882. right: result.windowWidth - safeArea.right,
  883. bottom: result.screenHeight - safeArea.bottom
  884. };
  885. }
  886. }
  887. function populateParameters(result) {
  888. var _result$brand = result.brand,
  889. brand = _result$brand === void 0 ? '' : _result$brand,
  890. _result$model = result.model,
  891. model = _result$model === void 0 ? '' : _result$model,
  892. _result$system = result.system,
  893. system = _result$system === void 0 ? '' : _result$system,
  894. _result$language = result.language,
  895. language = _result$language === void 0 ? '' : _result$language,
  896. theme = result.theme,
  897. version = result.version,
  898. platform = result.platform,
  899. fontSizeSetting = result.fontSizeSetting,
  900. SDKVersion = result.SDKVersion,
  901. pixelRatio = result.pixelRatio,
  902. deviceOrientation = result.deviceOrientation;
  903. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  904. var extraParam = {};
  905. // osName osVersion
  906. var osName = '';
  907. var osVersion = '';
  908. {
  909. osName = system.split(' ')[0] || '';
  910. osVersion = system.split(' ')[1] || '';
  911. }
  912. var hostVersion = version;
  913. // deviceType
  914. var deviceType = getGetDeviceType(result, model);
  915. // deviceModel
  916. var deviceBrand = getDeviceBrand(brand);
  917. // hostName
  918. var _hostName = getHostName(result);
  919. // deviceOrientation
  920. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  921. // devicePixelRatio
  922. var _devicePixelRatio = pixelRatio;
  923. // SDKVersion
  924. var _SDKVersion = SDKVersion;
  925. // hostLanguage
  926. var hostLanguage = language.replace(/_/g, '-');
  927. // wx.getAccountInfoSync
  928. var parameters = {
  929. appId: "__UNI__B46B675",
  930. appName: "kklbWe",
  931. appVersion: "1.0.0",
  932. appVersionCode: "100",
  933. appLanguage: getAppLanguage(hostLanguage),
  934. uniCompileVersion: "3.8.12",
  935. uniRuntimeVersion: "3.8.12",
  936. uniPlatform: undefined || "mp-weixin",
  937. deviceBrand: deviceBrand,
  938. deviceModel: model,
  939. deviceType: deviceType,
  940. devicePixelRatio: _devicePixelRatio,
  941. deviceOrientation: _deviceOrientation,
  942. osName: osName.toLocaleLowerCase(),
  943. osVersion: osVersion,
  944. hostTheme: theme,
  945. hostVersion: hostVersion,
  946. hostLanguage: hostLanguage,
  947. hostName: _hostName,
  948. hostSDKVersion: _SDKVersion,
  949. hostFontSizeSetting: fontSizeSetting,
  950. windowTop: 0,
  951. windowBottom: 0,
  952. // TODO
  953. osLanguage: undefined,
  954. osTheme: undefined,
  955. ua: undefined,
  956. hostPackageName: undefined,
  957. browserName: undefined,
  958. browserVersion: undefined
  959. };
  960. Object.assign(result, parameters, extraParam);
  961. }
  962. function getGetDeviceType(result, model) {
  963. var deviceType = result.deviceType || 'phone';
  964. {
  965. var deviceTypeMaps = {
  966. ipad: 'pad',
  967. windows: 'pc',
  968. mac: 'pc'
  969. };
  970. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  971. var _model = model.toLocaleLowerCase();
  972. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  973. var _m = deviceTypeMapsKeys[index];
  974. if (_model.indexOf(_m) !== -1) {
  975. deviceType = deviceTypeMaps[_m];
  976. break;
  977. }
  978. }
  979. }
  980. return deviceType;
  981. }
  982. function getDeviceBrand(brand) {
  983. var deviceBrand = brand;
  984. if (deviceBrand) {
  985. deviceBrand = brand.toLocaleLowerCase();
  986. }
  987. return deviceBrand;
  988. }
  989. function getAppLanguage(defaultLanguage) {
  990. return getLocale$1 ? getLocale$1() : defaultLanguage;
  991. }
  992. function getHostName(result) {
  993. var _platform = 'WeChat';
  994. var _hostName = result.hostName || _platform; // mp-jd
  995. {
  996. if (result.environment) {
  997. _hostName = result.environment;
  998. } else if (result.host && result.host.env) {
  999. _hostName = result.host.env;
  1000. }
  1001. }
  1002. return _hostName;
  1003. }
  1004. var getSystemInfo = {
  1005. returnValue: function returnValue(result) {
  1006. useDeviceId(result);
  1007. addSafeAreaInsets(result);
  1008. populateParameters(result);
  1009. }
  1010. };
  1011. var showActionSheet = {
  1012. args: function args(fromArgs) {
  1013. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1014. fromArgs.alertText = fromArgs.title;
  1015. }
  1016. }
  1017. };
  1018. var getAppBaseInfo = {
  1019. returnValue: function returnValue(result) {
  1020. var _result = result,
  1021. version = _result.version,
  1022. language = _result.language,
  1023. SDKVersion = _result.SDKVersion,
  1024. theme = _result.theme;
  1025. var _hostName = getHostName(result);
  1026. var hostLanguage = language.replace('_', '-');
  1027. result = sortObject(Object.assign(result, {
  1028. appId: "__UNI__B46B675",
  1029. appName: "kklbWe",
  1030. appVersion: "1.0.0",
  1031. appVersionCode: "100",
  1032. appLanguage: getAppLanguage(hostLanguage),
  1033. hostVersion: version,
  1034. hostLanguage: hostLanguage,
  1035. hostName: _hostName,
  1036. hostSDKVersion: SDKVersion,
  1037. hostTheme: theme
  1038. }));
  1039. }
  1040. };
  1041. var getDeviceInfo = {
  1042. returnValue: function returnValue(result) {
  1043. var _result2 = result,
  1044. brand = _result2.brand,
  1045. model = _result2.model;
  1046. var deviceType = getGetDeviceType(result, model);
  1047. var deviceBrand = getDeviceBrand(brand);
  1048. useDeviceId(result);
  1049. result = sortObject(Object.assign(result, {
  1050. deviceType: deviceType,
  1051. deviceBrand: deviceBrand,
  1052. deviceModel: model
  1053. }));
  1054. }
  1055. };
  1056. var getWindowInfo = {
  1057. returnValue: function returnValue(result) {
  1058. addSafeAreaInsets(result);
  1059. result = sortObject(Object.assign(result, {
  1060. windowTop: 0,
  1061. windowBottom: 0
  1062. }));
  1063. }
  1064. };
  1065. var getAppAuthorizeSetting = {
  1066. returnValue: function returnValue(result) {
  1067. var locationReducedAccuracy = result.locationReducedAccuracy;
  1068. result.locationAccuracy = 'unsupported';
  1069. if (locationReducedAccuracy === true) {
  1070. result.locationAccuracy = 'reduced';
  1071. } else if (locationReducedAccuracy === false) {
  1072. result.locationAccuracy = 'full';
  1073. }
  1074. }
  1075. };
  1076. // import navigateTo from 'uni-helpers/navigate-to'
  1077. var compressImage = {
  1078. args: function args(fromArgs) {
  1079. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1080. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1081. fromArgs.compressHeight = fromArgs.compressedHeight;
  1082. }
  1083. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1084. fromArgs.compressWidth = fromArgs.compressedWidth;
  1085. }
  1086. }
  1087. };
  1088. var protocols = {
  1089. redirectTo: redirectTo,
  1090. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1091. previewImage: previewImage,
  1092. getSystemInfo: getSystemInfo,
  1093. getSystemInfoSync: getSystemInfo,
  1094. showActionSheet: showActionSheet,
  1095. getAppBaseInfo: getAppBaseInfo,
  1096. getDeviceInfo: getDeviceInfo,
  1097. getWindowInfo: getWindowInfo,
  1098. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1099. compressImage: compressImage
  1100. };
  1101. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1102. var canIUses = [];
  1103. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1104. function processCallback(methodName, method, returnValue) {
  1105. return function (res) {
  1106. return method(processReturnValue(methodName, res, returnValue));
  1107. };
  1108. }
  1109. function processArgs(methodName, fromArgs) {
  1110. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1111. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1112. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1113. if (isPlainObject(fromArgs)) {
  1114. // 一般 api 的参数解析
  1115. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1116. if (isFn(argsOption)) {
  1117. argsOption = argsOption(fromArgs, toArgs) || {};
  1118. }
  1119. for (var key in fromArgs) {
  1120. if (hasOwn(argsOption, key)) {
  1121. var keyOption = argsOption[key];
  1122. if (isFn(keyOption)) {
  1123. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1124. }
  1125. if (!keyOption) {
  1126. // 不支持的参数
  1127. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1128. } else if (isStr(keyOption)) {
  1129. // 重写参数 key
  1130. toArgs[keyOption] = fromArgs[key];
  1131. } else if (isPlainObject(keyOption)) {
  1132. // {name:newName,value:value}可重新指定参数 key:value
  1133. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1134. }
  1135. } else if (CALLBACKS.indexOf(key) !== -1) {
  1136. if (isFn(fromArgs[key])) {
  1137. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1138. }
  1139. } else {
  1140. if (!keepFromArgs) {
  1141. toArgs[key] = fromArgs[key];
  1142. }
  1143. }
  1144. }
  1145. return toArgs;
  1146. } else if (isFn(fromArgs)) {
  1147. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1148. }
  1149. return fromArgs;
  1150. }
  1151. function processReturnValue(methodName, res, returnValue) {
  1152. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1153. if (isFn(protocols.returnValue)) {
  1154. // 处理通用 returnValue
  1155. res = protocols.returnValue(methodName, res);
  1156. }
  1157. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1158. }
  1159. function wrapper(methodName, method) {
  1160. if (hasOwn(protocols, methodName)) {
  1161. var protocol = protocols[methodName];
  1162. if (!protocol) {
  1163. // 暂不支持的 api
  1164. return function () {
  1165. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1166. };
  1167. }
  1168. return function (arg1, arg2) {
  1169. // 目前 api 最多两个参数
  1170. var options = protocol;
  1171. if (isFn(protocol)) {
  1172. options = protocol(arg1);
  1173. }
  1174. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1175. var args = [arg1];
  1176. if (typeof arg2 !== 'undefined') {
  1177. args.push(arg2);
  1178. }
  1179. if (isFn(options.name)) {
  1180. methodName = options.name(arg1);
  1181. } else if (isStr(options.name)) {
  1182. methodName = options.name;
  1183. }
  1184. var returnValue = wx[methodName].apply(wx, args);
  1185. if (isSyncApi(methodName)) {
  1186. // 同步 api
  1187. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1188. }
  1189. return returnValue;
  1190. };
  1191. }
  1192. return method;
  1193. }
  1194. var todoApis = Object.create(null);
  1195. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1196. function createTodoApi(name) {
  1197. return function todoApi(_ref) {
  1198. var fail = _ref.fail,
  1199. complete = _ref.complete;
  1200. var res = {
  1201. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1202. };
  1203. isFn(fail) && fail(res);
  1204. isFn(complete) && complete(res);
  1205. };
  1206. }
  1207. TODOS.forEach(function (name) {
  1208. todoApis[name] = createTodoApi(name);
  1209. });
  1210. var providers = {
  1211. oauth: ['weixin'],
  1212. share: ['weixin'],
  1213. payment: ['wxpay'],
  1214. push: ['weixin']
  1215. };
  1216. function getProvider(_ref2) {
  1217. var service = _ref2.service,
  1218. success = _ref2.success,
  1219. fail = _ref2.fail,
  1220. complete = _ref2.complete;
  1221. var res = false;
  1222. if (providers[service]) {
  1223. res = {
  1224. errMsg: 'getProvider:ok',
  1225. service: service,
  1226. provider: providers[service]
  1227. };
  1228. isFn(success) && success(res);
  1229. } else {
  1230. res = {
  1231. errMsg: 'getProvider:fail service not found'
  1232. };
  1233. isFn(fail) && fail(res);
  1234. }
  1235. isFn(complete) && complete(res);
  1236. }
  1237. var extraApi = /*#__PURE__*/Object.freeze({
  1238. __proto__: null,
  1239. getProvider: getProvider
  1240. });
  1241. var getEmitter = function () {
  1242. var Emitter;
  1243. return function getUniEmitter() {
  1244. if (!Emitter) {
  1245. Emitter = new _vue.default();
  1246. }
  1247. return Emitter;
  1248. };
  1249. }();
  1250. function apply(ctx, method, args) {
  1251. return ctx[method].apply(ctx, args);
  1252. }
  1253. function $on() {
  1254. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1255. }
  1256. function $off() {
  1257. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1258. }
  1259. function $once() {
  1260. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1261. }
  1262. function $emit() {
  1263. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1264. }
  1265. var eventApi = /*#__PURE__*/Object.freeze({
  1266. __proto__: null,
  1267. $on: $on,
  1268. $off: $off,
  1269. $once: $once,
  1270. $emit: $emit
  1271. });
  1272. /**
  1273. * 框架内 try-catch
  1274. */
  1275. /**
  1276. * 开发者 try-catch
  1277. */
  1278. function tryCatch(fn) {
  1279. return function () {
  1280. try {
  1281. return fn.apply(fn, arguments);
  1282. } catch (e) {
  1283. // TODO
  1284. console.error(e);
  1285. }
  1286. };
  1287. }
  1288. function getApiCallbacks(params) {
  1289. var apiCallbacks = {};
  1290. for (var name in params) {
  1291. var param = params[name];
  1292. if (isFn(param)) {
  1293. apiCallbacks[name] = tryCatch(param);
  1294. delete params[name];
  1295. }
  1296. }
  1297. return apiCallbacks;
  1298. }
  1299. var cid;
  1300. var cidErrMsg;
  1301. var enabled;
  1302. function normalizePushMessage(message) {
  1303. try {
  1304. return JSON.parse(message);
  1305. } catch (e) {}
  1306. return message;
  1307. }
  1308. function invokePushCallback(args) {
  1309. if (args.type === 'enabled') {
  1310. enabled = true;
  1311. } else if (args.type === 'clientId') {
  1312. cid = args.cid;
  1313. cidErrMsg = args.errMsg;
  1314. invokeGetPushCidCallbacks(cid, args.errMsg);
  1315. } else if (args.type === 'pushMsg') {
  1316. var message = {
  1317. type: 'receive',
  1318. data: normalizePushMessage(args.message)
  1319. };
  1320. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1321. var callback = onPushMessageCallbacks[i];
  1322. callback(message);
  1323. // 该消息已被阻止
  1324. if (message.stopped) {
  1325. break;
  1326. }
  1327. }
  1328. } else if (args.type === 'click') {
  1329. onPushMessageCallbacks.forEach(function (callback) {
  1330. callback({
  1331. type: 'click',
  1332. data: normalizePushMessage(args.message)
  1333. });
  1334. });
  1335. }
  1336. }
  1337. var getPushCidCallbacks = [];
  1338. function invokeGetPushCidCallbacks(cid, errMsg) {
  1339. getPushCidCallbacks.forEach(function (callback) {
  1340. callback(cid, errMsg);
  1341. });
  1342. getPushCidCallbacks.length = 0;
  1343. }
  1344. function getPushClientId(args) {
  1345. if (!isPlainObject(args)) {
  1346. args = {};
  1347. }
  1348. var _getApiCallbacks = getApiCallbacks(args),
  1349. success = _getApiCallbacks.success,
  1350. fail = _getApiCallbacks.fail,
  1351. complete = _getApiCallbacks.complete;
  1352. var hasSuccess = isFn(success);
  1353. var hasFail = isFn(fail);
  1354. var hasComplete = isFn(complete);
  1355. Promise.resolve().then(function () {
  1356. if (typeof enabled === 'undefined') {
  1357. enabled = false;
  1358. cid = '';
  1359. cidErrMsg = 'uniPush is not enabled';
  1360. }
  1361. getPushCidCallbacks.push(function (cid, errMsg) {
  1362. var res;
  1363. if (cid) {
  1364. res = {
  1365. errMsg: 'getPushClientId:ok',
  1366. cid: cid
  1367. };
  1368. hasSuccess && success(res);
  1369. } else {
  1370. res = {
  1371. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1372. };
  1373. hasFail && fail(res);
  1374. }
  1375. hasComplete && complete(res);
  1376. });
  1377. if (typeof cid !== 'undefined') {
  1378. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1379. }
  1380. });
  1381. }
  1382. var onPushMessageCallbacks = [];
  1383. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1384. var onPushMessage = function onPushMessage(fn) {
  1385. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1386. onPushMessageCallbacks.push(fn);
  1387. }
  1388. };
  1389. var offPushMessage = function offPushMessage(fn) {
  1390. if (!fn) {
  1391. onPushMessageCallbacks.length = 0;
  1392. } else {
  1393. var index = onPushMessageCallbacks.indexOf(fn);
  1394. if (index > -1) {
  1395. onPushMessageCallbacks.splice(index, 1);
  1396. }
  1397. }
  1398. };
  1399. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1400. if (!baseInfo) {
  1401. baseInfo = wx.getSystemInfoSync();
  1402. }
  1403. var host = baseInfo ? baseInfo.host : null;
  1404. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1405. var api = /*#__PURE__*/Object.freeze({
  1406. __proto__: null,
  1407. shareVideoMessage: shareVideoMessage,
  1408. getPushClientId: getPushClientId,
  1409. onPushMessage: onPushMessage,
  1410. offPushMessage: offPushMessage,
  1411. invokePushCallback: invokePushCallback
  1412. });
  1413. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1414. function findVmByVueId(vm, vuePid) {
  1415. var $children = vm.$children;
  1416. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1417. for (var i = $children.length - 1; i >= 0; i--) {
  1418. var childVm = $children[i];
  1419. if (childVm.$scope._$vueId === vuePid) {
  1420. return childVm;
  1421. }
  1422. }
  1423. // 反向递归查找
  1424. var parentVm;
  1425. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1426. parentVm = findVmByVueId($children[_i], vuePid);
  1427. if (parentVm) {
  1428. return parentVm;
  1429. }
  1430. }
  1431. }
  1432. function initBehavior(options) {
  1433. return Behavior(options);
  1434. }
  1435. function isPage() {
  1436. return !!this.route;
  1437. }
  1438. function initRelation(detail) {
  1439. this.triggerEvent('__l', detail);
  1440. }
  1441. function selectAllComponents(mpInstance, selector, $refs) {
  1442. var components = mpInstance.selectAllComponents(selector) || [];
  1443. components.forEach(function (component) {
  1444. var ref = component.dataset.ref;
  1445. $refs[ref] = component.$vm || toSkip(component);
  1446. {
  1447. if (component.dataset.vueGeneric === 'scoped') {
  1448. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1449. selectAllComponents(scopedComponent, selector, $refs);
  1450. });
  1451. }
  1452. }
  1453. });
  1454. }
  1455. function syncRefs(refs, newRefs) {
  1456. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1457. var newKeys = Object.keys(newRefs);
  1458. newKeys.forEach(function (key) {
  1459. var oldValue = refs[key];
  1460. var newValue = newRefs[key];
  1461. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1462. return oldValue.includes(value);
  1463. })) {
  1464. return;
  1465. }
  1466. refs[key] = newValue;
  1467. oldKeys.delete(key);
  1468. });
  1469. oldKeys.forEach(function (key) {
  1470. delete refs[key];
  1471. });
  1472. return refs;
  1473. }
  1474. function initRefs(vm) {
  1475. var mpInstance = vm.$scope;
  1476. var refs = {};
  1477. Object.defineProperty(vm, '$refs', {
  1478. get: function get() {
  1479. var $refs = {};
  1480. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1481. // TODO 暂不考虑 for 中的 scoped
  1482. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1483. forComponents.forEach(function (component) {
  1484. var ref = component.dataset.ref;
  1485. if (!$refs[ref]) {
  1486. $refs[ref] = [];
  1487. }
  1488. $refs[ref].push(component.$vm || toSkip(component));
  1489. });
  1490. return syncRefs(refs, $refs);
  1491. }
  1492. });
  1493. }
  1494. function handleLink(event) {
  1495. var _ref3 = event.detail || event.value,
  1496. vuePid = _ref3.vuePid,
  1497. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1498. var parentVm;
  1499. if (vuePid) {
  1500. parentVm = findVmByVueId(this.$vm, vuePid);
  1501. }
  1502. if (!parentVm) {
  1503. parentVm = this.$vm;
  1504. }
  1505. vueOptions.parent = parentVm;
  1506. }
  1507. function markMPComponent(component) {
  1508. // 在 Vue 中标记为小程序组件
  1509. var IS_MP = '__v_isMPComponent';
  1510. Object.defineProperty(component, IS_MP, {
  1511. configurable: true,
  1512. enumerable: false,
  1513. value: true
  1514. });
  1515. return component;
  1516. }
  1517. function toSkip(obj) {
  1518. var OB = '__ob__';
  1519. var SKIP = '__v_skip';
  1520. if (isObject(obj) && Object.isExtensible(obj)) {
  1521. // 避免被 @vue/composition-api 观测
  1522. Object.defineProperty(obj, OB, {
  1523. configurable: true,
  1524. enumerable: false,
  1525. value: (0, _defineProperty2.default)({}, SKIP, true)
  1526. });
  1527. }
  1528. return obj;
  1529. }
  1530. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1531. function initWorkletMethods(mpMethods, vueMethods) {
  1532. if (vueMethods) {
  1533. Object.keys(vueMethods).forEach(function (name) {
  1534. var matches = name.match(WORKLET_RE);
  1535. if (matches) {
  1536. var workletName = matches[1];
  1537. mpMethods[name] = vueMethods[name];
  1538. mpMethods[workletName] = vueMethods[workletName];
  1539. }
  1540. });
  1541. }
  1542. }
  1543. var MPPage = Page;
  1544. var MPComponent = Component;
  1545. var customizeRE = /:/g;
  1546. var customize = cached(function (str) {
  1547. return camelize(str.replace(customizeRE, '-'));
  1548. });
  1549. function initTriggerEvent(mpInstance) {
  1550. var oldTriggerEvent = mpInstance.triggerEvent;
  1551. var newTriggerEvent = function newTriggerEvent(event) {
  1552. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1553. args[_key3 - 1] = arguments[_key3];
  1554. }
  1555. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1556. if (this.$vm || this.dataset && this.dataset.comType) {
  1557. event = customize(event);
  1558. } else {
  1559. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1560. var newEvent = customize(event);
  1561. if (newEvent !== event) {
  1562. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1563. }
  1564. }
  1565. return oldTriggerEvent.apply(this, [event].concat(args));
  1566. };
  1567. try {
  1568. // 京东小程序 triggerEvent 为只读
  1569. mpInstance.triggerEvent = newTriggerEvent;
  1570. } catch (error) {
  1571. mpInstance._triggerEvent = newTriggerEvent;
  1572. }
  1573. }
  1574. function initHook(name, options, isComponent) {
  1575. var oldHook = options[name];
  1576. options[name] = function () {
  1577. markMPComponent(this);
  1578. initTriggerEvent(this);
  1579. if (oldHook) {
  1580. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1581. args[_key4] = arguments[_key4];
  1582. }
  1583. return oldHook.apply(this, args);
  1584. }
  1585. };
  1586. }
  1587. if (!MPPage.__$wrappered) {
  1588. MPPage.__$wrappered = true;
  1589. Page = function Page() {
  1590. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1591. initHook('onLoad', options);
  1592. return MPPage(options);
  1593. };
  1594. Page.after = MPPage.after;
  1595. Component = function Component() {
  1596. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1597. initHook('created', options);
  1598. return MPComponent(options);
  1599. };
  1600. }
  1601. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1602. function initMocks(vm, mocks) {
  1603. var mpInstance = vm.$mp[vm.mpType];
  1604. mocks.forEach(function (mock) {
  1605. if (hasOwn(mpInstance, mock)) {
  1606. vm[mock] = mpInstance[mock];
  1607. }
  1608. });
  1609. }
  1610. function hasHook(hook, vueOptions) {
  1611. if (!vueOptions) {
  1612. return true;
  1613. }
  1614. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1615. return true;
  1616. }
  1617. vueOptions = vueOptions.default || vueOptions;
  1618. if (isFn(vueOptions)) {
  1619. if (isFn(vueOptions.extendOptions[hook])) {
  1620. return true;
  1621. }
  1622. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1623. return true;
  1624. }
  1625. return false;
  1626. }
  1627. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1628. return true;
  1629. }
  1630. var mixins = vueOptions.mixins;
  1631. if (Array.isArray(mixins)) {
  1632. return !!mixins.find(function (mixin) {
  1633. return hasHook(hook, mixin);
  1634. });
  1635. }
  1636. }
  1637. function initHooks(mpOptions, hooks, vueOptions) {
  1638. hooks.forEach(function (hook) {
  1639. if (hasHook(hook, vueOptions)) {
  1640. mpOptions[hook] = function (args) {
  1641. return this.$vm && this.$vm.__call_hook(hook, args);
  1642. };
  1643. }
  1644. });
  1645. }
  1646. function initUnknownHooks(mpOptions, vueOptions) {
  1647. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1648. findHooks(vueOptions).forEach(function (hook) {
  1649. return initHook$1(mpOptions, hook, excludes);
  1650. });
  1651. }
  1652. function findHooks(vueOptions) {
  1653. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1654. if (vueOptions) {
  1655. Object.keys(vueOptions).forEach(function (name) {
  1656. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1657. hooks.push(name);
  1658. }
  1659. });
  1660. }
  1661. return hooks;
  1662. }
  1663. function initHook$1(mpOptions, hook, excludes) {
  1664. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1665. mpOptions[hook] = function (args) {
  1666. return this.$vm && this.$vm.__call_hook(hook, args);
  1667. };
  1668. }
  1669. }
  1670. function initVueComponent(Vue, vueOptions) {
  1671. vueOptions = vueOptions.default || vueOptions;
  1672. var VueComponent;
  1673. if (isFn(vueOptions)) {
  1674. VueComponent = vueOptions;
  1675. } else {
  1676. VueComponent = Vue.extend(vueOptions);
  1677. }
  1678. vueOptions = VueComponent.options;
  1679. return [VueComponent, vueOptions];
  1680. }
  1681. function initSlots(vm, vueSlots) {
  1682. if (Array.isArray(vueSlots) && vueSlots.length) {
  1683. var $slots = Object.create(null);
  1684. vueSlots.forEach(function (slotName) {
  1685. $slots[slotName] = true;
  1686. });
  1687. vm.$scopedSlots = vm.$slots = $slots;
  1688. }
  1689. }
  1690. function initVueIds(vueIds, mpInstance) {
  1691. vueIds = (vueIds || '').split(',');
  1692. var len = vueIds.length;
  1693. if (len === 1) {
  1694. mpInstance._$vueId = vueIds[0];
  1695. } else if (len === 2) {
  1696. mpInstance._$vueId = vueIds[0];
  1697. mpInstance._$vuePid = vueIds[1];
  1698. }
  1699. }
  1700. function initData(vueOptions, context) {
  1701. var data = vueOptions.data || {};
  1702. var methods = vueOptions.methods || {};
  1703. if (typeof data === 'function') {
  1704. try {
  1705. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1706. } catch (e) {
  1707. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1708. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1709. }
  1710. }
  1711. } else {
  1712. try {
  1713. // 对 data 格式化
  1714. data = JSON.parse(JSON.stringify(data));
  1715. } catch (e) {}
  1716. }
  1717. if (!isPlainObject(data)) {
  1718. data = {};
  1719. }
  1720. Object.keys(methods).forEach(function (methodName) {
  1721. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1722. data[methodName] = methods[methodName];
  1723. }
  1724. });
  1725. return data;
  1726. }
  1727. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1728. function createObserver(name) {
  1729. return function observer(newVal, oldVal) {
  1730. if (this.$vm) {
  1731. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1732. }
  1733. };
  1734. }
  1735. function initBehaviors(vueOptions, initBehavior) {
  1736. var vueBehaviors = vueOptions.behaviors;
  1737. var vueExtends = vueOptions.extends;
  1738. var vueMixins = vueOptions.mixins;
  1739. var vueProps = vueOptions.props;
  1740. if (!vueProps) {
  1741. vueOptions.props = vueProps = [];
  1742. }
  1743. var behaviors = [];
  1744. if (Array.isArray(vueBehaviors)) {
  1745. vueBehaviors.forEach(function (behavior) {
  1746. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1747. if (behavior === 'uni://form-field') {
  1748. if (Array.isArray(vueProps)) {
  1749. vueProps.push('name');
  1750. vueProps.push('value');
  1751. } else {
  1752. vueProps.name = {
  1753. type: String,
  1754. default: ''
  1755. };
  1756. vueProps.value = {
  1757. type: [String, Number, Boolean, Array, Object, Date],
  1758. default: ''
  1759. };
  1760. }
  1761. }
  1762. });
  1763. }
  1764. if (isPlainObject(vueExtends) && vueExtends.props) {
  1765. behaviors.push(initBehavior({
  1766. properties: initProperties(vueExtends.props, true)
  1767. }));
  1768. }
  1769. if (Array.isArray(vueMixins)) {
  1770. vueMixins.forEach(function (vueMixin) {
  1771. if (isPlainObject(vueMixin) && vueMixin.props) {
  1772. behaviors.push(initBehavior({
  1773. properties: initProperties(vueMixin.props, true)
  1774. }));
  1775. }
  1776. });
  1777. }
  1778. return behaviors;
  1779. }
  1780. function parsePropType(key, type, defaultValue, file) {
  1781. // [String]=>String
  1782. if (Array.isArray(type) && type.length === 1) {
  1783. return type[0];
  1784. }
  1785. return type;
  1786. }
  1787. function initProperties(props) {
  1788. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1789. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1790. var options = arguments.length > 3 ? arguments[3] : undefined;
  1791. var properties = {};
  1792. if (!isBehavior) {
  1793. properties.vueId = {
  1794. type: String,
  1795. value: ''
  1796. };
  1797. {
  1798. if (options.virtualHost) {
  1799. properties.virtualHostStyle = {
  1800. type: null,
  1801. value: ''
  1802. };
  1803. properties.virtualHostClass = {
  1804. type: null,
  1805. value: ''
  1806. };
  1807. }
  1808. }
  1809. // scopedSlotsCompiler auto
  1810. properties.scopedSlotsCompiler = {
  1811. type: String,
  1812. value: ''
  1813. };
  1814. properties.vueSlots = {
  1815. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1816. type: null,
  1817. value: [],
  1818. observer: function observer(newVal, oldVal) {
  1819. var $slots = Object.create(null);
  1820. newVal.forEach(function (slotName) {
  1821. $slots[slotName] = true;
  1822. });
  1823. this.setData({
  1824. $slots: $slots
  1825. });
  1826. }
  1827. };
  1828. }
  1829. if (Array.isArray(props)) {
  1830. // ['title']
  1831. props.forEach(function (key) {
  1832. properties[key] = {
  1833. type: null,
  1834. observer: createObserver(key)
  1835. };
  1836. });
  1837. } else if (isPlainObject(props)) {
  1838. // {title:{type:String,default:''},content:String}
  1839. Object.keys(props).forEach(function (key) {
  1840. var opts = props[key];
  1841. if (isPlainObject(opts)) {
  1842. // title:{type:String,default:''}
  1843. var value = opts.default;
  1844. if (isFn(value)) {
  1845. value = value();
  1846. }
  1847. opts.type = parsePropType(key, opts.type);
  1848. properties[key] = {
  1849. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1850. value: value,
  1851. observer: createObserver(key)
  1852. };
  1853. } else {
  1854. // content:String
  1855. var type = parsePropType(key, opts);
  1856. properties[key] = {
  1857. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1858. observer: createObserver(key)
  1859. };
  1860. }
  1861. });
  1862. }
  1863. return properties;
  1864. }
  1865. function wrapper$1(event) {
  1866. // TODO 又得兼容 mpvue 的 mp 对象
  1867. try {
  1868. event.mp = JSON.parse(JSON.stringify(event));
  1869. } catch (e) {}
  1870. event.stopPropagation = noop;
  1871. event.preventDefault = noop;
  1872. event.target = event.target || {};
  1873. if (!hasOwn(event, 'detail')) {
  1874. event.detail = {};
  1875. }
  1876. if (hasOwn(event, 'markerId')) {
  1877. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1878. event.detail.markerId = event.markerId;
  1879. }
  1880. if (isPlainObject(event.detail)) {
  1881. event.target = Object.assign({}, event.target, event.detail);
  1882. }
  1883. return event;
  1884. }
  1885. function getExtraValue(vm, dataPathsArray) {
  1886. var context = vm;
  1887. dataPathsArray.forEach(function (dataPathArray) {
  1888. var dataPath = dataPathArray[0];
  1889. var value = dataPathArray[2];
  1890. if (dataPath || typeof value !== 'undefined') {
  1891. // ['','',index,'disable']
  1892. var propPath = dataPathArray[1];
  1893. var valuePath = dataPathArray[3];
  1894. var vFor;
  1895. if (Number.isInteger(dataPath)) {
  1896. vFor = dataPath;
  1897. } else if (!dataPath) {
  1898. vFor = context;
  1899. } else if (typeof dataPath === 'string' && dataPath) {
  1900. if (dataPath.indexOf('#s#') === 0) {
  1901. vFor = dataPath.substr(3);
  1902. } else {
  1903. vFor = vm.__get_value(dataPath, context);
  1904. }
  1905. }
  1906. if (Number.isInteger(vFor)) {
  1907. context = value;
  1908. } else if (!propPath) {
  1909. context = vFor[value];
  1910. } else {
  1911. if (Array.isArray(vFor)) {
  1912. context = vFor.find(function (vForItem) {
  1913. return vm.__get_value(propPath, vForItem) === value;
  1914. });
  1915. } else if (isPlainObject(vFor)) {
  1916. context = Object.keys(vFor).find(function (vForKey) {
  1917. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1918. });
  1919. } else {
  1920. console.error('v-for 暂不支持循环数据:', vFor);
  1921. }
  1922. }
  1923. if (valuePath) {
  1924. context = vm.__get_value(valuePath, context);
  1925. }
  1926. }
  1927. });
  1928. return context;
  1929. }
  1930. function processEventExtra(vm, extra, event, __args__) {
  1931. var extraObj = {};
  1932. if (Array.isArray(extra) && extra.length) {
  1933. /**
  1934. *[
  1935. * ['data.items', 'data.id', item.data.id],
  1936. * ['metas', 'id', meta.id]
  1937. *],
  1938. *[
  1939. * ['data.items', 'data.id', item.data.id],
  1940. * ['metas', 'id', meta.id]
  1941. *],
  1942. *'test'
  1943. */
  1944. extra.forEach(function (dataPath, index) {
  1945. if (typeof dataPath === 'string') {
  1946. if (!dataPath) {
  1947. // model,prop.sync
  1948. extraObj['$' + index] = vm;
  1949. } else {
  1950. if (dataPath === '$event') {
  1951. // $event
  1952. extraObj['$' + index] = event;
  1953. } else if (dataPath === 'arguments') {
  1954. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1955. } else if (dataPath.indexOf('$event.') === 0) {
  1956. // $event.target.value
  1957. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1958. } else {
  1959. extraObj['$' + index] = vm.__get_value(dataPath);
  1960. }
  1961. }
  1962. } else {
  1963. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1964. }
  1965. });
  1966. }
  1967. return extraObj;
  1968. }
  1969. function getObjByArray(arr) {
  1970. var obj = {};
  1971. for (var i = 1; i < arr.length; i++) {
  1972. var element = arr[i];
  1973. obj[element[0]] = element[1];
  1974. }
  1975. return obj;
  1976. }
  1977. function processEventArgs(vm, event) {
  1978. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1979. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1980. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1981. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1982. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1983. // fixed 用户直接触发 mpInstance.triggerEvent
  1984. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1985. if (isCustom) {
  1986. // 自定义事件
  1987. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1988. if (!args.length) {
  1989. // 无参数,直接传入 event 或 detail 数组
  1990. if (isCustomMPEvent) {
  1991. return [event];
  1992. }
  1993. return __args__;
  1994. }
  1995. }
  1996. var extraObj = processEventExtra(vm, extra, event, __args__);
  1997. var ret = [];
  1998. args.forEach(function (arg) {
  1999. if (arg === '$event') {
  2000. if (methodName === '__set_model' && !isCustom) {
  2001. // input v-model value
  2002. ret.push(event.target.value);
  2003. } else {
  2004. if (isCustom && !isCustomMPEvent) {
  2005. ret.push(__args__[0]);
  2006. } else {
  2007. // wxcomponent 组件或内置组件
  2008. ret.push(event);
  2009. }
  2010. }
  2011. } else {
  2012. if (Array.isArray(arg) && arg[0] === 'o') {
  2013. ret.push(getObjByArray(arg));
  2014. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2015. ret.push(extraObj[arg]);
  2016. } else {
  2017. ret.push(arg);
  2018. }
  2019. }
  2020. });
  2021. return ret;
  2022. }
  2023. var ONCE = '~';
  2024. var CUSTOM = '^';
  2025. function isMatchEventType(eventType, optType) {
  2026. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2027. }
  2028. function getContextVm(vm) {
  2029. var $parent = vm.$parent;
  2030. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2031. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2032. $parent = $parent.$parent;
  2033. }
  2034. return $parent && $parent.$parent;
  2035. }
  2036. function handleEvent(event) {
  2037. var _this2 = this;
  2038. event = wrapper$1(event);
  2039. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2040. var dataset = (event.currentTarget || event.target).dataset;
  2041. if (!dataset) {
  2042. return console.warn('事件信息不存在');
  2043. }
  2044. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2045. if (!eventOpts) {
  2046. return console.warn('事件信息不存在');
  2047. }
  2048. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2049. var eventType = event.type;
  2050. var ret = [];
  2051. eventOpts.forEach(function (eventOpt) {
  2052. var type = eventOpt[0];
  2053. var eventsArray = eventOpt[1];
  2054. var isCustom = type.charAt(0) === CUSTOM;
  2055. type = isCustom ? type.slice(1) : type;
  2056. var isOnce = type.charAt(0) === ONCE;
  2057. type = isOnce ? type.slice(1) : type;
  2058. if (eventsArray && isMatchEventType(eventType, type)) {
  2059. eventsArray.forEach(function (eventArray) {
  2060. var methodName = eventArray[0];
  2061. if (methodName) {
  2062. var handlerCtx = _this2.$vm;
  2063. if (handlerCtx.$options.generic) {
  2064. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2065. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2066. }
  2067. if (methodName === '$emit') {
  2068. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2069. return;
  2070. }
  2071. var handler = handlerCtx[methodName];
  2072. if (!isFn(handler)) {
  2073. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2074. var path = _this2.route || _this2.is;
  2075. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2076. }
  2077. if (isOnce) {
  2078. if (handler.once) {
  2079. return;
  2080. }
  2081. handler.once = true;
  2082. }
  2083. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2084. params = Array.isArray(params) ? params : [];
  2085. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2086. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2087. // eslint-disable-next-line no-sparse-arrays
  2088. params = params.concat([,,,,,,,,,, event]);
  2089. }
  2090. ret.push(handler.apply(handlerCtx, params));
  2091. }
  2092. });
  2093. }
  2094. });
  2095. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2096. return ret[0];
  2097. }
  2098. }
  2099. var eventChannels = {};
  2100. function getEventChannel(id) {
  2101. var eventChannel = eventChannels[id];
  2102. delete eventChannels[id];
  2103. return eventChannel;
  2104. }
  2105. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2106. function initEventChannel() {
  2107. _vue.default.prototype.getOpenerEventChannel = function () {
  2108. // 微信小程序使用自身getOpenerEventChannel
  2109. {
  2110. return this.$scope.getOpenerEventChannel();
  2111. }
  2112. };
  2113. var callHook = _vue.default.prototype.__call_hook;
  2114. _vue.default.prototype.__call_hook = function (hook, args) {
  2115. if (hook === 'onLoad' && args && args.__id__) {
  2116. this.__eventChannel__ = getEventChannel(args.__id__);
  2117. delete args.__id__;
  2118. }
  2119. return callHook.call(this, hook, args);
  2120. };
  2121. }
  2122. function initScopedSlotsParams() {
  2123. var center = {};
  2124. var parents = {};
  2125. function currentId(fn) {
  2126. var vueIds = this.$options.propsData.vueId;
  2127. if (vueIds) {
  2128. var vueId = vueIds.split(',')[0];
  2129. fn(vueId);
  2130. }
  2131. }
  2132. _vue.default.prototype.$hasSSP = function (vueId) {
  2133. var slot = center[vueId];
  2134. if (!slot) {
  2135. parents[vueId] = this;
  2136. this.$on('hook:destroyed', function () {
  2137. delete parents[vueId];
  2138. });
  2139. }
  2140. return slot;
  2141. };
  2142. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2143. var slot = center[vueId];
  2144. if (slot) {
  2145. var params = slot[name] || [];
  2146. if (needAll) {
  2147. return params;
  2148. }
  2149. return params[0];
  2150. }
  2151. };
  2152. _vue.default.prototype.$setSSP = function (name, value) {
  2153. var index = 0;
  2154. currentId.call(this, function (vueId) {
  2155. var slot = center[vueId];
  2156. var params = slot[name] = slot[name] || [];
  2157. params.push(value);
  2158. index = params.length - 1;
  2159. });
  2160. return index;
  2161. };
  2162. _vue.default.prototype.$initSSP = function () {
  2163. currentId.call(this, function (vueId) {
  2164. center[vueId] = {};
  2165. });
  2166. };
  2167. _vue.default.prototype.$callSSP = function () {
  2168. currentId.call(this, function (vueId) {
  2169. if (parents[vueId]) {
  2170. parents[vueId].$forceUpdate();
  2171. }
  2172. });
  2173. };
  2174. _vue.default.mixin({
  2175. destroyed: function destroyed() {
  2176. var propsData = this.$options.propsData;
  2177. var vueId = propsData && propsData.vueId;
  2178. if (vueId) {
  2179. delete center[vueId];
  2180. delete parents[vueId];
  2181. }
  2182. }
  2183. });
  2184. }
  2185. function parseBaseApp(vm, _ref4) {
  2186. var mocks = _ref4.mocks,
  2187. initRefs = _ref4.initRefs;
  2188. initEventChannel();
  2189. {
  2190. initScopedSlotsParams();
  2191. }
  2192. if (vm.$options.store) {
  2193. _vue.default.prototype.$store = vm.$options.store;
  2194. }
  2195. uniIdMixin(_vue.default);
  2196. _vue.default.prototype.mpHost = "mp-weixin";
  2197. _vue.default.mixin({
  2198. beforeCreate: function beforeCreate() {
  2199. if (!this.$options.mpType) {
  2200. return;
  2201. }
  2202. this.mpType = this.$options.mpType;
  2203. this.$mp = (0, _defineProperty2.default)({
  2204. data: {}
  2205. }, this.mpType, this.$options.mpInstance);
  2206. this.$scope = this.$options.mpInstance;
  2207. delete this.$options.mpType;
  2208. delete this.$options.mpInstance;
  2209. if (this.mpType === 'page' && typeof getApp === 'function') {
  2210. // hack vue-i18n
  2211. var app = getApp();
  2212. if (app.$vm && app.$vm.$i18n) {
  2213. this._i18n = app.$vm.$i18n;
  2214. }
  2215. }
  2216. if (this.mpType !== 'app') {
  2217. initRefs(this);
  2218. initMocks(this, mocks);
  2219. }
  2220. }
  2221. });
  2222. var appOptions = {
  2223. onLaunch: function onLaunch(args) {
  2224. if (this.$vm) {
  2225. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2226. return;
  2227. }
  2228. {
  2229. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2230. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2231. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2232. }
  2233. }
  2234. this.$vm = vm;
  2235. this.$vm.$mp = {
  2236. app: this
  2237. };
  2238. this.$vm.$scope = this;
  2239. // vm 上也挂载 globalData
  2240. this.$vm.globalData = this.globalData;
  2241. this.$vm._isMounted = true;
  2242. this.$vm.__call_hook('mounted', args);
  2243. this.$vm.__call_hook('onLaunch', args);
  2244. }
  2245. };
  2246. // 兼容旧版本 globalData
  2247. appOptions.globalData = vm.$options.globalData || {};
  2248. // 将 methods 中的方法挂在 getApp() 中
  2249. var methods = vm.$options.methods;
  2250. if (methods) {
  2251. Object.keys(methods).forEach(function (name) {
  2252. appOptions[name] = methods[name];
  2253. });
  2254. }
  2255. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2256. initHooks(appOptions, hooks);
  2257. initUnknownHooks(appOptions, vm.$options);
  2258. return appOptions;
  2259. }
  2260. function parseApp(vm) {
  2261. return parseBaseApp(vm, {
  2262. mocks: mocks,
  2263. initRefs: initRefs
  2264. });
  2265. }
  2266. function createApp(vm) {
  2267. App(parseApp(vm));
  2268. return vm;
  2269. }
  2270. var encodeReserveRE = /[!'()*]/g;
  2271. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2272. return '%' + c.charCodeAt(0).toString(16);
  2273. };
  2274. var commaRE = /%2C/g;
  2275. // fixed encodeURIComponent which is more conformant to RFC3986:
  2276. // - escapes [!'()*]
  2277. // - preserve commas
  2278. var encode = function encode(str) {
  2279. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2280. };
  2281. function stringifyQuery(obj) {
  2282. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2283. var res = obj ? Object.keys(obj).map(function (key) {
  2284. var val = obj[key];
  2285. if (val === undefined) {
  2286. return '';
  2287. }
  2288. if (val === null) {
  2289. return encodeStr(key);
  2290. }
  2291. if (Array.isArray(val)) {
  2292. var result = [];
  2293. val.forEach(function (val2) {
  2294. if (val2 === undefined) {
  2295. return;
  2296. }
  2297. if (val2 === null) {
  2298. result.push(encodeStr(key));
  2299. } else {
  2300. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2301. }
  2302. });
  2303. return result.join('&');
  2304. }
  2305. return encodeStr(key) + '=' + encodeStr(val);
  2306. }).filter(function (x) {
  2307. return x.length > 0;
  2308. }).join('&') : null;
  2309. return res ? "?".concat(res) : '';
  2310. }
  2311. function parseBaseComponent(vueComponentOptions) {
  2312. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2313. isPage = _ref5.isPage,
  2314. initRelation = _ref5.initRelation;
  2315. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2316. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2317. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2318. VueComponent = _initVueComponent2[0],
  2319. vueOptions = _initVueComponent2[1];
  2320. var options = _objectSpread({
  2321. multipleSlots: true,
  2322. // styleIsolation: 'apply-shared',
  2323. addGlobalClass: true
  2324. }, vueOptions.options || {});
  2325. {
  2326. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2327. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2328. Object.assign(options, vueOptions['mp-weixin'].options);
  2329. }
  2330. }
  2331. var componentOptions = {
  2332. options: options,
  2333. data: initData(vueOptions, _vue.default.prototype),
  2334. behaviors: initBehaviors(vueOptions, initBehavior),
  2335. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2336. lifetimes: {
  2337. attached: function attached() {
  2338. var properties = this.properties;
  2339. var options = {
  2340. mpType: isPage.call(this) ? 'page' : 'component',
  2341. mpInstance: this,
  2342. propsData: properties
  2343. };
  2344. initVueIds(properties.vueId, this);
  2345. // 处理父子关系
  2346. initRelation.call(this, {
  2347. vuePid: this._$vuePid,
  2348. vueOptions: options
  2349. });
  2350. // 初始化 vue 实例
  2351. this.$vm = new VueComponent(options);
  2352. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2353. initSlots(this.$vm, properties.vueSlots);
  2354. // 触发首次 setData
  2355. this.$vm.$mount();
  2356. },
  2357. ready: function ready() {
  2358. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2359. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2360. if (this.$vm) {
  2361. this.$vm._isMounted = true;
  2362. this.$vm.__call_hook('mounted');
  2363. this.$vm.__call_hook('onReady');
  2364. }
  2365. },
  2366. detached: function detached() {
  2367. this.$vm && this.$vm.$destroy();
  2368. }
  2369. },
  2370. pageLifetimes: {
  2371. show: function show(args) {
  2372. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2373. },
  2374. hide: function hide() {
  2375. this.$vm && this.$vm.__call_hook('onPageHide');
  2376. },
  2377. resize: function resize(size) {
  2378. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2379. }
  2380. },
  2381. methods: {
  2382. __l: handleLink,
  2383. __e: handleEvent
  2384. }
  2385. };
  2386. // externalClasses
  2387. if (vueOptions.externalClasses) {
  2388. componentOptions.externalClasses = vueOptions.externalClasses;
  2389. }
  2390. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2391. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2392. componentOptions.methods[callMethod] = function (args) {
  2393. return this.$vm[callMethod](args);
  2394. };
  2395. });
  2396. }
  2397. if (needVueOptions) {
  2398. return [componentOptions, vueOptions, VueComponent];
  2399. }
  2400. if (isPage) {
  2401. return componentOptions;
  2402. }
  2403. return [componentOptions, VueComponent];
  2404. }
  2405. function parseComponent(vueComponentOptions, needVueOptions) {
  2406. return parseBaseComponent(vueComponentOptions, {
  2407. isPage: isPage,
  2408. initRelation: initRelation
  2409. }, needVueOptions);
  2410. }
  2411. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2412. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2413. function parseBasePage(vuePageOptions) {
  2414. var _parseComponent = parseComponent(vuePageOptions, true),
  2415. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2416. pageOptions = _parseComponent2[0],
  2417. vueOptions = _parseComponent2[1];
  2418. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2419. pageOptions.methods.onLoad = function (query) {
  2420. this.options = query;
  2421. var copyQuery = Object.assign({}, query);
  2422. delete copyQuery.__id__;
  2423. this.$page = {
  2424. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2425. };
  2426. this.$vm.$mp.query = query; // 兼容 mpvue
  2427. this.$vm.__call_hook('onLoad', query);
  2428. };
  2429. {
  2430. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2431. }
  2432. {
  2433. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2434. }
  2435. return pageOptions;
  2436. }
  2437. function parsePage(vuePageOptions) {
  2438. return parseBasePage(vuePageOptions);
  2439. }
  2440. function createPage(vuePageOptions) {
  2441. {
  2442. return Component(parsePage(vuePageOptions));
  2443. }
  2444. }
  2445. function createComponent(vueOptions) {
  2446. {
  2447. return Component(parseComponent(vueOptions));
  2448. }
  2449. }
  2450. function createSubpackageApp(vm) {
  2451. var appOptions = parseApp(vm);
  2452. var app = getApp({
  2453. allowDefault: true
  2454. });
  2455. vm.$scope = app;
  2456. var globalData = app.globalData;
  2457. if (globalData) {
  2458. Object.keys(appOptions.globalData).forEach(function (name) {
  2459. if (!hasOwn(globalData, name)) {
  2460. globalData[name] = appOptions.globalData[name];
  2461. }
  2462. });
  2463. }
  2464. Object.keys(appOptions).forEach(function (name) {
  2465. if (!hasOwn(app, name)) {
  2466. app[name] = appOptions[name];
  2467. }
  2468. });
  2469. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2470. wx.onAppShow(function () {
  2471. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2472. args[_key5] = arguments[_key5];
  2473. }
  2474. vm.__call_hook('onShow', args);
  2475. });
  2476. }
  2477. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2478. wx.onAppHide(function () {
  2479. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2480. args[_key6] = arguments[_key6];
  2481. }
  2482. vm.__call_hook('onHide', args);
  2483. });
  2484. }
  2485. if (isFn(appOptions.onLaunch)) {
  2486. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2487. vm.__call_hook('onLaunch', args);
  2488. }
  2489. return vm;
  2490. }
  2491. function createPlugin(vm) {
  2492. var appOptions = parseApp(vm);
  2493. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2494. wx.onAppShow(function () {
  2495. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2496. args[_key7] = arguments[_key7];
  2497. }
  2498. vm.__call_hook('onShow', args);
  2499. });
  2500. }
  2501. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2502. wx.onAppHide(function () {
  2503. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2504. args[_key8] = arguments[_key8];
  2505. }
  2506. vm.__call_hook('onHide', args);
  2507. });
  2508. }
  2509. if (isFn(appOptions.onLaunch)) {
  2510. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2511. vm.__call_hook('onLaunch', args);
  2512. }
  2513. return vm;
  2514. }
  2515. todos.forEach(function (todoApi) {
  2516. protocols[todoApi] = false;
  2517. });
  2518. canIUses.forEach(function (canIUseApi) {
  2519. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2520. if (!wx.canIUse(apiName)) {
  2521. protocols[canIUseApi] = false;
  2522. }
  2523. });
  2524. var uni = {};
  2525. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2526. uni = new Proxy({}, {
  2527. get: function get(target, name) {
  2528. if (hasOwn(target, name)) {
  2529. return target[name];
  2530. }
  2531. if (baseApi[name]) {
  2532. return baseApi[name];
  2533. }
  2534. if (api[name]) {
  2535. return promisify(name, api[name]);
  2536. }
  2537. {
  2538. if (extraApi[name]) {
  2539. return promisify(name, extraApi[name]);
  2540. }
  2541. if (todoApis[name]) {
  2542. return promisify(name, todoApis[name]);
  2543. }
  2544. }
  2545. if (eventApi[name]) {
  2546. return eventApi[name];
  2547. }
  2548. return promisify(name, wrapper(name, wx[name]));
  2549. },
  2550. set: function set(target, name, value) {
  2551. target[name] = value;
  2552. return true;
  2553. }
  2554. });
  2555. } else {
  2556. Object.keys(baseApi).forEach(function (name) {
  2557. uni[name] = baseApi[name];
  2558. });
  2559. {
  2560. Object.keys(todoApis).forEach(function (name) {
  2561. uni[name] = promisify(name, todoApis[name]);
  2562. });
  2563. Object.keys(extraApi).forEach(function (name) {
  2564. uni[name] = promisify(name, extraApi[name]);
  2565. });
  2566. }
  2567. Object.keys(eventApi).forEach(function (name) {
  2568. uni[name] = eventApi[name];
  2569. });
  2570. Object.keys(api).forEach(function (name) {
  2571. uni[name] = promisify(name, api[name]);
  2572. });
  2573. Object.keys(wx).forEach(function (name) {
  2574. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2575. uni[name] = promisify(name, wrapper(name, wx[name]));
  2576. }
  2577. });
  2578. }
  2579. wx.createApp = createApp;
  2580. wx.createPage = createPage;
  2581. wx.createComponent = createComponent;
  2582. wx.createSubpackageApp = createSubpackageApp;
  2583. wx.createPlugin = createPlugin;
  2584. var uni$1 = uni;
  2585. var _default = uni$1;
  2586. exports.default = _default;
  2587. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2588. /***/ }),
  2589. /***/ 20:
  2590. /*!****************************************************************!*\
  2591. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2592. \****************************************************************/
  2593. /*! no static exports found */
  2594. /***/ (function(module, exports) {
  2595. function _iterableToArray(iter) {
  2596. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2597. }
  2598. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2599. /***/ }),
  2600. /***/ 21:
  2601. /*!******************************************************************!*\
  2602. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2603. \******************************************************************/
  2604. /*! no static exports found */
  2605. /***/ (function(module, exports) {
  2606. function _nonIterableSpread() {
  2607. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2608. }
  2609. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2610. /***/ }),
  2611. /***/ 22:
  2612. /*!*************************************************************!*\
  2613. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2614. \*************************************************************/
  2615. /*! no static exports found */
  2616. /***/ (function(module, exports, __webpack_require__) {
  2617. "use strict";
  2618. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2619. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2620. Object.defineProperty(exports, "__esModule", {
  2621. value: true
  2622. });
  2623. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2624. exports.compileI18nJsonStr = compileI18nJsonStr;
  2625. exports.hasI18nJson = hasI18nJson;
  2626. exports.initVueI18n = initVueI18n;
  2627. exports.isI18nStr = isI18nStr;
  2628. exports.isString = void 0;
  2629. exports.normalizeLocale = normalizeLocale;
  2630. exports.parseI18nJson = parseI18nJson;
  2631. exports.resolveLocale = resolveLocale;
  2632. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2633. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2634. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2635. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2636. var isObject = function isObject(val) {
  2637. return val !== null && (0, _typeof2.default)(val) === 'object';
  2638. };
  2639. var defaultDelimiters = ['{', '}'];
  2640. var BaseFormatter = /*#__PURE__*/function () {
  2641. function BaseFormatter() {
  2642. (0, _classCallCheck2.default)(this, BaseFormatter);
  2643. this._caches = Object.create(null);
  2644. }
  2645. (0, _createClass2.default)(BaseFormatter, [{
  2646. key: "interpolate",
  2647. value: function interpolate(message, values) {
  2648. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2649. if (!values) {
  2650. return [message];
  2651. }
  2652. var tokens = this._caches[message];
  2653. if (!tokens) {
  2654. tokens = parse(message, delimiters);
  2655. this._caches[message] = tokens;
  2656. }
  2657. return compile(tokens, values);
  2658. }
  2659. }]);
  2660. return BaseFormatter;
  2661. }();
  2662. exports.Formatter = BaseFormatter;
  2663. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2664. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2665. function parse(format, _ref) {
  2666. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2667. startDelimiter = _ref2[0],
  2668. endDelimiter = _ref2[1];
  2669. var tokens = [];
  2670. var position = 0;
  2671. var text = '';
  2672. while (position < format.length) {
  2673. var char = format[position++];
  2674. if (char === startDelimiter) {
  2675. if (text) {
  2676. tokens.push({
  2677. type: 'text',
  2678. value: text
  2679. });
  2680. }
  2681. text = '';
  2682. var sub = '';
  2683. char = format[position++];
  2684. while (char !== undefined && char !== endDelimiter) {
  2685. sub += char;
  2686. char = format[position++];
  2687. }
  2688. var isClosed = char === endDelimiter;
  2689. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2690. tokens.push({
  2691. value: sub,
  2692. type: type
  2693. });
  2694. }
  2695. // else if (char === '%') {
  2696. // // when found rails i18n syntax, skip text capture
  2697. // if (format[position] !== '{') {
  2698. // text += char
  2699. // }
  2700. // }
  2701. else {
  2702. text += char;
  2703. }
  2704. }
  2705. text && tokens.push({
  2706. type: 'text',
  2707. value: text
  2708. });
  2709. return tokens;
  2710. }
  2711. function compile(tokens, values) {
  2712. var compiled = [];
  2713. var index = 0;
  2714. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2715. if (mode === 'unknown') {
  2716. return compiled;
  2717. }
  2718. while (index < tokens.length) {
  2719. var token = tokens[index];
  2720. switch (token.type) {
  2721. case 'text':
  2722. compiled.push(token.value);
  2723. break;
  2724. case 'list':
  2725. compiled.push(values[parseInt(token.value, 10)]);
  2726. break;
  2727. case 'named':
  2728. if (mode === 'named') {
  2729. compiled.push(values[token.value]);
  2730. } else {
  2731. if (true) {
  2732. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2733. }
  2734. }
  2735. break;
  2736. case 'unknown':
  2737. if (true) {
  2738. console.warn("Detect 'unknown' type of token!");
  2739. }
  2740. break;
  2741. }
  2742. index++;
  2743. }
  2744. return compiled;
  2745. }
  2746. var LOCALE_ZH_HANS = 'zh-Hans';
  2747. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2748. var LOCALE_ZH_HANT = 'zh-Hant';
  2749. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2750. var LOCALE_EN = 'en';
  2751. exports.LOCALE_EN = LOCALE_EN;
  2752. var LOCALE_FR = 'fr';
  2753. exports.LOCALE_FR = LOCALE_FR;
  2754. var LOCALE_ES = 'es';
  2755. exports.LOCALE_ES = LOCALE_ES;
  2756. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2757. var hasOwn = function hasOwn(val, key) {
  2758. return hasOwnProperty.call(val, key);
  2759. };
  2760. var defaultFormatter = new BaseFormatter();
  2761. function include(str, parts) {
  2762. return !!parts.find(function (part) {
  2763. return str.indexOf(part) !== -1;
  2764. });
  2765. }
  2766. function startsWith(str, parts) {
  2767. return parts.find(function (part) {
  2768. return str.indexOf(part) === 0;
  2769. });
  2770. }
  2771. function normalizeLocale(locale, messages) {
  2772. if (!locale) {
  2773. return;
  2774. }
  2775. locale = locale.trim().replace(/_/g, '-');
  2776. if (messages && messages[locale]) {
  2777. return locale;
  2778. }
  2779. locale = locale.toLowerCase();
  2780. if (locale === 'chinese') {
  2781. // 支付宝
  2782. return LOCALE_ZH_HANS;
  2783. }
  2784. if (locale.indexOf('zh') === 0) {
  2785. if (locale.indexOf('-hans') > -1) {
  2786. return LOCALE_ZH_HANS;
  2787. }
  2788. if (locale.indexOf('-hant') > -1) {
  2789. return LOCALE_ZH_HANT;
  2790. }
  2791. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2792. return LOCALE_ZH_HANT;
  2793. }
  2794. return LOCALE_ZH_HANS;
  2795. }
  2796. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2797. if (messages && Object.keys(messages).length > 0) {
  2798. locales = Object.keys(messages);
  2799. }
  2800. var lang = startsWith(locale, locales);
  2801. if (lang) {
  2802. return lang;
  2803. }
  2804. }
  2805. var I18n = /*#__PURE__*/function () {
  2806. function I18n(_ref3) {
  2807. var locale = _ref3.locale,
  2808. fallbackLocale = _ref3.fallbackLocale,
  2809. messages = _ref3.messages,
  2810. watcher = _ref3.watcher,
  2811. formater = _ref3.formater;
  2812. (0, _classCallCheck2.default)(this, I18n);
  2813. this.locale = LOCALE_EN;
  2814. this.fallbackLocale = LOCALE_EN;
  2815. this.message = {};
  2816. this.messages = {};
  2817. this.watchers = [];
  2818. if (fallbackLocale) {
  2819. this.fallbackLocale = fallbackLocale;
  2820. }
  2821. this.formater = formater || defaultFormatter;
  2822. this.messages = messages || {};
  2823. this.setLocale(locale || LOCALE_EN);
  2824. if (watcher) {
  2825. this.watchLocale(watcher);
  2826. }
  2827. }
  2828. (0, _createClass2.default)(I18n, [{
  2829. key: "setLocale",
  2830. value: function setLocale(locale) {
  2831. var _this = this;
  2832. var oldLocale = this.locale;
  2833. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2834. if (!this.messages[this.locale]) {
  2835. // 可能初始化时不存在
  2836. this.messages[this.locale] = {};
  2837. }
  2838. this.message = this.messages[this.locale];
  2839. // 仅发生变化时,通知
  2840. if (oldLocale !== this.locale) {
  2841. this.watchers.forEach(function (watcher) {
  2842. watcher(_this.locale, oldLocale);
  2843. });
  2844. }
  2845. }
  2846. }, {
  2847. key: "getLocale",
  2848. value: function getLocale() {
  2849. return this.locale;
  2850. }
  2851. }, {
  2852. key: "watchLocale",
  2853. value: function watchLocale(fn) {
  2854. var _this2 = this;
  2855. var index = this.watchers.push(fn) - 1;
  2856. return function () {
  2857. _this2.watchers.splice(index, 1);
  2858. };
  2859. }
  2860. }, {
  2861. key: "add",
  2862. value: function add(locale, message) {
  2863. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2864. var curMessages = this.messages[locale];
  2865. if (curMessages) {
  2866. if (override) {
  2867. Object.assign(curMessages, message);
  2868. } else {
  2869. Object.keys(message).forEach(function (key) {
  2870. if (!hasOwn(curMessages, key)) {
  2871. curMessages[key] = message[key];
  2872. }
  2873. });
  2874. }
  2875. } else {
  2876. this.messages[locale] = message;
  2877. }
  2878. }
  2879. }, {
  2880. key: "f",
  2881. value: function f(message, values, delimiters) {
  2882. return this.formater.interpolate(message, values, delimiters).join('');
  2883. }
  2884. }, {
  2885. key: "t",
  2886. value: function t(key, locale, values) {
  2887. var message = this.message;
  2888. if (typeof locale === 'string') {
  2889. locale = normalizeLocale(locale, this.messages);
  2890. locale && (message = this.messages[locale]);
  2891. } else {
  2892. values = locale;
  2893. }
  2894. if (!hasOwn(message, key)) {
  2895. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2896. return key;
  2897. }
  2898. return this.formater.interpolate(message[key], values).join('');
  2899. }
  2900. }]);
  2901. return I18n;
  2902. }();
  2903. exports.I18n = I18n;
  2904. function watchAppLocale(appVm, i18n) {
  2905. // 需要保证 watch 的触发在组件渲染之前
  2906. if (appVm.$watchLocale) {
  2907. // vue2
  2908. appVm.$watchLocale(function (newLocale) {
  2909. i18n.setLocale(newLocale);
  2910. });
  2911. } else {
  2912. appVm.$watch(function () {
  2913. return appVm.$locale;
  2914. }, function (newLocale) {
  2915. i18n.setLocale(newLocale);
  2916. });
  2917. }
  2918. }
  2919. function getDefaultLocale() {
  2920. if (typeof uni !== 'undefined' && uni.getLocale) {
  2921. return uni.getLocale();
  2922. }
  2923. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2924. if (typeof global !== 'undefined' && global.getLocale) {
  2925. return global.getLocale();
  2926. }
  2927. return LOCALE_EN;
  2928. }
  2929. function initVueI18n(locale) {
  2930. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2931. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  2932. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2933. // 兼容旧版本入参
  2934. if (typeof locale !== 'string') {
  2935. var _ref4 = [messages, locale];
  2936. locale = _ref4[0];
  2937. messages = _ref4[1];
  2938. }
  2939. if (typeof locale !== 'string') {
  2940. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2941. locale = getDefaultLocale();
  2942. }
  2943. if (typeof fallbackLocale !== 'string') {
  2944. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  2945. }
  2946. var i18n = new I18n({
  2947. locale: locale,
  2948. fallbackLocale: fallbackLocale,
  2949. messages: messages,
  2950. watcher: watcher
  2951. });
  2952. var _t = function t(key, values) {
  2953. if (typeof getApp !== 'function') {
  2954. // app view
  2955. /* eslint-disable no-func-assign */
  2956. _t = function t(key, values) {
  2957. return i18n.t(key, values);
  2958. };
  2959. } else {
  2960. var isWatchedAppLocale = false;
  2961. _t = function t(key, values) {
  2962. var appVm = getApp().$vm;
  2963. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2964. // options: {
  2965. // type: Array,
  2966. // default () {
  2967. // return [{
  2968. // icon: 'shop',
  2969. // text: t("uni-goods-nav.options.shop"),
  2970. // }, {
  2971. // icon: 'cart',
  2972. // text: t("uni-goods-nav.options.cart")
  2973. // }]
  2974. // }
  2975. // },
  2976. if (appVm) {
  2977. // 触发响应式
  2978. appVm.$locale;
  2979. if (!isWatchedAppLocale) {
  2980. isWatchedAppLocale = true;
  2981. watchAppLocale(appVm, i18n);
  2982. }
  2983. }
  2984. return i18n.t(key, values);
  2985. };
  2986. }
  2987. return _t(key, values);
  2988. };
  2989. return {
  2990. i18n: i18n,
  2991. f: function f(message, values, delimiters) {
  2992. return i18n.f(message, values, delimiters);
  2993. },
  2994. t: function t(key, values) {
  2995. return _t(key, values);
  2996. },
  2997. add: function add(locale, message) {
  2998. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2999. return i18n.add(locale, message, override);
  3000. },
  3001. watch: function watch(fn) {
  3002. return i18n.watchLocale(fn);
  3003. },
  3004. getLocale: function getLocale() {
  3005. return i18n.getLocale();
  3006. },
  3007. setLocale: function setLocale(newLocale) {
  3008. return i18n.setLocale(newLocale);
  3009. }
  3010. };
  3011. }
  3012. var isString = function isString(val) {
  3013. return typeof val === 'string';
  3014. };
  3015. exports.isString = isString;
  3016. var formater;
  3017. function hasI18nJson(jsonObj, delimiters) {
  3018. if (!formater) {
  3019. formater = new BaseFormatter();
  3020. }
  3021. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3022. var value = jsonObj[key];
  3023. if (isString(value)) {
  3024. if (isI18nStr(value, delimiters)) {
  3025. return true;
  3026. }
  3027. } else {
  3028. return hasI18nJson(value, delimiters);
  3029. }
  3030. });
  3031. }
  3032. function parseI18nJson(jsonObj, values, delimiters) {
  3033. if (!formater) {
  3034. formater = new BaseFormatter();
  3035. }
  3036. walkJsonObj(jsonObj, function (jsonObj, key) {
  3037. var value = jsonObj[key];
  3038. if (isString(value)) {
  3039. if (isI18nStr(value, delimiters)) {
  3040. jsonObj[key] = compileStr(value, values, delimiters);
  3041. }
  3042. } else {
  3043. parseI18nJson(value, values, delimiters);
  3044. }
  3045. });
  3046. return jsonObj;
  3047. }
  3048. function compileI18nJsonStr(jsonStr, _ref5) {
  3049. var locale = _ref5.locale,
  3050. locales = _ref5.locales,
  3051. delimiters = _ref5.delimiters;
  3052. if (!isI18nStr(jsonStr, delimiters)) {
  3053. return jsonStr;
  3054. }
  3055. if (!formater) {
  3056. formater = new BaseFormatter();
  3057. }
  3058. var localeValues = [];
  3059. Object.keys(locales).forEach(function (name) {
  3060. if (name !== locale) {
  3061. localeValues.push({
  3062. locale: name,
  3063. values: locales[name]
  3064. });
  3065. }
  3066. });
  3067. localeValues.unshift({
  3068. locale: locale,
  3069. values: locales[locale]
  3070. });
  3071. try {
  3072. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3073. } catch (e) {}
  3074. return jsonStr;
  3075. }
  3076. function isI18nStr(value, delimiters) {
  3077. return value.indexOf(delimiters[0]) > -1;
  3078. }
  3079. function compileStr(value, values, delimiters) {
  3080. return formater.interpolate(value, values, delimiters).join('');
  3081. }
  3082. function compileValue(jsonObj, key, localeValues, delimiters) {
  3083. var value = jsonObj[key];
  3084. if (isString(value)) {
  3085. // 存在国际化
  3086. if (isI18nStr(value, delimiters)) {
  3087. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3088. if (localeValues.length > 1) {
  3089. // 格式化国际化语言
  3090. var valueLocales = jsonObj[key + 'Locales'] = {};
  3091. localeValues.forEach(function (localValue) {
  3092. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3093. });
  3094. }
  3095. }
  3096. } else {
  3097. compileJsonObj(value, localeValues, delimiters);
  3098. }
  3099. }
  3100. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3101. walkJsonObj(jsonObj, function (jsonObj, key) {
  3102. compileValue(jsonObj, key, localeValues, delimiters);
  3103. });
  3104. return jsonObj;
  3105. }
  3106. function walkJsonObj(jsonObj, walk) {
  3107. if (Array.isArray(jsonObj)) {
  3108. for (var i = 0; i < jsonObj.length; i++) {
  3109. if (walk(jsonObj, i)) {
  3110. return true;
  3111. }
  3112. }
  3113. } else if (isObject(jsonObj)) {
  3114. for (var key in jsonObj) {
  3115. if (walk(jsonObj, key)) {
  3116. return true;
  3117. }
  3118. }
  3119. }
  3120. return false;
  3121. }
  3122. function resolveLocale(locales) {
  3123. return function (locale) {
  3124. if (!locale) {
  3125. return locale;
  3126. }
  3127. locale = normalizeLocale(locale) || locale;
  3128. return resolveLocaleChain(locale).find(function (locale) {
  3129. return locales.indexOf(locale) > -1;
  3130. });
  3131. };
  3132. }
  3133. function resolveLocaleChain(locale) {
  3134. var chain = [];
  3135. var tokens = locale.split('-');
  3136. while (tokens.length) {
  3137. chain.push(tokens.join('-'));
  3138. tokens.pop();
  3139. }
  3140. return chain;
  3141. }
  3142. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3143. /***/ }),
  3144. /***/ 229:
  3145. /*!**************************************************************************************************************!*\
  3146. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-icons/icons.js ***!
  3147. \**************************************************************************************************************/
  3148. /*! no static exports found */
  3149. /***/ (function(module, exports, __webpack_require__) {
  3150. "use strict";
  3151. Object.defineProperty(exports, "__esModule", {
  3152. value: true
  3153. });
  3154. exports.default = void 0;
  3155. var _default = {
  3156. "id": "2852637",
  3157. "name": "uniui图标库",
  3158. "font_family": "uniicons",
  3159. "css_prefix_text": "uniui-",
  3160. "description": "",
  3161. "glyphs": [{
  3162. "icon_id": "25027049",
  3163. "name": "yanse",
  3164. "font_class": "color",
  3165. "unicode": "e6cf",
  3166. "unicode_decimal": 59087
  3167. }, {
  3168. "icon_id": "25027048",
  3169. "name": "wallet",
  3170. "font_class": "wallet",
  3171. "unicode": "e6b1",
  3172. "unicode_decimal": 59057
  3173. }, {
  3174. "icon_id": "25015720",
  3175. "name": "settings-filled",
  3176. "font_class": "settings-filled",
  3177. "unicode": "e6ce",
  3178. "unicode_decimal": 59086
  3179. }, {
  3180. "icon_id": "25015434",
  3181. "name": "shimingrenzheng-filled",
  3182. "font_class": "auth-filled",
  3183. "unicode": "e6cc",
  3184. "unicode_decimal": 59084
  3185. }, {
  3186. "icon_id": "24934246",
  3187. "name": "shop-filled",
  3188. "font_class": "shop-filled",
  3189. "unicode": "e6cd",
  3190. "unicode_decimal": 59085
  3191. }, {
  3192. "icon_id": "24934159",
  3193. "name": "staff-filled-01",
  3194. "font_class": "staff-filled",
  3195. "unicode": "e6cb",
  3196. "unicode_decimal": 59083
  3197. }, {
  3198. "icon_id": "24932461",
  3199. "name": "VIP-filled",
  3200. "font_class": "vip-filled",
  3201. "unicode": "e6c6",
  3202. "unicode_decimal": 59078
  3203. }, {
  3204. "icon_id": "24932462",
  3205. "name": "plus_circle_fill",
  3206. "font_class": "plus-filled",
  3207. "unicode": "e6c7",
  3208. "unicode_decimal": 59079
  3209. }, {
  3210. "icon_id": "24932463",
  3211. "name": "folder_add-filled",
  3212. "font_class": "folder-add-filled",
  3213. "unicode": "e6c8",
  3214. "unicode_decimal": 59080
  3215. }, {
  3216. "icon_id": "24932464",
  3217. "name": "yanse-filled",
  3218. "font_class": "color-filled",
  3219. "unicode": "e6c9",
  3220. "unicode_decimal": 59081
  3221. }, {
  3222. "icon_id": "24932465",
  3223. "name": "tune-filled",
  3224. "font_class": "tune-filled",
  3225. "unicode": "e6ca",
  3226. "unicode_decimal": 59082
  3227. }, {
  3228. "icon_id": "24932455",
  3229. "name": "a-rilidaka-filled",
  3230. "font_class": "calendar-filled",
  3231. "unicode": "e6c0",
  3232. "unicode_decimal": 59072
  3233. }, {
  3234. "icon_id": "24932456",
  3235. "name": "notification-filled",
  3236. "font_class": "notification-filled",
  3237. "unicode": "e6c1",
  3238. "unicode_decimal": 59073
  3239. }, {
  3240. "icon_id": "24932457",
  3241. "name": "wallet-filled",
  3242. "font_class": "wallet-filled",
  3243. "unicode": "e6c2",
  3244. "unicode_decimal": 59074
  3245. }, {
  3246. "icon_id": "24932458",
  3247. "name": "paihangbang-filled",
  3248. "font_class": "medal-filled",
  3249. "unicode": "e6c3",
  3250. "unicode_decimal": 59075
  3251. }, {
  3252. "icon_id": "24932459",
  3253. "name": "gift-filled",
  3254. "font_class": "gift-filled",
  3255. "unicode": "e6c4",
  3256. "unicode_decimal": 59076
  3257. }, {
  3258. "icon_id": "24932460",
  3259. "name": "fire-filled",
  3260. "font_class": "fire-filled",
  3261. "unicode": "e6c5",
  3262. "unicode_decimal": 59077
  3263. }, {
  3264. "icon_id": "24928001",
  3265. "name": "refreshempty",
  3266. "font_class": "refreshempty",
  3267. "unicode": "e6bf",
  3268. "unicode_decimal": 59071
  3269. }, {
  3270. "icon_id": "24926853",
  3271. "name": "location-ellipse",
  3272. "font_class": "location-filled",
  3273. "unicode": "e6af",
  3274. "unicode_decimal": 59055
  3275. }, {
  3276. "icon_id": "24926735",
  3277. "name": "person-filled",
  3278. "font_class": "person-filled",
  3279. "unicode": "e69d",
  3280. "unicode_decimal": 59037
  3281. }, {
  3282. "icon_id": "24926703",
  3283. "name": "personadd-filled",
  3284. "font_class": "personadd-filled",
  3285. "unicode": "e698",
  3286. "unicode_decimal": 59032
  3287. }, {
  3288. "icon_id": "24923351",
  3289. "name": "back",
  3290. "font_class": "back",
  3291. "unicode": "e6b9",
  3292. "unicode_decimal": 59065
  3293. }, {
  3294. "icon_id": "24923352",
  3295. "name": "forward",
  3296. "font_class": "forward",
  3297. "unicode": "e6ba",
  3298. "unicode_decimal": 59066
  3299. }, {
  3300. "icon_id": "24923353",
  3301. "name": "arrowthinright",
  3302. "font_class": "arrow-right",
  3303. "unicode": "e6bb",
  3304. "unicode_decimal": 59067
  3305. }, {
  3306. "icon_id": "24923353",
  3307. "name": "arrowthinright",
  3308. "font_class": "arrowthinright",
  3309. "unicode": "e6bb",
  3310. "unicode_decimal": 59067
  3311. }, {
  3312. "icon_id": "24923354",
  3313. "name": "arrowthinleft",
  3314. "font_class": "arrow-left",
  3315. "unicode": "e6bc",
  3316. "unicode_decimal": 59068
  3317. }, {
  3318. "icon_id": "24923354",
  3319. "name": "arrowthinleft",
  3320. "font_class": "arrowthinleft",
  3321. "unicode": "e6bc",
  3322. "unicode_decimal": 59068
  3323. }, {
  3324. "icon_id": "24923355",
  3325. "name": "arrowthinup",
  3326. "font_class": "arrow-up",
  3327. "unicode": "e6bd",
  3328. "unicode_decimal": 59069
  3329. }, {
  3330. "icon_id": "24923355",
  3331. "name": "arrowthinup",
  3332. "font_class": "arrowthinup",
  3333. "unicode": "e6bd",
  3334. "unicode_decimal": 59069
  3335. }, {
  3336. "icon_id": "24923356",
  3337. "name": "arrowthindown",
  3338. "font_class": "arrow-down",
  3339. "unicode": "e6be",
  3340. "unicode_decimal": 59070
  3341. }, {
  3342. "icon_id": "24923356",
  3343. "name": "arrowthindown",
  3344. "font_class": "arrowthindown",
  3345. "unicode": "e6be",
  3346. "unicode_decimal": 59070
  3347. }, {
  3348. "icon_id": "24923349",
  3349. "name": "arrowdown",
  3350. "font_class": "bottom",
  3351. "unicode": "e6b8",
  3352. "unicode_decimal": 59064
  3353. }, {
  3354. "icon_id": "24923349",
  3355. "name": "arrowdown",
  3356. "font_class": "arrowdown",
  3357. "unicode": "e6b8",
  3358. "unicode_decimal": 59064
  3359. }, {
  3360. "icon_id": "24923346",
  3361. "name": "arrowright",
  3362. "font_class": "right",
  3363. "unicode": "e6b5",
  3364. "unicode_decimal": 59061
  3365. }, {
  3366. "icon_id": "24923346",
  3367. "name": "arrowright",
  3368. "font_class": "arrowright",
  3369. "unicode": "e6b5",
  3370. "unicode_decimal": 59061
  3371. }, {
  3372. "icon_id": "24923347",
  3373. "name": "arrowup",
  3374. "font_class": "top",
  3375. "unicode": "e6b6",
  3376. "unicode_decimal": 59062
  3377. }, {
  3378. "icon_id": "24923347",
  3379. "name": "arrowup",
  3380. "font_class": "arrowup",
  3381. "unicode": "e6b6",
  3382. "unicode_decimal": 59062
  3383. }, {
  3384. "icon_id": "24923348",
  3385. "name": "arrowleft",
  3386. "font_class": "left",
  3387. "unicode": "e6b7",
  3388. "unicode_decimal": 59063
  3389. }, {
  3390. "icon_id": "24923348",
  3391. "name": "arrowleft",
  3392. "font_class": "arrowleft",
  3393. "unicode": "e6b7",
  3394. "unicode_decimal": 59063
  3395. }, {
  3396. "icon_id": "24923334",
  3397. "name": "eye",
  3398. "font_class": "eye",
  3399. "unicode": "e651",
  3400. "unicode_decimal": 58961
  3401. }, {
  3402. "icon_id": "24923335",
  3403. "name": "eye-filled",
  3404. "font_class": "eye-filled",
  3405. "unicode": "e66a",
  3406. "unicode_decimal": 58986
  3407. }, {
  3408. "icon_id": "24923336",
  3409. "name": "eye-slash",
  3410. "font_class": "eye-slash",
  3411. "unicode": "e6b3",
  3412. "unicode_decimal": 59059
  3413. }, {
  3414. "icon_id": "24923337",
  3415. "name": "eye-slash-filled",
  3416. "font_class": "eye-slash-filled",
  3417. "unicode": "e6b4",
  3418. "unicode_decimal": 59060
  3419. }, {
  3420. "icon_id": "24923305",
  3421. "name": "info-filled",
  3422. "font_class": "info-filled",
  3423. "unicode": "e649",
  3424. "unicode_decimal": 58953
  3425. }, {
  3426. "icon_id": "24923299",
  3427. "name": "reload-01",
  3428. "font_class": "reload",
  3429. "unicode": "e6b2",
  3430. "unicode_decimal": 59058
  3431. }, {
  3432. "icon_id": "24923195",
  3433. "name": "mic_slash_fill",
  3434. "font_class": "micoff-filled",
  3435. "unicode": "e6b0",
  3436. "unicode_decimal": 59056
  3437. }, {
  3438. "icon_id": "24923165",
  3439. "name": "map-pin-ellipse",
  3440. "font_class": "map-pin-ellipse",
  3441. "unicode": "e6ac",
  3442. "unicode_decimal": 59052
  3443. }, {
  3444. "icon_id": "24923166",
  3445. "name": "map-pin",
  3446. "font_class": "map-pin",
  3447. "unicode": "e6ad",
  3448. "unicode_decimal": 59053
  3449. }, {
  3450. "icon_id": "24923167",
  3451. "name": "location",
  3452. "font_class": "location",
  3453. "unicode": "e6ae",
  3454. "unicode_decimal": 59054
  3455. }, {
  3456. "icon_id": "24923064",
  3457. "name": "starhalf",
  3458. "font_class": "starhalf",
  3459. "unicode": "e683",
  3460. "unicode_decimal": 59011
  3461. }, {
  3462. "icon_id": "24923065",
  3463. "name": "star",
  3464. "font_class": "star",
  3465. "unicode": "e688",
  3466. "unicode_decimal": 59016
  3467. }, {
  3468. "icon_id": "24923066",
  3469. "name": "star-filled",
  3470. "font_class": "star-filled",
  3471. "unicode": "e68f",
  3472. "unicode_decimal": 59023
  3473. }, {
  3474. "icon_id": "24899646",
  3475. "name": "a-rilidaka",
  3476. "font_class": "calendar",
  3477. "unicode": "e6a0",
  3478. "unicode_decimal": 59040
  3479. }, {
  3480. "icon_id": "24899647",
  3481. "name": "fire",
  3482. "font_class": "fire",
  3483. "unicode": "e6a1",
  3484. "unicode_decimal": 59041
  3485. }, {
  3486. "icon_id": "24899648",
  3487. "name": "paihangbang",
  3488. "font_class": "medal",
  3489. "unicode": "e6a2",
  3490. "unicode_decimal": 59042
  3491. }, {
  3492. "icon_id": "24899649",
  3493. "name": "font",
  3494. "font_class": "font",
  3495. "unicode": "e6a3",
  3496. "unicode_decimal": 59043
  3497. }, {
  3498. "icon_id": "24899650",
  3499. "name": "gift",
  3500. "font_class": "gift",
  3501. "unicode": "e6a4",
  3502. "unicode_decimal": 59044
  3503. }, {
  3504. "icon_id": "24899651",
  3505. "name": "link",
  3506. "font_class": "link",
  3507. "unicode": "e6a5",
  3508. "unicode_decimal": 59045
  3509. }, {
  3510. "icon_id": "24899652",
  3511. "name": "notification",
  3512. "font_class": "notification",
  3513. "unicode": "e6a6",
  3514. "unicode_decimal": 59046
  3515. }, {
  3516. "icon_id": "24899653",
  3517. "name": "staff",
  3518. "font_class": "staff",
  3519. "unicode": "e6a7",
  3520. "unicode_decimal": 59047
  3521. }, {
  3522. "icon_id": "24899654",
  3523. "name": "VIP",
  3524. "font_class": "vip",
  3525. "unicode": "e6a8",
  3526. "unicode_decimal": 59048
  3527. }, {
  3528. "icon_id": "24899655",
  3529. "name": "folder_add",
  3530. "font_class": "folder-add",
  3531. "unicode": "e6a9",
  3532. "unicode_decimal": 59049
  3533. }, {
  3534. "icon_id": "24899656",
  3535. "name": "tune",
  3536. "font_class": "tune",
  3537. "unicode": "e6aa",
  3538. "unicode_decimal": 59050
  3539. }, {
  3540. "icon_id": "24899657",
  3541. "name": "shimingrenzheng",
  3542. "font_class": "auth",
  3543. "unicode": "e6ab",
  3544. "unicode_decimal": 59051
  3545. }, {
  3546. "icon_id": "24899565",
  3547. "name": "person",
  3548. "font_class": "person",
  3549. "unicode": "e699",
  3550. "unicode_decimal": 59033
  3551. }, {
  3552. "icon_id": "24899566",
  3553. "name": "email-filled",
  3554. "font_class": "email-filled",
  3555. "unicode": "e69a",
  3556. "unicode_decimal": 59034
  3557. }, {
  3558. "icon_id": "24899567",
  3559. "name": "phone-filled",
  3560. "font_class": "phone-filled",
  3561. "unicode": "e69b",
  3562. "unicode_decimal": 59035
  3563. }, {
  3564. "icon_id": "24899568",
  3565. "name": "phone",
  3566. "font_class": "phone",
  3567. "unicode": "e69c",
  3568. "unicode_decimal": 59036
  3569. }, {
  3570. "icon_id": "24899570",
  3571. "name": "email",
  3572. "font_class": "email",
  3573. "unicode": "e69e",
  3574. "unicode_decimal": 59038
  3575. }, {
  3576. "icon_id": "24899571",
  3577. "name": "personadd",
  3578. "font_class": "personadd",
  3579. "unicode": "e69f",
  3580. "unicode_decimal": 59039
  3581. }, {
  3582. "icon_id": "24899558",
  3583. "name": "chatboxes-filled",
  3584. "font_class": "chatboxes-filled",
  3585. "unicode": "e692",
  3586. "unicode_decimal": 59026
  3587. }, {
  3588. "icon_id": "24899559",
  3589. "name": "contact",
  3590. "font_class": "contact",
  3591. "unicode": "e693",
  3592. "unicode_decimal": 59027
  3593. }, {
  3594. "icon_id": "24899560",
  3595. "name": "chatbubble-filled",
  3596. "font_class": "chatbubble-filled",
  3597. "unicode": "e694",
  3598. "unicode_decimal": 59028
  3599. }, {
  3600. "icon_id": "24899561",
  3601. "name": "contact-filled",
  3602. "font_class": "contact-filled",
  3603. "unicode": "e695",
  3604. "unicode_decimal": 59029
  3605. }, {
  3606. "icon_id": "24899562",
  3607. "name": "chatboxes",
  3608. "font_class": "chatboxes",
  3609. "unicode": "e696",
  3610. "unicode_decimal": 59030
  3611. }, {
  3612. "icon_id": "24899563",
  3613. "name": "chatbubble",
  3614. "font_class": "chatbubble",
  3615. "unicode": "e697",
  3616. "unicode_decimal": 59031
  3617. }, {
  3618. "icon_id": "24881290",
  3619. "name": "upload-filled",
  3620. "font_class": "upload-filled",
  3621. "unicode": "e68e",
  3622. "unicode_decimal": 59022
  3623. }, {
  3624. "icon_id": "24881292",
  3625. "name": "upload",
  3626. "font_class": "upload",
  3627. "unicode": "e690",
  3628. "unicode_decimal": 59024
  3629. }, {
  3630. "icon_id": "24881293",
  3631. "name": "weixin",
  3632. "font_class": "weixin",
  3633. "unicode": "e691",
  3634. "unicode_decimal": 59025
  3635. }, {
  3636. "icon_id": "24881274",
  3637. "name": "compose",
  3638. "font_class": "compose",
  3639. "unicode": "e67f",
  3640. "unicode_decimal": 59007
  3641. }, {
  3642. "icon_id": "24881275",
  3643. "name": "qq",
  3644. "font_class": "qq",
  3645. "unicode": "e680",
  3646. "unicode_decimal": 59008
  3647. }, {
  3648. "icon_id": "24881276",
  3649. "name": "download-filled",
  3650. "font_class": "download-filled",
  3651. "unicode": "e681",
  3652. "unicode_decimal": 59009
  3653. }, {
  3654. "icon_id": "24881277",
  3655. "name": "pengyouquan",
  3656. "font_class": "pyq",
  3657. "unicode": "e682",
  3658. "unicode_decimal": 59010
  3659. }, {
  3660. "icon_id": "24881279",
  3661. "name": "sound",
  3662. "font_class": "sound",
  3663. "unicode": "e684",
  3664. "unicode_decimal": 59012
  3665. }, {
  3666. "icon_id": "24881280",
  3667. "name": "trash-filled",
  3668. "font_class": "trash-filled",
  3669. "unicode": "e685",
  3670. "unicode_decimal": 59013
  3671. }, {
  3672. "icon_id": "24881281",
  3673. "name": "sound-filled",
  3674. "font_class": "sound-filled",
  3675. "unicode": "e686",
  3676. "unicode_decimal": 59014
  3677. }, {
  3678. "icon_id": "24881282",
  3679. "name": "trash",
  3680. "font_class": "trash",
  3681. "unicode": "e687",
  3682. "unicode_decimal": 59015
  3683. }, {
  3684. "icon_id": "24881284",
  3685. "name": "videocam-filled",
  3686. "font_class": "videocam-filled",
  3687. "unicode": "e689",
  3688. "unicode_decimal": 59017
  3689. }, {
  3690. "icon_id": "24881285",
  3691. "name": "spinner-cycle",
  3692. "font_class": "spinner-cycle",
  3693. "unicode": "e68a",
  3694. "unicode_decimal": 59018
  3695. }, {
  3696. "icon_id": "24881286",
  3697. "name": "weibo",
  3698. "font_class": "weibo",
  3699. "unicode": "e68b",
  3700. "unicode_decimal": 59019
  3701. }, {
  3702. "icon_id": "24881288",
  3703. "name": "videocam",
  3704. "font_class": "videocam",
  3705. "unicode": "e68c",
  3706. "unicode_decimal": 59020
  3707. }, {
  3708. "icon_id": "24881289",
  3709. "name": "download",
  3710. "font_class": "download",
  3711. "unicode": "e68d",
  3712. "unicode_decimal": 59021
  3713. }, {
  3714. "icon_id": "24879601",
  3715. "name": "help",
  3716. "font_class": "help",
  3717. "unicode": "e679",
  3718. "unicode_decimal": 59001
  3719. }, {
  3720. "icon_id": "24879602",
  3721. "name": "navigate-filled",
  3722. "font_class": "navigate-filled",
  3723. "unicode": "e67a",
  3724. "unicode_decimal": 59002
  3725. }, {
  3726. "icon_id": "24879603",
  3727. "name": "plusempty",
  3728. "font_class": "plusempty",
  3729. "unicode": "e67b",
  3730. "unicode_decimal": 59003
  3731. }, {
  3732. "icon_id": "24879604",
  3733. "name": "smallcircle",
  3734. "font_class": "smallcircle",
  3735. "unicode": "e67c",
  3736. "unicode_decimal": 59004
  3737. }, {
  3738. "icon_id": "24879605",
  3739. "name": "minus-filled",
  3740. "font_class": "minus-filled",
  3741. "unicode": "e67d",
  3742. "unicode_decimal": 59005
  3743. }, {
  3744. "icon_id": "24879606",
  3745. "name": "micoff",
  3746. "font_class": "micoff",
  3747. "unicode": "e67e",
  3748. "unicode_decimal": 59006
  3749. }, {
  3750. "icon_id": "24879588",
  3751. "name": "closeempty",
  3752. "font_class": "closeempty",
  3753. "unicode": "e66c",
  3754. "unicode_decimal": 58988
  3755. }, {
  3756. "icon_id": "24879589",
  3757. "name": "clear",
  3758. "font_class": "clear",
  3759. "unicode": "e66d",
  3760. "unicode_decimal": 58989
  3761. }, {
  3762. "icon_id": "24879590",
  3763. "name": "navigate",
  3764. "font_class": "navigate",
  3765. "unicode": "e66e",
  3766. "unicode_decimal": 58990
  3767. }, {
  3768. "icon_id": "24879591",
  3769. "name": "minus",
  3770. "font_class": "minus",
  3771. "unicode": "e66f",
  3772. "unicode_decimal": 58991
  3773. }, {
  3774. "icon_id": "24879592",
  3775. "name": "image",
  3776. "font_class": "image",
  3777. "unicode": "e670",
  3778. "unicode_decimal": 58992
  3779. }, {
  3780. "icon_id": "24879593",
  3781. "name": "mic",
  3782. "font_class": "mic",
  3783. "unicode": "e671",
  3784. "unicode_decimal": 58993
  3785. }, {
  3786. "icon_id": "24879594",
  3787. "name": "paperplane",
  3788. "font_class": "paperplane",
  3789. "unicode": "e672",
  3790. "unicode_decimal": 58994
  3791. }, {
  3792. "icon_id": "24879595",
  3793. "name": "close",
  3794. "font_class": "close",
  3795. "unicode": "e673",
  3796. "unicode_decimal": 58995
  3797. }, {
  3798. "icon_id": "24879596",
  3799. "name": "help-filled",
  3800. "font_class": "help-filled",
  3801. "unicode": "e674",
  3802. "unicode_decimal": 58996
  3803. }, {
  3804. "icon_id": "24879597",
  3805. "name": "plus-filled",
  3806. "font_class": "paperplane-filled",
  3807. "unicode": "e675",
  3808. "unicode_decimal": 58997
  3809. }, {
  3810. "icon_id": "24879598",
  3811. "name": "plus",
  3812. "font_class": "plus",
  3813. "unicode": "e676",
  3814. "unicode_decimal": 58998
  3815. }, {
  3816. "icon_id": "24879599",
  3817. "name": "mic-filled",
  3818. "font_class": "mic-filled",
  3819. "unicode": "e677",
  3820. "unicode_decimal": 58999
  3821. }, {
  3822. "icon_id": "24879600",
  3823. "name": "image-filled",
  3824. "font_class": "image-filled",
  3825. "unicode": "e678",
  3826. "unicode_decimal": 59000
  3827. }, {
  3828. "icon_id": "24855900",
  3829. "name": "locked-filled",
  3830. "font_class": "locked-filled",
  3831. "unicode": "e668",
  3832. "unicode_decimal": 58984
  3833. }, {
  3834. "icon_id": "24855901",
  3835. "name": "info",
  3836. "font_class": "info",
  3837. "unicode": "e669",
  3838. "unicode_decimal": 58985
  3839. }, {
  3840. "icon_id": "24855903",
  3841. "name": "locked",
  3842. "font_class": "locked",
  3843. "unicode": "e66b",
  3844. "unicode_decimal": 58987
  3845. }, {
  3846. "icon_id": "24855884",
  3847. "name": "camera-filled",
  3848. "font_class": "camera-filled",
  3849. "unicode": "e658",
  3850. "unicode_decimal": 58968
  3851. }, {
  3852. "icon_id": "24855885",
  3853. "name": "chat-filled",
  3854. "font_class": "chat-filled",
  3855. "unicode": "e659",
  3856. "unicode_decimal": 58969
  3857. }, {
  3858. "icon_id": "24855886",
  3859. "name": "camera",
  3860. "font_class": "camera",
  3861. "unicode": "e65a",
  3862. "unicode_decimal": 58970
  3863. }, {
  3864. "icon_id": "24855887",
  3865. "name": "circle",
  3866. "font_class": "circle",
  3867. "unicode": "e65b",
  3868. "unicode_decimal": 58971
  3869. }, {
  3870. "icon_id": "24855888",
  3871. "name": "checkmarkempty",
  3872. "font_class": "checkmarkempty",
  3873. "unicode": "e65c",
  3874. "unicode_decimal": 58972
  3875. }, {
  3876. "icon_id": "24855889",
  3877. "name": "chat",
  3878. "font_class": "chat",
  3879. "unicode": "e65d",
  3880. "unicode_decimal": 58973
  3881. }, {
  3882. "icon_id": "24855890",
  3883. "name": "circle-filled",
  3884. "font_class": "circle-filled",
  3885. "unicode": "e65e",
  3886. "unicode_decimal": 58974
  3887. }, {
  3888. "icon_id": "24855891",
  3889. "name": "flag",
  3890. "font_class": "flag",
  3891. "unicode": "e65f",
  3892. "unicode_decimal": 58975
  3893. }, {
  3894. "icon_id": "24855892",
  3895. "name": "flag-filled",
  3896. "font_class": "flag-filled",
  3897. "unicode": "e660",
  3898. "unicode_decimal": 58976
  3899. }, {
  3900. "icon_id": "24855893",
  3901. "name": "gear-filled",
  3902. "font_class": "gear-filled",
  3903. "unicode": "e661",
  3904. "unicode_decimal": 58977
  3905. }, {
  3906. "icon_id": "24855894",
  3907. "name": "home",
  3908. "font_class": "home",
  3909. "unicode": "e662",
  3910. "unicode_decimal": 58978
  3911. }, {
  3912. "icon_id": "24855895",
  3913. "name": "home-filled",
  3914. "font_class": "home-filled",
  3915. "unicode": "e663",
  3916. "unicode_decimal": 58979
  3917. }, {
  3918. "icon_id": "24855896",
  3919. "name": "gear",
  3920. "font_class": "gear",
  3921. "unicode": "e664",
  3922. "unicode_decimal": 58980
  3923. }, {
  3924. "icon_id": "24855897",
  3925. "name": "smallcircle-filled",
  3926. "font_class": "smallcircle-filled",
  3927. "unicode": "e665",
  3928. "unicode_decimal": 58981
  3929. }, {
  3930. "icon_id": "24855898",
  3931. "name": "map-filled",
  3932. "font_class": "map-filled",
  3933. "unicode": "e666",
  3934. "unicode_decimal": 58982
  3935. }, {
  3936. "icon_id": "24855899",
  3937. "name": "map",
  3938. "font_class": "map",
  3939. "unicode": "e667",
  3940. "unicode_decimal": 58983
  3941. }, {
  3942. "icon_id": "24855825",
  3943. "name": "refresh-filled",
  3944. "font_class": "refresh-filled",
  3945. "unicode": "e656",
  3946. "unicode_decimal": 58966
  3947. }, {
  3948. "icon_id": "24855826",
  3949. "name": "refresh",
  3950. "font_class": "refresh",
  3951. "unicode": "e657",
  3952. "unicode_decimal": 58967
  3953. }, {
  3954. "icon_id": "24855808",
  3955. "name": "cloud-upload",
  3956. "font_class": "cloud-upload",
  3957. "unicode": "e645",
  3958. "unicode_decimal": 58949
  3959. }, {
  3960. "icon_id": "24855809",
  3961. "name": "cloud-download-filled",
  3962. "font_class": "cloud-download-filled",
  3963. "unicode": "e646",
  3964. "unicode_decimal": 58950
  3965. }, {
  3966. "icon_id": "24855810",
  3967. "name": "cloud-download",
  3968. "font_class": "cloud-download",
  3969. "unicode": "e647",
  3970. "unicode_decimal": 58951
  3971. }, {
  3972. "icon_id": "24855811",
  3973. "name": "cloud-upload-filled",
  3974. "font_class": "cloud-upload-filled",
  3975. "unicode": "e648",
  3976. "unicode_decimal": 58952
  3977. }, {
  3978. "icon_id": "24855813",
  3979. "name": "redo",
  3980. "font_class": "redo",
  3981. "unicode": "e64a",
  3982. "unicode_decimal": 58954
  3983. }, {
  3984. "icon_id": "24855814",
  3985. "name": "images-filled",
  3986. "font_class": "images-filled",
  3987. "unicode": "e64b",
  3988. "unicode_decimal": 58955
  3989. }, {
  3990. "icon_id": "24855815",
  3991. "name": "undo-filled",
  3992. "font_class": "undo-filled",
  3993. "unicode": "e64c",
  3994. "unicode_decimal": 58956
  3995. }, {
  3996. "icon_id": "24855816",
  3997. "name": "more",
  3998. "font_class": "more",
  3999. "unicode": "e64d",
  4000. "unicode_decimal": 58957
  4001. }, {
  4002. "icon_id": "24855817",
  4003. "name": "more-filled",
  4004. "font_class": "more-filled",
  4005. "unicode": "e64e",
  4006. "unicode_decimal": 58958
  4007. }, {
  4008. "icon_id": "24855818",
  4009. "name": "undo",
  4010. "font_class": "undo",
  4011. "unicode": "e64f",
  4012. "unicode_decimal": 58959
  4013. }, {
  4014. "icon_id": "24855819",
  4015. "name": "images",
  4016. "font_class": "images",
  4017. "unicode": "e650",
  4018. "unicode_decimal": 58960
  4019. }, {
  4020. "icon_id": "24855821",
  4021. "name": "paperclip",
  4022. "font_class": "paperclip",
  4023. "unicode": "e652",
  4024. "unicode_decimal": 58962
  4025. }, {
  4026. "icon_id": "24855822",
  4027. "name": "settings",
  4028. "font_class": "settings",
  4029. "unicode": "e653",
  4030. "unicode_decimal": 58963
  4031. }, {
  4032. "icon_id": "24855823",
  4033. "name": "search",
  4034. "font_class": "search",
  4035. "unicode": "e654",
  4036. "unicode_decimal": 58964
  4037. }, {
  4038. "icon_id": "24855824",
  4039. "name": "redo-filled",
  4040. "font_class": "redo-filled",
  4041. "unicode": "e655",
  4042. "unicode_decimal": 58965
  4043. }, {
  4044. "icon_id": "24841702",
  4045. "name": "list",
  4046. "font_class": "list",
  4047. "unicode": "e644",
  4048. "unicode_decimal": 58948
  4049. }, {
  4050. "icon_id": "24841489",
  4051. "name": "mail-open-filled",
  4052. "font_class": "mail-open-filled",
  4053. "unicode": "e63a",
  4054. "unicode_decimal": 58938
  4055. }, {
  4056. "icon_id": "24841491",
  4057. "name": "hand-thumbsdown-filled",
  4058. "font_class": "hand-down-filled",
  4059. "unicode": "e63c",
  4060. "unicode_decimal": 58940
  4061. }, {
  4062. "icon_id": "24841492",
  4063. "name": "hand-thumbsdown",
  4064. "font_class": "hand-down",
  4065. "unicode": "e63d",
  4066. "unicode_decimal": 58941
  4067. }, {
  4068. "icon_id": "24841493",
  4069. "name": "hand-thumbsup-filled",
  4070. "font_class": "hand-up-filled",
  4071. "unicode": "e63e",
  4072. "unicode_decimal": 58942
  4073. }, {
  4074. "icon_id": "24841494",
  4075. "name": "hand-thumbsup",
  4076. "font_class": "hand-up",
  4077. "unicode": "e63f",
  4078. "unicode_decimal": 58943
  4079. }, {
  4080. "icon_id": "24841496",
  4081. "name": "heart-filled",
  4082. "font_class": "heart-filled",
  4083. "unicode": "e641",
  4084. "unicode_decimal": 58945
  4085. }, {
  4086. "icon_id": "24841498",
  4087. "name": "mail-open",
  4088. "font_class": "mail-open",
  4089. "unicode": "e643",
  4090. "unicode_decimal": 58947
  4091. }, {
  4092. "icon_id": "24841488",
  4093. "name": "heart",
  4094. "font_class": "heart",
  4095. "unicode": "e639",
  4096. "unicode_decimal": 58937
  4097. }, {
  4098. "icon_id": "24839963",
  4099. "name": "loop",
  4100. "font_class": "loop",
  4101. "unicode": "e633",
  4102. "unicode_decimal": 58931
  4103. }, {
  4104. "icon_id": "24839866",
  4105. "name": "pulldown",
  4106. "font_class": "pulldown",
  4107. "unicode": "e632",
  4108. "unicode_decimal": 58930
  4109. }, {
  4110. "icon_id": "24813798",
  4111. "name": "scan",
  4112. "font_class": "scan",
  4113. "unicode": "e62a",
  4114. "unicode_decimal": 58922
  4115. }, {
  4116. "icon_id": "24813786",
  4117. "name": "bars",
  4118. "font_class": "bars",
  4119. "unicode": "e627",
  4120. "unicode_decimal": 58919
  4121. }, {
  4122. "icon_id": "24813788",
  4123. "name": "cart-filled",
  4124. "font_class": "cart-filled",
  4125. "unicode": "e629",
  4126. "unicode_decimal": 58921
  4127. }, {
  4128. "icon_id": "24813790",
  4129. "name": "checkbox",
  4130. "font_class": "checkbox",
  4131. "unicode": "e62b",
  4132. "unicode_decimal": 58923
  4133. }, {
  4134. "icon_id": "24813791",
  4135. "name": "checkbox-filled",
  4136. "font_class": "checkbox-filled",
  4137. "unicode": "e62c",
  4138. "unicode_decimal": 58924
  4139. }, {
  4140. "icon_id": "24813794",
  4141. "name": "shop",
  4142. "font_class": "shop",
  4143. "unicode": "e62f",
  4144. "unicode_decimal": 58927
  4145. }, {
  4146. "icon_id": "24813795",
  4147. "name": "headphones",
  4148. "font_class": "headphones",
  4149. "unicode": "e630",
  4150. "unicode_decimal": 58928
  4151. }, {
  4152. "icon_id": "24813796",
  4153. "name": "cart",
  4154. "font_class": "cart",
  4155. "unicode": "e631",
  4156. "unicode_decimal": 58929
  4157. }]
  4158. };
  4159. exports.default = _default;
  4160. /***/ }),
  4161. /***/ 23:
  4162. /*!***************************************************************!*\
  4163. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4164. \***************************************************************/
  4165. /*! no static exports found */
  4166. /***/ (function(module, exports) {
  4167. function _classCallCheck(instance, Constructor) {
  4168. if (!(instance instanceof Constructor)) {
  4169. throw new TypeError("Cannot call a class as a function");
  4170. }
  4171. }
  4172. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4173. /***/ }),
  4174. /***/ 237:
  4175. /*!************************************************************************************************************************!*\
  4176. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/index.js ***!
  4177. \************************************************************************************************************************/
  4178. /*! no static exports found */
  4179. /***/ (function(module, exports, __webpack_require__) {
  4180. "use strict";
  4181. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  4182. Object.defineProperty(exports, "__esModule", {
  4183. value: true
  4184. });
  4185. exports.default = void 0;
  4186. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 238));
  4187. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 239));
  4188. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 240));
  4189. var _default = {
  4190. en: _en.default,
  4191. 'zh-Hans': _zhHans.default,
  4192. 'zh-Hant': _zhHant.default
  4193. };
  4194. exports.default = _default;
  4195. /***/ }),
  4196. /***/ 238:
  4197. /*!***********************************************************************************************************************!*\
  4198. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/en.json ***!
  4199. \***********************************************************************************************************************/
  4200. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4201. /***/ (function(module) {
  4202. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"Search enter content\"}");
  4203. /***/ }),
  4204. /***/ 239:
  4205. /*!****************************************************************************************************************************!*\
  4206. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json ***!
  4207. \****************************************************************************************************************************/
  4208. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4209. /***/ (function(module) {
  4210. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"请输入搜索内容\"}");
  4211. /***/ }),
  4212. /***/ 24:
  4213. /*!************************************************************!*\
  4214. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4215. \************************************************************/
  4216. /*! no static exports found */
  4217. /***/ (function(module, exports, __webpack_require__) {
  4218. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4219. function _defineProperties(target, props) {
  4220. for (var i = 0; i < props.length; i++) {
  4221. var descriptor = props[i];
  4222. descriptor.enumerable = descriptor.enumerable || false;
  4223. descriptor.configurable = true;
  4224. if ("value" in descriptor) descriptor.writable = true;
  4225. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4226. }
  4227. }
  4228. function _createClass(Constructor, protoProps, staticProps) {
  4229. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4230. if (staticProps) _defineProperties(Constructor, staticProps);
  4231. Object.defineProperty(Constructor, "prototype", {
  4232. writable: false
  4233. });
  4234. return Constructor;
  4235. }
  4236. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4237. /***/ }),
  4238. /***/ 240:
  4239. /*!****************************************************************************************************************************!*\
  4240. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json ***!
  4241. \****************************************************************************************************************************/
  4242. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4243. /***/ (function(module) {
  4244. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"請輸入搜索內容\"}");
  4245. /***/ }),
  4246. /***/ 25:
  4247. /*!******************************************************************************************!*\
  4248. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4249. \******************************************************************************************/
  4250. /*! exports provided: default */
  4251. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4252. "use strict";
  4253. __webpack_require__.r(__webpack_exports__);
  4254. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4255. * Vue.js v2.6.11
  4256. * (c) 2014-2023 Evan You
  4257. * Released under the MIT License.
  4258. */
  4259. /* */
  4260. var emptyObject = Object.freeze({});
  4261. // These helpers produce better VM code in JS engines due to their
  4262. // explicitness and function inlining.
  4263. function isUndef (v) {
  4264. return v === undefined || v === null
  4265. }
  4266. function isDef (v) {
  4267. return v !== undefined && v !== null
  4268. }
  4269. function isTrue (v) {
  4270. return v === true
  4271. }
  4272. function isFalse (v) {
  4273. return v === false
  4274. }
  4275. /**
  4276. * Check if value is primitive.
  4277. */
  4278. function isPrimitive (value) {
  4279. return (
  4280. typeof value === 'string' ||
  4281. typeof value === 'number' ||
  4282. // $flow-disable-line
  4283. typeof value === 'symbol' ||
  4284. typeof value === 'boolean'
  4285. )
  4286. }
  4287. /**
  4288. * Quick object check - this is primarily used to tell
  4289. * Objects from primitive values when we know the value
  4290. * is a JSON-compliant type.
  4291. */
  4292. function isObject (obj) {
  4293. return obj !== null && typeof obj === 'object'
  4294. }
  4295. /**
  4296. * Get the raw type string of a value, e.g., [object Object].
  4297. */
  4298. var _toString = Object.prototype.toString;
  4299. function toRawType (value) {
  4300. return _toString.call(value).slice(8, -1)
  4301. }
  4302. /**
  4303. * Strict object type check. Only returns true
  4304. * for plain JavaScript objects.
  4305. */
  4306. function isPlainObject (obj) {
  4307. return _toString.call(obj) === '[object Object]'
  4308. }
  4309. function isRegExp (v) {
  4310. return _toString.call(v) === '[object RegExp]'
  4311. }
  4312. /**
  4313. * Check if val is a valid array index.
  4314. */
  4315. function isValidArrayIndex (val) {
  4316. var n = parseFloat(String(val));
  4317. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4318. }
  4319. function isPromise (val) {
  4320. return (
  4321. isDef(val) &&
  4322. typeof val.then === 'function' &&
  4323. typeof val.catch === 'function'
  4324. )
  4325. }
  4326. /**
  4327. * Convert a value to a string that is actually rendered.
  4328. */
  4329. function toString (val) {
  4330. return val == null
  4331. ? ''
  4332. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4333. ? JSON.stringify(val, null, 2)
  4334. : String(val)
  4335. }
  4336. /**
  4337. * Convert an input value to a number for persistence.
  4338. * If the conversion fails, return original string.
  4339. */
  4340. function toNumber (val) {
  4341. var n = parseFloat(val);
  4342. return isNaN(n) ? val : n
  4343. }
  4344. /**
  4345. * Make a map and return a function for checking if a key
  4346. * is in that map.
  4347. */
  4348. function makeMap (
  4349. str,
  4350. expectsLowerCase
  4351. ) {
  4352. var map = Object.create(null);
  4353. var list = str.split(',');
  4354. for (var i = 0; i < list.length; i++) {
  4355. map[list[i]] = true;
  4356. }
  4357. return expectsLowerCase
  4358. ? function (val) { return map[val.toLowerCase()]; }
  4359. : function (val) { return map[val]; }
  4360. }
  4361. /**
  4362. * Check if a tag is a built-in tag.
  4363. */
  4364. var isBuiltInTag = makeMap('slot,component', true);
  4365. /**
  4366. * Check if an attribute is a reserved attribute.
  4367. */
  4368. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4369. /**
  4370. * Remove an item from an array.
  4371. */
  4372. function remove (arr, item) {
  4373. if (arr.length) {
  4374. var index = arr.indexOf(item);
  4375. if (index > -1) {
  4376. return arr.splice(index, 1)
  4377. }
  4378. }
  4379. }
  4380. /**
  4381. * Check whether an object has the property.
  4382. */
  4383. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4384. function hasOwn (obj, key) {
  4385. return hasOwnProperty.call(obj, key)
  4386. }
  4387. /**
  4388. * Create a cached version of a pure function.
  4389. */
  4390. function cached (fn) {
  4391. var cache = Object.create(null);
  4392. return (function cachedFn (str) {
  4393. var hit = cache[str];
  4394. return hit || (cache[str] = fn(str))
  4395. })
  4396. }
  4397. /**
  4398. * Camelize a hyphen-delimited string.
  4399. */
  4400. var camelizeRE = /-(\w)/g;
  4401. var camelize = cached(function (str) {
  4402. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4403. });
  4404. /**
  4405. * Capitalize a string.
  4406. */
  4407. var capitalize = cached(function (str) {
  4408. return str.charAt(0).toUpperCase() + str.slice(1)
  4409. });
  4410. /**
  4411. * Hyphenate a camelCase string.
  4412. */
  4413. var hyphenateRE = /\B([A-Z])/g;
  4414. var hyphenate = cached(function (str) {
  4415. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4416. });
  4417. /**
  4418. * Simple bind polyfill for environments that do not support it,
  4419. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4420. * since native bind is now performant enough in most browsers.
  4421. * But removing it would mean breaking code that was able to run in
  4422. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4423. */
  4424. /* istanbul ignore next */
  4425. function polyfillBind (fn, ctx) {
  4426. function boundFn (a) {
  4427. var l = arguments.length;
  4428. return l
  4429. ? l > 1
  4430. ? fn.apply(ctx, arguments)
  4431. : fn.call(ctx, a)
  4432. : fn.call(ctx)
  4433. }
  4434. boundFn._length = fn.length;
  4435. return boundFn
  4436. }
  4437. function nativeBind (fn, ctx) {
  4438. return fn.bind(ctx)
  4439. }
  4440. var bind = Function.prototype.bind
  4441. ? nativeBind
  4442. : polyfillBind;
  4443. /**
  4444. * Convert an Array-like object to a real Array.
  4445. */
  4446. function toArray (list, start) {
  4447. start = start || 0;
  4448. var i = list.length - start;
  4449. var ret = new Array(i);
  4450. while (i--) {
  4451. ret[i] = list[i + start];
  4452. }
  4453. return ret
  4454. }
  4455. /**
  4456. * Mix properties into target object.
  4457. */
  4458. function extend (to, _from) {
  4459. for (var key in _from) {
  4460. to[key] = _from[key];
  4461. }
  4462. return to
  4463. }
  4464. /**
  4465. * Merge an Array of Objects into a single Object.
  4466. */
  4467. function toObject (arr) {
  4468. var res = {};
  4469. for (var i = 0; i < arr.length; i++) {
  4470. if (arr[i]) {
  4471. extend(res, arr[i]);
  4472. }
  4473. }
  4474. return res
  4475. }
  4476. /* eslint-disable no-unused-vars */
  4477. /**
  4478. * Perform no operation.
  4479. * Stubbing args to make Flow happy without leaving useless transpiled code
  4480. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4481. */
  4482. function noop (a, b, c) {}
  4483. /**
  4484. * Always return false.
  4485. */
  4486. var no = function (a, b, c) { return false; };
  4487. /* eslint-enable no-unused-vars */
  4488. /**
  4489. * Return the same value.
  4490. */
  4491. var identity = function (_) { return _; };
  4492. /**
  4493. * Check if two values are loosely equal - that is,
  4494. * if they are plain objects, do they have the same shape?
  4495. */
  4496. function looseEqual (a, b) {
  4497. if (a === b) { return true }
  4498. var isObjectA = isObject(a);
  4499. var isObjectB = isObject(b);
  4500. if (isObjectA && isObjectB) {
  4501. try {
  4502. var isArrayA = Array.isArray(a);
  4503. var isArrayB = Array.isArray(b);
  4504. if (isArrayA && isArrayB) {
  4505. return a.length === b.length && a.every(function (e, i) {
  4506. return looseEqual(e, b[i])
  4507. })
  4508. } else if (a instanceof Date && b instanceof Date) {
  4509. return a.getTime() === b.getTime()
  4510. } else if (!isArrayA && !isArrayB) {
  4511. var keysA = Object.keys(a);
  4512. var keysB = Object.keys(b);
  4513. return keysA.length === keysB.length && keysA.every(function (key) {
  4514. return looseEqual(a[key], b[key])
  4515. })
  4516. } else {
  4517. /* istanbul ignore next */
  4518. return false
  4519. }
  4520. } catch (e) {
  4521. /* istanbul ignore next */
  4522. return false
  4523. }
  4524. } else if (!isObjectA && !isObjectB) {
  4525. return String(a) === String(b)
  4526. } else {
  4527. return false
  4528. }
  4529. }
  4530. /**
  4531. * Return the first index at which a loosely equal value can be
  4532. * found in the array (if value is a plain object, the array must
  4533. * contain an object of the same shape), or -1 if it is not present.
  4534. */
  4535. function looseIndexOf (arr, val) {
  4536. for (var i = 0; i < arr.length; i++) {
  4537. if (looseEqual(arr[i], val)) { return i }
  4538. }
  4539. return -1
  4540. }
  4541. /**
  4542. * Ensure a function is called only once.
  4543. */
  4544. function once (fn) {
  4545. var called = false;
  4546. return function () {
  4547. if (!called) {
  4548. called = true;
  4549. fn.apply(this, arguments);
  4550. }
  4551. }
  4552. }
  4553. var ASSET_TYPES = [
  4554. 'component',
  4555. 'directive',
  4556. 'filter'
  4557. ];
  4558. var LIFECYCLE_HOOKS = [
  4559. 'beforeCreate',
  4560. 'created',
  4561. 'beforeMount',
  4562. 'mounted',
  4563. 'beforeUpdate',
  4564. 'updated',
  4565. 'beforeDestroy',
  4566. 'destroyed',
  4567. 'activated',
  4568. 'deactivated',
  4569. 'errorCaptured',
  4570. 'serverPrefetch'
  4571. ];
  4572. /* */
  4573. var config = ({
  4574. /**
  4575. * Option merge strategies (used in core/util/options)
  4576. */
  4577. // $flow-disable-line
  4578. optionMergeStrategies: Object.create(null),
  4579. /**
  4580. * Whether to suppress warnings.
  4581. */
  4582. silent: false,
  4583. /**
  4584. * Show production mode tip message on boot?
  4585. */
  4586. productionTip: "development" !== 'production',
  4587. /**
  4588. * Whether to enable devtools
  4589. */
  4590. devtools: "development" !== 'production',
  4591. /**
  4592. * Whether to record perf
  4593. */
  4594. performance: false,
  4595. /**
  4596. * Error handler for watcher errors
  4597. */
  4598. errorHandler: null,
  4599. /**
  4600. * Warn handler for watcher warns
  4601. */
  4602. warnHandler: null,
  4603. /**
  4604. * Ignore certain custom elements
  4605. */
  4606. ignoredElements: [],
  4607. /**
  4608. * Custom user key aliases for v-on
  4609. */
  4610. // $flow-disable-line
  4611. keyCodes: Object.create(null),
  4612. /**
  4613. * Check if a tag is reserved so that it cannot be registered as a
  4614. * component. This is platform-dependent and may be overwritten.
  4615. */
  4616. isReservedTag: no,
  4617. /**
  4618. * Check if an attribute is reserved so that it cannot be used as a component
  4619. * prop. This is platform-dependent and may be overwritten.
  4620. */
  4621. isReservedAttr: no,
  4622. /**
  4623. * Check if a tag is an unknown element.
  4624. * Platform-dependent.
  4625. */
  4626. isUnknownElement: no,
  4627. /**
  4628. * Get the namespace of an element
  4629. */
  4630. getTagNamespace: noop,
  4631. /**
  4632. * Parse the real tag name for the specific platform.
  4633. */
  4634. parsePlatformTagName: identity,
  4635. /**
  4636. * Check if an attribute must be bound using property, e.g. value
  4637. * Platform-dependent.
  4638. */
  4639. mustUseProp: no,
  4640. /**
  4641. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4642. * This will significantly reduce performance if set to false.
  4643. */
  4644. async: true,
  4645. /**
  4646. * Exposed for legacy reasons
  4647. */
  4648. _lifecycleHooks: LIFECYCLE_HOOKS
  4649. });
  4650. /* */
  4651. /**
  4652. * unicode letters used for parsing html tags, component names and property paths.
  4653. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4654. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4655. */
  4656. 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/;
  4657. /**
  4658. * Check if a string starts with $ or _
  4659. */
  4660. function isReserved (str) {
  4661. var c = (str + '').charCodeAt(0);
  4662. return c === 0x24 || c === 0x5F
  4663. }
  4664. /**
  4665. * Define a property.
  4666. */
  4667. function def (obj, key, val, enumerable) {
  4668. Object.defineProperty(obj, key, {
  4669. value: val,
  4670. enumerable: !!enumerable,
  4671. writable: true,
  4672. configurable: true
  4673. });
  4674. }
  4675. /**
  4676. * Parse simple path.
  4677. */
  4678. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4679. function parsePath (path) {
  4680. if (bailRE.test(path)) {
  4681. return
  4682. }
  4683. var segments = path.split('.');
  4684. return function (obj) {
  4685. for (var i = 0; i < segments.length; i++) {
  4686. if (!obj) { return }
  4687. obj = obj[segments[i]];
  4688. }
  4689. return obj
  4690. }
  4691. }
  4692. /* */
  4693. // can we use __proto__?
  4694. var hasProto = '__proto__' in {};
  4695. // Browser environment sniffing
  4696. var inBrowser = typeof window !== 'undefined';
  4697. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4698. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4699. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4700. var isIE = UA && /msie|trident/.test(UA);
  4701. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4702. var isEdge = UA && UA.indexOf('edge/') > 0;
  4703. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4704. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4705. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4706. var isPhantomJS = UA && /phantomjs/.test(UA);
  4707. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4708. // Firefox has a "watch" function on Object.prototype...
  4709. var nativeWatch = ({}).watch;
  4710. if (inBrowser) {
  4711. try {
  4712. var opts = {};
  4713. Object.defineProperty(opts, 'passive', ({
  4714. get: function get () {
  4715. }
  4716. })); // https://github.com/facebook/flow/issues/285
  4717. window.addEventListener('test-passive', null, opts);
  4718. } catch (e) {}
  4719. }
  4720. // this needs to be lazy-evaled because vue may be required before
  4721. // vue-server-renderer can set VUE_ENV
  4722. var _isServer;
  4723. var isServerRendering = function () {
  4724. if (_isServer === undefined) {
  4725. /* istanbul ignore if */
  4726. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4727. // detect presence of vue-server-renderer and avoid
  4728. // Webpack shimming the process
  4729. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4730. } else {
  4731. _isServer = false;
  4732. }
  4733. }
  4734. return _isServer
  4735. };
  4736. // detect devtools
  4737. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4738. /* istanbul ignore next */
  4739. function isNative (Ctor) {
  4740. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4741. }
  4742. var hasSymbol =
  4743. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4744. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4745. var _Set;
  4746. /* istanbul ignore if */ // $flow-disable-line
  4747. if (typeof Set !== 'undefined' && isNative(Set)) {
  4748. // use native Set when available.
  4749. _Set = Set;
  4750. } else {
  4751. // a non-standard Set polyfill that only works with primitive keys.
  4752. _Set = /*@__PURE__*/(function () {
  4753. function Set () {
  4754. this.set = Object.create(null);
  4755. }
  4756. Set.prototype.has = function has (key) {
  4757. return this.set[key] === true
  4758. };
  4759. Set.prototype.add = function add (key) {
  4760. this.set[key] = true;
  4761. };
  4762. Set.prototype.clear = function clear () {
  4763. this.set = Object.create(null);
  4764. };
  4765. return Set;
  4766. }());
  4767. }
  4768. /* */
  4769. var warn = noop;
  4770. var tip = noop;
  4771. var generateComponentTrace = (noop); // work around flow check
  4772. var formatComponentName = (noop);
  4773. if (true) {
  4774. var hasConsole = typeof console !== 'undefined';
  4775. var classifyRE = /(?:^|[-_])(\w)/g;
  4776. var classify = function (str) { return str
  4777. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4778. .replace(/[-_]/g, ''); };
  4779. warn = function (msg, vm) {
  4780. var trace = vm ? generateComponentTrace(vm) : '';
  4781. if (config.warnHandler) {
  4782. config.warnHandler.call(null, msg, vm, trace);
  4783. } else if (hasConsole && (!config.silent)) {
  4784. console.error(("[Vue warn]: " + msg + trace));
  4785. }
  4786. };
  4787. tip = function (msg, vm) {
  4788. if (hasConsole && (!config.silent)) {
  4789. console.warn("[Vue tip]: " + msg + (
  4790. vm ? generateComponentTrace(vm) : ''
  4791. ));
  4792. }
  4793. };
  4794. formatComponentName = function (vm, includeFile) {
  4795. if (vm.$root === vm) {
  4796. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4797. return ('') + vm.$options.__file
  4798. }
  4799. return '<Root>'
  4800. }
  4801. var options = typeof vm === 'function' && vm.cid != null
  4802. ? vm.options
  4803. : vm._isVue
  4804. ? vm.$options || vm.constructor.options
  4805. : vm;
  4806. var name = options.name || options._componentTag;
  4807. var file = options.__file;
  4808. if (!name && file) {
  4809. var match = file.match(/([^/\\]+)\.vue$/);
  4810. name = match && match[1];
  4811. }
  4812. return (
  4813. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4814. (file && includeFile !== false ? (" at " + file) : '')
  4815. )
  4816. };
  4817. var repeat = function (str, n) {
  4818. var res = '';
  4819. while (n) {
  4820. if (n % 2 === 1) { res += str; }
  4821. if (n > 1) { str += str; }
  4822. n >>= 1;
  4823. }
  4824. return res
  4825. };
  4826. generateComponentTrace = function (vm) {
  4827. if (vm._isVue && vm.$parent) {
  4828. var tree = [];
  4829. var currentRecursiveSequence = 0;
  4830. while (vm && vm.$options.name !== 'PageBody') {
  4831. if (tree.length > 0) {
  4832. var last = tree[tree.length - 1];
  4833. if (last.constructor === vm.constructor) {
  4834. currentRecursiveSequence++;
  4835. vm = vm.$parent;
  4836. continue
  4837. } else if (currentRecursiveSequence > 0) {
  4838. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4839. currentRecursiveSequence = 0;
  4840. }
  4841. }
  4842. !vm.$options.isReserved && tree.push(vm);
  4843. vm = vm.$parent;
  4844. }
  4845. return '\n\nfound in\n\n' + tree
  4846. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4847. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4848. : formatComponentName(vm))); })
  4849. .join('\n')
  4850. } else {
  4851. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4852. }
  4853. };
  4854. }
  4855. /* */
  4856. var uid = 0;
  4857. /**
  4858. * A dep is an observable that can have multiple
  4859. * directives subscribing to it.
  4860. */
  4861. var Dep = function Dep () {
  4862. this.id = uid++;
  4863. this.subs = [];
  4864. };
  4865. Dep.prototype.addSub = function addSub (sub) {
  4866. this.subs.push(sub);
  4867. };
  4868. Dep.prototype.removeSub = function removeSub (sub) {
  4869. remove(this.subs, sub);
  4870. };
  4871. Dep.prototype.depend = function depend () {
  4872. if (Dep.SharedObject.target) {
  4873. Dep.SharedObject.target.addDep(this);
  4874. }
  4875. };
  4876. Dep.prototype.notify = function notify () {
  4877. // stabilize the subscriber list first
  4878. var subs = this.subs.slice();
  4879. if ( true && !config.async) {
  4880. // subs aren't sorted in scheduler if not running async
  4881. // we need to sort them now to make sure they fire in correct
  4882. // order
  4883. subs.sort(function (a, b) { return a.id - b.id; });
  4884. }
  4885. for (var i = 0, l = subs.length; i < l; i++) {
  4886. subs[i].update();
  4887. }
  4888. };
  4889. // The current target watcher being evaluated.
  4890. // This is globally unique because only one watcher
  4891. // can be evaluated at a time.
  4892. // fixed by xxxxxx (nvue shared vuex)
  4893. /* eslint-disable no-undef */
  4894. Dep.SharedObject = {};
  4895. Dep.SharedObject.target = null;
  4896. Dep.SharedObject.targetStack = [];
  4897. function pushTarget (target) {
  4898. Dep.SharedObject.targetStack.push(target);
  4899. Dep.SharedObject.target = target;
  4900. Dep.target = target;
  4901. }
  4902. function popTarget () {
  4903. Dep.SharedObject.targetStack.pop();
  4904. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4905. Dep.target = Dep.SharedObject.target;
  4906. }
  4907. /* */
  4908. var VNode = function VNode (
  4909. tag,
  4910. data,
  4911. children,
  4912. text,
  4913. elm,
  4914. context,
  4915. componentOptions,
  4916. asyncFactory
  4917. ) {
  4918. this.tag = tag;
  4919. this.data = data;
  4920. this.children = children;
  4921. this.text = text;
  4922. this.elm = elm;
  4923. this.ns = undefined;
  4924. this.context = context;
  4925. this.fnContext = undefined;
  4926. this.fnOptions = undefined;
  4927. this.fnScopeId = undefined;
  4928. this.key = data && data.key;
  4929. this.componentOptions = componentOptions;
  4930. this.componentInstance = undefined;
  4931. this.parent = undefined;
  4932. this.raw = false;
  4933. this.isStatic = false;
  4934. this.isRootInsert = true;
  4935. this.isComment = false;
  4936. this.isCloned = false;
  4937. this.isOnce = false;
  4938. this.asyncFactory = asyncFactory;
  4939. this.asyncMeta = undefined;
  4940. this.isAsyncPlaceholder = false;
  4941. };
  4942. var prototypeAccessors = { child: { configurable: true } };
  4943. // DEPRECATED: alias for componentInstance for backwards compat.
  4944. /* istanbul ignore next */
  4945. prototypeAccessors.child.get = function () {
  4946. return this.componentInstance
  4947. };
  4948. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4949. var createEmptyVNode = function (text) {
  4950. if ( text === void 0 ) text = '';
  4951. var node = new VNode();
  4952. node.text = text;
  4953. node.isComment = true;
  4954. return node
  4955. };
  4956. function createTextVNode (val) {
  4957. return new VNode(undefined, undefined, undefined, String(val))
  4958. }
  4959. // optimized shallow clone
  4960. // used for static nodes and slot nodes because they may be reused across
  4961. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4962. // on their elm reference.
  4963. function cloneVNode (vnode) {
  4964. var cloned = new VNode(
  4965. vnode.tag,
  4966. vnode.data,
  4967. // #7975
  4968. // clone children array to avoid mutating original in case of cloning
  4969. // a child.
  4970. vnode.children && vnode.children.slice(),
  4971. vnode.text,
  4972. vnode.elm,
  4973. vnode.context,
  4974. vnode.componentOptions,
  4975. vnode.asyncFactory
  4976. );
  4977. cloned.ns = vnode.ns;
  4978. cloned.isStatic = vnode.isStatic;
  4979. cloned.key = vnode.key;
  4980. cloned.isComment = vnode.isComment;
  4981. cloned.fnContext = vnode.fnContext;
  4982. cloned.fnOptions = vnode.fnOptions;
  4983. cloned.fnScopeId = vnode.fnScopeId;
  4984. cloned.asyncMeta = vnode.asyncMeta;
  4985. cloned.isCloned = true;
  4986. return cloned
  4987. }
  4988. /*
  4989. * not type checking this file because flow doesn't play well with
  4990. * dynamically accessing methods on Array prototype
  4991. */
  4992. var arrayProto = Array.prototype;
  4993. var arrayMethods = Object.create(arrayProto);
  4994. var methodsToPatch = [
  4995. 'push',
  4996. 'pop',
  4997. 'shift',
  4998. 'unshift',
  4999. 'splice',
  5000. 'sort',
  5001. 'reverse'
  5002. ];
  5003. /**
  5004. * Intercept mutating methods and emit events
  5005. */
  5006. methodsToPatch.forEach(function (method) {
  5007. // cache original method
  5008. var original = arrayProto[method];
  5009. def(arrayMethods, method, function mutator () {
  5010. var args = [], len = arguments.length;
  5011. while ( len-- ) args[ len ] = arguments[ len ];
  5012. var result = original.apply(this, args);
  5013. var ob = this.__ob__;
  5014. var inserted;
  5015. switch (method) {
  5016. case 'push':
  5017. case 'unshift':
  5018. inserted = args;
  5019. break
  5020. case 'splice':
  5021. inserted = args.slice(2);
  5022. break
  5023. }
  5024. if (inserted) { ob.observeArray(inserted); }
  5025. // notify change
  5026. ob.dep.notify();
  5027. return result
  5028. });
  5029. });
  5030. /* */
  5031. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5032. /**
  5033. * In some cases we may want to disable observation inside a component's
  5034. * update computation.
  5035. */
  5036. var shouldObserve = true;
  5037. function toggleObserving (value) {
  5038. shouldObserve = value;
  5039. }
  5040. /**
  5041. * Observer class that is attached to each observed
  5042. * object. Once attached, the observer converts the target
  5043. * object's property keys into getter/setters that
  5044. * collect dependencies and dispatch updates.
  5045. */
  5046. var Observer = function Observer (value) {
  5047. this.value = value;
  5048. this.dep = new Dep();
  5049. this.vmCount = 0;
  5050. def(value, '__ob__', this);
  5051. if (Array.isArray(value)) {
  5052. if (hasProto) {
  5053. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5054. if(value.push !== value.__proto__.push){
  5055. copyAugment(value, arrayMethods, arrayKeys);
  5056. } else {
  5057. protoAugment(value, arrayMethods);
  5058. }
  5059. }
  5060. } else {
  5061. copyAugment(value, arrayMethods, arrayKeys);
  5062. }
  5063. this.observeArray(value);
  5064. } else {
  5065. this.walk(value);
  5066. }
  5067. };
  5068. /**
  5069. * Walk through all properties and convert them into
  5070. * getter/setters. This method should only be called when
  5071. * value type is Object.
  5072. */
  5073. Observer.prototype.walk = function walk (obj) {
  5074. var keys = Object.keys(obj);
  5075. for (var i = 0; i < keys.length; i++) {
  5076. defineReactive$$1(obj, keys[i]);
  5077. }
  5078. };
  5079. /**
  5080. * Observe a list of Array items.
  5081. */
  5082. Observer.prototype.observeArray = function observeArray (items) {
  5083. for (var i = 0, l = items.length; i < l; i++) {
  5084. observe(items[i]);
  5085. }
  5086. };
  5087. // helpers
  5088. /**
  5089. * Augment a target Object or Array by intercepting
  5090. * the prototype chain using __proto__
  5091. */
  5092. function protoAugment (target, src) {
  5093. /* eslint-disable no-proto */
  5094. target.__proto__ = src;
  5095. /* eslint-enable no-proto */
  5096. }
  5097. /**
  5098. * Augment a target Object or Array by defining
  5099. * hidden properties.
  5100. */
  5101. /* istanbul ignore next */
  5102. function copyAugment (target, src, keys) {
  5103. for (var i = 0, l = keys.length; i < l; i++) {
  5104. var key = keys[i];
  5105. def(target, key, src[key]);
  5106. }
  5107. }
  5108. /**
  5109. * Attempt to create an observer instance for a value,
  5110. * returns the new observer if successfully observed,
  5111. * or the existing observer if the value already has one.
  5112. */
  5113. function observe (value, asRootData) {
  5114. if (!isObject(value) || value instanceof VNode) {
  5115. return
  5116. }
  5117. var ob;
  5118. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5119. ob = value.__ob__;
  5120. } else if (
  5121. shouldObserve &&
  5122. !isServerRendering() &&
  5123. (Array.isArray(value) || isPlainObject(value)) &&
  5124. Object.isExtensible(value) &&
  5125. !value._isVue &&
  5126. !value.__v_isMPComponent
  5127. ) {
  5128. ob = new Observer(value);
  5129. }
  5130. if (asRootData && ob) {
  5131. ob.vmCount++;
  5132. }
  5133. return ob
  5134. }
  5135. /**
  5136. * Define a reactive property on an Object.
  5137. */
  5138. function defineReactive$$1 (
  5139. obj,
  5140. key,
  5141. val,
  5142. customSetter,
  5143. shallow
  5144. ) {
  5145. var dep = new Dep();
  5146. var property = Object.getOwnPropertyDescriptor(obj, key);
  5147. if (property && property.configurable === false) {
  5148. return
  5149. }
  5150. // cater for pre-defined getter/setters
  5151. var getter = property && property.get;
  5152. var setter = property && property.set;
  5153. if ((!getter || setter) && arguments.length === 2) {
  5154. val = obj[key];
  5155. }
  5156. var childOb = !shallow && observe(val);
  5157. Object.defineProperty(obj, key, {
  5158. enumerable: true,
  5159. configurable: true,
  5160. get: function reactiveGetter () {
  5161. var value = getter ? getter.call(obj) : val;
  5162. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5163. dep.depend();
  5164. if (childOb) {
  5165. childOb.dep.depend();
  5166. if (Array.isArray(value)) {
  5167. dependArray(value);
  5168. }
  5169. }
  5170. }
  5171. return value
  5172. },
  5173. set: function reactiveSetter (newVal) {
  5174. var value = getter ? getter.call(obj) : val;
  5175. /* eslint-disable no-self-compare */
  5176. if (newVal === value || (newVal !== newVal && value !== value)) {
  5177. return
  5178. }
  5179. /* eslint-enable no-self-compare */
  5180. if ( true && customSetter) {
  5181. customSetter();
  5182. }
  5183. // #7981: for accessor properties without setter
  5184. if (getter && !setter) { return }
  5185. if (setter) {
  5186. setter.call(obj, newVal);
  5187. } else {
  5188. val = newVal;
  5189. }
  5190. childOb = !shallow && observe(newVal);
  5191. dep.notify();
  5192. }
  5193. });
  5194. }
  5195. /**
  5196. * Set a property on an object. Adds the new property and
  5197. * triggers change notification if the property doesn't
  5198. * already exist.
  5199. */
  5200. function set (target, key, val) {
  5201. if ( true &&
  5202. (isUndef(target) || isPrimitive(target))
  5203. ) {
  5204. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5205. }
  5206. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5207. target.length = Math.max(target.length, key);
  5208. target.splice(key, 1, val);
  5209. return val
  5210. }
  5211. if (key in target && !(key in Object.prototype)) {
  5212. target[key] = val;
  5213. return val
  5214. }
  5215. var ob = (target).__ob__;
  5216. if (target._isVue || (ob && ob.vmCount)) {
  5217. true && warn(
  5218. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5219. 'at runtime - declare it upfront in the data option.'
  5220. );
  5221. return val
  5222. }
  5223. if (!ob) {
  5224. target[key] = val;
  5225. return val
  5226. }
  5227. defineReactive$$1(ob.value, key, val);
  5228. ob.dep.notify();
  5229. return val
  5230. }
  5231. /**
  5232. * Delete a property and trigger change if necessary.
  5233. */
  5234. function del (target, key) {
  5235. if ( true &&
  5236. (isUndef(target) || isPrimitive(target))
  5237. ) {
  5238. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5239. }
  5240. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5241. target.splice(key, 1);
  5242. return
  5243. }
  5244. var ob = (target).__ob__;
  5245. if (target._isVue || (ob && ob.vmCount)) {
  5246. true && warn(
  5247. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5248. '- just set it to null.'
  5249. );
  5250. return
  5251. }
  5252. if (!hasOwn(target, key)) {
  5253. return
  5254. }
  5255. delete target[key];
  5256. if (!ob) {
  5257. return
  5258. }
  5259. ob.dep.notify();
  5260. }
  5261. /**
  5262. * Collect dependencies on array elements when the array is touched, since
  5263. * we cannot intercept array element access like property getters.
  5264. */
  5265. function dependArray (value) {
  5266. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5267. e = value[i];
  5268. e && e.__ob__ && e.__ob__.dep.depend();
  5269. if (Array.isArray(e)) {
  5270. dependArray(e);
  5271. }
  5272. }
  5273. }
  5274. /* */
  5275. /**
  5276. * Option overwriting strategies are functions that handle
  5277. * how to merge a parent option value and a child option
  5278. * value into the final value.
  5279. */
  5280. var strats = config.optionMergeStrategies;
  5281. /**
  5282. * Options with restrictions
  5283. */
  5284. if (true) {
  5285. strats.el = strats.propsData = function (parent, child, vm, key) {
  5286. if (!vm) {
  5287. warn(
  5288. "option \"" + key + "\" can only be used during instance " +
  5289. 'creation with the `new` keyword.'
  5290. );
  5291. }
  5292. return defaultStrat(parent, child)
  5293. };
  5294. }
  5295. /**
  5296. * Helper that recursively merges two data objects together.
  5297. */
  5298. function mergeData (to, from) {
  5299. if (!from) { return to }
  5300. var key, toVal, fromVal;
  5301. var keys = hasSymbol
  5302. ? Reflect.ownKeys(from)
  5303. : Object.keys(from);
  5304. for (var i = 0; i < keys.length; i++) {
  5305. key = keys[i];
  5306. // in case the object is already observed...
  5307. if (key === '__ob__') { continue }
  5308. toVal = to[key];
  5309. fromVal = from[key];
  5310. if (!hasOwn(to, key)) {
  5311. set(to, key, fromVal);
  5312. } else if (
  5313. toVal !== fromVal &&
  5314. isPlainObject(toVal) &&
  5315. isPlainObject(fromVal)
  5316. ) {
  5317. mergeData(toVal, fromVal);
  5318. }
  5319. }
  5320. return to
  5321. }
  5322. /**
  5323. * Data
  5324. */
  5325. function mergeDataOrFn (
  5326. parentVal,
  5327. childVal,
  5328. vm
  5329. ) {
  5330. if (!vm) {
  5331. // in a Vue.extend merge, both should be functions
  5332. if (!childVal) {
  5333. return parentVal
  5334. }
  5335. if (!parentVal) {
  5336. return childVal
  5337. }
  5338. // when parentVal & childVal are both present,
  5339. // we need to return a function that returns the
  5340. // merged result of both functions... no need to
  5341. // check if parentVal is a function here because
  5342. // it has to be a function to pass previous merges.
  5343. return function mergedDataFn () {
  5344. return mergeData(
  5345. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5346. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5347. )
  5348. }
  5349. } else {
  5350. return function mergedInstanceDataFn () {
  5351. // instance merge
  5352. var instanceData = typeof childVal === 'function'
  5353. ? childVal.call(vm, vm)
  5354. : childVal;
  5355. var defaultData = typeof parentVal === 'function'
  5356. ? parentVal.call(vm, vm)
  5357. : parentVal;
  5358. if (instanceData) {
  5359. return mergeData(instanceData, defaultData)
  5360. } else {
  5361. return defaultData
  5362. }
  5363. }
  5364. }
  5365. }
  5366. strats.data = function (
  5367. parentVal,
  5368. childVal,
  5369. vm
  5370. ) {
  5371. if (!vm) {
  5372. if (childVal && typeof childVal !== 'function') {
  5373. true && warn(
  5374. 'The "data" option should be a function ' +
  5375. 'that returns a per-instance value in component ' +
  5376. 'definitions.',
  5377. vm
  5378. );
  5379. return parentVal
  5380. }
  5381. return mergeDataOrFn(parentVal, childVal)
  5382. }
  5383. return mergeDataOrFn(parentVal, childVal, vm)
  5384. };
  5385. /**
  5386. * Hooks and props are merged as arrays.
  5387. */
  5388. function mergeHook (
  5389. parentVal,
  5390. childVal
  5391. ) {
  5392. var res = childVal
  5393. ? parentVal
  5394. ? parentVal.concat(childVal)
  5395. : Array.isArray(childVal)
  5396. ? childVal
  5397. : [childVal]
  5398. : parentVal;
  5399. return res
  5400. ? dedupeHooks(res)
  5401. : res
  5402. }
  5403. function dedupeHooks (hooks) {
  5404. var res = [];
  5405. for (var i = 0; i < hooks.length; i++) {
  5406. if (res.indexOf(hooks[i]) === -1) {
  5407. res.push(hooks[i]);
  5408. }
  5409. }
  5410. return res
  5411. }
  5412. LIFECYCLE_HOOKS.forEach(function (hook) {
  5413. strats[hook] = mergeHook;
  5414. });
  5415. /**
  5416. * Assets
  5417. *
  5418. * When a vm is present (instance creation), we need to do
  5419. * a three-way merge between constructor options, instance
  5420. * options and parent options.
  5421. */
  5422. function mergeAssets (
  5423. parentVal,
  5424. childVal,
  5425. vm,
  5426. key
  5427. ) {
  5428. var res = Object.create(parentVal || null);
  5429. if (childVal) {
  5430. true && assertObjectType(key, childVal, vm);
  5431. return extend(res, childVal)
  5432. } else {
  5433. return res
  5434. }
  5435. }
  5436. ASSET_TYPES.forEach(function (type) {
  5437. strats[type + 's'] = mergeAssets;
  5438. });
  5439. /**
  5440. * Watchers.
  5441. *
  5442. * Watchers hashes should not overwrite one
  5443. * another, so we merge them as arrays.
  5444. */
  5445. strats.watch = function (
  5446. parentVal,
  5447. childVal,
  5448. vm,
  5449. key
  5450. ) {
  5451. // work around Firefox's Object.prototype.watch...
  5452. if (parentVal === nativeWatch) { parentVal = undefined; }
  5453. if (childVal === nativeWatch) { childVal = undefined; }
  5454. /* istanbul ignore if */
  5455. if (!childVal) { return Object.create(parentVal || null) }
  5456. if (true) {
  5457. assertObjectType(key, childVal, vm);
  5458. }
  5459. if (!parentVal) { return childVal }
  5460. var ret = {};
  5461. extend(ret, parentVal);
  5462. for (var key$1 in childVal) {
  5463. var parent = ret[key$1];
  5464. var child = childVal[key$1];
  5465. if (parent && !Array.isArray(parent)) {
  5466. parent = [parent];
  5467. }
  5468. ret[key$1] = parent
  5469. ? parent.concat(child)
  5470. : Array.isArray(child) ? child : [child];
  5471. }
  5472. return ret
  5473. };
  5474. /**
  5475. * Other object hashes.
  5476. */
  5477. strats.props =
  5478. strats.methods =
  5479. strats.inject =
  5480. strats.computed = function (
  5481. parentVal,
  5482. childVal,
  5483. vm,
  5484. key
  5485. ) {
  5486. if (childVal && "development" !== 'production') {
  5487. assertObjectType(key, childVal, vm);
  5488. }
  5489. if (!parentVal) { return childVal }
  5490. var ret = Object.create(null);
  5491. extend(ret, parentVal);
  5492. if (childVal) { extend(ret, childVal); }
  5493. return ret
  5494. };
  5495. strats.provide = mergeDataOrFn;
  5496. /**
  5497. * Default strategy.
  5498. */
  5499. var defaultStrat = function (parentVal, childVal) {
  5500. return childVal === undefined
  5501. ? parentVal
  5502. : childVal
  5503. };
  5504. /**
  5505. * Validate component names
  5506. */
  5507. function checkComponents (options) {
  5508. for (var key in options.components) {
  5509. validateComponentName(key);
  5510. }
  5511. }
  5512. function validateComponentName (name) {
  5513. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5514. warn(
  5515. 'Invalid component name: "' + name + '". Component names ' +
  5516. 'should conform to valid custom element name in html5 specification.'
  5517. );
  5518. }
  5519. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5520. warn(
  5521. 'Do not use built-in or reserved HTML elements as component ' +
  5522. 'id: ' + name
  5523. );
  5524. }
  5525. }
  5526. /**
  5527. * Ensure all props option syntax are normalized into the
  5528. * Object-based format.
  5529. */
  5530. function normalizeProps (options, vm) {
  5531. var props = options.props;
  5532. if (!props) { return }
  5533. var res = {};
  5534. var i, val, name;
  5535. if (Array.isArray(props)) {
  5536. i = props.length;
  5537. while (i--) {
  5538. val = props[i];
  5539. if (typeof val === 'string') {
  5540. name = camelize(val);
  5541. res[name] = { type: null };
  5542. } else if (true) {
  5543. warn('props must be strings when using array syntax.');
  5544. }
  5545. }
  5546. } else if (isPlainObject(props)) {
  5547. for (var key in props) {
  5548. val = props[key];
  5549. name = camelize(key);
  5550. res[name] = isPlainObject(val)
  5551. ? val
  5552. : { type: val };
  5553. }
  5554. } else if (true) {
  5555. warn(
  5556. "Invalid value for option \"props\": expected an Array or an Object, " +
  5557. "but got " + (toRawType(props)) + ".",
  5558. vm
  5559. );
  5560. }
  5561. options.props = res;
  5562. }
  5563. /**
  5564. * Normalize all injections into Object-based format
  5565. */
  5566. function normalizeInject (options, vm) {
  5567. var inject = options.inject;
  5568. if (!inject) { return }
  5569. var normalized = options.inject = {};
  5570. if (Array.isArray(inject)) {
  5571. for (var i = 0; i < inject.length; i++) {
  5572. normalized[inject[i]] = { from: inject[i] };
  5573. }
  5574. } else if (isPlainObject(inject)) {
  5575. for (var key in inject) {
  5576. var val = inject[key];
  5577. normalized[key] = isPlainObject(val)
  5578. ? extend({ from: key }, val)
  5579. : { from: val };
  5580. }
  5581. } else if (true) {
  5582. warn(
  5583. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5584. "but got " + (toRawType(inject)) + ".",
  5585. vm
  5586. );
  5587. }
  5588. }
  5589. /**
  5590. * Normalize raw function directives into object format.
  5591. */
  5592. function normalizeDirectives (options) {
  5593. var dirs = options.directives;
  5594. if (dirs) {
  5595. for (var key in dirs) {
  5596. var def$$1 = dirs[key];
  5597. if (typeof def$$1 === 'function') {
  5598. dirs[key] = { bind: def$$1, update: def$$1 };
  5599. }
  5600. }
  5601. }
  5602. }
  5603. function assertObjectType (name, value, vm) {
  5604. if (!isPlainObject(value)) {
  5605. warn(
  5606. "Invalid value for option \"" + name + "\": expected an Object, " +
  5607. "but got " + (toRawType(value)) + ".",
  5608. vm
  5609. );
  5610. }
  5611. }
  5612. /**
  5613. * Merge two option objects into a new one.
  5614. * Core utility used in both instantiation and inheritance.
  5615. */
  5616. function mergeOptions (
  5617. parent,
  5618. child,
  5619. vm
  5620. ) {
  5621. if (true) {
  5622. checkComponents(child);
  5623. }
  5624. if (typeof child === 'function') {
  5625. child = child.options;
  5626. }
  5627. normalizeProps(child, vm);
  5628. normalizeInject(child, vm);
  5629. normalizeDirectives(child);
  5630. // Apply extends and mixins on the child options,
  5631. // but only if it is a raw options object that isn't
  5632. // the result of another mergeOptions call.
  5633. // Only merged options has the _base property.
  5634. if (!child._base) {
  5635. if (child.extends) {
  5636. parent = mergeOptions(parent, child.extends, vm);
  5637. }
  5638. if (child.mixins) {
  5639. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5640. parent = mergeOptions(parent, child.mixins[i], vm);
  5641. }
  5642. }
  5643. }
  5644. var options = {};
  5645. var key;
  5646. for (key in parent) {
  5647. mergeField(key);
  5648. }
  5649. for (key in child) {
  5650. if (!hasOwn(parent, key)) {
  5651. mergeField(key);
  5652. }
  5653. }
  5654. function mergeField (key) {
  5655. var strat = strats[key] || defaultStrat;
  5656. options[key] = strat(parent[key], child[key], vm, key);
  5657. }
  5658. return options
  5659. }
  5660. /**
  5661. * Resolve an asset.
  5662. * This function is used because child instances need access
  5663. * to assets defined in its ancestor chain.
  5664. */
  5665. function resolveAsset (
  5666. options,
  5667. type,
  5668. id,
  5669. warnMissing
  5670. ) {
  5671. /* istanbul ignore if */
  5672. if (typeof id !== 'string') {
  5673. return
  5674. }
  5675. var assets = options[type];
  5676. // check local registration variations first
  5677. if (hasOwn(assets, id)) { return assets[id] }
  5678. var camelizedId = camelize(id);
  5679. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5680. var PascalCaseId = capitalize(camelizedId);
  5681. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5682. // fallback to prototype chain
  5683. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5684. if ( true && warnMissing && !res) {
  5685. warn(
  5686. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5687. options
  5688. );
  5689. }
  5690. return res
  5691. }
  5692. /* */
  5693. function validateProp (
  5694. key,
  5695. propOptions,
  5696. propsData,
  5697. vm
  5698. ) {
  5699. var prop = propOptions[key];
  5700. var absent = !hasOwn(propsData, key);
  5701. var value = propsData[key];
  5702. // boolean casting
  5703. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5704. if (booleanIndex > -1) {
  5705. if (absent && !hasOwn(prop, 'default')) {
  5706. value = false;
  5707. } else if (value === '' || value === hyphenate(key)) {
  5708. // only cast empty string / same name to boolean if
  5709. // boolean has higher priority
  5710. var stringIndex = getTypeIndex(String, prop.type);
  5711. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5712. value = true;
  5713. }
  5714. }
  5715. }
  5716. // check default value
  5717. if (value === undefined) {
  5718. value = getPropDefaultValue(vm, prop, key);
  5719. // since the default value is a fresh copy,
  5720. // make sure to observe it.
  5721. var prevShouldObserve = shouldObserve;
  5722. toggleObserving(true);
  5723. observe(value);
  5724. toggleObserving(prevShouldObserve);
  5725. }
  5726. if (
  5727. true
  5728. ) {
  5729. assertProp(prop, key, value, vm, absent);
  5730. }
  5731. return value
  5732. }
  5733. /**
  5734. * Get the default value of a prop.
  5735. */
  5736. function getPropDefaultValue (vm, prop, key) {
  5737. // no default, return undefined
  5738. if (!hasOwn(prop, 'default')) {
  5739. return undefined
  5740. }
  5741. var def = prop.default;
  5742. // warn against non-factory defaults for Object & Array
  5743. if ( true && isObject(def)) {
  5744. warn(
  5745. 'Invalid default value for prop "' + key + '": ' +
  5746. 'Props with type Object/Array must use a factory function ' +
  5747. 'to return the default value.',
  5748. vm
  5749. );
  5750. }
  5751. // the raw prop value was also undefined from previous render,
  5752. // return previous default value to avoid unnecessary watcher trigger
  5753. if (vm && vm.$options.propsData &&
  5754. vm.$options.propsData[key] === undefined &&
  5755. vm._props[key] !== undefined
  5756. ) {
  5757. return vm._props[key]
  5758. }
  5759. // call factory function for non-Function types
  5760. // a value is Function if its prototype is function even across different execution context
  5761. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5762. ? def.call(vm)
  5763. : def
  5764. }
  5765. /**
  5766. * Assert whether a prop is valid.
  5767. */
  5768. function assertProp (
  5769. prop,
  5770. name,
  5771. value,
  5772. vm,
  5773. absent
  5774. ) {
  5775. if (prop.required && absent) {
  5776. warn(
  5777. 'Missing required prop: "' + name + '"',
  5778. vm
  5779. );
  5780. return
  5781. }
  5782. if (value == null && !prop.required) {
  5783. return
  5784. }
  5785. var type = prop.type;
  5786. var valid = !type || type === true;
  5787. var expectedTypes = [];
  5788. if (type) {
  5789. if (!Array.isArray(type)) {
  5790. type = [type];
  5791. }
  5792. for (var i = 0; i < type.length && !valid; i++) {
  5793. var assertedType = assertType(value, type[i]);
  5794. expectedTypes.push(assertedType.expectedType || '');
  5795. valid = assertedType.valid;
  5796. }
  5797. }
  5798. if (!valid) {
  5799. warn(
  5800. getInvalidTypeMessage(name, value, expectedTypes),
  5801. vm
  5802. );
  5803. return
  5804. }
  5805. var validator = prop.validator;
  5806. if (validator) {
  5807. if (!validator(value)) {
  5808. warn(
  5809. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5810. vm
  5811. );
  5812. }
  5813. }
  5814. }
  5815. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5816. function assertType (value, type) {
  5817. var valid;
  5818. var expectedType = getType(type);
  5819. if (simpleCheckRE.test(expectedType)) {
  5820. var t = typeof value;
  5821. valid = t === expectedType.toLowerCase();
  5822. // for primitive wrapper objects
  5823. if (!valid && t === 'object') {
  5824. valid = value instanceof type;
  5825. }
  5826. } else if (expectedType === 'Object') {
  5827. valid = isPlainObject(value);
  5828. } else if (expectedType === 'Array') {
  5829. valid = Array.isArray(value);
  5830. } else {
  5831. valid = value instanceof type;
  5832. }
  5833. return {
  5834. valid: valid,
  5835. expectedType: expectedType
  5836. }
  5837. }
  5838. /**
  5839. * Use function string name to check built-in types,
  5840. * because a simple equality check will fail when running
  5841. * across different vms / iframes.
  5842. */
  5843. function getType (fn) {
  5844. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5845. return match ? match[1] : ''
  5846. }
  5847. function isSameType (a, b) {
  5848. return getType(a) === getType(b)
  5849. }
  5850. function getTypeIndex (type, expectedTypes) {
  5851. if (!Array.isArray(expectedTypes)) {
  5852. return isSameType(expectedTypes, type) ? 0 : -1
  5853. }
  5854. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5855. if (isSameType(expectedTypes[i], type)) {
  5856. return i
  5857. }
  5858. }
  5859. return -1
  5860. }
  5861. function getInvalidTypeMessage (name, value, expectedTypes) {
  5862. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5863. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5864. var expectedType = expectedTypes[0];
  5865. var receivedType = toRawType(value);
  5866. var expectedValue = styleValue(value, expectedType);
  5867. var receivedValue = styleValue(value, receivedType);
  5868. // check if we need to specify expected value
  5869. if (expectedTypes.length === 1 &&
  5870. isExplicable(expectedType) &&
  5871. !isBoolean(expectedType, receivedType)) {
  5872. message += " with value " + expectedValue;
  5873. }
  5874. message += ", got " + receivedType + " ";
  5875. // check if we need to specify received value
  5876. if (isExplicable(receivedType)) {
  5877. message += "with value " + receivedValue + ".";
  5878. }
  5879. return message
  5880. }
  5881. function styleValue (value, type) {
  5882. if (type === 'String') {
  5883. return ("\"" + value + "\"")
  5884. } else if (type === 'Number') {
  5885. return ("" + (Number(value)))
  5886. } else {
  5887. return ("" + value)
  5888. }
  5889. }
  5890. function isExplicable (value) {
  5891. var explicitTypes = ['string', 'number', 'boolean'];
  5892. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5893. }
  5894. function isBoolean () {
  5895. var args = [], len = arguments.length;
  5896. while ( len-- ) args[ len ] = arguments[ len ];
  5897. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5898. }
  5899. /* */
  5900. function handleError (err, vm, info) {
  5901. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5902. // See: https://github.com/vuejs/vuex/issues/1505
  5903. pushTarget();
  5904. try {
  5905. if (vm) {
  5906. var cur = vm;
  5907. while ((cur = cur.$parent)) {
  5908. var hooks = cur.$options.errorCaptured;
  5909. if (hooks) {
  5910. for (var i = 0; i < hooks.length; i++) {
  5911. try {
  5912. var capture = hooks[i].call(cur, err, vm, info) === false;
  5913. if (capture) { return }
  5914. } catch (e) {
  5915. globalHandleError(e, cur, 'errorCaptured hook');
  5916. }
  5917. }
  5918. }
  5919. }
  5920. }
  5921. globalHandleError(err, vm, info);
  5922. } finally {
  5923. popTarget();
  5924. }
  5925. }
  5926. function invokeWithErrorHandling (
  5927. handler,
  5928. context,
  5929. args,
  5930. vm,
  5931. info
  5932. ) {
  5933. var res;
  5934. try {
  5935. res = args ? handler.apply(context, args) : handler.call(context);
  5936. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5937. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5938. // issue #9511
  5939. // avoid catch triggering multiple times when nested calls
  5940. res._handled = true;
  5941. }
  5942. } catch (e) {
  5943. handleError(e, vm, info);
  5944. }
  5945. return res
  5946. }
  5947. function globalHandleError (err, vm, info) {
  5948. if (config.errorHandler) {
  5949. try {
  5950. return config.errorHandler.call(null, err, vm, info)
  5951. } catch (e) {
  5952. // if the user intentionally throws the original error in the handler,
  5953. // do not log it twice
  5954. if (e !== err) {
  5955. logError(e, null, 'config.errorHandler');
  5956. }
  5957. }
  5958. }
  5959. logError(err, vm, info);
  5960. }
  5961. function logError (err, vm, info) {
  5962. if (true) {
  5963. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5964. }
  5965. /* istanbul ignore else */
  5966. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5967. console.error(err);
  5968. } else {
  5969. throw err
  5970. }
  5971. }
  5972. /* */
  5973. var callbacks = [];
  5974. var pending = false;
  5975. function flushCallbacks () {
  5976. pending = false;
  5977. var copies = callbacks.slice(0);
  5978. callbacks.length = 0;
  5979. for (var i = 0; i < copies.length; i++) {
  5980. copies[i]();
  5981. }
  5982. }
  5983. // Here we have async deferring wrappers using microtasks.
  5984. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5985. // However, it has subtle problems when state is changed right before repaint
  5986. // (e.g. #6813, out-in transitions).
  5987. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5988. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5989. // So we now use microtasks everywhere, again.
  5990. // A major drawback of this tradeoff is that there are some scenarios
  5991. // where microtasks have too high a priority and fire in between supposedly
  5992. // sequential events (e.g. #4521, #6690, which have workarounds)
  5993. // or even between bubbling of the same event (#6566).
  5994. var timerFunc;
  5995. // The nextTick behavior leverages the microtask queue, which can be accessed
  5996. // via either native Promise.then or MutationObserver.
  5997. // MutationObserver has wider support, however it is seriously bugged in
  5998. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5999. // completely stops working after triggering a few times... so, if native
  6000. // Promise is available, we will use it:
  6001. /* istanbul ignore next, $flow-disable-line */
  6002. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6003. var p = Promise.resolve();
  6004. timerFunc = function () {
  6005. p.then(flushCallbacks);
  6006. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6007. // it can get stuck in a weird state where callbacks are pushed into the
  6008. // microtask queue but the queue isn't being flushed, until the browser
  6009. // needs to do some other work, e.g. handle a timer. Therefore we can
  6010. // "force" the microtask queue to be flushed by adding an empty timer.
  6011. if (isIOS) { setTimeout(noop); }
  6012. };
  6013. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6014. isNative(MutationObserver) ||
  6015. // PhantomJS and iOS 7.x
  6016. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6017. )) {
  6018. // Use MutationObserver where native Promise is not available,
  6019. // e.g. PhantomJS, iOS7, Android 4.4
  6020. // (#6466 MutationObserver is unreliable in IE11)
  6021. var counter = 1;
  6022. var observer = new MutationObserver(flushCallbacks);
  6023. var textNode = document.createTextNode(String(counter));
  6024. observer.observe(textNode, {
  6025. characterData: true
  6026. });
  6027. timerFunc = function () {
  6028. counter = (counter + 1) % 2;
  6029. textNode.data = String(counter);
  6030. };
  6031. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6032. // Fallback to setImmediate.
  6033. // Technically it leverages the (macro) task queue,
  6034. // but it is still a better choice than setTimeout.
  6035. timerFunc = function () {
  6036. setImmediate(flushCallbacks);
  6037. };
  6038. } else {
  6039. // Fallback to setTimeout.
  6040. timerFunc = function () {
  6041. setTimeout(flushCallbacks, 0);
  6042. };
  6043. }
  6044. function nextTick (cb, ctx) {
  6045. var _resolve;
  6046. callbacks.push(function () {
  6047. if (cb) {
  6048. try {
  6049. cb.call(ctx);
  6050. } catch (e) {
  6051. handleError(e, ctx, 'nextTick');
  6052. }
  6053. } else if (_resolve) {
  6054. _resolve(ctx);
  6055. }
  6056. });
  6057. if (!pending) {
  6058. pending = true;
  6059. timerFunc();
  6060. }
  6061. // $flow-disable-line
  6062. if (!cb && typeof Promise !== 'undefined') {
  6063. return new Promise(function (resolve) {
  6064. _resolve = resolve;
  6065. })
  6066. }
  6067. }
  6068. /* */
  6069. /* not type checking this file because flow doesn't play well with Proxy */
  6070. var initProxy;
  6071. if (true) {
  6072. var allowedGlobals = makeMap(
  6073. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6074. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6075. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6076. 'require' // for Webpack/Browserify
  6077. );
  6078. var warnNonPresent = function (target, key) {
  6079. warn(
  6080. "Property or method \"" + key + "\" is not defined on the instance but " +
  6081. 'referenced during render. Make sure that this property is reactive, ' +
  6082. 'either in the data option, or for class-based components, by ' +
  6083. 'initializing the property. ' +
  6084. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6085. target
  6086. );
  6087. };
  6088. var warnReservedPrefix = function (target, key) {
  6089. warn(
  6090. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6091. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6092. 'prevent conflicts with Vue internals. ' +
  6093. 'See: https://vuejs.org/v2/api/#data',
  6094. target
  6095. );
  6096. };
  6097. var hasProxy =
  6098. typeof Proxy !== 'undefined' && isNative(Proxy);
  6099. if (hasProxy) {
  6100. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6101. config.keyCodes = new Proxy(config.keyCodes, {
  6102. set: function set (target, key, value) {
  6103. if (isBuiltInModifier(key)) {
  6104. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6105. return false
  6106. } else {
  6107. target[key] = value;
  6108. return true
  6109. }
  6110. }
  6111. });
  6112. }
  6113. var hasHandler = {
  6114. has: function has (target, key) {
  6115. var has = key in target;
  6116. var isAllowed = allowedGlobals(key) ||
  6117. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6118. if (!has && !isAllowed) {
  6119. if (key in target.$data) { warnReservedPrefix(target, key); }
  6120. else { warnNonPresent(target, key); }
  6121. }
  6122. return has || !isAllowed
  6123. }
  6124. };
  6125. var getHandler = {
  6126. get: function get (target, key) {
  6127. if (typeof key === 'string' && !(key in target)) {
  6128. if (key in target.$data) { warnReservedPrefix(target, key); }
  6129. else { warnNonPresent(target, key); }
  6130. }
  6131. return target[key]
  6132. }
  6133. };
  6134. initProxy = function initProxy (vm) {
  6135. if (hasProxy) {
  6136. // determine which proxy handler to use
  6137. var options = vm.$options;
  6138. var handlers = options.render && options.render._withStripped
  6139. ? getHandler
  6140. : hasHandler;
  6141. vm._renderProxy = new Proxy(vm, handlers);
  6142. } else {
  6143. vm._renderProxy = vm;
  6144. }
  6145. };
  6146. }
  6147. /* */
  6148. var seenObjects = new _Set();
  6149. /**
  6150. * Recursively traverse an object to evoke all converted
  6151. * getters, so that every nested property inside the object
  6152. * is collected as a "deep" dependency.
  6153. */
  6154. function traverse (val) {
  6155. _traverse(val, seenObjects);
  6156. seenObjects.clear();
  6157. }
  6158. function _traverse (val, seen) {
  6159. var i, keys;
  6160. var isA = Array.isArray(val);
  6161. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6162. return
  6163. }
  6164. if (val.__ob__) {
  6165. var depId = val.__ob__.dep.id;
  6166. if (seen.has(depId)) {
  6167. return
  6168. }
  6169. seen.add(depId);
  6170. }
  6171. if (isA) {
  6172. i = val.length;
  6173. while (i--) { _traverse(val[i], seen); }
  6174. } else {
  6175. keys = Object.keys(val);
  6176. i = keys.length;
  6177. while (i--) { _traverse(val[keys[i]], seen); }
  6178. }
  6179. }
  6180. var mark;
  6181. var measure;
  6182. if (true) {
  6183. var perf = inBrowser && window.performance;
  6184. /* istanbul ignore if */
  6185. if (
  6186. perf &&
  6187. perf.mark &&
  6188. perf.measure &&
  6189. perf.clearMarks &&
  6190. perf.clearMeasures
  6191. ) {
  6192. mark = function (tag) { return perf.mark(tag); };
  6193. measure = function (name, startTag, endTag) {
  6194. perf.measure(name, startTag, endTag);
  6195. perf.clearMarks(startTag);
  6196. perf.clearMarks(endTag);
  6197. // perf.clearMeasures(name)
  6198. };
  6199. }
  6200. }
  6201. /* */
  6202. var normalizeEvent = cached(function (name) {
  6203. var passive = name.charAt(0) === '&';
  6204. name = passive ? name.slice(1) : name;
  6205. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6206. name = once$$1 ? name.slice(1) : name;
  6207. var capture = name.charAt(0) === '!';
  6208. name = capture ? name.slice(1) : name;
  6209. return {
  6210. name: name,
  6211. once: once$$1,
  6212. capture: capture,
  6213. passive: passive
  6214. }
  6215. });
  6216. function createFnInvoker (fns, vm) {
  6217. function invoker () {
  6218. var arguments$1 = arguments;
  6219. var fns = invoker.fns;
  6220. if (Array.isArray(fns)) {
  6221. var cloned = fns.slice();
  6222. for (var i = 0; i < cloned.length; i++) {
  6223. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6224. }
  6225. } else {
  6226. // return handler return value for single handlers
  6227. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6228. }
  6229. }
  6230. invoker.fns = fns;
  6231. return invoker
  6232. }
  6233. function updateListeners (
  6234. on,
  6235. oldOn,
  6236. add,
  6237. remove$$1,
  6238. createOnceHandler,
  6239. vm
  6240. ) {
  6241. var name, def$$1, cur, old, event;
  6242. for (name in on) {
  6243. def$$1 = cur = on[name];
  6244. old = oldOn[name];
  6245. event = normalizeEvent(name);
  6246. if (isUndef(cur)) {
  6247. true && warn(
  6248. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6249. vm
  6250. );
  6251. } else if (isUndef(old)) {
  6252. if (isUndef(cur.fns)) {
  6253. cur = on[name] = createFnInvoker(cur, vm);
  6254. }
  6255. if (isTrue(event.once)) {
  6256. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6257. }
  6258. add(event.name, cur, event.capture, event.passive, event.params);
  6259. } else if (cur !== old) {
  6260. old.fns = cur;
  6261. on[name] = old;
  6262. }
  6263. }
  6264. for (name in oldOn) {
  6265. if (isUndef(on[name])) {
  6266. event = normalizeEvent(name);
  6267. remove$$1(event.name, oldOn[name], event.capture);
  6268. }
  6269. }
  6270. }
  6271. /* */
  6272. /* */
  6273. // fixed by xxxxxx (mp properties)
  6274. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6275. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6276. if (isUndef(propOptions)) {
  6277. return res
  6278. }
  6279. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6280. var attrs = data.attrs;
  6281. var props = data.props;
  6282. if (isDef(attrs) || isDef(props)) {
  6283. for (var key in propOptions) {
  6284. var altKey = hyphenate(key);
  6285. var result = checkProp(res, props, key, altKey, true) ||
  6286. checkProp(res, attrs, key, altKey, false);
  6287. // externalClass
  6288. if (
  6289. result &&
  6290. res[key] &&
  6291. externalClasses.indexOf(altKey) !== -1 &&
  6292. context[camelize(res[key])]
  6293. ) {
  6294. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6295. res[key] = context[camelize(res[key])];
  6296. }
  6297. }
  6298. }
  6299. return res
  6300. }
  6301. function extractPropsFromVNodeData (
  6302. data,
  6303. Ctor,
  6304. tag,
  6305. context// fixed by xxxxxx
  6306. ) {
  6307. // we are only extracting raw values here.
  6308. // validation and default values are handled in the child
  6309. // component itself.
  6310. var propOptions = Ctor.options.props;
  6311. if (isUndef(propOptions)) {
  6312. // fixed by xxxxxx
  6313. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6314. }
  6315. var res = {};
  6316. var attrs = data.attrs;
  6317. var props = data.props;
  6318. if (isDef(attrs) || isDef(props)) {
  6319. for (var key in propOptions) {
  6320. var altKey = hyphenate(key);
  6321. if (true) {
  6322. var keyInLowerCase = key.toLowerCase();
  6323. if (
  6324. key !== keyInLowerCase &&
  6325. attrs && hasOwn(attrs, keyInLowerCase)
  6326. ) {
  6327. tip(
  6328. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6329. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6330. " \"" + key + "\". " +
  6331. "Note that HTML attributes are case-insensitive and camelCased " +
  6332. "props need to use their kebab-case equivalents when using in-DOM " +
  6333. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6334. );
  6335. }
  6336. }
  6337. checkProp(res, props, key, altKey, true) ||
  6338. checkProp(res, attrs, key, altKey, false);
  6339. }
  6340. }
  6341. // fixed by xxxxxx
  6342. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6343. }
  6344. function checkProp (
  6345. res,
  6346. hash,
  6347. key,
  6348. altKey,
  6349. preserve
  6350. ) {
  6351. if (isDef(hash)) {
  6352. if (hasOwn(hash, key)) {
  6353. res[key] = hash[key];
  6354. if (!preserve) {
  6355. delete hash[key];
  6356. }
  6357. return true
  6358. } else if (hasOwn(hash, altKey)) {
  6359. res[key] = hash[altKey];
  6360. if (!preserve) {
  6361. delete hash[altKey];
  6362. }
  6363. return true
  6364. }
  6365. }
  6366. return false
  6367. }
  6368. /* */
  6369. // The template compiler attempts to minimize the need for normalization by
  6370. // statically analyzing the template at compile time.
  6371. //
  6372. // For plain HTML markup, normalization can be completely skipped because the
  6373. // generated render function is guaranteed to return Array<VNode>. There are
  6374. // two cases where extra normalization is needed:
  6375. // 1. When the children contains components - because a functional component
  6376. // may return an Array instead of a single root. In this case, just a simple
  6377. // normalization is needed - if any child is an Array, we flatten the whole
  6378. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6379. // because functional components already normalize their own children.
  6380. function simpleNormalizeChildren (children) {
  6381. for (var i = 0; i < children.length; i++) {
  6382. if (Array.isArray(children[i])) {
  6383. return Array.prototype.concat.apply([], children)
  6384. }
  6385. }
  6386. return children
  6387. }
  6388. // 2. When the children contains constructs that always generated nested Arrays,
  6389. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6390. // with hand-written render functions / JSX. In such cases a full normalization
  6391. // is needed to cater to all possible types of children values.
  6392. function normalizeChildren (children) {
  6393. return isPrimitive(children)
  6394. ? [createTextVNode(children)]
  6395. : Array.isArray(children)
  6396. ? normalizeArrayChildren(children)
  6397. : undefined
  6398. }
  6399. function isTextNode (node) {
  6400. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6401. }
  6402. function normalizeArrayChildren (children, nestedIndex) {
  6403. var res = [];
  6404. var i, c, lastIndex, last;
  6405. for (i = 0; i < children.length; i++) {
  6406. c = children[i];
  6407. if (isUndef(c) || typeof c === 'boolean') { continue }
  6408. lastIndex = res.length - 1;
  6409. last = res[lastIndex];
  6410. // nested
  6411. if (Array.isArray(c)) {
  6412. if (c.length > 0) {
  6413. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6414. // merge adjacent text nodes
  6415. if (isTextNode(c[0]) && isTextNode(last)) {
  6416. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6417. c.shift();
  6418. }
  6419. res.push.apply(res, c);
  6420. }
  6421. } else if (isPrimitive(c)) {
  6422. if (isTextNode(last)) {
  6423. // merge adjacent text nodes
  6424. // this is necessary for SSR hydration because text nodes are
  6425. // essentially merged when rendered to HTML strings
  6426. res[lastIndex] = createTextVNode(last.text + c);
  6427. } else if (c !== '') {
  6428. // convert primitive to vnode
  6429. res.push(createTextVNode(c));
  6430. }
  6431. } else {
  6432. if (isTextNode(c) && isTextNode(last)) {
  6433. // merge adjacent text nodes
  6434. res[lastIndex] = createTextVNode(last.text + c.text);
  6435. } else {
  6436. // default key for nested array children (likely generated by v-for)
  6437. if (isTrue(children._isVList) &&
  6438. isDef(c.tag) &&
  6439. isUndef(c.key) &&
  6440. isDef(nestedIndex)) {
  6441. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6442. }
  6443. res.push(c);
  6444. }
  6445. }
  6446. }
  6447. return res
  6448. }
  6449. /* */
  6450. function initProvide (vm) {
  6451. var provide = vm.$options.provide;
  6452. if (provide) {
  6453. vm._provided = typeof provide === 'function'
  6454. ? provide.call(vm)
  6455. : provide;
  6456. }
  6457. }
  6458. function initInjections (vm) {
  6459. var result = resolveInject(vm.$options.inject, vm);
  6460. if (result) {
  6461. toggleObserving(false);
  6462. Object.keys(result).forEach(function (key) {
  6463. /* istanbul ignore else */
  6464. if (true) {
  6465. defineReactive$$1(vm, key, result[key], function () {
  6466. warn(
  6467. "Avoid mutating an injected value directly since the changes will be " +
  6468. "overwritten whenever the provided component re-renders. " +
  6469. "injection being mutated: \"" + key + "\"",
  6470. vm
  6471. );
  6472. });
  6473. } else {}
  6474. });
  6475. toggleObserving(true);
  6476. }
  6477. }
  6478. function resolveInject (inject, vm) {
  6479. if (inject) {
  6480. // inject is :any because flow is not smart enough to figure out cached
  6481. var result = Object.create(null);
  6482. var keys = hasSymbol
  6483. ? Reflect.ownKeys(inject)
  6484. : Object.keys(inject);
  6485. for (var i = 0; i < keys.length; i++) {
  6486. var key = keys[i];
  6487. // #6574 in case the inject object is observed...
  6488. if (key === '__ob__') { continue }
  6489. var provideKey = inject[key].from;
  6490. var source = vm;
  6491. while (source) {
  6492. if (source._provided && hasOwn(source._provided, provideKey)) {
  6493. result[key] = source._provided[provideKey];
  6494. break
  6495. }
  6496. source = source.$parent;
  6497. }
  6498. if (!source) {
  6499. if ('default' in inject[key]) {
  6500. var provideDefault = inject[key].default;
  6501. result[key] = typeof provideDefault === 'function'
  6502. ? provideDefault.call(vm)
  6503. : provideDefault;
  6504. } else if (true) {
  6505. warn(("Injection \"" + key + "\" not found"), vm);
  6506. }
  6507. }
  6508. }
  6509. return result
  6510. }
  6511. }
  6512. /* */
  6513. /**
  6514. * Runtime helper for resolving raw children VNodes into a slot object.
  6515. */
  6516. function resolveSlots (
  6517. children,
  6518. context
  6519. ) {
  6520. if (!children || !children.length) {
  6521. return {}
  6522. }
  6523. var slots = {};
  6524. for (var i = 0, l = children.length; i < l; i++) {
  6525. var child = children[i];
  6526. var data = child.data;
  6527. // remove slot attribute if the node is resolved as a Vue slot node
  6528. if (data && data.attrs && data.attrs.slot) {
  6529. delete data.attrs.slot;
  6530. }
  6531. // named slots should only be respected if the vnode was rendered in the
  6532. // same context.
  6533. if ((child.context === context || child.fnContext === context) &&
  6534. data && data.slot != null
  6535. ) {
  6536. var name = data.slot;
  6537. var slot = (slots[name] || (slots[name] = []));
  6538. if (child.tag === 'template') {
  6539. slot.push.apply(slot, child.children || []);
  6540. } else {
  6541. slot.push(child);
  6542. }
  6543. } else {
  6544. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6545. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6546. (slots['page'] || (slots['page'] = [])).push(child);
  6547. }else{
  6548. (slots.default || (slots.default = [])).push(child);
  6549. }
  6550. }
  6551. }
  6552. // ignore slots that contains only whitespace
  6553. for (var name$1 in slots) {
  6554. if (slots[name$1].every(isWhitespace)) {
  6555. delete slots[name$1];
  6556. }
  6557. }
  6558. return slots
  6559. }
  6560. function isWhitespace (node) {
  6561. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6562. }
  6563. /* */
  6564. function normalizeScopedSlots (
  6565. slots,
  6566. normalSlots,
  6567. prevSlots
  6568. ) {
  6569. var res;
  6570. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6571. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6572. var key = slots && slots.$key;
  6573. if (!slots) {
  6574. res = {};
  6575. } else if (slots._normalized) {
  6576. // fast path 1: child component re-render only, parent did not change
  6577. return slots._normalized
  6578. } else if (
  6579. isStable &&
  6580. prevSlots &&
  6581. prevSlots !== emptyObject &&
  6582. key === prevSlots.$key &&
  6583. !hasNormalSlots &&
  6584. !prevSlots.$hasNormal
  6585. ) {
  6586. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6587. // only need to normalize once
  6588. return prevSlots
  6589. } else {
  6590. res = {};
  6591. for (var key$1 in slots) {
  6592. if (slots[key$1] && key$1[0] !== '$') {
  6593. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6594. }
  6595. }
  6596. }
  6597. // expose normal slots on scopedSlots
  6598. for (var key$2 in normalSlots) {
  6599. if (!(key$2 in res)) {
  6600. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6601. }
  6602. }
  6603. // avoriaz seems to mock a non-extensible $scopedSlots object
  6604. // and when that is passed down this would cause an error
  6605. if (slots && Object.isExtensible(slots)) {
  6606. (slots)._normalized = res;
  6607. }
  6608. def(res, '$stable', isStable);
  6609. def(res, '$key', key);
  6610. def(res, '$hasNormal', hasNormalSlots);
  6611. return res
  6612. }
  6613. function normalizeScopedSlot(normalSlots, key, fn) {
  6614. var normalized = function () {
  6615. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6616. res = res && typeof res === 'object' && !Array.isArray(res)
  6617. ? [res] // single vnode
  6618. : normalizeChildren(res);
  6619. return res && (
  6620. res.length === 0 ||
  6621. (res.length === 1 && res[0].isComment) // #9658
  6622. ) ? undefined
  6623. : res
  6624. };
  6625. // this is a slot using the new v-slot syntax without scope. although it is
  6626. // compiled as a scoped slot, render fn users would expect it to be present
  6627. // on this.$slots because the usage is semantically a normal slot.
  6628. if (fn.proxy) {
  6629. Object.defineProperty(normalSlots, key, {
  6630. get: normalized,
  6631. enumerable: true,
  6632. configurable: true
  6633. });
  6634. }
  6635. return normalized
  6636. }
  6637. function proxyNormalSlot(slots, key) {
  6638. return function () { return slots[key]; }
  6639. }
  6640. /* */
  6641. /**
  6642. * Runtime helper for rendering v-for lists.
  6643. */
  6644. function renderList (
  6645. val,
  6646. render
  6647. ) {
  6648. var ret, i, l, keys, key;
  6649. if (Array.isArray(val) || typeof val === 'string') {
  6650. ret = new Array(val.length);
  6651. for (i = 0, l = val.length; i < l; i++) {
  6652. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6653. }
  6654. } else if (typeof val === 'number') {
  6655. ret = new Array(val);
  6656. for (i = 0; i < val; i++) {
  6657. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6658. }
  6659. } else if (isObject(val)) {
  6660. if (hasSymbol && val[Symbol.iterator]) {
  6661. ret = [];
  6662. var iterator = val[Symbol.iterator]();
  6663. var result = iterator.next();
  6664. while (!result.done) {
  6665. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6666. result = iterator.next();
  6667. }
  6668. } else {
  6669. keys = Object.keys(val);
  6670. ret = new Array(keys.length);
  6671. for (i = 0, l = keys.length; i < l; i++) {
  6672. key = keys[i];
  6673. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6674. }
  6675. }
  6676. }
  6677. if (!isDef(ret)) {
  6678. ret = [];
  6679. }
  6680. (ret)._isVList = true;
  6681. return ret
  6682. }
  6683. /* */
  6684. /**
  6685. * Runtime helper for rendering <slot>
  6686. */
  6687. function renderSlot (
  6688. name,
  6689. fallback,
  6690. props,
  6691. bindObject
  6692. ) {
  6693. var scopedSlotFn = this.$scopedSlots[name];
  6694. var nodes;
  6695. if (scopedSlotFn) { // scoped slot
  6696. props = props || {};
  6697. if (bindObject) {
  6698. if ( true && !isObject(bindObject)) {
  6699. warn(
  6700. 'slot v-bind without argument expects an Object',
  6701. this
  6702. );
  6703. }
  6704. props = extend(extend({}, bindObject), props);
  6705. }
  6706. // fixed by xxxxxx app-plus scopedSlot
  6707. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6708. } else {
  6709. nodes = this.$slots[name] || fallback;
  6710. }
  6711. var target = props && props.slot;
  6712. if (target) {
  6713. return this.$createElement('template', { slot: target }, nodes)
  6714. } else {
  6715. return nodes
  6716. }
  6717. }
  6718. /* */
  6719. /**
  6720. * Runtime helper for resolving filters
  6721. */
  6722. function resolveFilter (id) {
  6723. return resolveAsset(this.$options, 'filters', id, true) || identity
  6724. }
  6725. /* */
  6726. function isKeyNotMatch (expect, actual) {
  6727. if (Array.isArray(expect)) {
  6728. return expect.indexOf(actual) === -1
  6729. } else {
  6730. return expect !== actual
  6731. }
  6732. }
  6733. /**
  6734. * Runtime helper for checking keyCodes from config.
  6735. * exposed as Vue.prototype._k
  6736. * passing in eventKeyName as last argument separately for backwards compat
  6737. */
  6738. function checkKeyCodes (
  6739. eventKeyCode,
  6740. key,
  6741. builtInKeyCode,
  6742. eventKeyName,
  6743. builtInKeyName
  6744. ) {
  6745. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6746. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6747. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6748. } else if (mappedKeyCode) {
  6749. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6750. } else if (eventKeyName) {
  6751. return hyphenate(eventKeyName) !== key
  6752. }
  6753. }
  6754. /* */
  6755. /**
  6756. * Runtime helper for merging v-bind="object" into a VNode's data.
  6757. */
  6758. function bindObjectProps (
  6759. data,
  6760. tag,
  6761. value,
  6762. asProp,
  6763. isSync
  6764. ) {
  6765. if (value) {
  6766. if (!isObject(value)) {
  6767. true && warn(
  6768. 'v-bind without argument expects an Object or Array value',
  6769. this
  6770. );
  6771. } else {
  6772. if (Array.isArray(value)) {
  6773. value = toObject(value);
  6774. }
  6775. var hash;
  6776. var loop = function ( key ) {
  6777. if (
  6778. key === 'class' ||
  6779. key === 'style' ||
  6780. isReservedAttribute(key)
  6781. ) {
  6782. hash = data;
  6783. } else {
  6784. var type = data.attrs && data.attrs.type;
  6785. hash = asProp || config.mustUseProp(tag, type, key)
  6786. ? data.domProps || (data.domProps = {})
  6787. : data.attrs || (data.attrs = {});
  6788. }
  6789. var camelizedKey = camelize(key);
  6790. var hyphenatedKey = hyphenate(key);
  6791. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6792. hash[key] = value[key];
  6793. if (isSync) {
  6794. var on = data.on || (data.on = {});
  6795. on[("update:" + key)] = function ($event) {
  6796. value[key] = $event;
  6797. };
  6798. }
  6799. }
  6800. };
  6801. for (var key in value) loop( key );
  6802. }
  6803. }
  6804. return data
  6805. }
  6806. /* */
  6807. /**
  6808. * Runtime helper for rendering static trees.
  6809. */
  6810. function renderStatic (
  6811. index,
  6812. isInFor
  6813. ) {
  6814. var cached = this._staticTrees || (this._staticTrees = []);
  6815. var tree = cached[index];
  6816. // if has already-rendered static tree and not inside v-for,
  6817. // we can reuse the same tree.
  6818. if (tree && !isInFor) {
  6819. return tree
  6820. }
  6821. // otherwise, render a fresh tree.
  6822. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6823. this._renderProxy,
  6824. null,
  6825. this // for render fns generated for functional component templates
  6826. );
  6827. markStatic(tree, ("__static__" + index), false);
  6828. return tree
  6829. }
  6830. /**
  6831. * Runtime helper for v-once.
  6832. * Effectively it means marking the node as static with a unique key.
  6833. */
  6834. function markOnce (
  6835. tree,
  6836. index,
  6837. key
  6838. ) {
  6839. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6840. return tree
  6841. }
  6842. function markStatic (
  6843. tree,
  6844. key,
  6845. isOnce
  6846. ) {
  6847. if (Array.isArray(tree)) {
  6848. for (var i = 0; i < tree.length; i++) {
  6849. if (tree[i] && typeof tree[i] !== 'string') {
  6850. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6851. }
  6852. }
  6853. } else {
  6854. markStaticNode(tree, key, isOnce);
  6855. }
  6856. }
  6857. function markStaticNode (node, key, isOnce) {
  6858. node.isStatic = true;
  6859. node.key = key;
  6860. node.isOnce = isOnce;
  6861. }
  6862. /* */
  6863. function bindObjectListeners (data, value) {
  6864. if (value) {
  6865. if (!isPlainObject(value)) {
  6866. true && warn(
  6867. 'v-on without argument expects an Object value',
  6868. this
  6869. );
  6870. } else {
  6871. var on = data.on = data.on ? extend({}, data.on) : {};
  6872. for (var key in value) {
  6873. var existing = on[key];
  6874. var ours = value[key];
  6875. on[key] = existing ? [].concat(existing, ours) : ours;
  6876. }
  6877. }
  6878. }
  6879. return data
  6880. }
  6881. /* */
  6882. function resolveScopedSlots (
  6883. fns, // see flow/vnode
  6884. res,
  6885. // the following are added in 2.6
  6886. hasDynamicKeys,
  6887. contentHashKey
  6888. ) {
  6889. res = res || { $stable: !hasDynamicKeys };
  6890. for (var i = 0; i < fns.length; i++) {
  6891. var slot = fns[i];
  6892. if (Array.isArray(slot)) {
  6893. resolveScopedSlots(slot, res, hasDynamicKeys);
  6894. } else if (slot) {
  6895. // marker for reverse proxying v-slot without scope on this.$slots
  6896. if (slot.proxy) {
  6897. slot.fn.proxy = true;
  6898. }
  6899. res[slot.key] = slot.fn;
  6900. }
  6901. }
  6902. if (contentHashKey) {
  6903. (res).$key = contentHashKey;
  6904. }
  6905. return res
  6906. }
  6907. /* */
  6908. function bindDynamicKeys (baseObj, values) {
  6909. for (var i = 0; i < values.length; i += 2) {
  6910. var key = values[i];
  6911. if (typeof key === 'string' && key) {
  6912. baseObj[values[i]] = values[i + 1];
  6913. } else if ( true && key !== '' && key !== null) {
  6914. // null is a special value for explicitly removing a binding
  6915. warn(
  6916. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6917. this
  6918. );
  6919. }
  6920. }
  6921. return baseObj
  6922. }
  6923. // helper to dynamically append modifier runtime markers to event names.
  6924. // ensure only append when value is already string, otherwise it will be cast
  6925. // to string and cause the type check to miss.
  6926. function prependModifier (value, symbol) {
  6927. return typeof value === 'string' ? symbol + value : value
  6928. }
  6929. /* */
  6930. function installRenderHelpers (target) {
  6931. target._o = markOnce;
  6932. target._n = toNumber;
  6933. target._s = toString;
  6934. target._l = renderList;
  6935. target._t = renderSlot;
  6936. target._q = looseEqual;
  6937. target._i = looseIndexOf;
  6938. target._m = renderStatic;
  6939. target._f = resolveFilter;
  6940. target._k = checkKeyCodes;
  6941. target._b = bindObjectProps;
  6942. target._v = createTextVNode;
  6943. target._e = createEmptyVNode;
  6944. target._u = resolveScopedSlots;
  6945. target._g = bindObjectListeners;
  6946. target._d = bindDynamicKeys;
  6947. target._p = prependModifier;
  6948. }
  6949. /* */
  6950. function FunctionalRenderContext (
  6951. data,
  6952. props,
  6953. children,
  6954. parent,
  6955. Ctor
  6956. ) {
  6957. var this$1 = this;
  6958. var options = Ctor.options;
  6959. // ensure the createElement function in functional components
  6960. // gets a unique context - this is necessary for correct named slot check
  6961. var contextVm;
  6962. if (hasOwn(parent, '_uid')) {
  6963. contextVm = Object.create(parent);
  6964. // $flow-disable-line
  6965. contextVm._original = parent;
  6966. } else {
  6967. // the context vm passed in is a functional context as well.
  6968. // in this case we want to make sure we are able to get a hold to the
  6969. // real context instance.
  6970. contextVm = parent;
  6971. // $flow-disable-line
  6972. parent = parent._original;
  6973. }
  6974. var isCompiled = isTrue(options._compiled);
  6975. var needNormalization = !isCompiled;
  6976. this.data = data;
  6977. this.props = props;
  6978. this.children = children;
  6979. this.parent = parent;
  6980. this.listeners = data.on || emptyObject;
  6981. this.injections = resolveInject(options.inject, parent);
  6982. this.slots = function () {
  6983. if (!this$1.$slots) {
  6984. normalizeScopedSlots(
  6985. data.scopedSlots,
  6986. this$1.$slots = resolveSlots(children, parent)
  6987. );
  6988. }
  6989. return this$1.$slots
  6990. };
  6991. Object.defineProperty(this, 'scopedSlots', ({
  6992. enumerable: true,
  6993. get: function get () {
  6994. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6995. }
  6996. }));
  6997. // support for compiled functional template
  6998. if (isCompiled) {
  6999. // exposing $options for renderStatic()
  7000. this.$options = options;
  7001. // pre-resolve slots for renderSlot()
  7002. this.$slots = this.slots();
  7003. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7004. }
  7005. if (options._scopeId) {
  7006. this._c = function (a, b, c, d) {
  7007. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7008. if (vnode && !Array.isArray(vnode)) {
  7009. vnode.fnScopeId = options._scopeId;
  7010. vnode.fnContext = parent;
  7011. }
  7012. return vnode
  7013. };
  7014. } else {
  7015. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7016. }
  7017. }
  7018. installRenderHelpers(FunctionalRenderContext.prototype);
  7019. function createFunctionalComponent (
  7020. Ctor,
  7021. propsData,
  7022. data,
  7023. contextVm,
  7024. children
  7025. ) {
  7026. var options = Ctor.options;
  7027. var props = {};
  7028. var propOptions = options.props;
  7029. if (isDef(propOptions)) {
  7030. for (var key in propOptions) {
  7031. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7032. }
  7033. } else {
  7034. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7035. if (isDef(data.props)) { mergeProps(props, data.props); }
  7036. }
  7037. var renderContext = new FunctionalRenderContext(
  7038. data,
  7039. props,
  7040. children,
  7041. contextVm,
  7042. Ctor
  7043. );
  7044. var vnode = options.render.call(null, renderContext._c, renderContext);
  7045. if (vnode instanceof VNode) {
  7046. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7047. } else if (Array.isArray(vnode)) {
  7048. var vnodes = normalizeChildren(vnode) || [];
  7049. var res = new Array(vnodes.length);
  7050. for (var i = 0; i < vnodes.length; i++) {
  7051. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7052. }
  7053. return res
  7054. }
  7055. }
  7056. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7057. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7058. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7059. // that should not be matched to match.
  7060. var clone = cloneVNode(vnode);
  7061. clone.fnContext = contextVm;
  7062. clone.fnOptions = options;
  7063. if (true) {
  7064. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7065. }
  7066. if (data.slot) {
  7067. (clone.data || (clone.data = {})).slot = data.slot;
  7068. }
  7069. return clone
  7070. }
  7071. function mergeProps (to, from) {
  7072. for (var key in from) {
  7073. to[camelize(key)] = from[key];
  7074. }
  7075. }
  7076. /* */
  7077. /* */
  7078. /* */
  7079. /* */
  7080. // inline hooks to be invoked on component VNodes during patch
  7081. var componentVNodeHooks = {
  7082. init: function init (vnode, hydrating) {
  7083. if (
  7084. vnode.componentInstance &&
  7085. !vnode.componentInstance._isDestroyed &&
  7086. vnode.data.keepAlive
  7087. ) {
  7088. // kept-alive components, treat as a patch
  7089. var mountedNode = vnode; // work around flow
  7090. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7091. } else {
  7092. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7093. vnode,
  7094. activeInstance
  7095. );
  7096. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7097. }
  7098. },
  7099. prepatch: function prepatch (oldVnode, vnode) {
  7100. var options = vnode.componentOptions;
  7101. var child = vnode.componentInstance = oldVnode.componentInstance;
  7102. updateChildComponent(
  7103. child,
  7104. options.propsData, // updated props
  7105. options.listeners, // updated listeners
  7106. vnode, // new parent vnode
  7107. options.children // new children
  7108. );
  7109. },
  7110. insert: function insert (vnode) {
  7111. var context = vnode.context;
  7112. var componentInstance = vnode.componentInstance;
  7113. if (!componentInstance._isMounted) {
  7114. callHook(componentInstance, 'onServiceCreated');
  7115. callHook(componentInstance, 'onServiceAttached');
  7116. componentInstance._isMounted = true;
  7117. callHook(componentInstance, 'mounted');
  7118. }
  7119. if (vnode.data.keepAlive) {
  7120. if (context._isMounted) {
  7121. // vue-router#1212
  7122. // During updates, a kept-alive component's child components may
  7123. // change, so directly walking the tree here may call activated hooks
  7124. // on incorrect children. Instead we push them into a queue which will
  7125. // be processed after the whole patch process ended.
  7126. queueActivatedComponent(componentInstance);
  7127. } else {
  7128. activateChildComponent(componentInstance, true /* direct */);
  7129. }
  7130. }
  7131. },
  7132. destroy: function destroy (vnode) {
  7133. var componentInstance = vnode.componentInstance;
  7134. if (!componentInstance._isDestroyed) {
  7135. if (!vnode.data.keepAlive) {
  7136. componentInstance.$destroy();
  7137. } else {
  7138. deactivateChildComponent(componentInstance, true /* direct */);
  7139. }
  7140. }
  7141. }
  7142. };
  7143. var hooksToMerge = Object.keys(componentVNodeHooks);
  7144. function createComponent (
  7145. Ctor,
  7146. data,
  7147. context,
  7148. children,
  7149. tag
  7150. ) {
  7151. if (isUndef(Ctor)) {
  7152. return
  7153. }
  7154. var baseCtor = context.$options._base;
  7155. // plain options object: turn it into a constructor
  7156. if (isObject(Ctor)) {
  7157. Ctor = baseCtor.extend(Ctor);
  7158. }
  7159. // if at this stage it's not a constructor or an async component factory,
  7160. // reject.
  7161. if (typeof Ctor !== 'function') {
  7162. if (true) {
  7163. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7164. }
  7165. return
  7166. }
  7167. // async component
  7168. var asyncFactory;
  7169. if (isUndef(Ctor.cid)) {
  7170. asyncFactory = Ctor;
  7171. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7172. if (Ctor === undefined) {
  7173. // return a placeholder node for async component, which is rendered
  7174. // as a comment node but preserves all the raw information for the node.
  7175. // the information will be used for async server-rendering and hydration.
  7176. return createAsyncPlaceholder(
  7177. asyncFactory,
  7178. data,
  7179. context,
  7180. children,
  7181. tag
  7182. )
  7183. }
  7184. }
  7185. data = data || {};
  7186. // resolve constructor options in case global mixins are applied after
  7187. // component constructor creation
  7188. resolveConstructorOptions(Ctor);
  7189. // transform component v-model data into props & events
  7190. if (isDef(data.model)) {
  7191. transformModel(Ctor.options, data);
  7192. }
  7193. // extract props
  7194. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7195. // functional component
  7196. if (isTrue(Ctor.options.functional)) {
  7197. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7198. }
  7199. // extract listeners, since these needs to be treated as
  7200. // child component listeners instead of DOM listeners
  7201. var listeners = data.on;
  7202. // replace with listeners with .native modifier
  7203. // so it gets processed during parent component patch.
  7204. data.on = data.nativeOn;
  7205. if (isTrue(Ctor.options.abstract)) {
  7206. // abstract components do not keep anything
  7207. // other than props & listeners & slot
  7208. // work around flow
  7209. var slot = data.slot;
  7210. data = {};
  7211. if (slot) {
  7212. data.slot = slot;
  7213. }
  7214. }
  7215. // install component management hooks onto the placeholder node
  7216. installComponentHooks(data);
  7217. // return a placeholder vnode
  7218. var name = Ctor.options.name || tag;
  7219. var vnode = new VNode(
  7220. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7221. data, undefined, undefined, undefined, context,
  7222. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7223. asyncFactory
  7224. );
  7225. return vnode
  7226. }
  7227. function createComponentInstanceForVnode (
  7228. vnode, // we know it's MountedComponentVNode but flow doesn't
  7229. parent // activeInstance in lifecycle state
  7230. ) {
  7231. var options = {
  7232. _isComponent: true,
  7233. _parentVnode: vnode,
  7234. parent: parent
  7235. };
  7236. // check inline-template render functions
  7237. var inlineTemplate = vnode.data.inlineTemplate;
  7238. if (isDef(inlineTemplate)) {
  7239. options.render = inlineTemplate.render;
  7240. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7241. }
  7242. return new vnode.componentOptions.Ctor(options)
  7243. }
  7244. function installComponentHooks (data) {
  7245. var hooks = data.hook || (data.hook = {});
  7246. for (var i = 0; i < hooksToMerge.length; i++) {
  7247. var key = hooksToMerge[i];
  7248. var existing = hooks[key];
  7249. var toMerge = componentVNodeHooks[key];
  7250. if (existing !== toMerge && !(existing && existing._merged)) {
  7251. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7252. }
  7253. }
  7254. }
  7255. function mergeHook$1 (f1, f2) {
  7256. var merged = function (a, b) {
  7257. // flow complains about extra args which is why we use any
  7258. f1(a, b);
  7259. f2(a, b);
  7260. };
  7261. merged._merged = true;
  7262. return merged
  7263. }
  7264. // transform component v-model info (value and callback) into
  7265. // prop and event handler respectively.
  7266. function transformModel (options, data) {
  7267. var prop = (options.model && options.model.prop) || 'value';
  7268. var event = (options.model && options.model.event) || 'input'
  7269. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7270. var on = data.on || (data.on = {});
  7271. var existing = on[event];
  7272. var callback = data.model.callback;
  7273. if (isDef(existing)) {
  7274. if (
  7275. Array.isArray(existing)
  7276. ? existing.indexOf(callback) === -1
  7277. : existing !== callback
  7278. ) {
  7279. on[event] = [callback].concat(existing);
  7280. }
  7281. } else {
  7282. on[event] = callback;
  7283. }
  7284. }
  7285. /* */
  7286. var SIMPLE_NORMALIZE = 1;
  7287. var ALWAYS_NORMALIZE = 2;
  7288. // wrapper function for providing a more flexible interface
  7289. // without getting yelled at by flow
  7290. function createElement (
  7291. context,
  7292. tag,
  7293. data,
  7294. children,
  7295. normalizationType,
  7296. alwaysNormalize
  7297. ) {
  7298. if (Array.isArray(data) || isPrimitive(data)) {
  7299. normalizationType = children;
  7300. children = data;
  7301. data = undefined;
  7302. }
  7303. if (isTrue(alwaysNormalize)) {
  7304. normalizationType = ALWAYS_NORMALIZE;
  7305. }
  7306. return _createElement(context, tag, data, children, normalizationType)
  7307. }
  7308. function _createElement (
  7309. context,
  7310. tag,
  7311. data,
  7312. children,
  7313. normalizationType
  7314. ) {
  7315. if (isDef(data) && isDef((data).__ob__)) {
  7316. true && warn(
  7317. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7318. 'Always create fresh vnode data objects in each render!',
  7319. context
  7320. );
  7321. return createEmptyVNode()
  7322. }
  7323. // object syntax in v-bind
  7324. if (isDef(data) && isDef(data.is)) {
  7325. tag = data.is;
  7326. }
  7327. if (!tag) {
  7328. // in case of component :is set to falsy value
  7329. return createEmptyVNode()
  7330. }
  7331. // warn against non-primitive key
  7332. if ( true &&
  7333. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7334. ) {
  7335. {
  7336. warn(
  7337. 'Avoid using non-primitive value as key, ' +
  7338. 'use string/number value instead.',
  7339. context
  7340. );
  7341. }
  7342. }
  7343. // support single function children as default scoped slot
  7344. if (Array.isArray(children) &&
  7345. typeof children[0] === 'function'
  7346. ) {
  7347. data = data || {};
  7348. data.scopedSlots = { default: children[0] };
  7349. children.length = 0;
  7350. }
  7351. if (normalizationType === ALWAYS_NORMALIZE) {
  7352. children = normalizeChildren(children);
  7353. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7354. children = simpleNormalizeChildren(children);
  7355. }
  7356. var vnode, ns;
  7357. if (typeof tag === 'string') {
  7358. var Ctor;
  7359. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7360. if (config.isReservedTag(tag)) {
  7361. // platform built-in elements
  7362. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7363. warn(
  7364. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7365. context
  7366. );
  7367. }
  7368. vnode = new VNode(
  7369. config.parsePlatformTagName(tag), data, children,
  7370. undefined, undefined, context
  7371. );
  7372. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7373. // component
  7374. vnode = createComponent(Ctor, data, context, children, tag);
  7375. } else {
  7376. // unknown or unlisted namespaced elements
  7377. // check at runtime because it may get assigned a namespace when its
  7378. // parent normalizes children
  7379. vnode = new VNode(
  7380. tag, data, children,
  7381. undefined, undefined, context
  7382. );
  7383. }
  7384. } else {
  7385. // direct component options / constructor
  7386. vnode = createComponent(tag, data, context, children);
  7387. }
  7388. if (Array.isArray(vnode)) {
  7389. return vnode
  7390. } else if (isDef(vnode)) {
  7391. if (isDef(ns)) { applyNS(vnode, ns); }
  7392. if (isDef(data)) { registerDeepBindings(data); }
  7393. return vnode
  7394. } else {
  7395. return createEmptyVNode()
  7396. }
  7397. }
  7398. function applyNS (vnode, ns, force) {
  7399. vnode.ns = ns;
  7400. if (vnode.tag === 'foreignObject') {
  7401. // use default namespace inside foreignObject
  7402. ns = undefined;
  7403. force = true;
  7404. }
  7405. if (isDef(vnode.children)) {
  7406. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7407. var child = vnode.children[i];
  7408. if (isDef(child.tag) && (
  7409. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7410. applyNS(child, ns, force);
  7411. }
  7412. }
  7413. }
  7414. }
  7415. // ref #5318
  7416. // necessary to ensure parent re-render when deep bindings like :style and
  7417. // :class are used on slot nodes
  7418. function registerDeepBindings (data) {
  7419. if (isObject(data.style)) {
  7420. traverse(data.style);
  7421. }
  7422. if (isObject(data.class)) {
  7423. traverse(data.class);
  7424. }
  7425. }
  7426. /* */
  7427. function initRender (vm) {
  7428. vm._vnode = null; // the root of the child tree
  7429. vm._staticTrees = null; // v-once cached trees
  7430. var options = vm.$options;
  7431. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7432. var renderContext = parentVnode && parentVnode.context;
  7433. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7434. vm.$scopedSlots = emptyObject;
  7435. // bind the createElement fn to this instance
  7436. // so that we get proper render context inside it.
  7437. // args order: tag, data, children, normalizationType, alwaysNormalize
  7438. // internal version is used by render functions compiled from templates
  7439. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7440. // normalization is always applied for the public version, used in
  7441. // user-written render functions.
  7442. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7443. // $attrs & $listeners are exposed for easier HOC creation.
  7444. // they need to be reactive so that HOCs using them are always updated
  7445. var parentData = parentVnode && parentVnode.data;
  7446. /* istanbul ignore else */
  7447. if (true) {
  7448. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7449. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7450. }, true);
  7451. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7452. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7453. }, true);
  7454. } else {}
  7455. }
  7456. var currentRenderingInstance = null;
  7457. function renderMixin (Vue) {
  7458. // install runtime convenience helpers
  7459. installRenderHelpers(Vue.prototype);
  7460. Vue.prototype.$nextTick = function (fn) {
  7461. return nextTick(fn, this)
  7462. };
  7463. Vue.prototype._render = function () {
  7464. var vm = this;
  7465. var ref = vm.$options;
  7466. var render = ref.render;
  7467. var _parentVnode = ref._parentVnode;
  7468. if (_parentVnode) {
  7469. vm.$scopedSlots = normalizeScopedSlots(
  7470. _parentVnode.data.scopedSlots,
  7471. vm.$slots,
  7472. vm.$scopedSlots
  7473. );
  7474. }
  7475. // set parent vnode. this allows render functions to have access
  7476. // to the data on the placeholder node.
  7477. vm.$vnode = _parentVnode;
  7478. // render self
  7479. var vnode;
  7480. try {
  7481. // There's no need to maintain a stack because all render fns are called
  7482. // separately from one another. Nested component's render fns are called
  7483. // when parent component is patched.
  7484. currentRenderingInstance = vm;
  7485. vnode = render.call(vm._renderProxy, vm.$createElement);
  7486. } catch (e) {
  7487. handleError(e, vm, "render");
  7488. // return error render result,
  7489. // or previous vnode to prevent render error causing blank component
  7490. /* istanbul ignore else */
  7491. if ( true && vm.$options.renderError) {
  7492. try {
  7493. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7494. } catch (e) {
  7495. handleError(e, vm, "renderError");
  7496. vnode = vm._vnode;
  7497. }
  7498. } else {
  7499. vnode = vm._vnode;
  7500. }
  7501. } finally {
  7502. currentRenderingInstance = null;
  7503. }
  7504. // if the returned array contains only a single node, allow it
  7505. if (Array.isArray(vnode) && vnode.length === 1) {
  7506. vnode = vnode[0];
  7507. }
  7508. // return empty vnode in case the render function errored out
  7509. if (!(vnode instanceof VNode)) {
  7510. if ( true && Array.isArray(vnode)) {
  7511. warn(
  7512. 'Multiple root nodes returned from render function. Render function ' +
  7513. 'should return a single root node.',
  7514. vm
  7515. );
  7516. }
  7517. vnode = createEmptyVNode();
  7518. }
  7519. // set parent
  7520. vnode.parent = _parentVnode;
  7521. return vnode
  7522. };
  7523. }
  7524. /* */
  7525. function ensureCtor (comp, base) {
  7526. if (
  7527. comp.__esModule ||
  7528. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7529. ) {
  7530. comp = comp.default;
  7531. }
  7532. return isObject(comp)
  7533. ? base.extend(comp)
  7534. : comp
  7535. }
  7536. function createAsyncPlaceholder (
  7537. factory,
  7538. data,
  7539. context,
  7540. children,
  7541. tag
  7542. ) {
  7543. var node = createEmptyVNode();
  7544. node.asyncFactory = factory;
  7545. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7546. return node
  7547. }
  7548. function resolveAsyncComponent (
  7549. factory,
  7550. baseCtor
  7551. ) {
  7552. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7553. return factory.errorComp
  7554. }
  7555. if (isDef(factory.resolved)) {
  7556. return factory.resolved
  7557. }
  7558. var owner = currentRenderingInstance;
  7559. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7560. // already pending
  7561. factory.owners.push(owner);
  7562. }
  7563. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7564. return factory.loadingComp
  7565. }
  7566. if (owner && !isDef(factory.owners)) {
  7567. var owners = factory.owners = [owner];
  7568. var sync = true;
  7569. var timerLoading = null;
  7570. var timerTimeout = null
  7571. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7572. var forceRender = function (renderCompleted) {
  7573. for (var i = 0, l = owners.length; i < l; i++) {
  7574. (owners[i]).$forceUpdate();
  7575. }
  7576. if (renderCompleted) {
  7577. owners.length = 0;
  7578. if (timerLoading !== null) {
  7579. clearTimeout(timerLoading);
  7580. timerLoading = null;
  7581. }
  7582. if (timerTimeout !== null) {
  7583. clearTimeout(timerTimeout);
  7584. timerTimeout = null;
  7585. }
  7586. }
  7587. };
  7588. var resolve = once(function (res) {
  7589. // cache resolved
  7590. factory.resolved = ensureCtor(res, baseCtor);
  7591. // invoke callbacks only if this is not a synchronous resolve
  7592. // (async resolves are shimmed as synchronous during SSR)
  7593. if (!sync) {
  7594. forceRender(true);
  7595. } else {
  7596. owners.length = 0;
  7597. }
  7598. });
  7599. var reject = once(function (reason) {
  7600. true && warn(
  7601. "Failed to resolve async component: " + (String(factory)) +
  7602. (reason ? ("\nReason: " + reason) : '')
  7603. );
  7604. if (isDef(factory.errorComp)) {
  7605. factory.error = true;
  7606. forceRender(true);
  7607. }
  7608. });
  7609. var res = factory(resolve, reject);
  7610. if (isObject(res)) {
  7611. if (isPromise(res)) {
  7612. // () => Promise
  7613. if (isUndef(factory.resolved)) {
  7614. res.then(resolve, reject);
  7615. }
  7616. } else if (isPromise(res.component)) {
  7617. res.component.then(resolve, reject);
  7618. if (isDef(res.error)) {
  7619. factory.errorComp = ensureCtor(res.error, baseCtor);
  7620. }
  7621. if (isDef(res.loading)) {
  7622. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7623. if (res.delay === 0) {
  7624. factory.loading = true;
  7625. } else {
  7626. timerLoading = setTimeout(function () {
  7627. timerLoading = null;
  7628. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7629. factory.loading = true;
  7630. forceRender(false);
  7631. }
  7632. }, res.delay || 200);
  7633. }
  7634. }
  7635. if (isDef(res.timeout)) {
  7636. timerTimeout = setTimeout(function () {
  7637. timerTimeout = null;
  7638. if (isUndef(factory.resolved)) {
  7639. reject(
  7640. true
  7641. ? ("timeout (" + (res.timeout) + "ms)")
  7642. : undefined
  7643. );
  7644. }
  7645. }, res.timeout);
  7646. }
  7647. }
  7648. }
  7649. sync = false;
  7650. // return in case resolved synchronously
  7651. return factory.loading
  7652. ? factory.loadingComp
  7653. : factory.resolved
  7654. }
  7655. }
  7656. /* */
  7657. function isAsyncPlaceholder (node) {
  7658. return node.isComment && node.asyncFactory
  7659. }
  7660. /* */
  7661. function getFirstComponentChild (children) {
  7662. if (Array.isArray(children)) {
  7663. for (var i = 0; i < children.length; i++) {
  7664. var c = children[i];
  7665. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7666. return c
  7667. }
  7668. }
  7669. }
  7670. }
  7671. /* */
  7672. /* */
  7673. function initEvents (vm) {
  7674. vm._events = Object.create(null);
  7675. vm._hasHookEvent = false;
  7676. // init parent attached events
  7677. var listeners = vm.$options._parentListeners;
  7678. if (listeners) {
  7679. updateComponentListeners(vm, listeners);
  7680. }
  7681. }
  7682. var target;
  7683. function add (event, fn) {
  7684. target.$on(event, fn);
  7685. }
  7686. function remove$1 (event, fn) {
  7687. target.$off(event, fn);
  7688. }
  7689. function createOnceHandler (event, fn) {
  7690. var _target = target;
  7691. return function onceHandler () {
  7692. var res = fn.apply(null, arguments);
  7693. if (res !== null) {
  7694. _target.$off(event, onceHandler);
  7695. }
  7696. }
  7697. }
  7698. function updateComponentListeners (
  7699. vm,
  7700. listeners,
  7701. oldListeners
  7702. ) {
  7703. target = vm;
  7704. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7705. target = undefined;
  7706. }
  7707. function eventsMixin (Vue) {
  7708. var hookRE = /^hook:/;
  7709. Vue.prototype.$on = function (event, fn) {
  7710. var vm = this;
  7711. if (Array.isArray(event)) {
  7712. for (var i = 0, l = event.length; i < l; i++) {
  7713. vm.$on(event[i], fn);
  7714. }
  7715. } else {
  7716. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7717. // optimize hook:event cost by using a boolean flag marked at registration
  7718. // instead of a hash lookup
  7719. if (hookRE.test(event)) {
  7720. vm._hasHookEvent = true;
  7721. }
  7722. }
  7723. return vm
  7724. };
  7725. Vue.prototype.$once = function (event, fn) {
  7726. var vm = this;
  7727. function on () {
  7728. vm.$off(event, on);
  7729. fn.apply(vm, arguments);
  7730. }
  7731. on.fn = fn;
  7732. vm.$on(event, on);
  7733. return vm
  7734. };
  7735. Vue.prototype.$off = function (event, fn) {
  7736. var vm = this;
  7737. // all
  7738. if (!arguments.length) {
  7739. vm._events = Object.create(null);
  7740. return vm
  7741. }
  7742. // array of events
  7743. if (Array.isArray(event)) {
  7744. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7745. vm.$off(event[i$1], fn);
  7746. }
  7747. return vm
  7748. }
  7749. // specific event
  7750. var cbs = vm._events[event];
  7751. if (!cbs) {
  7752. return vm
  7753. }
  7754. if (!fn) {
  7755. vm._events[event] = null;
  7756. return vm
  7757. }
  7758. // specific handler
  7759. var cb;
  7760. var i = cbs.length;
  7761. while (i--) {
  7762. cb = cbs[i];
  7763. if (cb === fn || cb.fn === fn) {
  7764. cbs.splice(i, 1);
  7765. break
  7766. }
  7767. }
  7768. return vm
  7769. };
  7770. Vue.prototype.$emit = function (event) {
  7771. var vm = this;
  7772. if (true) {
  7773. var lowerCaseEvent = event.toLowerCase();
  7774. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7775. tip(
  7776. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7777. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7778. "Note that HTML attributes are case-insensitive and you cannot use " +
  7779. "v-on to listen to camelCase events when using in-DOM templates. " +
  7780. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7781. );
  7782. }
  7783. }
  7784. var cbs = vm._events[event];
  7785. if (cbs) {
  7786. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7787. var args = toArray(arguments, 1);
  7788. var info = "event handler for \"" + event + "\"";
  7789. for (var i = 0, l = cbs.length; i < l; i++) {
  7790. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7791. }
  7792. }
  7793. return vm
  7794. };
  7795. }
  7796. /* */
  7797. var activeInstance = null;
  7798. var isUpdatingChildComponent = false;
  7799. function setActiveInstance(vm) {
  7800. var prevActiveInstance = activeInstance;
  7801. activeInstance = vm;
  7802. return function () {
  7803. activeInstance = prevActiveInstance;
  7804. }
  7805. }
  7806. function initLifecycle (vm) {
  7807. var options = vm.$options;
  7808. // locate first non-abstract parent
  7809. var parent = options.parent;
  7810. if (parent && !options.abstract) {
  7811. while (parent.$options.abstract && parent.$parent) {
  7812. parent = parent.$parent;
  7813. }
  7814. parent.$children.push(vm);
  7815. }
  7816. vm.$parent = parent;
  7817. vm.$root = parent ? parent.$root : vm;
  7818. vm.$children = [];
  7819. vm.$refs = {};
  7820. vm._watcher = null;
  7821. vm._inactive = null;
  7822. vm._directInactive = false;
  7823. vm._isMounted = false;
  7824. vm._isDestroyed = false;
  7825. vm._isBeingDestroyed = false;
  7826. }
  7827. function lifecycleMixin (Vue) {
  7828. Vue.prototype._update = function (vnode, hydrating) {
  7829. var vm = this;
  7830. var prevEl = vm.$el;
  7831. var prevVnode = vm._vnode;
  7832. var restoreActiveInstance = setActiveInstance(vm);
  7833. vm._vnode = vnode;
  7834. // Vue.prototype.__patch__ is injected in entry points
  7835. // based on the rendering backend used.
  7836. if (!prevVnode) {
  7837. // initial render
  7838. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7839. } else {
  7840. // updates
  7841. vm.$el = vm.__patch__(prevVnode, vnode);
  7842. }
  7843. restoreActiveInstance();
  7844. // update __vue__ reference
  7845. if (prevEl) {
  7846. prevEl.__vue__ = null;
  7847. }
  7848. if (vm.$el) {
  7849. vm.$el.__vue__ = vm;
  7850. }
  7851. // if parent is an HOC, update its $el as well
  7852. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7853. vm.$parent.$el = vm.$el;
  7854. }
  7855. // updated hook is called by the scheduler to ensure that children are
  7856. // updated in a parent's updated hook.
  7857. };
  7858. Vue.prototype.$forceUpdate = function () {
  7859. var vm = this;
  7860. if (vm._watcher) {
  7861. vm._watcher.update();
  7862. }
  7863. };
  7864. Vue.prototype.$destroy = function () {
  7865. var vm = this;
  7866. if (vm._isBeingDestroyed) {
  7867. return
  7868. }
  7869. callHook(vm, 'beforeDestroy');
  7870. vm._isBeingDestroyed = true;
  7871. // remove self from parent
  7872. var parent = vm.$parent;
  7873. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7874. remove(parent.$children, vm);
  7875. }
  7876. // teardown watchers
  7877. if (vm._watcher) {
  7878. vm._watcher.teardown();
  7879. }
  7880. var i = vm._watchers.length;
  7881. while (i--) {
  7882. vm._watchers[i].teardown();
  7883. }
  7884. // remove reference from data ob
  7885. // frozen object may not have observer.
  7886. if (vm._data.__ob__) {
  7887. vm._data.__ob__.vmCount--;
  7888. }
  7889. // call the last hook...
  7890. vm._isDestroyed = true;
  7891. // invoke destroy hooks on current rendered tree
  7892. vm.__patch__(vm._vnode, null);
  7893. // fire destroyed hook
  7894. callHook(vm, 'destroyed');
  7895. // turn off all instance listeners.
  7896. vm.$off();
  7897. // remove __vue__ reference
  7898. if (vm.$el) {
  7899. vm.$el.__vue__ = null;
  7900. }
  7901. // release circular reference (#6759)
  7902. if (vm.$vnode) {
  7903. vm.$vnode.parent = null;
  7904. }
  7905. };
  7906. }
  7907. function updateChildComponent (
  7908. vm,
  7909. propsData,
  7910. listeners,
  7911. parentVnode,
  7912. renderChildren
  7913. ) {
  7914. if (true) {
  7915. isUpdatingChildComponent = true;
  7916. }
  7917. // determine whether component has slot children
  7918. // we need to do this before overwriting $options._renderChildren.
  7919. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7920. // dynamic slot names). Static scoped slots compiled from template has the
  7921. // "$stable" marker.
  7922. var newScopedSlots = parentVnode.data.scopedSlots;
  7923. var oldScopedSlots = vm.$scopedSlots;
  7924. var hasDynamicScopedSlot = !!(
  7925. (newScopedSlots && !newScopedSlots.$stable) ||
  7926. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7927. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7928. );
  7929. // Any static slot children from the parent may have changed during parent's
  7930. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7931. // update is necessary to ensure correctness.
  7932. var needsForceUpdate = !!(
  7933. renderChildren || // has new static slots
  7934. vm.$options._renderChildren || // has old static slots
  7935. hasDynamicScopedSlot
  7936. );
  7937. vm.$options._parentVnode = parentVnode;
  7938. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7939. if (vm._vnode) { // update child tree's parent
  7940. vm._vnode.parent = parentVnode;
  7941. }
  7942. vm.$options._renderChildren = renderChildren;
  7943. // update $attrs and $listeners hash
  7944. // these are also reactive so they may trigger child update if the child
  7945. // used them during render
  7946. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7947. vm.$listeners = listeners || emptyObject;
  7948. // update props
  7949. if (propsData && vm.$options.props) {
  7950. toggleObserving(false);
  7951. var props = vm._props;
  7952. var propKeys = vm.$options._propKeys || [];
  7953. for (var i = 0; i < propKeys.length; i++) {
  7954. var key = propKeys[i];
  7955. var propOptions = vm.$options.props; // wtf flow?
  7956. props[key] = validateProp(key, propOptions, propsData, vm);
  7957. }
  7958. toggleObserving(true);
  7959. // keep a copy of raw propsData
  7960. vm.$options.propsData = propsData;
  7961. }
  7962. // fixed by xxxxxx update properties(mp runtime)
  7963. vm._$updateProperties && vm._$updateProperties(vm);
  7964. // update listeners
  7965. listeners = listeners || emptyObject;
  7966. var oldListeners = vm.$options._parentListeners;
  7967. vm.$options._parentListeners = listeners;
  7968. updateComponentListeners(vm, listeners, oldListeners);
  7969. // resolve slots + force update if has children
  7970. if (needsForceUpdate) {
  7971. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7972. vm.$forceUpdate();
  7973. }
  7974. if (true) {
  7975. isUpdatingChildComponent = false;
  7976. }
  7977. }
  7978. function isInInactiveTree (vm) {
  7979. while (vm && (vm = vm.$parent)) {
  7980. if (vm._inactive) { return true }
  7981. }
  7982. return false
  7983. }
  7984. function activateChildComponent (vm, direct) {
  7985. if (direct) {
  7986. vm._directInactive = false;
  7987. if (isInInactiveTree(vm)) {
  7988. return
  7989. }
  7990. } else if (vm._directInactive) {
  7991. return
  7992. }
  7993. if (vm._inactive || vm._inactive === null) {
  7994. vm._inactive = false;
  7995. for (var i = 0; i < vm.$children.length; i++) {
  7996. activateChildComponent(vm.$children[i]);
  7997. }
  7998. callHook(vm, 'activated');
  7999. }
  8000. }
  8001. function deactivateChildComponent (vm, direct) {
  8002. if (direct) {
  8003. vm._directInactive = true;
  8004. if (isInInactiveTree(vm)) {
  8005. return
  8006. }
  8007. }
  8008. if (!vm._inactive) {
  8009. vm._inactive = true;
  8010. for (var i = 0; i < vm.$children.length; i++) {
  8011. deactivateChildComponent(vm.$children[i]);
  8012. }
  8013. callHook(vm, 'deactivated');
  8014. }
  8015. }
  8016. function callHook (vm, hook) {
  8017. // #7573 disable dep collection when invoking lifecycle hooks
  8018. pushTarget();
  8019. var handlers = vm.$options[hook];
  8020. var info = hook + " hook";
  8021. if (handlers) {
  8022. for (var i = 0, j = handlers.length; i < j; i++) {
  8023. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8024. }
  8025. }
  8026. if (vm._hasHookEvent) {
  8027. vm.$emit('hook:' + hook);
  8028. }
  8029. popTarget();
  8030. }
  8031. /* */
  8032. var MAX_UPDATE_COUNT = 100;
  8033. var queue = [];
  8034. var activatedChildren = [];
  8035. var has = {};
  8036. var circular = {};
  8037. var waiting = false;
  8038. var flushing = false;
  8039. var index = 0;
  8040. /**
  8041. * Reset the scheduler's state.
  8042. */
  8043. function resetSchedulerState () {
  8044. index = queue.length = activatedChildren.length = 0;
  8045. has = {};
  8046. if (true) {
  8047. circular = {};
  8048. }
  8049. waiting = flushing = false;
  8050. }
  8051. // Async edge case #6566 requires saving the timestamp when event listeners are
  8052. // attached. However, calling performance.now() has a perf overhead especially
  8053. // if the page has thousands of event listeners. Instead, we take a timestamp
  8054. // every time the scheduler flushes and use that for all event listeners
  8055. // attached during that flush.
  8056. var currentFlushTimestamp = 0;
  8057. // Async edge case fix requires storing an event listener's attach timestamp.
  8058. var getNow = Date.now;
  8059. // Determine what event timestamp the browser is using. Annoyingly, the
  8060. // timestamp can either be hi-res (relative to page load) or low-res
  8061. // (relative to UNIX epoch), so in order to compare time we have to use the
  8062. // same timestamp type when saving the flush timestamp.
  8063. // All IE versions use low-res event timestamps, and have problematic clock
  8064. // implementations (#9632)
  8065. if (inBrowser && !isIE) {
  8066. var performance = window.performance;
  8067. if (
  8068. performance &&
  8069. typeof performance.now === 'function' &&
  8070. getNow() > document.createEvent('Event').timeStamp
  8071. ) {
  8072. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8073. // smaller than it, it means the event is using a hi-res timestamp,
  8074. // and we need to use the hi-res version for event listener timestamps as
  8075. // well.
  8076. getNow = function () { return performance.now(); };
  8077. }
  8078. }
  8079. /**
  8080. * Flush both queues and run the watchers.
  8081. */
  8082. function flushSchedulerQueue () {
  8083. currentFlushTimestamp = getNow();
  8084. flushing = true;
  8085. var watcher, id;
  8086. // Sort queue before flush.
  8087. // This ensures that:
  8088. // 1. Components are updated from parent to child. (because parent is always
  8089. // created before the child)
  8090. // 2. A component's user watchers are run before its render watcher (because
  8091. // user watchers are created before the render watcher)
  8092. // 3. If a component is destroyed during a parent component's watcher run,
  8093. // its watchers can be skipped.
  8094. queue.sort(function (a, b) { return a.id - b.id; });
  8095. // do not cache length because more watchers might be pushed
  8096. // as we run existing watchers
  8097. for (index = 0; index < queue.length; index++) {
  8098. watcher = queue[index];
  8099. if (watcher.before) {
  8100. watcher.before();
  8101. }
  8102. id = watcher.id;
  8103. has[id] = null;
  8104. watcher.run();
  8105. // in dev build, check and stop circular updates.
  8106. if ( true && has[id] != null) {
  8107. circular[id] = (circular[id] || 0) + 1;
  8108. if (circular[id] > MAX_UPDATE_COUNT) {
  8109. warn(
  8110. 'You may have an infinite update loop ' + (
  8111. watcher.user
  8112. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8113. : "in a component render function."
  8114. ),
  8115. watcher.vm
  8116. );
  8117. break
  8118. }
  8119. }
  8120. }
  8121. // keep copies of post queues before resetting state
  8122. var activatedQueue = activatedChildren.slice();
  8123. var updatedQueue = queue.slice();
  8124. resetSchedulerState();
  8125. // call component updated and activated hooks
  8126. callActivatedHooks(activatedQueue);
  8127. callUpdatedHooks(updatedQueue);
  8128. // devtool hook
  8129. /* istanbul ignore if */
  8130. if (devtools && config.devtools) {
  8131. devtools.emit('flush');
  8132. }
  8133. }
  8134. function callUpdatedHooks (queue) {
  8135. var i = queue.length;
  8136. while (i--) {
  8137. var watcher = queue[i];
  8138. var vm = watcher.vm;
  8139. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8140. callHook(vm, 'updated');
  8141. }
  8142. }
  8143. }
  8144. /**
  8145. * Queue a kept-alive component that was activated during patch.
  8146. * The queue will be processed after the entire tree has been patched.
  8147. */
  8148. function queueActivatedComponent (vm) {
  8149. // setting _inactive to false here so that a render function can
  8150. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8151. vm._inactive = false;
  8152. activatedChildren.push(vm);
  8153. }
  8154. function callActivatedHooks (queue) {
  8155. for (var i = 0; i < queue.length; i++) {
  8156. queue[i]._inactive = true;
  8157. activateChildComponent(queue[i], true /* true */);
  8158. }
  8159. }
  8160. /**
  8161. * Push a watcher into the watcher queue.
  8162. * Jobs with duplicate IDs will be skipped unless it's
  8163. * pushed when the queue is being flushed.
  8164. */
  8165. function queueWatcher (watcher) {
  8166. var id = watcher.id;
  8167. if (has[id] == null) {
  8168. has[id] = true;
  8169. if (!flushing) {
  8170. queue.push(watcher);
  8171. } else {
  8172. // if already flushing, splice the watcher based on its id
  8173. // if already past its id, it will be run next immediately.
  8174. var i = queue.length - 1;
  8175. while (i > index && queue[i].id > watcher.id) {
  8176. i--;
  8177. }
  8178. queue.splice(i + 1, 0, watcher);
  8179. }
  8180. // queue the flush
  8181. if (!waiting) {
  8182. waiting = true;
  8183. if ( true && !config.async) {
  8184. flushSchedulerQueue();
  8185. return
  8186. }
  8187. nextTick(flushSchedulerQueue);
  8188. }
  8189. }
  8190. }
  8191. /* */
  8192. var uid$2 = 0;
  8193. /**
  8194. * A watcher parses an expression, collects dependencies,
  8195. * and fires callback when the expression value changes.
  8196. * This is used for both the $watch() api and directives.
  8197. */
  8198. var Watcher = function Watcher (
  8199. vm,
  8200. expOrFn,
  8201. cb,
  8202. options,
  8203. isRenderWatcher
  8204. ) {
  8205. this.vm = vm;
  8206. if (isRenderWatcher) {
  8207. vm._watcher = this;
  8208. }
  8209. vm._watchers.push(this);
  8210. // options
  8211. if (options) {
  8212. this.deep = !!options.deep;
  8213. this.user = !!options.user;
  8214. this.lazy = !!options.lazy;
  8215. this.sync = !!options.sync;
  8216. this.before = options.before;
  8217. } else {
  8218. this.deep = this.user = this.lazy = this.sync = false;
  8219. }
  8220. this.cb = cb;
  8221. this.id = ++uid$2; // uid for batching
  8222. this.active = true;
  8223. this.dirty = this.lazy; // for lazy watchers
  8224. this.deps = [];
  8225. this.newDeps = [];
  8226. this.depIds = new _Set();
  8227. this.newDepIds = new _Set();
  8228. this.expression = true
  8229. ? expOrFn.toString()
  8230. : undefined;
  8231. // parse expression for getter
  8232. if (typeof expOrFn === 'function') {
  8233. this.getter = expOrFn;
  8234. } else {
  8235. this.getter = parsePath(expOrFn);
  8236. if (!this.getter) {
  8237. this.getter = noop;
  8238. true && warn(
  8239. "Failed watching path: \"" + expOrFn + "\" " +
  8240. 'Watcher only accepts simple dot-delimited paths. ' +
  8241. 'For full control, use a function instead.',
  8242. vm
  8243. );
  8244. }
  8245. }
  8246. this.value = this.lazy
  8247. ? undefined
  8248. : this.get();
  8249. };
  8250. /**
  8251. * Evaluate the getter, and re-collect dependencies.
  8252. */
  8253. Watcher.prototype.get = function get () {
  8254. pushTarget(this);
  8255. var value;
  8256. var vm = this.vm;
  8257. try {
  8258. value = this.getter.call(vm, vm);
  8259. } catch (e) {
  8260. if (this.user) {
  8261. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8262. } else {
  8263. throw e
  8264. }
  8265. } finally {
  8266. // "touch" every property so they are all tracked as
  8267. // dependencies for deep watching
  8268. if (this.deep) {
  8269. traverse(value);
  8270. }
  8271. popTarget();
  8272. this.cleanupDeps();
  8273. }
  8274. return value
  8275. };
  8276. /**
  8277. * Add a dependency to this directive.
  8278. */
  8279. Watcher.prototype.addDep = function addDep (dep) {
  8280. var id = dep.id;
  8281. if (!this.newDepIds.has(id)) {
  8282. this.newDepIds.add(id);
  8283. this.newDeps.push(dep);
  8284. if (!this.depIds.has(id)) {
  8285. dep.addSub(this);
  8286. }
  8287. }
  8288. };
  8289. /**
  8290. * Clean up for dependency collection.
  8291. */
  8292. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8293. var i = this.deps.length;
  8294. while (i--) {
  8295. var dep = this.deps[i];
  8296. if (!this.newDepIds.has(dep.id)) {
  8297. dep.removeSub(this);
  8298. }
  8299. }
  8300. var tmp = this.depIds;
  8301. this.depIds = this.newDepIds;
  8302. this.newDepIds = tmp;
  8303. this.newDepIds.clear();
  8304. tmp = this.deps;
  8305. this.deps = this.newDeps;
  8306. this.newDeps = tmp;
  8307. this.newDeps.length = 0;
  8308. };
  8309. /**
  8310. * Subscriber interface.
  8311. * Will be called when a dependency changes.
  8312. */
  8313. Watcher.prototype.update = function update () {
  8314. /* istanbul ignore else */
  8315. if (this.lazy) {
  8316. this.dirty = true;
  8317. } else if (this.sync) {
  8318. this.run();
  8319. } else {
  8320. queueWatcher(this);
  8321. }
  8322. };
  8323. /**
  8324. * Scheduler job interface.
  8325. * Will be called by the scheduler.
  8326. */
  8327. Watcher.prototype.run = function run () {
  8328. if (this.active) {
  8329. var value = this.get();
  8330. if (
  8331. value !== this.value ||
  8332. // Deep watchers and watchers on Object/Arrays should fire even
  8333. // when the value is the same, because the value may
  8334. // have mutated.
  8335. isObject(value) ||
  8336. this.deep
  8337. ) {
  8338. // set new value
  8339. var oldValue = this.value;
  8340. this.value = value;
  8341. if (this.user) {
  8342. try {
  8343. this.cb.call(this.vm, value, oldValue);
  8344. } catch (e) {
  8345. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8346. }
  8347. } else {
  8348. this.cb.call(this.vm, value, oldValue);
  8349. }
  8350. }
  8351. }
  8352. };
  8353. /**
  8354. * Evaluate the value of the watcher.
  8355. * This only gets called for lazy watchers.
  8356. */
  8357. Watcher.prototype.evaluate = function evaluate () {
  8358. this.value = this.get();
  8359. this.dirty = false;
  8360. };
  8361. /**
  8362. * Depend on all deps collected by this watcher.
  8363. */
  8364. Watcher.prototype.depend = function depend () {
  8365. var i = this.deps.length;
  8366. while (i--) {
  8367. this.deps[i].depend();
  8368. }
  8369. };
  8370. /**
  8371. * Remove self from all dependencies' subscriber list.
  8372. */
  8373. Watcher.prototype.teardown = function teardown () {
  8374. if (this.active) {
  8375. // remove self from vm's watcher list
  8376. // this is a somewhat expensive operation so we skip it
  8377. // if the vm is being destroyed.
  8378. if (!this.vm._isBeingDestroyed) {
  8379. remove(this.vm._watchers, this);
  8380. }
  8381. var i = this.deps.length;
  8382. while (i--) {
  8383. this.deps[i].removeSub(this);
  8384. }
  8385. this.active = false;
  8386. }
  8387. };
  8388. /* */
  8389. var sharedPropertyDefinition = {
  8390. enumerable: true,
  8391. configurable: true,
  8392. get: noop,
  8393. set: noop
  8394. };
  8395. function proxy (target, sourceKey, key) {
  8396. sharedPropertyDefinition.get = function proxyGetter () {
  8397. return this[sourceKey][key]
  8398. };
  8399. sharedPropertyDefinition.set = function proxySetter (val) {
  8400. this[sourceKey][key] = val;
  8401. };
  8402. Object.defineProperty(target, key, sharedPropertyDefinition);
  8403. }
  8404. function initState (vm) {
  8405. vm._watchers = [];
  8406. var opts = vm.$options;
  8407. if (opts.props) { initProps(vm, opts.props); }
  8408. if (opts.methods) { initMethods(vm, opts.methods); }
  8409. if (opts.data) {
  8410. initData(vm);
  8411. } else {
  8412. observe(vm._data = {}, true /* asRootData */);
  8413. }
  8414. if (opts.computed) { initComputed(vm, opts.computed); }
  8415. if (opts.watch && opts.watch !== nativeWatch) {
  8416. initWatch(vm, opts.watch);
  8417. }
  8418. }
  8419. function initProps (vm, propsOptions) {
  8420. var propsData = vm.$options.propsData || {};
  8421. var props = vm._props = {};
  8422. // cache prop keys so that future props updates can iterate using Array
  8423. // instead of dynamic object key enumeration.
  8424. var keys = vm.$options._propKeys = [];
  8425. var isRoot = !vm.$parent;
  8426. // root instance props should be converted
  8427. if (!isRoot) {
  8428. toggleObserving(false);
  8429. }
  8430. var loop = function ( key ) {
  8431. keys.push(key);
  8432. var value = validateProp(key, propsOptions, propsData, vm);
  8433. /* istanbul ignore else */
  8434. if (true) {
  8435. var hyphenatedKey = hyphenate(key);
  8436. if (isReservedAttribute(hyphenatedKey) ||
  8437. config.isReservedAttr(hyphenatedKey)) {
  8438. warn(
  8439. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8440. vm
  8441. );
  8442. }
  8443. defineReactive$$1(props, key, value, function () {
  8444. if (!isRoot && !isUpdatingChildComponent) {
  8445. {
  8446. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8447. return
  8448. }
  8449. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8450. if(
  8451. key === 'value' &&
  8452. Array.isArray(vm.$options.behaviors) &&
  8453. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8454. ){
  8455. return
  8456. }
  8457. if(vm._getFormData){
  8458. return
  8459. }
  8460. var $parent = vm.$parent;
  8461. while($parent){
  8462. if($parent.__next_tick_pending){
  8463. return
  8464. }
  8465. $parent = $parent.$parent;
  8466. }
  8467. }
  8468. warn(
  8469. "Avoid mutating a prop directly since the value will be " +
  8470. "overwritten whenever the parent component re-renders. " +
  8471. "Instead, use a data or computed property based on the prop's " +
  8472. "value. Prop being mutated: \"" + key + "\"",
  8473. vm
  8474. );
  8475. }
  8476. });
  8477. } else {}
  8478. // static props are already proxied on the component's prototype
  8479. // during Vue.extend(). We only need to proxy props defined at
  8480. // instantiation here.
  8481. if (!(key in vm)) {
  8482. proxy(vm, "_props", key);
  8483. }
  8484. };
  8485. for (var key in propsOptions) loop( key );
  8486. toggleObserving(true);
  8487. }
  8488. function initData (vm) {
  8489. var data = vm.$options.data;
  8490. data = vm._data = typeof data === 'function'
  8491. ? getData(data, vm)
  8492. : data || {};
  8493. if (!isPlainObject(data)) {
  8494. data = {};
  8495. true && warn(
  8496. 'data functions should return an object:\n' +
  8497. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8498. vm
  8499. );
  8500. }
  8501. // proxy data on instance
  8502. var keys = Object.keys(data);
  8503. var props = vm.$options.props;
  8504. var methods = vm.$options.methods;
  8505. var i = keys.length;
  8506. while (i--) {
  8507. var key = keys[i];
  8508. if (true) {
  8509. if (methods && hasOwn(methods, key)) {
  8510. warn(
  8511. ("Method \"" + key + "\" has already been defined as a data property."),
  8512. vm
  8513. );
  8514. }
  8515. }
  8516. if (props && hasOwn(props, key)) {
  8517. true && warn(
  8518. "The data property \"" + key + "\" is already declared as a prop. " +
  8519. "Use prop default value instead.",
  8520. vm
  8521. );
  8522. } else if (!isReserved(key)) {
  8523. proxy(vm, "_data", key);
  8524. }
  8525. }
  8526. // observe data
  8527. observe(data, true /* asRootData */);
  8528. }
  8529. function getData (data, vm) {
  8530. // #7573 disable dep collection when invoking data getters
  8531. pushTarget();
  8532. try {
  8533. return data.call(vm, vm)
  8534. } catch (e) {
  8535. handleError(e, vm, "data()");
  8536. return {}
  8537. } finally {
  8538. popTarget();
  8539. }
  8540. }
  8541. var computedWatcherOptions = { lazy: true };
  8542. function initComputed (vm, computed) {
  8543. // $flow-disable-line
  8544. var watchers = vm._computedWatchers = Object.create(null);
  8545. // computed properties are just getters during SSR
  8546. var isSSR = isServerRendering();
  8547. for (var key in computed) {
  8548. var userDef = computed[key];
  8549. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8550. if ( true && getter == null) {
  8551. warn(
  8552. ("Getter is missing for computed property \"" + key + "\"."),
  8553. vm
  8554. );
  8555. }
  8556. if (!isSSR) {
  8557. // create internal watcher for the computed property.
  8558. watchers[key] = new Watcher(
  8559. vm,
  8560. getter || noop,
  8561. noop,
  8562. computedWatcherOptions
  8563. );
  8564. }
  8565. // component-defined computed properties are already defined on the
  8566. // component prototype. We only need to define computed properties defined
  8567. // at instantiation here.
  8568. if (!(key in vm)) {
  8569. defineComputed(vm, key, userDef);
  8570. } else if (true) {
  8571. if (key in vm.$data) {
  8572. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8573. } else if (vm.$options.props && key in vm.$options.props) {
  8574. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8575. }
  8576. }
  8577. }
  8578. }
  8579. function defineComputed (
  8580. target,
  8581. key,
  8582. userDef
  8583. ) {
  8584. var shouldCache = !isServerRendering();
  8585. if (typeof userDef === 'function') {
  8586. sharedPropertyDefinition.get = shouldCache
  8587. ? createComputedGetter(key)
  8588. : createGetterInvoker(userDef);
  8589. sharedPropertyDefinition.set = noop;
  8590. } else {
  8591. sharedPropertyDefinition.get = userDef.get
  8592. ? shouldCache && userDef.cache !== false
  8593. ? createComputedGetter(key)
  8594. : createGetterInvoker(userDef.get)
  8595. : noop;
  8596. sharedPropertyDefinition.set = userDef.set || noop;
  8597. }
  8598. if ( true &&
  8599. sharedPropertyDefinition.set === noop) {
  8600. sharedPropertyDefinition.set = function () {
  8601. warn(
  8602. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8603. this
  8604. );
  8605. };
  8606. }
  8607. Object.defineProperty(target, key, sharedPropertyDefinition);
  8608. }
  8609. function createComputedGetter (key) {
  8610. return function computedGetter () {
  8611. var watcher = this._computedWatchers && this._computedWatchers[key];
  8612. if (watcher) {
  8613. if (watcher.dirty) {
  8614. watcher.evaluate();
  8615. }
  8616. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8617. watcher.depend();
  8618. }
  8619. return watcher.value
  8620. }
  8621. }
  8622. }
  8623. function createGetterInvoker(fn) {
  8624. return function computedGetter () {
  8625. return fn.call(this, this)
  8626. }
  8627. }
  8628. function initMethods (vm, methods) {
  8629. var props = vm.$options.props;
  8630. for (var key in methods) {
  8631. if (true) {
  8632. if (typeof methods[key] !== 'function') {
  8633. warn(
  8634. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8635. "Did you reference the function correctly?",
  8636. vm
  8637. );
  8638. }
  8639. if (props && hasOwn(props, key)) {
  8640. warn(
  8641. ("Method \"" + key + "\" has already been defined as a prop."),
  8642. vm
  8643. );
  8644. }
  8645. if ((key in vm) && isReserved(key)) {
  8646. warn(
  8647. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8648. "Avoid defining component methods that start with _ or $."
  8649. );
  8650. }
  8651. }
  8652. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8653. }
  8654. }
  8655. function initWatch (vm, watch) {
  8656. for (var key in watch) {
  8657. var handler = watch[key];
  8658. if (Array.isArray(handler)) {
  8659. for (var i = 0; i < handler.length; i++) {
  8660. createWatcher(vm, key, handler[i]);
  8661. }
  8662. } else {
  8663. createWatcher(vm, key, handler);
  8664. }
  8665. }
  8666. }
  8667. function createWatcher (
  8668. vm,
  8669. expOrFn,
  8670. handler,
  8671. options
  8672. ) {
  8673. if (isPlainObject(handler)) {
  8674. options = handler;
  8675. handler = handler.handler;
  8676. }
  8677. if (typeof handler === 'string') {
  8678. handler = vm[handler];
  8679. }
  8680. return vm.$watch(expOrFn, handler, options)
  8681. }
  8682. function stateMixin (Vue) {
  8683. // flow somehow has problems with directly declared definition object
  8684. // when using Object.defineProperty, so we have to procedurally build up
  8685. // the object here.
  8686. var dataDef = {};
  8687. dataDef.get = function () { return this._data };
  8688. var propsDef = {};
  8689. propsDef.get = function () { return this._props };
  8690. if (true) {
  8691. dataDef.set = function () {
  8692. warn(
  8693. 'Avoid replacing instance root $data. ' +
  8694. 'Use nested data properties instead.',
  8695. this
  8696. );
  8697. };
  8698. propsDef.set = function () {
  8699. warn("$props is readonly.", this);
  8700. };
  8701. }
  8702. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8703. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8704. Vue.prototype.$set = set;
  8705. Vue.prototype.$delete = del;
  8706. Vue.prototype.$watch = function (
  8707. expOrFn,
  8708. cb,
  8709. options
  8710. ) {
  8711. var vm = this;
  8712. if (isPlainObject(cb)) {
  8713. return createWatcher(vm, expOrFn, cb, options)
  8714. }
  8715. options = options || {};
  8716. options.user = true;
  8717. var watcher = new Watcher(vm, expOrFn, cb, options);
  8718. if (options.immediate) {
  8719. try {
  8720. cb.call(vm, watcher.value);
  8721. } catch (error) {
  8722. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8723. }
  8724. }
  8725. return function unwatchFn () {
  8726. watcher.teardown();
  8727. }
  8728. };
  8729. }
  8730. /* */
  8731. var uid$3 = 0;
  8732. function initMixin (Vue) {
  8733. Vue.prototype._init = function (options) {
  8734. var vm = this;
  8735. // a uid
  8736. vm._uid = uid$3++;
  8737. var startTag, endTag;
  8738. /* istanbul ignore if */
  8739. if ( true && config.performance && mark) {
  8740. startTag = "vue-perf-start:" + (vm._uid);
  8741. endTag = "vue-perf-end:" + (vm._uid);
  8742. mark(startTag);
  8743. }
  8744. // a flag to avoid this being observed
  8745. vm._isVue = true;
  8746. // merge options
  8747. if (options && options._isComponent) {
  8748. // optimize internal component instantiation
  8749. // since dynamic options merging is pretty slow, and none of the
  8750. // internal component options needs special treatment.
  8751. initInternalComponent(vm, options);
  8752. } else {
  8753. vm.$options = mergeOptions(
  8754. resolveConstructorOptions(vm.constructor),
  8755. options || {},
  8756. vm
  8757. );
  8758. }
  8759. /* istanbul ignore else */
  8760. if (true) {
  8761. initProxy(vm);
  8762. } else {}
  8763. // expose real self
  8764. vm._self = vm;
  8765. initLifecycle(vm);
  8766. initEvents(vm);
  8767. initRender(vm);
  8768. callHook(vm, 'beforeCreate');
  8769. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8770. initState(vm);
  8771. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8772. !vm._$fallback && callHook(vm, 'created');
  8773. /* istanbul ignore if */
  8774. if ( true && config.performance && mark) {
  8775. vm._name = formatComponentName(vm, false);
  8776. mark(endTag);
  8777. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8778. }
  8779. if (vm.$options.el) {
  8780. vm.$mount(vm.$options.el);
  8781. }
  8782. };
  8783. }
  8784. function initInternalComponent (vm, options) {
  8785. var opts = vm.$options = Object.create(vm.constructor.options);
  8786. // doing this because it's faster than dynamic enumeration.
  8787. var parentVnode = options._parentVnode;
  8788. opts.parent = options.parent;
  8789. opts._parentVnode = parentVnode;
  8790. var vnodeComponentOptions = parentVnode.componentOptions;
  8791. opts.propsData = vnodeComponentOptions.propsData;
  8792. opts._parentListeners = vnodeComponentOptions.listeners;
  8793. opts._renderChildren = vnodeComponentOptions.children;
  8794. opts._componentTag = vnodeComponentOptions.tag;
  8795. if (options.render) {
  8796. opts.render = options.render;
  8797. opts.staticRenderFns = options.staticRenderFns;
  8798. }
  8799. }
  8800. function resolveConstructorOptions (Ctor) {
  8801. var options = Ctor.options;
  8802. if (Ctor.super) {
  8803. var superOptions = resolveConstructorOptions(Ctor.super);
  8804. var cachedSuperOptions = Ctor.superOptions;
  8805. if (superOptions !== cachedSuperOptions) {
  8806. // super option changed,
  8807. // need to resolve new options.
  8808. Ctor.superOptions = superOptions;
  8809. // check if there are any late-modified/attached options (#4976)
  8810. var modifiedOptions = resolveModifiedOptions(Ctor);
  8811. // update base extend options
  8812. if (modifiedOptions) {
  8813. extend(Ctor.extendOptions, modifiedOptions);
  8814. }
  8815. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8816. if (options.name) {
  8817. options.components[options.name] = Ctor;
  8818. }
  8819. }
  8820. }
  8821. return options
  8822. }
  8823. function resolveModifiedOptions (Ctor) {
  8824. var modified;
  8825. var latest = Ctor.options;
  8826. var sealed = Ctor.sealedOptions;
  8827. for (var key in latest) {
  8828. if (latest[key] !== sealed[key]) {
  8829. if (!modified) { modified = {}; }
  8830. modified[key] = latest[key];
  8831. }
  8832. }
  8833. return modified
  8834. }
  8835. function Vue (options) {
  8836. if ( true &&
  8837. !(this instanceof Vue)
  8838. ) {
  8839. warn('Vue is a constructor and should be called with the `new` keyword');
  8840. }
  8841. this._init(options);
  8842. }
  8843. initMixin(Vue);
  8844. stateMixin(Vue);
  8845. eventsMixin(Vue);
  8846. lifecycleMixin(Vue);
  8847. renderMixin(Vue);
  8848. /* */
  8849. function initUse (Vue) {
  8850. Vue.use = function (plugin) {
  8851. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8852. if (installedPlugins.indexOf(plugin) > -1) {
  8853. return this
  8854. }
  8855. // additional parameters
  8856. var args = toArray(arguments, 1);
  8857. args.unshift(this);
  8858. if (typeof plugin.install === 'function') {
  8859. plugin.install.apply(plugin, args);
  8860. } else if (typeof plugin === 'function') {
  8861. plugin.apply(null, args);
  8862. }
  8863. installedPlugins.push(plugin);
  8864. return this
  8865. };
  8866. }
  8867. /* */
  8868. function initMixin$1 (Vue) {
  8869. Vue.mixin = function (mixin) {
  8870. this.options = mergeOptions(this.options, mixin);
  8871. return this
  8872. };
  8873. }
  8874. /* */
  8875. function initExtend (Vue) {
  8876. /**
  8877. * Each instance constructor, including Vue, has a unique
  8878. * cid. This enables us to create wrapped "child
  8879. * constructors" for prototypal inheritance and cache them.
  8880. */
  8881. Vue.cid = 0;
  8882. var cid = 1;
  8883. /**
  8884. * Class inheritance
  8885. */
  8886. Vue.extend = function (extendOptions) {
  8887. extendOptions = extendOptions || {};
  8888. var Super = this;
  8889. var SuperId = Super.cid;
  8890. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8891. if (cachedCtors[SuperId]) {
  8892. return cachedCtors[SuperId]
  8893. }
  8894. var name = extendOptions.name || Super.options.name;
  8895. if ( true && name) {
  8896. validateComponentName(name);
  8897. }
  8898. var Sub = function VueComponent (options) {
  8899. this._init(options);
  8900. };
  8901. Sub.prototype = Object.create(Super.prototype);
  8902. Sub.prototype.constructor = Sub;
  8903. Sub.cid = cid++;
  8904. Sub.options = mergeOptions(
  8905. Super.options,
  8906. extendOptions
  8907. );
  8908. Sub['super'] = Super;
  8909. // For props and computed properties, we define the proxy getters on
  8910. // the Vue instances at extension time, on the extended prototype. This
  8911. // avoids Object.defineProperty calls for each instance created.
  8912. if (Sub.options.props) {
  8913. initProps$1(Sub);
  8914. }
  8915. if (Sub.options.computed) {
  8916. initComputed$1(Sub);
  8917. }
  8918. // allow further extension/mixin/plugin usage
  8919. Sub.extend = Super.extend;
  8920. Sub.mixin = Super.mixin;
  8921. Sub.use = Super.use;
  8922. // create asset registers, so extended classes
  8923. // can have their private assets too.
  8924. ASSET_TYPES.forEach(function (type) {
  8925. Sub[type] = Super[type];
  8926. });
  8927. // enable recursive self-lookup
  8928. if (name) {
  8929. Sub.options.components[name] = Sub;
  8930. }
  8931. // keep a reference to the super options at extension time.
  8932. // later at instantiation we can check if Super's options have
  8933. // been updated.
  8934. Sub.superOptions = Super.options;
  8935. Sub.extendOptions = extendOptions;
  8936. Sub.sealedOptions = extend({}, Sub.options);
  8937. // cache constructor
  8938. cachedCtors[SuperId] = Sub;
  8939. return Sub
  8940. };
  8941. }
  8942. function initProps$1 (Comp) {
  8943. var props = Comp.options.props;
  8944. for (var key in props) {
  8945. proxy(Comp.prototype, "_props", key);
  8946. }
  8947. }
  8948. function initComputed$1 (Comp) {
  8949. var computed = Comp.options.computed;
  8950. for (var key in computed) {
  8951. defineComputed(Comp.prototype, key, computed[key]);
  8952. }
  8953. }
  8954. /* */
  8955. function initAssetRegisters (Vue) {
  8956. /**
  8957. * Create asset registration methods.
  8958. */
  8959. ASSET_TYPES.forEach(function (type) {
  8960. Vue[type] = function (
  8961. id,
  8962. definition
  8963. ) {
  8964. if (!definition) {
  8965. return this.options[type + 's'][id]
  8966. } else {
  8967. /* istanbul ignore if */
  8968. if ( true && type === 'component') {
  8969. validateComponentName(id);
  8970. }
  8971. if (type === 'component' && isPlainObject(definition)) {
  8972. definition.name = definition.name || id;
  8973. definition = this.options._base.extend(definition);
  8974. }
  8975. if (type === 'directive' && typeof definition === 'function') {
  8976. definition = { bind: definition, update: definition };
  8977. }
  8978. this.options[type + 's'][id] = definition;
  8979. return definition
  8980. }
  8981. };
  8982. });
  8983. }
  8984. /* */
  8985. function getComponentName (opts) {
  8986. return opts && (opts.Ctor.options.name || opts.tag)
  8987. }
  8988. function matches (pattern, name) {
  8989. if (Array.isArray(pattern)) {
  8990. return pattern.indexOf(name) > -1
  8991. } else if (typeof pattern === 'string') {
  8992. return pattern.split(',').indexOf(name) > -1
  8993. } else if (isRegExp(pattern)) {
  8994. return pattern.test(name)
  8995. }
  8996. /* istanbul ignore next */
  8997. return false
  8998. }
  8999. function pruneCache (keepAliveInstance, filter) {
  9000. var cache = keepAliveInstance.cache;
  9001. var keys = keepAliveInstance.keys;
  9002. var _vnode = keepAliveInstance._vnode;
  9003. for (var key in cache) {
  9004. var cachedNode = cache[key];
  9005. if (cachedNode) {
  9006. var name = getComponentName(cachedNode.componentOptions);
  9007. if (name && !filter(name)) {
  9008. pruneCacheEntry(cache, key, keys, _vnode);
  9009. }
  9010. }
  9011. }
  9012. }
  9013. function pruneCacheEntry (
  9014. cache,
  9015. key,
  9016. keys,
  9017. current
  9018. ) {
  9019. var cached$$1 = cache[key];
  9020. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9021. cached$$1.componentInstance.$destroy();
  9022. }
  9023. cache[key] = null;
  9024. remove(keys, key);
  9025. }
  9026. var patternTypes = [String, RegExp, Array];
  9027. var KeepAlive = {
  9028. name: 'keep-alive',
  9029. abstract: true,
  9030. props: {
  9031. include: patternTypes,
  9032. exclude: patternTypes,
  9033. max: [String, Number]
  9034. },
  9035. created: function created () {
  9036. this.cache = Object.create(null);
  9037. this.keys = [];
  9038. },
  9039. destroyed: function destroyed () {
  9040. for (var key in this.cache) {
  9041. pruneCacheEntry(this.cache, key, this.keys);
  9042. }
  9043. },
  9044. mounted: function mounted () {
  9045. var this$1 = this;
  9046. this.$watch('include', function (val) {
  9047. pruneCache(this$1, function (name) { return matches(val, name); });
  9048. });
  9049. this.$watch('exclude', function (val) {
  9050. pruneCache(this$1, function (name) { return !matches(val, name); });
  9051. });
  9052. },
  9053. render: function render () {
  9054. var slot = this.$slots.default;
  9055. var vnode = getFirstComponentChild(slot);
  9056. var componentOptions = vnode && vnode.componentOptions;
  9057. if (componentOptions) {
  9058. // check pattern
  9059. var name = getComponentName(componentOptions);
  9060. var ref = this;
  9061. var include = ref.include;
  9062. var exclude = ref.exclude;
  9063. if (
  9064. // not included
  9065. (include && (!name || !matches(include, name))) ||
  9066. // excluded
  9067. (exclude && name && matches(exclude, name))
  9068. ) {
  9069. return vnode
  9070. }
  9071. var ref$1 = this;
  9072. var cache = ref$1.cache;
  9073. var keys = ref$1.keys;
  9074. var key = vnode.key == null
  9075. // same constructor may get registered as different local components
  9076. // so cid alone is not enough (#3269)
  9077. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9078. : vnode.key;
  9079. if (cache[key]) {
  9080. vnode.componentInstance = cache[key].componentInstance;
  9081. // make current key freshest
  9082. remove(keys, key);
  9083. keys.push(key);
  9084. } else {
  9085. cache[key] = vnode;
  9086. keys.push(key);
  9087. // prune oldest entry
  9088. if (this.max && keys.length > parseInt(this.max)) {
  9089. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9090. }
  9091. }
  9092. vnode.data.keepAlive = true;
  9093. }
  9094. return vnode || (slot && slot[0])
  9095. }
  9096. };
  9097. var builtInComponents = {
  9098. KeepAlive: KeepAlive
  9099. };
  9100. /* */
  9101. function initGlobalAPI (Vue) {
  9102. // config
  9103. var configDef = {};
  9104. configDef.get = function () { return config; };
  9105. if (true) {
  9106. configDef.set = function () {
  9107. warn(
  9108. 'Do not replace the Vue.config object, set individual fields instead.'
  9109. );
  9110. };
  9111. }
  9112. Object.defineProperty(Vue, 'config', configDef);
  9113. // exposed util methods.
  9114. // NOTE: these are not considered part of the public API - avoid relying on
  9115. // them unless you are aware of the risk.
  9116. Vue.util = {
  9117. warn: warn,
  9118. extend: extend,
  9119. mergeOptions: mergeOptions,
  9120. defineReactive: defineReactive$$1
  9121. };
  9122. Vue.set = set;
  9123. Vue.delete = del;
  9124. Vue.nextTick = nextTick;
  9125. // 2.6 explicit observable API
  9126. Vue.observable = function (obj) {
  9127. observe(obj);
  9128. return obj
  9129. };
  9130. Vue.options = Object.create(null);
  9131. ASSET_TYPES.forEach(function (type) {
  9132. Vue.options[type + 's'] = Object.create(null);
  9133. });
  9134. // this is used to identify the "base" constructor to extend all plain-object
  9135. // components with in Weex's multi-instance scenarios.
  9136. Vue.options._base = Vue;
  9137. extend(Vue.options.components, builtInComponents);
  9138. initUse(Vue);
  9139. initMixin$1(Vue);
  9140. initExtend(Vue);
  9141. initAssetRegisters(Vue);
  9142. }
  9143. initGlobalAPI(Vue);
  9144. Object.defineProperty(Vue.prototype, '$isServer', {
  9145. get: isServerRendering
  9146. });
  9147. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9148. get: function get () {
  9149. /* istanbul ignore next */
  9150. return this.$vnode && this.$vnode.ssrContext
  9151. }
  9152. });
  9153. // expose FunctionalRenderContext for ssr runtime helper installation
  9154. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9155. value: FunctionalRenderContext
  9156. });
  9157. Vue.version = '2.6.11';
  9158. /**
  9159. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9160. */
  9161. var ARRAYTYPE = '[object Array]';
  9162. var OBJECTTYPE = '[object Object]';
  9163. var NULLTYPE = '[object Null]';
  9164. var UNDEFINEDTYPE = '[object Undefined]';
  9165. // const FUNCTIONTYPE = '[object Function]'
  9166. function diff(current, pre) {
  9167. var result = {};
  9168. syncKeys(current, pre);
  9169. _diff(current, pre, '', result);
  9170. return result
  9171. }
  9172. function syncKeys(current, pre) {
  9173. if (current === pre) { return }
  9174. var rootCurrentType = type(current);
  9175. var rootPreType = type(pre);
  9176. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9177. if(Object.keys(current).length >= Object.keys(pre).length){
  9178. for (var key in pre) {
  9179. var currentValue = current[key];
  9180. if (currentValue === undefined) {
  9181. current[key] = null;
  9182. } else {
  9183. syncKeys(currentValue, pre[key]);
  9184. }
  9185. }
  9186. }
  9187. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9188. if (current.length >= pre.length) {
  9189. pre.forEach(function (item, index) {
  9190. syncKeys(current[index], item);
  9191. });
  9192. }
  9193. }
  9194. }
  9195. function nullOrUndefined(currentType, preType) {
  9196. if(
  9197. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9198. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9199. ) {
  9200. return false
  9201. }
  9202. return true
  9203. }
  9204. function _diff(current, pre, path, result) {
  9205. if (current === pre) { return }
  9206. var rootCurrentType = type(current);
  9207. var rootPreType = type(pre);
  9208. if (rootCurrentType == OBJECTTYPE) {
  9209. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9210. setResult(result, path, current);
  9211. } else {
  9212. var loop = function ( key ) {
  9213. var currentValue = current[key];
  9214. var preValue = pre[key];
  9215. var currentType = type(currentValue);
  9216. var preType = type(preValue);
  9217. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9218. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9219. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9220. }
  9221. } else if (currentType == ARRAYTYPE) {
  9222. if (preType != ARRAYTYPE) {
  9223. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9224. } else {
  9225. if (currentValue.length < preValue.length) {
  9226. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9227. } else {
  9228. currentValue.forEach(function (item, index) {
  9229. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9230. });
  9231. }
  9232. }
  9233. } else if (currentType == OBJECTTYPE) {
  9234. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9235. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9236. } else {
  9237. for (var subKey in currentValue) {
  9238. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9239. }
  9240. }
  9241. }
  9242. };
  9243. for (var key in current) loop( key );
  9244. }
  9245. } else if (rootCurrentType == ARRAYTYPE) {
  9246. if (rootPreType != ARRAYTYPE) {
  9247. setResult(result, path, current);
  9248. } else {
  9249. if (current.length < pre.length) {
  9250. setResult(result, path, current);
  9251. } else {
  9252. current.forEach(function (item, index) {
  9253. _diff(item, pre[index], path + '[' + index + ']', result);
  9254. });
  9255. }
  9256. }
  9257. } else {
  9258. setResult(result, path, current);
  9259. }
  9260. }
  9261. function setResult(result, k, v) {
  9262. // if (type(v) != FUNCTIONTYPE) {
  9263. result[k] = v;
  9264. // }
  9265. }
  9266. function type(obj) {
  9267. return Object.prototype.toString.call(obj)
  9268. }
  9269. /* */
  9270. function flushCallbacks$1(vm) {
  9271. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9272. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9273. var mpInstance = vm.$scope;
  9274. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9275. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9276. }
  9277. var copies = vm.__next_tick_callbacks.slice(0);
  9278. vm.__next_tick_callbacks.length = 0;
  9279. for (var i = 0; i < copies.length; i++) {
  9280. copies[i]();
  9281. }
  9282. }
  9283. }
  9284. function hasRenderWatcher(vm) {
  9285. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9286. }
  9287. function nextTick$1(vm, cb) {
  9288. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9289. //2.nextTick 之前存在 render watcher
  9290. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9291. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9292. var mpInstance = vm.$scope;
  9293. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9294. ']:nextVueTick');
  9295. }
  9296. return nextTick(cb, vm)
  9297. }else{
  9298. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9299. var mpInstance$1 = vm.$scope;
  9300. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9301. ']:nextMPTick');
  9302. }
  9303. }
  9304. var _resolve;
  9305. if (!vm.__next_tick_callbacks) {
  9306. vm.__next_tick_callbacks = [];
  9307. }
  9308. vm.__next_tick_callbacks.push(function () {
  9309. if (cb) {
  9310. try {
  9311. cb.call(vm);
  9312. } catch (e) {
  9313. handleError(e, vm, 'nextTick');
  9314. }
  9315. } else if (_resolve) {
  9316. _resolve(vm);
  9317. }
  9318. });
  9319. // $flow-disable-line
  9320. if (!cb && typeof Promise !== 'undefined') {
  9321. return new Promise(function (resolve) {
  9322. _resolve = resolve;
  9323. })
  9324. }
  9325. }
  9326. /* */
  9327. function clearInstance(key, value) {
  9328. // 简易去除 Vue 和小程序组件实例
  9329. if (value) {
  9330. if (value._isVue || value.__v_isMPComponent) {
  9331. return {}
  9332. }
  9333. }
  9334. return value
  9335. }
  9336. function cloneWithData(vm) {
  9337. // 确保当前 vm 所有数据被同步
  9338. var ret = Object.create(null);
  9339. var dataKeys = [].concat(
  9340. Object.keys(vm._data || {}),
  9341. Object.keys(vm._computedWatchers || {}));
  9342. dataKeys.reduce(function(ret, key) {
  9343. ret[key] = vm[key];
  9344. return ret
  9345. }, ret);
  9346. // vue-composition-api
  9347. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9348. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9349. if (rawBindings) {
  9350. Object.keys(rawBindings).forEach(function (key) {
  9351. ret[key] = vm[key];
  9352. });
  9353. }
  9354. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9355. Object.assign(ret, vm.$mp.data || {});
  9356. if (
  9357. Array.isArray(vm.$options.behaviors) &&
  9358. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9359. ) { //form-field
  9360. ret['name'] = vm.name;
  9361. ret['value'] = vm.value;
  9362. }
  9363. return JSON.parse(JSON.stringify(ret, clearInstance))
  9364. }
  9365. var patch = function(oldVnode, vnode) {
  9366. var this$1 = this;
  9367. if (vnode === null) { //destroy
  9368. return
  9369. }
  9370. if (this.mpType === 'page' || this.mpType === 'component') {
  9371. var mpInstance = this.$scope;
  9372. var data = Object.create(null);
  9373. try {
  9374. data = cloneWithData(this);
  9375. } catch (err) {
  9376. console.error(err);
  9377. }
  9378. data.__webviewId__ = mpInstance.data.__webviewId__;
  9379. var mpData = Object.create(null);
  9380. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9381. mpData[key] = mpInstance.data[key];
  9382. });
  9383. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9384. if (Object.keys(diffData).length) {
  9385. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9386. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9387. ']差量更新',
  9388. JSON.stringify(diffData));
  9389. }
  9390. this.__next_tick_pending = true;
  9391. mpInstance.setData(diffData, function () {
  9392. this$1.__next_tick_pending = false;
  9393. flushCallbacks$1(this$1);
  9394. });
  9395. } else {
  9396. flushCallbacks$1(this);
  9397. }
  9398. }
  9399. };
  9400. /* */
  9401. function createEmptyRender() {
  9402. }
  9403. function mountComponent$1(
  9404. vm,
  9405. el,
  9406. hydrating
  9407. ) {
  9408. if (!vm.mpType) {//main.js 中的 new Vue
  9409. return vm
  9410. }
  9411. if (vm.mpType === 'app') {
  9412. vm.$options.render = createEmptyRender;
  9413. }
  9414. if (!vm.$options.render) {
  9415. vm.$options.render = createEmptyRender;
  9416. if (true) {
  9417. /* istanbul ignore if */
  9418. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9419. vm.$options.el || el) {
  9420. warn(
  9421. 'You are using the runtime-only build of Vue where the template ' +
  9422. 'compiler is not available. Either pre-compile the templates into ' +
  9423. 'render functions, or use the compiler-included build.',
  9424. vm
  9425. );
  9426. } else {
  9427. warn(
  9428. 'Failed to mount component: template or render function not defined.',
  9429. vm
  9430. );
  9431. }
  9432. }
  9433. }
  9434. !vm._$fallback && callHook(vm, 'beforeMount');
  9435. var updateComponent = function () {
  9436. vm._update(vm._render(), hydrating);
  9437. };
  9438. // we set this to vm._watcher inside the watcher's constructor
  9439. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9440. // component's mounted hook), which relies on vm._watcher being already defined
  9441. new Watcher(vm, updateComponent, noop, {
  9442. before: function before() {
  9443. if (vm._isMounted && !vm._isDestroyed) {
  9444. callHook(vm, 'beforeUpdate');
  9445. }
  9446. }
  9447. }, true /* isRenderWatcher */);
  9448. hydrating = false;
  9449. return vm
  9450. }
  9451. /* */
  9452. function renderClass (
  9453. staticClass,
  9454. dynamicClass
  9455. ) {
  9456. if (isDef(staticClass) || isDef(dynamicClass)) {
  9457. return concat(staticClass, stringifyClass(dynamicClass))
  9458. }
  9459. /* istanbul ignore next */
  9460. return ''
  9461. }
  9462. function concat (a, b) {
  9463. return a ? b ? (a + ' ' + b) : a : (b || '')
  9464. }
  9465. function stringifyClass (value) {
  9466. if (Array.isArray(value)) {
  9467. return stringifyArray(value)
  9468. }
  9469. if (isObject(value)) {
  9470. return stringifyObject(value)
  9471. }
  9472. if (typeof value === 'string') {
  9473. return value
  9474. }
  9475. /* istanbul ignore next */
  9476. return ''
  9477. }
  9478. function stringifyArray (value) {
  9479. var res = '';
  9480. var stringified;
  9481. for (var i = 0, l = value.length; i < l; i++) {
  9482. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9483. if (res) { res += ' '; }
  9484. res += stringified;
  9485. }
  9486. }
  9487. return res
  9488. }
  9489. function stringifyObject (value) {
  9490. var res = '';
  9491. for (var key in value) {
  9492. if (value[key]) {
  9493. if (res) { res += ' '; }
  9494. res += key;
  9495. }
  9496. }
  9497. return res
  9498. }
  9499. /* */
  9500. var parseStyleText = cached(function (cssText) {
  9501. var res = {};
  9502. var listDelimiter = /;(?![^(]*\))/g;
  9503. var propertyDelimiter = /:(.+)/;
  9504. cssText.split(listDelimiter).forEach(function (item) {
  9505. if (item) {
  9506. var tmp = item.split(propertyDelimiter);
  9507. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9508. }
  9509. });
  9510. return res
  9511. });
  9512. // normalize possible array / string values into Object
  9513. function normalizeStyleBinding (bindingStyle) {
  9514. if (Array.isArray(bindingStyle)) {
  9515. return toObject(bindingStyle)
  9516. }
  9517. if (typeof bindingStyle === 'string') {
  9518. return parseStyleText(bindingStyle)
  9519. }
  9520. return bindingStyle
  9521. }
  9522. /* */
  9523. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9524. function getTarget(obj, path) {
  9525. var parts = path.split('.');
  9526. var key = parts[0];
  9527. if (key.indexOf('__$n') === 0) { //number index
  9528. key = parseInt(key.replace('__$n', ''));
  9529. }
  9530. if (parts.length === 1) {
  9531. return obj[key]
  9532. }
  9533. return getTarget(obj[key], parts.slice(1).join('.'))
  9534. }
  9535. function internalMixin(Vue) {
  9536. Vue.config.errorHandler = function(err, vm, info) {
  9537. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9538. console.error(err);
  9539. /* eslint-disable no-undef */
  9540. var app = typeof getApp === 'function' && getApp();
  9541. if (app && app.onError) {
  9542. app.onError(err);
  9543. }
  9544. };
  9545. var oldEmit = Vue.prototype.$emit;
  9546. Vue.prototype.$emit = function(event) {
  9547. if (this.$scope && event) {
  9548. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9549. if (triggerEvent) {
  9550. try {
  9551. triggerEvent.call(this.$scope, event, {
  9552. __args__: toArray(arguments, 1)
  9553. });
  9554. } catch (error) {
  9555. }
  9556. }
  9557. }
  9558. return oldEmit.apply(this, arguments)
  9559. };
  9560. Vue.prototype.$nextTick = function(fn) {
  9561. return nextTick$1(this, fn)
  9562. };
  9563. MP_METHODS.forEach(function (method) {
  9564. Vue.prototype[method] = function(args) {
  9565. if (this.$scope && this.$scope[method]) {
  9566. return this.$scope[method](args)
  9567. }
  9568. // mp-alipay
  9569. if (typeof my === 'undefined') {
  9570. return
  9571. }
  9572. if (method === 'createSelectorQuery') {
  9573. /* eslint-disable no-undef */
  9574. return my.createSelectorQuery(args)
  9575. } else if (method === 'createIntersectionObserver') {
  9576. /* eslint-disable no-undef */
  9577. return my.createIntersectionObserver(args)
  9578. }
  9579. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9580. };
  9581. });
  9582. Vue.prototype.__init_provide = initProvide;
  9583. Vue.prototype.__init_injections = initInjections;
  9584. Vue.prototype.__call_hook = function(hook, args) {
  9585. var vm = this;
  9586. // #7573 disable dep collection when invoking lifecycle hooks
  9587. pushTarget();
  9588. var handlers = vm.$options[hook];
  9589. var info = hook + " hook";
  9590. var ret;
  9591. if (handlers) {
  9592. for (var i = 0, j = handlers.length; i < j; i++) {
  9593. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9594. }
  9595. }
  9596. if (vm._hasHookEvent) {
  9597. vm.$emit('hook:' + hook, args);
  9598. }
  9599. popTarget();
  9600. return ret
  9601. };
  9602. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9603. if (Array.isArray(modifiers)) {
  9604. if (modifiers.indexOf('trim') !== -1) {
  9605. value = value.trim();
  9606. }
  9607. if (modifiers.indexOf('number') !== -1) {
  9608. value = this._n(value);
  9609. }
  9610. }
  9611. if (!target) {
  9612. target = this;
  9613. }
  9614. // 解决动态属性添加
  9615. Vue.set(target, key, value);
  9616. };
  9617. Vue.prototype.__set_sync = function(target, key, value) {
  9618. if (!target) {
  9619. target = this;
  9620. }
  9621. // 解决动态属性添加
  9622. Vue.set(target, key, value);
  9623. };
  9624. Vue.prototype.__get_orig = function(item) {
  9625. if (isPlainObject(item)) {
  9626. return item['$orig'] || item
  9627. }
  9628. return item
  9629. };
  9630. Vue.prototype.__get_value = function(dataPath, target) {
  9631. return getTarget(target || this, dataPath)
  9632. };
  9633. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9634. return renderClass(staticClass, dynamicClass)
  9635. };
  9636. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9637. if (!dynamicStyle && !staticStyle) {
  9638. return ''
  9639. }
  9640. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9641. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9642. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9643. };
  9644. Vue.prototype.__map = function(val, iteratee) {
  9645. //TODO 暂不考虑 string
  9646. var ret, i, l, keys, key;
  9647. if (Array.isArray(val)) {
  9648. ret = new Array(val.length);
  9649. for (i = 0, l = val.length; i < l; i++) {
  9650. ret[i] = iteratee(val[i], i);
  9651. }
  9652. return ret
  9653. } else if (isObject(val)) {
  9654. keys = Object.keys(val);
  9655. ret = Object.create(null);
  9656. for (i = 0, l = keys.length; i < l; i++) {
  9657. key = keys[i];
  9658. ret[key] = iteratee(val[key], key, i);
  9659. }
  9660. return ret
  9661. } else if (typeof val === 'number') {
  9662. ret = new Array(val);
  9663. for (i = 0, l = val; i < l; i++) {
  9664. // 第一个参数暂时仍和小程序一致
  9665. ret[i] = iteratee(i, i);
  9666. }
  9667. return ret
  9668. }
  9669. return []
  9670. };
  9671. }
  9672. /* */
  9673. var LIFECYCLE_HOOKS$1 = [
  9674. //App
  9675. 'onLaunch',
  9676. 'onShow',
  9677. 'onHide',
  9678. 'onUniNViewMessage',
  9679. 'onPageNotFound',
  9680. 'onThemeChange',
  9681. 'onError',
  9682. 'onUnhandledRejection',
  9683. //Page
  9684. 'onInit',
  9685. 'onLoad',
  9686. // 'onShow',
  9687. 'onReady',
  9688. // 'onHide',
  9689. 'onUnload',
  9690. 'onPullDownRefresh',
  9691. 'onReachBottom',
  9692. 'onTabItemTap',
  9693. 'onAddToFavorites',
  9694. 'onShareTimeline',
  9695. 'onShareAppMessage',
  9696. 'onResize',
  9697. 'onPageScroll',
  9698. 'onNavigationBarButtonTap',
  9699. 'onBackPress',
  9700. 'onNavigationBarSearchInputChanged',
  9701. 'onNavigationBarSearchInputConfirmed',
  9702. 'onNavigationBarSearchInputClicked',
  9703. 'onUploadDouyinVideo',
  9704. 'onNFCReadMessage',
  9705. //Component
  9706. // 'onReady', // 兼容旧版本,应该移除该事件
  9707. 'onPageShow',
  9708. 'onPageHide',
  9709. 'onPageResize'
  9710. ];
  9711. function lifecycleMixin$1(Vue) {
  9712. //fixed vue-class-component
  9713. var oldExtend = Vue.extend;
  9714. Vue.extend = function(extendOptions) {
  9715. extendOptions = extendOptions || {};
  9716. var methods = extendOptions.methods;
  9717. if (methods) {
  9718. Object.keys(methods).forEach(function (methodName) {
  9719. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9720. extendOptions[methodName] = methods[methodName];
  9721. delete methods[methodName];
  9722. }
  9723. });
  9724. }
  9725. return oldExtend.call(this, extendOptions)
  9726. };
  9727. var strategies = Vue.config.optionMergeStrategies;
  9728. var mergeHook = strategies.created;
  9729. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9730. strategies[hook] = mergeHook;
  9731. });
  9732. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9733. }
  9734. /* */
  9735. // install platform patch function
  9736. Vue.prototype.__patch__ = patch;
  9737. // public mount method
  9738. Vue.prototype.$mount = function(
  9739. el ,
  9740. hydrating
  9741. ) {
  9742. return mountComponent$1(this, el, hydrating)
  9743. };
  9744. lifecycleMixin$1(Vue);
  9745. internalMixin(Vue);
  9746. /* */
  9747. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9748. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9749. /***/ }),
  9750. /***/ 26:
  9751. /*!********************************************************************!*\
  9752. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/pages.json ***!
  9753. \********************************************************************/
  9754. /*! no static exports found */
  9755. /***/ (function(module, exports) {
  9756. /***/ }),
  9757. /***/ 3:
  9758. /*!***********************************!*\
  9759. !*** (webpack)/buildin/global.js ***!
  9760. \***********************************/
  9761. /*! no static exports found */
  9762. /***/ (function(module, exports) {
  9763. var g;
  9764. // This works in non-strict mode
  9765. g = (function() {
  9766. return this;
  9767. })();
  9768. try {
  9769. // This works if eval is allowed (see CSP)
  9770. g = g || new Function("return this")();
  9771. } catch (e) {
  9772. // This works if the window reference is available
  9773. if (typeof window === "object") g = window;
  9774. }
  9775. // g can still be undefined, but nothing to do about it...
  9776. // We return undefined, instead of nothing here, so it's
  9777. // easier to handle this case. if(!global) { ...}
  9778. module.exports = g;
  9779. /***/ }),
  9780. /***/ 32:
  9781. /*!**********************************************************************************************************!*\
  9782. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  9783. \**********************************************************************************************************/
  9784. /*! exports provided: default */
  9785. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9786. "use strict";
  9787. __webpack_require__.r(__webpack_exports__);
  9788. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  9789. /* globals __VUE_SSR_CONTEXT__ */
  9790. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9791. // This module is a runtime utility for cleaner component module output and will
  9792. // be included in the final webpack user bundle.
  9793. function normalizeComponent (
  9794. scriptExports,
  9795. render,
  9796. staticRenderFns,
  9797. functionalTemplate,
  9798. injectStyles,
  9799. scopeId,
  9800. moduleIdentifier, /* server only */
  9801. shadowMode, /* vue-cli only */
  9802. components, // fixed by xxxxxx auto components
  9803. renderjs // fixed by xxxxxx renderjs
  9804. ) {
  9805. // Vue.extend constructor export interop
  9806. var options = typeof scriptExports === 'function'
  9807. ? scriptExports.options
  9808. : scriptExports
  9809. // fixed by xxxxxx auto components
  9810. if (components) {
  9811. if (!options.components) {
  9812. options.components = {}
  9813. }
  9814. var hasOwn = Object.prototype.hasOwnProperty
  9815. for (var name in components) {
  9816. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  9817. options.components[name] = components[name]
  9818. }
  9819. }
  9820. }
  9821. // fixed by xxxxxx renderjs
  9822. if (renderjs) {
  9823. if(typeof renderjs.beforeCreate === 'function'){
  9824. renderjs.beforeCreate = [renderjs.beforeCreate]
  9825. }
  9826. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  9827. this[renderjs.__module] = this
  9828. });
  9829. (options.mixins || (options.mixins = [])).push(renderjs)
  9830. }
  9831. // render functions
  9832. if (render) {
  9833. options.render = render
  9834. options.staticRenderFns = staticRenderFns
  9835. options._compiled = true
  9836. }
  9837. // functional template
  9838. if (functionalTemplate) {
  9839. options.functional = true
  9840. }
  9841. // scopedId
  9842. if (scopeId) {
  9843. options._scopeId = 'data-v-' + scopeId
  9844. }
  9845. var hook
  9846. if (moduleIdentifier) { // server build
  9847. hook = function (context) {
  9848. // 2.3 injection
  9849. context =
  9850. context || // cached call
  9851. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9852. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9853. // 2.2 with runInNewContext: true
  9854. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9855. context = __VUE_SSR_CONTEXT__
  9856. }
  9857. // inject component styles
  9858. if (injectStyles) {
  9859. injectStyles.call(this, context)
  9860. }
  9861. // register component module identifier for async chunk inferrence
  9862. if (context && context._registeredComponents) {
  9863. context._registeredComponents.add(moduleIdentifier)
  9864. }
  9865. }
  9866. // used by ssr in case component is cached and beforeCreate
  9867. // never gets called
  9868. options._ssrRegister = hook
  9869. } else if (injectStyles) {
  9870. hook = shadowMode
  9871. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9872. : injectStyles
  9873. }
  9874. if (hook) {
  9875. if (options.functional) {
  9876. // for template-only hot-reload because in that case the render fn doesn't
  9877. // go through the normalizer
  9878. options._injectStyles = hook
  9879. // register for functioal component in vue file
  9880. var originalRender = options.render
  9881. options.render = function renderWithStyleInjection (h, context) {
  9882. hook.call(context)
  9883. return originalRender(h, context)
  9884. }
  9885. } else {
  9886. // inject component registration as beforeCreate hook
  9887. var existing = options.beforeCreate
  9888. options.beforeCreate = existing
  9889. ? [].concat(existing, hook)
  9890. : [hook]
  9891. }
  9892. }
  9893. return {
  9894. exports: scriptExports,
  9895. options: options
  9896. }
  9897. }
  9898. /***/ }),
  9899. /***/ 33:
  9900. /*!**********************************************************************************!*\
  9901. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/uni.promisify.adaptor.js ***!
  9902. \**********************************************************************************/
  9903. /*! no static exports found */
  9904. /***/ (function(module, exports, __webpack_require__) {
  9905. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9906. uni.addInterceptor({
  9907. returnValue: function returnValue(res) {
  9908. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  9909. return res;
  9910. }
  9911. return new Promise(function (resolve, reject) {
  9912. res.then(function (res) {
  9913. return res[0] ? reject(res[0]) : resolve(res[1]);
  9914. });
  9915. });
  9916. }
  9917. });
  9918. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9919. /***/ }),
  9920. /***/ 4:
  9921. /*!**********************************************************************!*\
  9922. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  9923. \**********************************************************************/
  9924. /*! no static exports found */
  9925. /***/ (function(module, exports) {
  9926. function _interopRequireDefault(obj) {
  9927. return obj && obj.__esModule ? obj : {
  9928. "default": obj
  9929. };
  9930. }
  9931. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9932. /***/ }),
  9933. /***/ 5:
  9934. /*!**************************************************************!*\
  9935. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  9936. \**************************************************************/
  9937. /*! no static exports found */
  9938. /***/ (function(module, exports, __webpack_require__) {
  9939. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  9940. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  9941. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  9942. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  9943. function _slicedToArray(arr, i) {
  9944. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  9945. }
  9946. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9947. /***/ }),
  9948. /***/ 6:
  9949. /*!***************************************************************!*\
  9950. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  9951. \***************************************************************/
  9952. /*! no static exports found */
  9953. /***/ (function(module, exports) {
  9954. function _arrayWithHoles(arr) {
  9955. if (Array.isArray(arr)) return arr;
  9956. }
  9957. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9958. /***/ }),
  9959. /***/ 7:
  9960. /*!*********************************************************************!*\
  9961. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  9962. \*********************************************************************/
  9963. /*! no static exports found */
  9964. /***/ (function(module, exports) {
  9965. function _iterableToArrayLimit(arr, i) {
  9966. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  9967. if (null != _i) {
  9968. var _s,
  9969. _e,
  9970. _x,
  9971. _r,
  9972. _arr = [],
  9973. _n = !0,
  9974. _d = !1;
  9975. try {
  9976. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  9977. if (Object(_i) !== _i) return;
  9978. _n = !1;
  9979. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  9980. ;
  9981. }
  9982. } catch (err) {
  9983. _d = !0, _e = err;
  9984. } finally {
  9985. try {
  9986. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  9987. } finally {
  9988. if (_d) throw _e;
  9989. }
  9990. }
  9991. return _arr;
  9992. }
  9993. }
  9994. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9995. /***/ }),
  9996. /***/ 8:
  9997. /*!***************************************************************************!*\
  9998. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  9999. \***************************************************************************/
  10000. /*! no static exports found */
  10001. /***/ (function(module, exports, __webpack_require__) {
  10002. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  10003. function _unsupportedIterableToArray(o, minLen) {
  10004. if (!o) return;
  10005. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  10006. var n = Object.prototype.toString.call(o).slice(8, -1);
  10007. if (n === "Object" && o.constructor) n = o.constructor.name;
  10008. if (n === "Map" || n === "Set") return Array.from(o);
  10009. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  10010. }
  10011. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10012. /***/ }),
  10013. /***/ 9:
  10014. /*!*****************************************************************!*\
  10015. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  10016. \*****************************************************************/
  10017. /*! no static exports found */
  10018. /***/ (function(module, exports) {
  10019. function _arrayLikeToArray(arr, len) {
  10020. if (len == null || len > arr.length) len = arr.length;
  10021. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  10022. arr2[i] = arr[i];
  10023. }
  10024. return arr2;
  10025. }
  10026. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10027. /***/ })
  10028. }]);
  10029. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map