vendor.js 438 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
  10. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 4);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  11. var realAtob;
  12. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  13. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14. if (typeof atob !== 'function') {
  15. realAtob = function realAtob(str) {
  16. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  17. if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
  18. // Adding the padding if missing, for semplicity
  19. str += '=='.slice(2 - (str.length & 3));
  20. var bitmap;var result = '';var r1;var r2;var i = 0;
  21. for (; i < str.length;) {
  22. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 |
  23. (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  25. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  26. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  27. }
  28. return result;
  29. };
  30. } else {
  31. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  32. realAtob = atob;
  33. }
  34. function b64DecodeUnicode(str) {
  35. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  36. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  37. }).join(''));
  38. }
  39. function getCurrentUserInfo() {
  40. var token = wx.getStorageSync('uni_id_token') || '';
  41. var tokenArr = token.split('.');
  42. if (!token || tokenArr.length !== 3) {
  43. return {
  44. uid: null,
  45. role: [],
  46. permission: [],
  47. tokenExpired: 0 };
  48. }
  49. var userInfo;
  50. try {
  51. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  52. } catch (error) {
  53. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  54. }
  55. userInfo.tokenExpired = userInfo.exp * 1000;
  56. delete userInfo.exp;
  57. delete userInfo.iat;
  58. return userInfo;
  59. }
  60. function uniIdMixin(Vue) {
  61. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  62. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  63. return role.indexOf(roleId) > -1;
  64. };
  65. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  66. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  67. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  68. };
  69. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  70. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  71. return tokenExpired > Date.now();
  72. };
  73. }
  74. var _toString = Object.prototype.toString;
  75. var hasOwnProperty = Object.prototype.hasOwnProperty;
  76. function isFn(fn) {
  77. return typeof fn === 'function';
  78. }
  79. function isStr(str) {
  80. return typeof str === 'string';
  81. }
  82. function isPlainObject(obj) {
  83. return _toString.call(obj) === '[object Object]';
  84. }
  85. function hasOwn(obj, key) {
  86. return hasOwnProperty.call(obj, key);
  87. }
  88. function noop() {}
  89. /**
  90. * Create a cached version of a pure function.
  91. */
  92. function cached(fn) {
  93. var cache = Object.create(null);
  94. return function cachedFn(str) {
  95. var hit = cache[str];
  96. return hit || (cache[str] = fn(str));
  97. };
  98. }
  99. /**
  100. * Camelize a hyphen-delimited string.
  101. */
  102. var camelizeRE = /-(\w)/g;
  103. var camelize = cached(function (str) {
  104. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  105. });
  106. var HOOKS = [
  107. 'invoke',
  108. 'success',
  109. 'fail',
  110. 'complete',
  111. 'returnValue'];
  112. var globalInterceptors = {};
  113. var scopedInterceptors = {};
  114. function mergeHook(parentVal, childVal) {
  115. var res = childVal ?
  116. parentVal ?
  117. parentVal.concat(childVal) :
  118. Array.isArray(childVal) ?
  119. childVal : [childVal] :
  120. parentVal;
  121. return res ?
  122. dedupeHooks(res) :
  123. res;
  124. }
  125. function dedupeHooks(hooks) {
  126. var res = [];
  127. for (var i = 0; i < hooks.length; i++) {
  128. if (res.indexOf(hooks[i]) === -1) {
  129. res.push(hooks[i]);
  130. }
  131. }
  132. return res;
  133. }
  134. function removeHook(hooks, hook) {
  135. var index = hooks.indexOf(hook);
  136. if (index !== -1) {
  137. hooks.splice(index, 1);
  138. }
  139. }
  140. function mergeInterceptorHook(interceptor, option) {
  141. Object.keys(option).forEach(function (hook) {
  142. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  143. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  144. }
  145. });
  146. }
  147. function removeInterceptorHook(interceptor, option) {
  148. if (!interceptor || !option) {
  149. return;
  150. }
  151. Object.keys(option).forEach(function (hook) {
  152. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  153. removeHook(interceptor[hook], option[hook]);
  154. }
  155. });
  156. }
  157. function addInterceptor(method, option) {
  158. if (typeof method === 'string' && isPlainObject(option)) {
  159. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  160. } else if (isPlainObject(method)) {
  161. mergeInterceptorHook(globalInterceptors, method);
  162. }
  163. }
  164. function removeInterceptor(method, option) {
  165. if (typeof method === 'string') {
  166. if (isPlainObject(option)) {
  167. removeInterceptorHook(scopedInterceptors[method], option);
  168. } else {
  169. delete scopedInterceptors[method];
  170. }
  171. } else if (isPlainObject(method)) {
  172. removeInterceptorHook(globalInterceptors, method);
  173. }
  174. }
  175. function wrapperHook(hook) {
  176. return function (data) {
  177. return hook(data) || data;
  178. };
  179. }
  180. function isPromise(obj) {
  181. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  182. }
  183. function queue(hooks, data) {
  184. var promise = false;
  185. for (var i = 0; i < hooks.length; i++) {
  186. var hook = hooks[i];
  187. if (promise) {
  188. promise = Promise.resolve(wrapperHook(hook));
  189. } else {
  190. var res = hook(data);
  191. if (isPromise(res)) {
  192. promise = Promise.resolve(res);
  193. }
  194. if (res === false) {
  195. return {
  196. then: function then() {} };
  197. }
  198. }
  199. }
  200. return promise || {
  201. then: function then(callback) {
  202. return callback(data);
  203. } };
  204. }
  205. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  206. ['success', 'fail', 'complete'].forEach(function (name) {
  207. if (Array.isArray(interceptor[name])) {
  208. var oldCallback = options[name];
  209. options[name] = function callbackInterceptor(res) {
  210. queue(interceptor[name], res).then(function (res) {
  211. /* eslint-disable no-mixed-operators */
  212. return isFn(oldCallback) && oldCallback(res) || res;
  213. });
  214. };
  215. }
  216. });
  217. return options;
  218. }
  219. function wrapperReturnValue(method, returnValue) {
  220. var returnValueHooks = [];
  221. if (Array.isArray(globalInterceptors.returnValue)) {
  222. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  223. }
  224. var interceptor = scopedInterceptors[method];
  225. if (interceptor && Array.isArray(interceptor.returnValue)) {
  226. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  227. }
  228. returnValueHooks.forEach(function (hook) {
  229. returnValue = hook(returnValue) || returnValue;
  230. });
  231. return returnValue;
  232. }
  233. function getApiInterceptorHooks(method) {
  234. var interceptor = Object.create(null);
  235. Object.keys(globalInterceptors).forEach(function (hook) {
  236. if (hook !== 'returnValue') {
  237. interceptor[hook] = globalInterceptors[hook].slice();
  238. }
  239. });
  240. var scopedInterceptor = scopedInterceptors[method];
  241. if (scopedInterceptor) {
  242. Object.keys(scopedInterceptor).forEach(function (hook) {
  243. if (hook !== 'returnValue') {
  244. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  245. }
  246. });
  247. }
  248. return interceptor;
  249. }
  250. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  251. var interceptor = getApiInterceptorHooks(method);
  252. if (interceptor && Object.keys(interceptor).length) {
  253. if (Array.isArray(interceptor.invoke)) {
  254. var res = queue(interceptor.invoke, options);
  255. return res.then(function (options) {
  256. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  257. });
  258. } else {
  259. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  260. }
  261. }
  262. return api.apply(void 0, [options].concat(params));
  263. }
  264. var promiseInterceptor = {
  265. returnValue: function returnValue(res) {
  266. if (!isPromise(res)) {
  267. return res;
  268. }
  269. return new Promise(function (resolve, reject) {
  270. res.then(function (res) {
  271. if (res[0]) {
  272. reject(res[0]);
  273. } else {
  274. resolve(res[1]);
  275. }
  276. });
  277. });
  278. } };
  279. var SYNC_API_RE =
  280. /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale/;
  281. var CONTEXT_API_RE = /^create|Manager$/;
  282. // Context例外情况
  283. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  284. // 同步例外情况
  285. var ASYNC_API = ['createBLEConnection'];
  286. var CALLBACK_API_RE = /^on|^off/;
  287. function isContextApi(name) {
  288. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  289. }
  290. function isSyncApi(name) {
  291. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  292. }
  293. function isCallbackApi(name) {
  294. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  295. }
  296. function handlePromise(promise) {
  297. return promise.then(function (data) {
  298. return [null, data];
  299. }).
  300. catch(function (err) {return [err];});
  301. }
  302. function shouldPromise(name) {
  303. if (
  304. isContextApi(name) ||
  305. isSyncApi(name) ||
  306. isCallbackApi(name))
  307. {
  308. return false;
  309. }
  310. return true;
  311. }
  312. /* eslint-disable no-extend-native */
  313. if (!Promise.prototype.finally) {
  314. Promise.prototype.finally = function (callback) {
  315. var promise = this.constructor;
  316. return this.then(
  317. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  318. function (reason) {return promise.resolve(callback()).then(function () {
  319. throw reason;
  320. });});
  321. };
  322. }
  323. function promisify(name, api) {
  324. if (!shouldPromise(name)) {
  325. return api;
  326. }
  327. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  328. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  329. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  330. }
  331. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  332. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  333. success: resolve,
  334. fail: reject })].concat(
  335. params));
  336. })));
  337. };
  338. }
  339. var EPS = 1e-4;
  340. var BASE_DEVICE_WIDTH = 750;
  341. var isIOS = false;
  342. var deviceWidth = 0;
  343. var deviceDPR = 0;
  344. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  345. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  346. deviceWidth = windowWidth;
  347. deviceDPR = pixelRatio;
  348. isIOS = platform === 'ios';
  349. }
  350. function upx2px(number, newDeviceWidth) {
  351. if (deviceWidth === 0) {
  352. checkDeviceWidth();
  353. }
  354. number = Number(number);
  355. if (number === 0) {
  356. return 0;
  357. }
  358. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  359. if (result < 0) {
  360. result = -result;
  361. }
  362. result = Math.floor(result + EPS);
  363. if (result === 0) {
  364. if (deviceDPR === 1 || !isIOS) {
  365. result = 1;
  366. } else {
  367. result = 0.5;
  368. }
  369. }
  370. return number < 0 ? -result : result;
  371. }
  372. function getLocale() {
  373. // 优先使用 $locale
  374. var app = getApp({
  375. allowDefault: true });
  376. if (app && app.$vm) {
  377. return app.$vm.$locale;
  378. }
  379. return wx.getSystemInfoSync().language || 'zh-Hans';
  380. }
  381. function setLocale(locale) {
  382. var app = getApp();
  383. if (!app) {
  384. return false;
  385. }
  386. var oldLocale = app.$vm.$locale;
  387. if (oldLocale !== locale) {
  388. app.$vm.$locale = locale;
  389. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  390. locale: locale });});
  391. return true;
  392. }
  393. return false;
  394. }
  395. var onLocaleChangeCallbacks = [];
  396. function onLocaleChange(fn) {
  397. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  398. onLocaleChangeCallbacks.push(fn);
  399. }
  400. }
  401. if (typeof global !== 'undefined') {
  402. global.getLocale = getLocale;
  403. }
  404. var interceptors = {
  405. promiseInterceptor: promiseInterceptor };
  406. var baseApi = /*#__PURE__*/Object.freeze({
  407. __proto__: null,
  408. upx2px: upx2px,
  409. getLocale: getLocale,
  410. setLocale: setLocale,
  411. onLocaleChange: onLocaleChange,
  412. addInterceptor: addInterceptor,
  413. removeInterceptor: removeInterceptor,
  414. interceptors: interceptors });
  415. function findExistsPageIndex(url) {
  416. var pages = getCurrentPages();
  417. var len = pages.length;
  418. while (len--) {
  419. var page = pages[len];
  420. if (page.$page && page.$page.fullPath === url) {
  421. return len;
  422. }
  423. }
  424. return -1;
  425. }
  426. var redirectTo = {
  427. name: function name(fromArgs) {
  428. if (fromArgs.exists === 'back' && fromArgs.delta) {
  429. return 'navigateBack';
  430. }
  431. return 'redirectTo';
  432. },
  433. args: function args(fromArgs) {
  434. if (fromArgs.exists === 'back' && fromArgs.url) {
  435. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  436. if (existsPageIndex !== -1) {
  437. var delta = getCurrentPages().length - 1 - existsPageIndex;
  438. if (delta > 0) {
  439. fromArgs.delta = delta;
  440. }
  441. }
  442. }
  443. } };
  444. var previewImage = {
  445. args: function args(fromArgs) {
  446. var currentIndex = parseInt(fromArgs.current);
  447. if (isNaN(currentIndex)) {
  448. return;
  449. }
  450. var urls = fromArgs.urls;
  451. if (!Array.isArray(urls)) {
  452. return;
  453. }
  454. var len = urls.length;
  455. if (!len) {
  456. return;
  457. }
  458. if (currentIndex < 0) {
  459. currentIndex = 0;
  460. } else if (currentIndex >= len) {
  461. currentIndex = len - 1;
  462. }
  463. if (currentIndex > 0) {
  464. fromArgs.current = urls[currentIndex];
  465. fromArgs.urls = urls.filter(
  466. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  467. } else {
  468. fromArgs.current = urls[0];
  469. }
  470. return {
  471. indicator: false,
  472. loop: false };
  473. } };
  474. var UUID_KEY = '__DC_STAT_UUID';
  475. var deviceId;
  476. function addUuid(result) {
  477. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  478. if (!deviceId) {
  479. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  480. wx.setStorage({
  481. key: UUID_KEY,
  482. data: deviceId });
  483. }
  484. result.deviceId = deviceId;
  485. }
  486. function addSafeAreaInsets(result) {
  487. if (result.safeArea) {
  488. var safeArea = result.safeArea;
  489. result.safeAreaInsets = {
  490. top: safeArea.top,
  491. left: safeArea.left,
  492. right: result.windowWidth - safeArea.right,
  493. bottom: result.windowHeight - safeArea.bottom };
  494. }
  495. }
  496. var getSystemInfo = {
  497. returnValue: function returnValue(result) {
  498. addUuid(result);
  499. addSafeAreaInsets(result);
  500. } };
  501. // import navigateTo from 'uni-helpers/navigate-to'
  502. var protocols = {
  503. redirectTo: redirectTo,
  504. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  505. previewImage: previewImage,
  506. getSystemInfo: getSystemInfo,
  507. getSystemInfoSync: getSystemInfo };
  508. var todos = [
  509. 'vibrate',
  510. 'preloadPage',
  511. 'unPreloadPage',
  512. 'loadSubPackage'];
  513. var canIUses = [];
  514. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  515. function processCallback(methodName, method, returnValue) {
  516. return function (res) {
  517. return method(processReturnValue(methodName, res, returnValue));
  518. };
  519. }
  520. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  521. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  522. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  523. if (isFn(argsOption)) {
  524. argsOption = argsOption(fromArgs, toArgs) || {};
  525. }
  526. for (var key in fromArgs) {
  527. if (hasOwn(argsOption, key)) {
  528. var keyOption = argsOption[key];
  529. if (isFn(keyOption)) {
  530. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  531. }
  532. if (!keyOption) {// 不支持的参数
  533. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  534. } else if (isStr(keyOption)) {// 重写参数 key
  535. toArgs[keyOption] = fromArgs[key];
  536. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  537. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  538. }
  539. } else if (CALLBACKS.indexOf(key) !== -1) {
  540. if (isFn(fromArgs[key])) {
  541. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  542. }
  543. } else {
  544. if (!keepFromArgs) {
  545. toArgs[key] = fromArgs[key];
  546. }
  547. }
  548. }
  549. return toArgs;
  550. } else if (isFn(fromArgs)) {
  551. fromArgs = processCallback(methodName, fromArgs, returnValue);
  552. }
  553. return fromArgs;
  554. }
  555. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  556. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  557. res = protocols.returnValue(methodName, res);
  558. }
  559. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  560. }
  561. function wrapper(methodName, method) {
  562. if (hasOwn(protocols, methodName)) {
  563. var protocol = protocols[methodName];
  564. if (!protocol) {// 暂不支持的 api
  565. return function () {
  566. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  567. };
  568. }
  569. return function (arg1, arg2) {// 目前 api 最多两个参数
  570. var options = protocol;
  571. if (isFn(protocol)) {
  572. options = protocol(arg1);
  573. }
  574. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  575. var args = [arg1];
  576. if (typeof arg2 !== 'undefined') {
  577. args.push(arg2);
  578. }
  579. if (isFn(options.name)) {
  580. methodName = options.name(arg1);
  581. } else if (isStr(options.name)) {
  582. methodName = options.name;
  583. }
  584. var returnValue = wx[methodName].apply(wx, args);
  585. if (isSyncApi(methodName)) {// 同步 api
  586. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  587. }
  588. return returnValue;
  589. };
  590. }
  591. return method;
  592. }
  593. var todoApis = Object.create(null);
  594. var TODOS = [
  595. 'onTabBarMidButtonTap',
  596. 'subscribePush',
  597. 'unsubscribePush',
  598. 'onPush',
  599. 'offPush',
  600. 'share'];
  601. function createTodoApi(name) {
  602. return function todoApi(_ref)
  603. {var fail = _ref.fail,complete = _ref.complete;
  604. var res = {
  605. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  606. isFn(fail) && fail(res);
  607. isFn(complete) && complete(res);
  608. };
  609. }
  610. TODOS.forEach(function (name) {
  611. todoApis[name] = createTodoApi(name);
  612. });
  613. var providers = {
  614. oauth: ['weixin'],
  615. share: ['weixin'],
  616. payment: ['wxpay'],
  617. push: ['weixin'] };
  618. function getProvider(_ref2)
  619. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  620. var res = false;
  621. if (providers[service]) {
  622. res = {
  623. errMsg: 'getProvider:ok',
  624. service: service,
  625. provider: providers[service] };
  626. isFn(success) && success(res);
  627. } else {
  628. res = {
  629. errMsg: 'getProvider:fail service not found' };
  630. isFn(fail) && fail(res);
  631. }
  632. isFn(complete) && complete(res);
  633. }
  634. var extraApi = /*#__PURE__*/Object.freeze({
  635. __proto__: null,
  636. getProvider: getProvider });
  637. var getEmitter = function () {
  638. var Emitter;
  639. return function getUniEmitter() {
  640. if (!Emitter) {
  641. Emitter = new _vue.default();
  642. }
  643. return Emitter;
  644. };
  645. }();
  646. function apply(ctx, method, args) {
  647. return ctx[method].apply(ctx, args);
  648. }
  649. function $on() {
  650. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  651. }
  652. function $off() {
  653. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  654. }
  655. function $once() {
  656. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  657. }
  658. function $emit() {
  659. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  660. }
  661. var eventApi = /*#__PURE__*/Object.freeze({
  662. __proto__: null,
  663. $on: $on,
  664. $off: $off,
  665. $once: $once,
  666. $emit: $emit });
  667. var api = /*#__PURE__*/Object.freeze({
  668. __proto__: null });
  669. var MPPage = Page;
  670. var MPComponent = Component;
  671. var customizeRE = /:/g;
  672. var customize = cached(function (str) {
  673. return camelize(str.replace(customizeRE, '-'));
  674. });
  675. function initTriggerEvent(mpInstance) {
  676. {
  677. if (!wx.canIUse || !wx.canIUse('nextTick')) {
  678. return;
  679. }
  680. }
  681. var oldTriggerEvent = mpInstance.triggerEvent;
  682. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  683. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  684. };
  685. }
  686. function initHook(name, options, isComponent) {
  687. var oldHook = options[name];
  688. if (!oldHook) {
  689. options[name] = function () {
  690. initTriggerEvent(this);
  691. };
  692. } else {
  693. options[name] = function () {
  694. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  695. return oldHook.apply(this, args);
  696. };
  697. }
  698. }
  699. if (!MPPage.__$wrappered) {
  700. MPPage.__$wrappered = true;
  701. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  702. initHook('onLoad', options);
  703. return MPPage(options);
  704. };
  705. Page.after = MPPage.after;
  706. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  707. initHook('created', options);
  708. return MPComponent(options);
  709. };
  710. }
  711. var PAGE_EVENT_HOOKS = [
  712. 'onPullDownRefresh',
  713. 'onReachBottom',
  714. 'onAddToFavorites',
  715. 'onShareTimeline',
  716. 'onShareAppMessage',
  717. 'onPageScroll',
  718. 'onResize',
  719. 'onTabItemTap'];
  720. function initMocks(vm, mocks) {
  721. var mpInstance = vm.$mp[vm.mpType];
  722. mocks.forEach(function (mock) {
  723. if (hasOwn(mpInstance, mock)) {
  724. vm[mock] = mpInstance[mock];
  725. }
  726. });
  727. }
  728. function hasHook(hook, vueOptions) {
  729. if (!vueOptions) {
  730. return true;
  731. }
  732. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  733. return true;
  734. }
  735. vueOptions = vueOptions.default || vueOptions;
  736. if (isFn(vueOptions)) {
  737. if (isFn(vueOptions.extendOptions[hook])) {
  738. return true;
  739. }
  740. if (vueOptions.super &&
  741. vueOptions.super.options &&
  742. Array.isArray(vueOptions.super.options[hook])) {
  743. return true;
  744. }
  745. return false;
  746. }
  747. if (isFn(vueOptions[hook])) {
  748. return true;
  749. }
  750. var mixins = vueOptions.mixins;
  751. if (Array.isArray(mixins)) {
  752. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  753. }
  754. }
  755. function initHooks(mpOptions, hooks, vueOptions) {
  756. hooks.forEach(function (hook) {
  757. if (hasHook(hook, vueOptions)) {
  758. mpOptions[hook] = function (args) {
  759. return this.$vm && this.$vm.__call_hook(hook, args);
  760. };
  761. }
  762. });
  763. }
  764. function initVueComponent(Vue, vueOptions) {
  765. vueOptions = vueOptions.default || vueOptions;
  766. var VueComponent;
  767. if (isFn(vueOptions)) {
  768. VueComponent = vueOptions;
  769. } else {
  770. VueComponent = Vue.extend(vueOptions);
  771. }
  772. vueOptions = VueComponent.options;
  773. return [VueComponent, vueOptions];
  774. }
  775. function initSlots(vm, vueSlots) {
  776. if (Array.isArray(vueSlots) && vueSlots.length) {
  777. var $slots = Object.create(null);
  778. vueSlots.forEach(function (slotName) {
  779. $slots[slotName] = true;
  780. });
  781. vm.$scopedSlots = vm.$slots = $slots;
  782. }
  783. }
  784. function initVueIds(vueIds, mpInstance) {
  785. vueIds = (vueIds || '').split(',');
  786. var len = vueIds.length;
  787. if (len === 1) {
  788. mpInstance._$vueId = vueIds[0];
  789. } else if (len === 2) {
  790. mpInstance._$vueId = vueIds[0];
  791. mpInstance._$vuePid = vueIds[1];
  792. }
  793. }
  794. function initData(vueOptions, context) {
  795. var data = vueOptions.data || {};
  796. var methods = vueOptions.methods || {};
  797. if (typeof data === 'function') {
  798. try {
  799. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  800. } catch (e) {
  801. if (Object({"VUE_APP_NAME":"wx-app-new","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  802. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  803. }
  804. }
  805. } else {
  806. try {
  807. // 对 data 格式化
  808. data = JSON.parse(JSON.stringify(data));
  809. } catch (e) {}
  810. }
  811. if (!isPlainObject(data)) {
  812. data = {};
  813. }
  814. Object.keys(methods).forEach(function (methodName) {
  815. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  816. data[methodName] = methods[methodName];
  817. }
  818. });
  819. return data;
  820. }
  821. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  822. function createObserver(name) {
  823. return function observer(newVal, oldVal) {
  824. if (this.$vm) {
  825. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  826. }
  827. };
  828. }
  829. function initBehaviors(vueOptions, initBehavior) {
  830. var vueBehaviors = vueOptions.behaviors;
  831. var vueExtends = vueOptions.extends;
  832. var vueMixins = vueOptions.mixins;
  833. var vueProps = vueOptions.props;
  834. if (!vueProps) {
  835. vueOptions.props = vueProps = [];
  836. }
  837. var behaviors = [];
  838. if (Array.isArray(vueBehaviors)) {
  839. vueBehaviors.forEach(function (behavior) {
  840. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  841. if (behavior === 'uni://form-field') {
  842. if (Array.isArray(vueProps)) {
  843. vueProps.push('name');
  844. vueProps.push('value');
  845. } else {
  846. vueProps.name = {
  847. type: String,
  848. default: '' };
  849. vueProps.value = {
  850. type: [String, Number, Boolean, Array, Object, Date],
  851. default: '' };
  852. }
  853. }
  854. });
  855. }
  856. if (isPlainObject(vueExtends) && vueExtends.props) {
  857. behaviors.push(
  858. initBehavior({
  859. properties: initProperties(vueExtends.props, true) }));
  860. }
  861. if (Array.isArray(vueMixins)) {
  862. vueMixins.forEach(function (vueMixin) {
  863. if (isPlainObject(vueMixin) && vueMixin.props) {
  864. behaviors.push(
  865. initBehavior({
  866. properties: initProperties(vueMixin.props, true) }));
  867. }
  868. });
  869. }
  870. return behaviors;
  871. }
  872. function parsePropType(key, type, defaultValue, file) {
  873. // [String]=>String
  874. if (Array.isArray(type) && type.length === 1) {
  875. return type[0];
  876. }
  877. return type;
  878. }
  879. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  880. var properties = {};
  881. if (!isBehavior) {
  882. properties.vueId = {
  883. type: String,
  884. value: '' };
  885. // 用于字节跳动小程序模拟抽象节点
  886. properties.generic = {
  887. type: Object,
  888. value: null };
  889. // scopedSlotsCompiler auto
  890. properties.scopedSlotsCompiler = {
  891. type: String,
  892. value: '' };
  893. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  894. type: null,
  895. value: [],
  896. observer: function observer(newVal, oldVal) {
  897. var $slots = Object.create(null);
  898. newVal.forEach(function (slotName) {
  899. $slots[slotName] = true;
  900. });
  901. this.setData({
  902. $slots: $slots });
  903. } };
  904. }
  905. if (Array.isArray(props)) {// ['title']
  906. props.forEach(function (key) {
  907. properties[key] = {
  908. type: null,
  909. observer: createObserver(key) };
  910. });
  911. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  912. Object.keys(props).forEach(function (key) {
  913. var opts = props[key];
  914. if (isPlainObject(opts)) {// title:{type:String,default:''}
  915. var value = opts.default;
  916. if (isFn(value)) {
  917. value = value();
  918. }
  919. opts.type = parsePropType(key, opts.type);
  920. properties[key] = {
  921. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  922. value: value,
  923. observer: createObserver(key) };
  924. } else {// content:String
  925. var type = parsePropType(key, opts);
  926. properties[key] = {
  927. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  928. observer: createObserver(key) };
  929. }
  930. });
  931. }
  932. return properties;
  933. }
  934. function wrapper$1(event) {
  935. // TODO 又得兼容 mpvue 的 mp 对象
  936. try {
  937. event.mp = JSON.parse(JSON.stringify(event));
  938. } catch (e) {}
  939. event.stopPropagation = noop;
  940. event.preventDefault = noop;
  941. event.target = event.target || {};
  942. if (!hasOwn(event, 'detail')) {
  943. event.detail = {};
  944. }
  945. if (hasOwn(event, 'markerId')) {
  946. event.detail = typeof event.detail === 'object' ? event.detail : {};
  947. event.detail.markerId = event.markerId;
  948. }
  949. if (isPlainObject(event.detail)) {
  950. event.target = Object.assign({}, event.target, event.detail);
  951. }
  952. return event;
  953. }
  954. function getExtraValue(vm, dataPathsArray) {
  955. var context = vm;
  956. dataPathsArray.forEach(function (dataPathArray) {
  957. var dataPath = dataPathArray[0];
  958. var value = dataPathArray[2];
  959. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  960. var propPath = dataPathArray[1];
  961. var valuePath = dataPathArray[3];
  962. var vFor;
  963. if (Number.isInteger(dataPath)) {
  964. vFor = dataPath;
  965. } else if (!dataPath) {
  966. vFor = context;
  967. } else if (typeof dataPath === 'string' && dataPath) {
  968. if (dataPath.indexOf('#s#') === 0) {
  969. vFor = dataPath.substr(3);
  970. } else {
  971. vFor = vm.__get_value(dataPath, context);
  972. }
  973. }
  974. if (Number.isInteger(vFor)) {
  975. context = value;
  976. } else if (!propPath) {
  977. context = vFor[value];
  978. } else {
  979. if (Array.isArray(vFor)) {
  980. context = vFor.find(function (vForItem) {
  981. return vm.__get_value(propPath, vForItem) === value;
  982. });
  983. } else if (isPlainObject(vFor)) {
  984. context = Object.keys(vFor).find(function (vForKey) {
  985. return vm.__get_value(propPath, vFor[vForKey]) === value;
  986. });
  987. } else {
  988. console.error('v-for 暂不支持循环数据:', vFor);
  989. }
  990. }
  991. if (valuePath) {
  992. context = vm.__get_value(valuePath, context);
  993. }
  994. }
  995. });
  996. return context;
  997. }
  998. function processEventExtra(vm, extra, event) {
  999. var extraObj = {};
  1000. if (Array.isArray(extra) && extra.length) {
  1001. /**
  1002. *[
  1003. * ['data.items', 'data.id', item.data.id],
  1004. * ['metas', 'id', meta.id]
  1005. *],
  1006. *[
  1007. * ['data.items', 'data.id', item.data.id],
  1008. * ['metas', 'id', meta.id]
  1009. *],
  1010. *'test'
  1011. */
  1012. extra.forEach(function (dataPath, index) {
  1013. if (typeof dataPath === 'string') {
  1014. if (!dataPath) {// model,prop.sync
  1015. extraObj['$' + index] = vm;
  1016. } else {
  1017. if (dataPath === '$event') {// $event
  1018. extraObj['$' + index] = event;
  1019. } else if (dataPath === 'arguments') {
  1020. if (event.detail && event.detail.__args__) {
  1021. extraObj['$' + index] = event.detail.__args__;
  1022. } else {
  1023. extraObj['$' + index] = [event];
  1024. }
  1025. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1026. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1027. } else {
  1028. extraObj['$' + index] = vm.__get_value(dataPath);
  1029. }
  1030. }
  1031. } else {
  1032. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1033. }
  1034. });
  1035. }
  1036. return extraObj;
  1037. }
  1038. function getObjByArray(arr) {
  1039. var obj = {};
  1040. for (var i = 1; i < arr.length; i++) {
  1041. var element = arr[i];
  1042. obj[element[0]] = element[1];
  1043. }
  1044. return obj;
  1045. }
  1046. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1047. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1048. if (isCustom) {// 自定义事件
  1049. isCustomMPEvent = event.currentTarget &&
  1050. event.currentTarget.dataset &&
  1051. event.currentTarget.dataset.comType === 'wx';
  1052. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1053. if (isCustomMPEvent) {
  1054. return [event];
  1055. }
  1056. return event.detail.__args__ || event.detail;
  1057. }
  1058. }
  1059. var extraObj = processEventExtra(vm, extra, event);
  1060. var ret = [];
  1061. args.forEach(function (arg) {
  1062. if (arg === '$event') {
  1063. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1064. ret.push(event.target.value);
  1065. } else {
  1066. if (isCustom && !isCustomMPEvent) {
  1067. ret.push(event.detail.__args__[0]);
  1068. } else {// wxcomponent 组件或内置组件
  1069. ret.push(event);
  1070. }
  1071. }
  1072. } else {
  1073. if (Array.isArray(arg) && arg[0] === 'o') {
  1074. ret.push(getObjByArray(arg));
  1075. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1076. ret.push(extraObj[arg]);
  1077. } else {
  1078. ret.push(arg);
  1079. }
  1080. }
  1081. });
  1082. return ret;
  1083. }
  1084. var ONCE = '~';
  1085. var CUSTOM = '^';
  1086. function isMatchEventType(eventType, optType) {
  1087. return eventType === optType ||
  1088. optType === 'regionchange' && (
  1089. eventType === 'begin' ||
  1090. eventType === 'end');
  1091. }
  1092. function getContextVm(vm) {
  1093. var $parent = vm.$parent;
  1094. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1095. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1096. $parent = $parent.$parent;
  1097. }
  1098. return $parent && $parent.$parent;
  1099. }
  1100. function handleEvent(event) {var _this = this;
  1101. event = wrapper$1(event);
  1102. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1103. var dataset = (event.currentTarget || event.target).dataset;
  1104. if (!dataset) {
  1105. return console.warn('事件信息不存在');
  1106. }
  1107. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1108. if (!eventOpts) {
  1109. return console.warn('事件信息不存在');
  1110. }
  1111. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1112. var eventType = event.type;
  1113. var ret = [];
  1114. eventOpts.forEach(function (eventOpt) {
  1115. var type = eventOpt[0];
  1116. var eventsArray = eventOpt[1];
  1117. var isCustom = type.charAt(0) === CUSTOM;
  1118. type = isCustom ? type.slice(1) : type;
  1119. var isOnce = type.charAt(0) === ONCE;
  1120. type = isOnce ? type.slice(1) : type;
  1121. if (eventsArray && isMatchEventType(eventType, type)) {
  1122. eventsArray.forEach(function (eventArray) {
  1123. var methodName = eventArray[0];
  1124. if (methodName) {
  1125. var handlerCtx = _this.$vm;
  1126. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1127. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1128. }
  1129. if (methodName === '$emit') {
  1130. handlerCtx.$emit.apply(handlerCtx,
  1131. processEventArgs(
  1132. _this.$vm,
  1133. event,
  1134. eventArray[1],
  1135. eventArray[2],
  1136. isCustom,
  1137. methodName));
  1138. return;
  1139. }
  1140. var handler = handlerCtx[methodName];
  1141. if (!isFn(handler)) {
  1142. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1143. }
  1144. if (isOnce) {
  1145. if (handler.once) {
  1146. return;
  1147. }
  1148. handler.once = true;
  1149. }
  1150. var params = processEventArgs(
  1151. _this.$vm,
  1152. event,
  1153. eventArray[1],
  1154. eventArray[2],
  1155. isCustom,
  1156. methodName);
  1157. params = Array.isArray(params) ? params : [];
  1158. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1159. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1160. // eslint-disable-next-line no-sparse-arrays
  1161. params = params.concat([,,,,,,,,,, event]);
  1162. }
  1163. ret.push(handler.apply(handlerCtx, params));
  1164. }
  1165. });
  1166. }
  1167. });
  1168. if (
  1169. eventType === 'input' &&
  1170. ret.length === 1 &&
  1171. typeof ret[0] !== 'undefined')
  1172. {
  1173. return ret[0];
  1174. }
  1175. }
  1176. var locale;
  1177. {
  1178. locale = wx.getSystemInfoSync().language;
  1179. }
  1180. var i18n = (0, _uniI18n.initVueI18n)(
  1181. locale,
  1182. {});
  1183. var t = i18n.t;
  1184. var i18nMixin = i18n.mixin = {
  1185. beforeCreate: function beforeCreate() {var _this2 = this;
  1186. var unwatch = i18n.i18n.watchLocale(function () {
  1187. _this2.$forceUpdate();
  1188. });
  1189. this.$once('hook:beforeDestroy', function () {
  1190. unwatch();
  1191. });
  1192. },
  1193. methods: {
  1194. $$t: function $$t(key, values) {
  1195. return t(key, values);
  1196. } } };
  1197. var setLocale$1 = i18n.setLocale;
  1198. var getLocale$1 = i18n.getLocale;
  1199. function initAppLocale(Vue, appVm, locale) {
  1200. var state = Vue.observable({
  1201. locale: locale || i18n.getLocale() });
  1202. var localeWatchers = [];
  1203. appVm.$watchLocale = function (fn) {
  1204. localeWatchers.push(fn);
  1205. };
  1206. Object.defineProperty(appVm, '$locale', {
  1207. get: function get() {
  1208. return state.locale;
  1209. },
  1210. set: function set(v) {
  1211. state.locale = v;
  1212. localeWatchers.forEach(function (watch) {return watch(v);});
  1213. } });
  1214. }
  1215. var eventChannels = {};
  1216. var eventChannelStack = [];
  1217. function getEventChannel(id) {
  1218. if (id) {
  1219. var eventChannel = eventChannels[id];
  1220. delete eventChannels[id];
  1221. return eventChannel;
  1222. }
  1223. return eventChannelStack.shift();
  1224. }
  1225. var hooks = [
  1226. 'onShow',
  1227. 'onHide',
  1228. 'onError',
  1229. 'onPageNotFound',
  1230. 'onThemeChange',
  1231. 'onUnhandledRejection'];
  1232. function initEventChannel() {
  1233. _vue.default.prototype.getOpenerEventChannel = function () {
  1234. // 微信小程序使用自身getOpenerEventChannel
  1235. {
  1236. return this.$scope.getOpenerEventChannel();
  1237. }
  1238. };
  1239. var callHook = _vue.default.prototype.__call_hook;
  1240. _vue.default.prototype.__call_hook = function (hook, args) {
  1241. if (hook === 'onLoad' && args && args.__id__) {
  1242. this.__eventChannel__ = getEventChannel(args.__id__);
  1243. delete args.__id__;
  1244. }
  1245. return callHook.call(this, hook, args);
  1246. };
  1247. }
  1248. function initScopedSlotsParams() {
  1249. var center = {};
  1250. var parents = {};
  1251. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1252. var has = center[vueId];
  1253. if (!has) {
  1254. parents[vueId] = this;
  1255. this.$on('hook:destory', function () {
  1256. delete parents[vueId];
  1257. });
  1258. }
  1259. return has;
  1260. };
  1261. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1262. var data = center[vueId];
  1263. if (data) {
  1264. var object = data[name] || {};
  1265. return key ? object[key] : object;
  1266. } else {
  1267. parents[vueId] = this;
  1268. this.$on('hook:destory', function () {
  1269. delete parents[vueId];
  1270. });
  1271. }
  1272. };
  1273. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1274. var vueIds = this.$options.propsData.vueId;
  1275. if (vueIds) {
  1276. var vueId = vueIds.split(',')[0];
  1277. var object = center[vueId] = center[vueId] || {};
  1278. object[name] = value;
  1279. if (parents[vueId]) {
  1280. parents[vueId].$forceUpdate();
  1281. }
  1282. }
  1283. };
  1284. _vue.default.mixin({
  1285. destroyed: function destroyed() {
  1286. var propsData = this.$options.propsData;
  1287. var vueId = propsData && propsData.vueId;
  1288. if (vueId) {
  1289. delete center[vueId];
  1290. delete parents[vueId];
  1291. }
  1292. } });
  1293. }
  1294. function parseBaseApp(vm, _ref3)
  1295. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1296. initEventChannel();
  1297. {
  1298. initScopedSlotsParams();
  1299. }
  1300. if (vm.$options.store) {
  1301. _vue.default.prototype.$store = vm.$options.store;
  1302. }
  1303. uniIdMixin(_vue.default);
  1304. _vue.default.prototype.mpHost = "mp-weixin";
  1305. _vue.default.mixin({
  1306. beforeCreate: function beforeCreate() {
  1307. if (!this.$options.mpType) {
  1308. return;
  1309. }
  1310. this.mpType = this.$options.mpType;
  1311. this.$mp = _defineProperty({
  1312. data: {} },
  1313. this.mpType, this.$options.mpInstance);
  1314. this.$scope = this.$options.mpInstance;
  1315. delete this.$options.mpType;
  1316. delete this.$options.mpInstance;
  1317. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1318. var app = getApp();
  1319. if (app.$vm && app.$vm.$i18n) {
  1320. this._i18n = app.$vm.$i18n;
  1321. }
  1322. }
  1323. if (this.mpType !== 'app') {
  1324. initRefs(this);
  1325. initMocks(this, mocks);
  1326. }
  1327. } });
  1328. var appOptions = {
  1329. onLaunch: function onLaunch(args) {
  1330. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1331. return;
  1332. }
  1333. {
  1334. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1335. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1336. }
  1337. }
  1338. this.$vm = vm;
  1339. this.$vm.$mp = {
  1340. app: this };
  1341. this.$vm.$scope = this;
  1342. // vm 上也挂载 globalData
  1343. this.$vm.globalData = this.globalData;
  1344. this.$vm._isMounted = true;
  1345. this.$vm.__call_hook('mounted', args);
  1346. this.$vm.__call_hook('onLaunch', args);
  1347. } };
  1348. // 兼容旧版本 globalData
  1349. appOptions.globalData = vm.$options.globalData || {};
  1350. // 将 methods 中的方法挂在 getApp() 中
  1351. var methods = vm.$options.methods;
  1352. if (methods) {
  1353. Object.keys(methods).forEach(function (name) {
  1354. appOptions[name] = methods[name];
  1355. });
  1356. }
  1357. initAppLocale(_vue.default, vm, wx.getSystemInfoSync().language || 'zh-Hans');
  1358. initHooks(appOptions, hooks);
  1359. return appOptions;
  1360. }
  1361. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1362. function findVmByVueId(vm, vuePid) {
  1363. var $children = vm.$children;
  1364. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1365. for (var i = $children.length - 1; i >= 0; i--) {
  1366. var childVm = $children[i];
  1367. if (childVm.$scope._$vueId === vuePid) {
  1368. return childVm;
  1369. }
  1370. }
  1371. // 反向递归查找
  1372. var parentVm;
  1373. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1374. parentVm = findVmByVueId($children[_i], vuePid);
  1375. if (parentVm) {
  1376. return parentVm;
  1377. }
  1378. }
  1379. }
  1380. function initBehavior(options) {
  1381. return Behavior(options);
  1382. }
  1383. function isPage() {
  1384. return !!this.route;
  1385. }
  1386. function initRelation(detail) {
  1387. this.triggerEvent('__l', detail);
  1388. }
  1389. function selectAllComponents(mpInstance, selector, $refs) {
  1390. var components = mpInstance.selectAllComponents(selector);
  1391. components.forEach(function (component) {
  1392. var ref = component.dataset.ref;
  1393. $refs[ref] = component.$vm || component;
  1394. {
  1395. if (component.dataset.vueGeneric === 'scoped') {
  1396. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1397. selectAllComponents(scopedComponent, selector, $refs);
  1398. });
  1399. }
  1400. }
  1401. });
  1402. }
  1403. function initRefs(vm) {
  1404. var mpInstance = vm.$scope;
  1405. Object.defineProperty(vm, '$refs', {
  1406. get: function get() {
  1407. var $refs = {};
  1408. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1409. // TODO 暂不考虑 for 中的 scoped
  1410. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1411. forComponents.forEach(function (component) {
  1412. var ref = component.dataset.ref;
  1413. if (!$refs[ref]) {
  1414. $refs[ref] = [];
  1415. }
  1416. $refs[ref].push(component.$vm || component);
  1417. });
  1418. return $refs;
  1419. } });
  1420. }
  1421. function handleLink(event) {var _ref4 =
  1422. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1423. var parentVm;
  1424. if (vuePid) {
  1425. parentVm = findVmByVueId(this.$vm, vuePid);
  1426. }
  1427. if (!parentVm) {
  1428. parentVm = this.$vm;
  1429. }
  1430. vueOptions.parent = parentVm;
  1431. }
  1432. function parseApp(vm) {
  1433. return parseBaseApp(vm, {
  1434. mocks: mocks,
  1435. initRefs: initRefs });
  1436. }
  1437. function createApp(vm) {
  1438. App(parseApp(vm));
  1439. return vm;
  1440. }
  1441. var encodeReserveRE = /[!'()*]/g;
  1442. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1443. var commaRE = /%2C/g;
  1444. // fixed encodeURIComponent which is more conformant to RFC3986:
  1445. // - escapes [!'()*]
  1446. // - preserve commas
  1447. var encode = function encode(str) {return encodeURIComponent(str).
  1448. replace(encodeReserveRE, encodeReserveReplacer).
  1449. replace(commaRE, ',');};
  1450. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1451. var res = obj ? Object.keys(obj).map(function (key) {
  1452. var val = obj[key];
  1453. if (val === undefined) {
  1454. return '';
  1455. }
  1456. if (val === null) {
  1457. return encodeStr(key);
  1458. }
  1459. if (Array.isArray(val)) {
  1460. var result = [];
  1461. val.forEach(function (val2) {
  1462. if (val2 === undefined) {
  1463. return;
  1464. }
  1465. if (val2 === null) {
  1466. result.push(encodeStr(key));
  1467. } else {
  1468. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1469. }
  1470. });
  1471. return result.join('&');
  1472. }
  1473. return encodeStr(key) + '=' + encodeStr(val);
  1474. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1475. return res ? "?".concat(res) : '';
  1476. }
  1477. function parseBaseComponent(vueComponentOptions)
  1478. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1479. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1480. var options = _objectSpread({
  1481. multipleSlots: true,
  1482. addGlobalClass: true },
  1483. vueOptions.options || {});
  1484. {
  1485. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1486. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1487. Object.assign(options, vueOptions['mp-weixin'].options);
  1488. }
  1489. }
  1490. var componentOptions = {
  1491. options: options,
  1492. data: initData(vueOptions, _vue.default.prototype),
  1493. behaviors: initBehaviors(vueOptions, initBehavior),
  1494. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1495. lifetimes: {
  1496. attached: function attached() {
  1497. var properties = this.properties;
  1498. var options = {
  1499. mpType: isPage.call(this) ? 'page' : 'component',
  1500. mpInstance: this,
  1501. propsData: properties };
  1502. initVueIds(properties.vueId, this);
  1503. // 处理父子关系
  1504. initRelation.call(this, {
  1505. vuePid: this._$vuePid,
  1506. vueOptions: options });
  1507. // 初始化 vue 实例
  1508. this.$vm = new VueComponent(options);
  1509. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1510. initSlots(this.$vm, properties.vueSlots);
  1511. // 触发首次 setData
  1512. this.$vm.$mount();
  1513. },
  1514. ready: function ready() {
  1515. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1516. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1517. if (this.$vm) {
  1518. this.$vm._isMounted = true;
  1519. this.$vm.__call_hook('mounted');
  1520. this.$vm.__call_hook('onReady');
  1521. }
  1522. },
  1523. detached: function detached() {
  1524. this.$vm && this.$vm.$destroy();
  1525. } },
  1526. pageLifetimes: {
  1527. show: function show(args) {
  1528. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1529. },
  1530. hide: function hide() {
  1531. this.$vm && this.$vm.__call_hook('onPageHide');
  1532. },
  1533. resize: function resize(size) {
  1534. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1535. } },
  1536. methods: {
  1537. __l: handleLink,
  1538. __e: handleEvent } };
  1539. // externalClasses
  1540. if (vueOptions.externalClasses) {
  1541. componentOptions.externalClasses = vueOptions.externalClasses;
  1542. }
  1543. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1544. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1545. componentOptions.methods[callMethod] = function (args) {
  1546. return this.$vm[callMethod](args);
  1547. };
  1548. });
  1549. }
  1550. if (isPage) {
  1551. return componentOptions;
  1552. }
  1553. return [componentOptions, VueComponent];
  1554. }
  1555. function parseComponent(vueComponentOptions) {
  1556. return parseBaseComponent(vueComponentOptions, {
  1557. isPage: isPage,
  1558. initRelation: initRelation });
  1559. }
  1560. var hooks$1 = [
  1561. 'onShow',
  1562. 'onHide',
  1563. 'onUnload'];
  1564. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1565. function parseBasePage(vuePageOptions, _ref6)
  1566. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1567. var pageOptions = parseComponent(vuePageOptions);
  1568. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1569. pageOptions.methods.onLoad = function (query) {
  1570. this.options = query;
  1571. var copyQuery = Object.assign({}, query);
  1572. delete copyQuery.__id__;
  1573. this.$page = {
  1574. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1575. this.$vm.$mp.query = query; // 兼容 mpvue
  1576. this.$vm.__call_hook('onLoad', query);
  1577. };
  1578. return pageOptions;
  1579. }
  1580. function parsePage(vuePageOptions) {
  1581. return parseBasePage(vuePageOptions, {
  1582. isPage: isPage,
  1583. initRelation: initRelation });
  1584. }
  1585. function createPage(vuePageOptions) {
  1586. {
  1587. return Component(parsePage(vuePageOptions));
  1588. }
  1589. }
  1590. function createComponent(vueOptions) {
  1591. {
  1592. return Component(parseComponent(vueOptions));
  1593. }
  1594. }
  1595. function createSubpackageApp(vm) {
  1596. var appOptions = parseApp(vm);
  1597. var app = getApp({
  1598. allowDefault: true });
  1599. vm.$scope = app;
  1600. var globalData = app.globalData;
  1601. if (globalData) {
  1602. Object.keys(appOptions.globalData).forEach(function (name) {
  1603. if (!hasOwn(globalData, name)) {
  1604. globalData[name] = appOptions.globalData[name];
  1605. }
  1606. });
  1607. }
  1608. Object.keys(appOptions).forEach(function (name) {
  1609. if (!hasOwn(app, name)) {
  1610. app[name] = appOptions[name];
  1611. }
  1612. });
  1613. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1614. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1615. vm.__call_hook('onShow', args);
  1616. });
  1617. }
  1618. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1619. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1620. vm.__call_hook('onHide', args);
  1621. });
  1622. }
  1623. if (isFn(appOptions.onLaunch)) {
  1624. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1625. vm.__call_hook('onLaunch', args);
  1626. }
  1627. return vm;
  1628. }
  1629. function createPlugin(vm) {
  1630. var appOptions = parseApp(vm);
  1631. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1632. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  1633. appOptions.onShow.apply(vm, args);
  1634. });
  1635. }
  1636. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1637. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  1638. appOptions.onHide.apply(vm, args);
  1639. });
  1640. }
  1641. if (isFn(appOptions.onLaunch)) {
  1642. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1643. appOptions.onLaunch.call(vm, args);
  1644. }
  1645. return vm;
  1646. }
  1647. todos.forEach(function (todoApi) {
  1648. protocols[todoApi] = false;
  1649. });
  1650. canIUses.forEach(function (canIUseApi) {
  1651. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1652. canIUseApi;
  1653. if (!wx.canIUse(apiName)) {
  1654. protocols[canIUseApi] = false;
  1655. }
  1656. });
  1657. var uni = {};
  1658. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1659. uni = new Proxy({}, {
  1660. get: function get(target, name) {
  1661. if (hasOwn(target, name)) {
  1662. return target[name];
  1663. }
  1664. if (baseApi[name]) {
  1665. return baseApi[name];
  1666. }
  1667. if (api[name]) {
  1668. return promisify(name, api[name]);
  1669. }
  1670. {
  1671. if (extraApi[name]) {
  1672. return promisify(name, extraApi[name]);
  1673. }
  1674. if (todoApis[name]) {
  1675. return promisify(name, todoApis[name]);
  1676. }
  1677. }
  1678. if (eventApi[name]) {
  1679. return eventApi[name];
  1680. }
  1681. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1682. return;
  1683. }
  1684. return promisify(name, wrapper(name, wx[name]));
  1685. },
  1686. set: function set(target, name, value) {
  1687. target[name] = value;
  1688. return true;
  1689. } });
  1690. } else {
  1691. Object.keys(baseApi).forEach(function (name) {
  1692. uni[name] = baseApi[name];
  1693. });
  1694. {
  1695. Object.keys(todoApis).forEach(function (name) {
  1696. uni[name] = promisify(name, todoApis[name]);
  1697. });
  1698. Object.keys(extraApi).forEach(function (name) {
  1699. uni[name] = promisify(name, todoApis[name]);
  1700. });
  1701. }
  1702. Object.keys(eventApi).forEach(function (name) {
  1703. uni[name] = eventApi[name];
  1704. });
  1705. Object.keys(api).forEach(function (name) {
  1706. uni[name] = promisify(name, api[name]);
  1707. });
  1708. Object.keys(wx).forEach(function (name) {
  1709. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1710. uni[name] = promisify(name, wrapper(name, wx[name]));
  1711. }
  1712. });
  1713. }
  1714. wx.createApp = createApp;
  1715. wx.createPage = createPage;
  1716. wx.createComponent = createComponent;
  1717. wx.createSubpackageApp = createSubpackageApp;
  1718. wx.createPlugin = createPlugin;
  1719. var uni$1 = uni;var _default =
  1720. uni$1;exports.default = _default;
  1721. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  1722. /***/ }),
  1723. /***/ 102:
  1724. /*!***********************************************************************************************!*\
  1725. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  1726. \***********************************************************************************************/
  1727. /*! no static exports found */
  1728. /***/ (function(module, exports, __webpack_require__) {
  1729. "use strict";
  1730. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  1731. "id": "2852637",
  1732. "name": "uniui图标库",
  1733. "font_family": "uniicons",
  1734. "css_prefix_text": "uniui-",
  1735. "description": "",
  1736. "glyphs": [
  1737. {
  1738. "icon_id": "25027049",
  1739. "name": "yanse",
  1740. "font_class": "color",
  1741. "unicode": "e6cf",
  1742. "unicode_decimal": 59087 },
  1743. {
  1744. "icon_id": "25027048",
  1745. "name": "wallet",
  1746. "font_class": "wallet",
  1747. "unicode": "e6b1",
  1748. "unicode_decimal": 59057 },
  1749. {
  1750. "icon_id": "25015720",
  1751. "name": "settings-filled",
  1752. "font_class": "settings-filled",
  1753. "unicode": "e6ce",
  1754. "unicode_decimal": 59086 },
  1755. {
  1756. "icon_id": "25015434",
  1757. "name": "shimingrenzheng-filled",
  1758. "font_class": "auth-filled",
  1759. "unicode": "e6cc",
  1760. "unicode_decimal": 59084 },
  1761. {
  1762. "icon_id": "24934246",
  1763. "name": "shop-filled",
  1764. "font_class": "shop-filled",
  1765. "unicode": "e6cd",
  1766. "unicode_decimal": 59085 },
  1767. {
  1768. "icon_id": "24934159",
  1769. "name": "staff-filled-01",
  1770. "font_class": "staff-filled",
  1771. "unicode": "e6cb",
  1772. "unicode_decimal": 59083 },
  1773. {
  1774. "icon_id": "24932461",
  1775. "name": "VIP-filled",
  1776. "font_class": "vip-filled",
  1777. "unicode": "e6c6",
  1778. "unicode_decimal": 59078 },
  1779. {
  1780. "icon_id": "24932462",
  1781. "name": "plus_circle_fill",
  1782. "font_class": "plus-filled",
  1783. "unicode": "e6c7",
  1784. "unicode_decimal": 59079 },
  1785. {
  1786. "icon_id": "24932463",
  1787. "name": "folder_add-filled",
  1788. "font_class": "folder-add-filled",
  1789. "unicode": "e6c8",
  1790. "unicode_decimal": 59080 },
  1791. {
  1792. "icon_id": "24932464",
  1793. "name": "yanse-filled",
  1794. "font_class": "color-filled",
  1795. "unicode": "e6c9",
  1796. "unicode_decimal": 59081 },
  1797. {
  1798. "icon_id": "24932465",
  1799. "name": "tune-filled",
  1800. "font_class": "tune-filled",
  1801. "unicode": "e6ca",
  1802. "unicode_decimal": 59082 },
  1803. {
  1804. "icon_id": "24932455",
  1805. "name": "a-rilidaka-filled",
  1806. "font_class": "calendar-filled",
  1807. "unicode": "e6c0",
  1808. "unicode_decimal": 59072 },
  1809. {
  1810. "icon_id": "24932456",
  1811. "name": "notification-filled",
  1812. "font_class": "notification-filled",
  1813. "unicode": "e6c1",
  1814. "unicode_decimal": 59073 },
  1815. {
  1816. "icon_id": "24932457",
  1817. "name": "wallet-filled",
  1818. "font_class": "wallet-filled",
  1819. "unicode": "e6c2",
  1820. "unicode_decimal": 59074 },
  1821. {
  1822. "icon_id": "24932458",
  1823. "name": "paihangbang-filled",
  1824. "font_class": "medal-filled",
  1825. "unicode": "e6c3",
  1826. "unicode_decimal": 59075 },
  1827. {
  1828. "icon_id": "24932459",
  1829. "name": "gift-filled",
  1830. "font_class": "gift-filled",
  1831. "unicode": "e6c4",
  1832. "unicode_decimal": 59076 },
  1833. {
  1834. "icon_id": "24932460",
  1835. "name": "fire-filled",
  1836. "font_class": "fire-filled",
  1837. "unicode": "e6c5",
  1838. "unicode_decimal": 59077 },
  1839. {
  1840. "icon_id": "24928001",
  1841. "name": "refreshempty",
  1842. "font_class": "refreshempty",
  1843. "unicode": "e6bf",
  1844. "unicode_decimal": 59071 },
  1845. {
  1846. "icon_id": "24926853",
  1847. "name": "location-ellipse",
  1848. "font_class": "location-filled",
  1849. "unicode": "e6af",
  1850. "unicode_decimal": 59055 },
  1851. {
  1852. "icon_id": "24926735",
  1853. "name": "person-filled",
  1854. "font_class": "person-filled",
  1855. "unicode": "e69d",
  1856. "unicode_decimal": 59037 },
  1857. {
  1858. "icon_id": "24926703",
  1859. "name": "personadd-filled",
  1860. "font_class": "personadd-filled",
  1861. "unicode": "e698",
  1862. "unicode_decimal": 59032 },
  1863. {
  1864. "icon_id": "24923351",
  1865. "name": "back",
  1866. "font_class": "back",
  1867. "unicode": "e6b9",
  1868. "unicode_decimal": 59065 },
  1869. {
  1870. "icon_id": "24923352",
  1871. "name": "forward",
  1872. "font_class": "forward",
  1873. "unicode": "e6ba",
  1874. "unicode_decimal": 59066 },
  1875. {
  1876. "icon_id": "24923353",
  1877. "name": "arrowthinright",
  1878. "font_class": "arrow-right",
  1879. "unicode": "e6bb",
  1880. "unicode_decimal": 59067 },
  1881. {
  1882. "icon_id": "24923353",
  1883. "name": "arrowthinright",
  1884. "font_class": "arrowthinright",
  1885. "unicode": "e6bb",
  1886. "unicode_decimal": 59067 },
  1887. {
  1888. "icon_id": "24923354",
  1889. "name": "arrowthinleft",
  1890. "font_class": "arrow-left",
  1891. "unicode": "e6bc",
  1892. "unicode_decimal": 59068 },
  1893. {
  1894. "icon_id": "24923354",
  1895. "name": "arrowthinleft",
  1896. "font_class": "arrowthinleft",
  1897. "unicode": "e6bc",
  1898. "unicode_decimal": 59068 },
  1899. {
  1900. "icon_id": "24923355",
  1901. "name": "arrowthinup",
  1902. "font_class": "arrow-up",
  1903. "unicode": "e6bd",
  1904. "unicode_decimal": 59069 },
  1905. {
  1906. "icon_id": "24923355",
  1907. "name": "arrowthinup",
  1908. "font_class": "arrowthinup",
  1909. "unicode": "e6bd",
  1910. "unicode_decimal": 59069 },
  1911. {
  1912. "icon_id": "24923356",
  1913. "name": "arrowthindown",
  1914. "font_class": "arrow-down",
  1915. "unicode": "e6be",
  1916. "unicode_decimal": 59070 },
  1917. {
  1918. "icon_id": "24923356",
  1919. "name": "arrowthindown",
  1920. "font_class": "arrowthindown",
  1921. "unicode": "e6be",
  1922. "unicode_decimal": 59070 },
  1923. {
  1924. "icon_id": "24923349",
  1925. "name": "arrowdown",
  1926. "font_class": "bottom",
  1927. "unicode": "e6b8",
  1928. "unicode_decimal": 59064 },
  1929. {
  1930. "icon_id": "24923349",
  1931. "name": "arrowdown",
  1932. "font_class": "arrowdown",
  1933. "unicode": "e6b8",
  1934. "unicode_decimal": 59064 },
  1935. {
  1936. "icon_id": "24923346",
  1937. "name": "arrowright",
  1938. "font_class": "right",
  1939. "unicode": "e6b5",
  1940. "unicode_decimal": 59061 },
  1941. {
  1942. "icon_id": "24923346",
  1943. "name": "arrowright",
  1944. "font_class": "arrowright",
  1945. "unicode": "e6b5",
  1946. "unicode_decimal": 59061 },
  1947. {
  1948. "icon_id": "24923347",
  1949. "name": "arrowup",
  1950. "font_class": "top",
  1951. "unicode": "e6b6",
  1952. "unicode_decimal": 59062 },
  1953. {
  1954. "icon_id": "24923347",
  1955. "name": "arrowup",
  1956. "font_class": "arrowup",
  1957. "unicode": "e6b6",
  1958. "unicode_decimal": 59062 },
  1959. {
  1960. "icon_id": "24923348",
  1961. "name": "arrowleft",
  1962. "font_class": "left",
  1963. "unicode": "e6b7",
  1964. "unicode_decimal": 59063 },
  1965. {
  1966. "icon_id": "24923348",
  1967. "name": "arrowleft",
  1968. "font_class": "arrowleft",
  1969. "unicode": "e6b7",
  1970. "unicode_decimal": 59063 },
  1971. {
  1972. "icon_id": "24923334",
  1973. "name": "eye",
  1974. "font_class": "eye",
  1975. "unicode": "e651",
  1976. "unicode_decimal": 58961 },
  1977. {
  1978. "icon_id": "24923335",
  1979. "name": "eye-filled",
  1980. "font_class": "eye-filled",
  1981. "unicode": "e66a",
  1982. "unicode_decimal": 58986 },
  1983. {
  1984. "icon_id": "24923336",
  1985. "name": "eye-slash",
  1986. "font_class": "eye-slash",
  1987. "unicode": "e6b3",
  1988. "unicode_decimal": 59059 },
  1989. {
  1990. "icon_id": "24923337",
  1991. "name": "eye-slash-filled",
  1992. "font_class": "eye-slash-filled",
  1993. "unicode": "e6b4",
  1994. "unicode_decimal": 59060 },
  1995. {
  1996. "icon_id": "24923305",
  1997. "name": "info-filled",
  1998. "font_class": "info-filled",
  1999. "unicode": "e649",
  2000. "unicode_decimal": 58953 },
  2001. {
  2002. "icon_id": "24923299",
  2003. "name": "reload-01",
  2004. "font_class": "reload",
  2005. "unicode": "e6b2",
  2006. "unicode_decimal": 59058 },
  2007. {
  2008. "icon_id": "24923195",
  2009. "name": "mic_slash_fill",
  2010. "font_class": "micoff-filled",
  2011. "unicode": "e6b0",
  2012. "unicode_decimal": 59056 },
  2013. {
  2014. "icon_id": "24923165",
  2015. "name": "map-pin-ellipse",
  2016. "font_class": "map-pin-ellipse",
  2017. "unicode": "e6ac",
  2018. "unicode_decimal": 59052 },
  2019. {
  2020. "icon_id": "24923166",
  2021. "name": "map-pin",
  2022. "font_class": "map-pin",
  2023. "unicode": "e6ad",
  2024. "unicode_decimal": 59053 },
  2025. {
  2026. "icon_id": "24923167",
  2027. "name": "location",
  2028. "font_class": "location",
  2029. "unicode": "e6ae",
  2030. "unicode_decimal": 59054 },
  2031. {
  2032. "icon_id": "24923064",
  2033. "name": "starhalf",
  2034. "font_class": "starhalf",
  2035. "unicode": "e683",
  2036. "unicode_decimal": 59011 },
  2037. {
  2038. "icon_id": "24923065",
  2039. "name": "star",
  2040. "font_class": "star",
  2041. "unicode": "e688",
  2042. "unicode_decimal": 59016 },
  2043. {
  2044. "icon_id": "24923066",
  2045. "name": "star-filled",
  2046. "font_class": "star-filled",
  2047. "unicode": "e68f",
  2048. "unicode_decimal": 59023 },
  2049. {
  2050. "icon_id": "24899646",
  2051. "name": "a-rilidaka",
  2052. "font_class": "calendar",
  2053. "unicode": "e6a0",
  2054. "unicode_decimal": 59040 },
  2055. {
  2056. "icon_id": "24899647",
  2057. "name": "fire",
  2058. "font_class": "fire",
  2059. "unicode": "e6a1",
  2060. "unicode_decimal": 59041 },
  2061. {
  2062. "icon_id": "24899648",
  2063. "name": "paihangbang",
  2064. "font_class": "medal",
  2065. "unicode": "e6a2",
  2066. "unicode_decimal": 59042 },
  2067. {
  2068. "icon_id": "24899649",
  2069. "name": "font",
  2070. "font_class": "font",
  2071. "unicode": "e6a3",
  2072. "unicode_decimal": 59043 },
  2073. {
  2074. "icon_id": "24899650",
  2075. "name": "gift",
  2076. "font_class": "gift",
  2077. "unicode": "e6a4",
  2078. "unicode_decimal": 59044 },
  2079. {
  2080. "icon_id": "24899651",
  2081. "name": "link",
  2082. "font_class": "link",
  2083. "unicode": "e6a5",
  2084. "unicode_decimal": 59045 },
  2085. {
  2086. "icon_id": "24899652",
  2087. "name": "notification",
  2088. "font_class": "notification",
  2089. "unicode": "e6a6",
  2090. "unicode_decimal": 59046 },
  2091. {
  2092. "icon_id": "24899653",
  2093. "name": "staff",
  2094. "font_class": "staff",
  2095. "unicode": "e6a7",
  2096. "unicode_decimal": 59047 },
  2097. {
  2098. "icon_id": "24899654",
  2099. "name": "VIP",
  2100. "font_class": "vip",
  2101. "unicode": "e6a8",
  2102. "unicode_decimal": 59048 },
  2103. {
  2104. "icon_id": "24899655",
  2105. "name": "folder_add",
  2106. "font_class": "folder-add",
  2107. "unicode": "e6a9",
  2108. "unicode_decimal": 59049 },
  2109. {
  2110. "icon_id": "24899656",
  2111. "name": "tune",
  2112. "font_class": "tune",
  2113. "unicode": "e6aa",
  2114. "unicode_decimal": 59050 },
  2115. {
  2116. "icon_id": "24899657",
  2117. "name": "shimingrenzheng",
  2118. "font_class": "auth",
  2119. "unicode": "e6ab",
  2120. "unicode_decimal": 59051 },
  2121. {
  2122. "icon_id": "24899565",
  2123. "name": "person",
  2124. "font_class": "person",
  2125. "unicode": "e699",
  2126. "unicode_decimal": 59033 },
  2127. {
  2128. "icon_id": "24899566",
  2129. "name": "email-filled",
  2130. "font_class": "email-filled",
  2131. "unicode": "e69a",
  2132. "unicode_decimal": 59034 },
  2133. {
  2134. "icon_id": "24899567",
  2135. "name": "phone-filled",
  2136. "font_class": "phone-filled",
  2137. "unicode": "e69b",
  2138. "unicode_decimal": 59035 },
  2139. {
  2140. "icon_id": "24899568",
  2141. "name": "phone",
  2142. "font_class": "phone",
  2143. "unicode": "e69c",
  2144. "unicode_decimal": 59036 },
  2145. {
  2146. "icon_id": "24899570",
  2147. "name": "email",
  2148. "font_class": "email",
  2149. "unicode": "e69e",
  2150. "unicode_decimal": 59038 },
  2151. {
  2152. "icon_id": "24899571",
  2153. "name": "personadd",
  2154. "font_class": "personadd",
  2155. "unicode": "e69f",
  2156. "unicode_decimal": 59039 },
  2157. {
  2158. "icon_id": "24899558",
  2159. "name": "chatboxes-filled",
  2160. "font_class": "chatboxes-filled",
  2161. "unicode": "e692",
  2162. "unicode_decimal": 59026 },
  2163. {
  2164. "icon_id": "24899559",
  2165. "name": "contact",
  2166. "font_class": "contact",
  2167. "unicode": "e693",
  2168. "unicode_decimal": 59027 },
  2169. {
  2170. "icon_id": "24899560",
  2171. "name": "chatbubble-filled",
  2172. "font_class": "chatbubble-filled",
  2173. "unicode": "e694",
  2174. "unicode_decimal": 59028 },
  2175. {
  2176. "icon_id": "24899561",
  2177. "name": "contact-filled",
  2178. "font_class": "contact-filled",
  2179. "unicode": "e695",
  2180. "unicode_decimal": 59029 },
  2181. {
  2182. "icon_id": "24899562",
  2183. "name": "chatboxes",
  2184. "font_class": "chatboxes",
  2185. "unicode": "e696",
  2186. "unicode_decimal": 59030 },
  2187. {
  2188. "icon_id": "24899563",
  2189. "name": "chatbubble",
  2190. "font_class": "chatbubble",
  2191. "unicode": "e697",
  2192. "unicode_decimal": 59031 },
  2193. {
  2194. "icon_id": "24881290",
  2195. "name": "upload-filled",
  2196. "font_class": "upload-filled",
  2197. "unicode": "e68e",
  2198. "unicode_decimal": 59022 },
  2199. {
  2200. "icon_id": "24881292",
  2201. "name": "upload",
  2202. "font_class": "upload",
  2203. "unicode": "e690",
  2204. "unicode_decimal": 59024 },
  2205. {
  2206. "icon_id": "24881293",
  2207. "name": "weixin",
  2208. "font_class": "weixin",
  2209. "unicode": "e691",
  2210. "unicode_decimal": 59025 },
  2211. {
  2212. "icon_id": "24881274",
  2213. "name": "compose",
  2214. "font_class": "compose",
  2215. "unicode": "e67f",
  2216. "unicode_decimal": 59007 },
  2217. {
  2218. "icon_id": "24881275",
  2219. "name": "qq",
  2220. "font_class": "qq",
  2221. "unicode": "e680",
  2222. "unicode_decimal": 59008 },
  2223. {
  2224. "icon_id": "24881276",
  2225. "name": "download-filled",
  2226. "font_class": "download-filled",
  2227. "unicode": "e681",
  2228. "unicode_decimal": 59009 },
  2229. {
  2230. "icon_id": "24881277",
  2231. "name": "pengyouquan",
  2232. "font_class": "pyq",
  2233. "unicode": "e682",
  2234. "unicode_decimal": 59010 },
  2235. {
  2236. "icon_id": "24881279",
  2237. "name": "sound",
  2238. "font_class": "sound",
  2239. "unicode": "e684",
  2240. "unicode_decimal": 59012 },
  2241. {
  2242. "icon_id": "24881280",
  2243. "name": "trash-filled",
  2244. "font_class": "trash-filled",
  2245. "unicode": "e685",
  2246. "unicode_decimal": 59013 },
  2247. {
  2248. "icon_id": "24881281",
  2249. "name": "sound-filled",
  2250. "font_class": "sound-filled",
  2251. "unicode": "e686",
  2252. "unicode_decimal": 59014 },
  2253. {
  2254. "icon_id": "24881282",
  2255. "name": "trash",
  2256. "font_class": "trash",
  2257. "unicode": "e687",
  2258. "unicode_decimal": 59015 },
  2259. {
  2260. "icon_id": "24881284",
  2261. "name": "videocam-filled",
  2262. "font_class": "videocam-filled",
  2263. "unicode": "e689",
  2264. "unicode_decimal": 59017 },
  2265. {
  2266. "icon_id": "24881285",
  2267. "name": "spinner-cycle",
  2268. "font_class": "spinner-cycle",
  2269. "unicode": "e68a",
  2270. "unicode_decimal": 59018 },
  2271. {
  2272. "icon_id": "24881286",
  2273. "name": "weibo",
  2274. "font_class": "weibo",
  2275. "unicode": "e68b",
  2276. "unicode_decimal": 59019 },
  2277. {
  2278. "icon_id": "24881288",
  2279. "name": "videocam",
  2280. "font_class": "videocam",
  2281. "unicode": "e68c",
  2282. "unicode_decimal": 59020 },
  2283. {
  2284. "icon_id": "24881289",
  2285. "name": "download",
  2286. "font_class": "download",
  2287. "unicode": "e68d",
  2288. "unicode_decimal": 59021 },
  2289. {
  2290. "icon_id": "24879601",
  2291. "name": "help",
  2292. "font_class": "help",
  2293. "unicode": "e679",
  2294. "unicode_decimal": 59001 },
  2295. {
  2296. "icon_id": "24879602",
  2297. "name": "navigate-filled",
  2298. "font_class": "navigate-filled",
  2299. "unicode": "e67a",
  2300. "unicode_decimal": 59002 },
  2301. {
  2302. "icon_id": "24879603",
  2303. "name": "plusempty",
  2304. "font_class": "plusempty",
  2305. "unicode": "e67b",
  2306. "unicode_decimal": 59003 },
  2307. {
  2308. "icon_id": "24879604",
  2309. "name": "smallcircle",
  2310. "font_class": "smallcircle",
  2311. "unicode": "e67c",
  2312. "unicode_decimal": 59004 },
  2313. {
  2314. "icon_id": "24879605",
  2315. "name": "minus-filled",
  2316. "font_class": "minus-filled",
  2317. "unicode": "e67d",
  2318. "unicode_decimal": 59005 },
  2319. {
  2320. "icon_id": "24879606",
  2321. "name": "micoff",
  2322. "font_class": "micoff",
  2323. "unicode": "e67e",
  2324. "unicode_decimal": 59006 },
  2325. {
  2326. "icon_id": "24879588",
  2327. "name": "closeempty",
  2328. "font_class": "closeempty",
  2329. "unicode": "e66c",
  2330. "unicode_decimal": 58988 },
  2331. {
  2332. "icon_id": "24879589",
  2333. "name": "clear",
  2334. "font_class": "clear",
  2335. "unicode": "e66d",
  2336. "unicode_decimal": 58989 },
  2337. {
  2338. "icon_id": "24879590",
  2339. "name": "navigate",
  2340. "font_class": "navigate",
  2341. "unicode": "e66e",
  2342. "unicode_decimal": 58990 },
  2343. {
  2344. "icon_id": "24879591",
  2345. "name": "minus",
  2346. "font_class": "minus",
  2347. "unicode": "e66f",
  2348. "unicode_decimal": 58991 },
  2349. {
  2350. "icon_id": "24879592",
  2351. "name": "image",
  2352. "font_class": "image",
  2353. "unicode": "e670",
  2354. "unicode_decimal": 58992 },
  2355. {
  2356. "icon_id": "24879593",
  2357. "name": "mic",
  2358. "font_class": "mic",
  2359. "unicode": "e671",
  2360. "unicode_decimal": 58993 },
  2361. {
  2362. "icon_id": "24879594",
  2363. "name": "paperplane",
  2364. "font_class": "paperplane",
  2365. "unicode": "e672",
  2366. "unicode_decimal": 58994 },
  2367. {
  2368. "icon_id": "24879595",
  2369. "name": "close",
  2370. "font_class": "close",
  2371. "unicode": "e673",
  2372. "unicode_decimal": 58995 },
  2373. {
  2374. "icon_id": "24879596",
  2375. "name": "help-filled",
  2376. "font_class": "help-filled",
  2377. "unicode": "e674",
  2378. "unicode_decimal": 58996 },
  2379. {
  2380. "icon_id": "24879597",
  2381. "name": "plus-filled",
  2382. "font_class": "paperplane-filled",
  2383. "unicode": "e675",
  2384. "unicode_decimal": 58997 },
  2385. {
  2386. "icon_id": "24879598",
  2387. "name": "plus",
  2388. "font_class": "plus",
  2389. "unicode": "e676",
  2390. "unicode_decimal": 58998 },
  2391. {
  2392. "icon_id": "24879599",
  2393. "name": "mic-filled",
  2394. "font_class": "mic-filled",
  2395. "unicode": "e677",
  2396. "unicode_decimal": 58999 },
  2397. {
  2398. "icon_id": "24879600",
  2399. "name": "image-filled",
  2400. "font_class": "image-filled",
  2401. "unicode": "e678",
  2402. "unicode_decimal": 59000 },
  2403. {
  2404. "icon_id": "24855900",
  2405. "name": "locked-filled",
  2406. "font_class": "locked-filled",
  2407. "unicode": "e668",
  2408. "unicode_decimal": 58984 },
  2409. {
  2410. "icon_id": "24855901",
  2411. "name": "info",
  2412. "font_class": "info",
  2413. "unicode": "e669",
  2414. "unicode_decimal": 58985 },
  2415. {
  2416. "icon_id": "24855903",
  2417. "name": "locked",
  2418. "font_class": "locked",
  2419. "unicode": "e66b",
  2420. "unicode_decimal": 58987 },
  2421. {
  2422. "icon_id": "24855884",
  2423. "name": "camera-filled",
  2424. "font_class": "camera-filled",
  2425. "unicode": "e658",
  2426. "unicode_decimal": 58968 },
  2427. {
  2428. "icon_id": "24855885",
  2429. "name": "chat-filled",
  2430. "font_class": "chat-filled",
  2431. "unicode": "e659",
  2432. "unicode_decimal": 58969 },
  2433. {
  2434. "icon_id": "24855886",
  2435. "name": "camera",
  2436. "font_class": "camera",
  2437. "unicode": "e65a",
  2438. "unicode_decimal": 58970 },
  2439. {
  2440. "icon_id": "24855887",
  2441. "name": "circle",
  2442. "font_class": "circle",
  2443. "unicode": "e65b",
  2444. "unicode_decimal": 58971 },
  2445. {
  2446. "icon_id": "24855888",
  2447. "name": "checkmarkempty",
  2448. "font_class": "checkmarkempty",
  2449. "unicode": "e65c",
  2450. "unicode_decimal": 58972 },
  2451. {
  2452. "icon_id": "24855889",
  2453. "name": "chat",
  2454. "font_class": "chat",
  2455. "unicode": "e65d",
  2456. "unicode_decimal": 58973 },
  2457. {
  2458. "icon_id": "24855890",
  2459. "name": "circle-filled",
  2460. "font_class": "circle-filled",
  2461. "unicode": "e65e",
  2462. "unicode_decimal": 58974 },
  2463. {
  2464. "icon_id": "24855891",
  2465. "name": "flag",
  2466. "font_class": "flag",
  2467. "unicode": "e65f",
  2468. "unicode_decimal": 58975 },
  2469. {
  2470. "icon_id": "24855892",
  2471. "name": "flag-filled",
  2472. "font_class": "flag-filled",
  2473. "unicode": "e660",
  2474. "unicode_decimal": 58976 },
  2475. {
  2476. "icon_id": "24855893",
  2477. "name": "gear-filled",
  2478. "font_class": "gear-filled",
  2479. "unicode": "e661",
  2480. "unicode_decimal": 58977 },
  2481. {
  2482. "icon_id": "24855894",
  2483. "name": "home",
  2484. "font_class": "home",
  2485. "unicode": "e662",
  2486. "unicode_decimal": 58978 },
  2487. {
  2488. "icon_id": "24855895",
  2489. "name": "home-filled",
  2490. "font_class": "home-filled",
  2491. "unicode": "e663",
  2492. "unicode_decimal": 58979 },
  2493. {
  2494. "icon_id": "24855896",
  2495. "name": "gear",
  2496. "font_class": "gear",
  2497. "unicode": "e664",
  2498. "unicode_decimal": 58980 },
  2499. {
  2500. "icon_id": "24855897",
  2501. "name": "smallcircle-filled",
  2502. "font_class": "smallcircle-filled",
  2503. "unicode": "e665",
  2504. "unicode_decimal": 58981 },
  2505. {
  2506. "icon_id": "24855898",
  2507. "name": "map-filled",
  2508. "font_class": "map-filled",
  2509. "unicode": "e666",
  2510. "unicode_decimal": 58982 },
  2511. {
  2512. "icon_id": "24855899",
  2513. "name": "map",
  2514. "font_class": "map",
  2515. "unicode": "e667",
  2516. "unicode_decimal": 58983 },
  2517. {
  2518. "icon_id": "24855825",
  2519. "name": "refresh-filled",
  2520. "font_class": "refresh-filled",
  2521. "unicode": "e656",
  2522. "unicode_decimal": 58966 },
  2523. {
  2524. "icon_id": "24855826",
  2525. "name": "refresh",
  2526. "font_class": "refresh",
  2527. "unicode": "e657",
  2528. "unicode_decimal": 58967 },
  2529. {
  2530. "icon_id": "24855808",
  2531. "name": "cloud-upload",
  2532. "font_class": "cloud-upload",
  2533. "unicode": "e645",
  2534. "unicode_decimal": 58949 },
  2535. {
  2536. "icon_id": "24855809",
  2537. "name": "cloud-download-filled",
  2538. "font_class": "cloud-download-filled",
  2539. "unicode": "e646",
  2540. "unicode_decimal": 58950 },
  2541. {
  2542. "icon_id": "24855810",
  2543. "name": "cloud-download",
  2544. "font_class": "cloud-download",
  2545. "unicode": "e647",
  2546. "unicode_decimal": 58951 },
  2547. {
  2548. "icon_id": "24855811",
  2549. "name": "cloud-upload-filled",
  2550. "font_class": "cloud-upload-filled",
  2551. "unicode": "e648",
  2552. "unicode_decimal": 58952 },
  2553. {
  2554. "icon_id": "24855813",
  2555. "name": "redo",
  2556. "font_class": "redo",
  2557. "unicode": "e64a",
  2558. "unicode_decimal": 58954 },
  2559. {
  2560. "icon_id": "24855814",
  2561. "name": "images-filled",
  2562. "font_class": "images-filled",
  2563. "unicode": "e64b",
  2564. "unicode_decimal": 58955 },
  2565. {
  2566. "icon_id": "24855815",
  2567. "name": "undo-filled",
  2568. "font_class": "undo-filled",
  2569. "unicode": "e64c",
  2570. "unicode_decimal": 58956 },
  2571. {
  2572. "icon_id": "24855816",
  2573. "name": "more",
  2574. "font_class": "more",
  2575. "unicode": "e64d",
  2576. "unicode_decimal": 58957 },
  2577. {
  2578. "icon_id": "24855817",
  2579. "name": "more-filled",
  2580. "font_class": "more-filled",
  2581. "unicode": "e64e",
  2582. "unicode_decimal": 58958 },
  2583. {
  2584. "icon_id": "24855818",
  2585. "name": "undo",
  2586. "font_class": "undo",
  2587. "unicode": "e64f",
  2588. "unicode_decimal": 58959 },
  2589. {
  2590. "icon_id": "24855819",
  2591. "name": "images",
  2592. "font_class": "images",
  2593. "unicode": "e650",
  2594. "unicode_decimal": 58960 },
  2595. {
  2596. "icon_id": "24855821",
  2597. "name": "paperclip",
  2598. "font_class": "paperclip",
  2599. "unicode": "e652",
  2600. "unicode_decimal": 58962 },
  2601. {
  2602. "icon_id": "24855822",
  2603. "name": "settings",
  2604. "font_class": "settings",
  2605. "unicode": "e653",
  2606. "unicode_decimal": 58963 },
  2607. {
  2608. "icon_id": "24855823",
  2609. "name": "search",
  2610. "font_class": "search",
  2611. "unicode": "e654",
  2612. "unicode_decimal": 58964 },
  2613. {
  2614. "icon_id": "24855824",
  2615. "name": "redo-filled",
  2616. "font_class": "redo-filled",
  2617. "unicode": "e655",
  2618. "unicode_decimal": 58965 },
  2619. {
  2620. "icon_id": "24841702",
  2621. "name": "list",
  2622. "font_class": "list",
  2623. "unicode": "e644",
  2624. "unicode_decimal": 58948 },
  2625. {
  2626. "icon_id": "24841489",
  2627. "name": "mail-open-filled",
  2628. "font_class": "mail-open-filled",
  2629. "unicode": "e63a",
  2630. "unicode_decimal": 58938 },
  2631. {
  2632. "icon_id": "24841491",
  2633. "name": "hand-thumbsdown-filled",
  2634. "font_class": "hand-down-filled",
  2635. "unicode": "e63c",
  2636. "unicode_decimal": 58940 },
  2637. {
  2638. "icon_id": "24841492",
  2639. "name": "hand-thumbsdown",
  2640. "font_class": "hand-down",
  2641. "unicode": "e63d",
  2642. "unicode_decimal": 58941 },
  2643. {
  2644. "icon_id": "24841493",
  2645. "name": "hand-thumbsup-filled",
  2646. "font_class": "hand-up-filled",
  2647. "unicode": "e63e",
  2648. "unicode_decimal": 58942 },
  2649. {
  2650. "icon_id": "24841494",
  2651. "name": "hand-thumbsup",
  2652. "font_class": "hand-up",
  2653. "unicode": "e63f",
  2654. "unicode_decimal": 58943 },
  2655. {
  2656. "icon_id": "24841496",
  2657. "name": "heart-filled",
  2658. "font_class": "heart-filled",
  2659. "unicode": "e641",
  2660. "unicode_decimal": 58945 },
  2661. {
  2662. "icon_id": "24841498",
  2663. "name": "mail-open",
  2664. "font_class": "mail-open",
  2665. "unicode": "e643",
  2666. "unicode_decimal": 58947 },
  2667. {
  2668. "icon_id": "24841488",
  2669. "name": "heart",
  2670. "font_class": "heart",
  2671. "unicode": "e639",
  2672. "unicode_decimal": 58937 },
  2673. {
  2674. "icon_id": "24839963",
  2675. "name": "loop",
  2676. "font_class": "loop",
  2677. "unicode": "e633",
  2678. "unicode_decimal": 58931 },
  2679. {
  2680. "icon_id": "24839866",
  2681. "name": "pulldown",
  2682. "font_class": "pulldown",
  2683. "unicode": "e632",
  2684. "unicode_decimal": 58930 },
  2685. {
  2686. "icon_id": "24813798",
  2687. "name": "scan",
  2688. "font_class": "scan",
  2689. "unicode": "e62a",
  2690. "unicode_decimal": 58922 },
  2691. {
  2692. "icon_id": "24813786",
  2693. "name": "bars",
  2694. "font_class": "bars",
  2695. "unicode": "e627",
  2696. "unicode_decimal": 58919 },
  2697. {
  2698. "icon_id": "24813788",
  2699. "name": "cart-filled",
  2700. "font_class": "cart-filled",
  2701. "unicode": "e629",
  2702. "unicode_decimal": 58921 },
  2703. {
  2704. "icon_id": "24813790",
  2705. "name": "checkbox",
  2706. "font_class": "checkbox",
  2707. "unicode": "e62b",
  2708. "unicode_decimal": 58923 },
  2709. {
  2710. "icon_id": "24813791",
  2711. "name": "checkbox-filled",
  2712. "font_class": "checkbox-filled",
  2713. "unicode": "e62c",
  2714. "unicode_decimal": 58924 },
  2715. {
  2716. "icon_id": "24813794",
  2717. "name": "shop",
  2718. "font_class": "shop",
  2719. "unicode": "e62f",
  2720. "unicode_decimal": 58927 },
  2721. {
  2722. "icon_id": "24813795",
  2723. "name": "headphones",
  2724. "font_class": "headphones",
  2725. "unicode": "e630",
  2726. "unicode_decimal": 58928 },
  2727. {
  2728. "icon_id": "24813796",
  2729. "name": "cart",
  2730. "font_class": "cart",
  2731. "unicode": "e631",
  2732. "unicode_decimal": 58929 }] };exports.default = _default;
  2733. /***/ }),
  2734. /***/ 11:
  2735. /*!**********************************************************************************************************!*\
  2736. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  2737. \**********************************************************************************************************/
  2738. /*! exports provided: default */
  2739. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2740. "use strict";
  2741. __webpack_require__.r(__webpack_exports__);
  2742. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  2743. /* globals __VUE_SSR_CONTEXT__ */
  2744. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  2745. // This module is a runtime utility for cleaner component module output and will
  2746. // be included in the final webpack user bundle.
  2747. function normalizeComponent (
  2748. scriptExports,
  2749. render,
  2750. staticRenderFns,
  2751. functionalTemplate,
  2752. injectStyles,
  2753. scopeId,
  2754. moduleIdentifier, /* server only */
  2755. shadowMode, /* vue-cli only */
  2756. components, // fixed by xxxxxx auto components
  2757. renderjs // fixed by xxxxxx renderjs
  2758. ) {
  2759. // Vue.extend constructor export interop
  2760. var options = typeof scriptExports === 'function'
  2761. ? scriptExports.options
  2762. : scriptExports
  2763. // fixed by xxxxxx auto components
  2764. if (components) {
  2765. if (!options.components) {
  2766. options.components = {}
  2767. }
  2768. var hasOwn = Object.prototype.hasOwnProperty
  2769. for (var name in components) {
  2770. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  2771. options.components[name] = components[name]
  2772. }
  2773. }
  2774. }
  2775. // fixed by xxxxxx renderjs
  2776. if (renderjs) {
  2777. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  2778. this[renderjs.__module] = this
  2779. });
  2780. (options.mixins || (options.mixins = [])).push(renderjs)
  2781. }
  2782. // render functions
  2783. if (render) {
  2784. options.render = render
  2785. options.staticRenderFns = staticRenderFns
  2786. options._compiled = true
  2787. }
  2788. // functional template
  2789. if (functionalTemplate) {
  2790. options.functional = true
  2791. }
  2792. // scopedId
  2793. if (scopeId) {
  2794. options._scopeId = 'data-v-' + scopeId
  2795. }
  2796. var hook
  2797. if (moduleIdentifier) { // server build
  2798. hook = function (context) {
  2799. // 2.3 injection
  2800. context =
  2801. context || // cached call
  2802. (this.$vnode && this.$vnode.ssrContext) || // stateful
  2803. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  2804. // 2.2 with runInNewContext: true
  2805. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  2806. context = __VUE_SSR_CONTEXT__
  2807. }
  2808. // inject component styles
  2809. if (injectStyles) {
  2810. injectStyles.call(this, context)
  2811. }
  2812. // register component module identifier for async chunk inferrence
  2813. if (context && context._registeredComponents) {
  2814. context._registeredComponents.add(moduleIdentifier)
  2815. }
  2816. }
  2817. // used by ssr in case component is cached and beforeCreate
  2818. // never gets called
  2819. options._ssrRegister = hook
  2820. } else if (injectStyles) {
  2821. hook = shadowMode
  2822. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  2823. : injectStyles
  2824. }
  2825. if (hook) {
  2826. if (options.functional) {
  2827. // for template-only hot-reload because in that case the render fn doesn't
  2828. // go through the normalizer
  2829. options._injectStyles = hook
  2830. // register for functioal component in vue file
  2831. var originalRender = options.render
  2832. options.render = function renderWithStyleInjection (h, context) {
  2833. hook.call(context)
  2834. return originalRender(h, context)
  2835. }
  2836. } else {
  2837. // inject component registration as beforeCreate hook
  2838. var existing = options.beforeCreate
  2839. options.beforeCreate = existing
  2840. ? [].concat(existing, hook)
  2841. : [hook]
  2842. }
  2843. }
  2844. return {
  2845. exports: scriptExports,
  2846. options: options
  2847. }
  2848. }
  2849. /***/ }),
  2850. /***/ 133:
  2851. /*!***********************************************************!*\
  2852. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/utils/config.js ***!
  2853. \***********************************************************/
  2854. /*! no static exports found */
  2855. /***/ (function(module, exports, __webpack_require__) {
  2856. "use strict";
  2857. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var config = {
  2858. //发布线上需要吧login里面地址跟这里替换掉
  2859. // baseUrl: "http://10.10.9.71:7089/ysgzybz/",
  2860. baseUrl: "https://zlzd.zrzyt.zj.gov.cn/app215/ybz-api/",
  2861. bjdkgl: 'https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJ_DKGL/MapServer' };var _default =
  2862. config;exports.default = _default;
  2863. /***/ }),
  2864. /***/ 18:
  2865. /*!**********************************************************!*\
  2866. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/utils/https.js ***!
  2867. \**********************************************************/
  2868. /*! no static exports found */
  2869. /***/ (function(module, exports, __webpack_require__) {
  2870. "use strict";
  2871. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  2872. var _config = _interopRequireDefault(__webpack_require__(/*! ./config */ 133));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 区分开发环境和生产环境 接口地址
  2873. var baseUrl = _config.default.baseUrl;
  2874. // let baseUrl = 'http://60.191.110.205:19099/';
  2875. // let baseUrl = 'https://ksfdc.zjugis.com:19099/';
  2876. function https(config) {
  2877. //显示loading
  2878. wx.showLoading({
  2879. title: '正在请求中' });
  2880. //设置请求头
  2881. if (!config.header) {
  2882. config.header = {};
  2883. }
  2884. if (!config.header['content-type']) {
  2885. config.header['content-type'] = 'application/json';
  2886. }
  2887. config.url = baseUrl + config.url; // 请求地址
  2888. var promise = new Promise(function (resolve, reject) {
  2889. uni.request(config).then(function (res) {
  2890. wx.hideLoading(); //隐藏loading
  2891. if (res[0]) {
  2892. uni.showToast({
  2893. title: "数据获取失败",
  2894. icon: "none",
  2895. duration: 1500 });
  2896. reject(false);
  2897. } else {
  2898. var data = res[1].data;
  2899. if (data.code == 1) {
  2900. resolve(data);
  2901. } else {
  2902. resolve(data);
  2903. }
  2904. }
  2905. }).catch(function (error) {
  2906. wx.hideLoading(); //隐藏loading
  2907. reject(error);
  2908. });
  2909. });
  2910. return promise;
  2911. }var _default =
  2912. https;exports.default = _default;
  2913. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2914. /***/ }),
  2915. /***/ 2:
  2916. /*!***********************************!*\
  2917. !*** (webpack)/buildin/global.js ***!
  2918. \***********************************/
  2919. /*! no static exports found */
  2920. /***/ (function(module, exports) {
  2921. var g;
  2922. // This works in non-strict mode
  2923. g = (function() {
  2924. return this;
  2925. })();
  2926. try {
  2927. // This works if eval is allowed (see CSP)
  2928. g = g || new Function("return this")();
  2929. } catch (e) {
  2930. // This works if the window reference is available
  2931. if (typeof window === "object") g = window;
  2932. }
  2933. // g can still be undefined, but nothing to do about it...
  2934. // We return undefined, instead of nothing here, so it's
  2935. // easier to handle this case. if(!global) { ...}
  2936. module.exports = g;
  2937. /***/ }),
  2938. /***/ 3:
  2939. /*!******************************************************************************************!*\
  2940. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  2941. \******************************************************************************************/
  2942. /*! exports provided: default */
  2943. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2944. "use strict";
  2945. __webpack_require__.r(__webpack_exports__);
  2946. /* WEBPACK VAR INJECTION */(function(global) {/*!
  2947. * Vue.js v2.6.11
  2948. * (c) 2014-2021 Evan You
  2949. * Released under the MIT License.
  2950. */
  2951. /* */
  2952. var emptyObject = Object.freeze({});
  2953. // These helpers produce better VM code in JS engines due to their
  2954. // explicitness and function inlining.
  2955. function isUndef (v) {
  2956. return v === undefined || v === null
  2957. }
  2958. function isDef (v) {
  2959. return v !== undefined && v !== null
  2960. }
  2961. function isTrue (v) {
  2962. return v === true
  2963. }
  2964. function isFalse (v) {
  2965. return v === false
  2966. }
  2967. /**
  2968. * Check if value is primitive.
  2969. */
  2970. function isPrimitive (value) {
  2971. return (
  2972. typeof value === 'string' ||
  2973. typeof value === 'number' ||
  2974. // $flow-disable-line
  2975. typeof value === 'symbol' ||
  2976. typeof value === 'boolean'
  2977. )
  2978. }
  2979. /**
  2980. * Quick object check - this is primarily used to tell
  2981. * Objects from primitive values when we know the value
  2982. * is a JSON-compliant type.
  2983. */
  2984. function isObject (obj) {
  2985. return obj !== null && typeof obj === 'object'
  2986. }
  2987. /**
  2988. * Get the raw type string of a value, e.g., [object Object].
  2989. */
  2990. var _toString = Object.prototype.toString;
  2991. function toRawType (value) {
  2992. return _toString.call(value).slice(8, -1)
  2993. }
  2994. /**
  2995. * Strict object type check. Only returns true
  2996. * for plain JavaScript objects.
  2997. */
  2998. function isPlainObject (obj) {
  2999. return _toString.call(obj) === '[object Object]'
  3000. }
  3001. function isRegExp (v) {
  3002. return _toString.call(v) === '[object RegExp]'
  3003. }
  3004. /**
  3005. * Check if val is a valid array index.
  3006. */
  3007. function isValidArrayIndex (val) {
  3008. var n = parseFloat(String(val));
  3009. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3010. }
  3011. function isPromise (val) {
  3012. return (
  3013. isDef(val) &&
  3014. typeof val.then === 'function' &&
  3015. typeof val.catch === 'function'
  3016. )
  3017. }
  3018. /**
  3019. * Convert a value to a string that is actually rendered.
  3020. */
  3021. function toString (val) {
  3022. return val == null
  3023. ? ''
  3024. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3025. ? JSON.stringify(val, null, 2)
  3026. : String(val)
  3027. }
  3028. /**
  3029. * Convert an input value to a number for persistence.
  3030. * If the conversion fails, return original string.
  3031. */
  3032. function toNumber (val) {
  3033. var n = parseFloat(val);
  3034. return isNaN(n) ? val : n
  3035. }
  3036. /**
  3037. * Make a map and return a function for checking if a key
  3038. * is in that map.
  3039. */
  3040. function makeMap (
  3041. str,
  3042. expectsLowerCase
  3043. ) {
  3044. var map = Object.create(null);
  3045. var list = str.split(',');
  3046. for (var i = 0; i < list.length; i++) {
  3047. map[list[i]] = true;
  3048. }
  3049. return expectsLowerCase
  3050. ? function (val) { return map[val.toLowerCase()]; }
  3051. : function (val) { return map[val]; }
  3052. }
  3053. /**
  3054. * Check if a tag is a built-in tag.
  3055. */
  3056. var isBuiltInTag = makeMap('slot,component', true);
  3057. /**
  3058. * Check if an attribute is a reserved attribute.
  3059. */
  3060. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3061. /**
  3062. * Remove an item from an array.
  3063. */
  3064. function remove (arr, item) {
  3065. if (arr.length) {
  3066. var index = arr.indexOf(item);
  3067. if (index > -1) {
  3068. return arr.splice(index, 1)
  3069. }
  3070. }
  3071. }
  3072. /**
  3073. * Check whether an object has the property.
  3074. */
  3075. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3076. function hasOwn (obj, key) {
  3077. return hasOwnProperty.call(obj, key)
  3078. }
  3079. /**
  3080. * Create a cached version of a pure function.
  3081. */
  3082. function cached (fn) {
  3083. var cache = Object.create(null);
  3084. return (function cachedFn (str) {
  3085. var hit = cache[str];
  3086. return hit || (cache[str] = fn(str))
  3087. })
  3088. }
  3089. /**
  3090. * Camelize a hyphen-delimited string.
  3091. */
  3092. var camelizeRE = /-(\w)/g;
  3093. var camelize = cached(function (str) {
  3094. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3095. });
  3096. /**
  3097. * Capitalize a string.
  3098. */
  3099. var capitalize = cached(function (str) {
  3100. return str.charAt(0).toUpperCase() + str.slice(1)
  3101. });
  3102. /**
  3103. * Hyphenate a camelCase string.
  3104. */
  3105. var hyphenateRE = /\B([A-Z])/g;
  3106. var hyphenate = cached(function (str) {
  3107. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3108. });
  3109. /**
  3110. * Simple bind polyfill for environments that do not support it,
  3111. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3112. * since native bind is now performant enough in most browsers.
  3113. * But removing it would mean breaking code that was able to run in
  3114. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3115. */
  3116. /* istanbul ignore next */
  3117. function polyfillBind (fn, ctx) {
  3118. function boundFn (a) {
  3119. var l = arguments.length;
  3120. return l
  3121. ? l > 1
  3122. ? fn.apply(ctx, arguments)
  3123. : fn.call(ctx, a)
  3124. : fn.call(ctx)
  3125. }
  3126. boundFn._length = fn.length;
  3127. return boundFn
  3128. }
  3129. function nativeBind (fn, ctx) {
  3130. return fn.bind(ctx)
  3131. }
  3132. var bind = Function.prototype.bind
  3133. ? nativeBind
  3134. : polyfillBind;
  3135. /**
  3136. * Convert an Array-like object to a real Array.
  3137. */
  3138. function toArray (list, start) {
  3139. start = start || 0;
  3140. var i = list.length - start;
  3141. var ret = new Array(i);
  3142. while (i--) {
  3143. ret[i] = list[i + start];
  3144. }
  3145. return ret
  3146. }
  3147. /**
  3148. * Mix properties into target object.
  3149. */
  3150. function extend (to, _from) {
  3151. for (var key in _from) {
  3152. to[key] = _from[key];
  3153. }
  3154. return to
  3155. }
  3156. /**
  3157. * Merge an Array of Objects into a single Object.
  3158. */
  3159. function toObject (arr) {
  3160. var res = {};
  3161. for (var i = 0; i < arr.length; i++) {
  3162. if (arr[i]) {
  3163. extend(res, arr[i]);
  3164. }
  3165. }
  3166. return res
  3167. }
  3168. /* eslint-disable no-unused-vars */
  3169. /**
  3170. * Perform no operation.
  3171. * Stubbing args to make Flow happy without leaving useless transpiled code
  3172. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3173. */
  3174. function noop (a, b, c) {}
  3175. /**
  3176. * Always return false.
  3177. */
  3178. var no = function (a, b, c) { return false; };
  3179. /* eslint-enable no-unused-vars */
  3180. /**
  3181. * Return the same value.
  3182. */
  3183. var identity = function (_) { return _; };
  3184. /**
  3185. * Check if two values are loosely equal - that is,
  3186. * if they are plain objects, do they have the same shape?
  3187. */
  3188. function looseEqual (a, b) {
  3189. if (a === b) { return true }
  3190. var isObjectA = isObject(a);
  3191. var isObjectB = isObject(b);
  3192. if (isObjectA && isObjectB) {
  3193. try {
  3194. var isArrayA = Array.isArray(a);
  3195. var isArrayB = Array.isArray(b);
  3196. if (isArrayA && isArrayB) {
  3197. return a.length === b.length && a.every(function (e, i) {
  3198. return looseEqual(e, b[i])
  3199. })
  3200. } else if (a instanceof Date && b instanceof Date) {
  3201. return a.getTime() === b.getTime()
  3202. } else if (!isArrayA && !isArrayB) {
  3203. var keysA = Object.keys(a);
  3204. var keysB = Object.keys(b);
  3205. return keysA.length === keysB.length && keysA.every(function (key) {
  3206. return looseEqual(a[key], b[key])
  3207. })
  3208. } else {
  3209. /* istanbul ignore next */
  3210. return false
  3211. }
  3212. } catch (e) {
  3213. /* istanbul ignore next */
  3214. return false
  3215. }
  3216. } else if (!isObjectA && !isObjectB) {
  3217. return String(a) === String(b)
  3218. } else {
  3219. return false
  3220. }
  3221. }
  3222. /**
  3223. * Return the first index at which a loosely equal value can be
  3224. * found in the array (if value is a plain object, the array must
  3225. * contain an object of the same shape), or -1 if it is not present.
  3226. */
  3227. function looseIndexOf (arr, val) {
  3228. for (var i = 0; i < arr.length; i++) {
  3229. if (looseEqual(arr[i], val)) { return i }
  3230. }
  3231. return -1
  3232. }
  3233. /**
  3234. * Ensure a function is called only once.
  3235. */
  3236. function once (fn) {
  3237. var called = false;
  3238. return function () {
  3239. if (!called) {
  3240. called = true;
  3241. fn.apply(this, arguments);
  3242. }
  3243. }
  3244. }
  3245. var ASSET_TYPES = [
  3246. 'component',
  3247. 'directive',
  3248. 'filter'
  3249. ];
  3250. var LIFECYCLE_HOOKS = [
  3251. 'beforeCreate',
  3252. 'created',
  3253. 'beforeMount',
  3254. 'mounted',
  3255. 'beforeUpdate',
  3256. 'updated',
  3257. 'beforeDestroy',
  3258. 'destroyed',
  3259. 'activated',
  3260. 'deactivated',
  3261. 'errorCaptured',
  3262. 'serverPrefetch'
  3263. ];
  3264. /* */
  3265. var config = ({
  3266. /**
  3267. * Option merge strategies (used in core/util/options)
  3268. */
  3269. // $flow-disable-line
  3270. optionMergeStrategies: Object.create(null),
  3271. /**
  3272. * Whether to suppress warnings.
  3273. */
  3274. silent: false,
  3275. /**
  3276. * Show production mode tip message on boot?
  3277. */
  3278. productionTip: "development" !== 'production',
  3279. /**
  3280. * Whether to enable devtools
  3281. */
  3282. devtools: "development" !== 'production',
  3283. /**
  3284. * Whether to record perf
  3285. */
  3286. performance: false,
  3287. /**
  3288. * Error handler for watcher errors
  3289. */
  3290. errorHandler: null,
  3291. /**
  3292. * Warn handler for watcher warns
  3293. */
  3294. warnHandler: null,
  3295. /**
  3296. * Ignore certain custom elements
  3297. */
  3298. ignoredElements: [],
  3299. /**
  3300. * Custom user key aliases for v-on
  3301. */
  3302. // $flow-disable-line
  3303. keyCodes: Object.create(null),
  3304. /**
  3305. * Check if a tag is reserved so that it cannot be registered as a
  3306. * component. This is platform-dependent and may be overwritten.
  3307. */
  3308. isReservedTag: no,
  3309. /**
  3310. * Check if an attribute is reserved so that it cannot be used as a component
  3311. * prop. This is platform-dependent and may be overwritten.
  3312. */
  3313. isReservedAttr: no,
  3314. /**
  3315. * Check if a tag is an unknown element.
  3316. * Platform-dependent.
  3317. */
  3318. isUnknownElement: no,
  3319. /**
  3320. * Get the namespace of an element
  3321. */
  3322. getTagNamespace: noop,
  3323. /**
  3324. * Parse the real tag name for the specific platform.
  3325. */
  3326. parsePlatformTagName: identity,
  3327. /**
  3328. * Check if an attribute must be bound using property, e.g. value
  3329. * Platform-dependent.
  3330. */
  3331. mustUseProp: no,
  3332. /**
  3333. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3334. * This will significantly reduce performance if set to false.
  3335. */
  3336. async: true,
  3337. /**
  3338. * Exposed for legacy reasons
  3339. */
  3340. _lifecycleHooks: LIFECYCLE_HOOKS
  3341. });
  3342. /* */
  3343. /**
  3344. * unicode letters used for parsing html tags, component names and property paths.
  3345. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3346. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3347. */
  3348. 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/;
  3349. /**
  3350. * Check if a string starts with $ or _
  3351. */
  3352. function isReserved (str) {
  3353. var c = (str + '').charCodeAt(0);
  3354. return c === 0x24 || c === 0x5F
  3355. }
  3356. /**
  3357. * Define a property.
  3358. */
  3359. function def (obj, key, val, enumerable) {
  3360. Object.defineProperty(obj, key, {
  3361. value: val,
  3362. enumerable: !!enumerable,
  3363. writable: true,
  3364. configurable: true
  3365. });
  3366. }
  3367. /**
  3368. * Parse simple path.
  3369. */
  3370. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3371. function parsePath (path) {
  3372. if (bailRE.test(path)) {
  3373. return
  3374. }
  3375. var segments = path.split('.');
  3376. return function (obj) {
  3377. for (var i = 0; i < segments.length; i++) {
  3378. if (!obj) { return }
  3379. obj = obj[segments[i]];
  3380. }
  3381. return obj
  3382. }
  3383. }
  3384. /* */
  3385. // can we use __proto__?
  3386. var hasProto = '__proto__' in {};
  3387. // Browser environment sniffing
  3388. var inBrowser = typeof window !== 'undefined';
  3389. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3390. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3391. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3392. var isIE = UA && /msie|trident/.test(UA);
  3393. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3394. var isEdge = UA && UA.indexOf('edge/') > 0;
  3395. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3396. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3397. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3398. var isPhantomJS = UA && /phantomjs/.test(UA);
  3399. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3400. // Firefox has a "watch" function on Object.prototype...
  3401. var nativeWatch = ({}).watch;
  3402. if (inBrowser) {
  3403. try {
  3404. var opts = {};
  3405. Object.defineProperty(opts, 'passive', ({
  3406. get: function get () {
  3407. }
  3408. })); // https://github.com/facebook/flow/issues/285
  3409. window.addEventListener('test-passive', null, opts);
  3410. } catch (e) {}
  3411. }
  3412. // this needs to be lazy-evaled because vue may be required before
  3413. // vue-server-renderer can set VUE_ENV
  3414. var _isServer;
  3415. var isServerRendering = function () {
  3416. if (_isServer === undefined) {
  3417. /* istanbul ignore if */
  3418. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3419. // detect presence of vue-server-renderer and avoid
  3420. // Webpack shimming the process
  3421. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3422. } else {
  3423. _isServer = false;
  3424. }
  3425. }
  3426. return _isServer
  3427. };
  3428. // detect devtools
  3429. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3430. /* istanbul ignore next */
  3431. function isNative (Ctor) {
  3432. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3433. }
  3434. var hasSymbol =
  3435. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3436. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3437. var _Set;
  3438. /* istanbul ignore if */ // $flow-disable-line
  3439. if (typeof Set !== 'undefined' && isNative(Set)) {
  3440. // use native Set when available.
  3441. _Set = Set;
  3442. } else {
  3443. // a non-standard Set polyfill that only works with primitive keys.
  3444. _Set = /*@__PURE__*/(function () {
  3445. function Set () {
  3446. this.set = Object.create(null);
  3447. }
  3448. Set.prototype.has = function has (key) {
  3449. return this.set[key] === true
  3450. };
  3451. Set.prototype.add = function add (key) {
  3452. this.set[key] = true;
  3453. };
  3454. Set.prototype.clear = function clear () {
  3455. this.set = Object.create(null);
  3456. };
  3457. return Set;
  3458. }());
  3459. }
  3460. /* */
  3461. var warn = noop;
  3462. var tip = noop;
  3463. var generateComponentTrace = (noop); // work around flow check
  3464. var formatComponentName = (noop);
  3465. if (true) {
  3466. var hasConsole = typeof console !== 'undefined';
  3467. var classifyRE = /(?:^|[-_])(\w)/g;
  3468. var classify = function (str) { return str
  3469. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3470. .replace(/[-_]/g, ''); };
  3471. warn = function (msg, vm) {
  3472. var trace = vm ? generateComponentTrace(vm) : '';
  3473. if (config.warnHandler) {
  3474. config.warnHandler.call(null, msg, vm, trace);
  3475. } else if (hasConsole && (!config.silent)) {
  3476. console.error(("[Vue warn]: " + msg + trace));
  3477. }
  3478. };
  3479. tip = function (msg, vm) {
  3480. if (hasConsole && (!config.silent)) {
  3481. console.warn("[Vue tip]: " + msg + (
  3482. vm ? generateComponentTrace(vm) : ''
  3483. ));
  3484. }
  3485. };
  3486. formatComponentName = function (vm, includeFile) {
  3487. if (vm.$root === vm) {
  3488. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3489. return ('') + vm.$options.__file
  3490. }
  3491. return '<Root>'
  3492. }
  3493. var options = typeof vm === 'function' && vm.cid != null
  3494. ? vm.options
  3495. : vm._isVue
  3496. ? vm.$options || vm.constructor.options
  3497. : vm;
  3498. var name = options.name || options._componentTag;
  3499. var file = options.__file;
  3500. if (!name && file) {
  3501. var match = file.match(/([^/\\]+)\.vue$/);
  3502. name = match && match[1];
  3503. }
  3504. return (
  3505. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3506. (file && includeFile !== false ? (" at " + file) : '')
  3507. )
  3508. };
  3509. var repeat = function (str, n) {
  3510. var res = '';
  3511. while (n) {
  3512. if (n % 2 === 1) { res += str; }
  3513. if (n > 1) { str += str; }
  3514. n >>= 1;
  3515. }
  3516. return res
  3517. };
  3518. generateComponentTrace = function (vm) {
  3519. if (vm._isVue && vm.$parent) {
  3520. var tree = [];
  3521. var currentRecursiveSequence = 0;
  3522. while (vm && vm.$options.name !== 'PageBody') {
  3523. if (tree.length > 0) {
  3524. var last = tree[tree.length - 1];
  3525. if (last.constructor === vm.constructor) {
  3526. currentRecursiveSequence++;
  3527. vm = vm.$parent;
  3528. continue
  3529. } else if (currentRecursiveSequence > 0) {
  3530. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3531. currentRecursiveSequence = 0;
  3532. }
  3533. }
  3534. !vm.$options.isReserved && tree.push(vm);
  3535. vm = vm.$parent;
  3536. }
  3537. return '\n\nfound in\n\n' + tree
  3538. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3539. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3540. : formatComponentName(vm))); })
  3541. .join('\n')
  3542. } else {
  3543. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3544. }
  3545. };
  3546. }
  3547. /* */
  3548. var uid = 0;
  3549. /**
  3550. * A dep is an observable that can have multiple
  3551. * directives subscribing to it.
  3552. */
  3553. var Dep = function Dep () {
  3554. this.id = uid++;
  3555. this.subs = [];
  3556. };
  3557. Dep.prototype.addSub = function addSub (sub) {
  3558. this.subs.push(sub);
  3559. };
  3560. Dep.prototype.removeSub = function removeSub (sub) {
  3561. remove(this.subs, sub);
  3562. };
  3563. Dep.prototype.depend = function depend () {
  3564. if (Dep.SharedObject.target) {
  3565. Dep.SharedObject.target.addDep(this);
  3566. }
  3567. };
  3568. Dep.prototype.notify = function notify () {
  3569. // stabilize the subscriber list first
  3570. var subs = this.subs.slice();
  3571. if ( true && !config.async) {
  3572. // subs aren't sorted in scheduler if not running async
  3573. // we need to sort them now to make sure they fire in correct
  3574. // order
  3575. subs.sort(function (a, b) { return a.id - b.id; });
  3576. }
  3577. for (var i = 0, l = subs.length; i < l; i++) {
  3578. subs[i].update();
  3579. }
  3580. };
  3581. // The current target watcher being evaluated.
  3582. // This is globally unique because only one watcher
  3583. // can be evaluated at a time.
  3584. // fixed by xxxxxx (nvue shared vuex)
  3585. /* eslint-disable no-undef */
  3586. Dep.SharedObject = {};
  3587. Dep.SharedObject.target = null;
  3588. Dep.SharedObject.targetStack = [];
  3589. function pushTarget (target) {
  3590. Dep.SharedObject.targetStack.push(target);
  3591. Dep.SharedObject.target = target;
  3592. Dep.target = target;
  3593. }
  3594. function popTarget () {
  3595. Dep.SharedObject.targetStack.pop();
  3596. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3597. Dep.target = Dep.SharedObject.target;
  3598. }
  3599. /* */
  3600. var VNode = function VNode (
  3601. tag,
  3602. data,
  3603. children,
  3604. text,
  3605. elm,
  3606. context,
  3607. componentOptions,
  3608. asyncFactory
  3609. ) {
  3610. this.tag = tag;
  3611. this.data = data;
  3612. this.children = children;
  3613. this.text = text;
  3614. this.elm = elm;
  3615. this.ns = undefined;
  3616. this.context = context;
  3617. this.fnContext = undefined;
  3618. this.fnOptions = undefined;
  3619. this.fnScopeId = undefined;
  3620. this.key = data && data.key;
  3621. this.componentOptions = componentOptions;
  3622. this.componentInstance = undefined;
  3623. this.parent = undefined;
  3624. this.raw = false;
  3625. this.isStatic = false;
  3626. this.isRootInsert = true;
  3627. this.isComment = false;
  3628. this.isCloned = false;
  3629. this.isOnce = false;
  3630. this.asyncFactory = asyncFactory;
  3631. this.asyncMeta = undefined;
  3632. this.isAsyncPlaceholder = false;
  3633. };
  3634. var prototypeAccessors = { child: { configurable: true } };
  3635. // DEPRECATED: alias for componentInstance for backwards compat.
  3636. /* istanbul ignore next */
  3637. prototypeAccessors.child.get = function () {
  3638. return this.componentInstance
  3639. };
  3640. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3641. var createEmptyVNode = function (text) {
  3642. if ( text === void 0 ) text = '';
  3643. var node = new VNode();
  3644. node.text = text;
  3645. node.isComment = true;
  3646. return node
  3647. };
  3648. function createTextVNode (val) {
  3649. return new VNode(undefined, undefined, undefined, String(val))
  3650. }
  3651. // optimized shallow clone
  3652. // used for static nodes and slot nodes because they may be reused across
  3653. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3654. // on their elm reference.
  3655. function cloneVNode (vnode) {
  3656. var cloned = new VNode(
  3657. vnode.tag,
  3658. vnode.data,
  3659. // #7975
  3660. // clone children array to avoid mutating original in case of cloning
  3661. // a child.
  3662. vnode.children && vnode.children.slice(),
  3663. vnode.text,
  3664. vnode.elm,
  3665. vnode.context,
  3666. vnode.componentOptions,
  3667. vnode.asyncFactory
  3668. );
  3669. cloned.ns = vnode.ns;
  3670. cloned.isStatic = vnode.isStatic;
  3671. cloned.key = vnode.key;
  3672. cloned.isComment = vnode.isComment;
  3673. cloned.fnContext = vnode.fnContext;
  3674. cloned.fnOptions = vnode.fnOptions;
  3675. cloned.fnScopeId = vnode.fnScopeId;
  3676. cloned.asyncMeta = vnode.asyncMeta;
  3677. cloned.isCloned = true;
  3678. return cloned
  3679. }
  3680. /*
  3681. * not type checking this file because flow doesn't play well with
  3682. * dynamically accessing methods on Array prototype
  3683. */
  3684. var arrayProto = Array.prototype;
  3685. var arrayMethods = Object.create(arrayProto);
  3686. var methodsToPatch = [
  3687. 'push',
  3688. 'pop',
  3689. 'shift',
  3690. 'unshift',
  3691. 'splice',
  3692. 'sort',
  3693. 'reverse'
  3694. ];
  3695. /**
  3696. * Intercept mutating methods and emit events
  3697. */
  3698. methodsToPatch.forEach(function (method) {
  3699. // cache original method
  3700. var original = arrayProto[method];
  3701. def(arrayMethods, method, function mutator () {
  3702. var args = [], len = arguments.length;
  3703. while ( len-- ) args[ len ] = arguments[ len ];
  3704. var result = original.apply(this, args);
  3705. var ob = this.__ob__;
  3706. var inserted;
  3707. switch (method) {
  3708. case 'push':
  3709. case 'unshift':
  3710. inserted = args;
  3711. break
  3712. case 'splice':
  3713. inserted = args.slice(2);
  3714. break
  3715. }
  3716. if (inserted) { ob.observeArray(inserted); }
  3717. // notify change
  3718. ob.dep.notify();
  3719. return result
  3720. });
  3721. });
  3722. /* */
  3723. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3724. /**
  3725. * In some cases we may want to disable observation inside a component's
  3726. * update computation.
  3727. */
  3728. var shouldObserve = true;
  3729. function toggleObserving (value) {
  3730. shouldObserve = value;
  3731. }
  3732. /**
  3733. * Observer class that is attached to each observed
  3734. * object. Once attached, the observer converts the target
  3735. * object's property keys into getter/setters that
  3736. * collect dependencies and dispatch updates.
  3737. */
  3738. var Observer = function Observer (value) {
  3739. this.value = value;
  3740. this.dep = new Dep();
  3741. this.vmCount = 0;
  3742. def(value, '__ob__', this);
  3743. if (Array.isArray(value)) {
  3744. if (hasProto) {
  3745. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3746. if(value.push !== value.__proto__.push){
  3747. copyAugment(value, arrayMethods, arrayKeys);
  3748. } else {
  3749. protoAugment(value, arrayMethods);
  3750. }
  3751. }
  3752. } else {
  3753. copyAugment(value, arrayMethods, arrayKeys);
  3754. }
  3755. this.observeArray(value);
  3756. } else {
  3757. this.walk(value);
  3758. }
  3759. };
  3760. /**
  3761. * Walk through all properties and convert them into
  3762. * getter/setters. This method should only be called when
  3763. * value type is Object.
  3764. */
  3765. Observer.prototype.walk = function walk (obj) {
  3766. var keys = Object.keys(obj);
  3767. for (var i = 0; i < keys.length; i++) {
  3768. defineReactive$$1(obj, keys[i]);
  3769. }
  3770. };
  3771. /**
  3772. * Observe a list of Array items.
  3773. */
  3774. Observer.prototype.observeArray = function observeArray (items) {
  3775. for (var i = 0, l = items.length; i < l; i++) {
  3776. observe(items[i]);
  3777. }
  3778. };
  3779. // helpers
  3780. /**
  3781. * Augment a target Object or Array by intercepting
  3782. * the prototype chain using __proto__
  3783. */
  3784. function protoAugment (target, src) {
  3785. /* eslint-disable no-proto */
  3786. target.__proto__ = src;
  3787. /* eslint-enable no-proto */
  3788. }
  3789. /**
  3790. * Augment a target Object or Array by defining
  3791. * hidden properties.
  3792. */
  3793. /* istanbul ignore next */
  3794. function copyAugment (target, src, keys) {
  3795. for (var i = 0, l = keys.length; i < l; i++) {
  3796. var key = keys[i];
  3797. def(target, key, src[key]);
  3798. }
  3799. }
  3800. /**
  3801. * Attempt to create an observer instance for a value,
  3802. * returns the new observer if successfully observed,
  3803. * or the existing observer if the value already has one.
  3804. */
  3805. function observe (value, asRootData) {
  3806. if (!isObject(value) || value instanceof VNode) {
  3807. return
  3808. }
  3809. var ob;
  3810. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  3811. ob = value.__ob__;
  3812. } else if (
  3813. shouldObserve &&
  3814. !isServerRendering() &&
  3815. (Array.isArray(value) || isPlainObject(value)) &&
  3816. Object.isExtensible(value) &&
  3817. !value._isVue
  3818. ) {
  3819. ob = new Observer(value);
  3820. }
  3821. if (asRootData && ob) {
  3822. ob.vmCount++;
  3823. }
  3824. return ob
  3825. }
  3826. /**
  3827. * Define a reactive property on an Object.
  3828. */
  3829. function defineReactive$$1 (
  3830. obj,
  3831. key,
  3832. val,
  3833. customSetter,
  3834. shallow
  3835. ) {
  3836. var dep = new Dep();
  3837. var property = Object.getOwnPropertyDescriptor(obj, key);
  3838. if (property && property.configurable === false) {
  3839. return
  3840. }
  3841. // cater for pre-defined getter/setters
  3842. var getter = property && property.get;
  3843. var setter = property && property.set;
  3844. if ((!getter || setter) && arguments.length === 2) {
  3845. val = obj[key];
  3846. }
  3847. var childOb = !shallow && observe(val);
  3848. Object.defineProperty(obj, key, {
  3849. enumerable: true,
  3850. configurable: true,
  3851. get: function reactiveGetter () {
  3852. var value = getter ? getter.call(obj) : val;
  3853. if (Dep.SharedObject.target) { // fixed by xxxxxx
  3854. dep.depend();
  3855. if (childOb) {
  3856. childOb.dep.depend();
  3857. if (Array.isArray(value)) {
  3858. dependArray(value);
  3859. }
  3860. }
  3861. }
  3862. return value
  3863. },
  3864. set: function reactiveSetter (newVal) {
  3865. var value = getter ? getter.call(obj) : val;
  3866. /* eslint-disable no-self-compare */
  3867. if (newVal === value || (newVal !== newVal && value !== value)) {
  3868. return
  3869. }
  3870. /* eslint-enable no-self-compare */
  3871. if ( true && customSetter) {
  3872. customSetter();
  3873. }
  3874. // #7981: for accessor properties without setter
  3875. if (getter && !setter) { return }
  3876. if (setter) {
  3877. setter.call(obj, newVal);
  3878. } else {
  3879. val = newVal;
  3880. }
  3881. childOb = !shallow && observe(newVal);
  3882. dep.notify();
  3883. }
  3884. });
  3885. }
  3886. /**
  3887. * Set a property on an object. Adds the new property and
  3888. * triggers change notification if the property doesn't
  3889. * already exist.
  3890. */
  3891. function set (target, key, val) {
  3892. if ( true &&
  3893. (isUndef(target) || isPrimitive(target))
  3894. ) {
  3895. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  3896. }
  3897. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3898. target.length = Math.max(target.length, key);
  3899. target.splice(key, 1, val);
  3900. return val
  3901. }
  3902. if (key in target && !(key in Object.prototype)) {
  3903. target[key] = val;
  3904. return val
  3905. }
  3906. var ob = (target).__ob__;
  3907. if (target._isVue || (ob && ob.vmCount)) {
  3908. true && warn(
  3909. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  3910. 'at runtime - declare it upfront in the data option.'
  3911. );
  3912. return val
  3913. }
  3914. if (!ob) {
  3915. target[key] = val;
  3916. return val
  3917. }
  3918. defineReactive$$1(ob.value, key, val);
  3919. ob.dep.notify();
  3920. return val
  3921. }
  3922. /**
  3923. * Delete a property and trigger change if necessary.
  3924. */
  3925. function del (target, key) {
  3926. if ( true &&
  3927. (isUndef(target) || isPrimitive(target))
  3928. ) {
  3929. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  3930. }
  3931. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3932. target.splice(key, 1);
  3933. return
  3934. }
  3935. var ob = (target).__ob__;
  3936. if (target._isVue || (ob && ob.vmCount)) {
  3937. true && warn(
  3938. 'Avoid deleting properties on a Vue instance or its root $data ' +
  3939. '- just set it to null.'
  3940. );
  3941. return
  3942. }
  3943. if (!hasOwn(target, key)) {
  3944. return
  3945. }
  3946. delete target[key];
  3947. if (!ob) {
  3948. return
  3949. }
  3950. ob.dep.notify();
  3951. }
  3952. /**
  3953. * Collect dependencies on array elements when the array is touched, since
  3954. * we cannot intercept array element access like property getters.
  3955. */
  3956. function dependArray (value) {
  3957. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  3958. e = value[i];
  3959. e && e.__ob__ && e.__ob__.dep.depend();
  3960. if (Array.isArray(e)) {
  3961. dependArray(e);
  3962. }
  3963. }
  3964. }
  3965. /* */
  3966. /**
  3967. * Option overwriting strategies are functions that handle
  3968. * how to merge a parent option value and a child option
  3969. * value into the final value.
  3970. */
  3971. var strats = config.optionMergeStrategies;
  3972. /**
  3973. * Options with restrictions
  3974. */
  3975. if (true) {
  3976. strats.el = strats.propsData = function (parent, child, vm, key) {
  3977. if (!vm) {
  3978. warn(
  3979. "option \"" + key + "\" can only be used during instance " +
  3980. 'creation with the `new` keyword.'
  3981. );
  3982. }
  3983. return defaultStrat(parent, child)
  3984. };
  3985. }
  3986. /**
  3987. * Helper that recursively merges two data objects together.
  3988. */
  3989. function mergeData (to, from) {
  3990. if (!from) { return to }
  3991. var key, toVal, fromVal;
  3992. var keys = hasSymbol
  3993. ? Reflect.ownKeys(from)
  3994. : Object.keys(from);
  3995. for (var i = 0; i < keys.length; i++) {
  3996. key = keys[i];
  3997. // in case the object is already observed...
  3998. if (key === '__ob__') { continue }
  3999. toVal = to[key];
  4000. fromVal = from[key];
  4001. if (!hasOwn(to, key)) {
  4002. set(to, key, fromVal);
  4003. } else if (
  4004. toVal !== fromVal &&
  4005. isPlainObject(toVal) &&
  4006. isPlainObject(fromVal)
  4007. ) {
  4008. mergeData(toVal, fromVal);
  4009. }
  4010. }
  4011. return to
  4012. }
  4013. /**
  4014. * Data
  4015. */
  4016. function mergeDataOrFn (
  4017. parentVal,
  4018. childVal,
  4019. vm
  4020. ) {
  4021. if (!vm) {
  4022. // in a Vue.extend merge, both should be functions
  4023. if (!childVal) {
  4024. return parentVal
  4025. }
  4026. if (!parentVal) {
  4027. return childVal
  4028. }
  4029. // when parentVal & childVal are both present,
  4030. // we need to return a function that returns the
  4031. // merged result of both functions... no need to
  4032. // check if parentVal is a function here because
  4033. // it has to be a function to pass previous merges.
  4034. return function mergedDataFn () {
  4035. return mergeData(
  4036. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4037. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4038. )
  4039. }
  4040. } else {
  4041. return function mergedInstanceDataFn () {
  4042. // instance merge
  4043. var instanceData = typeof childVal === 'function'
  4044. ? childVal.call(vm, vm)
  4045. : childVal;
  4046. var defaultData = typeof parentVal === 'function'
  4047. ? parentVal.call(vm, vm)
  4048. : parentVal;
  4049. if (instanceData) {
  4050. return mergeData(instanceData, defaultData)
  4051. } else {
  4052. return defaultData
  4053. }
  4054. }
  4055. }
  4056. }
  4057. strats.data = function (
  4058. parentVal,
  4059. childVal,
  4060. vm
  4061. ) {
  4062. if (!vm) {
  4063. if (childVal && typeof childVal !== 'function') {
  4064. true && warn(
  4065. 'The "data" option should be a function ' +
  4066. 'that returns a per-instance value in component ' +
  4067. 'definitions.',
  4068. vm
  4069. );
  4070. return parentVal
  4071. }
  4072. return mergeDataOrFn(parentVal, childVal)
  4073. }
  4074. return mergeDataOrFn(parentVal, childVal, vm)
  4075. };
  4076. /**
  4077. * Hooks and props are merged as arrays.
  4078. */
  4079. function mergeHook (
  4080. parentVal,
  4081. childVal
  4082. ) {
  4083. var res = childVal
  4084. ? parentVal
  4085. ? parentVal.concat(childVal)
  4086. : Array.isArray(childVal)
  4087. ? childVal
  4088. : [childVal]
  4089. : parentVal;
  4090. return res
  4091. ? dedupeHooks(res)
  4092. : res
  4093. }
  4094. function dedupeHooks (hooks) {
  4095. var res = [];
  4096. for (var i = 0; i < hooks.length; i++) {
  4097. if (res.indexOf(hooks[i]) === -1) {
  4098. res.push(hooks[i]);
  4099. }
  4100. }
  4101. return res
  4102. }
  4103. LIFECYCLE_HOOKS.forEach(function (hook) {
  4104. strats[hook] = mergeHook;
  4105. });
  4106. /**
  4107. * Assets
  4108. *
  4109. * When a vm is present (instance creation), we need to do
  4110. * a three-way merge between constructor options, instance
  4111. * options and parent options.
  4112. */
  4113. function mergeAssets (
  4114. parentVal,
  4115. childVal,
  4116. vm,
  4117. key
  4118. ) {
  4119. var res = Object.create(parentVal || null);
  4120. if (childVal) {
  4121. true && assertObjectType(key, childVal, vm);
  4122. return extend(res, childVal)
  4123. } else {
  4124. return res
  4125. }
  4126. }
  4127. ASSET_TYPES.forEach(function (type) {
  4128. strats[type + 's'] = mergeAssets;
  4129. });
  4130. /**
  4131. * Watchers.
  4132. *
  4133. * Watchers hashes should not overwrite one
  4134. * another, so we merge them as arrays.
  4135. */
  4136. strats.watch = function (
  4137. parentVal,
  4138. childVal,
  4139. vm,
  4140. key
  4141. ) {
  4142. // work around Firefox's Object.prototype.watch...
  4143. if (parentVal === nativeWatch) { parentVal = undefined; }
  4144. if (childVal === nativeWatch) { childVal = undefined; }
  4145. /* istanbul ignore if */
  4146. if (!childVal) { return Object.create(parentVal || null) }
  4147. if (true) {
  4148. assertObjectType(key, childVal, vm);
  4149. }
  4150. if (!parentVal) { return childVal }
  4151. var ret = {};
  4152. extend(ret, parentVal);
  4153. for (var key$1 in childVal) {
  4154. var parent = ret[key$1];
  4155. var child = childVal[key$1];
  4156. if (parent && !Array.isArray(parent)) {
  4157. parent = [parent];
  4158. }
  4159. ret[key$1] = parent
  4160. ? parent.concat(child)
  4161. : Array.isArray(child) ? child : [child];
  4162. }
  4163. return ret
  4164. };
  4165. /**
  4166. * Other object hashes.
  4167. */
  4168. strats.props =
  4169. strats.methods =
  4170. strats.inject =
  4171. strats.computed = function (
  4172. parentVal,
  4173. childVal,
  4174. vm,
  4175. key
  4176. ) {
  4177. if (childVal && "development" !== 'production') {
  4178. assertObjectType(key, childVal, vm);
  4179. }
  4180. if (!parentVal) { return childVal }
  4181. var ret = Object.create(null);
  4182. extend(ret, parentVal);
  4183. if (childVal) { extend(ret, childVal); }
  4184. return ret
  4185. };
  4186. strats.provide = mergeDataOrFn;
  4187. /**
  4188. * Default strategy.
  4189. */
  4190. var defaultStrat = function (parentVal, childVal) {
  4191. return childVal === undefined
  4192. ? parentVal
  4193. : childVal
  4194. };
  4195. /**
  4196. * Validate component names
  4197. */
  4198. function checkComponents (options) {
  4199. for (var key in options.components) {
  4200. validateComponentName(key);
  4201. }
  4202. }
  4203. function validateComponentName (name) {
  4204. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4205. warn(
  4206. 'Invalid component name: "' + name + '". Component names ' +
  4207. 'should conform to valid custom element name in html5 specification.'
  4208. );
  4209. }
  4210. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4211. warn(
  4212. 'Do not use built-in or reserved HTML elements as component ' +
  4213. 'id: ' + name
  4214. );
  4215. }
  4216. }
  4217. /**
  4218. * Ensure all props option syntax are normalized into the
  4219. * Object-based format.
  4220. */
  4221. function normalizeProps (options, vm) {
  4222. var props = options.props;
  4223. if (!props) { return }
  4224. var res = {};
  4225. var i, val, name;
  4226. if (Array.isArray(props)) {
  4227. i = props.length;
  4228. while (i--) {
  4229. val = props[i];
  4230. if (typeof val === 'string') {
  4231. name = camelize(val);
  4232. res[name] = { type: null };
  4233. } else if (true) {
  4234. warn('props must be strings when using array syntax.');
  4235. }
  4236. }
  4237. } else if (isPlainObject(props)) {
  4238. for (var key in props) {
  4239. val = props[key];
  4240. name = camelize(key);
  4241. res[name] = isPlainObject(val)
  4242. ? val
  4243. : { type: val };
  4244. }
  4245. } else if (true) {
  4246. warn(
  4247. "Invalid value for option \"props\": expected an Array or an Object, " +
  4248. "but got " + (toRawType(props)) + ".",
  4249. vm
  4250. );
  4251. }
  4252. options.props = res;
  4253. }
  4254. /**
  4255. * Normalize all injections into Object-based format
  4256. */
  4257. function normalizeInject (options, vm) {
  4258. var inject = options.inject;
  4259. if (!inject) { return }
  4260. var normalized = options.inject = {};
  4261. if (Array.isArray(inject)) {
  4262. for (var i = 0; i < inject.length; i++) {
  4263. normalized[inject[i]] = { from: inject[i] };
  4264. }
  4265. } else if (isPlainObject(inject)) {
  4266. for (var key in inject) {
  4267. var val = inject[key];
  4268. normalized[key] = isPlainObject(val)
  4269. ? extend({ from: key }, val)
  4270. : { from: val };
  4271. }
  4272. } else if (true) {
  4273. warn(
  4274. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4275. "but got " + (toRawType(inject)) + ".",
  4276. vm
  4277. );
  4278. }
  4279. }
  4280. /**
  4281. * Normalize raw function directives into object format.
  4282. */
  4283. function normalizeDirectives (options) {
  4284. var dirs = options.directives;
  4285. if (dirs) {
  4286. for (var key in dirs) {
  4287. var def$$1 = dirs[key];
  4288. if (typeof def$$1 === 'function') {
  4289. dirs[key] = { bind: def$$1, update: def$$1 };
  4290. }
  4291. }
  4292. }
  4293. }
  4294. function assertObjectType (name, value, vm) {
  4295. if (!isPlainObject(value)) {
  4296. warn(
  4297. "Invalid value for option \"" + name + "\": expected an Object, " +
  4298. "but got " + (toRawType(value)) + ".",
  4299. vm
  4300. );
  4301. }
  4302. }
  4303. /**
  4304. * Merge two option objects into a new one.
  4305. * Core utility used in both instantiation and inheritance.
  4306. */
  4307. function mergeOptions (
  4308. parent,
  4309. child,
  4310. vm
  4311. ) {
  4312. if (true) {
  4313. checkComponents(child);
  4314. }
  4315. if (typeof child === 'function') {
  4316. child = child.options;
  4317. }
  4318. normalizeProps(child, vm);
  4319. normalizeInject(child, vm);
  4320. normalizeDirectives(child);
  4321. // Apply extends and mixins on the child options,
  4322. // but only if it is a raw options object that isn't
  4323. // the result of another mergeOptions call.
  4324. // Only merged options has the _base property.
  4325. if (!child._base) {
  4326. if (child.extends) {
  4327. parent = mergeOptions(parent, child.extends, vm);
  4328. }
  4329. if (child.mixins) {
  4330. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4331. parent = mergeOptions(parent, child.mixins[i], vm);
  4332. }
  4333. }
  4334. }
  4335. var options = {};
  4336. var key;
  4337. for (key in parent) {
  4338. mergeField(key);
  4339. }
  4340. for (key in child) {
  4341. if (!hasOwn(parent, key)) {
  4342. mergeField(key);
  4343. }
  4344. }
  4345. function mergeField (key) {
  4346. var strat = strats[key] || defaultStrat;
  4347. options[key] = strat(parent[key], child[key], vm, key);
  4348. }
  4349. return options
  4350. }
  4351. /**
  4352. * Resolve an asset.
  4353. * This function is used because child instances need access
  4354. * to assets defined in its ancestor chain.
  4355. */
  4356. function resolveAsset (
  4357. options,
  4358. type,
  4359. id,
  4360. warnMissing
  4361. ) {
  4362. /* istanbul ignore if */
  4363. if (typeof id !== 'string') {
  4364. return
  4365. }
  4366. var assets = options[type];
  4367. // check local registration variations first
  4368. if (hasOwn(assets, id)) { return assets[id] }
  4369. var camelizedId = camelize(id);
  4370. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4371. var PascalCaseId = capitalize(camelizedId);
  4372. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4373. // fallback to prototype chain
  4374. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4375. if ( true && warnMissing && !res) {
  4376. warn(
  4377. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4378. options
  4379. );
  4380. }
  4381. return res
  4382. }
  4383. /* */
  4384. function validateProp (
  4385. key,
  4386. propOptions,
  4387. propsData,
  4388. vm
  4389. ) {
  4390. var prop = propOptions[key];
  4391. var absent = !hasOwn(propsData, key);
  4392. var value = propsData[key];
  4393. // boolean casting
  4394. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4395. if (booleanIndex > -1) {
  4396. if (absent && !hasOwn(prop, 'default')) {
  4397. value = false;
  4398. } else if (value === '' || value === hyphenate(key)) {
  4399. // only cast empty string / same name to boolean if
  4400. // boolean has higher priority
  4401. var stringIndex = getTypeIndex(String, prop.type);
  4402. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4403. value = true;
  4404. }
  4405. }
  4406. }
  4407. // check default value
  4408. if (value === undefined) {
  4409. value = getPropDefaultValue(vm, prop, key);
  4410. // since the default value is a fresh copy,
  4411. // make sure to observe it.
  4412. var prevShouldObserve = shouldObserve;
  4413. toggleObserving(true);
  4414. observe(value);
  4415. toggleObserving(prevShouldObserve);
  4416. }
  4417. if (
  4418. true
  4419. ) {
  4420. assertProp(prop, key, value, vm, absent);
  4421. }
  4422. return value
  4423. }
  4424. /**
  4425. * Get the default value of a prop.
  4426. */
  4427. function getPropDefaultValue (vm, prop, key) {
  4428. // no default, return undefined
  4429. if (!hasOwn(prop, 'default')) {
  4430. return undefined
  4431. }
  4432. var def = prop.default;
  4433. // warn against non-factory defaults for Object & Array
  4434. if ( true && isObject(def)) {
  4435. warn(
  4436. 'Invalid default value for prop "' + key + '": ' +
  4437. 'Props with type Object/Array must use a factory function ' +
  4438. 'to return the default value.',
  4439. vm
  4440. );
  4441. }
  4442. // the raw prop value was also undefined from previous render,
  4443. // return previous default value to avoid unnecessary watcher trigger
  4444. if (vm && vm.$options.propsData &&
  4445. vm.$options.propsData[key] === undefined &&
  4446. vm._props[key] !== undefined
  4447. ) {
  4448. return vm._props[key]
  4449. }
  4450. // call factory function for non-Function types
  4451. // a value is Function if its prototype is function even across different execution context
  4452. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4453. ? def.call(vm)
  4454. : def
  4455. }
  4456. /**
  4457. * Assert whether a prop is valid.
  4458. */
  4459. function assertProp (
  4460. prop,
  4461. name,
  4462. value,
  4463. vm,
  4464. absent
  4465. ) {
  4466. if (prop.required && absent) {
  4467. warn(
  4468. 'Missing required prop: "' + name + '"',
  4469. vm
  4470. );
  4471. return
  4472. }
  4473. if (value == null && !prop.required) {
  4474. return
  4475. }
  4476. var type = prop.type;
  4477. var valid = !type || type === true;
  4478. var expectedTypes = [];
  4479. if (type) {
  4480. if (!Array.isArray(type)) {
  4481. type = [type];
  4482. }
  4483. for (var i = 0; i < type.length && !valid; i++) {
  4484. var assertedType = assertType(value, type[i]);
  4485. expectedTypes.push(assertedType.expectedType || '');
  4486. valid = assertedType.valid;
  4487. }
  4488. }
  4489. if (!valid) {
  4490. warn(
  4491. getInvalidTypeMessage(name, value, expectedTypes),
  4492. vm
  4493. );
  4494. return
  4495. }
  4496. var validator = prop.validator;
  4497. if (validator) {
  4498. if (!validator(value)) {
  4499. warn(
  4500. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4501. vm
  4502. );
  4503. }
  4504. }
  4505. }
  4506. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4507. function assertType (value, type) {
  4508. var valid;
  4509. var expectedType = getType(type);
  4510. if (simpleCheckRE.test(expectedType)) {
  4511. var t = typeof value;
  4512. valid = t === expectedType.toLowerCase();
  4513. // for primitive wrapper objects
  4514. if (!valid && t === 'object') {
  4515. valid = value instanceof type;
  4516. }
  4517. } else if (expectedType === 'Object') {
  4518. valid = isPlainObject(value);
  4519. } else if (expectedType === 'Array') {
  4520. valid = Array.isArray(value);
  4521. } else {
  4522. valid = value instanceof type;
  4523. }
  4524. return {
  4525. valid: valid,
  4526. expectedType: expectedType
  4527. }
  4528. }
  4529. /**
  4530. * Use function string name to check built-in types,
  4531. * because a simple equality check will fail when running
  4532. * across different vms / iframes.
  4533. */
  4534. function getType (fn) {
  4535. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4536. return match ? match[1] : ''
  4537. }
  4538. function isSameType (a, b) {
  4539. return getType(a) === getType(b)
  4540. }
  4541. function getTypeIndex (type, expectedTypes) {
  4542. if (!Array.isArray(expectedTypes)) {
  4543. return isSameType(expectedTypes, type) ? 0 : -1
  4544. }
  4545. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4546. if (isSameType(expectedTypes[i], type)) {
  4547. return i
  4548. }
  4549. }
  4550. return -1
  4551. }
  4552. function getInvalidTypeMessage (name, value, expectedTypes) {
  4553. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4554. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4555. var expectedType = expectedTypes[0];
  4556. var receivedType = toRawType(value);
  4557. var expectedValue = styleValue(value, expectedType);
  4558. var receivedValue = styleValue(value, receivedType);
  4559. // check if we need to specify expected value
  4560. if (expectedTypes.length === 1 &&
  4561. isExplicable(expectedType) &&
  4562. !isBoolean(expectedType, receivedType)) {
  4563. message += " with value " + expectedValue;
  4564. }
  4565. message += ", got " + receivedType + " ";
  4566. // check if we need to specify received value
  4567. if (isExplicable(receivedType)) {
  4568. message += "with value " + receivedValue + ".";
  4569. }
  4570. return message
  4571. }
  4572. function styleValue (value, type) {
  4573. if (type === 'String') {
  4574. return ("\"" + value + "\"")
  4575. } else if (type === 'Number') {
  4576. return ("" + (Number(value)))
  4577. } else {
  4578. return ("" + value)
  4579. }
  4580. }
  4581. function isExplicable (value) {
  4582. var explicitTypes = ['string', 'number', 'boolean'];
  4583. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4584. }
  4585. function isBoolean () {
  4586. var args = [], len = arguments.length;
  4587. while ( len-- ) args[ len ] = arguments[ len ];
  4588. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4589. }
  4590. /* */
  4591. function handleError (err, vm, info) {
  4592. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4593. // See: https://github.com/vuejs/vuex/issues/1505
  4594. pushTarget();
  4595. try {
  4596. if (vm) {
  4597. var cur = vm;
  4598. while ((cur = cur.$parent)) {
  4599. var hooks = cur.$options.errorCaptured;
  4600. if (hooks) {
  4601. for (var i = 0; i < hooks.length; i++) {
  4602. try {
  4603. var capture = hooks[i].call(cur, err, vm, info) === false;
  4604. if (capture) { return }
  4605. } catch (e) {
  4606. globalHandleError(e, cur, 'errorCaptured hook');
  4607. }
  4608. }
  4609. }
  4610. }
  4611. }
  4612. globalHandleError(err, vm, info);
  4613. } finally {
  4614. popTarget();
  4615. }
  4616. }
  4617. function invokeWithErrorHandling (
  4618. handler,
  4619. context,
  4620. args,
  4621. vm,
  4622. info
  4623. ) {
  4624. var res;
  4625. try {
  4626. res = args ? handler.apply(context, args) : handler.call(context);
  4627. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4628. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4629. // issue #9511
  4630. // avoid catch triggering multiple times when nested calls
  4631. res._handled = true;
  4632. }
  4633. } catch (e) {
  4634. handleError(e, vm, info);
  4635. }
  4636. return res
  4637. }
  4638. function globalHandleError (err, vm, info) {
  4639. if (config.errorHandler) {
  4640. try {
  4641. return config.errorHandler.call(null, err, vm, info)
  4642. } catch (e) {
  4643. // if the user intentionally throws the original error in the handler,
  4644. // do not log it twice
  4645. if (e !== err) {
  4646. logError(e, null, 'config.errorHandler');
  4647. }
  4648. }
  4649. }
  4650. logError(err, vm, info);
  4651. }
  4652. function logError (err, vm, info) {
  4653. if (true) {
  4654. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4655. }
  4656. /* istanbul ignore else */
  4657. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4658. console.error(err);
  4659. } else {
  4660. throw err
  4661. }
  4662. }
  4663. /* */
  4664. var callbacks = [];
  4665. var pending = false;
  4666. function flushCallbacks () {
  4667. pending = false;
  4668. var copies = callbacks.slice(0);
  4669. callbacks.length = 0;
  4670. for (var i = 0; i < copies.length; i++) {
  4671. copies[i]();
  4672. }
  4673. }
  4674. // Here we have async deferring wrappers using microtasks.
  4675. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4676. // However, it has subtle problems when state is changed right before repaint
  4677. // (e.g. #6813, out-in transitions).
  4678. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4679. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4680. // So we now use microtasks everywhere, again.
  4681. // A major drawback of this tradeoff is that there are some scenarios
  4682. // where microtasks have too high a priority and fire in between supposedly
  4683. // sequential events (e.g. #4521, #6690, which have workarounds)
  4684. // or even between bubbling of the same event (#6566).
  4685. var timerFunc;
  4686. // The nextTick behavior leverages the microtask queue, which can be accessed
  4687. // via either native Promise.then or MutationObserver.
  4688. // MutationObserver has wider support, however it is seriously bugged in
  4689. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4690. // completely stops working after triggering a few times... so, if native
  4691. // Promise is available, we will use it:
  4692. /* istanbul ignore next, $flow-disable-line */
  4693. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4694. var p = Promise.resolve();
  4695. timerFunc = function () {
  4696. p.then(flushCallbacks);
  4697. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4698. // it can get stuck in a weird state where callbacks are pushed into the
  4699. // microtask queue but the queue isn't being flushed, until the browser
  4700. // needs to do some other work, e.g. handle a timer. Therefore we can
  4701. // "force" the microtask queue to be flushed by adding an empty timer.
  4702. if (isIOS) { setTimeout(noop); }
  4703. };
  4704. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4705. isNative(MutationObserver) ||
  4706. // PhantomJS and iOS 7.x
  4707. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4708. )) {
  4709. // Use MutationObserver where native Promise is not available,
  4710. // e.g. PhantomJS, iOS7, Android 4.4
  4711. // (#6466 MutationObserver is unreliable in IE11)
  4712. var counter = 1;
  4713. var observer = new MutationObserver(flushCallbacks);
  4714. var textNode = document.createTextNode(String(counter));
  4715. observer.observe(textNode, {
  4716. characterData: true
  4717. });
  4718. timerFunc = function () {
  4719. counter = (counter + 1) % 2;
  4720. textNode.data = String(counter);
  4721. };
  4722. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4723. // Fallback to setImmediate.
  4724. // Technically it leverages the (macro) task queue,
  4725. // but it is still a better choice than setTimeout.
  4726. timerFunc = function () {
  4727. setImmediate(flushCallbacks);
  4728. };
  4729. } else {
  4730. // Fallback to setTimeout.
  4731. timerFunc = function () {
  4732. setTimeout(flushCallbacks, 0);
  4733. };
  4734. }
  4735. function nextTick (cb, ctx) {
  4736. var _resolve;
  4737. callbacks.push(function () {
  4738. if (cb) {
  4739. try {
  4740. cb.call(ctx);
  4741. } catch (e) {
  4742. handleError(e, ctx, 'nextTick');
  4743. }
  4744. } else if (_resolve) {
  4745. _resolve(ctx);
  4746. }
  4747. });
  4748. if (!pending) {
  4749. pending = true;
  4750. timerFunc();
  4751. }
  4752. // $flow-disable-line
  4753. if (!cb && typeof Promise !== 'undefined') {
  4754. return new Promise(function (resolve) {
  4755. _resolve = resolve;
  4756. })
  4757. }
  4758. }
  4759. /* */
  4760. /* not type checking this file because flow doesn't play well with Proxy */
  4761. var initProxy;
  4762. if (true) {
  4763. var allowedGlobals = makeMap(
  4764. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  4765. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  4766. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  4767. 'require' // for Webpack/Browserify
  4768. );
  4769. var warnNonPresent = function (target, key) {
  4770. warn(
  4771. "Property or method \"" + key + "\" is not defined on the instance but " +
  4772. 'referenced during render. Make sure that this property is reactive, ' +
  4773. 'either in the data option, or for class-based components, by ' +
  4774. 'initializing the property. ' +
  4775. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  4776. target
  4777. );
  4778. };
  4779. var warnReservedPrefix = function (target, key) {
  4780. warn(
  4781. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  4782. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  4783. 'prevent conflicts with Vue internals. ' +
  4784. 'See: https://vuejs.org/v2/api/#data',
  4785. target
  4786. );
  4787. };
  4788. var hasProxy =
  4789. typeof Proxy !== 'undefined' && isNative(Proxy);
  4790. if (hasProxy) {
  4791. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  4792. config.keyCodes = new Proxy(config.keyCodes, {
  4793. set: function set (target, key, value) {
  4794. if (isBuiltInModifier(key)) {
  4795. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  4796. return false
  4797. } else {
  4798. target[key] = value;
  4799. return true
  4800. }
  4801. }
  4802. });
  4803. }
  4804. var hasHandler = {
  4805. has: function has (target, key) {
  4806. var has = key in target;
  4807. var isAllowed = allowedGlobals(key) ||
  4808. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  4809. if (!has && !isAllowed) {
  4810. if (key in target.$data) { warnReservedPrefix(target, key); }
  4811. else { warnNonPresent(target, key); }
  4812. }
  4813. return has || !isAllowed
  4814. }
  4815. };
  4816. var getHandler = {
  4817. get: function get (target, key) {
  4818. if (typeof key === 'string' && !(key in target)) {
  4819. if (key in target.$data) { warnReservedPrefix(target, key); }
  4820. else { warnNonPresent(target, key); }
  4821. }
  4822. return target[key]
  4823. }
  4824. };
  4825. initProxy = function initProxy (vm) {
  4826. if (hasProxy) {
  4827. // determine which proxy handler to use
  4828. var options = vm.$options;
  4829. var handlers = options.render && options.render._withStripped
  4830. ? getHandler
  4831. : hasHandler;
  4832. vm._renderProxy = new Proxy(vm, handlers);
  4833. } else {
  4834. vm._renderProxy = vm;
  4835. }
  4836. };
  4837. }
  4838. /* */
  4839. var seenObjects = new _Set();
  4840. /**
  4841. * Recursively traverse an object to evoke all converted
  4842. * getters, so that every nested property inside the object
  4843. * is collected as a "deep" dependency.
  4844. */
  4845. function traverse (val) {
  4846. _traverse(val, seenObjects);
  4847. seenObjects.clear();
  4848. }
  4849. function _traverse (val, seen) {
  4850. var i, keys;
  4851. var isA = Array.isArray(val);
  4852. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  4853. return
  4854. }
  4855. if (val.__ob__) {
  4856. var depId = val.__ob__.dep.id;
  4857. if (seen.has(depId)) {
  4858. return
  4859. }
  4860. seen.add(depId);
  4861. }
  4862. if (isA) {
  4863. i = val.length;
  4864. while (i--) { _traverse(val[i], seen); }
  4865. } else {
  4866. keys = Object.keys(val);
  4867. i = keys.length;
  4868. while (i--) { _traverse(val[keys[i]], seen); }
  4869. }
  4870. }
  4871. var mark;
  4872. var measure;
  4873. if (true) {
  4874. var perf = inBrowser && window.performance;
  4875. /* istanbul ignore if */
  4876. if (
  4877. perf &&
  4878. perf.mark &&
  4879. perf.measure &&
  4880. perf.clearMarks &&
  4881. perf.clearMeasures
  4882. ) {
  4883. mark = function (tag) { return perf.mark(tag); };
  4884. measure = function (name, startTag, endTag) {
  4885. perf.measure(name, startTag, endTag);
  4886. perf.clearMarks(startTag);
  4887. perf.clearMarks(endTag);
  4888. // perf.clearMeasures(name)
  4889. };
  4890. }
  4891. }
  4892. /* */
  4893. var normalizeEvent = cached(function (name) {
  4894. var passive = name.charAt(0) === '&';
  4895. name = passive ? name.slice(1) : name;
  4896. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  4897. name = once$$1 ? name.slice(1) : name;
  4898. var capture = name.charAt(0) === '!';
  4899. name = capture ? name.slice(1) : name;
  4900. return {
  4901. name: name,
  4902. once: once$$1,
  4903. capture: capture,
  4904. passive: passive
  4905. }
  4906. });
  4907. function createFnInvoker (fns, vm) {
  4908. function invoker () {
  4909. var arguments$1 = arguments;
  4910. var fns = invoker.fns;
  4911. if (Array.isArray(fns)) {
  4912. var cloned = fns.slice();
  4913. for (var i = 0; i < cloned.length; i++) {
  4914. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  4915. }
  4916. } else {
  4917. // return handler return value for single handlers
  4918. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  4919. }
  4920. }
  4921. invoker.fns = fns;
  4922. return invoker
  4923. }
  4924. function updateListeners (
  4925. on,
  4926. oldOn,
  4927. add,
  4928. remove$$1,
  4929. createOnceHandler,
  4930. vm
  4931. ) {
  4932. var name, def$$1, cur, old, event;
  4933. for (name in on) {
  4934. def$$1 = cur = on[name];
  4935. old = oldOn[name];
  4936. event = normalizeEvent(name);
  4937. if (isUndef(cur)) {
  4938. true && warn(
  4939. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  4940. vm
  4941. );
  4942. } else if (isUndef(old)) {
  4943. if (isUndef(cur.fns)) {
  4944. cur = on[name] = createFnInvoker(cur, vm);
  4945. }
  4946. if (isTrue(event.once)) {
  4947. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  4948. }
  4949. add(event.name, cur, event.capture, event.passive, event.params);
  4950. } else if (cur !== old) {
  4951. old.fns = cur;
  4952. on[name] = old;
  4953. }
  4954. }
  4955. for (name in oldOn) {
  4956. if (isUndef(on[name])) {
  4957. event = normalizeEvent(name);
  4958. remove$$1(event.name, oldOn[name], event.capture);
  4959. }
  4960. }
  4961. }
  4962. /* */
  4963. /* */
  4964. // fixed by xxxxxx (mp properties)
  4965. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  4966. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  4967. if (isUndef(propOptions)) {
  4968. return res
  4969. }
  4970. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  4971. var attrs = data.attrs;
  4972. var props = data.props;
  4973. if (isDef(attrs) || isDef(props)) {
  4974. for (var key in propOptions) {
  4975. var altKey = hyphenate(key);
  4976. var result = checkProp(res, props, key, altKey, true) ||
  4977. checkProp(res, attrs, key, altKey, false);
  4978. // externalClass
  4979. if (
  4980. result &&
  4981. res[key] &&
  4982. externalClasses.indexOf(altKey) !== -1 &&
  4983. context[camelize(res[key])]
  4984. ) {
  4985. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  4986. res[key] = context[camelize(res[key])];
  4987. }
  4988. }
  4989. }
  4990. return res
  4991. }
  4992. function extractPropsFromVNodeData (
  4993. data,
  4994. Ctor,
  4995. tag,
  4996. context// fixed by xxxxxx
  4997. ) {
  4998. // we are only extracting raw values here.
  4999. // validation and default values are handled in the child
  5000. // component itself.
  5001. var propOptions = Ctor.options.props;
  5002. if (isUndef(propOptions)) {
  5003. // fixed by xxxxxx
  5004. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5005. }
  5006. var res = {};
  5007. var attrs = data.attrs;
  5008. var props = data.props;
  5009. if (isDef(attrs) || isDef(props)) {
  5010. for (var key in propOptions) {
  5011. var altKey = hyphenate(key);
  5012. if (true) {
  5013. var keyInLowerCase = key.toLowerCase();
  5014. if (
  5015. key !== keyInLowerCase &&
  5016. attrs && hasOwn(attrs, keyInLowerCase)
  5017. ) {
  5018. tip(
  5019. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5020. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5021. " \"" + key + "\". " +
  5022. "Note that HTML attributes are case-insensitive and camelCased " +
  5023. "props need to use their kebab-case equivalents when using in-DOM " +
  5024. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5025. );
  5026. }
  5027. }
  5028. checkProp(res, props, key, altKey, true) ||
  5029. checkProp(res, attrs, key, altKey, false);
  5030. }
  5031. }
  5032. // fixed by xxxxxx
  5033. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5034. }
  5035. function checkProp (
  5036. res,
  5037. hash,
  5038. key,
  5039. altKey,
  5040. preserve
  5041. ) {
  5042. if (isDef(hash)) {
  5043. if (hasOwn(hash, key)) {
  5044. res[key] = hash[key];
  5045. if (!preserve) {
  5046. delete hash[key];
  5047. }
  5048. return true
  5049. } else if (hasOwn(hash, altKey)) {
  5050. res[key] = hash[altKey];
  5051. if (!preserve) {
  5052. delete hash[altKey];
  5053. }
  5054. return true
  5055. }
  5056. }
  5057. return false
  5058. }
  5059. /* */
  5060. // The template compiler attempts to minimize the need for normalization by
  5061. // statically analyzing the template at compile time.
  5062. //
  5063. // For plain HTML markup, normalization can be completely skipped because the
  5064. // generated render function is guaranteed to return Array<VNode>. There are
  5065. // two cases where extra normalization is needed:
  5066. // 1. When the children contains components - because a functional component
  5067. // may return an Array instead of a single root. In this case, just a simple
  5068. // normalization is needed - if any child is an Array, we flatten the whole
  5069. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5070. // because functional components already normalize their own children.
  5071. function simpleNormalizeChildren (children) {
  5072. for (var i = 0; i < children.length; i++) {
  5073. if (Array.isArray(children[i])) {
  5074. return Array.prototype.concat.apply([], children)
  5075. }
  5076. }
  5077. return children
  5078. }
  5079. // 2. When the children contains constructs that always generated nested Arrays,
  5080. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5081. // with hand-written render functions / JSX. In such cases a full normalization
  5082. // is needed to cater to all possible types of children values.
  5083. function normalizeChildren (children) {
  5084. return isPrimitive(children)
  5085. ? [createTextVNode(children)]
  5086. : Array.isArray(children)
  5087. ? normalizeArrayChildren(children)
  5088. : undefined
  5089. }
  5090. function isTextNode (node) {
  5091. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5092. }
  5093. function normalizeArrayChildren (children, nestedIndex) {
  5094. var res = [];
  5095. var i, c, lastIndex, last;
  5096. for (i = 0; i < children.length; i++) {
  5097. c = children[i];
  5098. if (isUndef(c) || typeof c === 'boolean') { continue }
  5099. lastIndex = res.length - 1;
  5100. last = res[lastIndex];
  5101. // nested
  5102. if (Array.isArray(c)) {
  5103. if (c.length > 0) {
  5104. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5105. // merge adjacent text nodes
  5106. if (isTextNode(c[0]) && isTextNode(last)) {
  5107. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5108. c.shift();
  5109. }
  5110. res.push.apply(res, c);
  5111. }
  5112. } else if (isPrimitive(c)) {
  5113. if (isTextNode(last)) {
  5114. // merge adjacent text nodes
  5115. // this is necessary for SSR hydration because text nodes are
  5116. // essentially merged when rendered to HTML strings
  5117. res[lastIndex] = createTextVNode(last.text + c);
  5118. } else if (c !== '') {
  5119. // convert primitive to vnode
  5120. res.push(createTextVNode(c));
  5121. }
  5122. } else {
  5123. if (isTextNode(c) && isTextNode(last)) {
  5124. // merge adjacent text nodes
  5125. res[lastIndex] = createTextVNode(last.text + c.text);
  5126. } else {
  5127. // default key for nested array children (likely generated by v-for)
  5128. if (isTrue(children._isVList) &&
  5129. isDef(c.tag) &&
  5130. isUndef(c.key) &&
  5131. isDef(nestedIndex)) {
  5132. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5133. }
  5134. res.push(c);
  5135. }
  5136. }
  5137. }
  5138. return res
  5139. }
  5140. /* */
  5141. function initProvide (vm) {
  5142. var provide = vm.$options.provide;
  5143. if (provide) {
  5144. vm._provided = typeof provide === 'function'
  5145. ? provide.call(vm)
  5146. : provide;
  5147. }
  5148. }
  5149. function initInjections (vm) {
  5150. var result = resolveInject(vm.$options.inject, vm);
  5151. if (result) {
  5152. toggleObserving(false);
  5153. Object.keys(result).forEach(function (key) {
  5154. /* istanbul ignore else */
  5155. if (true) {
  5156. defineReactive$$1(vm, key, result[key], function () {
  5157. warn(
  5158. "Avoid mutating an injected value directly since the changes will be " +
  5159. "overwritten whenever the provided component re-renders. " +
  5160. "injection being mutated: \"" + key + "\"",
  5161. vm
  5162. );
  5163. });
  5164. } else {}
  5165. });
  5166. toggleObserving(true);
  5167. }
  5168. }
  5169. function resolveInject (inject, vm) {
  5170. if (inject) {
  5171. // inject is :any because flow is not smart enough to figure out cached
  5172. var result = Object.create(null);
  5173. var keys = hasSymbol
  5174. ? Reflect.ownKeys(inject)
  5175. : Object.keys(inject);
  5176. for (var i = 0; i < keys.length; i++) {
  5177. var key = keys[i];
  5178. // #6574 in case the inject object is observed...
  5179. if (key === '__ob__') { continue }
  5180. var provideKey = inject[key].from;
  5181. var source = vm;
  5182. while (source) {
  5183. if (source._provided && hasOwn(source._provided, provideKey)) {
  5184. result[key] = source._provided[provideKey];
  5185. break
  5186. }
  5187. source = source.$parent;
  5188. }
  5189. if (!source) {
  5190. if ('default' in inject[key]) {
  5191. var provideDefault = inject[key].default;
  5192. result[key] = typeof provideDefault === 'function'
  5193. ? provideDefault.call(vm)
  5194. : provideDefault;
  5195. } else if (true) {
  5196. warn(("Injection \"" + key + "\" not found"), vm);
  5197. }
  5198. }
  5199. }
  5200. return result
  5201. }
  5202. }
  5203. /* */
  5204. /**
  5205. * Runtime helper for resolving raw children VNodes into a slot object.
  5206. */
  5207. function resolveSlots (
  5208. children,
  5209. context
  5210. ) {
  5211. if (!children || !children.length) {
  5212. return {}
  5213. }
  5214. var slots = {};
  5215. for (var i = 0, l = children.length; i < l; i++) {
  5216. var child = children[i];
  5217. var data = child.data;
  5218. // remove slot attribute if the node is resolved as a Vue slot node
  5219. if (data && data.attrs && data.attrs.slot) {
  5220. delete data.attrs.slot;
  5221. }
  5222. // named slots should only be respected if the vnode was rendered in the
  5223. // same context.
  5224. if ((child.context === context || child.fnContext === context) &&
  5225. data && data.slot != null
  5226. ) {
  5227. var name = data.slot;
  5228. var slot = (slots[name] || (slots[name] = []));
  5229. if (child.tag === 'template') {
  5230. slot.push.apply(slot, child.children || []);
  5231. } else {
  5232. slot.push(child);
  5233. }
  5234. } else {
  5235. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5236. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5237. (slots['page'] || (slots['page'] = [])).push(child);
  5238. }else{
  5239. (slots.default || (slots.default = [])).push(child);
  5240. }
  5241. }
  5242. }
  5243. // ignore slots that contains only whitespace
  5244. for (var name$1 in slots) {
  5245. if (slots[name$1].every(isWhitespace)) {
  5246. delete slots[name$1];
  5247. }
  5248. }
  5249. return slots
  5250. }
  5251. function isWhitespace (node) {
  5252. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5253. }
  5254. /* */
  5255. function normalizeScopedSlots (
  5256. slots,
  5257. normalSlots,
  5258. prevSlots
  5259. ) {
  5260. var res;
  5261. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5262. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5263. var key = slots && slots.$key;
  5264. if (!slots) {
  5265. res = {};
  5266. } else if (slots._normalized) {
  5267. // fast path 1: child component re-render only, parent did not change
  5268. return slots._normalized
  5269. } else if (
  5270. isStable &&
  5271. prevSlots &&
  5272. prevSlots !== emptyObject &&
  5273. key === prevSlots.$key &&
  5274. !hasNormalSlots &&
  5275. !prevSlots.$hasNormal
  5276. ) {
  5277. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5278. // only need to normalize once
  5279. return prevSlots
  5280. } else {
  5281. res = {};
  5282. for (var key$1 in slots) {
  5283. if (slots[key$1] && key$1[0] !== '$') {
  5284. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5285. }
  5286. }
  5287. }
  5288. // expose normal slots on scopedSlots
  5289. for (var key$2 in normalSlots) {
  5290. if (!(key$2 in res)) {
  5291. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5292. }
  5293. }
  5294. // avoriaz seems to mock a non-extensible $scopedSlots object
  5295. // and when that is passed down this would cause an error
  5296. if (slots && Object.isExtensible(slots)) {
  5297. (slots)._normalized = res;
  5298. }
  5299. def(res, '$stable', isStable);
  5300. def(res, '$key', key);
  5301. def(res, '$hasNormal', hasNormalSlots);
  5302. return res
  5303. }
  5304. function normalizeScopedSlot(normalSlots, key, fn) {
  5305. var normalized = function () {
  5306. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5307. res = res && typeof res === 'object' && !Array.isArray(res)
  5308. ? [res] // single vnode
  5309. : normalizeChildren(res);
  5310. return res && (
  5311. res.length === 0 ||
  5312. (res.length === 1 && res[0].isComment) // #9658
  5313. ) ? undefined
  5314. : res
  5315. };
  5316. // this is a slot using the new v-slot syntax without scope. although it is
  5317. // compiled as a scoped slot, render fn users would expect it to be present
  5318. // on this.$slots because the usage is semantically a normal slot.
  5319. if (fn.proxy) {
  5320. Object.defineProperty(normalSlots, key, {
  5321. get: normalized,
  5322. enumerable: true,
  5323. configurable: true
  5324. });
  5325. }
  5326. return normalized
  5327. }
  5328. function proxyNormalSlot(slots, key) {
  5329. return function () { return slots[key]; }
  5330. }
  5331. /* */
  5332. /**
  5333. * Runtime helper for rendering v-for lists.
  5334. */
  5335. function renderList (
  5336. val,
  5337. render
  5338. ) {
  5339. var ret, i, l, keys, key;
  5340. if (Array.isArray(val) || typeof val === 'string') {
  5341. ret = new Array(val.length);
  5342. for (i = 0, l = val.length; i < l; i++) {
  5343. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5344. }
  5345. } else if (typeof val === 'number') {
  5346. ret = new Array(val);
  5347. for (i = 0; i < val; i++) {
  5348. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5349. }
  5350. } else if (isObject(val)) {
  5351. if (hasSymbol && val[Symbol.iterator]) {
  5352. ret = [];
  5353. var iterator = val[Symbol.iterator]();
  5354. var result = iterator.next();
  5355. while (!result.done) {
  5356. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5357. result = iterator.next();
  5358. }
  5359. } else {
  5360. keys = Object.keys(val);
  5361. ret = new Array(keys.length);
  5362. for (i = 0, l = keys.length; i < l; i++) {
  5363. key = keys[i];
  5364. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5365. }
  5366. }
  5367. }
  5368. if (!isDef(ret)) {
  5369. ret = [];
  5370. }
  5371. (ret)._isVList = true;
  5372. return ret
  5373. }
  5374. /* */
  5375. /**
  5376. * Runtime helper for rendering <slot>
  5377. */
  5378. function renderSlot (
  5379. name,
  5380. fallback,
  5381. props,
  5382. bindObject
  5383. ) {
  5384. var scopedSlotFn = this.$scopedSlots[name];
  5385. var nodes;
  5386. if (scopedSlotFn) { // scoped slot
  5387. props = props || {};
  5388. if (bindObject) {
  5389. if ( true && !isObject(bindObject)) {
  5390. warn(
  5391. 'slot v-bind without argument expects an Object',
  5392. this
  5393. );
  5394. }
  5395. props = extend(extend({}, bindObject), props);
  5396. }
  5397. // fixed by xxxxxx app-plus scopedSlot
  5398. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5399. } else {
  5400. nodes = this.$slots[name] || fallback;
  5401. }
  5402. var target = props && props.slot;
  5403. if (target) {
  5404. return this.$createElement('template', { slot: target }, nodes)
  5405. } else {
  5406. return nodes
  5407. }
  5408. }
  5409. /* */
  5410. /**
  5411. * Runtime helper for resolving filters
  5412. */
  5413. function resolveFilter (id) {
  5414. return resolveAsset(this.$options, 'filters', id, true) || identity
  5415. }
  5416. /* */
  5417. function isKeyNotMatch (expect, actual) {
  5418. if (Array.isArray(expect)) {
  5419. return expect.indexOf(actual) === -1
  5420. } else {
  5421. return expect !== actual
  5422. }
  5423. }
  5424. /**
  5425. * Runtime helper for checking keyCodes from config.
  5426. * exposed as Vue.prototype._k
  5427. * passing in eventKeyName as last argument separately for backwards compat
  5428. */
  5429. function checkKeyCodes (
  5430. eventKeyCode,
  5431. key,
  5432. builtInKeyCode,
  5433. eventKeyName,
  5434. builtInKeyName
  5435. ) {
  5436. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5437. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5438. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5439. } else if (mappedKeyCode) {
  5440. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5441. } else if (eventKeyName) {
  5442. return hyphenate(eventKeyName) !== key
  5443. }
  5444. }
  5445. /* */
  5446. /**
  5447. * Runtime helper for merging v-bind="object" into a VNode's data.
  5448. */
  5449. function bindObjectProps (
  5450. data,
  5451. tag,
  5452. value,
  5453. asProp,
  5454. isSync
  5455. ) {
  5456. if (value) {
  5457. if (!isObject(value)) {
  5458. true && warn(
  5459. 'v-bind without argument expects an Object or Array value',
  5460. this
  5461. );
  5462. } else {
  5463. if (Array.isArray(value)) {
  5464. value = toObject(value);
  5465. }
  5466. var hash;
  5467. var loop = function ( key ) {
  5468. if (
  5469. key === 'class' ||
  5470. key === 'style' ||
  5471. isReservedAttribute(key)
  5472. ) {
  5473. hash = data;
  5474. } else {
  5475. var type = data.attrs && data.attrs.type;
  5476. hash = asProp || config.mustUseProp(tag, type, key)
  5477. ? data.domProps || (data.domProps = {})
  5478. : data.attrs || (data.attrs = {});
  5479. }
  5480. var camelizedKey = camelize(key);
  5481. var hyphenatedKey = hyphenate(key);
  5482. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5483. hash[key] = value[key];
  5484. if (isSync) {
  5485. var on = data.on || (data.on = {});
  5486. on[("update:" + key)] = function ($event) {
  5487. value[key] = $event;
  5488. };
  5489. }
  5490. }
  5491. };
  5492. for (var key in value) loop( key );
  5493. }
  5494. }
  5495. return data
  5496. }
  5497. /* */
  5498. /**
  5499. * Runtime helper for rendering static trees.
  5500. */
  5501. function renderStatic (
  5502. index,
  5503. isInFor
  5504. ) {
  5505. var cached = this._staticTrees || (this._staticTrees = []);
  5506. var tree = cached[index];
  5507. // if has already-rendered static tree and not inside v-for,
  5508. // we can reuse the same tree.
  5509. if (tree && !isInFor) {
  5510. return tree
  5511. }
  5512. // otherwise, render a fresh tree.
  5513. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5514. this._renderProxy,
  5515. null,
  5516. this // for render fns generated for functional component templates
  5517. );
  5518. markStatic(tree, ("__static__" + index), false);
  5519. return tree
  5520. }
  5521. /**
  5522. * Runtime helper for v-once.
  5523. * Effectively it means marking the node as static with a unique key.
  5524. */
  5525. function markOnce (
  5526. tree,
  5527. index,
  5528. key
  5529. ) {
  5530. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5531. return tree
  5532. }
  5533. function markStatic (
  5534. tree,
  5535. key,
  5536. isOnce
  5537. ) {
  5538. if (Array.isArray(tree)) {
  5539. for (var i = 0; i < tree.length; i++) {
  5540. if (tree[i] && typeof tree[i] !== 'string') {
  5541. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5542. }
  5543. }
  5544. } else {
  5545. markStaticNode(tree, key, isOnce);
  5546. }
  5547. }
  5548. function markStaticNode (node, key, isOnce) {
  5549. node.isStatic = true;
  5550. node.key = key;
  5551. node.isOnce = isOnce;
  5552. }
  5553. /* */
  5554. function bindObjectListeners (data, value) {
  5555. if (value) {
  5556. if (!isPlainObject(value)) {
  5557. true && warn(
  5558. 'v-on without argument expects an Object value',
  5559. this
  5560. );
  5561. } else {
  5562. var on = data.on = data.on ? extend({}, data.on) : {};
  5563. for (var key in value) {
  5564. var existing = on[key];
  5565. var ours = value[key];
  5566. on[key] = existing ? [].concat(existing, ours) : ours;
  5567. }
  5568. }
  5569. }
  5570. return data
  5571. }
  5572. /* */
  5573. function resolveScopedSlots (
  5574. fns, // see flow/vnode
  5575. res,
  5576. // the following are added in 2.6
  5577. hasDynamicKeys,
  5578. contentHashKey
  5579. ) {
  5580. res = res || { $stable: !hasDynamicKeys };
  5581. for (var i = 0; i < fns.length; i++) {
  5582. var slot = fns[i];
  5583. if (Array.isArray(slot)) {
  5584. resolveScopedSlots(slot, res, hasDynamicKeys);
  5585. } else if (slot) {
  5586. // marker for reverse proxying v-slot without scope on this.$slots
  5587. if (slot.proxy) {
  5588. slot.fn.proxy = true;
  5589. }
  5590. res[slot.key] = slot.fn;
  5591. }
  5592. }
  5593. if (contentHashKey) {
  5594. (res).$key = contentHashKey;
  5595. }
  5596. return res
  5597. }
  5598. /* */
  5599. function bindDynamicKeys (baseObj, values) {
  5600. for (var i = 0; i < values.length; i += 2) {
  5601. var key = values[i];
  5602. if (typeof key === 'string' && key) {
  5603. baseObj[values[i]] = values[i + 1];
  5604. } else if ( true && key !== '' && key !== null) {
  5605. // null is a special value for explicitly removing a binding
  5606. warn(
  5607. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5608. this
  5609. );
  5610. }
  5611. }
  5612. return baseObj
  5613. }
  5614. // helper to dynamically append modifier runtime markers to event names.
  5615. // ensure only append when value is already string, otherwise it will be cast
  5616. // to string and cause the type check to miss.
  5617. function prependModifier (value, symbol) {
  5618. return typeof value === 'string' ? symbol + value : value
  5619. }
  5620. /* */
  5621. function installRenderHelpers (target) {
  5622. target._o = markOnce;
  5623. target._n = toNumber;
  5624. target._s = toString;
  5625. target._l = renderList;
  5626. target._t = renderSlot;
  5627. target._q = looseEqual;
  5628. target._i = looseIndexOf;
  5629. target._m = renderStatic;
  5630. target._f = resolveFilter;
  5631. target._k = checkKeyCodes;
  5632. target._b = bindObjectProps;
  5633. target._v = createTextVNode;
  5634. target._e = createEmptyVNode;
  5635. target._u = resolveScopedSlots;
  5636. target._g = bindObjectListeners;
  5637. target._d = bindDynamicKeys;
  5638. target._p = prependModifier;
  5639. }
  5640. /* */
  5641. function FunctionalRenderContext (
  5642. data,
  5643. props,
  5644. children,
  5645. parent,
  5646. Ctor
  5647. ) {
  5648. var this$1 = this;
  5649. var options = Ctor.options;
  5650. // ensure the createElement function in functional components
  5651. // gets a unique context - this is necessary for correct named slot check
  5652. var contextVm;
  5653. if (hasOwn(parent, '_uid')) {
  5654. contextVm = Object.create(parent);
  5655. // $flow-disable-line
  5656. contextVm._original = parent;
  5657. } else {
  5658. // the context vm passed in is a functional context as well.
  5659. // in this case we want to make sure we are able to get a hold to the
  5660. // real context instance.
  5661. contextVm = parent;
  5662. // $flow-disable-line
  5663. parent = parent._original;
  5664. }
  5665. var isCompiled = isTrue(options._compiled);
  5666. var needNormalization = !isCompiled;
  5667. this.data = data;
  5668. this.props = props;
  5669. this.children = children;
  5670. this.parent = parent;
  5671. this.listeners = data.on || emptyObject;
  5672. this.injections = resolveInject(options.inject, parent);
  5673. this.slots = function () {
  5674. if (!this$1.$slots) {
  5675. normalizeScopedSlots(
  5676. data.scopedSlots,
  5677. this$1.$slots = resolveSlots(children, parent)
  5678. );
  5679. }
  5680. return this$1.$slots
  5681. };
  5682. Object.defineProperty(this, 'scopedSlots', ({
  5683. enumerable: true,
  5684. get: function get () {
  5685. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5686. }
  5687. }));
  5688. // support for compiled functional template
  5689. if (isCompiled) {
  5690. // exposing $options for renderStatic()
  5691. this.$options = options;
  5692. // pre-resolve slots for renderSlot()
  5693. this.$slots = this.slots();
  5694. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5695. }
  5696. if (options._scopeId) {
  5697. this._c = function (a, b, c, d) {
  5698. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5699. if (vnode && !Array.isArray(vnode)) {
  5700. vnode.fnScopeId = options._scopeId;
  5701. vnode.fnContext = parent;
  5702. }
  5703. return vnode
  5704. };
  5705. } else {
  5706. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5707. }
  5708. }
  5709. installRenderHelpers(FunctionalRenderContext.prototype);
  5710. function createFunctionalComponent (
  5711. Ctor,
  5712. propsData,
  5713. data,
  5714. contextVm,
  5715. children
  5716. ) {
  5717. var options = Ctor.options;
  5718. var props = {};
  5719. var propOptions = options.props;
  5720. if (isDef(propOptions)) {
  5721. for (var key in propOptions) {
  5722. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5723. }
  5724. } else {
  5725. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5726. if (isDef(data.props)) { mergeProps(props, data.props); }
  5727. }
  5728. var renderContext = new FunctionalRenderContext(
  5729. data,
  5730. props,
  5731. children,
  5732. contextVm,
  5733. Ctor
  5734. );
  5735. var vnode = options.render.call(null, renderContext._c, renderContext);
  5736. if (vnode instanceof VNode) {
  5737. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5738. } else if (Array.isArray(vnode)) {
  5739. var vnodes = normalizeChildren(vnode) || [];
  5740. var res = new Array(vnodes.length);
  5741. for (var i = 0; i < vnodes.length; i++) {
  5742. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5743. }
  5744. return res
  5745. }
  5746. }
  5747. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5748. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5749. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5750. // that should not be matched to match.
  5751. var clone = cloneVNode(vnode);
  5752. clone.fnContext = contextVm;
  5753. clone.fnOptions = options;
  5754. if (true) {
  5755. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5756. }
  5757. if (data.slot) {
  5758. (clone.data || (clone.data = {})).slot = data.slot;
  5759. }
  5760. return clone
  5761. }
  5762. function mergeProps (to, from) {
  5763. for (var key in from) {
  5764. to[camelize(key)] = from[key];
  5765. }
  5766. }
  5767. /* */
  5768. /* */
  5769. /* */
  5770. /* */
  5771. // inline hooks to be invoked on component VNodes during patch
  5772. var componentVNodeHooks = {
  5773. init: function init (vnode, hydrating) {
  5774. if (
  5775. vnode.componentInstance &&
  5776. !vnode.componentInstance._isDestroyed &&
  5777. vnode.data.keepAlive
  5778. ) {
  5779. // kept-alive components, treat as a patch
  5780. var mountedNode = vnode; // work around flow
  5781. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  5782. } else {
  5783. var child = vnode.componentInstance = createComponentInstanceForVnode(
  5784. vnode,
  5785. activeInstance
  5786. );
  5787. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  5788. }
  5789. },
  5790. prepatch: function prepatch (oldVnode, vnode) {
  5791. var options = vnode.componentOptions;
  5792. var child = vnode.componentInstance = oldVnode.componentInstance;
  5793. updateChildComponent(
  5794. child,
  5795. options.propsData, // updated props
  5796. options.listeners, // updated listeners
  5797. vnode, // new parent vnode
  5798. options.children // new children
  5799. );
  5800. },
  5801. insert: function insert (vnode) {
  5802. var context = vnode.context;
  5803. var componentInstance = vnode.componentInstance;
  5804. if (!componentInstance._isMounted) {
  5805. callHook(componentInstance, 'onServiceCreated');
  5806. callHook(componentInstance, 'onServiceAttached');
  5807. componentInstance._isMounted = true;
  5808. callHook(componentInstance, 'mounted');
  5809. }
  5810. if (vnode.data.keepAlive) {
  5811. if (context._isMounted) {
  5812. // vue-router#1212
  5813. // During updates, a kept-alive component's child components may
  5814. // change, so directly walking the tree here may call activated hooks
  5815. // on incorrect children. Instead we push them into a queue which will
  5816. // be processed after the whole patch process ended.
  5817. queueActivatedComponent(componentInstance);
  5818. } else {
  5819. activateChildComponent(componentInstance, true /* direct */);
  5820. }
  5821. }
  5822. },
  5823. destroy: function destroy (vnode) {
  5824. var componentInstance = vnode.componentInstance;
  5825. if (!componentInstance._isDestroyed) {
  5826. if (!vnode.data.keepAlive) {
  5827. componentInstance.$destroy();
  5828. } else {
  5829. deactivateChildComponent(componentInstance, true /* direct */);
  5830. }
  5831. }
  5832. }
  5833. };
  5834. var hooksToMerge = Object.keys(componentVNodeHooks);
  5835. function createComponent (
  5836. Ctor,
  5837. data,
  5838. context,
  5839. children,
  5840. tag
  5841. ) {
  5842. if (isUndef(Ctor)) {
  5843. return
  5844. }
  5845. var baseCtor = context.$options._base;
  5846. // plain options object: turn it into a constructor
  5847. if (isObject(Ctor)) {
  5848. Ctor = baseCtor.extend(Ctor);
  5849. }
  5850. // if at this stage it's not a constructor or an async component factory,
  5851. // reject.
  5852. if (typeof Ctor !== 'function') {
  5853. if (true) {
  5854. warn(("Invalid Component definition: " + (String(Ctor))), context);
  5855. }
  5856. return
  5857. }
  5858. // async component
  5859. var asyncFactory;
  5860. if (isUndef(Ctor.cid)) {
  5861. asyncFactory = Ctor;
  5862. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  5863. if (Ctor === undefined) {
  5864. // return a placeholder node for async component, which is rendered
  5865. // as a comment node but preserves all the raw information for the node.
  5866. // the information will be used for async server-rendering and hydration.
  5867. return createAsyncPlaceholder(
  5868. asyncFactory,
  5869. data,
  5870. context,
  5871. children,
  5872. tag
  5873. )
  5874. }
  5875. }
  5876. data = data || {};
  5877. // resolve constructor options in case global mixins are applied after
  5878. // component constructor creation
  5879. resolveConstructorOptions(Ctor);
  5880. // transform component v-model data into props & events
  5881. if (isDef(data.model)) {
  5882. transformModel(Ctor.options, data);
  5883. }
  5884. // extract props
  5885. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  5886. // functional component
  5887. if (isTrue(Ctor.options.functional)) {
  5888. return createFunctionalComponent(Ctor, propsData, data, context, children)
  5889. }
  5890. // extract listeners, since these needs to be treated as
  5891. // child component listeners instead of DOM listeners
  5892. var listeners = data.on;
  5893. // replace with listeners with .native modifier
  5894. // so it gets processed during parent component patch.
  5895. data.on = data.nativeOn;
  5896. if (isTrue(Ctor.options.abstract)) {
  5897. // abstract components do not keep anything
  5898. // other than props & listeners & slot
  5899. // work around flow
  5900. var slot = data.slot;
  5901. data = {};
  5902. if (slot) {
  5903. data.slot = slot;
  5904. }
  5905. }
  5906. // install component management hooks onto the placeholder node
  5907. installComponentHooks(data);
  5908. // return a placeholder vnode
  5909. var name = Ctor.options.name || tag;
  5910. var vnode = new VNode(
  5911. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  5912. data, undefined, undefined, undefined, context,
  5913. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  5914. asyncFactory
  5915. );
  5916. return vnode
  5917. }
  5918. function createComponentInstanceForVnode (
  5919. vnode, // we know it's MountedComponentVNode but flow doesn't
  5920. parent // activeInstance in lifecycle state
  5921. ) {
  5922. var options = {
  5923. _isComponent: true,
  5924. _parentVnode: vnode,
  5925. parent: parent
  5926. };
  5927. // check inline-template render functions
  5928. var inlineTemplate = vnode.data.inlineTemplate;
  5929. if (isDef(inlineTemplate)) {
  5930. options.render = inlineTemplate.render;
  5931. options.staticRenderFns = inlineTemplate.staticRenderFns;
  5932. }
  5933. return new vnode.componentOptions.Ctor(options)
  5934. }
  5935. function installComponentHooks (data) {
  5936. var hooks = data.hook || (data.hook = {});
  5937. for (var i = 0; i < hooksToMerge.length; i++) {
  5938. var key = hooksToMerge[i];
  5939. var existing = hooks[key];
  5940. var toMerge = componentVNodeHooks[key];
  5941. if (existing !== toMerge && !(existing && existing._merged)) {
  5942. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  5943. }
  5944. }
  5945. }
  5946. function mergeHook$1 (f1, f2) {
  5947. var merged = function (a, b) {
  5948. // flow complains about extra args which is why we use any
  5949. f1(a, b);
  5950. f2(a, b);
  5951. };
  5952. merged._merged = true;
  5953. return merged
  5954. }
  5955. // transform component v-model info (value and callback) into
  5956. // prop and event handler respectively.
  5957. function transformModel (options, data) {
  5958. var prop = (options.model && options.model.prop) || 'value';
  5959. var event = (options.model && options.model.event) || 'input'
  5960. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  5961. var on = data.on || (data.on = {});
  5962. var existing = on[event];
  5963. var callback = data.model.callback;
  5964. if (isDef(existing)) {
  5965. if (
  5966. Array.isArray(existing)
  5967. ? existing.indexOf(callback) === -1
  5968. : existing !== callback
  5969. ) {
  5970. on[event] = [callback].concat(existing);
  5971. }
  5972. } else {
  5973. on[event] = callback;
  5974. }
  5975. }
  5976. /* */
  5977. var SIMPLE_NORMALIZE = 1;
  5978. var ALWAYS_NORMALIZE = 2;
  5979. // wrapper function for providing a more flexible interface
  5980. // without getting yelled at by flow
  5981. function createElement (
  5982. context,
  5983. tag,
  5984. data,
  5985. children,
  5986. normalizationType,
  5987. alwaysNormalize
  5988. ) {
  5989. if (Array.isArray(data) || isPrimitive(data)) {
  5990. normalizationType = children;
  5991. children = data;
  5992. data = undefined;
  5993. }
  5994. if (isTrue(alwaysNormalize)) {
  5995. normalizationType = ALWAYS_NORMALIZE;
  5996. }
  5997. return _createElement(context, tag, data, children, normalizationType)
  5998. }
  5999. function _createElement (
  6000. context,
  6001. tag,
  6002. data,
  6003. children,
  6004. normalizationType
  6005. ) {
  6006. if (isDef(data) && isDef((data).__ob__)) {
  6007. true && warn(
  6008. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6009. 'Always create fresh vnode data objects in each render!',
  6010. context
  6011. );
  6012. return createEmptyVNode()
  6013. }
  6014. // object syntax in v-bind
  6015. if (isDef(data) && isDef(data.is)) {
  6016. tag = data.is;
  6017. }
  6018. if (!tag) {
  6019. // in case of component :is set to falsy value
  6020. return createEmptyVNode()
  6021. }
  6022. // warn against non-primitive key
  6023. if ( true &&
  6024. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6025. ) {
  6026. {
  6027. warn(
  6028. 'Avoid using non-primitive value as key, ' +
  6029. 'use string/number value instead.',
  6030. context
  6031. );
  6032. }
  6033. }
  6034. // support single function children as default scoped slot
  6035. if (Array.isArray(children) &&
  6036. typeof children[0] === 'function'
  6037. ) {
  6038. data = data || {};
  6039. data.scopedSlots = { default: children[0] };
  6040. children.length = 0;
  6041. }
  6042. if (normalizationType === ALWAYS_NORMALIZE) {
  6043. children = normalizeChildren(children);
  6044. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6045. children = simpleNormalizeChildren(children);
  6046. }
  6047. var vnode, ns;
  6048. if (typeof tag === 'string') {
  6049. var Ctor;
  6050. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6051. if (config.isReservedTag(tag)) {
  6052. // platform built-in elements
  6053. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6054. warn(
  6055. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6056. context
  6057. );
  6058. }
  6059. vnode = new VNode(
  6060. config.parsePlatformTagName(tag), data, children,
  6061. undefined, undefined, context
  6062. );
  6063. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6064. // component
  6065. vnode = createComponent(Ctor, data, context, children, tag);
  6066. } else {
  6067. // unknown or unlisted namespaced elements
  6068. // check at runtime because it may get assigned a namespace when its
  6069. // parent normalizes children
  6070. vnode = new VNode(
  6071. tag, data, children,
  6072. undefined, undefined, context
  6073. );
  6074. }
  6075. } else {
  6076. // direct component options / constructor
  6077. vnode = createComponent(tag, data, context, children);
  6078. }
  6079. if (Array.isArray(vnode)) {
  6080. return vnode
  6081. } else if (isDef(vnode)) {
  6082. if (isDef(ns)) { applyNS(vnode, ns); }
  6083. if (isDef(data)) { registerDeepBindings(data); }
  6084. return vnode
  6085. } else {
  6086. return createEmptyVNode()
  6087. }
  6088. }
  6089. function applyNS (vnode, ns, force) {
  6090. vnode.ns = ns;
  6091. if (vnode.tag === 'foreignObject') {
  6092. // use default namespace inside foreignObject
  6093. ns = undefined;
  6094. force = true;
  6095. }
  6096. if (isDef(vnode.children)) {
  6097. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6098. var child = vnode.children[i];
  6099. if (isDef(child.tag) && (
  6100. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6101. applyNS(child, ns, force);
  6102. }
  6103. }
  6104. }
  6105. }
  6106. // ref #5318
  6107. // necessary to ensure parent re-render when deep bindings like :style and
  6108. // :class are used on slot nodes
  6109. function registerDeepBindings (data) {
  6110. if (isObject(data.style)) {
  6111. traverse(data.style);
  6112. }
  6113. if (isObject(data.class)) {
  6114. traverse(data.class);
  6115. }
  6116. }
  6117. /* */
  6118. function initRender (vm) {
  6119. vm._vnode = null; // the root of the child tree
  6120. vm._staticTrees = null; // v-once cached trees
  6121. var options = vm.$options;
  6122. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6123. var renderContext = parentVnode && parentVnode.context;
  6124. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6125. vm.$scopedSlots = emptyObject;
  6126. // bind the createElement fn to this instance
  6127. // so that we get proper render context inside it.
  6128. // args order: tag, data, children, normalizationType, alwaysNormalize
  6129. // internal version is used by render functions compiled from templates
  6130. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6131. // normalization is always applied for the public version, used in
  6132. // user-written render functions.
  6133. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6134. // $attrs & $listeners are exposed for easier HOC creation.
  6135. // they need to be reactive so that HOCs using them are always updated
  6136. var parentData = parentVnode && parentVnode.data;
  6137. /* istanbul ignore else */
  6138. if (true) {
  6139. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6140. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6141. }, true);
  6142. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6143. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6144. }, true);
  6145. } else {}
  6146. }
  6147. var currentRenderingInstance = null;
  6148. function renderMixin (Vue) {
  6149. // install runtime convenience helpers
  6150. installRenderHelpers(Vue.prototype);
  6151. Vue.prototype.$nextTick = function (fn) {
  6152. return nextTick(fn, this)
  6153. };
  6154. Vue.prototype._render = function () {
  6155. var vm = this;
  6156. var ref = vm.$options;
  6157. var render = ref.render;
  6158. var _parentVnode = ref._parentVnode;
  6159. if (_parentVnode) {
  6160. vm.$scopedSlots = normalizeScopedSlots(
  6161. _parentVnode.data.scopedSlots,
  6162. vm.$slots,
  6163. vm.$scopedSlots
  6164. );
  6165. }
  6166. // set parent vnode. this allows render functions to have access
  6167. // to the data on the placeholder node.
  6168. vm.$vnode = _parentVnode;
  6169. // render self
  6170. var vnode;
  6171. try {
  6172. // There's no need to maintain a stack because all render fns are called
  6173. // separately from one another. Nested component's render fns are called
  6174. // when parent component is patched.
  6175. currentRenderingInstance = vm;
  6176. vnode = render.call(vm._renderProxy, vm.$createElement);
  6177. } catch (e) {
  6178. handleError(e, vm, "render");
  6179. // return error render result,
  6180. // or previous vnode to prevent render error causing blank component
  6181. /* istanbul ignore else */
  6182. if ( true && vm.$options.renderError) {
  6183. try {
  6184. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6185. } catch (e) {
  6186. handleError(e, vm, "renderError");
  6187. vnode = vm._vnode;
  6188. }
  6189. } else {
  6190. vnode = vm._vnode;
  6191. }
  6192. } finally {
  6193. currentRenderingInstance = null;
  6194. }
  6195. // if the returned array contains only a single node, allow it
  6196. if (Array.isArray(vnode) && vnode.length === 1) {
  6197. vnode = vnode[0];
  6198. }
  6199. // return empty vnode in case the render function errored out
  6200. if (!(vnode instanceof VNode)) {
  6201. if ( true && Array.isArray(vnode)) {
  6202. warn(
  6203. 'Multiple root nodes returned from render function. Render function ' +
  6204. 'should return a single root node.',
  6205. vm
  6206. );
  6207. }
  6208. vnode = createEmptyVNode();
  6209. }
  6210. // set parent
  6211. vnode.parent = _parentVnode;
  6212. return vnode
  6213. };
  6214. }
  6215. /* */
  6216. function ensureCtor (comp, base) {
  6217. if (
  6218. comp.__esModule ||
  6219. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6220. ) {
  6221. comp = comp.default;
  6222. }
  6223. return isObject(comp)
  6224. ? base.extend(comp)
  6225. : comp
  6226. }
  6227. function createAsyncPlaceholder (
  6228. factory,
  6229. data,
  6230. context,
  6231. children,
  6232. tag
  6233. ) {
  6234. var node = createEmptyVNode();
  6235. node.asyncFactory = factory;
  6236. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6237. return node
  6238. }
  6239. function resolveAsyncComponent (
  6240. factory,
  6241. baseCtor
  6242. ) {
  6243. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6244. return factory.errorComp
  6245. }
  6246. if (isDef(factory.resolved)) {
  6247. return factory.resolved
  6248. }
  6249. var owner = currentRenderingInstance;
  6250. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6251. // already pending
  6252. factory.owners.push(owner);
  6253. }
  6254. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6255. return factory.loadingComp
  6256. }
  6257. if (owner && !isDef(factory.owners)) {
  6258. var owners = factory.owners = [owner];
  6259. var sync = true;
  6260. var timerLoading = null;
  6261. var timerTimeout = null
  6262. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6263. var forceRender = function (renderCompleted) {
  6264. for (var i = 0, l = owners.length; i < l; i++) {
  6265. (owners[i]).$forceUpdate();
  6266. }
  6267. if (renderCompleted) {
  6268. owners.length = 0;
  6269. if (timerLoading !== null) {
  6270. clearTimeout(timerLoading);
  6271. timerLoading = null;
  6272. }
  6273. if (timerTimeout !== null) {
  6274. clearTimeout(timerTimeout);
  6275. timerTimeout = null;
  6276. }
  6277. }
  6278. };
  6279. var resolve = once(function (res) {
  6280. // cache resolved
  6281. factory.resolved = ensureCtor(res, baseCtor);
  6282. // invoke callbacks only if this is not a synchronous resolve
  6283. // (async resolves are shimmed as synchronous during SSR)
  6284. if (!sync) {
  6285. forceRender(true);
  6286. } else {
  6287. owners.length = 0;
  6288. }
  6289. });
  6290. var reject = once(function (reason) {
  6291. true && warn(
  6292. "Failed to resolve async component: " + (String(factory)) +
  6293. (reason ? ("\nReason: " + reason) : '')
  6294. );
  6295. if (isDef(factory.errorComp)) {
  6296. factory.error = true;
  6297. forceRender(true);
  6298. }
  6299. });
  6300. var res = factory(resolve, reject);
  6301. if (isObject(res)) {
  6302. if (isPromise(res)) {
  6303. // () => Promise
  6304. if (isUndef(factory.resolved)) {
  6305. res.then(resolve, reject);
  6306. }
  6307. } else if (isPromise(res.component)) {
  6308. res.component.then(resolve, reject);
  6309. if (isDef(res.error)) {
  6310. factory.errorComp = ensureCtor(res.error, baseCtor);
  6311. }
  6312. if (isDef(res.loading)) {
  6313. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6314. if (res.delay === 0) {
  6315. factory.loading = true;
  6316. } else {
  6317. timerLoading = setTimeout(function () {
  6318. timerLoading = null;
  6319. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6320. factory.loading = true;
  6321. forceRender(false);
  6322. }
  6323. }, res.delay || 200);
  6324. }
  6325. }
  6326. if (isDef(res.timeout)) {
  6327. timerTimeout = setTimeout(function () {
  6328. timerTimeout = null;
  6329. if (isUndef(factory.resolved)) {
  6330. reject(
  6331. true
  6332. ? ("timeout (" + (res.timeout) + "ms)")
  6333. : undefined
  6334. );
  6335. }
  6336. }, res.timeout);
  6337. }
  6338. }
  6339. }
  6340. sync = false;
  6341. // return in case resolved synchronously
  6342. return factory.loading
  6343. ? factory.loadingComp
  6344. : factory.resolved
  6345. }
  6346. }
  6347. /* */
  6348. function isAsyncPlaceholder (node) {
  6349. return node.isComment && node.asyncFactory
  6350. }
  6351. /* */
  6352. function getFirstComponentChild (children) {
  6353. if (Array.isArray(children)) {
  6354. for (var i = 0; i < children.length; i++) {
  6355. var c = children[i];
  6356. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6357. return c
  6358. }
  6359. }
  6360. }
  6361. }
  6362. /* */
  6363. /* */
  6364. function initEvents (vm) {
  6365. vm._events = Object.create(null);
  6366. vm._hasHookEvent = false;
  6367. // init parent attached events
  6368. var listeners = vm.$options._parentListeners;
  6369. if (listeners) {
  6370. updateComponentListeners(vm, listeners);
  6371. }
  6372. }
  6373. var target;
  6374. function add (event, fn) {
  6375. target.$on(event, fn);
  6376. }
  6377. function remove$1 (event, fn) {
  6378. target.$off(event, fn);
  6379. }
  6380. function createOnceHandler (event, fn) {
  6381. var _target = target;
  6382. return function onceHandler () {
  6383. var res = fn.apply(null, arguments);
  6384. if (res !== null) {
  6385. _target.$off(event, onceHandler);
  6386. }
  6387. }
  6388. }
  6389. function updateComponentListeners (
  6390. vm,
  6391. listeners,
  6392. oldListeners
  6393. ) {
  6394. target = vm;
  6395. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6396. target = undefined;
  6397. }
  6398. function eventsMixin (Vue) {
  6399. var hookRE = /^hook:/;
  6400. Vue.prototype.$on = function (event, fn) {
  6401. var vm = this;
  6402. if (Array.isArray(event)) {
  6403. for (var i = 0, l = event.length; i < l; i++) {
  6404. vm.$on(event[i], fn);
  6405. }
  6406. } else {
  6407. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6408. // optimize hook:event cost by using a boolean flag marked at registration
  6409. // instead of a hash lookup
  6410. if (hookRE.test(event)) {
  6411. vm._hasHookEvent = true;
  6412. }
  6413. }
  6414. return vm
  6415. };
  6416. Vue.prototype.$once = function (event, fn) {
  6417. var vm = this;
  6418. function on () {
  6419. vm.$off(event, on);
  6420. fn.apply(vm, arguments);
  6421. }
  6422. on.fn = fn;
  6423. vm.$on(event, on);
  6424. return vm
  6425. };
  6426. Vue.prototype.$off = function (event, fn) {
  6427. var vm = this;
  6428. // all
  6429. if (!arguments.length) {
  6430. vm._events = Object.create(null);
  6431. return vm
  6432. }
  6433. // array of events
  6434. if (Array.isArray(event)) {
  6435. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6436. vm.$off(event[i$1], fn);
  6437. }
  6438. return vm
  6439. }
  6440. // specific event
  6441. var cbs = vm._events[event];
  6442. if (!cbs) {
  6443. return vm
  6444. }
  6445. if (!fn) {
  6446. vm._events[event] = null;
  6447. return vm
  6448. }
  6449. // specific handler
  6450. var cb;
  6451. var i = cbs.length;
  6452. while (i--) {
  6453. cb = cbs[i];
  6454. if (cb === fn || cb.fn === fn) {
  6455. cbs.splice(i, 1);
  6456. break
  6457. }
  6458. }
  6459. return vm
  6460. };
  6461. Vue.prototype.$emit = function (event) {
  6462. var vm = this;
  6463. if (true) {
  6464. var lowerCaseEvent = event.toLowerCase();
  6465. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6466. tip(
  6467. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6468. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6469. "Note that HTML attributes are case-insensitive and you cannot use " +
  6470. "v-on to listen to camelCase events when using in-DOM templates. " +
  6471. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6472. );
  6473. }
  6474. }
  6475. var cbs = vm._events[event];
  6476. if (cbs) {
  6477. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6478. var args = toArray(arguments, 1);
  6479. var info = "event handler for \"" + event + "\"";
  6480. for (var i = 0, l = cbs.length; i < l; i++) {
  6481. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6482. }
  6483. }
  6484. return vm
  6485. };
  6486. }
  6487. /* */
  6488. var activeInstance = null;
  6489. var isUpdatingChildComponent = false;
  6490. function setActiveInstance(vm) {
  6491. var prevActiveInstance = activeInstance;
  6492. activeInstance = vm;
  6493. return function () {
  6494. activeInstance = prevActiveInstance;
  6495. }
  6496. }
  6497. function initLifecycle (vm) {
  6498. var options = vm.$options;
  6499. // locate first non-abstract parent
  6500. var parent = options.parent;
  6501. if (parent && !options.abstract) {
  6502. while (parent.$options.abstract && parent.$parent) {
  6503. parent = parent.$parent;
  6504. }
  6505. parent.$children.push(vm);
  6506. }
  6507. vm.$parent = parent;
  6508. vm.$root = parent ? parent.$root : vm;
  6509. vm.$children = [];
  6510. vm.$refs = {};
  6511. vm._watcher = null;
  6512. vm._inactive = null;
  6513. vm._directInactive = false;
  6514. vm._isMounted = false;
  6515. vm._isDestroyed = false;
  6516. vm._isBeingDestroyed = false;
  6517. }
  6518. function lifecycleMixin (Vue) {
  6519. Vue.prototype._update = function (vnode, hydrating) {
  6520. var vm = this;
  6521. var prevEl = vm.$el;
  6522. var prevVnode = vm._vnode;
  6523. var restoreActiveInstance = setActiveInstance(vm);
  6524. vm._vnode = vnode;
  6525. // Vue.prototype.__patch__ is injected in entry points
  6526. // based on the rendering backend used.
  6527. if (!prevVnode) {
  6528. // initial render
  6529. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6530. } else {
  6531. // updates
  6532. vm.$el = vm.__patch__(prevVnode, vnode);
  6533. }
  6534. restoreActiveInstance();
  6535. // update __vue__ reference
  6536. if (prevEl) {
  6537. prevEl.__vue__ = null;
  6538. }
  6539. if (vm.$el) {
  6540. vm.$el.__vue__ = vm;
  6541. }
  6542. // if parent is an HOC, update its $el as well
  6543. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6544. vm.$parent.$el = vm.$el;
  6545. }
  6546. // updated hook is called by the scheduler to ensure that children are
  6547. // updated in a parent's updated hook.
  6548. };
  6549. Vue.prototype.$forceUpdate = function () {
  6550. var vm = this;
  6551. if (vm._watcher) {
  6552. vm._watcher.update();
  6553. }
  6554. };
  6555. Vue.prototype.$destroy = function () {
  6556. var vm = this;
  6557. if (vm._isBeingDestroyed) {
  6558. return
  6559. }
  6560. callHook(vm, 'beforeDestroy');
  6561. vm._isBeingDestroyed = true;
  6562. // remove self from parent
  6563. var parent = vm.$parent;
  6564. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6565. remove(parent.$children, vm);
  6566. }
  6567. // teardown watchers
  6568. if (vm._watcher) {
  6569. vm._watcher.teardown();
  6570. }
  6571. var i = vm._watchers.length;
  6572. while (i--) {
  6573. vm._watchers[i].teardown();
  6574. }
  6575. // remove reference from data ob
  6576. // frozen object may not have observer.
  6577. if (vm._data.__ob__) {
  6578. vm._data.__ob__.vmCount--;
  6579. }
  6580. // call the last hook...
  6581. vm._isDestroyed = true;
  6582. // invoke destroy hooks on current rendered tree
  6583. vm.__patch__(vm._vnode, null);
  6584. // fire destroyed hook
  6585. callHook(vm, 'destroyed');
  6586. // turn off all instance listeners.
  6587. vm.$off();
  6588. // remove __vue__ reference
  6589. if (vm.$el) {
  6590. vm.$el.__vue__ = null;
  6591. }
  6592. // release circular reference (#6759)
  6593. if (vm.$vnode) {
  6594. vm.$vnode.parent = null;
  6595. }
  6596. };
  6597. }
  6598. function updateChildComponent (
  6599. vm,
  6600. propsData,
  6601. listeners,
  6602. parentVnode,
  6603. renderChildren
  6604. ) {
  6605. if (true) {
  6606. isUpdatingChildComponent = true;
  6607. }
  6608. // determine whether component has slot children
  6609. // we need to do this before overwriting $options._renderChildren.
  6610. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6611. // dynamic slot names). Static scoped slots compiled from template has the
  6612. // "$stable" marker.
  6613. var newScopedSlots = parentVnode.data.scopedSlots;
  6614. var oldScopedSlots = vm.$scopedSlots;
  6615. var hasDynamicScopedSlot = !!(
  6616. (newScopedSlots && !newScopedSlots.$stable) ||
  6617. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6618. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6619. );
  6620. // Any static slot children from the parent may have changed during parent's
  6621. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6622. // update is necessary to ensure correctness.
  6623. var needsForceUpdate = !!(
  6624. renderChildren || // has new static slots
  6625. vm.$options._renderChildren || // has old static slots
  6626. hasDynamicScopedSlot
  6627. );
  6628. vm.$options._parentVnode = parentVnode;
  6629. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6630. if (vm._vnode) { // update child tree's parent
  6631. vm._vnode.parent = parentVnode;
  6632. }
  6633. vm.$options._renderChildren = renderChildren;
  6634. // update $attrs and $listeners hash
  6635. // these are also reactive so they may trigger child update if the child
  6636. // used them during render
  6637. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6638. vm.$listeners = listeners || emptyObject;
  6639. // update props
  6640. if (propsData && vm.$options.props) {
  6641. toggleObserving(false);
  6642. var props = vm._props;
  6643. var propKeys = vm.$options._propKeys || [];
  6644. for (var i = 0; i < propKeys.length; i++) {
  6645. var key = propKeys[i];
  6646. var propOptions = vm.$options.props; // wtf flow?
  6647. props[key] = validateProp(key, propOptions, propsData, vm);
  6648. }
  6649. toggleObserving(true);
  6650. // keep a copy of raw propsData
  6651. vm.$options.propsData = propsData;
  6652. }
  6653. // fixed by xxxxxx update properties(mp runtime)
  6654. vm._$updateProperties && vm._$updateProperties(vm);
  6655. // update listeners
  6656. listeners = listeners || emptyObject;
  6657. var oldListeners = vm.$options._parentListeners;
  6658. vm.$options._parentListeners = listeners;
  6659. updateComponentListeners(vm, listeners, oldListeners);
  6660. // resolve slots + force update if has children
  6661. if (needsForceUpdate) {
  6662. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6663. vm.$forceUpdate();
  6664. }
  6665. if (true) {
  6666. isUpdatingChildComponent = false;
  6667. }
  6668. }
  6669. function isInInactiveTree (vm) {
  6670. while (vm && (vm = vm.$parent)) {
  6671. if (vm._inactive) { return true }
  6672. }
  6673. return false
  6674. }
  6675. function activateChildComponent (vm, direct) {
  6676. if (direct) {
  6677. vm._directInactive = false;
  6678. if (isInInactiveTree(vm)) {
  6679. return
  6680. }
  6681. } else if (vm._directInactive) {
  6682. return
  6683. }
  6684. if (vm._inactive || vm._inactive === null) {
  6685. vm._inactive = false;
  6686. for (var i = 0; i < vm.$children.length; i++) {
  6687. activateChildComponent(vm.$children[i]);
  6688. }
  6689. callHook(vm, 'activated');
  6690. }
  6691. }
  6692. function deactivateChildComponent (vm, direct) {
  6693. if (direct) {
  6694. vm._directInactive = true;
  6695. if (isInInactiveTree(vm)) {
  6696. return
  6697. }
  6698. }
  6699. if (!vm._inactive) {
  6700. vm._inactive = true;
  6701. for (var i = 0; i < vm.$children.length; i++) {
  6702. deactivateChildComponent(vm.$children[i]);
  6703. }
  6704. callHook(vm, 'deactivated');
  6705. }
  6706. }
  6707. function callHook (vm, hook) {
  6708. // #7573 disable dep collection when invoking lifecycle hooks
  6709. pushTarget();
  6710. var handlers = vm.$options[hook];
  6711. var info = hook + " hook";
  6712. if (handlers) {
  6713. for (var i = 0, j = handlers.length; i < j; i++) {
  6714. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6715. }
  6716. }
  6717. if (vm._hasHookEvent) {
  6718. vm.$emit('hook:' + hook);
  6719. }
  6720. popTarget();
  6721. }
  6722. /* */
  6723. var MAX_UPDATE_COUNT = 100;
  6724. var queue = [];
  6725. var activatedChildren = [];
  6726. var has = {};
  6727. var circular = {};
  6728. var waiting = false;
  6729. var flushing = false;
  6730. var index = 0;
  6731. /**
  6732. * Reset the scheduler's state.
  6733. */
  6734. function resetSchedulerState () {
  6735. index = queue.length = activatedChildren.length = 0;
  6736. has = {};
  6737. if (true) {
  6738. circular = {};
  6739. }
  6740. waiting = flushing = false;
  6741. }
  6742. // Async edge case #6566 requires saving the timestamp when event listeners are
  6743. // attached. However, calling performance.now() has a perf overhead especially
  6744. // if the page has thousands of event listeners. Instead, we take a timestamp
  6745. // every time the scheduler flushes and use that for all event listeners
  6746. // attached during that flush.
  6747. var currentFlushTimestamp = 0;
  6748. // Async edge case fix requires storing an event listener's attach timestamp.
  6749. var getNow = Date.now;
  6750. // Determine what event timestamp the browser is using. Annoyingly, the
  6751. // timestamp can either be hi-res (relative to page load) or low-res
  6752. // (relative to UNIX epoch), so in order to compare time we have to use the
  6753. // same timestamp type when saving the flush timestamp.
  6754. // All IE versions use low-res event timestamps, and have problematic clock
  6755. // implementations (#9632)
  6756. if (inBrowser && !isIE) {
  6757. var performance = window.performance;
  6758. if (
  6759. performance &&
  6760. typeof performance.now === 'function' &&
  6761. getNow() > document.createEvent('Event').timeStamp
  6762. ) {
  6763. // if the event timestamp, although evaluated AFTER the Date.now(), is
  6764. // smaller than it, it means the event is using a hi-res timestamp,
  6765. // and we need to use the hi-res version for event listener timestamps as
  6766. // well.
  6767. getNow = function () { return performance.now(); };
  6768. }
  6769. }
  6770. /**
  6771. * Flush both queues and run the watchers.
  6772. */
  6773. function flushSchedulerQueue () {
  6774. currentFlushTimestamp = getNow();
  6775. flushing = true;
  6776. var watcher, id;
  6777. // Sort queue before flush.
  6778. // This ensures that:
  6779. // 1. Components are updated from parent to child. (because parent is always
  6780. // created before the child)
  6781. // 2. A component's user watchers are run before its render watcher (because
  6782. // user watchers are created before the render watcher)
  6783. // 3. If a component is destroyed during a parent component's watcher run,
  6784. // its watchers can be skipped.
  6785. queue.sort(function (a, b) { return a.id - b.id; });
  6786. // do not cache length because more watchers might be pushed
  6787. // as we run existing watchers
  6788. for (index = 0; index < queue.length; index++) {
  6789. watcher = queue[index];
  6790. if (watcher.before) {
  6791. watcher.before();
  6792. }
  6793. id = watcher.id;
  6794. has[id] = null;
  6795. watcher.run();
  6796. // in dev build, check and stop circular updates.
  6797. if ( true && has[id] != null) {
  6798. circular[id] = (circular[id] || 0) + 1;
  6799. if (circular[id] > MAX_UPDATE_COUNT) {
  6800. warn(
  6801. 'You may have an infinite update loop ' + (
  6802. watcher.user
  6803. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  6804. : "in a component render function."
  6805. ),
  6806. watcher.vm
  6807. );
  6808. break
  6809. }
  6810. }
  6811. }
  6812. // keep copies of post queues before resetting state
  6813. var activatedQueue = activatedChildren.slice();
  6814. var updatedQueue = queue.slice();
  6815. resetSchedulerState();
  6816. // call component updated and activated hooks
  6817. callActivatedHooks(activatedQueue);
  6818. callUpdatedHooks(updatedQueue);
  6819. // devtool hook
  6820. /* istanbul ignore if */
  6821. if (devtools && config.devtools) {
  6822. devtools.emit('flush');
  6823. }
  6824. }
  6825. function callUpdatedHooks (queue) {
  6826. var i = queue.length;
  6827. while (i--) {
  6828. var watcher = queue[i];
  6829. var vm = watcher.vm;
  6830. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  6831. callHook(vm, 'updated');
  6832. }
  6833. }
  6834. }
  6835. /**
  6836. * Queue a kept-alive component that was activated during patch.
  6837. * The queue will be processed after the entire tree has been patched.
  6838. */
  6839. function queueActivatedComponent (vm) {
  6840. // setting _inactive to false here so that a render function can
  6841. // rely on checking whether it's in an inactive tree (e.g. router-view)
  6842. vm._inactive = false;
  6843. activatedChildren.push(vm);
  6844. }
  6845. function callActivatedHooks (queue) {
  6846. for (var i = 0; i < queue.length; i++) {
  6847. queue[i]._inactive = true;
  6848. activateChildComponent(queue[i], true /* true */);
  6849. }
  6850. }
  6851. /**
  6852. * Push a watcher into the watcher queue.
  6853. * Jobs with duplicate IDs will be skipped unless it's
  6854. * pushed when the queue is being flushed.
  6855. */
  6856. function queueWatcher (watcher) {
  6857. var id = watcher.id;
  6858. if (has[id] == null) {
  6859. has[id] = true;
  6860. if (!flushing) {
  6861. queue.push(watcher);
  6862. } else {
  6863. // if already flushing, splice the watcher based on its id
  6864. // if already past its id, it will be run next immediately.
  6865. var i = queue.length - 1;
  6866. while (i > index && queue[i].id > watcher.id) {
  6867. i--;
  6868. }
  6869. queue.splice(i + 1, 0, watcher);
  6870. }
  6871. // queue the flush
  6872. if (!waiting) {
  6873. waiting = true;
  6874. if ( true && !config.async) {
  6875. flushSchedulerQueue();
  6876. return
  6877. }
  6878. nextTick(flushSchedulerQueue);
  6879. }
  6880. }
  6881. }
  6882. /* */
  6883. var uid$2 = 0;
  6884. /**
  6885. * A watcher parses an expression, collects dependencies,
  6886. * and fires callback when the expression value changes.
  6887. * This is used for both the $watch() api and directives.
  6888. */
  6889. var Watcher = function Watcher (
  6890. vm,
  6891. expOrFn,
  6892. cb,
  6893. options,
  6894. isRenderWatcher
  6895. ) {
  6896. this.vm = vm;
  6897. if (isRenderWatcher) {
  6898. vm._watcher = this;
  6899. }
  6900. vm._watchers.push(this);
  6901. // options
  6902. if (options) {
  6903. this.deep = !!options.deep;
  6904. this.user = !!options.user;
  6905. this.lazy = !!options.lazy;
  6906. this.sync = !!options.sync;
  6907. this.before = options.before;
  6908. } else {
  6909. this.deep = this.user = this.lazy = this.sync = false;
  6910. }
  6911. this.cb = cb;
  6912. this.id = ++uid$2; // uid for batching
  6913. this.active = true;
  6914. this.dirty = this.lazy; // for lazy watchers
  6915. this.deps = [];
  6916. this.newDeps = [];
  6917. this.depIds = new _Set();
  6918. this.newDepIds = new _Set();
  6919. this.expression = true
  6920. ? expOrFn.toString()
  6921. : undefined;
  6922. // parse expression for getter
  6923. if (typeof expOrFn === 'function') {
  6924. this.getter = expOrFn;
  6925. } else {
  6926. this.getter = parsePath(expOrFn);
  6927. if (!this.getter) {
  6928. this.getter = noop;
  6929. true && warn(
  6930. "Failed watching path: \"" + expOrFn + "\" " +
  6931. 'Watcher only accepts simple dot-delimited paths. ' +
  6932. 'For full control, use a function instead.',
  6933. vm
  6934. );
  6935. }
  6936. }
  6937. this.value = this.lazy
  6938. ? undefined
  6939. : this.get();
  6940. };
  6941. /**
  6942. * Evaluate the getter, and re-collect dependencies.
  6943. */
  6944. Watcher.prototype.get = function get () {
  6945. pushTarget(this);
  6946. var value;
  6947. var vm = this.vm;
  6948. try {
  6949. value = this.getter.call(vm, vm);
  6950. } catch (e) {
  6951. if (this.user) {
  6952. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  6953. } else {
  6954. throw e
  6955. }
  6956. } finally {
  6957. // "touch" every property so they are all tracked as
  6958. // dependencies for deep watching
  6959. if (this.deep) {
  6960. traverse(value);
  6961. }
  6962. popTarget();
  6963. this.cleanupDeps();
  6964. }
  6965. return value
  6966. };
  6967. /**
  6968. * Add a dependency to this directive.
  6969. */
  6970. Watcher.prototype.addDep = function addDep (dep) {
  6971. var id = dep.id;
  6972. if (!this.newDepIds.has(id)) {
  6973. this.newDepIds.add(id);
  6974. this.newDeps.push(dep);
  6975. if (!this.depIds.has(id)) {
  6976. dep.addSub(this);
  6977. }
  6978. }
  6979. };
  6980. /**
  6981. * Clean up for dependency collection.
  6982. */
  6983. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  6984. var i = this.deps.length;
  6985. while (i--) {
  6986. var dep = this.deps[i];
  6987. if (!this.newDepIds.has(dep.id)) {
  6988. dep.removeSub(this);
  6989. }
  6990. }
  6991. var tmp = this.depIds;
  6992. this.depIds = this.newDepIds;
  6993. this.newDepIds = tmp;
  6994. this.newDepIds.clear();
  6995. tmp = this.deps;
  6996. this.deps = this.newDeps;
  6997. this.newDeps = tmp;
  6998. this.newDeps.length = 0;
  6999. };
  7000. /**
  7001. * Subscriber interface.
  7002. * Will be called when a dependency changes.
  7003. */
  7004. Watcher.prototype.update = function update () {
  7005. /* istanbul ignore else */
  7006. if (this.lazy) {
  7007. this.dirty = true;
  7008. } else if (this.sync) {
  7009. this.run();
  7010. } else {
  7011. queueWatcher(this);
  7012. }
  7013. };
  7014. /**
  7015. * Scheduler job interface.
  7016. * Will be called by the scheduler.
  7017. */
  7018. Watcher.prototype.run = function run () {
  7019. if (this.active) {
  7020. var value = this.get();
  7021. if (
  7022. value !== this.value ||
  7023. // Deep watchers and watchers on Object/Arrays should fire even
  7024. // when the value is the same, because the value may
  7025. // have mutated.
  7026. isObject(value) ||
  7027. this.deep
  7028. ) {
  7029. // set new value
  7030. var oldValue = this.value;
  7031. this.value = value;
  7032. if (this.user) {
  7033. try {
  7034. this.cb.call(this.vm, value, oldValue);
  7035. } catch (e) {
  7036. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7037. }
  7038. } else {
  7039. this.cb.call(this.vm, value, oldValue);
  7040. }
  7041. }
  7042. }
  7043. };
  7044. /**
  7045. * Evaluate the value of the watcher.
  7046. * This only gets called for lazy watchers.
  7047. */
  7048. Watcher.prototype.evaluate = function evaluate () {
  7049. this.value = this.get();
  7050. this.dirty = false;
  7051. };
  7052. /**
  7053. * Depend on all deps collected by this watcher.
  7054. */
  7055. Watcher.prototype.depend = function depend () {
  7056. var i = this.deps.length;
  7057. while (i--) {
  7058. this.deps[i].depend();
  7059. }
  7060. };
  7061. /**
  7062. * Remove self from all dependencies' subscriber list.
  7063. */
  7064. Watcher.prototype.teardown = function teardown () {
  7065. if (this.active) {
  7066. // remove self from vm's watcher list
  7067. // this is a somewhat expensive operation so we skip it
  7068. // if the vm is being destroyed.
  7069. if (!this.vm._isBeingDestroyed) {
  7070. remove(this.vm._watchers, this);
  7071. }
  7072. var i = this.deps.length;
  7073. while (i--) {
  7074. this.deps[i].removeSub(this);
  7075. }
  7076. this.active = false;
  7077. }
  7078. };
  7079. /* */
  7080. var sharedPropertyDefinition = {
  7081. enumerable: true,
  7082. configurable: true,
  7083. get: noop,
  7084. set: noop
  7085. };
  7086. function proxy (target, sourceKey, key) {
  7087. sharedPropertyDefinition.get = function proxyGetter () {
  7088. return this[sourceKey][key]
  7089. };
  7090. sharedPropertyDefinition.set = function proxySetter (val) {
  7091. this[sourceKey][key] = val;
  7092. };
  7093. Object.defineProperty(target, key, sharedPropertyDefinition);
  7094. }
  7095. function initState (vm) {
  7096. vm._watchers = [];
  7097. var opts = vm.$options;
  7098. if (opts.props) { initProps(vm, opts.props); }
  7099. if (opts.methods) { initMethods(vm, opts.methods); }
  7100. if (opts.data) {
  7101. initData(vm);
  7102. } else {
  7103. observe(vm._data = {}, true /* asRootData */);
  7104. }
  7105. if (opts.computed) { initComputed(vm, opts.computed); }
  7106. if (opts.watch && opts.watch !== nativeWatch) {
  7107. initWatch(vm, opts.watch);
  7108. }
  7109. }
  7110. function initProps (vm, propsOptions) {
  7111. var propsData = vm.$options.propsData || {};
  7112. var props = vm._props = {};
  7113. // cache prop keys so that future props updates can iterate using Array
  7114. // instead of dynamic object key enumeration.
  7115. var keys = vm.$options._propKeys = [];
  7116. var isRoot = !vm.$parent;
  7117. // root instance props should be converted
  7118. if (!isRoot) {
  7119. toggleObserving(false);
  7120. }
  7121. var loop = function ( key ) {
  7122. keys.push(key);
  7123. var value = validateProp(key, propsOptions, propsData, vm);
  7124. /* istanbul ignore else */
  7125. if (true) {
  7126. var hyphenatedKey = hyphenate(key);
  7127. if (isReservedAttribute(hyphenatedKey) ||
  7128. config.isReservedAttr(hyphenatedKey)) {
  7129. warn(
  7130. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7131. vm
  7132. );
  7133. }
  7134. defineReactive$$1(props, key, value, function () {
  7135. if (!isRoot && !isUpdatingChildComponent) {
  7136. {
  7137. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou'){//百度、快手 observer 在 setData callback 之后触发,直接忽略该 warn
  7138. return
  7139. }
  7140. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7141. if(
  7142. key === 'value' &&
  7143. Array.isArray(vm.$options.behaviors) &&
  7144. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7145. ){
  7146. return
  7147. }
  7148. if(vm._getFormData){
  7149. return
  7150. }
  7151. var $parent = vm.$parent;
  7152. while($parent){
  7153. if($parent.__next_tick_pending){
  7154. return
  7155. }
  7156. $parent = $parent.$parent;
  7157. }
  7158. }
  7159. warn(
  7160. "Avoid mutating a prop directly since the value will be " +
  7161. "overwritten whenever the parent component re-renders. " +
  7162. "Instead, use a data or computed property based on the prop's " +
  7163. "value. Prop being mutated: \"" + key + "\"",
  7164. vm
  7165. );
  7166. }
  7167. });
  7168. } else {}
  7169. // static props are already proxied on the component's prototype
  7170. // during Vue.extend(). We only need to proxy props defined at
  7171. // instantiation here.
  7172. if (!(key in vm)) {
  7173. proxy(vm, "_props", key);
  7174. }
  7175. };
  7176. for (var key in propsOptions) loop( key );
  7177. toggleObserving(true);
  7178. }
  7179. function initData (vm) {
  7180. var data = vm.$options.data;
  7181. data = vm._data = typeof data === 'function'
  7182. ? getData(data, vm)
  7183. : data || {};
  7184. if (!isPlainObject(data)) {
  7185. data = {};
  7186. true && warn(
  7187. 'data functions should return an object:\n' +
  7188. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7189. vm
  7190. );
  7191. }
  7192. // proxy data on instance
  7193. var keys = Object.keys(data);
  7194. var props = vm.$options.props;
  7195. var methods = vm.$options.methods;
  7196. var i = keys.length;
  7197. while (i--) {
  7198. var key = keys[i];
  7199. if (true) {
  7200. if (methods && hasOwn(methods, key)) {
  7201. warn(
  7202. ("Method \"" + key + "\" has already been defined as a data property."),
  7203. vm
  7204. );
  7205. }
  7206. }
  7207. if (props && hasOwn(props, key)) {
  7208. true && warn(
  7209. "The data property \"" + key + "\" is already declared as a prop. " +
  7210. "Use prop default value instead.",
  7211. vm
  7212. );
  7213. } else if (!isReserved(key)) {
  7214. proxy(vm, "_data", key);
  7215. }
  7216. }
  7217. // observe data
  7218. observe(data, true /* asRootData */);
  7219. }
  7220. function getData (data, vm) {
  7221. // #7573 disable dep collection when invoking data getters
  7222. pushTarget();
  7223. try {
  7224. return data.call(vm, vm)
  7225. } catch (e) {
  7226. handleError(e, vm, "data()");
  7227. return {}
  7228. } finally {
  7229. popTarget();
  7230. }
  7231. }
  7232. var computedWatcherOptions = { lazy: true };
  7233. function initComputed (vm, computed) {
  7234. // $flow-disable-line
  7235. var watchers = vm._computedWatchers = Object.create(null);
  7236. // computed properties are just getters during SSR
  7237. var isSSR = isServerRendering();
  7238. for (var key in computed) {
  7239. var userDef = computed[key];
  7240. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7241. if ( true && getter == null) {
  7242. warn(
  7243. ("Getter is missing for computed property \"" + key + "\"."),
  7244. vm
  7245. );
  7246. }
  7247. if (!isSSR) {
  7248. // create internal watcher for the computed property.
  7249. watchers[key] = new Watcher(
  7250. vm,
  7251. getter || noop,
  7252. noop,
  7253. computedWatcherOptions
  7254. );
  7255. }
  7256. // component-defined computed properties are already defined on the
  7257. // component prototype. We only need to define computed properties defined
  7258. // at instantiation here.
  7259. if (!(key in vm)) {
  7260. defineComputed(vm, key, userDef);
  7261. } else if (true) {
  7262. if (key in vm.$data) {
  7263. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7264. } else if (vm.$options.props && key in vm.$options.props) {
  7265. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7266. }
  7267. }
  7268. }
  7269. }
  7270. function defineComputed (
  7271. target,
  7272. key,
  7273. userDef
  7274. ) {
  7275. var shouldCache = !isServerRendering();
  7276. if (typeof userDef === 'function') {
  7277. sharedPropertyDefinition.get = shouldCache
  7278. ? createComputedGetter(key)
  7279. : createGetterInvoker(userDef);
  7280. sharedPropertyDefinition.set = noop;
  7281. } else {
  7282. sharedPropertyDefinition.get = userDef.get
  7283. ? shouldCache && userDef.cache !== false
  7284. ? createComputedGetter(key)
  7285. : createGetterInvoker(userDef.get)
  7286. : noop;
  7287. sharedPropertyDefinition.set = userDef.set || noop;
  7288. }
  7289. if ( true &&
  7290. sharedPropertyDefinition.set === noop) {
  7291. sharedPropertyDefinition.set = function () {
  7292. warn(
  7293. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7294. this
  7295. );
  7296. };
  7297. }
  7298. Object.defineProperty(target, key, sharedPropertyDefinition);
  7299. }
  7300. function createComputedGetter (key) {
  7301. return function computedGetter () {
  7302. var watcher = this._computedWatchers && this._computedWatchers[key];
  7303. if (watcher) {
  7304. if (watcher.dirty) {
  7305. watcher.evaluate();
  7306. }
  7307. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7308. watcher.depend();
  7309. }
  7310. return watcher.value
  7311. }
  7312. }
  7313. }
  7314. function createGetterInvoker(fn) {
  7315. return function computedGetter () {
  7316. return fn.call(this, this)
  7317. }
  7318. }
  7319. function initMethods (vm, methods) {
  7320. var props = vm.$options.props;
  7321. for (var key in methods) {
  7322. if (true) {
  7323. if (typeof methods[key] !== 'function') {
  7324. warn(
  7325. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7326. "Did you reference the function correctly?",
  7327. vm
  7328. );
  7329. }
  7330. if (props && hasOwn(props, key)) {
  7331. warn(
  7332. ("Method \"" + key + "\" has already been defined as a prop."),
  7333. vm
  7334. );
  7335. }
  7336. if ((key in vm) && isReserved(key)) {
  7337. warn(
  7338. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7339. "Avoid defining component methods that start with _ or $."
  7340. );
  7341. }
  7342. }
  7343. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7344. }
  7345. }
  7346. function initWatch (vm, watch) {
  7347. for (var key in watch) {
  7348. var handler = watch[key];
  7349. if (Array.isArray(handler)) {
  7350. for (var i = 0; i < handler.length; i++) {
  7351. createWatcher(vm, key, handler[i]);
  7352. }
  7353. } else {
  7354. createWatcher(vm, key, handler);
  7355. }
  7356. }
  7357. }
  7358. function createWatcher (
  7359. vm,
  7360. expOrFn,
  7361. handler,
  7362. options
  7363. ) {
  7364. if (isPlainObject(handler)) {
  7365. options = handler;
  7366. handler = handler.handler;
  7367. }
  7368. if (typeof handler === 'string') {
  7369. handler = vm[handler];
  7370. }
  7371. return vm.$watch(expOrFn, handler, options)
  7372. }
  7373. function stateMixin (Vue) {
  7374. // flow somehow has problems with directly declared definition object
  7375. // when using Object.defineProperty, so we have to procedurally build up
  7376. // the object here.
  7377. var dataDef = {};
  7378. dataDef.get = function () { return this._data };
  7379. var propsDef = {};
  7380. propsDef.get = function () { return this._props };
  7381. if (true) {
  7382. dataDef.set = function () {
  7383. warn(
  7384. 'Avoid replacing instance root $data. ' +
  7385. 'Use nested data properties instead.',
  7386. this
  7387. );
  7388. };
  7389. propsDef.set = function () {
  7390. warn("$props is readonly.", this);
  7391. };
  7392. }
  7393. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7394. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7395. Vue.prototype.$set = set;
  7396. Vue.prototype.$delete = del;
  7397. Vue.prototype.$watch = function (
  7398. expOrFn,
  7399. cb,
  7400. options
  7401. ) {
  7402. var vm = this;
  7403. if (isPlainObject(cb)) {
  7404. return createWatcher(vm, expOrFn, cb, options)
  7405. }
  7406. options = options || {};
  7407. options.user = true;
  7408. var watcher = new Watcher(vm, expOrFn, cb, options);
  7409. if (options.immediate) {
  7410. try {
  7411. cb.call(vm, watcher.value);
  7412. } catch (error) {
  7413. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7414. }
  7415. }
  7416. return function unwatchFn () {
  7417. watcher.teardown();
  7418. }
  7419. };
  7420. }
  7421. /* */
  7422. var uid$3 = 0;
  7423. function initMixin (Vue) {
  7424. Vue.prototype._init = function (options) {
  7425. var vm = this;
  7426. // a uid
  7427. vm._uid = uid$3++;
  7428. var startTag, endTag;
  7429. /* istanbul ignore if */
  7430. if ( true && config.performance && mark) {
  7431. startTag = "vue-perf-start:" + (vm._uid);
  7432. endTag = "vue-perf-end:" + (vm._uid);
  7433. mark(startTag);
  7434. }
  7435. // a flag to avoid this being observed
  7436. vm._isVue = true;
  7437. // merge options
  7438. if (options && options._isComponent) {
  7439. // optimize internal component instantiation
  7440. // since dynamic options merging is pretty slow, and none of the
  7441. // internal component options needs special treatment.
  7442. initInternalComponent(vm, options);
  7443. } else {
  7444. vm.$options = mergeOptions(
  7445. resolveConstructorOptions(vm.constructor),
  7446. options || {},
  7447. vm
  7448. );
  7449. }
  7450. /* istanbul ignore else */
  7451. if (true) {
  7452. initProxy(vm);
  7453. } else {}
  7454. // expose real self
  7455. vm._self = vm;
  7456. initLifecycle(vm);
  7457. initEvents(vm);
  7458. initRender(vm);
  7459. callHook(vm, 'beforeCreate');
  7460. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7461. initState(vm);
  7462. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7463. !vm._$fallback && callHook(vm, 'created');
  7464. /* istanbul ignore if */
  7465. if ( true && config.performance && mark) {
  7466. vm._name = formatComponentName(vm, false);
  7467. mark(endTag);
  7468. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7469. }
  7470. if (vm.$options.el) {
  7471. vm.$mount(vm.$options.el);
  7472. }
  7473. };
  7474. }
  7475. function initInternalComponent (vm, options) {
  7476. var opts = vm.$options = Object.create(vm.constructor.options);
  7477. // doing this because it's faster than dynamic enumeration.
  7478. var parentVnode = options._parentVnode;
  7479. opts.parent = options.parent;
  7480. opts._parentVnode = parentVnode;
  7481. var vnodeComponentOptions = parentVnode.componentOptions;
  7482. opts.propsData = vnodeComponentOptions.propsData;
  7483. opts._parentListeners = vnodeComponentOptions.listeners;
  7484. opts._renderChildren = vnodeComponentOptions.children;
  7485. opts._componentTag = vnodeComponentOptions.tag;
  7486. if (options.render) {
  7487. opts.render = options.render;
  7488. opts.staticRenderFns = options.staticRenderFns;
  7489. }
  7490. }
  7491. function resolveConstructorOptions (Ctor) {
  7492. var options = Ctor.options;
  7493. if (Ctor.super) {
  7494. var superOptions = resolveConstructorOptions(Ctor.super);
  7495. var cachedSuperOptions = Ctor.superOptions;
  7496. if (superOptions !== cachedSuperOptions) {
  7497. // super option changed,
  7498. // need to resolve new options.
  7499. Ctor.superOptions = superOptions;
  7500. // check if there are any late-modified/attached options (#4976)
  7501. var modifiedOptions = resolveModifiedOptions(Ctor);
  7502. // update base extend options
  7503. if (modifiedOptions) {
  7504. extend(Ctor.extendOptions, modifiedOptions);
  7505. }
  7506. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7507. if (options.name) {
  7508. options.components[options.name] = Ctor;
  7509. }
  7510. }
  7511. }
  7512. return options
  7513. }
  7514. function resolveModifiedOptions (Ctor) {
  7515. var modified;
  7516. var latest = Ctor.options;
  7517. var sealed = Ctor.sealedOptions;
  7518. for (var key in latest) {
  7519. if (latest[key] !== sealed[key]) {
  7520. if (!modified) { modified = {}; }
  7521. modified[key] = latest[key];
  7522. }
  7523. }
  7524. return modified
  7525. }
  7526. function Vue (options) {
  7527. if ( true &&
  7528. !(this instanceof Vue)
  7529. ) {
  7530. warn('Vue is a constructor and should be called with the `new` keyword');
  7531. }
  7532. this._init(options);
  7533. }
  7534. initMixin(Vue);
  7535. stateMixin(Vue);
  7536. eventsMixin(Vue);
  7537. lifecycleMixin(Vue);
  7538. renderMixin(Vue);
  7539. /* */
  7540. function initUse (Vue) {
  7541. Vue.use = function (plugin) {
  7542. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7543. if (installedPlugins.indexOf(plugin) > -1) {
  7544. return this
  7545. }
  7546. // additional parameters
  7547. var args = toArray(arguments, 1);
  7548. args.unshift(this);
  7549. if (typeof plugin.install === 'function') {
  7550. plugin.install.apply(plugin, args);
  7551. } else if (typeof plugin === 'function') {
  7552. plugin.apply(null, args);
  7553. }
  7554. installedPlugins.push(plugin);
  7555. return this
  7556. };
  7557. }
  7558. /* */
  7559. function initMixin$1 (Vue) {
  7560. Vue.mixin = function (mixin) {
  7561. this.options = mergeOptions(this.options, mixin);
  7562. return this
  7563. };
  7564. }
  7565. /* */
  7566. function initExtend (Vue) {
  7567. /**
  7568. * Each instance constructor, including Vue, has a unique
  7569. * cid. This enables us to create wrapped "child
  7570. * constructors" for prototypal inheritance and cache them.
  7571. */
  7572. Vue.cid = 0;
  7573. var cid = 1;
  7574. /**
  7575. * Class inheritance
  7576. */
  7577. Vue.extend = function (extendOptions) {
  7578. extendOptions = extendOptions || {};
  7579. var Super = this;
  7580. var SuperId = Super.cid;
  7581. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7582. if (cachedCtors[SuperId]) {
  7583. return cachedCtors[SuperId]
  7584. }
  7585. var name = extendOptions.name || Super.options.name;
  7586. if ( true && name) {
  7587. validateComponentName(name);
  7588. }
  7589. var Sub = function VueComponent (options) {
  7590. this._init(options);
  7591. };
  7592. Sub.prototype = Object.create(Super.prototype);
  7593. Sub.prototype.constructor = Sub;
  7594. Sub.cid = cid++;
  7595. Sub.options = mergeOptions(
  7596. Super.options,
  7597. extendOptions
  7598. );
  7599. Sub['super'] = Super;
  7600. // For props and computed properties, we define the proxy getters on
  7601. // the Vue instances at extension time, on the extended prototype. This
  7602. // avoids Object.defineProperty calls for each instance created.
  7603. if (Sub.options.props) {
  7604. initProps$1(Sub);
  7605. }
  7606. if (Sub.options.computed) {
  7607. initComputed$1(Sub);
  7608. }
  7609. // allow further extension/mixin/plugin usage
  7610. Sub.extend = Super.extend;
  7611. Sub.mixin = Super.mixin;
  7612. Sub.use = Super.use;
  7613. // create asset registers, so extended classes
  7614. // can have their private assets too.
  7615. ASSET_TYPES.forEach(function (type) {
  7616. Sub[type] = Super[type];
  7617. });
  7618. // enable recursive self-lookup
  7619. if (name) {
  7620. Sub.options.components[name] = Sub;
  7621. }
  7622. // keep a reference to the super options at extension time.
  7623. // later at instantiation we can check if Super's options have
  7624. // been updated.
  7625. Sub.superOptions = Super.options;
  7626. Sub.extendOptions = extendOptions;
  7627. Sub.sealedOptions = extend({}, Sub.options);
  7628. // cache constructor
  7629. cachedCtors[SuperId] = Sub;
  7630. return Sub
  7631. };
  7632. }
  7633. function initProps$1 (Comp) {
  7634. var props = Comp.options.props;
  7635. for (var key in props) {
  7636. proxy(Comp.prototype, "_props", key);
  7637. }
  7638. }
  7639. function initComputed$1 (Comp) {
  7640. var computed = Comp.options.computed;
  7641. for (var key in computed) {
  7642. defineComputed(Comp.prototype, key, computed[key]);
  7643. }
  7644. }
  7645. /* */
  7646. function initAssetRegisters (Vue) {
  7647. /**
  7648. * Create asset registration methods.
  7649. */
  7650. ASSET_TYPES.forEach(function (type) {
  7651. Vue[type] = function (
  7652. id,
  7653. definition
  7654. ) {
  7655. if (!definition) {
  7656. return this.options[type + 's'][id]
  7657. } else {
  7658. /* istanbul ignore if */
  7659. if ( true && type === 'component') {
  7660. validateComponentName(id);
  7661. }
  7662. if (type === 'component' && isPlainObject(definition)) {
  7663. definition.name = definition.name || id;
  7664. definition = this.options._base.extend(definition);
  7665. }
  7666. if (type === 'directive' && typeof definition === 'function') {
  7667. definition = { bind: definition, update: definition };
  7668. }
  7669. this.options[type + 's'][id] = definition;
  7670. return definition
  7671. }
  7672. };
  7673. });
  7674. }
  7675. /* */
  7676. function getComponentName (opts) {
  7677. return opts && (opts.Ctor.options.name || opts.tag)
  7678. }
  7679. function matches (pattern, name) {
  7680. if (Array.isArray(pattern)) {
  7681. return pattern.indexOf(name) > -1
  7682. } else if (typeof pattern === 'string') {
  7683. return pattern.split(',').indexOf(name) > -1
  7684. } else if (isRegExp(pattern)) {
  7685. return pattern.test(name)
  7686. }
  7687. /* istanbul ignore next */
  7688. return false
  7689. }
  7690. function pruneCache (keepAliveInstance, filter) {
  7691. var cache = keepAliveInstance.cache;
  7692. var keys = keepAliveInstance.keys;
  7693. var _vnode = keepAliveInstance._vnode;
  7694. for (var key in cache) {
  7695. var cachedNode = cache[key];
  7696. if (cachedNode) {
  7697. var name = getComponentName(cachedNode.componentOptions);
  7698. if (name && !filter(name)) {
  7699. pruneCacheEntry(cache, key, keys, _vnode);
  7700. }
  7701. }
  7702. }
  7703. }
  7704. function pruneCacheEntry (
  7705. cache,
  7706. key,
  7707. keys,
  7708. current
  7709. ) {
  7710. var cached$$1 = cache[key];
  7711. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7712. cached$$1.componentInstance.$destroy();
  7713. }
  7714. cache[key] = null;
  7715. remove(keys, key);
  7716. }
  7717. var patternTypes = [String, RegExp, Array];
  7718. var KeepAlive = {
  7719. name: 'keep-alive',
  7720. abstract: true,
  7721. props: {
  7722. include: patternTypes,
  7723. exclude: patternTypes,
  7724. max: [String, Number]
  7725. },
  7726. created: function created () {
  7727. this.cache = Object.create(null);
  7728. this.keys = [];
  7729. },
  7730. destroyed: function destroyed () {
  7731. for (var key in this.cache) {
  7732. pruneCacheEntry(this.cache, key, this.keys);
  7733. }
  7734. },
  7735. mounted: function mounted () {
  7736. var this$1 = this;
  7737. this.$watch('include', function (val) {
  7738. pruneCache(this$1, function (name) { return matches(val, name); });
  7739. });
  7740. this.$watch('exclude', function (val) {
  7741. pruneCache(this$1, function (name) { return !matches(val, name); });
  7742. });
  7743. },
  7744. render: function render () {
  7745. var slot = this.$slots.default;
  7746. var vnode = getFirstComponentChild(slot);
  7747. var componentOptions = vnode && vnode.componentOptions;
  7748. if (componentOptions) {
  7749. // check pattern
  7750. var name = getComponentName(componentOptions);
  7751. var ref = this;
  7752. var include = ref.include;
  7753. var exclude = ref.exclude;
  7754. if (
  7755. // not included
  7756. (include && (!name || !matches(include, name))) ||
  7757. // excluded
  7758. (exclude && name && matches(exclude, name))
  7759. ) {
  7760. return vnode
  7761. }
  7762. var ref$1 = this;
  7763. var cache = ref$1.cache;
  7764. var keys = ref$1.keys;
  7765. var key = vnode.key == null
  7766. // same constructor may get registered as different local components
  7767. // so cid alone is not enough (#3269)
  7768. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  7769. : vnode.key;
  7770. if (cache[key]) {
  7771. vnode.componentInstance = cache[key].componentInstance;
  7772. // make current key freshest
  7773. remove(keys, key);
  7774. keys.push(key);
  7775. } else {
  7776. cache[key] = vnode;
  7777. keys.push(key);
  7778. // prune oldest entry
  7779. if (this.max && keys.length > parseInt(this.max)) {
  7780. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  7781. }
  7782. }
  7783. vnode.data.keepAlive = true;
  7784. }
  7785. return vnode || (slot && slot[0])
  7786. }
  7787. };
  7788. var builtInComponents = {
  7789. KeepAlive: KeepAlive
  7790. };
  7791. /* */
  7792. function initGlobalAPI (Vue) {
  7793. // config
  7794. var configDef = {};
  7795. configDef.get = function () { return config; };
  7796. if (true) {
  7797. configDef.set = function () {
  7798. warn(
  7799. 'Do not replace the Vue.config object, set individual fields instead.'
  7800. );
  7801. };
  7802. }
  7803. Object.defineProperty(Vue, 'config', configDef);
  7804. // exposed util methods.
  7805. // NOTE: these are not considered part of the public API - avoid relying on
  7806. // them unless you are aware of the risk.
  7807. Vue.util = {
  7808. warn: warn,
  7809. extend: extend,
  7810. mergeOptions: mergeOptions,
  7811. defineReactive: defineReactive$$1
  7812. };
  7813. Vue.set = set;
  7814. Vue.delete = del;
  7815. Vue.nextTick = nextTick;
  7816. // 2.6 explicit observable API
  7817. Vue.observable = function (obj) {
  7818. observe(obj);
  7819. return obj
  7820. };
  7821. Vue.options = Object.create(null);
  7822. ASSET_TYPES.forEach(function (type) {
  7823. Vue.options[type + 's'] = Object.create(null);
  7824. });
  7825. // this is used to identify the "base" constructor to extend all plain-object
  7826. // components with in Weex's multi-instance scenarios.
  7827. Vue.options._base = Vue;
  7828. extend(Vue.options.components, builtInComponents);
  7829. initUse(Vue);
  7830. initMixin$1(Vue);
  7831. initExtend(Vue);
  7832. initAssetRegisters(Vue);
  7833. }
  7834. initGlobalAPI(Vue);
  7835. Object.defineProperty(Vue.prototype, '$isServer', {
  7836. get: isServerRendering
  7837. });
  7838. Object.defineProperty(Vue.prototype, '$ssrContext', {
  7839. get: function get () {
  7840. /* istanbul ignore next */
  7841. return this.$vnode && this.$vnode.ssrContext
  7842. }
  7843. });
  7844. // expose FunctionalRenderContext for ssr runtime helper installation
  7845. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  7846. value: FunctionalRenderContext
  7847. });
  7848. Vue.version = '2.6.11';
  7849. /**
  7850. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  7851. */
  7852. var ARRAYTYPE = '[object Array]';
  7853. var OBJECTTYPE = '[object Object]';
  7854. // const FUNCTIONTYPE = '[object Function]'
  7855. function diff(current, pre) {
  7856. var result = {};
  7857. syncKeys(current, pre);
  7858. _diff(current, pre, '', result);
  7859. return result
  7860. }
  7861. function syncKeys(current, pre) {
  7862. if (current === pre) { return }
  7863. var rootCurrentType = type(current);
  7864. var rootPreType = type(pre);
  7865. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  7866. if(Object.keys(current).length >= Object.keys(pre).length){
  7867. for (var key in pre) {
  7868. var currentValue = current[key];
  7869. if (currentValue === undefined) {
  7870. current[key] = null;
  7871. } else {
  7872. syncKeys(currentValue, pre[key]);
  7873. }
  7874. }
  7875. }
  7876. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  7877. if (current.length >= pre.length) {
  7878. pre.forEach(function (item, index) {
  7879. syncKeys(current[index], item);
  7880. });
  7881. }
  7882. }
  7883. }
  7884. function _diff(current, pre, path, result) {
  7885. if (current === pre) { return }
  7886. var rootCurrentType = type(current);
  7887. var rootPreType = type(pre);
  7888. if (rootCurrentType == OBJECTTYPE) {
  7889. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  7890. setResult(result, path, current);
  7891. } else {
  7892. var loop = function ( key ) {
  7893. var currentValue = current[key];
  7894. var preValue = pre[key];
  7895. var currentType = type(currentValue);
  7896. var preType = type(preValue);
  7897. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  7898. // NOTE 此处将 != 修改为 !==。涉及地方太多恐怕测试不到,如果出现数据对比问题,将其修改回来。
  7899. if (currentValue !== pre[key]) {
  7900. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7901. }
  7902. } else if (currentType == ARRAYTYPE) {
  7903. if (preType != ARRAYTYPE) {
  7904. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7905. } else {
  7906. if (currentValue.length < preValue.length) {
  7907. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7908. } else {
  7909. currentValue.forEach(function (item, index) {
  7910. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  7911. });
  7912. }
  7913. }
  7914. } else if (currentType == OBJECTTYPE) {
  7915. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  7916. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7917. } else {
  7918. for (var subKey in currentValue) {
  7919. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  7920. }
  7921. }
  7922. }
  7923. };
  7924. for (var key in current) loop( key );
  7925. }
  7926. } else if (rootCurrentType == ARRAYTYPE) {
  7927. if (rootPreType != ARRAYTYPE) {
  7928. setResult(result, path, current);
  7929. } else {
  7930. if (current.length < pre.length) {
  7931. setResult(result, path, current);
  7932. } else {
  7933. current.forEach(function (item, index) {
  7934. _diff(item, pre[index], path + '[' + index + ']', result);
  7935. });
  7936. }
  7937. }
  7938. } else {
  7939. setResult(result, path, current);
  7940. }
  7941. }
  7942. function setResult(result, k, v) {
  7943. // if (type(v) != FUNCTIONTYPE) {
  7944. result[k] = v;
  7945. // }
  7946. }
  7947. function type(obj) {
  7948. return Object.prototype.toString.call(obj)
  7949. }
  7950. /* */
  7951. function flushCallbacks$1(vm) {
  7952. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  7953. if (Object({"VUE_APP_NAME":"wx-app-new","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7954. var mpInstance = vm.$scope;
  7955. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7956. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  7957. }
  7958. var copies = vm.__next_tick_callbacks.slice(0);
  7959. vm.__next_tick_callbacks.length = 0;
  7960. for (var i = 0; i < copies.length; i++) {
  7961. copies[i]();
  7962. }
  7963. }
  7964. }
  7965. function hasRenderWatcher(vm) {
  7966. return queue.find(function (watcher) { return vm._watcher === watcher; })
  7967. }
  7968. function nextTick$1(vm, cb) {
  7969. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  7970. //2.nextTick 之前存在 render watcher
  7971. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  7972. if(Object({"VUE_APP_NAME":"wx-app-new","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  7973. var mpInstance = vm.$scope;
  7974. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7975. ']:nextVueTick');
  7976. }
  7977. return nextTick(cb, vm)
  7978. }else{
  7979. if(Object({"VUE_APP_NAME":"wx-app-new","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  7980. var mpInstance$1 = vm.$scope;
  7981. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  7982. ']:nextMPTick');
  7983. }
  7984. }
  7985. var _resolve;
  7986. if (!vm.__next_tick_callbacks) {
  7987. vm.__next_tick_callbacks = [];
  7988. }
  7989. vm.__next_tick_callbacks.push(function () {
  7990. if (cb) {
  7991. try {
  7992. cb.call(vm);
  7993. } catch (e) {
  7994. handleError(e, vm, 'nextTick');
  7995. }
  7996. } else if (_resolve) {
  7997. _resolve(vm);
  7998. }
  7999. });
  8000. // $flow-disable-line
  8001. if (!cb && typeof Promise !== 'undefined') {
  8002. return new Promise(function (resolve) {
  8003. _resolve = resolve;
  8004. })
  8005. }
  8006. }
  8007. /* */
  8008. function cloneWithData(vm) {
  8009. // 确保当前 vm 所有数据被同步
  8010. var ret = Object.create(null);
  8011. var dataKeys = [].concat(
  8012. Object.keys(vm._data || {}),
  8013. Object.keys(vm._computedWatchers || {}));
  8014. dataKeys.reduce(function(ret, key) {
  8015. ret[key] = vm[key];
  8016. return ret
  8017. }, ret);
  8018. // vue-composition-api
  8019. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8020. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8021. if (rawBindings) {
  8022. Object.keys(rawBindings).forEach(function (key) {
  8023. ret[key] = vm[key];
  8024. });
  8025. }
  8026. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8027. Object.assign(ret, vm.$mp.data || {});
  8028. if (
  8029. Array.isArray(vm.$options.behaviors) &&
  8030. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8031. ) { //form-field
  8032. ret['name'] = vm.name;
  8033. ret['value'] = vm.value;
  8034. }
  8035. return JSON.parse(JSON.stringify(ret))
  8036. }
  8037. var patch = function(oldVnode, vnode) {
  8038. var this$1 = this;
  8039. if (vnode === null) { //destroy
  8040. return
  8041. }
  8042. if (this.mpType === 'page' || this.mpType === 'component') {
  8043. var mpInstance = this.$scope;
  8044. var data = Object.create(null);
  8045. try {
  8046. data = cloneWithData(this);
  8047. } catch (err) {
  8048. console.error(err);
  8049. }
  8050. data.__webviewId__ = mpInstance.data.__webviewId__;
  8051. var mpData = Object.create(null);
  8052. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8053. mpData[key] = mpInstance.data[key];
  8054. });
  8055. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8056. if (Object.keys(diffData).length) {
  8057. if (Object({"VUE_APP_NAME":"wx-app-new","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8058. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8059. ']差量更新',
  8060. JSON.stringify(diffData));
  8061. }
  8062. this.__next_tick_pending = true;
  8063. mpInstance.setData(diffData, function () {
  8064. this$1.__next_tick_pending = false;
  8065. flushCallbacks$1(this$1);
  8066. });
  8067. } else {
  8068. flushCallbacks$1(this);
  8069. }
  8070. }
  8071. };
  8072. /* */
  8073. function createEmptyRender() {
  8074. }
  8075. function mountComponent$1(
  8076. vm,
  8077. el,
  8078. hydrating
  8079. ) {
  8080. if (!vm.mpType) {//main.js 中的 new Vue
  8081. return vm
  8082. }
  8083. if (vm.mpType === 'app') {
  8084. vm.$options.render = createEmptyRender;
  8085. }
  8086. if (!vm.$options.render) {
  8087. vm.$options.render = createEmptyRender;
  8088. if (true) {
  8089. /* istanbul ignore if */
  8090. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8091. vm.$options.el || el) {
  8092. warn(
  8093. 'You are using the runtime-only build of Vue where the template ' +
  8094. 'compiler is not available. Either pre-compile the templates into ' +
  8095. 'render functions, or use the compiler-included build.',
  8096. vm
  8097. );
  8098. } else {
  8099. warn(
  8100. 'Failed to mount component: template or render function not defined.',
  8101. vm
  8102. );
  8103. }
  8104. }
  8105. }
  8106. !vm._$fallback && callHook(vm, 'beforeMount');
  8107. var updateComponent = function () {
  8108. vm._update(vm._render(), hydrating);
  8109. };
  8110. // we set this to vm._watcher inside the watcher's constructor
  8111. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8112. // component's mounted hook), which relies on vm._watcher being already defined
  8113. new Watcher(vm, updateComponent, noop, {
  8114. before: function before() {
  8115. if (vm._isMounted && !vm._isDestroyed) {
  8116. callHook(vm, 'beforeUpdate');
  8117. }
  8118. }
  8119. }, true /* isRenderWatcher */);
  8120. hydrating = false;
  8121. return vm
  8122. }
  8123. /* */
  8124. function renderClass (
  8125. staticClass,
  8126. dynamicClass
  8127. ) {
  8128. if (isDef(staticClass) || isDef(dynamicClass)) {
  8129. return concat(staticClass, stringifyClass(dynamicClass))
  8130. }
  8131. /* istanbul ignore next */
  8132. return ''
  8133. }
  8134. function concat (a, b) {
  8135. return a ? b ? (a + ' ' + b) : a : (b || '')
  8136. }
  8137. function stringifyClass (value) {
  8138. if (Array.isArray(value)) {
  8139. return stringifyArray(value)
  8140. }
  8141. if (isObject(value)) {
  8142. return stringifyObject(value)
  8143. }
  8144. if (typeof value === 'string') {
  8145. return value
  8146. }
  8147. /* istanbul ignore next */
  8148. return ''
  8149. }
  8150. function stringifyArray (value) {
  8151. var res = '';
  8152. var stringified;
  8153. for (var i = 0, l = value.length; i < l; i++) {
  8154. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8155. if (res) { res += ' '; }
  8156. res += stringified;
  8157. }
  8158. }
  8159. return res
  8160. }
  8161. function stringifyObject (value) {
  8162. var res = '';
  8163. for (var key in value) {
  8164. if (value[key]) {
  8165. if (res) { res += ' '; }
  8166. res += key;
  8167. }
  8168. }
  8169. return res
  8170. }
  8171. /* */
  8172. var parseStyleText = cached(function (cssText) {
  8173. var res = {};
  8174. var listDelimiter = /;(?![^(]*\))/g;
  8175. var propertyDelimiter = /:(.+)/;
  8176. cssText.split(listDelimiter).forEach(function (item) {
  8177. if (item) {
  8178. var tmp = item.split(propertyDelimiter);
  8179. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8180. }
  8181. });
  8182. return res
  8183. });
  8184. // normalize possible array / string values into Object
  8185. function normalizeStyleBinding (bindingStyle) {
  8186. if (Array.isArray(bindingStyle)) {
  8187. return toObject(bindingStyle)
  8188. }
  8189. if (typeof bindingStyle === 'string') {
  8190. return parseStyleText(bindingStyle)
  8191. }
  8192. return bindingStyle
  8193. }
  8194. /* */
  8195. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8196. function getTarget(obj, path) {
  8197. var parts = path.split('.');
  8198. var key = parts[0];
  8199. if (key.indexOf('__$n') === 0) { //number index
  8200. key = parseInt(key.replace('__$n', ''));
  8201. }
  8202. if (parts.length === 1) {
  8203. return obj[key]
  8204. }
  8205. return getTarget(obj[key], parts.slice(1).join('.'))
  8206. }
  8207. function internalMixin(Vue) {
  8208. Vue.config.errorHandler = function(err, vm, info) {
  8209. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8210. console.error(err);
  8211. /* eslint-disable no-undef */
  8212. var app = typeof getApp === 'function' && getApp();
  8213. if (app && app.onError) {
  8214. app.onError(err);
  8215. }
  8216. };
  8217. var oldEmit = Vue.prototype.$emit;
  8218. Vue.prototype.$emit = function(event) {
  8219. if (this.$scope && event) {
  8220. this.$scope['triggerEvent'](event, {
  8221. __args__: toArray(arguments, 1)
  8222. });
  8223. }
  8224. return oldEmit.apply(this, arguments)
  8225. };
  8226. Vue.prototype.$nextTick = function(fn) {
  8227. return nextTick$1(this, fn)
  8228. };
  8229. MP_METHODS.forEach(function (method) {
  8230. Vue.prototype[method] = function(args) {
  8231. if (this.$scope && this.$scope[method]) {
  8232. return this.$scope[method](args)
  8233. }
  8234. // mp-alipay
  8235. if (typeof my === 'undefined') {
  8236. return
  8237. }
  8238. if (method === 'createSelectorQuery') {
  8239. /* eslint-disable no-undef */
  8240. return my.createSelectorQuery(args)
  8241. } else if (method === 'createIntersectionObserver') {
  8242. /* eslint-disable no-undef */
  8243. return my.createIntersectionObserver(args)
  8244. }
  8245. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8246. };
  8247. });
  8248. Vue.prototype.__init_provide = initProvide;
  8249. Vue.prototype.__init_injections = initInjections;
  8250. Vue.prototype.__call_hook = function(hook, args) {
  8251. var vm = this;
  8252. // #7573 disable dep collection when invoking lifecycle hooks
  8253. pushTarget();
  8254. var handlers = vm.$options[hook];
  8255. var info = hook + " hook";
  8256. var ret;
  8257. if (handlers) {
  8258. for (var i = 0, j = handlers.length; i < j; i++) {
  8259. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8260. }
  8261. }
  8262. if (vm._hasHookEvent) {
  8263. vm.$emit('hook:' + hook, args);
  8264. }
  8265. popTarget();
  8266. return ret
  8267. };
  8268. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8269. if (Array.isArray(modifiers)) {
  8270. if (modifiers.indexOf('trim') !== -1) {
  8271. value = value.trim();
  8272. }
  8273. if (modifiers.indexOf('number') !== -1) {
  8274. value = this._n(value);
  8275. }
  8276. }
  8277. if (!target) {
  8278. target = this;
  8279. }
  8280. target[key] = value;
  8281. };
  8282. Vue.prototype.__set_sync = function(target, key, value) {
  8283. if (!target) {
  8284. target = this;
  8285. }
  8286. target[key] = value;
  8287. };
  8288. Vue.prototype.__get_orig = function(item) {
  8289. if (isPlainObject(item)) {
  8290. return item['$orig'] || item
  8291. }
  8292. return item
  8293. };
  8294. Vue.prototype.__get_value = function(dataPath, target) {
  8295. return getTarget(target || this, dataPath)
  8296. };
  8297. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8298. return renderClass(staticClass, dynamicClass)
  8299. };
  8300. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8301. if (!dynamicStyle && !staticStyle) {
  8302. return ''
  8303. }
  8304. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8305. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8306. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8307. };
  8308. Vue.prototype.__map = function(val, iteratee) {
  8309. //TODO 暂不考虑 string
  8310. var ret, i, l, keys, key;
  8311. if (Array.isArray(val)) {
  8312. ret = new Array(val.length);
  8313. for (i = 0, l = val.length; i < l; i++) {
  8314. ret[i] = iteratee(val[i], i);
  8315. }
  8316. return ret
  8317. } else if (isObject(val)) {
  8318. keys = Object.keys(val);
  8319. ret = Object.create(null);
  8320. for (i = 0, l = keys.length; i < l; i++) {
  8321. key = keys[i];
  8322. ret[key] = iteratee(val[key], key, i);
  8323. }
  8324. return ret
  8325. } else if (typeof val === 'number') {
  8326. ret = new Array(val);
  8327. for (i = 0, l = val; i < l; i++) {
  8328. // 第一个参数暂时仍和小程序一致
  8329. ret[i] = iteratee(i, i);
  8330. }
  8331. return ret
  8332. }
  8333. return []
  8334. };
  8335. }
  8336. /* */
  8337. var LIFECYCLE_HOOKS$1 = [
  8338. //App
  8339. 'onLaunch',
  8340. 'onShow',
  8341. 'onHide',
  8342. 'onUniNViewMessage',
  8343. 'onPageNotFound',
  8344. 'onThemeChange',
  8345. 'onError',
  8346. 'onUnhandledRejection',
  8347. //Page
  8348. 'onInit',
  8349. 'onLoad',
  8350. // 'onShow',
  8351. 'onReady',
  8352. // 'onHide',
  8353. 'onUnload',
  8354. 'onPullDownRefresh',
  8355. 'onReachBottom',
  8356. 'onTabItemTap',
  8357. 'onAddToFavorites',
  8358. 'onShareTimeline',
  8359. 'onShareAppMessage',
  8360. 'onResize',
  8361. 'onPageScroll',
  8362. 'onNavigationBarButtonTap',
  8363. 'onBackPress',
  8364. 'onNavigationBarSearchInputChanged',
  8365. 'onNavigationBarSearchInputConfirmed',
  8366. 'onNavigationBarSearchInputClicked',
  8367. //Component
  8368. // 'onReady', // 兼容旧版本,应该移除该事件
  8369. 'onPageShow',
  8370. 'onPageHide',
  8371. 'onPageResize'
  8372. ];
  8373. function lifecycleMixin$1(Vue) {
  8374. //fixed vue-class-component
  8375. var oldExtend = Vue.extend;
  8376. Vue.extend = function(extendOptions) {
  8377. extendOptions = extendOptions || {};
  8378. var methods = extendOptions.methods;
  8379. if (methods) {
  8380. Object.keys(methods).forEach(function (methodName) {
  8381. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8382. extendOptions[methodName] = methods[methodName];
  8383. delete methods[methodName];
  8384. }
  8385. });
  8386. }
  8387. return oldExtend.call(this, extendOptions)
  8388. };
  8389. var strategies = Vue.config.optionMergeStrategies;
  8390. var mergeHook = strategies.created;
  8391. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8392. strategies[hook] = mergeHook;
  8393. });
  8394. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8395. }
  8396. /* */
  8397. // install platform patch function
  8398. Vue.prototype.__patch__ = patch;
  8399. // public mount method
  8400. Vue.prototype.$mount = function(
  8401. el ,
  8402. hydrating
  8403. ) {
  8404. return mountComponent$1(this, el, hydrating)
  8405. };
  8406. lifecycleMixin$1(Vue);
  8407. internalMixin(Vue);
  8408. /* */
  8409. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8410. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  8411. /***/ }),
  8412. /***/ 35:
  8413. /*!******************************************************************!*\
  8414. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/mixins/CustomMixins.js ***!
  8415. \******************************************************************/
  8416. /*! no static exports found */
  8417. /***/ (function(module, exports, __webpack_require__) {
  8418. "use strict";
  8419. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  8420. data: function data() {
  8421. return {
  8422. innerAudioContext: null,
  8423. address: '' };
  8424. },
  8425. methods: {
  8426. getLocationInfoByLatLnt: function getLocationInfoByLatLnt(lat, lng) {
  8427. var that = this;
  8428. var locationInfoURL = "https://apis.map.qq.com/ws/geocoder/v1/?location=".concat(lat, ",").concat(lng, "&key=G4BBZ-YSMCJ-56AFX-KD4FQ-23RQZ-S7FX3");
  8429. wx.request({
  8430. url: locationInfoURL, //仅为示例,并非真实的接口地址
  8431. success: function success(res) {
  8432. var resultData = res.data;
  8433. that.address = resultData['result'].address;
  8434. } });
  8435. },
  8436. setTabBarIndex: function setTabBarIndex(index) {
  8437. if (typeof this.$scope.getTabBar === 'function' && this.$scope.getTabBar()) {
  8438. this.$scope.getTabBar().setData({
  8439. selected: index });
  8440. }
  8441. },
  8442. getTimeFuns: function getTimeFuns(sTimeStr, eTimeStr) {
  8443. var sTime = new Date(sTimeStr);
  8444. var eTime = +new Date(eTimeStr); //返回的是用户输入时间总的毫秒数
  8445. var secondTime = (eTime - sTime) / 1000; //剩余时间总的秒数
  8446. var d = parseInt(secondTime / 60 / 60 / 24); //计算天数
  8447. var h = parseInt(secondTime / 60 / 60 % 24); //计算小时
  8448. var m = parseInt(secondTime / 60 % 60); //计算分
  8449. var s = parseInt(secondTime % 60); //计算当前秒数
  8450. return {
  8451. time: Math.abs(d) + '天' + Math.abs(h) + '时' + Math.abs(m) + '分',
  8452. time2: {
  8453. a: d,
  8454. b: h,
  8455. c: m } };
  8456. },
  8457. //播放语音
  8458. createAudio: function createAudio(srcMic) {
  8459. if (this.innerAudioContext) return;
  8460. var that = this;
  8461. //创建内部 audio 上下文 InnerAudioContext 对象。
  8462. that.innerAudioContext = wx.createInnerAudioContext();
  8463. that.innerAudioContext.onError(function (error) {
  8464. console.error("自定义报错(checkedDetail 137行):" + error);
  8465. });
  8466. that.innerAudioContext.src = srcMic; //设置音频地址
  8467. },
  8468. //播放
  8469. audioPlay: function audioPlay(srcMic) {
  8470. this.createAudio(srcMic);
  8471. this.innerAudioContext.play(); //播放音频
  8472. return this.innerAudioContext;
  8473. },
  8474. // 停止播放
  8475. audioPause: function audioPause() {
  8476. if (!this.innerAudioContext) return;
  8477. this.innerAudioContext.pause(); //播放音频
  8478. } } };exports.default = _default;
  8479. /***/ }),
  8480. /***/ 36:
  8481. /*!**********************************************************************!*\
  8482. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/utils/formData/formData.js ***!
  8483. \**********************************************************************/
  8484. /*! no static exports found */
  8485. /***/ (function(module, exports, __webpack_require__) {
  8486. function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}var mimeMap = __webpack_require__(/*! ./mimeMap.js */ 37);
  8487. function FormData() {
  8488. var fileManager = wx.getFileSystemManager();
  8489. var data = {};
  8490. var files = [];
  8491. this.append = function (name, value) {
  8492. data[name] = value;
  8493. return true;
  8494. };
  8495. this.appendFile = function (name, path, fileName) {
  8496. var buffer = fileManager.readFileSync(path);
  8497. if (Object.prototype.toString.call(buffer).indexOf("ArrayBuffer") < 0) {
  8498. return false;
  8499. }
  8500. if (!fileName) {
  8501. fileName = getFileNameFromPath(path);
  8502. }
  8503. files.push({
  8504. name: name,
  8505. buffer: buffer,
  8506. fileName: fileName });
  8507. return true;
  8508. };
  8509. this.getData = function () {return convert(data, files);};
  8510. }
  8511. function getFileNameFromPath(path) {
  8512. var idx = path.lastIndexOf("/");
  8513. return path.substr(idx + 1);
  8514. }
  8515. function convert(data, files) {
  8516. var boundaryKey = 'wxmpFormBoundary' + randString(); // 数据分割符,一般是随机的字符串
  8517. var boundary = '--' + boundaryKey;
  8518. var endBoundary = boundary + '--';
  8519. var postArray = [];
  8520. //拼接参数
  8521. if (data && Object.prototype.toString.call(data) == "[object Object]") {
  8522. for (var key in data) {
  8523. postArray = postArray.concat(formDataArray(boundary, key, data[key]));
  8524. }
  8525. }
  8526. //拼接文件
  8527. if (files && Object.prototype.toString.call(files) == "[object Array]") {
  8528. for (var i in files) {
  8529. var file = files[i];
  8530. postArray = postArray.concat(formDataArray(boundary, file.name, file.buffer, file.fileName));
  8531. }
  8532. }
  8533. //结尾
  8534. var endBoundaryArray = [];
  8535. endBoundaryArray.push.apply(endBoundaryArray, _toConsumableArray(endBoundary.toUtf8Bytes()));
  8536. postArray = postArray.concat(endBoundaryArray);
  8537. return {
  8538. contentType: 'multipart/form-data; boundary=' + boundaryKey,
  8539. buffer: new Uint8Array(postArray).buffer };
  8540. }
  8541. function randString() {
  8542. var res = "";
  8543. for (var i = 0; i < 17; i++) {
  8544. var n = parseInt(Math.random() * 62);
  8545. if (n <= 9) {
  8546. res += n;
  8547. } else
  8548. if (n <= 35) {
  8549. res += String.fromCharCode(n + 55);
  8550. } else
  8551. {
  8552. res += String.fromCharCode(n + 61);
  8553. }
  8554. }
  8555. return res;
  8556. }
  8557. function formDataArray(boundary, name, value, fileName) {var _dataArray, _dataArray2, _dataArray3;
  8558. var dataString = '';
  8559. var isFile = !!fileName;
  8560. dataString += boundary + '\r\n';
  8561. dataString += 'Content-Disposition: form-data; name="' + name + '"';
  8562. if (isFile) {
  8563. dataString += '; filename="' + fileName + '"' + '\r\n';
  8564. dataString += 'Content-Type: ' + getFileMime(fileName) + '\r\n\r\n';
  8565. } else
  8566. {
  8567. dataString += '\r\n\r\n';
  8568. dataString += value;
  8569. }
  8570. var dataArray = [];
  8571. (_dataArray = dataArray).push.apply(_dataArray, _toConsumableArray(dataString.toUtf8Bytes()));
  8572. if (isFile) {
  8573. var fileArray = new Uint8Array(value);
  8574. dataArray = dataArray.concat(Array.prototype.slice.call(fileArray));
  8575. }
  8576. (_dataArray2 = dataArray).push.apply(_dataArray2, _toConsumableArray("\r".toUtf8Bytes()));
  8577. (_dataArray3 = dataArray).push.apply(_dataArray3, _toConsumableArray("\n".toUtf8Bytes()));
  8578. return dataArray;
  8579. }
  8580. function getFileMime(fileName) {
  8581. var idx = fileName.lastIndexOf(".");
  8582. var mime = mimeMap[fileName.substr(idx)];
  8583. return mime ? mime : "application/octet-stream";
  8584. }
  8585. String.prototype.toUtf8Bytes = function () {
  8586. var str = this;
  8587. var bytes = [];
  8588. for (var i = 0; i < str.length; i++) {
  8589. bytes.push.apply(bytes, _toConsumableArray(str.utf8CodeAt(i)));
  8590. if (str.codePointAt(i) > 0xffff) {
  8591. i++;
  8592. }
  8593. }
  8594. return bytes;
  8595. };
  8596. String.prototype.utf8CodeAt = function (i) {
  8597. var str = this;
  8598. var out = [],p = 0;
  8599. var c = str.charCodeAt(i);
  8600. if (c < 128) {
  8601. out[p++] = c;
  8602. } else if (c < 2048) {
  8603. out[p++] = c >> 6 | 192;
  8604. out[p++] = c & 63 | 128;
  8605. } else if (
  8606. (c & 0xFC00) == 0xD800 && i + 1 < str.length &&
  8607. (str.charCodeAt(i + 1) & 0xFC00) == 0xDC00) {
  8608. // Surrogate Pair
  8609. c = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF);
  8610. out[p++] = c >> 18 | 240;
  8611. out[p++] = c >> 12 & 63 | 128;
  8612. out[p++] = c >> 6 & 63 | 128;
  8613. out[p++] = c & 63 | 128;
  8614. } else {
  8615. out[p++] = c >> 12 | 224;
  8616. out[p++] = c >> 6 & 63 | 128;
  8617. out[p++] = c & 63 | 128;
  8618. }
  8619. return out;
  8620. };
  8621. module.exports = FormData;
  8622. /***/ }),
  8623. /***/ 37:
  8624. /*!*********************************************************************!*\
  8625. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/utils/formData/mimeMap.js ***!
  8626. \*********************************************************************/
  8627. /*! no static exports found */
  8628. /***/ (function(module, exports) {
  8629. var _module$exports;function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}module.exports = (_module$exports = {
  8630. "0.001": "application/x-001",
  8631. "0.323": "text/h323",
  8632. "0.907": "drawing/907",
  8633. ".acp": "audio/x-mei-aac",
  8634. ".aif": "audio/aiff",
  8635. ".aiff": "audio/aiff",
  8636. ".asa": "text/asa",
  8637. ".asp": "text/asp",
  8638. ".au": "audio/basic",
  8639. ".awf": "application/vnd.adobe.workflow",
  8640. ".bmp": "application/x-bmp",
  8641. ".c4t": "application/x-c4t",
  8642. ".cal": "application/x-cals",
  8643. ".cdf": "application/x-netcdf",
  8644. ".cel": "application/x-cel",
  8645. ".cg4": "application/x-g4",
  8646. ".cit": "application/x-cit",
  8647. ".cml": "text/xml",
  8648. ".cmx": "application/x-cmx",
  8649. ".crl": "application/pkix-crl",
  8650. ".csi": "application/x-csi",
  8651. ".cut": "application/x-cut",
  8652. ".dbm": "application/x-dbm",
  8653. ".dcd": "text/xml",
  8654. ".der": "application/x-x509-ca-cert",
  8655. ".dib": "application/x-dib",
  8656. ".doc": "application/msword",
  8657. ".drw": "application/x-drw",
  8658. ".dwf": "Model/vnd.dwf",
  8659. ".dwg": "application/x-dwg",
  8660. ".dxf": "application/x-dxf",
  8661. ".emf": "application/x-emf",
  8662. ".ent": "text/xml",
  8663. ".eps": "application/x-ps",
  8664. ".etd": "application/x-ebx",
  8665. ".fax": "image/fax",
  8666. ".fif": "application/fractals",
  8667. ".frm": "application/x-frm",
  8668. ".gbr": "application/x-gbr",
  8669. ".gif": "image/gif",
  8670. ".gp4": "application/x-gp4",
  8671. ".hmr": "application/x-hmr",
  8672. ".hpl": "application/x-hpl",
  8673. ".hrf": "application/x-hrf",
  8674. ".htc": "text/x-component",
  8675. ".html": "text/html",
  8676. ".htx": "text/html",
  8677. ".ico": "image/x-icon",
  8678. ".iff": "application/x-iff",
  8679. ".igs": "application/x-igs",
  8680. ".img": "application/x-img",
  8681. ".isp": "application/x-internet-signup",
  8682. ".java": "java/*",
  8683. ".jpe": "image/jpeg",
  8684. ".jpeg": "image/jpeg",
  8685. ".jpg": "application/x-jpg",
  8686. ".jsp": "text/html",
  8687. ".lar": "application/x-laplayer-reg",
  8688. ".lavs": "audio/x-liquid-secure",
  8689. ".lmsff": "audio/x-la-lms",
  8690. ".ltr": "application/x-ltr",
  8691. ".m2v": "video/x-mpeg",
  8692. ".m4e": "video/mpeg4",
  8693. ".man": "application/x-troff-man",
  8694. ".mdb": "application/msaccess",
  8695. ".mfp": "application/x-shockwave-flash",
  8696. ".mhtml": "message/rfc822",
  8697. ".mid": "audio/mid",
  8698. ".mil": "application/x-mil",
  8699. ".mnd": "audio/x-musicnet-download",
  8700. ".mocha": "application/x-javascript",
  8701. ".mp1": "audio/mp1",
  8702. ".mp2v": "video/mpeg",
  8703. ".mp4": "video/mpeg4",
  8704. ".mpd": "application/vnd.ms-project",
  8705. ".mpeg": "video/mpg",
  8706. ".mpga": "audio/rn-mpeg",
  8707. ".mps": "video/x-mpeg",
  8708. ".mpv": "video/mpg",
  8709. ".mpw": "application/vnd.ms-project",
  8710. ".mtx": "text/xml",
  8711. ".net": "image/pnetvue",
  8712. ".nws": "message/rfc822",
  8713. ".out": "application/x-out",
  8714. ".p12": "application/x-pkcs12",
  8715. ".p7c": "application/pkcs7-mime",
  8716. ".p7r": "application/x-pkcs7-certreqresp",
  8717. ".pc5": "application/x-pc5",
  8718. ".pcl": "application/x-pcl",
  8719. ".pdf": "application/pdf",
  8720. ".pdx": "application/vnd.adobe.pdx",
  8721. ".pgl": "application/x-pgl",
  8722. ".pko": "application/vnd.ms-pki.pko",
  8723. ".plg": "text/html",
  8724. ".plt": "application/x-plt",
  8725. ".png": "application/x-png",
  8726. ".ppa": "application/vnd.ms-powerpoint",
  8727. ".pps": "application/vnd.ms-powerpoint",
  8728. ".ppt": "application/x-ppt",
  8729. ".prf": "application/pics-rules",
  8730. ".prt": "application/x-prt",
  8731. ".ps": "application/postscript",
  8732. ".pwz": "application/vnd.ms-powerpoint",
  8733. ".ra": "audio/vnd.rn-realaudio",
  8734. ".ras": "application/x-ras",
  8735. ".rdf": "text/xml",
  8736. ".red": "application/x-red",
  8737. ".rjs": "application/vnd.rn-realsystem-rjs",
  8738. ".rlc": "application/x-rlc",
  8739. ".rm": "application/vnd.rn-realmedia",
  8740. ".rmi": "audio/mid",
  8741. ".rmm": "audio/x-pn-realaudio",
  8742. ".rms": "application/vnd.rn-realmedia-secure",
  8743. ".rmx": "application/vnd.rn-realsystem-rmx",
  8744. ".rp": "image/vnd.rn-realpix",
  8745. ".rsml": "application/vnd.rn-rsml",
  8746. ".rtf": "application/msword",
  8747. ".rv": "video/vnd.rn-realvideo",
  8748. ".sat": "application/x-sat",
  8749. ".sdw": "application/x-sdw",
  8750. ".slb": "application/x-slb",
  8751. ".slk": "drawing/x-slk",
  8752. ".smil": "application/smil",
  8753. ".snd": "audio/basic",
  8754. ".sor": "text/plain",
  8755. ".spl": "application/futuresplash",
  8756. ".ssm": "application/streamingmedia",
  8757. ".stl": "application/vnd.ms-pki.stl",
  8758. ".sty": "application/x-sty",
  8759. ".swf": "application/x-shockwave-flash",
  8760. ".tg4": "application/x-tg4",
  8761. ".tif": "image/tiff",
  8762. ".tiff": "image/tiff",
  8763. ".top": "drawing/x-top",
  8764. ".tsd": "text/xml",
  8765. ".uin": "application/x-icq",
  8766. ".vcf": "text/x-vcard",
  8767. ".vdx": "application/vnd.visio",
  8768. ".vpg": "application/x-vpeg005",
  8769. ".vsd": "application/x-vsd",
  8770. ".vst": "application/vnd.visio",
  8771. ".vsw": "application/vnd.visio",
  8772. ".vtx": "application/vnd.visio",
  8773. ".wav": "audio/wav",
  8774. ".wb1": "application/x-wb1",
  8775. ".wb3": "application/x-wb3",
  8776. ".wiz": "application/msword",
  8777. ".wk4": "application/x-wk4",
  8778. ".wks": "application/x-wks",
  8779. ".wma": "audio/x-ms-wma",
  8780. ".wmf": "application/x-wmf",
  8781. ".wmv": "video/x-ms-wmv",
  8782. ".wmz": "application/x-ms-wmz",
  8783. ".wpd": "application/x-wpd",
  8784. ".wpl": "application/vnd.ms-wpl",
  8785. ".wr1": "application/x-wr1",
  8786. ".wrk": "application/x-wrk",
  8787. ".ws2": "application/x-ws",
  8788. ".wsdl": "text/xml",
  8789. ".xdp": "application/vnd.adobe.xdp",
  8790. ".xfd": "application/vnd.adobe.xfd",
  8791. ".xhtml": "text/html",
  8792. ".xls": "application/x-xls",
  8793. ".xml": "text/xml",
  8794. ".xq": "text/xml",
  8795. ".xquery": "text/xml",
  8796. ".xsl": "text/xml",
  8797. ".xwd": "application/x-xwd",
  8798. ".sis": "application/vnd.symbian.install",
  8799. ".x_t": "application/x-x_t",
  8800. ".apk": "application/vnd.android.package-archive",
  8801. "0.301": "application/x-301",
  8802. "0.906": "application/x-906",
  8803. ".a11": "application/x-a11",
  8804. ".ai": "application/postscript",
  8805. ".aifc": "audio/aiff",
  8806. ".anv": "application/x-anv",
  8807. ".asf": "video/x-ms-asf",
  8808. ".asx": "video/x-ms-asf",
  8809. ".avi": "video/avi",
  8810. ".biz": "text/xml",
  8811. ".bot": "application/x-bot",
  8812. ".c90": "application/x-c90",
  8813. ".cat": "application/vnd.ms-pki.seccat",
  8814. ".cdr": "application/x-cdr",
  8815. ".cer": "application/x-x509-ca-cert",
  8816. ".cgm": "application/x-cgm",
  8817. ".class": "java/*",
  8818. ".cmp": "application/x-cmp",
  8819. ".cot": "application/x-cot",
  8820. ".crt": "application/x-x509-ca-cert",
  8821. ".css": "text/css",
  8822. ".dbf": "application/x-dbf",
  8823. ".dbx": "application/x-dbx",
  8824. ".dcx": "application/x-dcx",
  8825. ".dgn": "application/x-dgn",
  8826. ".dll": "application/x-msdownload",
  8827. ".dot": "application/msword",
  8828. ".dtd": "text/xml" }, _defineProperty(_module$exports, ".dwf",
  8829. "application/x-dwf"), _defineProperty(_module$exports,
  8830. ".dxb", "application/x-dxb"), _defineProperty(_module$exports,
  8831. ".edn", "application/vnd.adobe.edn"), _defineProperty(_module$exports,
  8832. ".eml", "message/rfc822"), _defineProperty(_module$exports,
  8833. ".epi", "application/x-epi"), _defineProperty(_module$exports, ".eps",
  8834. "application/postscript"), _defineProperty(_module$exports,
  8835. ".exe", "application/x-msdownload"), _defineProperty(_module$exports,
  8836. ".fdf", "application/vnd.fdf"), _defineProperty(_module$exports,
  8837. ".fo", "text/xml"), _defineProperty(_module$exports,
  8838. ".g4", "application/x-g4"), _defineProperty(_module$exports, ".tif",
  8839. "image/tiff"), _defineProperty(_module$exports,
  8840. ".gl2", "application/x-gl2"), _defineProperty(_module$exports,
  8841. ".hgl", "application/x-hgl"), _defineProperty(_module$exports,
  8842. ".hpg", "application/x-hpgl"), _defineProperty(_module$exports,
  8843. ".hqx", "application/mac-binhex40"), _defineProperty(_module$exports,
  8844. ".hta", "application/hta"), _defineProperty(_module$exports,
  8845. ".htm", "text/html"), _defineProperty(_module$exports,
  8846. ".htt", "text/webviewhtml"), _defineProperty(_module$exports,
  8847. ".icb", "application/x-icb"), _defineProperty(_module$exports, ".ico",
  8848. "application/x-ico"), _defineProperty(_module$exports,
  8849. ".ig4", "application/x-g4"), _defineProperty(_module$exports,
  8850. ".iii", "application/x-iphone"), _defineProperty(_module$exports,
  8851. ".ins", "application/x-internet-signup"), _defineProperty(_module$exports,
  8852. ".IVF", "video/x-ivf"), _defineProperty(_module$exports,
  8853. ".jfif", "image/jpeg"), _defineProperty(_module$exports, ".jpe",
  8854. "application/x-jpe"), _defineProperty(_module$exports, ".jpg",
  8855. "image/jpeg"), _defineProperty(_module$exports,
  8856. ".js", "application/x-javascript"), _defineProperty(_module$exports,
  8857. ".la1", "audio/x-liquid-file"), _defineProperty(_module$exports,
  8858. ".latex", "application/x-latex"), _defineProperty(_module$exports,
  8859. ".lbm", "application/x-lbm"), _defineProperty(_module$exports,
  8860. ".ls", "application/x-javascript"), _defineProperty(_module$exports,
  8861. ".m1v", "video/x-mpeg"), _defineProperty(_module$exports,
  8862. ".m3u", "audio/mpegurl"), _defineProperty(_module$exports,
  8863. ".mac", "application/x-mac"), _defineProperty(_module$exports,
  8864. ".math", "text/xml"), _defineProperty(_module$exports, ".mdb",
  8865. "application/x-mdb"), _defineProperty(_module$exports,
  8866. ".mht", "message/rfc822"), _defineProperty(_module$exports,
  8867. ".mi", "application/x-mi"), _defineProperty(_module$exports,
  8868. ".midi", "audio/mid"), _defineProperty(_module$exports,
  8869. ".mml", "text/xml"), _defineProperty(_module$exports,
  8870. ".mns", "audio/x-musicnet-stream"), _defineProperty(_module$exports,
  8871. ".movie", "video/x-sgi-movie"), _defineProperty(_module$exports,
  8872. ".mp2", "audio/mp2"), _defineProperty(_module$exports,
  8873. ".mp3", "audio/mp3"), _defineProperty(_module$exports,
  8874. ".mpa", "video/x-mpg"), _defineProperty(_module$exports,
  8875. ".mpe", "video/x-mpeg"), _defineProperty(_module$exports,
  8876. ".mpg", "video/mpg"), _defineProperty(_module$exports,
  8877. ".mpp", "application/vnd.ms-project"), _defineProperty(_module$exports,
  8878. ".mpt", "application/vnd.ms-project"), _defineProperty(_module$exports,
  8879. ".mpv2", "video/mpeg"), _defineProperty(_module$exports,
  8880. ".mpx", "application/vnd.ms-project"), _defineProperty(_module$exports,
  8881. ".mxp", "application/x-mmxp"), _defineProperty(_module$exports,
  8882. ".nrf", "application/x-nrf"), _defineProperty(_module$exports,
  8883. ".odc", "text/x-ms-odc"), _defineProperty(_module$exports,
  8884. ".p10", "application/pkcs10"), _defineProperty(_module$exports,
  8885. ".p7b", "application/x-pkcs7-certificates"), _defineProperty(_module$exports,
  8886. ".p7m", "application/pkcs7-mime"), _defineProperty(_module$exports,
  8887. ".p7s", "application/pkcs7-signature"), _defineProperty(_module$exports,
  8888. ".pci", "application/x-pci"), _defineProperty(_module$exports,
  8889. ".pcx", "application/x-pcx"), _defineProperty(_module$exports, ".pdf",
  8890. "application/pdf"), _defineProperty(_module$exports,
  8891. ".pfx", "application/x-pkcs12"), _defineProperty(_module$exports,
  8892. ".pic", "application/x-pic"), _defineProperty(_module$exports,
  8893. ".pl", "application/x-perl"), _defineProperty(_module$exports,
  8894. ".pls", "audio/scpls"), _defineProperty(_module$exports, ".png",
  8895. "image/png"), _defineProperty(_module$exports,
  8896. ".pot", "application/vnd.ms-powerpoint"), _defineProperty(_module$exports,
  8897. ".ppm", "application/x-ppm"), _defineProperty(_module$exports, ".ppt",
  8898. "application/vnd.ms-powerpoint"), _defineProperty(_module$exports,
  8899. ".pr", "application/x-pr"), _defineProperty(_module$exports,
  8900. ".prn", "application/x-prn"), _defineProperty(_module$exports, ".ps",
  8901. "application/x-ps"), _defineProperty(_module$exports,
  8902. ".ptn", "application/x-ptn"), _defineProperty(_module$exports,
  8903. ".r3t", "text/vnd.rn-realtext3d"), _defineProperty(_module$exports,
  8904. ".ram", "audio/x-pn-realaudio"), _defineProperty(_module$exports,
  8905. ".rat", "application/rat-file"), _defineProperty(_module$exports,
  8906. ".rec", "application/vnd.rn-recording"), _defineProperty(_module$exports,
  8907. ".rgb", "application/x-rgb"), _defineProperty(_module$exports,
  8908. ".rjt", "application/vnd.rn-realsystem-rjt"), _defineProperty(_module$exports,
  8909. ".rle", "application/x-rle"), _defineProperty(_module$exports,
  8910. ".rmf", "application/vnd.adobe.rmf"), _defineProperty(_module$exports,
  8911. ".rmj", "application/vnd.rn-realsystem-rmj"), _defineProperty(_module$exports,
  8912. ".rmp", "application/vnd.rn-rn_music_package"), _defineProperty(_module$exports,
  8913. ".rmvb", "application/vnd.rn-realmedia-vbr"), _defineProperty(_module$exports,
  8914. ".rnx", "application/vnd.rn-realplayer"), _defineProperty(_module$exports,
  8915. ".rpm", "audio/x-pn-realaudio-plugin"), _defineProperty(_module$exports,
  8916. ".rt", "text/vnd.rn-realtext"), _defineProperty(_module$exports, ".rtf",
  8917. "application/x-rtf"), _defineProperty(_module$exports,
  8918. ".sam", "application/x-sam"), _defineProperty(_module$exports,
  8919. ".sdp", "application/sdp"), _defineProperty(_module$exports,
  8920. ".sit", "application/x-stuffit"), _defineProperty(_module$exports,
  8921. ".sld", "application/x-sld"), _defineProperty(_module$exports,
  8922. ".smi", "application/smil"), _defineProperty(_module$exports,
  8923. ".smk", "application/x-smk"), _defineProperty(_module$exports,
  8924. ".sol", "text/plain"), _defineProperty(_module$exports,
  8925. ".spc", "application/x-pkcs7-certificates"), _defineProperty(_module$exports,
  8926. ".spp", "text/xml"), _defineProperty(_module$exports,
  8927. ".sst", "application/vnd.ms-pki.certstore"), _defineProperty(_module$exports,
  8928. ".stm", "text/html"), _defineProperty(_module$exports,
  8929. ".svg", "text/xml"), _defineProperty(_module$exports,
  8930. ".tdf", "application/x-tdf"), _defineProperty(_module$exports,
  8931. ".tga", "application/x-tga"), _defineProperty(_module$exports, ".tif",
  8932. "application/x-tif"), _defineProperty(_module$exports,
  8933. ".tld", "text/xml"), _defineProperty(_module$exports,
  8934. ".torrent", "application/x-bittorrent"), _defineProperty(_module$exports,
  8935. ".txt", "text/plain"), _defineProperty(_module$exports,
  8936. ".uls", "text/iuls"), _defineProperty(_module$exports,
  8937. ".vda", "application/x-vda"), _defineProperty(_module$exports,
  8938. ".vml", "text/xml"), _defineProperty(_module$exports, ".vsd",
  8939. "application/vnd.visio"), _defineProperty(_module$exports,
  8940. ".vss", "application/vnd.visio"), _defineProperty(_module$exports, ".vst",
  8941. "application/x-vst"), _defineProperty(_module$exports,
  8942. ".vsx", "application/vnd.visio"), _defineProperty(_module$exports,
  8943. ".vxml", "text/xml"), _defineProperty(_module$exports,
  8944. ".wax", "audio/x-ms-wax"), _defineProperty(_module$exports,
  8945. ".wb2", "application/x-wb2"), _defineProperty(_module$exports,
  8946. ".wbmp", "image/vnd.wap.wbmp"), _defineProperty(_module$exports,
  8947. ".wk3", "application/x-wk3"), _defineProperty(_module$exports,
  8948. ".wkq", "application/x-wkq"), _defineProperty(_module$exports,
  8949. ".wm", "video/x-ms-wm"), _defineProperty(_module$exports,
  8950. ".wmd", "application/x-ms-wmd"), _defineProperty(_module$exports,
  8951. ".wml", "text/vnd.wap.wml"), _defineProperty(_module$exports,
  8952. ".wmx", "video/x-ms-wmx"), _defineProperty(_module$exports,
  8953. ".wp6", "application/x-wp6"), _defineProperty(_module$exports,
  8954. ".wpg", "application/x-wpg"), _defineProperty(_module$exports,
  8955. ".wq1", "application/x-wq1"), _defineProperty(_module$exports,
  8956. ".wri", "application/x-wri"), _defineProperty(_module$exports,
  8957. ".ws", "application/x-ws"), _defineProperty(_module$exports,
  8958. ".wsc", "text/scriptlet"), _defineProperty(_module$exports,
  8959. ".wvx", "video/x-ms-wvx"), _defineProperty(_module$exports,
  8960. ".xdr", "text/xml"), _defineProperty(_module$exports,
  8961. ".xfdf", "application/vnd.adobe.xfdf"), _defineProperty(_module$exports, ".xls",
  8962. "application/vnd.ms-excel"), _defineProperty(_module$exports,
  8963. ".xlw", "application/x-xlw"), _defineProperty(_module$exports,
  8964. ".xpl", "audio/scpls"), _defineProperty(_module$exports,
  8965. ".xql", "text/xml"), _defineProperty(_module$exports,
  8966. ".xsd", "text/xml"), _defineProperty(_module$exports,
  8967. ".xslt", "text/xml"), _defineProperty(_module$exports,
  8968. ".x_b", "application/x-x_b"), _defineProperty(_module$exports,
  8969. ".sisx", "application/vnd.symbian.install"), _defineProperty(_module$exports,
  8970. ".ipa", "application/vnd.iphone"), _defineProperty(_module$exports,
  8971. ".xap", "application/x-silverlight-app"), _defineProperty(_module$exports,
  8972. ".zip", "application/x-zip-compressed"), _module$exports);
  8973. /***/ }),
  8974. /***/ 4:
  8975. /*!*************************************************************!*\
  8976. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  8977. \*************************************************************/
  8978. /*! no static exports found */
  8979. /***/ (function(module, exports, __webpack_require__) {
  8980. "use strict";
  8981. /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var isArray = Array.isArray;
  8982. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  8983. var defaultDelimiters = ['{', '}'];var
  8984. BaseFormatter = /*#__PURE__*/function () {
  8985. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  8986. this._caches = Object.create(null);
  8987. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  8988. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  8989. if (!values) {
  8990. return [message];
  8991. }
  8992. var tokens = this._caches[message];
  8993. if (!tokens) {
  8994. tokens = parse(message, delimiters);
  8995. this._caches[message] = tokens;
  8996. }
  8997. return compile(tokens, values);
  8998. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  8999. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  9000. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  9001. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  9002. var tokens = [];
  9003. var position = 0;
  9004. var text = '';
  9005. while (position < format.length) {
  9006. var char = format[position++];
  9007. if (char === startDelimiter) {
  9008. if (text) {
  9009. tokens.push({ type: 'text', value: text });
  9010. }
  9011. text = '';
  9012. var sub = '';
  9013. char = format[position++];
  9014. while (char !== undefined && char !== endDelimiter) {
  9015. sub += char;
  9016. char = format[position++];
  9017. }
  9018. var isClosed = char === endDelimiter;
  9019. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  9020. 'list' :
  9021. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  9022. 'named' :
  9023. 'unknown';
  9024. tokens.push({ value: sub, type: type });
  9025. }
  9026. // else if (char === '%') {
  9027. // // when found rails i18n syntax, skip text capture
  9028. // if (format[position] !== '{') {
  9029. // text += char
  9030. // }
  9031. // }
  9032. else {
  9033. text += char;
  9034. }
  9035. }
  9036. text && tokens.push({ type: 'text', value: text });
  9037. return tokens;
  9038. }
  9039. function compile(tokens, values) {
  9040. var compiled = [];
  9041. var index = 0;
  9042. var mode = isArray(values) ?
  9043. 'list' :
  9044. isObject(values) ?
  9045. 'named' :
  9046. 'unknown';
  9047. if (mode === 'unknown') {
  9048. return compiled;
  9049. }
  9050. while (index < tokens.length) {
  9051. var token = tokens[index];
  9052. switch (token.type) {
  9053. case 'text':
  9054. compiled.push(token.value);
  9055. break;
  9056. case 'list':
  9057. compiled.push(values[parseInt(token.value, 10)]);
  9058. break;
  9059. case 'named':
  9060. if (mode === 'named') {
  9061. compiled.push(values[token.value]);
  9062. } else
  9063. {
  9064. if (true) {
  9065. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  9066. }
  9067. }
  9068. break;
  9069. case 'unknown':
  9070. if (true) {
  9071. console.warn("Detect 'unknown' type of token!");
  9072. }
  9073. break;}
  9074. index++;
  9075. }
  9076. return compiled;
  9077. }
  9078. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  9079. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  9080. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  9081. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  9082. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  9083. var hasOwnProperty = Object.prototype.hasOwnProperty;
  9084. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  9085. var defaultFormatter = new BaseFormatter();
  9086. function include(str, parts) {
  9087. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  9088. }
  9089. function startsWith(str, parts) {
  9090. return parts.find(function (part) {return str.indexOf(part) === 0;});
  9091. }
  9092. function normalizeLocale(locale, messages) {
  9093. if (!locale) {
  9094. return;
  9095. }
  9096. locale = locale.trim().replace(/_/g, '-');
  9097. if (messages && messages[locale]) {
  9098. return locale;
  9099. }
  9100. locale = locale.toLowerCase();
  9101. if (locale.indexOf('zh') === 0) {
  9102. if (locale.indexOf('-hans') > -1) {
  9103. return LOCALE_ZH_HANS;
  9104. }
  9105. if (locale.indexOf('-hant') > -1) {
  9106. return LOCALE_ZH_HANT;
  9107. }
  9108. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  9109. return LOCALE_ZH_HANT;
  9110. }
  9111. return LOCALE_ZH_HANS;
  9112. }
  9113. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  9114. if (lang) {
  9115. return lang;
  9116. }
  9117. }var
  9118. I18n = /*#__PURE__*/function () {
  9119. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  9120. this.locale = LOCALE_EN;
  9121. this.fallbackLocale = LOCALE_EN;
  9122. this.message = {};
  9123. this.messages = {};
  9124. this.watchers = [];
  9125. if (fallbackLocale) {
  9126. this.fallbackLocale = fallbackLocale;
  9127. }
  9128. this.formater = formater || defaultFormatter;
  9129. this.messages = messages || {};
  9130. this.setLocale(locale || LOCALE_EN);
  9131. if (watcher) {
  9132. this.watchLocale(watcher);
  9133. }
  9134. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  9135. locale) {var _this = this;
  9136. var oldLocale = this.locale;
  9137. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  9138. if (!this.messages[this.locale]) {
  9139. // 可能初始化时不存在
  9140. this.messages[this.locale] = {};
  9141. }
  9142. this.message = this.messages[this.locale];
  9143. // 仅发生变化时,通知
  9144. if (oldLocale !== this.locale) {
  9145. this.watchers.forEach(function (watcher) {
  9146. watcher(_this.locale, oldLocale);
  9147. });
  9148. }
  9149. } }, { key: "getLocale", value: function getLocale()
  9150. {
  9151. return this.locale;
  9152. } }, { key: "watchLocale", value: function watchLocale(
  9153. fn) {var _this2 = this;
  9154. var index = this.watchers.push(fn) - 1;
  9155. return function () {
  9156. _this2.watchers.splice(index, 1);
  9157. };
  9158. } }, { key: "add", value: function add(
  9159. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  9160. var curMessages = this.messages[locale];
  9161. if (curMessages) {
  9162. if (override) {
  9163. Object.assign(curMessages, message);
  9164. } else
  9165. {
  9166. Object.keys(message).forEach(function (key) {
  9167. if (!hasOwn(curMessages, key)) {
  9168. curMessages[key] = message[key];
  9169. }
  9170. });
  9171. }
  9172. } else
  9173. {
  9174. this.messages[locale] = message;
  9175. }
  9176. } }, { key: "f", value: function f(
  9177. message, values, delimiters) {
  9178. return this.formater.interpolate(message, values, delimiters).join('');
  9179. } }, { key: "t", value: function t(
  9180. key, locale, values) {
  9181. var message = this.message;
  9182. if (typeof locale === 'string') {
  9183. locale = normalizeLocale(locale, this.messages);
  9184. locale && (message = this.messages[locale]);
  9185. } else
  9186. {
  9187. values = locale;
  9188. }
  9189. if (!hasOwn(message, key)) {
  9190. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  9191. return key;
  9192. }
  9193. return this.formater.interpolate(message[key], values).join('');
  9194. } }]);return I18n;}();exports.I18n = I18n;
  9195. function watchAppLocale(appVm, i18n) {
  9196. // 需要保证 watch 的触发在组件渲染之前
  9197. if (appVm.$watchLocale) {
  9198. // vue2
  9199. appVm.$watchLocale(function (newLocale) {
  9200. i18n.setLocale(newLocale);
  9201. });
  9202. } else
  9203. {
  9204. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  9205. i18n.setLocale(newLocale);
  9206. });
  9207. }
  9208. }
  9209. function getDefaultLocale() {
  9210. if (typeof uni !== 'undefined' && uni.getLocale) {
  9211. return uni.getLocale();
  9212. }
  9213. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  9214. if (typeof global !== 'undefined' && global.getLocale) {
  9215. return global.getLocale();
  9216. }
  9217. return LOCALE_EN;
  9218. }
  9219. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  9220. // 兼容旧版本入参
  9221. if (typeof locale !== 'string') {var _ref4 =
  9222. [
  9223. messages,
  9224. locale];locale = _ref4[0];messages = _ref4[1];
  9225. }
  9226. if (typeof locale !== 'string') {
  9227. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  9228. locale = getDefaultLocale();
  9229. }
  9230. if (typeof fallbackLocale !== 'string') {
  9231. fallbackLocale =
  9232. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  9233. LOCALE_EN;
  9234. }
  9235. var i18n = new I18n({
  9236. locale: locale,
  9237. fallbackLocale: fallbackLocale,
  9238. messages: messages,
  9239. watcher: watcher });
  9240. var _t = function t(key, values) {
  9241. if (typeof getApp !== 'function') {
  9242. // app view
  9243. /* eslint-disable no-func-assign */
  9244. _t = function t(key, values) {
  9245. return i18n.t(key, values);
  9246. };
  9247. } else
  9248. {
  9249. var isWatchedAppLocale = false;
  9250. _t = function t(key, values) {
  9251. var appVm = getApp().$vm;
  9252. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  9253. // options: {
  9254. // type: Array,
  9255. // default () {
  9256. // return [{
  9257. // icon: 'shop',
  9258. // text: t("uni-goods-nav.options.shop"),
  9259. // }, {
  9260. // icon: 'cart',
  9261. // text: t("uni-goods-nav.options.cart")
  9262. // }]
  9263. // }
  9264. // },
  9265. if (appVm) {
  9266. // 触发响应式
  9267. appVm.$locale;
  9268. if (!isWatchedAppLocale) {
  9269. isWatchedAppLocale = true;
  9270. watchAppLocale(appVm, i18n);
  9271. }
  9272. }
  9273. return i18n.t(key, values);
  9274. };
  9275. }
  9276. return _t(key, values);
  9277. };
  9278. return {
  9279. i18n: i18n,
  9280. f: function f(message, values, delimiters) {
  9281. return i18n.f(message, values, delimiters);
  9282. },
  9283. t: function t(key, values) {
  9284. return _t(key, values);
  9285. },
  9286. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  9287. return i18n.add(locale, message, override);
  9288. },
  9289. watch: function watch(fn) {
  9290. return i18n.watchLocale(fn);
  9291. },
  9292. getLocale: function getLocale() {
  9293. return i18n.getLocale();
  9294. },
  9295. setLocale: function setLocale(newLocale) {
  9296. return i18n.setLocale(newLocale);
  9297. } };
  9298. }
  9299. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  9300. var formater;
  9301. function hasI18nJson(jsonObj, delimiters) {
  9302. if (!formater) {
  9303. formater = new BaseFormatter();
  9304. }
  9305. return walkJsonObj(jsonObj, function (jsonObj, key) {
  9306. var value = jsonObj[key];
  9307. if (isString(value)) {
  9308. if (isI18nStr(value, delimiters)) {
  9309. return true;
  9310. }
  9311. } else
  9312. {
  9313. return hasI18nJson(value, delimiters);
  9314. }
  9315. });
  9316. }
  9317. function parseI18nJson(jsonObj, values, delimiters) {
  9318. if (!formater) {
  9319. formater = new BaseFormatter();
  9320. }
  9321. walkJsonObj(jsonObj, function (jsonObj, key) {
  9322. var value = jsonObj[key];
  9323. if (isString(value)) {
  9324. if (isI18nStr(value, delimiters)) {
  9325. jsonObj[key] = compileStr(value, values, delimiters);
  9326. }
  9327. } else
  9328. {
  9329. parseI18nJson(value, values, delimiters);
  9330. }
  9331. });
  9332. return jsonObj;
  9333. }
  9334. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  9335. if (!isI18nStr(jsonStr, delimiters)) {
  9336. return jsonStr;
  9337. }
  9338. if (!formater) {
  9339. formater = new BaseFormatter();
  9340. }
  9341. var localeValues = [];
  9342. Object.keys(locales).forEach(function (name) {
  9343. if (name !== locale) {
  9344. localeValues.push({
  9345. locale: name,
  9346. values: locales[name] });
  9347. }
  9348. });
  9349. localeValues.unshift({ locale: locale, values: locales[locale] });
  9350. try {
  9351. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  9352. }
  9353. catch (e) {}
  9354. return jsonStr;
  9355. }
  9356. function isI18nStr(value, delimiters) {
  9357. return value.indexOf(delimiters[0]) > -1;
  9358. }
  9359. function compileStr(value, values, delimiters) {
  9360. return formater.interpolate(value, values, delimiters).join('');
  9361. }
  9362. function compileValue(jsonObj, key, localeValues, delimiters) {
  9363. var value = jsonObj[key];
  9364. if (isString(value)) {
  9365. // 存在国际化
  9366. if (isI18nStr(value, delimiters)) {
  9367. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  9368. if (localeValues.length > 1) {
  9369. // 格式化国际化语言
  9370. var valueLocales = jsonObj[key + 'Locales'] = {};
  9371. localeValues.forEach(function (localValue) {
  9372. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  9373. });
  9374. }
  9375. }
  9376. } else
  9377. {
  9378. compileJsonObj(value, localeValues, delimiters);
  9379. }
  9380. }
  9381. function compileJsonObj(jsonObj, localeValues, delimiters) {
  9382. walkJsonObj(jsonObj, function (jsonObj, key) {
  9383. compileValue(jsonObj, key, localeValues, delimiters);
  9384. });
  9385. return jsonObj;
  9386. }
  9387. function walkJsonObj(jsonObj, walk) {
  9388. if (isArray(jsonObj)) {
  9389. for (var i = 0; i < jsonObj.length; i++) {
  9390. if (walk(jsonObj, i)) {
  9391. return true;
  9392. }
  9393. }
  9394. } else
  9395. if (isObject(jsonObj)) {
  9396. for (var key in jsonObj) {
  9397. if (walk(jsonObj, key)) {
  9398. return true;
  9399. }
  9400. }
  9401. }
  9402. return false;
  9403. }
  9404. function resolveLocale(locales) {
  9405. return function (locale) {
  9406. if (!locale) {
  9407. return locale;
  9408. }
  9409. locale = normalizeLocale(locale) || locale;
  9410. return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
  9411. };
  9412. }
  9413. function resolveLocaleChain(locale) {
  9414. var chain = [];
  9415. var tokens = locale.split('-');
  9416. while (tokens.length) {
  9417. chain.push(tokens.join('-'));
  9418. tokens.pop();
  9419. }
  9420. return chain;
  9421. }
  9422. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  9423. /***/ }),
  9424. /***/ 5:
  9425. /*!******************************************************!*\
  9426. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/pages.json ***!
  9427. \******************************************************/
  9428. /*! no static exports found */
  9429. /***/ (function(module, exports) {
  9430. /***/ }),
  9431. /***/ 81:
  9432. /*!************************************************************************************!*\
  9433. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  9434. \************************************************************************************/
  9435. /*! no static exports found */
  9436. /***/ (function(module, exports, __webpack_require__) {
  9437. "use strict";
  9438. /* WEBPACK VAR INJECTION */(function(global, uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 82));var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 4);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _createForOfIteratorHelper(o, allowArrayLike) {var it;if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {if (it) o = it;var i = 0;var F = function F() {};return { s: F, n: function n() {if (i >= o.length) return { done: true };return { done: false, value: o[i++] };}, e: function e(_e25) {throw _e25;}, f: F };}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion = true,didErr = false,err;return { s: function s() {it = o[Symbol.iterator]();}, n: function n() {var step = it.next();normalCompletion = step.done;return step;}, e: function e(_e26) {didErr = true;err = _e26;}, f: function f() {try {if (!normalCompletion && it.return != null) it.return();} finally {if (didErr) throw err;}} };}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _inherits(subClass, superClass) {if (typeof superClass !== "function" && superClass !== null) {throw new TypeError("Super expression must either be null or a function");}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);}function _createSuper(Derived) {var hasNativeReflectConstruct = _isNativeReflectConstruct();return function _createSuperInternal() {var Super = _getPrototypeOf(Derived),result;if (hasNativeReflectConstruct) {var NewTarget = _getPrototypeOf(this).constructor;result = Reflect.construct(Super, arguments, NewTarget);} else {result = Super.apply(this, arguments);}return _possibleConstructorReturn(this, result);};}function _possibleConstructorReturn(self, call) {if (call && (typeof call === "object" || typeof call === "function")) {return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self) {if (self === void 0) {throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _wrapNativeSuper(Class) {var _cache = typeof Map === "function" ? new Map() : undefined;_wrapNativeSuper = function _wrapNativeSuper(Class) {if (Class === null || !_isNativeFunction(Class)) return Class;if (typeof Class !== "function") {throw new TypeError("Super expression must either be null or a function");}if (typeof _cache !== "undefined") {if (_cache.has(Class)) return _cache.get(Class);_cache.set(Class, Wrapper);}function Wrapper() {return _construct(Class, arguments, _getPrototypeOf(this).constructor);}Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } });return _setPrototypeOf(Wrapper, Class);};return _wrapNativeSuper(Class);}function _construct(Parent, args, Class) {if (_isNativeReflectConstruct()) {_construct = Reflect.construct;} else {_construct = function _construct(Parent, args, Class) {var a = [null];a.push.apply(a, args);var Constructor = Function.bind.apply(Parent, a);var instance = new Constructor();if (Class) _setPrototypeOf(instance, Class.prototype);return instance;};}return _construct.apply(null, arguments);}function _isNativeReflectConstruct() {if (typeof Reflect === "undefined" || !Reflect.construct) return false;if (Reflect.construct.sham) return false;if (typeof Proxy === "function") return true;try {Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));return true;} catch (e) {return false;}}function _isNativeFunction(fn) {return Function.toString.call(fn).indexOf("[native code]") !== -1;}function _setPrototypeOf(o, p) {_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {o.__proto__ = p;return o;};return _setPrototypeOf(o, p);}function _getPrototypeOf(o) {_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {return o.__proto__ || Object.getPrototypeOf(o);};return _getPrototypeOf(o);}"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;function t(e) {return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;}function n(e, t, n) {return e(n = { path: t, exports: {}, require: function require(e, t) {return function () {throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");}(null == t && n.path);} }, n.exports), n.exports;}var s = n(function (e, t) {var n;e.exports = (n = n || function (e, t) {var n = Object.create || function () {function e() {}return function (t) {var n;return e.prototype = t, n = new e(), e.prototype = null, n;};}(),s = {},r = s.lib = {},o = r.Base = { extend: function extend(e) {var t = n(this);return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {t.$super.init.apply(this, arguments);}), t.init.prototype = t, t.$super = this, t;}, create: function create() {var e = this.extend();return e.init.apply(e, arguments), e;}, init: function init() {}, mixIn: function mixIn(e) {for (var t in e) {e.hasOwnProperty(t) && (this[t] = e[t]);}e.hasOwnProperty("toString") && (this.toString = e.toString);}, clone: function clone() {return this.init.prototype.extend(this);} },i = r.WordArray = o.extend({ init: function init(e, n) {e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;}, toString: function toString(e) {return (e || c).stringify(this);}, concat: function concat(e) {var t = this.words,n = e.words,s = this.sigBytes,r = e.sigBytes;if (this.clamp(), s % 4) for (var o = 0; o < r; o++) {var i = n[o >>> 2] >>> 24 - o % 4 * 8 & 255;t[s + o >>> 2] |= i << 24 - (s + o) % 4 * 8;} else for (o = 0; o < r; o += 4) {t[s + o >>> 2] = n[o >>> 2];}return this.sigBytes += r, this;}, clamp: function clamp() {var t = this.words,n = this.sigBytes;t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);}, clone: function clone() {var e = o.clone.call(this);return e.words = this.words.slice(0), e;}, random: function random(t) {for (var n, s = [], r = function r(t) {t = t;var n = 987654321,s = 4294967295;return function () {var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);};}, o = 0; o < t; o += 4) {var a = r(4294967296 * (n || e.random()));n = 987654071 * a(), s.push(4294967296 * a() | 0);}return new i.init(s, t);} }),a = s.enc = {},c = a.Hex = { stringify: function stringify(e) {for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {var o = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;s.push((o >>> 4).toString(16)), s.push((15 & o).toString(16));}return s.join("");}, parse: function parse(e) {for (var t = e.length, n = [], s = 0; s < t; s += 2) {n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;}return new i.init(n, t / 2);} },u = a.Latin1 = { stringify: function stringify(e) {for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {var o = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;s.push(String.fromCharCode(o));}return s.join("");}, parse: function parse(e) {for (var t = e.length, n = [], s = 0; s < t; s++) {n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;}return new i.init(n, t);} },h = a.Utf8 = { stringify: function stringify(e) {try {return decodeURIComponent(escape(u.stringify(e)));} catch (e) {throw new Error("Malformed UTF-8 data");}}, parse: function parse(e) {return u.parse(unescape(encodeURIComponent(e)));} },l = r.BufferedBlockAlgorithm = o.extend({ reset: function reset() {this._data = new i.init(), this._nDataBytes = 0;}, _append: function _append(e) {"string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;}, _process: function _process(t) {var n = this._data,s = n.words,r = n.sigBytes,o = this.blockSize,a = r / (4 * o),c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * o,u = e.min(4 * c, r);if (c) {for (var h = 0; h < c; h += o) {this._doProcessBlock(s, h);}var l = s.splice(0, c);n.sigBytes -= u;}return new i.init(l, u);}, clone: function clone() {var e = o.clone.call(this);return e._data = this._data.clone(), e;}, _minBufferSize: 0 }),d = (r.Hasher = l.extend({ cfg: o.extend(), init: function init(e) {this.cfg = this.cfg.extend(e), this.reset();}, reset: function reset() {l.reset.call(this), this._doReset();}, update: function update(e) {return this._append(e), this._process(), this;}, finalize: function finalize(e) {return e && this._append(e), this._doFinalize();}, blockSize: 16, _createHelper: function _createHelper(e) {return function (t, n) {return new e.init(n).finalize(t);};}, _createHmacHelper: function _createHmacHelper(e) {return function (t, n) {return new d.HMAC.init(e, n).finalize(t);};} }), s.algo = {});return s;}(Math), n);}),r = (n(function (e, t) {var n;e.exports = (n = s, function (e) {var t = n,s = t.lib,r = s.WordArray,o = s.Hasher,i = t.algo,a = [];!function () {for (var t = 0; t < 64; t++) {a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;}}();var c = i.MD5 = o.extend({ _doReset: function _doReset() {this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);}, _doProcessBlock: function _doProcessBlock(e, t) {for (var n = 0; n < 16; n++) {var s = t + n,r = e[s];e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);}var o = this._hash.words,i = e[t + 0],c = e[t + 1],f = e[t + 2],p = e[t + 3],g = e[t + 4],m = e[t + 5],y = e[t + 6],_ = e[t + 7],w = e[t + 8],k = e[t + 9],S = e[t + 10],v = e[t + 11],T = e[t + 12],P = e[t + 13],A = e[t + 14],I = e[t + 15],E = o[0],b = o[1],O = o[2],U = o[3];E = u(E, b, O, U, i, 7, a[0]), U = u(U, E, b, O, c, 12, a[1]), O = u(O, U, E, b, f, 17, a[2]), b = u(b, O, U, E, p, 22, a[3]), E = u(E, b, O, U, g, 7, a[4]), U = u(U, E, b, O, m, 12, a[5]), O = u(O, U, E, b, y, 17, a[6]), b = u(b, O, U, E, _, 22, a[7]), E = u(E, b, O, U, w, 7, a[8]), U = u(U, E, b, O, k, 12, a[9]), O = u(O, U, E, b, S, 17, a[10]), b = u(b, O, U, E, v, 22, a[11]), E = u(E, b, O, U, T, 7, a[12]), U = u(U, E, b, O, P, 12, a[13]), O = u(O, U, E, b, A, 17, a[14]), E = h(E, b = u(b, O, U, E, I, 22, a[15]), O, U, c, 5, a[16]), U = h(U, E, b, O, y, 9, a[17]), O = h(O, U, E, b, v, 14, a[18]), b = h(b, O, U, E, i, 20, a[19]), E = h(E, b, O, U, m, 5, a[20]), U = h(U, E, b, O, S, 9, a[21]), O = h(O, U, E, b, I, 14, a[22]), b = h(b, O, U, E, g, 20, a[23]), E = h(E, b, O, U, k, 5, a[24]), U = h(U, E, b, O, A, 9, a[25]), O = h(O, U, E, b, p, 14, a[26]), b = h(b, O, U, E, w, 20, a[27]), E = h(E, b, O, U, P, 5, a[28]), U = h(U, E, b, O, f, 9, a[29]), O = h(O, U, E, b, _, 14, a[30]), E = l(E, b = h(b, O, U, E, T, 20, a[31]), O, U, m, 4, a[32]), U = l(U, E, b, O, w, 11, a[33]), O = l(O, U, E, b, v, 16, a[34]), b = l(b, O, U, E, A, 23, a[35]), E = l(E, b, O, U, c, 4, a[36]), U = l(U, E, b, O, g, 11, a[37]), O = l(O, U, E, b, _, 16, a[38]), b = l(b, O, U, E, S, 23, a[39]), E = l(E, b, O, U, P, 4, a[40]), U = l(U, E, b, O, i, 11, a[41]), O = l(O, U, E, b, p, 16, a[42]), b = l(b, O, U, E, y, 23, a[43]), E = l(E, b, O, U, k, 4, a[44]), U = l(U, E, b, O, T, 11, a[45]), O = l(O, U, E, b, I, 16, a[46]), E = d(E, b = l(b, O, U, E, f, 23, a[47]), O, U, i, 6, a[48]), U = d(U, E, b, O, _, 10, a[49]), O = d(O, U, E, b, A, 15, a[50]), b = d(b, O, U, E, m, 21, a[51]), E = d(E, b, O, U, T, 6, a[52]), U = d(U, E, b, O, p, 10, a[53]), O = d(O, U, E, b, S, 15, a[54]), b = d(b, O, U, E, c, 21, a[55]), E = d(E, b, O, U, w, 6, a[56]), U = d(U, E, b, O, I, 10, a[57]), O = d(O, U, E, b, y, 15, a[58]), b = d(b, O, U, E, P, 21, a[59]), E = d(E, b, O, U, g, 6, a[60]), U = d(U, E, b, O, v, 10, a[61]), O = d(O, U, E, b, f, 15, a[62]), b = d(b, O, U, E, k, 21, a[63]), o[0] = o[0] + E | 0, o[1] = o[1] + b | 0, o[2] = o[2] + O | 0, o[3] = o[3] + U | 0;}, _doFinalize: function _doFinalize() {var t = this._data,n = t.words,s = 8 * this._nDataBytes,r = 8 * t.sigBytes;n[r >>> 5] |= 128 << 24 - r % 32;var o = e.floor(s / 4294967296),i = s;n[15 + (r + 64 >>> 9 << 4)] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), n[14 + (r + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8), t.sigBytes = 4 * (n.length + 1), this._process();for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {var h = c[u];c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);}return a;}, clone: function clone() {var e = o.clone.call(this);return e._hash = this._hash.clone(), e;} });function u(e, t, n, s, r, o, i) {var a = e + (t & n | ~t & s) + r + i;return (a << o | a >>> 32 - o) + t;}function h(e, t, n, s, r, o, i) {var a = e + (t & s | n & ~s) + r + i;return (a << o | a >>> 32 - o) + t;}function l(e, t, n, s, r, o, i) {var a = e + (t ^ n ^ s) + r + i;return (a << o | a >>> 32 - o) + t;}function d(e, t, n, s, r, o, i) {var a = e + (n ^ (t | ~s)) + r + i;return (a << o | a >>> 32 - o) + t;}t.MD5 = o._createHelper(c), t.HmacMD5 = o._createHmacHelper(c);}(Math), n.MD5);}), n(function (e, t) {var n, r, o;e.exports = (r = (n = s).lib.Base, o = n.enc.Utf8, void (n.algo.HMAC = r.extend({ init: function init(e, t) {e = this._hasher = new e.init(), "string" == typeof t && (t = o.parse(t));var n = e.blockSize,s = 4 * n;t.sigBytes > s && (t = e.finalize(t)), t.clamp();for (var r = this._oKey = t.clone(), i = this._iKey = t.clone(), a = r.words, c = i.words, u = 0; u < n; u++) {a[u] ^= 1549556828, c[u] ^= 909522486;}r.sigBytes = i.sigBytes = s, this.reset();}, reset: function reset() {var e = this._hasher;e.reset(), e.update(this._iKey);}, update: function update(e) {return this._hasher.update(e), this;}, finalize: function finalize(e) {var t = this._hasher,n = t.finalize(e);return t.reset(), t.finalize(this._oKey.clone().concat(n));} })));}), n(function (e, t) {e.exports = s.HmacMD5;}));function o(e) {return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();}function i(e) {return "object" === o(e);}var a = /*#__PURE__*/function (_Error) {_inherits(a, _Error);var _super = _createSuper(a);function a(e, t) {var _this;_classCallCheck(this, a);_this = _super.call(this, e), _this.code = t;return _this;}return a;}( /*#__PURE__*/_wrapNativeSuper(Error));function c(e) {return e && "string" == typeof e ? JSON.parse(e) : e;}var u = "development" === "development",h = "mp-weixin",l = c(undefined),d = c([]),f = true;var p = "";try {{var _e2 = __webpack_require__(/*! uni-stat-config */ 85).default || __webpack_require__(/*! uni-stat-config */ 85);p = _e2.appid;}} catch (e) {}var g = {};function m(e) {var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var n, s;return n = g, s = e, Object.prototype.hasOwnProperty.call(n, s) || (g[e] = t), g[e];}"app-plus" === h && (g = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});var y = ["invoke", "success", "fail", "complete"],_ = m("_globalUniCloudInterceptor");function w(e, t) {_[e] || (_[e] = {}), i(t) && Object.keys(t).forEach(function (n) {y.indexOf(n) > -1 && function (e, t, n) {var s = _[e][t];s || (s = _[e][t] = []), -1 === s.indexOf(n) && "function" == typeof n && s.push(n);}(e, n, t[n]);});}function k(e, t) {_[e] || (_[e] = {}), i(t) ? Object.keys(t).forEach(function (n) {y.indexOf(n) > -1 && function (e, t, n) {var s = _[e][t];if (!s) return;var r = s.indexOf(n);r > -1 && s.splice(r, 1);}(e, n, t[n]);}) : delete _[e];}function S(e, t) {return e && 0 !== e.length ? e.reduce(function (e, n) {return e.then(function () {return n(t);});}, Promise.resolve()) : Promise.resolve();}function v(e, t) {return _[e] && _[e][t] || [];}function T(e, t) {return t ? function (n) {var _this2 = this;var s = "callFunction" === t && "DCloud-clientDB" === (n && n.name);var r;r = this.isReady ? Promise.resolve() : this.initUniCloud, n = n || {};var o = r.then(function () {return s ? Promise.resolve() : S(v(t, "invoke"), n);}).then(function () {return e.call(_this2, n);}).then(function (e) {return s ? Promise.resolve(e) : S(v(t, "success"), e).then(function () {return S(v(t, "complete"), e);}).then(function () {return Promise.resolve(e);});}, function (e) {return s ? Promise.reject(e) : S(v(t, "fail"), e).then(function () {return S(v(t, "complete"), e);}).then(function () {return Promise.reject(e);});});if (!(n.success || n.fail || n.complete)) return o;o.then(function (e) {n.success && n.success(e), n.complete && n.complete(e);}).catch(function (e) {n.fail && n.fail(e), n.complete && n.complete(e);});} : function (t) {if (!((t = t || {}).success || t.fail || t.complete)) return e.call(this, t);e.call(this, t).then(function (e) {t.success && t.success(e), t.complete && t.complete(e);}, function (e) {t.fail && t.fail(e), t.complete && t.complete(e);});};}var P = /*#__PURE__*/function (_Error2) {_inherits(P, _Error2);var _super2 = _createSuper(P);function P(e) {var _this3;_classCallCheck(this, P);_this3 = _super2.call(this, e.message), _this3.errMsg = e.message || "", Object.defineProperties(_assertThisInitialized(_this3), { code: { get: function get() {return e.code;} }, requestId: { get: function get() {return e.requestId;} }, message: { get: function get() {return this.errMsg;}, set: function set(e) {this.errMsg = e;} } });return _this3;}return P;}( /*#__PURE__*/_wrapNativeSuper(Error));var _e3 = (0, _uniI18n.initVueI18n)({ "zh-Hans": { "uniCloud.init.paramRequired": "缺少参数:{param}", "uniCloud.uploadFile.fileError": "filePath应为File对象" }, "zh-Hant": { "uniCloud.init.paramRequired": "缺少参数:{param}", "uniCloud.uploadFile.fileError": "filePath应为File对象" }, en: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, fr: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, es: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" } }, "zh-Hans"),A = _e3.t,I = _e3.setLocale,E = _e3.getLocale;function b() {var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),e = _uni$getSystemInfoSyn.deviceId,t = _uni$getSystemInfoSyn.platform;return { PLATFORM: h, OS: t, APPID: p, LOCALE: E(), DEVICEID: e, CLIENT_SDK_VERSION: "1.0.13" };}var O = { sign: function sign(e, t) {var n = "";return Object.keys(e).sort().forEach(function (t) {e[t] && (n = n + "&" + t + "=" + e[t]);}), n = n.slice(1), r(n, t).toString();}, wrappedRequest: function wrappedRequest(e, t) {return new Promise(function (n, s) {t(Object.assign(e, { complete: function complete(e) {e || (e = {}), u && "h5" === h && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];if (!e.statusCode || e.statusCode >= 400) return s(new P({ code: "SYS_ERR", message: e.errMsg || "request:fail", requestId: t }));var r = e.data;if (r.error) return s(new P({ code: r.error.code, message: r.error.message, requestId: t }));r.result = r.data, r.requestId = t, delete r.data, n(r);} }));});} };var U = { request: function request(e) {return uni.request(e);}, uploadFile: function uploadFile(e) {return uni.uploadFile(e);}, setStorageSync: function setStorageSync(e, t) {return uni.setStorageSync(e, t);}, getStorageSync: function getStorageSync(e) {return uni.getStorageSync(e);}, removeStorageSync: function removeStorageSync(e) {return uni.removeStorageSync(e);}, clearStorageSync: function clearStorageSync() {return uni.clearStorageSync();} };var C = /*#__PURE__*/function () {function C(e) {_classCallCheck(this, C);["spaceId", "clientSecret"].forEach(function (t) {if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(A("uniCloud.init.paramRequired", { param: t }));}), this.config = Object.assign({}, { endpoint: "https://api.bspapp.com" }, e), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = U, this._getAccessTokenPromise = null, this._getAccessTokenPromiseStatus = null;}_createClass(C, [{ key: "setAccessToken", value: function setAccessToken(e) {this.accessToken = e;} }, { key: "requestWrapped", value: function requestWrapped(e) {return O.wrappedRequest(e, this.adapter.request);} }, { key: "requestAuth", value: function requestAuth(e) {return this.requestWrapped(e);} }, { key: "request", value: function request(e, t) {var _this4 = this;return Promise.resolve().then(function () {return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {return new Promise(function (e, n) {!t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();}).then(function () {return _this4.getAccessToken();}).then(function () {var t = _this4.rebuildRequest(e);return _this4.request(t, !0);});}) : _this4.getAccessToken().then(function () {var t = _this4.rebuildRequest(e);return _this4.request(t, !0);});});} }, { key: "rebuildRequest", value: function rebuildRequest(e) {var t = Object.assign({}, e);return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = O.sign(t.data, this.config.clientSecret), t;} }, { key: "setupRequest", value: function setupRequest(e, t) {var n = Object.assign({}, e, { spaceId: this.config.spaceId, timestamp: Date.now() }),s = { "Content-Type": "application/json" };return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = O.sign(n, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n, dataType: "json", header: s };} }, { key: "getAccessToken", value: function getAccessToken() {var _this5 = this;if ("pending" === this._getAccessTokenPromiseStatus) return this._getAccessTokenPromise;this._getAccessTokenPromiseStatus = "pending";return this._getAccessTokenPromise = this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then(function (e) {return new Promise(function (t, n) {e.result && e.result.accessToken ? (_this5.setAccessToken(e.result.accessToken), _this5._getAccessTokenPromiseStatus = "fulfilled", t(_this5.accessToken)) : (_this5._getAccessTokenPromiseStatus = "rejected", n(new P({ code: "AUTH_FAILED", message: "获取accessToken失败" })));});}, function (e) {return _this5._getAccessTokenPromiseStatus = "rejected", Promise.reject(e);}), this._getAccessTokenPromise;} }, { key: "authorize", value: function authorize() {this.getAccessToken();} }, { key: "callFunction", value: function callFunction(e) {var t = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e.name, functionArgs: e.data || {} }) };return this.request(this.setupRequest(t));} }, { key: "getOSSUploadOptionsFromPath", value: function getOSSUploadOptionsFromPath(e) {var t = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e) };return this.request(this.setupRequest(t));} }, { key: "uploadFileToOSS", value: function uploadFileToOSS(_ref) {var _this6 = this;var e = _ref.url,t = _ref.formData,n = _ref.name,s = _ref.filePath,r = _ref.fileType,o = _ref.onUploadProgress;return new Promise(function (i, a) {var c = _this6.adapter.uploadFile({ url: e, formData: t, name: n, filePath: s, fileType: r, header: { "X-OSS-server-side-encrpytion": "AES256" }, success: function success(e) {e && e.statusCode < 400 ? i(e) : a(new P({ code: "UPLOAD_FAILED", message: "文件上传失败" }));}, fail: function fail(e) {a(new P({ code: e.code || "UPLOAD_FAILED", message: e.message || e.errMsg || "文件上传失败" }));} });"function" == typeof o && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {o({ loaded: e.totalBytesSent, total: e.totalBytesExpectedToSend });});});} }, { key: "reportOSSUpload", value: function reportOSSUpload(e) {var t = { method: "serverless.file.resource.report", params: JSON.stringify(e) };return this.request(this.setupRequest(t));} }, { key: "uploadFile", value: function uploadFile(_ref2) {var _this7 = this;var e = _ref2.filePath,t = _ref2.cloudPath,_ref2$fileType = _ref2.fileType,n = _ref2$fileType === void 0 ? "image" : _ref2$fileType,s = _ref2.onUploadProgress,r = _ref2.config;if ("string" !== o(t)) throw new P({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });if (!(t = t.trim())) throw new P({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });if (/:\/\//.test(t)) throw new P({ code: "INVALID_PARAM", message: "cloudPath不合法" });var i = r && r.envType || this.config.envType;var a, c;return this.getOSSUploadOptionsFromPath({ env: i, filename: t }).then(function (t) {var r = t.result;a = r.id, c = "https://" + r.cdnDomain + "/" + r.ossPath;var o = { url: "https://" + r.host, formData: { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: r.accessKeyId, Signature: r.signature, host: r.host, id: a, key: r.ossPath, policy: r.policy, success_action_status: 200 }, fileName: "file", name: "file", filePath: e, fileType: n };return _this7.uploadFileToOSS(Object.assign({}, o, { onUploadProgress: s }));}).then(function () {return _this7.reportOSSUpload({ id: a });}).then(function (t) {return new Promise(function (n, s) {t.success ? n({ success: !0, filePath: e, fileID: c }) : s(new P({ code: "UPLOAD_FAILED", message: "文件上传失败" }));});});} }, { key: "deleteFile", value: function deleteFile(_ref3) {var e = _ref3.fileList;var t = { method: "serverless.file.resource.delete", params: JSON.stringify({ id: e[0] }) };return this.request(this.setupRequest(t));} }, { key: "getTempFileURL", value: function getTempFileURL() {var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref4.fileList;return new Promise(function (t, n) {Array.isArray(e) && 0 !== e.length || n(new P({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t({ fileList: e.map(function (e) {return { fileID: e, tempFileURL: e };}) });});} }, { key: "hasAccessToken", get: function get() {return !!this.accessToken;} }]);return C;}();var x = { init: function init(e) {var t = new C(e),n = { signInAnonymously: function signInAnonymously() {return t.authorize();}, getLoginState: function getLoginState() {return Promise.resolve(!1);} };return t.auth = function () {return n;}, t.customAuth = t.auth, t;} },D = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";var R;!function (e) {e.local = "local", e.none = "none", e.session = "session";}(R || (R = {}));var q = function q() {};var F = function F() {var e;if (!Promise) {e = function e() {}, e.promise = {};var _t = function _t() {throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.');};return Object.defineProperty(e.promise, "then", { get: _t }), Object.defineProperty(e.promise, "catch", { get: _t }), e;}var t = new Promise(function (t, n) {e = function e(_e4, s) {return _e4 ? n(_e4) : t(s);};});return e.promise = t, e;};function L(e) {return void 0 === e;}function N(e) {return "[object Null]" === Object.prototype.toString.call(e);}var M;function $(e) {var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);var n;var _iterator = _createForOfIteratorHelper(t),_step;try {for (_iterator.s(); !(_step = _iterator.n()).done;) {var _e5 = _step.value;var _t2 = _e5.isMatch,_n = _e5.genAdapter,_s = _e5.runtime;if (_t2()) return { adapter: _n(), runtime: _s };}} catch (err) {_iterator.e(err);} finally {_iterator.f();}}!function (e) {e.WEB = "web", e.WX_MP = "wx_mp";}(M || (M = {}));var j = { adapter: null, runtime: void 0 },K = ["anonymousUuidKey"];var B = /*#__PURE__*/function (_q) {_inherits(B, _q);var _super3 = _createSuper(B);function B() {var _this8;_classCallCheck(this, B);_this8 = _super3.call(this), j.adapter.root.tcbObject || (j.adapter.root.tcbObject = {});return _this8;}_createClass(B, [{ key: "setItem", value: function setItem(e, t) {j.adapter.root.tcbObject[e] = t;} }, { key: "getItem", value: function getItem(e) {return j.adapter.root.tcbObject[e];} }, { key: "removeItem", value: function removeItem(e) {delete j.adapter.root.tcbObject[e];} }, { key: "clear", value: function clear() {delete j.adapter.root.tcbObject;} }]);return B;}(q);function H(e, t) {switch (e) {case "local":return t.localStorage || new B();case "none":return new B();default:return t.sessionStorage || new B();}}var W = /*#__PURE__*/function () {function W(e) {_classCallCheck(this, W);if (!this._storage) {this._persistence = j.adapter.primaryStorage || e.persistence, this._storage = H(this._persistence, j.adapter);var _t3 = "access_token_".concat(e.env),_n2 = "access_token_expire_".concat(e.env),_s2 = "refresh_token_".concat(e.env),_r = "anonymous_uuid_".concat(e.env),_o = "login_type_".concat(e.env),_i = "user_info_".concat(e.env);this.keys = { accessTokenKey: _t3, accessTokenExpireKey: _n2, refreshTokenKey: _s2, anonymousUuidKey: _r, loginTypeKey: _o, userInfoKey: _i };}}_createClass(W, [{ key: "updatePersistence", value: function updatePersistence(e) {if (e === this._persistence) return;var t = "local" === this._persistence;this._persistence = e;var n = H(e, j.adapter);for (var _e6 in this.keys) {var _s3 = this.keys[_e6];if (t && K.includes(_e6)) continue;var _r2 = this._storage.getItem(_s3);L(_r2) || N(_r2) || (n.setItem(_s3, _r2), this._storage.removeItem(_s3));}this._storage = n;} }, { key: "setStore", value: function setStore(e, t, n) {if (!this._storage) return;var s = { version: n || "localCachev1", content: t },r = JSON.stringify(s);try {this._storage.setItem(e, r);} catch (e) {throw e;}} }, { key: "getStore", value: function getStore(e, t) {try {if (!this._storage) return;} catch (e) {return "";}t = t || "localCachev1";var n = this._storage.getItem(e);if (!n) return "";if (n.indexOf(t) >= 0) {return JSON.parse(n).content;}return "";} }, { key: "removeStore", value: function removeStore(e) {this._storage.removeItem(e);} }]);return W;}();var z = {},V = {};function J(e) {return z[e];}var Y = function Y(e, t) {_classCallCheck(this, Y);this.data = t || null, this.name = e;};var X = /*#__PURE__*/function (_Y) {_inherits(X, _Y);var _super4 = _createSuper(X);function X(e, t) {var _this9;_classCallCheck(this, X);_this9 = _super4.call(this, "error", { error: e, data: t }), _this9.error = e;return _this9;}return X;}(Y);var G = new ( /*#__PURE__*/function () {function _class() {_classCallCheck(this, _class);this._listeners = {};}_createClass(_class, [{ key: "on", value: function on(e, t) {return function (e, t, n) {n[e] = n[e] || [], n[e].push(t);}(e, t, this._listeners), this;} }, { key: "off", value: function off(e, t) {return function (e, t, n) {if (n && n[e]) {var _s4 = n[e].indexOf(t);-1 !== _s4 && n[e].splice(_s4, 1);}}(e, t, this._listeners), this;} }, { key: "fire", value: function fire(e, t) {if (e instanceof X) return console.error(e.error), this;var n = "string" == typeof e ? new Y(e, t || {}) : e;var s = n.name;if (this._listens(s)) {n.target = this;var _e7 = this._listeners[s] ? _toConsumableArray(this._listeners[s]) : [];var _iterator2 = _createForOfIteratorHelper(_e7),_step2;try {for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {var _t4 = _step2.value;_t4.call(this, n);}} catch (err) {_iterator2.e(err);} finally {_iterator2.f();}}return this;} }, { key: "_listens", value: function _listens(e) {return this._listeners[e] && this._listeners[e].length > 0;} }]);return _class;}())();function Q(e, t) {G.on(e, t);}function Z(e) {var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};G.fire(e, t);}function ee(e, t) {G.off(e, t);}var te = "loginStateChanged",ne = "loginStateExpire",se = "loginTypeChanged",re = "anonymousConverted",oe = "refreshAccessToken";var ie;!function (e) {e.ANONYMOUS = "ANONYMOUS", e.WECHAT = "WECHAT", e.WECHAT_PUBLIC = "WECHAT-PUBLIC", e.WECHAT_OPEN = "WECHAT-OPEN", e.CUSTOM = "CUSTOM", e.EMAIL = "EMAIL", e.USERNAME = "USERNAME", e.NULL = "NULL";}(ie || (ie = {}));var ae = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],ce = { "X-SDK-Version": "1.3.5" };function ue(e, t, n) {var s = e[t];e[t] = function (t) {var r = {},o = {};n.forEach(function (n) {var _n$call = n.call(e, t),s = _n$call.data,i = _n$call.headers;Object.assign(r, s), Object.assign(o, i);});var i = t.data;return i && function () {var e;if (e = i, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, i), r);else for (var _e8 in r) {i.append(_e8, r[_e8]);}}(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), o), s.call(e, t);};}function he() {var e = Math.random().toString(16).slice(2);return { data: { seqId: e }, headers: _objectSpread(_objectSpread({}, ce), {}, { "x-seqid": e }) };}var le = /*#__PURE__*/function () {function le() {var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};_classCallCheck(this, le);var t;this.config = e, this._reqClass = new j.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"), restrictedMethods: ["post"] }), this._cache = J(this.config.env), this._localCache = (t = this.config.env, V[t]), ue(this._reqClass, "post", [he]), ue(this._reqClass, "upload", [he]), ue(this._reqClass, "download", [he]);}_createClass(le, [{ key: "post", value: function () {var _post = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return this._reqClass.post(e);case 2:return _context.abrupt("return", _context.sent);case 3:case "end":return _context.stop();}}}, _callee, this);}));function post(_x) {return _post.apply(this, arguments);}return post;}() }, { key: "upload", value: function () {var _upload = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(e) {return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:_context2.next = 2;return this._reqClass.upload(e);case 2:return _context2.abrupt("return", _context2.sent);case 3:case "end":return _context2.stop();}}}, _callee2, this);}));function upload(_x2) {return _upload.apply(this, arguments);}return upload;}() }, { key: "download", value: function () {var _download = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(e) {return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return this._reqClass.download(e);case 2:return _context3.abrupt("return", _context3.sent);case 3:case "end":return _context3.stop();}}}, _callee3, this);}));function download(_x3) {return _download.apply(this, arguments);}return download;}() }, { key: "refreshAccessToken", value: function () {var _refreshAccessToken2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4() {var e, t;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());_context4.prev = 1;_context4.next = 4;return this._refreshAccessTokenPromise;case 4:e = _context4.sent;_context4.next = 10;break;case 7:_context4.prev = 7;_context4.t0 = _context4["catch"](1);t = _context4.t0;case 10:if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {_context4.next = 12;break;}throw t;case 12:return _context4.abrupt("return", e);case 13:case "end":return _context4.stop();}}}, _callee4, this, [[1, 7]]);}));function refreshAccessToken() {return _refreshAccessToken2.apply(this, arguments);}return refreshAccessToken;}() }, { key: "_refreshAccessToken", value: function () {var _refreshAccessToken3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5() {var _this$_cache$keys, e, t, n, s, r, o, i, a, _e9, _e10, _t5, _s5;return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0:_this$_cache$keys = this._cache.keys, e = _this$_cache$keys.accessTokenKey, t = _this$_cache$keys.accessTokenExpireKey, n = _this$_cache$keys.refreshTokenKey, s = _this$_cache$keys.loginTypeKey, r = _this$_cache$keys.anonymousUuidKey;this._cache.removeStore(e), this._cache.removeStore(t);o = this._cache.getStore(n);if (o) {_context5.next = 5;break;}throw new Error("未登录CloudBase");case 5:i = { refresh_token: o };_context5.next = 8;return this.request("auth.fetchAccessTokenWithRefreshToken", i);case 8:a = _context5.sent;if (!a.data.code) {_context5.next = 21;break;}_e9 = a.data.code;if (!("SIGN_PARAM_INVALID" === _e9 || "REFRESH_TOKEN_EXPIRED" === _e9 || "INVALID_REFRESH_TOKEN" === _e9)) {_context5.next = 20;break;}if (!(this._cache.getStore(s) === ie.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e9)) {_context5.next = 19;break;}_e10 = this._cache.getStore(r);_t5 = this._cache.getStore(n);_context5.next = 17;return this.send("auth.signInAnonymously", { anonymous_uuid: _e10, refresh_token: _t5 });case 17:_s5 = _context5.sent;return _context5.abrupt("return", (this.setRefreshToken(_s5.refresh_token), this._refreshAccessToken()));case 19:Z(ne), this._cache.removeStore(n);case 20:throw new Error("\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code));case 21:if (!a.data.access_token) {_context5.next = 23;break;}return _context5.abrupt("return", (Z(oe), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), { accessToken: a.data.access_token, accessTokenExpire: a.data.access_token_expire }));case 23:a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());case 24:case "end":return _context5.stop();}}}, _callee5, this);}));function _refreshAccessToken() {return _refreshAccessToken3.apply(this, arguments);}return _refreshAccessToken;}() }, { key: "getAccessToken", value: function () {var _getAccessToken = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee6() {var _this$_cache$keys2, e, t, n, s, r, o;return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:_this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;if (this._cache.getStore(n)) {_context6.next = 3;break;}throw new Error("refresh token不存在,登录状态异常");case 3:s = this._cache.getStore(e), r = this._cache.getStore(t), o = !0;_context6.t0 = this._shouldRefreshAccessTokenHook;if (!_context6.t0) {_context6.next = 9;break;}_context6.next = 8;return this._shouldRefreshAccessTokenHook(s, r);case 8:_context6.t0 = !_context6.sent;case 9:_context6.t1 = _context6.t0;if (!_context6.t1) {_context6.next = 12;break;}o = !1;case 12:return _context6.abrupt("return", (!s || !r || r < Date.now()) && o ? this.refreshAccessToken() : { accessToken: s, accessTokenExpire: r });case 13:case "end":return _context6.stop();}}}, _callee6, this);}));function getAccessToken() {return _getAccessToken.apply(this, arguments);}return getAccessToken;}() }, { key: "request", value: function () {var _request = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee7(e, t, n) {var s, r, o, _e11, i, _e12, _e13, a, c, u, h, l, d, f, p, g;return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0:s = "x-tcb-trace_".concat(this.config.env);r = "application/x-www-form-urlencoded";o = _objectSpread({ action: e, env: this.config.env, dataVersion: "2019-08-16" }, t);if (!(-1 === ae.indexOf(e))) {_context7.next = 10;break;}_e11 = this._cache.keys.refreshTokenKey;_context7.t0 = this._cache.getStore(_e11);if (!_context7.t0) {_context7.next = 10;break;}_context7.next = 9;return this.getAccessToken();case 9:o.access_token = _context7.sent.accessToken;case 10:if ("storage.uploadFile" === e) {i = new FormData();for (_e12 in i) {i.hasOwnProperty(_e12) && void 0 !== i[_e12] && i.append(_e12, o[_e12]);}r = "multipart/form-data";} else {r = "application/json", i = {};for (_e13 in o) {void 0 !== o[_e13] && (i[_e13] = o[_e13]);}}a = { headers: { "content-type": r } };n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);c = this._localCache.getStore(s);c && (a.headers["X-TCB-Trace"] = c);u = t.parse, h = t.inQuery, l = t.search;d = { env: this.config.env };u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));f = function (e, t) {var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var s = /\?/.test(t);var r = "";for (var _e14 in n) {"" === r ? !s && (t += "?") : r += "&", r += "".concat(_e14, "=").concat(encodeURIComponent(n[_e14]));}return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);}(D, "//tcb-api.tencentcloudapi.com/web", d);l && (f += l);_context7.next = 22;return this.post(_objectSpread({ url: f, data: i }, a));case 22:p = _context7.sent;g = p.header && p.header["x-tcb-trace"];if (!(g && this._localCache.setStore(s, g), 200 !== Number(p.status) && 200 !== Number(p.statusCode) || !p.data)) {_context7.next = 26;break;}throw new Error("network request error");case 26:return _context7.abrupt("return", p);case 27:case "end":return _context7.stop();}}}, _callee7, this);}));function request(_x4, _x5, _x6) {return _request.apply(this, arguments);}return request;}() }, { key: "send", value: function () {var _send = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee8(e) {var t,n,_n3,_args8 = arguments;return _regenerator.default.wrap(function _callee8$(_context8) {while (1) {switch (_context8.prev = _context8.next) {case 0:t = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};_context8.next = 3;return this.request(e, t, { onUploadProgress: t.onUploadProgress });case 3:n = _context8.sent;if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === ae.indexOf(e))) {_context8.next = 13;break;}_context8.next = 7;return this.refreshAccessToken();case 7:_context8.next = 9;return this.request(e, t, { onUploadProgress: t.onUploadProgress });case 9:_n3 = _context8.sent;if (!_n3.data.code) {_context8.next = 12;break;}throw new Error("[".concat(_n3.data.code, "] ").concat(_n3.data.message));case 12:return _context8.abrupt("return", _n3.data);case 13:if (!n.data.code) {_context8.next = 15;break;}throw new Error("[".concat(n.data.code, "] ").concat(n.data.message));case 15:return _context8.abrupt("return", n.data);case 16:case "end":return _context8.stop();}}}, _callee8, this);}));function send(_x7) {return _send.apply(this, arguments);}return send;}() }, { key: "setRefreshToken", value: function setRefreshToken(e) {var _this$_cache$keys3 = this._cache.keys,t = _this$_cache$keys3.accessTokenKey,n = _this$_cache$keys3.accessTokenExpireKey,s = _this$_cache$keys3.refreshTokenKey;this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);} }]);return le;}();var de = {};function fe(e) {return de[e];}var pe = /*#__PURE__*/function () {function pe(e) {_classCallCheck(this, pe);this.config = e, this._cache = J(e.env), this._request = fe(e.env);}_createClass(pe, [{ key: "setRefreshToken", value: function setRefreshToken(e) {var _this$_cache$keys4 = this._cache.keys,t = _this$_cache$keys4.accessTokenKey,n = _this$_cache$keys4.accessTokenExpireKey,s = _this$_cache$keys4.refreshTokenKey;this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);} }, { key: "setAccessToken", value: function setAccessToken(e, t) {var _this$_cache$keys5 = this._cache.keys,n = _this$_cache$keys5.accessTokenKey,s = _this$_cache$keys5.accessTokenExpireKey;this._cache.setStore(n, e), this._cache.setStore(s, t);} }, { key: "refreshUserInfo", value: function () {var _refreshUserInfo = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee9() {var _yield$this$_request$, e;return _regenerator.default.wrap(function _callee9$(_context9) {while (1) {switch (_context9.prev = _context9.next) {case 0:_context9.next = 2;return this._request.send("auth.getUserInfo", {});case 2:_yield$this$_request$ = _context9.sent;e = _yield$this$_request$.data;return _context9.abrupt("return", (this.setLocalUserInfo(e), e));case 5:case "end":return _context9.stop();}}}, _callee9, this);}));function refreshUserInfo() {return _refreshUserInfo.apply(this, arguments);}return refreshUserInfo;}() }, { key: "setLocalUserInfo", value: function setLocalUserInfo(e) {var t = this._cache.keys.userInfoKey;this._cache.setStore(t, e);} }]);return pe;}();var ge = /*#__PURE__*/function () {function ge(e) {_classCallCheck(this, ge);if (!e) throw new Error("envId is not defined");this._envId = e, this._cache = J(this._envId), this._request = fe(this._envId), this.setUserInfo();}_createClass(ge, [{ key: "linkWithTicket", value: function linkWithTicket(e) {if ("string" != typeof e) throw new Error("ticket must be string");return this._request.send("auth.linkWithTicket", { ticket: e });} }, { key: "linkWithRedirect", value: function linkWithRedirect(e) {e.signInWithRedirect();} }, { key: "updatePassword", value: function updatePassword(e, t) {return this._request.send("auth.updatePassword", { oldPassword: t, newPassword: e });} }, { key: "updateEmail", value: function updateEmail(e) {return this._request.send("auth.updateEmail", { newEmail: e });} }, { key: "updateUsername", value: function updateUsername(e) {if ("string" != typeof e) throw new Error("username must be a string");return this._request.send("auth.updateUsername", { username: e });} }, { key: "getLinkedUidList", value: function () {var _getLinkedUidList = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee10() {var _yield$this$_request$2, e, t, n;return _regenerator.default.wrap(function _callee10$(_context10) {while (1) {switch (_context10.prev = _context10.next) {case 0:_context10.next = 2;return this._request.send("auth.getLinkedUidList", {});case 2:_yield$this$_request$2 = _context10.sent;e = _yield$this$_request$2.data;t = !1;n = e.users;return _context10.abrupt("return", (n.forEach(function (e) {e.wxOpenId && e.wxPublicId && (t = !0);}), { users: n, hasPrimaryUid: t }));case 7:case "end":return _context10.stop();}}}, _callee10, this);}));function getLinkedUidList() {return _getLinkedUidList.apply(this, arguments);}return getLinkedUidList;}() }, { key: "setPrimaryUid", value: function setPrimaryUid(e) {return this._request.send("auth.setPrimaryUid", { uid: e });} }, { key: "unlink", value: function unlink(e) {return this._request.send("auth.unlink", { platform: e });} }, { key: "update", value: function () {var _update = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {var t, n, s, r, o, i, _yield$this$_request$3, a;return _regenerator.default.wrap(function _callee11$(_context11) {while (1) {switch (_context11.prev = _context11.next) {case 0:t = e.nickName;n = e.gender;s = e.avatarUrl;r = e.province;o = e.country;i = e.city;_context11.next = 8;return this._request.send("auth.updateUserInfo", { nickName: t, gender: n, avatarUrl: s, province: r, country: o, city: i });case 8:_yield$this$_request$3 = _context11.sent;a = _yield$this$_request$3.data;this.setLocalUserInfo(a);case 11:case "end":return _context11.stop();}}}, _callee11, this);}));function update(_x8) {return _update.apply(this, arguments);}return update;}() }, { key: "refresh", value: function () {var _refresh = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee12() {var _yield$this$_request$4, e;return _regenerator.default.wrap(function _callee12$(_context12) {while (1) {switch (_context12.prev = _context12.next) {case 0:_context12.next = 2;return this._request.send("auth.getUserInfo", {});case 2:_yield$this$_request$4 = _context12.sent;e = _yield$this$_request$4.data;return _context12.abrupt("return", (this.setLocalUserInfo(e), e));case 5:case "end":return _context12.stop();}}}, _callee12, this);}));function refresh() {return _refresh.apply(this, arguments);}return refresh;}() }, { key: "setUserInfo", value: function setUserInfo() {var _this10 = this;var e = this._cache.keys.userInfoKey,t = this._cache.getStore(e);["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {_this10[e] = t[e];}), this.location = { country: t.country, province: t.province, city: t.city };} }, { key: "setLocalUserInfo", value: function setLocalUserInfo(e) {var t = this._cache.keys.userInfoKey;this._cache.setStore(t, e), this.setUserInfo();} }]);return ge;}();var me = /*#__PURE__*/function () {function me(e) {_classCallCheck(this, me);if (!e) throw new Error("envId is not defined");this._cache = J(e);var _this$_cache$keys6 = this._cache.keys,t = _this$_cache$keys6.refreshTokenKey,n = _this$_cache$keys6.accessTokenKey,s = _this$_cache$keys6.accessTokenExpireKey,r = this._cache.getStore(t),o = this._cache.getStore(n),i = this._cache.getStore(s);this.credential = { refreshToken: r, accessToken: o, accessTokenExpire: i }, this.user = new ge(e);}_createClass(me, [{ key: "isAnonymousAuth", get: function get() {return this.loginType === ie.ANONYMOUS;} }, { key: "isCustomAuth", get: function get() {return this.loginType === ie.CUSTOM;} }, { key: "isWeixinAuth", get: function get() {return this.loginType === ie.WECHAT || this.loginType === ie.WECHAT_OPEN || this.loginType === ie.WECHAT_PUBLIC;} }, { key: "loginType", get: function get() {return this._cache.getStore(this._cache.keys.loginTypeKey);} }]);return me;}();var ye = /*#__PURE__*/function (_pe) {_inherits(ye, _pe);var _super5 = _createSuper(ye);function ye() {_classCallCheck(this, ye);return _super5.apply(this, arguments);}_createClass(ye, [{ key: "signIn", value: function () {var _signIn = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee13() {var _this$_cache$keys7, e, t, n, s, r, _e15;return _regenerator.default.wrap(function _callee13$(_context13) {while (1) {switch (_context13.prev = _context13.next) {case 0:this._cache.updatePersistence("local");_this$_cache$keys7 = this._cache.keys;e = _this$_cache$keys7.anonymousUuidKey;t = _this$_cache$keys7.refreshTokenKey;n = this._cache.getStore(e) || void 0;s = this._cache.getStore(t) || void 0;_context13.next = 8;return this._request.send("auth.signInAnonymously", { anonymous_uuid: n, refresh_token: s });case 8:r = _context13.sent;if (!(r.uuid && r.refresh_token)) {_context13.next = 20;break;}this._setAnonymousUUID(r.uuid);this.setRefreshToken(r.refresh_token);_context13.next = 14;return this._request.refreshAccessToken();case 14:Z(te);Z(se, { env: this.config.env, loginType: ie.ANONYMOUS, persistence: "local" });_e15 = new me(this.config.env);_context13.next = 19;return _e15.user.refresh();case 19:return _context13.abrupt("return", _e15);case 20:throw new Error("匿名登录失败");case 21:case "end":return _context13.stop();}}}, _callee13, this);}));function signIn() {return _signIn.apply(this, arguments);}return signIn;}() }, { key: "linkAndRetrieveDataWithTicket", value: function () {var _linkAndRetrieveDataWithTicket = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {var _this$_cache$keys8, t, n, s, r, o;return _regenerator.default.wrap(function _callee14$(_context14) {while (1) {switch (_context14.prev = _context14.next) {case 0:_this$_cache$keys8 = this._cache.keys;t = _this$_cache$keys8.anonymousUuidKey;n = _this$_cache$keys8.refreshTokenKey;s = this._cache.getStore(t);r = this._cache.getStore(n);_context14.next = 7;return this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s, refresh_token: r, ticket: e });case 7:o = _context14.sent;if (!o.refresh_token) {_context14.next = 16;break;}this._clearAnonymousUUID();this.setRefreshToken(o.refresh_token);_context14.next = 13;return this._request.refreshAccessToken();case 13:Z(re, { env: this.config.env });Z(se, { loginType: ie.CUSTOM, persistence: "local" });return _context14.abrupt("return", { credential: { refreshToken: o.refresh_token } });case 16:throw new Error("匿名转化失败");case 17:case "end":return _context14.stop();}}}, _callee14, this);}));function linkAndRetrieveDataWithTicket(_x9) {return _linkAndRetrieveDataWithTicket.apply(this, arguments);}return linkAndRetrieveDataWithTicket;}() }, { key: "_setAnonymousUUID", value: function _setAnonymousUUID(e) {var _this$_cache$keys9 = this._cache.keys,t = _this$_cache$keys9.anonymousUuidKey,n = _this$_cache$keys9.loginTypeKey;this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, ie.ANONYMOUS);} }, { key: "_clearAnonymousUUID", value: function _clearAnonymousUUID() {this._cache.removeStore(this._cache.keys.anonymousUuidKey);} }]);return ye;}(pe);var _e = /*#__PURE__*/function (_pe2) {_inherits(_e, _pe2);var _super6 = _createSuper(_e);function _e() {_classCallCheck(this, _e);return _super6.apply(this, arguments);}_createClass(_e, [{ key: "signIn", value: function () {var _signIn2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee15(e) {var t, n;return _regenerator.default.wrap(function _callee15$(_context15) {while (1) {switch (_context15.prev = _context15.next) {case 0:if (!("string" != typeof e)) {_context15.next = 2;break;}throw new Error("ticket must be a string");case 2:t = this._cache.keys.refreshTokenKey;_context15.next = 5;return this._request.send("auth.signInWithTicket", { ticket: e, refresh_token: this._cache.getStore(t) || "" });case 5:n = _context15.sent;if (!n.refresh_token) {_context15.next = 15;break;}this.setRefreshToken(n.refresh_token);_context15.next = 10;return this._request.refreshAccessToken();case 10:Z(te);Z(se, { env: this.config.env, loginType: ie.CUSTOM, persistence: this.config.persistence });_context15.next = 14;return this.refreshUserInfo();case 14:return _context15.abrupt("return", new me(this.config.env));case 15:throw new Error("自定义登录失败");case 16:case "end":return _context15.stop();}}}, _callee15, this);}));function signIn(_x10) {return _signIn2.apply(this, arguments);}return signIn;}() }]);return _e;}(pe);var we = /*#__PURE__*/function (_pe3) {_inherits(we, _pe3);var _super7 = _createSuper(we);function we() {_classCallCheck(this, we);return _super7.apply(this, arguments);}_createClass(we, [{ key: "signIn", value: function () {var _signIn3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee16(e, t) {var n, s, r, o, i;return _regenerator.default.wrap(function _callee16$(_context16) {while (1) {switch (_context16.prev = _context16.next) {case 0:if (!("string" != typeof e)) {_context16.next = 2;break;}throw new Error("email must be a string");case 2:n = this._cache.keys.refreshTokenKey;_context16.next = 5;return this._request.send("auth.signIn", { loginType: "EMAIL", email: e, password: t, refresh_token: this._cache.getStore(n) || "" });case 5:s = _context16.sent;r = s.refresh_token;o = s.access_token;i = s.access_token_expire;if (!r) {_context16.next = 22;break;}this.setRefreshToken(r);if (!(o && i)) {_context16.next = 15;break;}this.setAccessToken(o, i);_context16.next = 17;break;case 15:_context16.next = 17;return this._request.refreshAccessToken();case 17:_context16.next = 19;return this.refreshUserInfo();case 19:Z(te);Z(se, { env: this.config.env, loginType: ie.EMAIL, persistence: this.config.persistence });return _context16.abrupt("return", new me(this.config.env));case 22:throw s.code ? new Error("\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: [".concat(s.code, "] ").concat(s.message)) : new Error("邮箱登录失败");case 23:case "end":return _context16.stop();}}}, _callee16, this);}));function signIn(_x11, _x12) {return _signIn3.apply(this, arguments);}return signIn;}() }, { key: "activate", value: function () {var _activate = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {return _regenerator.default.wrap(function _callee17$(_context17) {while (1) {switch (_context17.prev = _context17.next) {case 0:return _context17.abrupt("return", this._request.send("auth.activateEndUserMail", { token: e }));case 1:case "end":return _context17.stop();}}}, _callee17, this);}));function activate(_x13) {return _activate.apply(this, arguments);}return activate;}() }, { key: "resetPasswordWithToken", value: function () {var _resetPasswordWithToken = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee18(e, t) {return _regenerator.default.wrap(function _callee18$(_context18) {while (1) {switch (_context18.prev = _context18.next) {case 0:return _context18.abrupt("return", this._request.send("auth.resetPasswordWithToken", { token: e, newPassword: t }));case 1:case "end":return _context18.stop();}}}, _callee18, this);}));function resetPasswordWithToken(_x14, _x15) {return _resetPasswordWithToken.apply(this, arguments);}return resetPasswordWithToken;}() }]);return we;}(pe);var ke = /*#__PURE__*/function (_pe4) {_inherits(ke, _pe4);var _super8 = _createSuper(ke);function ke() {_classCallCheck(this, ke);return _super8.apply(this, arguments);}_createClass(ke, [{ key: "signIn", value: function () {var _signIn4 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {var n, s, r, o, i;return _regenerator.default.wrap(function _callee19$(_context19) {while (1) {switch (_context19.prev = _context19.next) {case 0:if (!("string" != typeof e)) {_context19.next = 2;break;}throw new Error("username must be a string");case 2:"string" != typeof t && (t = "", console.warn("password is empty"));n = this._cache.keys.refreshTokenKey;_context19.next = 6;return this._request.send("auth.signIn", { loginType: ie.USERNAME, username: e, password: t, refresh_token: this._cache.getStore(n) || "" });case 6:s = _context19.sent;r = s.refresh_token;o = s.access_token_expire;i = s.access_token;if (!r) {_context19.next = 23;break;}this.setRefreshToken(r);if (!(i && o)) {_context19.next = 16;break;}this.setAccessToken(i, o);_context19.next = 18;break;case 16:_context19.next = 18;return this._request.refreshAccessToken();case 18:_context19.next = 20;return this.refreshUserInfo();case 20:Z(te);Z(se, { env: this.config.env, loginType: ie.USERNAME, persistence: this.config.persistence });return _context19.abrupt("return", new me(this.config.env));case 23:throw s.code ? new Error("\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: [".concat(s.code, "] ").concat(s.message)) : new Error("用户名密码登录失败");case 24:case "end":return _context19.stop();}}}, _callee19, this);}));function signIn(_x16, _x17) {return _signIn4.apply(this, arguments);}return signIn;}() }]);return ke;}(pe);var Se = /*#__PURE__*/function () {function Se(e) {_classCallCheck(this, Se);this.config = e, this._cache = J(e.env), this._request = fe(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Q(se, this._onLoginTypeChanged);}_createClass(Se, [{ key: "anonymousAuthProvider", value: function anonymousAuthProvider() {return new ye(this.config);} }, { key: "customAuthProvider", value: function customAuthProvider() {return new _e(this.config);} }, { key: "emailAuthProvider", value: function emailAuthProvider() {return new we(this.config);} }, { key: "usernameAuthProvider", value: function usernameAuthProvider() {return new ke(this.config);} }, { key: "signInAnonymously", value: function () {var _signInAnonymously = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee20() {return _regenerator.default.wrap(function _callee20$(_context20) {while (1) {switch (_context20.prev = _context20.next) {case 0:return _context20.abrupt("return", new ye(this.config).signIn());case 1:case "end":return _context20.stop();}}}, _callee20, this);}));function signInAnonymously() {return _signInAnonymously.apply(this, arguments);}return signInAnonymously;}() }, { key: "signInWithEmailAndPassword", value: function () {var _signInWithEmailAndPassword = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {return _regenerator.default.wrap(function _callee21$(_context21) {while (1) {switch (_context21.prev = _context21.next) {case 0:return _context21.abrupt("return", new we(this.config).signIn(e, t));case 1:case "end":return _context21.stop();}}}, _callee21, this);}));function signInWithEmailAndPassword(_x18, _x19) {return _signInWithEmailAndPassword.apply(this, arguments);}return signInWithEmailAndPassword;}() }, { key: "signInWithUsernameAndPassword", value: function signInWithUsernameAndPassword(e, t) {return new ke(this.config).signIn(e, t);} }, { key: "linkAndRetrieveDataWithTicket", value: function () {var _linkAndRetrieveDataWithTicket2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee22(e) {return _regenerator.default.wrap(function _callee22$(_context22) {while (1) {switch (_context22.prev = _context22.next) {case 0:this._anonymousAuthProvider || (this._anonymousAuthProvider = new ye(this.config)), Q(re, this._onAnonymousConverted);_context22.next = 3;return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);case 3:return _context22.abrupt("return", _context22.sent);case 4:case "end":return _context22.stop();}}}, _callee22, this);}));function linkAndRetrieveDataWithTicket(_x20) {return _linkAndRetrieveDataWithTicket2.apply(this, arguments);}return linkAndRetrieveDataWithTicket;}() }, { key: "signOut", value: function () {var _signOut = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee23() {var _this$_cache$keys10, e, t, n, s, r;return _regenerator.default.wrap(function _callee23$(_context23) {while (1) {switch (_context23.prev = _context23.next) {case 0:if (!(this.loginType === ie.ANONYMOUS)) {_context23.next = 2;break;}throw new Error("匿名用户不支持登出操作");case 2:_this$_cache$keys10 = this._cache.keys, e = _this$_cache$keys10.refreshTokenKey, t = _this$_cache$keys10.accessTokenKey, n = _this$_cache$keys10.accessTokenExpireKey, s = this._cache.getStore(e);if (s) {_context23.next = 5;break;}return _context23.abrupt("return");case 5:_context23.next = 7;return this._request.send("auth.logout", { refresh_token: s });case 7:r = _context23.sent;return _context23.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), Z(te), Z(se, { env: this.config.env, loginType: ie.NULL, persistence: this.config.persistence }), r));case 9:case "end":return _context23.stop();}}}, _callee23, this);}));function signOut() {return _signOut.apply(this, arguments);}return signOut;}() }, { key: "signUpWithEmailAndPassword", value: function () {var _signUpWithEmailAndPassword = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {return _regenerator.default.wrap(function _callee24$(_context24) {while (1) {switch (_context24.prev = _context24.next) {case 0:return _context24.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", { email: e, password: t }));case 1:case "end":return _context24.stop();}}}, _callee24, this);}));function signUpWithEmailAndPassword(_x21, _x22) {return _signUpWithEmailAndPassword.apply(this, arguments);}return signUpWithEmailAndPassword;}() }, { key: "sendPasswordResetEmail", value: function () {var _sendPasswordResetEmail = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {return _regenerator.default.wrap(function _callee25$(_context25) {while (1) {switch (_context25.prev = _context25.next) {case 0:return _context25.abrupt("return", this._request.send("auth.sendPasswordResetEmail", { email: e }));case 1:case "end":return _context25.stop();}}}, _callee25, this);}));function sendPasswordResetEmail(_x23) {return _sendPasswordResetEmail.apply(this, arguments);}return sendPasswordResetEmail;}() }, { key: "onLoginStateChanged", value: function onLoginStateChanged(e) {var _this11 = this;Q(te, function () {var t = _this11.hasLoginState();e.call(_this11, t);});var t = this.hasLoginState();e.call(this, t);} }, { key: "onLoginStateExpired", value: function onLoginStateExpired(e) {Q(ne, e.bind(this));} }, { key: "onAccessTokenRefreshed", value: function onAccessTokenRefreshed(e) {Q(oe, e.bind(this));} }, { key: "onAnonymousConverted", value: function onAnonymousConverted(e) {Q(re, e.bind(this));} }, { key: "onLoginTypeChanged", value: function onLoginTypeChanged(e) {var _this12 = this;Q(se, function () {var t = _this12.hasLoginState();e.call(_this12, t);});} }, { key: "getAccessToken", value: function () {var _getAccessToken2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee26() {return _regenerator.default.wrap(function _callee26$(_context26) {while (1) {switch (_context26.prev = _context26.next) {case 0:_context26.next = 2;return this._request.getAccessToken();case 2:_context26.t0 = _context26.sent.accessToken;_context26.t1 = this.config.env;return _context26.abrupt("return", { accessToken: _context26.t0, env: _context26.t1 });case 5:case "end":return _context26.stop();}}}, _callee26, this);}));function getAccessToken() {return _getAccessToken2.apply(this, arguments);}return getAccessToken;}() }, { key: "hasLoginState", value: function hasLoginState() {var e = this._cache.keys.refreshTokenKey;return this._cache.getStore(e) ? new me(this.config.env) : null;} }, { key: "isUsernameRegistered", value: function () {var _isUsernameRegistered = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee27(e) {var _yield$this$_request$5, t;return _regenerator.default.wrap(function _callee27$(_context27) {while (1) {switch (_context27.prev = _context27.next) {case 0:if (!("string" != typeof e)) {_context27.next = 2;break;}throw new Error("username must be a string");case 2:_context27.next = 4;return this._request.send("auth.isUsernameRegistered", { username: e });case 4:_yield$this$_request$5 = _context27.sent;t = _yield$this$_request$5.data;return _context27.abrupt("return", t && t.isRegistered);case 7:case "end":return _context27.stop();}}}, _callee27, this);}));function isUsernameRegistered(_x24) {return _isUsernameRegistered.apply(this, arguments);}return isUsernameRegistered;}() }, { key: "getLoginState", value: function getLoginState() {return Promise.resolve(this.hasLoginState());} }, { key: "signInWithTicket", value: function () {var _signInWithTicket = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {return _regenerator.default.wrap(function _callee28$(_context28) {while (1) {switch (_context28.prev = _context28.next) {case 0:return _context28.abrupt("return", new _e(this.config).signIn(e));case 1:case "end":return _context28.stop();}}}, _callee28, this);}));function signInWithTicket(_x25) {return _signInWithTicket.apply(this, arguments);}return signInWithTicket;}() }, { key: "shouldRefreshAccessToken", value: function shouldRefreshAccessToken(e) {this._request._shouldRefreshAccessTokenHook = e.bind(this);} }, { key: "getUserInfo", value: function getUserInfo() {return this._request.send("auth.getUserInfo", {}).then(function (e) {return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, { requestId: e.seqId });});} }, { key: "getAuthHeader", value: function getAuthHeader() {var _this$_cache$keys11 = this._cache.keys,e = _this$_cache$keys11.refreshTokenKey,t = _this$_cache$keys11.accessTokenKey,n = this._cache.getStore(e);return { "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n };} }, { key: "_onAnonymousConverted", value: function _onAnonymousConverted(e) {var t = e.data.env;t === this.config.env && this._cache.updatePersistence(this.config.persistence);} }, { key: "_onLoginTypeChanged", value: function _onLoginTypeChanged(e) {var _e$data = e.data,t = _e$data.loginType,n = _e$data.persistence,s = _e$data.env;s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));} }, { key: "currentUser", get: function get() {var e = this.hasLoginState();return e && e.user || null;} }, { key: "loginType", get: function get() {return this._cache.getStore(this._cache.keys.loginTypeKey);} }]);return Se;}();var ve = function ve(e, t) {t = t || F();var n = fe(this.config.env),s = e.cloudPath,r = e.filePath,o = e.onUploadProgress,_e$fileType = e.fileType,i = _e$fileType === void 0 ? "image" : _e$fileType;return n.send("storage.getUploadMetadata", { path: s }).then(function (e) {var _e$data2 = e.data,a = _e$data2.url,c = _e$data2.authorization,u = _e$data2.token,h = _e$data2.fileId,l = _e$data2.cosFileId,d = e.requestId,f = { key: s, signature: c, "x-cos-meta-fileid": l, success_action_status: "201", "x-cos-security-token": u };n.upload({ url: a, data: f, file: r, name: s, fileType: i, onUploadProgress: o }).then(function (e) {201 === e.statusCode ? t(null, { fileID: h, requestId: d }) : t(new Error("STORAGE_REQUEST_FAIL: ".concat(e.data)));}).catch(function (e) {t(e);});}).catch(function (e) {t(e);}), t.promise;},Te = function Te(e, t) {t = t || F();var n = fe(this.config.env),s = e.cloudPath;return n.send("storage.getUploadMetadata", { path: s }).then(function (e) {t(null, e);}).catch(function (e) {t(e);}), t.promise;},Pe = function Pe(_ref5, t) {var e = _ref5.fileList;if (t = t || F(), !e || !Array.isArray(e)) return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };var _iterator3 = _createForOfIteratorHelper(e),_step3;try {for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {var _t6 = _step3.value;if (!_t6 || "string" != typeof _t6) return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };}} catch (err) {_iterator3.e(err);} finally {_iterator3.f();}var n = { fileid_list: e };return fe(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {e.code ? t(null, e) : t(null, { fileList: e.data.delete_list, requestId: e.requestId });}).catch(function (e) {t(e);}), t.promise;},Ae = function Ae(_ref6, t) {var e = _ref6.fileList;t = t || F(), e && Array.isArray(e) || t(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });var n = [];var _iterator4 = _createForOfIteratorHelper(e),_step4;try {for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {var _s6 = _step4.value;"object" == typeof _s6 ? (_s6.hasOwnProperty("fileID") && _s6.hasOwnProperty("maxAge") || t(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n.push({ fileid: _s6.fileID, max_age: _s6.maxAge })) : "string" == typeof _s6 ? n.push({ fileid: _s6 }) : t(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" });}} catch (err) {_iterator4.e(err);} finally {_iterator4.f();}var s = { file_list: n };return fe(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {e.code ? t(null, e) : t(null, { fileList: e.data.download_list, requestId: e.requestId });}).catch(function (e) {t(e);}), t.promise;},Ie = /*#__PURE__*/function () {var _ref8 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee29(_ref7, t) {var e, n, s, r;return _regenerator.default.wrap(function _callee29$(_context29) {while (1) {switch (_context29.prev = _context29.next) {case 0:e = _ref7.fileID;_context29.next = 3;return Ae.call(this, { fileList: [{ fileID: e, maxAge: 600 }] });case 3:n = _context29.sent.fileList[0];if (!("SUCCESS" !== n.code)) {_context29.next = 6;break;}return _context29.abrupt("return", t ? t(n) : new Promise(function (e) {e(n);}));case 6:s = fe(this.config.env);r = n.download_url;if (!(r = encodeURI(r), !t)) {_context29.next = 10;break;}return _context29.abrupt("return", s.download({ url: r }));case 10:_context29.t0 = t;_context29.next = 13;return s.download({ url: r });case 13:_context29.t1 = _context29.sent;(0, _context29.t0)(_context29.t1);case 15:case "end":return _context29.stop();}}}, _callee29, this);}));return function Ie(_x26, _x27) {return _ref8.apply(this, arguments);};}(),Ee = function Ee(_ref9, o) {var e = _ref9.name,t = _ref9.data,n = _ref9.query,s = _ref9.parse,r = _ref9.search;var i = o || F();var a;try {a = t ? JSON.stringify(t) : "";} catch (e) {return Promise.reject(e);}if (!e) return Promise.reject(new Error("函数名不能为空"));var c = { inQuery: n, parse: s, search: r, function_name: e, request_data: a };return fe(this.config.env).send("functions.invokeFunction", c).then(function (e) {if (e.code) i(null, e);else {var _t7 = e.data.response_data;if (s) i(null, { result: _t7, requestId: e.requestId });else try {_t7 = JSON.parse(e.data.response_data), i(null, { result: _t7, requestId: e.requestId });} catch (e) {i(new Error("response data must be json"));}}return i.promise;}).catch(function (e) {i(e);}), i.promise;},be = { timeout: 15e3, persistence: "session" },Oe = {};var Ue = /*#__PURE__*/function () {function Ue(e) {_classCallCheck(this, Ue);this.config = e || this.config, this.authObj = void 0;}_createClass(Ue, [{ key: "init", value: function init(e) {switch (j.adapter || (this.requestClient = new j.adapter.reqClass({ timeout: e.timeout || 5e3, timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD") })), this.config = _objectSpread(_objectSpread({}, be), e), !0) {case this.config.timeout > 6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;break;case this.config.timeout < 100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;}return new Ue(this.config);} }, { key: "auth", value: function auth() {var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref10.persistence;if (this.authObj) return this.authObj;var t = e || j.adapter.primaryStorage || be.persistence;var n;return t !== this.config.persistence && (this.config.persistence = t), function (e) {var t = e.env;z[t] = new W(e), V[t] = new W(_objectSpread(_objectSpread({}, e), {}, { persistence: "local" }));}(this.config), n = this.config, de[n.env] = new le(n), this.authObj = new Se(this.config), this.authObj;} }, { key: "on", value: function on(e, t) {return Q.apply(this, [e, t]);} }, { key: "off", value: function off(e, t) {return ee.apply(this, [e, t]);} }, { key: "callFunction", value: function callFunction(e, t) {return Ee.apply(this, [e, t]);} }, { key: "deleteFile", value: function deleteFile(e, t) {return Pe.apply(this, [e, t]);} }, { key: "getTempFileURL", value: function getTempFileURL(e, t) {return Ae.apply(this, [e, t]);} }, { key: "downloadFile", value: function downloadFile(e, t) {return Ie.apply(this, [e, t]);} }, { key: "uploadFile", value: function uploadFile(e, t) {return ve.apply(this, [e, t]);} }, { key: "getUploadMetadata", value: function getUploadMetadata(e, t) {return Te.apply(this, [e, t]);} }, { key: "registerExtension", value: function registerExtension(e) {Oe[e.name] = e;} }, { key: "invokeExtension", value: function () {var _invokeExtension = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee30(e, t) {var n;return _regenerator.default.wrap(function _callee30$(_context30) {while (1) {switch (_context30.prev = _context30.next) {case 0:n = Oe[e];if (n) {_context30.next = 3;break;}throw Error("\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C"));case 3:_context30.next = 5;return n.invoke(t, this);case 5:return _context30.abrupt("return", _context30.sent);case 6:case "end":return _context30.stop();}}}, _callee30, this);}));function invokeExtension(_x28, _x29) {return _invokeExtension.apply(this, arguments);}return invokeExtension;}() }, { key: "useAdapters", value: function useAdapters(e) {var _ref11 = $(e) || {},t = _ref11.adapter,n = _ref11.runtime;t && (j.adapter = t), n && (j.runtime = n);} }]);return Ue;}();var Ce = new Ue();function xe(e, t, n) {void 0 === n && (n = {});var s = /\?/.test(t),r = "";for (var o in n) {"" === r ? !s && (t += "?") : r += "&", r += o + "=" + encodeURIComponent(n[o]);}return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;}var De = /*#__PURE__*/function () {function De() {_classCallCheck(this, De);}_createClass(De, [{ key: "post", value: function post(e) {var t = e.url,n = e.data,s = e.headers;return new Promise(function (e, r) {U.request({ url: xe("https:", t), data: n, method: "POST", header: s, success: function success(t) {e(t);}, fail: function fail(e) {r(e);} });});} }, { key: "upload", value: function upload(e) {return new Promise(function (t, n) {var s = e.url,r = e.file,o = e.data,i = e.headers,a = e.fileType,c = U.uploadFile({ url: xe("https:", s), name: "file", formData: Object.assign({}, o), filePath: r, fileType: a, header: i, success: function success(e) {var n = { statusCode: e.statusCode, data: e.data || {} };200 === e.statusCode && o.success_action_status && (n.statusCode = parseInt(o.success_action_status, 10)), t(n);}, fail: function fail(e) {u && "mp-alipay" === h && console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"), n(new Error(e.errMsg || "uploadFile:fail"));} });"function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {e.onUploadProgress({ loaded: t.totalBytesSent, total: t.totalBytesExpectedToSend });});});} }]);return De;}();var Re = { setItem: function setItem(e, t) {U.setStorageSync(e, t);}, getItem: function getItem(e) {return U.getStorageSync(e);}, removeItem: function removeItem(e) {U.removeStorageSync(e);}, clear: function clear() {U.clearStorageSync();} };var qe = { genAdapter: function genAdapter() {return { root: {}, reqClass: De, localStorage: Re, primaryStorage: "local" };}, isMatch: function isMatch() {return !0;}, runtime: "uni_app" };Ce.useAdapters(qe);var Fe = Ce,Le = Fe.init;function Ne() {return { token: U.getStorageSync("uni_id_token") || U.getStorageSync("uniIdToken"), tokenExpired: U.getStorageSync("uni_id_token_expired") };}function Me() {if (!u || "h5" !== h) return;uni.getStorageSync("__LAST_DCLOUD_APPID") !== p && (uni.setStorageSync("__LAST_DCLOUD_APPID", p), console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"), U.removeStorageSync("uni_id_token"), U.removeStorageSync("uniIdToken"), U.removeStorageSync("uni_id_token_expired"));}Fe.init = function (e) {e.env = e.spaceId;var t = Le.call(this, e);t.config.provider = "tencent", t.config.spaceId = e.spaceId;var n = t.auth;return t.auth = function (e) {var t = n.call(this, e);return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {t[e] = T(t[e]).bind(t);}), t;}, t.customAuth = t.auth, t;};var $e = /*#__PURE__*/function (_C) {_inherits($e, _C);var _super9 = _createSuper($e);function $e() {_classCallCheck(this, $e);return _super9.apply(this, arguments);}_createClass($e, [{ key: "getAccessToken", value: function getAccessToken() {var _this13 = this;return new Promise(function (e, t) {var n = "Anonymous_Access_token";_this13.setAccessToken(n), e(n);});} }, { key: "setupRequest", value: function setupRequest(e, t) {var n = Object.assign({}, e, { spaceId: this.config.spaceId, timestamp: Date.now() }),s = { "Content-Type": "application/json" };"auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = O.sign(n, this.config.clientSecret);var r = b(),o = r.APPID,i = r.PLATFORM,a = r.DEVICEID,c = r.CLIENT_SDK_VERSION;s["x-client-platform"] = i, s["x-client-appid"] = o, s["x-client-device-id"] = a, s["x-client-version"] = c;var _Ne = Ne(),u = _Ne.token;return s["x-client-token"] = u, { url: this.config.requestUrl, method: "POST", data: n, dataType: "json", header: JSON.parse(JSON.stringify(s)) };} }, { key: "uploadFileToOSS", value: function uploadFileToOSS(_ref12) {var _this14 = this;var e = _ref12.url,t = _ref12.formData,n = _ref12.name,s = _ref12.filePath,r = _ref12.fileType,o = _ref12.onUploadProgress;return new Promise(function (i, a) {var c = _this14.adapter.uploadFile({ url: e, formData: t, name: n, filePath: s, fileType: r, success: function success(e) {e && e.statusCode < 400 ? i(e) : a(new P({ code: "UPLOAD_FAILED", message: "文件上传失败" }));}, fail: function fail(e) {a(new P({ code: e.code || "UPLOAD_FAILED", message: e.message || e.errMsg || "文件上传失败" }));} });"function" == typeof o && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {o({ loaded: e.totalBytesSent, total: e.totalBytesExpectedToSend });});});} }, { key: "uploadFile", value: function uploadFile(_ref13) {var _this15 = this;var e = _ref13.filePath,t = _ref13.cloudPath,_ref13$fileType = _ref13.fileType,n = _ref13$fileType === void 0 ? "image" : _ref13$fileType,s = _ref13.onUploadProgress;if (!t) throw new P({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });var r;return this.getOSSUploadOptionsFromPath({ cloudPath: t }).then(function (t) {var _t$result = t.result,o = _t$result.url,i = _t$result.formData,a = _t$result.name,c = _t$result.fileUrl;r = c;var u = { url: o, formData: i, name: a, filePath: e, fileType: n };return _this15.uploadFileToOSS(Object.assign({}, u, { onUploadProgress: s }));}).then(function () {return _this15.reportOSSUpload({ cloudPath: t });}).then(function (t) {return new Promise(function (n, s) {t.success ? n({ success: !0, filePath: e, fileID: r }) : s(new P({ code: "UPLOAD_FAILED", message: "文件上传失败" }));});});} }]);return $e;}(C);var je = { init: function init(e) {var t = new $e(e),n = { signInAnonymously: function signInAnonymously() {return t.authorize();}, getLoginState: function getLoginState() {return Promise.resolve(!1);} };return t.auth = function () {return n;}, t.customAuth = t.auth, t;} };var Ke;function Be(_ref14) {var e = _ref14.data;Ke || (Ke = b());var t = JSON.parse(JSON.stringify(e || {}));if (Object.assign(t, { clientInfo: Ke }), !t.uniIdToken) {var _Ne2 = Ne(),_e16 = _Ne2.token;_e16 && (t.uniIdToken = _e16);}return t;}function He(_ref15) {var _this16 = this;var e = _ref15.name,t = _ref15.data;var n = this.localAddress,s = this.localPort,r = { aliyun: "aliyun", tencent: "tcb" }[this.config.provider],o = this.config.spaceId,i = "http://".concat(n, ":").concat(s, "/system/check-function"),a = "http://".concat(n, ":").concat(s, "/cloudfunctions/").concat(e);return new Promise(function (t, n) {U.request({ method: "POST", url: i, data: { name: e, platform: h, provider: r, spaceId: o }, timeout: 3e3, success: function success(e) {t(e);}, fail: function fail() {t({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });} });}).then(function () {var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref16.data;var _ref17 = e || {},t = _ref17.code,n = _ref17.message;return { code: 0 === t ? 0 : t || "SYS_ERR", message: n || "SYS_ERR" };}).then(function (_ref18) {var n = _ref18.code,s = _ref18.message;if (0 !== n) {switch (n) {case "MODULE_ENCRYPTED":console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));break;case "FUNCTION_ENCRYPTED":console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));break;case "ACTION_ENCRYPTED":console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case "NETWORK_ERROR":{var _e17 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(_e17), new Error(_e17);}case "SWITCH_TO_CLOUD":break;default:{var _e18 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(s, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");throw console.error(_e18), new Error(_e18);}}return _this16._originCallFunction({ name: e, data: t });}return new Promise(function (e, n) {var s = Be.call(_this16, { data: t });U.request({ method: "POST", url: a, data: { provider: r, platform: h, param: s }, success: function success() {var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},t = _ref19.statusCode,s = _ref19.data;return !t || t >= 400 ? n(new P({ code: s.code || "SYS_ERR", message: s.message || "request:fail" })) : e({ result: s });}, fail: function fail(e) {n(new P({ code: e.code || e.errCode || "SYS_ERR", message: e.message || e.errMsg || "request:fail" }));} });});});}var We = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];var ze = /[\\^$.*+?()[\]{}|]/g,Ve = RegExp(ze.source);function Je(e, t, n) {return e.replace(new RegExp((s = t) && Ve.test(s) ? s.replace(ze, "\\$&") : s, "g"), n);var s;}function Ye(_ref20) {var e = _ref20.functionName,t = _ref20.result,n = _ref20.logPvd;if (this.config.useDebugFunction && t && t.requestId) {var _s7 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e, requestId: t.requestId });console.log("[".concat(n, "-request]").concat(_s7, "[/").concat(n, "-request]"));}}function Xe(e) {var t = e.callFunction,n = function n(_n4) {var _this17 = this;var s = _n4.name;_n4.data = Be.call(e, { data: _n4.data });var r = { aliyun: "aliyun", tencent: "tcb" }[this.config.provider];return t.call(this, _n4).then(function (e) {return Ye.call(_this17, { functionName: s, result: e, logPvd: r }), Promise.resolve(e);}, function (e) {return Ye.call(_this17, { functionName: s, result: e, logPvd: r }), e && e.message && (e.message = function () {var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref21$message = _ref21.message,e = _ref21$message === void 0 ? "" : _ref21$message,_ref21$extraInfo = _ref21.extraInfo,t = _ref21$extraInfo === void 0 ? {} : _ref21$extraInfo,_ref21$formatter = _ref21.formatter,n = _ref21$formatter === void 0 ? [] : _ref21$formatter;for (var _s8 = 0; _s8 < n.length; _s8++) {var _n$_s = n[_s8],_r3 = _n$_s.rule,_o2 = _n$_s.content,i = _n$_s.mode,_a = e.match(_r3);if (!_a) continue;var _c = _o2;for (var _e19 = 1; _e19 < _a.length; _e19++) {_c = Je(_c, "{$".concat(_e19, "}"), _a[_e19]);}for (var _e20 in t) {_c = Je(_c, "{".concat(_e20, "}"), t[_e20]);}switch (i) {case "replace":return _c;case "append":default:return e + _c;}}return e;}({ message: "[".concat(_n4.name, "]: ").concat(e.message), formatter: We, extraInfo: { functionName: s } })), Promise.reject(e);});};e.callFunction = function (t) {var s;return u && e.debugInfo && !e.debugInfo.forceRemote && d ? (e._originCallFunction || (e._originCallFunction = n), s = He.call(this, t)) : s = n.call(this, t), Object.defineProperty(s, "result", { get: function get() {return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};} }), s;};}var Ge = Symbol("CLIENT_DB_INTERNAL");function Qe(e, t) {return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Ge, e.__ob__ = void 0, new Proxy(e, { get: function get(e, n, s) {return n in e || "string" != typeof n ? e[n] : t.get(e, n, s);} });}function Ze(e) {switch (o(e)) {case "array":return e.map(function (e) {return Ze(e);});case "object":return e._internalType === Ge || Object.keys(e).forEach(function (t) {e[t] = Ze(e[t]);}), e;case "regexp":return { $regexp: { source: e.source, flags: e.flags } };case "date":return { $date: e.toISOString() };default:return e;}}function et(e) {e.database = function (t) {if (t && Object.keys(t).length > 0) return e.init(t).database();if (this._database) return this._database;var n = {};var s = {};function r(_ref22) {var t = _ref22.action,r = _ref22.command,o = _ref22.multiCommand;return S(v("database", "invoke")).then(function () {return e.callFunction({ name: "DCloud-clientDB", data: { action: t, command: r, multiCommand: o } });}).then(function (e) {var _e$result = e.result,t = _e$result.code,r = _e$result.message,o = _e$result.token,i = _e$result.tokenExpired,_e$result$systemInfo = _e$result.systemInfo,c = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;if (c) for (var _e21 = 0; _e21 < c.length; _e21++) {var _c$_e = c[_e21],_t8 = _c$_e.level,_n5 = _c$_e.message,_s9 = _c$_e.detail,_r4 = console["app-plus" === h && "warn" === _t8 ? "error" : _t8] || console.log;var _o3 = "[System Info]" + _n5;_s9 && (_o3 = "".concat(_o3, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s9)), _r4(_o3);}if (t) {var _e22 = new a(r, t);return s.error && s.error.forEach(function (t) {t(_e22);}), Promise.reject(_e22);}o && i && (!function () {var _ref23 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref23.token,t = _ref23.tokenExpired;e && U.setStorageSync("uni_id_token", e), t && U.setStorageSync("uni_id_token_expired", t);}({ token: o, tokenExpired: i }), n.refreshToken && n.refreshToken.forEach(function (e) {e({ token: o, tokenExpired: i });}), s.refreshToken && s.refreshToken.forEach(function (e) {e({ token: o, tokenExpired: i });}));var u = e.result.affectedDocs;return "number" == typeof u && Object.defineProperty(e.result, "affectedDocs", { get: function get() {return console.warn("affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"), u;} }), S(v("database", "success"), e).then(function () {return S(v("database", "complete"), e);}).then(function () {return Promise.resolve(e);});}, function (e) {var t = new a(e.message, e.code || "SYSTEM_ERROR");return s.error && s.error.forEach(function (e) {e(t);}), /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"), S(v("database", "fail"), e).then(function () {return S(v("database", "complete"), e);}).then(function () {return Promise.reject(e);});});}this.isDefault && (s = m("_globalUniCloudDatabaseCallback"));var o = /*#__PURE__*/function () {function o(e, t) {_classCallCheck(this, o);this.content = e, this.prevStage = t, this.udb = null;}_createClass(o, [{ key: "toJSON", value: function toJSON() {var e = this;var t = [e.content];for (; e.prevStage;) {e = e.prevStage, t.push(e.content);}return { $db: t.reverse().map(function (e) {return { $method: e.$method, $param: Ze(e.$param) };}) };} }, { key: "getAction", value: function getAction() {var e = this.toJSON().$db.find(function (e) {return "action" === e.$method;});return e && e.$param && e.$param[0];} }, { key: "getCommand", value: function getCommand() {return { $db: this.toJSON().$db.filter(function (e) {return "action" !== e.$method;}) };} }, { key: "get", value: function get() {return this._send("get", Array.from(arguments));} }, { key: "add", value: function add() {return this._send("add", Array.from(arguments));} }, { key: "remove", value: function remove() {return this._send("remove", Array.from(arguments));} }, { key: "update", value: function update() {return this._send("update", Array.from(arguments));} }, { key: "end", value: function end() {return this._send("end", Array.from(arguments));} }, { key: "set", value: function set() {throw new Error("clientDB禁止使用set方法");} }, { key: "_send", value: function _send(e, t) {var n = this.getAction(),s = this.getCommand();return s.$db.push({ $method: e, $param: Ze(t) }), r({ action: n, command: s });} }, { key: "useAggregate", get: function get() {var e = this,t = !1;for (; e.prevStage;) {e = e.prevStage;var _n6 = e.content.$method;if ("aggregate" === _n6 || "pipeline" === _n6) {t = !0;break;}}return t;} }, { key: "count", get: function get() {if (!this.useAggregate) return function () {return this._send("count", Array.from(arguments));};var e = this;return function () {return u({ $method: "count", $param: Ze(Array.from(arguments)) }, e);};} }, { key: "multiSend", get: function get() {} }]);return o;}();var i = ["db.Geo", "db.command", "command.aggregate"];function c(e, t) {return i.indexOf("".concat(e, ".").concat(t)) > -1;}function u(e, t) {return Qe(new o(e, t), { get: function get(e, t) {var n = "db";return e && e.content && (n = e.content.$method), c(n, t) ? u({ $method: t }, e) : function () {return u({ $method: t, $param: Ze(Array.from(arguments)) }, e);};} });}function l(_ref24) {var e = _ref24.path,t = _ref24.method;return /*#__PURE__*/function () {function _class2() {_classCallCheck(this, _class2);this.param = Array.from(arguments);}_createClass(_class2, [{ key: "toJSON", value: function toJSON() {return { $newDb: [].concat(_toConsumableArray(e.map(function (e) {return { $method: e };})), [{ $method: t, $param: this.param }]) };} }]);return _class2;}();}var d = { auth: { on: function on(e, t) {n[e] = n[e] || [], n[e].indexOf(t) > -1 || n[e].push(t);}, off: function off(e, t) {n[e] = n[e] || [];var s = n[e].indexOf(t);-1 !== s && n[e].splice(s, 1);} }, on: function on(e, t) {s[e] = s[e] || [], s[e].indexOf(t) > -1 || s[e].push(t);}, off: function off(e, t) {s[e] = s[e] || [];var n = s[e].indexOf(t);-1 !== n && s[e].splice(n, 1);}, env: Qe({}, { get: function get(e, t) {return { $env: t };} }), Geo: Qe({}, { get: function get(e, t) {return l({ path: ["Geo"], method: t });} }), getCloudEnv: function getCloudEnv(e) {if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");return { $env: e.replace("$cloudEnv_", "") };}, multiSend: function multiSend() {var e = Array.from(arguments);return r({ multiCommand: e.map(function (e) {var t = e.getAction(),n = e.getCommand();if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");return { action: t, command: n };}) }).then(function (t) {for (var _n7 = 0; _n7 < e.length; _n7++) {var _s10 = e[_n7];_s10.udb && "function" == typeof _s10.udb.setResult && _s10.udb.setResult(t.result.dataList[_n7]);}return Promise.resolve(t);}, function (t) {for (var _n8 = 0; _n8 < e.length; _n8++) {var _s11 = e[_n8];_s11.udb && "function" == typeof _s11.udb.setResult && _s11.udb.setResult(t);}return Promise.reject(t);});}, get serverDate() {return l({ path: [], method: "serverDate" });}, get RegExp() {return l({ path: [], method: "RegExp" });} },f = Qe(d, { get: function get(e, t) {return c("db", t) ? u({ $method: t }) : function () {return u({ $method: t, $param: Ze(Array.from(arguments)) });};} });return this._database = f, f;};}var tt;var nt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",st = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function rt() {var e = Ne().token || "",t = e.split(".");if (!e || 3 !== t.length) return { uid: null, role: [], permission: [], tokenExpired: 0 };var n;try {n = JSON.parse((s = t[1], decodeURIComponent(tt(s).split("").map(function (e) {return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);}).join(""))));} catch (e) {throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);}var s;return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;}tt = "function" != typeof atob ? function (e) {if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !st.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e += "==".slice(2 - (3 & e.length));for (var n, s, r = "", o = 0; o < e.length;) {t = nt.indexOf(e.charAt(o++)) << 18 | nt.indexOf(e.charAt(o++)) << 12 | (n = nt.indexOf(e.charAt(o++))) << 6 | (s = nt.indexOf(e.charAt(o++))), r += 64 === n ? String.fromCharCode(t >> 16 & 255) : 64 === s ? String.fromCharCode(t >> 16 & 255, t >> 8 & 255) : String.fromCharCode(t >> 16 & 255, t >> 8 & 255, 255 & t);}return r;} : atob;var ot = t(n(function (e, t) {Object.defineProperty(t, "__esModule", { value: !0 });var n = "chooseAndUploadFile:ok",s = "chooseAndUploadFile:fail";function r(e, t) {return e.tempFiles.forEach(function (e, n) {e.name || (e.name = e.path.substring(e.path.lastIndexOf("/") + 1)), t && (e.fileType = t), e.cloudPath = Date.now() + "_" + n + e.name.substring(e.name.lastIndexOf("."));}), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {return e.path;})), e;}function o(e, t, _ref25) {var s = _ref25.onChooseFile,r = _ref25.onUploadProgress;return t.then(function (e) {if (s) {var _t9 = s(e);if (void 0 !== _t9) return Promise.resolve(_t9).then(function (t) {return void 0 === t ? e : t;});}return e;}).then(function (t) {return !1 === t ? { errMsg: n, tempFilePaths: [], tempFiles: [] } : function (e, t) {var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;var r = arguments.length > 3 ? arguments[3] : undefined;(t = Object.assign({}, t)).errMsg = n;var o = t.tempFiles,i = o.length;var a = 0;return new Promise(function (n) {for (; a < s;) {c();}function c() {var s = a++;if (s >= i) return void (!o.find(function (e) {return !e.url && !e.errMsg;}) && n(t));var u = o[s];e.uploadFile({ filePath: u.path, cloudPath: u.cloudPath, fileType: u.fileType, onUploadProgress: function onUploadProgress(e) {e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);} }).then(function (e) {u.url = e.fileID, s < i && c();}).catch(function (e) {u.errMsg = e.errMsg || e.message, s < i && c();});}});}(e, t, 5, r);});}t.initChooseAndUploadFile = function (e) {return function () {var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { type: "all" };return "image" === t.type ? o(e, function (e) {var t = e.count,n = e.sizeType,_e$sourceType = e.sourceType,o = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,i = e.extension;return new Promise(function (e, a) {uni.chooseImage({ count: t, sizeType: n, sourceType: o, extension: i, success: function success(t) {e(r(t, "image"));}, fail: function fail(e) {a({ errMsg: e.errMsg.replace("chooseImage:fail", s) });} });});}(t), t) : "video" === t.type ? o(e, function (e) {var t = e.camera,n = e.compressed,o = e.maxDuration,_e$sourceType2 = e.sourceType,i = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,a = e.extension;return new Promise(function (e, c) {uni.chooseVideo({ camera: t, compressed: n, maxDuration: o, sourceType: i, extension: a, success: function success(t) {var n = t.tempFilePath,s = t.duration,o = t.size,i = t.height,a = t.width;e(r({ errMsg: "chooseVideo:ok", tempFilePaths: [n], tempFiles: [{ name: t.tempFile && t.tempFile.name || "", path: n, size: o, type: t.tempFile && t.tempFile.type || "", width: a, height: i, duration: s, fileType: "video", cloudPath: "" }] }, "video"));}, fail: function fail(e) {c({ errMsg: e.errMsg.replace("chooseVideo:fail", s) });} });});}(t), t) : o(e, function (e) {var t = e.count,n = e.extension;return new Promise(function (e, o) {var i = uni.chooseFile;if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (i = wx.chooseMessageFile), "function" != typeof i) return o({ errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });i({ type: "all", count: t, extension: n, success: function success(t) {e(r(t));}, fail: function fail(e) {o({ errMsg: e.errMsg.replace("chooseFile:fail", s) });} });});}(t), t);};};}));var it = "manual";function at(e) {return { props: { localdata: { type: Array, default: function _default() {return [];} }, options: { type: [Object, Array], default: function _default() {return {};} }, spaceInfo: { type: Object, default: function _default() {return {};} }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: !1 }, gettree: { type: [Boolean, String], default: !1 }, gettreepath: { type: [Boolean, String], default: !1 }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: !1 }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: !1 } }, data: function data() {return { mixinDatacomLoading: !1, mixinDatacomHasMore: !1, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {} };}, created: function created() {var _this18 = this;this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(function () {var e = [];return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {e.push(_this18[t]);}), e;}, function (e, t) {if (_this18.loadtime === it) return;var n = !1;var s = [];for (var _r5 = 2; _r5 < e.length; _r5++) {e[_r5] !== t[_r5] && (s.push(e[_r5]), n = !0);}e[0] !== t[0] && (_this18.mixinDatacomPage.current = _this18.pageCurrent), _this18.mixinDatacomPage.size = _this18.pageSize, _this18.onMixinDatacomPropsChange(n, s);});}, methods: { onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {}, mixinDatacomEasyGet: function mixinDatacomEasyGet() {var _this19 = this;var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref26$getone = _ref26.getone,e = _ref26$getone === void 0 ? !1 : _ref26$getone,t = _ref26.success,n = _ref26.fail;this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {_this19.mixinDatacomLoading = !1;var _n$result = n.result,s = _n$result.data,r = _n$result.count;_this19.getcount && (_this19.mixinDatacomPage.count = r), _this19.mixinDatacomHasMore = s.length < _this19.pageSize;var o = e ? s.length ? s[0] : void 0 : s;_this19.mixinDatacomResData = o, t && t(o);}).catch(function (e) {_this19.mixinDatacomLoading = !1, _this19.mixinDatacomErrorMessage = e, n && n(e);}));}, mixinDatacomGet: function mixinDatacomGet() {var _n9;var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var n = e.database(this.spaceInfo);var s = t.action || this.action;s && (n = n.action(s));var r = t.collection || this.collection;n = Array.isArray(r) ? (_n9 = n).collection.apply(_n9, _toConsumableArray(r)) : n.collection(r);var o = t.where || this.where;o && Object.keys(o).length && (n = n.where(o));var i = t.field || this.field;i && (n = n.field(i));var a = t.foreignKey || this.foreignKey;a && (n = n.foreignKey(a));var c = t.groupby || this.groupby;c && (n = n.groupBy(c));var u = t.groupField || this.groupField;u && (n = n.groupField(u));!0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());var h = t.orderby || this.orderby;h && (n = n.orderBy(h));var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,f = void 0 !== t.getcount ? t.getcount : this.getcount,p = void 0 !== t.gettree ? t.gettree : this.gettree,g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,m = { getCount: f },y = { limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel, startWith: void 0 !== t.startwith ? t.startwith : this.startwith };return p && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;} } };}function ct(_x30, _x31) {return _ct.apply(this, arguments);}function _ct() {_ct = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee32(e, t) {var n, _e27, s;return _regenerator.default.wrap(function _callee32$(_context32) {while (1) {switch (_context32.prev = _context32.next) {case 0:n = "http://".concat(e, ":").concat(t, "/system/ping");_context32.prev = 1;_context32.next = 4;return s = { url: n, timeout: 500 }, new Promise(function (e, t) {U.request(_objectSpread(_objectSpread({}, s), {}, { success: function success(t) {e(t);}, fail: function fail(e) {t(e);} }));});case 4:_e27 = _context32.sent;return _context32.abrupt("return", !(!_e27.data || 0 !== _e27.data.code));case 8:_context32.prev = 8;_context32.t0 = _context32["catch"](1);return _context32.abrupt("return", !1);case 11:case "end":return _context32.stop();}}}, _callee32, null, [[1, 8]]);}));return _ct.apply(this, arguments);}var ut = new ( /*#__PURE__*/function () {function _class3() {_classCallCheck(this, _class3);}_createClass(_class3, [{ key: "init", value: function init(e) {var t = {};var n = !1 !== e.debugFunction && u && ("h5" === h && navigator.userAgent.indexOf("HBuilderX") > 0 || "app-plus" === h);switch (e.provider) {case "tencent":t = Fe.init(Object.assign(e, { useDebugFunction: n }));break;case "aliyun":t = x.init(Object.assign(e, { useDebugFunction: n }));break;case "private":t = je.init(Object.assign(e, { useDebugFunction: n }));break;default:throw new Error("未提供正确的provider参数");}var s = l;u && s && !s.code && (t.debugInfo = s);var r = Promise.resolve();var o;o = 1, r = new Promise(function (e, t) {setTimeout(function () {e();}, o);}), t.isReady = !1, t.isDefault = !1;var i = t.auth();t.initUniCloud = r.then(function () {return i.getLoginState();}).then(function (e) {return e ? Promise.resolve() : i.signInAnonymously();}).then(function () {if (!u) return Promise.resolve();if (u && t.debugInfo) {var _t$debugInfo = t.debugInfo,_e23 = _t$debugInfo.address,_n10 = _t$debugInfo.servePort;return function () {var _ref27 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee31(e, t) {var n, _s12, _r6;return _regenerator.default.wrap(function _callee31$(_context31) {while (1) {switch (_context31.prev = _context31.next) {case 0:_s12 = 0;case 1:if (!(_s12 < e.length)) {_context31.next = 11;break;}_r6 = e[_s12];_context31.next = 5;return ct(_r6, t);case 5:if (!_context31.sent) {_context31.next = 8;break;}n = _r6;return _context31.abrupt("break", 11);case 8:_s12++;_context31.next = 1;break;case 11:return _context31.abrupt("return", { address: n, port: t });case 12:case "end":return _context31.stop();}}}, _callee31);}));return function (_x32, _x33) {return _ref27.apply(this, arguments);};}()(_e23, _n10);}}).then(function () {var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref28.address,n = _ref28.port;if (!u) return Promise.resolve();if (e) t.localAddress = e, t.localPort = n;else if (t.debugInfo) {var _e24 = console["app-plus" === h ? "error" : "warn"];var _n11 = "";"remote" === t.debugInfo.initialLaunchType ? (t.debugInfo.forceRemote = !0, _n11 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs") : _n11 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs", "h5" === h && (_n11 += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), _e24(_n11);}}).then(function () {Me(), t.isReady = !0;}), Xe(t), function (e) {var t = e.uploadFile;e.uploadFile = function (e) {var _this20 = this;var n;return n = this.isReady ? Promise.resolve() : this.initUniCloud, n.then(function () {return t.call(_this20, e);});};}(t), et(t), function (e) {e.getCurrentUserInfo = rt, e.chooseAndUploadFile = ot.initChooseAndUploadFile(e), Object.assign(e, { get mixinDatacom() {return at(e);} });}(t);return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {t[e] && (t[e] = T(t[e], e));}), t.init = this.init, t;} }]);return _class3;}())();(function () {{var e = d;var t = {};if (1 === e.length) t = e[0], ut = ut.init(t), ut.isDefault = !0;else {var _t10 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo"];var _n12;_n12 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : f ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t10.forEach(function (e) {ut[e] = function () {return console.error(_n12), Promise.reject(new P({ code: "SYS_ERR", message: _n12 }));};});}Object.assign(ut, { get mixinDatacom() {return at(ut);} }), ut.addInterceptor = w, ut.removeInterceptor = k, u && "h5" === h && (window.uniCloud = ut);}})();var ht = ut;var _default2 = ht;exports.default = _default2;
  9439. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2), __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9440. /***/ }),
  9441. /***/ 82:
  9442. /*!**********************************************************!*\
  9443. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  9444. \**********************************************************/
  9445. /*! no static exports found */
  9446. /***/ (function(module, exports, __webpack_require__) {
  9447. module.exports = __webpack_require__(/*! regenerator-runtime */ 83);
  9448. /***/ }),
  9449. /***/ 83:
  9450. /*!************************************************************!*\
  9451. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  9452. \************************************************************/
  9453. /*! no static exports found */
  9454. /***/ (function(module, exports, __webpack_require__) {
  9455. /**
  9456. * Copyright (c) 2014-present, Facebook, Inc.
  9457. *
  9458. * This source code is licensed under the MIT license found in the
  9459. * LICENSE file in the root directory of this source tree.
  9460. */
  9461. // This method of obtaining a reference to the global object needs to be
  9462. // kept identical to the way it is obtained in runtime.js
  9463. var g = (function() {
  9464. return this || (typeof self === "object" && self);
  9465. })() || Function("return this")();
  9466. // Use `getOwnPropertyNames` because not all browsers support calling
  9467. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  9468. var hadRuntime = g.regeneratorRuntime &&
  9469. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  9470. // Save the old regeneratorRuntime in case it needs to be restored later.
  9471. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  9472. // Force reevalutation of runtime.js.
  9473. g.regeneratorRuntime = undefined;
  9474. module.exports = __webpack_require__(/*! ./runtime */ 84);
  9475. if (hadRuntime) {
  9476. // Restore the original runtime.
  9477. g.regeneratorRuntime = oldRuntime;
  9478. } else {
  9479. // Remove the global property added by runtime.js.
  9480. try {
  9481. delete g.regeneratorRuntime;
  9482. } catch(e) {
  9483. g.regeneratorRuntime = undefined;
  9484. }
  9485. }
  9486. /***/ }),
  9487. /***/ 84:
  9488. /*!*****************************************************!*\
  9489. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  9490. \*****************************************************/
  9491. /*! no static exports found */
  9492. /***/ (function(module, exports) {
  9493. /**
  9494. * Copyright (c) 2014-present, Facebook, Inc.
  9495. *
  9496. * This source code is licensed under the MIT license found in the
  9497. * LICENSE file in the root directory of this source tree.
  9498. */
  9499. !(function(global) {
  9500. "use strict";
  9501. var Op = Object.prototype;
  9502. var hasOwn = Op.hasOwnProperty;
  9503. var undefined; // More compressible than void 0.
  9504. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  9505. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  9506. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  9507. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  9508. var inModule = typeof module === "object";
  9509. var runtime = global.regeneratorRuntime;
  9510. if (runtime) {
  9511. if (inModule) {
  9512. // If regeneratorRuntime is defined globally and we're in a module,
  9513. // make the exports object identical to regeneratorRuntime.
  9514. module.exports = runtime;
  9515. }
  9516. // Don't bother evaluating the rest of this file if the runtime was
  9517. // already defined globally.
  9518. return;
  9519. }
  9520. // Define the runtime globally (as expected by generated code) as either
  9521. // module.exports (if we're in a module) or a new, empty object.
  9522. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  9523. function wrap(innerFn, outerFn, self, tryLocsList) {
  9524. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  9525. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  9526. var generator = Object.create(protoGenerator.prototype);
  9527. var context = new Context(tryLocsList || []);
  9528. // The ._invoke method unifies the implementations of the .next,
  9529. // .throw, and .return methods.
  9530. generator._invoke = makeInvokeMethod(innerFn, self, context);
  9531. return generator;
  9532. }
  9533. runtime.wrap = wrap;
  9534. // Try/catch helper to minimize deoptimizations. Returns a completion
  9535. // record like context.tryEntries[i].completion. This interface could
  9536. // have been (and was previously) designed to take a closure to be
  9537. // invoked without arguments, but in all the cases we care about we
  9538. // already have an existing method we want to call, so there's no need
  9539. // to create a new function object. We can even get away with assuming
  9540. // the method takes exactly one argument, since that happens to be true
  9541. // in every case, so we don't have to touch the arguments object. The
  9542. // only additional allocation required is the completion record, which
  9543. // has a stable shape and so hopefully should be cheap to allocate.
  9544. function tryCatch(fn, obj, arg) {
  9545. try {
  9546. return { type: "normal", arg: fn.call(obj, arg) };
  9547. } catch (err) {
  9548. return { type: "throw", arg: err };
  9549. }
  9550. }
  9551. var GenStateSuspendedStart = "suspendedStart";
  9552. var GenStateSuspendedYield = "suspendedYield";
  9553. var GenStateExecuting = "executing";
  9554. var GenStateCompleted = "completed";
  9555. // Returning this object from the innerFn has the same effect as
  9556. // breaking out of the dispatch switch statement.
  9557. var ContinueSentinel = {};
  9558. // Dummy constructor functions that we use as the .constructor and
  9559. // .constructor.prototype properties for functions that return Generator
  9560. // objects. For full spec compliance, you may wish to configure your
  9561. // minifier not to mangle the names of these two functions.
  9562. function Generator() {}
  9563. function GeneratorFunction() {}
  9564. function GeneratorFunctionPrototype() {}
  9565. // This is a polyfill for %IteratorPrototype% for environments that
  9566. // don't natively support it.
  9567. var IteratorPrototype = {};
  9568. IteratorPrototype[iteratorSymbol] = function () {
  9569. return this;
  9570. };
  9571. var getProto = Object.getPrototypeOf;
  9572. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  9573. if (NativeIteratorPrototype &&
  9574. NativeIteratorPrototype !== Op &&
  9575. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  9576. // This environment has a native %IteratorPrototype%; use it instead
  9577. // of the polyfill.
  9578. IteratorPrototype = NativeIteratorPrototype;
  9579. }
  9580. var Gp = GeneratorFunctionPrototype.prototype =
  9581. Generator.prototype = Object.create(IteratorPrototype);
  9582. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  9583. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  9584. GeneratorFunctionPrototype[toStringTagSymbol] =
  9585. GeneratorFunction.displayName = "GeneratorFunction";
  9586. // Helper for defining the .next, .throw, and .return methods of the
  9587. // Iterator interface in terms of a single ._invoke method.
  9588. function defineIteratorMethods(prototype) {
  9589. ["next", "throw", "return"].forEach(function(method) {
  9590. prototype[method] = function(arg) {
  9591. return this._invoke(method, arg);
  9592. };
  9593. });
  9594. }
  9595. runtime.isGeneratorFunction = function(genFun) {
  9596. var ctor = typeof genFun === "function" && genFun.constructor;
  9597. return ctor
  9598. ? ctor === GeneratorFunction ||
  9599. // For the native GeneratorFunction constructor, the best we can
  9600. // do is to check its .name property.
  9601. (ctor.displayName || ctor.name) === "GeneratorFunction"
  9602. : false;
  9603. };
  9604. runtime.mark = function(genFun) {
  9605. if (Object.setPrototypeOf) {
  9606. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  9607. } else {
  9608. genFun.__proto__ = GeneratorFunctionPrototype;
  9609. if (!(toStringTagSymbol in genFun)) {
  9610. genFun[toStringTagSymbol] = "GeneratorFunction";
  9611. }
  9612. }
  9613. genFun.prototype = Object.create(Gp);
  9614. return genFun;
  9615. };
  9616. // Within the body of any async function, `await x` is transformed to
  9617. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  9618. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  9619. // meant to be awaited.
  9620. runtime.awrap = function(arg) {
  9621. return { __await: arg };
  9622. };
  9623. function AsyncIterator(generator) {
  9624. function invoke(method, arg, resolve, reject) {
  9625. var record = tryCatch(generator[method], generator, arg);
  9626. if (record.type === "throw") {
  9627. reject(record.arg);
  9628. } else {
  9629. var result = record.arg;
  9630. var value = result.value;
  9631. if (value &&
  9632. typeof value === "object" &&
  9633. hasOwn.call(value, "__await")) {
  9634. return Promise.resolve(value.__await).then(function(value) {
  9635. invoke("next", value, resolve, reject);
  9636. }, function(err) {
  9637. invoke("throw", err, resolve, reject);
  9638. });
  9639. }
  9640. return Promise.resolve(value).then(function(unwrapped) {
  9641. // When a yielded Promise is resolved, its final value becomes
  9642. // the .value of the Promise<{value,done}> result for the
  9643. // current iteration.
  9644. result.value = unwrapped;
  9645. resolve(result);
  9646. }, function(error) {
  9647. // If a rejected Promise was yielded, throw the rejection back
  9648. // into the async generator function so it can be handled there.
  9649. return invoke("throw", error, resolve, reject);
  9650. });
  9651. }
  9652. }
  9653. var previousPromise;
  9654. function enqueue(method, arg) {
  9655. function callInvokeWithMethodAndArg() {
  9656. return new Promise(function(resolve, reject) {
  9657. invoke(method, arg, resolve, reject);
  9658. });
  9659. }
  9660. return previousPromise =
  9661. // If enqueue has been called before, then we want to wait until
  9662. // all previous Promises have been resolved before calling invoke,
  9663. // so that results are always delivered in the correct order. If
  9664. // enqueue has not been called before, then it is important to
  9665. // call invoke immediately, without waiting on a callback to fire,
  9666. // so that the async generator function has the opportunity to do
  9667. // any necessary setup in a predictable way. This predictability
  9668. // is why the Promise constructor synchronously invokes its
  9669. // executor callback, and why async functions synchronously
  9670. // execute code before the first await. Since we implement simple
  9671. // async functions in terms of async generators, it is especially
  9672. // important to get this right, even though it requires care.
  9673. previousPromise ? previousPromise.then(
  9674. callInvokeWithMethodAndArg,
  9675. // Avoid propagating failures to Promises returned by later
  9676. // invocations of the iterator.
  9677. callInvokeWithMethodAndArg
  9678. ) : callInvokeWithMethodAndArg();
  9679. }
  9680. // Define the unified helper method that is used to implement .next,
  9681. // .throw, and .return (see defineIteratorMethods).
  9682. this._invoke = enqueue;
  9683. }
  9684. defineIteratorMethods(AsyncIterator.prototype);
  9685. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  9686. return this;
  9687. };
  9688. runtime.AsyncIterator = AsyncIterator;
  9689. // Note that simple async functions are implemented on top of
  9690. // AsyncIterator objects; they just return a Promise for the value of
  9691. // the final result produced by the iterator.
  9692. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  9693. var iter = new AsyncIterator(
  9694. wrap(innerFn, outerFn, self, tryLocsList)
  9695. );
  9696. return runtime.isGeneratorFunction(outerFn)
  9697. ? iter // If outerFn is a generator, return the full iterator.
  9698. : iter.next().then(function(result) {
  9699. return result.done ? result.value : iter.next();
  9700. });
  9701. };
  9702. function makeInvokeMethod(innerFn, self, context) {
  9703. var state = GenStateSuspendedStart;
  9704. return function invoke(method, arg) {
  9705. if (state === GenStateExecuting) {
  9706. throw new Error("Generator is already running");
  9707. }
  9708. if (state === GenStateCompleted) {
  9709. if (method === "throw") {
  9710. throw arg;
  9711. }
  9712. // Be forgiving, per 25.3.3.3.3 of the spec:
  9713. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  9714. return doneResult();
  9715. }
  9716. context.method = method;
  9717. context.arg = arg;
  9718. while (true) {
  9719. var delegate = context.delegate;
  9720. if (delegate) {
  9721. var delegateResult = maybeInvokeDelegate(delegate, context);
  9722. if (delegateResult) {
  9723. if (delegateResult === ContinueSentinel) continue;
  9724. return delegateResult;
  9725. }
  9726. }
  9727. if (context.method === "next") {
  9728. // Setting context._sent for legacy support of Babel's
  9729. // function.sent implementation.
  9730. context.sent = context._sent = context.arg;
  9731. } else if (context.method === "throw") {
  9732. if (state === GenStateSuspendedStart) {
  9733. state = GenStateCompleted;
  9734. throw context.arg;
  9735. }
  9736. context.dispatchException(context.arg);
  9737. } else if (context.method === "return") {
  9738. context.abrupt("return", context.arg);
  9739. }
  9740. state = GenStateExecuting;
  9741. var record = tryCatch(innerFn, self, context);
  9742. if (record.type === "normal") {
  9743. // If an exception is thrown from innerFn, we leave state ===
  9744. // GenStateExecuting and loop back for another invocation.
  9745. state = context.done
  9746. ? GenStateCompleted
  9747. : GenStateSuspendedYield;
  9748. if (record.arg === ContinueSentinel) {
  9749. continue;
  9750. }
  9751. return {
  9752. value: record.arg,
  9753. done: context.done
  9754. };
  9755. } else if (record.type === "throw") {
  9756. state = GenStateCompleted;
  9757. // Dispatch the exception by looping back around to the
  9758. // context.dispatchException(context.arg) call above.
  9759. context.method = "throw";
  9760. context.arg = record.arg;
  9761. }
  9762. }
  9763. };
  9764. }
  9765. // Call delegate.iterator[context.method](context.arg) and handle the
  9766. // result, either by returning a { value, done } result from the
  9767. // delegate iterator, or by modifying context.method and context.arg,
  9768. // setting context.delegate to null, and returning the ContinueSentinel.
  9769. function maybeInvokeDelegate(delegate, context) {
  9770. var method = delegate.iterator[context.method];
  9771. if (method === undefined) {
  9772. // A .throw or .return when the delegate iterator has no .throw
  9773. // method always terminates the yield* loop.
  9774. context.delegate = null;
  9775. if (context.method === "throw") {
  9776. if (delegate.iterator.return) {
  9777. // If the delegate iterator has a return method, give it a
  9778. // chance to clean up.
  9779. context.method = "return";
  9780. context.arg = undefined;
  9781. maybeInvokeDelegate(delegate, context);
  9782. if (context.method === "throw") {
  9783. // If maybeInvokeDelegate(context) changed context.method from
  9784. // "return" to "throw", let that override the TypeError below.
  9785. return ContinueSentinel;
  9786. }
  9787. }
  9788. context.method = "throw";
  9789. context.arg = new TypeError(
  9790. "The iterator does not provide a 'throw' method");
  9791. }
  9792. return ContinueSentinel;
  9793. }
  9794. var record = tryCatch(method, delegate.iterator, context.arg);
  9795. if (record.type === "throw") {
  9796. context.method = "throw";
  9797. context.arg = record.arg;
  9798. context.delegate = null;
  9799. return ContinueSentinel;
  9800. }
  9801. var info = record.arg;
  9802. if (! info) {
  9803. context.method = "throw";
  9804. context.arg = new TypeError("iterator result is not an object");
  9805. context.delegate = null;
  9806. return ContinueSentinel;
  9807. }
  9808. if (info.done) {
  9809. // Assign the result of the finished delegate to the temporary
  9810. // variable specified by delegate.resultName (see delegateYield).
  9811. context[delegate.resultName] = info.value;
  9812. // Resume execution at the desired location (see delegateYield).
  9813. context.next = delegate.nextLoc;
  9814. // If context.method was "throw" but the delegate handled the
  9815. // exception, let the outer generator proceed normally. If
  9816. // context.method was "next", forget context.arg since it has been
  9817. // "consumed" by the delegate iterator. If context.method was
  9818. // "return", allow the original .return call to continue in the
  9819. // outer generator.
  9820. if (context.method !== "return") {
  9821. context.method = "next";
  9822. context.arg = undefined;
  9823. }
  9824. } else {
  9825. // Re-yield the result returned by the delegate method.
  9826. return info;
  9827. }
  9828. // The delegate iterator is finished, so forget it and continue with
  9829. // the outer generator.
  9830. context.delegate = null;
  9831. return ContinueSentinel;
  9832. }
  9833. // Define Generator.prototype.{next,throw,return} in terms of the
  9834. // unified ._invoke helper method.
  9835. defineIteratorMethods(Gp);
  9836. Gp[toStringTagSymbol] = "Generator";
  9837. // A Generator should always return itself as the iterator object when the
  9838. // @@iterator function is called on it. Some browsers' implementations of the
  9839. // iterator prototype chain incorrectly implement this, causing the Generator
  9840. // object to not be returned from this call. This ensures that doesn't happen.
  9841. // See https://github.com/facebook/regenerator/issues/274 for more details.
  9842. Gp[iteratorSymbol] = function() {
  9843. return this;
  9844. };
  9845. Gp.toString = function() {
  9846. return "[object Generator]";
  9847. };
  9848. function pushTryEntry(locs) {
  9849. var entry = { tryLoc: locs[0] };
  9850. if (1 in locs) {
  9851. entry.catchLoc = locs[1];
  9852. }
  9853. if (2 in locs) {
  9854. entry.finallyLoc = locs[2];
  9855. entry.afterLoc = locs[3];
  9856. }
  9857. this.tryEntries.push(entry);
  9858. }
  9859. function resetTryEntry(entry) {
  9860. var record = entry.completion || {};
  9861. record.type = "normal";
  9862. delete record.arg;
  9863. entry.completion = record;
  9864. }
  9865. function Context(tryLocsList) {
  9866. // The root entry object (effectively a try statement without a catch
  9867. // or a finally block) gives us a place to store values thrown from
  9868. // locations where there is no enclosing try statement.
  9869. this.tryEntries = [{ tryLoc: "root" }];
  9870. tryLocsList.forEach(pushTryEntry, this);
  9871. this.reset(true);
  9872. }
  9873. runtime.keys = function(object) {
  9874. var keys = [];
  9875. for (var key in object) {
  9876. keys.push(key);
  9877. }
  9878. keys.reverse();
  9879. // Rather than returning an object with a next method, we keep
  9880. // things simple and return the next function itself.
  9881. return function next() {
  9882. while (keys.length) {
  9883. var key = keys.pop();
  9884. if (key in object) {
  9885. next.value = key;
  9886. next.done = false;
  9887. return next;
  9888. }
  9889. }
  9890. // To avoid creating an additional object, we just hang the .value
  9891. // and .done properties off the next function object itself. This
  9892. // also ensures that the minifier will not anonymize the function.
  9893. next.done = true;
  9894. return next;
  9895. };
  9896. };
  9897. function values(iterable) {
  9898. if (iterable) {
  9899. var iteratorMethod = iterable[iteratorSymbol];
  9900. if (iteratorMethod) {
  9901. return iteratorMethod.call(iterable);
  9902. }
  9903. if (typeof iterable.next === "function") {
  9904. return iterable;
  9905. }
  9906. if (!isNaN(iterable.length)) {
  9907. var i = -1, next = function next() {
  9908. while (++i < iterable.length) {
  9909. if (hasOwn.call(iterable, i)) {
  9910. next.value = iterable[i];
  9911. next.done = false;
  9912. return next;
  9913. }
  9914. }
  9915. next.value = undefined;
  9916. next.done = true;
  9917. return next;
  9918. };
  9919. return next.next = next;
  9920. }
  9921. }
  9922. // Return an iterator with no values.
  9923. return { next: doneResult };
  9924. }
  9925. runtime.values = values;
  9926. function doneResult() {
  9927. return { value: undefined, done: true };
  9928. }
  9929. Context.prototype = {
  9930. constructor: Context,
  9931. reset: function(skipTempReset) {
  9932. this.prev = 0;
  9933. this.next = 0;
  9934. // Resetting context._sent for legacy support of Babel's
  9935. // function.sent implementation.
  9936. this.sent = this._sent = undefined;
  9937. this.done = false;
  9938. this.delegate = null;
  9939. this.method = "next";
  9940. this.arg = undefined;
  9941. this.tryEntries.forEach(resetTryEntry);
  9942. if (!skipTempReset) {
  9943. for (var name in this) {
  9944. // Not sure about the optimal order of these conditions:
  9945. if (name.charAt(0) === "t" &&
  9946. hasOwn.call(this, name) &&
  9947. !isNaN(+name.slice(1))) {
  9948. this[name] = undefined;
  9949. }
  9950. }
  9951. }
  9952. },
  9953. stop: function() {
  9954. this.done = true;
  9955. var rootEntry = this.tryEntries[0];
  9956. var rootRecord = rootEntry.completion;
  9957. if (rootRecord.type === "throw") {
  9958. throw rootRecord.arg;
  9959. }
  9960. return this.rval;
  9961. },
  9962. dispatchException: function(exception) {
  9963. if (this.done) {
  9964. throw exception;
  9965. }
  9966. var context = this;
  9967. function handle(loc, caught) {
  9968. record.type = "throw";
  9969. record.arg = exception;
  9970. context.next = loc;
  9971. if (caught) {
  9972. // If the dispatched exception was caught by a catch block,
  9973. // then let that catch block handle the exception normally.
  9974. context.method = "next";
  9975. context.arg = undefined;
  9976. }
  9977. return !! caught;
  9978. }
  9979. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9980. var entry = this.tryEntries[i];
  9981. var record = entry.completion;
  9982. if (entry.tryLoc === "root") {
  9983. // Exception thrown outside of any try block that could handle
  9984. // it, so set the completion value of the entire function to
  9985. // throw the exception.
  9986. return handle("end");
  9987. }
  9988. if (entry.tryLoc <= this.prev) {
  9989. var hasCatch = hasOwn.call(entry, "catchLoc");
  9990. var hasFinally = hasOwn.call(entry, "finallyLoc");
  9991. if (hasCatch && hasFinally) {
  9992. if (this.prev < entry.catchLoc) {
  9993. return handle(entry.catchLoc, true);
  9994. } else if (this.prev < entry.finallyLoc) {
  9995. return handle(entry.finallyLoc);
  9996. }
  9997. } else if (hasCatch) {
  9998. if (this.prev < entry.catchLoc) {
  9999. return handle(entry.catchLoc, true);
  10000. }
  10001. } else if (hasFinally) {
  10002. if (this.prev < entry.finallyLoc) {
  10003. return handle(entry.finallyLoc);
  10004. }
  10005. } else {
  10006. throw new Error("try statement without catch or finally");
  10007. }
  10008. }
  10009. }
  10010. },
  10011. abrupt: function(type, arg) {
  10012. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10013. var entry = this.tryEntries[i];
  10014. if (entry.tryLoc <= this.prev &&
  10015. hasOwn.call(entry, "finallyLoc") &&
  10016. this.prev < entry.finallyLoc) {
  10017. var finallyEntry = entry;
  10018. break;
  10019. }
  10020. }
  10021. if (finallyEntry &&
  10022. (type === "break" ||
  10023. type === "continue") &&
  10024. finallyEntry.tryLoc <= arg &&
  10025. arg <= finallyEntry.finallyLoc) {
  10026. // Ignore the finally entry if control is not jumping to a
  10027. // location outside the try/catch block.
  10028. finallyEntry = null;
  10029. }
  10030. var record = finallyEntry ? finallyEntry.completion : {};
  10031. record.type = type;
  10032. record.arg = arg;
  10033. if (finallyEntry) {
  10034. this.method = "next";
  10035. this.next = finallyEntry.finallyLoc;
  10036. return ContinueSentinel;
  10037. }
  10038. return this.complete(record);
  10039. },
  10040. complete: function(record, afterLoc) {
  10041. if (record.type === "throw") {
  10042. throw record.arg;
  10043. }
  10044. if (record.type === "break" ||
  10045. record.type === "continue") {
  10046. this.next = record.arg;
  10047. } else if (record.type === "return") {
  10048. this.rval = this.arg = record.arg;
  10049. this.method = "return";
  10050. this.next = "end";
  10051. } else if (record.type === "normal" && afterLoc) {
  10052. this.next = afterLoc;
  10053. }
  10054. return ContinueSentinel;
  10055. },
  10056. finish: function(finallyLoc) {
  10057. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10058. var entry = this.tryEntries[i];
  10059. if (entry.finallyLoc === finallyLoc) {
  10060. this.complete(entry.completion, entry.afterLoc);
  10061. resetTryEntry(entry);
  10062. return ContinueSentinel;
  10063. }
  10064. }
  10065. },
  10066. "catch": function(tryLoc) {
  10067. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10068. var entry = this.tryEntries[i];
  10069. if (entry.tryLoc === tryLoc) {
  10070. var record = entry.completion;
  10071. if (record.type === "throw") {
  10072. var thrown = record.arg;
  10073. resetTryEntry(entry);
  10074. }
  10075. return thrown;
  10076. }
  10077. }
  10078. // The context.catch method must only be called with a location
  10079. // argument that corresponds to a known catch block.
  10080. throw new Error("illegal catch attempt");
  10081. },
  10082. delegateYield: function(iterable, resultName, nextLoc) {
  10083. this.delegate = {
  10084. iterator: values(iterable),
  10085. resultName: resultName,
  10086. nextLoc: nextLoc
  10087. };
  10088. if (this.method === "next") {
  10089. // Deliberately forget the last sent value so that we don't
  10090. // accidentally pass it on to the delegate.
  10091. this.arg = undefined;
  10092. }
  10093. return ContinueSentinel;
  10094. }
  10095. };
  10096. })(
  10097. // In sloppy mode, unbound `this` refers to the global object, fallback to
  10098. // Function constructor if we're in global strict mode. That is sadly a form
  10099. // of indirect eval which violates Content Security Policy.
  10100. (function() {
  10101. return this || (typeof self === "object" && self);
  10102. })() || Function("return this")()
  10103. );
  10104. /***/ }),
  10105. /***/ 85:
  10106. /*!**********************************************************************!*\
  10107. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/pages.json?{"type":"stat"} ***!
  10108. \**********************************************************************/
  10109. /*! no static exports found */
  10110. /***/ (function(module, exports, __webpack_require__) {
  10111. "use strict";
  10112. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = { "appid": "__UNI__50B3EE1" };exports.default = _default;
  10113. /***/ }),
  10114. /***/ 86:
  10115. /*!****************************************************************************************************************************!*\
  10116. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js ***!
  10117. \****************************************************************************************************************************/
  10118. /*! no static exports found */
  10119. /***/ (function(module, exports, __webpack_require__) {
  10120. "use strict";
  10121. /* WEBPACK VAR INJECTION */(function(uni, uniCloud) {Object.defineProperty(exports, "__esModule", { value: true });exports.chooseAndUploadFile = chooseAndUploadFile;exports.uploadCloudFiles = uploadCloudFiles;
  10122. var ERR_MSG_OK = 'chooseAndUploadFile:ok';
  10123. var ERR_MSG_FAIL = 'chooseAndUploadFile:fail';
  10124. function chooseImage(opts) {var
  10125. count =
  10126. opts.count,_opts$sizeType = opts.sizeType,sizeType = _opts$sizeType === void 0 ? ['original', 'compressed'] : _opts$sizeType,sourceType = opts.sourceType,extension = opts.extension;
  10127. return new Promise(function (resolve, reject) {
  10128. uni.chooseImage({
  10129. count: count,
  10130. sizeType: sizeType,
  10131. sourceType: sourceType,
  10132. extension: extension,
  10133. success: function success(res) {
  10134. resolve(normalizeChooseAndUploadFileRes(res, 'image'));
  10135. },
  10136. fail: function fail(res) {
  10137. reject({
  10138. errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL) });
  10139. } });
  10140. });
  10141. }
  10142. function chooseVideo(opts) {var
  10143. camera =
  10144. opts.camera,compressed = opts.compressed,maxDuration = opts.maxDuration,sourceType = opts.sourceType,extension = opts.extension;
  10145. return new Promise(function (resolve, reject) {
  10146. uni.chooseVideo({
  10147. camera: camera,
  10148. compressed: compressed,
  10149. maxDuration: maxDuration,
  10150. sourceType: sourceType,
  10151. extension: extension,
  10152. success: function success(res) {var
  10153. tempFilePath =
  10154. res.tempFilePath,duration = res.duration,size = res.size,height = res.height,width = res.width;
  10155. resolve(normalizeChooseAndUploadFileRes({
  10156. errMsg: 'chooseVideo:ok',
  10157. tempFilePaths: [tempFilePath],
  10158. tempFiles: [
  10159. {
  10160. name: res.tempFile && res.tempFile.name || '',
  10161. path: tempFilePath,
  10162. size: size,
  10163. type: res.tempFile && res.tempFile.type || '',
  10164. width: width,
  10165. height: height,
  10166. duration: duration,
  10167. fileType: 'video',
  10168. cloudPath: '' }] },
  10169. 'video'));
  10170. },
  10171. fail: function fail(res) {
  10172. reject({
  10173. errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL) });
  10174. } });
  10175. });
  10176. }
  10177. function chooseAll(opts) {var
  10178. count =
  10179. opts.count,extension = opts.extension;
  10180. return new Promise(function (resolve, reject) {
  10181. var chooseFile = uni.chooseFile;
  10182. if (typeof wx !== 'undefined' &&
  10183. typeof wx.chooseMessageFile === 'function') {
  10184. chooseFile = wx.chooseMessageFile;
  10185. }
  10186. if (typeof chooseFile !== 'function') {
  10187. return reject({
  10188. errMsg: ERR_MSG_FAIL + ' 请指定 type 类型,该平台仅支持选择 image 或 video。' });
  10189. }
  10190. chooseFile({
  10191. type: 'all',
  10192. count: count,
  10193. extension: extension,
  10194. success: function success(res) {
  10195. resolve(normalizeChooseAndUploadFileRes(res));
  10196. },
  10197. fail: function fail(res) {
  10198. reject({
  10199. errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL) });
  10200. } });
  10201. });
  10202. }
  10203. function normalizeChooseAndUploadFileRes(res, fileType) {
  10204. res.tempFiles.forEach(function (item, index) {
  10205. if (!item.name) {
  10206. item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
  10207. }
  10208. if (fileType) {
  10209. item.fileType = fileType;
  10210. }
  10211. item.cloudPath =
  10212. Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
  10213. });
  10214. if (!res.tempFilePaths) {
  10215. res.tempFilePaths = res.tempFiles.map(function (file) {return file.path;});
  10216. }
  10217. return res;
  10218. }
  10219. function uploadCloudFiles(files) {var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;var _onUploadProgress = arguments.length > 2 ? arguments[2] : undefined;
  10220. files = JSON.parse(JSON.stringify(files));
  10221. var len = files.length;
  10222. var count = 0;
  10223. var self = this;
  10224. return new Promise(function (resolve) {
  10225. while (count < max) {
  10226. next();
  10227. }
  10228. function next() {
  10229. var cur = count++;
  10230. if (cur >= len) {
  10231. !files.find(function (item) {return !item.url && !item.errMsg;}) && resolve(files);
  10232. return;
  10233. }
  10234. var fileItem = files[cur];
  10235. var index = self.files.findIndex(function (v) {return v.uuid === fileItem.uuid;});
  10236. fileItem.url = '';
  10237. delete fileItem.errMsg;
  10238. uniCloud.
  10239. uploadFile({
  10240. filePath: fileItem.path,
  10241. cloudPath: fileItem.cloudPath,
  10242. fileType: fileItem.fileType,
  10243. onUploadProgress: function onUploadProgress(res) {
  10244. res.index = index;
  10245. _onUploadProgress && _onUploadProgress(res);
  10246. } }).
  10247. then(function (res) {
  10248. fileItem.url = res.fileID;
  10249. fileItem.index = index;
  10250. if (cur < len) {
  10251. next();
  10252. }
  10253. }).
  10254. catch(function (res) {
  10255. fileItem.errMsg = res.errMsg || res.message;
  10256. fileItem.index = index;
  10257. if (cur < len) {
  10258. next();
  10259. }
  10260. });
  10261. }
  10262. });
  10263. }
  10264. function uploadFiles(choosePromise, _ref)
  10265. {var onChooseFile = _ref.onChooseFile,onUploadProgress = _ref.onUploadProgress;
  10266. return choosePromise.
  10267. then(function (res) {
  10268. if (onChooseFile) {
  10269. var customChooseRes = onChooseFile(res);
  10270. if (typeof customChooseRes !== 'undefined') {
  10271. return Promise.resolve(customChooseRes).then(function (chooseRes) {return typeof chooseRes === 'undefined' ?
  10272. res : chooseRes;});
  10273. }
  10274. }
  10275. return res;
  10276. }).
  10277. then(function (res) {
  10278. if (res === false) {
  10279. return {
  10280. errMsg: ERR_MSG_OK,
  10281. tempFilePaths: [],
  10282. tempFiles: [] };
  10283. }
  10284. return res;
  10285. });
  10286. }
  10287. function chooseAndUploadFile()
  10288. {var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { type: 'all' };
  10289. if (opts.type === 'image') {
  10290. return uploadFiles(chooseImage(opts), opts);
  10291. } else
  10292. if (opts.type === 'video') {
  10293. return uploadFiles(chooseVideo(opts), opts);
  10294. }
  10295. return uploadFiles(chooseAll(opts), opts);
  10296. }
  10297. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 81)["default"]))
  10298. /***/ }),
  10299. /***/ 87:
  10300. /*!***********************************************************************************************************!*\
  10301. !*** D:/000/bjybz1/BJYSYBZ/YSGZYBZ_WXAPP/uni_modules/uni-file-picker/components/uni-file-picker/utils.js ***!
  10302. \***********************************************************************************************************/
  10303. /*! no static exports found */
  10304. /***/ (function(module, exports, __webpack_require__) {
  10305. "use strict";
  10306. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.get_file_data = exports.get_file_info = exports.get_files_and_is_max = exports.get_extname = exports.get_file_ext = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 82));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};} /**
  10307. * 获取文件名和后缀
  10308. * @param {String} name
  10309. */
  10310. var get_file_ext = function get_file_ext(name) {
  10311. var last_len = name.lastIndexOf('.');
  10312. var len = name.length;
  10313. return {
  10314. name: name.substring(0, last_len),
  10315. ext: name.substring(last_len + 1, len) };
  10316. };
  10317. /**
  10318. * 获取扩展名
  10319. * @param {Array} fileExtname
  10320. */exports.get_file_ext = get_file_ext;
  10321. var get_extname = function get_extname(fileExtname) {
  10322. if (!Array.isArray(fileExtname)) {
  10323. var extname = fileExtname.replace(/(\[|\])/g, '');
  10324. return extname.split(',');
  10325. } else {
  10326. return fileExtname;
  10327. }
  10328. return [];
  10329. };
  10330. /**
  10331. * 获取文件和检测是否可选
  10332. */exports.get_extname = get_extname;
  10333. var get_files_and_is_max = function get_files_and_is_max(res, _extname) {
  10334. var filePaths = [];
  10335. var files = [];
  10336. if (!_extname || _extname.length === 0) {
  10337. return {
  10338. filePaths: filePaths,
  10339. files: files };
  10340. }
  10341. res.tempFiles.forEach(function (v) {
  10342. var fileFullName = get_file_ext(v.name);
  10343. var extname = fileFullName.ext.toLowerCase();
  10344. if (_extname.indexOf(extname) !== -1) {
  10345. files.push(v);
  10346. filePaths.push(v.path);
  10347. }
  10348. });
  10349. if (files.length !== res.tempFiles.length) {
  10350. uni.showToast({
  10351. title: "\u5F53\u524D\u9009\u62E9\u4E86".concat(res.tempFiles.length, "\u4E2A\u6587\u4EF6 \uFF0C").concat(res.tempFiles.length - files.length, " \u4E2A\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),
  10352. icon: 'none',
  10353. duration: 5000 });
  10354. }
  10355. return {
  10356. filePaths: filePaths,
  10357. files: files };
  10358. };
  10359. /**
  10360. * 获取图片信息
  10361. * @param {Object} filepath
  10362. */exports.get_files_and_is_max = get_files_and_is_max;
  10363. var get_file_info = function get_file_info(filepath) {
  10364. return new Promise(function (resolve, reject) {
  10365. uni.getImageInfo({
  10366. src: filepath,
  10367. success: function success(res) {
  10368. resolve(res);
  10369. },
  10370. fail: function fail(err) {
  10371. reject(err);
  10372. } });
  10373. });
  10374. };
  10375. /**
  10376. * 获取封装数据
  10377. */exports.get_file_info = get_file_info;
  10378. var get_file_data = /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(files) {var type,fileFullName,extname,filedata,imageinfo,_args = arguments;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:type = _args.length > 1 && _args[1] !== undefined ? _args[1] : 'image';
  10379. // 最终需要上传数据库的数据
  10380. fileFullName = get_file_ext(files.name);
  10381. extname = fileFullName.ext.toLowerCase();
  10382. filedata = {
  10383. name: files.name,
  10384. uuid: files.uuid,
  10385. extname: extname || '',
  10386. cloudPath: files.cloudPath,
  10387. fileType: files.fileType,
  10388. url: files.path || files.path,
  10389. size: files.size, //单位是字节
  10390. image: {},
  10391. path: files.path,
  10392. video: {} };if (!(
  10393. type === 'image')) {_context.next = 14;break;}_context.next = 7;return (
  10394. get_file_info(files.path));case 7:imageinfo = _context.sent;
  10395. delete filedata.video;
  10396. filedata.image.width = imageinfo.width;
  10397. filedata.image.height = imageinfo.height;
  10398. filedata.image.location = imageinfo.path;_context.next = 15;break;case 14:
  10399. delete filedata.image;case 15:return _context.abrupt("return",
  10400. filedata);case 16:case "end":return _context.stop();}}}, _callee);}));return function get_file_data(_x) {return _ref.apply(this, arguments);};}();exports.get_file_data = get_file_data;
  10401. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10402. /***/ })
  10403. }]);
  10404. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map