vendor.js 305 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358
  1. "use strict";
  2. const _export_sfc = (sfc, props2) => {
  3. const target = sfc.__vccOpts || sfc;
  4. for (const [key, val] of props2) {
  5. target[key] = val;
  6. }
  7. return target;
  8. };
  9. function makeMap(str, expectsLowerCase) {
  10. const map = /* @__PURE__ */ Object.create(null);
  11. const list = str.split(",");
  12. for (let i = 0; i < list.length; i++) {
  13. map[list[i]] = true;
  14. }
  15. return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
  16. }
  17. function normalizeStyle(value) {
  18. if (isArray$1(value)) {
  19. const res = {};
  20. for (let i = 0; i < value.length; i++) {
  21. const item = value[i];
  22. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  23. if (normalized) {
  24. for (const key in normalized) {
  25. res[key] = normalized[key];
  26. }
  27. }
  28. }
  29. return res;
  30. } else if (isString(value)) {
  31. return value;
  32. } else if (isObject$1(value)) {
  33. return value;
  34. }
  35. }
  36. const listDelimiterRE = /;(?![^(]*\))/g;
  37. const propertyDelimiterRE = /:([^]+)/;
  38. const styleCommentRE = /\/\*.*?\*\//gs;
  39. function parseStringStyle(cssText) {
  40. const ret = {};
  41. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  42. if (item) {
  43. const tmp = item.split(propertyDelimiterRE);
  44. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  45. }
  46. });
  47. return ret;
  48. }
  49. function normalizeClass(value) {
  50. let res = "";
  51. if (isString(value)) {
  52. res = value;
  53. } else if (isArray$1(value)) {
  54. for (let i = 0; i < value.length; i++) {
  55. const normalized = normalizeClass(value[i]);
  56. if (normalized) {
  57. res += normalized + " ";
  58. }
  59. }
  60. } else if (isObject$1(value)) {
  61. for (const name in value) {
  62. if (value[name]) {
  63. res += name + " ";
  64. }
  65. }
  66. }
  67. return res.trim();
  68. }
  69. const toDisplayString = (val) => {
  70. return isString(val) ? val : val == null ? "" : isArray$1(val) || isObject$1(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
  71. };
  72. const replacer = (_key, val) => {
  73. if (val && val.__v_isRef) {
  74. return replacer(_key, val.value);
  75. } else if (isMap(val)) {
  76. return {
  77. [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
  78. entries[`${key} =>`] = val2;
  79. return entries;
  80. }, {})
  81. };
  82. } else if (isSet(val)) {
  83. return {
  84. [`Set(${val.size})`]: [...val.values()]
  85. };
  86. } else if (isObject$1(val) && !isArray$1(val) && !isPlainObject$1(val)) {
  87. return String(val);
  88. }
  89. return val;
  90. };
  91. const EMPTY_OBJ = Object.freeze({});
  92. const EMPTY_ARR = Object.freeze([]);
  93. const NOOP = () => {
  94. };
  95. const NO = () => false;
  96. const onRE = /^on[^a-z]/;
  97. const isOn = (key) => onRE.test(key);
  98. const isModelListener = (key) => key.startsWith("onUpdate:");
  99. const extend = Object.assign;
  100. const remove = (arr, el) => {
  101. const i = arr.indexOf(el);
  102. if (i > -1) {
  103. arr.splice(i, 1);
  104. }
  105. };
  106. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  107. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  108. const isArray$1 = Array.isArray;
  109. const isMap = (val) => toTypeString(val) === "[object Map]";
  110. const isSet = (val) => toTypeString(val) === "[object Set]";
  111. const isFunction = (val) => typeof val === "function";
  112. const isString = (val) => typeof val === "string";
  113. const isSymbol = (val) => typeof val === "symbol";
  114. const isObject$1 = (val) => val !== null && typeof val === "object";
  115. const isPromise = (val) => {
  116. return isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
  117. };
  118. const objectToString = Object.prototype.toString;
  119. const toTypeString = (value) => objectToString.call(value);
  120. const toRawType = (value) => {
  121. return toTypeString(value).slice(8, -1);
  122. };
  123. const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]";
  124. const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  125. const isReservedProp = /* @__PURE__ */ makeMap(
  126. // the leading comma is intentional so empty string "" is also included
  127. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  128. );
  129. const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
  130. const cacheStringFunction = (fn) => {
  131. const cache = /* @__PURE__ */ Object.create(null);
  132. return (str) => {
  133. const hit = cache[str];
  134. return hit || (cache[str] = fn(str));
  135. };
  136. };
  137. const camelizeRE = /-(\w)/g;
  138. const camelize = cacheStringFunction((str) => {
  139. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  140. });
  141. const hyphenateRE = /\B([A-Z])/g;
  142. const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
  143. const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
  144. const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
  145. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  146. const invokeArrayFns$1 = (fns, arg) => {
  147. for (let i = 0; i < fns.length; i++) {
  148. fns[i](arg);
  149. }
  150. };
  151. const def = (obj, key, value) => {
  152. Object.defineProperty(obj, key, {
  153. configurable: true,
  154. enumerable: false,
  155. value
  156. });
  157. };
  158. const looseToNumber = (val) => {
  159. const n2 = parseFloat(val);
  160. return isNaN(n2) ? val : n2;
  161. };
  162. const LINEFEED = "\n";
  163. const SLOT_DEFAULT_NAME = "d";
  164. const ON_SHOW = "onShow";
  165. const ON_HIDE = "onHide";
  166. const ON_LAUNCH = "onLaunch";
  167. const ON_ERROR = "onError";
  168. const ON_THEME_CHANGE = "onThemeChange";
  169. const ON_PAGE_NOT_FOUND = "onPageNotFound";
  170. const ON_UNHANDLE_REJECTION = "onUnhandledRejection";
  171. const ON_LOAD = "onLoad";
  172. const ON_READY = "onReady";
  173. const ON_UNLOAD = "onUnload";
  174. const ON_INIT = "onInit";
  175. const ON_SAVE_EXIT_STATE = "onSaveExitState";
  176. const ON_RESIZE = "onResize";
  177. const ON_BACK_PRESS = "onBackPress";
  178. const ON_PAGE_SCROLL = "onPageScroll";
  179. const ON_TAB_ITEM_TAP = "onTabItemTap";
  180. const ON_REACH_BOTTOM = "onReachBottom";
  181. const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
  182. const ON_SHARE_TIMELINE = "onShareTimeline";
  183. const ON_ADD_TO_FAVORITES = "onAddToFavorites";
  184. const ON_SHARE_APP_MESSAGE = "onShareAppMessage";
  185. const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";
  186. const ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = "onNavigationBarSearchInputClicked";
  187. const ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = "onNavigationBarSearchInputChanged";
  188. const ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = "onNavigationBarSearchInputConfirmed";
  189. const ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = "onNavigationBarSearchInputFocusChanged";
  190. const customizeRE = /:/g;
  191. function customizeEvent(str) {
  192. return camelize(str.replace(customizeRE, "-"));
  193. }
  194. function hasLeadingSlash(str) {
  195. return str.indexOf("/") === 0;
  196. }
  197. function addLeadingSlash(str) {
  198. return hasLeadingSlash(str) ? str : "/" + str;
  199. }
  200. const invokeArrayFns = (fns, arg) => {
  201. let ret;
  202. for (let i = 0; i < fns.length; i++) {
  203. ret = fns[i](arg);
  204. }
  205. return ret;
  206. };
  207. function once(fn, ctx = null) {
  208. let res;
  209. return (...args) => {
  210. if (fn) {
  211. res = fn.apply(ctx, args);
  212. fn = null;
  213. }
  214. return res;
  215. };
  216. }
  217. function getValueByDataPath(obj, path) {
  218. if (!isString(path)) {
  219. return;
  220. }
  221. path = path.replace(/\[(\d+)\]/g, ".$1");
  222. const parts = path.split(".");
  223. let key = parts[0];
  224. if (!obj) {
  225. obj = {};
  226. }
  227. if (parts.length === 1) {
  228. return obj[key];
  229. }
  230. return getValueByDataPath(obj[key], parts.slice(1).join("."));
  231. }
  232. function sortObject(obj) {
  233. let sortObj = {};
  234. if (isPlainObject$1(obj)) {
  235. Object.keys(obj).sort().forEach((key) => {
  236. const _key = key;
  237. sortObj[_key] = obj[_key];
  238. });
  239. }
  240. return !Object.keys(sortObj) ? obj : sortObj;
  241. }
  242. const encode$1 = encodeURIComponent;
  243. function stringifyQuery(obj, encodeStr = encode$1) {
  244. const res = obj ? Object.keys(obj).map((key) => {
  245. let val = obj[key];
  246. if (typeof val === void 0 || val === null) {
  247. val = "";
  248. } else if (isPlainObject$1(val)) {
  249. val = JSON.stringify(val);
  250. }
  251. return encodeStr(key) + "=" + encodeStr(val);
  252. }).filter((x) => x.length > 0).join("&") : null;
  253. return res ? `?${res}` : "";
  254. }
  255. const PAGE_HOOKS = [
  256. ON_INIT,
  257. ON_LOAD,
  258. ON_SHOW,
  259. ON_HIDE,
  260. ON_UNLOAD,
  261. ON_BACK_PRESS,
  262. ON_PAGE_SCROLL,
  263. ON_TAB_ITEM_TAP,
  264. ON_REACH_BOTTOM,
  265. ON_PULL_DOWN_REFRESH,
  266. ON_SHARE_TIMELINE,
  267. ON_SHARE_APP_MESSAGE,
  268. ON_ADD_TO_FAVORITES,
  269. ON_SAVE_EXIT_STATE,
  270. ON_NAVIGATION_BAR_BUTTON_TAP,
  271. ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,
  272. ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,
  273. ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,
  274. ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
  275. ];
  276. function isRootHook(name) {
  277. return PAGE_HOOKS.indexOf(name) > -1;
  278. }
  279. const UniLifecycleHooks = [
  280. ON_SHOW,
  281. ON_HIDE,
  282. ON_LAUNCH,
  283. ON_ERROR,
  284. ON_THEME_CHANGE,
  285. ON_PAGE_NOT_FOUND,
  286. ON_UNHANDLE_REJECTION,
  287. ON_INIT,
  288. ON_LOAD,
  289. ON_READY,
  290. ON_UNLOAD,
  291. ON_RESIZE,
  292. ON_BACK_PRESS,
  293. ON_PAGE_SCROLL,
  294. ON_TAB_ITEM_TAP,
  295. ON_REACH_BOTTOM,
  296. ON_PULL_DOWN_REFRESH,
  297. ON_SHARE_TIMELINE,
  298. ON_ADD_TO_FAVORITES,
  299. ON_SHARE_APP_MESSAGE,
  300. ON_SAVE_EXIT_STATE,
  301. ON_NAVIGATION_BAR_BUTTON_TAP,
  302. ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,
  303. ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,
  304. ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,
  305. ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
  306. ];
  307. const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /* @__PURE__ */ (() => {
  308. return {
  309. onPageScroll: 1,
  310. onShareAppMessage: 1 << 1,
  311. onShareTimeline: 1 << 2
  312. };
  313. })();
  314. function isUniLifecycleHook(name, value, checkType = true) {
  315. if (checkType && !isFunction(value)) {
  316. return false;
  317. }
  318. if (UniLifecycleHooks.indexOf(name) > -1) {
  319. return true;
  320. } else if (name.indexOf("on") === 0) {
  321. return true;
  322. }
  323. return false;
  324. }
  325. let vueApp;
  326. const createVueAppHooks = [];
  327. function onCreateVueApp(hook) {
  328. if (vueApp) {
  329. return hook(vueApp);
  330. }
  331. createVueAppHooks.push(hook);
  332. }
  333. function invokeCreateVueAppHook(app) {
  334. vueApp = app;
  335. createVueAppHooks.forEach((hook) => hook(app));
  336. }
  337. const invokeCreateErrorHandler = once((app, createErrorHandler2) => {
  338. if (isFunction(app._component.onError)) {
  339. return createErrorHandler2(app);
  340. }
  341. });
  342. const E = function() {
  343. };
  344. E.prototype = {
  345. on: function(name, callback, ctx) {
  346. var e2 = this.e || (this.e = {});
  347. (e2[name] || (e2[name] = [])).push({
  348. fn: callback,
  349. ctx
  350. });
  351. return this;
  352. },
  353. once: function(name, callback, ctx) {
  354. var self = this;
  355. function listener() {
  356. self.off(name, listener);
  357. callback.apply(ctx, arguments);
  358. }
  359. listener._ = callback;
  360. return this.on(name, listener, ctx);
  361. },
  362. emit: function(name) {
  363. var data = [].slice.call(arguments, 1);
  364. var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
  365. var i = 0;
  366. var len = evtArr.length;
  367. for (i; i < len; i++) {
  368. evtArr[i].fn.apply(evtArr[i].ctx, data);
  369. }
  370. return this;
  371. },
  372. off: function(name, callback) {
  373. var e2 = this.e || (this.e = {});
  374. var evts = e2[name];
  375. var liveEvents = [];
  376. if (evts && callback) {
  377. for (var i = 0, len = evts.length; i < len; i++) {
  378. if (evts[i].fn !== callback && evts[i].fn._ !== callback)
  379. liveEvents.push(evts[i]);
  380. }
  381. }
  382. liveEvents.length ? e2[name] = liveEvents : delete e2[name];
  383. return this;
  384. }
  385. };
  386. var E$1 = E;
  387. const LOCALE_ZH_HANS = "zh-Hans";
  388. const LOCALE_ZH_HANT = "zh-Hant";
  389. const LOCALE_EN = "en";
  390. const LOCALE_FR = "fr";
  391. const LOCALE_ES = "es";
  392. function include(str, parts) {
  393. return !!parts.find((part) => str.indexOf(part) !== -1);
  394. }
  395. function startsWith(str, parts) {
  396. return parts.find((part) => str.indexOf(part) === 0);
  397. }
  398. function normalizeLocale(locale, messages) {
  399. if (!locale) {
  400. return;
  401. }
  402. locale = locale.trim().replace(/_/g, "-");
  403. if (messages && messages[locale]) {
  404. return locale;
  405. }
  406. locale = locale.toLowerCase();
  407. if (locale === "chinese") {
  408. return LOCALE_ZH_HANS;
  409. }
  410. if (locale.indexOf("zh") === 0) {
  411. if (locale.indexOf("-hans") > -1) {
  412. return LOCALE_ZH_HANS;
  413. }
  414. if (locale.indexOf("-hant") > -1) {
  415. return LOCALE_ZH_HANT;
  416. }
  417. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  418. return LOCALE_ZH_HANT;
  419. }
  420. return LOCALE_ZH_HANS;
  421. }
  422. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  423. if (messages && Object.keys(messages).length > 0) {
  424. locales = Object.keys(messages);
  425. }
  426. const lang = startsWith(locale, locales);
  427. if (lang) {
  428. return lang;
  429. }
  430. }
  431. function getBaseSystemInfo() {
  432. return wx.getSystemInfoSync();
  433. }
  434. function validateProtocolFail(name, msg) {
  435. console.warn(`${name}: ${msg}`);
  436. }
  437. function validateProtocol(name, data, protocol, onFail) {
  438. if (!onFail) {
  439. onFail = validateProtocolFail;
  440. }
  441. for (const key in protocol) {
  442. const errMsg = validateProp$1(key, data[key], protocol[key], !hasOwn(data, key));
  443. if (isString(errMsg)) {
  444. onFail(name, errMsg);
  445. }
  446. }
  447. }
  448. function validateProtocols(name, args, protocol, onFail) {
  449. if (!protocol) {
  450. return;
  451. }
  452. if (!isArray$1(protocol)) {
  453. return validateProtocol(name, args[0] || /* @__PURE__ */ Object.create(null), protocol, onFail);
  454. }
  455. const len = protocol.length;
  456. const argsLen = args.length;
  457. for (let i = 0; i < len; i++) {
  458. const opts = protocol[i];
  459. const data = /* @__PURE__ */ Object.create(null);
  460. if (argsLen > i) {
  461. data[opts.name] = args[i];
  462. }
  463. validateProtocol(name, data, { [opts.name]: opts }, onFail);
  464. }
  465. }
  466. function validateProp$1(name, value, prop, isAbsent) {
  467. if (!isPlainObject$1(prop)) {
  468. prop = { type: prop };
  469. }
  470. const { type, required, validator } = prop;
  471. if (required && isAbsent) {
  472. return 'Missing required args: "' + name + '"';
  473. }
  474. if (value == null && !required) {
  475. return;
  476. }
  477. if (type != null) {
  478. let isValid = false;
  479. const types = isArray$1(type) ? type : [type];
  480. const expectedTypes = [];
  481. for (let i = 0; i < types.length && !isValid; i++) {
  482. const { valid, expectedType } = assertType$1(value, types[i]);
  483. expectedTypes.push(expectedType || "");
  484. isValid = valid;
  485. }
  486. if (!isValid) {
  487. return getInvalidTypeMessage$1(name, value, expectedTypes);
  488. }
  489. }
  490. if (validator) {
  491. return validator(value);
  492. }
  493. }
  494. const isSimpleType$1 = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol");
  495. function assertType$1(value, type) {
  496. let valid;
  497. const expectedType = getType$1(type);
  498. if (isSimpleType$1(expectedType)) {
  499. const t2 = typeof value;
  500. valid = t2 === expectedType.toLowerCase();
  501. if (!valid && t2 === "object") {
  502. valid = value instanceof type;
  503. }
  504. } else if (expectedType === "Object") {
  505. valid = isObject$1(value);
  506. } else if (expectedType === "Array") {
  507. valid = isArray$1(value);
  508. } else {
  509. {
  510. valid = value instanceof type;
  511. }
  512. }
  513. return {
  514. valid,
  515. expectedType
  516. };
  517. }
  518. function getInvalidTypeMessage$1(name, value, expectedTypes) {
  519. let message = `Invalid args: type check failed for args "${name}". Expected ${expectedTypes.map(capitalize).join(", ")}`;
  520. const expectedType = expectedTypes[0];
  521. const receivedType = toRawType(value);
  522. const expectedValue = styleValue$1(value, expectedType);
  523. const receivedValue = styleValue$1(value, receivedType);
  524. if (expectedTypes.length === 1 && isExplicable$1(expectedType) && !isBoolean$1(expectedType, receivedType)) {
  525. message += ` with value ${expectedValue}`;
  526. }
  527. message += `, got ${receivedType} `;
  528. if (isExplicable$1(receivedType)) {
  529. message += `with value ${receivedValue}.`;
  530. }
  531. return message;
  532. }
  533. function getType$1(ctor) {
  534. const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
  535. return match ? match[1] : "";
  536. }
  537. function styleValue$1(value, type) {
  538. if (type === "String") {
  539. return `"${value}"`;
  540. } else if (type === "Number") {
  541. return `${Number(value)}`;
  542. } else {
  543. return `${value}`;
  544. }
  545. }
  546. function isExplicable$1(type) {
  547. const explicitTypes = ["string", "number", "boolean"];
  548. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  549. }
  550. function isBoolean$1(...args) {
  551. return args.some((elem) => elem.toLowerCase() === "boolean");
  552. }
  553. function tryCatch(fn) {
  554. return function() {
  555. try {
  556. return fn.apply(fn, arguments);
  557. } catch (e2) {
  558. console.error(e2);
  559. }
  560. };
  561. }
  562. let invokeCallbackId = 1;
  563. const invokeCallbacks = {};
  564. function addInvokeCallback(id, name, callback, keepAlive = false) {
  565. invokeCallbacks[id] = {
  566. name,
  567. keepAlive,
  568. callback
  569. };
  570. return id;
  571. }
  572. function invokeCallback(id, res, extras) {
  573. if (typeof id === "number") {
  574. const opts = invokeCallbacks[id];
  575. if (opts) {
  576. if (!opts.keepAlive) {
  577. delete invokeCallbacks[id];
  578. }
  579. return opts.callback(res, extras);
  580. }
  581. }
  582. return res;
  583. }
  584. const API_SUCCESS = "success";
  585. const API_FAIL = "fail";
  586. const API_COMPLETE = "complete";
  587. function getApiCallbacks(args) {
  588. const apiCallbacks = {};
  589. for (const name in args) {
  590. const fn = args[name];
  591. if (isFunction(fn)) {
  592. apiCallbacks[name] = tryCatch(fn);
  593. delete args[name];
  594. }
  595. }
  596. return apiCallbacks;
  597. }
  598. function normalizeErrMsg$1(errMsg, name) {
  599. if (!errMsg || errMsg.indexOf(":fail") === -1) {
  600. return name + ":ok";
  601. }
  602. return name + errMsg.substring(errMsg.indexOf(":fail"));
  603. }
  604. function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } = {}) {
  605. if (!isPlainObject$1(args)) {
  606. args = {};
  607. }
  608. const { success, fail, complete } = getApiCallbacks(args);
  609. const hasSuccess = isFunction(success);
  610. const hasFail = isFunction(fail);
  611. const hasComplete = isFunction(complete);
  612. const callbackId = invokeCallbackId++;
  613. addInvokeCallback(callbackId, name, (res) => {
  614. res = res || {};
  615. res.errMsg = normalizeErrMsg$1(res.errMsg, name);
  616. isFunction(beforeAll) && beforeAll(res);
  617. if (res.errMsg === name + ":ok") {
  618. isFunction(beforeSuccess) && beforeSuccess(res, args);
  619. hasSuccess && success(res);
  620. } else {
  621. hasFail && fail(res);
  622. }
  623. hasComplete && complete(res);
  624. });
  625. return callbackId;
  626. }
  627. const HOOK_SUCCESS = "success";
  628. const HOOK_FAIL = "fail";
  629. const HOOK_COMPLETE = "complete";
  630. const globalInterceptors = {};
  631. const scopedInterceptors = {};
  632. function wrapperHook(hook, params) {
  633. return function(data) {
  634. return hook(data, params) || data;
  635. };
  636. }
  637. function queue$1(hooks, data, params) {
  638. let promise2 = false;
  639. for (let i = 0; i < hooks.length; i++) {
  640. const hook = hooks[i];
  641. if (promise2) {
  642. promise2 = Promise.resolve(wrapperHook(hook, params));
  643. } else {
  644. const res = hook(data, params);
  645. if (isPromise(res)) {
  646. promise2 = Promise.resolve(res);
  647. }
  648. if (res === false) {
  649. return {
  650. then() {
  651. },
  652. catch() {
  653. }
  654. };
  655. }
  656. }
  657. }
  658. return promise2 || {
  659. then(callback) {
  660. return callback(data);
  661. },
  662. catch() {
  663. }
  664. };
  665. }
  666. function wrapperOptions(interceptors2, options = {}) {
  667. [HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
  668. const hooks = interceptors2[name];
  669. if (!isArray$1(hooks)) {
  670. return;
  671. }
  672. const oldCallback = options[name];
  673. options[name] = function callbackInterceptor(res) {
  674. queue$1(hooks, res, options).then((res2) => {
  675. return isFunction(oldCallback) && oldCallback(res2) || res2;
  676. });
  677. };
  678. });
  679. return options;
  680. }
  681. function wrapperReturnValue(method, returnValue) {
  682. const returnValueHooks = [];
  683. if (isArray$1(globalInterceptors.returnValue)) {
  684. returnValueHooks.push(...globalInterceptors.returnValue);
  685. }
  686. const interceptor = scopedInterceptors[method];
  687. if (interceptor && isArray$1(interceptor.returnValue)) {
  688. returnValueHooks.push(...interceptor.returnValue);
  689. }
  690. returnValueHooks.forEach((hook) => {
  691. returnValue = hook(returnValue) || returnValue;
  692. });
  693. return returnValue;
  694. }
  695. function getApiInterceptorHooks(method) {
  696. const interceptor = /* @__PURE__ */ Object.create(null);
  697. Object.keys(globalInterceptors).forEach((hook) => {
  698. if (hook !== "returnValue") {
  699. interceptor[hook] = globalInterceptors[hook].slice();
  700. }
  701. });
  702. const scopedInterceptor = scopedInterceptors[method];
  703. if (scopedInterceptor) {
  704. Object.keys(scopedInterceptor).forEach((hook) => {
  705. if (hook !== "returnValue") {
  706. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  707. }
  708. });
  709. }
  710. return interceptor;
  711. }
  712. function invokeApi(method, api, options, params) {
  713. const interceptor = getApiInterceptorHooks(method);
  714. if (interceptor && Object.keys(interceptor).length) {
  715. if (isArray$1(interceptor.invoke)) {
  716. const res = queue$1(interceptor.invoke, options);
  717. return res.then((options2) => {
  718. return api(wrapperOptions(getApiInterceptorHooks(method), options2), ...params);
  719. });
  720. } else {
  721. return api(wrapperOptions(interceptor, options), ...params);
  722. }
  723. }
  724. return api(options, ...params);
  725. }
  726. function hasCallback(args) {
  727. if (isPlainObject$1(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find((cb) => isFunction(args[cb]))) {
  728. return true;
  729. }
  730. return false;
  731. }
  732. function handlePromise(promise2) {
  733. return promise2;
  734. }
  735. function promisify$1(name, fn) {
  736. return (args = {}, ...rest) => {
  737. if (hasCallback(args)) {
  738. return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
  739. }
  740. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  741. invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
  742. })));
  743. };
  744. }
  745. function formatApiArgs(args, options) {
  746. const params = args[0];
  747. if (!options || !isPlainObject$1(options.formatArgs) && isPlainObject$1(params)) {
  748. return;
  749. }
  750. const formatArgs = options.formatArgs;
  751. const keys = Object.keys(formatArgs);
  752. for (let i = 0; i < keys.length; i++) {
  753. const name = keys[i];
  754. const formatterOrDefaultValue = formatArgs[name];
  755. if (isFunction(formatterOrDefaultValue)) {
  756. const errMsg = formatterOrDefaultValue(args[0][name], params);
  757. if (isString(errMsg)) {
  758. return errMsg;
  759. }
  760. } else {
  761. if (!hasOwn(params, name)) {
  762. params[name] = formatterOrDefaultValue;
  763. }
  764. }
  765. }
  766. }
  767. function invokeSuccess(id, name, res) {
  768. return invokeCallback(id, extend(res || {}, { errMsg: name + ":ok" }));
  769. }
  770. function invokeFail(id, name, errMsg, errRes) {
  771. return invokeCallback(id, extend({ errMsg: name + ":fail" + (errMsg ? " " + errMsg : "") }, errRes));
  772. }
  773. function beforeInvokeApi(name, args, protocol, options) {
  774. {
  775. validateProtocols(name, args, protocol);
  776. }
  777. if (options && options.beforeInvoke) {
  778. const errMsg2 = options.beforeInvoke(args);
  779. if (isString(errMsg2)) {
  780. return errMsg2;
  781. }
  782. }
  783. const errMsg = formatApiArgs(args, options);
  784. if (errMsg) {
  785. return errMsg;
  786. }
  787. }
  788. function normalizeErrMsg(errMsg) {
  789. if (!errMsg || isString(errMsg)) {
  790. return errMsg;
  791. }
  792. if (errMsg.stack) {
  793. console.error(errMsg.message + LINEFEED + errMsg.stack);
  794. return errMsg.message;
  795. }
  796. return errMsg;
  797. }
  798. function wrapperTaskApi(name, fn, protocol, options) {
  799. return (args) => {
  800. const id = createAsyncApiCallback(name, args, options);
  801. const errMsg = beforeInvokeApi(name, [args], protocol, options);
  802. if (errMsg) {
  803. return invokeFail(id, name, errMsg);
  804. }
  805. return fn(args, {
  806. resolve: (res) => invokeSuccess(id, name, res),
  807. reject: (errMsg2, errRes) => invokeFail(id, name, normalizeErrMsg(errMsg2), errRes)
  808. });
  809. };
  810. }
  811. function wrapperSyncApi(name, fn, protocol, options) {
  812. return (...args) => {
  813. const errMsg = beforeInvokeApi(name, args, protocol, options);
  814. if (errMsg) {
  815. throw new Error(errMsg);
  816. }
  817. return fn.apply(null, args);
  818. };
  819. }
  820. function wrapperAsyncApi(name, fn, protocol, options) {
  821. return wrapperTaskApi(name, fn, protocol, options);
  822. }
  823. function defineSyncApi(name, fn, protocol, options) {
  824. return wrapperSyncApi(name, fn, protocol, options);
  825. }
  826. function defineAsyncApi(name, fn, protocol, options) {
  827. return promisify$1(name, wrapperAsyncApi(name, fn, protocol, options));
  828. }
  829. const API_UPX2PX = "upx2px";
  830. const Upx2pxProtocol = [
  831. {
  832. name: "upx",
  833. type: [Number, String],
  834. required: true
  835. }
  836. ];
  837. const EPS = 1e-4;
  838. const BASE_DEVICE_WIDTH = 750;
  839. let isIOS = false;
  840. let deviceWidth = 0;
  841. let deviceDPR = 0;
  842. function checkDeviceWidth() {
  843. const { platform: platform2, pixelRatio, windowWidth } = getBaseSystemInfo();
  844. deviceWidth = windowWidth;
  845. deviceDPR = pixelRatio;
  846. isIOS = platform2 === "ios";
  847. }
  848. const upx2px = defineSyncApi(API_UPX2PX, (number2, newDeviceWidth) => {
  849. if (deviceWidth === 0) {
  850. checkDeviceWidth();
  851. }
  852. number2 = Number(number2);
  853. if (number2 === 0) {
  854. return 0;
  855. }
  856. let width = newDeviceWidth || deviceWidth;
  857. let result = number2 / BASE_DEVICE_WIDTH * width;
  858. if (result < 0) {
  859. result = -result;
  860. }
  861. result = Math.floor(result + EPS);
  862. if (result === 0) {
  863. if (deviceDPR === 1 || !isIOS) {
  864. result = 1;
  865. } else {
  866. result = 0.5;
  867. }
  868. }
  869. return number2 < 0 ? -result : result;
  870. }, Upx2pxProtocol);
  871. const API_ADD_INTERCEPTOR = "addInterceptor";
  872. const API_REMOVE_INTERCEPTOR = "removeInterceptor";
  873. const AddInterceptorProtocol = [
  874. {
  875. name: "method",
  876. type: [String, Object],
  877. required: true
  878. }
  879. ];
  880. const RemoveInterceptorProtocol = AddInterceptorProtocol;
  881. function mergeInterceptorHook(interceptors2, interceptor) {
  882. Object.keys(interceptor).forEach((hook) => {
  883. if (isFunction(interceptor[hook])) {
  884. interceptors2[hook] = mergeHook(interceptors2[hook], interceptor[hook]);
  885. }
  886. });
  887. }
  888. function removeInterceptorHook(interceptors2, interceptor) {
  889. if (!interceptors2 || !interceptor) {
  890. return;
  891. }
  892. Object.keys(interceptor).forEach((name) => {
  893. const hooks = interceptors2[name];
  894. const hook = interceptor[name];
  895. if (isArray$1(hooks) && isFunction(hook)) {
  896. remove(hooks, hook);
  897. }
  898. });
  899. }
  900. function mergeHook(parentVal, childVal) {
  901. const res = childVal ? parentVal ? parentVal.concat(childVal) : isArray$1(childVal) ? childVal : [childVal] : parentVal;
  902. return res ? dedupeHooks(res) : res;
  903. }
  904. function dedupeHooks(hooks) {
  905. const res = [];
  906. for (let i = 0; i < hooks.length; i++) {
  907. if (res.indexOf(hooks[i]) === -1) {
  908. res.push(hooks[i]);
  909. }
  910. }
  911. return res;
  912. }
  913. const addInterceptor = defineSyncApi(API_ADD_INTERCEPTOR, (method, interceptor) => {
  914. if (isString(method) && isPlainObject$1(interceptor)) {
  915. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), interceptor);
  916. } else if (isPlainObject$1(method)) {
  917. mergeInterceptorHook(globalInterceptors, method);
  918. }
  919. }, AddInterceptorProtocol);
  920. const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interceptor) => {
  921. if (isString(method)) {
  922. if (isPlainObject$1(interceptor)) {
  923. removeInterceptorHook(scopedInterceptors[method], interceptor);
  924. } else {
  925. delete scopedInterceptors[method];
  926. }
  927. } else if (isPlainObject$1(method)) {
  928. removeInterceptorHook(globalInterceptors, method);
  929. }
  930. }, RemoveInterceptorProtocol);
  931. const interceptors = {};
  932. const API_ON = "$on";
  933. const OnProtocol = [
  934. {
  935. name: "event",
  936. type: String,
  937. required: true
  938. },
  939. {
  940. name: "callback",
  941. type: Function,
  942. required: true
  943. }
  944. ];
  945. const API_ONCE = "$once";
  946. const OnceProtocol = OnProtocol;
  947. const API_OFF = "$off";
  948. const OffProtocol = [
  949. {
  950. name: "event",
  951. type: [String, Array]
  952. },
  953. {
  954. name: "callback",
  955. type: Function
  956. }
  957. ];
  958. const API_EMIT = "$emit";
  959. const EmitProtocol = [
  960. {
  961. name: "event",
  962. type: String,
  963. required: true
  964. }
  965. ];
  966. const emitter = new E$1();
  967. const $on = defineSyncApi(API_ON, (name, callback) => {
  968. emitter.on(name, callback);
  969. return () => emitter.off(name, callback);
  970. }, OnProtocol);
  971. const $once = defineSyncApi(API_ONCE, (name, callback) => {
  972. emitter.once(name, callback);
  973. return () => emitter.off(name, callback);
  974. }, OnceProtocol);
  975. const $off = defineSyncApi(API_OFF, (name, callback) => {
  976. if (!name) {
  977. emitter.e = {};
  978. return;
  979. }
  980. if (!isArray$1(name))
  981. name = [name];
  982. name.forEach((n2) => emitter.off(n2, callback));
  983. }, OffProtocol);
  984. const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
  985. emitter.emit(name, ...args);
  986. }, EmitProtocol);
  987. let cid;
  988. let cidErrMsg;
  989. let enabled;
  990. function normalizePushMessage(message) {
  991. try {
  992. return JSON.parse(message);
  993. } catch (e2) {
  994. }
  995. return message;
  996. }
  997. function invokePushCallback(args) {
  998. if (args.type === "enabled") {
  999. enabled = true;
  1000. } else if (args.type === "clientId") {
  1001. cid = args.cid;
  1002. cidErrMsg = args.errMsg;
  1003. invokeGetPushCidCallbacks(cid, args.errMsg);
  1004. } else if (args.type === "pushMsg") {
  1005. const message = {
  1006. type: "receive",
  1007. data: normalizePushMessage(args.message)
  1008. };
  1009. for (let i = 0; i < onPushMessageCallbacks.length; i++) {
  1010. const callback = onPushMessageCallbacks[i];
  1011. callback(message);
  1012. if (message.stopped) {
  1013. break;
  1014. }
  1015. }
  1016. } else if (args.type === "click") {
  1017. onPushMessageCallbacks.forEach((callback) => {
  1018. callback({
  1019. type: "click",
  1020. data: normalizePushMessage(args.message)
  1021. });
  1022. });
  1023. }
  1024. }
  1025. const getPushCidCallbacks = [];
  1026. function invokeGetPushCidCallbacks(cid2, errMsg) {
  1027. getPushCidCallbacks.forEach((callback) => {
  1028. callback(cid2, errMsg);
  1029. });
  1030. getPushCidCallbacks.length = 0;
  1031. }
  1032. const API_GET_PUSH_CLIENT_ID = "getPushClientId";
  1033. const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
  1034. Promise.resolve().then(() => {
  1035. if (typeof enabled === "undefined") {
  1036. enabled = false;
  1037. cid = "";
  1038. cidErrMsg = "uniPush is not enabled";
  1039. }
  1040. getPushCidCallbacks.push((cid2, errMsg) => {
  1041. if (cid2) {
  1042. resolve2({ cid: cid2 });
  1043. } else {
  1044. reject(errMsg);
  1045. }
  1046. });
  1047. if (typeof cid !== "undefined") {
  1048. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1049. }
  1050. });
  1051. });
  1052. const onPushMessageCallbacks = [];
  1053. const onPushMessage = (fn) => {
  1054. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1055. onPushMessageCallbacks.push(fn);
  1056. }
  1057. };
  1058. const offPushMessage = (fn) => {
  1059. if (!fn) {
  1060. onPushMessageCallbacks.length = 0;
  1061. } else {
  1062. const index2 = onPushMessageCallbacks.indexOf(fn);
  1063. if (index2 > -1) {
  1064. onPushMessageCallbacks.splice(index2, 1);
  1065. }
  1066. }
  1067. };
  1068. const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/;
  1069. const CONTEXT_API_RE = /^create|Manager$/;
  1070. const CONTEXT_API_RE_EXC = ["createBLEConnection"];
  1071. const ASYNC_API = ["createBLEConnection"];
  1072. const CALLBACK_API_RE = /^on|^off/;
  1073. function isContextApi(name) {
  1074. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1075. }
  1076. function isSyncApi(name) {
  1077. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1078. }
  1079. function isCallbackApi(name) {
  1080. return CALLBACK_API_RE.test(name) && name !== "onPush";
  1081. }
  1082. function shouldPromise(name) {
  1083. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1084. return false;
  1085. }
  1086. return true;
  1087. }
  1088. if (!Promise.prototype.finally) {
  1089. Promise.prototype.finally = function(onfinally) {
  1090. const promise2 = this.constructor;
  1091. return this.then((value) => promise2.resolve(onfinally && onfinally()).then(() => value), (reason) => promise2.resolve(onfinally && onfinally()).then(() => {
  1092. throw reason;
  1093. }));
  1094. };
  1095. }
  1096. function promisify(name, api) {
  1097. if (!shouldPromise(name)) {
  1098. return api;
  1099. }
  1100. if (!isFunction(api)) {
  1101. return api;
  1102. }
  1103. return function promiseApi(options = {}, ...rest) {
  1104. if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
  1105. return wrapperReturnValue(name, invokeApi(name, api, options, rest));
  1106. }
  1107. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  1108. invokeApi(name, api, extend({}, options, {
  1109. success: resolve2,
  1110. fail: reject
  1111. }), rest);
  1112. })));
  1113. };
  1114. }
  1115. const CALLBACKS = ["success", "fail", "cancel", "complete"];
  1116. function initWrapper(protocols2) {
  1117. function processCallback(methodName, method, returnValue) {
  1118. return function(res) {
  1119. return method(processReturnValue(methodName, res, returnValue));
  1120. };
  1121. }
  1122. function processArgs(methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {
  1123. if (isPlainObject$1(fromArgs)) {
  1124. const toArgs = keepFromArgs === true ? fromArgs : {};
  1125. if (isFunction(argsOption)) {
  1126. argsOption = argsOption(fromArgs, toArgs) || {};
  1127. }
  1128. for (const key in fromArgs) {
  1129. if (hasOwn(argsOption, key)) {
  1130. let keyOption = argsOption[key];
  1131. if (isFunction(keyOption)) {
  1132. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1133. }
  1134. if (!keyOption) {
  1135. console.warn(`微信小程序 ${methodName} 暂不支持 ${key}`);
  1136. } else if (isString(keyOption)) {
  1137. toArgs[keyOption] = fromArgs[key];
  1138. } else if (isPlainObject$1(keyOption)) {
  1139. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1140. }
  1141. } else if (CALLBACKS.indexOf(key) !== -1) {
  1142. const callback = fromArgs[key];
  1143. if (isFunction(callback)) {
  1144. toArgs[key] = processCallback(methodName, callback, returnValue);
  1145. }
  1146. } else {
  1147. if (!keepFromArgs && !hasOwn(toArgs, key)) {
  1148. toArgs[key] = fromArgs[key];
  1149. }
  1150. }
  1151. }
  1152. return toArgs;
  1153. } else if (isFunction(fromArgs)) {
  1154. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1155. }
  1156. return fromArgs;
  1157. }
  1158. function processReturnValue(methodName, res, returnValue, keepReturnValue = false) {
  1159. if (isFunction(protocols2.returnValue)) {
  1160. res = protocols2.returnValue(methodName, res);
  1161. }
  1162. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1163. }
  1164. return function wrapper(methodName, method) {
  1165. if (!hasOwn(protocols2, methodName)) {
  1166. return method;
  1167. }
  1168. const protocol = protocols2[methodName];
  1169. if (!protocol) {
  1170. return function() {
  1171. console.error(`微信小程序 暂不支持${methodName}`);
  1172. };
  1173. }
  1174. return function(arg1, arg2) {
  1175. let options = protocol;
  1176. if (isFunction(protocol)) {
  1177. options = protocol(arg1);
  1178. }
  1179. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1180. const args = [arg1];
  1181. if (typeof arg2 !== "undefined") {
  1182. args.push(arg2);
  1183. }
  1184. const returnValue = wx[options.name || methodName].apply(wx, args);
  1185. if (isSyncApi(methodName)) {
  1186. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1187. }
  1188. return returnValue;
  1189. };
  1190. };
  1191. }
  1192. const getLocale = () => {
  1193. const app = isFunction(getApp) && getApp({ allowDefault: true });
  1194. if (app && app.$vm) {
  1195. return app.$vm.$locale;
  1196. }
  1197. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1198. };
  1199. const setLocale = (locale) => {
  1200. const app = isFunction(getApp) && getApp();
  1201. if (!app) {
  1202. return false;
  1203. }
  1204. const oldLocale = app.$vm.$locale;
  1205. if (oldLocale !== locale) {
  1206. app.$vm.$locale = locale;
  1207. onLocaleChangeCallbacks.forEach((fn) => fn({ locale }));
  1208. return true;
  1209. }
  1210. return false;
  1211. };
  1212. const onLocaleChangeCallbacks = [];
  1213. const onLocaleChange = (fn) => {
  1214. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1215. onLocaleChangeCallbacks.push(fn);
  1216. }
  1217. };
  1218. if (typeof global !== "undefined") {
  1219. global.getLocale = getLocale;
  1220. }
  1221. const UUID_KEY = "__DC_STAT_UUID";
  1222. let deviceId;
  1223. function useDeviceId(global2 = wx) {
  1224. return function addDeviceId(_, toRes) {
  1225. deviceId = deviceId || global2.getStorageSync(UUID_KEY);
  1226. if (!deviceId) {
  1227. deviceId = Date.now() + "" + Math.floor(Math.random() * 1e7);
  1228. wx.setStorage({
  1229. key: UUID_KEY,
  1230. data: deviceId
  1231. });
  1232. }
  1233. toRes.deviceId = deviceId;
  1234. };
  1235. }
  1236. function addSafeAreaInsets(fromRes, toRes) {
  1237. if (fromRes.safeArea) {
  1238. const safeArea = fromRes.safeArea;
  1239. toRes.safeAreaInsets = {
  1240. top: safeArea.top,
  1241. left: safeArea.left,
  1242. right: fromRes.windowWidth - safeArea.right,
  1243. bottom: fromRes.screenHeight - safeArea.bottom
  1244. };
  1245. }
  1246. }
  1247. function populateParameters(fromRes, toRes) {
  1248. const { brand = "", model = "", system = "", language = "", theme, version: version2, platform: platform2, fontSizeSetting, SDKVersion, pixelRatio, deviceOrientation } = fromRes;
  1249. let osName = "";
  1250. let osVersion = "";
  1251. {
  1252. osName = system.split(" ")[0] || "";
  1253. osVersion = system.split(" ")[1] || "";
  1254. }
  1255. let hostVersion = version2;
  1256. let deviceType = getGetDeviceType(fromRes, model);
  1257. let deviceBrand = getDeviceBrand(brand);
  1258. let _hostName = getHostName(fromRes);
  1259. let _deviceOrientation = deviceOrientation;
  1260. let _devicePixelRatio = pixelRatio;
  1261. let _SDKVersion = SDKVersion;
  1262. const hostLanguage = language.replace(/_/g, "-");
  1263. const parameters = {
  1264. appId: "__UNI__8C0715C",
  1265. appName: "learn_applet",
  1266. appVersion: "1.0.0",
  1267. appVersionCode: "100",
  1268. appLanguage: getAppLanguage(hostLanguage),
  1269. uniCompileVersion: "3.8.7",
  1270. uniRuntimeVersion: "3.8.7",
  1271. uniPlatform: "mp-weixin",
  1272. deviceBrand,
  1273. deviceModel: model,
  1274. deviceType,
  1275. devicePixelRatio: _devicePixelRatio,
  1276. deviceOrientation: _deviceOrientation,
  1277. osName: osName.toLocaleLowerCase(),
  1278. osVersion,
  1279. hostTheme: theme,
  1280. hostVersion,
  1281. hostLanguage,
  1282. hostName: _hostName,
  1283. hostSDKVersion: _SDKVersion,
  1284. hostFontSizeSetting: fontSizeSetting,
  1285. windowTop: 0,
  1286. windowBottom: 0,
  1287. // TODO
  1288. osLanguage: void 0,
  1289. osTheme: void 0,
  1290. ua: void 0,
  1291. hostPackageName: void 0,
  1292. browserName: void 0,
  1293. browserVersion: void 0
  1294. };
  1295. extend(toRes, parameters);
  1296. }
  1297. function getGetDeviceType(fromRes, model) {
  1298. let deviceType = fromRes.deviceType || "phone";
  1299. {
  1300. const deviceTypeMaps = {
  1301. ipad: "pad",
  1302. windows: "pc",
  1303. mac: "pc"
  1304. };
  1305. const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1306. const _model = model.toLocaleLowerCase();
  1307. for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
  1308. const _m = deviceTypeMapsKeys[index2];
  1309. if (_model.indexOf(_m) !== -1) {
  1310. deviceType = deviceTypeMaps[_m];
  1311. break;
  1312. }
  1313. }
  1314. }
  1315. return deviceType;
  1316. }
  1317. function getDeviceBrand(brand) {
  1318. let deviceBrand = brand;
  1319. if (deviceBrand) {
  1320. deviceBrand = deviceBrand.toLocaleLowerCase();
  1321. }
  1322. return deviceBrand;
  1323. }
  1324. function getAppLanguage(defaultLanguage) {
  1325. return getLocale ? getLocale() : defaultLanguage;
  1326. }
  1327. function getHostName(fromRes) {
  1328. const _platform = "WeChat";
  1329. let _hostName = fromRes.hostName || _platform;
  1330. {
  1331. if (fromRes.environment) {
  1332. _hostName = fromRes.environment;
  1333. } else if (fromRes.host && fromRes.host.env) {
  1334. _hostName = fromRes.host.env;
  1335. }
  1336. }
  1337. return _hostName;
  1338. }
  1339. const getSystemInfo = {
  1340. returnValue: (fromRes, toRes) => {
  1341. addSafeAreaInsets(fromRes, toRes);
  1342. useDeviceId()(fromRes, toRes);
  1343. populateParameters(fromRes, toRes);
  1344. }
  1345. };
  1346. const getSystemInfoSync = getSystemInfo;
  1347. const redirectTo = {};
  1348. const previewImage = {
  1349. args(fromArgs, toArgs) {
  1350. let currentIndex = parseInt(fromArgs.current);
  1351. if (isNaN(currentIndex)) {
  1352. return;
  1353. }
  1354. const urls = fromArgs.urls;
  1355. if (!isArray$1(urls)) {
  1356. return;
  1357. }
  1358. const len = urls.length;
  1359. if (!len) {
  1360. return;
  1361. }
  1362. if (currentIndex < 0) {
  1363. currentIndex = 0;
  1364. } else if (currentIndex >= len) {
  1365. currentIndex = len - 1;
  1366. }
  1367. if (currentIndex > 0) {
  1368. toArgs.current = urls[currentIndex];
  1369. toArgs.urls = urls.filter((item, index2) => index2 < currentIndex ? item !== urls[currentIndex] : true);
  1370. } else {
  1371. toArgs.current = urls[0];
  1372. }
  1373. return {
  1374. indicator: false,
  1375. loop: false
  1376. };
  1377. }
  1378. };
  1379. const showActionSheet = {
  1380. args(fromArgs, toArgs) {
  1381. toArgs.alertText = fromArgs.title;
  1382. }
  1383. };
  1384. const getDeviceInfo = {
  1385. returnValue: (fromRes, toRes) => {
  1386. const { brand, model } = fromRes;
  1387. let deviceType = getGetDeviceType(fromRes, model);
  1388. let deviceBrand = getDeviceBrand(brand);
  1389. useDeviceId()(fromRes, toRes);
  1390. toRes = sortObject(extend(toRes, {
  1391. deviceType,
  1392. deviceBrand,
  1393. deviceModel: model
  1394. }));
  1395. }
  1396. };
  1397. const getAppBaseInfo = {
  1398. returnValue: (fromRes, toRes) => {
  1399. const { version: version2, language, SDKVersion, theme } = fromRes;
  1400. let _hostName = getHostName(fromRes);
  1401. let hostLanguage = language.replace(/_/g, "-");
  1402. toRes = sortObject(extend(toRes, {
  1403. hostVersion: version2,
  1404. hostLanguage,
  1405. hostName: _hostName,
  1406. hostSDKVersion: SDKVersion,
  1407. hostTheme: theme,
  1408. appId: "__UNI__8C0715C",
  1409. appName: "learn_applet",
  1410. appVersion: "1.0.0",
  1411. appVersionCode: "100",
  1412. appLanguage: getAppLanguage(hostLanguage)
  1413. }));
  1414. }
  1415. };
  1416. const getWindowInfo = {
  1417. returnValue: (fromRes, toRes) => {
  1418. addSafeAreaInsets(fromRes, toRes);
  1419. toRes = sortObject(extend(toRes, {
  1420. windowTop: 0,
  1421. windowBottom: 0
  1422. }));
  1423. }
  1424. };
  1425. const getAppAuthorizeSetting = {
  1426. returnValue: function(fromRes, toRes) {
  1427. const { locationReducedAccuracy } = fromRes;
  1428. toRes.locationAccuracy = "unsupported";
  1429. if (locationReducedAccuracy === true) {
  1430. toRes.locationAccuracy = "reduced";
  1431. } else if (locationReducedAccuracy === false) {
  1432. toRes.locationAccuracy = "full";
  1433. }
  1434. }
  1435. };
  1436. const baseApis = {
  1437. $on,
  1438. $off,
  1439. $once,
  1440. $emit,
  1441. upx2px,
  1442. interceptors,
  1443. addInterceptor,
  1444. removeInterceptor,
  1445. onCreateVueApp,
  1446. invokeCreateVueAppHook,
  1447. getLocale,
  1448. setLocale,
  1449. onLocaleChange,
  1450. getPushClientId,
  1451. onPushMessage,
  1452. offPushMessage,
  1453. invokePushCallback
  1454. };
  1455. function initUni(api, protocols2, platform2 = wx) {
  1456. const wrapper = initWrapper(protocols2);
  1457. const UniProxyHandlers = {
  1458. get(target, key) {
  1459. if (hasOwn(target, key)) {
  1460. return target[key];
  1461. }
  1462. if (hasOwn(api, key)) {
  1463. return promisify(key, api[key]);
  1464. }
  1465. if (hasOwn(baseApis, key)) {
  1466. return promisify(key, baseApis[key]);
  1467. }
  1468. return promisify(key, wrapper(key, platform2[key]));
  1469. }
  1470. };
  1471. return new Proxy({}, UniProxyHandlers);
  1472. }
  1473. function initGetProvider(providers) {
  1474. return function getProvider2({ service, success, fail, complete }) {
  1475. let res;
  1476. if (providers[service]) {
  1477. res = {
  1478. errMsg: "getProvider:ok",
  1479. service,
  1480. provider: providers[service]
  1481. };
  1482. isFunction(success) && success(res);
  1483. } else {
  1484. res = {
  1485. errMsg: "getProvider:fail:服务[" + service + "]不存在"
  1486. };
  1487. isFunction(fail) && fail(res);
  1488. }
  1489. isFunction(complete) && complete(res);
  1490. };
  1491. }
  1492. const objectKeys = [
  1493. "qy",
  1494. "env",
  1495. "error",
  1496. "version",
  1497. "lanDebug",
  1498. "cloud",
  1499. "serviceMarket",
  1500. "router",
  1501. "worklet",
  1502. "__webpack_require_UNI_MP_PLUGIN__"
  1503. ];
  1504. const singlePageDisableKey = ["lanDebug", "router", "worklet"];
  1505. const launchOption = wx.getLaunchOptionsSync ? wx.getLaunchOptionsSync() : null;
  1506. function isWxKey(key) {
  1507. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  1508. return false;
  1509. }
  1510. return objectKeys.indexOf(key) > -1 || typeof wx[key] === "function";
  1511. }
  1512. function initWx() {
  1513. const newWx = {};
  1514. for (const key in wx) {
  1515. if (isWxKey(key)) {
  1516. newWx[key] = wx[key];
  1517. }
  1518. }
  1519. if (typeof globalThis !== "undefined" && typeof requireMiniProgram === "undefined") {
  1520. globalThis.wx = newWx;
  1521. }
  1522. return newWx;
  1523. }
  1524. const mocks$1 = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  1525. const getProvider = initGetProvider({
  1526. oauth: ["weixin"],
  1527. share: ["weixin"],
  1528. payment: ["wxpay"],
  1529. push: ["weixin"]
  1530. });
  1531. function initComponentMocks(component) {
  1532. const res = /* @__PURE__ */ Object.create(null);
  1533. mocks$1.forEach((name) => {
  1534. res[name] = component[name];
  1535. });
  1536. return res;
  1537. }
  1538. function createSelectorQuery() {
  1539. const query = wx$2.createSelectorQuery();
  1540. const oldIn = query.in;
  1541. query.in = function newIn(component) {
  1542. return oldIn.call(this, initComponentMocks(component));
  1543. };
  1544. return query;
  1545. }
  1546. const wx$2 = initWx();
  1547. let baseInfo = wx$2.getAppBaseInfo && wx$2.getAppBaseInfo();
  1548. if (!baseInfo) {
  1549. baseInfo = wx$2.getSystemInfoSync();
  1550. }
  1551. const host = baseInfo ? baseInfo.host : null;
  1552. const shareVideoMessage = host && host.env === "SAAASDK" ? wx$2.miniapp.shareVideoMessage : wx$2.shareVideoMessage;
  1553. var shims = /* @__PURE__ */ Object.freeze({
  1554. __proto__: null,
  1555. createSelectorQuery,
  1556. getProvider,
  1557. shareVideoMessage
  1558. });
  1559. const compressImage = {
  1560. args(fromArgs, toArgs) {
  1561. if (fromArgs.compressedHeight && !toArgs.compressHeight) {
  1562. toArgs.compressHeight = fromArgs.compressedHeight;
  1563. }
  1564. if (fromArgs.compressedWidth && !toArgs.compressWidth) {
  1565. toArgs.compressWidth = fromArgs.compressedWidth;
  1566. }
  1567. }
  1568. };
  1569. var protocols = /* @__PURE__ */ Object.freeze({
  1570. __proto__: null,
  1571. compressImage,
  1572. getAppAuthorizeSetting,
  1573. getAppBaseInfo,
  1574. getDeviceInfo,
  1575. getSystemInfo,
  1576. getSystemInfoSync,
  1577. getWindowInfo,
  1578. previewImage,
  1579. redirectTo,
  1580. showActionSheet
  1581. });
  1582. const wx$1 = initWx();
  1583. var index$1 = initUni(shims, protocols, wx$1);
  1584. function warn$1(msg, ...args) {
  1585. console.warn(`[Vue warn] ${msg}`, ...args);
  1586. }
  1587. let activeEffectScope;
  1588. class EffectScope {
  1589. constructor(detached = false) {
  1590. this.detached = detached;
  1591. this._active = true;
  1592. this.effects = [];
  1593. this.cleanups = [];
  1594. this.parent = activeEffectScope;
  1595. if (!detached && activeEffectScope) {
  1596. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
  1597. }
  1598. }
  1599. get active() {
  1600. return this._active;
  1601. }
  1602. run(fn) {
  1603. if (this._active) {
  1604. const currentEffectScope = activeEffectScope;
  1605. try {
  1606. activeEffectScope = this;
  1607. return fn();
  1608. } finally {
  1609. activeEffectScope = currentEffectScope;
  1610. }
  1611. } else {
  1612. warn$1(`cannot run an inactive effect scope.`);
  1613. }
  1614. }
  1615. /**
  1616. * This should only be called on non-detached scopes
  1617. * @internal
  1618. */
  1619. on() {
  1620. activeEffectScope = this;
  1621. }
  1622. /**
  1623. * This should only be called on non-detached scopes
  1624. * @internal
  1625. */
  1626. off() {
  1627. activeEffectScope = this.parent;
  1628. }
  1629. stop(fromParent) {
  1630. if (this._active) {
  1631. let i, l;
  1632. for (i = 0, l = this.effects.length; i < l; i++) {
  1633. this.effects[i].stop();
  1634. }
  1635. for (i = 0, l = this.cleanups.length; i < l; i++) {
  1636. this.cleanups[i]();
  1637. }
  1638. if (this.scopes) {
  1639. for (i = 0, l = this.scopes.length; i < l; i++) {
  1640. this.scopes[i].stop(true);
  1641. }
  1642. }
  1643. if (!this.detached && this.parent && !fromParent) {
  1644. const last = this.parent.scopes.pop();
  1645. if (last && last !== this) {
  1646. this.parent.scopes[this.index] = last;
  1647. last.index = this.index;
  1648. }
  1649. }
  1650. this.parent = void 0;
  1651. this._active = false;
  1652. }
  1653. }
  1654. }
  1655. function recordEffectScope(effect, scope = activeEffectScope) {
  1656. if (scope && scope.active) {
  1657. scope.effects.push(effect);
  1658. }
  1659. }
  1660. function getCurrentScope() {
  1661. return activeEffectScope;
  1662. }
  1663. const createDep = (effects) => {
  1664. const dep = new Set(effects);
  1665. dep.w = 0;
  1666. dep.n = 0;
  1667. return dep;
  1668. };
  1669. const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
  1670. const newTracked = (dep) => (dep.n & trackOpBit) > 0;
  1671. const initDepMarkers = ({ deps }) => {
  1672. if (deps.length) {
  1673. for (let i = 0; i < deps.length; i++) {
  1674. deps[i].w |= trackOpBit;
  1675. }
  1676. }
  1677. };
  1678. const finalizeDepMarkers = (effect) => {
  1679. const { deps } = effect;
  1680. if (deps.length) {
  1681. let ptr = 0;
  1682. for (let i = 0; i < deps.length; i++) {
  1683. const dep = deps[i];
  1684. if (wasTracked(dep) && !newTracked(dep)) {
  1685. dep.delete(effect);
  1686. } else {
  1687. deps[ptr++] = dep;
  1688. }
  1689. dep.w &= ~trackOpBit;
  1690. dep.n &= ~trackOpBit;
  1691. }
  1692. deps.length = ptr;
  1693. }
  1694. };
  1695. const targetMap = /* @__PURE__ */ new WeakMap();
  1696. let effectTrackDepth = 0;
  1697. let trackOpBit = 1;
  1698. const maxMarkerBits = 30;
  1699. let activeEffect;
  1700. const ITERATE_KEY = Symbol("iterate");
  1701. const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
  1702. class ReactiveEffect {
  1703. constructor(fn, scheduler = null, scope) {
  1704. this.fn = fn;
  1705. this.scheduler = scheduler;
  1706. this.active = true;
  1707. this.deps = [];
  1708. this.parent = void 0;
  1709. recordEffectScope(this, scope);
  1710. }
  1711. run() {
  1712. if (!this.active) {
  1713. return this.fn();
  1714. }
  1715. let parent = activeEffect;
  1716. let lastShouldTrack = shouldTrack;
  1717. while (parent) {
  1718. if (parent === this) {
  1719. return;
  1720. }
  1721. parent = parent.parent;
  1722. }
  1723. try {
  1724. this.parent = activeEffect;
  1725. activeEffect = this;
  1726. shouldTrack = true;
  1727. trackOpBit = 1 << ++effectTrackDepth;
  1728. if (effectTrackDepth <= maxMarkerBits) {
  1729. initDepMarkers(this);
  1730. } else {
  1731. cleanupEffect(this);
  1732. }
  1733. return this.fn();
  1734. } finally {
  1735. if (effectTrackDepth <= maxMarkerBits) {
  1736. finalizeDepMarkers(this);
  1737. }
  1738. trackOpBit = 1 << --effectTrackDepth;
  1739. activeEffect = this.parent;
  1740. shouldTrack = lastShouldTrack;
  1741. this.parent = void 0;
  1742. if (this.deferStop) {
  1743. this.stop();
  1744. }
  1745. }
  1746. }
  1747. stop() {
  1748. if (activeEffect === this) {
  1749. this.deferStop = true;
  1750. } else if (this.active) {
  1751. cleanupEffect(this);
  1752. if (this.onStop) {
  1753. this.onStop();
  1754. }
  1755. this.active = false;
  1756. }
  1757. }
  1758. }
  1759. function cleanupEffect(effect) {
  1760. const { deps } = effect;
  1761. if (deps.length) {
  1762. for (let i = 0; i < deps.length; i++) {
  1763. deps[i].delete(effect);
  1764. }
  1765. deps.length = 0;
  1766. }
  1767. }
  1768. let shouldTrack = true;
  1769. const trackStack = [];
  1770. function pauseTracking() {
  1771. trackStack.push(shouldTrack);
  1772. shouldTrack = false;
  1773. }
  1774. function resetTracking() {
  1775. const last = trackStack.pop();
  1776. shouldTrack = last === void 0 ? true : last;
  1777. }
  1778. function track(target, type, key) {
  1779. if (shouldTrack && activeEffect) {
  1780. let depsMap = targetMap.get(target);
  1781. if (!depsMap) {
  1782. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  1783. }
  1784. let dep = depsMap.get(key);
  1785. if (!dep) {
  1786. depsMap.set(key, dep = createDep());
  1787. }
  1788. const eventInfo = { effect: activeEffect, target, type, key };
  1789. trackEffects(dep, eventInfo);
  1790. }
  1791. }
  1792. function trackEffects(dep, debuggerEventExtraInfo) {
  1793. let shouldTrack2 = false;
  1794. if (effectTrackDepth <= maxMarkerBits) {
  1795. if (!newTracked(dep)) {
  1796. dep.n |= trackOpBit;
  1797. shouldTrack2 = !wasTracked(dep);
  1798. }
  1799. } else {
  1800. shouldTrack2 = !dep.has(activeEffect);
  1801. }
  1802. if (shouldTrack2) {
  1803. dep.add(activeEffect);
  1804. activeEffect.deps.push(dep);
  1805. if (activeEffect.onTrack) {
  1806. activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
  1807. }
  1808. }
  1809. }
  1810. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  1811. const depsMap = targetMap.get(target);
  1812. if (!depsMap) {
  1813. return;
  1814. }
  1815. let deps = [];
  1816. if (type === "clear") {
  1817. deps = [...depsMap.values()];
  1818. } else if (key === "length" && isArray$1(target)) {
  1819. const newLength = Number(newValue);
  1820. depsMap.forEach((dep, key2) => {
  1821. if (key2 === "length" || key2 >= newLength) {
  1822. deps.push(dep);
  1823. }
  1824. });
  1825. } else {
  1826. if (key !== void 0) {
  1827. deps.push(depsMap.get(key));
  1828. }
  1829. switch (type) {
  1830. case "add":
  1831. if (!isArray$1(target)) {
  1832. deps.push(depsMap.get(ITERATE_KEY));
  1833. if (isMap(target)) {
  1834. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  1835. }
  1836. } else if (isIntegerKey(key)) {
  1837. deps.push(depsMap.get("length"));
  1838. }
  1839. break;
  1840. case "delete":
  1841. if (!isArray$1(target)) {
  1842. deps.push(depsMap.get(ITERATE_KEY));
  1843. if (isMap(target)) {
  1844. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  1845. }
  1846. }
  1847. break;
  1848. case "set":
  1849. if (isMap(target)) {
  1850. deps.push(depsMap.get(ITERATE_KEY));
  1851. }
  1852. break;
  1853. }
  1854. }
  1855. const eventInfo = { target, type, key, newValue, oldValue, oldTarget };
  1856. if (deps.length === 1) {
  1857. if (deps[0]) {
  1858. {
  1859. triggerEffects(deps[0], eventInfo);
  1860. }
  1861. }
  1862. } else {
  1863. const effects = [];
  1864. for (const dep of deps) {
  1865. if (dep) {
  1866. effects.push(...dep);
  1867. }
  1868. }
  1869. {
  1870. triggerEffects(createDep(effects), eventInfo);
  1871. }
  1872. }
  1873. }
  1874. function triggerEffects(dep, debuggerEventExtraInfo) {
  1875. const effects = isArray$1(dep) ? dep : [...dep];
  1876. for (const effect of effects) {
  1877. if (effect.computed) {
  1878. triggerEffect(effect, debuggerEventExtraInfo);
  1879. }
  1880. }
  1881. for (const effect of effects) {
  1882. if (!effect.computed) {
  1883. triggerEffect(effect, debuggerEventExtraInfo);
  1884. }
  1885. }
  1886. }
  1887. function triggerEffect(effect, debuggerEventExtraInfo) {
  1888. if (effect !== activeEffect || effect.allowRecurse) {
  1889. if (effect.onTrigger) {
  1890. effect.onTrigger(extend({ effect }, debuggerEventExtraInfo));
  1891. }
  1892. if (effect.scheduler) {
  1893. effect.scheduler();
  1894. } else {
  1895. effect.run();
  1896. }
  1897. }
  1898. }
  1899. const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  1900. const builtInSymbols = new Set(
  1901. /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  1902. );
  1903. const get$1 = /* @__PURE__ */ createGetter();
  1904. const shallowGet = /* @__PURE__ */ createGetter(false, true);
  1905. const readonlyGet = /* @__PURE__ */ createGetter(true);
  1906. const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
  1907. const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
  1908. function createArrayInstrumentations() {
  1909. const instrumentations = {};
  1910. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  1911. instrumentations[key] = function(...args) {
  1912. const arr = toRaw(this);
  1913. for (let i = 0, l = this.length; i < l; i++) {
  1914. track(arr, "get", i + "");
  1915. }
  1916. const res = arr[key](...args);
  1917. if (res === -1 || res === false) {
  1918. return arr[key](...args.map(toRaw));
  1919. } else {
  1920. return res;
  1921. }
  1922. };
  1923. });
  1924. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  1925. instrumentations[key] = function(...args) {
  1926. pauseTracking();
  1927. const res = toRaw(this)[key].apply(this, args);
  1928. resetTracking();
  1929. return res;
  1930. };
  1931. });
  1932. return instrumentations;
  1933. }
  1934. function hasOwnProperty(key) {
  1935. const obj = toRaw(this);
  1936. track(obj, "has", key);
  1937. return obj.hasOwnProperty(key);
  1938. }
  1939. function createGetter(isReadonly2 = false, shallow = false) {
  1940. return function get2(target, key, receiver) {
  1941. if (key === "__v_isReactive") {
  1942. return !isReadonly2;
  1943. } else if (key === "__v_isReadonly") {
  1944. return isReadonly2;
  1945. } else if (key === "__v_isShallow") {
  1946. return shallow;
  1947. } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
  1948. return target;
  1949. }
  1950. const targetIsArray = isArray$1(target);
  1951. if (!isReadonly2) {
  1952. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  1953. return Reflect.get(arrayInstrumentations, key, receiver);
  1954. }
  1955. if (key === "hasOwnProperty") {
  1956. return hasOwnProperty;
  1957. }
  1958. }
  1959. const res = Reflect.get(target, key, receiver);
  1960. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1961. return res;
  1962. }
  1963. if (!isReadonly2) {
  1964. track(target, "get", key);
  1965. }
  1966. if (shallow) {
  1967. return res;
  1968. }
  1969. if (isRef(res)) {
  1970. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1971. }
  1972. if (isObject$1(res)) {
  1973. return isReadonly2 ? readonly(res) : reactive(res);
  1974. }
  1975. return res;
  1976. };
  1977. }
  1978. const set$1 = /* @__PURE__ */ createSetter();
  1979. const shallowSet = /* @__PURE__ */ createSetter(true);
  1980. function createSetter(shallow = false) {
  1981. return function set2(target, key, value, receiver) {
  1982. let oldValue = target[key];
  1983. if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
  1984. return false;
  1985. }
  1986. if (!shallow) {
  1987. if (!isShallow(value) && !isReadonly(value)) {
  1988. oldValue = toRaw(oldValue);
  1989. value = toRaw(value);
  1990. }
  1991. if (!isArray$1(target) && isRef(oldValue) && !isRef(value)) {
  1992. oldValue.value = value;
  1993. return true;
  1994. }
  1995. }
  1996. const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1997. const result = Reflect.set(target, key, value, receiver);
  1998. if (target === toRaw(receiver)) {
  1999. if (!hadKey) {
  2000. trigger(target, "add", key, value);
  2001. } else if (hasChanged(value, oldValue)) {
  2002. trigger(target, "set", key, value, oldValue);
  2003. }
  2004. }
  2005. return result;
  2006. };
  2007. }
  2008. function deleteProperty(target, key) {
  2009. const hadKey = hasOwn(target, key);
  2010. const oldValue = target[key];
  2011. const result = Reflect.deleteProperty(target, key);
  2012. if (result && hadKey) {
  2013. trigger(target, "delete", key, void 0, oldValue);
  2014. }
  2015. return result;
  2016. }
  2017. function has$1(target, key) {
  2018. const result = Reflect.has(target, key);
  2019. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  2020. track(target, "has", key);
  2021. }
  2022. return result;
  2023. }
  2024. function ownKeys(target) {
  2025. track(target, "iterate", isArray$1(target) ? "length" : ITERATE_KEY);
  2026. return Reflect.ownKeys(target);
  2027. }
  2028. const mutableHandlers = {
  2029. get: get$1,
  2030. set: set$1,
  2031. deleteProperty,
  2032. has: has$1,
  2033. ownKeys
  2034. };
  2035. const readonlyHandlers = {
  2036. get: readonlyGet,
  2037. set(target, key) {
  2038. {
  2039. warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
  2040. }
  2041. return true;
  2042. },
  2043. deleteProperty(target, key) {
  2044. {
  2045. warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
  2046. }
  2047. return true;
  2048. }
  2049. };
  2050. const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, {
  2051. get: shallowGet,
  2052. set: shallowSet
  2053. });
  2054. const shallowReadonlyHandlers = /* @__PURE__ */ extend({}, readonlyHandlers, {
  2055. get: shallowReadonlyGet
  2056. });
  2057. const toShallow = (value) => value;
  2058. const getProto = (v) => Reflect.getPrototypeOf(v);
  2059. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  2060. target = target[
  2061. "__v_raw"
  2062. /* ReactiveFlags.RAW */
  2063. ];
  2064. const rawTarget = toRaw(target);
  2065. const rawKey = toRaw(key);
  2066. if (!isReadonly2) {
  2067. if (key !== rawKey) {
  2068. track(rawTarget, "get", key);
  2069. }
  2070. track(rawTarget, "get", rawKey);
  2071. }
  2072. const { has: has2 } = getProto(rawTarget);
  2073. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2074. if (has2.call(rawTarget, key)) {
  2075. return wrap(target.get(key));
  2076. } else if (has2.call(rawTarget, rawKey)) {
  2077. return wrap(target.get(rawKey));
  2078. } else if (target !== rawTarget) {
  2079. target.get(key);
  2080. }
  2081. }
  2082. function has(key, isReadonly2 = false) {
  2083. const target = this[
  2084. "__v_raw"
  2085. /* ReactiveFlags.RAW */
  2086. ];
  2087. const rawTarget = toRaw(target);
  2088. const rawKey = toRaw(key);
  2089. if (!isReadonly2) {
  2090. if (key !== rawKey) {
  2091. track(rawTarget, "has", key);
  2092. }
  2093. track(rawTarget, "has", rawKey);
  2094. }
  2095. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  2096. }
  2097. function size(target, isReadonly2 = false) {
  2098. target = target[
  2099. "__v_raw"
  2100. /* ReactiveFlags.RAW */
  2101. ];
  2102. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  2103. return Reflect.get(target, "size", target);
  2104. }
  2105. function add(value) {
  2106. value = toRaw(value);
  2107. const target = toRaw(this);
  2108. const proto = getProto(target);
  2109. const hadKey = proto.has.call(target, value);
  2110. if (!hadKey) {
  2111. target.add(value);
  2112. trigger(target, "add", value, value);
  2113. }
  2114. return this;
  2115. }
  2116. function set$2(key, value) {
  2117. value = toRaw(value);
  2118. const target = toRaw(this);
  2119. const { has: has2, get: get2 } = getProto(target);
  2120. let hadKey = has2.call(target, key);
  2121. if (!hadKey) {
  2122. key = toRaw(key);
  2123. hadKey = has2.call(target, key);
  2124. } else {
  2125. checkIdentityKeys(target, has2, key);
  2126. }
  2127. const oldValue = get2.call(target, key);
  2128. target.set(key, value);
  2129. if (!hadKey) {
  2130. trigger(target, "add", key, value);
  2131. } else if (hasChanged(value, oldValue)) {
  2132. trigger(target, "set", key, value, oldValue);
  2133. }
  2134. return this;
  2135. }
  2136. function deleteEntry(key) {
  2137. const target = toRaw(this);
  2138. const { has: has2, get: get2 } = getProto(target);
  2139. let hadKey = has2.call(target, key);
  2140. if (!hadKey) {
  2141. key = toRaw(key);
  2142. hadKey = has2.call(target, key);
  2143. } else {
  2144. checkIdentityKeys(target, has2, key);
  2145. }
  2146. const oldValue = get2 ? get2.call(target, key) : void 0;
  2147. const result = target.delete(key);
  2148. if (hadKey) {
  2149. trigger(target, "delete", key, void 0, oldValue);
  2150. }
  2151. return result;
  2152. }
  2153. function clear() {
  2154. const target = toRaw(this);
  2155. const hadItems = target.size !== 0;
  2156. const oldTarget = isMap(target) ? new Map(target) : new Set(target);
  2157. const result = target.clear();
  2158. if (hadItems) {
  2159. trigger(target, "clear", void 0, void 0, oldTarget);
  2160. }
  2161. return result;
  2162. }
  2163. function createForEach(isReadonly2, isShallow2) {
  2164. return function forEach3(callback, thisArg) {
  2165. const observed = this;
  2166. const target = observed[
  2167. "__v_raw"
  2168. /* ReactiveFlags.RAW */
  2169. ];
  2170. const rawTarget = toRaw(target);
  2171. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2172. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  2173. return target.forEach((value, key) => {
  2174. return callback.call(thisArg, wrap(value), wrap(key), observed);
  2175. });
  2176. };
  2177. }
  2178. function createIterableMethod(method, isReadonly2, isShallow2) {
  2179. return function(...args) {
  2180. const target = this[
  2181. "__v_raw"
  2182. /* ReactiveFlags.RAW */
  2183. ];
  2184. const rawTarget = toRaw(target);
  2185. const targetIsMap = isMap(rawTarget);
  2186. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  2187. const isKeyOnly = method === "keys" && targetIsMap;
  2188. const innerIterator = target[method](...args);
  2189. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2190. !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
  2191. return {
  2192. // iterator protocol
  2193. next() {
  2194. const { value, done } = innerIterator.next();
  2195. return done ? { value, done } : {
  2196. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  2197. done
  2198. };
  2199. },
  2200. // iterable protocol
  2201. [Symbol.iterator]() {
  2202. return this;
  2203. }
  2204. };
  2205. };
  2206. }
  2207. function createReadonlyMethod(type) {
  2208. return function(...args) {
  2209. {
  2210. const key = args[0] ? `on key "${args[0]}" ` : ``;
  2211. console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
  2212. }
  2213. return type === "delete" ? false : this;
  2214. };
  2215. }
  2216. function createInstrumentations() {
  2217. const mutableInstrumentations2 = {
  2218. get(key) {
  2219. return get(this, key);
  2220. },
  2221. get size() {
  2222. return size(this);
  2223. },
  2224. has,
  2225. add,
  2226. set: set$2,
  2227. delete: deleteEntry,
  2228. clear,
  2229. forEach: createForEach(false, false)
  2230. };
  2231. const shallowInstrumentations2 = {
  2232. get(key) {
  2233. return get(this, key, false, true);
  2234. },
  2235. get size() {
  2236. return size(this);
  2237. },
  2238. has,
  2239. add,
  2240. set: set$2,
  2241. delete: deleteEntry,
  2242. clear,
  2243. forEach: createForEach(false, true)
  2244. };
  2245. const readonlyInstrumentations2 = {
  2246. get(key) {
  2247. return get(this, key, true);
  2248. },
  2249. get size() {
  2250. return size(this, true);
  2251. },
  2252. has(key) {
  2253. return has.call(this, key, true);
  2254. },
  2255. add: createReadonlyMethod(
  2256. "add"
  2257. /* TriggerOpTypes.ADD */
  2258. ),
  2259. set: createReadonlyMethod(
  2260. "set"
  2261. /* TriggerOpTypes.SET */
  2262. ),
  2263. delete: createReadonlyMethod(
  2264. "delete"
  2265. /* TriggerOpTypes.DELETE */
  2266. ),
  2267. clear: createReadonlyMethod(
  2268. "clear"
  2269. /* TriggerOpTypes.CLEAR */
  2270. ),
  2271. forEach: createForEach(true, false)
  2272. };
  2273. const shallowReadonlyInstrumentations2 = {
  2274. get(key) {
  2275. return get(this, key, true, true);
  2276. },
  2277. get size() {
  2278. return size(this, true);
  2279. },
  2280. has(key) {
  2281. return has.call(this, key, true);
  2282. },
  2283. add: createReadonlyMethod(
  2284. "add"
  2285. /* TriggerOpTypes.ADD */
  2286. ),
  2287. set: createReadonlyMethod(
  2288. "set"
  2289. /* TriggerOpTypes.SET */
  2290. ),
  2291. delete: createReadonlyMethod(
  2292. "delete"
  2293. /* TriggerOpTypes.DELETE */
  2294. ),
  2295. clear: createReadonlyMethod(
  2296. "clear"
  2297. /* TriggerOpTypes.CLEAR */
  2298. ),
  2299. forEach: createForEach(true, true)
  2300. };
  2301. const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
  2302. iteratorMethods.forEach((method) => {
  2303. mutableInstrumentations2[method] = createIterableMethod(method, false, false);
  2304. readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
  2305. shallowInstrumentations2[method] = createIterableMethod(method, false, true);
  2306. shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true);
  2307. });
  2308. return [
  2309. mutableInstrumentations2,
  2310. readonlyInstrumentations2,
  2311. shallowInstrumentations2,
  2312. shallowReadonlyInstrumentations2
  2313. ];
  2314. }
  2315. const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();
  2316. function createInstrumentationGetter(isReadonly2, shallow) {
  2317. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  2318. return (target, key, receiver) => {
  2319. if (key === "__v_isReactive") {
  2320. return !isReadonly2;
  2321. } else if (key === "__v_isReadonly") {
  2322. return isReadonly2;
  2323. } else if (key === "__v_raw") {
  2324. return target;
  2325. }
  2326. return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
  2327. };
  2328. }
  2329. const mutableCollectionHandlers = {
  2330. get: /* @__PURE__ */ createInstrumentationGetter(false, false)
  2331. };
  2332. const shallowCollectionHandlers = {
  2333. get: /* @__PURE__ */ createInstrumentationGetter(false, true)
  2334. };
  2335. const readonlyCollectionHandlers = {
  2336. get: /* @__PURE__ */ createInstrumentationGetter(true, false)
  2337. };
  2338. const shallowReadonlyCollectionHandlers = {
  2339. get: /* @__PURE__ */ createInstrumentationGetter(true, true)
  2340. };
  2341. function checkIdentityKeys(target, has2, key) {
  2342. const rawKey = toRaw(key);
  2343. if (rawKey !== key && has2.call(target, rawKey)) {
  2344. const type = toRawType(target);
  2345. console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
  2346. }
  2347. }
  2348. const reactiveMap = /* @__PURE__ */ new WeakMap();
  2349. const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  2350. const readonlyMap = /* @__PURE__ */ new WeakMap();
  2351. const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  2352. function targetTypeMap(rawType) {
  2353. switch (rawType) {
  2354. case "Object":
  2355. case "Array":
  2356. return 1;
  2357. case "Map":
  2358. case "Set":
  2359. case "WeakMap":
  2360. case "WeakSet":
  2361. return 2;
  2362. default:
  2363. return 0;
  2364. }
  2365. }
  2366. function getTargetType(value) {
  2367. return value[
  2368. "__v_skip"
  2369. /* ReactiveFlags.SKIP */
  2370. ] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  2371. }
  2372. function reactive(target) {
  2373. if (isReadonly(target)) {
  2374. return target;
  2375. }
  2376. return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
  2377. }
  2378. function shallowReactive(target) {
  2379. return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
  2380. }
  2381. function readonly(target) {
  2382. return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
  2383. }
  2384. function shallowReadonly(target) {
  2385. return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
  2386. }
  2387. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  2388. if (!isObject$1(target)) {
  2389. {
  2390. console.warn(`value cannot be made reactive: ${String(target)}`);
  2391. }
  2392. return target;
  2393. }
  2394. if (target[
  2395. "__v_raw"
  2396. /* ReactiveFlags.RAW */
  2397. ] && !(isReadonly2 && target[
  2398. "__v_isReactive"
  2399. /* ReactiveFlags.IS_REACTIVE */
  2400. ])) {
  2401. return target;
  2402. }
  2403. const existingProxy = proxyMap.get(target);
  2404. if (existingProxy) {
  2405. return existingProxy;
  2406. }
  2407. const targetType = getTargetType(target);
  2408. if (targetType === 0) {
  2409. return target;
  2410. }
  2411. const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
  2412. proxyMap.set(target, proxy);
  2413. return proxy;
  2414. }
  2415. function isReactive(value) {
  2416. if (isReadonly(value)) {
  2417. return isReactive(value[
  2418. "__v_raw"
  2419. /* ReactiveFlags.RAW */
  2420. ]);
  2421. }
  2422. return !!(value && value[
  2423. "__v_isReactive"
  2424. /* ReactiveFlags.IS_REACTIVE */
  2425. ]);
  2426. }
  2427. function isReadonly(value) {
  2428. return !!(value && value[
  2429. "__v_isReadonly"
  2430. /* ReactiveFlags.IS_READONLY */
  2431. ]);
  2432. }
  2433. function isShallow(value) {
  2434. return !!(value && value[
  2435. "__v_isShallow"
  2436. /* ReactiveFlags.IS_SHALLOW */
  2437. ]);
  2438. }
  2439. function isProxy(value) {
  2440. return isReactive(value) || isReadonly(value);
  2441. }
  2442. function toRaw(observed) {
  2443. const raw = observed && observed[
  2444. "__v_raw"
  2445. /* ReactiveFlags.RAW */
  2446. ];
  2447. return raw ? toRaw(raw) : observed;
  2448. }
  2449. function markRaw(value) {
  2450. def(value, "__v_skip", true);
  2451. return value;
  2452. }
  2453. const toReactive = (value) => isObject$1(value) ? reactive(value) : value;
  2454. const toReadonly = (value) => isObject$1(value) ? readonly(value) : value;
  2455. function trackRefValue(ref2) {
  2456. if (shouldTrack && activeEffect) {
  2457. ref2 = toRaw(ref2);
  2458. {
  2459. trackEffects(ref2.dep || (ref2.dep = createDep()), {
  2460. target: ref2,
  2461. type: "get",
  2462. key: "value"
  2463. });
  2464. }
  2465. }
  2466. }
  2467. function triggerRefValue(ref2, newVal) {
  2468. ref2 = toRaw(ref2);
  2469. const dep = ref2.dep;
  2470. if (dep) {
  2471. {
  2472. triggerEffects(dep, {
  2473. target: ref2,
  2474. type: "set",
  2475. key: "value",
  2476. newValue: newVal
  2477. });
  2478. }
  2479. }
  2480. }
  2481. function isRef(r) {
  2482. return !!(r && r.__v_isRef === true);
  2483. }
  2484. function ref(value) {
  2485. return createRef(value, false);
  2486. }
  2487. function createRef(rawValue, shallow) {
  2488. if (isRef(rawValue)) {
  2489. return rawValue;
  2490. }
  2491. return new RefImpl(rawValue, shallow);
  2492. }
  2493. class RefImpl {
  2494. constructor(value, __v_isShallow) {
  2495. this.__v_isShallow = __v_isShallow;
  2496. this.dep = void 0;
  2497. this.__v_isRef = true;
  2498. this._rawValue = __v_isShallow ? value : toRaw(value);
  2499. this._value = __v_isShallow ? value : toReactive(value);
  2500. }
  2501. get value() {
  2502. trackRefValue(this);
  2503. return this._value;
  2504. }
  2505. set value(newVal) {
  2506. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  2507. newVal = useDirectValue ? newVal : toRaw(newVal);
  2508. if (hasChanged(newVal, this._rawValue)) {
  2509. this._rawValue = newVal;
  2510. this._value = useDirectValue ? newVal : toReactive(newVal);
  2511. triggerRefValue(this, newVal);
  2512. }
  2513. }
  2514. }
  2515. function unref(ref2) {
  2516. return isRef(ref2) ? ref2.value : ref2;
  2517. }
  2518. const shallowUnwrapHandlers = {
  2519. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  2520. set: (target, key, value, receiver) => {
  2521. const oldValue = target[key];
  2522. if (isRef(oldValue) && !isRef(value)) {
  2523. oldValue.value = value;
  2524. return true;
  2525. } else {
  2526. return Reflect.set(target, key, value, receiver);
  2527. }
  2528. }
  2529. };
  2530. function proxyRefs(objectWithRefs) {
  2531. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  2532. }
  2533. var _a;
  2534. class ComputedRefImpl {
  2535. constructor(getter, _setter, isReadonly2, isSSR) {
  2536. this._setter = _setter;
  2537. this.dep = void 0;
  2538. this.__v_isRef = true;
  2539. this[_a] = false;
  2540. this._dirty = true;
  2541. this.effect = new ReactiveEffect(getter, () => {
  2542. if (!this._dirty) {
  2543. this._dirty = true;
  2544. triggerRefValue(this);
  2545. }
  2546. });
  2547. this.effect.computed = this;
  2548. this.effect.active = this._cacheable = !isSSR;
  2549. this[
  2550. "__v_isReadonly"
  2551. /* ReactiveFlags.IS_READONLY */
  2552. ] = isReadonly2;
  2553. }
  2554. get value() {
  2555. const self = toRaw(this);
  2556. trackRefValue(self);
  2557. if (self._dirty || !self._cacheable) {
  2558. self._dirty = false;
  2559. self._value = self.effect.run();
  2560. }
  2561. return self._value;
  2562. }
  2563. set value(newValue) {
  2564. this._setter(newValue);
  2565. }
  2566. }
  2567. _a = "__v_isReadonly";
  2568. function computed$1(getterOrOptions, debugOptions, isSSR = false) {
  2569. let getter;
  2570. let setter;
  2571. const onlyGetter = isFunction(getterOrOptions);
  2572. if (onlyGetter) {
  2573. getter = getterOrOptions;
  2574. setter = () => {
  2575. console.warn("Write operation failed: computed value is readonly");
  2576. };
  2577. } else {
  2578. getter = getterOrOptions.get;
  2579. setter = getterOrOptions.set;
  2580. }
  2581. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  2582. if (debugOptions && !isSSR) {
  2583. cRef.effect.onTrack = debugOptions.onTrack;
  2584. cRef.effect.onTrigger = debugOptions.onTrigger;
  2585. }
  2586. return cRef;
  2587. }
  2588. const stack = [];
  2589. function pushWarningContext(vnode) {
  2590. stack.push(vnode);
  2591. }
  2592. function popWarningContext() {
  2593. stack.pop();
  2594. }
  2595. function warn(msg, ...args) {
  2596. pauseTracking();
  2597. const instance = stack.length ? stack[stack.length - 1].component : null;
  2598. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2599. const trace = getComponentTrace();
  2600. if (appWarnHandler) {
  2601. callWithErrorHandling(appWarnHandler, instance, 11, [
  2602. msg + args.join(""),
  2603. instance && instance.proxy,
  2604. trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
  2605. trace
  2606. ]);
  2607. } else {
  2608. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2609. if (trace.length && // avoid spamming console during tests
  2610. true) {
  2611. warnArgs.push(`
  2612. `, ...formatTrace(trace));
  2613. }
  2614. console.warn(...warnArgs);
  2615. }
  2616. resetTracking();
  2617. }
  2618. function getComponentTrace() {
  2619. let currentVNode = stack[stack.length - 1];
  2620. if (!currentVNode) {
  2621. return [];
  2622. }
  2623. const normalizedStack = [];
  2624. while (currentVNode) {
  2625. const last = normalizedStack[0];
  2626. if (last && last.vnode === currentVNode) {
  2627. last.recurseCount++;
  2628. } else {
  2629. normalizedStack.push({
  2630. vnode: currentVNode,
  2631. recurseCount: 0
  2632. });
  2633. }
  2634. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2635. currentVNode = parentInstance && parentInstance.vnode;
  2636. }
  2637. return normalizedStack;
  2638. }
  2639. function formatTrace(trace) {
  2640. const logs = [];
  2641. trace.forEach((entry, i) => {
  2642. logs.push(...i === 0 ? [] : [`
  2643. `], ...formatTraceEntry(entry));
  2644. });
  2645. return logs;
  2646. }
  2647. function formatTraceEntry({ vnode, recurseCount }) {
  2648. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2649. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2650. const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
  2651. const close = `>` + postfix;
  2652. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2653. }
  2654. function formatProps(props2) {
  2655. const res = [];
  2656. const keys = Object.keys(props2);
  2657. keys.slice(0, 3).forEach((key) => {
  2658. res.push(...formatProp(key, props2[key]));
  2659. });
  2660. if (keys.length > 3) {
  2661. res.push(` ...`);
  2662. }
  2663. return res;
  2664. }
  2665. function formatProp(key, value, raw) {
  2666. if (isString(value)) {
  2667. value = JSON.stringify(value);
  2668. return raw ? value : [`${key}=${value}`];
  2669. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  2670. return raw ? value : [`${key}=${value}`];
  2671. } else if (isRef(value)) {
  2672. value = formatProp(key, toRaw(value.value), true);
  2673. return raw ? value : [`${key}=Ref<`, value, `>`];
  2674. } else if (isFunction(value)) {
  2675. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  2676. } else {
  2677. value = toRaw(value);
  2678. return raw ? value : [`${key}=`, value];
  2679. }
  2680. }
  2681. const ErrorTypeStrings = {
  2682. [
  2683. "sp"
  2684. /* LifecycleHooks.SERVER_PREFETCH */
  2685. ]: "serverPrefetch hook",
  2686. [
  2687. "bc"
  2688. /* LifecycleHooks.BEFORE_CREATE */
  2689. ]: "beforeCreate hook",
  2690. [
  2691. "c"
  2692. /* LifecycleHooks.CREATED */
  2693. ]: "created hook",
  2694. [
  2695. "bm"
  2696. /* LifecycleHooks.BEFORE_MOUNT */
  2697. ]: "beforeMount hook",
  2698. [
  2699. "m"
  2700. /* LifecycleHooks.MOUNTED */
  2701. ]: "mounted hook",
  2702. [
  2703. "bu"
  2704. /* LifecycleHooks.BEFORE_UPDATE */
  2705. ]: "beforeUpdate hook",
  2706. [
  2707. "u"
  2708. /* LifecycleHooks.UPDATED */
  2709. ]: "updated",
  2710. [
  2711. "bum"
  2712. /* LifecycleHooks.BEFORE_UNMOUNT */
  2713. ]: "beforeUnmount hook",
  2714. [
  2715. "um"
  2716. /* LifecycleHooks.UNMOUNTED */
  2717. ]: "unmounted hook",
  2718. [
  2719. "a"
  2720. /* LifecycleHooks.ACTIVATED */
  2721. ]: "activated hook",
  2722. [
  2723. "da"
  2724. /* LifecycleHooks.DEACTIVATED */
  2725. ]: "deactivated hook",
  2726. [
  2727. "ec"
  2728. /* LifecycleHooks.ERROR_CAPTURED */
  2729. ]: "errorCaptured hook",
  2730. [
  2731. "rtc"
  2732. /* LifecycleHooks.RENDER_TRACKED */
  2733. ]: "renderTracked hook",
  2734. [
  2735. "rtg"
  2736. /* LifecycleHooks.RENDER_TRIGGERED */
  2737. ]: "renderTriggered hook",
  2738. [
  2739. 0
  2740. /* ErrorCodes.SETUP_FUNCTION */
  2741. ]: "setup function",
  2742. [
  2743. 1
  2744. /* ErrorCodes.RENDER_FUNCTION */
  2745. ]: "render function",
  2746. [
  2747. 2
  2748. /* ErrorCodes.WATCH_GETTER */
  2749. ]: "watcher getter",
  2750. [
  2751. 3
  2752. /* ErrorCodes.WATCH_CALLBACK */
  2753. ]: "watcher callback",
  2754. [
  2755. 4
  2756. /* ErrorCodes.WATCH_CLEANUP */
  2757. ]: "watcher cleanup function",
  2758. [
  2759. 5
  2760. /* ErrorCodes.NATIVE_EVENT_HANDLER */
  2761. ]: "native event handler",
  2762. [
  2763. 6
  2764. /* ErrorCodes.COMPONENT_EVENT_HANDLER */
  2765. ]: "component event handler",
  2766. [
  2767. 7
  2768. /* ErrorCodes.VNODE_HOOK */
  2769. ]: "vnode hook",
  2770. [
  2771. 8
  2772. /* ErrorCodes.DIRECTIVE_HOOK */
  2773. ]: "directive hook",
  2774. [
  2775. 9
  2776. /* ErrorCodes.TRANSITION_HOOK */
  2777. ]: "transition hook",
  2778. [
  2779. 10
  2780. /* ErrorCodes.APP_ERROR_HANDLER */
  2781. ]: "app errorHandler",
  2782. [
  2783. 11
  2784. /* ErrorCodes.APP_WARN_HANDLER */
  2785. ]: "app warnHandler",
  2786. [
  2787. 12
  2788. /* ErrorCodes.FUNCTION_REF */
  2789. ]: "ref function",
  2790. [
  2791. 13
  2792. /* ErrorCodes.ASYNC_COMPONENT_LOADER */
  2793. ]: "async component loader",
  2794. [
  2795. 14
  2796. /* ErrorCodes.SCHEDULER */
  2797. ]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
  2798. };
  2799. function callWithErrorHandling(fn, instance, type, args) {
  2800. let res;
  2801. try {
  2802. res = args ? fn(...args) : fn();
  2803. } catch (err) {
  2804. handleError(err, instance, type);
  2805. }
  2806. return res;
  2807. }
  2808. function callWithAsyncErrorHandling(fn, instance, type, args) {
  2809. if (isFunction(fn)) {
  2810. const res = callWithErrorHandling(fn, instance, type, args);
  2811. if (res && isPromise(res)) {
  2812. res.catch((err) => {
  2813. handleError(err, instance, type);
  2814. });
  2815. }
  2816. return res;
  2817. }
  2818. const values = [];
  2819. for (let i = 0; i < fn.length; i++) {
  2820. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  2821. }
  2822. return values;
  2823. }
  2824. function handleError(err, instance, type, throwInDev = true) {
  2825. const contextVNode = instance ? instance.vnode : null;
  2826. if (instance) {
  2827. let cur = instance.parent;
  2828. const exposedInstance = instance.proxy;
  2829. const errorInfo = ErrorTypeStrings[type] || type;
  2830. while (cur) {
  2831. const errorCapturedHooks = cur.ec;
  2832. if (errorCapturedHooks) {
  2833. for (let i = 0; i < errorCapturedHooks.length; i++) {
  2834. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  2835. return;
  2836. }
  2837. }
  2838. }
  2839. cur = cur.parent;
  2840. }
  2841. const appErrorHandler = instance.appContext.config.errorHandler;
  2842. if (appErrorHandler) {
  2843. callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
  2844. return;
  2845. }
  2846. }
  2847. logError(err, type, contextVNode, throwInDev);
  2848. }
  2849. function logError(err, type, contextVNode, throwInDev = true) {
  2850. {
  2851. const info = ErrorTypeStrings[type] || type;
  2852. if (contextVNode) {
  2853. pushWarningContext(contextVNode);
  2854. }
  2855. warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  2856. if (contextVNode) {
  2857. popWarningContext();
  2858. }
  2859. if (throwInDev) {
  2860. console.error(err);
  2861. } else {
  2862. console.error(err);
  2863. }
  2864. }
  2865. }
  2866. let isFlushing = false;
  2867. let isFlushPending = false;
  2868. const queue = [];
  2869. let flushIndex = 0;
  2870. const pendingPostFlushCbs = [];
  2871. let activePostFlushCbs = null;
  2872. let postFlushIndex = 0;
  2873. const resolvedPromise = /* @__PURE__ */ Promise.resolve();
  2874. let currentFlushPromise = null;
  2875. const RECURSION_LIMIT = 100;
  2876. function nextTick$1(fn) {
  2877. const p2 = currentFlushPromise || resolvedPromise;
  2878. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2879. }
  2880. function findInsertionIndex(id) {
  2881. let start = flushIndex + 1;
  2882. let end = queue.length;
  2883. while (start < end) {
  2884. const middle = start + end >>> 1;
  2885. const middleJobId = getId(queue[middle]);
  2886. middleJobId < id ? start = middle + 1 : end = middle;
  2887. }
  2888. return start;
  2889. }
  2890. function queueJob(job) {
  2891. if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
  2892. if (job.id == null) {
  2893. queue.push(job);
  2894. } else {
  2895. queue.splice(findInsertionIndex(job.id), 0, job);
  2896. }
  2897. queueFlush();
  2898. }
  2899. }
  2900. function queueFlush() {
  2901. if (!isFlushing && !isFlushPending) {
  2902. isFlushPending = true;
  2903. currentFlushPromise = resolvedPromise.then(flushJobs);
  2904. }
  2905. }
  2906. function hasQueueJob(job) {
  2907. return queue.indexOf(job) > -1;
  2908. }
  2909. function invalidateJob(job) {
  2910. const i = queue.indexOf(job);
  2911. if (i > flushIndex) {
  2912. queue.splice(i, 1);
  2913. }
  2914. }
  2915. function queuePostFlushCb(cb) {
  2916. if (!isArray$1(cb)) {
  2917. if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
  2918. pendingPostFlushCbs.push(cb);
  2919. }
  2920. } else {
  2921. pendingPostFlushCbs.push(...cb);
  2922. }
  2923. queueFlush();
  2924. }
  2925. function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
  2926. {
  2927. seen = seen || /* @__PURE__ */ new Map();
  2928. }
  2929. for (; i < queue.length; i++) {
  2930. const cb = queue[i];
  2931. if (cb && cb.pre) {
  2932. if (checkRecursiveUpdates(seen, cb)) {
  2933. continue;
  2934. }
  2935. queue.splice(i, 1);
  2936. i--;
  2937. cb();
  2938. }
  2939. }
  2940. }
  2941. function flushPostFlushCbs(seen) {
  2942. if (pendingPostFlushCbs.length) {
  2943. const deduped = [...new Set(pendingPostFlushCbs)];
  2944. pendingPostFlushCbs.length = 0;
  2945. if (activePostFlushCbs) {
  2946. activePostFlushCbs.push(...deduped);
  2947. return;
  2948. }
  2949. activePostFlushCbs = deduped;
  2950. {
  2951. seen = seen || /* @__PURE__ */ new Map();
  2952. }
  2953. activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
  2954. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  2955. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  2956. continue;
  2957. }
  2958. activePostFlushCbs[postFlushIndex]();
  2959. }
  2960. activePostFlushCbs = null;
  2961. postFlushIndex = 0;
  2962. }
  2963. }
  2964. const getId = (job) => job.id == null ? Infinity : job.id;
  2965. const comparator = (a, b) => {
  2966. const diff2 = getId(a) - getId(b);
  2967. if (diff2 === 0) {
  2968. if (a.pre && !b.pre)
  2969. return -1;
  2970. if (b.pre && !a.pre)
  2971. return 1;
  2972. }
  2973. return diff2;
  2974. };
  2975. function flushJobs(seen) {
  2976. isFlushPending = false;
  2977. isFlushing = true;
  2978. {
  2979. seen = seen || /* @__PURE__ */ new Map();
  2980. }
  2981. queue.sort(comparator);
  2982. const check = (job) => checkRecursiveUpdates(seen, job);
  2983. try {
  2984. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2985. const job = queue[flushIndex];
  2986. if (job && job.active !== false) {
  2987. if (check(job)) {
  2988. continue;
  2989. }
  2990. callWithErrorHandling(
  2991. job,
  2992. null,
  2993. 14
  2994. /* ErrorCodes.SCHEDULER */
  2995. );
  2996. }
  2997. }
  2998. } finally {
  2999. flushIndex = 0;
  3000. queue.length = 0;
  3001. flushPostFlushCbs(seen);
  3002. isFlushing = false;
  3003. currentFlushPromise = null;
  3004. if (queue.length || pendingPostFlushCbs.length) {
  3005. flushJobs(seen);
  3006. }
  3007. }
  3008. }
  3009. function checkRecursiveUpdates(seen, fn) {
  3010. if (!seen.has(fn)) {
  3011. seen.set(fn, 1);
  3012. } else {
  3013. const count = seen.get(fn);
  3014. if (count > RECURSION_LIMIT) {
  3015. const instance = fn.ownerInstance;
  3016. const componentName = instance && getComponentName(instance.type);
  3017. warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`);
  3018. return true;
  3019. } else {
  3020. seen.set(fn, count + 1);
  3021. }
  3022. }
  3023. }
  3024. let devtools;
  3025. let buffer = [];
  3026. let devtoolsNotInstalled = false;
  3027. function emit$1(event, ...args) {
  3028. if (devtools) {
  3029. devtools.emit(event, ...args);
  3030. } else if (!devtoolsNotInstalled) {
  3031. buffer.push({ event, args });
  3032. }
  3033. }
  3034. function setDevtoolsHook(hook, target) {
  3035. var _a2, _b;
  3036. devtools = hook;
  3037. if (devtools) {
  3038. devtools.enabled = true;
  3039. buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
  3040. buffer = [];
  3041. } else if (
  3042. // handle late devtools injection - only do this if we are in an actual
  3043. // browser environment to avoid the timer handle stalling test runner exit
  3044. // (#4815)
  3045. typeof window !== "undefined" && // some envs mock window but not fully
  3046. // eslint-disable-next-line no-restricted-globals
  3047. window.HTMLElement && // also exclude jsdom
  3048. // eslint-disable-next-line no-restricted-globals
  3049. !((_b = (_a2 = window.navigator) === null || _a2 === void 0 ? void 0 : _a2.userAgent) === null || _b === void 0 ? void 0 : _b.includes("jsdom"))
  3050. ) {
  3051. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  3052. replay.push((newHook) => {
  3053. setDevtoolsHook(newHook, target);
  3054. });
  3055. setTimeout(() => {
  3056. if (!devtools) {
  3057. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  3058. devtoolsNotInstalled = true;
  3059. buffer = [];
  3060. }
  3061. }, 3e3);
  3062. } else {
  3063. devtoolsNotInstalled = true;
  3064. buffer = [];
  3065. }
  3066. }
  3067. function devtoolsInitApp(app, version2) {
  3068. emit$1("app:init", app, version2, {
  3069. Fragment,
  3070. Text: Text$1,
  3071. Comment,
  3072. Static
  3073. });
  3074. }
  3075. const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
  3076. "component:added"
  3077. /* DevtoolsHooks.COMPONENT_ADDED */
  3078. );
  3079. const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(
  3080. "component:updated"
  3081. /* DevtoolsHooks.COMPONENT_UPDATED */
  3082. );
  3083. const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
  3084. "component:removed"
  3085. /* DevtoolsHooks.COMPONENT_REMOVED */
  3086. );
  3087. const devtoolsComponentRemoved = (component) => {
  3088. if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  3089. !devtools.cleanupBuffer(component)) {
  3090. _devtoolsComponentRemoved(component);
  3091. }
  3092. };
  3093. function createDevtoolsComponentHook(hook) {
  3094. return (component) => {
  3095. emit$1(
  3096. hook,
  3097. component.appContext.app,
  3098. component.uid,
  3099. // fixed by xxxxxx
  3100. // 为 0 是 App,无 parent 是 Page 指向 App
  3101. component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,
  3102. component
  3103. );
  3104. };
  3105. }
  3106. const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3107. "perf:start"
  3108. /* DevtoolsHooks.PERFORMANCE_START */
  3109. );
  3110. const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3111. "perf:end"
  3112. /* DevtoolsHooks.PERFORMANCE_END */
  3113. );
  3114. function createDevtoolsPerformanceHook(hook) {
  3115. return (component, type, time) => {
  3116. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  3117. };
  3118. }
  3119. function devtoolsComponentEmit(component, event, params) {
  3120. emit$1("component:emit", component.appContext.app, component, event, params);
  3121. }
  3122. function emit(instance, event, ...rawArgs) {
  3123. if (instance.isUnmounted)
  3124. return;
  3125. const props2 = instance.vnode.props || EMPTY_OBJ;
  3126. {
  3127. const { emitsOptions, propsOptions: [propsOptions] } = instance;
  3128. if (emitsOptions) {
  3129. if (!(event in emitsOptions) && true) {
  3130. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  3131. warn(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`);
  3132. }
  3133. } else {
  3134. const validator = emitsOptions[event];
  3135. if (isFunction(validator)) {
  3136. const isValid = validator(...rawArgs);
  3137. if (!isValid) {
  3138. warn(`Invalid event arguments: event validation failed for event "${event}".`);
  3139. }
  3140. }
  3141. }
  3142. }
  3143. }
  3144. let args = rawArgs;
  3145. const isModelListener2 = event.startsWith("update:");
  3146. const modelArg = isModelListener2 && event.slice(7);
  3147. if (modelArg && modelArg in props2) {
  3148. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  3149. const { number: number2, trim: trim2 } = props2[modifiersKey] || EMPTY_OBJ;
  3150. if (trim2) {
  3151. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  3152. }
  3153. if (number2) {
  3154. args = rawArgs.map(looseToNumber);
  3155. }
  3156. }
  3157. {
  3158. devtoolsComponentEmit(instance, event, args);
  3159. }
  3160. {
  3161. const lowerCaseEvent = event.toLowerCase();
  3162. if (lowerCaseEvent !== event && props2[toHandlerKey(lowerCaseEvent)]) {
  3163. warn(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`);
  3164. }
  3165. }
  3166. let handlerName;
  3167. let handler = props2[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  3168. props2[handlerName = toHandlerKey(camelize(event))];
  3169. if (!handler && isModelListener2) {
  3170. handler = props2[handlerName = toHandlerKey(hyphenate(event))];
  3171. }
  3172. if (handler) {
  3173. callWithAsyncErrorHandling(handler, instance, 6, args);
  3174. }
  3175. const onceHandler = props2[handlerName + `Once`];
  3176. if (onceHandler) {
  3177. if (!instance.emitted) {
  3178. instance.emitted = {};
  3179. } else if (instance.emitted[handlerName]) {
  3180. return;
  3181. }
  3182. instance.emitted[handlerName] = true;
  3183. callWithAsyncErrorHandling(onceHandler, instance, 6, args);
  3184. }
  3185. }
  3186. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  3187. const cache = appContext.emitsCache;
  3188. const cached = cache.get(comp);
  3189. if (cached !== void 0) {
  3190. return cached;
  3191. }
  3192. const raw = comp.emits;
  3193. let normalized = {};
  3194. let hasExtends = false;
  3195. if (!isFunction(comp)) {
  3196. const extendEmits = (raw2) => {
  3197. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  3198. if (normalizedFromExtend) {
  3199. hasExtends = true;
  3200. extend(normalized, normalizedFromExtend);
  3201. }
  3202. };
  3203. if (!asMixin && appContext.mixins.length) {
  3204. appContext.mixins.forEach(extendEmits);
  3205. }
  3206. if (comp.extends) {
  3207. extendEmits(comp.extends);
  3208. }
  3209. if (comp.mixins) {
  3210. comp.mixins.forEach(extendEmits);
  3211. }
  3212. }
  3213. if (!raw && !hasExtends) {
  3214. if (isObject$1(comp)) {
  3215. cache.set(comp, null);
  3216. }
  3217. return null;
  3218. }
  3219. if (isArray$1(raw)) {
  3220. raw.forEach((key) => normalized[key] = null);
  3221. } else {
  3222. extend(normalized, raw);
  3223. }
  3224. if (isObject$1(comp)) {
  3225. cache.set(comp, normalized);
  3226. }
  3227. return normalized;
  3228. }
  3229. function isEmitListener(options, key) {
  3230. if (!options || !isOn(key)) {
  3231. return false;
  3232. }
  3233. key = key.slice(2).replace(/Once$/, "");
  3234. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  3235. }
  3236. let currentRenderingInstance = null;
  3237. function setCurrentRenderingInstance(instance) {
  3238. const prev = currentRenderingInstance;
  3239. currentRenderingInstance = instance;
  3240. instance && instance.type.__scopeId || null;
  3241. return prev;
  3242. }
  3243. function provide(key, value) {
  3244. if (!currentInstance) {
  3245. {
  3246. warn(`provide() can only be used inside setup().`);
  3247. }
  3248. } else {
  3249. let provides = currentInstance.provides;
  3250. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  3251. if (parentProvides === provides) {
  3252. provides = currentInstance.provides = Object.create(parentProvides);
  3253. }
  3254. provides[key] = value;
  3255. if (currentInstance.type.mpType === "app") {
  3256. currentInstance.appContext.app.provide(key, value);
  3257. }
  3258. }
  3259. }
  3260. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  3261. const instance = currentInstance || currentRenderingInstance;
  3262. if (instance) {
  3263. const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
  3264. if (provides && key in provides) {
  3265. return provides[key];
  3266. } else if (arguments.length > 1) {
  3267. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
  3268. } else {
  3269. warn(`injection "${String(key)}" not found.`);
  3270. }
  3271. } else {
  3272. warn(`inject() can only be used inside setup() or functional components.`);
  3273. }
  3274. }
  3275. const INITIAL_WATCHER_VALUE = {};
  3276. function watch(source, cb, options) {
  3277. if (!isFunction(cb)) {
  3278. warn(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
  3279. }
  3280. return doWatch(source, cb, options);
  3281. }
  3282. function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
  3283. if (!cb) {
  3284. if (immediate !== void 0) {
  3285. warn(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
  3286. }
  3287. if (deep !== void 0) {
  3288. warn(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
  3289. }
  3290. }
  3291. const warnInvalidSource = (s2) => {
  3292. warn(`Invalid watch source: `, s2, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
  3293. };
  3294. const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
  3295. let getter;
  3296. let forceTrigger = false;
  3297. let isMultiSource = false;
  3298. if (isRef(source)) {
  3299. getter = () => source.value;
  3300. forceTrigger = isShallow(source);
  3301. } else if (isReactive(source)) {
  3302. getter = () => source;
  3303. deep = true;
  3304. } else if (isArray$1(source)) {
  3305. isMultiSource = true;
  3306. forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2));
  3307. getter = () => source.map((s2) => {
  3308. if (isRef(s2)) {
  3309. return s2.value;
  3310. } else if (isReactive(s2)) {
  3311. return traverse(s2);
  3312. } else if (isFunction(s2)) {
  3313. return callWithErrorHandling(
  3314. s2,
  3315. instance,
  3316. 2
  3317. /* ErrorCodes.WATCH_GETTER */
  3318. );
  3319. } else {
  3320. warnInvalidSource(s2);
  3321. }
  3322. });
  3323. } else if (isFunction(source)) {
  3324. if (cb) {
  3325. getter = () => callWithErrorHandling(
  3326. source,
  3327. instance,
  3328. 2
  3329. /* ErrorCodes.WATCH_GETTER */
  3330. );
  3331. } else {
  3332. getter = () => {
  3333. if (instance && instance.isUnmounted) {
  3334. return;
  3335. }
  3336. if (cleanup) {
  3337. cleanup();
  3338. }
  3339. return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]);
  3340. };
  3341. }
  3342. } else {
  3343. getter = NOOP;
  3344. warnInvalidSource(source);
  3345. }
  3346. if (cb && deep) {
  3347. const baseGetter = getter;
  3348. getter = () => traverse(baseGetter());
  3349. }
  3350. let cleanup;
  3351. let onCleanup = (fn) => {
  3352. cleanup = effect.onStop = () => {
  3353. callWithErrorHandling(
  3354. fn,
  3355. instance,
  3356. 4
  3357. /* ErrorCodes.WATCH_CLEANUP */
  3358. );
  3359. };
  3360. };
  3361. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  3362. const job = () => {
  3363. if (!effect.active) {
  3364. return;
  3365. }
  3366. if (cb) {
  3367. const newValue = effect.run();
  3368. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
  3369. if (cleanup) {
  3370. cleanup();
  3371. }
  3372. callWithAsyncErrorHandling(cb, instance, 3, [
  3373. newValue,
  3374. // pass undefined as the old value when it's changed for the first time
  3375. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  3376. onCleanup
  3377. ]);
  3378. oldValue = newValue;
  3379. }
  3380. } else {
  3381. effect.run();
  3382. }
  3383. };
  3384. job.allowRecurse = !!cb;
  3385. let scheduler;
  3386. if (flush === "sync") {
  3387. scheduler = job;
  3388. } else if (flush === "post") {
  3389. scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);
  3390. } else {
  3391. job.pre = true;
  3392. if (instance)
  3393. job.id = instance.uid;
  3394. scheduler = () => queueJob(job);
  3395. }
  3396. const effect = new ReactiveEffect(getter, scheduler);
  3397. {
  3398. effect.onTrack = onTrack;
  3399. effect.onTrigger = onTrigger;
  3400. }
  3401. if (cb) {
  3402. if (immediate) {
  3403. job();
  3404. } else {
  3405. oldValue = effect.run();
  3406. }
  3407. } else if (flush === "post") {
  3408. queuePostRenderEffect$1(effect.run.bind(effect), instance && instance.suspense);
  3409. } else {
  3410. effect.run();
  3411. }
  3412. const unwatch = () => {
  3413. effect.stop();
  3414. if (instance && instance.scope) {
  3415. remove(instance.scope.effects, effect);
  3416. }
  3417. };
  3418. return unwatch;
  3419. }
  3420. function instanceWatch(source, value, options) {
  3421. const publicThis = this.proxy;
  3422. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  3423. let cb;
  3424. if (isFunction(value)) {
  3425. cb = value;
  3426. } else {
  3427. cb = value.handler;
  3428. options = value;
  3429. }
  3430. const cur = currentInstance;
  3431. setCurrentInstance(this);
  3432. const res = doWatch(getter, cb.bind(publicThis), options);
  3433. if (cur) {
  3434. setCurrentInstance(cur);
  3435. } else {
  3436. unsetCurrentInstance();
  3437. }
  3438. return res;
  3439. }
  3440. function createPathGetter(ctx, path) {
  3441. const segments = path.split(".");
  3442. return () => {
  3443. let cur = ctx;
  3444. for (let i = 0; i < segments.length && cur; i++) {
  3445. cur = cur[segments[i]];
  3446. }
  3447. return cur;
  3448. };
  3449. }
  3450. function traverse(value, seen) {
  3451. if (!isObject$1(value) || value[
  3452. "__v_skip"
  3453. /* ReactiveFlags.SKIP */
  3454. ]) {
  3455. return value;
  3456. }
  3457. seen = seen || /* @__PURE__ */ new Set();
  3458. if (seen.has(value)) {
  3459. return value;
  3460. }
  3461. seen.add(value);
  3462. if (isRef(value)) {
  3463. traverse(value.value, seen);
  3464. } else if (isArray$1(value)) {
  3465. for (let i = 0; i < value.length; i++) {
  3466. traverse(value[i], seen);
  3467. }
  3468. } else if (isSet(value) || isMap(value)) {
  3469. value.forEach((v) => {
  3470. traverse(v, seen);
  3471. });
  3472. } else if (isPlainObject$1(value)) {
  3473. for (const key in value) {
  3474. traverse(value[key], seen);
  3475. }
  3476. }
  3477. return value;
  3478. }
  3479. function defineComponent(options) {
  3480. return isFunction(options) ? { setup: options, name: options.name } : options;
  3481. }
  3482. const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  3483. function onActivated(hook, target) {
  3484. registerKeepAliveHook(hook, "a", target);
  3485. }
  3486. function onDeactivated(hook, target) {
  3487. registerKeepAliveHook(hook, "da", target);
  3488. }
  3489. function registerKeepAliveHook(hook, type, target = currentInstance) {
  3490. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3491. let current = target;
  3492. while (current) {
  3493. if (current.isDeactivated) {
  3494. return;
  3495. }
  3496. current = current.parent;
  3497. }
  3498. return hook();
  3499. });
  3500. injectHook(type, wrappedHook, target);
  3501. if (target) {
  3502. let current = target.parent;
  3503. while (current && current.parent) {
  3504. if (isKeepAlive(current.parent.vnode)) {
  3505. injectToKeepAliveRoot(wrappedHook, type, target, current);
  3506. }
  3507. current = current.parent;
  3508. }
  3509. }
  3510. }
  3511. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  3512. const injected = injectHook(
  3513. type,
  3514. hook,
  3515. keepAliveRoot,
  3516. true
  3517. /* prepend */
  3518. );
  3519. onUnmounted(() => {
  3520. remove(keepAliveRoot[type], injected);
  3521. }, target);
  3522. }
  3523. function injectHook(type, hook, target = currentInstance, prepend = false) {
  3524. if (target) {
  3525. if (isRootHook(type)) {
  3526. target = target.root;
  3527. }
  3528. const hooks = target[type] || (target[type] = []);
  3529. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3530. if (target.isUnmounted) {
  3531. return;
  3532. }
  3533. pauseTracking();
  3534. setCurrentInstance(target);
  3535. const res = callWithAsyncErrorHandling(hook, target, type, args);
  3536. unsetCurrentInstance();
  3537. resetTracking();
  3538. return res;
  3539. });
  3540. if (prepend) {
  3541. hooks.unshift(wrappedHook);
  3542. } else {
  3543. hooks.push(wrappedHook);
  3544. }
  3545. return wrappedHook;
  3546. } else {
  3547. const apiName = toHandlerKey((ErrorTypeStrings[type] || type.replace(/^on/, "")).replace(/ hook$/, ""));
  3548. warn(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().`);
  3549. }
  3550. }
  3551. const createHook$1 = (lifecycle) => (hook, target = currentInstance) => (
  3552. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  3553. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  3554. );
  3555. const onBeforeMount = createHook$1(
  3556. "bm"
  3557. /* LifecycleHooks.BEFORE_MOUNT */
  3558. );
  3559. const onMounted = createHook$1(
  3560. "m"
  3561. /* LifecycleHooks.MOUNTED */
  3562. );
  3563. const onBeforeUpdate = createHook$1(
  3564. "bu"
  3565. /* LifecycleHooks.BEFORE_UPDATE */
  3566. );
  3567. const onUpdated = createHook$1(
  3568. "u"
  3569. /* LifecycleHooks.UPDATED */
  3570. );
  3571. const onBeforeUnmount = createHook$1(
  3572. "bum"
  3573. /* LifecycleHooks.BEFORE_UNMOUNT */
  3574. );
  3575. const onUnmounted = createHook$1(
  3576. "um"
  3577. /* LifecycleHooks.UNMOUNTED */
  3578. );
  3579. const onServerPrefetch = createHook$1(
  3580. "sp"
  3581. /* LifecycleHooks.SERVER_PREFETCH */
  3582. );
  3583. const onRenderTriggered = createHook$1(
  3584. "rtg"
  3585. /* LifecycleHooks.RENDER_TRIGGERED */
  3586. );
  3587. const onRenderTracked = createHook$1(
  3588. "rtc"
  3589. /* LifecycleHooks.RENDER_TRACKED */
  3590. );
  3591. function onErrorCaptured(hook, target = currentInstance) {
  3592. injectHook("ec", hook, target);
  3593. }
  3594. function validateDirectiveName(name) {
  3595. if (isBuiltInDirective(name)) {
  3596. warn("Do not use built-in directive ids as custom directive id: " + name);
  3597. }
  3598. }
  3599. const COMPONENTS = "components";
  3600. function resolveComponent(name, maybeSelfReference) {
  3601. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  3602. }
  3603. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  3604. const instance = currentRenderingInstance || currentInstance;
  3605. if (instance) {
  3606. const Component2 = instance.type;
  3607. if (type === COMPONENTS) {
  3608. const selfName = getComponentName(
  3609. Component2,
  3610. false
  3611. /* do not include inferred name to avoid breaking existing code */
  3612. );
  3613. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  3614. return Component2;
  3615. }
  3616. }
  3617. const res = (
  3618. // local registration
  3619. // check instance[type] first which is resolved for options API
  3620. resolve(instance[type] || Component2[type], name) || // global registration
  3621. resolve(instance.appContext[type], name)
  3622. );
  3623. if (!res && maybeSelfReference) {
  3624. return Component2;
  3625. }
  3626. if (warnMissing && !res) {
  3627. const extra = type === COMPONENTS ? `
  3628. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  3629. warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  3630. }
  3631. return res;
  3632. } else {
  3633. warn(`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`);
  3634. }
  3635. }
  3636. function resolve(registry, name) {
  3637. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  3638. }
  3639. const getPublicInstance = (i) => {
  3640. if (!i)
  3641. return null;
  3642. if (isStatefulComponent(i))
  3643. return getExposeProxy(i) || i.proxy;
  3644. return getPublicInstance(i.parent);
  3645. };
  3646. const publicPropertiesMap = (
  3647. // Move PURE marker to new line to workaround compiler discarding it
  3648. // due to type annotation
  3649. /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
  3650. $: (i) => i,
  3651. // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的
  3652. // $el: i => i.vnode.el,
  3653. $el: (i) => i.__$el || (i.__$el = {}),
  3654. $data: (i) => i.data,
  3655. $props: (i) => shallowReadonly(i.props),
  3656. $attrs: (i) => shallowReadonly(i.attrs),
  3657. $slots: (i) => shallowReadonly(i.slots),
  3658. $refs: (i) => shallowReadonly(i.refs),
  3659. $parent: (i) => getPublicInstance(i.parent),
  3660. $root: (i) => getPublicInstance(i.root),
  3661. $emit: (i) => i.emit,
  3662. $options: (i) => resolveMergedOptions(i),
  3663. $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
  3664. // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx
  3665. $watch: (i) => instanceWatch.bind(i)
  3666. })
  3667. );
  3668. const isReservedPrefix = (key) => key === "_" || key === "$";
  3669. const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  3670. const PublicInstanceProxyHandlers = {
  3671. get({ _: instance }, key) {
  3672. const { ctx, setupState, data, props: props2, accessCache, type, appContext } = instance;
  3673. if (key === "__isVue") {
  3674. return true;
  3675. }
  3676. let normalizedProps;
  3677. if (key[0] !== "$") {
  3678. const n2 = accessCache[key];
  3679. if (n2 !== void 0) {
  3680. switch (n2) {
  3681. case 1:
  3682. return setupState[key];
  3683. case 2:
  3684. return data[key];
  3685. case 4:
  3686. return ctx[key];
  3687. case 3:
  3688. return props2[key];
  3689. }
  3690. } else if (hasSetupBinding(setupState, key)) {
  3691. accessCache[key] = 1;
  3692. return setupState[key];
  3693. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3694. accessCache[key] = 2;
  3695. return data[key];
  3696. } else if (
  3697. // only cache other properties when instance has declared (thus stable)
  3698. // props
  3699. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  3700. ) {
  3701. accessCache[key] = 3;
  3702. return props2[key];
  3703. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3704. accessCache[key] = 4;
  3705. return ctx[key];
  3706. } else if (shouldCacheAccess) {
  3707. accessCache[key] = 0;
  3708. }
  3709. }
  3710. const publicGetter = publicPropertiesMap[key];
  3711. let cssModule, globalProperties;
  3712. if (publicGetter) {
  3713. if (key === "$attrs") {
  3714. track(instance, "get", key);
  3715. }
  3716. return publicGetter(instance);
  3717. } else if (
  3718. // css module (injected by vue-loader)
  3719. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  3720. ) {
  3721. return cssModule;
  3722. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3723. accessCache[key] = 4;
  3724. return ctx[key];
  3725. } else if (
  3726. // global properties
  3727. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  3728. ) {
  3729. {
  3730. return globalProperties[key];
  3731. }
  3732. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  3733. // to infinite warning loop
  3734. key.indexOf("__v") !== 0)) {
  3735. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  3736. warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);
  3737. } else if (instance === currentRenderingInstance) {
  3738. warn(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
  3739. }
  3740. }
  3741. },
  3742. set({ _: instance }, key, value) {
  3743. const { data, setupState, ctx } = instance;
  3744. if (hasSetupBinding(setupState, key)) {
  3745. setupState[key] = value;
  3746. return true;
  3747. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  3748. warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  3749. return false;
  3750. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3751. data[key] = value;
  3752. return true;
  3753. } else if (hasOwn(instance.props, key)) {
  3754. warn(`Attempting to mutate prop "${key}". Props are readonly.`);
  3755. return false;
  3756. }
  3757. if (key[0] === "$" && key.slice(1) in instance) {
  3758. warn(`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`);
  3759. return false;
  3760. } else {
  3761. if (key in instance.appContext.config.globalProperties) {
  3762. Object.defineProperty(ctx, key, {
  3763. enumerable: true,
  3764. configurable: true,
  3765. value
  3766. });
  3767. } else {
  3768. ctx[key] = value;
  3769. }
  3770. }
  3771. return true;
  3772. },
  3773. has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
  3774. let normalizedProps;
  3775. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
  3776. },
  3777. defineProperty(target, key, descriptor) {
  3778. if (descriptor.get != null) {
  3779. target._.accessCache[key] = 0;
  3780. } else if (hasOwn(descriptor, "value")) {
  3781. this.set(target, key, descriptor.value, null);
  3782. }
  3783. return Reflect.defineProperty(target, key, descriptor);
  3784. }
  3785. };
  3786. {
  3787. PublicInstanceProxyHandlers.ownKeys = (target) => {
  3788. warn(`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`);
  3789. return Reflect.ownKeys(target);
  3790. };
  3791. }
  3792. function createDevRenderContext(instance) {
  3793. const target = {};
  3794. Object.defineProperty(target, `_`, {
  3795. configurable: true,
  3796. enumerable: false,
  3797. get: () => instance
  3798. });
  3799. Object.keys(publicPropertiesMap).forEach((key) => {
  3800. Object.defineProperty(target, key, {
  3801. configurable: true,
  3802. enumerable: false,
  3803. get: () => publicPropertiesMap[key](instance),
  3804. // intercepted by the proxy so no need for implementation,
  3805. // but needed to prevent set errors
  3806. set: NOOP
  3807. });
  3808. });
  3809. return target;
  3810. }
  3811. function exposePropsOnRenderContext(instance) {
  3812. const { ctx, propsOptions: [propsOptions] } = instance;
  3813. if (propsOptions) {
  3814. Object.keys(propsOptions).forEach((key) => {
  3815. Object.defineProperty(ctx, key, {
  3816. enumerable: true,
  3817. configurable: true,
  3818. get: () => instance.props[key],
  3819. set: NOOP
  3820. });
  3821. });
  3822. }
  3823. }
  3824. function exposeSetupStateOnRenderContext(instance) {
  3825. const { ctx, setupState } = instance;
  3826. Object.keys(toRaw(setupState)).forEach((key) => {
  3827. if (!setupState.__isScriptSetup) {
  3828. if (isReservedPrefix(key[0])) {
  3829. warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
  3830. return;
  3831. }
  3832. Object.defineProperty(ctx, key, {
  3833. enumerable: true,
  3834. configurable: true,
  3835. get: () => setupState[key],
  3836. set: NOOP
  3837. });
  3838. }
  3839. });
  3840. }
  3841. function createDuplicateChecker() {
  3842. const cache = /* @__PURE__ */ Object.create(null);
  3843. return (type, key) => {
  3844. if (cache[key]) {
  3845. warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
  3846. } else {
  3847. cache[key] = type;
  3848. }
  3849. };
  3850. }
  3851. let shouldCacheAccess = true;
  3852. function applyOptions$1(instance) {
  3853. const options = resolveMergedOptions(instance);
  3854. const publicThis = instance.proxy;
  3855. const ctx = instance.ctx;
  3856. shouldCacheAccess = false;
  3857. if (options.beforeCreate) {
  3858. callHook$1(
  3859. options.beforeCreate,
  3860. instance,
  3861. "bc"
  3862. /* LifecycleHooks.BEFORE_CREATE */
  3863. );
  3864. }
  3865. const {
  3866. // state
  3867. data: dataOptions,
  3868. computed: computedOptions,
  3869. methods,
  3870. watch: watchOptions,
  3871. provide: provideOptions,
  3872. inject: injectOptions,
  3873. // lifecycle
  3874. created,
  3875. beforeMount,
  3876. mounted,
  3877. beforeUpdate,
  3878. updated,
  3879. activated,
  3880. deactivated,
  3881. beforeDestroy,
  3882. beforeUnmount,
  3883. destroyed,
  3884. unmounted,
  3885. render,
  3886. renderTracked,
  3887. renderTriggered,
  3888. errorCaptured,
  3889. serverPrefetch,
  3890. // public API
  3891. expose,
  3892. inheritAttrs,
  3893. // assets
  3894. components,
  3895. directives,
  3896. filters
  3897. } = options;
  3898. const checkDuplicateProperties = createDuplicateChecker();
  3899. {
  3900. const [propsOptions] = instance.propsOptions;
  3901. if (propsOptions) {
  3902. for (const key in propsOptions) {
  3903. checkDuplicateProperties("Props", key);
  3904. }
  3905. }
  3906. }
  3907. if (injectOptions) {
  3908. resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);
  3909. }
  3910. if (methods) {
  3911. for (const key in methods) {
  3912. const methodHandler = methods[key];
  3913. if (isFunction(methodHandler)) {
  3914. {
  3915. Object.defineProperty(ctx, key, {
  3916. value: methodHandler.bind(publicThis),
  3917. configurable: true,
  3918. enumerable: true,
  3919. writable: true
  3920. });
  3921. }
  3922. {
  3923. checkDuplicateProperties("Methods", key);
  3924. }
  3925. } else {
  3926. warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`);
  3927. }
  3928. }
  3929. }
  3930. if (dataOptions) {
  3931. if (!isFunction(dataOptions)) {
  3932. warn(`The data option must be a function. Plain object usage is no longer supported.`);
  3933. }
  3934. const data = dataOptions.call(publicThis, publicThis);
  3935. if (isPromise(data)) {
  3936. warn(`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`);
  3937. }
  3938. if (!isObject$1(data)) {
  3939. warn(`data() should return an object.`);
  3940. } else {
  3941. instance.data = reactive(data);
  3942. {
  3943. for (const key in data) {
  3944. checkDuplicateProperties("Data", key);
  3945. if (!isReservedPrefix(key[0])) {
  3946. Object.defineProperty(ctx, key, {
  3947. configurable: true,
  3948. enumerable: true,
  3949. get: () => data[key],
  3950. set: NOOP
  3951. });
  3952. }
  3953. }
  3954. }
  3955. }
  3956. }
  3957. shouldCacheAccess = true;
  3958. if (computedOptions) {
  3959. for (const key in computedOptions) {
  3960. const opt = computedOptions[key];
  3961. const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  3962. if (get2 === NOOP) {
  3963. warn(`Computed property "${key}" has no getter.`);
  3964. }
  3965. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
  3966. warn(`Write operation failed: computed property "${key}" is readonly.`);
  3967. };
  3968. const c = computed({
  3969. get: get2,
  3970. set: set2
  3971. });
  3972. Object.defineProperty(ctx, key, {
  3973. enumerable: true,
  3974. configurable: true,
  3975. get: () => c.value,
  3976. set: (v) => c.value = v
  3977. });
  3978. {
  3979. checkDuplicateProperties("Computed", key);
  3980. }
  3981. }
  3982. }
  3983. if (watchOptions) {
  3984. for (const key in watchOptions) {
  3985. createWatcher(watchOptions[key], ctx, publicThis, key);
  3986. }
  3987. }
  3988. {
  3989. if (provideOptions) {
  3990. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  3991. Reflect.ownKeys(provides).forEach((key) => {
  3992. provide(key, provides[key]);
  3993. });
  3994. }
  3995. }
  3996. {
  3997. if (created) {
  3998. callHook$1(
  3999. created,
  4000. instance,
  4001. "c"
  4002. /* LifecycleHooks.CREATED */
  4003. );
  4004. }
  4005. }
  4006. function registerLifecycleHook(register, hook) {
  4007. if (isArray$1(hook)) {
  4008. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  4009. } else if (hook) {
  4010. register(hook.bind(publicThis));
  4011. }
  4012. }
  4013. registerLifecycleHook(onBeforeMount, beforeMount);
  4014. registerLifecycleHook(onMounted, mounted);
  4015. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4016. registerLifecycleHook(onUpdated, updated);
  4017. registerLifecycleHook(onActivated, activated);
  4018. registerLifecycleHook(onDeactivated, deactivated);
  4019. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4020. registerLifecycleHook(onRenderTracked, renderTracked);
  4021. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4022. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4023. registerLifecycleHook(onUnmounted, unmounted);
  4024. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4025. if (isArray$1(expose)) {
  4026. if (expose.length) {
  4027. const exposed = instance.exposed || (instance.exposed = {});
  4028. expose.forEach((key) => {
  4029. Object.defineProperty(exposed, key, {
  4030. get: () => publicThis[key],
  4031. set: (val) => publicThis[key] = val
  4032. });
  4033. });
  4034. } else if (!instance.exposed) {
  4035. instance.exposed = {};
  4036. }
  4037. }
  4038. if (render && instance.render === NOOP) {
  4039. instance.render = render;
  4040. }
  4041. if (inheritAttrs != null) {
  4042. instance.inheritAttrs = inheritAttrs;
  4043. }
  4044. if (components)
  4045. instance.components = components;
  4046. if (directives)
  4047. instance.directives = directives;
  4048. if (instance.ctx.$onApplyOptions) {
  4049. instance.ctx.$onApplyOptions(options, instance, publicThis);
  4050. }
  4051. }
  4052. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
  4053. if (isArray$1(injectOptions)) {
  4054. injectOptions = normalizeInject(injectOptions);
  4055. }
  4056. for (const key in injectOptions) {
  4057. const opt = injectOptions[key];
  4058. let injected;
  4059. if (isObject$1(opt)) {
  4060. if ("default" in opt) {
  4061. injected = inject(
  4062. opt.from || key,
  4063. opt.default,
  4064. true
  4065. /* treat default function as factory */
  4066. );
  4067. } else {
  4068. injected = inject(opt.from || key);
  4069. }
  4070. } else {
  4071. injected = inject(opt);
  4072. }
  4073. if (isRef(injected)) {
  4074. if (unwrapRef) {
  4075. Object.defineProperty(ctx, key, {
  4076. enumerable: true,
  4077. configurable: true,
  4078. get: () => injected.value,
  4079. set: (v) => injected.value = v
  4080. });
  4081. } else {
  4082. {
  4083. warn(`injected property "${key}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`);
  4084. }
  4085. ctx[key] = injected;
  4086. }
  4087. } else {
  4088. ctx[key] = injected;
  4089. }
  4090. {
  4091. checkDuplicateProperties("Inject", key);
  4092. }
  4093. }
  4094. }
  4095. function callHook$1(hook, instance, type) {
  4096. callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
  4097. }
  4098. function createWatcher(raw, ctx, publicThis, key) {
  4099. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4100. if (isString(raw)) {
  4101. const handler = ctx[raw];
  4102. if (isFunction(handler)) {
  4103. watch(getter, handler);
  4104. } else {
  4105. warn(`Invalid watch handler specified by key "${raw}"`, handler);
  4106. }
  4107. } else if (isFunction(raw)) {
  4108. watch(getter, raw.bind(publicThis));
  4109. } else if (isObject$1(raw)) {
  4110. if (isArray$1(raw)) {
  4111. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  4112. } else {
  4113. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4114. if (isFunction(handler)) {
  4115. watch(getter, handler, raw);
  4116. } else {
  4117. warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4118. }
  4119. }
  4120. } else {
  4121. warn(`Invalid watch option: "${key}"`, raw);
  4122. }
  4123. }
  4124. function resolveMergedOptions(instance) {
  4125. const base = instance.type;
  4126. const { mixins, extends: extendsOptions } = base;
  4127. const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
  4128. const cached = cache.get(base);
  4129. let resolved;
  4130. if (cached) {
  4131. resolved = cached;
  4132. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  4133. {
  4134. resolved = base;
  4135. }
  4136. } else {
  4137. resolved = {};
  4138. if (globalMixins.length) {
  4139. globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
  4140. }
  4141. mergeOptions(resolved, base, optionMergeStrategies);
  4142. }
  4143. if (isObject$1(base)) {
  4144. cache.set(base, resolved);
  4145. }
  4146. return resolved;
  4147. }
  4148. function mergeOptions(to, from, strats, asMixin = false) {
  4149. const { mixins, extends: extendsOptions } = from;
  4150. if (extendsOptions) {
  4151. mergeOptions(to, extendsOptions, strats, true);
  4152. }
  4153. if (mixins) {
  4154. mixins.forEach((m) => mergeOptions(to, m, strats, true));
  4155. }
  4156. for (const key in from) {
  4157. if (asMixin && key === "expose") {
  4158. warn(`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`);
  4159. } else {
  4160. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  4161. to[key] = strat ? strat(to[key], from[key]) : from[key];
  4162. }
  4163. }
  4164. return to;
  4165. }
  4166. const internalOptionMergeStrats = {
  4167. data: mergeDataFn,
  4168. props: mergeObjectOptions,
  4169. emits: mergeObjectOptions,
  4170. // objects
  4171. methods: mergeObjectOptions,
  4172. computed: mergeObjectOptions,
  4173. // lifecycle
  4174. beforeCreate: mergeAsArray$1,
  4175. created: mergeAsArray$1,
  4176. beforeMount: mergeAsArray$1,
  4177. mounted: mergeAsArray$1,
  4178. beforeUpdate: mergeAsArray$1,
  4179. updated: mergeAsArray$1,
  4180. beforeDestroy: mergeAsArray$1,
  4181. beforeUnmount: mergeAsArray$1,
  4182. destroyed: mergeAsArray$1,
  4183. unmounted: mergeAsArray$1,
  4184. activated: mergeAsArray$1,
  4185. deactivated: mergeAsArray$1,
  4186. errorCaptured: mergeAsArray$1,
  4187. serverPrefetch: mergeAsArray$1,
  4188. // assets
  4189. components: mergeObjectOptions,
  4190. directives: mergeObjectOptions,
  4191. // watch
  4192. watch: mergeWatchOptions,
  4193. // provide / inject
  4194. provide: mergeDataFn,
  4195. inject: mergeInject
  4196. };
  4197. function mergeDataFn(to, from) {
  4198. if (!from) {
  4199. return to;
  4200. }
  4201. if (!to) {
  4202. return from;
  4203. }
  4204. return function mergedDataFn() {
  4205. return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
  4206. };
  4207. }
  4208. function mergeInject(to, from) {
  4209. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  4210. }
  4211. function normalizeInject(raw) {
  4212. if (isArray$1(raw)) {
  4213. const res = {};
  4214. for (let i = 0; i < raw.length; i++) {
  4215. res[raw[i]] = raw[i];
  4216. }
  4217. return res;
  4218. }
  4219. return raw;
  4220. }
  4221. function mergeAsArray$1(to, from) {
  4222. return to ? [...new Set([].concat(to, from))] : from;
  4223. }
  4224. function mergeObjectOptions(to, from) {
  4225. return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from;
  4226. }
  4227. function mergeWatchOptions(to, from) {
  4228. if (!to)
  4229. return from;
  4230. if (!from)
  4231. return to;
  4232. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  4233. for (const key in from) {
  4234. merged[key] = mergeAsArray$1(to[key], from[key]);
  4235. }
  4236. return merged;
  4237. }
  4238. function initProps$1(instance, rawProps, isStateful, isSSR = false) {
  4239. const props2 = {};
  4240. const attrs = {};
  4241. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4242. setFullProps(instance, rawProps, props2, attrs);
  4243. for (const key in instance.propsOptions[0]) {
  4244. if (!(key in props2)) {
  4245. props2[key] = void 0;
  4246. }
  4247. }
  4248. {
  4249. validateProps(rawProps || {}, props2, instance);
  4250. }
  4251. if (isStateful) {
  4252. instance.props = isSSR ? props2 : shallowReactive(props2);
  4253. } else {
  4254. if (!instance.type.props) {
  4255. instance.props = attrs;
  4256. } else {
  4257. instance.props = props2;
  4258. }
  4259. }
  4260. instance.attrs = attrs;
  4261. }
  4262. function isInHmrContext(instance) {
  4263. while (instance) {
  4264. if (instance.type.__hmrId)
  4265. return true;
  4266. instance = instance.parent;
  4267. }
  4268. }
  4269. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4270. const { props: props2, attrs, vnode: { patchFlag } } = instance;
  4271. const rawCurrentProps = toRaw(props2);
  4272. const [options] = instance.propsOptions;
  4273. let hasAttrsChanged = false;
  4274. if (
  4275. // always force full diff in dev
  4276. // - #1942 if hmr is enabled with sfc component
  4277. // - vite#872 non-sfc component used by sfc component
  4278. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  4279. ) {
  4280. if (patchFlag & 8) {
  4281. const propsToUpdate = instance.vnode.dynamicProps;
  4282. for (let i = 0; i < propsToUpdate.length; i++) {
  4283. let key = propsToUpdate[i];
  4284. if (isEmitListener(instance.emitsOptions, key)) {
  4285. continue;
  4286. }
  4287. const value = rawProps[key];
  4288. if (options) {
  4289. if (hasOwn(attrs, key)) {
  4290. if (value !== attrs[key]) {
  4291. attrs[key] = value;
  4292. hasAttrsChanged = true;
  4293. }
  4294. } else {
  4295. const camelizedKey = camelize(key);
  4296. props2[camelizedKey] = resolvePropValue(
  4297. options,
  4298. rawCurrentProps,
  4299. camelizedKey,
  4300. value,
  4301. instance,
  4302. false
  4303. /* isAbsent */
  4304. );
  4305. }
  4306. } else {
  4307. if (value !== attrs[key]) {
  4308. attrs[key] = value;
  4309. hasAttrsChanged = true;
  4310. }
  4311. }
  4312. }
  4313. }
  4314. } else {
  4315. if (setFullProps(instance, rawProps, props2, attrs)) {
  4316. hasAttrsChanged = true;
  4317. }
  4318. let kebabKey;
  4319. for (const key in rawCurrentProps) {
  4320. if (!rawProps || // for camelCase
  4321. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  4322. // and converted to camelCase (#955)
  4323. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  4324. if (options) {
  4325. if (rawPrevProps && // for camelCase
  4326. (rawPrevProps[key] !== void 0 || // for kebab-case
  4327. rawPrevProps[kebabKey] !== void 0)) {
  4328. props2[key] = resolvePropValue(
  4329. options,
  4330. rawCurrentProps,
  4331. key,
  4332. void 0,
  4333. instance,
  4334. true
  4335. /* isAbsent */
  4336. );
  4337. }
  4338. } else {
  4339. delete props2[key];
  4340. }
  4341. }
  4342. }
  4343. if (attrs !== rawCurrentProps) {
  4344. for (const key in attrs) {
  4345. if (!rawProps || !hasOwn(rawProps, key) && true) {
  4346. delete attrs[key];
  4347. hasAttrsChanged = true;
  4348. }
  4349. }
  4350. }
  4351. }
  4352. if (hasAttrsChanged) {
  4353. trigger(instance, "set", "$attrs");
  4354. }
  4355. {
  4356. validateProps(rawProps || {}, props2, instance);
  4357. }
  4358. }
  4359. function setFullProps(instance, rawProps, props2, attrs) {
  4360. const [options, needCastKeys] = instance.propsOptions;
  4361. let hasAttrsChanged = false;
  4362. let rawCastValues;
  4363. if (rawProps) {
  4364. for (let key in rawProps) {
  4365. if (isReservedProp(key)) {
  4366. continue;
  4367. }
  4368. const value = rawProps[key];
  4369. let camelKey;
  4370. if (options && hasOwn(options, camelKey = camelize(key))) {
  4371. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  4372. props2[camelKey] = value;
  4373. } else {
  4374. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  4375. }
  4376. } else if (!isEmitListener(instance.emitsOptions, key)) {
  4377. if (!(key in attrs) || value !== attrs[key]) {
  4378. attrs[key] = value;
  4379. hasAttrsChanged = true;
  4380. }
  4381. }
  4382. }
  4383. }
  4384. if (needCastKeys) {
  4385. const rawCurrentProps = toRaw(props2);
  4386. const castValues = rawCastValues || EMPTY_OBJ;
  4387. for (let i = 0; i < needCastKeys.length; i++) {
  4388. const key = needCastKeys[i];
  4389. props2[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
  4390. }
  4391. }
  4392. return hasAttrsChanged;
  4393. }
  4394. function resolvePropValue(options, props2, key, value, instance, isAbsent) {
  4395. const opt = options[key];
  4396. if (opt != null) {
  4397. const hasDefault = hasOwn(opt, "default");
  4398. if (hasDefault && value === void 0) {
  4399. const defaultValue = opt.default;
  4400. if (opt.type !== Function && isFunction(defaultValue)) {
  4401. const { propsDefaults } = instance;
  4402. if (key in propsDefaults) {
  4403. value = propsDefaults[key];
  4404. } else {
  4405. setCurrentInstance(instance);
  4406. value = propsDefaults[key] = defaultValue.call(null, props2);
  4407. unsetCurrentInstance();
  4408. }
  4409. } else {
  4410. value = defaultValue;
  4411. }
  4412. }
  4413. if (opt[
  4414. 0
  4415. /* BooleanFlags.shouldCast */
  4416. ]) {
  4417. if (isAbsent && !hasDefault) {
  4418. value = false;
  4419. } else if (opt[
  4420. 1
  4421. /* BooleanFlags.shouldCastTrue */
  4422. ] && (value === "" || value === hyphenate(key))) {
  4423. value = true;
  4424. }
  4425. }
  4426. }
  4427. return value;
  4428. }
  4429. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4430. const cache = appContext.propsCache;
  4431. const cached = cache.get(comp);
  4432. if (cached) {
  4433. return cached;
  4434. }
  4435. const raw = comp.props;
  4436. const normalized = {};
  4437. const needCastKeys = [];
  4438. let hasExtends = false;
  4439. if (!isFunction(comp)) {
  4440. const extendProps = (raw2) => {
  4441. hasExtends = true;
  4442. const [props2, keys] = normalizePropsOptions(raw2, appContext, true);
  4443. extend(normalized, props2);
  4444. if (keys)
  4445. needCastKeys.push(...keys);
  4446. };
  4447. if (!asMixin && appContext.mixins.length) {
  4448. appContext.mixins.forEach(extendProps);
  4449. }
  4450. if (comp.extends) {
  4451. extendProps(comp.extends);
  4452. }
  4453. if (comp.mixins) {
  4454. comp.mixins.forEach(extendProps);
  4455. }
  4456. }
  4457. if (!raw && !hasExtends) {
  4458. if (isObject$1(comp)) {
  4459. cache.set(comp, EMPTY_ARR);
  4460. }
  4461. return EMPTY_ARR;
  4462. }
  4463. if (isArray$1(raw)) {
  4464. for (let i = 0; i < raw.length; i++) {
  4465. if (!isString(raw[i])) {
  4466. warn(`props must be strings when using array syntax.`, raw[i]);
  4467. }
  4468. const normalizedKey = camelize(raw[i]);
  4469. if (validatePropName(normalizedKey)) {
  4470. normalized[normalizedKey] = EMPTY_OBJ;
  4471. }
  4472. }
  4473. } else if (raw) {
  4474. if (!isObject$1(raw)) {
  4475. warn(`invalid props options`, raw);
  4476. }
  4477. for (const key in raw) {
  4478. const normalizedKey = camelize(key);
  4479. if (validatePropName(normalizedKey)) {
  4480. const opt = raw[key];
  4481. const prop = normalized[normalizedKey] = isArray$1(opt) || isFunction(opt) ? { type: opt } : Object.assign({}, opt);
  4482. if (prop) {
  4483. const booleanIndex = getTypeIndex(Boolean, prop.type);
  4484. const stringIndex = getTypeIndex(String, prop.type);
  4485. prop[
  4486. 0
  4487. /* BooleanFlags.shouldCast */
  4488. ] = booleanIndex > -1;
  4489. prop[
  4490. 1
  4491. /* BooleanFlags.shouldCastTrue */
  4492. ] = stringIndex < 0 || booleanIndex < stringIndex;
  4493. if (booleanIndex > -1 || hasOwn(prop, "default")) {
  4494. needCastKeys.push(normalizedKey);
  4495. }
  4496. }
  4497. }
  4498. }
  4499. }
  4500. const res = [normalized, needCastKeys];
  4501. if (isObject$1(comp)) {
  4502. cache.set(comp, res);
  4503. }
  4504. return res;
  4505. }
  4506. function validatePropName(key) {
  4507. if (key[0] !== "$") {
  4508. return true;
  4509. } else {
  4510. warn(`Invalid prop name: "${key}" is a reserved property.`);
  4511. }
  4512. return false;
  4513. }
  4514. function getType(ctor) {
  4515. const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
  4516. return match ? match[2] : ctor === null ? "null" : "";
  4517. }
  4518. function isSameType(a, b) {
  4519. return getType(a) === getType(b);
  4520. }
  4521. function getTypeIndex(type, expectedTypes) {
  4522. if (isArray$1(expectedTypes)) {
  4523. return expectedTypes.findIndex((t2) => isSameType(t2, type));
  4524. } else if (isFunction(expectedTypes)) {
  4525. return isSameType(expectedTypes, type) ? 0 : -1;
  4526. }
  4527. return -1;
  4528. }
  4529. function validateProps(rawProps, props2, instance) {
  4530. const resolvedValues = toRaw(props2);
  4531. const options = instance.propsOptions[0];
  4532. for (const key in options) {
  4533. let opt = options[key];
  4534. if (opt == null)
  4535. continue;
  4536. validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)));
  4537. }
  4538. }
  4539. function validateProp(name, value, prop, isAbsent) {
  4540. const { type, required, validator } = prop;
  4541. if (required && isAbsent) {
  4542. warn('Missing required prop: "' + name + '"');
  4543. return;
  4544. }
  4545. if (value == null && !prop.required) {
  4546. return;
  4547. }
  4548. if (type != null && type !== true) {
  4549. let isValid = false;
  4550. const types = isArray$1(type) ? type : [type];
  4551. const expectedTypes = [];
  4552. for (let i = 0; i < types.length && !isValid; i++) {
  4553. const { valid, expectedType } = assertType(value, types[i]);
  4554. expectedTypes.push(expectedType || "");
  4555. isValid = valid;
  4556. }
  4557. if (!isValid) {
  4558. warn(getInvalidTypeMessage(name, value, expectedTypes));
  4559. return;
  4560. }
  4561. }
  4562. if (validator && !validator(value)) {
  4563. warn('Invalid prop: custom validator check failed for prop "' + name + '".');
  4564. }
  4565. }
  4566. const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
  4567. function assertType(value, type) {
  4568. let valid;
  4569. const expectedType = getType(type);
  4570. if (isSimpleType(expectedType)) {
  4571. const t2 = typeof value;
  4572. valid = t2 === expectedType.toLowerCase();
  4573. if (!valid && t2 === "object") {
  4574. valid = value instanceof type;
  4575. }
  4576. } else if (expectedType === "Object") {
  4577. valid = isObject$1(value);
  4578. } else if (expectedType === "Array") {
  4579. valid = isArray$1(value);
  4580. } else if (expectedType === "null") {
  4581. valid = value === null;
  4582. } else {
  4583. valid = value instanceof type;
  4584. }
  4585. return {
  4586. valid,
  4587. expectedType
  4588. };
  4589. }
  4590. function getInvalidTypeMessage(name, value, expectedTypes) {
  4591. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  4592. const expectedType = expectedTypes[0];
  4593. const receivedType = toRawType(value);
  4594. const expectedValue = styleValue(value, expectedType);
  4595. const receivedValue = styleValue(value, receivedType);
  4596. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  4597. message += ` with value ${expectedValue}`;
  4598. }
  4599. message += `, got ${receivedType} `;
  4600. if (isExplicable(receivedType)) {
  4601. message += `with value ${receivedValue}.`;
  4602. }
  4603. return message;
  4604. }
  4605. function styleValue(value, type) {
  4606. if (type === "String") {
  4607. return `"${value}"`;
  4608. } else if (type === "Number") {
  4609. return `${Number(value)}`;
  4610. } else {
  4611. return `${value}`;
  4612. }
  4613. }
  4614. function isExplicable(type) {
  4615. const explicitTypes = ["string", "number", "boolean"];
  4616. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  4617. }
  4618. function isBoolean(...args) {
  4619. return args.some((elem) => elem.toLowerCase() === "boolean");
  4620. }
  4621. function createAppContext() {
  4622. return {
  4623. app: null,
  4624. config: {
  4625. isNativeTag: NO,
  4626. performance: false,
  4627. globalProperties: {},
  4628. optionMergeStrategies: {},
  4629. errorHandler: void 0,
  4630. warnHandler: void 0,
  4631. compilerOptions: {}
  4632. },
  4633. mixins: [],
  4634. components: {},
  4635. directives: {},
  4636. provides: /* @__PURE__ */ Object.create(null),
  4637. optionsCache: /* @__PURE__ */ new WeakMap(),
  4638. propsCache: /* @__PURE__ */ new WeakMap(),
  4639. emitsCache: /* @__PURE__ */ new WeakMap()
  4640. };
  4641. }
  4642. let uid$1 = 0;
  4643. function createAppAPI(render, hydrate) {
  4644. return function createApp2(rootComponent, rootProps = null) {
  4645. if (!isFunction(rootComponent)) {
  4646. rootComponent = Object.assign({}, rootComponent);
  4647. }
  4648. if (rootProps != null && !isObject$1(rootProps)) {
  4649. warn(`root props passed to app.mount() must be an object.`);
  4650. rootProps = null;
  4651. }
  4652. const context = createAppContext();
  4653. const installedPlugins = /* @__PURE__ */ new Set();
  4654. const app = context.app = {
  4655. _uid: uid$1++,
  4656. _component: rootComponent,
  4657. _props: rootProps,
  4658. _container: null,
  4659. _context: context,
  4660. _instance: null,
  4661. version: version$1,
  4662. get config() {
  4663. return context.config;
  4664. },
  4665. set config(v) {
  4666. {
  4667. warn(`app.config cannot be replaced. Modify individual options instead.`);
  4668. }
  4669. },
  4670. use(plugin2, ...options) {
  4671. if (installedPlugins.has(plugin2)) {
  4672. warn(`Plugin has already been applied to target app.`);
  4673. } else if (plugin2 && isFunction(plugin2.install)) {
  4674. installedPlugins.add(plugin2);
  4675. plugin2.install(app, ...options);
  4676. } else if (isFunction(plugin2)) {
  4677. installedPlugins.add(plugin2);
  4678. plugin2(app, ...options);
  4679. } else {
  4680. warn(`A plugin must either be a function or an object with an "install" function.`);
  4681. }
  4682. return app;
  4683. },
  4684. mixin(mixin2) {
  4685. {
  4686. if (!context.mixins.includes(mixin2)) {
  4687. context.mixins.push(mixin2);
  4688. } else {
  4689. warn("Mixin has already been applied to target app" + (mixin2.name ? `: ${mixin2.name}` : ""));
  4690. }
  4691. }
  4692. return app;
  4693. },
  4694. component(name, component) {
  4695. {
  4696. validateComponentName(name, context.config);
  4697. }
  4698. if (!component) {
  4699. return context.components[name];
  4700. }
  4701. if (context.components[name]) {
  4702. warn(`Component "${name}" has already been registered in target app.`);
  4703. }
  4704. context.components[name] = component;
  4705. return app;
  4706. },
  4707. directive(name, directive) {
  4708. {
  4709. validateDirectiveName(name);
  4710. }
  4711. if (!directive) {
  4712. return context.directives[name];
  4713. }
  4714. if (context.directives[name]) {
  4715. warn(`Directive "${name}" has already been registered in target app.`);
  4716. }
  4717. context.directives[name] = directive;
  4718. return app;
  4719. },
  4720. // fixed by xxxxxx
  4721. mount() {
  4722. },
  4723. // fixed by xxxxxx
  4724. unmount() {
  4725. },
  4726. provide(key, value) {
  4727. if (key in context.provides) {
  4728. warn(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
  4729. }
  4730. context.provides[key] = value;
  4731. return app;
  4732. }
  4733. };
  4734. return app;
  4735. };
  4736. }
  4737. let supported;
  4738. let perf;
  4739. function startMeasure(instance, type) {
  4740. if (instance.appContext.config.performance && isSupported()) {
  4741. perf.mark(`vue-${type}-${instance.uid}`);
  4742. }
  4743. {
  4744. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  4745. }
  4746. }
  4747. function endMeasure(instance, type) {
  4748. if (instance.appContext.config.performance && isSupported()) {
  4749. const startTag = `vue-${type}-${instance.uid}`;
  4750. const endTag = startTag + `:end`;
  4751. perf.mark(endTag);
  4752. perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag);
  4753. perf.clearMarks(startTag);
  4754. perf.clearMarks(endTag);
  4755. }
  4756. {
  4757. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  4758. }
  4759. }
  4760. function isSupported() {
  4761. if (supported !== void 0) {
  4762. return supported;
  4763. }
  4764. if (typeof window !== "undefined" && window.performance) {
  4765. supported = true;
  4766. perf = window.performance;
  4767. } else {
  4768. supported = false;
  4769. }
  4770. return supported;
  4771. }
  4772. const queuePostRenderEffect$1 = queuePostFlushCb;
  4773. const Fragment = Symbol("Fragment");
  4774. const Text$1 = Symbol("Text");
  4775. const Comment = Symbol("Comment");
  4776. const Static = Symbol("Static");
  4777. function isVNode(value) {
  4778. return value ? value.__v_isVNode === true : false;
  4779. }
  4780. const InternalObjectKey = `__vInternal`;
  4781. function guardReactiveProps(props2) {
  4782. if (!props2)
  4783. return null;
  4784. return isProxy(props2) || InternalObjectKey in props2 ? extend({}, props2) : props2;
  4785. }
  4786. const emptyAppContext = createAppContext();
  4787. let uid = 0;
  4788. function createComponentInstance(vnode, parent, suspense) {
  4789. const type = vnode.type;
  4790. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  4791. const instance = {
  4792. uid: uid++,
  4793. vnode,
  4794. type,
  4795. parent,
  4796. appContext,
  4797. root: null,
  4798. next: null,
  4799. subTree: null,
  4800. effect: null,
  4801. update: null,
  4802. scope: new EffectScope(
  4803. true
  4804. /* detached */
  4805. ),
  4806. render: null,
  4807. proxy: null,
  4808. exposed: null,
  4809. exposeProxy: null,
  4810. withProxy: null,
  4811. provides: parent ? parent.provides : Object.create(appContext.provides),
  4812. accessCache: null,
  4813. renderCache: [],
  4814. // local resolved assets
  4815. components: null,
  4816. directives: null,
  4817. // resolved props and emits options
  4818. propsOptions: normalizePropsOptions(type, appContext),
  4819. emitsOptions: normalizeEmitsOptions(type, appContext),
  4820. // emit
  4821. emit: null,
  4822. emitted: null,
  4823. // props default value
  4824. propsDefaults: EMPTY_OBJ,
  4825. // inheritAttrs
  4826. inheritAttrs: type.inheritAttrs,
  4827. // state
  4828. ctx: EMPTY_OBJ,
  4829. data: EMPTY_OBJ,
  4830. props: EMPTY_OBJ,
  4831. attrs: EMPTY_OBJ,
  4832. slots: EMPTY_OBJ,
  4833. refs: EMPTY_OBJ,
  4834. setupState: EMPTY_OBJ,
  4835. setupContext: null,
  4836. // suspense related
  4837. suspense,
  4838. suspenseId: suspense ? suspense.pendingId : 0,
  4839. asyncDep: null,
  4840. asyncResolved: false,
  4841. // lifecycle hooks
  4842. // not using enums here because it results in computed properties
  4843. isMounted: false,
  4844. isUnmounted: false,
  4845. isDeactivated: false,
  4846. bc: null,
  4847. c: null,
  4848. bm: null,
  4849. m: null,
  4850. bu: null,
  4851. u: null,
  4852. um: null,
  4853. bum: null,
  4854. da: null,
  4855. a: null,
  4856. rtg: null,
  4857. rtc: null,
  4858. ec: null,
  4859. sp: null
  4860. };
  4861. {
  4862. instance.ctx = createDevRenderContext(instance);
  4863. }
  4864. instance.root = parent ? parent.root : instance;
  4865. instance.emit = emit.bind(null, instance);
  4866. if (vnode.ce) {
  4867. vnode.ce(instance);
  4868. }
  4869. return instance;
  4870. }
  4871. let currentInstance = null;
  4872. const getCurrentInstance = () => currentInstance || currentRenderingInstance;
  4873. const setCurrentInstance = (instance) => {
  4874. currentInstance = instance;
  4875. instance.scope.on();
  4876. };
  4877. const unsetCurrentInstance = () => {
  4878. currentInstance && currentInstance.scope.off();
  4879. currentInstance = null;
  4880. };
  4881. const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
  4882. function validateComponentName(name, config2) {
  4883. const appIsNativeTag = config2.isNativeTag || NO;
  4884. if (isBuiltInTag(name) || appIsNativeTag(name)) {
  4885. warn("Do not use built-in or reserved HTML elements as component id: " + name);
  4886. }
  4887. }
  4888. function isStatefulComponent(instance) {
  4889. return instance.vnode.shapeFlag & 4;
  4890. }
  4891. let isInSSRComponentSetup = false;
  4892. function setupComponent(instance, isSSR = false) {
  4893. isInSSRComponentSetup = isSSR;
  4894. const {
  4895. props: props2
  4896. /*, children*/
  4897. } = instance.vnode;
  4898. const isStateful = isStatefulComponent(instance);
  4899. initProps$1(instance, props2, isStateful, isSSR);
  4900. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  4901. isInSSRComponentSetup = false;
  4902. return setupResult;
  4903. }
  4904. function setupStatefulComponent(instance, isSSR) {
  4905. const Component2 = instance.type;
  4906. {
  4907. if (Component2.name) {
  4908. validateComponentName(Component2.name, instance.appContext.config);
  4909. }
  4910. if (Component2.components) {
  4911. const names = Object.keys(Component2.components);
  4912. for (let i = 0; i < names.length; i++) {
  4913. validateComponentName(names[i], instance.appContext.config);
  4914. }
  4915. }
  4916. if (Component2.directives) {
  4917. const names = Object.keys(Component2.directives);
  4918. for (let i = 0; i < names.length; i++) {
  4919. validateDirectiveName(names[i]);
  4920. }
  4921. }
  4922. if (Component2.compilerOptions && isRuntimeOnly()) {
  4923. warn(`"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`);
  4924. }
  4925. }
  4926. instance.accessCache = /* @__PURE__ */ Object.create(null);
  4927. instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
  4928. {
  4929. exposePropsOnRenderContext(instance);
  4930. }
  4931. const { setup } = Component2;
  4932. if (setup) {
  4933. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  4934. setCurrentInstance(instance);
  4935. pauseTracking();
  4936. const setupResult = callWithErrorHandling(setup, instance, 0, [shallowReadonly(instance.props), setupContext]);
  4937. resetTracking();
  4938. unsetCurrentInstance();
  4939. if (isPromise(setupResult)) {
  4940. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  4941. {
  4942. warn(`setup() returned a Promise, but the version of Vue you are using does not support it yet.`);
  4943. }
  4944. } else {
  4945. handleSetupResult(instance, setupResult, isSSR);
  4946. }
  4947. } else {
  4948. finishComponentSetup(instance, isSSR);
  4949. }
  4950. }
  4951. function handleSetupResult(instance, setupResult, isSSR) {
  4952. if (isFunction(setupResult)) {
  4953. {
  4954. instance.render = setupResult;
  4955. }
  4956. } else if (isObject$1(setupResult)) {
  4957. if (isVNode(setupResult)) {
  4958. warn(`setup() should not return VNodes directly - return a render function instead.`);
  4959. }
  4960. {
  4961. instance.devtoolsRawSetupState = setupResult;
  4962. }
  4963. instance.setupState = proxyRefs(setupResult);
  4964. {
  4965. exposeSetupStateOnRenderContext(instance);
  4966. }
  4967. } else if (setupResult !== void 0) {
  4968. warn(`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`);
  4969. }
  4970. finishComponentSetup(instance, isSSR);
  4971. }
  4972. let compile;
  4973. const isRuntimeOnly = () => !compile;
  4974. function finishComponentSetup(instance, isSSR, skipOptions) {
  4975. const Component2 = instance.type;
  4976. if (!instance.render) {
  4977. instance.render = Component2.render || NOOP;
  4978. }
  4979. {
  4980. setCurrentInstance(instance);
  4981. pauseTracking();
  4982. applyOptions$1(instance);
  4983. resetTracking();
  4984. unsetCurrentInstance();
  4985. }
  4986. if (!Component2.render && instance.render === NOOP && !isSSR) {
  4987. if (Component2.template) {
  4988. warn(
  4989. `Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  4990. /* should not happen */
  4991. );
  4992. } else {
  4993. warn(`Component is missing template or render function.`);
  4994. }
  4995. }
  4996. }
  4997. function createAttrsProxy(instance) {
  4998. return new Proxy(
  4999. instance.attrs,
  5000. {
  5001. get(target, key) {
  5002. track(instance, "get", "$attrs");
  5003. return target[key];
  5004. },
  5005. set() {
  5006. warn(`setupContext.attrs is readonly.`);
  5007. return false;
  5008. },
  5009. deleteProperty() {
  5010. warn(`setupContext.attrs is readonly.`);
  5011. return false;
  5012. }
  5013. }
  5014. );
  5015. }
  5016. function createSetupContext(instance) {
  5017. const expose = (exposed) => {
  5018. {
  5019. if (instance.exposed) {
  5020. warn(`expose() should be called only once per setup().`);
  5021. }
  5022. if (exposed != null) {
  5023. let exposedType = typeof exposed;
  5024. if (exposedType === "object") {
  5025. if (isArray$1(exposed)) {
  5026. exposedType = "array";
  5027. } else if (isRef(exposed)) {
  5028. exposedType = "ref";
  5029. }
  5030. }
  5031. if (exposedType !== "object") {
  5032. warn(`expose() should be passed a plain object, received ${exposedType}.`);
  5033. }
  5034. }
  5035. }
  5036. instance.exposed = exposed || {};
  5037. };
  5038. let attrs;
  5039. {
  5040. return Object.freeze({
  5041. get attrs() {
  5042. return attrs || (attrs = createAttrsProxy(instance));
  5043. },
  5044. get slots() {
  5045. return shallowReadonly(instance.slots);
  5046. },
  5047. get emit() {
  5048. return (event, ...args) => instance.emit(event, ...args);
  5049. },
  5050. expose
  5051. });
  5052. }
  5053. }
  5054. function getExposeProxy(instance) {
  5055. if (instance.exposed) {
  5056. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  5057. get(target, key) {
  5058. if (key in target) {
  5059. return target[key];
  5060. }
  5061. return instance.proxy[key];
  5062. },
  5063. has(target, key) {
  5064. return key in target || key in publicPropertiesMap;
  5065. }
  5066. }));
  5067. }
  5068. }
  5069. const classifyRE = /(?:^|[-_])(\w)/g;
  5070. const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  5071. function getComponentName(Component2, includeInferred = true) {
  5072. return isFunction(Component2) ? Component2.displayName || Component2.name : Component2.name || includeInferred && Component2.__name;
  5073. }
  5074. function formatComponentName(instance, Component2, isRoot = false) {
  5075. let name = getComponentName(Component2);
  5076. if (!name && Component2.__file) {
  5077. const match = Component2.__file.match(/([^/\\]+)\.\w+$/);
  5078. if (match) {
  5079. name = match[1];
  5080. }
  5081. }
  5082. if (!name && instance && instance.parent) {
  5083. const inferFromRegistry = (registry) => {
  5084. for (const key in registry) {
  5085. if (registry[key] === Component2) {
  5086. return key;
  5087. }
  5088. }
  5089. };
  5090. name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
  5091. }
  5092. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  5093. }
  5094. const computed = (getterOrOptions, debugOptions) => {
  5095. return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
  5096. };
  5097. const version$1 = "3.2.47";
  5098. function unwrapper(target) {
  5099. return unref(target);
  5100. }
  5101. const ARRAYTYPE = "[object Array]";
  5102. const OBJECTTYPE = "[object Object]";
  5103. function diff(current, pre) {
  5104. const result = {};
  5105. syncKeys(current, pre);
  5106. _diff(current, pre, "", result);
  5107. return result;
  5108. }
  5109. function syncKeys(current, pre) {
  5110. current = unwrapper(current);
  5111. if (current === pre)
  5112. return;
  5113. const rootCurrentType = toTypeString(current);
  5114. const rootPreType = toTypeString(pre);
  5115. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  5116. for (let key in pre) {
  5117. const currentValue = current[key];
  5118. if (currentValue === void 0) {
  5119. current[key] = null;
  5120. } else {
  5121. syncKeys(currentValue, pre[key]);
  5122. }
  5123. }
  5124. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  5125. if (current.length >= pre.length) {
  5126. pre.forEach((item, index2) => {
  5127. syncKeys(current[index2], item);
  5128. });
  5129. }
  5130. }
  5131. }
  5132. function _diff(current, pre, path, result) {
  5133. current = unwrapper(current);
  5134. if (current === pre)
  5135. return;
  5136. const rootCurrentType = toTypeString(current);
  5137. const rootPreType = toTypeString(pre);
  5138. if (rootCurrentType == OBJECTTYPE) {
  5139. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  5140. setResult(result, path, current);
  5141. } else {
  5142. for (let key in current) {
  5143. const currentValue = unwrapper(current[key]);
  5144. const preValue = pre[key];
  5145. const currentType = toTypeString(currentValue);
  5146. const preType = toTypeString(preValue);
  5147. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  5148. if (currentValue != preValue) {
  5149. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5150. }
  5151. } else if (currentType == ARRAYTYPE) {
  5152. if (preType != ARRAYTYPE) {
  5153. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5154. } else {
  5155. if (currentValue.length < preValue.length) {
  5156. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5157. } else {
  5158. currentValue.forEach((item, index2) => {
  5159. _diff(item, preValue[index2], (path == "" ? "" : path + ".") + key + "[" + index2 + "]", result);
  5160. });
  5161. }
  5162. }
  5163. } else if (currentType == OBJECTTYPE) {
  5164. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  5165. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5166. } else {
  5167. for (let subKey in currentValue) {
  5168. _diff(currentValue[subKey], preValue[subKey], (path == "" ? "" : path + ".") + key + "." + subKey, result);
  5169. }
  5170. }
  5171. }
  5172. }
  5173. }
  5174. } else if (rootCurrentType == ARRAYTYPE) {
  5175. if (rootPreType != ARRAYTYPE) {
  5176. setResult(result, path, current);
  5177. } else {
  5178. if (current.length < pre.length) {
  5179. setResult(result, path, current);
  5180. } else {
  5181. current.forEach((item, index2) => {
  5182. _diff(item, pre[index2], path + "[" + index2 + "]", result);
  5183. });
  5184. }
  5185. }
  5186. } else {
  5187. setResult(result, path, current);
  5188. }
  5189. }
  5190. function setResult(result, k, v) {
  5191. result[k] = v;
  5192. }
  5193. function hasComponentEffect(instance) {
  5194. return queue.includes(instance.update);
  5195. }
  5196. function flushCallbacks(instance) {
  5197. const ctx = instance.ctx;
  5198. const callbacks = ctx.__next_tick_callbacks;
  5199. if (callbacks && callbacks.length) {
  5200. const copies = callbacks.slice(0);
  5201. callbacks.length = 0;
  5202. for (let i = 0; i < copies.length; i++) {
  5203. copies[i]();
  5204. }
  5205. }
  5206. }
  5207. function nextTick(instance, fn) {
  5208. const ctx = instance.ctx;
  5209. if (!ctx.__next_tick_pending && !hasComponentEffect(instance)) {
  5210. return nextTick$1(fn && fn.bind(instance.proxy));
  5211. }
  5212. let _resolve;
  5213. if (!ctx.__next_tick_callbacks) {
  5214. ctx.__next_tick_callbacks = [];
  5215. }
  5216. ctx.__next_tick_callbacks.push(() => {
  5217. if (fn) {
  5218. callWithErrorHandling(
  5219. fn.bind(instance.proxy),
  5220. instance,
  5221. 14
  5222. /* ErrorCodes.SCHEDULER */
  5223. );
  5224. } else if (_resolve) {
  5225. _resolve(instance.proxy);
  5226. }
  5227. });
  5228. return new Promise((resolve2) => {
  5229. _resolve = resolve2;
  5230. });
  5231. }
  5232. function clone$1(src, seen) {
  5233. src = unwrapper(src);
  5234. const type = typeof src;
  5235. if (type === "object" && src !== null) {
  5236. let copy = seen.get(src);
  5237. if (typeof copy !== "undefined") {
  5238. return copy;
  5239. }
  5240. if (isArray$1(src)) {
  5241. const len = src.length;
  5242. copy = new Array(len);
  5243. seen.set(src, copy);
  5244. for (let i = 0; i < len; i++) {
  5245. copy[i] = clone$1(src[i], seen);
  5246. }
  5247. } else {
  5248. copy = {};
  5249. seen.set(src, copy);
  5250. for (const name in src) {
  5251. if (hasOwn(src, name)) {
  5252. copy[name] = clone$1(src[name], seen);
  5253. }
  5254. }
  5255. }
  5256. return copy;
  5257. }
  5258. if (type !== "symbol") {
  5259. return src;
  5260. }
  5261. }
  5262. function deepCopy(src) {
  5263. return clone$1(src, typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : /* @__PURE__ */ new Map());
  5264. }
  5265. function getMPInstanceData(instance, keys) {
  5266. const data = instance.data;
  5267. const ret = /* @__PURE__ */ Object.create(null);
  5268. keys.forEach((key) => {
  5269. ret[key] = data[key];
  5270. });
  5271. return ret;
  5272. }
  5273. function patch(instance, data, oldData) {
  5274. if (!data) {
  5275. return;
  5276. }
  5277. data = deepCopy(data);
  5278. const ctx = instance.ctx;
  5279. const mpType = ctx.mpType;
  5280. if (mpType === "page" || mpType === "component") {
  5281. data.r0 = 1;
  5282. const mpInstance = ctx.$scope;
  5283. const keys = Object.keys(data);
  5284. const diffData = diff(data, oldData || getMPInstanceData(mpInstance, keys));
  5285. if (Object.keys(diffData).length) {
  5286. ctx.__next_tick_pending = true;
  5287. mpInstance.setData(diffData, () => {
  5288. ctx.__next_tick_pending = false;
  5289. flushCallbacks(instance);
  5290. });
  5291. flushPreFlushCbs();
  5292. } else {
  5293. flushCallbacks(instance);
  5294. }
  5295. }
  5296. }
  5297. function initAppConfig(appConfig) {
  5298. appConfig.globalProperties.$nextTick = function $nextTick(fn) {
  5299. return nextTick(this.$, fn);
  5300. };
  5301. }
  5302. function onApplyOptions(options, instance, publicThis) {
  5303. instance.appContext.config.globalProperties.$applyOptions(options, instance, publicThis);
  5304. const computedOptions = options.computed;
  5305. if (computedOptions) {
  5306. const keys = Object.keys(computedOptions);
  5307. if (keys.length) {
  5308. const ctx = instance.ctx;
  5309. if (!ctx.$computedKeys) {
  5310. ctx.$computedKeys = [];
  5311. }
  5312. ctx.$computedKeys.push(...keys);
  5313. }
  5314. }
  5315. delete instance.ctx.$onApplyOptions;
  5316. }
  5317. function setRef$1(instance, isUnmount = false) {
  5318. const { setupState, $templateRefs, ctx: { $scope, $mpPlatform } } = instance;
  5319. if ($mpPlatform === "mp-alipay") {
  5320. return;
  5321. }
  5322. if (!$templateRefs || !$scope) {
  5323. return;
  5324. }
  5325. if (isUnmount) {
  5326. return $templateRefs.forEach((templateRef) => setTemplateRef(templateRef, null, setupState));
  5327. }
  5328. const check = $mpPlatform === "mp-baidu" || $mpPlatform === "mp-toutiao";
  5329. const doSetByRefs = (refs) => {
  5330. const mpComponents = (
  5331. // 字节小程序 selectAllComponents 可能返回 null
  5332. // https://github.com/dcloudio/uni-app/issues/3954
  5333. ($scope.selectAllComponents(".r") || []).concat($scope.selectAllComponents(".r-i-f") || [])
  5334. );
  5335. return refs.filter((templateRef) => {
  5336. const refValue = findComponentPublicInstance(mpComponents, templateRef.i);
  5337. if (check && refValue === null) {
  5338. return true;
  5339. }
  5340. setTemplateRef(templateRef, refValue, setupState);
  5341. return false;
  5342. });
  5343. };
  5344. const doSet = () => {
  5345. const refs = doSetByRefs($templateRefs);
  5346. if (refs.length && instance.proxy && instance.proxy.$scope) {
  5347. instance.proxy.$scope.setData({ r1: 1 }, () => {
  5348. doSetByRefs(refs);
  5349. });
  5350. }
  5351. };
  5352. if ($scope._$setRef) {
  5353. $scope._$setRef(doSet);
  5354. } else {
  5355. nextTick(instance, doSet);
  5356. }
  5357. }
  5358. function toSkip(value) {
  5359. if (isObject$1(value)) {
  5360. markRaw(value);
  5361. }
  5362. return value;
  5363. }
  5364. function findComponentPublicInstance(mpComponents, id) {
  5365. const mpInstance = mpComponents.find((com) => com && (com.properties || com.props).uI === id);
  5366. if (mpInstance) {
  5367. const vm = mpInstance.$vm;
  5368. if (vm) {
  5369. return getExposeProxy(vm.$) || vm;
  5370. }
  5371. return toSkip(mpInstance);
  5372. }
  5373. return null;
  5374. }
  5375. function setTemplateRef({ r, f: f2 }, refValue, setupState) {
  5376. if (isFunction(r)) {
  5377. r(refValue, {});
  5378. } else {
  5379. const _isString = isString(r);
  5380. const _isRef = isRef(r);
  5381. if (_isString || _isRef) {
  5382. if (f2) {
  5383. if (!_isRef) {
  5384. return;
  5385. }
  5386. if (!isArray$1(r.value)) {
  5387. r.value = [];
  5388. }
  5389. const existing = r.value;
  5390. if (existing.indexOf(refValue) === -1) {
  5391. existing.push(refValue);
  5392. if (!refValue) {
  5393. return;
  5394. }
  5395. onBeforeUnmount(() => remove(existing, refValue), refValue.$);
  5396. }
  5397. } else if (_isString) {
  5398. if (hasOwn(setupState, r)) {
  5399. setupState[r] = refValue;
  5400. }
  5401. } else if (isRef(r)) {
  5402. r.value = refValue;
  5403. } else {
  5404. warnRef(r);
  5405. }
  5406. } else {
  5407. warnRef(r);
  5408. }
  5409. }
  5410. }
  5411. function warnRef(ref2) {
  5412. warn("Invalid template ref type:", ref2, `(${typeof ref2})`);
  5413. }
  5414. var MPType;
  5415. (function(MPType2) {
  5416. MPType2["APP"] = "app";
  5417. MPType2["PAGE"] = "page";
  5418. MPType2["COMPONENT"] = "component";
  5419. })(MPType || (MPType = {}));
  5420. const queuePostRenderEffect = queuePostFlushCb;
  5421. function mountComponent(initialVNode, options) {
  5422. const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
  5423. {
  5424. instance.ctx.$onApplyOptions = onApplyOptions;
  5425. instance.ctx.$children = [];
  5426. }
  5427. if (options.mpType === "app") {
  5428. instance.render = NOOP;
  5429. }
  5430. if (options.onBeforeSetup) {
  5431. options.onBeforeSetup(instance, options);
  5432. }
  5433. {
  5434. pushWarningContext(initialVNode);
  5435. startMeasure(instance, `mount`);
  5436. }
  5437. {
  5438. startMeasure(instance, `init`);
  5439. }
  5440. setupComponent(instance);
  5441. {
  5442. endMeasure(instance, `init`);
  5443. }
  5444. {
  5445. if (options.parentComponent && instance.proxy) {
  5446. options.parentComponent.ctx.$children.push(getExposeProxy(instance) || instance.proxy);
  5447. }
  5448. }
  5449. setupRenderEffect(instance);
  5450. {
  5451. popWarningContext();
  5452. endMeasure(instance, `mount`);
  5453. }
  5454. return instance.proxy;
  5455. }
  5456. const getFunctionalFallthrough = (attrs) => {
  5457. let res;
  5458. for (const key in attrs) {
  5459. if (key === "class" || key === "style" || isOn(key)) {
  5460. (res || (res = {}))[key] = attrs[key];
  5461. }
  5462. }
  5463. return res;
  5464. };
  5465. function renderComponentRoot(instance) {
  5466. const { type: Component2, vnode, proxy, withProxy, props: props2, propsOptions: [propsOptions], slots, attrs, emit: emit2, render, renderCache, data, setupState, ctx, uid: uid2, appContext: { app: { config: { globalProperties: { pruneComponentPropsCache: pruneComponentPropsCache2 } } } }, inheritAttrs } = instance;
  5467. instance.$templateRefs = [];
  5468. instance.$ei = 0;
  5469. pruneComponentPropsCache2(uid2);
  5470. instance.__counter = instance.__counter === 0 ? 1 : 0;
  5471. let result;
  5472. const prev = setCurrentRenderingInstance(instance);
  5473. try {
  5474. if (vnode.shapeFlag & 4) {
  5475. fallthroughAttrs(inheritAttrs, props2, propsOptions, attrs);
  5476. const proxyToUse = withProxy || proxy;
  5477. result = render.call(proxyToUse, proxyToUse, renderCache, props2, setupState, data, ctx);
  5478. } else {
  5479. fallthroughAttrs(inheritAttrs, props2, propsOptions, Component2.props ? attrs : getFunctionalFallthrough(attrs));
  5480. const render2 = Component2;
  5481. result = render2.length > 1 ? render2(props2, { attrs, slots, emit: emit2 }) : render2(
  5482. props2,
  5483. null
  5484. /* we know it doesn't need it */
  5485. );
  5486. }
  5487. } catch (err) {
  5488. handleError(
  5489. err,
  5490. instance,
  5491. 1
  5492. /* ErrorCodes.RENDER_FUNCTION */
  5493. );
  5494. result = false;
  5495. }
  5496. setRef$1(instance);
  5497. setCurrentRenderingInstance(prev);
  5498. return result;
  5499. }
  5500. function fallthroughAttrs(inheritAttrs, props2, propsOptions, fallthroughAttrs2) {
  5501. if (props2 && fallthroughAttrs2 && inheritAttrs !== false) {
  5502. const keys = Object.keys(fallthroughAttrs2).filter((key) => key !== "class" && key !== "style");
  5503. if (!keys.length) {
  5504. return;
  5505. }
  5506. if (propsOptions && keys.some(isModelListener)) {
  5507. keys.forEach((key) => {
  5508. if (!isModelListener(key) || !(key.slice(9) in propsOptions)) {
  5509. props2[key] = fallthroughAttrs2[key];
  5510. }
  5511. });
  5512. } else {
  5513. keys.forEach((key) => props2[key] = fallthroughAttrs2[key]);
  5514. }
  5515. }
  5516. }
  5517. const updateComponentPreRender = (instance) => {
  5518. pauseTracking();
  5519. flushPreFlushCbs();
  5520. resetTracking();
  5521. };
  5522. function componentUpdateScopedSlotsFn() {
  5523. const scopedSlotsData = this.$scopedSlotsData;
  5524. if (!scopedSlotsData || scopedSlotsData.length === 0) {
  5525. return;
  5526. }
  5527. const mpInstance = this.ctx.$scope;
  5528. const oldData = mpInstance.data;
  5529. const diffData = /* @__PURE__ */ Object.create(null);
  5530. scopedSlotsData.forEach(({ path, index: index2, data }) => {
  5531. const oldScopedSlotData = getValueByDataPath(oldData, path);
  5532. const diffPath = isString(index2) ? `${path}.${index2}` : `${path}[${index2}]`;
  5533. if (typeof oldScopedSlotData === "undefined" || typeof oldScopedSlotData[index2] === "undefined") {
  5534. diffData[diffPath] = data;
  5535. } else {
  5536. const diffScopedSlotData = diff(data, oldScopedSlotData[index2]);
  5537. Object.keys(diffScopedSlotData).forEach((name) => {
  5538. diffData[diffPath + "." + name] = diffScopedSlotData[name];
  5539. });
  5540. }
  5541. });
  5542. scopedSlotsData.length = 0;
  5543. if (Object.keys(diffData).length) {
  5544. mpInstance.setData(diffData);
  5545. }
  5546. }
  5547. function toggleRecurse({ effect, update }, allowed) {
  5548. effect.allowRecurse = update.allowRecurse = allowed;
  5549. }
  5550. function setupRenderEffect(instance) {
  5551. const updateScopedSlots = componentUpdateScopedSlotsFn.bind(instance);
  5552. instance.$updateScopedSlots = () => nextTick$1(() => queueJob(updateScopedSlots));
  5553. const componentUpdateFn = () => {
  5554. if (!instance.isMounted) {
  5555. onBeforeUnmount(() => {
  5556. setRef$1(instance, true);
  5557. }, instance);
  5558. {
  5559. startMeasure(instance, `patch`);
  5560. }
  5561. patch(instance, renderComponentRoot(instance));
  5562. {
  5563. endMeasure(instance, `patch`);
  5564. }
  5565. {
  5566. devtoolsComponentAdded(instance);
  5567. }
  5568. } else {
  5569. const { next, bu, u } = instance;
  5570. {
  5571. pushWarningContext(next || instance.vnode);
  5572. }
  5573. toggleRecurse(instance, false);
  5574. updateComponentPreRender();
  5575. if (bu) {
  5576. invokeArrayFns$1(bu);
  5577. }
  5578. toggleRecurse(instance, true);
  5579. {
  5580. startMeasure(instance, `patch`);
  5581. }
  5582. patch(instance, renderComponentRoot(instance));
  5583. {
  5584. endMeasure(instance, `patch`);
  5585. }
  5586. if (u) {
  5587. queuePostRenderEffect(u);
  5588. }
  5589. {
  5590. devtoolsComponentUpdated(instance);
  5591. }
  5592. {
  5593. popWarningContext();
  5594. }
  5595. }
  5596. };
  5597. const effect = instance.effect = new ReactiveEffect(
  5598. componentUpdateFn,
  5599. () => queueJob(instance.update),
  5600. instance.scope
  5601. // track it in component's effect scope
  5602. );
  5603. const update = instance.update = effect.run.bind(effect);
  5604. update.id = instance.uid;
  5605. toggleRecurse(instance, true);
  5606. {
  5607. effect.onTrack = instance.rtc ? (e2) => invokeArrayFns$1(instance.rtc, e2) : void 0;
  5608. effect.onTrigger = instance.rtg ? (e2) => invokeArrayFns$1(instance.rtg, e2) : void 0;
  5609. update.ownerInstance = instance;
  5610. }
  5611. update();
  5612. }
  5613. function unmountComponent(instance) {
  5614. const { bum, scope, update, um } = instance;
  5615. if (bum) {
  5616. invokeArrayFns$1(bum);
  5617. }
  5618. scope.stop();
  5619. if (update) {
  5620. update.active = false;
  5621. }
  5622. if (um) {
  5623. queuePostRenderEffect(um);
  5624. }
  5625. queuePostRenderEffect(() => {
  5626. instance.isUnmounted = true;
  5627. });
  5628. {
  5629. devtoolsComponentRemoved(instance);
  5630. }
  5631. }
  5632. const oldCreateApp = createAppAPI();
  5633. function getTarget() {
  5634. if (typeof window !== "undefined") {
  5635. return window;
  5636. }
  5637. if (typeof globalThis !== "undefined") {
  5638. return globalThis;
  5639. }
  5640. if (typeof global !== "undefined") {
  5641. return global;
  5642. }
  5643. if (typeof my !== "undefined") {
  5644. return my;
  5645. }
  5646. }
  5647. function createVueApp(rootComponent, rootProps = null) {
  5648. const target = getTarget();
  5649. target.__VUE__ = true;
  5650. {
  5651. setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  5652. }
  5653. const app = oldCreateApp(rootComponent, rootProps);
  5654. const appContext = app._context;
  5655. initAppConfig(appContext.config);
  5656. const createVNode = (initialVNode) => {
  5657. initialVNode.appContext = appContext;
  5658. initialVNode.shapeFlag = 6;
  5659. return initialVNode;
  5660. };
  5661. const createComponent2 = function createComponent3(initialVNode, options) {
  5662. return mountComponent(createVNode(initialVNode), options);
  5663. };
  5664. const destroyComponent = function destroyComponent2(component) {
  5665. return component && unmountComponent(component.$);
  5666. };
  5667. app.mount = function mount() {
  5668. rootComponent.render = NOOP;
  5669. const instance = mountComponent(createVNode({ type: rootComponent }), {
  5670. mpType: MPType.APP,
  5671. mpInstance: null,
  5672. parentComponent: null,
  5673. slots: [],
  5674. props: null
  5675. });
  5676. app._instance = instance.$;
  5677. {
  5678. devtoolsInitApp(app, version$1);
  5679. }
  5680. instance.$app = app;
  5681. instance.$createComponent = createComponent2;
  5682. instance.$destroyComponent = destroyComponent;
  5683. appContext.$appInstance = instance;
  5684. return instance;
  5685. };
  5686. app.unmount = function unmount() {
  5687. warn(`Cannot unmount an app.`);
  5688. };
  5689. return app;
  5690. }
  5691. function injectLifecycleHook(name, hook, publicThis, instance) {
  5692. if (isFunction(hook)) {
  5693. injectHook(name, hook.bind(publicThis), instance);
  5694. }
  5695. }
  5696. function initHooks$1(options, instance, publicThis) {
  5697. const mpType = options.mpType || publicThis.$mpType;
  5698. if (!mpType || mpType === "component") {
  5699. return;
  5700. }
  5701. Object.keys(options).forEach((name) => {
  5702. if (isUniLifecycleHook(name, options[name], false)) {
  5703. const hooks = options[name];
  5704. if (isArray$1(hooks)) {
  5705. hooks.forEach((hook) => injectLifecycleHook(name, hook, publicThis, instance));
  5706. } else {
  5707. injectLifecycleHook(name, hooks, publicThis, instance);
  5708. }
  5709. }
  5710. });
  5711. }
  5712. function applyOptions$2(options, instance, publicThis) {
  5713. initHooks$1(options, instance, publicThis);
  5714. }
  5715. function set(target, key, val) {
  5716. return target[key] = val;
  5717. }
  5718. function createErrorHandler(app) {
  5719. return function errorHandler(err, instance, _info) {
  5720. if (!instance) {
  5721. throw err;
  5722. }
  5723. const appInstance = app._instance;
  5724. if (!appInstance || !appInstance.proxy) {
  5725. throw err;
  5726. }
  5727. {
  5728. appInstance.proxy.$callHook(ON_ERROR, err);
  5729. }
  5730. };
  5731. }
  5732. function mergeAsArray(to, from) {
  5733. return to ? [...new Set([].concat(to, from))] : from;
  5734. }
  5735. function initOptionMergeStrategies(optionMergeStrategies) {
  5736. UniLifecycleHooks.forEach((name) => {
  5737. optionMergeStrategies[name] = mergeAsArray;
  5738. });
  5739. }
  5740. let realAtob;
  5741. const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  5742. const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  5743. if (typeof atob !== "function") {
  5744. realAtob = function(str) {
  5745. str = String(str).replace(/[\t\n\f\r ]+/g, "");
  5746. if (!b64re.test(str)) {
  5747. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  5748. }
  5749. str += "==".slice(2 - (str.length & 3));
  5750. var bitmap;
  5751. var result = "";
  5752. var r1;
  5753. var r2;
  5754. var i = 0;
  5755. for (; i < str.length; ) {
  5756. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  5757. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  5758. }
  5759. return result;
  5760. };
  5761. } else {
  5762. realAtob = atob;
  5763. }
  5764. function b64DecodeUnicode(str) {
  5765. return decodeURIComponent(realAtob(str).split("").map(function(c) {
  5766. return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
  5767. }).join(""));
  5768. }
  5769. function getCurrentUserInfo() {
  5770. const token = index$1.getStorageSync("uni_id_token") || "";
  5771. const tokenArr = token.split(".");
  5772. if (!token || tokenArr.length !== 3) {
  5773. return {
  5774. uid: null,
  5775. role: [],
  5776. permission: [],
  5777. tokenExpired: 0
  5778. };
  5779. }
  5780. let userInfo;
  5781. try {
  5782. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  5783. } catch (error2) {
  5784. throw new Error("获取当前用户信息出错,详细错误信息为:" + error2.message);
  5785. }
  5786. userInfo.tokenExpired = userInfo.exp * 1e3;
  5787. delete userInfo.exp;
  5788. delete userInfo.iat;
  5789. return userInfo;
  5790. }
  5791. function uniIdMixin(globalProperties) {
  5792. globalProperties.uniIDHasRole = function(roleId) {
  5793. const { role } = getCurrentUserInfo();
  5794. return role.indexOf(roleId) > -1;
  5795. };
  5796. globalProperties.uniIDHasPermission = function(permissionId) {
  5797. const { permission } = getCurrentUserInfo();
  5798. return this.uniIDHasRole("admin") || permission.indexOf(permissionId) > -1;
  5799. };
  5800. globalProperties.uniIDTokenValid = function() {
  5801. const { tokenExpired } = getCurrentUserInfo();
  5802. return tokenExpired > Date.now();
  5803. };
  5804. }
  5805. function initApp(app) {
  5806. const appConfig = app._context.config;
  5807. appConfig.errorHandler = invokeCreateErrorHandler(app, createErrorHandler);
  5808. initOptionMergeStrategies(appConfig.optionMergeStrategies);
  5809. const globalProperties = appConfig.globalProperties;
  5810. {
  5811. uniIdMixin(globalProperties);
  5812. }
  5813. {
  5814. globalProperties.$set = set;
  5815. globalProperties.$applyOptions = applyOptions$2;
  5816. }
  5817. {
  5818. index$1.invokeCreateVueAppHook(app);
  5819. }
  5820. }
  5821. const propsCaches = /* @__PURE__ */ Object.create(null);
  5822. function renderProps(props2) {
  5823. const { uid: uid2, __counter } = getCurrentInstance();
  5824. const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props2)) - 1;
  5825. return uid2 + "," + propsId + "," + __counter;
  5826. }
  5827. function pruneComponentPropsCache(uid2) {
  5828. delete propsCaches[uid2];
  5829. }
  5830. function findComponentPropsData(up) {
  5831. if (!up) {
  5832. return;
  5833. }
  5834. const [uid2, propsId] = up.split(",");
  5835. if (!propsCaches[uid2]) {
  5836. return;
  5837. }
  5838. return propsCaches[uid2][parseInt(propsId)];
  5839. }
  5840. var plugin = {
  5841. install(app) {
  5842. initApp(app);
  5843. app.config.globalProperties.pruneComponentPropsCache = pruneComponentPropsCache;
  5844. const oldMount = app.mount;
  5845. app.mount = function mount(rootContainer) {
  5846. const instance = oldMount.call(app, rootContainer);
  5847. const createApp2 = getCreateApp();
  5848. if (createApp2) {
  5849. createApp2(instance);
  5850. } else {
  5851. if (typeof createMiniProgramApp !== "undefined") {
  5852. createMiniProgramApp(instance);
  5853. }
  5854. }
  5855. return instance;
  5856. };
  5857. }
  5858. };
  5859. function getCreateApp() {
  5860. const method = "createApp";
  5861. if (typeof global !== "undefined") {
  5862. return global[method];
  5863. } else if (typeof my !== "undefined") {
  5864. return my[method];
  5865. }
  5866. }
  5867. function vOn(value, key) {
  5868. const instance = getCurrentInstance();
  5869. const ctx = instance.ctx;
  5870. const extraKey = typeof key !== "undefined" && (ctx.$mpPlatform === "mp-weixin" || ctx.$mpPlatform === "mp-qq") && (isString(key) || typeof key === "number") ? "_" + key : "";
  5871. const name = "e" + instance.$ei++ + extraKey;
  5872. const mpInstance = ctx.$scope;
  5873. if (!value) {
  5874. delete mpInstance[name];
  5875. return name;
  5876. }
  5877. const existingInvoker = mpInstance[name];
  5878. if (existingInvoker) {
  5879. existingInvoker.value = value;
  5880. } else {
  5881. mpInstance[name] = createInvoker(value, instance);
  5882. }
  5883. return name;
  5884. }
  5885. function createInvoker(initialValue, instance) {
  5886. const invoker = (e2) => {
  5887. patchMPEvent(e2);
  5888. let args = [e2];
  5889. if (e2.detail && e2.detail.__args__) {
  5890. args = e2.detail.__args__;
  5891. }
  5892. const eventValue = invoker.value;
  5893. const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
  5894. const eventTarget = e2.target;
  5895. const eventSync = eventTarget ? eventTarget.dataset ? String(eventTarget.dataset.eventsync) === "true" : false : false;
  5896. if (bubbles.includes(e2.type) && !eventSync) {
  5897. setTimeout(invoke);
  5898. } else {
  5899. const res = invoke();
  5900. if (e2.type === "input" && (isArray$1(res) || isPromise(res))) {
  5901. return;
  5902. }
  5903. return res;
  5904. }
  5905. };
  5906. invoker.value = initialValue;
  5907. return invoker;
  5908. }
  5909. const bubbles = [
  5910. // touch事件暂不做延迟,否则在 Android 上会影响性能,比如一些拖拽跟手手势等
  5911. // 'touchstart',
  5912. // 'touchmove',
  5913. // 'touchcancel',
  5914. // 'touchend',
  5915. "tap",
  5916. "longpress",
  5917. "longtap",
  5918. "transitionend",
  5919. "animationstart",
  5920. "animationiteration",
  5921. "animationend",
  5922. "touchforcechange"
  5923. ];
  5924. function patchMPEvent(event) {
  5925. if (event.type && event.target) {
  5926. event.preventDefault = NOOP;
  5927. event.stopPropagation = NOOP;
  5928. event.stopImmediatePropagation = NOOP;
  5929. if (!hasOwn(event, "detail")) {
  5930. event.detail = {};
  5931. }
  5932. if (hasOwn(event, "markerId")) {
  5933. event.detail = typeof event.detail === "object" ? event.detail : {};
  5934. event.detail.markerId = event.markerId;
  5935. }
  5936. if (isPlainObject$1(event.detail) && hasOwn(event.detail, "checked") && !hasOwn(event.detail, "value")) {
  5937. event.detail.value = event.detail.checked;
  5938. }
  5939. if (isPlainObject$1(event.detail)) {
  5940. event.target = extend({}, event.target, event.detail);
  5941. }
  5942. }
  5943. }
  5944. function patchStopImmediatePropagation(e2, value) {
  5945. if (isArray$1(value)) {
  5946. const originalStop = e2.stopImmediatePropagation;
  5947. e2.stopImmediatePropagation = () => {
  5948. originalStop && originalStop.call(e2);
  5949. e2._stopped = true;
  5950. };
  5951. return value.map((fn) => (e3) => !e3._stopped && fn(e3));
  5952. } else {
  5953. return value;
  5954. }
  5955. }
  5956. function vFor(source, renderItem) {
  5957. let ret;
  5958. if (isArray$1(source) || isString(source)) {
  5959. ret = new Array(source.length);
  5960. for (let i = 0, l = source.length; i < l; i++) {
  5961. ret[i] = renderItem(source[i], i, i);
  5962. }
  5963. } else if (typeof source === "number") {
  5964. if (!Number.isInteger(source)) {
  5965. warn(`The v-for range expect an integer value but got ${source}.`);
  5966. return [];
  5967. }
  5968. ret = new Array(source);
  5969. for (let i = 0; i < source; i++) {
  5970. ret[i] = renderItem(i + 1, i, i);
  5971. }
  5972. } else if (isObject$1(source)) {
  5973. if (source[Symbol.iterator]) {
  5974. ret = Array.from(source, (item, i) => renderItem(item, i, i));
  5975. } else {
  5976. const keys = Object.keys(source);
  5977. ret = new Array(keys.length);
  5978. for (let i = 0, l = keys.length; i < l; i++) {
  5979. const key = keys[i];
  5980. ret[i] = renderItem(source[key], key, i);
  5981. }
  5982. }
  5983. } else {
  5984. ret = [];
  5985. }
  5986. return ret;
  5987. }
  5988. function stringifyStyle(value) {
  5989. if (isString(value)) {
  5990. return value;
  5991. }
  5992. return stringify(normalizeStyle(value));
  5993. }
  5994. function stringify(styles) {
  5995. let ret = "";
  5996. if (!styles || isString(styles)) {
  5997. return ret;
  5998. }
  5999. for (const key in styles) {
  6000. ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`;
  6001. }
  6002. return ret;
  6003. }
  6004. const o = (value, key) => vOn(value, key);
  6005. const f = (source, renderItem) => vFor(source, renderItem);
  6006. const s = (value) => stringifyStyle(value);
  6007. const e = (target, ...sources) => extend(target, ...sources);
  6008. const n = (value) => normalizeClass(value);
  6009. const t = (val) => toDisplayString(val);
  6010. const p = (props2) => renderProps(props2);
  6011. function createApp$1(rootComponent, rootProps = null) {
  6012. rootComponent && (rootComponent.mpType = "app");
  6013. return createVueApp(rootComponent, rootProps).use(plugin);
  6014. }
  6015. const createSSRApp = createApp$1;
  6016. const MP_METHODS = [
  6017. "createSelectorQuery",
  6018. "createIntersectionObserver",
  6019. "selectAllComponents",
  6020. "selectComponent"
  6021. ];
  6022. function createEmitFn(oldEmit, ctx) {
  6023. return function emit2(event, ...args) {
  6024. const scope = ctx.$scope;
  6025. if (scope && event) {
  6026. const detail = { __args__: args };
  6027. {
  6028. scope.triggerEvent(event, detail);
  6029. }
  6030. }
  6031. return oldEmit.apply(this, [event, ...args]);
  6032. };
  6033. }
  6034. function initBaseInstance(instance, options) {
  6035. const ctx = instance.ctx;
  6036. ctx.mpType = options.mpType;
  6037. ctx.$mpType = options.mpType;
  6038. ctx.$mpPlatform = "mp-weixin";
  6039. ctx.$scope = options.mpInstance;
  6040. ctx.$mp = {};
  6041. {
  6042. ctx._self = {};
  6043. }
  6044. instance.slots = {};
  6045. if (isArray$1(options.slots) && options.slots.length) {
  6046. options.slots.forEach((name) => {
  6047. instance.slots[name] = true;
  6048. });
  6049. if (instance.slots[SLOT_DEFAULT_NAME]) {
  6050. instance.slots.default = true;
  6051. }
  6052. }
  6053. ctx.getOpenerEventChannel = function() {
  6054. {
  6055. return options.mpInstance.getOpenerEventChannel();
  6056. }
  6057. };
  6058. ctx.$hasHook = hasHook;
  6059. ctx.$callHook = callHook;
  6060. instance.emit = createEmitFn(instance.emit, ctx);
  6061. }
  6062. function initComponentInstance(instance, options) {
  6063. initBaseInstance(instance, options);
  6064. const ctx = instance.ctx;
  6065. MP_METHODS.forEach((method) => {
  6066. ctx[method] = function(...args) {
  6067. const mpInstance = ctx.$scope;
  6068. if (mpInstance && mpInstance[method]) {
  6069. return mpInstance[method].apply(mpInstance, args);
  6070. }
  6071. };
  6072. });
  6073. }
  6074. function initMocks(instance, mpInstance, mocks2) {
  6075. const ctx = instance.ctx;
  6076. mocks2.forEach((mock) => {
  6077. if (hasOwn(mpInstance, mock)) {
  6078. instance[mock] = ctx[mock] = mpInstance[mock];
  6079. }
  6080. });
  6081. }
  6082. function hasHook(name) {
  6083. const hooks = this.$[name];
  6084. if (hooks && hooks.length) {
  6085. return true;
  6086. }
  6087. return false;
  6088. }
  6089. function callHook(name, args) {
  6090. if (name === "mounted") {
  6091. callHook.call(this, "bm");
  6092. this.$.isMounted = true;
  6093. name = "m";
  6094. }
  6095. const hooks = this.$[name];
  6096. return hooks && invokeArrayFns(hooks, args);
  6097. }
  6098. const PAGE_INIT_HOOKS = [
  6099. ON_LOAD,
  6100. ON_SHOW,
  6101. ON_HIDE,
  6102. ON_UNLOAD,
  6103. ON_RESIZE,
  6104. ON_TAB_ITEM_TAP,
  6105. ON_REACH_BOTTOM,
  6106. ON_PULL_DOWN_REFRESH,
  6107. ON_ADD_TO_FAVORITES
  6108. // 'onReady', // lifetimes.ready
  6109. // 'onPageScroll', // 影响性能,开发者手动注册
  6110. // 'onShareTimeline', // 右上角菜单,开发者手动注册
  6111. // 'onShareAppMessage' // 右上角菜单,开发者手动注册
  6112. ];
  6113. function findHooks(vueOptions, hooks = /* @__PURE__ */ new Set()) {
  6114. if (vueOptions) {
  6115. Object.keys(vueOptions).forEach((name) => {
  6116. if (isUniLifecycleHook(name, vueOptions[name])) {
  6117. hooks.add(name);
  6118. }
  6119. });
  6120. {
  6121. const { extends: extendsOptions, mixins } = vueOptions;
  6122. if (mixins) {
  6123. mixins.forEach((mixin2) => findHooks(mixin2, hooks));
  6124. }
  6125. if (extendsOptions) {
  6126. findHooks(extendsOptions, hooks);
  6127. }
  6128. }
  6129. }
  6130. return hooks;
  6131. }
  6132. function initHook(mpOptions, hook, excludes) {
  6133. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  6134. mpOptions[hook] = function(args) {
  6135. return this.$vm && this.$vm.$callHook(hook, args);
  6136. };
  6137. }
  6138. }
  6139. const EXCLUDE_HOOKS = [ON_READY];
  6140. function initHooks(mpOptions, hooks, excludes = EXCLUDE_HOOKS) {
  6141. hooks.forEach((hook) => initHook(mpOptions, hook, excludes));
  6142. }
  6143. function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
  6144. findHooks(vueOptions).forEach((hook) => initHook(mpOptions, hook, excludes));
  6145. }
  6146. function initRuntimeHooks(mpOptions, runtimeHooks) {
  6147. if (!runtimeHooks) {
  6148. return;
  6149. }
  6150. const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6151. hooks.forEach((hook) => {
  6152. if (runtimeHooks & MINI_PROGRAM_PAGE_RUNTIME_HOOKS[hook]) {
  6153. initHook(mpOptions, hook, []);
  6154. }
  6155. });
  6156. }
  6157. const findMixinRuntimeHooks = /* @__PURE__ */ once(() => {
  6158. const runtimeHooks = [];
  6159. const app = isFunction(getApp) && getApp({ allowDefault: true });
  6160. if (app && app.$vm && app.$vm.$) {
  6161. const mixins = app.$vm.$.appContext.mixins;
  6162. if (isArray$1(mixins)) {
  6163. const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6164. mixins.forEach((mixin2) => {
  6165. hooks.forEach((hook) => {
  6166. if (hasOwn(mixin2, hook) && !runtimeHooks.includes(hook)) {
  6167. runtimeHooks.push(hook);
  6168. }
  6169. });
  6170. });
  6171. }
  6172. }
  6173. return runtimeHooks;
  6174. });
  6175. function initMixinRuntimeHooks(mpOptions) {
  6176. initHooks(mpOptions, findMixinRuntimeHooks());
  6177. }
  6178. const HOOKS = [
  6179. ON_SHOW,
  6180. ON_HIDE,
  6181. ON_ERROR,
  6182. ON_THEME_CHANGE,
  6183. ON_PAGE_NOT_FOUND,
  6184. ON_UNHANDLE_REJECTION
  6185. ];
  6186. function parseApp(instance, parseAppOptions) {
  6187. const internalInstance = instance.$;
  6188. const appOptions = {
  6189. globalData: instance.$options && instance.$options.globalData || {},
  6190. $vm: instance,
  6191. onLaunch(options) {
  6192. this.$vm = instance;
  6193. const ctx = internalInstance.ctx;
  6194. if (this.$vm && ctx.$scope) {
  6195. return;
  6196. }
  6197. initBaseInstance(internalInstance, {
  6198. mpType: "app",
  6199. mpInstance: this,
  6200. slots: []
  6201. });
  6202. ctx.globalData = this.globalData;
  6203. instance.$callHook(ON_LAUNCH, options);
  6204. }
  6205. };
  6206. initLocale(instance);
  6207. const vueOptions = instance.$.type;
  6208. initHooks(appOptions, HOOKS);
  6209. initUnknownHooks(appOptions, vueOptions);
  6210. {
  6211. const methods = vueOptions.methods;
  6212. methods && extend(appOptions, methods);
  6213. }
  6214. if (parseAppOptions) {
  6215. parseAppOptions.parse(appOptions);
  6216. }
  6217. return appOptions;
  6218. }
  6219. function initCreateApp(parseAppOptions) {
  6220. return function createApp2(vm) {
  6221. return App(parseApp(vm, parseAppOptions));
  6222. };
  6223. }
  6224. function initCreateSubpackageApp(parseAppOptions) {
  6225. return function createApp2(vm) {
  6226. const appOptions = parseApp(vm, parseAppOptions);
  6227. const app = isFunction(getApp) && getApp({
  6228. allowDefault: true
  6229. });
  6230. if (!app)
  6231. return;
  6232. vm.$.ctx.$scope = app;
  6233. const globalData = app.globalData;
  6234. if (globalData) {
  6235. Object.keys(appOptions.globalData).forEach((name) => {
  6236. if (!hasOwn(globalData, name)) {
  6237. globalData[name] = appOptions.globalData[name];
  6238. }
  6239. });
  6240. }
  6241. Object.keys(appOptions).forEach((name) => {
  6242. if (!hasOwn(app, name)) {
  6243. app[name] = appOptions[name];
  6244. }
  6245. });
  6246. initAppLifecycle(appOptions, vm);
  6247. };
  6248. }
  6249. function initAppLifecycle(appOptions, vm) {
  6250. if (isFunction(appOptions.onLaunch)) {
  6251. const args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  6252. appOptions.onLaunch(args);
  6253. }
  6254. if (isFunction(appOptions.onShow) && wx.onAppShow) {
  6255. wx.onAppShow((args) => {
  6256. vm.$callHook("onShow", args);
  6257. });
  6258. }
  6259. if (isFunction(appOptions.onHide) && wx.onAppHide) {
  6260. wx.onAppHide((args) => {
  6261. vm.$callHook("onHide", args);
  6262. });
  6263. }
  6264. }
  6265. function initLocale(appVm) {
  6266. const locale = ref(normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  6267. Object.defineProperty(appVm, "$locale", {
  6268. get() {
  6269. return locale.value;
  6270. },
  6271. set(v) {
  6272. locale.value = v;
  6273. }
  6274. });
  6275. }
  6276. function initVueIds(vueIds, mpInstance) {
  6277. if (!vueIds) {
  6278. return;
  6279. }
  6280. const ids = vueIds.split(",");
  6281. const len = ids.length;
  6282. if (len === 1) {
  6283. mpInstance._$vueId = ids[0];
  6284. } else if (len === 2) {
  6285. mpInstance._$vueId = ids[0];
  6286. mpInstance._$vuePid = ids[1];
  6287. }
  6288. }
  6289. const EXTRAS = ["externalClasses"];
  6290. function initExtraOptions(miniProgramComponentOptions, vueOptions) {
  6291. EXTRAS.forEach((name) => {
  6292. if (hasOwn(vueOptions, name)) {
  6293. miniProgramComponentOptions[name] = vueOptions[name];
  6294. }
  6295. });
  6296. }
  6297. const WORKLET_RE = /_(.*)_worklet_factory_/;
  6298. function initWorkletMethods(mpMethods, vueMethods) {
  6299. if (vueMethods) {
  6300. Object.keys(vueMethods).forEach((name) => {
  6301. const matches = name.match(WORKLET_RE);
  6302. if (matches) {
  6303. const workletName = matches[1];
  6304. mpMethods[name] = vueMethods[name];
  6305. mpMethods[workletName] = vueMethods[workletName];
  6306. }
  6307. });
  6308. }
  6309. }
  6310. function initWxsCallMethods(methods, wxsCallMethods) {
  6311. if (!isArray$1(wxsCallMethods)) {
  6312. return;
  6313. }
  6314. wxsCallMethods.forEach((callMethod) => {
  6315. methods[callMethod] = function(args) {
  6316. return this.$vm[callMethod](args);
  6317. };
  6318. });
  6319. }
  6320. function selectAllComponents(mpInstance, selector, $refs) {
  6321. const components = mpInstance.selectAllComponents(selector);
  6322. components.forEach((component) => {
  6323. const ref2 = component.properties.uR;
  6324. $refs[ref2] = component.$vm || component;
  6325. });
  6326. }
  6327. function initRefs(instance, mpInstance) {
  6328. Object.defineProperty(instance, "refs", {
  6329. get() {
  6330. const $refs = {};
  6331. selectAllComponents(mpInstance, ".r", $refs);
  6332. const forComponents = mpInstance.selectAllComponents(".r-i-f");
  6333. forComponents.forEach((component) => {
  6334. const ref2 = component.properties.uR;
  6335. if (!ref2) {
  6336. return;
  6337. }
  6338. if (!$refs[ref2]) {
  6339. $refs[ref2] = [];
  6340. }
  6341. $refs[ref2].push(component.$vm || component);
  6342. });
  6343. return $refs;
  6344. }
  6345. });
  6346. }
  6347. function findVmByVueId(instance, vuePid) {
  6348. const $children = instance.$children;
  6349. for (let i = $children.length - 1; i >= 0; i--) {
  6350. const childVm = $children[i];
  6351. if (childVm.$scope._$vueId === vuePid) {
  6352. return childVm;
  6353. }
  6354. }
  6355. let parentVm;
  6356. for (let i = $children.length - 1; i >= 0; i--) {
  6357. parentVm = findVmByVueId($children[i], vuePid);
  6358. if (parentVm) {
  6359. return parentVm;
  6360. }
  6361. }
  6362. }
  6363. const builtInProps = [
  6364. // 百度小程序,快手小程序自定义组件不支持绑定动态事件,动态dataset,故通过props传递事件信息
  6365. // event-opts
  6366. "eO",
  6367. // 组件 ref
  6368. "uR",
  6369. // 组件 ref-in-for
  6370. "uRIF",
  6371. // 组件 id
  6372. "uI",
  6373. // 组件类型 m: 小程序组件
  6374. "uT",
  6375. // 组件 props
  6376. "uP",
  6377. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  6378. "uS"
  6379. ];
  6380. function initDefaultProps(options, isBehavior = false) {
  6381. const properties = {};
  6382. if (!isBehavior) {
  6383. builtInProps.forEach((name) => {
  6384. properties[name] = {
  6385. type: null,
  6386. value: ""
  6387. };
  6388. });
  6389. properties.uS = {
  6390. type: null,
  6391. value: [],
  6392. observer: function(newVal) {
  6393. const $slots = /* @__PURE__ */ Object.create(null);
  6394. newVal && newVal.forEach((slotName) => {
  6395. $slots[slotName] = true;
  6396. });
  6397. this.setData({
  6398. $slots
  6399. });
  6400. }
  6401. };
  6402. }
  6403. if (options.behaviors) {
  6404. if (options.behaviors.includes("wx://form-field")) {
  6405. if (!options.properties || !options.properties.name) {
  6406. properties.name = {
  6407. type: null,
  6408. value: ""
  6409. };
  6410. }
  6411. if (!options.properties || !options.properties.value) {
  6412. properties.value = {
  6413. type: null,
  6414. value: ""
  6415. };
  6416. }
  6417. }
  6418. }
  6419. return properties;
  6420. }
  6421. function initVirtualHostProps(options) {
  6422. const properties = {};
  6423. {
  6424. if (options && options.virtualHost) {
  6425. properties.virtualHostStyle = {
  6426. type: null,
  6427. value: ""
  6428. };
  6429. properties.virtualHostClass = {
  6430. type: null,
  6431. value: ""
  6432. };
  6433. }
  6434. }
  6435. return properties;
  6436. }
  6437. function initProps(mpComponentOptions) {
  6438. if (!mpComponentOptions.properties) {
  6439. mpComponentOptions.properties = {};
  6440. }
  6441. extend(mpComponentOptions.properties, initDefaultProps(mpComponentOptions), initVirtualHostProps(mpComponentOptions.options));
  6442. }
  6443. const PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  6444. function parsePropType(type, defaultValue) {
  6445. if (isArray$1(type) && type.length === 1) {
  6446. return type[0];
  6447. }
  6448. return type;
  6449. }
  6450. function normalizePropType(type, defaultValue) {
  6451. const res = parsePropType(type);
  6452. return PROP_TYPES.indexOf(res) !== -1 ? res : null;
  6453. }
  6454. function initPageProps({ properties }, rawProps) {
  6455. if (isArray$1(rawProps)) {
  6456. rawProps.forEach((key) => {
  6457. properties[key] = {
  6458. type: String,
  6459. value: ""
  6460. };
  6461. });
  6462. } else if (isPlainObject$1(rawProps)) {
  6463. Object.keys(rawProps).forEach((key) => {
  6464. const opts = rawProps[key];
  6465. if (isPlainObject$1(opts)) {
  6466. let value = opts.default;
  6467. if (isFunction(value)) {
  6468. value = value();
  6469. }
  6470. const type = opts.type;
  6471. opts.type = normalizePropType(type);
  6472. properties[key] = {
  6473. type: opts.type,
  6474. value
  6475. };
  6476. } else {
  6477. properties[key] = {
  6478. type: normalizePropType(opts)
  6479. };
  6480. }
  6481. });
  6482. }
  6483. }
  6484. function findPropsData(properties, isPage2) {
  6485. return (isPage2 ? findPagePropsData(properties) : findComponentPropsData(properties.uP)) || {};
  6486. }
  6487. function findPagePropsData(properties) {
  6488. const propsData = {};
  6489. if (isPlainObject$1(properties)) {
  6490. Object.keys(properties).forEach((name) => {
  6491. if (builtInProps.indexOf(name) === -1) {
  6492. propsData[name] = properties[name];
  6493. }
  6494. });
  6495. }
  6496. return propsData;
  6497. }
  6498. function initFormField(vm) {
  6499. const vueOptions = vm.$options;
  6500. if (isArray$1(vueOptions.behaviors) && vueOptions.behaviors.includes("uni://form-field")) {
  6501. vm.$watch("modelValue", () => {
  6502. vm.$scope && vm.$scope.setData({
  6503. name: vm.name,
  6504. value: vm.modelValue
  6505. });
  6506. }, {
  6507. immediate: true
  6508. });
  6509. }
  6510. }
  6511. function initData(_) {
  6512. return {};
  6513. }
  6514. function initPropsObserver(componentOptions) {
  6515. const observe = function observe2() {
  6516. const up = this.properties.uP;
  6517. if (!up) {
  6518. return;
  6519. }
  6520. if (this.$vm) {
  6521. updateComponentProps(up, this.$vm.$);
  6522. } else if (this.properties.uT === "m") {
  6523. updateMiniProgramComponentProperties(up, this);
  6524. }
  6525. };
  6526. {
  6527. if (!componentOptions.observers) {
  6528. componentOptions.observers = {};
  6529. }
  6530. componentOptions.observers.uP = observe;
  6531. }
  6532. }
  6533. function updateMiniProgramComponentProperties(up, mpInstance) {
  6534. const prevProps = mpInstance.properties;
  6535. const nextProps = findComponentPropsData(up) || {};
  6536. if (hasPropsChanged(prevProps, nextProps, false)) {
  6537. mpInstance.setData(nextProps);
  6538. }
  6539. }
  6540. function updateComponentProps(up, instance) {
  6541. const prevProps = toRaw(instance.props);
  6542. const nextProps = findComponentPropsData(up) || {};
  6543. if (hasPropsChanged(prevProps, nextProps)) {
  6544. updateProps(instance, nextProps, prevProps, false);
  6545. if (hasQueueJob(instance.update)) {
  6546. invalidateJob(instance.update);
  6547. }
  6548. {
  6549. instance.update();
  6550. }
  6551. }
  6552. }
  6553. function hasPropsChanged(prevProps, nextProps, checkLen = true) {
  6554. const nextKeys = Object.keys(nextProps);
  6555. if (checkLen && nextKeys.length !== Object.keys(prevProps).length) {
  6556. return true;
  6557. }
  6558. for (let i = 0; i < nextKeys.length; i++) {
  6559. const key = nextKeys[i];
  6560. if (nextProps[key] !== prevProps[key]) {
  6561. return true;
  6562. }
  6563. }
  6564. return false;
  6565. }
  6566. function initBehaviors(vueOptions) {
  6567. const vueBehaviors = vueOptions.behaviors;
  6568. let vueProps = vueOptions.props;
  6569. if (!vueProps) {
  6570. vueOptions.props = vueProps = [];
  6571. }
  6572. const behaviors = [];
  6573. if (isArray$1(vueBehaviors)) {
  6574. vueBehaviors.forEach((behavior) => {
  6575. behaviors.push(behavior.replace("uni://", "wx://"));
  6576. if (behavior === "uni://form-field") {
  6577. if (isArray$1(vueProps)) {
  6578. vueProps.push("name");
  6579. vueProps.push("modelValue");
  6580. } else {
  6581. vueProps.name = {
  6582. type: String,
  6583. default: ""
  6584. };
  6585. vueProps.modelValue = {
  6586. type: [String, Number, Boolean, Array, Object, Date],
  6587. default: ""
  6588. };
  6589. }
  6590. }
  6591. });
  6592. }
  6593. return behaviors;
  6594. }
  6595. function applyOptions(componentOptions, vueOptions) {
  6596. componentOptions.data = initData();
  6597. componentOptions.behaviors = initBehaviors(vueOptions);
  6598. }
  6599. function parseComponent(vueOptions, { parse, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 }) {
  6600. vueOptions = vueOptions.default || vueOptions;
  6601. const options = {
  6602. multipleSlots: true,
  6603. // styleIsolation: 'apply-shared',
  6604. addGlobalClass: true,
  6605. pureDataPattern: /^uP$/
  6606. };
  6607. if (isArray$1(vueOptions.mixins)) {
  6608. vueOptions.mixins.forEach((item) => {
  6609. if (isObject$1(item.options)) {
  6610. extend(options, item.options);
  6611. }
  6612. });
  6613. }
  6614. if (vueOptions.options) {
  6615. extend(options, vueOptions.options);
  6616. }
  6617. const mpComponentOptions = {
  6618. options,
  6619. lifetimes: initLifetimes2({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }),
  6620. pageLifetimes: {
  6621. show() {
  6622. this.$vm && this.$vm.$callHook("onPageShow");
  6623. },
  6624. hide() {
  6625. this.$vm && this.$vm.$callHook("onPageHide");
  6626. },
  6627. resize(size2) {
  6628. this.$vm && this.$vm.$callHook("onPageResize", size2);
  6629. }
  6630. },
  6631. methods: {
  6632. __l: handleLink2
  6633. }
  6634. };
  6635. {
  6636. applyOptions(mpComponentOptions, vueOptions);
  6637. }
  6638. initProps(mpComponentOptions);
  6639. initPropsObserver(mpComponentOptions);
  6640. initExtraOptions(mpComponentOptions, vueOptions);
  6641. initWxsCallMethods(mpComponentOptions.methods, vueOptions.wxsCallMethods);
  6642. {
  6643. initWorkletMethods(mpComponentOptions.methods, vueOptions.methods);
  6644. }
  6645. if (parse) {
  6646. parse(mpComponentOptions, { handleLink: handleLink2 });
  6647. }
  6648. return mpComponentOptions;
  6649. }
  6650. function initCreateComponent(parseOptions2) {
  6651. return function createComponent2(vueComponentOptions) {
  6652. return Component(parseComponent(vueComponentOptions, parseOptions2));
  6653. };
  6654. }
  6655. let $createComponentFn;
  6656. let $destroyComponentFn;
  6657. function getAppVm() {
  6658. return getApp().$vm;
  6659. }
  6660. function $createComponent(initialVNode, options) {
  6661. if (!$createComponentFn) {
  6662. $createComponentFn = getAppVm().$createComponent;
  6663. }
  6664. const proxy = $createComponentFn(initialVNode, options);
  6665. return getExposeProxy(proxy.$) || proxy;
  6666. }
  6667. function $destroyComponent(instance) {
  6668. if (!$destroyComponentFn) {
  6669. $destroyComponentFn = getAppVm().$destroyComponent;
  6670. }
  6671. return $destroyComponentFn(instance);
  6672. }
  6673. function parsePage(vueOptions, parseOptions2) {
  6674. const { parse, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 } = parseOptions2;
  6675. const miniProgramPageOptions = parseComponent(vueOptions, {
  6676. mocks: mocks2,
  6677. isPage: isPage2,
  6678. initRelation: initRelation2,
  6679. handleLink: handleLink2,
  6680. initLifetimes: initLifetimes2
  6681. });
  6682. initPageProps(miniProgramPageOptions, (vueOptions.default || vueOptions).props);
  6683. const methods = miniProgramPageOptions.methods;
  6684. methods.onLoad = function(query) {
  6685. this.options = query;
  6686. this.$page = {
  6687. fullPath: addLeadingSlash(this.route + stringifyQuery(query))
  6688. };
  6689. return this.$vm && this.$vm.$callHook(ON_LOAD, query);
  6690. };
  6691. initHooks(methods, PAGE_INIT_HOOKS);
  6692. {
  6693. initUnknownHooks(methods, vueOptions);
  6694. }
  6695. initRuntimeHooks(methods, vueOptions.__runtimeHooks);
  6696. initMixinRuntimeHooks(methods);
  6697. parse && parse(miniProgramPageOptions, { handleLink: handleLink2 });
  6698. return miniProgramPageOptions;
  6699. }
  6700. function initCreatePage(parseOptions2) {
  6701. return function createPage2(vuePageOptions) {
  6702. return Component(parsePage(vuePageOptions, parseOptions2));
  6703. };
  6704. }
  6705. function initCreatePluginApp(parseAppOptions) {
  6706. return function createApp2(vm) {
  6707. initAppLifecycle(parseApp(vm, parseAppOptions), vm);
  6708. };
  6709. }
  6710. const MPPage = Page;
  6711. const MPComponent = Component;
  6712. function initTriggerEvent(mpInstance) {
  6713. const oldTriggerEvent = mpInstance.triggerEvent;
  6714. const newTriggerEvent = function(event, ...args) {
  6715. return oldTriggerEvent.apply(mpInstance, [customizeEvent(event), ...args]);
  6716. };
  6717. try {
  6718. mpInstance.triggerEvent = newTriggerEvent;
  6719. } catch (error2) {
  6720. mpInstance._triggerEvent = newTriggerEvent;
  6721. }
  6722. }
  6723. function initMiniProgramHook(name, options, isComponent) {
  6724. const oldHook = options[name];
  6725. if (!oldHook) {
  6726. options[name] = function() {
  6727. initTriggerEvent(this);
  6728. };
  6729. } else {
  6730. options[name] = function(...args) {
  6731. initTriggerEvent(this);
  6732. return oldHook.apply(this, args);
  6733. };
  6734. }
  6735. }
  6736. Page = function(options) {
  6737. initMiniProgramHook(ON_LOAD, options);
  6738. return MPPage(options);
  6739. };
  6740. Component = function(options) {
  6741. initMiniProgramHook("created", options);
  6742. const isVueComponent = options.properties && options.properties.uP;
  6743. if (!isVueComponent) {
  6744. initProps(options);
  6745. initPropsObserver(options);
  6746. }
  6747. return MPComponent(options);
  6748. };
  6749. function initLifetimes({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }) {
  6750. return {
  6751. attached() {
  6752. let properties = this.properties;
  6753. initVueIds(properties.uI, this);
  6754. const relationOptions = {
  6755. vuePid: this._$vuePid
  6756. };
  6757. initRelation2(this, relationOptions);
  6758. const mpInstance = this;
  6759. const isMiniProgramPage = isPage2(mpInstance);
  6760. let propsData = properties;
  6761. this.$vm = $createComponent({
  6762. type: vueOptions,
  6763. props: findPropsData(propsData, isMiniProgramPage)
  6764. }, {
  6765. mpType: isMiniProgramPage ? "page" : "component",
  6766. mpInstance,
  6767. slots: properties.uS || {},
  6768. parentComponent: relationOptions.parent && relationOptions.parent.$,
  6769. onBeforeSetup(instance, options) {
  6770. initRefs(instance, mpInstance);
  6771. initMocks(instance, mpInstance, mocks2);
  6772. initComponentInstance(instance, options);
  6773. }
  6774. });
  6775. if (!isMiniProgramPage) {
  6776. initFormField(this.$vm);
  6777. }
  6778. },
  6779. ready() {
  6780. if (this.$vm) {
  6781. {
  6782. this.$vm.$callHook("mounted");
  6783. this.$vm.$callHook(ON_READY);
  6784. }
  6785. }
  6786. },
  6787. detached() {
  6788. if (this.$vm) {
  6789. pruneComponentPropsCache(this.$vm.$.uid);
  6790. $destroyComponent(this.$vm);
  6791. }
  6792. }
  6793. };
  6794. }
  6795. const mocks = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  6796. function isPage(mpInstance) {
  6797. return !!mpInstance.route;
  6798. }
  6799. function initRelation(mpInstance, detail) {
  6800. mpInstance.triggerEvent("__l", detail);
  6801. }
  6802. function handleLink(event) {
  6803. const detail = event.detail || event.value;
  6804. const vuePid = detail.vuePid;
  6805. let parentVm;
  6806. if (vuePid) {
  6807. parentVm = findVmByVueId(this.$vm, vuePid);
  6808. }
  6809. if (!parentVm) {
  6810. parentVm = this.$vm;
  6811. }
  6812. detail.parent = parentVm;
  6813. }
  6814. var parseOptions = /* @__PURE__ */ Object.freeze({
  6815. __proto__: null,
  6816. handleLink,
  6817. initLifetimes,
  6818. initRelation,
  6819. isPage,
  6820. mocks
  6821. });
  6822. const createApp = initCreateApp();
  6823. const createPage = initCreatePage(parseOptions);
  6824. const createComponent = initCreateComponent(parseOptions);
  6825. const createPluginApp = initCreatePluginApp();
  6826. const createSubpackageApp = initCreateSubpackageApp();
  6827. {
  6828. wx.createApp = global.createApp = createApp;
  6829. wx.createPage = createPage;
  6830. wx.createComponent = createComponent;
  6831. wx.createPluginApp = global.createPluginApp = createPluginApp;
  6832. wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
  6833. }
  6834. function email(value) {
  6835. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  6836. }
  6837. function mobile(value) {
  6838. return /^1[23456789]\d{9}$/.test(value);
  6839. }
  6840. function url(value) {
  6841. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value);
  6842. }
  6843. function date(value) {
  6844. if (!value)
  6845. return false;
  6846. if (number(value))
  6847. value = +value;
  6848. return !/Invalid|NaN/.test(new Date(value).toString());
  6849. }
  6850. function dateISO(value) {
  6851. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  6852. }
  6853. function number(value) {
  6854. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  6855. }
  6856. function string(value) {
  6857. return typeof value === "string";
  6858. }
  6859. function digits(value) {
  6860. return /^\d+$/.test(value);
  6861. }
  6862. function idCard(value) {
  6863. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  6864. value
  6865. );
  6866. }
  6867. function carNo(value) {
  6868. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  6869. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  6870. if (value.length === 7) {
  6871. return creg.test(value);
  6872. }
  6873. if (value.length === 8) {
  6874. return xreg.test(value);
  6875. }
  6876. return false;
  6877. }
  6878. function amount(value) {
  6879. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  6880. }
  6881. function chinese(value) {
  6882. const reg = /^[\u4e00-\u9fa5]+$/gi;
  6883. return reg.test(value);
  6884. }
  6885. function letter(value) {
  6886. return /^[a-zA-Z]*$/.test(value);
  6887. }
  6888. function enOrNum(value) {
  6889. const reg = /^[0-9a-zA-Z]*$/g;
  6890. return reg.test(value);
  6891. }
  6892. function contains(value, param) {
  6893. return value.indexOf(param) >= 0;
  6894. }
  6895. function range$1(value, param) {
  6896. return value >= param[0] && value <= param[1];
  6897. }
  6898. function rangeLength(value, param) {
  6899. return value.length >= param[0] && value.length <= param[1];
  6900. }
  6901. function landline(value) {
  6902. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  6903. return reg.test(value);
  6904. }
  6905. function empty(value) {
  6906. switch (typeof value) {
  6907. case "undefined":
  6908. return true;
  6909. case "string":
  6910. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  6911. return true;
  6912. break;
  6913. case "boolean":
  6914. if (!value)
  6915. return true;
  6916. break;
  6917. case "number":
  6918. if (value === 0 || isNaN(value))
  6919. return true;
  6920. break;
  6921. case "object":
  6922. if (value === null || value.length === 0)
  6923. return true;
  6924. for (const i in value) {
  6925. return false;
  6926. }
  6927. return true;
  6928. }
  6929. return false;
  6930. }
  6931. function jsonString(value) {
  6932. if (typeof value === "string") {
  6933. try {
  6934. const obj = JSON.parse(value);
  6935. if (typeof obj === "object" && obj) {
  6936. return true;
  6937. }
  6938. return false;
  6939. } catch (e2) {
  6940. return false;
  6941. }
  6942. }
  6943. return false;
  6944. }
  6945. function array(value) {
  6946. if (typeof Array.isArray === "function") {
  6947. return Array.isArray(value);
  6948. }
  6949. return Object.prototype.toString.call(value) === "[object Array]";
  6950. }
  6951. function object(value) {
  6952. return Object.prototype.toString.call(value) === "[object Object]";
  6953. }
  6954. function code(value, len = 6) {
  6955. return new RegExp(`^\\d{${len}}$`).test(value);
  6956. }
  6957. function func(value) {
  6958. return typeof value === "function";
  6959. }
  6960. function promise(value) {
  6961. return object(value) && func(value.then) && func(value.catch);
  6962. }
  6963. function image(value) {
  6964. const newValue = value.split("?")[0];
  6965. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  6966. return IMAGE_REGEXP.test(newValue);
  6967. }
  6968. function video(value) {
  6969. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  6970. return VIDEO_REGEXP.test(value);
  6971. }
  6972. function regExp(o2) {
  6973. return o2 && Object.prototype.toString.call(o2) === "[object RegExp]";
  6974. }
  6975. const test = {
  6976. email,
  6977. mobile,
  6978. url,
  6979. date,
  6980. dateISO,
  6981. number,
  6982. digits,
  6983. idCard,
  6984. carNo,
  6985. amount,
  6986. chinese,
  6987. letter,
  6988. enOrNum,
  6989. contains,
  6990. range: range$1,
  6991. rangeLength,
  6992. empty,
  6993. isEmpty: empty,
  6994. jsonString,
  6995. landline,
  6996. object,
  6997. array,
  6998. code,
  6999. func,
  7000. promise,
  7001. video,
  7002. image,
  7003. regExp,
  7004. string
  7005. };
  7006. function strip(num, precision = 15) {
  7007. return +parseFloat(Number(num).toPrecision(precision));
  7008. }
  7009. function digitLength(num) {
  7010. const eSplit = num.toString().split(/[eE]/);
  7011. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  7012. return len > 0 ? len : 0;
  7013. }
  7014. function float2Fixed(num) {
  7015. if (num.toString().indexOf("e") === -1) {
  7016. return Number(num.toString().replace(".", ""));
  7017. }
  7018. const dLen = digitLength(num);
  7019. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  7020. }
  7021. function checkBoundary(num) {
  7022. {
  7023. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  7024. console.warn(`${num} 超出了精度限制,结果可能不正确`);
  7025. }
  7026. }
  7027. }
  7028. function iteratorOperation(arr, operation) {
  7029. const [num1, num2, ...others] = arr;
  7030. let res = operation(num1, num2);
  7031. others.forEach((num) => {
  7032. res = operation(res, num);
  7033. });
  7034. return res;
  7035. }
  7036. function times(...nums) {
  7037. if (nums.length > 2) {
  7038. return iteratorOperation(nums, times);
  7039. }
  7040. const [num1, num2] = nums;
  7041. const num1Changed = float2Fixed(num1);
  7042. const num2Changed = float2Fixed(num2);
  7043. const baseNum = digitLength(num1) + digitLength(num2);
  7044. const leftValue = num1Changed * num2Changed;
  7045. checkBoundary(leftValue);
  7046. return leftValue / Math.pow(10, baseNum);
  7047. }
  7048. function divide(...nums) {
  7049. if (nums.length > 2) {
  7050. return iteratorOperation(nums, divide);
  7051. }
  7052. const [num1, num2] = nums;
  7053. const num1Changed = float2Fixed(num1);
  7054. const num2Changed = float2Fixed(num2);
  7055. checkBoundary(num1Changed);
  7056. checkBoundary(num2Changed);
  7057. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  7058. }
  7059. function round(num, ratio) {
  7060. const base = Math.pow(10, ratio);
  7061. let result = divide(Math.round(Math.abs(times(num, base))), base);
  7062. if (num < 0 && result !== 0) {
  7063. result = times(result, -1);
  7064. }
  7065. return result;
  7066. }
  7067. const version = "3";
  7068. {
  7069. console.log(`
  7070. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  7071. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  7072. }
  7073. const config = {
  7074. v: version,
  7075. version,
  7076. // 主题名称
  7077. type: [
  7078. "primary",
  7079. "success",
  7080. "info",
  7081. "error",
  7082. "warning"
  7083. ],
  7084. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  7085. color: {
  7086. "u-primary": "#2979ff",
  7087. "u-warning": "#ff9900",
  7088. "u-success": "#19be6b",
  7089. "u-error": "#fa3534",
  7090. "u-info": "#909399",
  7091. "u-main-color": "#303133",
  7092. "u-content-color": "#606266",
  7093. "u-tips-color": "#909399",
  7094. "u-light-color": "#c0c4cc"
  7095. },
  7096. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  7097. unit: "px"
  7098. };
  7099. function range(min = 0, max = 0, value = 0) {
  7100. return Math.max(min, Math.min(max, Number(value)));
  7101. }
  7102. function getPx(value, unit = false) {
  7103. if (number(value)) {
  7104. return unit ? `${value}px` : Number(value);
  7105. }
  7106. if (/(rpx|upx)$/.test(value)) {
  7107. return unit ? `${index$1.upx2px(parseInt(value))}px` : Number(index$1.upx2px(parseInt(value)));
  7108. }
  7109. return unit ? `${parseInt(value)}px` : parseInt(value);
  7110. }
  7111. function sleep(value = 30) {
  7112. return new Promise((resolve2) => {
  7113. setTimeout(() => {
  7114. resolve2();
  7115. }, value);
  7116. });
  7117. }
  7118. function os() {
  7119. return index$1.getSystemInfoSync().platform.toLowerCase();
  7120. }
  7121. function sys() {
  7122. return index$1.getSystemInfoSync();
  7123. }
  7124. function random(min, max) {
  7125. if (min >= 0 && max > 0 && max >= min) {
  7126. const gab = max - min + 1;
  7127. return Math.floor(Math.random() * gab + min);
  7128. }
  7129. return 0;
  7130. }
  7131. function guid(len = 32, firstU = true, radix = null) {
  7132. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  7133. const uuid = [];
  7134. radix = radix || chars.length;
  7135. if (len) {
  7136. for (let i = 0; i < len; i++)
  7137. uuid[i] = chars[0 | Math.random() * radix];
  7138. } else {
  7139. let r;
  7140. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  7141. uuid[14] = "4";
  7142. for (let i = 0; i < 36; i++) {
  7143. if (!uuid[i]) {
  7144. r = 0 | Math.random() * 16;
  7145. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  7146. }
  7147. }
  7148. }
  7149. if (firstU) {
  7150. uuid.shift();
  7151. return `u${uuid.join("")}`;
  7152. }
  7153. return uuid.join("");
  7154. }
  7155. function $parent(name = void 0) {
  7156. let parent = this.$parent;
  7157. while (parent) {
  7158. if (parent.$options && parent.$options.name !== name) {
  7159. parent = parent.$parent;
  7160. } else {
  7161. return parent;
  7162. }
  7163. }
  7164. return false;
  7165. }
  7166. function addStyle(customStyle, target = "object") {
  7167. if (empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  7168. return customStyle;
  7169. }
  7170. if (target === "object") {
  7171. customStyle = trim(customStyle);
  7172. const styleArray = customStyle.split(";");
  7173. const style = {};
  7174. for (let i = 0; i < styleArray.length; i++) {
  7175. if (styleArray[i]) {
  7176. const item = styleArray[i].split(":");
  7177. style[trim(item[0])] = trim(item[1]);
  7178. }
  7179. }
  7180. return style;
  7181. }
  7182. let string2 = "";
  7183. if (typeof customStyle === "object") {
  7184. customStyle.forEach((val, i) => {
  7185. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  7186. string2 += `${key}:${val};`;
  7187. });
  7188. }
  7189. return trim(string2);
  7190. }
  7191. function addUnit(value = "auto", unit = "") {
  7192. if (!unit) {
  7193. unit = config.unit || "px";
  7194. }
  7195. value = String(value);
  7196. return number(value) ? `${value}${unit}` : value;
  7197. }
  7198. function deepClone(obj) {
  7199. if ([null, void 0, NaN, false].includes(obj))
  7200. return obj;
  7201. if (typeof obj !== "object" && typeof obj !== "function") {
  7202. return obj;
  7203. }
  7204. const o2 = array(obj) ? [] : {};
  7205. for (const i in obj) {
  7206. if (obj.hasOwnProperty(i)) {
  7207. o2[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  7208. }
  7209. }
  7210. return o2;
  7211. }
  7212. function deepMerge$1(targetOrigin = {}, source = {}) {
  7213. let target = deepClone(targetOrigin);
  7214. if (typeof target !== "object" || typeof source !== "object")
  7215. return false;
  7216. for (const prop in source) {
  7217. if (!source.hasOwnProperty(prop))
  7218. continue;
  7219. if (prop in target) {
  7220. if (source[prop] == null) {
  7221. target[prop] = source[prop];
  7222. } else if (typeof target[prop] !== "object") {
  7223. target[prop] = source[prop];
  7224. } else if (typeof source[prop] !== "object") {
  7225. target[prop] = source[prop];
  7226. } else if (target[prop].concat && source[prop].concat) {
  7227. target[prop] = target[prop].concat(source[prop]);
  7228. } else {
  7229. target[prop] = deepMerge$1(target[prop], source[prop]);
  7230. }
  7231. } else {
  7232. target[prop] = source[prop];
  7233. }
  7234. }
  7235. return target;
  7236. }
  7237. function shallowMerge(target, source = {}) {
  7238. if (typeof target !== "object" || typeof source !== "object")
  7239. return false;
  7240. for (const prop in source) {
  7241. if (!source.hasOwnProperty(prop))
  7242. continue;
  7243. if (prop in target) {
  7244. if (source[prop] == null) {
  7245. target[prop] = source[prop];
  7246. } else if (typeof target[prop] !== "object") {
  7247. target[prop] = source[prop];
  7248. } else if (typeof source[prop] !== "object") {
  7249. target[prop] = source[prop];
  7250. } else if (target[prop].concat && source[prop].concat) {
  7251. target[prop] = target[prop].concat(source[prop]);
  7252. } else {
  7253. target[prop] = shallowMerge(target[prop], source[prop]);
  7254. }
  7255. } else {
  7256. target[prop] = source[prop];
  7257. }
  7258. }
  7259. return target;
  7260. }
  7261. function error(err) {
  7262. {
  7263. console.error(`uView提示:${err}`);
  7264. }
  7265. }
  7266. function randomArray(array2 = []) {
  7267. return array2.sort(() => Math.random() - 0.5);
  7268. }
  7269. if (!String.prototype.padStart) {
  7270. String.prototype.padStart = function(maxLength, fillString = " ") {
  7271. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  7272. throw new TypeError(
  7273. "fillString must be String"
  7274. );
  7275. }
  7276. const str = this;
  7277. if (str.length >= maxLength)
  7278. return String(str);
  7279. const fillLength = maxLength - str.length;
  7280. let times2 = Math.ceil(fillLength / fillString.length);
  7281. while (times2 >>= 1) {
  7282. fillString += fillString;
  7283. if (times2 === 1) {
  7284. fillString += fillString;
  7285. }
  7286. }
  7287. return fillString.slice(0, fillLength) + str;
  7288. };
  7289. }
  7290. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  7291. let date2;
  7292. if (!dateTime) {
  7293. date2 = /* @__PURE__ */ new Date();
  7294. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  7295. date2 = new Date(dateTime * 1e3);
  7296. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  7297. date2 = new Date(Number(dateTime));
  7298. } else {
  7299. date2 = new Date(
  7300. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  7301. );
  7302. }
  7303. const timeSource = {
  7304. "y": date2.getFullYear().toString(),
  7305. // 年
  7306. "m": (date2.getMonth() + 1).toString().padStart(2, "0"),
  7307. // 月
  7308. "d": date2.getDate().toString().padStart(2, "0"),
  7309. // 日
  7310. "h": date2.getHours().toString().padStart(2, "0"),
  7311. // 时
  7312. "M": date2.getMinutes().toString().padStart(2, "0"),
  7313. // 分
  7314. "s": date2.getSeconds().toString().padStart(2, "0")
  7315. // 秒
  7316. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  7317. };
  7318. for (const key in timeSource) {
  7319. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  7320. if (ret) {
  7321. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  7322. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  7323. }
  7324. }
  7325. return formatStr;
  7326. }
  7327. function timeFrom(timestamp = null, format = "yyyy-mm-dd") {
  7328. if (timestamp == null)
  7329. timestamp = Number(/* @__PURE__ */ new Date());
  7330. timestamp = parseInt(timestamp);
  7331. if (timestamp.toString().length == 10)
  7332. timestamp *= 1e3;
  7333. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  7334. timer = parseInt(timer / 1e3);
  7335. let tips = "";
  7336. switch (true) {
  7337. case timer < 300:
  7338. tips = "刚刚";
  7339. break;
  7340. case (timer >= 300 && timer < 3600):
  7341. tips = `${parseInt(timer / 60)}分钟前`;
  7342. break;
  7343. case (timer >= 3600 && timer < 86400):
  7344. tips = `${parseInt(timer / 3600)}小时前`;
  7345. break;
  7346. case (timer >= 86400 && timer < 2592e3):
  7347. tips = `${parseInt(timer / 86400)}天前`;
  7348. break;
  7349. default:
  7350. if (format === false) {
  7351. if (timer >= 2592e3 && timer < 365 * 86400) {
  7352. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  7353. } else {
  7354. tips = `${parseInt(timer / (86400 * 365))}年前`;
  7355. }
  7356. } else {
  7357. tips = timeFormat(timestamp, format);
  7358. }
  7359. }
  7360. return tips;
  7361. }
  7362. function trim(str, pos = "both") {
  7363. str = String(str);
  7364. if (pos == "both") {
  7365. return str.replace(/^\s+|\s+$/g, "");
  7366. }
  7367. if (pos == "left") {
  7368. return str.replace(/^\s*/, "");
  7369. }
  7370. if (pos == "right") {
  7371. return str.replace(/(\s*$)/g, "");
  7372. }
  7373. if (pos == "all") {
  7374. return str.replace(/\s+/g, "");
  7375. }
  7376. return str;
  7377. }
  7378. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  7379. const prefix = isPrefix ? "?" : "";
  7380. const _result = [];
  7381. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  7382. arrayFormat = "brackets";
  7383. for (const key in data) {
  7384. const value = data[key];
  7385. if (["", void 0, null].indexOf(value) >= 0) {
  7386. continue;
  7387. }
  7388. if (value.constructor === Array) {
  7389. switch (arrayFormat) {
  7390. case "indices":
  7391. for (let i = 0; i < value.length; i++) {
  7392. _result.push(`${key}[${i}]=${value[i]}`);
  7393. }
  7394. break;
  7395. case "brackets":
  7396. value.forEach((_value) => {
  7397. _result.push(`${key}[]=${_value}`);
  7398. });
  7399. break;
  7400. case "repeat":
  7401. value.forEach((_value) => {
  7402. _result.push(`${key}=${_value}`);
  7403. });
  7404. break;
  7405. case "comma":
  7406. let commaStr = "";
  7407. value.forEach((_value) => {
  7408. commaStr += (commaStr ? "," : "") + _value;
  7409. });
  7410. _result.push(`${key}=${commaStr}`);
  7411. break;
  7412. default:
  7413. value.forEach((_value) => {
  7414. _result.push(`${key}[]=${_value}`);
  7415. });
  7416. }
  7417. } else {
  7418. _result.push(`${key}=${value}`);
  7419. }
  7420. }
  7421. return _result.length ? prefix + _result.join("&") : "";
  7422. }
  7423. function toast(title, duration = 2e3) {
  7424. index$1.showToast({
  7425. title: String(title),
  7426. icon: "none",
  7427. duration
  7428. });
  7429. }
  7430. function type2icon(type = "success", fill = false) {
  7431. if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
  7432. type = "success";
  7433. let iconName = "";
  7434. switch (type) {
  7435. case "primary":
  7436. iconName = "info-circle";
  7437. break;
  7438. case "info":
  7439. iconName = "info-circle";
  7440. break;
  7441. case "error":
  7442. iconName = "close-circle";
  7443. break;
  7444. case "warning":
  7445. iconName = "error-circle";
  7446. break;
  7447. case "success":
  7448. iconName = "checkmark-circle";
  7449. break;
  7450. default:
  7451. iconName = "checkmark-circle";
  7452. }
  7453. if (fill)
  7454. iconName += "-fill";
  7455. return iconName;
  7456. }
  7457. function priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  7458. number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, "");
  7459. const n2 = !isFinite(+number2) ? 0 : +number2;
  7460. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  7461. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  7462. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  7463. let s2 = "";
  7464. s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split(".");
  7465. const re = /(-?\d+)(\d{3})/;
  7466. while (re.test(s2[0])) {
  7467. s2[0] = s2[0].replace(re, `$1${sep}$2`);
  7468. }
  7469. if ((s2[1] || "").length < prec) {
  7470. s2[1] = s2[1] || "";
  7471. s2[1] += new Array(prec - s2[1].length + 1).join("0");
  7472. }
  7473. return s2.join(dec);
  7474. }
  7475. function getDuration(value, unit = true) {
  7476. const valueNum = parseInt(value);
  7477. if (unit) {
  7478. if (/s$/.test(value))
  7479. return value;
  7480. return value > 30 ? `${value}ms` : `${value}s`;
  7481. }
  7482. if (/ms$/.test(value))
  7483. return valueNum;
  7484. if (/s$/.test(value))
  7485. return valueNum > 30 ? valueNum : valueNum * 1e3;
  7486. return valueNum;
  7487. }
  7488. function padZero(value) {
  7489. return `00${value}`.slice(-2);
  7490. }
  7491. function formValidate(instance, event) {
  7492. const formItem = $parent.call(instance, "u-form-item");
  7493. const form = $parent.call(instance, "u-form");
  7494. if (formItem && form) {
  7495. form.validateField(formItem.prop, () => {
  7496. }, event);
  7497. }
  7498. }
  7499. function getProperty(obj, key) {
  7500. if (typeof obj !== "object" || null == obj) {
  7501. return "";
  7502. }
  7503. if (typeof key !== "string" || key === "") {
  7504. return "";
  7505. }
  7506. if (key.indexOf(".") !== -1) {
  7507. const keys = key.split(".");
  7508. let firstObj = obj[keys[0]] || {};
  7509. for (let i = 1; i < keys.length; i++) {
  7510. if (firstObj) {
  7511. firstObj = firstObj[keys[i]];
  7512. }
  7513. }
  7514. return firstObj;
  7515. }
  7516. return obj[key];
  7517. }
  7518. function setProperty(obj, key, value) {
  7519. if (typeof obj !== "object" || null == obj) {
  7520. return;
  7521. }
  7522. const inFn = function(_obj, keys, v) {
  7523. if (keys.length === 1) {
  7524. _obj[keys[0]] = v;
  7525. return;
  7526. }
  7527. while (keys.length > 1) {
  7528. const k = keys[0];
  7529. if (!_obj[k] || typeof _obj[k] !== "object") {
  7530. _obj[k] = {};
  7531. }
  7532. keys.shift();
  7533. inFn(_obj[k], keys, v);
  7534. }
  7535. };
  7536. if (typeof key !== "string" || key === "")
  7537. ;
  7538. else if (key.indexOf(".") !== -1) {
  7539. const keys = key.split(".");
  7540. inFn(obj, keys, value);
  7541. } else {
  7542. obj[key] = value;
  7543. }
  7544. }
  7545. function page() {
  7546. const pages2 = getCurrentPages();
  7547. return `/${pages2[pages2.length - 1].route || ""}`;
  7548. }
  7549. function pages() {
  7550. const pages2 = getCurrentPages();
  7551. return pages2;
  7552. }
  7553. const index = {
  7554. range,
  7555. getPx,
  7556. sleep,
  7557. os,
  7558. sys,
  7559. random,
  7560. guid,
  7561. $parent,
  7562. addStyle,
  7563. addUnit,
  7564. deepClone,
  7565. deepMerge: deepMerge$1,
  7566. shallowMerge,
  7567. error,
  7568. randomArray,
  7569. timeFormat,
  7570. timeFrom,
  7571. trim,
  7572. queryParams,
  7573. toast,
  7574. type2icon,
  7575. priceFormat,
  7576. getDuration,
  7577. padZero,
  7578. formValidate,
  7579. getProperty,
  7580. setProperty,
  7581. page,
  7582. pages
  7583. // setConfig
  7584. };
  7585. class Router {
  7586. constructor() {
  7587. this.config = {
  7588. type: "navigateTo",
  7589. url: "",
  7590. delta: 1,
  7591. // navigateBack页面后退时,回退的层数
  7592. params: {},
  7593. // 传递的参数
  7594. animationType: "pop-in",
  7595. // 窗口动画,只在APP有效
  7596. animationDuration: 300,
  7597. // 窗口动画持续时间,单位毫秒,只在APP有效
  7598. intercept: false
  7599. // 是否需要拦截
  7600. };
  7601. this.route = this.route.bind(this);
  7602. }
  7603. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  7604. addRootPath(url2) {
  7605. return url2[0] === "/" ? url2 : `/${url2}`;
  7606. }
  7607. // 整合路由参数
  7608. mixinParam(url2, params) {
  7609. url2 = url2 && this.addRootPath(url2);
  7610. let query = "";
  7611. if (/.*\/.*\?.*=.*/.test(url2)) {
  7612. query = queryParams(params, false);
  7613. return url2 += `&${query}`;
  7614. }
  7615. query = queryParams(params);
  7616. return url2 += query;
  7617. }
  7618. // 对外的方法名称
  7619. async route(options = {}, params = {}) {
  7620. let mergeConfig2 = {};
  7621. if (typeof options === "string") {
  7622. mergeConfig2.url = this.mixinParam(options, params);
  7623. mergeConfig2.type = "navigateTo";
  7624. } else {
  7625. mergeConfig2 = deepMerge$1(this.config, options);
  7626. mergeConfig2.url = this.mixinParam(options.url, options.params);
  7627. }
  7628. if (mergeConfig2.url === page())
  7629. return;
  7630. if (params.intercept) {
  7631. this.config.intercept = params.intercept;
  7632. }
  7633. mergeConfig2.params = params;
  7634. mergeConfig2 = deepMerge$1(this.config, mergeConfig2);
  7635. if (typeof index$1.$u.routeIntercept === "function") {
  7636. const isNext = await new Promise((resolve2, reject) => {
  7637. index$1.$u.routeIntercept(mergeConfig2, resolve2);
  7638. });
  7639. isNext && this.openPage(mergeConfig2);
  7640. } else {
  7641. this.openPage(mergeConfig2);
  7642. }
  7643. }
  7644. // 执行路由跳转
  7645. openPage(config2) {
  7646. const {
  7647. url: url2,
  7648. type,
  7649. delta,
  7650. animationType,
  7651. animationDuration
  7652. } = config2;
  7653. if (config2.type == "navigateTo" || config2.type == "to") {
  7654. index$1.navigateTo({
  7655. url: url2,
  7656. animationType,
  7657. animationDuration
  7658. });
  7659. }
  7660. if (config2.type == "redirectTo" || config2.type == "redirect") {
  7661. index$1.redirectTo({
  7662. url: url2
  7663. });
  7664. }
  7665. if (config2.type == "switchTab" || config2.type == "tab") {
  7666. index$1.switchTab({
  7667. url: url2
  7668. });
  7669. }
  7670. if (config2.type == "reLaunch" || config2.type == "launch") {
  7671. index$1.reLaunch({
  7672. url: url2
  7673. });
  7674. }
  7675. if (config2.type == "navigateBack" || config2.type == "back") {
  7676. index$1.navigateBack({
  7677. delta
  7678. });
  7679. }
  7680. }
  7681. }
  7682. const route = new Router().route;
  7683. const mixin = {
  7684. // 定义每个组件都可能需要用到的外部样式以及类名
  7685. props: {
  7686. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  7687. customStyle: {
  7688. type: [Object, String],
  7689. default: () => ({})
  7690. },
  7691. customClass: {
  7692. type: String,
  7693. default: ""
  7694. },
  7695. // 跳转的页面路径
  7696. url: {
  7697. type: String,
  7698. default: ""
  7699. },
  7700. // 页面跳转的类型
  7701. linkType: {
  7702. type: String,
  7703. default: "navigateTo"
  7704. }
  7705. },
  7706. data() {
  7707. return {};
  7708. },
  7709. onLoad() {
  7710. this.$u.getRect = this.$uGetRect;
  7711. },
  7712. created() {
  7713. this.$u.getRect = this.$uGetRect;
  7714. },
  7715. computed: {
  7716. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  7717. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  7718. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  7719. $u() {
  7720. return deepMerge$1(index$1.$u, {
  7721. props: void 0,
  7722. http: void 0,
  7723. mixin: void 0
  7724. });
  7725. },
  7726. /**
  7727. * 生成bem规则类名
  7728. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  7729. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  7730. * @param {String} name 组件名称
  7731. * @param {Array} fixed 一直会存在的类名
  7732. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  7733. * @returns {Array|string}
  7734. */
  7735. bem() {
  7736. return function(name, fixed, change) {
  7737. const prefix = `u-${name}--`;
  7738. const classes = {};
  7739. if (fixed) {
  7740. fixed.map((item) => {
  7741. classes[prefix + this[item]] = true;
  7742. });
  7743. }
  7744. if (change) {
  7745. change.map((item) => {
  7746. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  7747. });
  7748. }
  7749. return Object.keys(classes);
  7750. };
  7751. }
  7752. },
  7753. methods: {
  7754. // 跳转某一个页面
  7755. openPage(urlKey = "url") {
  7756. const url2 = this[urlKey];
  7757. if (url2) {
  7758. route({ type: this.linkType, url: url2 });
  7759. }
  7760. },
  7761. // 查询节点信息
  7762. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  7763. // 解决办法为在组件根部再套一个没有任何作用的view元素
  7764. $uGetRect(selector, all) {
  7765. return new Promise((resolve2) => {
  7766. index$1.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  7767. if (all && Array.isArray(rect) && rect.length) {
  7768. resolve2(rect);
  7769. }
  7770. if (!all && rect) {
  7771. resolve2(rect);
  7772. }
  7773. }).exec();
  7774. });
  7775. },
  7776. getParentData(parentName = "") {
  7777. if (!this.parent)
  7778. this.parent = {};
  7779. this.parent = $parent.call(this, parentName);
  7780. if (this.parent.children) {
  7781. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  7782. }
  7783. if (this.parent && this.parentData) {
  7784. Object.keys(this.parentData).map((key) => {
  7785. this.parentData[key] = this.parent[key];
  7786. });
  7787. }
  7788. },
  7789. // 阻止事件冒泡
  7790. preventEvent(e2) {
  7791. e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation();
  7792. },
  7793. // 空操作
  7794. noop(e2) {
  7795. this.preventEvent(e2);
  7796. }
  7797. },
  7798. onReachBottom() {
  7799. index$1.$emit("uOnReachBottom");
  7800. },
  7801. beforeUnmount() {
  7802. if (this.parent && test.array(this.parent.children)) {
  7803. const childrenList = this.parent.children;
  7804. childrenList.map((child, index2) => {
  7805. if (child === this) {
  7806. childrenList.splice(index2, 1);
  7807. }
  7808. });
  7809. }
  7810. }
  7811. };
  7812. const mpMixin = {
  7813. // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
  7814. options: {
  7815. virtualHost: true
  7816. }
  7817. };
  7818. const { toString } = Object.prototype;
  7819. function isArray(val) {
  7820. return toString.call(val) === "[object Array]";
  7821. }
  7822. function isObject(val) {
  7823. return val !== null && typeof val === "object";
  7824. }
  7825. function isDate(val) {
  7826. return toString.call(val) === "[object Date]";
  7827. }
  7828. function isURLSearchParams(val) {
  7829. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  7830. }
  7831. function forEach(obj, fn) {
  7832. if (obj === null || typeof obj === "undefined") {
  7833. return;
  7834. }
  7835. if (typeof obj !== "object") {
  7836. obj = [obj];
  7837. }
  7838. if (isArray(obj)) {
  7839. for (let i = 0, l = obj.length; i < l; i++) {
  7840. fn.call(null, obj[i], i, obj);
  7841. }
  7842. } else {
  7843. for (const key in obj) {
  7844. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  7845. fn.call(null, obj[key], key, obj);
  7846. }
  7847. }
  7848. }
  7849. }
  7850. function isPlainObject(obj) {
  7851. return Object.prototype.toString.call(obj) === "[object Object]";
  7852. }
  7853. function deepMerge() {
  7854. const result = {};
  7855. function assignValue(val, key) {
  7856. if (typeof result[key] === "object" && typeof val === "object") {
  7857. result[key] = deepMerge(result[key], val);
  7858. } else if (typeof val === "object") {
  7859. result[key] = deepMerge({}, val);
  7860. } else {
  7861. result[key] = val;
  7862. }
  7863. }
  7864. for (let i = 0, l = arguments.length; i < l; i++) {
  7865. forEach(arguments[i], assignValue);
  7866. }
  7867. return result;
  7868. }
  7869. function isUndefined(val) {
  7870. return typeof val === "undefined";
  7871. }
  7872. function encode(val) {
  7873. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  7874. }
  7875. function buildURL(url2, params) {
  7876. if (!params) {
  7877. return url2;
  7878. }
  7879. let serializedParams;
  7880. if (isURLSearchParams(params)) {
  7881. serializedParams = params.toString();
  7882. } else {
  7883. const parts = [];
  7884. forEach(params, (val, key) => {
  7885. if (val === null || typeof val === "undefined") {
  7886. return;
  7887. }
  7888. if (isArray(val)) {
  7889. key = `${key}[]`;
  7890. } else {
  7891. val = [val];
  7892. }
  7893. forEach(val, (v) => {
  7894. if (isDate(v)) {
  7895. v = v.toISOString();
  7896. } else if (isObject(v)) {
  7897. v = JSON.stringify(v);
  7898. }
  7899. parts.push(`${encode(key)}=${encode(v)}`);
  7900. });
  7901. });
  7902. serializedParams = parts.join("&");
  7903. }
  7904. if (serializedParams) {
  7905. const hashmarkIndex = url2.indexOf("#");
  7906. if (hashmarkIndex !== -1) {
  7907. url2 = url2.slice(0, hashmarkIndex);
  7908. }
  7909. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  7910. }
  7911. return url2;
  7912. }
  7913. function isAbsoluteURL(url2) {
  7914. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  7915. }
  7916. function combineURLs(baseURL, relativeURL) {
  7917. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  7918. }
  7919. function buildFullPath(baseURL, requestedURL) {
  7920. if (baseURL && !isAbsoluteURL(requestedURL)) {
  7921. return combineURLs(baseURL, requestedURL);
  7922. }
  7923. return requestedURL;
  7924. }
  7925. function settle(resolve2, reject, response) {
  7926. const { validateStatus: validateStatus2 } = response.config;
  7927. const status = response.statusCode;
  7928. if (status && (!validateStatus2 || validateStatus2(status))) {
  7929. resolve2(response);
  7930. } else {
  7931. reject(response);
  7932. }
  7933. }
  7934. const mergeKeys$1 = (keys, config2) => {
  7935. const config3 = {};
  7936. keys.forEach((prop) => {
  7937. if (!isUndefined(config2[prop])) {
  7938. config3[prop] = config2[prop];
  7939. }
  7940. });
  7941. return config3;
  7942. };
  7943. const adapter = (config2) => new Promise((resolve2, reject) => {
  7944. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  7945. const _config = {
  7946. url: fullPath,
  7947. header: config2.header,
  7948. complete: (response) => {
  7949. config2.fullPath = fullPath;
  7950. response.config = config2;
  7951. try {
  7952. if (typeof response.data === "string") {
  7953. response.data = JSON.parse(response.data);
  7954. }
  7955. } catch (e2) {
  7956. }
  7957. settle(resolve2, reject, response);
  7958. }
  7959. };
  7960. let requestTask;
  7961. if (config2.method === "UPLOAD") {
  7962. delete _config.header["content-type"];
  7963. delete _config.header["Content-Type"];
  7964. const otherConfig = {
  7965. filePath: config2.filePath,
  7966. name: config2.name
  7967. };
  7968. const optionalKeys = [
  7969. "formData"
  7970. ];
  7971. requestTask = index$1.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  7972. } else if (config2.method === "DOWNLOAD") {
  7973. requestTask = index$1.downloadFile(_config);
  7974. } else {
  7975. const optionalKeys = [
  7976. "data",
  7977. "method",
  7978. "timeout",
  7979. "dataType",
  7980. "responseType"
  7981. ];
  7982. requestTask = index$1.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  7983. }
  7984. if (config2.getTask) {
  7985. config2.getTask(requestTask, config2);
  7986. }
  7987. });
  7988. const dispatchRequest = (config2) => adapter(config2);
  7989. function InterceptorManager() {
  7990. this.handlers = [];
  7991. }
  7992. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  7993. this.handlers.push({
  7994. fulfilled,
  7995. rejected
  7996. });
  7997. return this.handlers.length - 1;
  7998. };
  7999. InterceptorManager.prototype.eject = function eject(id) {
  8000. if (this.handlers[id]) {
  8001. this.handlers[id] = null;
  8002. }
  8003. };
  8004. InterceptorManager.prototype.forEach = function forEach2(fn) {
  8005. this.handlers.forEach((h) => {
  8006. if (h !== null) {
  8007. fn(h);
  8008. }
  8009. });
  8010. };
  8011. const mergeKeys = (keys, globalsConfig, config2) => {
  8012. const config3 = {};
  8013. keys.forEach((prop) => {
  8014. if (!isUndefined(config2[prop])) {
  8015. config3[prop] = config2[prop];
  8016. } else if (!isUndefined(globalsConfig[prop])) {
  8017. config3[prop] = globalsConfig[prop];
  8018. }
  8019. });
  8020. return config3;
  8021. };
  8022. const mergeConfig = (globalsConfig, config2 = {}) => {
  8023. const method = config2.method || globalsConfig.method || "GET";
  8024. let config3 = {
  8025. baseURL: globalsConfig.baseURL || "",
  8026. method,
  8027. url: config2.url || "",
  8028. params: config2.params || {},
  8029. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  8030. header: deepMerge(globalsConfig.header || {}, config2.header || {})
  8031. };
  8032. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  8033. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  8034. if (method === "DOWNLOAD")
  8035. ;
  8036. else if (method === "UPLOAD") {
  8037. delete config3.header["content-type"];
  8038. delete config3.header["Content-Type"];
  8039. const uploadKeys = [
  8040. "filePath",
  8041. "name",
  8042. "formData"
  8043. ];
  8044. uploadKeys.forEach((prop) => {
  8045. if (!isUndefined(config2[prop])) {
  8046. config3[prop] = config2[prop];
  8047. }
  8048. });
  8049. } else {
  8050. const defaultsKeys = [
  8051. "data",
  8052. "timeout",
  8053. "dataType",
  8054. "responseType"
  8055. ];
  8056. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  8057. }
  8058. return config3;
  8059. };
  8060. const defaults = {
  8061. baseURL: "",
  8062. header: {},
  8063. method: "GET",
  8064. dataType: "json",
  8065. responseType: "text",
  8066. custom: {},
  8067. timeout: 6e4,
  8068. validateStatus: function validateStatus(status) {
  8069. return status >= 200 && status < 300;
  8070. }
  8071. };
  8072. var clone = function() {
  8073. function _instanceof(obj, type) {
  8074. return type != null && obj instanceof type;
  8075. }
  8076. var nativeMap;
  8077. try {
  8078. nativeMap = Map;
  8079. } catch (_) {
  8080. nativeMap = function() {
  8081. };
  8082. }
  8083. var nativeSet;
  8084. try {
  8085. nativeSet = Set;
  8086. } catch (_) {
  8087. nativeSet = function() {
  8088. };
  8089. }
  8090. var nativePromise;
  8091. try {
  8092. nativePromise = Promise;
  8093. } catch (_) {
  8094. nativePromise = function() {
  8095. };
  8096. }
  8097. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  8098. if (typeof circular === "object") {
  8099. depth = circular.depth;
  8100. prototype = circular.prototype;
  8101. includeNonEnumerable = circular.includeNonEnumerable;
  8102. circular = circular.circular;
  8103. }
  8104. var allParents = [];
  8105. var allChildren = [];
  8106. var useBuffer = typeof Buffer != "undefined";
  8107. if (typeof circular == "undefined")
  8108. circular = true;
  8109. if (typeof depth == "undefined")
  8110. depth = Infinity;
  8111. function _clone(parent2, depth2) {
  8112. if (parent2 === null)
  8113. return null;
  8114. if (depth2 === 0)
  8115. return parent2;
  8116. var child;
  8117. var proto;
  8118. if (typeof parent2 != "object") {
  8119. return parent2;
  8120. }
  8121. if (_instanceof(parent2, nativeMap)) {
  8122. child = new nativeMap();
  8123. } else if (_instanceof(parent2, nativeSet)) {
  8124. child = new nativeSet();
  8125. } else if (_instanceof(parent2, nativePromise)) {
  8126. child = new nativePromise(function(resolve2, reject) {
  8127. parent2.then(function(value) {
  8128. resolve2(_clone(value, depth2 - 1));
  8129. }, function(err) {
  8130. reject(_clone(err, depth2 - 1));
  8131. });
  8132. });
  8133. } else if (clone2.__isArray(parent2)) {
  8134. child = [];
  8135. } else if (clone2.__isRegExp(parent2)) {
  8136. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  8137. if (parent2.lastIndex)
  8138. child.lastIndex = parent2.lastIndex;
  8139. } else if (clone2.__isDate(parent2)) {
  8140. child = new Date(parent2.getTime());
  8141. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  8142. if (Buffer.from) {
  8143. child = Buffer.from(parent2);
  8144. } else {
  8145. child = new Buffer(parent2.length);
  8146. parent2.copy(child);
  8147. }
  8148. return child;
  8149. } else if (_instanceof(parent2, Error)) {
  8150. child = Object.create(parent2);
  8151. } else {
  8152. if (typeof prototype == "undefined") {
  8153. proto = Object.getPrototypeOf(parent2);
  8154. child = Object.create(proto);
  8155. } else {
  8156. child = Object.create(prototype);
  8157. proto = prototype;
  8158. }
  8159. }
  8160. if (circular) {
  8161. var index2 = allParents.indexOf(parent2);
  8162. if (index2 != -1) {
  8163. return allChildren[index2];
  8164. }
  8165. allParents.push(parent2);
  8166. allChildren.push(child);
  8167. }
  8168. if (_instanceof(parent2, nativeMap)) {
  8169. parent2.forEach(function(value, key) {
  8170. var keyChild = _clone(key, depth2 - 1);
  8171. var valueChild = _clone(value, depth2 - 1);
  8172. child.set(keyChild, valueChild);
  8173. });
  8174. }
  8175. if (_instanceof(parent2, nativeSet)) {
  8176. parent2.forEach(function(value) {
  8177. var entryChild = _clone(value, depth2 - 1);
  8178. child.add(entryChild);
  8179. });
  8180. }
  8181. for (var i in parent2) {
  8182. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  8183. if (attrs) {
  8184. child[i] = _clone(parent2[i], depth2 - 1);
  8185. }
  8186. try {
  8187. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  8188. if (objProperty.set === "undefined") {
  8189. continue;
  8190. }
  8191. child[i] = _clone(parent2[i], depth2 - 1);
  8192. } catch (e2) {
  8193. if (e2 instanceof TypeError) {
  8194. continue;
  8195. } else if (e2 instanceof ReferenceError) {
  8196. continue;
  8197. }
  8198. }
  8199. }
  8200. if (Object.getOwnPropertySymbols) {
  8201. var symbols = Object.getOwnPropertySymbols(parent2);
  8202. for (var i = 0; i < symbols.length; i++) {
  8203. var symbol = symbols[i];
  8204. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  8205. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  8206. continue;
  8207. }
  8208. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  8209. Object.defineProperty(child, symbol, descriptor);
  8210. }
  8211. }
  8212. if (includeNonEnumerable) {
  8213. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  8214. for (var i = 0; i < allPropertyNames.length; i++) {
  8215. var propertyName = allPropertyNames[i];
  8216. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  8217. if (descriptor && descriptor.enumerable) {
  8218. continue;
  8219. }
  8220. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  8221. Object.defineProperty(child, propertyName, descriptor);
  8222. }
  8223. }
  8224. return child;
  8225. }
  8226. return _clone(parent, depth);
  8227. }
  8228. clone2.clonePrototype = function clonePrototype(parent) {
  8229. if (parent === null)
  8230. return null;
  8231. var c = function() {
  8232. };
  8233. c.prototype = parent;
  8234. return new c();
  8235. };
  8236. function __objToStr(o2) {
  8237. return Object.prototype.toString.call(o2);
  8238. }
  8239. clone2.__objToStr = __objToStr;
  8240. function __isDate(o2) {
  8241. return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
  8242. }
  8243. clone2.__isDate = __isDate;
  8244. function __isArray(o2) {
  8245. return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
  8246. }
  8247. clone2.__isArray = __isArray;
  8248. function __isRegExp(o2) {
  8249. return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
  8250. }
  8251. clone2.__isRegExp = __isRegExp;
  8252. function __getRegExpFlags(re) {
  8253. var flags = "";
  8254. if (re.global)
  8255. flags += "g";
  8256. if (re.ignoreCase)
  8257. flags += "i";
  8258. if (re.multiline)
  8259. flags += "m";
  8260. return flags;
  8261. }
  8262. clone2.__getRegExpFlags = __getRegExpFlags;
  8263. return clone2;
  8264. }();
  8265. class Request {
  8266. /**
  8267. * @param {Object} arg - 全局配置
  8268. * @param {String} arg.baseURL - 全局根路径
  8269. * @param {Object} arg.header - 全局header
  8270. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  8271. * @param {String} arg.dataType = [json] - 全局默认的dataType
  8272. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  8273. * @param {Object} arg.custom - 全局默认的自定义参数
  8274. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  8275. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  8276. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  8277. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  8278. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  8279. */
  8280. constructor(arg = {}) {
  8281. if (!isPlainObject(arg)) {
  8282. arg = {};
  8283. console.warn("设置全局参数必须接收一个Object");
  8284. }
  8285. this.config = clone({ ...defaults, ...arg });
  8286. this.interceptors = {
  8287. request: new InterceptorManager(),
  8288. response: new InterceptorManager()
  8289. };
  8290. }
  8291. /**
  8292. * @Function
  8293. * @param {Request~setConfigCallback} f - 设置全局默认配置
  8294. */
  8295. setConfig(f2) {
  8296. this.config = f2(this.config);
  8297. }
  8298. middleware(config2) {
  8299. config2 = mergeConfig(this.config, config2);
  8300. const chain = [dispatchRequest, void 0];
  8301. let promise2 = Promise.resolve(config2);
  8302. this.interceptors.request.forEach((interceptor) => {
  8303. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  8304. });
  8305. this.interceptors.response.forEach((interceptor) => {
  8306. chain.push(interceptor.fulfilled, interceptor.rejected);
  8307. });
  8308. while (chain.length) {
  8309. promise2 = promise2.then(chain.shift(), chain.shift());
  8310. }
  8311. return promise2;
  8312. }
  8313. /**
  8314. * @Function
  8315. * @param {Object} config - 请求配置项
  8316. * @prop {String} options.url - 请求路径
  8317. * @prop {Object} options.data - 请求参数
  8318. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  8319. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  8320. * @prop {Object} [options.header = config.header] - 请求header
  8321. * @prop {Object} [options.method = config.method] - 请求方法
  8322. * @returns {Promise<unknown>}
  8323. */
  8324. request(config2 = {}) {
  8325. return this.middleware(config2);
  8326. }
  8327. get(url2, options = {}) {
  8328. return this.middleware({
  8329. url: url2,
  8330. method: "GET",
  8331. ...options
  8332. });
  8333. }
  8334. post(url2, data, options = {}) {
  8335. return this.middleware({
  8336. url: url2,
  8337. data,
  8338. method: "POST",
  8339. ...options
  8340. });
  8341. }
  8342. put(url2, data, options = {}) {
  8343. return this.middleware({
  8344. url: url2,
  8345. data,
  8346. method: "PUT",
  8347. ...options
  8348. });
  8349. }
  8350. delete(url2, data, options = {}) {
  8351. return this.middleware({
  8352. url: url2,
  8353. data,
  8354. method: "DELETE",
  8355. ...options
  8356. });
  8357. }
  8358. connect(url2, data, options = {}) {
  8359. return this.middleware({
  8360. url: url2,
  8361. data,
  8362. method: "CONNECT",
  8363. ...options
  8364. });
  8365. }
  8366. head(url2, data, options = {}) {
  8367. return this.middleware({
  8368. url: url2,
  8369. data,
  8370. method: "HEAD",
  8371. ...options
  8372. });
  8373. }
  8374. options(url2, data, options = {}) {
  8375. return this.middleware({
  8376. url: url2,
  8377. data,
  8378. method: "OPTIONS",
  8379. ...options
  8380. });
  8381. }
  8382. trace(url2, data, options = {}) {
  8383. return this.middleware({
  8384. url: url2,
  8385. data,
  8386. method: "TRACE",
  8387. ...options
  8388. });
  8389. }
  8390. upload(url2, config2 = {}) {
  8391. config2.url = url2;
  8392. config2.method = "UPLOAD";
  8393. return this.middleware(config2);
  8394. }
  8395. download(url2, config2 = {}) {
  8396. config2.url = url2;
  8397. config2.method = "DOWNLOAD";
  8398. return this.middleware(config2);
  8399. }
  8400. }
  8401. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  8402. const startRGB = hexToRgb(startColor, false);
  8403. const startR = startRGB[0];
  8404. const startG = startRGB[1];
  8405. const startB = startRGB[2];
  8406. const endRGB = hexToRgb(endColor, false);
  8407. const endR = endRGB[0];
  8408. const endG = endRGB[1];
  8409. const endB = endRGB[2];
  8410. const sR = (endR - startR) / step;
  8411. const sG = (endG - startG) / step;
  8412. const sB = (endB - startB) / step;
  8413. const colorArr = [];
  8414. for (let i = 0; i < step; i++) {
  8415. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  8416. if (i === 0)
  8417. hex = rgbToHex(startColor);
  8418. if (i === step - 1)
  8419. hex = rgbToHex(endColor);
  8420. colorArr.push(hex);
  8421. }
  8422. return colorArr;
  8423. }
  8424. function hexToRgb(sColor, str = true) {
  8425. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8426. sColor = String(sColor).toLowerCase();
  8427. if (sColor && reg.test(sColor)) {
  8428. if (sColor.length === 4) {
  8429. let sColorNew = "#";
  8430. for (let i = 1; i < 4; i += 1) {
  8431. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8432. }
  8433. sColor = sColorNew;
  8434. }
  8435. const sColorChange = [];
  8436. for (let i = 1; i < 7; i += 2) {
  8437. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  8438. }
  8439. if (!str) {
  8440. return sColorChange;
  8441. }
  8442. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  8443. }
  8444. if (/^(rgb|RGB)/.test(sColor)) {
  8445. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8446. return arr.map((val) => Number(val));
  8447. }
  8448. return sColor;
  8449. }
  8450. function rgbToHex(rgb) {
  8451. const _this = rgb;
  8452. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8453. if (/^(rgb|RGB)/.test(_this)) {
  8454. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8455. let strHex = "#";
  8456. for (let i = 0; i < aColor.length; i++) {
  8457. let hex = Number(aColor[i]).toString(16);
  8458. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  8459. if (hex === "0") {
  8460. hex += hex;
  8461. }
  8462. strHex += hex;
  8463. }
  8464. if (strHex.length !== 7) {
  8465. strHex = _this;
  8466. }
  8467. return strHex;
  8468. }
  8469. if (reg.test(_this)) {
  8470. const aNum = _this.replace(/#/, "").split("");
  8471. if (aNum.length === 6) {
  8472. return _this;
  8473. }
  8474. if (aNum.length === 3) {
  8475. let numHex = "#";
  8476. for (let i = 0; i < aNum.length; i += 1) {
  8477. numHex += aNum[i] + aNum[i];
  8478. }
  8479. return numHex;
  8480. }
  8481. } else {
  8482. return _this;
  8483. }
  8484. }
  8485. function colorToRgba(color2, alpha) {
  8486. color2 = rgbToHex(color2);
  8487. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8488. let sColor = String(color2).toLowerCase();
  8489. if (sColor && reg.test(sColor)) {
  8490. if (sColor.length === 4) {
  8491. let sColorNew = "#";
  8492. for (let i = 1; i < 4; i += 1) {
  8493. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8494. }
  8495. sColor = sColorNew;
  8496. }
  8497. const sColorChange = [];
  8498. for (let i = 1; i < 7; i += 2) {
  8499. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  8500. }
  8501. return `rgba(${sColorChange.join(",")},${alpha})`;
  8502. }
  8503. return sColor;
  8504. }
  8505. const colorGradient$1 = {
  8506. colorGradient,
  8507. hexToRgb,
  8508. rgbToHex,
  8509. colorToRgba
  8510. };
  8511. let timeout = null;
  8512. function debounce(func2, wait = 500, immediate = false) {
  8513. if (timeout !== null)
  8514. clearTimeout(timeout);
  8515. if (immediate) {
  8516. const callNow = !timeout;
  8517. timeout = setTimeout(() => {
  8518. timeout = null;
  8519. }, wait);
  8520. if (callNow)
  8521. typeof func2 === "function" && func2();
  8522. } else {
  8523. timeout = setTimeout(() => {
  8524. typeof func2 === "function" && func2();
  8525. }, wait);
  8526. }
  8527. }
  8528. let flag;
  8529. function throttle(func2, wait = 500, immediate = true) {
  8530. if (immediate) {
  8531. if (!flag) {
  8532. flag = true;
  8533. typeof func2 === "function" && func2();
  8534. setTimeout(() => {
  8535. flag = false;
  8536. }, wait);
  8537. }
  8538. } else if (!flag) {
  8539. flag = true;
  8540. setTimeout(() => {
  8541. flag = false;
  8542. typeof func2 === "function" && func2();
  8543. }, wait);
  8544. }
  8545. }
  8546. const ActionSheet = {
  8547. // action-sheet组件
  8548. actionSheet: {
  8549. show: false,
  8550. title: "",
  8551. description: "",
  8552. actions: [],
  8553. index: "",
  8554. cancelText: "",
  8555. closeOnClickAction: true,
  8556. safeAreaInsetBottom: true,
  8557. openType: "",
  8558. closeOnClickOverlay: true,
  8559. round: 0
  8560. }
  8561. };
  8562. const Album = {
  8563. // album 组件
  8564. album: {
  8565. urls: [],
  8566. keyName: "",
  8567. singleSize: 180,
  8568. multipleSize: 70,
  8569. space: 6,
  8570. singleMode: "scaleToFill",
  8571. multipleMode: "aspectFill",
  8572. maxCount: 9,
  8573. previewFullImage: true,
  8574. rowCount: 3,
  8575. showMore: true
  8576. }
  8577. };
  8578. const Alert = {
  8579. // alert警告组件
  8580. alert: {
  8581. title: "",
  8582. type: "warning",
  8583. description: "",
  8584. closable: false,
  8585. showIcon: false,
  8586. effect: "light",
  8587. center: false,
  8588. fontSize: 14
  8589. }
  8590. };
  8591. const Avatar = {
  8592. // avatar 组件
  8593. avatar: {
  8594. src: "",
  8595. shape: "circle",
  8596. size: 40,
  8597. mode: "scaleToFill",
  8598. text: "",
  8599. bgColor: "#c0c4cc",
  8600. color: "#ffffff",
  8601. fontSize: 18,
  8602. icon: "",
  8603. mpAvatar: false,
  8604. randomBgColor: false,
  8605. defaultUrl: "",
  8606. colorIndex: "",
  8607. name: ""
  8608. }
  8609. };
  8610. const AvatarGroup = {
  8611. // avatarGroup 组件
  8612. avatarGroup: {
  8613. urls: [],
  8614. maxCount: 5,
  8615. shape: "circle",
  8616. mode: "scaleToFill",
  8617. showMore: true,
  8618. size: 40,
  8619. keyName: "",
  8620. gap: 0.5,
  8621. extraValue: 0
  8622. }
  8623. };
  8624. const Backtop = {
  8625. // backtop组件
  8626. backtop: {
  8627. mode: "circle",
  8628. icon: "arrow-upward",
  8629. text: "",
  8630. duration: 100,
  8631. scrollTop: 0,
  8632. top: 400,
  8633. bottom: 100,
  8634. right: 20,
  8635. zIndex: 9,
  8636. iconStyle: {
  8637. color: "#909399",
  8638. fontSize: "19px"
  8639. }
  8640. }
  8641. };
  8642. const Badge = {
  8643. // 徽标数组件
  8644. badge: {
  8645. isDot: false,
  8646. value: "",
  8647. show: true,
  8648. max: 999,
  8649. type: "error",
  8650. showZero: false,
  8651. bgColor: null,
  8652. color: null,
  8653. shape: "circle",
  8654. numberType: "overflow",
  8655. offset: [],
  8656. inverted: false,
  8657. absolute: false
  8658. }
  8659. };
  8660. const Button = {
  8661. // button组件
  8662. button: {
  8663. hairline: false,
  8664. type: "info",
  8665. size: "normal",
  8666. shape: "square",
  8667. plain: false,
  8668. disabled: false,
  8669. loading: false,
  8670. loadingText: "",
  8671. loadingMode: "spinner",
  8672. loadingSize: 15,
  8673. openType: "",
  8674. formType: "",
  8675. appParameter: "",
  8676. hoverStopPropagation: true,
  8677. lang: "en",
  8678. sessionFrom: "",
  8679. sendMessageTitle: "",
  8680. sendMessagePath: "",
  8681. sendMessageImg: "",
  8682. showMessageCard: false,
  8683. dataName: "",
  8684. throttleTime: 0,
  8685. hoverStartTime: 0,
  8686. hoverStayTime: 200,
  8687. text: "",
  8688. icon: "",
  8689. iconColor: "",
  8690. color: ""
  8691. }
  8692. };
  8693. const Calendar = {
  8694. // calendar 组件
  8695. calendar: {
  8696. title: "日期选择",
  8697. showTitle: true,
  8698. showSubtitle: true,
  8699. mode: "single",
  8700. startText: "开始",
  8701. endText: "结束",
  8702. customList: [],
  8703. color: "#3c9cff",
  8704. minDate: 0,
  8705. maxDate: 0,
  8706. defaultDate: null,
  8707. maxCount: Number.MAX_SAFE_INTEGER,
  8708. // Infinity
  8709. rowHeight: 56,
  8710. formatter: null,
  8711. showLunar: false,
  8712. showMark: true,
  8713. confirmText: "确定",
  8714. confirmDisabledText: "确定",
  8715. show: false,
  8716. closeOnClickOverlay: false,
  8717. readonly: false,
  8718. showConfirm: true,
  8719. maxRange: Number.MAX_SAFE_INTEGER,
  8720. // Infinity
  8721. rangePrompt: "",
  8722. showRangePrompt: true,
  8723. allowSameDay: false,
  8724. round: 0,
  8725. monthNum: 3
  8726. }
  8727. };
  8728. const CarKeyboard = {
  8729. // 车牌号键盘
  8730. carKeyboard: {
  8731. random: false
  8732. }
  8733. };
  8734. const Cell = {
  8735. // cell组件的props
  8736. cell: {
  8737. customClass: "",
  8738. title: "",
  8739. label: "",
  8740. value: "",
  8741. icon: "",
  8742. disabled: false,
  8743. border: true,
  8744. center: false,
  8745. url: "",
  8746. linkType: "navigateTo",
  8747. clickable: false,
  8748. isLink: false,
  8749. required: false,
  8750. arrowDirection: "",
  8751. iconStyle: {},
  8752. rightIconStyle: {},
  8753. rightIcon: "arrow-right",
  8754. titleStyle: {},
  8755. size: "",
  8756. stop: true,
  8757. name: ""
  8758. }
  8759. };
  8760. const CellGroup = {
  8761. // cell-group组件的props
  8762. cellGroup: {
  8763. title: "",
  8764. border: true,
  8765. customStyle: {}
  8766. }
  8767. };
  8768. const Checkbox = {
  8769. // checkbox组件
  8770. checkbox: {
  8771. name: "",
  8772. shape: "",
  8773. size: "",
  8774. checkbox: false,
  8775. disabled: "",
  8776. activeColor: "",
  8777. inactiveColor: "",
  8778. iconSize: "",
  8779. iconColor: "",
  8780. label: "",
  8781. labelSize: "",
  8782. labelColor: "",
  8783. labelDisabled: ""
  8784. }
  8785. };
  8786. const CheckboxGroup = {
  8787. // checkbox-group组件
  8788. checkboxGroup: {
  8789. name: "",
  8790. value: [],
  8791. shape: "square",
  8792. disabled: false,
  8793. activeColor: "#2979ff",
  8794. inactiveColor: "#c8c9cc",
  8795. size: 18,
  8796. placement: "row",
  8797. labelSize: 14,
  8798. labelColor: "#303133",
  8799. labelDisabled: false,
  8800. iconColor: "#ffffff",
  8801. iconSize: 12,
  8802. iconPlacement: "left",
  8803. borderBottom: false
  8804. }
  8805. };
  8806. const CircleProgress = {
  8807. // circleProgress 组件
  8808. circleProgress: {
  8809. percentage: 30
  8810. }
  8811. };
  8812. const Code = {
  8813. // code 组件
  8814. code: {
  8815. seconds: 60,
  8816. startText: "获取验证码",
  8817. changeText: "X秒重新获取",
  8818. endText: "重新获取",
  8819. keepRunning: false,
  8820. uniqueKey: ""
  8821. }
  8822. };
  8823. const CodeInput = {
  8824. // codeInput 组件
  8825. codeInput: {
  8826. adjustPosition: true,
  8827. maxlength: 6,
  8828. dot: false,
  8829. mode: "box",
  8830. hairline: false,
  8831. space: 10,
  8832. value: "",
  8833. focus: false,
  8834. bold: false,
  8835. color: "#606266",
  8836. fontSize: 18,
  8837. size: 35,
  8838. disabledKeyboard: false,
  8839. borderColor: "#c9cacc",
  8840. disabledDot: true
  8841. }
  8842. };
  8843. const Col = {
  8844. // col 组件
  8845. col: {
  8846. span: 12,
  8847. offset: 0,
  8848. justify: "start",
  8849. align: "stretch",
  8850. textAlign: "left"
  8851. }
  8852. };
  8853. const Collapse = {
  8854. // collapse 组件
  8855. collapse: {
  8856. value: null,
  8857. accordion: false,
  8858. border: true
  8859. }
  8860. };
  8861. const CollapseItem = {
  8862. // collapseItem 组件
  8863. collapseItem: {
  8864. title: "",
  8865. value: "",
  8866. label: "",
  8867. disabled: false,
  8868. isLink: true,
  8869. clickable: true,
  8870. border: true,
  8871. align: "left",
  8872. name: "",
  8873. icon: "",
  8874. duration: 300
  8875. }
  8876. };
  8877. const ColumnNotice = {
  8878. // columnNotice 组件
  8879. columnNotice: {
  8880. text: "",
  8881. icon: "volume",
  8882. mode: "",
  8883. color: "#f9ae3d",
  8884. bgColor: "#fdf6ec",
  8885. fontSize: 14,
  8886. speed: 80,
  8887. step: false,
  8888. duration: 1500,
  8889. disableTouch: true
  8890. }
  8891. };
  8892. const CountDown = {
  8893. // u-count-down 计时器组件
  8894. countDown: {
  8895. time: 0,
  8896. format: "HH:mm:ss",
  8897. autoStart: true,
  8898. millisecond: false
  8899. }
  8900. };
  8901. const CountTo = {
  8902. // countTo 组件
  8903. countTo: {
  8904. startVal: 0,
  8905. endVal: 0,
  8906. duration: 2e3,
  8907. autoplay: true,
  8908. decimals: 0,
  8909. useEasing: true,
  8910. decimal: ".",
  8911. color: "#606266",
  8912. fontSize: 22,
  8913. bold: false,
  8914. separator: ""
  8915. }
  8916. };
  8917. const DatetimePicker = {
  8918. // datetimePicker 组件
  8919. datetimePicker: {
  8920. show: false,
  8921. popupMode: "bottom",
  8922. showToolbar: true,
  8923. value: "",
  8924. title: "",
  8925. mode: "datetime",
  8926. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  8927. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  8928. minHour: 0,
  8929. maxHour: 23,
  8930. minMinute: 0,
  8931. maxMinute: 59,
  8932. filter: null,
  8933. formatter: null,
  8934. loading: false,
  8935. itemHeight: 44,
  8936. cancelText: "取消",
  8937. confirmText: "确认",
  8938. cancelColor: "#909193",
  8939. confirmColor: "#3c9cff",
  8940. visibleItemCount: 5,
  8941. closeOnClickOverlay: false,
  8942. defaultIndex: []
  8943. }
  8944. };
  8945. const Divider = {
  8946. // divider组件
  8947. divider: {
  8948. dashed: false,
  8949. hairline: true,
  8950. dot: false,
  8951. textPosition: "center",
  8952. text: "",
  8953. textSize: 14,
  8954. textColor: "#909399",
  8955. lineColor: "#dcdfe6"
  8956. }
  8957. };
  8958. const Empty = {
  8959. // empty组件
  8960. empty: {
  8961. icon: "",
  8962. text: "",
  8963. textColor: "#c0c4cc",
  8964. textSize: 14,
  8965. iconColor: "#c0c4cc",
  8966. iconSize: 90,
  8967. mode: "data",
  8968. width: 160,
  8969. height: 160,
  8970. show: true,
  8971. marginTop: 0
  8972. }
  8973. };
  8974. const Form = {
  8975. // form 组件
  8976. form: {
  8977. model: {},
  8978. rules: {},
  8979. errorType: "message",
  8980. borderBottom: true,
  8981. labelPosition: "left",
  8982. labelWidth: 45,
  8983. labelAlign: "left",
  8984. labelStyle: {}
  8985. }
  8986. };
  8987. const GormItem = {
  8988. // formItem 组件
  8989. formItem: {
  8990. label: "",
  8991. prop: "",
  8992. rule: "",
  8993. borderBottom: "",
  8994. labelPosition: "",
  8995. labelWidth: "",
  8996. rightIcon: "",
  8997. leftIcon: "",
  8998. required: false,
  8999. leftIconStyle: ""
  9000. }
  9001. };
  9002. const Gap = {
  9003. // gap组件
  9004. gap: {
  9005. bgColor: "transparent",
  9006. height: 20,
  9007. marginTop: 0,
  9008. marginBottom: 0,
  9009. customStyle: {}
  9010. }
  9011. };
  9012. const Grid = {
  9013. // grid组件
  9014. grid: {
  9015. col: 3,
  9016. border: false,
  9017. align: "left"
  9018. }
  9019. };
  9020. const GridItem = {
  9021. // grid-item组件
  9022. gridItem: {
  9023. name: null,
  9024. bgColor: "transparent"
  9025. }
  9026. };
  9027. const {
  9028. color: color$3
  9029. } = config;
  9030. const Icon = {
  9031. // icon组件
  9032. icon: {
  9033. name: "",
  9034. color: color$3["u-content-color"],
  9035. size: "16px",
  9036. bold: false,
  9037. index: "",
  9038. hoverClass: "",
  9039. customPrefix: "uicon",
  9040. label: "",
  9041. labelPos: "right",
  9042. labelSize: "15px",
  9043. labelColor: color$3["u-content-color"],
  9044. space: "3px",
  9045. imgMode: "",
  9046. width: "",
  9047. height: "",
  9048. top: 0,
  9049. stop: false
  9050. }
  9051. };
  9052. const Image = {
  9053. // image组件
  9054. image: {
  9055. src: "",
  9056. mode: "aspectFill",
  9057. width: "300",
  9058. height: "225",
  9059. shape: "square",
  9060. radius: 0,
  9061. lazyLoad: true,
  9062. showMenuByLongpress: true,
  9063. loadingIcon: "photo",
  9064. errorIcon: "error-circle",
  9065. showLoading: true,
  9066. showError: true,
  9067. fade: true,
  9068. webp: false,
  9069. duration: 500,
  9070. bgColor: "#f3f4f6"
  9071. }
  9072. };
  9073. const IndexAnchor = {
  9074. // indexAnchor 组件
  9075. indexAnchor: {
  9076. text: "",
  9077. color: "#606266",
  9078. size: 14,
  9079. bgColor: "#dedede",
  9080. height: 32
  9081. }
  9082. };
  9083. const IndexList = {
  9084. // indexList 组件
  9085. indexList: {
  9086. inactiveColor: "#606266",
  9087. activeColor: "#5677fc",
  9088. indexList: [],
  9089. sticky: true,
  9090. customNavHeight: 0
  9091. }
  9092. };
  9093. const Input = {
  9094. // index 组件
  9095. input: {
  9096. value: "",
  9097. type: "text",
  9098. fixed: false,
  9099. disabled: false,
  9100. disabledColor: "#f5f7fa",
  9101. clearable: false,
  9102. password: false,
  9103. maxlength: -1,
  9104. placeholder: null,
  9105. placeholderClass: "input-placeholder",
  9106. placeholderStyle: "color: #c0c4cc",
  9107. showWordLimit: false,
  9108. confirmType: "done",
  9109. confirmHold: false,
  9110. holdKeyboard: false,
  9111. focus: false,
  9112. autoBlur: false,
  9113. disableDefaultPadding: false,
  9114. cursor: -1,
  9115. cursorSpacing: 30,
  9116. selectionStart: -1,
  9117. selectionEnd: -1,
  9118. adjustPosition: true,
  9119. inputAlign: "left",
  9120. fontSize: "15px",
  9121. color: "#303133",
  9122. prefixIcon: "",
  9123. prefixIconStyle: "",
  9124. suffixIcon: "",
  9125. suffixIconStyle: "",
  9126. border: "surround",
  9127. readonly: false,
  9128. shape: "square",
  9129. formatter: null
  9130. }
  9131. };
  9132. const Keyboard = {
  9133. // 键盘组件
  9134. keyboard: {
  9135. mode: "number",
  9136. dotDisabled: false,
  9137. tooltip: true,
  9138. showTips: true,
  9139. tips: "",
  9140. showCancel: true,
  9141. showConfirm: true,
  9142. random: false,
  9143. safeAreaInsetBottom: true,
  9144. closeOnClickOverlay: true,
  9145. show: false,
  9146. overlay: true,
  9147. zIndex: 10075,
  9148. cancelText: "取消",
  9149. confirmText: "确定",
  9150. autoChange: false
  9151. }
  9152. };
  9153. const Line = {
  9154. // line组件
  9155. line: {
  9156. color: "#d6d7d9",
  9157. length: "100%",
  9158. direction: "row",
  9159. hairline: true,
  9160. margin: 0,
  9161. dashed: false
  9162. }
  9163. };
  9164. const LineProgress = {
  9165. // lineProgress 组件
  9166. lineProgress: {
  9167. activeColor: "#19be6b",
  9168. inactiveColor: "#ececec",
  9169. percentage: 0,
  9170. showText: true,
  9171. height: 12
  9172. }
  9173. };
  9174. const {
  9175. color: color$2
  9176. } = config;
  9177. const Link = {
  9178. // link超链接组件props参数
  9179. link: {
  9180. color: color$2["u-primary"],
  9181. fontSize: 15,
  9182. underLine: false,
  9183. href: "",
  9184. mpTips: "链接已复制,请在浏览器打开",
  9185. lineColor: "",
  9186. text: ""
  9187. }
  9188. };
  9189. const List = {
  9190. // list 组件
  9191. list: {
  9192. showScrollbar: false,
  9193. lowerThreshold: 50,
  9194. upperThreshold: 0,
  9195. scrollTop: 0,
  9196. offsetAccuracy: 10,
  9197. enableFlex: false,
  9198. pagingEnabled: false,
  9199. scrollable: true,
  9200. scrollIntoView: "",
  9201. scrollWithAnimation: false,
  9202. enableBackToTop: false,
  9203. height: 0,
  9204. width: 0,
  9205. preLoadScreen: 1
  9206. }
  9207. };
  9208. const ListItem = {
  9209. // listItem 组件
  9210. listItem: {
  9211. anchor: ""
  9212. }
  9213. };
  9214. const {
  9215. color: color$1
  9216. } = config;
  9217. const LoadingIcon = {
  9218. // loading-icon加载中图标组件
  9219. loadingIcon: {
  9220. show: true,
  9221. color: color$1["u-tips-color"],
  9222. textColor: color$1["u-tips-color"],
  9223. vertical: false,
  9224. mode: "spinner",
  9225. size: 24,
  9226. textSize: 15,
  9227. text: "",
  9228. timingFunction: "ease-in-out",
  9229. duration: 1200,
  9230. inactiveColor: ""
  9231. }
  9232. };
  9233. const LoadingPage = {
  9234. // loading-page组件
  9235. loadingPage: {
  9236. loadingText: "正在加载",
  9237. image: "",
  9238. loadingMode: "circle",
  9239. loading: false,
  9240. bgColor: "#ffffff",
  9241. color: "#C8C8C8",
  9242. fontSize: 19,
  9243. iconSize: 28,
  9244. loadingColor: "#C8C8C8"
  9245. }
  9246. };
  9247. const Loadmore = {
  9248. // loadmore 组件
  9249. loadmore: {
  9250. status: "loadmore",
  9251. bgColor: "transparent",
  9252. icon: true,
  9253. fontSize: 14,
  9254. iconSize: 17,
  9255. color: "#606266",
  9256. loadingIcon: "spinner",
  9257. loadmoreText: "加载更多",
  9258. loadingText: "正在加载...",
  9259. nomoreText: "没有更多了",
  9260. isDot: false,
  9261. iconColor: "#b7b7b7",
  9262. marginTop: 10,
  9263. marginBottom: 10,
  9264. height: "auto",
  9265. line: false,
  9266. lineColor: "#E6E8EB",
  9267. dashed: false
  9268. }
  9269. };
  9270. const Modal = {
  9271. // modal 组件
  9272. modal: {
  9273. show: false,
  9274. title: "",
  9275. content: "",
  9276. confirmText: "确认",
  9277. cancelText: "取消",
  9278. showConfirmButton: true,
  9279. showCancelButton: false,
  9280. confirmColor: "#2979ff",
  9281. cancelColor: "#606266",
  9282. buttonReverse: false,
  9283. zoom: true,
  9284. asyncClose: false,
  9285. closeOnClickOverlay: false,
  9286. negativeTop: 0,
  9287. width: "650rpx",
  9288. confirmButtonShape: ""
  9289. }
  9290. };
  9291. const color = {
  9292. primary: "#3c9cff",
  9293. info: "#909399",
  9294. default: "#909399",
  9295. warning: "#f9ae3d",
  9296. error: "#f56c6c",
  9297. success: "#5ac725",
  9298. mainColor: "#303133",
  9299. contentColor: "#606266",
  9300. tipsColor: "#909399",
  9301. lightColor: "#c0c4cc",
  9302. borderColor: "#e4e7ed"
  9303. };
  9304. const Navbar = {
  9305. // navbar 组件
  9306. navbar: {
  9307. safeAreaInsetTop: true,
  9308. placeholder: false,
  9309. fixed: true,
  9310. border: false,
  9311. leftIcon: "arrow-left",
  9312. leftText: "",
  9313. rightText: "",
  9314. rightIcon: "",
  9315. title: "",
  9316. bgColor: "#ffffff",
  9317. titleWidth: "400rpx",
  9318. height: "44px",
  9319. leftIconSize: 20,
  9320. leftIconColor: color.mainColor,
  9321. autoBack: false,
  9322. titleStyle: ""
  9323. }
  9324. };
  9325. const NoNetwork = {
  9326. // noNetwork
  9327. noNetwork: {
  9328. tips: "哎呀,网络信号丢失",
  9329. zIndex: "",
  9330. image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBA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kTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
  9331. }
  9332. };
  9333. const NoticeBar = {
  9334. // noticeBar
  9335. noticeBar: {
  9336. text: [],
  9337. direction: "row",
  9338. step: false,
  9339. icon: "volume",
  9340. mode: "",
  9341. color: "#f9ae3d",
  9342. bgColor: "#fdf6ec",
  9343. speed: 80,
  9344. fontSize: 14,
  9345. duration: 2e3,
  9346. disableTouch: true,
  9347. url: "",
  9348. linkType: "navigateTo"
  9349. }
  9350. };
  9351. const Notify = {
  9352. // notify组件
  9353. notify: {
  9354. top: 0,
  9355. type: "primary",
  9356. color: "#ffffff",
  9357. bgColor: "",
  9358. message: "",
  9359. duration: 3e3,
  9360. fontSize: 15,
  9361. safeAreaInsetTop: false
  9362. }
  9363. };
  9364. const NumberBox = {
  9365. // 步进器组件
  9366. numberBox: {
  9367. name: "",
  9368. value: 0,
  9369. min: 1,
  9370. max: Number.MAX_SAFE_INTEGER,
  9371. step: 1,
  9372. integer: false,
  9373. disabled: false,
  9374. disabledInput: false,
  9375. asyncChange: false,
  9376. inputWidth: 35,
  9377. showMinus: true,
  9378. showPlus: true,
  9379. decimalLength: null,
  9380. longPress: true,
  9381. color: "#323233",
  9382. buttonSize: 30,
  9383. bgColor: "#EBECEE",
  9384. cursorSpacing: 100,
  9385. disableMinus: false,
  9386. disablePlus: false,
  9387. iconStyle: ""
  9388. }
  9389. };
  9390. const NumberKeyboard = {
  9391. // 数字键盘
  9392. numberKeyboard: {
  9393. mode: "number",
  9394. dotDisabled: false,
  9395. random: false
  9396. }
  9397. };
  9398. const Overlay = {
  9399. // overlay组件
  9400. overlay: {
  9401. show: false,
  9402. zIndex: 10070,
  9403. duration: 300,
  9404. opacity: 0.5
  9405. }
  9406. };
  9407. const Parse = {
  9408. // parse
  9409. parse: {
  9410. copyLink: true,
  9411. errorImg: "",
  9412. lazyLoad: false,
  9413. loadingImg: "",
  9414. pauseVideo: true,
  9415. previewImg: true,
  9416. setTitle: true,
  9417. showImgMenu: true
  9418. }
  9419. };
  9420. const Picker = {
  9421. // picker
  9422. picker: {
  9423. show: false,
  9424. popupMode: "bottom",
  9425. showToolbar: true,
  9426. title: "",
  9427. columns: [],
  9428. loading: false,
  9429. itemHeight: 44,
  9430. cancelText: "取消",
  9431. confirmText: "确定",
  9432. cancelColor: "#909193",
  9433. confirmColor: "#3c9cff",
  9434. visibleItemCount: 5,
  9435. keyName: "text",
  9436. closeOnClickOverlay: false,
  9437. defaultIndex: [],
  9438. immediateChange: true
  9439. }
  9440. };
  9441. const Popup = {
  9442. // popup组件
  9443. popup: {
  9444. show: false,
  9445. overlay: true,
  9446. mode: "bottom",
  9447. duration: 300,
  9448. closeable: false,
  9449. overlayStyle: {},
  9450. closeOnClickOverlay: true,
  9451. zIndex: 10075,
  9452. safeAreaInsetBottom: true,
  9453. safeAreaInsetTop: false,
  9454. closeIconPos: "top-right",
  9455. round: 0,
  9456. zoom: true,
  9457. bgColor: "",
  9458. overlayOpacity: 0.5
  9459. }
  9460. };
  9461. const Radio = {
  9462. // radio组件
  9463. radio: {
  9464. name: "",
  9465. shape: "",
  9466. disabled: "",
  9467. labelDisabled: "",
  9468. activeColor: "",
  9469. inactiveColor: "",
  9470. iconSize: "",
  9471. labelSize: "",
  9472. label: "",
  9473. labelColor: "",
  9474. size: "",
  9475. iconColor: "",
  9476. placement: ""
  9477. }
  9478. };
  9479. const RadioGroup = {
  9480. // radio-group组件
  9481. radioGroup: {
  9482. value: "",
  9483. disabled: false,
  9484. shape: "circle",
  9485. activeColor: "#2979ff",
  9486. inactiveColor: "#c8c9cc",
  9487. name: "",
  9488. size: 18,
  9489. placement: "row",
  9490. label: "",
  9491. labelColor: "#303133",
  9492. labelSize: 14,
  9493. labelDisabled: false,
  9494. iconColor: "#ffffff",
  9495. iconSize: 12,
  9496. borderBottom: false,
  9497. iconPlacement: "left"
  9498. }
  9499. };
  9500. const Rate = {
  9501. // rate组件
  9502. rate: {
  9503. value: 1,
  9504. count: 5,
  9505. disabled: false,
  9506. size: 18,
  9507. inactiveColor: "#b2b2b2",
  9508. activeColor: "#FA3534",
  9509. gutter: 4,
  9510. minCount: 1,
  9511. allowHalf: false,
  9512. activeIcon: "star-fill",
  9513. inactiveIcon: "star",
  9514. touchable: true
  9515. }
  9516. };
  9517. const ReadMore = {
  9518. // readMore
  9519. readMore: {
  9520. showHeight: 400,
  9521. toggle: false,
  9522. closeText: "展开阅读全文",
  9523. openText: "收起",
  9524. color: "#2979ff",
  9525. fontSize: 14,
  9526. textIndent: "2em",
  9527. name: ""
  9528. }
  9529. };
  9530. const Row = {
  9531. // row
  9532. row: {
  9533. gutter: 0,
  9534. justify: "start",
  9535. align: "center"
  9536. }
  9537. };
  9538. const RowNotice = {
  9539. // rowNotice
  9540. rowNotice: {
  9541. text: "",
  9542. icon: "volume",
  9543. mode: "",
  9544. color: "#f9ae3d",
  9545. bgColor: "#fdf6ec",
  9546. fontSize: 14,
  9547. speed: 80
  9548. }
  9549. };
  9550. const ScrollList = {
  9551. // scrollList
  9552. scrollList: {
  9553. indicatorWidth: 50,
  9554. indicatorBarWidth: 20,
  9555. indicator: true,
  9556. indicatorColor: "#f2f2f2",
  9557. indicatorActiveColor: "#3c9cff",
  9558. indicatorStyle: ""
  9559. }
  9560. };
  9561. const Search = {
  9562. // search
  9563. search: {
  9564. shape: "round",
  9565. bgColor: "#f2f2f2",
  9566. placeholder: "请输入关键字",
  9567. clearabled: true,
  9568. focus: false,
  9569. showAction: true,
  9570. actionStyle: {},
  9571. actionText: "搜索",
  9572. inputAlign: "left",
  9573. inputStyle: {},
  9574. disabled: false,
  9575. borderColor: "transparent",
  9576. searchIconColor: "#909399",
  9577. searchIconSize: 22,
  9578. color: "#606266",
  9579. placeholderColor: "#909399",
  9580. searchIcon: "search",
  9581. margin: "0",
  9582. animation: false,
  9583. value: "",
  9584. maxlength: "-1",
  9585. height: 32,
  9586. label: null
  9587. }
  9588. };
  9589. const Section = {
  9590. // u-section组件
  9591. section: {
  9592. title: "",
  9593. subTitle: "更多",
  9594. right: true,
  9595. fontSize: 15,
  9596. bold: true,
  9597. color: "#303133",
  9598. subColor: "#909399",
  9599. showLine: true,
  9600. lineColor: "",
  9601. arrow: true
  9602. }
  9603. };
  9604. const Skeleton = {
  9605. // skeleton
  9606. skeleton: {
  9607. loading: true,
  9608. animate: true,
  9609. rows: 0,
  9610. rowsWidth: "100%",
  9611. rowsHeight: 18,
  9612. title: true,
  9613. titleWidth: "50%",
  9614. titleHeight: 18,
  9615. avatar: false,
  9616. avatarSize: 32,
  9617. avatarShape: "circle"
  9618. }
  9619. };
  9620. const Slider = {
  9621. // slider组件
  9622. slider: {
  9623. value: 0,
  9624. blockSize: 18,
  9625. min: 0,
  9626. max: 100,
  9627. step: 1,
  9628. activeColor: "#2979ff",
  9629. inactiveColor: "#c0c4cc",
  9630. blockColor: "#ffffff",
  9631. showValue: false,
  9632. disabled: false,
  9633. blockStyle: {}
  9634. }
  9635. };
  9636. const StatusBar = {
  9637. // statusBar
  9638. statusBar: {
  9639. bgColor: "transparent"
  9640. }
  9641. };
  9642. const Steps = {
  9643. // steps组件
  9644. steps: {
  9645. direction: "row",
  9646. current: 0,
  9647. activeColor: "#3c9cff",
  9648. inactiveColor: "#969799",
  9649. activeIcon: "",
  9650. inactiveIcon: "",
  9651. dot: false
  9652. }
  9653. };
  9654. const StepsItem = {
  9655. // steps-item组件
  9656. stepsItem: {
  9657. title: "",
  9658. desc: "",
  9659. iconSize: 17,
  9660. error: false
  9661. }
  9662. };
  9663. const Sticky = {
  9664. // sticky组件
  9665. sticky: {
  9666. offsetTop: 0,
  9667. customNavHeight: 0,
  9668. disabled: false,
  9669. bgColor: "transparent",
  9670. zIndex: "",
  9671. index: ""
  9672. }
  9673. };
  9674. const Subsection = {
  9675. // subsection组件
  9676. subsection: {
  9677. list: [],
  9678. current: 0,
  9679. activeColor: "#3c9cff",
  9680. inactiveColor: "#303133",
  9681. mode: "button",
  9682. fontSize: 12,
  9683. bold: true,
  9684. bgColor: "#eeeeef",
  9685. keyName: "name"
  9686. }
  9687. };
  9688. const SwipeAction = {
  9689. // swipe-action组件
  9690. swipeAction: {
  9691. autoClose: true
  9692. }
  9693. };
  9694. const SwipeActionItem = {
  9695. // swipeActionItem 组件
  9696. swipeActionItem: {
  9697. show: false,
  9698. name: "",
  9699. disabled: false,
  9700. threshold: 20,
  9701. autoClose: true,
  9702. options: [],
  9703. duration: 300
  9704. }
  9705. };
  9706. const Swiper = {
  9707. // swiper 组件
  9708. swiper: {
  9709. list: [],
  9710. indicator: false,
  9711. indicatorActiveColor: "#FFFFFF",
  9712. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  9713. indicatorStyle: "",
  9714. indicatorMode: "line",
  9715. autoplay: true,
  9716. current: 0,
  9717. currentItemId: "",
  9718. interval: 3e3,
  9719. duration: 300,
  9720. circular: false,
  9721. previousMargin: 0,
  9722. nextMargin: 0,
  9723. acceleration: false,
  9724. displayMultipleItems: 1,
  9725. easingFunction: "default",
  9726. keyName: "url",
  9727. imgMode: "aspectFill",
  9728. height: 130,
  9729. bgColor: "#f3f4f6",
  9730. radius: 4,
  9731. loading: false,
  9732. showTitle: false
  9733. }
  9734. };
  9735. const SwipterIndicator = {
  9736. // swiperIndicator 组件
  9737. swiperIndicator: {
  9738. length: 0,
  9739. current: 0,
  9740. indicatorActiveColor: "",
  9741. indicatorInactiveColor: "",
  9742. indicatorMode: "line"
  9743. }
  9744. };
  9745. const Switch = {
  9746. // switch
  9747. switch: {
  9748. loading: false,
  9749. disabled: false,
  9750. size: 25,
  9751. activeColor: "#2979ff",
  9752. inactiveColor: "#ffffff",
  9753. value: false,
  9754. activeValue: true,
  9755. inactiveValue: false,
  9756. asyncChange: false,
  9757. space: 0
  9758. }
  9759. };
  9760. const Tabbar = {
  9761. // tabbar
  9762. tabbar: {
  9763. value: null,
  9764. safeAreaInsetBottom: true,
  9765. border: true,
  9766. zIndex: 1,
  9767. activeColor: "#1989fa",
  9768. inactiveColor: "#7d7e80",
  9769. fixed: true,
  9770. placeholder: true
  9771. }
  9772. };
  9773. const TabbarItem = {
  9774. //
  9775. tabbarItem: {
  9776. name: null,
  9777. icon: "",
  9778. badge: null,
  9779. dot: false,
  9780. text: "",
  9781. badgeStyle: "top: 6px;right:2px;"
  9782. }
  9783. };
  9784. const Tabs = {
  9785. //
  9786. tabs: {
  9787. duration: 300,
  9788. list: [],
  9789. lineColor: "#3c9cff",
  9790. activeStyle: {
  9791. color: "#303133"
  9792. },
  9793. inactiveStyle: {
  9794. color: "#606266"
  9795. },
  9796. lineWidth: 20,
  9797. lineHeight: 3,
  9798. lineBgSize: "cover",
  9799. itemStyle: {
  9800. height: "44px"
  9801. },
  9802. scrollable: true,
  9803. current: 0,
  9804. keyName: "name"
  9805. }
  9806. };
  9807. const Tag = {
  9808. // tag 组件
  9809. tag: {
  9810. type: "primary",
  9811. disabled: false,
  9812. size: "medium",
  9813. shape: "square",
  9814. text: "",
  9815. bgColor: "",
  9816. color: "",
  9817. borderColor: "",
  9818. closeColor: "#C6C7CB",
  9819. name: "",
  9820. plainFill: false,
  9821. plain: false,
  9822. closable: false,
  9823. show: true,
  9824. icon: "",
  9825. iconColor: ""
  9826. }
  9827. };
  9828. const Text = {
  9829. // text 组件
  9830. text: {
  9831. type: "",
  9832. show: true,
  9833. text: "",
  9834. prefixIcon: "",
  9835. suffixIcon: "",
  9836. mode: "",
  9837. href: "",
  9838. format: "",
  9839. call: false,
  9840. openType: "",
  9841. bold: false,
  9842. block: false,
  9843. lines: "",
  9844. color: "#303133",
  9845. size: 15,
  9846. iconStyle: {
  9847. fontSize: "15px"
  9848. },
  9849. decoration: "none",
  9850. margin: 0,
  9851. lineHeight: "",
  9852. align: "left",
  9853. wordWrap: "normal"
  9854. }
  9855. };
  9856. const Textarea = {
  9857. // textarea 组件
  9858. textarea: {
  9859. value: "",
  9860. placeholder: "",
  9861. placeholderClass: "textarea-placeholder",
  9862. placeholderStyle: "color: #c0c4cc",
  9863. height: 70,
  9864. confirmType: "done",
  9865. disabled: false,
  9866. count: false,
  9867. focus: false,
  9868. autoHeight: false,
  9869. fixed: false,
  9870. cursorSpacing: 0,
  9871. cursor: "",
  9872. showConfirmBar: true,
  9873. selectionStart: -1,
  9874. selectionEnd: -1,
  9875. adjustPosition: true,
  9876. disableDefaultPadding: false,
  9877. holdKeyboard: false,
  9878. maxlength: 140,
  9879. border: "surround",
  9880. formatter: null
  9881. }
  9882. };
  9883. const Toast = {
  9884. // toast组件
  9885. toast: {
  9886. zIndex: 10090,
  9887. loading: false,
  9888. text: "",
  9889. icon: "",
  9890. type: "",
  9891. loadingMode: "",
  9892. show: "",
  9893. overlay: false,
  9894. position: "center",
  9895. params: {},
  9896. duration: 2e3,
  9897. isTab: false,
  9898. url: "",
  9899. callback: null,
  9900. back: false
  9901. }
  9902. };
  9903. const Toolbar = {
  9904. // toolbar 组件
  9905. toolbar: {
  9906. show: true,
  9907. cancelText: "取消",
  9908. confirmText: "确认",
  9909. cancelColor: "#909193",
  9910. confirmColor: "#3c9cff",
  9911. title: ""
  9912. }
  9913. };
  9914. const Tooltip = {
  9915. // tooltip 组件
  9916. tooltip: {
  9917. text: "",
  9918. copyText: "",
  9919. size: 14,
  9920. color: "#606266",
  9921. bgColor: "transparent",
  9922. direction: "top",
  9923. zIndex: 10071,
  9924. showCopy: true,
  9925. buttons: [],
  9926. overlay: true,
  9927. showToast: true
  9928. }
  9929. };
  9930. const Transition = {
  9931. // transition动画组件的props
  9932. transition: {
  9933. show: false,
  9934. mode: "fade",
  9935. duration: "300",
  9936. timingFunction: "ease-out"
  9937. }
  9938. };
  9939. const Upload = {
  9940. // upload组件
  9941. upload: {
  9942. accept: "image",
  9943. capture: ["album", "camera"],
  9944. compressed: true,
  9945. camera: "back",
  9946. maxDuration: 60,
  9947. uploadIcon: "camera-fill",
  9948. uploadIconColor: "#D3D4D6",
  9949. useBeforeRead: false,
  9950. previewFullImage: true,
  9951. maxCount: 52,
  9952. disabled: false,
  9953. imageMode: "aspectFill",
  9954. name: "",
  9955. sizeType: ["original", "compressed"],
  9956. multiple: false,
  9957. deletable: true,
  9958. maxSize: Number.MAX_VALUE,
  9959. fileList: [],
  9960. uploadText: "",
  9961. width: 80,
  9962. height: 80,
  9963. previewImage: true
  9964. }
  9965. };
  9966. const defProps = {
  9967. ...ActionSheet,
  9968. ...Album,
  9969. ...Alert,
  9970. ...Avatar,
  9971. ...AvatarGroup,
  9972. ...Backtop,
  9973. ...Badge,
  9974. ...Button,
  9975. ...Calendar,
  9976. ...CarKeyboard,
  9977. ...Cell,
  9978. ...CellGroup,
  9979. ...Checkbox,
  9980. ...CheckboxGroup,
  9981. ...CircleProgress,
  9982. ...Code,
  9983. ...CodeInput,
  9984. ...Col,
  9985. ...Collapse,
  9986. ...CollapseItem,
  9987. ...ColumnNotice,
  9988. ...CountDown,
  9989. ...CountTo,
  9990. ...DatetimePicker,
  9991. ...Divider,
  9992. ...Empty,
  9993. ...Form,
  9994. ...GormItem,
  9995. ...Gap,
  9996. ...Grid,
  9997. ...GridItem,
  9998. ...Icon,
  9999. ...Image,
  10000. ...IndexAnchor,
  10001. ...IndexList,
  10002. ...Input,
  10003. ...Keyboard,
  10004. ...Line,
  10005. ...LineProgress,
  10006. ...Link,
  10007. ...List,
  10008. ...ListItem,
  10009. ...LoadingIcon,
  10010. ...LoadingPage,
  10011. ...Loadmore,
  10012. ...Modal,
  10013. ...Navbar,
  10014. ...NoNetwork,
  10015. ...NoticeBar,
  10016. ...Notify,
  10017. ...NumberBox,
  10018. ...NumberKeyboard,
  10019. ...Overlay,
  10020. ...Parse,
  10021. ...Picker,
  10022. ...Popup,
  10023. ...Radio,
  10024. ...RadioGroup,
  10025. ...Rate,
  10026. ...ReadMore,
  10027. ...Row,
  10028. ...RowNotice,
  10029. ...ScrollList,
  10030. ...Search,
  10031. ...Section,
  10032. ...Skeleton,
  10033. ...Slider,
  10034. ...StatusBar,
  10035. ...Steps,
  10036. ...StepsItem,
  10037. ...Sticky,
  10038. ...Subsection,
  10039. ...SwipeAction,
  10040. ...SwipeActionItem,
  10041. ...Swiper,
  10042. ...SwipterIndicator,
  10043. ...Switch,
  10044. ...Tabbar,
  10045. ...TabbarItem,
  10046. ...Tabs,
  10047. ...Tag,
  10048. ...Text,
  10049. ...Textarea,
  10050. ...Toast,
  10051. ...Toolbar,
  10052. ...Tooltip,
  10053. ...Transition,
  10054. ...Upload
  10055. };
  10056. const zIndex = {
  10057. toast: 10090,
  10058. noNetwork: 10080,
  10059. // popup包含popup,actionsheet,keyboard,picker的值
  10060. popup: 10075,
  10061. mask: 10070,
  10062. navbar: 980,
  10063. topTips: 975,
  10064. sticky: 970,
  10065. indexListSticky: 965
  10066. };
  10067. let platform = "none";
  10068. platform = "vue3";
  10069. platform = "mp";
  10070. platform = "weixin";
  10071. const platform$1 = platform;
  10072. const http = new Request();
  10073. let themeType = ["primary", "success", "error", "warning", "info"];
  10074. function setConfig(configs) {
  10075. index.shallowMerge(config, configs.config || {});
  10076. index.shallowMerge(defProps, configs.props || {});
  10077. index.shallowMerge(color, configs.color || {});
  10078. index.shallowMerge(zIndex, configs.zIndex || {});
  10079. }
  10080. index.setConfig = setConfig;
  10081. const $u = {
  10082. route,
  10083. date: index.timeFormat,
  10084. // 另名date
  10085. colorGradient: colorGradient$1.colorGradient,
  10086. hexToRgb: colorGradient$1.hexToRgb,
  10087. rgbToHex: colorGradient$1.rgbToHex,
  10088. colorToRgba: colorGradient$1.colorToRgba,
  10089. test,
  10090. type: themeType,
  10091. http,
  10092. config,
  10093. // uview-plus配置信息相关,比如版本号
  10094. zIndex,
  10095. debounce,
  10096. throttle,
  10097. mixin,
  10098. mpMixin,
  10099. props: defProps,
  10100. ...index,
  10101. color,
  10102. platform: platform$1
  10103. };
  10104. index$1.$u = $u;
  10105. const install = (Vue) => {
  10106. Vue.config.globalProperties.$u = $u;
  10107. Vue.mixin(mixin);
  10108. };
  10109. const uviewPlus = {
  10110. install
  10111. };
  10112. const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
  10113. !isInSSRComponentSetup && injectHook(lifecycle, hook, target);
  10114. };
  10115. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  10116. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  10117. const props$2 = {
  10118. props: {
  10119. // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
  10120. list: {
  10121. type: Array,
  10122. default: () => defProps.swiper.list
  10123. },
  10124. // 是否显示面板指示器
  10125. indicator: {
  10126. type: Boolean,
  10127. default: () => defProps.swiper.indicator
  10128. },
  10129. // 指示器非激活颜色
  10130. indicatorActiveColor: {
  10131. type: String,
  10132. default: () => defProps.swiper.indicatorActiveColor
  10133. },
  10134. // 指示器的激活颜色
  10135. indicatorInactiveColor: {
  10136. type: String,
  10137. default: () => defProps.swiper.indicatorInactiveColor
  10138. },
  10139. // 指示器样式,可通过bottom,left,right进行定位
  10140. indicatorStyle: {
  10141. type: [String, Object],
  10142. default: () => defProps.swiper.indicatorStyle
  10143. },
  10144. // 指示器模式,line-线型,dot-点型
  10145. indicatorMode: {
  10146. type: String,
  10147. default: () => defProps.swiper.indicatorMode
  10148. },
  10149. // 是否自动切换
  10150. autoplay: {
  10151. type: Boolean,
  10152. default: () => defProps.swiper.autoplay
  10153. },
  10154. // 当前所在滑块的 index
  10155. current: {
  10156. type: [String, Number],
  10157. default: () => defProps.swiper.current
  10158. },
  10159. // 当前所在滑块的 item-id ,不能与 current 被同时指定
  10160. currentItemId: {
  10161. type: String,
  10162. default: () => defProps.swiper.currentItemId
  10163. },
  10164. // 滑块自动切换时间间隔
  10165. interval: {
  10166. type: [String, Number],
  10167. default: () => defProps.swiper.interval
  10168. },
  10169. // 滑块切换过程所需时间
  10170. duration: {
  10171. type: [String, Number],
  10172. default: () => defProps.swiper.duration
  10173. },
  10174. // 播放到末尾后是否重新回到开头
  10175. circular: {
  10176. type: Boolean,
  10177. default: () => defProps.swiper.circular
  10178. },
  10179. // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
  10180. previousMargin: {
  10181. type: [String, Number],
  10182. default: () => defProps.swiper.previousMargin
  10183. },
  10184. // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
  10185. nextMargin: {
  10186. type: [String, Number],
  10187. default: () => defProps.swiper.nextMargin
  10188. },
  10189. // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
  10190. acceleration: {
  10191. type: Boolean,
  10192. default: () => defProps.swiper.acceleration
  10193. },
  10194. // 同时显示的滑块数量,nvue、支付宝小程序不支持
  10195. displayMultipleItems: {
  10196. type: Number,
  10197. default: () => defProps.swiper.displayMultipleItems
  10198. },
  10199. // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
  10200. // 只对微信小程序有效
  10201. easingFunction: {
  10202. type: String,
  10203. default: () => defProps.swiper.easingFunction
  10204. },
  10205. // list数组中指定对象的目标属性名
  10206. keyName: {
  10207. type: String,
  10208. default: () => defProps.swiper.keyName
  10209. },
  10210. // 图片的裁剪模式
  10211. imgMode: {
  10212. type: String,
  10213. default: () => defProps.swiper.imgMode
  10214. },
  10215. // 组件高度
  10216. height: {
  10217. type: [String, Number],
  10218. default: () => defProps.swiper.height
  10219. },
  10220. // 背景颜色
  10221. bgColor: {
  10222. type: String,
  10223. default: () => defProps.swiper.bgColor
  10224. },
  10225. // 组件圆角,数值或带单位的字符串
  10226. radius: {
  10227. type: [String, Number],
  10228. default: () => defProps.swiper.radius
  10229. },
  10230. // 是否加载中
  10231. loading: {
  10232. type: Boolean,
  10233. default: () => defProps.swiper.loading
  10234. },
  10235. // 是否显示标题,要求数组对象中有title属性
  10236. showTitle: {
  10237. type: Boolean,
  10238. default: () => defProps.swiper.showTitle
  10239. }
  10240. }
  10241. };
  10242. const props$1 = {
  10243. props: {
  10244. // 是否显示组件
  10245. show: {
  10246. type: Boolean,
  10247. default: () => defProps.loadingIcon.show
  10248. },
  10249. // 颜色
  10250. color: {
  10251. type: String,
  10252. default: () => defProps.loadingIcon.color
  10253. },
  10254. // 提示文字颜色
  10255. textColor: {
  10256. type: String,
  10257. default: () => defProps.loadingIcon.textColor
  10258. },
  10259. // 文字和图标是否垂直排列
  10260. vertical: {
  10261. type: Boolean,
  10262. default: () => defProps.loadingIcon.vertical
  10263. },
  10264. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  10265. mode: {
  10266. type: String,
  10267. default: () => defProps.loadingIcon.mode
  10268. },
  10269. // 图标大小,单位默认px
  10270. size: {
  10271. type: [String, Number],
  10272. default: () => defProps.loadingIcon.size
  10273. },
  10274. // 文字大小
  10275. textSize: {
  10276. type: [String, Number],
  10277. default: () => defProps.loadingIcon.textSize
  10278. },
  10279. // 文字内容
  10280. text: {
  10281. type: [String, Number],
  10282. default: () => defProps.loadingIcon.text
  10283. },
  10284. // 动画模式
  10285. timingFunction: {
  10286. type: String,
  10287. default: () => defProps.loadingIcon.timingFunction
  10288. },
  10289. // 动画执行周期时间
  10290. duration: {
  10291. type: [String, Number],
  10292. default: () => defProps.loadingIcon.duration
  10293. },
  10294. // mode=circle时的暗边颜色
  10295. inactiveColor: {
  10296. type: String,
  10297. default: () => defProps.loadingIcon.inactiveColor
  10298. }
  10299. }
  10300. };
  10301. const props = {
  10302. props: {
  10303. // 轮播的长度
  10304. length: {
  10305. type: [String, Number],
  10306. default: () => defProps.swiperIndicator.length
  10307. },
  10308. // 当前处于活动状态的轮播的索引
  10309. current: {
  10310. type: [String, Number],
  10311. default: () => defProps.swiperIndicator.current
  10312. },
  10313. // 指示器非激活颜色
  10314. indicatorActiveColor: {
  10315. type: String,
  10316. default: () => defProps.swiperIndicator.indicatorActiveColor
  10317. },
  10318. // 指示器的激活颜色
  10319. indicatorInactiveColor: {
  10320. type: String,
  10321. default: () => defProps.swiperIndicator.indicatorInactiveColor
  10322. },
  10323. // 指示器模式,line-线型,dot-点型
  10324. indicatorMode: {
  10325. type: String,
  10326. default: () => defProps.swiperIndicator.indicatorMode
  10327. }
  10328. }
  10329. };
  10330. exports._export_sfc = _export_sfc;
  10331. exports.addStyle = addStyle;
  10332. exports.addUnit = addUnit;
  10333. exports.colorGradient = colorGradient;
  10334. exports.createSSRApp = createSSRApp;
  10335. exports.defineComponent = defineComponent;
  10336. exports.e = e;
  10337. exports.error = error;
  10338. exports.f = f;
  10339. exports.getCurrentInstance = getCurrentInstance;
  10340. exports.index = index$1;
  10341. exports.mixin = mixin;
  10342. exports.mpMixin = mpMixin;
  10343. exports.n = n;
  10344. exports.o = o;
  10345. exports.onLoad = onLoad;
  10346. exports.onShow = onShow;
  10347. exports.p = p;
  10348. exports.props = props$2;
  10349. exports.props$1 = props$1;
  10350. exports.props$2 = props;
  10351. exports.ref = ref;
  10352. exports.resolveComponent = resolveComponent;
  10353. exports.s = s;
  10354. exports.t = t;
  10355. exports.test = test;
  10356. exports.uviewPlus = uviewPlus;
  10357. exports.wx$1 = wx$1;