vendor.js 374 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210
  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. /***/ 125:
  90. /*!**********************************************************************************************!*\
  91. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  92. \**********************************************************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports, __webpack_require__) {
  95. "use strict";
  96. Object.defineProperty(exports, "__esModule", {
  97. value: true
  98. });
  99. exports.default = void 0;
  100. var _default = {
  101. "id": "2852637",
  102. "name": "uniui图标库",
  103. "font_family": "uniicons",
  104. "css_prefix_text": "uniui-",
  105. "description": "",
  106. "glyphs": [{
  107. "icon_id": "25027049",
  108. "name": "yanse",
  109. "font_class": "color",
  110. "unicode": "e6cf",
  111. "unicode_decimal": 59087
  112. }, {
  113. "icon_id": "25027048",
  114. "name": "wallet",
  115. "font_class": "wallet",
  116. "unicode": "e6b1",
  117. "unicode_decimal": 59057
  118. }, {
  119. "icon_id": "25015720",
  120. "name": "settings-filled",
  121. "font_class": "settings-filled",
  122. "unicode": "e6ce",
  123. "unicode_decimal": 59086
  124. }, {
  125. "icon_id": "25015434",
  126. "name": "shimingrenzheng-filled",
  127. "font_class": "auth-filled",
  128. "unicode": "e6cc",
  129. "unicode_decimal": 59084
  130. }, {
  131. "icon_id": "24934246",
  132. "name": "shop-filled",
  133. "font_class": "shop-filled",
  134. "unicode": "e6cd",
  135. "unicode_decimal": 59085
  136. }, {
  137. "icon_id": "24934159",
  138. "name": "staff-filled-01",
  139. "font_class": "staff-filled",
  140. "unicode": "e6cb",
  141. "unicode_decimal": 59083
  142. }, {
  143. "icon_id": "24932461",
  144. "name": "VIP-filled",
  145. "font_class": "vip-filled",
  146. "unicode": "e6c6",
  147. "unicode_decimal": 59078
  148. }, {
  149. "icon_id": "24932462",
  150. "name": "plus_circle_fill",
  151. "font_class": "plus-filled",
  152. "unicode": "e6c7",
  153. "unicode_decimal": 59079
  154. }, {
  155. "icon_id": "24932463",
  156. "name": "folder_add-filled",
  157. "font_class": "folder-add-filled",
  158. "unicode": "e6c8",
  159. "unicode_decimal": 59080
  160. }, {
  161. "icon_id": "24932464",
  162. "name": "yanse-filled",
  163. "font_class": "color-filled",
  164. "unicode": "e6c9",
  165. "unicode_decimal": 59081
  166. }, {
  167. "icon_id": "24932465",
  168. "name": "tune-filled",
  169. "font_class": "tune-filled",
  170. "unicode": "e6ca",
  171. "unicode_decimal": 59082
  172. }, {
  173. "icon_id": "24932455",
  174. "name": "a-rilidaka-filled",
  175. "font_class": "calendar-filled",
  176. "unicode": "e6c0",
  177. "unicode_decimal": 59072
  178. }, {
  179. "icon_id": "24932456",
  180. "name": "notification-filled",
  181. "font_class": "notification-filled",
  182. "unicode": "e6c1",
  183. "unicode_decimal": 59073
  184. }, {
  185. "icon_id": "24932457",
  186. "name": "wallet-filled",
  187. "font_class": "wallet-filled",
  188. "unicode": "e6c2",
  189. "unicode_decimal": 59074
  190. }, {
  191. "icon_id": "24932458",
  192. "name": "paihangbang-filled",
  193. "font_class": "medal-filled",
  194. "unicode": "e6c3",
  195. "unicode_decimal": 59075
  196. }, {
  197. "icon_id": "24932459",
  198. "name": "gift-filled",
  199. "font_class": "gift-filled",
  200. "unicode": "e6c4",
  201. "unicode_decimal": 59076
  202. }, {
  203. "icon_id": "24932460",
  204. "name": "fire-filled",
  205. "font_class": "fire-filled",
  206. "unicode": "e6c5",
  207. "unicode_decimal": 59077
  208. }, {
  209. "icon_id": "24928001",
  210. "name": "refreshempty",
  211. "font_class": "refreshempty",
  212. "unicode": "e6bf",
  213. "unicode_decimal": 59071
  214. }, {
  215. "icon_id": "24926853",
  216. "name": "location-ellipse",
  217. "font_class": "location-filled",
  218. "unicode": "e6af",
  219. "unicode_decimal": 59055
  220. }, {
  221. "icon_id": "24926735",
  222. "name": "person-filled",
  223. "font_class": "person-filled",
  224. "unicode": "e69d",
  225. "unicode_decimal": 59037
  226. }, {
  227. "icon_id": "24926703",
  228. "name": "personadd-filled",
  229. "font_class": "personadd-filled",
  230. "unicode": "e698",
  231. "unicode_decimal": 59032
  232. }, {
  233. "icon_id": "24923351",
  234. "name": "back",
  235. "font_class": "back",
  236. "unicode": "e6b9",
  237. "unicode_decimal": 59065
  238. }, {
  239. "icon_id": "24923352",
  240. "name": "forward",
  241. "font_class": "forward",
  242. "unicode": "e6ba",
  243. "unicode_decimal": 59066
  244. }, {
  245. "icon_id": "24923353",
  246. "name": "arrowthinright",
  247. "font_class": "arrow-right",
  248. "unicode": "e6bb",
  249. "unicode_decimal": 59067
  250. }, {
  251. "icon_id": "24923353",
  252. "name": "arrowthinright",
  253. "font_class": "arrowthinright",
  254. "unicode": "e6bb",
  255. "unicode_decimal": 59067
  256. }, {
  257. "icon_id": "24923354",
  258. "name": "arrowthinleft",
  259. "font_class": "arrow-left",
  260. "unicode": "e6bc",
  261. "unicode_decimal": 59068
  262. }, {
  263. "icon_id": "24923354",
  264. "name": "arrowthinleft",
  265. "font_class": "arrowthinleft",
  266. "unicode": "e6bc",
  267. "unicode_decimal": 59068
  268. }, {
  269. "icon_id": "24923355",
  270. "name": "arrowthinup",
  271. "font_class": "arrow-up",
  272. "unicode": "e6bd",
  273. "unicode_decimal": 59069
  274. }, {
  275. "icon_id": "24923355",
  276. "name": "arrowthinup",
  277. "font_class": "arrowthinup",
  278. "unicode": "e6bd",
  279. "unicode_decimal": 59069
  280. }, {
  281. "icon_id": "24923356",
  282. "name": "arrowthindown",
  283. "font_class": "arrow-down",
  284. "unicode": "e6be",
  285. "unicode_decimal": 59070
  286. }, {
  287. "icon_id": "24923356",
  288. "name": "arrowthindown",
  289. "font_class": "arrowthindown",
  290. "unicode": "e6be",
  291. "unicode_decimal": 59070
  292. }, {
  293. "icon_id": "24923349",
  294. "name": "arrowdown",
  295. "font_class": "bottom",
  296. "unicode": "e6b8",
  297. "unicode_decimal": 59064
  298. }, {
  299. "icon_id": "24923349",
  300. "name": "arrowdown",
  301. "font_class": "arrowdown",
  302. "unicode": "e6b8",
  303. "unicode_decimal": 59064
  304. }, {
  305. "icon_id": "24923346",
  306. "name": "arrowright",
  307. "font_class": "right",
  308. "unicode": "e6b5",
  309. "unicode_decimal": 59061
  310. }, {
  311. "icon_id": "24923346",
  312. "name": "arrowright",
  313. "font_class": "arrowright",
  314. "unicode": "e6b5",
  315. "unicode_decimal": 59061
  316. }, {
  317. "icon_id": "24923347",
  318. "name": "arrowup",
  319. "font_class": "top",
  320. "unicode": "e6b6",
  321. "unicode_decimal": 59062
  322. }, {
  323. "icon_id": "24923347",
  324. "name": "arrowup",
  325. "font_class": "arrowup",
  326. "unicode": "e6b6",
  327. "unicode_decimal": 59062
  328. }, {
  329. "icon_id": "24923348",
  330. "name": "arrowleft",
  331. "font_class": "left",
  332. "unicode": "e6b7",
  333. "unicode_decimal": 59063
  334. }, {
  335. "icon_id": "24923348",
  336. "name": "arrowleft",
  337. "font_class": "arrowleft",
  338. "unicode": "e6b7",
  339. "unicode_decimal": 59063
  340. }, {
  341. "icon_id": "24923334",
  342. "name": "eye",
  343. "font_class": "eye",
  344. "unicode": "e651",
  345. "unicode_decimal": 58961
  346. }, {
  347. "icon_id": "24923335",
  348. "name": "eye-filled",
  349. "font_class": "eye-filled",
  350. "unicode": "e66a",
  351. "unicode_decimal": 58986
  352. }, {
  353. "icon_id": "24923336",
  354. "name": "eye-slash",
  355. "font_class": "eye-slash",
  356. "unicode": "e6b3",
  357. "unicode_decimal": 59059
  358. }, {
  359. "icon_id": "24923337",
  360. "name": "eye-slash-filled",
  361. "font_class": "eye-slash-filled",
  362. "unicode": "e6b4",
  363. "unicode_decimal": 59060
  364. }, {
  365. "icon_id": "24923305",
  366. "name": "info-filled",
  367. "font_class": "info-filled",
  368. "unicode": "e649",
  369. "unicode_decimal": 58953
  370. }, {
  371. "icon_id": "24923299",
  372. "name": "reload-01",
  373. "font_class": "reload",
  374. "unicode": "e6b2",
  375. "unicode_decimal": 59058
  376. }, {
  377. "icon_id": "24923195",
  378. "name": "mic_slash_fill",
  379. "font_class": "micoff-filled",
  380. "unicode": "e6b0",
  381. "unicode_decimal": 59056
  382. }, {
  383. "icon_id": "24923165",
  384. "name": "map-pin-ellipse",
  385. "font_class": "map-pin-ellipse",
  386. "unicode": "e6ac",
  387. "unicode_decimal": 59052
  388. }, {
  389. "icon_id": "24923166",
  390. "name": "map-pin",
  391. "font_class": "map-pin",
  392. "unicode": "e6ad",
  393. "unicode_decimal": 59053
  394. }, {
  395. "icon_id": "24923167",
  396. "name": "location",
  397. "font_class": "location",
  398. "unicode": "e6ae",
  399. "unicode_decimal": 59054
  400. }, {
  401. "icon_id": "24923064",
  402. "name": "starhalf",
  403. "font_class": "starhalf",
  404. "unicode": "e683",
  405. "unicode_decimal": 59011
  406. }, {
  407. "icon_id": "24923065",
  408. "name": "star",
  409. "font_class": "star",
  410. "unicode": "e688",
  411. "unicode_decimal": 59016
  412. }, {
  413. "icon_id": "24923066",
  414. "name": "star-filled",
  415. "font_class": "star-filled",
  416. "unicode": "e68f",
  417. "unicode_decimal": 59023
  418. }, {
  419. "icon_id": "24899646",
  420. "name": "a-rilidaka",
  421. "font_class": "calendar",
  422. "unicode": "e6a0",
  423. "unicode_decimal": 59040
  424. }, {
  425. "icon_id": "24899647",
  426. "name": "fire",
  427. "font_class": "fire",
  428. "unicode": "e6a1",
  429. "unicode_decimal": 59041
  430. }, {
  431. "icon_id": "24899648",
  432. "name": "paihangbang",
  433. "font_class": "medal",
  434. "unicode": "e6a2",
  435. "unicode_decimal": 59042
  436. }, {
  437. "icon_id": "24899649",
  438. "name": "font",
  439. "font_class": "font",
  440. "unicode": "e6a3",
  441. "unicode_decimal": 59043
  442. }, {
  443. "icon_id": "24899650",
  444. "name": "gift",
  445. "font_class": "gift",
  446. "unicode": "e6a4",
  447. "unicode_decimal": 59044
  448. }, {
  449. "icon_id": "24899651",
  450. "name": "link",
  451. "font_class": "link",
  452. "unicode": "e6a5",
  453. "unicode_decimal": 59045
  454. }, {
  455. "icon_id": "24899652",
  456. "name": "notification",
  457. "font_class": "notification",
  458. "unicode": "e6a6",
  459. "unicode_decimal": 59046
  460. }, {
  461. "icon_id": "24899653",
  462. "name": "staff",
  463. "font_class": "staff",
  464. "unicode": "e6a7",
  465. "unicode_decimal": 59047
  466. }, {
  467. "icon_id": "24899654",
  468. "name": "VIP",
  469. "font_class": "vip",
  470. "unicode": "e6a8",
  471. "unicode_decimal": 59048
  472. }, {
  473. "icon_id": "24899655",
  474. "name": "folder_add",
  475. "font_class": "folder-add",
  476. "unicode": "e6a9",
  477. "unicode_decimal": 59049
  478. }, {
  479. "icon_id": "24899656",
  480. "name": "tune",
  481. "font_class": "tune",
  482. "unicode": "e6aa",
  483. "unicode_decimal": 59050
  484. }, {
  485. "icon_id": "24899657",
  486. "name": "shimingrenzheng",
  487. "font_class": "auth",
  488. "unicode": "e6ab",
  489. "unicode_decimal": 59051
  490. }, {
  491. "icon_id": "24899565",
  492. "name": "person",
  493. "font_class": "person",
  494. "unicode": "e699",
  495. "unicode_decimal": 59033
  496. }, {
  497. "icon_id": "24899566",
  498. "name": "email-filled",
  499. "font_class": "email-filled",
  500. "unicode": "e69a",
  501. "unicode_decimal": 59034
  502. }, {
  503. "icon_id": "24899567",
  504. "name": "phone-filled",
  505. "font_class": "phone-filled",
  506. "unicode": "e69b",
  507. "unicode_decimal": 59035
  508. }, {
  509. "icon_id": "24899568",
  510. "name": "phone",
  511. "font_class": "phone",
  512. "unicode": "e69c",
  513. "unicode_decimal": 59036
  514. }, {
  515. "icon_id": "24899570",
  516. "name": "email",
  517. "font_class": "email",
  518. "unicode": "e69e",
  519. "unicode_decimal": 59038
  520. }, {
  521. "icon_id": "24899571",
  522. "name": "personadd",
  523. "font_class": "personadd",
  524. "unicode": "e69f",
  525. "unicode_decimal": 59039
  526. }, {
  527. "icon_id": "24899558",
  528. "name": "chatboxes-filled",
  529. "font_class": "chatboxes-filled",
  530. "unicode": "e692",
  531. "unicode_decimal": 59026
  532. }, {
  533. "icon_id": "24899559",
  534. "name": "contact",
  535. "font_class": "contact",
  536. "unicode": "e693",
  537. "unicode_decimal": 59027
  538. }, {
  539. "icon_id": "24899560",
  540. "name": "chatbubble-filled",
  541. "font_class": "chatbubble-filled",
  542. "unicode": "e694",
  543. "unicode_decimal": 59028
  544. }, {
  545. "icon_id": "24899561",
  546. "name": "contact-filled",
  547. "font_class": "contact-filled",
  548. "unicode": "e695",
  549. "unicode_decimal": 59029
  550. }, {
  551. "icon_id": "24899562",
  552. "name": "chatboxes",
  553. "font_class": "chatboxes",
  554. "unicode": "e696",
  555. "unicode_decimal": 59030
  556. }, {
  557. "icon_id": "24899563",
  558. "name": "chatbubble",
  559. "font_class": "chatbubble",
  560. "unicode": "e697",
  561. "unicode_decimal": 59031
  562. }, {
  563. "icon_id": "24881290",
  564. "name": "upload-filled",
  565. "font_class": "upload-filled",
  566. "unicode": "e68e",
  567. "unicode_decimal": 59022
  568. }, {
  569. "icon_id": "24881292",
  570. "name": "upload",
  571. "font_class": "upload",
  572. "unicode": "e690",
  573. "unicode_decimal": 59024
  574. }, {
  575. "icon_id": "24881293",
  576. "name": "weixin",
  577. "font_class": "weixin",
  578. "unicode": "e691",
  579. "unicode_decimal": 59025
  580. }, {
  581. "icon_id": "24881274",
  582. "name": "compose",
  583. "font_class": "compose",
  584. "unicode": "e67f",
  585. "unicode_decimal": 59007
  586. }, {
  587. "icon_id": "24881275",
  588. "name": "qq",
  589. "font_class": "qq",
  590. "unicode": "e680",
  591. "unicode_decimal": 59008
  592. }, {
  593. "icon_id": "24881276",
  594. "name": "download-filled",
  595. "font_class": "download-filled",
  596. "unicode": "e681",
  597. "unicode_decimal": 59009
  598. }, {
  599. "icon_id": "24881277",
  600. "name": "pengyouquan",
  601. "font_class": "pyq",
  602. "unicode": "e682",
  603. "unicode_decimal": 59010
  604. }, {
  605. "icon_id": "24881279",
  606. "name": "sound",
  607. "font_class": "sound",
  608. "unicode": "e684",
  609. "unicode_decimal": 59012
  610. }, {
  611. "icon_id": "24881280",
  612. "name": "trash-filled",
  613. "font_class": "trash-filled",
  614. "unicode": "e685",
  615. "unicode_decimal": 59013
  616. }, {
  617. "icon_id": "24881281",
  618. "name": "sound-filled",
  619. "font_class": "sound-filled",
  620. "unicode": "e686",
  621. "unicode_decimal": 59014
  622. }, {
  623. "icon_id": "24881282",
  624. "name": "trash",
  625. "font_class": "trash",
  626. "unicode": "e687",
  627. "unicode_decimal": 59015
  628. }, {
  629. "icon_id": "24881284",
  630. "name": "videocam-filled",
  631. "font_class": "videocam-filled",
  632. "unicode": "e689",
  633. "unicode_decimal": 59017
  634. }, {
  635. "icon_id": "24881285",
  636. "name": "spinner-cycle",
  637. "font_class": "spinner-cycle",
  638. "unicode": "e68a",
  639. "unicode_decimal": 59018
  640. }, {
  641. "icon_id": "24881286",
  642. "name": "weibo",
  643. "font_class": "weibo",
  644. "unicode": "e68b",
  645. "unicode_decimal": 59019
  646. }, {
  647. "icon_id": "24881288",
  648. "name": "videocam",
  649. "font_class": "videocam",
  650. "unicode": "e68c",
  651. "unicode_decimal": 59020
  652. }, {
  653. "icon_id": "24881289",
  654. "name": "download",
  655. "font_class": "download",
  656. "unicode": "e68d",
  657. "unicode_decimal": 59021
  658. }, {
  659. "icon_id": "24879601",
  660. "name": "help",
  661. "font_class": "help",
  662. "unicode": "e679",
  663. "unicode_decimal": 59001
  664. }, {
  665. "icon_id": "24879602",
  666. "name": "navigate-filled",
  667. "font_class": "navigate-filled",
  668. "unicode": "e67a",
  669. "unicode_decimal": 59002
  670. }, {
  671. "icon_id": "24879603",
  672. "name": "plusempty",
  673. "font_class": "plusempty",
  674. "unicode": "e67b",
  675. "unicode_decimal": 59003
  676. }, {
  677. "icon_id": "24879604",
  678. "name": "smallcircle",
  679. "font_class": "smallcircle",
  680. "unicode": "e67c",
  681. "unicode_decimal": 59004
  682. }, {
  683. "icon_id": "24879605",
  684. "name": "minus-filled",
  685. "font_class": "minus-filled",
  686. "unicode": "e67d",
  687. "unicode_decimal": 59005
  688. }, {
  689. "icon_id": "24879606",
  690. "name": "micoff",
  691. "font_class": "micoff",
  692. "unicode": "e67e",
  693. "unicode_decimal": 59006
  694. }, {
  695. "icon_id": "24879588",
  696. "name": "closeempty",
  697. "font_class": "closeempty",
  698. "unicode": "e66c",
  699. "unicode_decimal": 58988
  700. }, {
  701. "icon_id": "24879589",
  702. "name": "clear",
  703. "font_class": "clear",
  704. "unicode": "e66d",
  705. "unicode_decimal": 58989
  706. }, {
  707. "icon_id": "24879590",
  708. "name": "navigate",
  709. "font_class": "navigate",
  710. "unicode": "e66e",
  711. "unicode_decimal": 58990
  712. }, {
  713. "icon_id": "24879591",
  714. "name": "minus",
  715. "font_class": "minus",
  716. "unicode": "e66f",
  717. "unicode_decimal": 58991
  718. }, {
  719. "icon_id": "24879592",
  720. "name": "image",
  721. "font_class": "image",
  722. "unicode": "e670",
  723. "unicode_decimal": 58992
  724. }, {
  725. "icon_id": "24879593",
  726. "name": "mic",
  727. "font_class": "mic",
  728. "unicode": "e671",
  729. "unicode_decimal": 58993
  730. }, {
  731. "icon_id": "24879594",
  732. "name": "paperplane",
  733. "font_class": "paperplane",
  734. "unicode": "e672",
  735. "unicode_decimal": 58994
  736. }, {
  737. "icon_id": "24879595",
  738. "name": "close",
  739. "font_class": "close",
  740. "unicode": "e673",
  741. "unicode_decimal": 58995
  742. }, {
  743. "icon_id": "24879596",
  744. "name": "help-filled",
  745. "font_class": "help-filled",
  746. "unicode": "e674",
  747. "unicode_decimal": 58996
  748. }, {
  749. "icon_id": "24879597",
  750. "name": "plus-filled",
  751. "font_class": "paperplane-filled",
  752. "unicode": "e675",
  753. "unicode_decimal": 58997
  754. }, {
  755. "icon_id": "24879598",
  756. "name": "plus",
  757. "font_class": "plus",
  758. "unicode": "e676",
  759. "unicode_decimal": 58998
  760. }, {
  761. "icon_id": "24879599",
  762. "name": "mic-filled",
  763. "font_class": "mic-filled",
  764. "unicode": "e677",
  765. "unicode_decimal": 58999
  766. }, {
  767. "icon_id": "24879600",
  768. "name": "image-filled",
  769. "font_class": "image-filled",
  770. "unicode": "e678",
  771. "unicode_decimal": 59000
  772. }, {
  773. "icon_id": "24855900",
  774. "name": "locked-filled",
  775. "font_class": "locked-filled",
  776. "unicode": "e668",
  777. "unicode_decimal": 58984
  778. }, {
  779. "icon_id": "24855901",
  780. "name": "info",
  781. "font_class": "info",
  782. "unicode": "e669",
  783. "unicode_decimal": 58985
  784. }, {
  785. "icon_id": "24855903",
  786. "name": "locked",
  787. "font_class": "locked",
  788. "unicode": "e66b",
  789. "unicode_decimal": 58987
  790. }, {
  791. "icon_id": "24855884",
  792. "name": "camera-filled",
  793. "font_class": "camera-filled",
  794. "unicode": "e658",
  795. "unicode_decimal": 58968
  796. }, {
  797. "icon_id": "24855885",
  798. "name": "chat-filled",
  799. "font_class": "chat-filled",
  800. "unicode": "e659",
  801. "unicode_decimal": 58969
  802. }, {
  803. "icon_id": "24855886",
  804. "name": "camera",
  805. "font_class": "camera",
  806. "unicode": "e65a",
  807. "unicode_decimal": 58970
  808. }, {
  809. "icon_id": "24855887",
  810. "name": "circle",
  811. "font_class": "circle",
  812. "unicode": "e65b",
  813. "unicode_decimal": 58971
  814. }, {
  815. "icon_id": "24855888",
  816. "name": "checkmarkempty",
  817. "font_class": "checkmarkempty",
  818. "unicode": "e65c",
  819. "unicode_decimal": 58972
  820. }, {
  821. "icon_id": "24855889",
  822. "name": "chat",
  823. "font_class": "chat",
  824. "unicode": "e65d",
  825. "unicode_decimal": 58973
  826. }, {
  827. "icon_id": "24855890",
  828. "name": "circle-filled",
  829. "font_class": "circle-filled",
  830. "unicode": "e65e",
  831. "unicode_decimal": 58974
  832. }, {
  833. "icon_id": "24855891",
  834. "name": "flag",
  835. "font_class": "flag",
  836. "unicode": "e65f",
  837. "unicode_decimal": 58975
  838. }, {
  839. "icon_id": "24855892",
  840. "name": "flag-filled",
  841. "font_class": "flag-filled",
  842. "unicode": "e660",
  843. "unicode_decimal": 58976
  844. }, {
  845. "icon_id": "24855893",
  846. "name": "gear-filled",
  847. "font_class": "gear-filled",
  848. "unicode": "e661",
  849. "unicode_decimal": 58977
  850. }, {
  851. "icon_id": "24855894",
  852. "name": "home",
  853. "font_class": "home",
  854. "unicode": "e662",
  855. "unicode_decimal": 58978
  856. }, {
  857. "icon_id": "24855895",
  858. "name": "home-filled",
  859. "font_class": "home-filled",
  860. "unicode": "e663",
  861. "unicode_decimal": 58979
  862. }, {
  863. "icon_id": "24855896",
  864. "name": "gear",
  865. "font_class": "gear",
  866. "unicode": "e664",
  867. "unicode_decimal": 58980
  868. }, {
  869. "icon_id": "24855897",
  870. "name": "smallcircle-filled",
  871. "font_class": "smallcircle-filled",
  872. "unicode": "e665",
  873. "unicode_decimal": 58981
  874. }, {
  875. "icon_id": "24855898",
  876. "name": "map-filled",
  877. "font_class": "map-filled",
  878. "unicode": "e666",
  879. "unicode_decimal": 58982
  880. }, {
  881. "icon_id": "24855899",
  882. "name": "map",
  883. "font_class": "map",
  884. "unicode": "e667",
  885. "unicode_decimal": 58983
  886. }, {
  887. "icon_id": "24855825",
  888. "name": "refresh-filled",
  889. "font_class": "refresh-filled",
  890. "unicode": "e656",
  891. "unicode_decimal": 58966
  892. }, {
  893. "icon_id": "24855826",
  894. "name": "refresh",
  895. "font_class": "refresh",
  896. "unicode": "e657",
  897. "unicode_decimal": 58967
  898. }, {
  899. "icon_id": "24855808",
  900. "name": "cloud-upload",
  901. "font_class": "cloud-upload",
  902. "unicode": "e645",
  903. "unicode_decimal": 58949
  904. }, {
  905. "icon_id": "24855809",
  906. "name": "cloud-download-filled",
  907. "font_class": "cloud-download-filled",
  908. "unicode": "e646",
  909. "unicode_decimal": 58950
  910. }, {
  911. "icon_id": "24855810",
  912. "name": "cloud-download",
  913. "font_class": "cloud-download",
  914. "unicode": "e647",
  915. "unicode_decimal": 58951
  916. }, {
  917. "icon_id": "24855811",
  918. "name": "cloud-upload-filled",
  919. "font_class": "cloud-upload-filled",
  920. "unicode": "e648",
  921. "unicode_decimal": 58952
  922. }, {
  923. "icon_id": "24855813",
  924. "name": "redo",
  925. "font_class": "redo",
  926. "unicode": "e64a",
  927. "unicode_decimal": 58954
  928. }, {
  929. "icon_id": "24855814",
  930. "name": "images-filled",
  931. "font_class": "images-filled",
  932. "unicode": "e64b",
  933. "unicode_decimal": 58955
  934. }, {
  935. "icon_id": "24855815",
  936. "name": "undo-filled",
  937. "font_class": "undo-filled",
  938. "unicode": "e64c",
  939. "unicode_decimal": 58956
  940. }, {
  941. "icon_id": "24855816",
  942. "name": "more",
  943. "font_class": "more",
  944. "unicode": "e64d",
  945. "unicode_decimal": 58957
  946. }, {
  947. "icon_id": "24855817",
  948. "name": "more-filled",
  949. "font_class": "more-filled",
  950. "unicode": "e64e",
  951. "unicode_decimal": 58958
  952. }, {
  953. "icon_id": "24855818",
  954. "name": "undo",
  955. "font_class": "undo",
  956. "unicode": "e64f",
  957. "unicode_decimal": 58959
  958. }, {
  959. "icon_id": "24855819",
  960. "name": "images",
  961. "font_class": "images",
  962. "unicode": "e650",
  963. "unicode_decimal": 58960
  964. }, {
  965. "icon_id": "24855821",
  966. "name": "paperclip",
  967. "font_class": "paperclip",
  968. "unicode": "e652",
  969. "unicode_decimal": 58962
  970. }, {
  971. "icon_id": "24855822",
  972. "name": "settings",
  973. "font_class": "settings",
  974. "unicode": "e653",
  975. "unicode_decimal": 58963
  976. }, {
  977. "icon_id": "24855823",
  978. "name": "search",
  979. "font_class": "search",
  980. "unicode": "e654",
  981. "unicode_decimal": 58964
  982. }, {
  983. "icon_id": "24855824",
  984. "name": "redo-filled",
  985. "font_class": "redo-filled",
  986. "unicode": "e655",
  987. "unicode_decimal": 58965
  988. }, {
  989. "icon_id": "24841702",
  990. "name": "list",
  991. "font_class": "list",
  992. "unicode": "e644",
  993. "unicode_decimal": 58948
  994. }, {
  995. "icon_id": "24841489",
  996. "name": "mail-open-filled",
  997. "font_class": "mail-open-filled",
  998. "unicode": "e63a",
  999. "unicode_decimal": 58938
  1000. }, {
  1001. "icon_id": "24841491",
  1002. "name": "hand-thumbsdown-filled",
  1003. "font_class": "hand-down-filled",
  1004. "unicode": "e63c",
  1005. "unicode_decimal": 58940
  1006. }, {
  1007. "icon_id": "24841492",
  1008. "name": "hand-thumbsdown",
  1009. "font_class": "hand-down",
  1010. "unicode": "e63d",
  1011. "unicode_decimal": 58941
  1012. }, {
  1013. "icon_id": "24841493",
  1014. "name": "hand-thumbsup-filled",
  1015. "font_class": "hand-up-filled",
  1016. "unicode": "e63e",
  1017. "unicode_decimal": 58942
  1018. }, {
  1019. "icon_id": "24841494",
  1020. "name": "hand-thumbsup",
  1021. "font_class": "hand-up",
  1022. "unicode": "e63f",
  1023. "unicode_decimal": 58943
  1024. }, {
  1025. "icon_id": "24841496",
  1026. "name": "heart-filled",
  1027. "font_class": "heart-filled",
  1028. "unicode": "e641",
  1029. "unicode_decimal": 58945
  1030. }, {
  1031. "icon_id": "24841498",
  1032. "name": "mail-open",
  1033. "font_class": "mail-open",
  1034. "unicode": "e643",
  1035. "unicode_decimal": 58947
  1036. }, {
  1037. "icon_id": "24841488",
  1038. "name": "heart",
  1039. "font_class": "heart",
  1040. "unicode": "e639",
  1041. "unicode_decimal": 58937
  1042. }, {
  1043. "icon_id": "24839963",
  1044. "name": "loop",
  1045. "font_class": "loop",
  1046. "unicode": "e633",
  1047. "unicode_decimal": 58931
  1048. }, {
  1049. "icon_id": "24839866",
  1050. "name": "pulldown",
  1051. "font_class": "pulldown",
  1052. "unicode": "e632",
  1053. "unicode_decimal": 58930
  1054. }, {
  1055. "icon_id": "24813798",
  1056. "name": "scan",
  1057. "font_class": "scan",
  1058. "unicode": "e62a",
  1059. "unicode_decimal": 58922
  1060. }, {
  1061. "icon_id": "24813786",
  1062. "name": "bars",
  1063. "font_class": "bars",
  1064. "unicode": "e627",
  1065. "unicode_decimal": 58919
  1066. }, {
  1067. "icon_id": "24813788",
  1068. "name": "cart-filled",
  1069. "font_class": "cart-filled",
  1070. "unicode": "e629",
  1071. "unicode_decimal": 58921
  1072. }, {
  1073. "icon_id": "24813790",
  1074. "name": "checkbox",
  1075. "font_class": "checkbox",
  1076. "unicode": "e62b",
  1077. "unicode_decimal": 58923
  1078. }, {
  1079. "icon_id": "24813791",
  1080. "name": "checkbox-filled",
  1081. "font_class": "checkbox-filled",
  1082. "unicode": "e62c",
  1083. "unicode_decimal": 58924
  1084. }, {
  1085. "icon_id": "24813794",
  1086. "name": "shop",
  1087. "font_class": "shop",
  1088. "unicode": "e62f",
  1089. "unicode_decimal": 58927
  1090. }, {
  1091. "icon_id": "24813795",
  1092. "name": "headphones",
  1093. "font_class": "headphones",
  1094. "unicode": "e630",
  1095. "unicode_decimal": 58928
  1096. }, {
  1097. "icon_id": "24813796",
  1098. "name": "cart",
  1099. "font_class": "cart",
  1100. "unicode": "e631",
  1101. "unicode_decimal": 58929
  1102. }]
  1103. };
  1104. exports.default = _default;
  1105. /***/ }),
  1106. /***/ 13:
  1107. /*!*******************************************************!*\
  1108. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  1109. \*******************************************************/
  1110. /*! no static exports found */
  1111. /***/ (function(module, exports) {
  1112. function _typeof(obj) {
  1113. "@babel/helpers - typeof";
  1114. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  1115. return typeof obj;
  1116. } : function (obj) {
  1117. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  1118. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  1119. }
  1120. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1121. /***/ }),
  1122. /***/ 14:
  1123. /*!************************************************************!*\
  1124. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  1125. \************************************************************/
  1126. /*! no static exports found */
  1127. /***/ (function(module, exports, __webpack_require__) {
  1128. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  1129. function _toPrimitive(input, hint) {
  1130. if (_typeof(input) !== "object" || input === null) return input;
  1131. var prim = input[Symbol.toPrimitive];
  1132. if (prim !== undefined) {
  1133. var res = prim.call(input, hint || "default");
  1134. if (_typeof(res) !== "object") return res;
  1135. throw new TypeError("@@toPrimitive must return a primitive value.");
  1136. }
  1137. return (hint === "string" ? String : Number)(input);
  1138. }
  1139. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1140. /***/ }),
  1141. /***/ 15:
  1142. /*!**********************************************************!*\
  1143. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  1144. \**********************************************************/
  1145. /*! no static exports found */
  1146. /***/ (function(module, exports, __webpack_require__) {
  1147. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  1148. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  1149. function _construct(Parent, args, Class) {
  1150. if (isNativeReflectConstruct()) {
  1151. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  1152. } else {
  1153. module.exports = _construct = function _construct(Parent, args, Class) {
  1154. var a = [null];
  1155. a.push.apply(a, args);
  1156. var Constructor = Function.bind.apply(Parent, a);
  1157. var instance = new Constructor();
  1158. if (Class) setPrototypeOf(instance, Class.prototype);
  1159. return instance;
  1160. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1161. }
  1162. return _construct.apply(null, arguments);
  1163. }
  1164. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1165. /***/ }),
  1166. /***/ 16:
  1167. /*!***************************************************************!*\
  1168. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  1169. \***************************************************************/
  1170. /*! no static exports found */
  1171. /***/ (function(module, exports) {
  1172. function _setPrototypeOf(o, p) {
  1173. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  1174. o.__proto__ = p;
  1175. return o;
  1176. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1177. return _setPrototypeOf(o, p);
  1178. }
  1179. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1180. /***/ }),
  1181. /***/ 168:
  1182. /*!******************************************************************************************************************!*\
  1183. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  1184. \******************************************************************************************************************/
  1185. /*! no static exports found */
  1186. /***/ (function(module, exports, __webpack_require__) {
  1187. "use strict";
  1188. /* WEBPACK VAR INJECTION */(function(uni) {
  1189. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1190. Object.defineProperty(exports, "__esModule", {
  1191. value: true
  1192. });
  1193. exports.createAnimation = createAnimation;
  1194. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1195. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  1196. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  1197. 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; }
  1198. 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; }
  1199. // const defaultOption = {
  1200. // duration: 300,
  1201. // timingFunction: 'linear',
  1202. // delay: 0,
  1203. // transformOrigin: '50% 50% 0'
  1204. // }
  1205. var MPAnimation = /*#__PURE__*/function () {
  1206. function MPAnimation(options, _this) {
  1207. (0, _classCallCheck2.default)(this, MPAnimation);
  1208. this.options = options;
  1209. this.animation = uni.createAnimation(options);
  1210. this.currentStepAnimates = {};
  1211. this.next = 0;
  1212. this.$ = _this;
  1213. }
  1214. (0, _createClass2.default)(MPAnimation, [{
  1215. key: "_nvuePushAnimates",
  1216. value: function _nvuePushAnimates(type, args) {
  1217. var aniObj = this.currentStepAnimates[this.next];
  1218. var styles = {};
  1219. if (!aniObj) {
  1220. styles = {
  1221. styles: {},
  1222. config: {}
  1223. };
  1224. } else {
  1225. styles = aniObj;
  1226. }
  1227. if (animateTypes1.includes(type)) {
  1228. if (!styles.styles.transform) {
  1229. styles.styles.transform = '';
  1230. }
  1231. var unit = '';
  1232. if (type === 'rotate') {
  1233. unit = 'deg';
  1234. }
  1235. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  1236. } else {
  1237. styles.styles[type] = "".concat(args);
  1238. }
  1239. this.currentStepAnimates[this.next] = styles;
  1240. }
  1241. }, {
  1242. key: "_animateRun",
  1243. value: function _animateRun() {
  1244. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1245. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1246. var ref = this.$.$refs['ani'].ref;
  1247. if (!ref) return;
  1248. return new Promise(function (resolve, reject) {
  1249. nvueAnimation.transition(ref, _objectSpread({
  1250. styles: styles
  1251. }, config), function (res) {
  1252. resolve();
  1253. });
  1254. });
  1255. }
  1256. }, {
  1257. key: "_nvueNextAnimate",
  1258. value: function _nvueNextAnimate(animates) {
  1259. var _this2 = this;
  1260. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  1261. var fn = arguments.length > 2 ? arguments[2] : undefined;
  1262. var obj = animates[step];
  1263. if (obj) {
  1264. var styles = obj.styles,
  1265. config = obj.config;
  1266. this._animateRun(styles, config).then(function () {
  1267. step += 1;
  1268. _this2._nvueNextAnimate(animates, step, fn);
  1269. });
  1270. } else {
  1271. this.currentStepAnimates = {};
  1272. typeof fn === 'function' && fn();
  1273. this.isEnd = true;
  1274. }
  1275. }
  1276. }, {
  1277. key: "step",
  1278. value: function step() {
  1279. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1280. this.animation.step(config);
  1281. return this;
  1282. }
  1283. }, {
  1284. key: "run",
  1285. value: function run(fn) {
  1286. this.$.animationData = this.animation.export();
  1287. this.$.timer = setTimeout(function () {
  1288. typeof fn === 'function' && fn();
  1289. }, this.$.durationTime);
  1290. }
  1291. }]);
  1292. return MPAnimation;
  1293. }();
  1294. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  1295. var animateTypes2 = ['opacity', 'backgroundColor'];
  1296. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  1297. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  1298. MPAnimation.prototype[type] = function () {
  1299. var _this$animation;
  1300. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  1301. return this;
  1302. };
  1303. });
  1304. function createAnimation(option, _this) {
  1305. if (!_this) return;
  1306. clearTimeout(_this.timer);
  1307. return new MPAnimation(option, _this);
  1308. }
  1309. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  1310. /***/ }),
  1311. /***/ 17:
  1312. /*!*************************************************************************!*\
  1313. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  1314. \*************************************************************************/
  1315. /*! no static exports found */
  1316. /***/ (function(module, exports) {
  1317. function _isNativeReflectConstruct() {
  1318. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  1319. if (Reflect.construct.sham) return false;
  1320. if (typeof Proxy === "function") return true;
  1321. try {
  1322. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  1323. return true;
  1324. } catch (e) {
  1325. return false;
  1326. }
  1327. }
  1328. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1329. /***/ }),
  1330. /***/ 18:
  1331. /*!******************************************************************!*\
  1332. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  1333. \******************************************************************/
  1334. /*! no static exports found */
  1335. /***/ (function(module, exports, __webpack_require__) {
  1336. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  1337. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  1338. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  1339. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  1340. function _toConsumableArray(arr) {
  1341. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  1342. }
  1343. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1344. /***/ }),
  1345. /***/ 19:
  1346. /*!******************************************************************!*\
  1347. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  1348. \******************************************************************/
  1349. /*! no static exports found */
  1350. /***/ (function(module, exports, __webpack_require__) {
  1351. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  1352. function _arrayWithoutHoles(arr) {
  1353. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  1354. }
  1355. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1356. /***/ }),
  1357. /***/ 2:
  1358. /*!************************************************************!*\
  1359. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  1360. \************************************************************/
  1361. /*! no static exports found */
  1362. /***/ (function(module, exports, __webpack_require__) {
  1363. "use strict";
  1364. /* WEBPACK VAR INJECTION */(function(wx, global) {
  1365. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1366. Object.defineProperty(exports, "__esModule", {
  1367. value: true
  1368. });
  1369. exports.createApp = createApp;
  1370. exports.createComponent = createComponent;
  1371. exports.createPage = createPage;
  1372. exports.createPlugin = createPlugin;
  1373. exports.createSubpackageApp = createSubpackageApp;
  1374. exports.default = void 0;
  1375. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  1376. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1377. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  1378. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  1379. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1380. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  1381. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  1382. 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; }
  1383. 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; }
  1384. var realAtob;
  1385. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1386. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  1387. if (typeof atob !== 'function') {
  1388. realAtob = function realAtob(str) {
  1389. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  1390. if (!b64re.test(str)) {
  1391. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  1392. }
  1393. // Adding the padding if missing, for semplicity
  1394. str += '=='.slice(2 - (str.length & 3));
  1395. var bitmap;
  1396. var result = '';
  1397. var r1;
  1398. var r2;
  1399. var i = 0;
  1400. for (; i < str.length;) {
  1401. 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++)));
  1402. 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);
  1403. }
  1404. return result;
  1405. };
  1406. } else {
  1407. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  1408. realAtob = atob;
  1409. }
  1410. function b64DecodeUnicode(str) {
  1411. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  1412. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  1413. }).join(''));
  1414. }
  1415. function getCurrentUserInfo() {
  1416. var token = wx.getStorageSync('uni_id_token') || '';
  1417. var tokenArr = token.split('.');
  1418. if (!token || tokenArr.length !== 3) {
  1419. return {
  1420. uid: null,
  1421. role: [],
  1422. permission: [],
  1423. tokenExpired: 0
  1424. };
  1425. }
  1426. var userInfo;
  1427. try {
  1428. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  1429. } catch (error) {
  1430. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  1431. }
  1432. userInfo.tokenExpired = userInfo.exp * 1000;
  1433. delete userInfo.exp;
  1434. delete userInfo.iat;
  1435. return userInfo;
  1436. }
  1437. function uniIdMixin(Vue) {
  1438. Vue.prototype.uniIDHasRole = function (roleId) {
  1439. var _getCurrentUserInfo = getCurrentUserInfo(),
  1440. role = _getCurrentUserInfo.role;
  1441. return role.indexOf(roleId) > -1;
  1442. };
  1443. Vue.prototype.uniIDHasPermission = function (permissionId) {
  1444. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  1445. permission = _getCurrentUserInfo2.permission;
  1446. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  1447. };
  1448. Vue.prototype.uniIDTokenValid = function () {
  1449. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  1450. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  1451. return tokenExpired > Date.now();
  1452. };
  1453. }
  1454. var _toString = Object.prototype.toString;
  1455. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1456. function isFn(fn) {
  1457. return typeof fn === 'function';
  1458. }
  1459. function isStr(str) {
  1460. return typeof str === 'string';
  1461. }
  1462. function isObject(obj) {
  1463. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  1464. }
  1465. function isPlainObject(obj) {
  1466. return _toString.call(obj) === '[object Object]';
  1467. }
  1468. function hasOwn(obj, key) {
  1469. return hasOwnProperty.call(obj, key);
  1470. }
  1471. function noop() {}
  1472. /**
  1473. * Create a cached version of a pure function.
  1474. */
  1475. function cached(fn) {
  1476. var cache = Object.create(null);
  1477. return function cachedFn(str) {
  1478. var hit = cache[str];
  1479. return hit || (cache[str] = fn(str));
  1480. };
  1481. }
  1482. /**
  1483. * Camelize a hyphen-delimited string.
  1484. */
  1485. var camelizeRE = /-(\w)/g;
  1486. var camelize = cached(function (str) {
  1487. return str.replace(camelizeRE, function (_, c) {
  1488. return c ? c.toUpperCase() : '';
  1489. });
  1490. });
  1491. function sortObject(obj) {
  1492. var sortObj = {};
  1493. if (isPlainObject(obj)) {
  1494. Object.keys(obj).sort().forEach(function (key) {
  1495. sortObj[key] = obj[key];
  1496. });
  1497. }
  1498. return !Object.keys(sortObj) ? obj : sortObj;
  1499. }
  1500. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  1501. var globalInterceptors = {};
  1502. var scopedInterceptors = {};
  1503. function mergeHook(parentVal, childVal) {
  1504. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  1505. return res ? dedupeHooks(res) : res;
  1506. }
  1507. function dedupeHooks(hooks) {
  1508. var res = [];
  1509. for (var i = 0; i < hooks.length; i++) {
  1510. if (res.indexOf(hooks[i]) === -1) {
  1511. res.push(hooks[i]);
  1512. }
  1513. }
  1514. return res;
  1515. }
  1516. function removeHook(hooks, hook) {
  1517. var index = hooks.indexOf(hook);
  1518. if (index !== -1) {
  1519. hooks.splice(index, 1);
  1520. }
  1521. }
  1522. function mergeInterceptorHook(interceptor, option) {
  1523. Object.keys(option).forEach(function (hook) {
  1524. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1525. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  1526. }
  1527. });
  1528. }
  1529. function removeInterceptorHook(interceptor, option) {
  1530. if (!interceptor || !option) {
  1531. return;
  1532. }
  1533. Object.keys(option).forEach(function (hook) {
  1534. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1535. removeHook(interceptor[hook], option[hook]);
  1536. }
  1537. });
  1538. }
  1539. function addInterceptor(method, option) {
  1540. if (typeof method === 'string' && isPlainObject(option)) {
  1541. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  1542. } else if (isPlainObject(method)) {
  1543. mergeInterceptorHook(globalInterceptors, method);
  1544. }
  1545. }
  1546. function removeInterceptor(method, option) {
  1547. if (typeof method === 'string') {
  1548. if (isPlainObject(option)) {
  1549. removeInterceptorHook(scopedInterceptors[method], option);
  1550. } else {
  1551. delete scopedInterceptors[method];
  1552. }
  1553. } else if (isPlainObject(method)) {
  1554. removeInterceptorHook(globalInterceptors, method);
  1555. }
  1556. }
  1557. function wrapperHook(hook, params) {
  1558. return function (data) {
  1559. return hook(data, params) || data;
  1560. };
  1561. }
  1562. function isPromise(obj) {
  1563. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  1564. }
  1565. function queue(hooks, data, params) {
  1566. var promise = false;
  1567. for (var i = 0; i < hooks.length; i++) {
  1568. var hook = hooks[i];
  1569. if (promise) {
  1570. promise = Promise.resolve(wrapperHook(hook, params));
  1571. } else {
  1572. var res = hook(data, params);
  1573. if (isPromise(res)) {
  1574. promise = Promise.resolve(res);
  1575. }
  1576. if (res === false) {
  1577. return {
  1578. then: function then() {}
  1579. };
  1580. }
  1581. }
  1582. }
  1583. return promise || {
  1584. then: function then(callback) {
  1585. return callback(data);
  1586. }
  1587. };
  1588. }
  1589. function wrapperOptions(interceptor) {
  1590. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1591. ['success', 'fail', 'complete'].forEach(function (name) {
  1592. if (Array.isArray(interceptor[name])) {
  1593. var oldCallback = options[name];
  1594. options[name] = function callbackInterceptor(res) {
  1595. queue(interceptor[name], res, options).then(function (res) {
  1596. /* eslint-disable no-mixed-operators */
  1597. return isFn(oldCallback) && oldCallback(res) || res;
  1598. });
  1599. };
  1600. }
  1601. });
  1602. return options;
  1603. }
  1604. function wrapperReturnValue(method, returnValue) {
  1605. var returnValueHooks = [];
  1606. if (Array.isArray(globalInterceptors.returnValue)) {
  1607. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  1608. }
  1609. var interceptor = scopedInterceptors[method];
  1610. if (interceptor && Array.isArray(interceptor.returnValue)) {
  1611. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  1612. }
  1613. returnValueHooks.forEach(function (hook) {
  1614. returnValue = hook(returnValue) || returnValue;
  1615. });
  1616. return returnValue;
  1617. }
  1618. function getApiInterceptorHooks(method) {
  1619. var interceptor = Object.create(null);
  1620. Object.keys(globalInterceptors).forEach(function (hook) {
  1621. if (hook !== 'returnValue') {
  1622. interceptor[hook] = globalInterceptors[hook].slice();
  1623. }
  1624. });
  1625. var scopedInterceptor = scopedInterceptors[method];
  1626. if (scopedInterceptor) {
  1627. Object.keys(scopedInterceptor).forEach(function (hook) {
  1628. if (hook !== 'returnValue') {
  1629. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  1630. }
  1631. });
  1632. }
  1633. return interceptor;
  1634. }
  1635. function invokeApi(method, api, options) {
  1636. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  1637. params[_key - 3] = arguments[_key];
  1638. }
  1639. var interceptor = getApiInterceptorHooks(method);
  1640. if (interceptor && Object.keys(interceptor).length) {
  1641. if (Array.isArray(interceptor.invoke)) {
  1642. var res = queue(interceptor.invoke, options);
  1643. return res.then(function (options) {
  1644. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  1645. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  1646. });
  1647. } else {
  1648. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  1649. }
  1650. }
  1651. return api.apply(void 0, [options].concat(params));
  1652. }
  1653. var promiseInterceptor = {
  1654. returnValue: function returnValue(res) {
  1655. if (!isPromise(res)) {
  1656. return res;
  1657. }
  1658. return new Promise(function (resolve, reject) {
  1659. res.then(function (res) {
  1660. if (res[0]) {
  1661. reject(res[0]);
  1662. } else {
  1663. resolve(res[1]);
  1664. }
  1665. });
  1666. });
  1667. }
  1668. };
  1669. 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/;
  1670. var CONTEXT_API_RE = /^create|Manager$/;
  1671. // Context例外情况
  1672. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  1673. // 同步例外情况
  1674. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  1675. var CALLBACK_API_RE = /^on|^off/;
  1676. function isContextApi(name) {
  1677. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1678. }
  1679. function isSyncApi(name) {
  1680. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1681. }
  1682. function isCallbackApi(name) {
  1683. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  1684. }
  1685. function handlePromise(promise) {
  1686. return promise.then(function (data) {
  1687. return [null, data];
  1688. }).catch(function (err) {
  1689. return [err];
  1690. });
  1691. }
  1692. function shouldPromise(name) {
  1693. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1694. return false;
  1695. }
  1696. return true;
  1697. }
  1698. /* eslint-disable no-extend-native */
  1699. if (!Promise.prototype.finally) {
  1700. Promise.prototype.finally = function (callback) {
  1701. var promise = this.constructor;
  1702. return this.then(function (value) {
  1703. return promise.resolve(callback()).then(function () {
  1704. return value;
  1705. });
  1706. }, function (reason) {
  1707. return promise.resolve(callback()).then(function () {
  1708. throw reason;
  1709. });
  1710. });
  1711. };
  1712. }
  1713. function promisify(name, api) {
  1714. if (!shouldPromise(name) || !isFn(api)) {
  1715. return api;
  1716. }
  1717. return function promiseApi() {
  1718. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1719. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  1720. params[_key2 - 1] = arguments[_key2];
  1721. }
  1722. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  1723. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  1724. }
  1725. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  1726. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  1727. success: resolve,
  1728. fail: reject
  1729. })].concat(params));
  1730. })));
  1731. };
  1732. }
  1733. var EPS = 1e-4;
  1734. var BASE_DEVICE_WIDTH = 750;
  1735. var isIOS = false;
  1736. var deviceWidth = 0;
  1737. var deviceDPR = 0;
  1738. function checkDeviceWidth() {
  1739. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  1740. platform = _wx$getSystemInfoSync.platform,
  1741. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  1742. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  1743. deviceWidth = windowWidth;
  1744. deviceDPR = pixelRatio;
  1745. isIOS = platform === 'ios';
  1746. }
  1747. function upx2px(number, newDeviceWidth) {
  1748. if (deviceWidth === 0) {
  1749. checkDeviceWidth();
  1750. }
  1751. number = Number(number);
  1752. if (number === 0) {
  1753. return 0;
  1754. }
  1755. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  1756. if (result < 0) {
  1757. result = -result;
  1758. }
  1759. result = Math.floor(result + EPS);
  1760. if (result === 0) {
  1761. if (deviceDPR === 1 || !isIOS) {
  1762. result = 1;
  1763. } else {
  1764. result = 0.5;
  1765. }
  1766. }
  1767. return number < 0 ? -result : result;
  1768. }
  1769. var LOCALE_ZH_HANS = 'zh-Hans';
  1770. var LOCALE_ZH_HANT = 'zh-Hant';
  1771. var LOCALE_EN = 'en';
  1772. var LOCALE_FR = 'fr';
  1773. var LOCALE_ES = 'es';
  1774. var messages = {};
  1775. var locale;
  1776. {
  1777. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1778. }
  1779. function initI18nMessages() {
  1780. if (!isEnableLocale()) {
  1781. return;
  1782. }
  1783. var localeKeys = Object.keys(__uniConfig.locales);
  1784. if (localeKeys.length) {
  1785. localeKeys.forEach(function (locale) {
  1786. var curMessages = messages[locale];
  1787. var userMessages = __uniConfig.locales[locale];
  1788. if (curMessages) {
  1789. Object.assign(curMessages, userMessages);
  1790. } else {
  1791. messages[locale] = userMessages;
  1792. }
  1793. });
  1794. }
  1795. }
  1796. initI18nMessages();
  1797. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  1798. var t = i18n.t;
  1799. var i18nMixin = i18n.mixin = {
  1800. beforeCreate: function beforeCreate() {
  1801. var _this = this;
  1802. var unwatch = i18n.i18n.watchLocale(function () {
  1803. _this.$forceUpdate();
  1804. });
  1805. this.$once('hook:beforeDestroy', function () {
  1806. unwatch();
  1807. });
  1808. },
  1809. methods: {
  1810. $$t: function $$t(key, values) {
  1811. return t(key, values);
  1812. }
  1813. }
  1814. };
  1815. var setLocale = i18n.setLocale;
  1816. var getLocale = i18n.getLocale;
  1817. function initAppLocale(Vue, appVm, locale) {
  1818. var state = Vue.observable({
  1819. locale: locale || i18n.getLocale()
  1820. });
  1821. var localeWatchers = [];
  1822. appVm.$watchLocale = function (fn) {
  1823. localeWatchers.push(fn);
  1824. };
  1825. Object.defineProperty(appVm, '$locale', {
  1826. get: function get() {
  1827. return state.locale;
  1828. },
  1829. set: function set(v) {
  1830. state.locale = v;
  1831. localeWatchers.forEach(function (watch) {
  1832. return watch(v);
  1833. });
  1834. }
  1835. });
  1836. }
  1837. function isEnableLocale() {
  1838. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1839. }
  1840. function include(str, parts) {
  1841. return !!parts.find(function (part) {
  1842. return str.indexOf(part) !== -1;
  1843. });
  1844. }
  1845. function startsWith(str, parts) {
  1846. return parts.find(function (part) {
  1847. return str.indexOf(part) === 0;
  1848. });
  1849. }
  1850. function normalizeLocale(locale, messages) {
  1851. if (!locale) {
  1852. return;
  1853. }
  1854. locale = locale.trim().replace(/_/g, '-');
  1855. if (messages && messages[locale]) {
  1856. return locale;
  1857. }
  1858. locale = locale.toLowerCase();
  1859. if (locale === 'chinese') {
  1860. // 支付宝
  1861. return LOCALE_ZH_HANS;
  1862. }
  1863. if (locale.indexOf('zh') === 0) {
  1864. if (locale.indexOf('-hans') > -1) {
  1865. return LOCALE_ZH_HANS;
  1866. }
  1867. if (locale.indexOf('-hant') > -1) {
  1868. return LOCALE_ZH_HANT;
  1869. }
  1870. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  1871. return LOCALE_ZH_HANT;
  1872. }
  1873. return LOCALE_ZH_HANS;
  1874. }
  1875. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  1876. if (lang) {
  1877. return lang;
  1878. }
  1879. }
  1880. // export function initI18n() {
  1881. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1882. // if (localeKeys.length) {
  1883. // localeKeys.forEach((locale) =>
  1884. // i18n.add(locale, __uniConfig.locales[locale])
  1885. // )
  1886. // }
  1887. // }
  1888. function getLocale$1() {
  1889. // 优先使用 $locale
  1890. if (isFn(getApp)) {
  1891. var app = getApp({
  1892. allowDefault: true
  1893. });
  1894. if (app && app.$vm) {
  1895. return app.$vm.$locale;
  1896. }
  1897. }
  1898. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1899. }
  1900. function setLocale$1(locale) {
  1901. var app = isFn(getApp) ? getApp() : false;
  1902. if (!app) {
  1903. return false;
  1904. }
  1905. var oldLocale = app.$vm.$locale;
  1906. if (oldLocale !== locale) {
  1907. app.$vm.$locale = locale;
  1908. onLocaleChangeCallbacks.forEach(function (fn) {
  1909. return fn({
  1910. locale: locale
  1911. });
  1912. });
  1913. return true;
  1914. }
  1915. return false;
  1916. }
  1917. var onLocaleChangeCallbacks = [];
  1918. function onLocaleChange(fn) {
  1919. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1920. onLocaleChangeCallbacks.push(fn);
  1921. }
  1922. }
  1923. if (typeof global !== 'undefined') {
  1924. global.getLocale = getLocale$1;
  1925. }
  1926. var interceptors = {
  1927. promiseInterceptor: promiseInterceptor
  1928. };
  1929. var baseApi = /*#__PURE__*/Object.freeze({
  1930. __proto__: null,
  1931. upx2px: upx2px,
  1932. getLocale: getLocale$1,
  1933. setLocale: setLocale$1,
  1934. onLocaleChange: onLocaleChange,
  1935. addInterceptor: addInterceptor,
  1936. removeInterceptor: removeInterceptor,
  1937. interceptors: interceptors
  1938. });
  1939. function findExistsPageIndex(url) {
  1940. var pages = getCurrentPages();
  1941. var len = pages.length;
  1942. while (len--) {
  1943. var page = pages[len];
  1944. if (page.$page && page.$page.fullPath === url) {
  1945. return len;
  1946. }
  1947. }
  1948. return -1;
  1949. }
  1950. var redirectTo = {
  1951. name: function name(fromArgs) {
  1952. if (fromArgs.exists === 'back' && fromArgs.delta) {
  1953. return 'navigateBack';
  1954. }
  1955. return 'redirectTo';
  1956. },
  1957. args: function args(fromArgs) {
  1958. if (fromArgs.exists === 'back' && fromArgs.url) {
  1959. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  1960. if (existsPageIndex !== -1) {
  1961. var delta = getCurrentPages().length - 1 - existsPageIndex;
  1962. if (delta > 0) {
  1963. fromArgs.delta = delta;
  1964. }
  1965. }
  1966. }
  1967. }
  1968. };
  1969. var previewImage = {
  1970. args: function args(fromArgs) {
  1971. var currentIndex = parseInt(fromArgs.current);
  1972. if (isNaN(currentIndex)) {
  1973. return;
  1974. }
  1975. var urls = fromArgs.urls;
  1976. if (!Array.isArray(urls)) {
  1977. return;
  1978. }
  1979. var len = urls.length;
  1980. if (!len) {
  1981. return;
  1982. }
  1983. if (currentIndex < 0) {
  1984. currentIndex = 0;
  1985. } else if (currentIndex >= len) {
  1986. currentIndex = len - 1;
  1987. }
  1988. if (currentIndex > 0) {
  1989. fromArgs.current = urls[currentIndex];
  1990. fromArgs.urls = urls.filter(function (item, index) {
  1991. return index < currentIndex ? item !== urls[currentIndex] : true;
  1992. });
  1993. } else {
  1994. fromArgs.current = urls[0];
  1995. }
  1996. return {
  1997. indicator: false,
  1998. loop: false
  1999. };
  2000. }
  2001. };
  2002. var UUID_KEY = '__DC_STAT_UUID';
  2003. var deviceId;
  2004. function useDeviceId(result) {
  2005. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  2006. if (!deviceId) {
  2007. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  2008. wx.setStorage({
  2009. key: UUID_KEY,
  2010. data: deviceId
  2011. });
  2012. }
  2013. result.deviceId = deviceId;
  2014. }
  2015. function addSafeAreaInsets(result) {
  2016. if (result.safeArea) {
  2017. var safeArea = result.safeArea;
  2018. result.safeAreaInsets = {
  2019. top: safeArea.top,
  2020. left: safeArea.left,
  2021. right: result.windowWidth - safeArea.right,
  2022. bottom: result.screenHeight - safeArea.bottom
  2023. };
  2024. }
  2025. }
  2026. function populateParameters(result) {
  2027. var _result$brand = result.brand,
  2028. brand = _result$brand === void 0 ? '' : _result$brand,
  2029. _result$model = result.model,
  2030. model = _result$model === void 0 ? '' : _result$model,
  2031. _result$system = result.system,
  2032. system = _result$system === void 0 ? '' : _result$system,
  2033. _result$language = result.language,
  2034. language = _result$language === void 0 ? '' : _result$language,
  2035. theme = result.theme,
  2036. version = result.version,
  2037. platform = result.platform,
  2038. fontSizeSetting = result.fontSizeSetting,
  2039. SDKVersion = result.SDKVersion,
  2040. pixelRatio = result.pixelRatio,
  2041. deviceOrientation = result.deviceOrientation;
  2042. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  2043. var extraParam = {};
  2044. // osName osVersion
  2045. var osName = '';
  2046. var osVersion = '';
  2047. {
  2048. osName = system.split(' ')[0] || '';
  2049. osVersion = system.split(' ')[1] || '';
  2050. }
  2051. var hostVersion = version;
  2052. // deviceType
  2053. var deviceType = getGetDeviceType(result, model);
  2054. // deviceModel
  2055. var deviceBrand = getDeviceBrand(brand);
  2056. // hostName
  2057. var _hostName = getHostName(result);
  2058. // deviceOrientation
  2059. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  2060. // devicePixelRatio
  2061. var _devicePixelRatio = pixelRatio;
  2062. // SDKVersion
  2063. var _SDKVersion = SDKVersion;
  2064. // hostLanguage
  2065. var hostLanguage = language.replace(/_/g, '-');
  2066. // wx.getAccountInfoSync
  2067. var parameters = {
  2068. appId: "__UNI__73F6024",
  2069. appName: "UniappShell",
  2070. appVersion: "1.0.0",
  2071. appVersionCode: "100",
  2072. appLanguage: getAppLanguage(hostLanguage),
  2073. uniCompileVersion: "3.8.12",
  2074. uniRuntimeVersion: "3.8.12",
  2075. uniPlatform: undefined || "mp-weixin",
  2076. deviceBrand: deviceBrand,
  2077. deviceModel: model,
  2078. deviceType: deviceType,
  2079. devicePixelRatio: _devicePixelRatio,
  2080. deviceOrientation: _deviceOrientation,
  2081. osName: osName.toLocaleLowerCase(),
  2082. osVersion: osVersion,
  2083. hostTheme: theme,
  2084. hostVersion: hostVersion,
  2085. hostLanguage: hostLanguage,
  2086. hostName: _hostName,
  2087. hostSDKVersion: _SDKVersion,
  2088. hostFontSizeSetting: fontSizeSetting,
  2089. windowTop: 0,
  2090. windowBottom: 0,
  2091. // TODO
  2092. osLanguage: undefined,
  2093. osTheme: undefined,
  2094. ua: undefined,
  2095. hostPackageName: undefined,
  2096. browserName: undefined,
  2097. browserVersion: undefined
  2098. };
  2099. Object.assign(result, parameters, extraParam);
  2100. }
  2101. function getGetDeviceType(result, model) {
  2102. var deviceType = result.deviceType || 'phone';
  2103. {
  2104. var deviceTypeMaps = {
  2105. ipad: 'pad',
  2106. windows: 'pc',
  2107. mac: 'pc'
  2108. };
  2109. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  2110. var _model = model.toLocaleLowerCase();
  2111. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  2112. var _m = deviceTypeMapsKeys[index];
  2113. if (_model.indexOf(_m) !== -1) {
  2114. deviceType = deviceTypeMaps[_m];
  2115. break;
  2116. }
  2117. }
  2118. }
  2119. return deviceType;
  2120. }
  2121. function getDeviceBrand(brand) {
  2122. var deviceBrand = brand;
  2123. if (deviceBrand) {
  2124. deviceBrand = brand.toLocaleLowerCase();
  2125. }
  2126. return deviceBrand;
  2127. }
  2128. function getAppLanguage(defaultLanguage) {
  2129. return getLocale$1 ? getLocale$1() : defaultLanguage;
  2130. }
  2131. function getHostName(result) {
  2132. var _platform = 'WeChat';
  2133. var _hostName = result.hostName || _platform; // mp-jd
  2134. {
  2135. if (result.environment) {
  2136. _hostName = result.environment;
  2137. } else if (result.host && result.host.env) {
  2138. _hostName = result.host.env;
  2139. }
  2140. }
  2141. return _hostName;
  2142. }
  2143. var getSystemInfo = {
  2144. returnValue: function returnValue(result) {
  2145. useDeviceId(result);
  2146. addSafeAreaInsets(result);
  2147. populateParameters(result);
  2148. }
  2149. };
  2150. var showActionSheet = {
  2151. args: function args(fromArgs) {
  2152. if ((0, _typeof2.default)(fromArgs) === 'object') {
  2153. fromArgs.alertText = fromArgs.title;
  2154. }
  2155. }
  2156. };
  2157. var getAppBaseInfo = {
  2158. returnValue: function returnValue(result) {
  2159. var _result = result,
  2160. version = _result.version,
  2161. language = _result.language,
  2162. SDKVersion = _result.SDKVersion,
  2163. theme = _result.theme;
  2164. var _hostName = getHostName(result);
  2165. var hostLanguage = language.replace('_', '-');
  2166. result = sortObject(Object.assign(result, {
  2167. appId: "__UNI__73F6024",
  2168. appName: "UniappShell",
  2169. appVersion: "1.0.0",
  2170. appVersionCode: "100",
  2171. appLanguage: getAppLanguage(hostLanguage),
  2172. hostVersion: version,
  2173. hostLanguage: hostLanguage,
  2174. hostName: _hostName,
  2175. hostSDKVersion: SDKVersion,
  2176. hostTheme: theme
  2177. }));
  2178. }
  2179. };
  2180. var getDeviceInfo = {
  2181. returnValue: function returnValue(result) {
  2182. var _result2 = result,
  2183. brand = _result2.brand,
  2184. model = _result2.model;
  2185. var deviceType = getGetDeviceType(result, model);
  2186. var deviceBrand = getDeviceBrand(brand);
  2187. useDeviceId(result);
  2188. result = sortObject(Object.assign(result, {
  2189. deviceType: deviceType,
  2190. deviceBrand: deviceBrand,
  2191. deviceModel: model
  2192. }));
  2193. }
  2194. };
  2195. var getWindowInfo = {
  2196. returnValue: function returnValue(result) {
  2197. addSafeAreaInsets(result);
  2198. result = sortObject(Object.assign(result, {
  2199. windowTop: 0,
  2200. windowBottom: 0
  2201. }));
  2202. }
  2203. };
  2204. var getAppAuthorizeSetting = {
  2205. returnValue: function returnValue(result) {
  2206. var locationReducedAccuracy = result.locationReducedAccuracy;
  2207. result.locationAccuracy = 'unsupported';
  2208. if (locationReducedAccuracy === true) {
  2209. result.locationAccuracy = 'reduced';
  2210. } else if (locationReducedAccuracy === false) {
  2211. result.locationAccuracy = 'full';
  2212. }
  2213. }
  2214. };
  2215. // import navigateTo from 'uni-helpers/navigate-to'
  2216. var compressImage = {
  2217. args: function args(fromArgs) {
  2218. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  2219. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  2220. fromArgs.compressHeight = fromArgs.compressedHeight;
  2221. }
  2222. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  2223. fromArgs.compressWidth = fromArgs.compressedWidth;
  2224. }
  2225. }
  2226. };
  2227. var protocols = {
  2228. redirectTo: redirectTo,
  2229. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  2230. previewImage: previewImage,
  2231. getSystemInfo: getSystemInfo,
  2232. getSystemInfoSync: getSystemInfo,
  2233. showActionSheet: showActionSheet,
  2234. getAppBaseInfo: getAppBaseInfo,
  2235. getDeviceInfo: getDeviceInfo,
  2236. getWindowInfo: getWindowInfo,
  2237. getAppAuthorizeSetting: getAppAuthorizeSetting,
  2238. compressImage: compressImage
  2239. };
  2240. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  2241. var canIUses = [];
  2242. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  2243. function processCallback(methodName, method, returnValue) {
  2244. return function (res) {
  2245. return method(processReturnValue(methodName, res, returnValue));
  2246. };
  2247. }
  2248. function processArgs(methodName, fromArgs) {
  2249. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2250. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  2251. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  2252. if (isPlainObject(fromArgs)) {
  2253. // 一般 api 的参数解析
  2254. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  2255. if (isFn(argsOption)) {
  2256. argsOption = argsOption(fromArgs, toArgs) || {};
  2257. }
  2258. for (var key in fromArgs) {
  2259. if (hasOwn(argsOption, key)) {
  2260. var keyOption = argsOption[key];
  2261. if (isFn(keyOption)) {
  2262. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  2263. }
  2264. if (!keyOption) {
  2265. // 不支持的参数
  2266. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  2267. } else if (isStr(keyOption)) {
  2268. // 重写参数 key
  2269. toArgs[keyOption] = fromArgs[key];
  2270. } else if (isPlainObject(keyOption)) {
  2271. // {name:newName,value:value}可重新指定参数 key:value
  2272. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  2273. }
  2274. } else if (CALLBACKS.indexOf(key) !== -1) {
  2275. if (isFn(fromArgs[key])) {
  2276. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  2277. }
  2278. } else {
  2279. if (!keepFromArgs) {
  2280. toArgs[key] = fromArgs[key];
  2281. }
  2282. }
  2283. }
  2284. return toArgs;
  2285. } else if (isFn(fromArgs)) {
  2286. fromArgs = processCallback(methodName, fromArgs, returnValue);
  2287. }
  2288. return fromArgs;
  2289. }
  2290. function processReturnValue(methodName, res, returnValue) {
  2291. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  2292. if (isFn(protocols.returnValue)) {
  2293. // 处理通用 returnValue
  2294. res = protocols.returnValue(methodName, res);
  2295. }
  2296. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  2297. }
  2298. function wrapper(methodName, method) {
  2299. if (hasOwn(protocols, methodName)) {
  2300. var protocol = protocols[methodName];
  2301. if (!protocol) {
  2302. // 暂不支持的 api
  2303. return function () {
  2304. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  2305. };
  2306. }
  2307. return function (arg1, arg2) {
  2308. // 目前 api 最多两个参数
  2309. var options = protocol;
  2310. if (isFn(protocol)) {
  2311. options = protocol(arg1);
  2312. }
  2313. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  2314. var args = [arg1];
  2315. if (typeof arg2 !== 'undefined') {
  2316. args.push(arg2);
  2317. }
  2318. if (isFn(options.name)) {
  2319. methodName = options.name(arg1);
  2320. } else if (isStr(options.name)) {
  2321. methodName = options.name;
  2322. }
  2323. var returnValue = wx[methodName].apply(wx, args);
  2324. if (isSyncApi(methodName)) {
  2325. // 同步 api
  2326. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  2327. }
  2328. return returnValue;
  2329. };
  2330. }
  2331. return method;
  2332. }
  2333. var todoApis = Object.create(null);
  2334. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  2335. function createTodoApi(name) {
  2336. return function todoApi(_ref) {
  2337. var fail = _ref.fail,
  2338. complete = _ref.complete;
  2339. var res = {
  2340. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  2341. };
  2342. isFn(fail) && fail(res);
  2343. isFn(complete) && complete(res);
  2344. };
  2345. }
  2346. TODOS.forEach(function (name) {
  2347. todoApis[name] = createTodoApi(name);
  2348. });
  2349. var providers = {
  2350. oauth: ['weixin'],
  2351. share: ['weixin'],
  2352. payment: ['wxpay'],
  2353. push: ['weixin']
  2354. };
  2355. function getProvider(_ref2) {
  2356. var service = _ref2.service,
  2357. success = _ref2.success,
  2358. fail = _ref2.fail,
  2359. complete = _ref2.complete;
  2360. var res = false;
  2361. if (providers[service]) {
  2362. res = {
  2363. errMsg: 'getProvider:ok',
  2364. service: service,
  2365. provider: providers[service]
  2366. };
  2367. isFn(success) && success(res);
  2368. } else {
  2369. res = {
  2370. errMsg: 'getProvider:fail service not found'
  2371. };
  2372. isFn(fail) && fail(res);
  2373. }
  2374. isFn(complete) && complete(res);
  2375. }
  2376. var extraApi = /*#__PURE__*/Object.freeze({
  2377. __proto__: null,
  2378. getProvider: getProvider
  2379. });
  2380. var getEmitter = function () {
  2381. var Emitter;
  2382. return function getUniEmitter() {
  2383. if (!Emitter) {
  2384. Emitter = new _vue.default();
  2385. }
  2386. return Emitter;
  2387. };
  2388. }();
  2389. function apply(ctx, method, args) {
  2390. return ctx[method].apply(ctx, args);
  2391. }
  2392. function $on() {
  2393. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  2394. }
  2395. function $off() {
  2396. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  2397. }
  2398. function $once() {
  2399. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  2400. }
  2401. function $emit() {
  2402. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  2403. }
  2404. var eventApi = /*#__PURE__*/Object.freeze({
  2405. __proto__: null,
  2406. $on: $on,
  2407. $off: $off,
  2408. $once: $once,
  2409. $emit: $emit
  2410. });
  2411. /**
  2412. * 框架内 try-catch
  2413. */
  2414. /**
  2415. * 开发者 try-catch
  2416. */
  2417. function tryCatch(fn) {
  2418. return function () {
  2419. try {
  2420. return fn.apply(fn, arguments);
  2421. } catch (e) {
  2422. // TODO
  2423. console.error(e);
  2424. }
  2425. };
  2426. }
  2427. function getApiCallbacks(params) {
  2428. var apiCallbacks = {};
  2429. for (var name in params) {
  2430. var param = params[name];
  2431. if (isFn(param)) {
  2432. apiCallbacks[name] = tryCatch(param);
  2433. delete params[name];
  2434. }
  2435. }
  2436. return apiCallbacks;
  2437. }
  2438. var cid;
  2439. var cidErrMsg;
  2440. var enabled;
  2441. function normalizePushMessage(message) {
  2442. try {
  2443. return JSON.parse(message);
  2444. } catch (e) {}
  2445. return message;
  2446. }
  2447. function invokePushCallback(args) {
  2448. if (args.type === 'enabled') {
  2449. enabled = true;
  2450. } else if (args.type === 'clientId') {
  2451. cid = args.cid;
  2452. cidErrMsg = args.errMsg;
  2453. invokeGetPushCidCallbacks(cid, args.errMsg);
  2454. } else if (args.type === 'pushMsg') {
  2455. var message = {
  2456. type: 'receive',
  2457. data: normalizePushMessage(args.message)
  2458. };
  2459. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  2460. var callback = onPushMessageCallbacks[i];
  2461. callback(message);
  2462. // 该消息已被阻止
  2463. if (message.stopped) {
  2464. break;
  2465. }
  2466. }
  2467. } else if (args.type === 'click') {
  2468. onPushMessageCallbacks.forEach(function (callback) {
  2469. callback({
  2470. type: 'click',
  2471. data: normalizePushMessage(args.message)
  2472. });
  2473. });
  2474. }
  2475. }
  2476. var getPushCidCallbacks = [];
  2477. function invokeGetPushCidCallbacks(cid, errMsg) {
  2478. getPushCidCallbacks.forEach(function (callback) {
  2479. callback(cid, errMsg);
  2480. });
  2481. getPushCidCallbacks.length = 0;
  2482. }
  2483. function getPushClientId(args) {
  2484. if (!isPlainObject(args)) {
  2485. args = {};
  2486. }
  2487. var _getApiCallbacks = getApiCallbacks(args),
  2488. success = _getApiCallbacks.success,
  2489. fail = _getApiCallbacks.fail,
  2490. complete = _getApiCallbacks.complete;
  2491. var hasSuccess = isFn(success);
  2492. var hasFail = isFn(fail);
  2493. var hasComplete = isFn(complete);
  2494. Promise.resolve().then(function () {
  2495. if (typeof enabled === 'undefined') {
  2496. enabled = false;
  2497. cid = '';
  2498. cidErrMsg = 'uniPush is not enabled';
  2499. }
  2500. getPushCidCallbacks.push(function (cid, errMsg) {
  2501. var res;
  2502. if (cid) {
  2503. res = {
  2504. errMsg: 'getPushClientId:ok',
  2505. cid: cid
  2506. };
  2507. hasSuccess && success(res);
  2508. } else {
  2509. res = {
  2510. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  2511. };
  2512. hasFail && fail(res);
  2513. }
  2514. hasComplete && complete(res);
  2515. });
  2516. if (typeof cid !== 'undefined') {
  2517. invokeGetPushCidCallbacks(cid, cidErrMsg);
  2518. }
  2519. });
  2520. }
  2521. var onPushMessageCallbacks = [];
  2522. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  2523. var onPushMessage = function onPushMessage(fn) {
  2524. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  2525. onPushMessageCallbacks.push(fn);
  2526. }
  2527. };
  2528. var offPushMessage = function offPushMessage(fn) {
  2529. if (!fn) {
  2530. onPushMessageCallbacks.length = 0;
  2531. } else {
  2532. var index = onPushMessageCallbacks.indexOf(fn);
  2533. if (index > -1) {
  2534. onPushMessageCallbacks.splice(index, 1);
  2535. }
  2536. }
  2537. };
  2538. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  2539. if (!baseInfo) {
  2540. baseInfo = wx.getSystemInfoSync();
  2541. }
  2542. var host = baseInfo ? baseInfo.host : null;
  2543. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  2544. var api = /*#__PURE__*/Object.freeze({
  2545. __proto__: null,
  2546. shareVideoMessage: shareVideoMessage,
  2547. getPushClientId: getPushClientId,
  2548. onPushMessage: onPushMessage,
  2549. offPushMessage: offPushMessage,
  2550. invokePushCallback: invokePushCallback
  2551. });
  2552. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  2553. function findVmByVueId(vm, vuePid) {
  2554. var $children = vm.$children;
  2555. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  2556. for (var i = $children.length - 1; i >= 0; i--) {
  2557. var childVm = $children[i];
  2558. if (childVm.$scope._$vueId === vuePid) {
  2559. return childVm;
  2560. }
  2561. }
  2562. // 反向递归查找
  2563. var parentVm;
  2564. for (var _i = $children.length - 1; _i >= 0; _i--) {
  2565. parentVm = findVmByVueId($children[_i], vuePid);
  2566. if (parentVm) {
  2567. return parentVm;
  2568. }
  2569. }
  2570. }
  2571. function initBehavior(options) {
  2572. return Behavior(options);
  2573. }
  2574. function isPage() {
  2575. return !!this.route;
  2576. }
  2577. function initRelation(detail) {
  2578. this.triggerEvent('__l', detail);
  2579. }
  2580. function selectAllComponents(mpInstance, selector, $refs) {
  2581. var components = mpInstance.selectAllComponents(selector) || [];
  2582. components.forEach(function (component) {
  2583. var ref = component.dataset.ref;
  2584. $refs[ref] = component.$vm || toSkip(component);
  2585. {
  2586. if (component.dataset.vueGeneric === 'scoped') {
  2587. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  2588. selectAllComponents(scopedComponent, selector, $refs);
  2589. });
  2590. }
  2591. }
  2592. });
  2593. }
  2594. function syncRefs(refs, newRefs) {
  2595. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  2596. var newKeys = Object.keys(newRefs);
  2597. newKeys.forEach(function (key) {
  2598. var oldValue = refs[key];
  2599. var newValue = newRefs[key];
  2600. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  2601. return oldValue.includes(value);
  2602. })) {
  2603. return;
  2604. }
  2605. refs[key] = newValue;
  2606. oldKeys.delete(key);
  2607. });
  2608. oldKeys.forEach(function (key) {
  2609. delete refs[key];
  2610. });
  2611. return refs;
  2612. }
  2613. function initRefs(vm) {
  2614. var mpInstance = vm.$scope;
  2615. var refs = {};
  2616. Object.defineProperty(vm, '$refs', {
  2617. get: function get() {
  2618. var $refs = {};
  2619. selectAllComponents(mpInstance, '.vue-ref', $refs);
  2620. // TODO 暂不考虑 for 中的 scoped
  2621. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  2622. forComponents.forEach(function (component) {
  2623. var ref = component.dataset.ref;
  2624. if (!$refs[ref]) {
  2625. $refs[ref] = [];
  2626. }
  2627. $refs[ref].push(component.$vm || toSkip(component));
  2628. });
  2629. return syncRefs(refs, $refs);
  2630. }
  2631. });
  2632. }
  2633. function handleLink(event) {
  2634. var _ref3 = event.detail || event.value,
  2635. vuePid = _ref3.vuePid,
  2636. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  2637. var parentVm;
  2638. if (vuePid) {
  2639. parentVm = findVmByVueId(this.$vm, vuePid);
  2640. }
  2641. if (!parentVm) {
  2642. parentVm = this.$vm;
  2643. }
  2644. vueOptions.parent = parentVm;
  2645. }
  2646. function markMPComponent(component) {
  2647. // 在 Vue 中标记为小程序组件
  2648. var IS_MP = '__v_isMPComponent';
  2649. Object.defineProperty(component, IS_MP, {
  2650. configurable: true,
  2651. enumerable: false,
  2652. value: true
  2653. });
  2654. return component;
  2655. }
  2656. function toSkip(obj) {
  2657. var OB = '__ob__';
  2658. var SKIP = '__v_skip';
  2659. if (isObject(obj) && Object.isExtensible(obj)) {
  2660. // 避免被 @vue/composition-api 观测
  2661. Object.defineProperty(obj, OB, {
  2662. configurable: true,
  2663. enumerable: false,
  2664. value: (0, _defineProperty2.default)({}, SKIP, true)
  2665. });
  2666. }
  2667. return obj;
  2668. }
  2669. var WORKLET_RE = /_(.*)_worklet_factory_/;
  2670. function initWorkletMethods(mpMethods, vueMethods) {
  2671. if (vueMethods) {
  2672. Object.keys(vueMethods).forEach(function (name) {
  2673. var matches = name.match(WORKLET_RE);
  2674. if (matches) {
  2675. var workletName = matches[1];
  2676. mpMethods[name] = vueMethods[name];
  2677. mpMethods[workletName] = vueMethods[workletName];
  2678. }
  2679. });
  2680. }
  2681. }
  2682. var MPPage = Page;
  2683. var MPComponent = Component;
  2684. var customizeRE = /:/g;
  2685. var customize = cached(function (str) {
  2686. return camelize(str.replace(customizeRE, '-'));
  2687. });
  2688. function initTriggerEvent(mpInstance) {
  2689. var oldTriggerEvent = mpInstance.triggerEvent;
  2690. var newTriggerEvent = function newTriggerEvent(event) {
  2691. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  2692. args[_key3 - 1] = arguments[_key3];
  2693. }
  2694. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  2695. if (this.$vm || this.dataset && this.dataset.comType) {
  2696. event = customize(event);
  2697. } else {
  2698. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  2699. var newEvent = customize(event);
  2700. if (newEvent !== event) {
  2701. oldTriggerEvent.apply(this, [newEvent].concat(args));
  2702. }
  2703. }
  2704. return oldTriggerEvent.apply(this, [event].concat(args));
  2705. };
  2706. try {
  2707. // 京东小程序 triggerEvent 为只读
  2708. mpInstance.triggerEvent = newTriggerEvent;
  2709. } catch (error) {
  2710. mpInstance._triggerEvent = newTriggerEvent;
  2711. }
  2712. }
  2713. function initHook(name, options, isComponent) {
  2714. var oldHook = options[name];
  2715. options[name] = function () {
  2716. markMPComponent(this);
  2717. initTriggerEvent(this);
  2718. if (oldHook) {
  2719. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2720. args[_key4] = arguments[_key4];
  2721. }
  2722. return oldHook.apply(this, args);
  2723. }
  2724. };
  2725. }
  2726. if (!MPPage.__$wrappered) {
  2727. MPPage.__$wrappered = true;
  2728. Page = function Page() {
  2729. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2730. initHook('onLoad', options);
  2731. return MPPage(options);
  2732. };
  2733. Page.after = MPPage.after;
  2734. Component = function Component() {
  2735. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2736. initHook('created', options);
  2737. return MPComponent(options);
  2738. };
  2739. }
  2740. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  2741. function initMocks(vm, mocks) {
  2742. var mpInstance = vm.$mp[vm.mpType];
  2743. mocks.forEach(function (mock) {
  2744. if (hasOwn(mpInstance, mock)) {
  2745. vm[mock] = mpInstance[mock];
  2746. }
  2747. });
  2748. }
  2749. function hasHook(hook, vueOptions) {
  2750. if (!vueOptions) {
  2751. return true;
  2752. }
  2753. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  2754. return true;
  2755. }
  2756. vueOptions = vueOptions.default || vueOptions;
  2757. if (isFn(vueOptions)) {
  2758. if (isFn(vueOptions.extendOptions[hook])) {
  2759. return true;
  2760. }
  2761. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  2762. return true;
  2763. }
  2764. return false;
  2765. }
  2766. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  2767. return true;
  2768. }
  2769. var mixins = vueOptions.mixins;
  2770. if (Array.isArray(mixins)) {
  2771. return !!mixins.find(function (mixin) {
  2772. return hasHook(hook, mixin);
  2773. });
  2774. }
  2775. }
  2776. function initHooks(mpOptions, hooks, vueOptions) {
  2777. hooks.forEach(function (hook) {
  2778. if (hasHook(hook, vueOptions)) {
  2779. mpOptions[hook] = function (args) {
  2780. return this.$vm && this.$vm.__call_hook(hook, args);
  2781. };
  2782. }
  2783. });
  2784. }
  2785. function initUnknownHooks(mpOptions, vueOptions) {
  2786. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2787. findHooks(vueOptions).forEach(function (hook) {
  2788. return initHook$1(mpOptions, hook, excludes);
  2789. });
  2790. }
  2791. function findHooks(vueOptions) {
  2792. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  2793. if (vueOptions) {
  2794. Object.keys(vueOptions).forEach(function (name) {
  2795. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  2796. hooks.push(name);
  2797. }
  2798. });
  2799. }
  2800. return hooks;
  2801. }
  2802. function initHook$1(mpOptions, hook, excludes) {
  2803. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  2804. mpOptions[hook] = function (args) {
  2805. return this.$vm && this.$vm.__call_hook(hook, args);
  2806. };
  2807. }
  2808. }
  2809. function initVueComponent(Vue, vueOptions) {
  2810. vueOptions = vueOptions.default || vueOptions;
  2811. var VueComponent;
  2812. if (isFn(vueOptions)) {
  2813. VueComponent = vueOptions;
  2814. } else {
  2815. VueComponent = Vue.extend(vueOptions);
  2816. }
  2817. vueOptions = VueComponent.options;
  2818. return [VueComponent, vueOptions];
  2819. }
  2820. function initSlots(vm, vueSlots) {
  2821. if (Array.isArray(vueSlots) && vueSlots.length) {
  2822. var $slots = Object.create(null);
  2823. vueSlots.forEach(function (slotName) {
  2824. $slots[slotName] = true;
  2825. });
  2826. vm.$scopedSlots = vm.$slots = $slots;
  2827. }
  2828. }
  2829. function initVueIds(vueIds, mpInstance) {
  2830. vueIds = (vueIds || '').split(',');
  2831. var len = vueIds.length;
  2832. if (len === 1) {
  2833. mpInstance._$vueId = vueIds[0];
  2834. } else if (len === 2) {
  2835. mpInstance._$vueId = vueIds[0];
  2836. mpInstance._$vuePid = vueIds[1];
  2837. }
  2838. }
  2839. function initData(vueOptions, context) {
  2840. var data = vueOptions.data || {};
  2841. var methods = vueOptions.methods || {};
  2842. if (typeof data === 'function') {
  2843. try {
  2844. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  2845. } catch (e) {
  2846. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  2847. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  2848. }
  2849. }
  2850. } else {
  2851. try {
  2852. // 对 data 格式化
  2853. data = JSON.parse(JSON.stringify(data));
  2854. } catch (e) {}
  2855. }
  2856. if (!isPlainObject(data)) {
  2857. data = {};
  2858. }
  2859. Object.keys(methods).forEach(function (methodName) {
  2860. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  2861. data[methodName] = methods[methodName];
  2862. }
  2863. });
  2864. return data;
  2865. }
  2866. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  2867. function createObserver(name) {
  2868. return function observer(newVal, oldVal) {
  2869. if (this.$vm) {
  2870. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  2871. }
  2872. };
  2873. }
  2874. function initBehaviors(vueOptions, initBehavior) {
  2875. var vueBehaviors = vueOptions.behaviors;
  2876. var vueExtends = vueOptions.extends;
  2877. var vueMixins = vueOptions.mixins;
  2878. var vueProps = vueOptions.props;
  2879. if (!vueProps) {
  2880. vueOptions.props = vueProps = [];
  2881. }
  2882. var behaviors = [];
  2883. if (Array.isArray(vueBehaviors)) {
  2884. vueBehaviors.forEach(function (behavior) {
  2885. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  2886. if (behavior === 'uni://form-field') {
  2887. if (Array.isArray(vueProps)) {
  2888. vueProps.push('name');
  2889. vueProps.push('value');
  2890. } else {
  2891. vueProps.name = {
  2892. type: String,
  2893. default: ''
  2894. };
  2895. vueProps.value = {
  2896. type: [String, Number, Boolean, Array, Object, Date],
  2897. default: ''
  2898. };
  2899. }
  2900. }
  2901. });
  2902. }
  2903. if (isPlainObject(vueExtends) && vueExtends.props) {
  2904. behaviors.push(initBehavior({
  2905. properties: initProperties(vueExtends.props, true)
  2906. }));
  2907. }
  2908. if (Array.isArray(vueMixins)) {
  2909. vueMixins.forEach(function (vueMixin) {
  2910. if (isPlainObject(vueMixin) && vueMixin.props) {
  2911. behaviors.push(initBehavior({
  2912. properties: initProperties(vueMixin.props, true)
  2913. }));
  2914. }
  2915. });
  2916. }
  2917. return behaviors;
  2918. }
  2919. function parsePropType(key, type, defaultValue, file) {
  2920. // [String]=>String
  2921. if (Array.isArray(type) && type.length === 1) {
  2922. return type[0];
  2923. }
  2924. return type;
  2925. }
  2926. function initProperties(props) {
  2927. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2928. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  2929. var options = arguments.length > 3 ? arguments[3] : undefined;
  2930. var properties = {};
  2931. if (!isBehavior) {
  2932. properties.vueId = {
  2933. type: String,
  2934. value: ''
  2935. };
  2936. {
  2937. if (options.virtualHost) {
  2938. properties.virtualHostStyle = {
  2939. type: null,
  2940. value: ''
  2941. };
  2942. properties.virtualHostClass = {
  2943. type: null,
  2944. value: ''
  2945. };
  2946. }
  2947. }
  2948. // scopedSlotsCompiler auto
  2949. properties.scopedSlotsCompiler = {
  2950. type: String,
  2951. value: ''
  2952. };
  2953. properties.vueSlots = {
  2954. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  2955. type: null,
  2956. value: [],
  2957. observer: function observer(newVal, oldVal) {
  2958. var $slots = Object.create(null);
  2959. newVal.forEach(function (slotName) {
  2960. $slots[slotName] = true;
  2961. });
  2962. this.setData({
  2963. $slots: $slots
  2964. });
  2965. }
  2966. };
  2967. }
  2968. if (Array.isArray(props)) {
  2969. // ['title']
  2970. props.forEach(function (key) {
  2971. properties[key] = {
  2972. type: null,
  2973. observer: createObserver(key)
  2974. };
  2975. });
  2976. } else if (isPlainObject(props)) {
  2977. // {title:{type:String,default:''},content:String}
  2978. Object.keys(props).forEach(function (key) {
  2979. var opts = props[key];
  2980. if (isPlainObject(opts)) {
  2981. // title:{type:String,default:''}
  2982. var value = opts.default;
  2983. if (isFn(value)) {
  2984. value = value();
  2985. }
  2986. opts.type = parsePropType(key, opts.type);
  2987. properties[key] = {
  2988. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  2989. value: value,
  2990. observer: createObserver(key)
  2991. };
  2992. } else {
  2993. // content:String
  2994. var type = parsePropType(key, opts);
  2995. properties[key] = {
  2996. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  2997. observer: createObserver(key)
  2998. };
  2999. }
  3000. });
  3001. }
  3002. return properties;
  3003. }
  3004. function wrapper$1(event) {
  3005. // TODO 又得兼容 mpvue 的 mp 对象
  3006. try {
  3007. event.mp = JSON.parse(JSON.stringify(event));
  3008. } catch (e) {}
  3009. event.stopPropagation = noop;
  3010. event.preventDefault = noop;
  3011. event.target = event.target || {};
  3012. if (!hasOwn(event, 'detail')) {
  3013. event.detail = {};
  3014. }
  3015. if (hasOwn(event, 'markerId')) {
  3016. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  3017. event.detail.markerId = event.markerId;
  3018. }
  3019. if (isPlainObject(event.detail)) {
  3020. event.target = Object.assign({}, event.target, event.detail);
  3021. }
  3022. return event;
  3023. }
  3024. function getExtraValue(vm, dataPathsArray) {
  3025. var context = vm;
  3026. dataPathsArray.forEach(function (dataPathArray) {
  3027. var dataPath = dataPathArray[0];
  3028. var value = dataPathArray[2];
  3029. if (dataPath || typeof value !== 'undefined') {
  3030. // ['','',index,'disable']
  3031. var propPath = dataPathArray[1];
  3032. var valuePath = dataPathArray[3];
  3033. var vFor;
  3034. if (Number.isInteger(dataPath)) {
  3035. vFor = dataPath;
  3036. } else if (!dataPath) {
  3037. vFor = context;
  3038. } else if (typeof dataPath === 'string' && dataPath) {
  3039. if (dataPath.indexOf('#s#') === 0) {
  3040. vFor = dataPath.substr(3);
  3041. } else {
  3042. vFor = vm.__get_value(dataPath, context);
  3043. }
  3044. }
  3045. if (Number.isInteger(vFor)) {
  3046. context = value;
  3047. } else if (!propPath) {
  3048. context = vFor[value];
  3049. } else {
  3050. if (Array.isArray(vFor)) {
  3051. context = vFor.find(function (vForItem) {
  3052. return vm.__get_value(propPath, vForItem) === value;
  3053. });
  3054. } else if (isPlainObject(vFor)) {
  3055. context = Object.keys(vFor).find(function (vForKey) {
  3056. return vm.__get_value(propPath, vFor[vForKey]) === value;
  3057. });
  3058. } else {
  3059. console.error('v-for 暂不支持循环数据:', vFor);
  3060. }
  3061. }
  3062. if (valuePath) {
  3063. context = vm.__get_value(valuePath, context);
  3064. }
  3065. }
  3066. });
  3067. return context;
  3068. }
  3069. function processEventExtra(vm, extra, event, __args__) {
  3070. var extraObj = {};
  3071. if (Array.isArray(extra) && extra.length) {
  3072. /**
  3073. *[
  3074. * ['data.items', 'data.id', item.data.id],
  3075. * ['metas', 'id', meta.id]
  3076. *],
  3077. *[
  3078. * ['data.items', 'data.id', item.data.id],
  3079. * ['metas', 'id', meta.id]
  3080. *],
  3081. *'test'
  3082. */
  3083. extra.forEach(function (dataPath, index) {
  3084. if (typeof dataPath === 'string') {
  3085. if (!dataPath) {
  3086. // model,prop.sync
  3087. extraObj['$' + index] = vm;
  3088. } else {
  3089. if (dataPath === '$event') {
  3090. // $event
  3091. extraObj['$' + index] = event;
  3092. } else if (dataPath === 'arguments') {
  3093. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  3094. } else if (dataPath.indexOf('$event.') === 0) {
  3095. // $event.target.value
  3096. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  3097. } else {
  3098. extraObj['$' + index] = vm.__get_value(dataPath);
  3099. }
  3100. }
  3101. } else {
  3102. extraObj['$' + index] = getExtraValue(vm, dataPath);
  3103. }
  3104. });
  3105. }
  3106. return extraObj;
  3107. }
  3108. function getObjByArray(arr) {
  3109. var obj = {};
  3110. for (var i = 1; i < arr.length; i++) {
  3111. var element = arr[i];
  3112. obj[element[0]] = element[1];
  3113. }
  3114. return obj;
  3115. }
  3116. function processEventArgs(vm, event) {
  3117. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3118. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  3119. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  3120. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  3121. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  3122. // fixed 用户直接触发 mpInstance.triggerEvent
  3123. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  3124. if (isCustom) {
  3125. // 自定义事件
  3126. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  3127. if (!args.length) {
  3128. // 无参数,直接传入 event 或 detail 数组
  3129. if (isCustomMPEvent) {
  3130. return [event];
  3131. }
  3132. return __args__;
  3133. }
  3134. }
  3135. var extraObj = processEventExtra(vm, extra, event, __args__);
  3136. var ret = [];
  3137. args.forEach(function (arg) {
  3138. if (arg === '$event') {
  3139. if (methodName === '__set_model' && !isCustom) {
  3140. // input v-model value
  3141. ret.push(event.target.value);
  3142. } else {
  3143. if (isCustom && !isCustomMPEvent) {
  3144. ret.push(__args__[0]);
  3145. } else {
  3146. // wxcomponent 组件或内置组件
  3147. ret.push(event);
  3148. }
  3149. }
  3150. } else {
  3151. if (Array.isArray(arg) && arg[0] === 'o') {
  3152. ret.push(getObjByArray(arg));
  3153. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  3154. ret.push(extraObj[arg]);
  3155. } else {
  3156. ret.push(arg);
  3157. }
  3158. }
  3159. });
  3160. return ret;
  3161. }
  3162. var ONCE = '~';
  3163. var CUSTOM = '^';
  3164. function isMatchEventType(eventType, optType) {
  3165. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  3166. }
  3167. function getContextVm(vm) {
  3168. var $parent = vm.$parent;
  3169. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  3170. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  3171. $parent = $parent.$parent;
  3172. }
  3173. return $parent && $parent.$parent;
  3174. }
  3175. function handleEvent(event) {
  3176. var _this2 = this;
  3177. event = wrapper$1(event);
  3178. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  3179. var dataset = (event.currentTarget || event.target).dataset;
  3180. if (!dataset) {
  3181. return console.warn('事件信息不存在');
  3182. }
  3183. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  3184. if (!eventOpts) {
  3185. return console.warn('事件信息不存在');
  3186. }
  3187. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  3188. var eventType = event.type;
  3189. var ret = [];
  3190. eventOpts.forEach(function (eventOpt) {
  3191. var type = eventOpt[0];
  3192. var eventsArray = eventOpt[1];
  3193. var isCustom = type.charAt(0) === CUSTOM;
  3194. type = isCustom ? type.slice(1) : type;
  3195. var isOnce = type.charAt(0) === ONCE;
  3196. type = isOnce ? type.slice(1) : type;
  3197. if (eventsArray && isMatchEventType(eventType, type)) {
  3198. eventsArray.forEach(function (eventArray) {
  3199. var methodName = eventArray[0];
  3200. if (methodName) {
  3201. var handlerCtx = _this2.$vm;
  3202. if (handlerCtx.$options.generic) {
  3203. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  3204. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  3205. }
  3206. if (methodName === '$emit') {
  3207. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  3208. return;
  3209. }
  3210. var handler = handlerCtx[methodName];
  3211. if (!isFn(handler)) {
  3212. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  3213. var path = _this2.route || _this2.is;
  3214. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  3215. }
  3216. if (isOnce) {
  3217. if (handler.once) {
  3218. return;
  3219. }
  3220. handler.once = true;
  3221. }
  3222. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  3223. params = Array.isArray(params) ? params : [];
  3224. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  3225. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  3226. // eslint-disable-next-line no-sparse-arrays
  3227. params = params.concat([,,,,,,,,,, event]);
  3228. }
  3229. ret.push(handler.apply(handlerCtx, params));
  3230. }
  3231. });
  3232. }
  3233. });
  3234. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  3235. return ret[0];
  3236. }
  3237. }
  3238. var eventChannels = {};
  3239. function getEventChannel(id) {
  3240. var eventChannel = eventChannels[id];
  3241. delete eventChannels[id];
  3242. return eventChannel;
  3243. }
  3244. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  3245. function initEventChannel() {
  3246. _vue.default.prototype.getOpenerEventChannel = function () {
  3247. // 微信小程序使用自身getOpenerEventChannel
  3248. {
  3249. return this.$scope.getOpenerEventChannel();
  3250. }
  3251. };
  3252. var callHook = _vue.default.prototype.__call_hook;
  3253. _vue.default.prototype.__call_hook = function (hook, args) {
  3254. if (hook === 'onLoad' && args && args.__id__) {
  3255. this.__eventChannel__ = getEventChannel(args.__id__);
  3256. delete args.__id__;
  3257. }
  3258. return callHook.call(this, hook, args);
  3259. };
  3260. }
  3261. function initScopedSlotsParams() {
  3262. var center = {};
  3263. var parents = {};
  3264. function currentId(fn) {
  3265. var vueIds = this.$options.propsData.vueId;
  3266. if (vueIds) {
  3267. var vueId = vueIds.split(',')[0];
  3268. fn(vueId);
  3269. }
  3270. }
  3271. _vue.default.prototype.$hasSSP = function (vueId) {
  3272. var slot = center[vueId];
  3273. if (!slot) {
  3274. parents[vueId] = this;
  3275. this.$on('hook:destroyed', function () {
  3276. delete parents[vueId];
  3277. });
  3278. }
  3279. return slot;
  3280. };
  3281. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  3282. var slot = center[vueId];
  3283. if (slot) {
  3284. var params = slot[name] || [];
  3285. if (needAll) {
  3286. return params;
  3287. }
  3288. return params[0];
  3289. }
  3290. };
  3291. _vue.default.prototype.$setSSP = function (name, value) {
  3292. var index = 0;
  3293. currentId.call(this, function (vueId) {
  3294. var slot = center[vueId];
  3295. var params = slot[name] = slot[name] || [];
  3296. params.push(value);
  3297. index = params.length - 1;
  3298. });
  3299. return index;
  3300. };
  3301. _vue.default.prototype.$initSSP = function () {
  3302. currentId.call(this, function (vueId) {
  3303. center[vueId] = {};
  3304. });
  3305. };
  3306. _vue.default.prototype.$callSSP = function () {
  3307. currentId.call(this, function (vueId) {
  3308. if (parents[vueId]) {
  3309. parents[vueId].$forceUpdate();
  3310. }
  3311. });
  3312. };
  3313. _vue.default.mixin({
  3314. destroyed: function destroyed() {
  3315. var propsData = this.$options.propsData;
  3316. var vueId = propsData && propsData.vueId;
  3317. if (vueId) {
  3318. delete center[vueId];
  3319. delete parents[vueId];
  3320. }
  3321. }
  3322. });
  3323. }
  3324. function parseBaseApp(vm, _ref4) {
  3325. var mocks = _ref4.mocks,
  3326. initRefs = _ref4.initRefs;
  3327. initEventChannel();
  3328. {
  3329. initScopedSlotsParams();
  3330. }
  3331. if (vm.$options.store) {
  3332. _vue.default.prototype.$store = vm.$options.store;
  3333. }
  3334. uniIdMixin(_vue.default);
  3335. _vue.default.prototype.mpHost = "mp-weixin";
  3336. _vue.default.mixin({
  3337. beforeCreate: function beforeCreate() {
  3338. if (!this.$options.mpType) {
  3339. return;
  3340. }
  3341. this.mpType = this.$options.mpType;
  3342. this.$mp = (0, _defineProperty2.default)({
  3343. data: {}
  3344. }, this.mpType, this.$options.mpInstance);
  3345. this.$scope = this.$options.mpInstance;
  3346. delete this.$options.mpType;
  3347. delete this.$options.mpInstance;
  3348. if (this.mpType === 'page' && typeof getApp === 'function') {
  3349. // hack vue-i18n
  3350. var app = getApp();
  3351. if (app.$vm && app.$vm.$i18n) {
  3352. this._i18n = app.$vm.$i18n;
  3353. }
  3354. }
  3355. if (this.mpType !== 'app') {
  3356. initRefs(this);
  3357. initMocks(this, mocks);
  3358. }
  3359. }
  3360. });
  3361. var appOptions = {
  3362. onLaunch: function onLaunch(args) {
  3363. if (this.$vm) {
  3364. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  3365. return;
  3366. }
  3367. {
  3368. if (wx.canIUse && !wx.canIUse('nextTick')) {
  3369. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  3370. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  3371. }
  3372. }
  3373. this.$vm = vm;
  3374. this.$vm.$mp = {
  3375. app: this
  3376. };
  3377. this.$vm.$scope = this;
  3378. // vm 上也挂载 globalData
  3379. this.$vm.globalData = this.globalData;
  3380. this.$vm._isMounted = true;
  3381. this.$vm.__call_hook('mounted', args);
  3382. this.$vm.__call_hook('onLaunch', args);
  3383. }
  3384. };
  3385. // 兼容旧版本 globalData
  3386. appOptions.globalData = vm.$options.globalData || {};
  3387. // 将 methods 中的方法挂在 getApp() 中
  3388. var methods = vm.$options.methods;
  3389. if (methods) {
  3390. Object.keys(methods).forEach(function (name) {
  3391. appOptions[name] = methods[name];
  3392. });
  3393. }
  3394. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  3395. initHooks(appOptions, hooks);
  3396. initUnknownHooks(appOptions, vm.$options);
  3397. return appOptions;
  3398. }
  3399. function parseApp(vm) {
  3400. return parseBaseApp(vm, {
  3401. mocks: mocks,
  3402. initRefs: initRefs
  3403. });
  3404. }
  3405. function createApp(vm) {
  3406. App(parseApp(vm));
  3407. return vm;
  3408. }
  3409. var encodeReserveRE = /[!'()*]/g;
  3410. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  3411. return '%' + c.charCodeAt(0).toString(16);
  3412. };
  3413. var commaRE = /%2C/g;
  3414. // fixed encodeURIComponent which is more conformant to RFC3986:
  3415. // - escapes [!'()*]
  3416. // - preserve commas
  3417. var encode = function encode(str) {
  3418. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  3419. };
  3420. function stringifyQuery(obj) {
  3421. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  3422. var res = obj ? Object.keys(obj).map(function (key) {
  3423. var val = obj[key];
  3424. if (val === undefined) {
  3425. return '';
  3426. }
  3427. if (val === null) {
  3428. return encodeStr(key);
  3429. }
  3430. if (Array.isArray(val)) {
  3431. var result = [];
  3432. val.forEach(function (val2) {
  3433. if (val2 === undefined) {
  3434. return;
  3435. }
  3436. if (val2 === null) {
  3437. result.push(encodeStr(key));
  3438. } else {
  3439. result.push(encodeStr(key) + '=' + encodeStr(val2));
  3440. }
  3441. });
  3442. return result.join('&');
  3443. }
  3444. return encodeStr(key) + '=' + encodeStr(val);
  3445. }).filter(function (x) {
  3446. return x.length > 0;
  3447. }).join('&') : null;
  3448. return res ? "?".concat(res) : '';
  3449. }
  3450. function parseBaseComponent(vueComponentOptions) {
  3451. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  3452. isPage = _ref5.isPage,
  3453. initRelation = _ref5.initRelation;
  3454. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  3455. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  3456. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  3457. VueComponent = _initVueComponent2[0],
  3458. vueOptions = _initVueComponent2[1];
  3459. var options = _objectSpread({
  3460. multipleSlots: true,
  3461. // styleIsolation: 'apply-shared',
  3462. addGlobalClass: true
  3463. }, vueOptions.options || {});
  3464. {
  3465. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  3466. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  3467. Object.assign(options, vueOptions['mp-weixin'].options);
  3468. }
  3469. }
  3470. var componentOptions = {
  3471. options: options,
  3472. data: initData(vueOptions, _vue.default.prototype),
  3473. behaviors: initBehaviors(vueOptions, initBehavior),
  3474. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  3475. lifetimes: {
  3476. attached: function attached() {
  3477. var properties = this.properties;
  3478. var options = {
  3479. mpType: isPage.call(this) ? 'page' : 'component',
  3480. mpInstance: this,
  3481. propsData: properties
  3482. };
  3483. initVueIds(properties.vueId, this);
  3484. // 处理父子关系
  3485. initRelation.call(this, {
  3486. vuePid: this._$vuePid,
  3487. vueOptions: options
  3488. });
  3489. // 初始化 vue 实例
  3490. this.$vm = new VueComponent(options);
  3491. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  3492. initSlots(this.$vm, properties.vueSlots);
  3493. // 触发首次 setData
  3494. this.$vm.$mount();
  3495. },
  3496. ready: function ready() {
  3497. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  3498. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  3499. if (this.$vm) {
  3500. this.$vm._isMounted = true;
  3501. this.$vm.__call_hook('mounted');
  3502. this.$vm.__call_hook('onReady');
  3503. }
  3504. },
  3505. detached: function detached() {
  3506. this.$vm && this.$vm.$destroy();
  3507. }
  3508. },
  3509. pageLifetimes: {
  3510. show: function show(args) {
  3511. this.$vm && this.$vm.__call_hook('onPageShow', args);
  3512. },
  3513. hide: function hide() {
  3514. this.$vm && this.$vm.__call_hook('onPageHide');
  3515. },
  3516. resize: function resize(size) {
  3517. this.$vm && this.$vm.__call_hook('onPageResize', size);
  3518. }
  3519. },
  3520. methods: {
  3521. __l: handleLink,
  3522. __e: handleEvent
  3523. }
  3524. };
  3525. // externalClasses
  3526. if (vueOptions.externalClasses) {
  3527. componentOptions.externalClasses = vueOptions.externalClasses;
  3528. }
  3529. if (Array.isArray(vueOptions.wxsCallMethods)) {
  3530. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  3531. componentOptions.methods[callMethod] = function (args) {
  3532. return this.$vm[callMethod](args);
  3533. };
  3534. });
  3535. }
  3536. if (needVueOptions) {
  3537. return [componentOptions, vueOptions, VueComponent];
  3538. }
  3539. if (isPage) {
  3540. return componentOptions;
  3541. }
  3542. return [componentOptions, VueComponent];
  3543. }
  3544. function parseComponent(vueComponentOptions, needVueOptions) {
  3545. return parseBaseComponent(vueComponentOptions, {
  3546. isPage: isPage,
  3547. initRelation: initRelation
  3548. }, needVueOptions);
  3549. }
  3550. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  3551. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  3552. function parseBasePage(vuePageOptions) {
  3553. var _parseComponent = parseComponent(vuePageOptions, true),
  3554. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  3555. pageOptions = _parseComponent2[0],
  3556. vueOptions = _parseComponent2[1];
  3557. initHooks(pageOptions.methods, hooks$1, vueOptions);
  3558. pageOptions.methods.onLoad = function (query) {
  3559. this.options = query;
  3560. var copyQuery = Object.assign({}, query);
  3561. delete copyQuery.__id__;
  3562. this.$page = {
  3563. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  3564. };
  3565. this.$vm.$mp.query = query; // 兼容 mpvue
  3566. this.$vm.__call_hook('onLoad', query);
  3567. };
  3568. {
  3569. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  3570. }
  3571. {
  3572. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  3573. }
  3574. return pageOptions;
  3575. }
  3576. function parsePage(vuePageOptions) {
  3577. return parseBasePage(vuePageOptions);
  3578. }
  3579. function createPage(vuePageOptions) {
  3580. {
  3581. return Component(parsePage(vuePageOptions));
  3582. }
  3583. }
  3584. function createComponent(vueOptions) {
  3585. {
  3586. return Component(parseComponent(vueOptions));
  3587. }
  3588. }
  3589. function createSubpackageApp(vm) {
  3590. var appOptions = parseApp(vm);
  3591. var app = getApp({
  3592. allowDefault: true
  3593. });
  3594. vm.$scope = app;
  3595. var globalData = app.globalData;
  3596. if (globalData) {
  3597. Object.keys(appOptions.globalData).forEach(function (name) {
  3598. if (!hasOwn(globalData, name)) {
  3599. globalData[name] = appOptions.globalData[name];
  3600. }
  3601. });
  3602. }
  3603. Object.keys(appOptions).forEach(function (name) {
  3604. if (!hasOwn(app, name)) {
  3605. app[name] = appOptions[name];
  3606. }
  3607. });
  3608. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3609. wx.onAppShow(function () {
  3610. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  3611. args[_key5] = arguments[_key5];
  3612. }
  3613. vm.__call_hook('onShow', args);
  3614. });
  3615. }
  3616. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3617. wx.onAppHide(function () {
  3618. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  3619. args[_key6] = arguments[_key6];
  3620. }
  3621. vm.__call_hook('onHide', args);
  3622. });
  3623. }
  3624. if (isFn(appOptions.onLaunch)) {
  3625. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3626. vm.__call_hook('onLaunch', args);
  3627. }
  3628. return vm;
  3629. }
  3630. function createPlugin(vm) {
  3631. var appOptions = parseApp(vm);
  3632. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3633. wx.onAppShow(function () {
  3634. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  3635. args[_key7] = arguments[_key7];
  3636. }
  3637. vm.__call_hook('onShow', args);
  3638. });
  3639. }
  3640. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3641. wx.onAppHide(function () {
  3642. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  3643. args[_key8] = arguments[_key8];
  3644. }
  3645. vm.__call_hook('onHide', args);
  3646. });
  3647. }
  3648. if (isFn(appOptions.onLaunch)) {
  3649. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3650. vm.__call_hook('onLaunch', args);
  3651. }
  3652. return vm;
  3653. }
  3654. todos.forEach(function (todoApi) {
  3655. protocols[todoApi] = false;
  3656. });
  3657. canIUses.forEach(function (canIUseApi) {
  3658. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  3659. if (!wx.canIUse(apiName)) {
  3660. protocols[canIUseApi] = false;
  3661. }
  3662. });
  3663. var uni = {};
  3664. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  3665. uni = new Proxy({}, {
  3666. get: function get(target, name) {
  3667. if (hasOwn(target, name)) {
  3668. return target[name];
  3669. }
  3670. if (baseApi[name]) {
  3671. return baseApi[name];
  3672. }
  3673. if (api[name]) {
  3674. return promisify(name, api[name]);
  3675. }
  3676. {
  3677. if (extraApi[name]) {
  3678. return promisify(name, extraApi[name]);
  3679. }
  3680. if (todoApis[name]) {
  3681. return promisify(name, todoApis[name]);
  3682. }
  3683. }
  3684. if (eventApi[name]) {
  3685. return eventApi[name];
  3686. }
  3687. return promisify(name, wrapper(name, wx[name]));
  3688. },
  3689. set: function set(target, name, value) {
  3690. target[name] = value;
  3691. return true;
  3692. }
  3693. });
  3694. } else {
  3695. Object.keys(baseApi).forEach(function (name) {
  3696. uni[name] = baseApi[name];
  3697. });
  3698. {
  3699. Object.keys(todoApis).forEach(function (name) {
  3700. uni[name] = promisify(name, todoApis[name]);
  3701. });
  3702. Object.keys(extraApi).forEach(function (name) {
  3703. uni[name] = promisify(name, extraApi[name]);
  3704. });
  3705. }
  3706. Object.keys(eventApi).forEach(function (name) {
  3707. uni[name] = eventApi[name];
  3708. });
  3709. Object.keys(api).forEach(function (name) {
  3710. uni[name] = promisify(name, api[name]);
  3711. });
  3712. Object.keys(wx).forEach(function (name) {
  3713. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  3714. uni[name] = promisify(name, wrapper(name, wx[name]));
  3715. }
  3716. });
  3717. }
  3718. wx.createApp = createApp;
  3719. wx.createPage = createPage;
  3720. wx.createComponent = createComponent;
  3721. wx.createSubpackageApp = createSubpackageApp;
  3722. wx.createPlugin = createPlugin;
  3723. var uni$1 = uni;
  3724. var _default = uni$1;
  3725. exports.default = _default;
  3726. /* 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)))
  3727. /***/ }),
  3728. /***/ 20:
  3729. /*!****************************************************************!*\
  3730. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  3731. \****************************************************************/
  3732. /*! no static exports found */
  3733. /***/ (function(module, exports) {
  3734. function _iterableToArray(iter) {
  3735. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  3736. }
  3737. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3738. /***/ }),
  3739. /***/ 21:
  3740. /*!******************************************************************!*\
  3741. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  3742. \******************************************************************/
  3743. /*! no static exports found */
  3744. /***/ (function(module, exports) {
  3745. function _nonIterableSpread() {
  3746. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  3747. }
  3748. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3749. /***/ }),
  3750. /***/ 22:
  3751. /*!*************************************************************!*\
  3752. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  3753. \*************************************************************/
  3754. /*! no static exports found */
  3755. /***/ (function(module, exports, __webpack_require__) {
  3756. "use strict";
  3757. /* WEBPACK VAR INJECTION */(function(uni, global) {
  3758. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3759. Object.defineProperty(exports, "__esModule", {
  3760. value: true
  3761. });
  3762. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  3763. exports.compileI18nJsonStr = compileI18nJsonStr;
  3764. exports.hasI18nJson = hasI18nJson;
  3765. exports.initVueI18n = initVueI18n;
  3766. exports.isI18nStr = isI18nStr;
  3767. exports.isString = void 0;
  3768. exports.normalizeLocale = normalizeLocale;
  3769. exports.parseI18nJson = parseI18nJson;
  3770. exports.resolveLocale = resolveLocale;
  3771. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  3772. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  3773. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  3774. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  3775. var isObject = function isObject(val) {
  3776. return val !== null && (0, _typeof2.default)(val) === 'object';
  3777. };
  3778. var defaultDelimiters = ['{', '}'];
  3779. var BaseFormatter = /*#__PURE__*/function () {
  3780. function BaseFormatter() {
  3781. (0, _classCallCheck2.default)(this, BaseFormatter);
  3782. this._caches = Object.create(null);
  3783. }
  3784. (0, _createClass2.default)(BaseFormatter, [{
  3785. key: "interpolate",
  3786. value: function interpolate(message, values) {
  3787. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  3788. if (!values) {
  3789. return [message];
  3790. }
  3791. var tokens = this._caches[message];
  3792. if (!tokens) {
  3793. tokens = parse(message, delimiters);
  3794. this._caches[message] = tokens;
  3795. }
  3796. return compile(tokens, values);
  3797. }
  3798. }]);
  3799. return BaseFormatter;
  3800. }();
  3801. exports.Formatter = BaseFormatter;
  3802. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  3803. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  3804. function parse(format, _ref) {
  3805. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  3806. startDelimiter = _ref2[0],
  3807. endDelimiter = _ref2[1];
  3808. var tokens = [];
  3809. var position = 0;
  3810. var text = '';
  3811. while (position < format.length) {
  3812. var char = format[position++];
  3813. if (char === startDelimiter) {
  3814. if (text) {
  3815. tokens.push({
  3816. type: 'text',
  3817. value: text
  3818. });
  3819. }
  3820. text = '';
  3821. var sub = '';
  3822. char = format[position++];
  3823. while (char !== undefined && char !== endDelimiter) {
  3824. sub += char;
  3825. char = format[position++];
  3826. }
  3827. var isClosed = char === endDelimiter;
  3828. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  3829. tokens.push({
  3830. value: sub,
  3831. type: type
  3832. });
  3833. }
  3834. // else if (char === '%') {
  3835. // // when found rails i18n syntax, skip text capture
  3836. // if (format[position] !== '{') {
  3837. // text += char
  3838. // }
  3839. // }
  3840. else {
  3841. text += char;
  3842. }
  3843. }
  3844. text && tokens.push({
  3845. type: 'text',
  3846. value: text
  3847. });
  3848. return tokens;
  3849. }
  3850. function compile(tokens, values) {
  3851. var compiled = [];
  3852. var index = 0;
  3853. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  3854. if (mode === 'unknown') {
  3855. return compiled;
  3856. }
  3857. while (index < tokens.length) {
  3858. var token = tokens[index];
  3859. switch (token.type) {
  3860. case 'text':
  3861. compiled.push(token.value);
  3862. break;
  3863. case 'list':
  3864. compiled.push(values[parseInt(token.value, 10)]);
  3865. break;
  3866. case 'named':
  3867. if (mode === 'named') {
  3868. compiled.push(values[token.value]);
  3869. } else {
  3870. if (true) {
  3871. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  3872. }
  3873. }
  3874. break;
  3875. case 'unknown':
  3876. if (true) {
  3877. console.warn("Detect 'unknown' type of token!");
  3878. }
  3879. break;
  3880. }
  3881. index++;
  3882. }
  3883. return compiled;
  3884. }
  3885. var LOCALE_ZH_HANS = 'zh-Hans';
  3886. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  3887. var LOCALE_ZH_HANT = 'zh-Hant';
  3888. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  3889. var LOCALE_EN = 'en';
  3890. exports.LOCALE_EN = LOCALE_EN;
  3891. var LOCALE_FR = 'fr';
  3892. exports.LOCALE_FR = LOCALE_FR;
  3893. var LOCALE_ES = 'es';
  3894. exports.LOCALE_ES = LOCALE_ES;
  3895. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3896. var hasOwn = function hasOwn(val, key) {
  3897. return hasOwnProperty.call(val, key);
  3898. };
  3899. var defaultFormatter = new BaseFormatter();
  3900. function include(str, parts) {
  3901. return !!parts.find(function (part) {
  3902. return str.indexOf(part) !== -1;
  3903. });
  3904. }
  3905. function startsWith(str, parts) {
  3906. return parts.find(function (part) {
  3907. return str.indexOf(part) === 0;
  3908. });
  3909. }
  3910. function normalizeLocale(locale, messages) {
  3911. if (!locale) {
  3912. return;
  3913. }
  3914. locale = locale.trim().replace(/_/g, '-');
  3915. if (messages && messages[locale]) {
  3916. return locale;
  3917. }
  3918. locale = locale.toLowerCase();
  3919. if (locale === 'chinese') {
  3920. // 支付宝
  3921. return LOCALE_ZH_HANS;
  3922. }
  3923. if (locale.indexOf('zh') === 0) {
  3924. if (locale.indexOf('-hans') > -1) {
  3925. return LOCALE_ZH_HANS;
  3926. }
  3927. if (locale.indexOf('-hant') > -1) {
  3928. return LOCALE_ZH_HANT;
  3929. }
  3930. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  3931. return LOCALE_ZH_HANT;
  3932. }
  3933. return LOCALE_ZH_HANS;
  3934. }
  3935. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  3936. if (messages && Object.keys(messages).length > 0) {
  3937. locales = Object.keys(messages);
  3938. }
  3939. var lang = startsWith(locale, locales);
  3940. if (lang) {
  3941. return lang;
  3942. }
  3943. }
  3944. var I18n = /*#__PURE__*/function () {
  3945. function I18n(_ref3) {
  3946. var locale = _ref3.locale,
  3947. fallbackLocale = _ref3.fallbackLocale,
  3948. messages = _ref3.messages,
  3949. watcher = _ref3.watcher,
  3950. formater = _ref3.formater;
  3951. (0, _classCallCheck2.default)(this, I18n);
  3952. this.locale = LOCALE_EN;
  3953. this.fallbackLocale = LOCALE_EN;
  3954. this.message = {};
  3955. this.messages = {};
  3956. this.watchers = [];
  3957. if (fallbackLocale) {
  3958. this.fallbackLocale = fallbackLocale;
  3959. }
  3960. this.formater = formater || defaultFormatter;
  3961. this.messages = messages || {};
  3962. this.setLocale(locale || LOCALE_EN);
  3963. if (watcher) {
  3964. this.watchLocale(watcher);
  3965. }
  3966. }
  3967. (0, _createClass2.default)(I18n, [{
  3968. key: "setLocale",
  3969. value: function setLocale(locale) {
  3970. var _this = this;
  3971. var oldLocale = this.locale;
  3972. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  3973. if (!this.messages[this.locale]) {
  3974. // 可能初始化时不存在
  3975. this.messages[this.locale] = {};
  3976. }
  3977. this.message = this.messages[this.locale];
  3978. // 仅发生变化时,通知
  3979. if (oldLocale !== this.locale) {
  3980. this.watchers.forEach(function (watcher) {
  3981. watcher(_this.locale, oldLocale);
  3982. });
  3983. }
  3984. }
  3985. }, {
  3986. key: "getLocale",
  3987. value: function getLocale() {
  3988. return this.locale;
  3989. }
  3990. }, {
  3991. key: "watchLocale",
  3992. value: function watchLocale(fn) {
  3993. var _this2 = this;
  3994. var index = this.watchers.push(fn) - 1;
  3995. return function () {
  3996. _this2.watchers.splice(index, 1);
  3997. };
  3998. }
  3999. }, {
  4000. key: "add",
  4001. value: function add(locale, message) {
  4002. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4003. var curMessages = this.messages[locale];
  4004. if (curMessages) {
  4005. if (override) {
  4006. Object.assign(curMessages, message);
  4007. } else {
  4008. Object.keys(message).forEach(function (key) {
  4009. if (!hasOwn(curMessages, key)) {
  4010. curMessages[key] = message[key];
  4011. }
  4012. });
  4013. }
  4014. } else {
  4015. this.messages[locale] = message;
  4016. }
  4017. }
  4018. }, {
  4019. key: "f",
  4020. value: function f(message, values, delimiters) {
  4021. return this.formater.interpolate(message, values, delimiters).join('');
  4022. }
  4023. }, {
  4024. key: "t",
  4025. value: function t(key, locale, values) {
  4026. var message = this.message;
  4027. if (typeof locale === 'string') {
  4028. locale = normalizeLocale(locale, this.messages);
  4029. locale && (message = this.messages[locale]);
  4030. } else {
  4031. values = locale;
  4032. }
  4033. if (!hasOwn(message, key)) {
  4034. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  4035. return key;
  4036. }
  4037. return this.formater.interpolate(message[key], values).join('');
  4038. }
  4039. }]);
  4040. return I18n;
  4041. }();
  4042. exports.I18n = I18n;
  4043. function watchAppLocale(appVm, i18n) {
  4044. // 需要保证 watch 的触发在组件渲染之前
  4045. if (appVm.$watchLocale) {
  4046. // vue2
  4047. appVm.$watchLocale(function (newLocale) {
  4048. i18n.setLocale(newLocale);
  4049. });
  4050. } else {
  4051. appVm.$watch(function () {
  4052. return appVm.$locale;
  4053. }, function (newLocale) {
  4054. i18n.setLocale(newLocale);
  4055. });
  4056. }
  4057. }
  4058. function getDefaultLocale() {
  4059. if (typeof uni !== 'undefined' && uni.getLocale) {
  4060. return uni.getLocale();
  4061. }
  4062. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  4063. if (typeof global !== 'undefined' && global.getLocale) {
  4064. return global.getLocale();
  4065. }
  4066. return LOCALE_EN;
  4067. }
  4068. function initVueI18n(locale) {
  4069. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4070. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  4071. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  4072. // 兼容旧版本入参
  4073. if (typeof locale !== 'string') {
  4074. var _ref4 = [messages, locale];
  4075. locale = _ref4[0];
  4076. messages = _ref4[1];
  4077. }
  4078. if (typeof locale !== 'string') {
  4079. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  4080. locale = getDefaultLocale();
  4081. }
  4082. if (typeof fallbackLocale !== 'string') {
  4083. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  4084. }
  4085. var i18n = new I18n({
  4086. locale: locale,
  4087. fallbackLocale: fallbackLocale,
  4088. messages: messages,
  4089. watcher: watcher
  4090. });
  4091. var _t = function t(key, values) {
  4092. if (typeof getApp !== 'function') {
  4093. // app view
  4094. /* eslint-disable no-func-assign */
  4095. _t = function t(key, values) {
  4096. return i18n.t(key, values);
  4097. };
  4098. } else {
  4099. var isWatchedAppLocale = false;
  4100. _t = function t(key, values) {
  4101. var appVm = getApp().$vm;
  4102. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4103. // options: {
  4104. // type: Array,
  4105. // default () {
  4106. // return [{
  4107. // icon: 'shop',
  4108. // text: t("uni-goods-nav.options.shop"),
  4109. // }, {
  4110. // icon: 'cart',
  4111. // text: t("uni-goods-nav.options.cart")
  4112. // }]
  4113. // }
  4114. // },
  4115. if (appVm) {
  4116. // 触发响应式
  4117. appVm.$locale;
  4118. if (!isWatchedAppLocale) {
  4119. isWatchedAppLocale = true;
  4120. watchAppLocale(appVm, i18n);
  4121. }
  4122. }
  4123. return i18n.t(key, values);
  4124. };
  4125. }
  4126. return _t(key, values);
  4127. };
  4128. return {
  4129. i18n: i18n,
  4130. f: function f(message, values, delimiters) {
  4131. return i18n.f(message, values, delimiters);
  4132. },
  4133. t: function t(key, values) {
  4134. return _t(key, values);
  4135. },
  4136. add: function add(locale, message) {
  4137. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4138. return i18n.add(locale, message, override);
  4139. },
  4140. watch: function watch(fn) {
  4141. return i18n.watchLocale(fn);
  4142. },
  4143. getLocale: function getLocale() {
  4144. return i18n.getLocale();
  4145. },
  4146. setLocale: function setLocale(newLocale) {
  4147. return i18n.setLocale(newLocale);
  4148. }
  4149. };
  4150. }
  4151. var isString = function isString(val) {
  4152. return typeof val === 'string';
  4153. };
  4154. exports.isString = isString;
  4155. var formater;
  4156. function hasI18nJson(jsonObj, delimiters) {
  4157. if (!formater) {
  4158. formater = new BaseFormatter();
  4159. }
  4160. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4161. var value = jsonObj[key];
  4162. if (isString(value)) {
  4163. if (isI18nStr(value, delimiters)) {
  4164. return true;
  4165. }
  4166. } else {
  4167. return hasI18nJson(value, delimiters);
  4168. }
  4169. });
  4170. }
  4171. function parseI18nJson(jsonObj, values, delimiters) {
  4172. if (!formater) {
  4173. formater = new BaseFormatter();
  4174. }
  4175. walkJsonObj(jsonObj, function (jsonObj, key) {
  4176. var value = jsonObj[key];
  4177. if (isString(value)) {
  4178. if (isI18nStr(value, delimiters)) {
  4179. jsonObj[key] = compileStr(value, values, delimiters);
  4180. }
  4181. } else {
  4182. parseI18nJson(value, values, delimiters);
  4183. }
  4184. });
  4185. return jsonObj;
  4186. }
  4187. function compileI18nJsonStr(jsonStr, _ref5) {
  4188. var locale = _ref5.locale,
  4189. locales = _ref5.locales,
  4190. delimiters = _ref5.delimiters;
  4191. if (!isI18nStr(jsonStr, delimiters)) {
  4192. return jsonStr;
  4193. }
  4194. if (!formater) {
  4195. formater = new BaseFormatter();
  4196. }
  4197. var localeValues = [];
  4198. Object.keys(locales).forEach(function (name) {
  4199. if (name !== locale) {
  4200. localeValues.push({
  4201. locale: name,
  4202. values: locales[name]
  4203. });
  4204. }
  4205. });
  4206. localeValues.unshift({
  4207. locale: locale,
  4208. values: locales[locale]
  4209. });
  4210. try {
  4211. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4212. } catch (e) {}
  4213. return jsonStr;
  4214. }
  4215. function isI18nStr(value, delimiters) {
  4216. return value.indexOf(delimiters[0]) > -1;
  4217. }
  4218. function compileStr(value, values, delimiters) {
  4219. return formater.interpolate(value, values, delimiters).join('');
  4220. }
  4221. function compileValue(jsonObj, key, localeValues, delimiters) {
  4222. var value = jsonObj[key];
  4223. if (isString(value)) {
  4224. // 存在国际化
  4225. if (isI18nStr(value, delimiters)) {
  4226. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4227. if (localeValues.length > 1) {
  4228. // 格式化国际化语言
  4229. var valueLocales = jsonObj[key + 'Locales'] = {};
  4230. localeValues.forEach(function (localValue) {
  4231. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4232. });
  4233. }
  4234. }
  4235. } else {
  4236. compileJsonObj(value, localeValues, delimiters);
  4237. }
  4238. }
  4239. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4240. walkJsonObj(jsonObj, function (jsonObj, key) {
  4241. compileValue(jsonObj, key, localeValues, delimiters);
  4242. });
  4243. return jsonObj;
  4244. }
  4245. function walkJsonObj(jsonObj, walk) {
  4246. if (Array.isArray(jsonObj)) {
  4247. for (var i = 0; i < jsonObj.length; i++) {
  4248. if (walk(jsonObj, i)) {
  4249. return true;
  4250. }
  4251. }
  4252. } else if (isObject(jsonObj)) {
  4253. for (var key in jsonObj) {
  4254. if (walk(jsonObj, key)) {
  4255. return true;
  4256. }
  4257. }
  4258. }
  4259. return false;
  4260. }
  4261. function resolveLocale(locales) {
  4262. return function (locale) {
  4263. if (!locale) {
  4264. return locale;
  4265. }
  4266. locale = normalizeLocale(locale) || locale;
  4267. return resolveLocaleChain(locale).find(function (locale) {
  4268. return locales.indexOf(locale) > -1;
  4269. });
  4270. };
  4271. }
  4272. function resolveLocaleChain(locale) {
  4273. var chain = [];
  4274. var tokens = locale.split('-');
  4275. while (tokens.length) {
  4276. chain.push(tokens.join('-'));
  4277. tokens.pop();
  4278. }
  4279. return chain;
  4280. }
  4281. /* 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)))
  4282. /***/ }),
  4283. /***/ 23:
  4284. /*!***************************************************************!*\
  4285. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4286. \***************************************************************/
  4287. /*! no static exports found */
  4288. /***/ (function(module, exports) {
  4289. function _classCallCheck(instance, Constructor) {
  4290. if (!(instance instanceof Constructor)) {
  4291. throw new TypeError("Cannot call a class as a function");
  4292. }
  4293. }
  4294. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4295. /***/ }),
  4296. /***/ 24:
  4297. /*!************************************************************!*\
  4298. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4299. \************************************************************/
  4300. /*! no static exports found */
  4301. /***/ (function(module, exports, __webpack_require__) {
  4302. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4303. function _defineProperties(target, props) {
  4304. for (var i = 0; i < props.length; i++) {
  4305. var descriptor = props[i];
  4306. descriptor.enumerable = descriptor.enumerable || false;
  4307. descriptor.configurable = true;
  4308. if ("value" in descriptor) descriptor.writable = true;
  4309. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4310. }
  4311. }
  4312. function _createClass(Constructor, protoProps, staticProps) {
  4313. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4314. if (staticProps) _defineProperties(Constructor, staticProps);
  4315. Object.defineProperty(Constructor, "prototype", {
  4316. writable: false
  4317. });
  4318. return Constructor;
  4319. }
  4320. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4321. /***/ }),
  4322. /***/ 25:
  4323. /*!******************************************************************************************!*\
  4324. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4325. \******************************************************************************************/
  4326. /*! exports provided: default */
  4327. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4328. "use strict";
  4329. __webpack_require__.r(__webpack_exports__);
  4330. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4331. * Vue.js v2.6.11
  4332. * (c) 2014-2023 Evan You
  4333. * Released under the MIT License.
  4334. */
  4335. /* */
  4336. var emptyObject = Object.freeze({});
  4337. // These helpers produce better VM code in JS engines due to their
  4338. // explicitness and function inlining.
  4339. function isUndef (v) {
  4340. return v === undefined || v === null
  4341. }
  4342. function isDef (v) {
  4343. return v !== undefined && v !== null
  4344. }
  4345. function isTrue (v) {
  4346. return v === true
  4347. }
  4348. function isFalse (v) {
  4349. return v === false
  4350. }
  4351. /**
  4352. * Check if value is primitive.
  4353. */
  4354. function isPrimitive (value) {
  4355. return (
  4356. typeof value === 'string' ||
  4357. typeof value === 'number' ||
  4358. // $flow-disable-line
  4359. typeof value === 'symbol' ||
  4360. typeof value === 'boolean'
  4361. )
  4362. }
  4363. /**
  4364. * Quick object check - this is primarily used to tell
  4365. * Objects from primitive values when we know the value
  4366. * is a JSON-compliant type.
  4367. */
  4368. function isObject (obj) {
  4369. return obj !== null && typeof obj === 'object'
  4370. }
  4371. /**
  4372. * Get the raw type string of a value, e.g., [object Object].
  4373. */
  4374. var _toString = Object.prototype.toString;
  4375. function toRawType (value) {
  4376. return _toString.call(value).slice(8, -1)
  4377. }
  4378. /**
  4379. * Strict object type check. Only returns true
  4380. * for plain JavaScript objects.
  4381. */
  4382. function isPlainObject (obj) {
  4383. return _toString.call(obj) === '[object Object]'
  4384. }
  4385. function isRegExp (v) {
  4386. return _toString.call(v) === '[object RegExp]'
  4387. }
  4388. /**
  4389. * Check if val is a valid array index.
  4390. */
  4391. function isValidArrayIndex (val) {
  4392. var n = parseFloat(String(val));
  4393. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4394. }
  4395. function isPromise (val) {
  4396. return (
  4397. isDef(val) &&
  4398. typeof val.then === 'function' &&
  4399. typeof val.catch === 'function'
  4400. )
  4401. }
  4402. /**
  4403. * Convert a value to a string that is actually rendered.
  4404. */
  4405. function toString (val) {
  4406. return val == null
  4407. ? ''
  4408. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4409. ? JSON.stringify(val, null, 2)
  4410. : String(val)
  4411. }
  4412. /**
  4413. * Convert an input value to a number for persistence.
  4414. * If the conversion fails, return original string.
  4415. */
  4416. function toNumber (val) {
  4417. var n = parseFloat(val);
  4418. return isNaN(n) ? val : n
  4419. }
  4420. /**
  4421. * Make a map and return a function for checking if a key
  4422. * is in that map.
  4423. */
  4424. function makeMap (
  4425. str,
  4426. expectsLowerCase
  4427. ) {
  4428. var map = Object.create(null);
  4429. var list = str.split(',');
  4430. for (var i = 0; i < list.length; i++) {
  4431. map[list[i]] = true;
  4432. }
  4433. return expectsLowerCase
  4434. ? function (val) { return map[val.toLowerCase()]; }
  4435. : function (val) { return map[val]; }
  4436. }
  4437. /**
  4438. * Check if a tag is a built-in tag.
  4439. */
  4440. var isBuiltInTag = makeMap('slot,component', true);
  4441. /**
  4442. * Check if an attribute is a reserved attribute.
  4443. */
  4444. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4445. /**
  4446. * Remove an item from an array.
  4447. */
  4448. function remove (arr, item) {
  4449. if (arr.length) {
  4450. var index = arr.indexOf(item);
  4451. if (index > -1) {
  4452. return arr.splice(index, 1)
  4453. }
  4454. }
  4455. }
  4456. /**
  4457. * Check whether an object has the property.
  4458. */
  4459. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4460. function hasOwn (obj, key) {
  4461. return hasOwnProperty.call(obj, key)
  4462. }
  4463. /**
  4464. * Create a cached version of a pure function.
  4465. */
  4466. function cached (fn) {
  4467. var cache = Object.create(null);
  4468. return (function cachedFn (str) {
  4469. var hit = cache[str];
  4470. return hit || (cache[str] = fn(str))
  4471. })
  4472. }
  4473. /**
  4474. * Camelize a hyphen-delimited string.
  4475. */
  4476. var camelizeRE = /-(\w)/g;
  4477. var camelize = cached(function (str) {
  4478. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4479. });
  4480. /**
  4481. * Capitalize a string.
  4482. */
  4483. var capitalize = cached(function (str) {
  4484. return str.charAt(0).toUpperCase() + str.slice(1)
  4485. });
  4486. /**
  4487. * Hyphenate a camelCase string.
  4488. */
  4489. var hyphenateRE = /\B([A-Z])/g;
  4490. var hyphenate = cached(function (str) {
  4491. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4492. });
  4493. /**
  4494. * Simple bind polyfill for environments that do not support it,
  4495. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4496. * since native bind is now performant enough in most browsers.
  4497. * But removing it would mean breaking code that was able to run in
  4498. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4499. */
  4500. /* istanbul ignore next */
  4501. function polyfillBind (fn, ctx) {
  4502. function boundFn (a) {
  4503. var l = arguments.length;
  4504. return l
  4505. ? l > 1
  4506. ? fn.apply(ctx, arguments)
  4507. : fn.call(ctx, a)
  4508. : fn.call(ctx)
  4509. }
  4510. boundFn._length = fn.length;
  4511. return boundFn
  4512. }
  4513. function nativeBind (fn, ctx) {
  4514. return fn.bind(ctx)
  4515. }
  4516. var bind = Function.prototype.bind
  4517. ? nativeBind
  4518. : polyfillBind;
  4519. /**
  4520. * Convert an Array-like object to a real Array.
  4521. */
  4522. function toArray (list, start) {
  4523. start = start || 0;
  4524. var i = list.length - start;
  4525. var ret = new Array(i);
  4526. while (i--) {
  4527. ret[i] = list[i + start];
  4528. }
  4529. return ret
  4530. }
  4531. /**
  4532. * Mix properties into target object.
  4533. */
  4534. function extend (to, _from) {
  4535. for (var key in _from) {
  4536. to[key] = _from[key];
  4537. }
  4538. return to
  4539. }
  4540. /**
  4541. * Merge an Array of Objects into a single Object.
  4542. */
  4543. function toObject (arr) {
  4544. var res = {};
  4545. for (var i = 0; i < arr.length; i++) {
  4546. if (arr[i]) {
  4547. extend(res, arr[i]);
  4548. }
  4549. }
  4550. return res
  4551. }
  4552. /* eslint-disable no-unused-vars */
  4553. /**
  4554. * Perform no operation.
  4555. * Stubbing args to make Flow happy without leaving useless transpiled code
  4556. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4557. */
  4558. function noop (a, b, c) {}
  4559. /**
  4560. * Always return false.
  4561. */
  4562. var no = function (a, b, c) { return false; };
  4563. /* eslint-enable no-unused-vars */
  4564. /**
  4565. * Return the same value.
  4566. */
  4567. var identity = function (_) { return _; };
  4568. /**
  4569. * Check if two values are loosely equal - that is,
  4570. * if they are plain objects, do they have the same shape?
  4571. */
  4572. function looseEqual (a, b) {
  4573. if (a === b) { return true }
  4574. var isObjectA = isObject(a);
  4575. var isObjectB = isObject(b);
  4576. if (isObjectA && isObjectB) {
  4577. try {
  4578. var isArrayA = Array.isArray(a);
  4579. var isArrayB = Array.isArray(b);
  4580. if (isArrayA && isArrayB) {
  4581. return a.length === b.length && a.every(function (e, i) {
  4582. return looseEqual(e, b[i])
  4583. })
  4584. } else if (a instanceof Date && b instanceof Date) {
  4585. return a.getTime() === b.getTime()
  4586. } else if (!isArrayA && !isArrayB) {
  4587. var keysA = Object.keys(a);
  4588. var keysB = Object.keys(b);
  4589. return keysA.length === keysB.length && keysA.every(function (key) {
  4590. return looseEqual(a[key], b[key])
  4591. })
  4592. } else {
  4593. /* istanbul ignore next */
  4594. return false
  4595. }
  4596. } catch (e) {
  4597. /* istanbul ignore next */
  4598. return false
  4599. }
  4600. } else if (!isObjectA && !isObjectB) {
  4601. return String(a) === String(b)
  4602. } else {
  4603. return false
  4604. }
  4605. }
  4606. /**
  4607. * Return the first index at which a loosely equal value can be
  4608. * found in the array (if value is a plain object, the array must
  4609. * contain an object of the same shape), or -1 if it is not present.
  4610. */
  4611. function looseIndexOf (arr, val) {
  4612. for (var i = 0; i < arr.length; i++) {
  4613. if (looseEqual(arr[i], val)) { return i }
  4614. }
  4615. return -1
  4616. }
  4617. /**
  4618. * Ensure a function is called only once.
  4619. */
  4620. function once (fn) {
  4621. var called = false;
  4622. return function () {
  4623. if (!called) {
  4624. called = true;
  4625. fn.apply(this, arguments);
  4626. }
  4627. }
  4628. }
  4629. var ASSET_TYPES = [
  4630. 'component',
  4631. 'directive',
  4632. 'filter'
  4633. ];
  4634. var LIFECYCLE_HOOKS = [
  4635. 'beforeCreate',
  4636. 'created',
  4637. 'beforeMount',
  4638. 'mounted',
  4639. 'beforeUpdate',
  4640. 'updated',
  4641. 'beforeDestroy',
  4642. 'destroyed',
  4643. 'activated',
  4644. 'deactivated',
  4645. 'errorCaptured',
  4646. 'serverPrefetch'
  4647. ];
  4648. /* */
  4649. var config = ({
  4650. /**
  4651. * Option merge strategies (used in core/util/options)
  4652. */
  4653. // $flow-disable-line
  4654. optionMergeStrategies: Object.create(null),
  4655. /**
  4656. * Whether to suppress warnings.
  4657. */
  4658. silent: false,
  4659. /**
  4660. * Show production mode tip message on boot?
  4661. */
  4662. productionTip: "development" !== 'production',
  4663. /**
  4664. * Whether to enable devtools
  4665. */
  4666. devtools: "development" !== 'production',
  4667. /**
  4668. * Whether to record perf
  4669. */
  4670. performance: false,
  4671. /**
  4672. * Error handler for watcher errors
  4673. */
  4674. errorHandler: null,
  4675. /**
  4676. * Warn handler for watcher warns
  4677. */
  4678. warnHandler: null,
  4679. /**
  4680. * Ignore certain custom elements
  4681. */
  4682. ignoredElements: [],
  4683. /**
  4684. * Custom user key aliases for v-on
  4685. */
  4686. // $flow-disable-line
  4687. keyCodes: Object.create(null),
  4688. /**
  4689. * Check if a tag is reserved so that it cannot be registered as a
  4690. * component. This is platform-dependent and may be overwritten.
  4691. */
  4692. isReservedTag: no,
  4693. /**
  4694. * Check if an attribute is reserved so that it cannot be used as a component
  4695. * prop. This is platform-dependent and may be overwritten.
  4696. */
  4697. isReservedAttr: no,
  4698. /**
  4699. * Check if a tag is an unknown element.
  4700. * Platform-dependent.
  4701. */
  4702. isUnknownElement: no,
  4703. /**
  4704. * Get the namespace of an element
  4705. */
  4706. getTagNamespace: noop,
  4707. /**
  4708. * Parse the real tag name for the specific platform.
  4709. */
  4710. parsePlatformTagName: identity,
  4711. /**
  4712. * Check if an attribute must be bound using property, e.g. value
  4713. * Platform-dependent.
  4714. */
  4715. mustUseProp: no,
  4716. /**
  4717. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4718. * This will significantly reduce performance if set to false.
  4719. */
  4720. async: true,
  4721. /**
  4722. * Exposed for legacy reasons
  4723. */
  4724. _lifecycleHooks: LIFECYCLE_HOOKS
  4725. });
  4726. /* */
  4727. /**
  4728. * unicode letters used for parsing html tags, component names and property paths.
  4729. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4730. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4731. */
  4732. 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/;
  4733. /**
  4734. * Check if a string starts with $ or _
  4735. */
  4736. function isReserved (str) {
  4737. var c = (str + '').charCodeAt(0);
  4738. return c === 0x24 || c === 0x5F
  4739. }
  4740. /**
  4741. * Define a property.
  4742. */
  4743. function def (obj, key, val, enumerable) {
  4744. Object.defineProperty(obj, key, {
  4745. value: val,
  4746. enumerable: !!enumerable,
  4747. writable: true,
  4748. configurable: true
  4749. });
  4750. }
  4751. /**
  4752. * Parse simple path.
  4753. */
  4754. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4755. function parsePath (path) {
  4756. if (bailRE.test(path)) {
  4757. return
  4758. }
  4759. var segments = path.split('.');
  4760. return function (obj) {
  4761. for (var i = 0; i < segments.length; i++) {
  4762. if (!obj) { return }
  4763. obj = obj[segments[i]];
  4764. }
  4765. return obj
  4766. }
  4767. }
  4768. /* */
  4769. // can we use __proto__?
  4770. var hasProto = '__proto__' in {};
  4771. // Browser environment sniffing
  4772. var inBrowser = typeof window !== 'undefined';
  4773. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4774. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4775. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4776. var isIE = UA && /msie|trident/.test(UA);
  4777. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4778. var isEdge = UA && UA.indexOf('edge/') > 0;
  4779. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4780. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4781. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4782. var isPhantomJS = UA && /phantomjs/.test(UA);
  4783. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4784. // Firefox has a "watch" function on Object.prototype...
  4785. var nativeWatch = ({}).watch;
  4786. if (inBrowser) {
  4787. try {
  4788. var opts = {};
  4789. Object.defineProperty(opts, 'passive', ({
  4790. get: function get () {
  4791. }
  4792. })); // https://github.com/facebook/flow/issues/285
  4793. window.addEventListener('test-passive', null, opts);
  4794. } catch (e) {}
  4795. }
  4796. // this needs to be lazy-evaled because vue may be required before
  4797. // vue-server-renderer can set VUE_ENV
  4798. var _isServer;
  4799. var isServerRendering = function () {
  4800. if (_isServer === undefined) {
  4801. /* istanbul ignore if */
  4802. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4803. // detect presence of vue-server-renderer and avoid
  4804. // Webpack shimming the process
  4805. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4806. } else {
  4807. _isServer = false;
  4808. }
  4809. }
  4810. return _isServer
  4811. };
  4812. // detect devtools
  4813. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4814. /* istanbul ignore next */
  4815. function isNative (Ctor) {
  4816. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4817. }
  4818. var hasSymbol =
  4819. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4820. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4821. var _Set;
  4822. /* istanbul ignore if */ // $flow-disable-line
  4823. if (typeof Set !== 'undefined' && isNative(Set)) {
  4824. // use native Set when available.
  4825. _Set = Set;
  4826. } else {
  4827. // a non-standard Set polyfill that only works with primitive keys.
  4828. _Set = /*@__PURE__*/(function () {
  4829. function Set () {
  4830. this.set = Object.create(null);
  4831. }
  4832. Set.prototype.has = function has (key) {
  4833. return this.set[key] === true
  4834. };
  4835. Set.prototype.add = function add (key) {
  4836. this.set[key] = true;
  4837. };
  4838. Set.prototype.clear = function clear () {
  4839. this.set = Object.create(null);
  4840. };
  4841. return Set;
  4842. }());
  4843. }
  4844. /* */
  4845. var warn = noop;
  4846. var tip = noop;
  4847. var generateComponentTrace = (noop); // work around flow check
  4848. var formatComponentName = (noop);
  4849. if (true) {
  4850. var hasConsole = typeof console !== 'undefined';
  4851. var classifyRE = /(?:^|[-_])(\w)/g;
  4852. var classify = function (str) { return str
  4853. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4854. .replace(/[-_]/g, ''); };
  4855. warn = function (msg, vm) {
  4856. var trace = vm ? generateComponentTrace(vm) : '';
  4857. if (config.warnHandler) {
  4858. config.warnHandler.call(null, msg, vm, trace);
  4859. } else if (hasConsole && (!config.silent)) {
  4860. console.error(("[Vue warn]: " + msg + trace));
  4861. }
  4862. };
  4863. tip = function (msg, vm) {
  4864. if (hasConsole && (!config.silent)) {
  4865. console.warn("[Vue tip]: " + msg + (
  4866. vm ? generateComponentTrace(vm) : ''
  4867. ));
  4868. }
  4869. };
  4870. formatComponentName = function (vm, includeFile) {
  4871. if (vm.$root === vm) {
  4872. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4873. return ('') + vm.$options.__file
  4874. }
  4875. return '<Root>'
  4876. }
  4877. var options = typeof vm === 'function' && vm.cid != null
  4878. ? vm.options
  4879. : vm._isVue
  4880. ? vm.$options || vm.constructor.options
  4881. : vm;
  4882. var name = options.name || options._componentTag;
  4883. var file = options.__file;
  4884. if (!name && file) {
  4885. var match = file.match(/([^/\\]+)\.vue$/);
  4886. name = match && match[1];
  4887. }
  4888. return (
  4889. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4890. (file && includeFile !== false ? (" at " + file) : '')
  4891. )
  4892. };
  4893. var repeat = function (str, n) {
  4894. var res = '';
  4895. while (n) {
  4896. if (n % 2 === 1) { res += str; }
  4897. if (n > 1) { str += str; }
  4898. n >>= 1;
  4899. }
  4900. return res
  4901. };
  4902. generateComponentTrace = function (vm) {
  4903. if (vm._isVue && vm.$parent) {
  4904. var tree = [];
  4905. var currentRecursiveSequence = 0;
  4906. while (vm && vm.$options.name !== 'PageBody') {
  4907. if (tree.length > 0) {
  4908. var last = tree[tree.length - 1];
  4909. if (last.constructor === vm.constructor) {
  4910. currentRecursiveSequence++;
  4911. vm = vm.$parent;
  4912. continue
  4913. } else if (currentRecursiveSequence > 0) {
  4914. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4915. currentRecursiveSequence = 0;
  4916. }
  4917. }
  4918. !vm.$options.isReserved && tree.push(vm);
  4919. vm = vm.$parent;
  4920. }
  4921. return '\n\nfound in\n\n' + tree
  4922. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4923. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4924. : formatComponentName(vm))); })
  4925. .join('\n')
  4926. } else {
  4927. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4928. }
  4929. };
  4930. }
  4931. /* */
  4932. var uid = 0;
  4933. /**
  4934. * A dep is an observable that can have multiple
  4935. * directives subscribing to it.
  4936. */
  4937. var Dep = function Dep () {
  4938. this.id = uid++;
  4939. this.subs = [];
  4940. };
  4941. Dep.prototype.addSub = function addSub (sub) {
  4942. this.subs.push(sub);
  4943. };
  4944. Dep.prototype.removeSub = function removeSub (sub) {
  4945. remove(this.subs, sub);
  4946. };
  4947. Dep.prototype.depend = function depend () {
  4948. if (Dep.SharedObject.target) {
  4949. Dep.SharedObject.target.addDep(this);
  4950. }
  4951. };
  4952. Dep.prototype.notify = function notify () {
  4953. // stabilize the subscriber list first
  4954. var subs = this.subs.slice();
  4955. if ( true && !config.async) {
  4956. // subs aren't sorted in scheduler if not running async
  4957. // we need to sort them now to make sure they fire in correct
  4958. // order
  4959. subs.sort(function (a, b) { return a.id - b.id; });
  4960. }
  4961. for (var i = 0, l = subs.length; i < l; i++) {
  4962. subs[i].update();
  4963. }
  4964. };
  4965. // The current target watcher being evaluated.
  4966. // This is globally unique because only one watcher
  4967. // can be evaluated at a time.
  4968. // fixed by xxxxxx (nvue shared vuex)
  4969. /* eslint-disable no-undef */
  4970. Dep.SharedObject = {};
  4971. Dep.SharedObject.target = null;
  4972. Dep.SharedObject.targetStack = [];
  4973. function pushTarget (target) {
  4974. Dep.SharedObject.targetStack.push(target);
  4975. Dep.SharedObject.target = target;
  4976. Dep.target = target;
  4977. }
  4978. function popTarget () {
  4979. Dep.SharedObject.targetStack.pop();
  4980. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4981. Dep.target = Dep.SharedObject.target;
  4982. }
  4983. /* */
  4984. var VNode = function VNode (
  4985. tag,
  4986. data,
  4987. children,
  4988. text,
  4989. elm,
  4990. context,
  4991. componentOptions,
  4992. asyncFactory
  4993. ) {
  4994. this.tag = tag;
  4995. this.data = data;
  4996. this.children = children;
  4997. this.text = text;
  4998. this.elm = elm;
  4999. this.ns = undefined;
  5000. this.context = context;
  5001. this.fnContext = undefined;
  5002. this.fnOptions = undefined;
  5003. this.fnScopeId = undefined;
  5004. this.key = data && data.key;
  5005. this.componentOptions = componentOptions;
  5006. this.componentInstance = undefined;
  5007. this.parent = undefined;
  5008. this.raw = false;
  5009. this.isStatic = false;
  5010. this.isRootInsert = true;
  5011. this.isComment = false;
  5012. this.isCloned = false;
  5013. this.isOnce = false;
  5014. this.asyncFactory = asyncFactory;
  5015. this.asyncMeta = undefined;
  5016. this.isAsyncPlaceholder = false;
  5017. };
  5018. var prototypeAccessors = { child: { configurable: true } };
  5019. // DEPRECATED: alias for componentInstance for backwards compat.
  5020. /* istanbul ignore next */
  5021. prototypeAccessors.child.get = function () {
  5022. return this.componentInstance
  5023. };
  5024. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5025. var createEmptyVNode = function (text) {
  5026. if ( text === void 0 ) text = '';
  5027. var node = new VNode();
  5028. node.text = text;
  5029. node.isComment = true;
  5030. return node
  5031. };
  5032. function createTextVNode (val) {
  5033. return new VNode(undefined, undefined, undefined, String(val))
  5034. }
  5035. // optimized shallow clone
  5036. // used for static nodes and slot nodes because they may be reused across
  5037. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5038. // on their elm reference.
  5039. function cloneVNode (vnode) {
  5040. var cloned = new VNode(
  5041. vnode.tag,
  5042. vnode.data,
  5043. // #7975
  5044. // clone children array to avoid mutating original in case of cloning
  5045. // a child.
  5046. vnode.children && vnode.children.slice(),
  5047. vnode.text,
  5048. vnode.elm,
  5049. vnode.context,
  5050. vnode.componentOptions,
  5051. vnode.asyncFactory
  5052. );
  5053. cloned.ns = vnode.ns;
  5054. cloned.isStatic = vnode.isStatic;
  5055. cloned.key = vnode.key;
  5056. cloned.isComment = vnode.isComment;
  5057. cloned.fnContext = vnode.fnContext;
  5058. cloned.fnOptions = vnode.fnOptions;
  5059. cloned.fnScopeId = vnode.fnScopeId;
  5060. cloned.asyncMeta = vnode.asyncMeta;
  5061. cloned.isCloned = true;
  5062. return cloned
  5063. }
  5064. /*
  5065. * not type checking this file because flow doesn't play well with
  5066. * dynamically accessing methods on Array prototype
  5067. */
  5068. var arrayProto = Array.prototype;
  5069. var arrayMethods = Object.create(arrayProto);
  5070. var methodsToPatch = [
  5071. 'push',
  5072. 'pop',
  5073. 'shift',
  5074. 'unshift',
  5075. 'splice',
  5076. 'sort',
  5077. 'reverse'
  5078. ];
  5079. /**
  5080. * Intercept mutating methods and emit events
  5081. */
  5082. methodsToPatch.forEach(function (method) {
  5083. // cache original method
  5084. var original = arrayProto[method];
  5085. def(arrayMethods, method, function mutator () {
  5086. var args = [], len = arguments.length;
  5087. while ( len-- ) args[ len ] = arguments[ len ];
  5088. var result = original.apply(this, args);
  5089. var ob = this.__ob__;
  5090. var inserted;
  5091. switch (method) {
  5092. case 'push':
  5093. case 'unshift':
  5094. inserted = args;
  5095. break
  5096. case 'splice':
  5097. inserted = args.slice(2);
  5098. break
  5099. }
  5100. if (inserted) { ob.observeArray(inserted); }
  5101. // notify change
  5102. ob.dep.notify();
  5103. return result
  5104. });
  5105. });
  5106. /* */
  5107. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5108. /**
  5109. * In some cases we may want to disable observation inside a component's
  5110. * update computation.
  5111. */
  5112. var shouldObserve = true;
  5113. function toggleObserving (value) {
  5114. shouldObserve = value;
  5115. }
  5116. /**
  5117. * Observer class that is attached to each observed
  5118. * object. Once attached, the observer converts the target
  5119. * object's property keys into getter/setters that
  5120. * collect dependencies and dispatch updates.
  5121. */
  5122. var Observer = function Observer (value) {
  5123. this.value = value;
  5124. this.dep = new Dep();
  5125. this.vmCount = 0;
  5126. def(value, '__ob__', this);
  5127. if (Array.isArray(value)) {
  5128. if (hasProto) {
  5129. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5130. if(value.push !== value.__proto__.push){
  5131. copyAugment(value, arrayMethods, arrayKeys);
  5132. } else {
  5133. protoAugment(value, arrayMethods);
  5134. }
  5135. }
  5136. } else {
  5137. copyAugment(value, arrayMethods, arrayKeys);
  5138. }
  5139. this.observeArray(value);
  5140. } else {
  5141. this.walk(value);
  5142. }
  5143. };
  5144. /**
  5145. * Walk through all properties and convert them into
  5146. * getter/setters. This method should only be called when
  5147. * value type is Object.
  5148. */
  5149. Observer.prototype.walk = function walk (obj) {
  5150. var keys = Object.keys(obj);
  5151. for (var i = 0; i < keys.length; i++) {
  5152. defineReactive$$1(obj, keys[i]);
  5153. }
  5154. };
  5155. /**
  5156. * Observe a list of Array items.
  5157. */
  5158. Observer.prototype.observeArray = function observeArray (items) {
  5159. for (var i = 0, l = items.length; i < l; i++) {
  5160. observe(items[i]);
  5161. }
  5162. };
  5163. // helpers
  5164. /**
  5165. * Augment a target Object or Array by intercepting
  5166. * the prototype chain using __proto__
  5167. */
  5168. function protoAugment (target, src) {
  5169. /* eslint-disable no-proto */
  5170. target.__proto__ = src;
  5171. /* eslint-enable no-proto */
  5172. }
  5173. /**
  5174. * Augment a target Object or Array by defining
  5175. * hidden properties.
  5176. */
  5177. /* istanbul ignore next */
  5178. function copyAugment (target, src, keys) {
  5179. for (var i = 0, l = keys.length; i < l; i++) {
  5180. var key = keys[i];
  5181. def(target, key, src[key]);
  5182. }
  5183. }
  5184. /**
  5185. * Attempt to create an observer instance for a value,
  5186. * returns the new observer if successfully observed,
  5187. * or the existing observer if the value already has one.
  5188. */
  5189. function observe (value, asRootData) {
  5190. if (!isObject(value) || value instanceof VNode) {
  5191. return
  5192. }
  5193. var ob;
  5194. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5195. ob = value.__ob__;
  5196. } else if (
  5197. shouldObserve &&
  5198. !isServerRendering() &&
  5199. (Array.isArray(value) || isPlainObject(value)) &&
  5200. Object.isExtensible(value) &&
  5201. !value._isVue &&
  5202. !value.__v_isMPComponent
  5203. ) {
  5204. ob = new Observer(value);
  5205. }
  5206. if (asRootData && ob) {
  5207. ob.vmCount++;
  5208. }
  5209. return ob
  5210. }
  5211. /**
  5212. * Define a reactive property on an Object.
  5213. */
  5214. function defineReactive$$1 (
  5215. obj,
  5216. key,
  5217. val,
  5218. customSetter,
  5219. shallow
  5220. ) {
  5221. var dep = new Dep();
  5222. var property = Object.getOwnPropertyDescriptor(obj, key);
  5223. if (property && property.configurable === false) {
  5224. return
  5225. }
  5226. // cater for pre-defined getter/setters
  5227. var getter = property && property.get;
  5228. var setter = property && property.set;
  5229. if ((!getter || setter) && arguments.length === 2) {
  5230. val = obj[key];
  5231. }
  5232. var childOb = !shallow && observe(val);
  5233. Object.defineProperty(obj, key, {
  5234. enumerable: true,
  5235. configurable: true,
  5236. get: function reactiveGetter () {
  5237. var value = getter ? getter.call(obj) : val;
  5238. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5239. dep.depend();
  5240. if (childOb) {
  5241. childOb.dep.depend();
  5242. if (Array.isArray(value)) {
  5243. dependArray(value);
  5244. }
  5245. }
  5246. }
  5247. return value
  5248. },
  5249. set: function reactiveSetter (newVal) {
  5250. var value = getter ? getter.call(obj) : val;
  5251. /* eslint-disable no-self-compare */
  5252. if (newVal === value || (newVal !== newVal && value !== value)) {
  5253. return
  5254. }
  5255. /* eslint-enable no-self-compare */
  5256. if ( true && customSetter) {
  5257. customSetter();
  5258. }
  5259. // #7981: for accessor properties without setter
  5260. if (getter && !setter) { return }
  5261. if (setter) {
  5262. setter.call(obj, newVal);
  5263. } else {
  5264. val = newVal;
  5265. }
  5266. childOb = !shallow && observe(newVal);
  5267. dep.notify();
  5268. }
  5269. });
  5270. }
  5271. /**
  5272. * Set a property on an object. Adds the new property and
  5273. * triggers change notification if the property doesn't
  5274. * already exist.
  5275. */
  5276. function set (target, key, val) {
  5277. if ( true &&
  5278. (isUndef(target) || isPrimitive(target))
  5279. ) {
  5280. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5281. }
  5282. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5283. target.length = Math.max(target.length, key);
  5284. target.splice(key, 1, val);
  5285. return val
  5286. }
  5287. if (key in target && !(key in Object.prototype)) {
  5288. target[key] = val;
  5289. return val
  5290. }
  5291. var ob = (target).__ob__;
  5292. if (target._isVue || (ob && ob.vmCount)) {
  5293. true && warn(
  5294. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5295. 'at runtime - declare it upfront in the data option.'
  5296. );
  5297. return val
  5298. }
  5299. if (!ob) {
  5300. target[key] = val;
  5301. return val
  5302. }
  5303. defineReactive$$1(ob.value, key, val);
  5304. ob.dep.notify();
  5305. return val
  5306. }
  5307. /**
  5308. * Delete a property and trigger change if necessary.
  5309. */
  5310. function del (target, key) {
  5311. if ( true &&
  5312. (isUndef(target) || isPrimitive(target))
  5313. ) {
  5314. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5315. }
  5316. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5317. target.splice(key, 1);
  5318. return
  5319. }
  5320. var ob = (target).__ob__;
  5321. if (target._isVue || (ob && ob.vmCount)) {
  5322. true && warn(
  5323. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5324. '- just set it to null.'
  5325. );
  5326. return
  5327. }
  5328. if (!hasOwn(target, key)) {
  5329. return
  5330. }
  5331. delete target[key];
  5332. if (!ob) {
  5333. return
  5334. }
  5335. ob.dep.notify();
  5336. }
  5337. /**
  5338. * Collect dependencies on array elements when the array is touched, since
  5339. * we cannot intercept array element access like property getters.
  5340. */
  5341. function dependArray (value) {
  5342. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5343. e = value[i];
  5344. e && e.__ob__ && e.__ob__.dep.depend();
  5345. if (Array.isArray(e)) {
  5346. dependArray(e);
  5347. }
  5348. }
  5349. }
  5350. /* */
  5351. /**
  5352. * Option overwriting strategies are functions that handle
  5353. * how to merge a parent option value and a child option
  5354. * value into the final value.
  5355. */
  5356. var strats = config.optionMergeStrategies;
  5357. /**
  5358. * Options with restrictions
  5359. */
  5360. if (true) {
  5361. strats.el = strats.propsData = function (parent, child, vm, key) {
  5362. if (!vm) {
  5363. warn(
  5364. "option \"" + key + "\" can only be used during instance " +
  5365. 'creation with the `new` keyword.'
  5366. );
  5367. }
  5368. return defaultStrat(parent, child)
  5369. };
  5370. }
  5371. /**
  5372. * Helper that recursively merges two data objects together.
  5373. */
  5374. function mergeData (to, from) {
  5375. if (!from) { return to }
  5376. var key, toVal, fromVal;
  5377. var keys = hasSymbol
  5378. ? Reflect.ownKeys(from)
  5379. : Object.keys(from);
  5380. for (var i = 0; i < keys.length; i++) {
  5381. key = keys[i];
  5382. // in case the object is already observed...
  5383. if (key === '__ob__') { continue }
  5384. toVal = to[key];
  5385. fromVal = from[key];
  5386. if (!hasOwn(to, key)) {
  5387. set(to, key, fromVal);
  5388. } else if (
  5389. toVal !== fromVal &&
  5390. isPlainObject(toVal) &&
  5391. isPlainObject(fromVal)
  5392. ) {
  5393. mergeData(toVal, fromVal);
  5394. }
  5395. }
  5396. return to
  5397. }
  5398. /**
  5399. * Data
  5400. */
  5401. function mergeDataOrFn (
  5402. parentVal,
  5403. childVal,
  5404. vm
  5405. ) {
  5406. if (!vm) {
  5407. // in a Vue.extend merge, both should be functions
  5408. if (!childVal) {
  5409. return parentVal
  5410. }
  5411. if (!parentVal) {
  5412. return childVal
  5413. }
  5414. // when parentVal & childVal are both present,
  5415. // we need to return a function that returns the
  5416. // merged result of both functions... no need to
  5417. // check if parentVal is a function here because
  5418. // it has to be a function to pass previous merges.
  5419. return function mergedDataFn () {
  5420. return mergeData(
  5421. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5422. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5423. )
  5424. }
  5425. } else {
  5426. return function mergedInstanceDataFn () {
  5427. // instance merge
  5428. var instanceData = typeof childVal === 'function'
  5429. ? childVal.call(vm, vm)
  5430. : childVal;
  5431. var defaultData = typeof parentVal === 'function'
  5432. ? parentVal.call(vm, vm)
  5433. : parentVal;
  5434. if (instanceData) {
  5435. return mergeData(instanceData, defaultData)
  5436. } else {
  5437. return defaultData
  5438. }
  5439. }
  5440. }
  5441. }
  5442. strats.data = function (
  5443. parentVal,
  5444. childVal,
  5445. vm
  5446. ) {
  5447. if (!vm) {
  5448. if (childVal && typeof childVal !== 'function') {
  5449. true && warn(
  5450. 'The "data" option should be a function ' +
  5451. 'that returns a per-instance value in component ' +
  5452. 'definitions.',
  5453. vm
  5454. );
  5455. return parentVal
  5456. }
  5457. return mergeDataOrFn(parentVal, childVal)
  5458. }
  5459. return mergeDataOrFn(parentVal, childVal, vm)
  5460. };
  5461. /**
  5462. * Hooks and props are merged as arrays.
  5463. */
  5464. function mergeHook (
  5465. parentVal,
  5466. childVal
  5467. ) {
  5468. var res = childVal
  5469. ? parentVal
  5470. ? parentVal.concat(childVal)
  5471. : Array.isArray(childVal)
  5472. ? childVal
  5473. : [childVal]
  5474. : parentVal;
  5475. return res
  5476. ? dedupeHooks(res)
  5477. : res
  5478. }
  5479. function dedupeHooks (hooks) {
  5480. var res = [];
  5481. for (var i = 0; i < hooks.length; i++) {
  5482. if (res.indexOf(hooks[i]) === -1) {
  5483. res.push(hooks[i]);
  5484. }
  5485. }
  5486. return res
  5487. }
  5488. LIFECYCLE_HOOKS.forEach(function (hook) {
  5489. strats[hook] = mergeHook;
  5490. });
  5491. /**
  5492. * Assets
  5493. *
  5494. * When a vm is present (instance creation), we need to do
  5495. * a three-way merge between constructor options, instance
  5496. * options and parent options.
  5497. */
  5498. function mergeAssets (
  5499. parentVal,
  5500. childVal,
  5501. vm,
  5502. key
  5503. ) {
  5504. var res = Object.create(parentVal || null);
  5505. if (childVal) {
  5506. true && assertObjectType(key, childVal, vm);
  5507. return extend(res, childVal)
  5508. } else {
  5509. return res
  5510. }
  5511. }
  5512. ASSET_TYPES.forEach(function (type) {
  5513. strats[type + 's'] = mergeAssets;
  5514. });
  5515. /**
  5516. * Watchers.
  5517. *
  5518. * Watchers hashes should not overwrite one
  5519. * another, so we merge them as arrays.
  5520. */
  5521. strats.watch = function (
  5522. parentVal,
  5523. childVal,
  5524. vm,
  5525. key
  5526. ) {
  5527. // work around Firefox's Object.prototype.watch...
  5528. if (parentVal === nativeWatch) { parentVal = undefined; }
  5529. if (childVal === nativeWatch) { childVal = undefined; }
  5530. /* istanbul ignore if */
  5531. if (!childVal) { return Object.create(parentVal || null) }
  5532. if (true) {
  5533. assertObjectType(key, childVal, vm);
  5534. }
  5535. if (!parentVal) { return childVal }
  5536. var ret = {};
  5537. extend(ret, parentVal);
  5538. for (var key$1 in childVal) {
  5539. var parent = ret[key$1];
  5540. var child = childVal[key$1];
  5541. if (parent && !Array.isArray(parent)) {
  5542. parent = [parent];
  5543. }
  5544. ret[key$1] = parent
  5545. ? parent.concat(child)
  5546. : Array.isArray(child) ? child : [child];
  5547. }
  5548. return ret
  5549. };
  5550. /**
  5551. * Other object hashes.
  5552. */
  5553. strats.props =
  5554. strats.methods =
  5555. strats.inject =
  5556. strats.computed = function (
  5557. parentVal,
  5558. childVal,
  5559. vm,
  5560. key
  5561. ) {
  5562. if (childVal && "development" !== 'production') {
  5563. assertObjectType(key, childVal, vm);
  5564. }
  5565. if (!parentVal) { return childVal }
  5566. var ret = Object.create(null);
  5567. extend(ret, parentVal);
  5568. if (childVal) { extend(ret, childVal); }
  5569. return ret
  5570. };
  5571. strats.provide = mergeDataOrFn;
  5572. /**
  5573. * Default strategy.
  5574. */
  5575. var defaultStrat = function (parentVal, childVal) {
  5576. return childVal === undefined
  5577. ? parentVal
  5578. : childVal
  5579. };
  5580. /**
  5581. * Validate component names
  5582. */
  5583. function checkComponents (options) {
  5584. for (var key in options.components) {
  5585. validateComponentName(key);
  5586. }
  5587. }
  5588. function validateComponentName (name) {
  5589. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5590. warn(
  5591. 'Invalid component name: "' + name + '". Component names ' +
  5592. 'should conform to valid custom element name in html5 specification.'
  5593. );
  5594. }
  5595. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5596. warn(
  5597. 'Do not use built-in or reserved HTML elements as component ' +
  5598. 'id: ' + name
  5599. );
  5600. }
  5601. }
  5602. /**
  5603. * Ensure all props option syntax are normalized into the
  5604. * Object-based format.
  5605. */
  5606. function normalizeProps (options, vm) {
  5607. var props = options.props;
  5608. if (!props) { return }
  5609. var res = {};
  5610. var i, val, name;
  5611. if (Array.isArray(props)) {
  5612. i = props.length;
  5613. while (i--) {
  5614. val = props[i];
  5615. if (typeof val === 'string') {
  5616. name = camelize(val);
  5617. res[name] = { type: null };
  5618. } else if (true) {
  5619. warn('props must be strings when using array syntax.');
  5620. }
  5621. }
  5622. } else if (isPlainObject(props)) {
  5623. for (var key in props) {
  5624. val = props[key];
  5625. name = camelize(key);
  5626. res[name] = isPlainObject(val)
  5627. ? val
  5628. : { type: val };
  5629. }
  5630. } else if (true) {
  5631. warn(
  5632. "Invalid value for option \"props\": expected an Array or an Object, " +
  5633. "but got " + (toRawType(props)) + ".",
  5634. vm
  5635. );
  5636. }
  5637. options.props = res;
  5638. }
  5639. /**
  5640. * Normalize all injections into Object-based format
  5641. */
  5642. function normalizeInject (options, vm) {
  5643. var inject = options.inject;
  5644. if (!inject) { return }
  5645. var normalized = options.inject = {};
  5646. if (Array.isArray(inject)) {
  5647. for (var i = 0; i < inject.length; i++) {
  5648. normalized[inject[i]] = { from: inject[i] };
  5649. }
  5650. } else if (isPlainObject(inject)) {
  5651. for (var key in inject) {
  5652. var val = inject[key];
  5653. normalized[key] = isPlainObject(val)
  5654. ? extend({ from: key }, val)
  5655. : { from: val };
  5656. }
  5657. } else if (true) {
  5658. warn(
  5659. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5660. "but got " + (toRawType(inject)) + ".",
  5661. vm
  5662. );
  5663. }
  5664. }
  5665. /**
  5666. * Normalize raw function directives into object format.
  5667. */
  5668. function normalizeDirectives (options) {
  5669. var dirs = options.directives;
  5670. if (dirs) {
  5671. for (var key in dirs) {
  5672. var def$$1 = dirs[key];
  5673. if (typeof def$$1 === 'function') {
  5674. dirs[key] = { bind: def$$1, update: def$$1 };
  5675. }
  5676. }
  5677. }
  5678. }
  5679. function assertObjectType (name, value, vm) {
  5680. if (!isPlainObject(value)) {
  5681. warn(
  5682. "Invalid value for option \"" + name + "\": expected an Object, " +
  5683. "but got " + (toRawType(value)) + ".",
  5684. vm
  5685. );
  5686. }
  5687. }
  5688. /**
  5689. * Merge two option objects into a new one.
  5690. * Core utility used in both instantiation and inheritance.
  5691. */
  5692. function mergeOptions (
  5693. parent,
  5694. child,
  5695. vm
  5696. ) {
  5697. if (true) {
  5698. checkComponents(child);
  5699. }
  5700. if (typeof child === 'function') {
  5701. child = child.options;
  5702. }
  5703. normalizeProps(child, vm);
  5704. normalizeInject(child, vm);
  5705. normalizeDirectives(child);
  5706. // Apply extends and mixins on the child options,
  5707. // but only if it is a raw options object that isn't
  5708. // the result of another mergeOptions call.
  5709. // Only merged options has the _base property.
  5710. if (!child._base) {
  5711. if (child.extends) {
  5712. parent = mergeOptions(parent, child.extends, vm);
  5713. }
  5714. if (child.mixins) {
  5715. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5716. parent = mergeOptions(parent, child.mixins[i], vm);
  5717. }
  5718. }
  5719. }
  5720. var options = {};
  5721. var key;
  5722. for (key in parent) {
  5723. mergeField(key);
  5724. }
  5725. for (key in child) {
  5726. if (!hasOwn(parent, key)) {
  5727. mergeField(key);
  5728. }
  5729. }
  5730. function mergeField (key) {
  5731. var strat = strats[key] || defaultStrat;
  5732. options[key] = strat(parent[key], child[key], vm, key);
  5733. }
  5734. return options
  5735. }
  5736. /**
  5737. * Resolve an asset.
  5738. * This function is used because child instances need access
  5739. * to assets defined in its ancestor chain.
  5740. */
  5741. function resolveAsset (
  5742. options,
  5743. type,
  5744. id,
  5745. warnMissing
  5746. ) {
  5747. /* istanbul ignore if */
  5748. if (typeof id !== 'string') {
  5749. return
  5750. }
  5751. var assets = options[type];
  5752. // check local registration variations first
  5753. if (hasOwn(assets, id)) { return assets[id] }
  5754. var camelizedId = camelize(id);
  5755. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5756. var PascalCaseId = capitalize(camelizedId);
  5757. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5758. // fallback to prototype chain
  5759. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5760. if ( true && warnMissing && !res) {
  5761. warn(
  5762. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5763. options
  5764. );
  5765. }
  5766. return res
  5767. }
  5768. /* */
  5769. function validateProp (
  5770. key,
  5771. propOptions,
  5772. propsData,
  5773. vm
  5774. ) {
  5775. var prop = propOptions[key];
  5776. var absent = !hasOwn(propsData, key);
  5777. var value = propsData[key];
  5778. // boolean casting
  5779. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5780. if (booleanIndex > -1) {
  5781. if (absent && !hasOwn(prop, 'default')) {
  5782. value = false;
  5783. } else if (value === '' || value === hyphenate(key)) {
  5784. // only cast empty string / same name to boolean if
  5785. // boolean has higher priority
  5786. var stringIndex = getTypeIndex(String, prop.type);
  5787. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5788. value = true;
  5789. }
  5790. }
  5791. }
  5792. // check default value
  5793. if (value === undefined) {
  5794. value = getPropDefaultValue(vm, prop, key);
  5795. // since the default value is a fresh copy,
  5796. // make sure to observe it.
  5797. var prevShouldObserve = shouldObserve;
  5798. toggleObserving(true);
  5799. observe(value);
  5800. toggleObserving(prevShouldObserve);
  5801. }
  5802. if (
  5803. true
  5804. ) {
  5805. assertProp(prop, key, value, vm, absent);
  5806. }
  5807. return value
  5808. }
  5809. /**
  5810. * Get the default value of a prop.
  5811. */
  5812. function getPropDefaultValue (vm, prop, key) {
  5813. // no default, return undefined
  5814. if (!hasOwn(prop, 'default')) {
  5815. return undefined
  5816. }
  5817. var def = prop.default;
  5818. // warn against non-factory defaults for Object & Array
  5819. if ( true && isObject(def)) {
  5820. warn(
  5821. 'Invalid default value for prop "' + key + '": ' +
  5822. 'Props with type Object/Array must use a factory function ' +
  5823. 'to return the default value.',
  5824. vm
  5825. );
  5826. }
  5827. // the raw prop value was also undefined from previous render,
  5828. // return previous default value to avoid unnecessary watcher trigger
  5829. if (vm && vm.$options.propsData &&
  5830. vm.$options.propsData[key] === undefined &&
  5831. vm._props[key] !== undefined
  5832. ) {
  5833. return vm._props[key]
  5834. }
  5835. // call factory function for non-Function types
  5836. // a value is Function if its prototype is function even across different execution context
  5837. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5838. ? def.call(vm)
  5839. : def
  5840. }
  5841. /**
  5842. * Assert whether a prop is valid.
  5843. */
  5844. function assertProp (
  5845. prop,
  5846. name,
  5847. value,
  5848. vm,
  5849. absent
  5850. ) {
  5851. if (prop.required && absent) {
  5852. warn(
  5853. 'Missing required prop: "' + name + '"',
  5854. vm
  5855. );
  5856. return
  5857. }
  5858. if (value == null && !prop.required) {
  5859. return
  5860. }
  5861. var type = prop.type;
  5862. var valid = !type || type === true;
  5863. var expectedTypes = [];
  5864. if (type) {
  5865. if (!Array.isArray(type)) {
  5866. type = [type];
  5867. }
  5868. for (var i = 0; i < type.length && !valid; i++) {
  5869. var assertedType = assertType(value, type[i]);
  5870. expectedTypes.push(assertedType.expectedType || '');
  5871. valid = assertedType.valid;
  5872. }
  5873. }
  5874. if (!valid) {
  5875. warn(
  5876. getInvalidTypeMessage(name, value, expectedTypes),
  5877. vm
  5878. );
  5879. return
  5880. }
  5881. var validator = prop.validator;
  5882. if (validator) {
  5883. if (!validator(value)) {
  5884. warn(
  5885. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5886. vm
  5887. );
  5888. }
  5889. }
  5890. }
  5891. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5892. function assertType (value, type) {
  5893. var valid;
  5894. var expectedType = getType(type);
  5895. if (simpleCheckRE.test(expectedType)) {
  5896. var t = typeof value;
  5897. valid = t === expectedType.toLowerCase();
  5898. // for primitive wrapper objects
  5899. if (!valid && t === 'object') {
  5900. valid = value instanceof type;
  5901. }
  5902. } else if (expectedType === 'Object') {
  5903. valid = isPlainObject(value);
  5904. } else if (expectedType === 'Array') {
  5905. valid = Array.isArray(value);
  5906. } else {
  5907. valid = value instanceof type;
  5908. }
  5909. return {
  5910. valid: valid,
  5911. expectedType: expectedType
  5912. }
  5913. }
  5914. /**
  5915. * Use function string name to check built-in types,
  5916. * because a simple equality check will fail when running
  5917. * across different vms / iframes.
  5918. */
  5919. function getType (fn) {
  5920. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5921. return match ? match[1] : ''
  5922. }
  5923. function isSameType (a, b) {
  5924. return getType(a) === getType(b)
  5925. }
  5926. function getTypeIndex (type, expectedTypes) {
  5927. if (!Array.isArray(expectedTypes)) {
  5928. return isSameType(expectedTypes, type) ? 0 : -1
  5929. }
  5930. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5931. if (isSameType(expectedTypes[i], type)) {
  5932. return i
  5933. }
  5934. }
  5935. return -1
  5936. }
  5937. function getInvalidTypeMessage (name, value, expectedTypes) {
  5938. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5939. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5940. var expectedType = expectedTypes[0];
  5941. var receivedType = toRawType(value);
  5942. var expectedValue = styleValue(value, expectedType);
  5943. var receivedValue = styleValue(value, receivedType);
  5944. // check if we need to specify expected value
  5945. if (expectedTypes.length === 1 &&
  5946. isExplicable(expectedType) &&
  5947. !isBoolean(expectedType, receivedType)) {
  5948. message += " with value " + expectedValue;
  5949. }
  5950. message += ", got " + receivedType + " ";
  5951. // check if we need to specify received value
  5952. if (isExplicable(receivedType)) {
  5953. message += "with value " + receivedValue + ".";
  5954. }
  5955. return message
  5956. }
  5957. function styleValue (value, type) {
  5958. if (type === 'String') {
  5959. return ("\"" + value + "\"")
  5960. } else if (type === 'Number') {
  5961. return ("" + (Number(value)))
  5962. } else {
  5963. return ("" + value)
  5964. }
  5965. }
  5966. function isExplicable (value) {
  5967. var explicitTypes = ['string', 'number', 'boolean'];
  5968. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5969. }
  5970. function isBoolean () {
  5971. var args = [], len = arguments.length;
  5972. while ( len-- ) args[ len ] = arguments[ len ];
  5973. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5974. }
  5975. /* */
  5976. function handleError (err, vm, info) {
  5977. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5978. // See: https://github.com/vuejs/vuex/issues/1505
  5979. pushTarget();
  5980. try {
  5981. if (vm) {
  5982. var cur = vm;
  5983. while ((cur = cur.$parent)) {
  5984. var hooks = cur.$options.errorCaptured;
  5985. if (hooks) {
  5986. for (var i = 0; i < hooks.length; i++) {
  5987. try {
  5988. var capture = hooks[i].call(cur, err, vm, info) === false;
  5989. if (capture) { return }
  5990. } catch (e) {
  5991. globalHandleError(e, cur, 'errorCaptured hook');
  5992. }
  5993. }
  5994. }
  5995. }
  5996. }
  5997. globalHandleError(err, vm, info);
  5998. } finally {
  5999. popTarget();
  6000. }
  6001. }
  6002. function invokeWithErrorHandling (
  6003. handler,
  6004. context,
  6005. args,
  6006. vm,
  6007. info
  6008. ) {
  6009. var res;
  6010. try {
  6011. res = args ? handler.apply(context, args) : handler.call(context);
  6012. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6013. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6014. // issue #9511
  6015. // avoid catch triggering multiple times when nested calls
  6016. res._handled = true;
  6017. }
  6018. } catch (e) {
  6019. handleError(e, vm, info);
  6020. }
  6021. return res
  6022. }
  6023. function globalHandleError (err, vm, info) {
  6024. if (config.errorHandler) {
  6025. try {
  6026. return config.errorHandler.call(null, err, vm, info)
  6027. } catch (e) {
  6028. // if the user intentionally throws the original error in the handler,
  6029. // do not log it twice
  6030. if (e !== err) {
  6031. logError(e, null, 'config.errorHandler');
  6032. }
  6033. }
  6034. }
  6035. logError(err, vm, info);
  6036. }
  6037. function logError (err, vm, info) {
  6038. if (true) {
  6039. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6040. }
  6041. /* istanbul ignore else */
  6042. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6043. console.error(err);
  6044. } else {
  6045. throw err
  6046. }
  6047. }
  6048. /* */
  6049. var callbacks = [];
  6050. var pending = false;
  6051. function flushCallbacks () {
  6052. pending = false;
  6053. var copies = callbacks.slice(0);
  6054. callbacks.length = 0;
  6055. for (var i = 0; i < copies.length; i++) {
  6056. copies[i]();
  6057. }
  6058. }
  6059. // Here we have async deferring wrappers using microtasks.
  6060. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6061. // However, it has subtle problems when state is changed right before repaint
  6062. // (e.g. #6813, out-in transitions).
  6063. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6064. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6065. // So we now use microtasks everywhere, again.
  6066. // A major drawback of this tradeoff is that there are some scenarios
  6067. // where microtasks have too high a priority and fire in between supposedly
  6068. // sequential events (e.g. #4521, #6690, which have workarounds)
  6069. // or even between bubbling of the same event (#6566).
  6070. var timerFunc;
  6071. // The nextTick behavior leverages the microtask queue, which can be accessed
  6072. // via either native Promise.then or MutationObserver.
  6073. // MutationObserver has wider support, however it is seriously bugged in
  6074. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6075. // completely stops working after triggering a few times... so, if native
  6076. // Promise is available, we will use it:
  6077. /* istanbul ignore next, $flow-disable-line */
  6078. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6079. var p = Promise.resolve();
  6080. timerFunc = function () {
  6081. p.then(flushCallbacks);
  6082. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6083. // it can get stuck in a weird state where callbacks are pushed into the
  6084. // microtask queue but the queue isn't being flushed, until the browser
  6085. // needs to do some other work, e.g. handle a timer. Therefore we can
  6086. // "force" the microtask queue to be flushed by adding an empty timer.
  6087. if (isIOS) { setTimeout(noop); }
  6088. };
  6089. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6090. isNative(MutationObserver) ||
  6091. // PhantomJS and iOS 7.x
  6092. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6093. )) {
  6094. // Use MutationObserver where native Promise is not available,
  6095. // e.g. PhantomJS, iOS7, Android 4.4
  6096. // (#6466 MutationObserver is unreliable in IE11)
  6097. var counter = 1;
  6098. var observer = new MutationObserver(flushCallbacks);
  6099. var textNode = document.createTextNode(String(counter));
  6100. observer.observe(textNode, {
  6101. characterData: true
  6102. });
  6103. timerFunc = function () {
  6104. counter = (counter + 1) % 2;
  6105. textNode.data = String(counter);
  6106. };
  6107. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6108. // Fallback to setImmediate.
  6109. // Technically it leverages the (macro) task queue,
  6110. // but it is still a better choice than setTimeout.
  6111. timerFunc = function () {
  6112. setImmediate(flushCallbacks);
  6113. };
  6114. } else {
  6115. // Fallback to setTimeout.
  6116. timerFunc = function () {
  6117. setTimeout(flushCallbacks, 0);
  6118. };
  6119. }
  6120. function nextTick (cb, ctx) {
  6121. var _resolve;
  6122. callbacks.push(function () {
  6123. if (cb) {
  6124. try {
  6125. cb.call(ctx);
  6126. } catch (e) {
  6127. handleError(e, ctx, 'nextTick');
  6128. }
  6129. } else if (_resolve) {
  6130. _resolve(ctx);
  6131. }
  6132. });
  6133. if (!pending) {
  6134. pending = true;
  6135. timerFunc();
  6136. }
  6137. // $flow-disable-line
  6138. if (!cb && typeof Promise !== 'undefined') {
  6139. return new Promise(function (resolve) {
  6140. _resolve = resolve;
  6141. })
  6142. }
  6143. }
  6144. /* */
  6145. /* not type checking this file because flow doesn't play well with Proxy */
  6146. var initProxy;
  6147. if (true) {
  6148. var allowedGlobals = makeMap(
  6149. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6150. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6151. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6152. 'require' // for Webpack/Browserify
  6153. );
  6154. var warnNonPresent = function (target, key) {
  6155. warn(
  6156. "Property or method \"" + key + "\" is not defined on the instance but " +
  6157. 'referenced during render. Make sure that this property is reactive, ' +
  6158. 'either in the data option, or for class-based components, by ' +
  6159. 'initializing the property. ' +
  6160. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6161. target
  6162. );
  6163. };
  6164. var warnReservedPrefix = function (target, key) {
  6165. warn(
  6166. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6167. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6168. 'prevent conflicts with Vue internals. ' +
  6169. 'See: https://vuejs.org/v2/api/#data',
  6170. target
  6171. );
  6172. };
  6173. var hasProxy =
  6174. typeof Proxy !== 'undefined' && isNative(Proxy);
  6175. if (hasProxy) {
  6176. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6177. config.keyCodes = new Proxy(config.keyCodes, {
  6178. set: function set (target, key, value) {
  6179. if (isBuiltInModifier(key)) {
  6180. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6181. return false
  6182. } else {
  6183. target[key] = value;
  6184. return true
  6185. }
  6186. }
  6187. });
  6188. }
  6189. var hasHandler = {
  6190. has: function has (target, key) {
  6191. var has = key in target;
  6192. var isAllowed = allowedGlobals(key) ||
  6193. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6194. if (!has && !isAllowed) {
  6195. if (key in target.$data) { warnReservedPrefix(target, key); }
  6196. else { warnNonPresent(target, key); }
  6197. }
  6198. return has || !isAllowed
  6199. }
  6200. };
  6201. var getHandler = {
  6202. get: function get (target, key) {
  6203. if (typeof key === 'string' && !(key in target)) {
  6204. if (key in target.$data) { warnReservedPrefix(target, key); }
  6205. else { warnNonPresent(target, key); }
  6206. }
  6207. return target[key]
  6208. }
  6209. };
  6210. initProxy = function initProxy (vm) {
  6211. if (hasProxy) {
  6212. // determine which proxy handler to use
  6213. var options = vm.$options;
  6214. var handlers = options.render && options.render._withStripped
  6215. ? getHandler
  6216. : hasHandler;
  6217. vm._renderProxy = new Proxy(vm, handlers);
  6218. } else {
  6219. vm._renderProxy = vm;
  6220. }
  6221. };
  6222. }
  6223. /* */
  6224. var seenObjects = new _Set();
  6225. /**
  6226. * Recursively traverse an object to evoke all converted
  6227. * getters, so that every nested property inside the object
  6228. * is collected as a "deep" dependency.
  6229. */
  6230. function traverse (val) {
  6231. _traverse(val, seenObjects);
  6232. seenObjects.clear();
  6233. }
  6234. function _traverse (val, seen) {
  6235. var i, keys;
  6236. var isA = Array.isArray(val);
  6237. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6238. return
  6239. }
  6240. if (val.__ob__) {
  6241. var depId = val.__ob__.dep.id;
  6242. if (seen.has(depId)) {
  6243. return
  6244. }
  6245. seen.add(depId);
  6246. }
  6247. if (isA) {
  6248. i = val.length;
  6249. while (i--) { _traverse(val[i], seen); }
  6250. } else {
  6251. keys = Object.keys(val);
  6252. i = keys.length;
  6253. while (i--) { _traverse(val[keys[i]], seen); }
  6254. }
  6255. }
  6256. var mark;
  6257. var measure;
  6258. if (true) {
  6259. var perf = inBrowser && window.performance;
  6260. /* istanbul ignore if */
  6261. if (
  6262. perf &&
  6263. perf.mark &&
  6264. perf.measure &&
  6265. perf.clearMarks &&
  6266. perf.clearMeasures
  6267. ) {
  6268. mark = function (tag) { return perf.mark(tag); };
  6269. measure = function (name, startTag, endTag) {
  6270. perf.measure(name, startTag, endTag);
  6271. perf.clearMarks(startTag);
  6272. perf.clearMarks(endTag);
  6273. // perf.clearMeasures(name)
  6274. };
  6275. }
  6276. }
  6277. /* */
  6278. var normalizeEvent = cached(function (name) {
  6279. var passive = name.charAt(0) === '&';
  6280. name = passive ? name.slice(1) : name;
  6281. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6282. name = once$$1 ? name.slice(1) : name;
  6283. var capture = name.charAt(0) === '!';
  6284. name = capture ? name.slice(1) : name;
  6285. return {
  6286. name: name,
  6287. once: once$$1,
  6288. capture: capture,
  6289. passive: passive
  6290. }
  6291. });
  6292. function createFnInvoker (fns, vm) {
  6293. function invoker () {
  6294. var arguments$1 = arguments;
  6295. var fns = invoker.fns;
  6296. if (Array.isArray(fns)) {
  6297. var cloned = fns.slice();
  6298. for (var i = 0; i < cloned.length; i++) {
  6299. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6300. }
  6301. } else {
  6302. // return handler return value for single handlers
  6303. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6304. }
  6305. }
  6306. invoker.fns = fns;
  6307. return invoker
  6308. }
  6309. function updateListeners (
  6310. on,
  6311. oldOn,
  6312. add,
  6313. remove$$1,
  6314. createOnceHandler,
  6315. vm
  6316. ) {
  6317. var name, def$$1, cur, old, event;
  6318. for (name in on) {
  6319. def$$1 = cur = on[name];
  6320. old = oldOn[name];
  6321. event = normalizeEvent(name);
  6322. if (isUndef(cur)) {
  6323. true && warn(
  6324. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6325. vm
  6326. );
  6327. } else if (isUndef(old)) {
  6328. if (isUndef(cur.fns)) {
  6329. cur = on[name] = createFnInvoker(cur, vm);
  6330. }
  6331. if (isTrue(event.once)) {
  6332. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6333. }
  6334. add(event.name, cur, event.capture, event.passive, event.params);
  6335. } else if (cur !== old) {
  6336. old.fns = cur;
  6337. on[name] = old;
  6338. }
  6339. }
  6340. for (name in oldOn) {
  6341. if (isUndef(on[name])) {
  6342. event = normalizeEvent(name);
  6343. remove$$1(event.name, oldOn[name], event.capture);
  6344. }
  6345. }
  6346. }
  6347. /* */
  6348. /* */
  6349. // fixed by xxxxxx (mp properties)
  6350. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6351. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6352. if (isUndef(propOptions)) {
  6353. return res
  6354. }
  6355. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6356. var attrs = data.attrs;
  6357. var props = data.props;
  6358. if (isDef(attrs) || isDef(props)) {
  6359. for (var key in propOptions) {
  6360. var altKey = hyphenate(key);
  6361. var result = checkProp(res, props, key, altKey, true) ||
  6362. checkProp(res, attrs, key, altKey, false);
  6363. // externalClass
  6364. if (
  6365. result &&
  6366. res[key] &&
  6367. externalClasses.indexOf(altKey) !== -1 &&
  6368. context[camelize(res[key])]
  6369. ) {
  6370. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6371. res[key] = context[camelize(res[key])];
  6372. }
  6373. }
  6374. }
  6375. return res
  6376. }
  6377. function extractPropsFromVNodeData (
  6378. data,
  6379. Ctor,
  6380. tag,
  6381. context// fixed by xxxxxx
  6382. ) {
  6383. // we are only extracting raw values here.
  6384. // validation and default values are handled in the child
  6385. // component itself.
  6386. var propOptions = Ctor.options.props;
  6387. if (isUndef(propOptions)) {
  6388. // fixed by xxxxxx
  6389. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6390. }
  6391. var res = {};
  6392. var attrs = data.attrs;
  6393. var props = data.props;
  6394. if (isDef(attrs) || isDef(props)) {
  6395. for (var key in propOptions) {
  6396. var altKey = hyphenate(key);
  6397. if (true) {
  6398. var keyInLowerCase = key.toLowerCase();
  6399. if (
  6400. key !== keyInLowerCase &&
  6401. attrs && hasOwn(attrs, keyInLowerCase)
  6402. ) {
  6403. tip(
  6404. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6405. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6406. " \"" + key + "\". " +
  6407. "Note that HTML attributes are case-insensitive and camelCased " +
  6408. "props need to use their kebab-case equivalents when using in-DOM " +
  6409. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6410. );
  6411. }
  6412. }
  6413. checkProp(res, props, key, altKey, true) ||
  6414. checkProp(res, attrs, key, altKey, false);
  6415. }
  6416. }
  6417. // fixed by xxxxxx
  6418. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6419. }
  6420. function checkProp (
  6421. res,
  6422. hash,
  6423. key,
  6424. altKey,
  6425. preserve
  6426. ) {
  6427. if (isDef(hash)) {
  6428. if (hasOwn(hash, key)) {
  6429. res[key] = hash[key];
  6430. if (!preserve) {
  6431. delete hash[key];
  6432. }
  6433. return true
  6434. } else if (hasOwn(hash, altKey)) {
  6435. res[key] = hash[altKey];
  6436. if (!preserve) {
  6437. delete hash[altKey];
  6438. }
  6439. return true
  6440. }
  6441. }
  6442. return false
  6443. }
  6444. /* */
  6445. // The template compiler attempts to minimize the need for normalization by
  6446. // statically analyzing the template at compile time.
  6447. //
  6448. // For plain HTML markup, normalization can be completely skipped because the
  6449. // generated render function is guaranteed to return Array<VNode>. There are
  6450. // two cases where extra normalization is needed:
  6451. // 1. When the children contains components - because a functional component
  6452. // may return an Array instead of a single root. In this case, just a simple
  6453. // normalization is needed - if any child is an Array, we flatten the whole
  6454. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6455. // because functional components already normalize their own children.
  6456. function simpleNormalizeChildren (children) {
  6457. for (var i = 0; i < children.length; i++) {
  6458. if (Array.isArray(children[i])) {
  6459. return Array.prototype.concat.apply([], children)
  6460. }
  6461. }
  6462. return children
  6463. }
  6464. // 2. When the children contains constructs that always generated nested Arrays,
  6465. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6466. // with hand-written render functions / JSX. In such cases a full normalization
  6467. // is needed to cater to all possible types of children values.
  6468. function normalizeChildren (children) {
  6469. return isPrimitive(children)
  6470. ? [createTextVNode(children)]
  6471. : Array.isArray(children)
  6472. ? normalizeArrayChildren(children)
  6473. : undefined
  6474. }
  6475. function isTextNode (node) {
  6476. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6477. }
  6478. function normalizeArrayChildren (children, nestedIndex) {
  6479. var res = [];
  6480. var i, c, lastIndex, last;
  6481. for (i = 0; i < children.length; i++) {
  6482. c = children[i];
  6483. if (isUndef(c) || typeof c === 'boolean') { continue }
  6484. lastIndex = res.length - 1;
  6485. last = res[lastIndex];
  6486. // nested
  6487. if (Array.isArray(c)) {
  6488. if (c.length > 0) {
  6489. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6490. // merge adjacent text nodes
  6491. if (isTextNode(c[0]) && isTextNode(last)) {
  6492. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6493. c.shift();
  6494. }
  6495. res.push.apply(res, c);
  6496. }
  6497. } else if (isPrimitive(c)) {
  6498. if (isTextNode(last)) {
  6499. // merge adjacent text nodes
  6500. // this is necessary for SSR hydration because text nodes are
  6501. // essentially merged when rendered to HTML strings
  6502. res[lastIndex] = createTextVNode(last.text + c);
  6503. } else if (c !== '') {
  6504. // convert primitive to vnode
  6505. res.push(createTextVNode(c));
  6506. }
  6507. } else {
  6508. if (isTextNode(c) && isTextNode(last)) {
  6509. // merge adjacent text nodes
  6510. res[lastIndex] = createTextVNode(last.text + c.text);
  6511. } else {
  6512. // default key for nested array children (likely generated by v-for)
  6513. if (isTrue(children._isVList) &&
  6514. isDef(c.tag) &&
  6515. isUndef(c.key) &&
  6516. isDef(nestedIndex)) {
  6517. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6518. }
  6519. res.push(c);
  6520. }
  6521. }
  6522. }
  6523. return res
  6524. }
  6525. /* */
  6526. function initProvide (vm) {
  6527. var provide = vm.$options.provide;
  6528. if (provide) {
  6529. vm._provided = typeof provide === 'function'
  6530. ? provide.call(vm)
  6531. : provide;
  6532. }
  6533. }
  6534. function initInjections (vm) {
  6535. var result = resolveInject(vm.$options.inject, vm);
  6536. if (result) {
  6537. toggleObserving(false);
  6538. Object.keys(result).forEach(function (key) {
  6539. /* istanbul ignore else */
  6540. if (true) {
  6541. defineReactive$$1(vm, key, result[key], function () {
  6542. warn(
  6543. "Avoid mutating an injected value directly since the changes will be " +
  6544. "overwritten whenever the provided component re-renders. " +
  6545. "injection being mutated: \"" + key + "\"",
  6546. vm
  6547. );
  6548. });
  6549. } else {}
  6550. });
  6551. toggleObserving(true);
  6552. }
  6553. }
  6554. function resolveInject (inject, vm) {
  6555. if (inject) {
  6556. // inject is :any because flow is not smart enough to figure out cached
  6557. var result = Object.create(null);
  6558. var keys = hasSymbol
  6559. ? Reflect.ownKeys(inject)
  6560. : Object.keys(inject);
  6561. for (var i = 0; i < keys.length; i++) {
  6562. var key = keys[i];
  6563. // #6574 in case the inject object is observed...
  6564. if (key === '__ob__') { continue }
  6565. var provideKey = inject[key].from;
  6566. var source = vm;
  6567. while (source) {
  6568. if (source._provided && hasOwn(source._provided, provideKey)) {
  6569. result[key] = source._provided[provideKey];
  6570. break
  6571. }
  6572. source = source.$parent;
  6573. }
  6574. if (!source) {
  6575. if ('default' in inject[key]) {
  6576. var provideDefault = inject[key].default;
  6577. result[key] = typeof provideDefault === 'function'
  6578. ? provideDefault.call(vm)
  6579. : provideDefault;
  6580. } else if (true) {
  6581. warn(("Injection \"" + key + "\" not found"), vm);
  6582. }
  6583. }
  6584. }
  6585. return result
  6586. }
  6587. }
  6588. /* */
  6589. /**
  6590. * Runtime helper for resolving raw children VNodes into a slot object.
  6591. */
  6592. function resolveSlots (
  6593. children,
  6594. context
  6595. ) {
  6596. if (!children || !children.length) {
  6597. return {}
  6598. }
  6599. var slots = {};
  6600. for (var i = 0, l = children.length; i < l; i++) {
  6601. var child = children[i];
  6602. var data = child.data;
  6603. // remove slot attribute if the node is resolved as a Vue slot node
  6604. if (data && data.attrs && data.attrs.slot) {
  6605. delete data.attrs.slot;
  6606. }
  6607. // named slots should only be respected if the vnode was rendered in the
  6608. // same context.
  6609. if ((child.context === context || child.fnContext === context) &&
  6610. data && data.slot != null
  6611. ) {
  6612. var name = data.slot;
  6613. var slot = (slots[name] || (slots[name] = []));
  6614. if (child.tag === 'template') {
  6615. slot.push.apply(slot, child.children || []);
  6616. } else {
  6617. slot.push(child);
  6618. }
  6619. } else {
  6620. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6621. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6622. (slots['page'] || (slots['page'] = [])).push(child);
  6623. }else{
  6624. (slots.default || (slots.default = [])).push(child);
  6625. }
  6626. }
  6627. }
  6628. // ignore slots that contains only whitespace
  6629. for (var name$1 in slots) {
  6630. if (slots[name$1].every(isWhitespace)) {
  6631. delete slots[name$1];
  6632. }
  6633. }
  6634. return slots
  6635. }
  6636. function isWhitespace (node) {
  6637. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6638. }
  6639. /* */
  6640. function normalizeScopedSlots (
  6641. slots,
  6642. normalSlots,
  6643. prevSlots
  6644. ) {
  6645. var res;
  6646. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6647. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6648. var key = slots && slots.$key;
  6649. if (!slots) {
  6650. res = {};
  6651. } else if (slots._normalized) {
  6652. // fast path 1: child component re-render only, parent did not change
  6653. return slots._normalized
  6654. } else if (
  6655. isStable &&
  6656. prevSlots &&
  6657. prevSlots !== emptyObject &&
  6658. key === prevSlots.$key &&
  6659. !hasNormalSlots &&
  6660. !prevSlots.$hasNormal
  6661. ) {
  6662. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6663. // only need to normalize once
  6664. return prevSlots
  6665. } else {
  6666. res = {};
  6667. for (var key$1 in slots) {
  6668. if (slots[key$1] && key$1[0] !== '$') {
  6669. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6670. }
  6671. }
  6672. }
  6673. // expose normal slots on scopedSlots
  6674. for (var key$2 in normalSlots) {
  6675. if (!(key$2 in res)) {
  6676. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6677. }
  6678. }
  6679. // avoriaz seems to mock a non-extensible $scopedSlots object
  6680. // and when that is passed down this would cause an error
  6681. if (slots && Object.isExtensible(slots)) {
  6682. (slots)._normalized = res;
  6683. }
  6684. def(res, '$stable', isStable);
  6685. def(res, '$key', key);
  6686. def(res, '$hasNormal', hasNormalSlots);
  6687. return res
  6688. }
  6689. function normalizeScopedSlot(normalSlots, key, fn) {
  6690. var normalized = function () {
  6691. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6692. res = res && typeof res === 'object' && !Array.isArray(res)
  6693. ? [res] // single vnode
  6694. : normalizeChildren(res);
  6695. return res && (
  6696. res.length === 0 ||
  6697. (res.length === 1 && res[0].isComment) // #9658
  6698. ) ? undefined
  6699. : res
  6700. };
  6701. // this is a slot using the new v-slot syntax without scope. although it is
  6702. // compiled as a scoped slot, render fn users would expect it to be present
  6703. // on this.$slots because the usage is semantically a normal slot.
  6704. if (fn.proxy) {
  6705. Object.defineProperty(normalSlots, key, {
  6706. get: normalized,
  6707. enumerable: true,
  6708. configurable: true
  6709. });
  6710. }
  6711. return normalized
  6712. }
  6713. function proxyNormalSlot(slots, key) {
  6714. return function () { return slots[key]; }
  6715. }
  6716. /* */
  6717. /**
  6718. * Runtime helper for rendering v-for lists.
  6719. */
  6720. function renderList (
  6721. val,
  6722. render
  6723. ) {
  6724. var ret, i, l, keys, key;
  6725. if (Array.isArray(val) || typeof val === 'string') {
  6726. ret = new Array(val.length);
  6727. for (i = 0, l = val.length; i < l; i++) {
  6728. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6729. }
  6730. } else if (typeof val === 'number') {
  6731. ret = new Array(val);
  6732. for (i = 0; i < val; i++) {
  6733. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6734. }
  6735. } else if (isObject(val)) {
  6736. if (hasSymbol && val[Symbol.iterator]) {
  6737. ret = [];
  6738. var iterator = val[Symbol.iterator]();
  6739. var result = iterator.next();
  6740. while (!result.done) {
  6741. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6742. result = iterator.next();
  6743. }
  6744. } else {
  6745. keys = Object.keys(val);
  6746. ret = new Array(keys.length);
  6747. for (i = 0, l = keys.length; i < l; i++) {
  6748. key = keys[i];
  6749. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6750. }
  6751. }
  6752. }
  6753. if (!isDef(ret)) {
  6754. ret = [];
  6755. }
  6756. (ret)._isVList = true;
  6757. return ret
  6758. }
  6759. /* */
  6760. /**
  6761. * Runtime helper for rendering <slot>
  6762. */
  6763. function renderSlot (
  6764. name,
  6765. fallback,
  6766. props,
  6767. bindObject
  6768. ) {
  6769. var scopedSlotFn = this.$scopedSlots[name];
  6770. var nodes;
  6771. if (scopedSlotFn) { // scoped slot
  6772. props = props || {};
  6773. if (bindObject) {
  6774. if ( true && !isObject(bindObject)) {
  6775. warn(
  6776. 'slot v-bind without argument expects an Object',
  6777. this
  6778. );
  6779. }
  6780. props = extend(extend({}, bindObject), props);
  6781. }
  6782. // fixed by xxxxxx app-plus scopedSlot
  6783. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6784. } else {
  6785. nodes = this.$slots[name] || fallback;
  6786. }
  6787. var target = props && props.slot;
  6788. if (target) {
  6789. return this.$createElement('template', { slot: target }, nodes)
  6790. } else {
  6791. return nodes
  6792. }
  6793. }
  6794. /* */
  6795. /**
  6796. * Runtime helper for resolving filters
  6797. */
  6798. function resolveFilter (id) {
  6799. return resolveAsset(this.$options, 'filters', id, true) || identity
  6800. }
  6801. /* */
  6802. function isKeyNotMatch (expect, actual) {
  6803. if (Array.isArray(expect)) {
  6804. return expect.indexOf(actual) === -1
  6805. } else {
  6806. return expect !== actual
  6807. }
  6808. }
  6809. /**
  6810. * Runtime helper for checking keyCodes from config.
  6811. * exposed as Vue.prototype._k
  6812. * passing in eventKeyName as last argument separately for backwards compat
  6813. */
  6814. function checkKeyCodes (
  6815. eventKeyCode,
  6816. key,
  6817. builtInKeyCode,
  6818. eventKeyName,
  6819. builtInKeyName
  6820. ) {
  6821. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6822. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6823. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6824. } else if (mappedKeyCode) {
  6825. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6826. } else if (eventKeyName) {
  6827. return hyphenate(eventKeyName) !== key
  6828. }
  6829. }
  6830. /* */
  6831. /**
  6832. * Runtime helper for merging v-bind="object" into a VNode's data.
  6833. */
  6834. function bindObjectProps (
  6835. data,
  6836. tag,
  6837. value,
  6838. asProp,
  6839. isSync
  6840. ) {
  6841. if (value) {
  6842. if (!isObject(value)) {
  6843. true && warn(
  6844. 'v-bind without argument expects an Object or Array value',
  6845. this
  6846. );
  6847. } else {
  6848. if (Array.isArray(value)) {
  6849. value = toObject(value);
  6850. }
  6851. var hash;
  6852. var loop = function ( key ) {
  6853. if (
  6854. key === 'class' ||
  6855. key === 'style' ||
  6856. isReservedAttribute(key)
  6857. ) {
  6858. hash = data;
  6859. } else {
  6860. var type = data.attrs && data.attrs.type;
  6861. hash = asProp || config.mustUseProp(tag, type, key)
  6862. ? data.domProps || (data.domProps = {})
  6863. : data.attrs || (data.attrs = {});
  6864. }
  6865. var camelizedKey = camelize(key);
  6866. var hyphenatedKey = hyphenate(key);
  6867. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6868. hash[key] = value[key];
  6869. if (isSync) {
  6870. var on = data.on || (data.on = {});
  6871. on[("update:" + key)] = function ($event) {
  6872. value[key] = $event;
  6873. };
  6874. }
  6875. }
  6876. };
  6877. for (var key in value) loop( key );
  6878. }
  6879. }
  6880. return data
  6881. }
  6882. /* */
  6883. /**
  6884. * Runtime helper for rendering static trees.
  6885. */
  6886. function renderStatic (
  6887. index,
  6888. isInFor
  6889. ) {
  6890. var cached = this._staticTrees || (this._staticTrees = []);
  6891. var tree = cached[index];
  6892. // if has already-rendered static tree and not inside v-for,
  6893. // we can reuse the same tree.
  6894. if (tree && !isInFor) {
  6895. return tree
  6896. }
  6897. // otherwise, render a fresh tree.
  6898. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6899. this._renderProxy,
  6900. null,
  6901. this // for render fns generated for functional component templates
  6902. );
  6903. markStatic(tree, ("__static__" + index), false);
  6904. return tree
  6905. }
  6906. /**
  6907. * Runtime helper for v-once.
  6908. * Effectively it means marking the node as static with a unique key.
  6909. */
  6910. function markOnce (
  6911. tree,
  6912. index,
  6913. key
  6914. ) {
  6915. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6916. return tree
  6917. }
  6918. function markStatic (
  6919. tree,
  6920. key,
  6921. isOnce
  6922. ) {
  6923. if (Array.isArray(tree)) {
  6924. for (var i = 0; i < tree.length; i++) {
  6925. if (tree[i] && typeof tree[i] !== 'string') {
  6926. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6927. }
  6928. }
  6929. } else {
  6930. markStaticNode(tree, key, isOnce);
  6931. }
  6932. }
  6933. function markStaticNode (node, key, isOnce) {
  6934. node.isStatic = true;
  6935. node.key = key;
  6936. node.isOnce = isOnce;
  6937. }
  6938. /* */
  6939. function bindObjectListeners (data, value) {
  6940. if (value) {
  6941. if (!isPlainObject(value)) {
  6942. true && warn(
  6943. 'v-on without argument expects an Object value',
  6944. this
  6945. );
  6946. } else {
  6947. var on = data.on = data.on ? extend({}, data.on) : {};
  6948. for (var key in value) {
  6949. var existing = on[key];
  6950. var ours = value[key];
  6951. on[key] = existing ? [].concat(existing, ours) : ours;
  6952. }
  6953. }
  6954. }
  6955. return data
  6956. }
  6957. /* */
  6958. function resolveScopedSlots (
  6959. fns, // see flow/vnode
  6960. res,
  6961. // the following are added in 2.6
  6962. hasDynamicKeys,
  6963. contentHashKey
  6964. ) {
  6965. res = res || { $stable: !hasDynamicKeys };
  6966. for (var i = 0; i < fns.length; i++) {
  6967. var slot = fns[i];
  6968. if (Array.isArray(slot)) {
  6969. resolveScopedSlots(slot, res, hasDynamicKeys);
  6970. } else if (slot) {
  6971. // marker for reverse proxying v-slot without scope on this.$slots
  6972. if (slot.proxy) {
  6973. slot.fn.proxy = true;
  6974. }
  6975. res[slot.key] = slot.fn;
  6976. }
  6977. }
  6978. if (contentHashKey) {
  6979. (res).$key = contentHashKey;
  6980. }
  6981. return res
  6982. }
  6983. /* */
  6984. function bindDynamicKeys (baseObj, values) {
  6985. for (var i = 0; i < values.length; i += 2) {
  6986. var key = values[i];
  6987. if (typeof key === 'string' && key) {
  6988. baseObj[values[i]] = values[i + 1];
  6989. } else if ( true && key !== '' && key !== null) {
  6990. // null is a special value for explicitly removing a binding
  6991. warn(
  6992. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6993. this
  6994. );
  6995. }
  6996. }
  6997. return baseObj
  6998. }
  6999. // helper to dynamically append modifier runtime markers to event names.
  7000. // ensure only append when value is already string, otherwise it will be cast
  7001. // to string and cause the type check to miss.
  7002. function prependModifier (value, symbol) {
  7003. return typeof value === 'string' ? symbol + value : value
  7004. }
  7005. /* */
  7006. function installRenderHelpers (target) {
  7007. target._o = markOnce;
  7008. target._n = toNumber;
  7009. target._s = toString;
  7010. target._l = renderList;
  7011. target._t = renderSlot;
  7012. target._q = looseEqual;
  7013. target._i = looseIndexOf;
  7014. target._m = renderStatic;
  7015. target._f = resolveFilter;
  7016. target._k = checkKeyCodes;
  7017. target._b = bindObjectProps;
  7018. target._v = createTextVNode;
  7019. target._e = createEmptyVNode;
  7020. target._u = resolveScopedSlots;
  7021. target._g = bindObjectListeners;
  7022. target._d = bindDynamicKeys;
  7023. target._p = prependModifier;
  7024. }
  7025. /* */
  7026. function FunctionalRenderContext (
  7027. data,
  7028. props,
  7029. children,
  7030. parent,
  7031. Ctor
  7032. ) {
  7033. var this$1 = this;
  7034. var options = Ctor.options;
  7035. // ensure the createElement function in functional components
  7036. // gets a unique context - this is necessary for correct named slot check
  7037. var contextVm;
  7038. if (hasOwn(parent, '_uid')) {
  7039. contextVm = Object.create(parent);
  7040. // $flow-disable-line
  7041. contextVm._original = parent;
  7042. } else {
  7043. // the context vm passed in is a functional context as well.
  7044. // in this case we want to make sure we are able to get a hold to the
  7045. // real context instance.
  7046. contextVm = parent;
  7047. // $flow-disable-line
  7048. parent = parent._original;
  7049. }
  7050. var isCompiled = isTrue(options._compiled);
  7051. var needNormalization = !isCompiled;
  7052. this.data = data;
  7053. this.props = props;
  7054. this.children = children;
  7055. this.parent = parent;
  7056. this.listeners = data.on || emptyObject;
  7057. this.injections = resolveInject(options.inject, parent);
  7058. this.slots = function () {
  7059. if (!this$1.$slots) {
  7060. normalizeScopedSlots(
  7061. data.scopedSlots,
  7062. this$1.$slots = resolveSlots(children, parent)
  7063. );
  7064. }
  7065. return this$1.$slots
  7066. };
  7067. Object.defineProperty(this, 'scopedSlots', ({
  7068. enumerable: true,
  7069. get: function get () {
  7070. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7071. }
  7072. }));
  7073. // support for compiled functional template
  7074. if (isCompiled) {
  7075. // exposing $options for renderStatic()
  7076. this.$options = options;
  7077. // pre-resolve slots for renderSlot()
  7078. this.$slots = this.slots();
  7079. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7080. }
  7081. if (options._scopeId) {
  7082. this._c = function (a, b, c, d) {
  7083. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7084. if (vnode && !Array.isArray(vnode)) {
  7085. vnode.fnScopeId = options._scopeId;
  7086. vnode.fnContext = parent;
  7087. }
  7088. return vnode
  7089. };
  7090. } else {
  7091. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7092. }
  7093. }
  7094. installRenderHelpers(FunctionalRenderContext.prototype);
  7095. function createFunctionalComponent (
  7096. Ctor,
  7097. propsData,
  7098. data,
  7099. contextVm,
  7100. children
  7101. ) {
  7102. var options = Ctor.options;
  7103. var props = {};
  7104. var propOptions = options.props;
  7105. if (isDef(propOptions)) {
  7106. for (var key in propOptions) {
  7107. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7108. }
  7109. } else {
  7110. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7111. if (isDef(data.props)) { mergeProps(props, data.props); }
  7112. }
  7113. var renderContext = new FunctionalRenderContext(
  7114. data,
  7115. props,
  7116. children,
  7117. contextVm,
  7118. Ctor
  7119. );
  7120. var vnode = options.render.call(null, renderContext._c, renderContext);
  7121. if (vnode instanceof VNode) {
  7122. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7123. } else if (Array.isArray(vnode)) {
  7124. var vnodes = normalizeChildren(vnode) || [];
  7125. var res = new Array(vnodes.length);
  7126. for (var i = 0; i < vnodes.length; i++) {
  7127. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7128. }
  7129. return res
  7130. }
  7131. }
  7132. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7133. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7134. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7135. // that should not be matched to match.
  7136. var clone = cloneVNode(vnode);
  7137. clone.fnContext = contextVm;
  7138. clone.fnOptions = options;
  7139. if (true) {
  7140. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7141. }
  7142. if (data.slot) {
  7143. (clone.data || (clone.data = {})).slot = data.slot;
  7144. }
  7145. return clone
  7146. }
  7147. function mergeProps (to, from) {
  7148. for (var key in from) {
  7149. to[camelize(key)] = from[key];
  7150. }
  7151. }
  7152. /* */
  7153. /* */
  7154. /* */
  7155. /* */
  7156. // inline hooks to be invoked on component VNodes during patch
  7157. var componentVNodeHooks = {
  7158. init: function init (vnode, hydrating) {
  7159. if (
  7160. vnode.componentInstance &&
  7161. !vnode.componentInstance._isDestroyed &&
  7162. vnode.data.keepAlive
  7163. ) {
  7164. // kept-alive components, treat as a patch
  7165. var mountedNode = vnode; // work around flow
  7166. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7167. } else {
  7168. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7169. vnode,
  7170. activeInstance
  7171. );
  7172. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7173. }
  7174. },
  7175. prepatch: function prepatch (oldVnode, vnode) {
  7176. var options = vnode.componentOptions;
  7177. var child = vnode.componentInstance = oldVnode.componentInstance;
  7178. updateChildComponent(
  7179. child,
  7180. options.propsData, // updated props
  7181. options.listeners, // updated listeners
  7182. vnode, // new parent vnode
  7183. options.children // new children
  7184. );
  7185. },
  7186. insert: function insert (vnode) {
  7187. var context = vnode.context;
  7188. var componentInstance = vnode.componentInstance;
  7189. if (!componentInstance._isMounted) {
  7190. callHook(componentInstance, 'onServiceCreated');
  7191. callHook(componentInstance, 'onServiceAttached');
  7192. componentInstance._isMounted = true;
  7193. callHook(componentInstance, 'mounted');
  7194. }
  7195. if (vnode.data.keepAlive) {
  7196. if (context._isMounted) {
  7197. // vue-router#1212
  7198. // During updates, a kept-alive component's child components may
  7199. // change, so directly walking the tree here may call activated hooks
  7200. // on incorrect children. Instead we push them into a queue which will
  7201. // be processed after the whole patch process ended.
  7202. queueActivatedComponent(componentInstance);
  7203. } else {
  7204. activateChildComponent(componentInstance, true /* direct */);
  7205. }
  7206. }
  7207. },
  7208. destroy: function destroy (vnode) {
  7209. var componentInstance = vnode.componentInstance;
  7210. if (!componentInstance._isDestroyed) {
  7211. if (!vnode.data.keepAlive) {
  7212. componentInstance.$destroy();
  7213. } else {
  7214. deactivateChildComponent(componentInstance, true /* direct */);
  7215. }
  7216. }
  7217. }
  7218. };
  7219. var hooksToMerge = Object.keys(componentVNodeHooks);
  7220. function createComponent (
  7221. Ctor,
  7222. data,
  7223. context,
  7224. children,
  7225. tag
  7226. ) {
  7227. if (isUndef(Ctor)) {
  7228. return
  7229. }
  7230. var baseCtor = context.$options._base;
  7231. // plain options object: turn it into a constructor
  7232. if (isObject(Ctor)) {
  7233. Ctor = baseCtor.extend(Ctor);
  7234. }
  7235. // if at this stage it's not a constructor or an async component factory,
  7236. // reject.
  7237. if (typeof Ctor !== 'function') {
  7238. if (true) {
  7239. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7240. }
  7241. return
  7242. }
  7243. // async component
  7244. var asyncFactory;
  7245. if (isUndef(Ctor.cid)) {
  7246. asyncFactory = Ctor;
  7247. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7248. if (Ctor === undefined) {
  7249. // return a placeholder node for async component, which is rendered
  7250. // as a comment node but preserves all the raw information for the node.
  7251. // the information will be used for async server-rendering and hydration.
  7252. return createAsyncPlaceholder(
  7253. asyncFactory,
  7254. data,
  7255. context,
  7256. children,
  7257. tag
  7258. )
  7259. }
  7260. }
  7261. data = data || {};
  7262. // resolve constructor options in case global mixins are applied after
  7263. // component constructor creation
  7264. resolveConstructorOptions(Ctor);
  7265. // transform component v-model data into props & events
  7266. if (isDef(data.model)) {
  7267. transformModel(Ctor.options, data);
  7268. }
  7269. // extract props
  7270. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7271. // functional component
  7272. if (isTrue(Ctor.options.functional)) {
  7273. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7274. }
  7275. // extract listeners, since these needs to be treated as
  7276. // child component listeners instead of DOM listeners
  7277. var listeners = data.on;
  7278. // replace with listeners with .native modifier
  7279. // so it gets processed during parent component patch.
  7280. data.on = data.nativeOn;
  7281. if (isTrue(Ctor.options.abstract)) {
  7282. // abstract components do not keep anything
  7283. // other than props & listeners & slot
  7284. // work around flow
  7285. var slot = data.slot;
  7286. data = {};
  7287. if (slot) {
  7288. data.slot = slot;
  7289. }
  7290. }
  7291. // install component management hooks onto the placeholder node
  7292. installComponentHooks(data);
  7293. // return a placeholder vnode
  7294. var name = Ctor.options.name || tag;
  7295. var vnode = new VNode(
  7296. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7297. data, undefined, undefined, undefined, context,
  7298. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7299. asyncFactory
  7300. );
  7301. return vnode
  7302. }
  7303. function createComponentInstanceForVnode (
  7304. vnode, // we know it's MountedComponentVNode but flow doesn't
  7305. parent // activeInstance in lifecycle state
  7306. ) {
  7307. var options = {
  7308. _isComponent: true,
  7309. _parentVnode: vnode,
  7310. parent: parent
  7311. };
  7312. // check inline-template render functions
  7313. var inlineTemplate = vnode.data.inlineTemplate;
  7314. if (isDef(inlineTemplate)) {
  7315. options.render = inlineTemplate.render;
  7316. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7317. }
  7318. return new vnode.componentOptions.Ctor(options)
  7319. }
  7320. function installComponentHooks (data) {
  7321. var hooks = data.hook || (data.hook = {});
  7322. for (var i = 0; i < hooksToMerge.length; i++) {
  7323. var key = hooksToMerge[i];
  7324. var existing = hooks[key];
  7325. var toMerge = componentVNodeHooks[key];
  7326. if (existing !== toMerge && !(existing && existing._merged)) {
  7327. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7328. }
  7329. }
  7330. }
  7331. function mergeHook$1 (f1, f2) {
  7332. var merged = function (a, b) {
  7333. // flow complains about extra args which is why we use any
  7334. f1(a, b);
  7335. f2(a, b);
  7336. };
  7337. merged._merged = true;
  7338. return merged
  7339. }
  7340. // transform component v-model info (value and callback) into
  7341. // prop and event handler respectively.
  7342. function transformModel (options, data) {
  7343. var prop = (options.model && options.model.prop) || 'value';
  7344. var event = (options.model && options.model.event) || 'input'
  7345. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7346. var on = data.on || (data.on = {});
  7347. var existing = on[event];
  7348. var callback = data.model.callback;
  7349. if (isDef(existing)) {
  7350. if (
  7351. Array.isArray(existing)
  7352. ? existing.indexOf(callback) === -1
  7353. : existing !== callback
  7354. ) {
  7355. on[event] = [callback].concat(existing);
  7356. }
  7357. } else {
  7358. on[event] = callback;
  7359. }
  7360. }
  7361. /* */
  7362. var SIMPLE_NORMALIZE = 1;
  7363. var ALWAYS_NORMALIZE = 2;
  7364. // wrapper function for providing a more flexible interface
  7365. // without getting yelled at by flow
  7366. function createElement (
  7367. context,
  7368. tag,
  7369. data,
  7370. children,
  7371. normalizationType,
  7372. alwaysNormalize
  7373. ) {
  7374. if (Array.isArray(data) || isPrimitive(data)) {
  7375. normalizationType = children;
  7376. children = data;
  7377. data = undefined;
  7378. }
  7379. if (isTrue(alwaysNormalize)) {
  7380. normalizationType = ALWAYS_NORMALIZE;
  7381. }
  7382. return _createElement(context, tag, data, children, normalizationType)
  7383. }
  7384. function _createElement (
  7385. context,
  7386. tag,
  7387. data,
  7388. children,
  7389. normalizationType
  7390. ) {
  7391. if (isDef(data) && isDef((data).__ob__)) {
  7392. true && warn(
  7393. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7394. 'Always create fresh vnode data objects in each render!',
  7395. context
  7396. );
  7397. return createEmptyVNode()
  7398. }
  7399. // object syntax in v-bind
  7400. if (isDef(data) && isDef(data.is)) {
  7401. tag = data.is;
  7402. }
  7403. if (!tag) {
  7404. // in case of component :is set to falsy value
  7405. return createEmptyVNode()
  7406. }
  7407. // warn against non-primitive key
  7408. if ( true &&
  7409. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7410. ) {
  7411. {
  7412. warn(
  7413. 'Avoid using non-primitive value as key, ' +
  7414. 'use string/number value instead.',
  7415. context
  7416. );
  7417. }
  7418. }
  7419. // support single function children as default scoped slot
  7420. if (Array.isArray(children) &&
  7421. typeof children[0] === 'function'
  7422. ) {
  7423. data = data || {};
  7424. data.scopedSlots = { default: children[0] };
  7425. children.length = 0;
  7426. }
  7427. if (normalizationType === ALWAYS_NORMALIZE) {
  7428. children = normalizeChildren(children);
  7429. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7430. children = simpleNormalizeChildren(children);
  7431. }
  7432. var vnode, ns;
  7433. if (typeof tag === 'string') {
  7434. var Ctor;
  7435. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7436. if (config.isReservedTag(tag)) {
  7437. // platform built-in elements
  7438. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7439. warn(
  7440. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7441. context
  7442. );
  7443. }
  7444. vnode = new VNode(
  7445. config.parsePlatformTagName(tag), data, children,
  7446. undefined, undefined, context
  7447. );
  7448. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7449. // component
  7450. vnode = createComponent(Ctor, data, context, children, tag);
  7451. } else {
  7452. // unknown or unlisted namespaced elements
  7453. // check at runtime because it may get assigned a namespace when its
  7454. // parent normalizes children
  7455. vnode = new VNode(
  7456. tag, data, children,
  7457. undefined, undefined, context
  7458. );
  7459. }
  7460. } else {
  7461. // direct component options / constructor
  7462. vnode = createComponent(tag, data, context, children);
  7463. }
  7464. if (Array.isArray(vnode)) {
  7465. return vnode
  7466. } else if (isDef(vnode)) {
  7467. if (isDef(ns)) { applyNS(vnode, ns); }
  7468. if (isDef(data)) { registerDeepBindings(data); }
  7469. return vnode
  7470. } else {
  7471. return createEmptyVNode()
  7472. }
  7473. }
  7474. function applyNS (vnode, ns, force) {
  7475. vnode.ns = ns;
  7476. if (vnode.tag === 'foreignObject') {
  7477. // use default namespace inside foreignObject
  7478. ns = undefined;
  7479. force = true;
  7480. }
  7481. if (isDef(vnode.children)) {
  7482. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7483. var child = vnode.children[i];
  7484. if (isDef(child.tag) && (
  7485. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7486. applyNS(child, ns, force);
  7487. }
  7488. }
  7489. }
  7490. }
  7491. // ref #5318
  7492. // necessary to ensure parent re-render when deep bindings like :style and
  7493. // :class are used on slot nodes
  7494. function registerDeepBindings (data) {
  7495. if (isObject(data.style)) {
  7496. traverse(data.style);
  7497. }
  7498. if (isObject(data.class)) {
  7499. traverse(data.class);
  7500. }
  7501. }
  7502. /* */
  7503. function initRender (vm) {
  7504. vm._vnode = null; // the root of the child tree
  7505. vm._staticTrees = null; // v-once cached trees
  7506. var options = vm.$options;
  7507. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7508. var renderContext = parentVnode && parentVnode.context;
  7509. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7510. vm.$scopedSlots = emptyObject;
  7511. // bind the createElement fn to this instance
  7512. // so that we get proper render context inside it.
  7513. // args order: tag, data, children, normalizationType, alwaysNormalize
  7514. // internal version is used by render functions compiled from templates
  7515. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7516. // normalization is always applied for the public version, used in
  7517. // user-written render functions.
  7518. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7519. // $attrs & $listeners are exposed for easier HOC creation.
  7520. // they need to be reactive so that HOCs using them are always updated
  7521. var parentData = parentVnode && parentVnode.data;
  7522. /* istanbul ignore else */
  7523. if (true) {
  7524. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7525. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7526. }, true);
  7527. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7528. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7529. }, true);
  7530. } else {}
  7531. }
  7532. var currentRenderingInstance = null;
  7533. function renderMixin (Vue) {
  7534. // install runtime convenience helpers
  7535. installRenderHelpers(Vue.prototype);
  7536. Vue.prototype.$nextTick = function (fn) {
  7537. return nextTick(fn, this)
  7538. };
  7539. Vue.prototype._render = function () {
  7540. var vm = this;
  7541. var ref = vm.$options;
  7542. var render = ref.render;
  7543. var _parentVnode = ref._parentVnode;
  7544. if (_parentVnode) {
  7545. vm.$scopedSlots = normalizeScopedSlots(
  7546. _parentVnode.data.scopedSlots,
  7547. vm.$slots,
  7548. vm.$scopedSlots
  7549. );
  7550. }
  7551. // set parent vnode. this allows render functions to have access
  7552. // to the data on the placeholder node.
  7553. vm.$vnode = _parentVnode;
  7554. // render self
  7555. var vnode;
  7556. try {
  7557. // There's no need to maintain a stack because all render fns are called
  7558. // separately from one another. Nested component's render fns are called
  7559. // when parent component is patched.
  7560. currentRenderingInstance = vm;
  7561. vnode = render.call(vm._renderProxy, vm.$createElement);
  7562. } catch (e) {
  7563. handleError(e, vm, "render");
  7564. // return error render result,
  7565. // or previous vnode to prevent render error causing blank component
  7566. /* istanbul ignore else */
  7567. if ( true && vm.$options.renderError) {
  7568. try {
  7569. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7570. } catch (e) {
  7571. handleError(e, vm, "renderError");
  7572. vnode = vm._vnode;
  7573. }
  7574. } else {
  7575. vnode = vm._vnode;
  7576. }
  7577. } finally {
  7578. currentRenderingInstance = null;
  7579. }
  7580. // if the returned array contains only a single node, allow it
  7581. if (Array.isArray(vnode) && vnode.length === 1) {
  7582. vnode = vnode[0];
  7583. }
  7584. // return empty vnode in case the render function errored out
  7585. if (!(vnode instanceof VNode)) {
  7586. if ( true && Array.isArray(vnode)) {
  7587. warn(
  7588. 'Multiple root nodes returned from render function. Render function ' +
  7589. 'should return a single root node.',
  7590. vm
  7591. );
  7592. }
  7593. vnode = createEmptyVNode();
  7594. }
  7595. // set parent
  7596. vnode.parent = _parentVnode;
  7597. return vnode
  7598. };
  7599. }
  7600. /* */
  7601. function ensureCtor (comp, base) {
  7602. if (
  7603. comp.__esModule ||
  7604. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7605. ) {
  7606. comp = comp.default;
  7607. }
  7608. return isObject(comp)
  7609. ? base.extend(comp)
  7610. : comp
  7611. }
  7612. function createAsyncPlaceholder (
  7613. factory,
  7614. data,
  7615. context,
  7616. children,
  7617. tag
  7618. ) {
  7619. var node = createEmptyVNode();
  7620. node.asyncFactory = factory;
  7621. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7622. return node
  7623. }
  7624. function resolveAsyncComponent (
  7625. factory,
  7626. baseCtor
  7627. ) {
  7628. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7629. return factory.errorComp
  7630. }
  7631. if (isDef(factory.resolved)) {
  7632. return factory.resolved
  7633. }
  7634. var owner = currentRenderingInstance;
  7635. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7636. // already pending
  7637. factory.owners.push(owner);
  7638. }
  7639. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7640. return factory.loadingComp
  7641. }
  7642. if (owner && !isDef(factory.owners)) {
  7643. var owners = factory.owners = [owner];
  7644. var sync = true;
  7645. var timerLoading = null;
  7646. var timerTimeout = null
  7647. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7648. var forceRender = function (renderCompleted) {
  7649. for (var i = 0, l = owners.length; i < l; i++) {
  7650. (owners[i]).$forceUpdate();
  7651. }
  7652. if (renderCompleted) {
  7653. owners.length = 0;
  7654. if (timerLoading !== null) {
  7655. clearTimeout(timerLoading);
  7656. timerLoading = null;
  7657. }
  7658. if (timerTimeout !== null) {
  7659. clearTimeout(timerTimeout);
  7660. timerTimeout = null;
  7661. }
  7662. }
  7663. };
  7664. var resolve = once(function (res) {
  7665. // cache resolved
  7666. factory.resolved = ensureCtor(res, baseCtor);
  7667. // invoke callbacks only if this is not a synchronous resolve
  7668. // (async resolves are shimmed as synchronous during SSR)
  7669. if (!sync) {
  7670. forceRender(true);
  7671. } else {
  7672. owners.length = 0;
  7673. }
  7674. });
  7675. var reject = once(function (reason) {
  7676. true && warn(
  7677. "Failed to resolve async component: " + (String(factory)) +
  7678. (reason ? ("\nReason: " + reason) : '')
  7679. );
  7680. if (isDef(factory.errorComp)) {
  7681. factory.error = true;
  7682. forceRender(true);
  7683. }
  7684. });
  7685. var res = factory(resolve, reject);
  7686. if (isObject(res)) {
  7687. if (isPromise(res)) {
  7688. // () => Promise
  7689. if (isUndef(factory.resolved)) {
  7690. res.then(resolve, reject);
  7691. }
  7692. } else if (isPromise(res.component)) {
  7693. res.component.then(resolve, reject);
  7694. if (isDef(res.error)) {
  7695. factory.errorComp = ensureCtor(res.error, baseCtor);
  7696. }
  7697. if (isDef(res.loading)) {
  7698. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7699. if (res.delay === 0) {
  7700. factory.loading = true;
  7701. } else {
  7702. timerLoading = setTimeout(function () {
  7703. timerLoading = null;
  7704. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7705. factory.loading = true;
  7706. forceRender(false);
  7707. }
  7708. }, res.delay || 200);
  7709. }
  7710. }
  7711. if (isDef(res.timeout)) {
  7712. timerTimeout = setTimeout(function () {
  7713. timerTimeout = null;
  7714. if (isUndef(factory.resolved)) {
  7715. reject(
  7716. true
  7717. ? ("timeout (" + (res.timeout) + "ms)")
  7718. : undefined
  7719. );
  7720. }
  7721. }, res.timeout);
  7722. }
  7723. }
  7724. }
  7725. sync = false;
  7726. // return in case resolved synchronously
  7727. return factory.loading
  7728. ? factory.loadingComp
  7729. : factory.resolved
  7730. }
  7731. }
  7732. /* */
  7733. function isAsyncPlaceholder (node) {
  7734. return node.isComment && node.asyncFactory
  7735. }
  7736. /* */
  7737. function getFirstComponentChild (children) {
  7738. if (Array.isArray(children)) {
  7739. for (var i = 0; i < children.length; i++) {
  7740. var c = children[i];
  7741. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7742. return c
  7743. }
  7744. }
  7745. }
  7746. }
  7747. /* */
  7748. /* */
  7749. function initEvents (vm) {
  7750. vm._events = Object.create(null);
  7751. vm._hasHookEvent = false;
  7752. // init parent attached events
  7753. var listeners = vm.$options._parentListeners;
  7754. if (listeners) {
  7755. updateComponentListeners(vm, listeners);
  7756. }
  7757. }
  7758. var target;
  7759. function add (event, fn) {
  7760. target.$on(event, fn);
  7761. }
  7762. function remove$1 (event, fn) {
  7763. target.$off(event, fn);
  7764. }
  7765. function createOnceHandler (event, fn) {
  7766. var _target = target;
  7767. return function onceHandler () {
  7768. var res = fn.apply(null, arguments);
  7769. if (res !== null) {
  7770. _target.$off(event, onceHandler);
  7771. }
  7772. }
  7773. }
  7774. function updateComponentListeners (
  7775. vm,
  7776. listeners,
  7777. oldListeners
  7778. ) {
  7779. target = vm;
  7780. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7781. target = undefined;
  7782. }
  7783. function eventsMixin (Vue) {
  7784. var hookRE = /^hook:/;
  7785. Vue.prototype.$on = function (event, fn) {
  7786. var vm = this;
  7787. if (Array.isArray(event)) {
  7788. for (var i = 0, l = event.length; i < l; i++) {
  7789. vm.$on(event[i], fn);
  7790. }
  7791. } else {
  7792. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7793. // optimize hook:event cost by using a boolean flag marked at registration
  7794. // instead of a hash lookup
  7795. if (hookRE.test(event)) {
  7796. vm._hasHookEvent = true;
  7797. }
  7798. }
  7799. return vm
  7800. };
  7801. Vue.prototype.$once = function (event, fn) {
  7802. var vm = this;
  7803. function on () {
  7804. vm.$off(event, on);
  7805. fn.apply(vm, arguments);
  7806. }
  7807. on.fn = fn;
  7808. vm.$on(event, on);
  7809. return vm
  7810. };
  7811. Vue.prototype.$off = function (event, fn) {
  7812. var vm = this;
  7813. // all
  7814. if (!arguments.length) {
  7815. vm._events = Object.create(null);
  7816. return vm
  7817. }
  7818. // array of events
  7819. if (Array.isArray(event)) {
  7820. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7821. vm.$off(event[i$1], fn);
  7822. }
  7823. return vm
  7824. }
  7825. // specific event
  7826. var cbs = vm._events[event];
  7827. if (!cbs) {
  7828. return vm
  7829. }
  7830. if (!fn) {
  7831. vm._events[event] = null;
  7832. return vm
  7833. }
  7834. // specific handler
  7835. var cb;
  7836. var i = cbs.length;
  7837. while (i--) {
  7838. cb = cbs[i];
  7839. if (cb === fn || cb.fn === fn) {
  7840. cbs.splice(i, 1);
  7841. break
  7842. }
  7843. }
  7844. return vm
  7845. };
  7846. Vue.prototype.$emit = function (event) {
  7847. var vm = this;
  7848. if (true) {
  7849. var lowerCaseEvent = event.toLowerCase();
  7850. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7851. tip(
  7852. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7853. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7854. "Note that HTML attributes are case-insensitive and you cannot use " +
  7855. "v-on to listen to camelCase events when using in-DOM templates. " +
  7856. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7857. );
  7858. }
  7859. }
  7860. var cbs = vm._events[event];
  7861. if (cbs) {
  7862. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7863. var args = toArray(arguments, 1);
  7864. var info = "event handler for \"" + event + "\"";
  7865. for (var i = 0, l = cbs.length; i < l; i++) {
  7866. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7867. }
  7868. }
  7869. return vm
  7870. };
  7871. }
  7872. /* */
  7873. var activeInstance = null;
  7874. var isUpdatingChildComponent = false;
  7875. function setActiveInstance(vm) {
  7876. var prevActiveInstance = activeInstance;
  7877. activeInstance = vm;
  7878. return function () {
  7879. activeInstance = prevActiveInstance;
  7880. }
  7881. }
  7882. function initLifecycle (vm) {
  7883. var options = vm.$options;
  7884. // locate first non-abstract parent
  7885. var parent = options.parent;
  7886. if (parent && !options.abstract) {
  7887. while (parent.$options.abstract && parent.$parent) {
  7888. parent = parent.$parent;
  7889. }
  7890. parent.$children.push(vm);
  7891. }
  7892. vm.$parent = parent;
  7893. vm.$root = parent ? parent.$root : vm;
  7894. vm.$children = [];
  7895. vm.$refs = {};
  7896. vm._watcher = null;
  7897. vm._inactive = null;
  7898. vm._directInactive = false;
  7899. vm._isMounted = false;
  7900. vm._isDestroyed = false;
  7901. vm._isBeingDestroyed = false;
  7902. }
  7903. function lifecycleMixin (Vue) {
  7904. Vue.prototype._update = function (vnode, hydrating) {
  7905. var vm = this;
  7906. var prevEl = vm.$el;
  7907. var prevVnode = vm._vnode;
  7908. var restoreActiveInstance = setActiveInstance(vm);
  7909. vm._vnode = vnode;
  7910. // Vue.prototype.__patch__ is injected in entry points
  7911. // based on the rendering backend used.
  7912. if (!prevVnode) {
  7913. // initial render
  7914. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7915. } else {
  7916. // updates
  7917. vm.$el = vm.__patch__(prevVnode, vnode);
  7918. }
  7919. restoreActiveInstance();
  7920. // update __vue__ reference
  7921. if (prevEl) {
  7922. prevEl.__vue__ = null;
  7923. }
  7924. if (vm.$el) {
  7925. vm.$el.__vue__ = vm;
  7926. }
  7927. // if parent is an HOC, update its $el as well
  7928. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7929. vm.$parent.$el = vm.$el;
  7930. }
  7931. // updated hook is called by the scheduler to ensure that children are
  7932. // updated in a parent's updated hook.
  7933. };
  7934. Vue.prototype.$forceUpdate = function () {
  7935. var vm = this;
  7936. if (vm._watcher) {
  7937. vm._watcher.update();
  7938. }
  7939. };
  7940. Vue.prototype.$destroy = function () {
  7941. var vm = this;
  7942. if (vm._isBeingDestroyed) {
  7943. return
  7944. }
  7945. callHook(vm, 'beforeDestroy');
  7946. vm._isBeingDestroyed = true;
  7947. // remove self from parent
  7948. var parent = vm.$parent;
  7949. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7950. remove(parent.$children, vm);
  7951. }
  7952. // teardown watchers
  7953. if (vm._watcher) {
  7954. vm._watcher.teardown();
  7955. }
  7956. var i = vm._watchers.length;
  7957. while (i--) {
  7958. vm._watchers[i].teardown();
  7959. }
  7960. // remove reference from data ob
  7961. // frozen object may not have observer.
  7962. if (vm._data.__ob__) {
  7963. vm._data.__ob__.vmCount--;
  7964. }
  7965. // call the last hook...
  7966. vm._isDestroyed = true;
  7967. // invoke destroy hooks on current rendered tree
  7968. vm.__patch__(vm._vnode, null);
  7969. // fire destroyed hook
  7970. callHook(vm, 'destroyed');
  7971. // turn off all instance listeners.
  7972. vm.$off();
  7973. // remove __vue__ reference
  7974. if (vm.$el) {
  7975. vm.$el.__vue__ = null;
  7976. }
  7977. // release circular reference (#6759)
  7978. if (vm.$vnode) {
  7979. vm.$vnode.parent = null;
  7980. }
  7981. };
  7982. }
  7983. function updateChildComponent (
  7984. vm,
  7985. propsData,
  7986. listeners,
  7987. parentVnode,
  7988. renderChildren
  7989. ) {
  7990. if (true) {
  7991. isUpdatingChildComponent = true;
  7992. }
  7993. // determine whether component has slot children
  7994. // we need to do this before overwriting $options._renderChildren.
  7995. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7996. // dynamic slot names). Static scoped slots compiled from template has the
  7997. // "$stable" marker.
  7998. var newScopedSlots = parentVnode.data.scopedSlots;
  7999. var oldScopedSlots = vm.$scopedSlots;
  8000. var hasDynamicScopedSlot = !!(
  8001. (newScopedSlots && !newScopedSlots.$stable) ||
  8002. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8003. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8004. );
  8005. // Any static slot children from the parent may have changed during parent's
  8006. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8007. // update is necessary to ensure correctness.
  8008. var needsForceUpdate = !!(
  8009. renderChildren || // has new static slots
  8010. vm.$options._renderChildren || // has old static slots
  8011. hasDynamicScopedSlot
  8012. );
  8013. vm.$options._parentVnode = parentVnode;
  8014. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8015. if (vm._vnode) { // update child tree's parent
  8016. vm._vnode.parent = parentVnode;
  8017. }
  8018. vm.$options._renderChildren = renderChildren;
  8019. // update $attrs and $listeners hash
  8020. // these are also reactive so they may trigger child update if the child
  8021. // used them during render
  8022. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8023. vm.$listeners = listeners || emptyObject;
  8024. // update props
  8025. if (propsData && vm.$options.props) {
  8026. toggleObserving(false);
  8027. var props = vm._props;
  8028. var propKeys = vm.$options._propKeys || [];
  8029. for (var i = 0; i < propKeys.length; i++) {
  8030. var key = propKeys[i];
  8031. var propOptions = vm.$options.props; // wtf flow?
  8032. props[key] = validateProp(key, propOptions, propsData, vm);
  8033. }
  8034. toggleObserving(true);
  8035. // keep a copy of raw propsData
  8036. vm.$options.propsData = propsData;
  8037. }
  8038. // fixed by xxxxxx update properties(mp runtime)
  8039. vm._$updateProperties && vm._$updateProperties(vm);
  8040. // update listeners
  8041. listeners = listeners || emptyObject;
  8042. var oldListeners = vm.$options._parentListeners;
  8043. vm.$options._parentListeners = listeners;
  8044. updateComponentListeners(vm, listeners, oldListeners);
  8045. // resolve slots + force update if has children
  8046. if (needsForceUpdate) {
  8047. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8048. vm.$forceUpdate();
  8049. }
  8050. if (true) {
  8051. isUpdatingChildComponent = false;
  8052. }
  8053. }
  8054. function isInInactiveTree (vm) {
  8055. while (vm && (vm = vm.$parent)) {
  8056. if (vm._inactive) { return true }
  8057. }
  8058. return false
  8059. }
  8060. function activateChildComponent (vm, direct) {
  8061. if (direct) {
  8062. vm._directInactive = false;
  8063. if (isInInactiveTree(vm)) {
  8064. return
  8065. }
  8066. } else if (vm._directInactive) {
  8067. return
  8068. }
  8069. if (vm._inactive || vm._inactive === null) {
  8070. vm._inactive = false;
  8071. for (var i = 0; i < vm.$children.length; i++) {
  8072. activateChildComponent(vm.$children[i]);
  8073. }
  8074. callHook(vm, 'activated');
  8075. }
  8076. }
  8077. function deactivateChildComponent (vm, direct) {
  8078. if (direct) {
  8079. vm._directInactive = true;
  8080. if (isInInactiveTree(vm)) {
  8081. return
  8082. }
  8083. }
  8084. if (!vm._inactive) {
  8085. vm._inactive = true;
  8086. for (var i = 0; i < vm.$children.length; i++) {
  8087. deactivateChildComponent(vm.$children[i]);
  8088. }
  8089. callHook(vm, 'deactivated');
  8090. }
  8091. }
  8092. function callHook (vm, hook) {
  8093. // #7573 disable dep collection when invoking lifecycle hooks
  8094. pushTarget();
  8095. var handlers = vm.$options[hook];
  8096. var info = hook + " hook";
  8097. if (handlers) {
  8098. for (var i = 0, j = handlers.length; i < j; i++) {
  8099. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8100. }
  8101. }
  8102. if (vm._hasHookEvent) {
  8103. vm.$emit('hook:' + hook);
  8104. }
  8105. popTarget();
  8106. }
  8107. /* */
  8108. var MAX_UPDATE_COUNT = 100;
  8109. var queue = [];
  8110. var activatedChildren = [];
  8111. var has = {};
  8112. var circular = {};
  8113. var waiting = false;
  8114. var flushing = false;
  8115. var index = 0;
  8116. /**
  8117. * Reset the scheduler's state.
  8118. */
  8119. function resetSchedulerState () {
  8120. index = queue.length = activatedChildren.length = 0;
  8121. has = {};
  8122. if (true) {
  8123. circular = {};
  8124. }
  8125. waiting = flushing = false;
  8126. }
  8127. // Async edge case #6566 requires saving the timestamp when event listeners are
  8128. // attached. However, calling performance.now() has a perf overhead especially
  8129. // if the page has thousands of event listeners. Instead, we take a timestamp
  8130. // every time the scheduler flushes and use that for all event listeners
  8131. // attached during that flush.
  8132. var currentFlushTimestamp = 0;
  8133. // Async edge case fix requires storing an event listener's attach timestamp.
  8134. var getNow = Date.now;
  8135. // Determine what event timestamp the browser is using. Annoyingly, the
  8136. // timestamp can either be hi-res (relative to page load) or low-res
  8137. // (relative to UNIX epoch), so in order to compare time we have to use the
  8138. // same timestamp type when saving the flush timestamp.
  8139. // All IE versions use low-res event timestamps, and have problematic clock
  8140. // implementations (#9632)
  8141. if (inBrowser && !isIE) {
  8142. var performance = window.performance;
  8143. if (
  8144. performance &&
  8145. typeof performance.now === 'function' &&
  8146. getNow() > document.createEvent('Event').timeStamp
  8147. ) {
  8148. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8149. // smaller than it, it means the event is using a hi-res timestamp,
  8150. // and we need to use the hi-res version for event listener timestamps as
  8151. // well.
  8152. getNow = function () { return performance.now(); };
  8153. }
  8154. }
  8155. /**
  8156. * Flush both queues and run the watchers.
  8157. */
  8158. function flushSchedulerQueue () {
  8159. currentFlushTimestamp = getNow();
  8160. flushing = true;
  8161. var watcher, id;
  8162. // Sort queue before flush.
  8163. // This ensures that:
  8164. // 1. Components are updated from parent to child. (because parent is always
  8165. // created before the child)
  8166. // 2. A component's user watchers are run before its render watcher (because
  8167. // user watchers are created before the render watcher)
  8168. // 3. If a component is destroyed during a parent component's watcher run,
  8169. // its watchers can be skipped.
  8170. queue.sort(function (a, b) { return a.id - b.id; });
  8171. // do not cache length because more watchers might be pushed
  8172. // as we run existing watchers
  8173. for (index = 0; index < queue.length; index++) {
  8174. watcher = queue[index];
  8175. if (watcher.before) {
  8176. watcher.before();
  8177. }
  8178. id = watcher.id;
  8179. has[id] = null;
  8180. watcher.run();
  8181. // in dev build, check and stop circular updates.
  8182. if ( true && has[id] != null) {
  8183. circular[id] = (circular[id] || 0) + 1;
  8184. if (circular[id] > MAX_UPDATE_COUNT) {
  8185. warn(
  8186. 'You may have an infinite update loop ' + (
  8187. watcher.user
  8188. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8189. : "in a component render function."
  8190. ),
  8191. watcher.vm
  8192. );
  8193. break
  8194. }
  8195. }
  8196. }
  8197. // keep copies of post queues before resetting state
  8198. var activatedQueue = activatedChildren.slice();
  8199. var updatedQueue = queue.slice();
  8200. resetSchedulerState();
  8201. // call component updated and activated hooks
  8202. callActivatedHooks(activatedQueue);
  8203. callUpdatedHooks(updatedQueue);
  8204. // devtool hook
  8205. /* istanbul ignore if */
  8206. if (devtools && config.devtools) {
  8207. devtools.emit('flush');
  8208. }
  8209. }
  8210. function callUpdatedHooks (queue) {
  8211. var i = queue.length;
  8212. while (i--) {
  8213. var watcher = queue[i];
  8214. var vm = watcher.vm;
  8215. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8216. callHook(vm, 'updated');
  8217. }
  8218. }
  8219. }
  8220. /**
  8221. * Queue a kept-alive component that was activated during patch.
  8222. * The queue will be processed after the entire tree has been patched.
  8223. */
  8224. function queueActivatedComponent (vm) {
  8225. // setting _inactive to false here so that a render function can
  8226. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8227. vm._inactive = false;
  8228. activatedChildren.push(vm);
  8229. }
  8230. function callActivatedHooks (queue) {
  8231. for (var i = 0; i < queue.length; i++) {
  8232. queue[i]._inactive = true;
  8233. activateChildComponent(queue[i], true /* true */);
  8234. }
  8235. }
  8236. /**
  8237. * Push a watcher into the watcher queue.
  8238. * Jobs with duplicate IDs will be skipped unless it's
  8239. * pushed when the queue is being flushed.
  8240. */
  8241. function queueWatcher (watcher) {
  8242. var id = watcher.id;
  8243. if (has[id] == null) {
  8244. has[id] = true;
  8245. if (!flushing) {
  8246. queue.push(watcher);
  8247. } else {
  8248. // if already flushing, splice the watcher based on its id
  8249. // if already past its id, it will be run next immediately.
  8250. var i = queue.length - 1;
  8251. while (i > index && queue[i].id > watcher.id) {
  8252. i--;
  8253. }
  8254. queue.splice(i + 1, 0, watcher);
  8255. }
  8256. // queue the flush
  8257. if (!waiting) {
  8258. waiting = true;
  8259. if ( true && !config.async) {
  8260. flushSchedulerQueue();
  8261. return
  8262. }
  8263. nextTick(flushSchedulerQueue);
  8264. }
  8265. }
  8266. }
  8267. /* */
  8268. var uid$2 = 0;
  8269. /**
  8270. * A watcher parses an expression, collects dependencies,
  8271. * and fires callback when the expression value changes.
  8272. * This is used for both the $watch() api and directives.
  8273. */
  8274. var Watcher = function Watcher (
  8275. vm,
  8276. expOrFn,
  8277. cb,
  8278. options,
  8279. isRenderWatcher
  8280. ) {
  8281. this.vm = vm;
  8282. if (isRenderWatcher) {
  8283. vm._watcher = this;
  8284. }
  8285. vm._watchers.push(this);
  8286. // options
  8287. if (options) {
  8288. this.deep = !!options.deep;
  8289. this.user = !!options.user;
  8290. this.lazy = !!options.lazy;
  8291. this.sync = !!options.sync;
  8292. this.before = options.before;
  8293. } else {
  8294. this.deep = this.user = this.lazy = this.sync = false;
  8295. }
  8296. this.cb = cb;
  8297. this.id = ++uid$2; // uid for batching
  8298. this.active = true;
  8299. this.dirty = this.lazy; // for lazy watchers
  8300. this.deps = [];
  8301. this.newDeps = [];
  8302. this.depIds = new _Set();
  8303. this.newDepIds = new _Set();
  8304. this.expression = true
  8305. ? expOrFn.toString()
  8306. : undefined;
  8307. // parse expression for getter
  8308. if (typeof expOrFn === 'function') {
  8309. this.getter = expOrFn;
  8310. } else {
  8311. this.getter = parsePath(expOrFn);
  8312. if (!this.getter) {
  8313. this.getter = noop;
  8314. true && warn(
  8315. "Failed watching path: \"" + expOrFn + "\" " +
  8316. 'Watcher only accepts simple dot-delimited paths. ' +
  8317. 'For full control, use a function instead.',
  8318. vm
  8319. );
  8320. }
  8321. }
  8322. this.value = this.lazy
  8323. ? undefined
  8324. : this.get();
  8325. };
  8326. /**
  8327. * Evaluate the getter, and re-collect dependencies.
  8328. */
  8329. Watcher.prototype.get = function get () {
  8330. pushTarget(this);
  8331. var value;
  8332. var vm = this.vm;
  8333. try {
  8334. value = this.getter.call(vm, vm);
  8335. } catch (e) {
  8336. if (this.user) {
  8337. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8338. } else {
  8339. throw e
  8340. }
  8341. } finally {
  8342. // "touch" every property so they are all tracked as
  8343. // dependencies for deep watching
  8344. if (this.deep) {
  8345. traverse(value);
  8346. }
  8347. popTarget();
  8348. this.cleanupDeps();
  8349. }
  8350. return value
  8351. };
  8352. /**
  8353. * Add a dependency to this directive.
  8354. */
  8355. Watcher.prototype.addDep = function addDep (dep) {
  8356. var id = dep.id;
  8357. if (!this.newDepIds.has(id)) {
  8358. this.newDepIds.add(id);
  8359. this.newDeps.push(dep);
  8360. if (!this.depIds.has(id)) {
  8361. dep.addSub(this);
  8362. }
  8363. }
  8364. };
  8365. /**
  8366. * Clean up for dependency collection.
  8367. */
  8368. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8369. var i = this.deps.length;
  8370. while (i--) {
  8371. var dep = this.deps[i];
  8372. if (!this.newDepIds.has(dep.id)) {
  8373. dep.removeSub(this);
  8374. }
  8375. }
  8376. var tmp = this.depIds;
  8377. this.depIds = this.newDepIds;
  8378. this.newDepIds = tmp;
  8379. this.newDepIds.clear();
  8380. tmp = this.deps;
  8381. this.deps = this.newDeps;
  8382. this.newDeps = tmp;
  8383. this.newDeps.length = 0;
  8384. };
  8385. /**
  8386. * Subscriber interface.
  8387. * Will be called when a dependency changes.
  8388. */
  8389. Watcher.prototype.update = function update () {
  8390. /* istanbul ignore else */
  8391. if (this.lazy) {
  8392. this.dirty = true;
  8393. } else if (this.sync) {
  8394. this.run();
  8395. } else {
  8396. queueWatcher(this);
  8397. }
  8398. };
  8399. /**
  8400. * Scheduler job interface.
  8401. * Will be called by the scheduler.
  8402. */
  8403. Watcher.prototype.run = function run () {
  8404. if (this.active) {
  8405. var value = this.get();
  8406. if (
  8407. value !== this.value ||
  8408. // Deep watchers and watchers on Object/Arrays should fire even
  8409. // when the value is the same, because the value may
  8410. // have mutated.
  8411. isObject(value) ||
  8412. this.deep
  8413. ) {
  8414. // set new value
  8415. var oldValue = this.value;
  8416. this.value = value;
  8417. if (this.user) {
  8418. try {
  8419. this.cb.call(this.vm, value, oldValue);
  8420. } catch (e) {
  8421. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8422. }
  8423. } else {
  8424. this.cb.call(this.vm, value, oldValue);
  8425. }
  8426. }
  8427. }
  8428. };
  8429. /**
  8430. * Evaluate the value of the watcher.
  8431. * This only gets called for lazy watchers.
  8432. */
  8433. Watcher.prototype.evaluate = function evaluate () {
  8434. this.value = this.get();
  8435. this.dirty = false;
  8436. };
  8437. /**
  8438. * Depend on all deps collected by this watcher.
  8439. */
  8440. Watcher.prototype.depend = function depend () {
  8441. var i = this.deps.length;
  8442. while (i--) {
  8443. this.deps[i].depend();
  8444. }
  8445. };
  8446. /**
  8447. * Remove self from all dependencies' subscriber list.
  8448. */
  8449. Watcher.prototype.teardown = function teardown () {
  8450. if (this.active) {
  8451. // remove self from vm's watcher list
  8452. // this is a somewhat expensive operation so we skip it
  8453. // if the vm is being destroyed.
  8454. if (!this.vm._isBeingDestroyed) {
  8455. remove(this.vm._watchers, this);
  8456. }
  8457. var i = this.deps.length;
  8458. while (i--) {
  8459. this.deps[i].removeSub(this);
  8460. }
  8461. this.active = false;
  8462. }
  8463. };
  8464. /* */
  8465. var sharedPropertyDefinition = {
  8466. enumerable: true,
  8467. configurable: true,
  8468. get: noop,
  8469. set: noop
  8470. };
  8471. function proxy (target, sourceKey, key) {
  8472. sharedPropertyDefinition.get = function proxyGetter () {
  8473. return this[sourceKey][key]
  8474. };
  8475. sharedPropertyDefinition.set = function proxySetter (val) {
  8476. this[sourceKey][key] = val;
  8477. };
  8478. Object.defineProperty(target, key, sharedPropertyDefinition);
  8479. }
  8480. function initState (vm) {
  8481. vm._watchers = [];
  8482. var opts = vm.$options;
  8483. if (opts.props) { initProps(vm, opts.props); }
  8484. if (opts.methods) { initMethods(vm, opts.methods); }
  8485. if (opts.data) {
  8486. initData(vm);
  8487. } else {
  8488. observe(vm._data = {}, true /* asRootData */);
  8489. }
  8490. if (opts.computed) { initComputed(vm, opts.computed); }
  8491. if (opts.watch && opts.watch !== nativeWatch) {
  8492. initWatch(vm, opts.watch);
  8493. }
  8494. }
  8495. function initProps (vm, propsOptions) {
  8496. var propsData = vm.$options.propsData || {};
  8497. var props = vm._props = {};
  8498. // cache prop keys so that future props updates can iterate using Array
  8499. // instead of dynamic object key enumeration.
  8500. var keys = vm.$options._propKeys = [];
  8501. var isRoot = !vm.$parent;
  8502. // root instance props should be converted
  8503. if (!isRoot) {
  8504. toggleObserving(false);
  8505. }
  8506. var loop = function ( key ) {
  8507. keys.push(key);
  8508. var value = validateProp(key, propsOptions, propsData, vm);
  8509. /* istanbul ignore else */
  8510. if (true) {
  8511. var hyphenatedKey = hyphenate(key);
  8512. if (isReservedAttribute(hyphenatedKey) ||
  8513. config.isReservedAttr(hyphenatedKey)) {
  8514. warn(
  8515. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8516. vm
  8517. );
  8518. }
  8519. defineReactive$$1(props, key, value, function () {
  8520. if (!isRoot && !isUpdatingChildComponent) {
  8521. {
  8522. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8523. return
  8524. }
  8525. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8526. if(
  8527. key === 'value' &&
  8528. Array.isArray(vm.$options.behaviors) &&
  8529. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8530. ){
  8531. return
  8532. }
  8533. if(vm._getFormData){
  8534. return
  8535. }
  8536. var $parent = vm.$parent;
  8537. while($parent){
  8538. if($parent.__next_tick_pending){
  8539. return
  8540. }
  8541. $parent = $parent.$parent;
  8542. }
  8543. }
  8544. warn(
  8545. "Avoid mutating a prop directly since the value will be " +
  8546. "overwritten whenever the parent component re-renders. " +
  8547. "Instead, use a data or computed property based on the prop's " +
  8548. "value. Prop being mutated: \"" + key + "\"",
  8549. vm
  8550. );
  8551. }
  8552. });
  8553. } else {}
  8554. // static props are already proxied on the component's prototype
  8555. // during Vue.extend(). We only need to proxy props defined at
  8556. // instantiation here.
  8557. if (!(key in vm)) {
  8558. proxy(vm, "_props", key);
  8559. }
  8560. };
  8561. for (var key in propsOptions) loop( key );
  8562. toggleObserving(true);
  8563. }
  8564. function initData (vm) {
  8565. var data = vm.$options.data;
  8566. data = vm._data = typeof data === 'function'
  8567. ? getData(data, vm)
  8568. : data || {};
  8569. if (!isPlainObject(data)) {
  8570. data = {};
  8571. true && warn(
  8572. 'data functions should return an object:\n' +
  8573. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8574. vm
  8575. );
  8576. }
  8577. // proxy data on instance
  8578. var keys = Object.keys(data);
  8579. var props = vm.$options.props;
  8580. var methods = vm.$options.methods;
  8581. var i = keys.length;
  8582. while (i--) {
  8583. var key = keys[i];
  8584. if (true) {
  8585. if (methods && hasOwn(methods, key)) {
  8586. warn(
  8587. ("Method \"" + key + "\" has already been defined as a data property."),
  8588. vm
  8589. );
  8590. }
  8591. }
  8592. if (props && hasOwn(props, key)) {
  8593. true && warn(
  8594. "The data property \"" + key + "\" is already declared as a prop. " +
  8595. "Use prop default value instead.",
  8596. vm
  8597. );
  8598. } else if (!isReserved(key)) {
  8599. proxy(vm, "_data", key);
  8600. }
  8601. }
  8602. // observe data
  8603. observe(data, true /* asRootData */);
  8604. }
  8605. function getData (data, vm) {
  8606. // #7573 disable dep collection when invoking data getters
  8607. pushTarget();
  8608. try {
  8609. return data.call(vm, vm)
  8610. } catch (e) {
  8611. handleError(e, vm, "data()");
  8612. return {}
  8613. } finally {
  8614. popTarget();
  8615. }
  8616. }
  8617. var computedWatcherOptions = { lazy: true };
  8618. function initComputed (vm, computed) {
  8619. // $flow-disable-line
  8620. var watchers = vm._computedWatchers = Object.create(null);
  8621. // computed properties are just getters during SSR
  8622. var isSSR = isServerRendering();
  8623. for (var key in computed) {
  8624. var userDef = computed[key];
  8625. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8626. if ( true && getter == null) {
  8627. warn(
  8628. ("Getter is missing for computed property \"" + key + "\"."),
  8629. vm
  8630. );
  8631. }
  8632. if (!isSSR) {
  8633. // create internal watcher for the computed property.
  8634. watchers[key] = new Watcher(
  8635. vm,
  8636. getter || noop,
  8637. noop,
  8638. computedWatcherOptions
  8639. );
  8640. }
  8641. // component-defined computed properties are already defined on the
  8642. // component prototype. We only need to define computed properties defined
  8643. // at instantiation here.
  8644. if (!(key in vm)) {
  8645. defineComputed(vm, key, userDef);
  8646. } else if (true) {
  8647. if (key in vm.$data) {
  8648. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8649. } else if (vm.$options.props && key in vm.$options.props) {
  8650. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8651. }
  8652. }
  8653. }
  8654. }
  8655. function defineComputed (
  8656. target,
  8657. key,
  8658. userDef
  8659. ) {
  8660. var shouldCache = !isServerRendering();
  8661. if (typeof userDef === 'function') {
  8662. sharedPropertyDefinition.get = shouldCache
  8663. ? createComputedGetter(key)
  8664. : createGetterInvoker(userDef);
  8665. sharedPropertyDefinition.set = noop;
  8666. } else {
  8667. sharedPropertyDefinition.get = userDef.get
  8668. ? shouldCache && userDef.cache !== false
  8669. ? createComputedGetter(key)
  8670. : createGetterInvoker(userDef.get)
  8671. : noop;
  8672. sharedPropertyDefinition.set = userDef.set || noop;
  8673. }
  8674. if ( true &&
  8675. sharedPropertyDefinition.set === noop) {
  8676. sharedPropertyDefinition.set = function () {
  8677. warn(
  8678. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8679. this
  8680. );
  8681. };
  8682. }
  8683. Object.defineProperty(target, key, sharedPropertyDefinition);
  8684. }
  8685. function createComputedGetter (key) {
  8686. return function computedGetter () {
  8687. var watcher = this._computedWatchers && this._computedWatchers[key];
  8688. if (watcher) {
  8689. if (watcher.dirty) {
  8690. watcher.evaluate();
  8691. }
  8692. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8693. watcher.depend();
  8694. }
  8695. return watcher.value
  8696. }
  8697. }
  8698. }
  8699. function createGetterInvoker(fn) {
  8700. return function computedGetter () {
  8701. return fn.call(this, this)
  8702. }
  8703. }
  8704. function initMethods (vm, methods) {
  8705. var props = vm.$options.props;
  8706. for (var key in methods) {
  8707. if (true) {
  8708. if (typeof methods[key] !== 'function') {
  8709. warn(
  8710. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8711. "Did you reference the function correctly?",
  8712. vm
  8713. );
  8714. }
  8715. if (props && hasOwn(props, key)) {
  8716. warn(
  8717. ("Method \"" + key + "\" has already been defined as a prop."),
  8718. vm
  8719. );
  8720. }
  8721. if ((key in vm) && isReserved(key)) {
  8722. warn(
  8723. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8724. "Avoid defining component methods that start with _ or $."
  8725. );
  8726. }
  8727. }
  8728. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8729. }
  8730. }
  8731. function initWatch (vm, watch) {
  8732. for (var key in watch) {
  8733. var handler = watch[key];
  8734. if (Array.isArray(handler)) {
  8735. for (var i = 0; i < handler.length; i++) {
  8736. createWatcher(vm, key, handler[i]);
  8737. }
  8738. } else {
  8739. createWatcher(vm, key, handler);
  8740. }
  8741. }
  8742. }
  8743. function createWatcher (
  8744. vm,
  8745. expOrFn,
  8746. handler,
  8747. options
  8748. ) {
  8749. if (isPlainObject(handler)) {
  8750. options = handler;
  8751. handler = handler.handler;
  8752. }
  8753. if (typeof handler === 'string') {
  8754. handler = vm[handler];
  8755. }
  8756. return vm.$watch(expOrFn, handler, options)
  8757. }
  8758. function stateMixin (Vue) {
  8759. // flow somehow has problems with directly declared definition object
  8760. // when using Object.defineProperty, so we have to procedurally build up
  8761. // the object here.
  8762. var dataDef = {};
  8763. dataDef.get = function () { return this._data };
  8764. var propsDef = {};
  8765. propsDef.get = function () { return this._props };
  8766. if (true) {
  8767. dataDef.set = function () {
  8768. warn(
  8769. 'Avoid replacing instance root $data. ' +
  8770. 'Use nested data properties instead.',
  8771. this
  8772. );
  8773. };
  8774. propsDef.set = function () {
  8775. warn("$props is readonly.", this);
  8776. };
  8777. }
  8778. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8779. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8780. Vue.prototype.$set = set;
  8781. Vue.prototype.$delete = del;
  8782. Vue.prototype.$watch = function (
  8783. expOrFn,
  8784. cb,
  8785. options
  8786. ) {
  8787. var vm = this;
  8788. if (isPlainObject(cb)) {
  8789. return createWatcher(vm, expOrFn, cb, options)
  8790. }
  8791. options = options || {};
  8792. options.user = true;
  8793. var watcher = new Watcher(vm, expOrFn, cb, options);
  8794. if (options.immediate) {
  8795. try {
  8796. cb.call(vm, watcher.value);
  8797. } catch (error) {
  8798. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8799. }
  8800. }
  8801. return function unwatchFn () {
  8802. watcher.teardown();
  8803. }
  8804. };
  8805. }
  8806. /* */
  8807. var uid$3 = 0;
  8808. function initMixin (Vue) {
  8809. Vue.prototype._init = function (options) {
  8810. var vm = this;
  8811. // a uid
  8812. vm._uid = uid$3++;
  8813. var startTag, endTag;
  8814. /* istanbul ignore if */
  8815. if ( true && config.performance && mark) {
  8816. startTag = "vue-perf-start:" + (vm._uid);
  8817. endTag = "vue-perf-end:" + (vm._uid);
  8818. mark(startTag);
  8819. }
  8820. // a flag to avoid this being observed
  8821. vm._isVue = true;
  8822. // merge options
  8823. if (options && options._isComponent) {
  8824. // optimize internal component instantiation
  8825. // since dynamic options merging is pretty slow, and none of the
  8826. // internal component options needs special treatment.
  8827. initInternalComponent(vm, options);
  8828. } else {
  8829. vm.$options = mergeOptions(
  8830. resolveConstructorOptions(vm.constructor),
  8831. options || {},
  8832. vm
  8833. );
  8834. }
  8835. /* istanbul ignore else */
  8836. if (true) {
  8837. initProxy(vm);
  8838. } else {}
  8839. // expose real self
  8840. vm._self = vm;
  8841. initLifecycle(vm);
  8842. initEvents(vm);
  8843. initRender(vm);
  8844. callHook(vm, 'beforeCreate');
  8845. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8846. initState(vm);
  8847. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8848. !vm._$fallback && callHook(vm, 'created');
  8849. /* istanbul ignore if */
  8850. if ( true && config.performance && mark) {
  8851. vm._name = formatComponentName(vm, false);
  8852. mark(endTag);
  8853. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8854. }
  8855. if (vm.$options.el) {
  8856. vm.$mount(vm.$options.el);
  8857. }
  8858. };
  8859. }
  8860. function initInternalComponent (vm, options) {
  8861. var opts = vm.$options = Object.create(vm.constructor.options);
  8862. // doing this because it's faster than dynamic enumeration.
  8863. var parentVnode = options._parentVnode;
  8864. opts.parent = options.parent;
  8865. opts._parentVnode = parentVnode;
  8866. var vnodeComponentOptions = parentVnode.componentOptions;
  8867. opts.propsData = vnodeComponentOptions.propsData;
  8868. opts._parentListeners = vnodeComponentOptions.listeners;
  8869. opts._renderChildren = vnodeComponentOptions.children;
  8870. opts._componentTag = vnodeComponentOptions.tag;
  8871. if (options.render) {
  8872. opts.render = options.render;
  8873. opts.staticRenderFns = options.staticRenderFns;
  8874. }
  8875. }
  8876. function resolveConstructorOptions (Ctor) {
  8877. var options = Ctor.options;
  8878. if (Ctor.super) {
  8879. var superOptions = resolveConstructorOptions(Ctor.super);
  8880. var cachedSuperOptions = Ctor.superOptions;
  8881. if (superOptions !== cachedSuperOptions) {
  8882. // super option changed,
  8883. // need to resolve new options.
  8884. Ctor.superOptions = superOptions;
  8885. // check if there are any late-modified/attached options (#4976)
  8886. var modifiedOptions = resolveModifiedOptions(Ctor);
  8887. // update base extend options
  8888. if (modifiedOptions) {
  8889. extend(Ctor.extendOptions, modifiedOptions);
  8890. }
  8891. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8892. if (options.name) {
  8893. options.components[options.name] = Ctor;
  8894. }
  8895. }
  8896. }
  8897. return options
  8898. }
  8899. function resolveModifiedOptions (Ctor) {
  8900. var modified;
  8901. var latest = Ctor.options;
  8902. var sealed = Ctor.sealedOptions;
  8903. for (var key in latest) {
  8904. if (latest[key] !== sealed[key]) {
  8905. if (!modified) { modified = {}; }
  8906. modified[key] = latest[key];
  8907. }
  8908. }
  8909. return modified
  8910. }
  8911. function Vue (options) {
  8912. if ( true &&
  8913. !(this instanceof Vue)
  8914. ) {
  8915. warn('Vue is a constructor and should be called with the `new` keyword');
  8916. }
  8917. this._init(options);
  8918. }
  8919. initMixin(Vue);
  8920. stateMixin(Vue);
  8921. eventsMixin(Vue);
  8922. lifecycleMixin(Vue);
  8923. renderMixin(Vue);
  8924. /* */
  8925. function initUse (Vue) {
  8926. Vue.use = function (plugin) {
  8927. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8928. if (installedPlugins.indexOf(plugin) > -1) {
  8929. return this
  8930. }
  8931. // additional parameters
  8932. var args = toArray(arguments, 1);
  8933. args.unshift(this);
  8934. if (typeof plugin.install === 'function') {
  8935. plugin.install.apply(plugin, args);
  8936. } else if (typeof plugin === 'function') {
  8937. plugin.apply(null, args);
  8938. }
  8939. installedPlugins.push(plugin);
  8940. return this
  8941. };
  8942. }
  8943. /* */
  8944. function initMixin$1 (Vue) {
  8945. Vue.mixin = function (mixin) {
  8946. this.options = mergeOptions(this.options, mixin);
  8947. return this
  8948. };
  8949. }
  8950. /* */
  8951. function initExtend (Vue) {
  8952. /**
  8953. * Each instance constructor, including Vue, has a unique
  8954. * cid. This enables us to create wrapped "child
  8955. * constructors" for prototypal inheritance and cache them.
  8956. */
  8957. Vue.cid = 0;
  8958. var cid = 1;
  8959. /**
  8960. * Class inheritance
  8961. */
  8962. Vue.extend = function (extendOptions) {
  8963. extendOptions = extendOptions || {};
  8964. var Super = this;
  8965. var SuperId = Super.cid;
  8966. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8967. if (cachedCtors[SuperId]) {
  8968. return cachedCtors[SuperId]
  8969. }
  8970. var name = extendOptions.name || Super.options.name;
  8971. if ( true && name) {
  8972. validateComponentName(name);
  8973. }
  8974. var Sub = function VueComponent (options) {
  8975. this._init(options);
  8976. };
  8977. Sub.prototype = Object.create(Super.prototype);
  8978. Sub.prototype.constructor = Sub;
  8979. Sub.cid = cid++;
  8980. Sub.options = mergeOptions(
  8981. Super.options,
  8982. extendOptions
  8983. );
  8984. Sub['super'] = Super;
  8985. // For props and computed properties, we define the proxy getters on
  8986. // the Vue instances at extension time, on the extended prototype. This
  8987. // avoids Object.defineProperty calls for each instance created.
  8988. if (Sub.options.props) {
  8989. initProps$1(Sub);
  8990. }
  8991. if (Sub.options.computed) {
  8992. initComputed$1(Sub);
  8993. }
  8994. // allow further extension/mixin/plugin usage
  8995. Sub.extend = Super.extend;
  8996. Sub.mixin = Super.mixin;
  8997. Sub.use = Super.use;
  8998. // create asset registers, so extended classes
  8999. // can have their private assets too.
  9000. ASSET_TYPES.forEach(function (type) {
  9001. Sub[type] = Super[type];
  9002. });
  9003. // enable recursive self-lookup
  9004. if (name) {
  9005. Sub.options.components[name] = Sub;
  9006. }
  9007. // keep a reference to the super options at extension time.
  9008. // later at instantiation we can check if Super's options have
  9009. // been updated.
  9010. Sub.superOptions = Super.options;
  9011. Sub.extendOptions = extendOptions;
  9012. Sub.sealedOptions = extend({}, Sub.options);
  9013. // cache constructor
  9014. cachedCtors[SuperId] = Sub;
  9015. return Sub
  9016. };
  9017. }
  9018. function initProps$1 (Comp) {
  9019. var props = Comp.options.props;
  9020. for (var key in props) {
  9021. proxy(Comp.prototype, "_props", key);
  9022. }
  9023. }
  9024. function initComputed$1 (Comp) {
  9025. var computed = Comp.options.computed;
  9026. for (var key in computed) {
  9027. defineComputed(Comp.prototype, key, computed[key]);
  9028. }
  9029. }
  9030. /* */
  9031. function initAssetRegisters (Vue) {
  9032. /**
  9033. * Create asset registration methods.
  9034. */
  9035. ASSET_TYPES.forEach(function (type) {
  9036. Vue[type] = function (
  9037. id,
  9038. definition
  9039. ) {
  9040. if (!definition) {
  9041. return this.options[type + 's'][id]
  9042. } else {
  9043. /* istanbul ignore if */
  9044. if ( true && type === 'component') {
  9045. validateComponentName(id);
  9046. }
  9047. if (type === 'component' && isPlainObject(definition)) {
  9048. definition.name = definition.name || id;
  9049. definition = this.options._base.extend(definition);
  9050. }
  9051. if (type === 'directive' && typeof definition === 'function') {
  9052. definition = { bind: definition, update: definition };
  9053. }
  9054. this.options[type + 's'][id] = definition;
  9055. return definition
  9056. }
  9057. };
  9058. });
  9059. }
  9060. /* */
  9061. function getComponentName (opts) {
  9062. return opts && (opts.Ctor.options.name || opts.tag)
  9063. }
  9064. function matches (pattern, name) {
  9065. if (Array.isArray(pattern)) {
  9066. return pattern.indexOf(name) > -1
  9067. } else if (typeof pattern === 'string') {
  9068. return pattern.split(',').indexOf(name) > -1
  9069. } else if (isRegExp(pattern)) {
  9070. return pattern.test(name)
  9071. }
  9072. /* istanbul ignore next */
  9073. return false
  9074. }
  9075. function pruneCache (keepAliveInstance, filter) {
  9076. var cache = keepAliveInstance.cache;
  9077. var keys = keepAliveInstance.keys;
  9078. var _vnode = keepAliveInstance._vnode;
  9079. for (var key in cache) {
  9080. var cachedNode = cache[key];
  9081. if (cachedNode) {
  9082. var name = getComponentName(cachedNode.componentOptions);
  9083. if (name && !filter(name)) {
  9084. pruneCacheEntry(cache, key, keys, _vnode);
  9085. }
  9086. }
  9087. }
  9088. }
  9089. function pruneCacheEntry (
  9090. cache,
  9091. key,
  9092. keys,
  9093. current
  9094. ) {
  9095. var cached$$1 = cache[key];
  9096. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9097. cached$$1.componentInstance.$destroy();
  9098. }
  9099. cache[key] = null;
  9100. remove(keys, key);
  9101. }
  9102. var patternTypes = [String, RegExp, Array];
  9103. var KeepAlive = {
  9104. name: 'keep-alive',
  9105. abstract: true,
  9106. props: {
  9107. include: patternTypes,
  9108. exclude: patternTypes,
  9109. max: [String, Number]
  9110. },
  9111. created: function created () {
  9112. this.cache = Object.create(null);
  9113. this.keys = [];
  9114. },
  9115. destroyed: function destroyed () {
  9116. for (var key in this.cache) {
  9117. pruneCacheEntry(this.cache, key, this.keys);
  9118. }
  9119. },
  9120. mounted: function mounted () {
  9121. var this$1 = this;
  9122. this.$watch('include', function (val) {
  9123. pruneCache(this$1, function (name) { return matches(val, name); });
  9124. });
  9125. this.$watch('exclude', function (val) {
  9126. pruneCache(this$1, function (name) { return !matches(val, name); });
  9127. });
  9128. },
  9129. render: function render () {
  9130. var slot = this.$slots.default;
  9131. var vnode = getFirstComponentChild(slot);
  9132. var componentOptions = vnode && vnode.componentOptions;
  9133. if (componentOptions) {
  9134. // check pattern
  9135. var name = getComponentName(componentOptions);
  9136. var ref = this;
  9137. var include = ref.include;
  9138. var exclude = ref.exclude;
  9139. if (
  9140. // not included
  9141. (include && (!name || !matches(include, name))) ||
  9142. // excluded
  9143. (exclude && name && matches(exclude, name))
  9144. ) {
  9145. return vnode
  9146. }
  9147. var ref$1 = this;
  9148. var cache = ref$1.cache;
  9149. var keys = ref$1.keys;
  9150. var key = vnode.key == null
  9151. // same constructor may get registered as different local components
  9152. // so cid alone is not enough (#3269)
  9153. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9154. : vnode.key;
  9155. if (cache[key]) {
  9156. vnode.componentInstance = cache[key].componentInstance;
  9157. // make current key freshest
  9158. remove(keys, key);
  9159. keys.push(key);
  9160. } else {
  9161. cache[key] = vnode;
  9162. keys.push(key);
  9163. // prune oldest entry
  9164. if (this.max && keys.length > parseInt(this.max)) {
  9165. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9166. }
  9167. }
  9168. vnode.data.keepAlive = true;
  9169. }
  9170. return vnode || (slot && slot[0])
  9171. }
  9172. };
  9173. var builtInComponents = {
  9174. KeepAlive: KeepAlive
  9175. };
  9176. /* */
  9177. function initGlobalAPI (Vue) {
  9178. // config
  9179. var configDef = {};
  9180. configDef.get = function () { return config; };
  9181. if (true) {
  9182. configDef.set = function () {
  9183. warn(
  9184. 'Do not replace the Vue.config object, set individual fields instead.'
  9185. );
  9186. };
  9187. }
  9188. Object.defineProperty(Vue, 'config', configDef);
  9189. // exposed util methods.
  9190. // NOTE: these are not considered part of the public API - avoid relying on
  9191. // them unless you are aware of the risk.
  9192. Vue.util = {
  9193. warn: warn,
  9194. extend: extend,
  9195. mergeOptions: mergeOptions,
  9196. defineReactive: defineReactive$$1
  9197. };
  9198. Vue.set = set;
  9199. Vue.delete = del;
  9200. Vue.nextTick = nextTick;
  9201. // 2.6 explicit observable API
  9202. Vue.observable = function (obj) {
  9203. observe(obj);
  9204. return obj
  9205. };
  9206. Vue.options = Object.create(null);
  9207. ASSET_TYPES.forEach(function (type) {
  9208. Vue.options[type + 's'] = Object.create(null);
  9209. });
  9210. // this is used to identify the "base" constructor to extend all plain-object
  9211. // components with in Weex's multi-instance scenarios.
  9212. Vue.options._base = Vue;
  9213. extend(Vue.options.components, builtInComponents);
  9214. initUse(Vue);
  9215. initMixin$1(Vue);
  9216. initExtend(Vue);
  9217. initAssetRegisters(Vue);
  9218. }
  9219. initGlobalAPI(Vue);
  9220. Object.defineProperty(Vue.prototype, '$isServer', {
  9221. get: isServerRendering
  9222. });
  9223. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9224. get: function get () {
  9225. /* istanbul ignore next */
  9226. return this.$vnode && this.$vnode.ssrContext
  9227. }
  9228. });
  9229. // expose FunctionalRenderContext for ssr runtime helper installation
  9230. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9231. value: FunctionalRenderContext
  9232. });
  9233. Vue.version = '2.6.11';
  9234. /**
  9235. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9236. */
  9237. var ARRAYTYPE = '[object Array]';
  9238. var OBJECTTYPE = '[object Object]';
  9239. var NULLTYPE = '[object Null]';
  9240. var UNDEFINEDTYPE = '[object Undefined]';
  9241. // const FUNCTIONTYPE = '[object Function]'
  9242. function diff(current, pre) {
  9243. var result = {};
  9244. syncKeys(current, pre);
  9245. _diff(current, pre, '', result);
  9246. return result
  9247. }
  9248. function syncKeys(current, pre) {
  9249. if (current === pre) { return }
  9250. var rootCurrentType = type(current);
  9251. var rootPreType = type(pre);
  9252. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9253. if(Object.keys(current).length >= Object.keys(pre).length){
  9254. for (var key in pre) {
  9255. var currentValue = current[key];
  9256. if (currentValue === undefined) {
  9257. current[key] = null;
  9258. } else {
  9259. syncKeys(currentValue, pre[key]);
  9260. }
  9261. }
  9262. }
  9263. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9264. if (current.length >= pre.length) {
  9265. pre.forEach(function (item, index) {
  9266. syncKeys(current[index], item);
  9267. });
  9268. }
  9269. }
  9270. }
  9271. function nullOrUndefined(currentType, preType) {
  9272. if(
  9273. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9274. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9275. ) {
  9276. return false
  9277. }
  9278. return true
  9279. }
  9280. function _diff(current, pre, path, result) {
  9281. if (current === pre) { return }
  9282. var rootCurrentType = type(current);
  9283. var rootPreType = type(pre);
  9284. if (rootCurrentType == OBJECTTYPE) {
  9285. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9286. setResult(result, path, current);
  9287. } else {
  9288. var loop = function ( key ) {
  9289. var currentValue = current[key];
  9290. var preValue = pre[key];
  9291. var currentType = type(currentValue);
  9292. var preType = type(preValue);
  9293. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9294. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9295. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9296. }
  9297. } else if (currentType == ARRAYTYPE) {
  9298. if (preType != ARRAYTYPE) {
  9299. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9300. } else {
  9301. if (currentValue.length < preValue.length) {
  9302. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9303. } else {
  9304. currentValue.forEach(function (item, index) {
  9305. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9306. });
  9307. }
  9308. }
  9309. } else if (currentType == OBJECTTYPE) {
  9310. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9311. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9312. } else {
  9313. for (var subKey in currentValue) {
  9314. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9315. }
  9316. }
  9317. }
  9318. };
  9319. for (var key in current) loop( key );
  9320. }
  9321. } else if (rootCurrentType == ARRAYTYPE) {
  9322. if (rootPreType != ARRAYTYPE) {
  9323. setResult(result, path, current);
  9324. } else {
  9325. if (current.length < pre.length) {
  9326. setResult(result, path, current);
  9327. } else {
  9328. current.forEach(function (item, index) {
  9329. _diff(item, pre[index], path + '[' + index + ']', result);
  9330. });
  9331. }
  9332. }
  9333. } else {
  9334. setResult(result, path, current);
  9335. }
  9336. }
  9337. function setResult(result, k, v) {
  9338. // if (type(v) != FUNCTIONTYPE) {
  9339. result[k] = v;
  9340. // }
  9341. }
  9342. function type(obj) {
  9343. return Object.prototype.toString.call(obj)
  9344. }
  9345. /* */
  9346. function flushCallbacks$1(vm) {
  9347. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9348. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9349. var mpInstance = vm.$scope;
  9350. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9351. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9352. }
  9353. var copies = vm.__next_tick_callbacks.slice(0);
  9354. vm.__next_tick_callbacks.length = 0;
  9355. for (var i = 0; i < copies.length; i++) {
  9356. copies[i]();
  9357. }
  9358. }
  9359. }
  9360. function hasRenderWatcher(vm) {
  9361. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9362. }
  9363. function nextTick$1(vm, cb) {
  9364. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9365. //2.nextTick 之前存在 render watcher
  9366. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9367. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9368. var mpInstance = vm.$scope;
  9369. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9370. ']:nextVueTick');
  9371. }
  9372. return nextTick(cb, vm)
  9373. }else{
  9374. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9375. var mpInstance$1 = vm.$scope;
  9376. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9377. ']:nextMPTick');
  9378. }
  9379. }
  9380. var _resolve;
  9381. if (!vm.__next_tick_callbacks) {
  9382. vm.__next_tick_callbacks = [];
  9383. }
  9384. vm.__next_tick_callbacks.push(function () {
  9385. if (cb) {
  9386. try {
  9387. cb.call(vm);
  9388. } catch (e) {
  9389. handleError(e, vm, 'nextTick');
  9390. }
  9391. } else if (_resolve) {
  9392. _resolve(vm);
  9393. }
  9394. });
  9395. // $flow-disable-line
  9396. if (!cb && typeof Promise !== 'undefined') {
  9397. return new Promise(function (resolve) {
  9398. _resolve = resolve;
  9399. })
  9400. }
  9401. }
  9402. /* */
  9403. function clearInstance(key, value) {
  9404. // 简易去除 Vue 和小程序组件实例
  9405. if (value) {
  9406. if (value._isVue || value.__v_isMPComponent) {
  9407. return {}
  9408. }
  9409. }
  9410. return value
  9411. }
  9412. function cloneWithData(vm) {
  9413. // 确保当前 vm 所有数据被同步
  9414. var ret = Object.create(null);
  9415. var dataKeys = [].concat(
  9416. Object.keys(vm._data || {}),
  9417. Object.keys(vm._computedWatchers || {}));
  9418. dataKeys.reduce(function(ret, key) {
  9419. ret[key] = vm[key];
  9420. return ret
  9421. }, ret);
  9422. // vue-composition-api
  9423. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9424. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9425. if (rawBindings) {
  9426. Object.keys(rawBindings).forEach(function (key) {
  9427. ret[key] = vm[key];
  9428. });
  9429. }
  9430. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9431. Object.assign(ret, vm.$mp.data || {});
  9432. if (
  9433. Array.isArray(vm.$options.behaviors) &&
  9434. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9435. ) { //form-field
  9436. ret['name'] = vm.name;
  9437. ret['value'] = vm.value;
  9438. }
  9439. return JSON.parse(JSON.stringify(ret, clearInstance))
  9440. }
  9441. var patch = function(oldVnode, vnode) {
  9442. var this$1 = this;
  9443. if (vnode === null) { //destroy
  9444. return
  9445. }
  9446. if (this.mpType === 'page' || this.mpType === 'component') {
  9447. var mpInstance = this.$scope;
  9448. var data = Object.create(null);
  9449. try {
  9450. data = cloneWithData(this);
  9451. } catch (err) {
  9452. console.error(err);
  9453. }
  9454. data.__webviewId__ = mpInstance.data.__webviewId__;
  9455. var mpData = Object.create(null);
  9456. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9457. mpData[key] = mpInstance.data[key];
  9458. });
  9459. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9460. if (Object.keys(diffData).length) {
  9461. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9462. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9463. ']差量更新',
  9464. JSON.stringify(diffData));
  9465. }
  9466. this.__next_tick_pending = true;
  9467. mpInstance.setData(diffData, function () {
  9468. this$1.__next_tick_pending = false;
  9469. flushCallbacks$1(this$1);
  9470. });
  9471. } else {
  9472. flushCallbacks$1(this);
  9473. }
  9474. }
  9475. };
  9476. /* */
  9477. function createEmptyRender() {
  9478. }
  9479. function mountComponent$1(
  9480. vm,
  9481. el,
  9482. hydrating
  9483. ) {
  9484. if (!vm.mpType) {//main.js 中的 new Vue
  9485. return vm
  9486. }
  9487. if (vm.mpType === 'app') {
  9488. vm.$options.render = createEmptyRender;
  9489. }
  9490. if (!vm.$options.render) {
  9491. vm.$options.render = createEmptyRender;
  9492. if (true) {
  9493. /* istanbul ignore if */
  9494. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9495. vm.$options.el || el) {
  9496. warn(
  9497. 'You are using the runtime-only build of Vue where the template ' +
  9498. 'compiler is not available. Either pre-compile the templates into ' +
  9499. 'render functions, or use the compiler-included build.',
  9500. vm
  9501. );
  9502. } else {
  9503. warn(
  9504. 'Failed to mount component: template or render function not defined.',
  9505. vm
  9506. );
  9507. }
  9508. }
  9509. }
  9510. !vm._$fallback && callHook(vm, 'beforeMount');
  9511. var updateComponent = function () {
  9512. vm._update(vm._render(), hydrating);
  9513. };
  9514. // we set this to vm._watcher inside the watcher's constructor
  9515. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9516. // component's mounted hook), which relies on vm._watcher being already defined
  9517. new Watcher(vm, updateComponent, noop, {
  9518. before: function before() {
  9519. if (vm._isMounted && !vm._isDestroyed) {
  9520. callHook(vm, 'beforeUpdate');
  9521. }
  9522. }
  9523. }, true /* isRenderWatcher */);
  9524. hydrating = false;
  9525. return vm
  9526. }
  9527. /* */
  9528. function renderClass (
  9529. staticClass,
  9530. dynamicClass
  9531. ) {
  9532. if (isDef(staticClass) || isDef(dynamicClass)) {
  9533. return concat(staticClass, stringifyClass(dynamicClass))
  9534. }
  9535. /* istanbul ignore next */
  9536. return ''
  9537. }
  9538. function concat (a, b) {
  9539. return a ? b ? (a + ' ' + b) : a : (b || '')
  9540. }
  9541. function stringifyClass (value) {
  9542. if (Array.isArray(value)) {
  9543. return stringifyArray(value)
  9544. }
  9545. if (isObject(value)) {
  9546. return stringifyObject(value)
  9547. }
  9548. if (typeof value === 'string') {
  9549. return value
  9550. }
  9551. /* istanbul ignore next */
  9552. return ''
  9553. }
  9554. function stringifyArray (value) {
  9555. var res = '';
  9556. var stringified;
  9557. for (var i = 0, l = value.length; i < l; i++) {
  9558. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9559. if (res) { res += ' '; }
  9560. res += stringified;
  9561. }
  9562. }
  9563. return res
  9564. }
  9565. function stringifyObject (value) {
  9566. var res = '';
  9567. for (var key in value) {
  9568. if (value[key]) {
  9569. if (res) { res += ' '; }
  9570. res += key;
  9571. }
  9572. }
  9573. return res
  9574. }
  9575. /* */
  9576. var parseStyleText = cached(function (cssText) {
  9577. var res = {};
  9578. var listDelimiter = /;(?![^(]*\))/g;
  9579. var propertyDelimiter = /:(.+)/;
  9580. cssText.split(listDelimiter).forEach(function (item) {
  9581. if (item) {
  9582. var tmp = item.split(propertyDelimiter);
  9583. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9584. }
  9585. });
  9586. return res
  9587. });
  9588. // normalize possible array / string values into Object
  9589. function normalizeStyleBinding (bindingStyle) {
  9590. if (Array.isArray(bindingStyle)) {
  9591. return toObject(bindingStyle)
  9592. }
  9593. if (typeof bindingStyle === 'string') {
  9594. return parseStyleText(bindingStyle)
  9595. }
  9596. return bindingStyle
  9597. }
  9598. /* */
  9599. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9600. function getTarget(obj, path) {
  9601. var parts = path.split('.');
  9602. var key = parts[0];
  9603. if (key.indexOf('__$n') === 0) { //number index
  9604. key = parseInt(key.replace('__$n', ''));
  9605. }
  9606. if (parts.length === 1) {
  9607. return obj[key]
  9608. }
  9609. return getTarget(obj[key], parts.slice(1).join('.'))
  9610. }
  9611. function internalMixin(Vue) {
  9612. Vue.config.errorHandler = function(err, vm, info) {
  9613. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9614. console.error(err);
  9615. /* eslint-disable no-undef */
  9616. var app = typeof getApp === 'function' && getApp();
  9617. if (app && app.onError) {
  9618. app.onError(err);
  9619. }
  9620. };
  9621. var oldEmit = Vue.prototype.$emit;
  9622. Vue.prototype.$emit = function(event) {
  9623. if (this.$scope && event) {
  9624. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9625. if (triggerEvent) {
  9626. try {
  9627. triggerEvent.call(this.$scope, event, {
  9628. __args__: toArray(arguments, 1)
  9629. });
  9630. } catch (error) {
  9631. }
  9632. }
  9633. }
  9634. return oldEmit.apply(this, arguments)
  9635. };
  9636. Vue.prototype.$nextTick = function(fn) {
  9637. return nextTick$1(this, fn)
  9638. };
  9639. MP_METHODS.forEach(function (method) {
  9640. Vue.prototype[method] = function(args) {
  9641. if (this.$scope && this.$scope[method]) {
  9642. return this.$scope[method](args)
  9643. }
  9644. // mp-alipay
  9645. if (typeof my === 'undefined') {
  9646. return
  9647. }
  9648. if (method === 'createSelectorQuery') {
  9649. /* eslint-disable no-undef */
  9650. return my.createSelectorQuery(args)
  9651. } else if (method === 'createIntersectionObserver') {
  9652. /* eslint-disable no-undef */
  9653. return my.createIntersectionObserver(args)
  9654. }
  9655. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9656. };
  9657. });
  9658. Vue.prototype.__init_provide = initProvide;
  9659. Vue.prototype.__init_injections = initInjections;
  9660. Vue.prototype.__call_hook = function(hook, args) {
  9661. var vm = this;
  9662. // #7573 disable dep collection when invoking lifecycle hooks
  9663. pushTarget();
  9664. var handlers = vm.$options[hook];
  9665. var info = hook + " hook";
  9666. var ret;
  9667. if (handlers) {
  9668. for (var i = 0, j = handlers.length; i < j; i++) {
  9669. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9670. }
  9671. }
  9672. if (vm._hasHookEvent) {
  9673. vm.$emit('hook:' + hook, args);
  9674. }
  9675. popTarget();
  9676. return ret
  9677. };
  9678. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9679. if (Array.isArray(modifiers)) {
  9680. if (modifiers.indexOf('trim') !== -1) {
  9681. value = value.trim();
  9682. }
  9683. if (modifiers.indexOf('number') !== -1) {
  9684. value = this._n(value);
  9685. }
  9686. }
  9687. if (!target) {
  9688. target = this;
  9689. }
  9690. // 解决动态属性添加
  9691. Vue.set(target, key, value);
  9692. };
  9693. Vue.prototype.__set_sync = function(target, key, value) {
  9694. if (!target) {
  9695. target = this;
  9696. }
  9697. // 解决动态属性添加
  9698. Vue.set(target, key, value);
  9699. };
  9700. Vue.prototype.__get_orig = function(item) {
  9701. if (isPlainObject(item)) {
  9702. return item['$orig'] || item
  9703. }
  9704. return item
  9705. };
  9706. Vue.prototype.__get_value = function(dataPath, target) {
  9707. return getTarget(target || this, dataPath)
  9708. };
  9709. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9710. return renderClass(staticClass, dynamicClass)
  9711. };
  9712. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9713. if (!dynamicStyle && !staticStyle) {
  9714. return ''
  9715. }
  9716. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9717. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9718. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9719. };
  9720. Vue.prototype.__map = function(val, iteratee) {
  9721. //TODO 暂不考虑 string
  9722. var ret, i, l, keys, key;
  9723. if (Array.isArray(val)) {
  9724. ret = new Array(val.length);
  9725. for (i = 0, l = val.length; i < l; i++) {
  9726. ret[i] = iteratee(val[i], i);
  9727. }
  9728. return ret
  9729. } else if (isObject(val)) {
  9730. keys = Object.keys(val);
  9731. ret = Object.create(null);
  9732. for (i = 0, l = keys.length; i < l; i++) {
  9733. key = keys[i];
  9734. ret[key] = iteratee(val[key], key, i);
  9735. }
  9736. return ret
  9737. } else if (typeof val === 'number') {
  9738. ret = new Array(val);
  9739. for (i = 0, l = val; i < l; i++) {
  9740. // 第一个参数暂时仍和小程序一致
  9741. ret[i] = iteratee(i, i);
  9742. }
  9743. return ret
  9744. }
  9745. return []
  9746. };
  9747. }
  9748. /* */
  9749. var LIFECYCLE_HOOKS$1 = [
  9750. //App
  9751. 'onLaunch',
  9752. 'onShow',
  9753. 'onHide',
  9754. 'onUniNViewMessage',
  9755. 'onPageNotFound',
  9756. 'onThemeChange',
  9757. 'onError',
  9758. 'onUnhandledRejection',
  9759. //Page
  9760. 'onInit',
  9761. 'onLoad',
  9762. // 'onShow',
  9763. 'onReady',
  9764. // 'onHide',
  9765. 'onUnload',
  9766. 'onPullDownRefresh',
  9767. 'onReachBottom',
  9768. 'onTabItemTap',
  9769. 'onAddToFavorites',
  9770. 'onShareTimeline',
  9771. 'onShareAppMessage',
  9772. 'onResize',
  9773. 'onPageScroll',
  9774. 'onNavigationBarButtonTap',
  9775. 'onBackPress',
  9776. 'onNavigationBarSearchInputChanged',
  9777. 'onNavigationBarSearchInputConfirmed',
  9778. 'onNavigationBarSearchInputClicked',
  9779. 'onUploadDouyinVideo',
  9780. 'onNFCReadMessage',
  9781. //Component
  9782. // 'onReady', // 兼容旧版本,应该移除该事件
  9783. 'onPageShow',
  9784. 'onPageHide',
  9785. 'onPageResize'
  9786. ];
  9787. function lifecycleMixin$1(Vue) {
  9788. //fixed vue-class-component
  9789. var oldExtend = Vue.extend;
  9790. Vue.extend = function(extendOptions) {
  9791. extendOptions = extendOptions || {};
  9792. var methods = extendOptions.methods;
  9793. if (methods) {
  9794. Object.keys(methods).forEach(function (methodName) {
  9795. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9796. extendOptions[methodName] = methods[methodName];
  9797. delete methods[methodName];
  9798. }
  9799. });
  9800. }
  9801. return oldExtend.call(this, extendOptions)
  9802. };
  9803. var strategies = Vue.config.optionMergeStrategies;
  9804. var mergeHook = strategies.created;
  9805. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9806. strategies[hook] = mergeHook;
  9807. });
  9808. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9809. }
  9810. /* */
  9811. // install platform patch function
  9812. Vue.prototype.__patch__ = patch;
  9813. // public mount method
  9814. Vue.prototype.$mount = function(
  9815. el ,
  9816. hydrating
  9817. ) {
  9818. return mountComponent$1(this, el, hydrating)
  9819. };
  9820. lifecycleMixin$1(Vue);
  9821. internalMixin(Vue);
  9822. /* */
  9823. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9824. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9825. /***/ }),
  9826. /***/ 26:
  9827. /*!*****************************************************!*\
  9828. !*** E:/work/Project_newGit/UniappShell/pages.json ***!
  9829. \*****************************************************/
  9830. /*! no static exports found */
  9831. /***/ (function(module, exports) {
  9832. /***/ }),
  9833. /***/ 3:
  9834. /*!***********************************!*\
  9835. !*** (webpack)/buildin/global.js ***!
  9836. \***********************************/
  9837. /*! no static exports found */
  9838. /***/ (function(module, exports) {
  9839. var g;
  9840. // This works in non-strict mode
  9841. g = (function() {
  9842. return this;
  9843. })();
  9844. try {
  9845. // This works if eval is allowed (see CSP)
  9846. g = g || new Function("return this")();
  9847. } catch (e) {
  9848. // This works if the window reference is available
  9849. if (typeof window === "object") g = window;
  9850. }
  9851. // g can still be undefined, but nothing to do about it...
  9852. // We return undefined, instead of nothing here, so it's
  9853. // easier to handle this case. if(!global) { ...}
  9854. module.exports = g;
  9855. /***/ }),
  9856. /***/ 32:
  9857. /*!**********************************************************************************************************!*\
  9858. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  9859. \**********************************************************************************************************/
  9860. /*! exports provided: default */
  9861. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9862. "use strict";
  9863. __webpack_require__.r(__webpack_exports__);
  9864. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  9865. /* globals __VUE_SSR_CONTEXT__ */
  9866. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9867. // This module is a runtime utility for cleaner component module output and will
  9868. // be included in the final webpack user bundle.
  9869. function normalizeComponent (
  9870. scriptExports,
  9871. render,
  9872. staticRenderFns,
  9873. functionalTemplate,
  9874. injectStyles,
  9875. scopeId,
  9876. moduleIdentifier, /* server only */
  9877. shadowMode, /* vue-cli only */
  9878. components, // fixed by xxxxxx auto components
  9879. renderjs // fixed by xxxxxx renderjs
  9880. ) {
  9881. // Vue.extend constructor export interop
  9882. var options = typeof scriptExports === 'function'
  9883. ? scriptExports.options
  9884. : scriptExports
  9885. // fixed by xxxxxx auto components
  9886. if (components) {
  9887. if (!options.components) {
  9888. options.components = {}
  9889. }
  9890. var hasOwn = Object.prototype.hasOwnProperty
  9891. for (var name in components) {
  9892. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  9893. options.components[name] = components[name]
  9894. }
  9895. }
  9896. }
  9897. // fixed by xxxxxx renderjs
  9898. if (renderjs) {
  9899. if(typeof renderjs.beforeCreate === 'function'){
  9900. renderjs.beforeCreate = [renderjs.beforeCreate]
  9901. }
  9902. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  9903. this[renderjs.__module] = this
  9904. });
  9905. (options.mixins || (options.mixins = [])).push(renderjs)
  9906. }
  9907. // render functions
  9908. if (render) {
  9909. options.render = render
  9910. options.staticRenderFns = staticRenderFns
  9911. options._compiled = true
  9912. }
  9913. // functional template
  9914. if (functionalTemplate) {
  9915. options.functional = true
  9916. }
  9917. // scopedId
  9918. if (scopeId) {
  9919. options._scopeId = 'data-v-' + scopeId
  9920. }
  9921. var hook
  9922. if (moduleIdentifier) { // server build
  9923. hook = function (context) {
  9924. // 2.3 injection
  9925. context =
  9926. context || // cached call
  9927. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9928. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9929. // 2.2 with runInNewContext: true
  9930. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9931. context = __VUE_SSR_CONTEXT__
  9932. }
  9933. // inject component styles
  9934. if (injectStyles) {
  9935. injectStyles.call(this, context)
  9936. }
  9937. // register component module identifier for async chunk inferrence
  9938. if (context && context._registeredComponents) {
  9939. context._registeredComponents.add(moduleIdentifier)
  9940. }
  9941. }
  9942. // used by ssr in case component is cached and beforeCreate
  9943. // never gets called
  9944. options._ssrRegister = hook
  9945. } else if (injectStyles) {
  9946. hook = shadowMode
  9947. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9948. : injectStyles
  9949. }
  9950. if (hook) {
  9951. if (options.functional) {
  9952. // for template-only hot-reload because in that case the render fn doesn't
  9953. // go through the normalizer
  9954. options._injectStyles = hook
  9955. // register for functioal component in vue file
  9956. var originalRender = options.render
  9957. options.render = function renderWithStyleInjection (h, context) {
  9958. hook.call(context)
  9959. return originalRender(h, context)
  9960. }
  9961. } else {
  9962. // inject component registration as beforeCreate hook
  9963. var existing = options.beforeCreate
  9964. options.beforeCreate = existing
  9965. ? [].concat(existing, hook)
  9966. : [hook]
  9967. }
  9968. }
  9969. return {
  9970. exports: scriptExports,
  9971. options: options
  9972. }
  9973. }
  9974. /***/ }),
  9975. /***/ 33:
  9976. /*!*******************************************************************!*\
  9977. !*** E:/work/Project_newGit/UniappShell/uni.promisify.adaptor.js ***!
  9978. \*******************************************************************/
  9979. /*! no static exports found */
  9980. /***/ (function(module, exports, __webpack_require__) {
  9981. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9982. uni.addInterceptor({
  9983. returnValue: function returnValue(res) {
  9984. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  9985. return res;
  9986. }
  9987. return new Promise(function (resolve, reject) {
  9988. res.then(function (res) {
  9989. return res[0] ? reject(res[0]) : resolve(res[1]);
  9990. });
  9991. });
  9992. }
  9993. });
  9994. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9995. /***/ }),
  9996. /***/ 4:
  9997. /*!**********************************************************************!*\
  9998. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  9999. \**********************************************************************/
  10000. /*! no static exports found */
  10001. /***/ (function(module, exports) {
  10002. function _interopRequireDefault(obj) {
  10003. return obj && obj.__esModule ? obj : {
  10004. "default": obj
  10005. };
  10006. }
  10007. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10008. /***/ }),
  10009. /***/ 48:
  10010. /*!*********************************************************!*\
  10011. !*** E:/work/Project_newGit/UniappShell/store/index.js ***!
  10012. \*********************************************************/
  10013. /*! no static exports found */
  10014. /***/ (function(module, exports, __webpack_require__) {
  10015. "use strict";
  10016. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10017. Object.defineProperty(exports, "__esModule", {
  10018. value: true
  10019. });
  10020. exports.default = void 0;
  10021. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  10022. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 49));
  10023. _vue.default.use(_vuex.default);
  10024. //实例store对象
  10025. var store = new _vuex.default.Store({
  10026. state: {
  10027. access_token: "",
  10028. jpush: null
  10029. },
  10030. mutations: {
  10031. setToken: function setToken(state, token) {
  10032. state.access_token = token;
  10033. },
  10034. initJpush: function initJpush(state, jpush) {
  10035. state.jpush = jpush;
  10036. }
  10037. }
  10038. });
  10039. //导出store对象
  10040. var _default = store;
  10041. exports.default = _default;
  10042. /***/ }),
  10043. /***/ 49:
  10044. /*!**************************************************************************************!*\
  10045. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  10046. \**************************************************************************************/
  10047. /*! no static exports found */
  10048. /***/ (function(module, exports, __webpack_require__) {
  10049. "use strict";
  10050. /* WEBPACK VAR INJECTION */(function(global) {/*!
  10051. * vuex v3.6.2
  10052. * (c) 2021 Evan You
  10053. * @license MIT
  10054. */
  10055. function applyMixin (Vue) {
  10056. var version = Number(Vue.version.split('.')[0]);
  10057. if (version >= 2) {
  10058. Vue.mixin({ beforeCreate: vuexInit });
  10059. } else {
  10060. // override init and inject vuex init procedure
  10061. // for 1.x backwards compatibility.
  10062. var _init = Vue.prototype._init;
  10063. Vue.prototype._init = function (options) {
  10064. if ( options === void 0 ) options = {};
  10065. options.init = options.init
  10066. ? [vuexInit].concat(options.init)
  10067. : vuexInit;
  10068. _init.call(this, options);
  10069. };
  10070. }
  10071. /**
  10072. * Vuex init hook, injected into each instances init hooks list.
  10073. */
  10074. function vuexInit () {
  10075. var options = this.$options;
  10076. // store injection
  10077. if (options.store) {
  10078. this.$store = typeof options.store === 'function'
  10079. ? options.store()
  10080. : options.store;
  10081. } else if (options.parent && options.parent.$store) {
  10082. this.$store = options.parent.$store;
  10083. }
  10084. }
  10085. }
  10086. var target = typeof window !== 'undefined'
  10087. ? window
  10088. : typeof global !== 'undefined'
  10089. ? global
  10090. : {};
  10091. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  10092. function devtoolPlugin (store) {
  10093. if (!devtoolHook) { return }
  10094. store._devtoolHook = devtoolHook;
  10095. devtoolHook.emit('vuex:init', store);
  10096. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  10097. store.replaceState(targetState);
  10098. });
  10099. store.subscribe(function (mutation, state) {
  10100. devtoolHook.emit('vuex:mutation', mutation, state);
  10101. }, { prepend: true });
  10102. store.subscribeAction(function (action, state) {
  10103. devtoolHook.emit('vuex:action', action, state);
  10104. }, { prepend: true });
  10105. }
  10106. /**
  10107. * Get the first item that pass the test
  10108. * by second argument function
  10109. *
  10110. * @param {Array} list
  10111. * @param {Function} f
  10112. * @return {*}
  10113. */
  10114. function find (list, f) {
  10115. return list.filter(f)[0]
  10116. }
  10117. /**
  10118. * Deep copy the given object considering circular structure.
  10119. * This function caches all nested objects and its copies.
  10120. * If it detects circular structure, use cached copy to avoid infinite loop.
  10121. *
  10122. * @param {*} obj
  10123. * @param {Array<Object>} cache
  10124. * @return {*}
  10125. */
  10126. function deepCopy (obj, cache) {
  10127. if ( cache === void 0 ) cache = [];
  10128. // just return if obj is immutable value
  10129. if (obj === null || typeof obj !== 'object') {
  10130. return obj
  10131. }
  10132. // if obj is hit, it is in circular structure
  10133. var hit = find(cache, function (c) { return c.original === obj; });
  10134. if (hit) {
  10135. return hit.copy
  10136. }
  10137. var copy = Array.isArray(obj) ? [] : {};
  10138. // put the copy into cache at first
  10139. // because we want to refer it in recursive deepCopy
  10140. cache.push({
  10141. original: obj,
  10142. copy: copy
  10143. });
  10144. Object.keys(obj).forEach(function (key) {
  10145. copy[key] = deepCopy(obj[key], cache);
  10146. });
  10147. return copy
  10148. }
  10149. /**
  10150. * forEach for object
  10151. */
  10152. function forEachValue (obj, fn) {
  10153. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  10154. }
  10155. function isObject (obj) {
  10156. return obj !== null && typeof obj === 'object'
  10157. }
  10158. function isPromise (val) {
  10159. return val && typeof val.then === 'function'
  10160. }
  10161. function assert (condition, msg) {
  10162. if (!condition) { throw new Error(("[vuex] " + msg)) }
  10163. }
  10164. function partial (fn, arg) {
  10165. return function () {
  10166. return fn(arg)
  10167. }
  10168. }
  10169. // Base data struct for store's module, package with some attribute and method
  10170. var Module = function Module (rawModule, runtime) {
  10171. this.runtime = runtime;
  10172. // Store some children item
  10173. this._children = Object.create(null);
  10174. // Store the origin module object which passed by programmer
  10175. this._rawModule = rawModule;
  10176. var rawState = rawModule.state;
  10177. // Store the origin module's state
  10178. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  10179. };
  10180. var prototypeAccessors = { namespaced: { configurable: true } };
  10181. prototypeAccessors.namespaced.get = function () {
  10182. return !!this._rawModule.namespaced
  10183. };
  10184. Module.prototype.addChild = function addChild (key, module) {
  10185. this._children[key] = module;
  10186. };
  10187. Module.prototype.removeChild = function removeChild (key) {
  10188. delete this._children[key];
  10189. };
  10190. Module.prototype.getChild = function getChild (key) {
  10191. return this._children[key]
  10192. };
  10193. Module.prototype.hasChild = function hasChild (key) {
  10194. return key in this._children
  10195. };
  10196. Module.prototype.update = function update (rawModule) {
  10197. this._rawModule.namespaced = rawModule.namespaced;
  10198. if (rawModule.actions) {
  10199. this._rawModule.actions = rawModule.actions;
  10200. }
  10201. if (rawModule.mutations) {
  10202. this._rawModule.mutations = rawModule.mutations;
  10203. }
  10204. if (rawModule.getters) {
  10205. this._rawModule.getters = rawModule.getters;
  10206. }
  10207. };
  10208. Module.prototype.forEachChild = function forEachChild (fn) {
  10209. forEachValue(this._children, fn);
  10210. };
  10211. Module.prototype.forEachGetter = function forEachGetter (fn) {
  10212. if (this._rawModule.getters) {
  10213. forEachValue(this._rawModule.getters, fn);
  10214. }
  10215. };
  10216. Module.prototype.forEachAction = function forEachAction (fn) {
  10217. if (this._rawModule.actions) {
  10218. forEachValue(this._rawModule.actions, fn);
  10219. }
  10220. };
  10221. Module.prototype.forEachMutation = function forEachMutation (fn) {
  10222. if (this._rawModule.mutations) {
  10223. forEachValue(this._rawModule.mutations, fn);
  10224. }
  10225. };
  10226. Object.defineProperties( Module.prototype, prototypeAccessors );
  10227. var ModuleCollection = function ModuleCollection (rawRootModule) {
  10228. // register root module (Vuex.Store options)
  10229. this.register([], rawRootModule, false);
  10230. };
  10231. ModuleCollection.prototype.get = function get (path) {
  10232. return path.reduce(function (module, key) {
  10233. return module.getChild(key)
  10234. }, this.root)
  10235. };
  10236. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  10237. var module = this.root;
  10238. return path.reduce(function (namespace, key) {
  10239. module = module.getChild(key);
  10240. return namespace + (module.namespaced ? key + '/' : '')
  10241. }, '')
  10242. };
  10243. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  10244. update([], this.root, rawRootModule);
  10245. };
  10246. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  10247. var this$1 = this;
  10248. if ( runtime === void 0 ) runtime = true;
  10249. if ((true)) {
  10250. assertRawModule(path, rawModule);
  10251. }
  10252. var newModule = new Module(rawModule, runtime);
  10253. if (path.length === 0) {
  10254. this.root = newModule;
  10255. } else {
  10256. var parent = this.get(path.slice(0, -1));
  10257. parent.addChild(path[path.length - 1], newModule);
  10258. }
  10259. // register nested modules
  10260. if (rawModule.modules) {
  10261. forEachValue(rawModule.modules, function (rawChildModule, key) {
  10262. this$1.register(path.concat(key), rawChildModule, runtime);
  10263. });
  10264. }
  10265. };
  10266. ModuleCollection.prototype.unregister = function unregister (path) {
  10267. var parent = this.get(path.slice(0, -1));
  10268. var key = path[path.length - 1];
  10269. var child = parent.getChild(key);
  10270. if (!child) {
  10271. if ((true)) {
  10272. console.warn(
  10273. "[vuex] trying to unregister module '" + key + "', which is " +
  10274. "not registered"
  10275. );
  10276. }
  10277. return
  10278. }
  10279. if (!child.runtime) {
  10280. return
  10281. }
  10282. parent.removeChild(key);
  10283. };
  10284. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  10285. var parent = this.get(path.slice(0, -1));
  10286. var key = path[path.length - 1];
  10287. if (parent) {
  10288. return parent.hasChild(key)
  10289. }
  10290. return false
  10291. };
  10292. function update (path, targetModule, newModule) {
  10293. if ((true)) {
  10294. assertRawModule(path, newModule);
  10295. }
  10296. // update target module
  10297. targetModule.update(newModule);
  10298. // update nested modules
  10299. if (newModule.modules) {
  10300. for (var key in newModule.modules) {
  10301. if (!targetModule.getChild(key)) {
  10302. if ((true)) {
  10303. console.warn(
  10304. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  10305. 'manual reload is needed'
  10306. );
  10307. }
  10308. return
  10309. }
  10310. update(
  10311. path.concat(key),
  10312. targetModule.getChild(key),
  10313. newModule.modules[key]
  10314. );
  10315. }
  10316. }
  10317. }
  10318. var functionAssert = {
  10319. assert: function (value) { return typeof value === 'function'; },
  10320. expected: 'function'
  10321. };
  10322. var objectAssert = {
  10323. assert: function (value) { return typeof value === 'function' ||
  10324. (typeof value === 'object' && typeof value.handler === 'function'); },
  10325. expected: 'function or object with "handler" function'
  10326. };
  10327. var assertTypes = {
  10328. getters: functionAssert,
  10329. mutations: functionAssert,
  10330. actions: objectAssert
  10331. };
  10332. function assertRawModule (path, rawModule) {
  10333. Object.keys(assertTypes).forEach(function (key) {
  10334. if (!rawModule[key]) { return }
  10335. var assertOptions = assertTypes[key];
  10336. forEachValue(rawModule[key], function (value, type) {
  10337. assert(
  10338. assertOptions.assert(value),
  10339. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  10340. );
  10341. });
  10342. });
  10343. }
  10344. function makeAssertionMessage (path, key, type, value, expected) {
  10345. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  10346. if (path.length > 0) {
  10347. buf += " in module \"" + (path.join('.')) + "\"";
  10348. }
  10349. buf += " is " + (JSON.stringify(value)) + ".";
  10350. return buf
  10351. }
  10352. var Vue; // bind on install
  10353. var Store = function Store (options) {
  10354. var this$1 = this;
  10355. if ( options === void 0 ) options = {};
  10356. // Auto install if it is not done yet and `window` has `Vue`.
  10357. // To allow users to avoid auto-installation in some cases,
  10358. // this code should be placed here. See #731
  10359. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  10360. install(window.Vue);
  10361. }
  10362. if ((true)) {
  10363. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  10364. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  10365. assert(this instanceof Store, "store must be called with the new operator.");
  10366. }
  10367. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  10368. var strict = options.strict; if ( strict === void 0 ) strict = false;
  10369. // store internal state
  10370. this._committing = false;
  10371. this._actions = Object.create(null);
  10372. this._actionSubscribers = [];
  10373. this._mutations = Object.create(null);
  10374. this._wrappedGetters = Object.create(null);
  10375. this._modules = new ModuleCollection(options);
  10376. this._modulesNamespaceMap = Object.create(null);
  10377. this._subscribers = [];
  10378. this._watcherVM = new Vue();
  10379. this._makeLocalGettersCache = Object.create(null);
  10380. // bind commit and dispatch to self
  10381. var store = this;
  10382. var ref = this;
  10383. var dispatch = ref.dispatch;
  10384. var commit = ref.commit;
  10385. this.dispatch = function boundDispatch (type, payload) {
  10386. return dispatch.call(store, type, payload)
  10387. };
  10388. this.commit = function boundCommit (type, payload, options) {
  10389. return commit.call(store, type, payload, options)
  10390. };
  10391. // strict mode
  10392. this.strict = strict;
  10393. var state = this._modules.root.state;
  10394. // init root module.
  10395. // this also recursively registers all sub-modules
  10396. // and collects all module getters inside this._wrappedGetters
  10397. installModule(this, state, [], this._modules.root);
  10398. // initialize the store vm, which is responsible for the reactivity
  10399. // (also registers _wrappedGetters as computed properties)
  10400. resetStoreVM(this, state);
  10401. // apply plugins
  10402. plugins.forEach(function (plugin) { return plugin(this$1); });
  10403. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  10404. if (useDevtools) {
  10405. devtoolPlugin(this);
  10406. }
  10407. };
  10408. var prototypeAccessors$1 = { state: { configurable: true } };
  10409. prototypeAccessors$1.state.get = function () {
  10410. return this._vm._data.$$state
  10411. };
  10412. prototypeAccessors$1.state.set = function (v) {
  10413. if ((true)) {
  10414. assert(false, "use store.replaceState() to explicit replace store state.");
  10415. }
  10416. };
  10417. Store.prototype.commit = function commit (_type, _payload, _options) {
  10418. var this$1 = this;
  10419. // check object-style commit
  10420. var ref = unifyObjectStyle(_type, _payload, _options);
  10421. var type = ref.type;
  10422. var payload = ref.payload;
  10423. var options = ref.options;
  10424. var mutation = { type: type, payload: payload };
  10425. var entry = this._mutations[type];
  10426. if (!entry) {
  10427. if ((true)) {
  10428. console.error(("[vuex] unknown mutation type: " + type));
  10429. }
  10430. return
  10431. }
  10432. this._withCommit(function () {
  10433. entry.forEach(function commitIterator (handler) {
  10434. handler(payload);
  10435. });
  10436. });
  10437. this._subscribers
  10438. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  10439. .forEach(function (sub) { return sub(mutation, this$1.state); });
  10440. if (
  10441. ( true) &&
  10442. options && options.silent
  10443. ) {
  10444. console.warn(
  10445. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  10446. 'Use the filter functionality in the vue-devtools'
  10447. );
  10448. }
  10449. };
  10450. Store.prototype.dispatch = function dispatch (_type, _payload) {
  10451. var this$1 = this;
  10452. // check object-style dispatch
  10453. var ref = unifyObjectStyle(_type, _payload);
  10454. var type = ref.type;
  10455. var payload = ref.payload;
  10456. var action = { type: type, payload: payload };
  10457. var entry = this._actions[type];
  10458. if (!entry) {
  10459. if ((true)) {
  10460. console.error(("[vuex] unknown action type: " + type));
  10461. }
  10462. return
  10463. }
  10464. try {
  10465. this._actionSubscribers
  10466. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  10467. .filter(function (sub) { return sub.before; })
  10468. .forEach(function (sub) { return sub.before(action, this$1.state); });
  10469. } catch (e) {
  10470. if ((true)) {
  10471. console.warn("[vuex] error in before action subscribers: ");
  10472. console.error(e);
  10473. }
  10474. }
  10475. var result = entry.length > 1
  10476. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  10477. : entry[0](payload);
  10478. return new Promise(function (resolve, reject) {
  10479. result.then(function (res) {
  10480. try {
  10481. this$1._actionSubscribers
  10482. .filter(function (sub) { return sub.after; })
  10483. .forEach(function (sub) { return sub.after(action, this$1.state); });
  10484. } catch (e) {
  10485. if ((true)) {
  10486. console.warn("[vuex] error in after action subscribers: ");
  10487. console.error(e);
  10488. }
  10489. }
  10490. resolve(res);
  10491. }, function (error) {
  10492. try {
  10493. this$1._actionSubscribers
  10494. .filter(function (sub) { return sub.error; })
  10495. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  10496. } catch (e) {
  10497. if ((true)) {
  10498. console.warn("[vuex] error in error action subscribers: ");
  10499. console.error(e);
  10500. }
  10501. }
  10502. reject(error);
  10503. });
  10504. })
  10505. };
  10506. Store.prototype.subscribe = function subscribe (fn, options) {
  10507. return genericSubscribe(fn, this._subscribers, options)
  10508. };
  10509. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  10510. var subs = typeof fn === 'function' ? { before: fn } : fn;
  10511. return genericSubscribe(subs, this._actionSubscribers, options)
  10512. };
  10513. Store.prototype.watch = function watch (getter, cb, options) {
  10514. var this$1 = this;
  10515. if ((true)) {
  10516. assert(typeof getter === 'function', "store.watch only accepts a function.");
  10517. }
  10518. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  10519. };
  10520. Store.prototype.replaceState = function replaceState (state) {
  10521. var this$1 = this;
  10522. this._withCommit(function () {
  10523. this$1._vm._data.$$state = state;
  10524. });
  10525. };
  10526. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  10527. if ( options === void 0 ) options = {};
  10528. if (typeof path === 'string') { path = [path]; }
  10529. if ((true)) {
  10530. assert(Array.isArray(path), "module path must be a string or an Array.");
  10531. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  10532. }
  10533. this._modules.register(path, rawModule);
  10534. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  10535. // reset store to update getters...
  10536. resetStoreVM(this, this.state);
  10537. };
  10538. Store.prototype.unregisterModule = function unregisterModule (path) {
  10539. var this$1 = this;
  10540. if (typeof path === 'string') { path = [path]; }
  10541. if ((true)) {
  10542. assert(Array.isArray(path), "module path must be a string or an Array.");
  10543. }
  10544. this._modules.unregister(path);
  10545. this._withCommit(function () {
  10546. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  10547. Vue.delete(parentState, path[path.length - 1]);
  10548. });
  10549. resetStore(this);
  10550. };
  10551. Store.prototype.hasModule = function hasModule (path) {
  10552. if (typeof path === 'string') { path = [path]; }
  10553. if ((true)) {
  10554. assert(Array.isArray(path), "module path must be a string or an Array.");
  10555. }
  10556. return this._modules.isRegistered(path)
  10557. };
  10558. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  10559. this._modules.update(newOptions);
  10560. resetStore(this, true);
  10561. };
  10562. Store.prototype._withCommit = function _withCommit (fn) {
  10563. var committing = this._committing;
  10564. this._committing = true;
  10565. fn();
  10566. this._committing = committing;
  10567. };
  10568. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  10569. function genericSubscribe (fn, subs, options) {
  10570. if (subs.indexOf(fn) < 0) {
  10571. options && options.prepend
  10572. ? subs.unshift(fn)
  10573. : subs.push(fn);
  10574. }
  10575. return function () {
  10576. var i = subs.indexOf(fn);
  10577. if (i > -1) {
  10578. subs.splice(i, 1);
  10579. }
  10580. }
  10581. }
  10582. function resetStore (store, hot) {
  10583. store._actions = Object.create(null);
  10584. store._mutations = Object.create(null);
  10585. store._wrappedGetters = Object.create(null);
  10586. store._modulesNamespaceMap = Object.create(null);
  10587. var state = store.state;
  10588. // init all modules
  10589. installModule(store, state, [], store._modules.root, true);
  10590. // reset vm
  10591. resetStoreVM(store, state, hot);
  10592. }
  10593. function resetStoreVM (store, state, hot) {
  10594. var oldVm = store._vm;
  10595. // bind store public getters
  10596. store.getters = {};
  10597. // reset local getters cache
  10598. store._makeLocalGettersCache = Object.create(null);
  10599. var wrappedGetters = store._wrappedGetters;
  10600. var computed = {};
  10601. forEachValue(wrappedGetters, function (fn, key) {
  10602. // use computed to leverage its lazy-caching mechanism
  10603. // direct inline function use will lead to closure preserving oldVm.
  10604. // using partial to return function with only arguments preserved in closure environment.
  10605. computed[key] = partial(fn, store);
  10606. Object.defineProperty(store.getters, key, {
  10607. get: function () { return store._vm[key]; },
  10608. enumerable: true // for local getters
  10609. });
  10610. });
  10611. // use a Vue instance to store the state tree
  10612. // suppress warnings just in case the user has added
  10613. // some funky global mixins
  10614. var silent = Vue.config.silent;
  10615. Vue.config.silent = true;
  10616. store._vm = new Vue({
  10617. data: {
  10618. $$state: state
  10619. },
  10620. computed: computed
  10621. });
  10622. Vue.config.silent = silent;
  10623. // enable strict mode for new vm
  10624. if (store.strict) {
  10625. enableStrictMode(store);
  10626. }
  10627. if (oldVm) {
  10628. if (hot) {
  10629. // dispatch changes in all subscribed watchers
  10630. // to force getter re-evaluation for hot reloading.
  10631. store._withCommit(function () {
  10632. oldVm._data.$$state = null;
  10633. });
  10634. }
  10635. Vue.nextTick(function () { return oldVm.$destroy(); });
  10636. }
  10637. }
  10638. function installModule (store, rootState, path, module, hot) {
  10639. var isRoot = !path.length;
  10640. var namespace = store._modules.getNamespace(path);
  10641. // register in namespace map
  10642. if (module.namespaced) {
  10643. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  10644. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  10645. }
  10646. store._modulesNamespaceMap[namespace] = module;
  10647. }
  10648. // set state
  10649. if (!isRoot && !hot) {
  10650. var parentState = getNestedState(rootState, path.slice(0, -1));
  10651. var moduleName = path[path.length - 1];
  10652. store._withCommit(function () {
  10653. if ((true)) {
  10654. if (moduleName in parentState) {
  10655. console.warn(
  10656. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  10657. );
  10658. }
  10659. }
  10660. Vue.set(parentState, moduleName, module.state);
  10661. });
  10662. }
  10663. var local = module.context = makeLocalContext(store, namespace, path);
  10664. module.forEachMutation(function (mutation, key) {
  10665. var namespacedType = namespace + key;
  10666. registerMutation(store, namespacedType, mutation, local);
  10667. });
  10668. module.forEachAction(function (action, key) {
  10669. var type = action.root ? key : namespace + key;
  10670. var handler = action.handler || action;
  10671. registerAction(store, type, handler, local);
  10672. });
  10673. module.forEachGetter(function (getter, key) {
  10674. var namespacedType = namespace + key;
  10675. registerGetter(store, namespacedType, getter, local);
  10676. });
  10677. module.forEachChild(function (child, key) {
  10678. installModule(store, rootState, path.concat(key), child, hot);
  10679. });
  10680. }
  10681. /**
  10682. * make localized dispatch, commit, getters and state
  10683. * if there is no namespace, just use root ones
  10684. */
  10685. function makeLocalContext (store, namespace, path) {
  10686. var noNamespace = namespace === '';
  10687. var local = {
  10688. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  10689. var args = unifyObjectStyle(_type, _payload, _options);
  10690. var payload = args.payload;
  10691. var options = args.options;
  10692. var type = args.type;
  10693. if (!options || !options.root) {
  10694. type = namespace + type;
  10695. if (( true) && !store._actions[type]) {
  10696. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  10697. return
  10698. }
  10699. }
  10700. return store.dispatch(type, payload)
  10701. },
  10702. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  10703. var args = unifyObjectStyle(_type, _payload, _options);
  10704. var payload = args.payload;
  10705. var options = args.options;
  10706. var type = args.type;
  10707. if (!options || !options.root) {
  10708. type = namespace + type;
  10709. if (( true) && !store._mutations[type]) {
  10710. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  10711. return
  10712. }
  10713. }
  10714. store.commit(type, payload, options);
  10715. }
  10716. };
  10717. // getters and state object must be gotten lazily
  10718. // because they will be changed by vm update
  10719. Object.defineProperties(local, {
  10720. getters: {
  10721. get: noNamespace
  10722. ? function () { return store.getters; }
  10723. : function () { return makeLocalGetters(store, namespace); }
  10724. },
  10725. state: {
  10726. get: function () { return getNestedState(store.state, path); }
  10727. }
  10728. });
  10729. return local
  10730. }
  10731. function makeLocalGetters (store, namespace) {
  10732. if (!store._makeLocalGettersCache[namespace]) {
  10733. var gettersProxy = {};
  10734. var splitPos = namespace.length;
  10735. Object.keys(store.getters).forEach(function (type) {
  10736. // skip if the target getter is not match this namespace
  10737. if (type.slice(0, splitPos) !== namespace) { return }
  10738. // extract local getter type
  10739. var localType = type.slice(splitPos);
  10740. // Add a port to the getters proxy.
  10741. // Define as getter property because
  10742. // we do not want to evaluate the getters in this time.
  10743. Object.defineProperty(gettersProxy, localType, {
  10744. get: function () { return store.getters[type]; },
  10745. enumerable: true
  10746. });
  10747. });
  10748. store._makeLocalGettersCache[namespace] = gettersProxy;
  10749. }
  10750. return store._makeLocalGettersCache[namespace]
  10751. }
  10752. function registerMutation (store, type, handler, local) {
  10753. var entry = store._mutations[type] || (store._mutations[type] = []);
  10754. entry.push(function wrappedMutationHandler (payload) {
  10755. handler.call(store, local.state, payload);
  10756. });
  10757. }
  10758. function registerAction (store, type, handler, local) {
  10759. var entry = store._actions[type] || (store._actions[type] = []);
  10760. entry.push(function wrappedActionHandler (payload) {
  10761. var res = handler.call(store, {
  10762. dispatch: local.dispatch,
  10763. commit: local.commit,
  10764. getters: local.getters,
  10765. state: local.state,
  10766. rootGetters: store.getters,
  10767. rootState: store.state
  10768. }, payload);
  10769. if (!isPromise(res)) {
  10770. res = Promise.resolve(res);
  10771. }
  10772. if (store._devtoolHook) {
  10773. return res.catch(function (err) {
  10774. store._devtoolHook.emit('vuex:error', err);
  10775. throw err
  10776. })
  10777. } else {
  10778. return res
  10779. }
  10780. });
  10781. }
  10782. function registerGetter (store, type, rawGetter, local) {
  10783. if (store._wrappedGetters[type]) {
  10784. if ((true)) {
  10785. console.error(("[vuex] duplicate getter key: " + type));
  10786. }
  10787. return
  10788. }
  10789. store._wrappedGetters[type] = function wrappedGetter (store) {
  10790. return rawGetter(
  10791. local.state, // local state
  10792. local.getters, // local getters
  10793. store.state, // root state
  10794. store.getters // root getters
  10795. )
  10796. };
  10797. }
  10798. function enableStrictMode (store) {
  10799. store._vm.$watch(function () { return this._data.$$state }, function () {
  10800. if ((true)) {
  10801. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  10802. }
  10803. }, { deep: true, sync: true });
  10804. }
  10805. function getNestedState (state, path) {
  10806. return path.reduce(function (state, key) { return state[key]; }, state)
  10807. }
  10808. function unifyObjectStyle (type, payload, options) {
  10809. if (isObject(type) && type.type) {
  10810. options = payload;
  10811. payload = type;
  10812. type = type.type;
  10813. }
  10814. if ((true)) {
  10815. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  10816. }
  10817. return { type: type, payload: payload, options: options }
  10818. }
  10819. function install (_Vue) {
  10820. if (Vue && _Vue === Vue) {
  10821. if ((true)) {
  10822. console.error(
  10823. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  10824. );
  10825. }
  10826. return
  10827. }
  10828. Vue = _Vue;
  10829. applyMixin(Vue);
  10830. }
  10831. /**
  10832. * Reduce the code which written in Vue.js for getting the state.
  10833. * @param {String} [namespace] - Module's namespace
  10834. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  10835. * @param {Object}
  10836. */
  10837. var mapState = normalizeNamespace(function (namespace, states) {
  10838. var res = {};
  10839. if (( true) && !isValidMap(states)) {
  10840. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  10841. }
  10842. normalizeMap(states).forEach(function (ref) {
  10843. var key = ref.key;
  10844. var val = ref.val;
  10845. res[key] = function mappedState () {
  10846. var state = this.$store.state;
  10847. var getters = this.$store.getters;
  10848. if (namespace) {
  10849. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  10850. if (!module) {
  10851. return
  10852. }
  10853. state = module.context.state;
  10854. getters = module.context.getters;
  10855. }
  10856. return typeof val === 'function'
  10857. ? val.call(this, state, getters)
  10858. : state[val]
  10859. };
  10860. // mark vuex getter for devtools
  10861. res[key].vuex = true;
  10862. });
  10863. return res
  10864. });
  10865. /**
  10866. * Reduce the code which written in Vue.js for committing the mutation
  10867. * @param {String} [namespace] - Module's namespace
  10868. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  10869. * @return {Object}
  10870. */
  10871. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  10872. var res = {};
  10873. if (( true) && !isValidMap(mutations)) {
  10874. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  10875. }
  10876. normalizeMap(mutations).forEach(function (ref) {
  10877. var key = ref.key;
  10878. var val = ref.val;
  10879. res[key] = function mappedMutation () {
  10880. var args = [], len = arguments.length;
  10881. while ( len-- ) args[ len ] = arguments[ len ];
  10882. // Get the commit method from store
  10883. var commit = this.$store.commit;
  10884. if (namespace) {
  10885. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  10886. if (!module) {
  10887. return
  10888. }
  10889. commit = module.context.commit;
  10890. }
  10891. return typeof val === 'function'
  10892. ? val.apply(this, [commit].concat(args))
  10893. : commit.apply(this.$store, [val].concat(args))
  10894. };
  10895. });
  10896. return res
  10897. });
  10898. /**
  10899. * Reduce the code which written in Vue.js for getting the getters
  10900. * @param {String} [namespace] - Module's namespace
  10901. * @param {Object|Array} getters
  10902. * @return {Object}
  10903. */
  10904. var mapGetters = normalizeNamespace(function (namespace, getters) {
  10905. var res = {};
  10906. if (( true) && !isValidMap(getters)) {
  10907. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  10908. }
  10909. normalizeMap(getters).forEach(function (ref) {
  10910. var key = ref.key;
  10911. var val = ref.val;
  10912. // The namespace has been mutated by normalizeNamespace
  10913. val = namespace + val;
  10914. res[key] = function mappedGetter () {
  10915. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  10916. return
  10917. }
  10918. if (( true) && !(val in this.$store.getters)) {
  10919. console.error(("[vuex] unknown getter: " + val));
  10920. return
  10921. }
  10922. return this.$store.getters[val]
  10923. };
  10924. // mark vuex getter for devtools
  10925. res[key].vuex = true;
  10926. });
  10927. return res
  10928. });
  10929. /**
  10930. * Reduce the code which written in Vue.js for dispatch the action
  10931. * @param {String} [namespace] - Module's namespace
  10932. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  10933. * @return {Object}
  10934. */
  10935. var mapActions = normalizeNamespace(function (namespace, actions) {
  10936. var res = {};
  10937. if (( true) && !isValidMap(actions)) {
  10938. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  10939. }
  10940. normalizeMap(actions).forEach(function (ref) {
  10941. var key = ref.key;
  10942. var val = ref.val;
  10943. res[key] = function mappedAction () {
  10944. var args = [], len = arguments.length;
  10945. while ( len-- ) args[ len ] = arguments[ len ];
  10946. // get dispatch function from store
  10947. var dispatch = this.$store.dispatch;
  10948. if (namespace) {
  10949. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  10950. if (!module) {
  10951. return
  10952. }
  10953. dispatch = module.context.dispatch;
  10954. }
  10955. return typeof val === 'function'
  10956. ? val.apply(this, [dispatch].concat(args))
  10957. : dispatch.apply(this.$store, [val].concat(args))
  10958. };
  10959. });
  10960. return res
  10961. });
  10962. /**
  10963. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  10964. * @param {String} namespace
  10965. * @return {Object}
  10966. */
  10967. var createNamespacedHelpers = function (namespace) { return ({
  10968. mapState: mapState.bind(null, namespace),
  10969. mapGetters: mapGetters.bind(null, namespace),
  10970. mapMutations: mapMutations.bind(null, namespace),
  10971. mapActions: mapActions.bind(null, namespace)
  10972. }); };
  10973. /**
  10974. * Normalize the map
  10975. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  10976. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  10977. * @param {Array|Object} map
  10978. * @return {Object}
  10979. */
  10980. function normalizeMap (map) {
  10981. if (!isValidMap(map)) {
  10982. return []
  10983. }
  10984. return Array.isArray(map)
  10985. ? map.map(function (key) { return ({ key: key, val: key }); })
  10986. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  10987. }
  10988. /**
  10989. * Validate whether given map is valid or not
  10990. * @param {*} map
  10991. * @return {Boolean}
  10992. */
  10993. function isValidMap (map) {
  10994. return Array.isArray(map) || isObject(map)
  10995. }
  10996. /**
  10997. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  10998. * @param {Function} fn
  10999. * @return {Function}
  11000. */
  11001. function normalizeNamespace (fn) {
  11002. return function (namespace, map) {
  11003. if (typeof namespace !== 'string') {
  11004. map = namespace;
  11005. namespace = '';
  11006. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  11007. namespace += '/';
  11008. }
  11009. return fn(namespace, map)
  11010. }
  11011. }
  11012. /**
  11013. * Search a special module from store by namespace. if module not exist, print error message.
  11014. * @param {Object} store
  11015. * @param {String} helper
  11016. * @param {String} namespace
  11017. * @return {Object}
  11018. */
  11019. function getModuleByNamespace (store, helper, namespace) {
  11020. var module = store._modulesNamespaceMap[namespace];
  11021. if (( true) && !module) {
  11022. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  11023. }
  11024. return module
  11025. }
  11026. // Credits: borrowed code from fcomb/redux-logger
  11027. function createLogger (ref) {
  11028. if ( ref === void 0 ) ref = {};
  11029. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  11030. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  11031. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  11032. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  11033. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  11034. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  11035. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  11036. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  11037. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  11038. return function (store) {
  11039. var prevState = deepCopy(store.state);
  11040. if (typeof logger === 'undefined') {
  11041. return
  11042. }
  11043. if (logMutations) {
  11044. store.subscribe(function (mutation, state) {
  11045. var nextState = deepCopy(state);
  11046. if (filter(mutation, prevState, nextState)) {
  11047. var formattedTime = getFormattedTime();
  11048. var formattedMutation = mutationTransformer(mutation);
  11049. var message = "mutation " + (mutation.type) + formattedTime;
  11050. startMessage(logger, message, collapsed);
  11051. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  11052. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  11053. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  11054. endMessage(logger);
  11055. }
  11056. prevState = nextState;
  11057. });
  11058. }
  11059. if (logActions) {
  11060. store.subscribeAction(function (action, state) {
  11061. if (actionFilter(action, state)) {
  11062. var formattedTime = getFormattedTime();
  11063. var formattedAction = actionTransformer(action);
  11064. var message = "action " + (action.type) + formattedTime;
  11065. startMessage(logger, message, collapsed);
  11066. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  11067. endMessage(logger);
  11068. }
  11069. });
  11070. }
  11071. }
  11072. }
  11073. function startMessage (logger, message, collapsed) {
  11074. var startMessage = collapsed
  11075. ? logger.groupCollapsed
  11076. : logger.group;
  11077. // render
  11078. try {
  11079. startMessage.call(logger, message);
  11080. } catch (e) {
  11081. logger.log(message);
  11082. }
  11083. }
  11084. function endMessage (logger) {
  11085. try {
  11086. logger.groupEnd();
  11087. } catch (e) {
  11088. logger.log('—— log end ——');
  11089. }
  11090. }
  11091. function getFormattedTime () {
  11092. var time = new Date();
  11093. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  11094. }
  11095. function repeat (str, times) {
  11096. return (new Array(times + 1)).join(str)
  11097. }
  11098. function pad (num, maxLength) {
  11099. return repeat('0', maxLength - num.toString().length) + num
  11100. }
  11101. var index_cjs = {
  11102. Store: Store,
  11103. install: install,
  11104. version: '3.6.2',
  11105. mapState: mapState,
  11106. mapMutations: mapMutations,
  11107. mapGetters: mapGetters,
  11108. mapActions: mapActions,
  11109. createNamespacedHelpers: createNamespacedHelpers,
  11110. createLogger: createLogger
  11111. };
  11112. module.exports = index_cjs;
  11113. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  11114. /***/ }),
  11115. /***/ 5:
  11116. /*!**************************************************************!*\
  11117. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  11118. \**************************************************************/
  11119. /*! no static exports found */
  11120. /***/ (function(module, exports, __webpack_require__) {
  11121. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  11122. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  11123. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  11124. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  11125. function _slicedToArray(arr, i) {
  11126. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  11127. }
  11128. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11129. /***/ }),
  11130. /***/ 50:
  11131. /*!*************************************************************!*\
  11132. !*** E:/work/Project_newGit/UniappShell/api/system/user.js ***!
  11133. \*************************************************************/
  11134. /*! no static exports found */
  11135. /***/ (function(module, exports, __webpack_require__) {
  11136. "use strict";
  11137. Object.defineProperty(exports, "__esModule", {
  11138. value: true
  11139. });
  11140. exports.getUserInfo = getUserInfo;
  11141. exports.getUserList = getUserList;
  11142. exports.login = login;
  11143. exports.logout = logout;
  11144. exports.register = register;
  11145. exports.updatePwd = updatePwd;
  11146. exports.uploadFile = uploadFile;
  11147. exports.wxWorkLogin = wxWorkLogin;
  11148. var _request = __webpack_require__(/*! @/libs/request.js */ 51);
  11149. function login(data) {
  11150. return (0, _request.request)({
  11151. url: '/login',
  11152. method: 'post',
  11153. header: {
  11154. 'content-type': "application/x-www-form-urlencoded"
  11155. },
  11156. data: data
  11157. });
  11158. }
  11159. function getUserInfo() {
  11160. return (0, _request.request)({
  11161. url: '/user/profile'
  11162. });
  11163. }
  11164. function logout() {
  11165. return (0, _request.request)({
  11166. url: '/logout',
  11167. method: 'GET'
  11168. });
  11169. }
  11170. function register(data) {
  11171. return (0, _request.request)({
  11172. url: '/user/register',
  11173. method: 'post',
  11174. data: data
  11175. });
  11176. }
  11177. /**公用上传接口 */
  11178. function uploadFile(data) {
  11179. return (0, _request.request)({
  11180. url: '/upload/file',
  11181. method: "post",
  11182. headers: {
  11183. 'Content-Type': 'multipart/form-data'
  11184. },
  11185. data: data
  11186. });
  11187. }
  11188. function updatePwd(data) {
  11189. return (0, _request.request)({
  11190. url: '/user/updatePassword',
  11191. method: "PUT",
  11192. data: data
  11193. });
  11194. }
  11195. //查询用户的带岗位
  11196. function getUserList() {
  11197. return (0, _request.request)({
  11198. url: '/user/select',
  11199. method: 'get'
  11200. });
  11201. }
  11202. //企业微信登录
  11203. function wxWorkLogin(_ref) {
  11204. var userId = _ref.userId,
  11205. code = _ref.code;
  11206. return (0, _request.request)({
  11207. url: "/user/updateWxUserId/".concat(userId, "/").concat(code),
  11208. method: 'post'
  11209. });
  11210. }
  11211. /***/ }),
  11212. /***/ 51:
  11213. /*!**********************************************************!*\
  11214. !*** E:/work/Project_newGit/UniappShell/libs/request.js ***!
  11215. \**********************************************************/
  11216. /*! no static exports found */
  11217. /***/ (function(module, exports, __webpack_require__) {
  11218. "use strict";
  11219. /* WEBPACK VAR INJECTION */(function(uni) {
  11220. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11221. Object.defineProperty(exports, "__esModule", {
  11222. value: true
  11223. });
  11224. exports.request = request;
  11225. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 52));
  11226. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  11227. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 54));
  11228. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.js */ 55));
  11229. var _auth = __webpack_require__(/*! @/libs/auth.js */ 56);
  11230. 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; }
  11231. 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; }
  11232. var baseUrl = true ? _index.default.base.dev : undefined;
  11233. function request(_x) {
  11234. return _request.apply(this, arguments);
  11235. }
  11236. function _request() {
  11237. _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(parmas) {
  11238. return _regenerator.default.wrap(function _callee$(_context) {
  11239. while (1) {
  11240. switch (_context.prev = _context.next) {
  11241. case 0:
  11242. return _context.abrupt("return", new Promise(function (resolve, reject) {
  11243. try {
  11244. uni.showLoading({
  11245. title: '加载中',
  11246. mask: true
  11247. });
  11248. uni.request(_objectSpread(_objectSpread({}, formatRequestBody(parmas)), {}, {
  11249. success: function success(response) {
  11250. var data = response.data;
  11251. var code = data.code;
  11252. var msg = data.msg;
  11253. if (code === 200) {
  11254. resolve(data);
  11255. } else {
  11256. if (code === 401) {
  11257. uni.showToast({
  11258. title: "登录失效!",
  11259. mask: true,
  11260. icon: "none",
  11261. duration: 3000,
  11262. complete: function complete() {
  11263. // let pages=getCurrentPages()
  11264. // console.log({
  11265. // page:pages[pages.length-1].$route.fullPath
  11266. // })
  11267. setTimeout(function () {
  11268. uni.navigateTo({
  11269. url: '/pages/login/index'
  11270. });
  11271. }, 3000);
  11272. }
  11273. });
  11274. } else {
  11275. reject(data);
  11276. uni.showToast({
  11277. title: msg,
  11278. mask: true,
  11279. duration: 3000,
  11280. icon: "none"
  11281. });
  11282. }
  11283. }
  11284. },
  11285. fail: function fail(res) {
  11286. uni.showToast({
  11287. title: res,
  11288. mask: true,
  11289. icon: "none"
  11290. });
  11291. reject(res);
  11292. },
  11293. complete: function complete(res) {
  11294. uni.hideLoading();
  11295. }
  11296. }));
  11297. } catch (err) {
  11298. console.log(err);
  11299. reject(err);
  11300. }
  11301. }));
  11302. case 1:
  11303. case "end":
  11304. return _context.stop();
  11305. }
  11306. }
  11307. }, _callee);
  11308. }));
  11309. return _request.apply(this, arguments);
  11310. }
  11311. function formatRequestBody(parmas) {
  11312. var url = parmas.url;
  11313. url = baseUrl + url;
  11314. var data = _objectSpread({}, parmas.data);
  11315. var header = _objectSpread(_objectSpread({}, parmas.header), {}, {
  11316. AppID: _index.default.appID,
  11317. AppKey: _index.default.appKey,
  11318. AppSecret: _index.default.appSecret
  11319. });
  11320. if ((0, _auth.getToken)()) {
  11321. header[_index.default.TokenKey] = (0, _auth.getToken)();
  11322. }
  11323. var method = parmas.method || "get";
  11324. var dataType = parmas.dataType || "json";
  11325. var requestBody = {
  11326. url: url,
  11327. data: data,
  11328. header: header,
  11329. method: method,
  11330. dataType: dataType
  11331. };
  11332. return requestBody;
  11333. }
  11334. ;
  11335. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  11336. /***/ }),
  11337. /***/ 52:
  11338. /*!************************************************************************************************!*\
  11339. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  11340. \************************************************************************************************/
  11341. /*! no static exports found */
  11342. /***/ (function(module, exports, __webpack_require__) {
  11343. // TODO(Babel 8): Remove this file.
  11344. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 53)();
  11345. module.exports = runtime;
  11346. /***/ }),
  11347. /***/ 53:
  11348. /*!*******************************************************************!*\
  11349. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  11350. \*******************************************************************/
  11351. /*! no static exports found */
  11352. /***/ (function(module, exports, __webpack_require__) {
  11353. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  11354. function _regeneratorRuntime() {
  11355. "use strict";
  11356. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  11357. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  11358. return exports;
  11359. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11360. var exports = {},
  11361. Op = Object.prototype,
  11362. hasOwn = Op.hasOwnProperty,
  11363. defineProperty = Object.defineProperty || function (obj, key, desc) {
  11364. obj[key] = desc.value;
  11365. },
  11366. $Symbol = "function" == typeof Symbol ? Symbol : {},
  11367. iteratorSymbol = $Symbol.iterator || "@@iterator",
  11368. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  11369. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  11370. function define(obj, key, value) {
  11371. return Object.defineProperty(obj, key, {
  11372. value: value,
  11373. enumerable: !0,
  11374. configurable: !0,
  11375. writable: !0
  11376. }), obj[key];
  11377. }
  11378. try {
  11379. define({}, "");
  11380. } catch (err) {
  11381. define = function define(obj, key, value) {
  11382. return obj[key] = value;
  11383. };
  11384. }
  11385. function wrap(innerFn, outerFn, self, tryLocsList) {
  11386. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  11387. generator = Object.create(protoGenerator.prototype),
  11388. context = new Context(tryLocsList || []);
  11389. return defineProperty(generator, "_invoke", {
  11390. value: makeInvokeMethod(innerFn, self, context)
  11391. }), generator;
  11392. }
  11393. function tryCatch(fn, obj, arg) {
  11394. try {
  11395. return {
  11396. type: "normal",
  11397. arg: fn.call(obj, arg)
  11398. };
  11399. } catch (err) {
  11400. return {
  11401. type: "throw",
  11402. arg: err
  11403. };
  11404. }
  11405. }
  11406. exports.wrap = wrap;
  11407. var ContinueSentinel = {};
  11408. function Generator() {}
  11409. function GeneratorFunction() {}
  11410. function GeneratorFunctionPrototype() {}
  11411. var IteratorPrototype = {};
  11412. define(IteratorPrototype, iteratorSymbol, function () {
  11413. return this;
  11414. });
  11415. var getProto = Object.getPrototypeOf,
  11416. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  11417. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  11418. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  11419. function defineIteratorMethods(prototype) {
  11420. ["next", "throw", "return"].forEach(function (method) {
  11421. define(prototype, method, function (arg) {
  11422. return this._invoke(method, arg);
  11423. });
  11424. });
  11425. }
  11426. function AsyncIterator(generator, PromiseImpl) {
  11427. function invoke(method, arg, resolve, reject) {
  11428. var record = tryCatch(generator[method], generator, arg);
  11429. if ("throw" !== record.type) {
  11430. var result = record.arg,
  11431. value = result.value;
  11432. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  11433. invoke("next", value, resolve, reject);
  11434. }, function (err) {
  11435. invoke("throw", err, resolve, reject);
  11436. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  11437. result.value = unwrapped, resolve(result);
  11438. }, function (error) {
  11439. return invoke("throw", error, resolve, reject);
  11440. });
  11441. }
  11442. reject(record.arg);
  11443. }
  11444. var previousPromise;
  11445. defineProperty(this, "_invoke", {
  11446. value: function value(method, arg) {
  11447. function callInvokeWithMethodAndArg() {
  11448. return new PromiseImpl(function (resolve, reject) {
  11449. invoke(method, arg, resolve, reject);
  11450. });
  11451. }
  11452. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  11453. }
  11454. });
  11455. }
  11456. function makeInvokeMethod(innerFn, self, context) {
  11457. var state = "suspendedStart";
  11458. return function (method, arg) {
  11459. if ("executing" === state) throw new Error("Generator is already running");
  11460. if ("completed" === state) {
  11461. if ("throw" === method) throw arg;
  11462. return doneResult();
  11463. }
  11464. for (context.method = method, context.arg = arg;;) {
  11465. var delegate = context.delegate;
  11466. if (delegate) {
  11467. var delegateResult = maybeInvokeDelegate(delegate, context);
  11468. if (delegateResult) {
  11469. if (delegateResult === ContinueSentinel) continue;
  11470. return delegateResult;
  11471. }
  11472. }
  11473. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  11474. if ("suspendedStart" === state) throw state = "completed", context.arg;
  11475. context.dispatchException(context.arg);
  11476. } else "return" === context.method && context.abrupt("return", context.arg);
  11477. state = "executing";
  11478. var record = tryCatch(innerFn, self, context);
  11479. if ("normal" === record.type) {
  11480. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  11481. return {
  11482. value: record.arg,
  11483. done: context.done
  11484. };
  11485. }
  11486. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  11487. }
  11488. };
  11489. }
  11490. function maybeInvokeDelegate(delegate, context) {
  11491. var methodName = context.method,
  11492. method = delegate.iterator[methodName];
  11493. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  11494. var record = tryCatch(method, delegate.iterator, context.arg);
  11495. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  11496. var info = record.arg;
  11497. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  11498. }
  11499. function pushTryEntry(locs) {
  11500. var entry = {
  11501. tryLoc: locs[0]
  11502. };
  11503. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  11504. }
  11505. function resetTryEntry(entry) {
  11506. var record = entry.completion || {};
  11507. record.type = "normal", delete record.arg, entry.completion = record;
  11508. }
  11509. function Context(tryLocsList) {
  11510. this.tryEntries = [{
  11511. tryLoc: "root"
  11512. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  11513. }
  11514. function values(iterable) {
  11515. if (iterable) {
  11516. var iteratorMethod = iterable[iteratorSymbol];
  11517. if (iteratorMethod) return iteratorMethod.call(iterable);
  11518. if ("function" == typeof iterable.next) return iterable;
  11519. if (!isNaN(iterable.length)) {
  11520. var i = -1,
  11521. next = function next() {
  11522. for (; ++i < iterable.length;) {
  11523. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  11524. }
  11525. return next.value = undefined, next.done = !0, next;
  11526. };
  11527. return next.next = next;
  11528. }
  11529. }
  11530. return {
  11531. next: doneResult
  11532. };
  11533. }
  11534. function doneResult() {
  11535. return {
  11536. value: undefined,
  11537. done: !0
  11538. };
  11539. }
  11540. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  11541. value: GeneratorFunctionPrototype,
  11542. configurable: !0
  11543. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  11544. value: GeneratorFunction,
  11545. configurable: !0
  11546. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  11547. var ctor = "function" == typeof genFun && genFun.constructor;
  11548. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  11549. }, exports.mark = function (genFun) {
  11550. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  11551. }, exports.awrap = function (arg) {
  11552. return {
  11553. __await: arg
  11554. };
  11555. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  11556. return this;
  11557. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  11558. void 0 === PromiseImpl && (PromiseImpl = Promise);
  11559. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  11560. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  11561. return result.done ? result.value : iter.next();
  11562. });
  11563. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  11564. return this;
  11565. }), define(Gp, "toString", function () {
  11566. return "[object Generator]";
  11567. }), exports.keys = function (val) {
  11568. var object = Object(val),
  11569. keys = [];
  11570. for (var key in object) {
  11571. keys.push(key);
  11572. }
  11573. return keys.reverse(), function next() {
  11574. for (; keys.length;) {
  11575. var key = keys.pop();
  11576. if (key in object) return next.value = key, next.done = !1, next;
  11577. }
  11578. return next.done = !0, next;
  11579. };
  11580. }, exports.values = values, Context.prototype = {
  11581. constructor: Context,
  11582. reset: function reset(skipTempReset) {
  11583. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  11584. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  11585. }
  11586. },
  11587. stop: function stop() {
  11588. this.done = !0;
  11589. var rootRecord = this.tryEntries[0].completion;
  11590. if ("throw" === rootRecord.type) throw rootRecord.arg;
  11591. return this.rval;
  11592. },
  11593. dispatchException: function dispatchException(exception) {
  11594. if (this.done) throw exception;
  11595. var context = this;
  11596. function handle(loc, caught) {
  11597. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  11598. }
  11599. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11600. var entry = this.tryEntries[i],
  11601. record = entry.completion;
  11602. if ("root" === entry.tryLoc) return handle("end");
  11603. if (entry.tryLoc <= this.prev) {
  11604. var hasCatch = hasOwn.call(entry, "catchLoc"),
  11605. hasFinally = hasOwn.call(entry, "finallyLoc");
  11606. if (hasCatch && hasFinally) {
  11607. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  11608. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  11609. } else if (hasCatch) {
  11610. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  11611. } else {
  11612. if (!hasFinally) throw new Error("try statement without catch or finally");
  11613. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  11614. }
  11615. }
  11616. }
  11617. },
  11618. abrupt: function abrupt(type, arg) {
  11619. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11620. var entry = this.tryEntries[i];
  11621. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  11622. var finallyEntry = entry;
  11623. break;
  11624. }
  11625. }
  11626. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  11627. var record = finallyEntry ? finallyEntry.completion : {};
  11628. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  11629. },
  11630. complete: function complete(record, afterLoc) {
  11631. if ("throw" === record.type) throw record.arg;
  11632. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  11633. },
  11634. finish: function finish(finallyLoc) {
  11635. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11636. var entry = this.tryEntries[i];
  11637. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  11638. }
  11639. },
  11640. "catch": function _catch(tryLoc) {
  11641. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11642. var entry = this.tryEntries[i];
  11643. if (entry.tryLoc === tryLoc) {
  11644. var record = entry.completion;
  11645. if ("throw" === record.type) {
  11646. var thrown = record.arg;
  11647. resetTryEntry(entry);
  11648. }
  11649. return thrown;
  11650. }
  11651. }
  11652. throw new Error("illegal catch attempt");
  11653. },
  11654. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  11655. return this.delegate = {
  11656. iterator: values(iterable),
  11657. resultName: resultName,
  11658. nextLoc: nextLoc
  11659. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  11660. }
  11661. }, exports;
  11662. }
  11663. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11664. /***/ }),
  11665. /***/ 54:
  11666. /*!*****************************************************************!*\
  11667. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  11668. \*****************************************************************/
  11669. /*! no static exports found */
  11670. /***/ (function(module, exports) {
  11671. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  11672. try {
  11673. var info = gen[key](arg);
  11674. var value = info.value;
  11675. } catch (error) {
  11676. reject(error);
  11677. return;
  11678. }
  11679. if (info.done) {
  11680. resolve(value);
  11681. } else {
  11682. Promise.resolve(value).then(_next, _throw);
  11683. }
  11684. }
  11685. function _asyncToGenerator(fn) {
  11686. return function () {
  11687. var self = this,
  11688. args = arguments;
  11689. return new Promise(function (resolve, reject) {
  11690. var gen = fn.apply(self, args);
  11691. function _next(value) {
  11692. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  11693. }
  11694. function _throw(err) {
  11695. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  11696. }
  11697. _next(undefined);
  11698. });
  11699. };
  11700. }
  11701. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11702. /***/ }),
  11703. /***/ 55:
  11704. /*!**********************************************************!*\
  11705. !*** E:/work/Project_newGit/UniappShell/config/index.js ***!
  11706. \**********************************************************/
  11707. /*! no static exports found */
  11708. /***/ (function(module, exports, __webpack_require__) {
  11709. "use strict";
  11710. Object.defineProperty(exports, "__esModule", {
  11711. value: true
  11712. });
  11713. exports.default = void 0;
  11714. var _default = {
  11715. base: {
  11716. dev: 'http://1.15.92.205:7001',
  11717. pro: 'http://1.15.92.205:7001'
  11718. },
  11719. appID: '10007',
  11720. appKey: '82a8bf439373e311',
  11721. appSecret: '82a8bf439373e311',
  11722. permitTplId: 7,
  11723. TokenKey: "Authorization"
  11724. };
  11725. exports.default = _default;
  11726. /***/ }),
  11727. /***/ 56:
  11728. /*!*******************************************************!*\
  11729. !*** E:/work/Project_newGit/UniappShell/libs/auth.js ***!
  11730. \*******************************************************/
  11731. /*! no static exports found */
  11732. /***/ (function(module, exports, __webpack_require__) {
  11733. "use strict";
  11734. /* WEBPACK VAR INJECTION */(function(uni) {
  11735. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11736. Object.defineProperty(exports, "__esModule", {
  11737. value: true
  11738. });
  11739. exports.getToken = getToken;
  11740. exports.removeToken = removeToken;
  11741. exports.setToken = setToken;
  11742. var _index = _interopRequireDefault(__webpack_require__(/*! ../config/index.js */ 55));
  11743. var TokenKey = _index.default.TokenKey;
  11744. function getToken() {
  11745. return uni.getStorageSync(TokenKey);
  11746. }
  11747. function setToken(token) {
  11748. return uni.setStorageSync(TokenKey, token);
  11749. }
  11750. function removeToken() {
  11751. return uni.removeStorageSync(TokenKey);
  11752. }
  11753. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  11754. /***/ }),
  11755. /***/ 6:
  11756. /*!***************************************************************!*\
  11757. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  11758. \***************************************************************/
  11759. /*! no static exports found */
  11760. /***/ (function(module, exports) {
  11761. function _arrayWithHoles(arr) {
  11762. if (Array.isArray(arr)) return arr;
  11763. }
  11764. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11765. /***/ }),
  11766. /***/ 7:
  11767. /*!*********************************************************************!*\
  11768. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  11769. \*********************************************************************/
  11770. /*! no static exports found */
  11771. /***/ (function(module, exports) {
  11772. function _iterableToArrayLimit(arr, i) {
  11773. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  11774. if (null != _i) {
  11775. var _s,
  11776. _e,
  11777. _x,
  11778. _r,
  11779. _arr = [],
  11780. _n = !0,
  11781. _d = !1;
  11782. try {
  11783. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  11784. if (Object(_i) !== _i) return;
  11785. _n = !1;
  11786. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  11787. ;
  11788. }
  11789. } catch (err) {
  11790. _d = !0, _e = err;
  11791. } finally {
  11792. try {
  11793. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  11794. } finally {
  11795. if (_d) throw _e;
  11796. }
  11797. }
  11798. return _arr;
  11799. }
  11800. }
  11801. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11802. /***/ }),
  11803. /***/ 73:
  11804. /*!********************************************************!*\
  11805. !*** E:/work/Project_newGit/UniappShell/libs/index.js ***!
  11806. \********************************************************/
  11807. /*! no static exports found */
  11808. /***/ (function(module, exports, __webpack_require__) {
  11809. "use strict";
  11810. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11811. Object.defineProperty(exports, "__esModule", {
  11812. value: true
  11813. });
  11814. exports.addClass = addClass;
  11815. exports.byteLength = byteLength;
  11816. exports.cleanArray = cleanArray;
  11817. exports.createUniqueString = createUniqueString;
  11818. exports.debounce = debounce;
  11819. exports.deepClone = deepClone;
  11820. exports.distanceTime = distanceTime;
  11821. exports.formatTime = formatTime;
  11822. exports.getQueryObject = getQueryObject;
  11823. exports.getTime = getTime;
  11824. exports.hasClass = hasClass;
  11825. exports.html2Text = html2Text;
  11826. exports.isEmpty = isEmpty;
  11827. exports.objectMerge = objectMerge;
  11828. exports.param = param;
  11829. exports.param2Obj = param2Obj;
  11830. exports.parseTime = parseTime;
  11831. exports.removeClass = removeClass;
  11832. exports.toggleClass = toggleClass;
  11833. exports.uniqueArr = uniqueArr;
  11834. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11835. /**
  11836. * Created by PanJiaChen on 16/11/18.
  11837. */
  11838. /**
  11839. * Parse the time to string
  11840. * @param {(Object|string|number)} time
  11841. * @param {string} cFormat
  11842. * @returns {string | null}
  11843. */
  11844. function parseTime(time, cFormat) {
  11845. if (arguments.length === 0 || !time) {
  11846. return null;
  11847. }
  11848. var format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
  11849. var date;
  11850. if ((0, _typeof2.default)(time) === 'object') {
  11851. date = time;
  11852. } else {
  11853. if (typeof time === 'string') {
  11854. if (/^[0-9]+$/.test(time)) {
  11855. // support "1548221490638"
  11856. time = parseInt(time);
  11857. } else {
  11858. // support safari
  11859. // https://stackoverflow.com/questions/4310953/invalid-date-in-safari
  11860. time = time.replace(new RegExp(/-/gm), '/');
  11861. }
  11862. }
  11863. if (typeof time === 'number' && time.toString().length === 10) {
  11864. time = time * 1000;
  11865. }
  11866. date = new Date(time);
  11867. }
  11868. var formatObj = {
  11869. y: date.getFullYear(),
  11870. m: date.getMonth() + 1,
  11871. d: date.getDate(),
  11872. h: date.getHours(),
  11873. i: date.getMinutes(),
  11874. s: date.getSeconds(),
  11875. a: date.getDay()
  11876. };
  11877. var time_str = format.replace(/{([ymdhisa])+}/g, function (result, key) {
  11878. var value = formatObj[key];
  11879. // Note: getDay() returns 0 on Sunday
  11880. if (key === 'a') {
  11881. return ['日', '一', '二', '三', '四', '五', '六'][value];
  11882. }
  11883. return value.toString().padStart(2, '0');
  11884. });
  11885. return time_str;
  11886. }
  11887. /**
  11888. * @param {number} time
  11889. * @param {string} option
  11890. * @returns {string}
  11891. */
  11892. function formatTime(time, option) {
  11893. if (('' + time).length === 10) {
  11894. time = parseInt(time) * 1000;
  11895. } else {
  11896. time = +time;
  11897. }
  11898. var d = new Date(time);
  11899. var now = Date.now();
  11900. var diff = (now - d) / 1000;
  11901. if (diff < 30) {
  11902. return '刚刚';
  11903. } else if (diff < 3600) {
  11904. // less 1 hour
  11905. return Math.ceil(diff / 60) + '分钟前';
  11906. } else if (diff < 3600 * 24) {
  11907. return Math.ceil(diff / 3600) + '小时前';
  11908. } else if (diff < 3600 * 24 * 2) {
  11909. return '1天前';
  11910. }
  11911. if (option) {
  11912. return parseTime(time, option);
  11913. } else {
  11914. return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分';
  11915. }
  11916. }
  11917. /**
  11918. * @param {string} url
  11919. * @returns {Object}
  11920. */
  11921. function getQueryObject(url) {
  11922. url = url == null ? window.location.href : url;
  11923. var search = url.substring(url.lastIndexOf('?') + 1);
  11924. var obj = {};
  11925. var reg = /([^?&=]+)=([^?&=]*)/g;
  11926. search.replace(reg, function (rs, $1, $2) {
  11927. var name = decodeURIComponent($1);
  11928. var val = decodeURIComponent($2);
  11929. val = String(val);
  11930. obj[name] = val;
  11931. return rs;
  11932. });
  11933. return obj;
  11934. }
  11935. /**
  11936. * @param {string} input value
  11937. * @returns {number} output value
  11938. */
  11939. function byteLength(str) {
  11940. // returns the byte length of an utf8 string
  11941. var s = str.length;
  11942. for (var i = str.length - 1; i >= 0; i--) {
  11943. var code = str.charCodeAt(i);
  11944. if (code > 0x7f && code <= 0x7ff) s++;else if (code > 0x7ff && code <= 0xffff) s += 2;
  11945. if (code >= 0xDC00 && code <= 0xDFFF) i--;
  11946. }
  11947. return s;
  11948. }
  11949. /**
  11950. * @param {Array} actual
  11951. * @returns {Array}
  11952. */
  11953. function cleanArray(actual) {
  11954. var newArray = [];
  11955. for (var i = 0; i < actual.length; i++) {
  11956. if (actual[i]) {
  11957. newArray.push(actual[i]);
  11958. }
  11959. }
  11960. return newArray;
  11961. }
  11962. /**
  11963. * @param {Object} json
  11964. * @returns {Array}
  11965. */
  11966. function param(json) {
  11967. if (!json) return '';
  11968. return cleanArray(Object.keys(json).map(function (key) {
  11969. if (json[key] === undefined) return '';
  11970. return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]);
  11971. })).join('&');
  11972. }
  11973. /**
  11974. * @param {string} url
  11975. * @returns {Object}
  11976. */
  11977. function param2Obj(url) {
  11978. var search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ');
  11979. if (!search) {
  11980. return {};
  11981. }
  11982. var obj = {};
  11983. var searchArr = search.split('&');
  11984. searchArr.forEach(function (v) {
  11985. var index = v.indexOf('=');
  11986. if (index !== -1) {
  11987. var name = v.substring(0, index);
  11988. var val = v.substring(index + 1, v.length);
  11989. obj[name] = val;
  11990. }
  11991. });
  11992. return obj;
  11993. }
  11994. /**
  11995. * @param {string} val
  11996. * @returns {string}
  11997. */
  11998. function html2Text(val) {
  11999. var div = document.createElement('div');
  12000. div.innerHTML = val;
  12001. return div.textContent || div.innerText;
  12002. }
  12003. /**
  12004. * Merges two objects, giving the last one precedence
  12005. * @param {Object} target
  12006. * @param {(Object|Array)} source
  12007. * @returns {Object}
  12008. */
  12009. function objectMerge(target, source) {
  12010. if ((0, _typeof2.default)(target) !== 'object') {
  12011. target = {};
  12012. }
  12013. if (Array.isArray(source)) {
  12014. return source.slice();
  12015. }
  12016. Object.keys(source).forEach(function (property) {
  12017. var sourceProperty = source[property];
  12018. if ((0, _typeof2.default)(sourceProperty) === 'object') {
  12019. target[property] = objectMerge(target[property], sourceProperty);
  12020. } else {
  12021. target[property] = sourceProperty;
  12022. }
  12023. });
  12024. return target;
  12025. }
  12026. /**
  12027. * @param {HTMLElement} element
  12028. * @param {string} className
  12029. */
  12030. function toggleClass(element, className) {
  12031. if (!element || !className) {
  12032. return;
  12033. }
  12034. var classString = element.className;
  12035. var nameIndex = classString.indexOf(className);
  12036. if (nameIndex === -1) {
  12037. classString += '' + className;
  12038. } else {
  12039. classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length);
  12040. }
  12041. element.className = classString;
  12042. }
  12043. /**
  12044. * @param {string} type
  12045. * @returns {Date}
  12046. */
  12047. function getTime(type) {
  12048. if (type === 'start') {
  12049. return new Date().getTime() - 3600 * 1000 * 24 * 90;
  12050. } else {
  12051. return new Date(new Date().toDateString());
  12052. }
  12053. }
  12054. /**
  12055. * @param {Function} func
  12056. * @param {number} wait
  12057. * @param {boolean} immediate
  12058. * @return {*}
  12059. */
  12060. function debounce(func, wait, immediate) {
  12061. var timeout, args, context, timestamp, result;
  12062. var later = function later() {
  12063. // 据上一次触发时间间隔
  12064. var last = +new Date() - timestamp;
  12065. // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
  12066. if (last < wait && last > 0) {
  12067. timeout = setTimeout(later, wait - last);
  12068. } else {
  12069. timeout = null;
  12070. // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
  12071. if (!immediate) {
  12072. result = func.apply(context, args);
  12073. if (!timeout) context = args = null;
  12074. }
  12075. }
  12076. };
  12077. return function () {
  12078. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  12079. args[_key] = arguments[_key];
  12080. }
  12081. context = this;
  12082. timestamp = +new Date();
  12083. var callNow = immediate && !timeout;
  12084. // 如果延时不存在,重新设定延时
  12085. if (!timeout) timeout = setTimeout(later, wait);
  12086. if (callNow) {
  12087. result = func.apply(context, args);
  12088. context = args = null;
  12089. }
  12090. return result;
  12091. };
  12092. }
  12093. /**
  12094. * This is just a simple version of deep copy
  12095. * Has a lot of edge cases bug
  12096. * If you want to use a perfect deep copy, use lodash's _.cloneDeep
  12097. * @param {Object} source
  12098. * @returns {Object}
  12099. */
  12100. function deepClone(source) {
  12101. if (!source && (0, _typeof2.default)(source) !== 'object') {
  12102. throw new Error('error arguments', 'deepClone');
  12103. }
  12104. var targetObj = source.constructor === Array ? [] : {};
  12105. Object.keys(source).forEach(function (keys) {
  12106. if (source[keys] && (0, _typeof2.default)(source[keys]) === 'object') {
  12107. targetObj[keys] = deepClone(source[keys]);
  12108. } else {
  12109. targetObj[keys] = source[keys];
  12110. }
  12111. });
  12112. return targetObj;
  12113. }
  12114. /**
  12115. * @param {Array} arr
  12116. * @returns {Array}
  12117. */
  12118. function uniqueArr(arr) {
  12119. return Array.from(new Set(arr));
  12120. }
  12121. /**
  12122. * @returns {string}
  12123. */
  12124. function createUniqueString() {
  12125. var timestamp = +new Date() + '';
  12126. var randomNum = parseInt((1 + Math.random()) * 65536) + '';
  12127. return (+(randomNum + timestamp)).toString(32);
  12128. }
  12129. /**
  12130. * Check if an element has a class
  12131. * @param {HTMLElement} elm
  12132. * @param {string} cls
  12133. * @returns {boolean}
  12134. */
  12135. function hasClass(ele, cls) {
  12136. return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
  12137. }
  12138. /**
  12139. * Add class to element
  12140. * @param {HTMLElement} elm
  12141. * @param {string} cls
  12142. */
  12143. function addClass(ele, cls) {
  12144. if (!hasClass(ele, cls)) ele.className += ' ' + cls;
  12145. }
  12146. /**
  12147. * Remove class from element
  12148. * @param {HTMLElement} elm
  12149. * @param {string} cls
  12150. */
  12151. function removeClass(ele, cls) {
  12152. if (hasClass(ele, cls)) {
  12153. var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
  12154. ele.className = ele.className.replace(reg, ' ');
  12155. }
  12156. }
  12157. function distanceTime(time) {
  12158. //获取当前时间
  12159. var date = new Date();
  12160. var now = date.getTime();
  12161. //设置截止时间
  12162. var endDate = new Date();
  12163. if (time) {
  12164. endDate = new Date(time);
  12165. }
  12166. var end = endDate.getTime();
  12167. //获取截止时间和当前时间的时间差
  12168. if (now >= end) {
  12169. return '已过期';
  12170. }
  12171. var leftTime = end - now;
  12172. //定义变量 d,h,m,s分别保存天数,小时,分钟,秒
  12173. var d, h, m, s;
  12174. //判断剩余天数,时,分,秒
  12175. if (leftTime >= 0) {
  12176. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  12177. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  12178. m = Math.floor(leftTime / 1000 / 60 % 60);
  12179. s = Math.floor(leftTime / 1000 % 60);
  12180. }
  12181. if (d > 0) {
  12182. return "".concat(d, "\u5929").concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  12183. } else {
  12184. if (h > 0) {
  12185. return "".concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  12186. } else {
  12187. return "".concat(m, "\u5206\u949F");
  12188. }
  12189. }
  12190. }
  12191. function isEmpty(value) {
  12192. if (value === undefined || value === "undefined" || value === "" || value === null) {
  12193. return true;
  12194. }
  12195. return false;
  12196. }
  12197. /***/ }),
  12198. /***/ 74:
  12199. /*!***********************************************************************!*\
  12200. !*** E:/work/Project_newGit/UniappShell/static/components/avatar.png ***!
  12201. \***********************************************************************/
  12202. /*! no static exports found */
  12203. /***/ (function(module, exports) {
  12204. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAD2BJREFUeF7tXXuMHVUZ/77ZC2VL3WKVAmLwAYRWkD+sCkjL01AKQikIiQoYHqaGagPrzje3JOBVEnbnzLKQhRI2lhIVNbFARaQtRCq4IrWAiTwsBOqDhFdFZNfSpWXvfOZbZ8t2X3fmzjkzZ7b3JDe77Z7znd/3nd+dxznfA2EKtq6urlmDg4NzEXEOM88FAPnMAoDpiDidmacDwP7y70j9HQDwLiLuYGb5XT5vA8AWRNzCzC+USqUtra2t8n9TqmHRtalUKvs1NzcvAIAFiCg/ZbEPMqTXm0IKZu4FgN6BgYHeSqXynqG5MhFbSAJ0dHQsRMQT5QMA8pmWibXGTrITAB5n5qFPuVx+KCccdU9bGAJ0dHQschxnETMvQsQj6tbY4EBmfhkR14dhuL5cLq83OJU20VYToAiLPtFKFIUMVhJAKXUhAFwOAGdqo3q+gjYAwGoiWpMvjLGzW0UApdSl0cKfbJuhNOF5LCLCTzTJSy3GCgIEQXAZM38bAL6YWqNiCNiMiHe4rntX3nBzJUBnZ+e8MAxXAMAFeRsip/nvdRynva2t7emc5odcCNDT07NPf39/mZll8ZvzUt6SeQcQsb2lpaVj6dKl72eNKXMCBEGwmJnLAHB81spaPt8mROxwXff+LHFmSgDf9yuI+P0sFSzaXMz8A8/zKlnhzoQASqnDASAAgCVZKVbwedYCgEtEW03rYZwAQRAsYWZZfCFBo8W3wFZEdF3XFTIYa0YJ0Ljkp18307cEYwRQSvkAQOlN0JAAAIqIPBOWMEIApVQ3AHzXBOC9WOatRLRct/7aCRAEwSPMfJpuoA15AIi40XXd03XaQisBlFLiMDFbJ8CGrDEW2EZE2hxetBFAKdUHAC2NBcvEAv1ENFPHTFoIoJR6DgCO1gGoISO2BZ4nomNi956gY2oCBEGwgZkXpgXSGJ/cAoj4kOu6qXwmUhHA9/1ViHhFcuiNEboswMx3ep53Zb3y6iZAY5OnXpPrH5dms6guAkTbu/fpV8WcRER8kpn/AAAvIeIr1Wr1FQCQj7TDmpqaDmPmwwDgSEScz8xfMIdGv2REPL+ebePEBIgOdsT92fq9fbk8NjU1rZOFd113WxKzB0EwW4hQrVbPKshtTg6OFiY9QKqHAPLNt/pUTx6OqtXqzbr89CUOoamp6ZoCPOyuJaLzkxA9EQEKcN/fiYjLXNe9M4kR4vYNguAKZl6ZYyBKTahJnwdiEyDy5PlVTQT5dXgLAL5JROtMQlBKnQUAPwaAj5qcJ41sRDwvrmdRLAKID19fX9/vLXbj+hsiHuu67rtpDBd3bBAE+zPzMwDw6bhjMu63aebMmSfF8TGMRYAgCK5j5h9mrETc6TYR0QlxO+vsp5R6wtYvBSJe77ruDbX0rUmAyHVbomGt895FxJdd1z2ylpIm/x4EwUvMbGOs4oDjOAtquZzXJIBS6h5L/fb7mPk4z/NeNLnAtWT7vn8UIv4JALQcztSaL+Hf7yWir042ZlICRBE7qxNOmkn3ejc+TICzeWMMES+fLAJpUgIopYTZ1oVrIeI9rutKAKk1LQiCNcw86bctJ7Cbiei4ieaekABRoKa87ljXqtXqqStWrHjUJmDt7e2nNDU1/c4mTCOwyOvxuAGpkxFADGxdlC4z3+V5noSOW9d831+NiJdZBwzgMSI6ZTxc4xIgis//pYWKADOf4HneJhux+b5/PCLKq6GN7aLx8hNMRABJb5LK0cCQBbR4wRjCNiTWYu+oDUS0aLTuYwgQpWUxup1a7wIg4m2u61rtbh4Ewa3M/J16dTQ5LgzDs0bnLhpDAJt9+m18+Bu9YJY/DI6JLRhDAN/3xWHCxp2tQSLax+Q3RJdspZTE+Zd0ydMlRxJXeZ63x87pHgSw+fIPAG8R0YG6jGFSjlLqX7aeFo6+DexBAJsv/zbs+8cljcXnA6LCHreBPQhg8eVfgD9FRIXw01NKPQkAn49LmCz7jb4N7CaAuD05jiP57KxsiCh+fZIL2PoWBEEvM8+3FWgYhmcOu8vtJoDlZ/5iy2eJ6FhbjToSl1JKnEU+ayvWkb4Cuwng+/5vEPFsW0GLCzcRfcJifLuhKaX+Ka7mtmJl5gc9z/uK4BsiQHd397SBgYF3EHE/W0EDQB8RHWAxvpEEeMdS/4AhjMz8XnNz8wHLly/fOUQApZTcW8Xnz+pGRDUdWGxQQCnFNuCogeEkIuodMqjv+9choq0+fyP1GPdAwyZj23yQNtJOzHy953k3DF8B5Bx73ONCm4wLAHcT0SWWYdoDjlLqpwBwsc0YI2yPEtGpwwR4w2CZFZ22eI2IDtUpULcspdSrAPAx3XINyHuTiA7GqMDSvw1MYEQkIp7ruu4DRoSnFBoEwTnM/OuUYjIbXiqVPoJKKam5I1GzRWkPE5GVCSmUUhI0e0ZRDAkA8zGKd1tVINDyGnOx53k/swmz7/vfQMS7bcJUCwsiXilXgE4A+F6tzpb9/Qki+pJNmJRSfwSAXCKUUtjhJiHAgwAgAY+FasxMnudJDuLcm+/7LiKq3IEkB7BOCGBtfFsMfc42HQ1cC0MULSxfoiK2TUKAvwBAIQ5ZxrNwtVr91IoVK/6Rh/Xb29s/2dTU9Pc85tY05zPyEGhrcGNsHffdd9+Dr776aslSmlm75ZZbDtq1a5fsnxS2iZONXAGKsnFRy9BSYEEeaI03pVRbVADD+FyGJ3hNCGD1yVVCA/QQkZSfM9aUUncAwFJjE2QruE8IsAsACuFtG9M28lB7s+4qndEhzzUFfNWbzGzvT0UCDCu8BhFvdl03VahWEAQnMLMsvFXRyDG/DLW6DRFgKt0Cxigs1byZeX2pVFrf2tr6ci2LyN+7urqOGBwclCrlQ9XK44wpaJ+hW8BUeQiMswbPIuKLzPyqfBzHebVarQ46jiPuWx9HxEOZ+Sib/fniKJmgz2tT4jVwIoUR8QUAeFhcoR3HeT0Mw9cB4I0dO3a8XqlUdowc19PTM72vr++QMAwPKZVKB8vPKELqDGaek8Cohek6/BpY6I2gUdb+r2QJBYDfMvNGInpJx2oopSR/sJTB+XKULfRDOuRaIOOZom8FD9twFTM/MGPGjI3Lli3bbtKwK1eunLF9+/bTEPEcAKg7TbtJjAlkD20FF/IwKFJyTRiGt5XL5VwcWjs6Ok5yHEdCwYv6hjB0GFTE4+CHo1wBVngGRZ5AQoQiOYPId+imojmEbGbm2zzPE8dL65rv+5cgohDBusxq4xlr2CGkEC5hiHi767rLrFv1cQAFQbCSma8qANb5RXEK9YioUA4XSikpmyvlc61tQ06hgk4pZatb+FvVavVC23ICxl3RKF3MGkuTRfzfLTwigI2BIU8TkZUx9nEJMNxPKfUUAMxLOs5w/w8CQ2wLDUta9cKwobSIt63ayujQMJuCQ+8novO0WN0yIUopqbiy2BJYHwSHWhQeXpgcAPUuog25A8aEh4syNiSIcBxnbltbmxzgTNnW2dk5JwzDLXkqOCZBhICxIEXM14noF3kaJqu5lVJfA4CfZzXf6HnGTRGTZ5IoZg48z5P35r2m+b6vENHNQ+Fxk0RFt4E8soROWtAgDwNlNWceBTkmTBMX7Qd0A0CmyZiZ+VJb9/ZNEyE6Oxi3kIPBuSdOFJlDqlhrQ70NLsAeorMOKZ80VWzWtwGbkz1kRYAsk0rUTBad8W1gDRFdlJWhbZ5HKSXVWbJwKqmdLj6r20AYhifn5cljGxkiz6LHTOOKVTAiugqYLhmzioi+ZVrhIslXSv3IsI9hvJIxEQHkcmSsaJRNRR9tIUkGxSfjF42KSGCkbBwibp82bdqhy5cv77fF+Dbg6O7ubtm5c6cErMwwgCdZ2biIAJcCgPbCkRKm5Xle4VLSGFiUMSJ9318n4WgG5kpeODIigYnSsYVz7zKwIOOKNORGVl/pWEFooni04zhHt7W1/TUroxZpns7Ozs+EYfi8TsypikdHVwGd5eO3EpGNFcl02jyVLKWURDAfnkrIB4PTlY8XOZ2dnfPCMOwFgGYNoMZsRGiQOaVEaCzcNeA4zoK2tranJzNQrPz7unwFmHmZ53m3T6kV06yM7/tXIeLKtGJHnvmnJkBPT88+fX19En93fBpgzLzY87zCJFNOo2u9Y33fPxcR7693fDRu08yZM09aunSpFLCctMW6AkQPhIuZWZwa07R5RPTnNAKm+lil1OcAYNLLdi0bIOJ5ruvGIlFsAsikaV2bBwcHZ1977bVSVbPRJrDAjTfeeGCpVNpWr4GSutQnIoCAUkrdBwBL6gFYlJo/9eimc0yKmkNriej8JFjqIYC8okgWjqSvKu8Q0YeTgNtb+yql/gMASSukbQWAhUQkP2O3xASIngeWMLNcCZK054nomCQD9ta+SqnnAODoJPrXe8BWFwF0PA8kUa7Rd3ILJL3vj5RWNwEiEqxCxCsaC5SfBZj5Ts/z6s5VlIoA0e1gQ5Q5Kz8r7KUzS0Y013XPTKN+agJEbwaJ71lpQDfGDllAyzOVFgJEJOgDgJbG4mRigX4imqljJm0EiEggRRtm6wDWkDGhBbYR0UG67KOVANEzwSPMLFk1G02zBRBxo+u6p+sUq50A0ZUg8xAznUaxVJaRo3QjBIhIIBmy9qqIX4PEUUTkmZBvjAACNu3hkQmFiyYzzSZPHF2NEiB6JpBtYynwmPTsIA7+qdxnq+QPcF13rUkljRMguh3I4gsJ6jpFNGkAS2XLoksVtEQHO/XokgkBhoE1bgm1l8j0JX80gkwJEN0SxLOonNa9rLYpC9djEyJ2xPXk0aVd5gQQ4OJj2N/fX2bmFZq8jXXZIw85A4jY3tLS0hHHh083wFwIMKxE5HIuJLhAt2IFkXev4zjttVy3TeqSKwGGFYsikKTiZyHy7GtYkM2IeIfrundpkJVKhBUEGNZAKSUBqZcDwMmptLJ3sCSBWE1EWSeGmtAiVhFgBBEkP4EQIdVZt0U82BAtvKSOt6pZSYBhC0Xpaoaqd0Y1/Kwy3mRgJCGTVC0Nw3B9uVyWjCtWNqsJMNJiRSBDURZ9pF0LQ4BRZFiIiCfKBwDkMy2nr9dOAHicmYc+5XJZ3OUL1QpJgJEWrlQq+zU3N0u9gwWIKD/nAoA2h4lRqykOL1uYWaKlewcGBnorlcp7hVrxUWALT4DxjN/V1TVrcHBwLiLOYWYhhHxmAcB0RJzOzNMBYH/5dzRe6gi/i4g7mFl+l8/bstiIKAv+QqlU2tLa2ir/N6Xa/wBXxyT5Pl8TYwAAAABJRU5ErkJggg=="
  12205. /***/ }),
  12206. /***/ 8:
  12207. /*!***************************************************************************!*\
  12208. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  12209. \***************************************************************************/
  12210. /*! no static exports found */
  12211. /***/ (function(module, exports, __webpack_require__) {
  12212. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  12213. function _unsupportedIterableToArray(o, minLen) {
  12214. if (!o) return;
  12215. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  12216. var n = Object.prototype.toString.call(o).slice(8, -1);
  12217. if (n === "Object" && o.constructor) n = o.constructor.name;
  12218. if (n === "Map" || n === "Set") return Array.from(o);
  12219. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  12220. }
  12221. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12222. /***/ }),
  12223. /***/ 9:
  12224. /*!*****************************************************************!*\
  12225. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  12226. \*****************************************************************/
  12227. /*! no static exports found */
  12228. /***/ (function(module, exports) {
  12229. function _arrayLikeToArray(arr, len) {
  12230. if (len == null || len > arr.length) len = arr.length;
  12231. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  12232. arr2[i] = arr[i];
  12233. }
  12234. return arr2;
  12235. }
  12236. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12237. /***/ })
  12238. }]);
  12239. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map