vue.js 360 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491
  1. // node_modules/@vue/shared/dist/shared.esm-bundler.js
  2. function makeMap(str) {
  3. const map2 = /* @__PURE__ */ Object.create(null);
  4. for (const key of str.split(",")) map2[key] = 1;
  5. return (val) => val in map2;
  6. }
  7. var EMPTY_OBJ = true ? Object.freeze({}) : {};
  8. var EMPTY_ARR = true ? Object.freeze([]) : [];
  9. var NOOP = () => {
  10. };
  11. var NO = () => false;
  12. var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
  13. (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  14. var isModelListener = (key) => key.startsWith("onUpdate:");
  15. var extend = Object.assign;
  16. var remove = (arr, el) => {
  17. const i = arr.indexOf(el);
  18. if (i > -1) {
  19. arr.splice(i, 1);
  20. }
  21. };
  22. var hasOwnProperty = Object.prototype.hasOwnProperty;
  23. var hasOwn = (val, key) => hasOwnProperty.call(val, key);
  24. var isArray = Array.isArray;
  25. var isMap = (val) => toTypeString(val) === "[object Map]";
  26. var isSet = (val) => toTypeString(val) === "[object Set]";
  27. var isDate = (val) => toTypeString(val) === "[object Date]";
  28. var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  29. var isFunction = (val) => typeof val === "function";
  30. var isString = (val) => typeof val === "string";
  31. var isSymbol = (val) => typeof val === "symbol";
  32. var isObject = (val) => val !== null && typeof val === "object";
  33. var isPromise = (val) => {
  34. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  35. };
  36. var objectToString = Object.prototype.toString;
  37. var toTypeString = (value) => objectToString.call(value);
  38. var toRawType = (value) => {
  39. return toTypeString(value).slice(8, -1);
  40. };
  41. var isPlainObject = (val) => toTypeString(val) === "[object Object]";
  42. var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  43. var isReservedProp = makeMap(
  44. // the leading comma is intentional so empty string "" is also included
  45. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  46. );
  47. var isBuiltInDirective = makeMap(
  48. "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
  49. );
  50. var cacheStringFunction = (fn) => {
  51. const cache = /* @__PURE__ */ Object.create(null);
  52. return (str) => {
  53. const hit = cache[str];
  54. return hit || (cache[str] = fn(str));
  55. };
  56. };
  57. var camelizeRE = /-(\w)/g;
  58. var camelize = cacheStringFunction(
  59. (str) => {
  60. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  61. }
  62. );
  63. var hyphenateRE = /\B([A-Z])/g;
  64. var hyphenate = cacheStringFunction(
  65. (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
  66. );
  67. var capitalize = cacheStringFunction((str) => {
  68. return str.charAt(0).toUpperCase() + str.slice(1);
  69. });
  70. var toHandlerKey = cacheStringFunction(
  71. (str) => {
  72. const s = str ? `on${capitalize(str)}` : ``;
  73. return s;
  74. }
  75. );
  76. var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  77. var invokeArrayFns = (fns, ...arg) => {
  78. for (let i = 0; i < fns.length; i++) {
  79. fns[i](...arg);
  80. }
  81. };
  82. var def = (obj, key, value, writable = false) => {
  83. Object.defineProperty(obj, key, {
  84. configurable: true,
  85. enumerable: false,
  86. writable,
  87. value
  88. });
  89. };
  90. var looseToNumber = (val) => {
  91. const n = parseFloat(val);
  92. return isNaN(n) ? val : n;
  93. };
  94. var toNumber = (val) => {
  95. const n = isString(val) ? Number(val) : NaN;
  96. return isNaN(n) ? val : n;
  97. };
  98. var _globalThis;
  99. var getGlobalThis = () => {
  100. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  101. };
  102. var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
  103. var isGloballyAllowed = makeMap(GLOBALS_ALLOWED);
  104. function normalizeStyle(value) {
  105. if (isArray(value)) {
  106. const res = {};
  107. for (let i = 0; i < value.length; i++) {
  108. const item = value[i];
  109. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  110. if (normalized) {
  111. for (const key in normalized) {
  112. res[key] = normalized[key];
  113. }
  114. }
  115. }
  116. return res;
  117. } else if (isString(value) || isObject(value)) {
  118. return value;
  119. }
  120. }
  121. var listDelimiterRE = /;(?![^(]*\))/g;
  122. var propertyDelimiterRE = /:([^]+)/;
  123. var styleCommentRE = /\/\*[^]*?\*\//g;
  124. function parseStringStyle(cssText) {
  125. const ret = {};
  126. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  127. if (item) {
  128. const tmp = item.split(propertyDelimiterRE);
  129. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  130. }
  131. });
  132. return ret;
  133. }
  134. function stringifyStyle(styles) {
  135. let ret = "";
  136. if (!styles || isString(styles)) {
  137. return ret;
  138. }
  139. for (const key in styles) {
  140. const value = styles[key];
  141. if (isString(value) || typeof value === "number") {
  142. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  143. ret += `${normalizedKey}:${value};`;
  144. }
  145. }
  146. return ret;
  147. }
  148. function normalizeClass(value) {
  149. let res = "";
  150. if (isString(value)) {
  151. res = value;
  152. } else if (isArray(value)) {
  153. for (let i = 0; i < value.length; i++) {
  154. const normalized = normalizeClass(value[i]);
  155. if (normalized) {
  156. res += normalized + " ";
  157. }
  158. }
  159. } else if (isObject(value)) {
  160. for (const name in value) {
  161. if (value[name]) {
  162. res += name + " ";
  163. }
  164. }
  165. }
  166. return res.trim();
  167. }
  168. function normalizeProps(props) {
  169. if (!props) return null;
  170. let { class: klass, style } = props;
  171. if (klass && !isString(klass)) {
  172. props.class = normalizeClass(klass);
  173. }
  174. if (style) {
  175. props.style = normalizeStyle(style);
  176. }
  177. return props;
  178. }
  179. var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
  180. var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
  181. var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
  182. var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
  183. var isHTMLTag = makeMap(HTML_TAGS);
  184. var isSVGTag = makeMap(SVG_TAGS);
  185. var isMathMLTag = makeMap(MATH_TAGS);
  186. var isVoidTag = makeMap(VOID_TAGS);
  187. var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  188. var isSpecialBooleanAttr = makeMap(specialBooleanAttrs);
  189. var isBooleanAttr = makeMap(
  190. specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
  191. );
  192. function includeBooleanAttr(value) {
  193. return !!value || value === "";
  194. }
  195. var isKnownHtmlAttr = makeMap(
  196. `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
  197. );
  198. var isKnownSvgAttr = makeMap(
  199. `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
  200. );
  201. var isKnownMathMLAttr = makeMap(
  202. `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`
  203. );
  204. function isRenderableAttrValue(value) {
  205. if (value == null) {
  206. return false;
  207. }
  208. const type = typeof value;
  209. return type === "string" || type === "number" || type === "boolean";
  210. }
  211. var cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
  212. function getEscapedCssVarName(key, doubleEscape) {
  213. return key.replace(
  214. cssVarNameEscapeSymbolsRE,
  215. (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
  216. );
  217. }
  218. function looseCompareArrays(a, b) {
  219. if (a.length !== b.length) return false;
  220. let equal = true;
  221. for (let i = 0; equal && i < a.length; i++) {
  222. equal = looseEqual(a[i], b[i]);
  223. }
  224. return equal;
  225. }
  226. function looseEqual(a, b) {
  227. if (a === b) return true;
  228. let aValidType = isDate(a);
  229. let bValidType = isDate(b);
  230. if (aValidType || bValidType) {
  231. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  232. }
  233. aValidType = isSymbol(a);
  234. bValidType = isSymbol(b);
  235. if (aValidType || bValidType) {
  236. return a === b;
  237. }
  238. aValidType = isArray(a);
  239. bValidType = isArray(b);
  240. if (aValidType || bValidType) {
  241. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  242. }
  243. aValidType = isObject(a);
  244. bValidType = isObject(b);
  245. if (aValidType || bValidType) {
  246. if (!aValidType || !bValidType) {
  247. return false;
  248. }
  249. const aKeysCount = Object.keys(a).length;
  250. const bKeysCount = Object.keys(b).length;
  251. if (aKeysCount !== bKeysCount) {
  252. return false;
  253. }
  254. for (const key in a) {
  255. const aHasKey = a.hasOwnProperty(key);
  256. const bHasKey = b.hasOwnProperty(key);
  257. if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
  258. return false;
  259. }
  260. }
  261. }
  262. return String(a) === String(b);
  263. }
  264. function looseIndexOf(arr, val) {
  265. return arr.findIndex((item) => looseEqual(item, val));
  266. }
  267. var isRef = (val) => {
  268. return !!(val && val["__v_isRef"] === true);
  269. };
  270. var toDisplayString = (val) => {
  271. return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
  272. };
  273. var replacer = (_key, val) => {
  274. if (isRef(val)) {
  275. return replacer(_key, val.value);
  276. } else if (isMap(val)) {
  277. return {
  278. [`Map(${val.size})`]: [...val.entries()].reduce(
  279. (entries, [key, val2], i) => {
  280. entries[stringifySymbol(key, i) + " =>"] = val2;
  281. return entries;
  282. },
  283. {}
  284. )
  285. };
  286. } else if (isSet(val)) {
  287. return {
  288. [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
  289. };
  290. } else if (isSymbol(val)) {
  291. return stringifySymbol(val);
  292. } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  293. return String(val);
  294. }
  295. return val;
  296. };
  297. var stringifySymbol = (v, i = "") => {
  298. var _a;
  299. return (
  300. // Symbol.description in es2019+ so we need to cast here to pass
  301. // the lib: es2016 check
  302. isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
  303. );
  304. };
  305. // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  306. function warn(msg, ...args) {
  307. console.warn(`[Vue warn] ${msg}`, ...args);
  308. }
  309. var activeEffectScope;
  310. var EffectScope = class {
  311. constructor(detached = false) {
  312. this.detached = detached;
  313. this._active = true;
  314. this.effects = [];
  315. this.cleanups = [];
  316. this._isPaused = false;
  317. this.parent = activeEffectScope;
  318. if (!detached && activeEffectScope) {
  319. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  320. this
  321. ) - 1;
  322. }
  323. }
  324. get active() {
  325. return this._active;
  326. }
  327. pause() {
  328. if (this._active) {
  329. this._isPaused = true;
  330. let i, l;
  331. if (this.scopes) {
  332. for (i = 0, l = this.scopes.length; i < l; i++) {
  333. this.scopes[i].pause();
  334. }
  335. }
  336. for (i = 0, l = this.effects.length; i < l; i++) {
  337. this.effects[i].pause();
  338. }
  339. }
  340. }
  341. /**
  342. * Resumes the effect scope, including all child scopes and effects.
  343. */
  344. resume() {
  345. if (this._active) {
  346. if (this._isPaused) {
  347. this._isPaused = false;
  348. let i, l;
  349. if (this.scopes) {
  350. for (i = 0, l = this.scopes.length; i < l; i++) {
  351. this.scopes[i].resume();
  352. }
  353. }
  354. for (i = 0, l = this.effects.length; i < l; i++) {
  355. this.effects[i].resume();
  356. }
  357. }
  358. }
  359. }
  360. run(fn) {
  361. if (this._active) {
  362. const currentEffectScope = activeEffectScope;
  363. try {
  364. activeEffectScope = this;
  365. return fn();
  366. } finally {
  367. activeEffectScope = currentEffectScope;
  368. }
  369. } else if (true) {
  370. warn(`cannot run an inactive effect scope.`);
  371. }
  372. }
  373. /**
  374. * This should only be called on non-detached scopes
  375. * @internal
  376. */
  377. on() {
  378. activeEffectScope = this;
  379. }
  380. /**
  381. * This should only be called on non-detached scopes
  382. * @internal
  383. */
  384. off() {
  385. activeEffectScope = this.parent;
  386. }
  387. stop(fromParent) {
  388. if (this._active) {
  389. let i, l;
  390. for (i = 0, l = this.effects.length; i < l; i++) {
  391. this.effects[i].stop();
  392. }
  393. for (i = 0, l = this.cleanups.length; i < l; i++) {
  394. this.cleanups[i]();
  395. }
  396. if (this.scopes) {
  397. for (i = 0, l = this.scopes.length; i < l; i++) {
  398. this.scopes[i].stop(true);
  399. }
  400. }
  401. if (!this.detached && this.parent && !fromParent) {
  402. const last = this.parent.scopes.pop();
  403. if (last && last !== this) {
  404. this.parent.scopes[this.index] = last;
  405. last.index = this.index;
  406. }
  407. }
  408. this.parent = void 0;
  409. this._active = false;
  410. }
  411. }
  412. };
  413. function effectScope(detached) {
  414. return new EffectScope(detached);
  415. }
  416. function getCurrentScope() {
  417. return activeEffectScope;
  418. }
  419. function onScopeDispose(fn, failSilently = false) {
  420. if (activeEffectScope) {
  421. activeEffectScope.cleanups.push(fn);
  422. } else if (!failSilently) {
  423. warn(
  424. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  425. );
  426. }
  427. }
  428. var activeSub;
  429. var pausedQueueEffects = /* @__PURE__ */ new WeakSet();
  430. var ReactiveEffect = class {
  431. constructor(fn) {
  432. this.fn = fn;
  433. this.deps = void 0;
  434. this.depsTail = void 0;
  435. this.flags = 1 | 4;
  436. this.next = void 0;
  437. this.cleanup = void 0;
  438. this.scheduler = void 0;
  439. if (activeEffectScope && activeEffectScope.active) {
  440. activeEffectScope.effects.push(this);
  441. }
  442. }
  443. pause() {
  444. this.flags |= 64;
  445. }
  446. resume() {
  447. if (this.flags & 64) {
  448. this.flags &= ~64;
  449. if (pausedQueueEffects.has(this)) {
  450. pausedQueueEffects.delete(this);
  451. this.trigger();
  452. }
  453. }
  454. }
  455. /**
  456. * @internal
  457. */
  458. notify() {
  459. if (this.flags & 2 && !(this.flags & 32)) {
  460. return;
  461. }
  462. if (!(this.flags & 8)) {
  463. batch(this);
  464. }
  465. }
  466. run() {
  467. if (!(this.flags & 1)) {
  468. return this.fn();
  469. }
  470. this.flags |= 2;
  471. cleanupEffect(this);
  472. prepareDeps(this);
  473. const prevEffect = activeSub;
  474. const prevShouldTrack = shouldTrack;
  475. activeSub = this;
  476. shouldTrack = true;
  477. try {
  478. return this.fn();
  479. } finally {
  480. if (activeSub !== this) {
  481. warn(
  482. "Active effect was not restored correctly - this is likely a Vue internal bug."
  483. );
  484. }
  485. cleanupDeps(this);
  486. activeSub = prevEffect;
  487. shouldTrack = prevShouldTrack;
  488. this.flags &= ~2;
  489. }
  490. }
  491. stop() {
  492. if (this.flags & 1) {
  493. for (let link = this.deps; link; link = link.nextDep) {
  494. removeSub(link);
  495. }
  496. this.deps = this.depsTail = void 0;
  497. cleanupEffect(this);
  498. this.onStop && this.onStop();
  499. this.flags &= ~1;
  500. }
  501. }
  502. trigger() {
  503. if (this.flags & 64) {
  504. pausedQueueEffects.add(this);
  505. } else if (this.scheduler) {
  506. this.scheduler();
  507. } else {
  508. this.runIfDirty();
  509. }
  510. }
  511. /**
  512. * @internal
  513. */
  514. runIfDirty() {
  515. if (isDirty(this)) {
  516. this.run();
  517. }
  518. }
  519. get dirty() {
  520. return isDirty(this);
  521. }
  522. };
  523. var batchDepth = 0;
  524. var batchedSub;
  525. var batchedComputed;
  526. function batch(sub, isComputed = false) {
  527. sub.flags |= 8;
  528. if (isComputed) {
  529. sub.next = batchedComputed;
  530. batchedComputed = sub;
  531. return;
  532. }
  533. sub.next = batchedSub;
  534. batchedSub = sub;
  535. }
  536. function startBatch() {
  537. batchDepth++;
  538. }
  539. function endBatch() {
  540. if (--batchDepth > 0) {
  541. return;
  542. }
  543. if (batchedComputed) {
  544. let e = batchedComputed;
  545. batchedComputed = void 0;
  546. while (e) {
  547. const next = e.next;
  548. e.next = void 0;
  549. e.flags &= ~8;
  550. e = next;
  551. }
  552. }
  553. let error;
  554. while (batchedSub) {
  555. let e = batchedSub;
  556. batchedSub = void 0;
  557. while (e) {
  558. const next = e.next;
  559. e.next = void 0;
  560. e.flags &= ~8;
  561. if (e.flags & 1) {
  562. try {
  563. ;
  564. e.trigger();
  565. } catch (err) {
  566. if (!error) error = err;
  567. }
  568. }
  569. e = next;
  570. }
  571. }
  572. if (error) throw error;
  573. }
  574. function prepareDeps(sub) {
  575. for (let link = sub.deps; link; link = link.nextDep) {
  576. link.version = -1;
  577. link.prevActiveLink = link.dep.activeLink;
  578. link.dep.activeLink = link;
  579. }
  580. }
  581. function cleanupDeps(sub) {
  582. let head;
  583. let tail = sub.depsTail;
  584. let link = tail;
  585. while (link) {
  586. const prev = link.prevDep;
  587. if (link.version === -1) {
  588. if (link === tail) tail = prev;
  589. removeSub(link);
  590. removeDep(link);
  591. } else {
  592. head = link;
  593. }
  594. link.dep.activeLink = link.prevActiveLink;
  595. link.prevActiveLink = void 0;
  596. link = prev;
  597. }
  598. sub.deps = head;
  599. sub.depsTail = tail;
  600. }
  601. function isDirty(sub) {
  602. for (let link = sub.deps; link; link = link.nextDep) {
  603. if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
  604. return true;
  605. }
  606. }
  607. if (sub._dirty) {
  608. return true;
  609. }
  610. return false;
  611. }
  612. function refreshComputed(computed3) {
  613. if (computed3.flags & 4 && !(computed3.flags & 16)) {
  614. return;
  615. }
  616. computed3.flags &= ~16;
  617. if (computed3.globalVersion === globalVersion) {
  618. return;
  619. }
  620. computed3.globalVersion = globalVersion;
  621. const dep = computed3.dep;
  622. computed3.flags |= 2;
  623. if (dep.version > 0 && !computed3.isSSR && computed3.deps && !isDirty(computed3)) {
  624. computed3.flags &= ~2;
  625. return;
  626. }
  627. const prevSub = activeSub;
  628. const prevShouldTrack = shouldTrack;
  629. activeSub = computed3;
  630. shouldTrack = true;
  631. try {
  632. prepareDeps(computed3);
  633. const value = computed3.fn(computed3._value);
  634. if (dep.version === 0 || hasChanged(value, computed3._value)) {
  635. computed3._value = value;
  636. dep.version++;
  637. }
  638. } catch (err) {
  639. dep.version++;
  640. throw err;
  641. } finally {
  642. activeSub = prevSub;
  643. shouldTrack = prevShouldTrack;
  644. cleanupDeps(computed3);
  645. computed3.flags &= ~2;
  646. }
  647. }
  648. function removeSub(link, soft = false) {
  649. const { dep, prevSub, nextSub } = link;
  650. if (prevSub) {
  651. prevSub.nextSub = nextSub;
  652. link.prevSub = void 0;
  653. }
  654. if (nextSub) {
  655. nextSub.prevSub = prevSub;
  656. link.nextSub = void 0;
  657. }
  658. if (dep.subsHead === link) {
  659. dep.subsHead = nextSub;
  660. }
  661. if (dep.subs === link) {
  662. dep.subs = prevSub;
  663. if (!prevSub && dep.computed) {
  664. dep.computed.flags &= ~4;
  665. for (let l = dep.computed.deps; l; l = l.nextDep) {
  666. removeSub(l, true);
  667. }
  668. }
  669. }
  670. if (!soft && !--dep.sc && dep.map) {
  671. dep.map.delete(dep.key);
  672. }
  673. }
  674. function removeDep(link) {
  675. const { prevDep, nextDep } = link;
  676. if (prevDep) {
  677. prevDep.nextDep = nextDep;
  678. link.prevDep = void 0;
  679. }
  680. if (nextDep) {
  681. nextDep.prevDep = prevDep;
  682. link.nextDep = void 0;
  683. }
  684. }
  685. function effect(fn, options) {
  686. if (fn.effect instanceof ReactiveEffect) {
  687. fn = fn.effect.fn;
  688. }
  689. const e = new ReactiveEffect(fn);
  690. if (options) {
  691. extend(e, options);
  692. }
  693. try {
  694. e.run();
  695. } catch (err) {
  696. e.stop();
  697. throw err;
  698. }
  699. const runner = e.run.bind(e);
  700. runner.effect = e;
  701. return runner;
  702. }
  703. function stop(runner) {
  704. runner.effect.stop();
  705. }
  706. var shouldTrack = true;
  707. var trackStack = [];
  708. function pauseTracking() {
  709. trackStack.push(shouldTrack);
  710. shouldTrack = false;
  711. }
  712. function resetTracking() {
  713. const last = trackStack.pop();
  714. shouldTrack = last === void 0 ? true : last;
  715. }
  716. function cleanupEffect(e) {
  717. const { cleanup } = e;
  718. e.cleanup = void 0;
  719. if (cleanup) {
  720. const prevSub = activeSub;
  721. activeSub = void 0;
  722. try {
  723. cleanup();
  724. } finally {
  725. activeSub = prevSub;
  726. }
  727. }
  728. }
  729. var globalVersion = 0;
  730. var Link = class {
  731. constructor(sub, dep) {
  732. this.sub = sub;
  733. this.dep = dep;
  734. this.version = dep.version;
  735. this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  736. }
  737. };
  738. var Dep = class {
  739. constructor(computed3) {
  740. this.computed = computed3;
  741. this.version = 0;
  742. this.activeLink = void 0;
  743. this.subs = void 0;
  744. this.map = void 0;
  745. this.key = void 0;
  746. this.sc = 0;
  747. if (true) {
  748. this.subsHead = void 0;
  749. }
  750. }
  751. track(debugInfo) {
  752. if (!activeSub || !shouldTrack || activeSub === this.computed) {
  753. return;
  754. }
  755. let link = this.activeLink;
  756. if (link === void 0 || link.sub !== activeSub) {
  757. link = this.activeLink = new Link(activeSub, this);
  758. if (!activeSub.deps) {
  759. activeSub.deps = activeSub.depsTail = link;
  760. } else {
  761. link.prevDep = activeSub.depsTail;
  762. activeSub.depsTail.nextDep = link;
  763. activeSub.depsTail = link;
  764. }
  765. addSub(link);
  766. } else if (link.version === -1) {
  767. link.version = this.version;
  768. if (link.nextDep) {
  769. const next = link.nextDep;
  770. next.prevDep = link.prevDep;
  771. if (link.prevDep) {
  772. link.prevDep.nextDep = next;
  773. }
  774. link.prevDep = activeSub.depsTail;
  775. link.nextDep = void 0;
  776. activeSub.depsTail.nextDep = link;
  777. activeSub.depsTail = link;
  778. if (activeSub.deps === link) {
  779. activeSub.deps = next;
  780. }
  781. }
  782. }
  783. if (activeSub.onTrack) {
  784. activeSub.onTrack(
  785. extend(
  786. {
  787. effect: activeSub
  788. },
  789. debugInfo
  790. )
  791. );
  792. }
  793. return link;
  794. }
  795. trigger(debugInfo) {
  796. this.version++;
  797. globalVersion++;
  798. this.notify(debugInfo);
  799. }
  800. notify(debugInfo) {
  801. startBatch();
  802. try {
  803. if (true) {
  804. for (let head = this.subsHead; head; head = head.nextSub) {
  805. if (head.sub.onTrigger && !(head.sub.flags & 8)) {
  806. head.sub.onTrigger(
  807. extend(
  808. {
  809. effect: head.sub
  810. },
  811. debugInfo
  812. )
  813. );
  814. }
  815. }
  816. }
  817. for (let link = this.subs; link; link = link.prevSub) {
  818. if (link.sub.notify()) {
  819. ;
  820. link.sub.dep.notify();
  821. }
  822. }
  823. } finally {
  824. endBatch();
  825. }
  826. }
  827. };
  828. function addSub(link) {
  829. link.dep.sc++;
  830. if (link.sub.flags & 4) {
  831. const computed3 = link.dep.computed;
  832. if (computed3 && !link.dep.subs) {
  833. computed3.flags |= 4 | 16;
  834. for (let l = computed3.deps; l; l = l.nextDep) {
  835. addSub(l);
  836. }
  837. }
  838. const currentTail = link.dep.subs;
  839. if (currentTail !== link) {
  840. link.prevSub = currentTail;
  841. if (currentTail) currentTail.nextSub = link;
  842. }
  843. if (link.dep.subsHead === void 0) {
  844. link.dep.subsHead = link;
  845. }
  846. link.dep.subs = link;
  847. }
  848. }
  849. var targetMap = /* @__PURE__ */ new WeakMap();
  850. var ITERATE_KEY = Symbol(
  851. true ? "Object iterate" : ""
  852. );
  853. var MAP_KEY_ITERATE_KEY = Symbol(
  854. true ? "Map keys iterate" : ""
  855. );
  856. var ARRAY_ITERATE_KEY = Symbol(
  857. true ? "Array iterate" : ""
  858. );
  859. function track(target, type, key) {
  860. if (shouldTrack && activeSub) {
  861. let depsMap = targetMap.get(target);
  862. if (!depsMap) {
  863. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  864. }
  865. let dep = depsMap.get(key);
  866. if (!dep) {
  867. depsMap.set(key, dep = new Dep());
  868. dep.map = depsMap;
  869. dep.key = key;
  870. }
  871. if (true) {
  872. dep.track({
  873. target,
  874. type,
  875. key
  876. });
  877. } else {
  878. dep.track();
  879. }
  880. }
  881. }
  882. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  883. const depsMap = targetMap.get(target);
  884. if (!depsMap) {
  885. globalVersion++;
  886. return;
  887. }
  888. const run = (dep) => {
  889. if (dep) {
  890. if (true) {
  891. dep.trigger({
  892. target,
  893. type,
  894. key,
  895. newValue,
  896. oldValue,
  897. oldTarget
  898. });
  899. } else {
  900. dep.trigger();
  901. }
  902. }
  903. };
  904. startBatch();
  905. if (type === "clear") {
  906. depsMap.forEach(run);
  907. } else {
  908. const targetIsArray = isArray(target);
  909. const isArrayIndex = targetIsArray && isIntegerKey(key);
  910. if (targetIsArray && key === "length") {
  911. const newLength = Number(newValue);
  912. depsMap.forEach((dep, key2) => {
  913. if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
  914. run(dep);
  915. }
  916. });
  917. } else {
  918. if (key !== void 0 || depsMap.has(void 0)) {
  919. run(depsMap.get(key));
  920. }
  921. if (isArrayIndex) {
  922. run(depsMap.get(ARRAY_ITERATE_KEY));
  923. }
  924. switch (type) {
  925. case "add":
  926. if (!targetIsArray) {
  927. run(depsMap.get(ITERATE_KEY));
  928. if (isMap(target)) {
  929. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  930. }
  931. } else if (isArrayIndex) {
  932. run(depsMap.get("length"));
  933. }
  934. break;
  935. case "delete":
  936. if (!targetIsArray) {
  937. run(depsMap.get(ITERATE_KEY));
  938. if (isMap(target)) {
  939. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  940. }
  941. }
  942. break;
  943. case "set":
  944. if (isMap(target)) {
  945. run(depsMap.get(ITERATE_KEY));
  946. }
  947. break;
  948. }
  949. }
  950. }
  951. endBatch();
  952. }
  953. function getDepFromReactive(object, key) {
  954. const depMap = targetMap.get(object);
  955. return depMap && depMap.get(key);
  956. }
  957. function reactiveReadArray(array) {
  958. const raw = toRaw(array);
  959. if (raw === array) return raw;
  960. track(raw, "iterate", ARRAY_ITERATE_KEY);
  961. return isShallow(array) ? raw : raw.map(toReactive);
  962. }
  963. function shallowReadArray(arr) {
  964. track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
  965. return arr;
  966. }
  967. var arrayInstrumentations = {
  968. __proto__: null,
  969. [Symbol.iterator]() {
  970. return iterator(this, Symbol.iterator, toReactive);
  971. },
  972. concat(...args) {
  973. return reactiveReadArray(this).concat(
  974. ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
  975. );
  976. },
  977. entries() {
  978. return iterator(this, "entries", (value) => {
  979. value[1] = toReactive(value[1]);
  980. return value;
  981. });
  982. },
  983. every(fn, thisArg) {
  984. return apply(this, "every", fn, thisArg, void 0, arguments);
  985. },
  986. filter(fn, thisArg) {
  987. return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
  988. },
  989. find(fn, thisArg) {
  990. return apply(this, "find", fn, thisArg, toReactive, arguments);
  991. },
  992. findIndex(fn, thisArg) {
  993. return apply(this, "findIndex", fn, thisArg, void 0, arguments);
  994. },
  995. findLast(fn, thisArg) {
  996. return apply(this, "findLast", fn, thisArg, toReactive, arguments);
  997. },
  998. findLastIndex(fn, thisArg) {
  999. return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
  1000. },
  1001. // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  1002. forEach(fn, thisArg) {
  1003. return apply(this, "forEach", fn, thisArg, void 0, arguments);
  1004. },
  1005. includes(...args) {
  1006. return searchProxy(this, "includes", args);
  1007. },
  1008. indexOf(...args) {
  1009. return searchProxy(this, "indexOf", args);
  1010. },
  1011. join(separator) {
  1012. return reactiveReadArray(this).join(separator);
  1013. },
  1014. // keys() iterator only reads `length`, no optimisation required
  1015. lastIndexOf(...args) {
  1016. return searchProxy(this, "lastIndexOf", args);
  1017. },
  1018. map(fn, thisArg) {
  1019. return apply(this, "map", fn, thisArg, void 0, arguments);
  1020. },
  1021. pop() {
  1022. return noTracking(this, "pop");
  1023. },
  1024. push(...args) {
  1025. return noTracking(this, "push", args);
  1026. },
  1027. reduce(fn, ...args) {
  1028. return reduce(this, "reduce", fn, args);
  1029. },
  1030. reduceRight(fn, ...args) {
  1031. return reduce(this, "reduceRight", fn, args);
  1032. },
  1033. shift() {
  1034. return noTracking(this, "shift");
  1035. },
  1036. // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  1037. some(fn, thisArg) {
  1038. return apply(this, "some", fn, thisArg, void 0, arguments);
  1039. },
  1040. splice(...args) {
  1041. return noTracking(this, "splice", args);
  1042. },
  1043. toReversed() {
  1044. return reactiveReadArray(this).toReversed();
  1045. },
  1046. toSorted(comparer) {
  1047. return reactiveReadArray(this).toSorted(comparer);
  1048. },
  1049. toSpliced(...args) {
  1050. return reactiveReadArray(this).toSpliced(...args);
  1051. },
  1052. unshift(...args) {
  1053. return noTracking(this, "unshift", args);
  1054. },
  1055. values() {
  1056. return iterator(this, "values", toReactive);
  1057. }
  1058. };
  1059. function iterator(self2, method, wrapValue) {
  1060. const arr = shallowReadArray(self2);
  1061. const iter = arr[method]();
  1062. if (arr !== self2 && !isShallow(self2)) {
  1063. iter._next = iter.next;
  1064. iter.next = () => {
  1065. const result = iter._next();
  1066. if (result.value) {
  1067. result.value = wrapValue(result.value);
  1068. }
  1069. return result;
  1070. };
  1071. }
  1072. return iter;
  1073. }
  1074. var arrayProto = Array.prototype;
  1075. function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
  1076. const arr = shallowReadArray(self2);
  1077. const needsWrap = arr !== self2 && !isShallow(self2);
  1078. const methodFn = arr[method];
  1079. if (methodFn !== arrayProto[method]) {
  1080. const result2 = methodFn.apply(self2, args);
  1081. return needsWrap ? toReactive(result2) : result2;
  1082. }
  1083. let wrappedFn = fn;
  1084. if (arr !== self2) {
  1085. if (needsWrap) {
  1086. wrappedFn = function(item, index) {
  1087. return fn.call(this, toReactive(item), index, self2);
  1088. };
  1089. } else if (fn.length > 2) {
  1090. wrappedFn = function(item, index) {
  1091. return fn.call(this, item, index, self2);
  1092. };
  1093. }
  1094. }
  1095. const result = methodFn.call(arr, wrappedFn, thisArg);
  1096. return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
  1097. }
  1098. function reduce(self2, method, fn, args) {
  1099. const arr = shallowReadArray(self2);
  1100. let wrappedFn = fn;
  1101. if (arr !== self2) {
  1102. if (!isShallow(self2)) {
  1103. wrappedFn = function(acc, item, index) {
  1104. return fn.call(this, acc, toReactive(item), index, self2);
  1105. };
  1106. } else if (fn.length > 3) {
  1107. wrappedFn = function(acc, item, index) {
  1108. return fn.call(this, acc, item, index, self2);
  1109. };
  1110. }
  1111. }
  1112. return arr[method](wrappedFn, ...args);
  1113. }
  1114. function searchProxy(self2, method, args) {
  1115. const arr = toRaw(self2);
  1116. track(arr, "iterate", ARRAY_ITERATE_KEY);
  1117. const res = arr[method](...args);
  1118. if ((res === -1 || res === false) && isProxy(args[0])) {
  1119. args[0] = toRaw(args[0]);
  1120. return arr[method](...args);
  1121. }
  1122. return res;
  1123. }
  1124. function noTracking(self2, method, args = []) {
  1125. pauseTracking();
  1126. startBatch();
  1127. const res = toRaw(self2)[method].apply(self2, args);
  1128. endBatch();
  1129. resetTracking();
  1130. return res;
  1131. }
  1132. var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
  1133. var builtInSymbols = new Set(
  1134. Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  1135. );
  1136. function hasOwnProperty2(key) {
  1137. if (!isSymbol(key)) key = String(key);
  1138. const obj = toRaw(this);
  1139. track(obj, "has", key);
  1140. return obj.hasOwnProperty(key);
  1141. }
  1142. var BaseReactiveHandler = class {
  1143. constructor(_isReadonly = false, _isShallow = false) {
  1144. this._isReadonly = _isReadonly;
  1145. this._isShallow = _isShallow;
  1146. }
  1147. get(target, key, receiver) {
  1148. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  1149. if (key === "__v_isReactive") {
  1150. return !isReadonly2;
  1151. } else if (key === "__v_isReadonly") {
  1152. return isReadonly2;
  1153. } else if (key === "__v_isShallow") {
  1154. return isShallow2;
  1155. } else if (key === "__v_raw") {
  1156. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  1157. // this means the receiver is a user proxy of the reactive proxy
  1158. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  1159. return target;
  1160. }
  1161. return;
  1162. }
  1163. const targetIsArray = isArray(target);
  1164. if (!isReadonly2) {
  1165. let fn;
  1166. if (targetIsArray && (fn = arrayInstrumentations[key])) {
  1167. return fn;
  1168. }
  1169. if (key === "hasOwnProperty") {
  1170. return hasOwnProperty2;
  1171. }
  1172. }
  1173. const res = Reflect.get(
  1174. target,
  1175. key,
  1176. // if this is a proxy wrapping a ref, return methods using the raw ref
  1177. // as receiver so that we don't have to call `toRaw` on the ref in all
  1178. // its class methods
  1179. isRef2(target) ? target : receiver
  1180. );
  1181. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1182. return res;
  1183. }
  1184. if (!isReadonly2) {
  1185. track(target, "get", key);
  1186. }
  1187. if (isShallow2) {
  1188. return res;
  1189. }
  1190. if (isRef2(res)) {
  1191. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1192. }
  1193. if (isObject(res)) {
  1194. return isReadonly2 ? readonly(res) : reactive(res);
  1195. }
  1196. return res;
  1197. }
  1198. };
  1199. var MutableReactiveHandler = class extends BaseReactiveHandler {
  1200. constructor(isShallow2 = false) {
  1201. super(false, isShallow2);
  1202. }
  1203. set(target, key, value, receiver) {
  1204. let oldValue = target[key];
  1205. if (!this._isShallow) {
  1206. const isOldValueReadonly = isReadonly(oldValue);
  1207. if (!isShallow(value) && !isReadonly(value)) {
  1208. oldValue = toRaw(oldValue);
  1209. value = toRaw(value);
  1210. }
  1211. if (!isArray(target) && isRef2(oldValue) && !isRef2(value)) {
  1212. if (isOldValueReadonly) {
  1213. return false;
  1214. } else {
  1215. oldValue.value = value;
  1216. return true;
  1217. }
  1218. }
  1219. }
  1220. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1221. const result = Reflect.set(
  1222. target,
  1223. key,
  1224. value,
  1225. isRef2(target) ? target : receiver
  1226. );
  1227. if (target === toRaw(receiver)) {
  1228. if (!hadKey) {
  1229. trigger(target, "add", key, value);
  1230. } else if (hasChanged(value, oldValue)) {
  1231. trigger(target, "set", key, value, oldValue);
  1232. }
  1233. }
  1234. return result;
  1235. }
  1236. deleteProperty(target, key) {
  1237. const hadKey = hasOwn(target, key);
  1238. const oldValue = target[key];
  1239. const result = Reflect.deleteProperty(target, key);
  1240. if (result && hadKey) {
  1241. trigger(target, "delete", key, void 0, oldValue);
  1242. }
  1243. return result;
  1244. }
  1245. has(target, key) {
  1246. const result = Reflect.has(target, key);
  1247. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  1248. track(target, "has", key);
  1249. }
  1250. return result;
  1251. }
  1252. ownKeys(target) {
  1253. track(
  1254. target,
  1255. "iterate",
  1256. isArray(target) ? "length" : ITERATE_KEY
  1257. );
  1258. return Reflect.ownKeys(target);
  1259. }
  1260. };
  1261. var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  1262. constructor(isShallow2 = false) {
  1263. super(true, isShallow2);
  1264. }
  1265. set(target, key) {
  1266. if (true) {
  1267. warn(
  1268. `Set operation on key "${String(key)}" failed: target is readonly.`,
  1269. target
  1270. );
  1271. }
  1272. return true;
  1273. }
  1274. deleteProperty(target, key) {
  1275. if (true) {
  1276. warn(
  1277. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  1278. target
  1279. );
  1280. }
  1281. return true;
  1282. }
  1283. };
  1284. var mutableHandlers = new MutableReactiveHandler();
  1285. var readonlyHandlers = new ReadonlyReactiveHandler();
  1286. var shallowReactiveHandlers = new MutableReactiveHandler(true);
  1287. var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
  1288. var toShallow = (value) => value;
  1289. var getProto = (v) => Reflect.getPrototypeOf(v);
  1290. function createIterableMethod(method, isReadonly2, isShallow2) {
  1291. return function(...args) {
  1292. const target = this["__v_raw"];
  1293. const rawTarget = toRaw(target);
  1294. const targetIsMap = isMap(rawTarget);
  1295. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  1296. const isKeyOnly = method === "keys" && targetIsMap;
  1297. const innerIterator = target[method](...args);
  1298. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1299. !isReadonly2 && track(
  1300. rawTarget,
  1301. "iterate",
  1302. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  1303. );
  1304. return {
  1305. // iterator protocol
  1306. next() {
  1307. const { value, done } = innerIterator.next();
  1308. return done ? { value, done } : {
  1309. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  1310. done
  1311. };
  1312. },
  1313. // iterable protocol
  1314. [Symbol.iterator]() {
  1315. return this;
  1316. }
  1317. };
  1318. };
  1319. }
  1320. function createReadonlyMethod(type) {
  1321. return function(...args) {
  1322. if (true) {
  1323. const key = args[0] ? `on key "${args[0]}" ` : ``;
  1324. warn(
  1325. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  1326. toRaw(this)
  1327. );
  1328. }
  1329. return type === "delete" ? false : type === "clear" ? void 0 : this;
  1330. };
  1331. }
  1332. function createInstrumentations(readonly2, shallow) {
  1333. const instrumentations = {
  1334. get(key) {
  1335. const target = this["__v_raw"];
  1336. const rawTarget = toRaw(target);
  1337. const rawKey = toRaw(key);
  1338. if (!readonly2) {
  1339. if (hasChanged(key, rawKey)) {
  1340. track(rawTarget, "get", key);
  1341. }
  1342. track(rawTarget, "get", rawKey);
  1343. }
  1344. const { has } = getProto(rawTarget);
  1345. const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
  1346. if (has.call(rawTarget, key)) {
  1347. return wrap(target.get(key));
  1348. } else if (has.call(rawTarget, rawKey)) {
  1349. return wrap(target.get(rawKey));
  1350. } else if (target !== rawTarget) {
  1351. target.get(key);
  1352. }
  1353. },
  1354. get size() {
  1355. const target = this["__v_raw"];
  1356. !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  1357. return Reflect.get(target, "size", target);
  1358. },
  1359. has(key) {
  1360. const target = this["__v_raw"];
  1361. const rawTarget = toRaw(target);
  1362. const rawKey = toRaw(key);
  1363. if (!readonly2) {
  1364. if (hasChanged(key, rawKey)) {
  1365. track(rawTarget, "has", key);
  1366. }
  1367. track(rawTarget, "has", rawKey);
  1368. }
  1369. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  1370. },
  1371. forEach(callback, thisArg) {
  1372. const observed = this;
  1373. const target = observed["__v_raw"];
  1374. const rawTarget = toRaw(target);
  1375. const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
  1376. !readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  1377. return target.forEach((value, key) => {
  1378. return callback.call(thisArg, wrap(value), wrap(key), observed);
  1379. });
  1380. }
  1381. };
  1382. extend(
  1383. instrumentations,
  1384. readonly2 ? {
  1385. add: createReadonlyMethod("add"),
  1386. set: createReadonlyMethod("set"),
  1387. delete: createReadonlyMethod("delete"),
  1388. clear: createReadonlyMethod("clear")
  1389. } : {
  1390. add(value) {
  1391. if (!shallow && !isShallow(value) && !isReadonly(value)) {
  1392. value = toRaw(value);
  1393. }
  1394. const target = toRaw(this);
  1395. const proto = getProto(target);
  1396. const hadKey = proto.has.call(target, value);
  1397. if (!hadKey) {
  1398. target.add(value);
  1399. trigger(target, "add", value, value);
  1400. }
  1401. return this;
  1402. },
  1403. set(key, value) {
  1404. if (!shallow && !isShallow(value) && !isReadonly(value)) {
  1405. value = toRaw(value);
  1406. }
  1407. const target = toRaw(this);
  1408. const { has, get } = getProto(target);
  1409. let hadKey = has.call(target, key);
  1410. if (!hadKey) {
  1411. key = toRaw(key);
  1412. hadKey = has.call(target, key);
  1413. } else if (true) {
  1414. checkIdentityKeys(target, has, key);
  1415. }
  1416. const oldValue = get.call(target, key);
  1417. target.set(key, value);
  1418. if (!hadKey) {
  1419. trigger(target, "add", key, value);
  1420. } else if (hasChanged(value, oldValue)) {
  1421. trigger(target, "set", key, value, oldValue);
  1422. }
  1423. return this;
  1424. },
  1425. delete(key) {
  1426. const target = toRaw(this);
  1427. const { has, get } = getProto(target);
  1428. let hadKey = has.call(target, key);
  1429. if (!hadKey) {
  1430. key = toRaw(key);
  1431. hadKey = has.call(target, key);
  1432. } else if (true) {
  1433. checkIdentityKeys(target, has, key);
  1434. }
  1435. const oldValue = get ? get.call(target, key) : void 0;
  1436. const result = target.delete(key);
  1437. if (hadKey) {
  1438. trigger(target, "delete", key, void 0, oldValue);
  1439. }
  1440. return result;
  1441. },
  1442. clear() {
  1443. const target = toRaw(this);
  1444. const hadItems = target.size !== 0;
  1445. const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
  1446. const result = target.clear();
  1447. if (hadItems) {
  1448. trigger(
  1449. target,
  1450. "clear",
  1451. void 0,
  1452. void 0,
  1453. oldTarget
  1454. );
  1455. }
  1456. return result;
  1457. }
  1458. }
  1459. );
  1460. const iteratorMethods = [
  1461. "keys",
  1462. "values",
  1463. "entries",
  1464. Symbol.iterator
  1465. ];
  1466. iteratorMethods.forEach((method) => {
  1467. instrumentations[method] = createIterableMethod(method, readonly2, shallow);
  1468. });
  1469. return instrumentations;
  1470. }
  1471. function createInstrumentationGetter(isReadonly2, shallow) {
  1472. const instrumentations = createInstrumentations(isReadonly2, shallow);
  1473. return (target, key, receiver) => {
  1474. if (key === "__v_isReactive") {
  1475. return !isReadonly2;
  1476. } else if (key === "__v_isReadonly") {
  1477. return isReadonly2;
  1478. } else if (key === "__v_raw") {
  1479. return target;
  1480. }
  1481. return Reflect.get(
  1482. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  1483. key,
  1484. receiver
  1485. );
  1486. };
  1487. }
  1488. var mutableCollectionHandlers = {
  1489. get: createInstrumentationGetter(false, false)
  1490. };
  1491. var shallowCollectionHandlers = {
  1492. get: createInstrumentationGetter(false, true)
  1493. };
  1494. var readonlyCollectionHandlers = {
  1495. get: createInstrumentationGetter(true, false)
  1496. };
  1497. var shallowReadonlyCollectionHandlers = {
  1498. get: createInstrumentationGetter(true, true)
  1499. };
  1500. function checkIdentityKeys(target, has, key) {
  1501. const rawKey = toRaw(key);
  1502. if (rawKey !== key && has.call(target, rawKey)) {
  1503. const type = toRawType(target);
  1504. warn(
  1505. `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.`
  1506. );
  1507. }
  1508. }
  1509. var reactiveMap = /* @__PURE__ */ new WeakMap();
  1510. var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1511. var readonlyMap = /* @__PURE__ */ new WeakMap();
  1512. var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1513. function targetTypeMap(rawType) {
  1514. switch (rawType) {
  1515. case "Object":
  1516. case "Array":
  1517. return 1;
  1518. case "Map":
  1519. case "Set":
  1520. case "WeakMap":
  1521. case "WeakSet":
  1522. return 2;
  1523. default:
  1524. return 0;
  1525. }
  1526. }
  1527. function getTargetType(value) {
  1528. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1529. }
  1530. function reactive(target) {
  1531. if (isReadonly(target)) {
  1532. return target;
  1533. }
  1534. return createReactiveObject(
  1535. target,
  1536. false,
  1537. mutableHandlers,
  1538. mutableCollectionHandlers,
  1539. reactiveMap
  1540. );
  1541. }
  1542. function shallowReactive(target) {
  1543. return createReactiveObject(
  1544. target,
  1545. false,
  1546. shallowReactiveHandlers,
  1547. shallowCollectionHandlers,
  1548. shallowReactiveMap
  1549. );
  1550. }
  1551. function readonly(target) {
  1552. return createReactiveObject(
  1553. target,
  1554. true,
  1555. readonlyHandlers,
  1556. readonlyCollectionHandlers,
  1557. readonlyMap
  1558. );
  1559. }
  1560. function shallowReadonly(target) {
  1561. return createReactiveObject(
  1562. target,
  1563. true,
  1564. shallowReadonlyHandlers,
  1565. shallowReadonlyCollectionHandlers,
  1566. shallowReadonlyMap
  1567. );
  1568. }
  1569. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1570. if (!isObject(target)) {
  1571. if (true) {
  1572. warn(
  1573. `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
  1574. target
  1575. )}`
  1576. );
  1577. }
  1578. return target;
  1579. }
  1580. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  1581. return target;
  1582. }
  1583. const existingProxy = proxyMap.get(target);
  1584. if (existingProxy) {
  1585. return existingProxy;
  1586. }
  1587. const targetType = getTargetType(target);
  1588. if (targetType === 0) {
  1589. return target;
  1590. }
  1591. const proxy = new Proxy(
  1592. target,
  1593. targetType === 2 ? collectionHandlers : baseHandlers
  1594. );
  1595. proxyMap.set(target, proxy);
  1596. return proxy;
  1597. }
  1598. function isReactive(value) {
  1599. if (isReadonly(value)) {
  1600. return isReactive(value["__v_raw"]);
  1601. }
  1602. return !!(value && value["__v_isReactive"]);
  1603. }
  1604. function isReadonly(value) {
  1605. return !!(value && value["__v_isReadonly"]);
  1606. }
  1607. function isShallow(value) {
  1608. return !!(value && value["__v_isShallow"]);
  1609. }
  1610. function isProxy(value) {
  1611. return value ? !!value["__v_raw"] : false;
  1612. }
  1613. function toRaw(observed) {
  1614. const raw = observed && observed["__v_raw"];
  1615. return raw ? toRaw(raw) : observed;
  1616. }
  1617. function markRaw(value) {
  1618. if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
  1619. def(value, "__v_skip", true);
  1620. }
  1621. return value;
  1622. }
  1623. var toReactive = (value) => isObject(value) ? reactive(value) : value;
  1624. var toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1625. function isRef2(r) {
  1626. return r ? r["__v_isRef"] === true : false;
  1627. }
  1628. function ref(value) {
  1629. return createRef(value, false);
  1630. }
  1631. function shallowRef(value) {
  1632. return createRef(value, true);
  1633. }
  1634. function createRef(rawValue, shallow) {
  1635. if (isRef2(rawValue)) {
  1636. return rawValue;
  1637. }
  1638. return new RefImpl(rawValue, shallow);
  1639. }
  1640. var RefImpl = class {
  1641. constructor(value, isShallow2) {
  1642. this.dep = new Dep();
  1643. this["__v_isRef"] = true;
  1644. this["__v_isShallow"] = false;
  1645. this._rawValue = isShallow2 ? value : toRaw(value);
  1646. this._value = isShallow2 ? value : toReactive(value);
  1647. this["__v_isShallow"] = isShallow2;
  1648. }
  1649. get value() {
  1650. if (true) {
  1651. this.dep.track({
  1652. target: this,
  1653. type: "get",
  1654. key: "value"
  1655. });
  1656. } else {
  1657. this.dep.track();
  1658. }
  1659. return this._value;
  1660. }
  1661. set value(newValue) {
  1662. const oldValue = this._rawValue;
  1663. const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
  1664. newValue = useDirectValue ? newValue : toRaw(newValue);
  1665. if (hasChanged(newValue, oldValue)) {
  1666. this._rawValue = newValue;
  1667. this._value = useDirectValue ? newValue : toReactive(newValue);
  1668. if (true) {
  1669. this.dep.trigger({
  1670. target: this,
  1671. type: "set",
  1672. key: "value",
  1673. newValue,
  1674. oldValue
  1675. });
  1676. } else {
  1677. this.dep.trigger();
  1678. }
  1679. }
  1680. }
  1681. };
  1682. function triggerRef(ref2) {
  1683. if (ref2.dep) {
  1684. if (true) {
  1685. ref2.dep.trigger({
  1686. target: ref2,
  1687. type: "set",
  1688. key: "value",
  1689. newValue: ref2._value
  1690. });
  1691. } else {
  1692. ref2.dep.trigger();
  1693. }
  1694. }
  1695. }
  1696. function unref(ref2) {
  1697. return isRef2(ref2) ? ref2.value : ref2;
  1698. }
  1699. function toValue(source) {
  1700. return isFunction(source) ? source() : unref(source);
  1701. }
  1702. var shallowUnwrapHandlers = {
  1703. get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
  1704. set: (target, key, value, receiver) => {
  1705. const oldValue = target[key];
  1706. if (isRef2(oldValue) && !isRef2(value)) {
  1707. oldValue.value = value;
  1708. return true;
  1709. } else {
  1710. return Reflect.set(target, key, value, receiver);
  1711. }
  1712. }
  1713. };
  1714. function proxyRefs(objectWithRefs) {
  1715. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1716. }
  1717. var CustomRefImpl = class {
  1718. constructor(factory) {
  1719. this["__v_isRef"] = true;
  1720. this._value = void 0;
  1721. const dep = this.dep = new Dep();
  1722. const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
  1723. this._get = get;
  1724. this._set = set;
  1725. }
  1726. get value() {
  1727. return this._value = this._get();
  1728. }
  1729. set value(newVal) {
  1730. this._set(newVal);
  1731. }
  1732. };
  1733. function customRef(factory) {
  1734. return new CustomRefImpl(factory);
  1735. }
  1736. function toRefs(object) {
  1737. if (!isProxy(object)) {
  1738. warn(`toRefs() expects a reactive object but received a plain one.`);
  1739. }
  1740. const ret = isArray(object) ? new Array(object.length) : {};
  1741. for (const key in object) {
  1742. ret[key] = propertyToRef(object, key);
  1743. }
  1744. return ret;
  1745. }
  1746. var ObjectRefImpl = class {
  1747. constructor(_object, _key, _defaultValue) {
  1748. this._object = _object;
  1749. this._key = _key;
  1750. this._defaultValue = _defaultValue;
  1751. this["__v_isRef"] = true;
  1752. this._value = void 0;
  1753. }
  1754. get value() {
  1755. const val = this._object[this._key];
  1756. return this._value = val === void 0 ? this._defaultValue : val;
  1757. }
  1758. set value(newVal) {
  1759. this._object[this._key] = newVal;
  1760. }
  1761. get dep() {
  1762. return getDepFromReactive(toRaw(this._object), this._key);
  1763. }
  1764. };
  1765. var GetterRefImpl = class {
  1766. constructor(_getter) {
  1767. this._getter = _getter;
  1768. this["__v_isRef"] = true;
  1769. this["__v_isReadonly"] = true;
  1770. this._value = void 0;
  1771. }
  1772. get value() {
  1773. return this._value = this._getter();
  1774. }
  1775. };
  1776. function toRef(source, key, defaultValue) {
  1777. if (isRef2(source)) {
  1778. return source;
  1779. } else if (isFunction(source)) {
  1780. return new GetterRefImpl(source);
  1781. } else if (isObject(source) && arguments.length > 1) {
  1782. return propertyToRef(source, key, defaultValue);
  1783. } else {
  1784. return ref(source);
  1785. }
  1786. }
  1787. function propertyToRef(source, key, defaultValue) {
  1788. const val = source[key];
  1789. return isRef2(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1790. }
  1791. var ComputedRefImpl = class {
  1792. constructor(fn, setter, isSSR) {
  1793. this.fn = fn;
  1794. this.setter = setter;
  1795. this._value = void 0;
  1796. this.dep = new Dep(this);
  1797. this.__v_isRef = true;
  1798. this.deps = void 0;
  1799. this.depsTail = void 0;
  1800. this.flags = 16;
  1801. this.globalVersion = globalVersion - 1;
  1802. this.next = void 0;
  1803. this.effect = this;
  1804. this["__v_isReadonly"] = !setter;
  1805. this.isSSR = isSSR;
  1806. }
  1807. /**
  1808. * @internal
  1809. */
  1810. notify() {
  1811. this.flags |= 16;
  1812. if (!(this.flags & 8) && // avoid infinite self recursion
  1813. activeSub !== this) {
  1814. batch(this, true);
  1815. return true;
  1816. } else if (true) ;
  1817. }
  1818. get value() {
  1819. const link = true ? this.dep.track({
  1820. target: this,
  1821. type: "get",
  1822. key: "value"
  1823. }) : this.dep.track();
  1824. refreshComputed(this);
  1825. if (link) {
  1826. link.version = this.dep.version;
  1827. }
  1828. return this._value;
  1829. }
  1830. set value(newValue) {
  1831. if (this.setter) {
  1832. this.setter(newValue);
  1833. } else if (true) {
  1834. warn("Write operation failed: computed value is readonly");
  1835. }
  1836. }
  1837. };
  1838. function computed(getterOrOptions, debugOptions, isSSR = false) {
  1839. let getter;
  1840. let setter;
  1841. if (isFunction(getterOrOptions)) {
  1842. getter = getterOrOptions;
  1843. } else {
  1844. getter = getterOrOptions.get;
  1845. setter = getterOrOptions.set;
  1846. }
  1847. const cRef = new ComputedRefImpl(getter, setter, isSSR);
  1848. if (debugOptions && !isSSR) {
  1849. cRef.onTrack = debugOptions.onTrack;
  1850. cRef.onTrigger = debugOptions.onTrigger;
  1851. }
  1852. return cRef;
  1853. }
  1854. var TrackOpTypes = {
  1855. "GET": "get",
  1856. "HAS": "has",
  1857. "ITERATE": "iterate"
  1858. };
  1859. var TriggerOpTypes = {
  1860. "SET": "set",
  1861. "ADD": "add",
  1862. "DELETE": "delete",
  1863. "CLEAR": "clear"
  1864. };
  1865. var INITIAL_WATCHER_VALUE = {};
  1866. var cleanupMap = /* @__PURE__ */ new WeakMap();
  1867. var activeWatcher = void 0;
  1868. function getCurrentWatcher() {
  1869. return activeWatcher;
  1870. }
  1871. function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
  1872. if (owner) {
  1873. let cleanups = cleanupMap.get(owner);
  1874. if (!cleanups) cleanupMap.set(owner, cleanups = []);
  1875. cleanups.push(cleanupFn);
  1876. } else if (!failSilently) {
  1877. warn(
  1878. `onWatcherCleanup() was called when there was no active watcher to associate with.`
  1879. );
  1880. }
  1881. }
  1882. function watch(source, cb, options = EMPTY_OBJ) {
  1883. const { immediate, deep, once, scheduler, augmentJob, call } = options;
  1884. const warnInvalidSource = (s) => {
  1885. (options.onWarn || warn)(
  1886. `Invalid watch source: `,
  1887. s,
  1888. `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
  1889. );
  1890. };
  1891. const reactiveGetter = (source2) => {
  1892. if (deep) return source2;
  1893. if (isShallow(source2) || deep === false || deep === 0)
  1894. return traverse(source2, 1);
  1895. return traverse(source2);
  1896. };
  1897. let effect2;
  1898. let getter;
  1899. let cleanup;
  1900. let boundCleanup;
  1901. let forceTrigger = false;
  1902. let isMultiSource = false;
  1903. if (isRef2(source)) {
  1904. getter = () => source.value;
  1905. forceTrigger = isShallow(source);
  1906. } else if (isReactive(source)) {
  1907. getter = () => reactiveGetter(source);
  1908. forceTrigger = true;
  1909. } else if (isArray(source)) {
  1910. isMultiSource = true;
  1911. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  1912. getter = () => source.map((s) => {
  1913. if (isRef2(s)) {
  1914. return s.value;
  1915. } else if (isReactive(s)) {
  1916. return reactiveGetter(s);
  1917. } else if (isFunction(s)) {
  1918. return call ? call(s, 2) : s();
  1919. } else {
  1920. warnInvalidSource(s);
  1921. }
  1922. });
  1923. } else if (isFunction(source)) {
  1924. if (cb) {
  1925. getter = call ? () => call(source, 2) : source;
  1926. } else {
  1927. getter = () => {
  1928. if (cleanup) {
  1929. pauseTracking();
  1930. try {
  1931. cleanup();
  1932. } finally {
  1933. resetTracking();
  1934. }
  1935. }
  1936. const currentEffect = activeWatcher;
  1937. activeWatcher = effect2;
  1938. try {
  1939. return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
  1940. } finally {
  1941. activeWatcher = currentEffect;
  1942. }
  1943. };
  1944. }
  1945. } else {
  1946. getter = NOOP;
  1947. warnInvalidSource(source);
  1948. }
  1949. if (cb && deep) {
  1950. const baseGetter = getter;
  1951. const depth = deep === true ? Infinity : deep;
  1952. getter = () => traverse(baseGetter(), depth);
  1953. }
  1954. const scope = getCurrentScope();
  1955. const watchHandle = () => {
  1956. effect2.stop();
  1957. if (scope) {
  1958. remove(scope.effects, effect2);
  1959. }
  1960. };
  1961. if (once && cb) {
  1962. const _cb = cb;
  1963. cb = (...args) => {
  1964. _cb(...args);
  1965. watchHandle();
  1966. };
  1967. }
  1968. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  1969. const job = (immediateFirstRun) => {
  1970. if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) {
  1971. return;
  1972. }
  1973. if (cb) {
  1974. const newValue = effect2.run();
  1975. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
  1976. if (cleanup) {
  1977. cleanup();
  1978. }
  1979. const currentWatcher = activeWatcher;
  1980. activeWatcher = effect2;
  1981. try {
  1982. const args = [
  1983. newValue,
  1984. // pass undefined as the old value when it's changed for the first time
  1985. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  1986. boundCleanup
  1987. ];
  1988. call ? call(cb, 3, args) : (
  1989. // @ts-expect-error
  1990. cb(...args)
  1991. );
  1992. oldValue = newValue;
  1993. } finally {
  1994. activeWatcher = currentWatcher;
  1995. }
  1996. }
  1997. } else {
  1998. effect2.run();
  1999. }
  2000. };
  2001. if (augmentJob) {
  2002. augmentJob(job);
  2003. }
  2004. effect2 = new ReactiveEffect(getter);
  2005. effect2.scheduler = scheduler ? () => scheduler(job, false) : job;
  2006. boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2);
  2007. cleanup = effect2.onStop = () => {
  2008. const cleanups = cleanupMap.get(effect2);
  2009. if (cleanups) {
  2010. if (call) {
  2011. call(cleanups, 4);
  2012. } else {
  2013. for (const cleanup2 of cleanups) cleanup2();
  2014. }
  2015. cleanupMap.delete(effect2);
  2016. }
  2017. };
  2018. if (true) {
  2019. effect2.onTrack = options.onTrack;
  2020. effect2.onTrigger = options.onTrigger;
  2021. }
  2022. if (cb) {
  2023. if (immediate) {
  2024. job(true);
  2025. } else {
  2026. oldValue = effect2.run();
  2027. }
  2028. } else if (scheduler) {
  2029. scheduler(job.bind(null, true), true);
  2030. } else {
  2031. effect2.run();
  2032. }
  2033. watchHandle.pause = effect2.pause.bind(effect2);
  2034. watchHandle.resume = effect2.resume.bind(effect2);
  2035. watchHandle.stop = watchHandle;
  2036. return watchHandle;
  2037. }
  2038. function traverse(value, depth = Infinity, seen) {
  2039. if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
  2040. return value;
  2041. }
  2042. seen = seen || /* @__PURE__ */ new Set();
  2043. if (seen.has(value)) {
  2044. return value;
  2045. }
  2046. seen.add(value);
  2047. depth--;
  2048. if (isRef2(value)) {
  2049. traverse(value.value, depth, seen);
  2050. } else if (isArray(value)) {
  2051. for (let i = 0; i < value.length; i++) {
  2052. traverse(value[i], depth, seen);
  2053. }
  2054. } else if (isSet(value) || isMap(value)) {
  2055. value.forEach((v) => {
  2056. traverse(v, depth, seen);
  2057. });
  2058. } else if (isPlainObject(value)) {
  2059. for (const key in value) {
  2060. traverse(value[key], depth, seen);
  2061. }
  2062. for (const key of Object.getOwnPropertySymbols(value)) {
  2063. if (Object.prototype.propertyIsEnumerable.call(value, key)) {
  2064. traverse(value[key], depth, seen);
  2065. }
  2066. }
  2067. }
  2068. return value;
  2069. }
  2070. // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  2071. var stack = [];
  2072. function pushWarningContext(vnode) {
  2073. stack.push(vnode);
  2074. }
  2075. function popWarningContext() {
  2076. stack.pop();
  2077. }
  2078. var isWarning = false;
  2079. function warn$1(msg, ...args) {
  2080. if (isWarning) return;
  2081. isWarning = true;
  2082. pauseTracking();
  2083. const instance = stack.length ? stack[stack.length - 1].component : null;
  2084. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2085. const trace = getComponentTrace();
  2086. if (appWarnHandler) {
  2087. callWithErrorHandling(
  2088. appWarnHandler,
  2089. instance,
  2090. 11,
  2091. [
  2092. // eslint-disable-next-line no-restricted-syntax
  2093. msg + args.map((a) => {
  2094. var _a, _b;
  2095. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  2096. }).join(""),
  2097. instance && instance.proxy,
  2098. trace.map(
  2099. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  2100. ).join("\n"),
  2101. trace
  2102. ]
  2103. );
  2104. } else {
  2105. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2106. if (trace.length && // avoid spamming console during tests
  2107. true) {
  2108. warnArgs.push(`
  2109. `, ...formatTrace(trace));
  2110. }
  2111. console.warn(...warnArgs);
  2112. }
  2113. resetTracking();
  2114. isWarning = false;
  2115. }
  2116. function getComponentTrace() {
  2117. let currentVNode = stack[stack.length - 1];
  2118. if (!currentVNode) {
  2119. return [];
  2120. }
  2121. const normalizedStack = [];
  2122. while (currentVNode) {
  2123. const last = normalizedStack[0];
  2124. if (last && last.vnode === currentVNode) {
  2125. last.recurseCount++;
  2126. } else {
  2127. normalizedStack.push({
  2128. vnode: currentVNode,
  2129. recurseCount: 0
  2130. });
  2131. }
  2132. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2133. currentVNode = parentInstance && parentInstance.vnode;
  2134. }
  2135. return normalizedStack;
  2136. }
  2137. function formatTrace(trace) {
  2138. const logs = [];
  2139. trace.forEach((entry, i) => {
  2140. logs.push(...i === 0 ? [] : [`
  2141. `], ...formatTraceEntry(entry));
  2142. });
  2143. return logs;
  2144. }
  2145. function formatTraceEntry({ vnode, recurseCount }) {
  2146. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2147. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2148. const open = ` at <${formatComponentName(
  2149. vnode.component,
  2150. vnode.type,
  2151. isRoot
  2152. )}`;
  2153. const close = `>` + postfix;
  2154. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2155. }
  2156. function formatProps(props) {
  2157. const res = [];
  2158. const keys = Object.keys(props);
  2159. keys.slice(0, 3).forEach((key) => {
  2160. res.push(...formatProp(key, props[key]));
  2161. });
  2162. if (keys.length > 3) {
  2163. res.push(` ...`);
  2164. }
  2165. return res;
  2166. }
  2167. function formatProp(key, value, raw) {
  2168. if (isString(value)) {
  2169. value = JSON.stringify(value);
  2170. return raw ? value : [`${key}=${value}`];
  2171. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  2172. return raw ? value : [`${key}=${value}`];
  2173. } else if (isRef2(value)) {
  2174. value = formatProp(key, toRaw(value.value), true);
  2175. return raw ? value : [`${key}=Ref<`, value, `>`];
  2176. } else if (isFunction(value)) {
  2177. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  2178. } else {
  2179. value = toRaw(value);
  2180. return raw ? value : [`${key}=`, value];
  2181. }
  2182. }
  2183. function assertNumber(val, type) {
  2184. if (false) return;
  2185. if (val === void 0) {
  2186. return;
  2187. } else if (typeof val !== "number") {
  2188. warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  2189. } else if (isNaN(val)) {
  2190. warn$1(`${type} is NaN - the duration expression might be incorrect.`);
  2191. }
  2192. }
  2193. var ErrorCodes = {
  2194. "SETUP_FUNCTION": 0,
  2195. "0": "SETUP_FUNCTION",
  2196. "RENDER_FUNCTION": 1,
  2197. "1": "RENDER_FUNCTION",
  2198. "NATIVE_EVENT_HANDLER": 5,
  2199. "5": "NATIVE_EVENT_HANDLER",
  2200. "COMPONENT_EVENT_HANDLER": 6,
  2201. "6": "COMPONENT_EVENT_HANDLER",
  2202. "VNODE_HOOK": 7,
  2203. "7": "VNODE_HOOK",
  2204. "DIRECTIVE_HOOK": 8,
  2205. "8": "DIRECTIVE_HOOK",
  2206. "TRANSITION_HOOK": 9,
  2207. "9": "TRANSITION_HOOK",
  2208. "APP_ERROR_HANDLER": 10,
  2209. "10": "APP_ERROR_HANDLER",
  2210. "APP_WARN_HANDLER": 11,
  2211. "11": "APP_WARN_HANDLER",
  2212. "FUNCTION_REF": 12,
  2213. "12": "FUNCTION_REF",
  2214. "ASYNC_COMPONENT_LOADER": 13,
  2215. "13": "ASYNC_COMPONENT_LOADER",
  2216. "SCHEDULER": 14,
  2217. "14": "SCHEDULER",
  2218. "COMPONENT_UPDATE": 15,
  2219. "15": "COMPONENT_UPDATE",
  2220. "APP_UNMOUNT_CLEANUP": 16,
  2221. "16": "APP_UNMOUNT_CLEANUP"
  2222. };
  2223. var ErrorTypeStrings$1 = {
  2224. ["sp"]: "serverPrefetch hook",
  2225. ["bc"]: "beforeCreate hook",
  2226. ["c"]: "created hook",
  2227. ["bm"]: "beforeMount hook",
  2228. ["m"]: "mounted hook",
  2229. ["bu"]: "beforeUpdate hook",
  2230. ["u"]: "updated",
  2231. ["bum"]: "beforeUnmount hook",
  2232. ["um"]: "unmounted hook",
  2233. ["a"]: "activated hook",
  2234. ["da"]: "deactivated hook",
  2235. ["ec"]: "errorCaptured hook",
  2236. ["rtc"]: "renderTracked hook",
  2237. ["rtg"]: "renderTriggered hook",
  2238. [0]: "setup function",
  2239. [1]: "render function",
  2240. [2]: "watcher getter",
  2241. [3]: "watcher callback",
  2242. [4]: "watcher cleanup function",
  2243. [5]: "native event handler",
  2244. [6]: "component event handler",
  2245. [7]: "vnode hook",
  2246. [8]: "directive hook",
  2247. [9]: "transition hook",
  2248. [10]: "app errorHandler",
  2249. [11]: "app warnHandler",
  2250. [12]: "ref function",
  2251. [13]: "async component loader",
  2252. [14]: "scheduler flush",
  2253. [15]: "component update",
  2254. [16]: "app unmount cleanup function"
  2255. };
  2256. function callWithErrorHandling(fn, instance, type, args) {
  2257. try {
  2258. return args ? fn(...args) : fn();
  2259. } catch (err) {
  2260. handleError(err, instance, type);
  2261. }
  2262. }
  2263. function callWithAsyncErrorHandling(fn, instance, type, args) {
  2264. if (isFunction(fn)) {
  2265. const res = callWithErrorHandling(fn, instance, type, args);
  2266. if (res && isPromise(res)) {
  2267. res.catch((err) => {
  2268. handleError(err, instance, type);
  2269. });
  2270. }
  2271. return res;
  2272. }
  2273. if (isArray(fn)) {
  2274. const values = [];
  2275. for (let i = 0; i < fn.length; i++) {
  2276. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  2277. }
  2278. return values;
  2279. } else if (true) {
  2280. warn$1(
  2281. `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
  2282. );
  2283. }
  2284. }
  2285. function handleError(err, instance, type, throwInDev = true) {
  2286. const contextVNode = instance ? instance.vnode : null;
  2287. const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
  2288. if (instance) {
  2289. let cur = instance.parent;
  2290. const exposedInstance = instance.proxy;
  2291. const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
  2292. while (cur) {
  2293. const errorCapturedHooks = cur.ec;
  2294. if (errorCapturedHooks) {
  2295. for (let i = 0; i < errorCapturedHooks.length; i++) {
  2296. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  2297. return;
  2298. }
  2299. }
  2300. }
  2301. cur = cur.parent;
  2302. }
  2303. if (errorHandler) {
  2304. pauseTracking();
  2305. callWithErrorHandling(errorHandler, null, 10, [
  2306. err,
  2307. exposedInstance,
  2308. errorInfo
  2309. ]);
  2310. resetTracking();
  2311. return;
  2312. }
  2313. }
  2314. logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
  2315. }
  2316. function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
  2317. if (true) {
  2318. const info = ErrorTypeStrings$1[type];
  2319. if (contextVNode) {
  2320. pushWarningContext(contextVNode);
  2321. }
  2322. warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  2323. if (contextVNode) {
  2324. popWarningContext();
  2325. }
  2326. if (throwInDev) {
  2327. throw err;
  2328. } else {
  2329. console.error(err);
  2330. }
  2331. } else if (throwInProd) {
  2332. throw err;
  2333. } else {
  2334. console.error(err);
  2335. }
  2336. }
  2337. var queue = [];
  2338. var flushIndex = -1;
  2339. var pendingPostFlushCbs = [];
  2340. var activePostFlushCbs = null;
  2341. var postFlushIndex = 0;
  2342. var resolvedPromise = Promise.resolve();
  2343. var currentFlushPromise = null;
  2344. var RECURSION_LIMIT = 100;
  2345. function nextTick(fn) {
  2346. const p2 = currentFlushPromise || resolvedPromise;
  2347. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2348. }
  2349. function findInsertionIndex(id) {
  2350. let start = flushIndex + 1;
  2351. let end = queue.length;
  2352. while (start < end) {
  2353. const middle = start + end >>> 1;
  2354. const middleJob = queue[middle];
  2355. const middleJobId = getId(middleJob);
  2356. if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
  2357. start = middle + 1;
  2358. } else {
  2359. end = middle;
  2360. }
  2361. }
  2362. return start;
  2363. }
  2364. function queueJob(job) {
  2365. if (!(job.flags & 1)) {
  2366. const jobId = getId(job);
  2367. const lastJob = queue[queue.length - 1];
  2368. if (!lastJob || // fast path when the job id is larger than the tail
  2369. !(job.flags & 2) && jobId >= getId(lastJob)) {
  2370. queue.push(job);
  2371. } else {
  2372. queue.splice(findInsertionIndex(jobId), 0, job);
  2373. }
  2374. job.flags |= 1;
  2375. queueFlush();
  2376. }
  2377. }
  2378. function queueFlush() {
  2379. if (!currentFlushPromise) {
  2380. currentFlushPromise = resolvedPromise.then(flushJobs);
  2381. }
  2382. }
  2383. function queuePostFlushCb(cb) {
  2384. if (!isArray(cb)) {
  2385. if (activePostFlushCbs && cb.id === -1) {
  2386. activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
  2387. } else if (!(cb.flags & 1)) {
  2388. pendingPostFlushCbs.push(cb);
  2389. cb.flags |= 1;
  2390. }
  2391. } else {
  2392. pendingPostFlushCbs.push(...cb);
  2393. }
  2394. queueFlush();
  2395. }
  2396. function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
  2397. if (true) {
  2398. seen = seen || /* @__PURE__ */ new Map();
  2399. }
  2400. for (; i < queue.length; i++) {
  2401. const cb = queue[i];
  2402. if (cb && cb.flags & 2) {
  2403. if (instance && cb.id !== instance.uid) {
  2404. continue;
  2405. }
  2406. if (checkRecursiveUpdates(seen, cb)) {
  2407. continue;
  2408. }
  2409. queue.splice(i, 1);
  2410. i--;
  2411. if (cb.flags & 4) {
  2412. cb.flags &= ~1;
  2413. }
  2414. cb();
  2415. if (!(cb.flags & 4)) {
  2416. cb.flags &= ~1;
  2417. }
  2418. }
  2419. }
  2420. }
  2421. function flushPostFlushCbs(seen) {
  2422. if (pendingPostFlushCbs.length) {
  2423. const deduped = [...new Set(pendingPostFlushCbs)].sort(
  2424. (a, b) => getId(a) - getId(b)
  2425. );
  2426. pendingPostFlushCbs.length = 0;
  2427. if (activePostFlushCbs) {
  2428. activePostFlushCbs.push(...deduped);
  2429. return;
  2430. }
  2431. activePostFlushCbs = deduped;
  2432. if (true) {
  2433. seen = seen || /* @__PURE__ */ new Map();
  2434. }
  2435. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  2436. const cb = activePostFlushCbs[postFlushIndex];
  2437. if (checkRecursiveUpdates(seen, cb)) {
  2438. continue;
  2439. }
  2440. if (cb.flags & 4) {
  2441. cb.flags &= ~1;
  2442. }
  2443. if (!(cb.flags & 8)) cb();
  2444. cb.flags &= ~1;
  2445. }
  2446. activePostFlushCbs = null;
  2447. postFlushIndex = 0;
  2448. }
  2449. }
  2450. var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
  2451. function flushJobs(seen) {
  2452. if (true) {
  2453. seen = seen || /* @__PURE__ */ new Map();
  2454. }
  2455. const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
  2456. try {
  2457. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2458. const job = queue[flushIndex];
  2459. if (job && !(job.flags & 8)) {
  2460. if (check(job)) {
  2461. continue;
  2462. }
  2463. if (job.flags & 4) {
  2464. job.flags &= ~1;
  2465. }
  2466. callWithErrorHandling(
  2467. job,
  2468. job.i,
  2469. job.i ? 15 : 14
  2470. );
  2471. if (!(job.flags & 4)) {
  2472. job.flags &= ~1;
  2473. }
  2474. }
  2475. }
  2476. } finally {
  2477. for (; flushIndex < queue.length; flushIndex++) {
  2478. const job = queue[flushIndex];
  2479. if (job) {
  2480. job.flags &= ~1;
  2481. }
  2482. }
  2483. flushIndex = -1;
  2484. queue.length = 0;
  2485. flushPostFlushCbs(seen);
  2486. currentFlushPromise = null;
  2487. if (queue.length || pendingPostFlushCbs.length) {
  2488. flushJobs(seen);
  2489. }
  2490. }
  2491. }
  2492. function checkRecursiveUpdates(seen, fn) {
  2493. const count = seen.get(fn) || 0;
  2494. if (count > RECURSION_LIMIT) {
  2495. const instance = fn.i;
  2496. const componentName = instance && getComponentName(instance.type);
  2497. handleError(
  2498. `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.`,
  2499. null,
  2500. 10
  2501. );
  2502. return true;
  2503. }
  2504. seen.set(fn, count + 1);
  2505. return false;
  2506. }
  2507. var isHmrUpdating = false;
  2508. var hmrDirtyComponents = /* @__PURE__ */ new Map();
  2509. if (true) {
  2510. getGlobalThis().__VUE_HMR_RUNTIME__ = {
  2511. createRecord: tryWrap(createRecord),
  2512. rerender: tryWrap(rerender),
  2513. reload: tryWrap(reload)
  2514. };
  2515. }
  2516. var map = /* @__PURE__ */ new Map();
  2517. function registerHMR(instance) {
  2518. const id = instance.type.__hmrId;
  2519. let record = map.get(id);
  2520. if (!record) {
  2521. createRecord(id, instance.type);
  2522. record = map.get(id);
  2523. }
  2524. record.instances.add(instance);
  2525. }
  2526. function unregisterHMR(instance) {
  2527. map.get(instance.type.__hmrId).instances.delete(instance);
  2528. }
  2529. function createRecord(id, initialDef) {
  2530. if (map.has(id)) {
  2531. return false;
  2532. }
  2533. map.set(id, {
  2534. initialDef: normalizeClassComponent(initialDef),
  2535. instances: /* @__PURE__ */ new Set()
  2536. });
  2537. return true;
  2538. }
  2539. function normalizeClassComponent(component) {
  2540. return isClassComponent(component) ? component.__vccOpts : component;
  2541. }
  2542. function rerender(id, newRender) {
  2543. const record = map.get(id);
  2544. if (!record) {
  2545. return;
  2546. }
  2547. record.initialDef.render = newRender;
  2548. [...record.instances].forEach((instance) => {
  2549. if (newRender) {
  2550. instance.render = newRender;
  2551. normalizeClassComponent(instance.type).render = newRender;
  2552. }
  2553. instance.renderCache = [];
  2554. isHmrUpdating = true;
  2555. instance.update();
  2556. isHmrUpdating = false;
  2557. });
  2558. }
  2559. function reload(id, newComp) {
  2560. const record = map.get(id);
  2561. if (!record) return;
  2562. newComp = normalizeClassComponent(newComp);
  2563. updateComponentDef(record.initialDef, newComp);
  2564. const instances = [...record.instances];
  2565. for (let i = 0; i < instances.length; i++) {
  2566. const instance = instances[i];
  2567. const oldComp = normalizeClassComponent(instance.type);
  2568. let dirtyInstances = hmrDirtyComponents.get(oldComp);
  2569. if (!dirtyInstances) {
  2570. if (oldComp !== record.initialDef) {
  2571. updateComponentDef(oldComp, newComp);
  2572. }
  2573. hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
  2574. }
  2575. dirtyInstances.add(instance);
  2576. instance.appContext.propsCache.delete(instance.type);
  2577. instance.appContext.emitsCache.delete(instance.type);
  2578. instance.appContext.optionsCache.delete(instance.type);
  2579. if (instance.ceReload) {
  2580. dirtyInstances.add(instance);
  2581. instance.ceReload(newComp.styles);
  2582. dirtyInstances.delete(instance);
  2583. } else if (instance.parent) {
  2584. queueJob(() => {
  2585. isHmrUpdating = true;
  2586. instance.parent.update();
  2587. isHmrUpdating = false;
  2588. dirtyInstances.delete(instance);
  2589. });
  2590. } else if (instance.appContext.reload) {
  2591. instance.appContext.reload();
  2592. } else if (typeof window !== "undefined") {
  2593. window.location.reload();
  2594. } else {
  2595. console.warn(
  2596. "[HMR] Root or manually mounted instance modified. Full reload required."
  2597. );
  2598. }
  2599. if (instance.root.ce && instance !== instance.root) {
  2600. instance.root.ce._removeChildStyle(oldComp);
  2601. }
  2602. }
  2603. queuePostFlushCb(() => {
  2604. hmrDirtyComponents.clear();
  2605. });
  2606. }
  2607. function updateComponentDef(oldComp, newComp) {
  2608. extend(oldComp, newComp);
  2609. for (const key in oldComp) {
  2610. if (key !== "__file" && !(key in newComp)) {
  2611. delete oldComp[key];
  2612. }
  2613. }
  2614. }
  2615. function tryWrap(fn) {
  2616. return (id, arg) => {
  2617. try {
  2618. return fn(id, arg);
  2619. } catch (e) {
  2620. console.error(e);
  2621. console.warn(
  2622. `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
  2623. );
  2624. }
  2625. };
  2626. }
  2627. var devtools$1;
  2628. var buffer = [];
  2629. var devtoolsNotInstalled = false;
  2630. function emit$1(event, ...args) {
  2631. if (devtools$1) {
  2632. devtools$1.emit(event, ...args);
  2633. } else if (!devtoolsNotInstalled) {
  2634. buffer.push({ event, args });
  2635. }
  2636. }
  2637. function setDevtoolsHook$1(hook, target) {
  2638. var _a, _b;
  2639. devtools$1 = hook;
  2640. if (devtools$1) {
  2641. devtools$1.enabled = true;
  2642. buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
  2643. buffer = [];
  2644. } else if (
  2645. // handle late devtools injection - only do this if we are in an actual
  2646. // browser environment to avoid the timer handle stalling test runner exit
  2647. // (#4815)
  2648. typeof window !== "undefined" && // some envs mock window but not fully
  2649. window.HTMLElement && // also exclude jsdom
  2650. // eslint-disable-next-line no-restricted-syntax
  2651. !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
  2652. ) {
  2653. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  2654. replay.push((newHook) => {
  2655. setDevtoolsHook$1(newHook, target);
  2656. });
  2657. setTimeout(() => {
  2658. if (!devtools$1) {
  2659. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  2660. devtoolsNotInstalled = true;
  2661. buffer = [];
  2662. }
  2663. }, 3e3);
  2664. } else {
  2665. devtoolsNotInstalled = true;
  2666. buffer = [];
  2667. }
  2668. }
  2669. function devtoolsInitApp(app, version2) {
  2670. emit$1("app:init", app, version2, {
  2671. Fragment,
  2672. Text,
  2673. Comment,
  2674. Static
  2675. });
  2676. }
  2677. function devtoolsUnmountApp(app) {
  2678. emit$1("app:unmount", app);
  2679. }
  2680. var devtoolsComponentAdded = createDevtoolsComponentHook(
  2681. "component:added"
  2682. /* COMPONENT_ADDED */
  2683. );
  2684. var devtoolsComponentUpdated = createDevtoolsComponentHook(
  2685. "component:updated"
  2686. /* COMPONENT_UPDATED */
  2687. );
  2688. var _devtoolsComponentRemoved = createDevtoolsComponentHook(
  2689. "component:removed"
  2690. /* COMPONENT_REMOVED */
  2691. );
  2692. var devtoolsComponentRemoved = (component) => {
  2693. if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  2694. !devtools$1.cleanupBuffer(component)) {
  2695. _devtoolsComponentRemoved(component);
  2696. }
  2697. };
  2698. function createDevtoolsComponentHook(hook) {
  2699. return (component) => {
  2700. emit$1(
  2701. hook,
  2702. component.appContext.app,
  2703. component.uid,
  2704. component.parent ? component.parent.uid : void 0,
  2705. component
  2706. );
  2707. };
  2708. }
  2709. var devtoolsPerfStart = createDevtoolsPerformanceHook(
  2710. "perf:start"
  2711. /* PERFORMANCE_START */
  2712. );
  2713. var devtoolsPerfEnd = createDevtoolsPerformanceHook(
  2714. "perf:end"
  2715. /* PERFORMANCE_END */
  2716. );
  2717. function createDevtoolsPerformanceHook(hook) {
  2718. return (component, type, time) => {
  2719. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  2720. };
  2721. }
  2722. function devtoolsComponentEmit(component, event, params) {
  2723. emit$1(
  2724. "component:emit",
  2725. component.appContext.app,
  2726. component,
  2727. event,
  2728. params
  2729. );
  2730. }
  2731. var currentRenderingInstance = null;
  2732. var currentScopeId = null;
  2733. function setCurrentRenderingInstance(instance) {
  2734. const prev = currentRenderingInstance;
  2735. currentRenderingInstance = instance;
  2736. currentScopeId = instance && instance.type.__scopeId || null;
  2737. return prev;
  2738. }
  2739. function pushScopeId(id) {
  2740. currentScopeId = id;
  2741. }
  2742. function popScopeId() {
  2743. currentScopeId = null;
  2744. }
  2745. var withScopeId = (_id) => withCtx;
  2746. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2747. if (!ctx) return fn;
  2748. if (fn._n) {
  2749. return fn;
  2750. }
  2751. const renderFnWithContext = (...args) => {
  2752. if (renderFnWithContext._d) {
  2753. setBlockTracking(-1);
  2754. }
  2755. const prevInstance = setCurrentRenderingInstance(ctx);
  2756. let res;
  2757. try {
  2758. res = fn(...args);
  2759. } finally {
  2760. setCurrentRenderingInstance(prevInstance);
  2761. if (renderFnWithContext._d) {
  2762. setBlockTracking(1);
  2763. }
  2764. }
  2765. if (true) {
  2766. devtoolsComponentUpdated(ctx);
  2767. }
  2768. return res;
  2769. };
  2770. renderFnWithContext._n = true;
  2771. renderFnWithContext._c = true;
  2772. renderFnWithContext._d = true;
  2773. return renderFnWithContext;
  2774. }
  2775. function validateDirectiveName(name) {
  2776. if (isBuiltInDirective(name)) {
  2777. warn$1("Do not use built-in directive ids as custom directive id: " + name);
  2778. }
  2779. }
  2780. function withDirectives(vnode, directives) {
  2781. if (currentRenderingInstance === null) {
  2782. warn$1(`withDirectives can only be used inside render functions.`);
  2783. return vnode;
  2784. }
  2785. const instance = getComponentPublicInstance(currentRenderingInstance);
  2786. const bindings = vnode.dirs || (vnode.dirs = []);
  2787. for (let i = 0; i < directives.length; i++) {
  2788. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  2789. if (dir) {
  2790. if (isFunction(dir)) {
  2791. dir = {
  2792. mounted: dir,
  2793. updated: dir
  2794. };
  2795. }
  2796. if (dir.deep) {
  2797. traverse(value);
  2798. }
  2799. bindings.push({
  2800. dir,
  2801. instance,
  2802. value,
  2803. oldValue: void 0,
  2804. arg,
  2805. modifiers
  2806. });
  2807. }
  2808. }
  2809. return vnode;
  2810. }
  2811. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  2812. const bindings = vnode.dirs;
  2813. const oldBindings = prevVNode && prevVNode.dirs;
  2814. for (let i = 0; i < bindings.length; i++) {
  2815. const binding = bindings[i];
  2816. if (oldBindings) {
  2817. binding.oldValue = oldBindings[i].value;
  2818. }
  2819. let hook = binding.dir[name];
  2820. if (hook) {
  2821. pauseTracking();
  2822. callWithAsyncErrorHandling(hook, instance, 8, [
  2823. vnode.el,
  2824. binding,
  2825. vnode,
  2826. prevVNode
  2827. ]);
  2828. resetTracking();
  2829. }
  2830. }
  2831. }
  2832. var TeleportEndKey = Symbol("_vte");
  2833. var isTeleport = (type) => type.__isTeleport;
  2834. var isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  2835. var isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
  2836. var isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  2837. var isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  2838. var resolveTarget = (props, select) => {
  2839. const targetSelector = props && props.to;
  2840. if (isString(targetSelector)) {
  2841. if (!select) {
  2842. warn$1(
  2843. `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
  2844. );
  2845. return null;
  2846. } else {
  2847. const target = select(targetSelector);
  2848. if (!target && !isTeleportDisabled(props)) {
  2849. warn$1(
  2850. `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
  2851. );
  2852. }
  2853. return target;
  2854. }
  2855. } else {
  2856. if (!targetSelector && !isTeleportDisabled(props)) {
  2857. warn$1(`Invalid Teleport target: ${targetSelector}`);
  2858. }
  2859. return targetSelector;
  2860. }
  2861. };
  2862. var TeleportImpl = {
  2863. name: "Teleport",
  2864. __isTeleport: true,
  2865. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  2866. const {
  2867. mc: mountChildren,
  2868. pc: patchChildren,
  2869. pbc: patchBlockChildren,
  2870. o: { insert, querySelector, createText, createComment }
  2871. } = internals;
  2872. const disabled = isTeleportDisabled(n2.props);
  2873. let { shapeFlag, children, dynamicChildren } = n2;
  2874. if (isHmrUpdating) {
  2875. optimized = false;
  2876. dynamicChildren = null;
  2877. }
  2878. if (n1 == null) {
  2879. const placeholder = n2.el = true ? createComment("teleport start") : createText("");
  2880. const mainAnchor = n2.anchor = true ? createComment("teleport end") : createText("");
  2881. insert(placeholder, container, anchor);
  2882. insert(mainAnchor, container, anchor);
  2883. const mount = (container2, anchor2) => {
  2884. if (shapeFlag & 16) {
  2885. if (parentComponent && parentComponent.isCE) {
  2886. parentComponent.ce._teleportTarget = container2;
  2887. }
  2888. mountChildren(
  2889. children,
  2890. container2,
  2891. anchor2,
  2892. parentComponent,
  2893. parentSuspense,
  2894. namespace,
  2895. slotScopeIds,
  2896. optimized
  2897. );
  2898. }
  2899. };
  2900. const mountToTarget = () => {
  2901. const target = n2.target = resolveTarget(n2.props, querySelector);
  2902. const targetAnchor = prepareAnchor(target, n2, createText, insert);
  2903. if (target) {
  2904. if (namespace !== "svg" && isTargetSVG(target)) {
  2905. namespace = "svg";
  2906. } else if (namespace !== "mathml" && isTargetMathML(target)) {
  2907. namespace = "mathml";
  2908. }
  2909. if (!disabled) {
  2910. mount(target, targetAnchor);
  2911. updateCssVars(n2, false);
  2912. }
  2913. } else if (!disabled) {
  2914. warn$1(
  2915. "Invalid Teleport target on mount:",
  2916. target,
  2917. `(${typeof target})`
  2918. );
  2919. }
  2920. };
  2921. if (disabled) {
  2922. mount(container, mainAnchor);
  2923. updateCssVars(n2, true);
  2924. }
  2925. if (isTeleportDeferred(n2.props)) {
  2926. queuePostRenderEffect(mountToTarget, parentSuspense);
  2927. } else {
  2928. mountToTarget();
  2929. }
  2930. } else {
  2931. n2.el = n1.el;
  2932. n2.targetStart = n1.targetStart;
  2933. const mainAnchor = n2.anchor = n1.anchor;
  2934. const target = n2.target = n1.target;
  2935. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  2936. const wasDisabled = isTeleportDisabled(n1.props);
  2937. const currentContainer = wasDisabled ? container : target;
  2938. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  2939. if (namespace === "svg" || isTargetSVG(target)) {
  2940. namespace = "svg";
  2941. } else if (namespace === "mathml" || isTargetMathML(target)) {
  2942. namespace = "mathml";
  2943. }
  2944. if (dynamicChildren) {
  2945. patchBlockChildren(
  2946. n1.dynamicChildren,
  2947. dynamicChildren,
  2948. currentContainer,
  2949. parentComponent,
  2950. parentSuspense,
  2951. namespace,
  2952. slotScopeIds
  2953. );
  2954. traverseStaticChildren(n1, n2, true);
  2955. } else if (!optimized) {
  2956. patchChildren(
  2957. n1,
  2958. n2,
  2959. currentContainer,
  2960. currentAnchor,
  2961. parentComponent,
  2962. parentSuspense,
  2963. namespace,
  2964. slotScopeIds,
  2965. false
  2966. );
  2967. }
  2968. if (disabled) {
  2969. if (!wasDisabled) {
  2970. moveTeleport(
  2971. n2,
  2972. container,
  2973. mainAnchor,
  2974. internals,
  2975. 1
  2976. );
  2977. } else {
  2978. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  2979. n2.props.to = n1.props.to;
  2980. }
  2981. }
  2982. } else {
  2983. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  2984. const nextTarget = n2.target = resolveTarget(
  2985. n2.props,
  2986. querySelector
  2987. );
  2988. if (nextTarget) {
  2989. moveTeleport(
  2990. n2,
  2991. nextTarget,
  2992. null,
  2993. internals,
  2994. 0
  2995. );
  2996. } else if (true) {
  2997. warn$1(
  2998. "Invalid Teleport target on update:",
  2999. target,
  3000. `(${typeof target})`
  3001. );
  3002. }
  3003. } else if (wasDisabled) {
  3004. moveTeleport(
  3005. n2,
  3006. target,
  3007. targetAnchor,
  3008. internals,
  3009. 1
  3010. );
  3011. }
  3012. }
  3013. updateCssVars(n2, disabled);
  3014. }
  3015. },
  3016. remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  3017. const {
  3018. shapeFlag,
  3019. children,
  3020. anchor,
  3021. targetStart,
  3022. targetAnchor,
  3023. target,
  3024. props
  3025. } = vnode;
  3026. if (target) {
  3027. hostRemove(targetStart);
  3028. hostRemove(targetAnchor);
  3029. }
  3030. doRemove && hostRemove(anchor);
  3031. if (shapeFlag & 16) {
  3032. const shouldRemove = doRemove || !isTeleportDisabled(props);
  3033. for (let i = 0; i < children.length; i++) {
  3034. const child = children[i];
  3035. unmount(
  3036. child,
  3037. parentComponent,
  3038. parentSuspense,
  3039. shouldRemove,
  3040. !!child.dynamicChildren
  3041. );
  3042. }
  3043. }
  3044. },
  3045. move: moveTeleport,
  3046. hydrate: hydrateTeleport
  3047. };
  3048. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  3049. if (moveType === 0) {
  3050. insert(vnode.targetAnchor, container, parentAnchor);
  3051. }
  3052. const { el, anchor, shapeFlag, children, props } = vnode;
  3053. const isReorder = moveType === 2;
  3054. if (isReorder) {
  3055. insert(el, container, parentAnchor);
  3056. }
  3057. if (!isReorder || isTeleportDisabled(props)) {
  3058. if (shapeFlag & 16) {
  3059. for (let i = 0; i < children.length; i++) {
  3060. move(
  3061. children[i],
  3062. container,
  3063. parentAnchor,
  3064. 2
  3065. );
  3066. }
  3067. }
  3068. }
  3069. if (isReorder) {
  3070. insert(anchor, container, parentAnchor);
  3071. }
  3072. }
  3073. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  3074. o: { nextSibling, parentNode, querySelector, insert, createText }
  3075. }, hydrateChildren) {
  3076. const target = vnode.target = resolveTarget(
  3077. vnode.props,
  3078. querySelector
  3079. );
  3080. if (target) {
  3081. const disabled = isTeleportDisabled(vnode.props);
  3082. const targetNode = target._lpa || target.firstChild;
  3083. if (vnode.shapeFlag & 16) {
  3084. if (disabled) {
  3085. vnode.anchor = hydrateChildren(
  3086. nextSibling(node),
  3087. vnode,
  3088. parentNode(node),
  3089. parentComponent,
  3090. parentSuspense,
  3091. slotScopeIds,
  3092. optimized
  3093. );
  3094. vnode.targetStart = targetNode;
  3095. vnode.targetAnchor = targetNode && nextSibling(targetNode);
  3096. } else {
  3097. vnode.anchor = nextSibling(node);
  3098. let targetAnchor = targetNode;
  3099. while (targetAnchor) {
  3100. if (targetAnchor && targetAnchor.nodeType === 8) {
  3101. if (targetAnchor.data === "teleport start anchor") {
  3102. vnode.targetStart = targetAnchor;
  3103. } else if (targetAnchor.data === "teleport anchor") {
  3104. vnode.targetAnchor = targetAnchor;
  3105. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  3106. break;
  3107. }
  3108. }
  3109. targetAnchor = nextSibling(targetAnchor);
  3110. }
  3111. if (!vnode.targetAnchor) {
  3112. prepareAnchor(target, vnode, createText, insert);
  3113. }
  3114. hydrateChildren(
  3115. targetNode && nextSibling(targetNode),
  3116. vnode,
  3117. target,
  3118. parentComponent,
  3119. parentSuspense,
  3120. slotScopeIds,
  3121. optimized
  3122. );
  3123. }
  3124. }
  3125. updateCssVars(vnode, disabled);
  3126. }
  3127. return vnode.anchor && nextSibling(vnode.anchor);
  3128. }
  3129. var Teleport = TeleportImpl;
  3130. function updateCssVars(vnode, isDisabled) {
  3131. const ctx = vnode.ctx;
  3132. if (ctx && ctx.ut) {
  3133. let node, anchor;
  3134. if (isDisabled) {
  3135. node = vnode.el;
  3136. anchor = vnode.anchor;
  3137. } else {
  3138. node = vnode.targetStart;
  3139. anchor = vnode.targetAnchor;
  3140. }
  3141. while (node && node !== anchor) {
  3142. if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
  3143. node = node.nextSibling;
  3144. }
  3145. ctx.ut();
  3146. }
  3147. }
  3148. function prepareAnchor(target, vnode, createText, insert) {
  3149. const targetStart = vnode.targetStart = createText("");
  3150. const targetAnchor = vnode.targetAnchor = createText("");
  3151. targetStart[TeleportEndKey] = targetAnchor;
  3152. if (target) {
  3153. insert(targetStart, target);
  3154. insert(targetAnchor, target);
  3155. }
  3156. return targetAnchor;
  3157. }
  3158. var leaveCbKey = Symbol("_leaveCb");
  3159. var enterCbKey = Symbol("_enterCb");
  3160. function useTransitionState() {
  3161. const state = {
  3162. isMounted: false,
  3163. isLeaving: false,
  3164. isUnmounting: false,
  3165. leavingVNodes: /* @__PURE__ */ new Map()
  3166. };
  3167. onMounted(() => {
  3168. state.isMounted = true;
  3169. });
  3170. onBeforeUnmount(() => {
  3171. state.isUnmounting = true;
  3172. });
  3173. return state;
  3174. }
  3175. var TransitionHookValidator = [Function, Array];
  3176. var BaseTransitionPropsValidators = {
  3177. mode: String,
  3178. appear: Boolean,
  3179. persisted: Boolean,
  3180. // enter
  3181. onBeforeEnter: TransitionHookValidator,
  3182. onEnter: TransitionHookValidator,
  3183. onAfterEnter: TransitionHookValidator,
  3184. onEnterCancelled: TransitionHookValidator,
  3185. // leave
  3186. onBeforeLeave: TransitionHookValidator,
  3187. onLeave: TransitionHookValidator,
  3188. onAfterLeave: TransitionHookValidator,
  3189. onLeaveCancelled: TransitionHookValidator,
  3190. // appear
  3191. onBeforeAppear: TransitionHookValidator,
  3192. onAppear: TransitionHookValidator,
  3193. onAfterAppear: TransitionHookValidator,
  3194. onAppearCancelled: TransitionHookValidator
  3195. };
  3196. var recursiveGetSubtree = (instance) => {
  3197. const subTree = instance.subTree;
  3198. return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
  3199. };
  3200. var BaseTransitionImpl = {
  3201. name: `BaseTransition`,
  3202. props: BaseTransitionPropsValidators,
  3203. setup(props, { slots }) {
  3204. const instance = getCurrentInstance();
  3205. const state = useTransitionState();
  3206. return () => {
  3207. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  3208. if (!children || !children.length) {
  3209. return;
  3210. }
  3211. const child = findNonCommentChild(children);
  3212. const rawProps = toRaw(props);
  3213. const { mode } = rawProps;
  3214. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
  3215. warn$1(`invalid <transition> mode: ${mode}`);
  3216. }
  3217. if (state.isLeaving) {
  3218. return emptyPlaceholder(child);
  3219. }
  3220. const innerChild = getInnerChild$1(child);
  3221. if (!innerChild) {
  3222. return emptyPlaceholder(child);
  3223. }
  3224. let enterHooks = resolveTransitionHooks(
  3225. innerChild,
  3226. rawProps,
  3227. state,
  3228. instance,
  3229. // #11061, ensure enterHooks is fresh after clone
  3230. (hooks) => enterHooks = hooks
  3231. );
  3232. if (innerChild.type !== Comment) {
  3233. setTransitionHooks(innerChild, enterHooks);
  3234. }
  3235. const oldChild = instance.subTree;
  3236. const oldInnerChild = oldChild && getInnerChild$1(oldChild);
  3237. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
  3238. const leavingHooks = resolveTransitionHooks(
  3239. oldInnerChild,
  3240. rawProps,
  3241. state,
  3242. instance
  3243. );
  3244. setTransitionHooks(oldInnerChild, leavingHooks);
  3245. if (mode === "out-in" && innerChild.type !== Comment) {
  3246. state.isLeaving = true;
  3247. leavingHooks.afterLeave = () => {
  3248. state.isLeaving = false;
  3249. if (!(instance.job.flags & 8)) {
  3250. instance.update();
  3251. }
  3252. delete leavingHooks.afterLeave;
  3253. };
  3254. return emptyPlaceholder(child);
  3255. } else if (mode === "in-out" && innerChild.type !== Comment) {
  3256. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  3257. const leavingVNodesCache = getLeavingNodesForType(
  3258. state,
  3259. oldInnerChild
  3260. );
  3261. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  3262. el[leaveCbKey] = () => {
  3263. earlyRemove();
  3264. el[leaveCbKey] = void 0;
  3265. delete enterHooks.delayedLeave;
  3266. };
  3267. enterHooks.delayedLeave = delayedLeave;
  3268. };
  3269. }
  3270. }
  3271. return child;
  3272. };
  3273. }
  3274. };
  3275. function findNonCommentChild(children) {
  3276. let child = children[0];
  3277. if (children.length > 1) {
  3278. let hasFound = false;
  3279. for (const c of children) {
  3280. if (c.type !== Comment) {
  3281. if (hasFound) {
  3282. warn$1(
  3283. "<transition> can only be used on a single element or component. Use <transition-group> for lists."
  3284. );
  3285. break;
  3286. }
  3287. child = c;
  3288. hasFound = true;
  3289. if (false) break;
  3290. }
  3291. }
  3292. }
  3293. return child;
  3294. }
  3295. var BaseTransition = BaseTransitionImpl;
  3296. function getLeavingNodesForType(state, vnode) {
  3297. const { leavingVNodes } = state;
  3298. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  3299. if (!leavingVNodesCache) {
  3300. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  3301. leavingVNodes.set(vnode.type, leavingVNodesCache);
  3302. }
  3303. return leavingVNodesCache;
  3304. }
  3305. function resolveTransitionHooks(vnode, props, state, instance, postClone) {
  3306. const {
  3307. appear,
  3308. mode,
  3309. persisted = false,
  3310. onBeforeEnter,
  3311. onEnter,
  3312. onAfterEnter,
  3313. onEnterCancelled,
  3314. onBeforeLeave,
  3315. onLeave,
  3316. onAfterLeave,
  3317. onLeaveCancelled,
  3318. onBeforeAppear,
  3319. onAppear,
  3320. onAfterAppear,
  3321. onAppearCancelled
  3322. } = props;
  3323. const key = String(vnode.key);
  3324. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  3325. const callHook3 = (hook, args) => {
  3326. hook && callWithAsyncErrorHandling(
  3327. hook,
  3328. instance,
  3329. 9,
  3330. args
  3331. );
  3332. };
  3333. const callAsyncHook = (hook, args) => {
  3334. const done = args[1];
  3335. callHook3(hook, args);
  3336. if (isArray(hook)) {
  3337. if (hook.every((hook2) => hook2.length <= 1)) done();
  3338. } else if (hook.length <= 1) {
  3339. done();
  3340. }
  3341. };
  3342. const hooks = {
  3343. mode,
  3344. persisted,
  3345. beforeEnter(el) {
  3346. let hook = onBeforeEnter;
  3347. if (!state.isMounted) {
  3348. if (appear) {
  3349. hook = onBeforeAppear || onBeforeEnter;
  3350. } else {
  3351. return;
  3352. }
  3353. }
  3354. if (el[leaveCbKey]) {
  3355. el[leaveCbKey](
  3356. true
  3357. /* cancelled */
  3358. );
  3359. }
  3360. const leavingVNode = leavingVNodesCache[key];
  3361. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  3362. leavingVNode.el[leaveCbKey]();
  3363. }
  3364. callHook3(hook, [el]);
  3365. },
  3366. enter(el) {
  3367. let hook = onEnter;
  3368. let afterHook = onAfterEnter;
  3369. let cancelHook = onEnterCancelled;
  3370. if (!state.isMounted) {
  3371. if (appear) {
  3372. hook = onAppear || onEnter;
  3373. afterHook = onAfterAppear || onAfterEnter;
  3374. cancelHook = onAppearCancelled || onEnterCancelled;
  3375. } else {
  3376. return;
  3377. }
  3378. }
  3379. let called = false;
  3380. const done = el[enterCbKey] = (cancelled) => {
  3381. if (called) return;
  3382. called = true;
  3383. if (cancelled) {
  3384. callHook3(cancelHook, [el]);
  3385. } else {
  3386. callHook3(afterHook, [el]);
  3387. }
  3388. if (hooks.delayedLeave) {
  3389. hooks.delayedLeave();
  3390. }
  3391. el[enterCbKey] = void 0;
  3392. };
  3393. if (hook) {
  3394. callAsyncHook(hook, [el, done]);
  3395. } else {
  3396. done();
  3397. }
  3398. },
  3399. leave(el, remove2) {
  3400. const key2 = String(vnode.key);
  3401. if (el[enterCbKey]) {
  3402. el[enterCbKey](
  3403. true
  3404. /* cancelled */
  3405. );
  3406. }
  3407. if (state.isUnmounting) {
  3408. return remove2();
  3409. }
  3410. callHook3(onBeforeLeave, [el]);
  3411. let called = false;
  3412. const done = el[leaveCbKey] = (cancelled) => {
  3413. if (called) return;
  3414. called = true;
  3415. remove2();
  3416. if (cancelled) {
  3417. callHook3(onLeaveCancelled, [el]);
  3418. } else {
  3419. callHook3(onAfterLeave, [el]);
  3420. }
  3421. el[leaveCbKey] = void 0;
  3422. if (leavingVNodesCache[key2] === vnode) {
  3423. delete leavingVNodesCache[key2];
  3424. }
  3425. };
  3426. leavingVNodesCache[key2] = vnode;
  3427. if (onLeave) {
  3428. callAsyncHook(onLeave, [el, done]);
  3429. } else {
  3430. done();
  3431. }
  3432. },
  3433. clone(vnode2) {
  3434. const hooks2 = resolveTransitionHooks(
  3435. vnode2,
  3436. props,
  3437. state,
  3438. instance,
  3439. postClone
  3440. );
  3441. if (postClone) postClone(hooks2);
  3442. return hooks2;
  3443. }
  3444. };
  3445. return hooks;
  3446. }
  3447. function emptyPlaceholder(vnode) {
  3448. if (isKeepAlive(vnode)) {
  3449. vnode = cloneVNode(vnode);
  3450. vnode.children = null;
  3451. return vnode;
  3452. }
  3453. }
  3454. function getInnerChild$1(vnode) {
  3455. if (!isKeepAlive(vnode)) {
  3456. if (isTeleport(vnode.type) && vnode.children) {
  3457. return findNonCommentChild(vnode.children);
  3458. }
  3459. return vnode;
  3460. }
  3461. if (vnode.component) {
  3462. return vnode.component.subTree;
  3463. }
  3464. const { shapeFlag, children } = vnode;
  3465. if (children) {
  3466. if (shapeFlag & 16) {
  3467. return children[0];
  3468. }
  3469. if (shapeFlag & 32 && isFunction(children.default)) {
  3470. return children.default();
  3471. }
  3472. }
  3473. }
  3474. function setTransitionHooks(vnode, hooks) {
  3475. if (vnode.shapeFlag & 6 && vnode.component) {
  3476. vnode.transition = hooks;
  3477. setTransitionHooks(vnode.component.subTree, hooks);
  3478. } else if (vnode.shapeFlag & 128) {
  3479. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  3480. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  3481. } else {
  3482. vnode.transition = hooks;
  3483. }
  3484. }
  3485. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  3486. let ret = [];
  3487. let keyedFragmentCount = 0;
  3488. for (let i = 0; i < children.length; i++) {
  3489. let child = children[i];
  3490. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  3491. if (child.type === Fragment) {
  3492. if (child.patchFlag & 128) keyedFragmentCount++;
  3493. ret = ret.concat(
  3494. getTransitionRawChildren(child.children, keepComment, key)
  3495. );
  3496. } else if (keepComment || child.type !== Comment) {
  3497. ret.push(key != null ? cloneVNode(child, { key }) : child);
  3498. }
  3499. }
  3500. if (keyedFragmentCount > 1) {
  3501. for (let i = 0; i < ret.length; i++) {
  3502. ret[i].patchFlag = -2;
  3503. }
  3504. }
  3505. return ret;
  3506. }
  3507. function defineComponent(options, extraOptions) {
  3508. return isFunction(options) ? (
  3509. // #8236: extend call and options.name access are considered side-effects
  3510. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  3511. (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  3512. ) : options;
  3513. }
  3514. function useId() {
  3515. const i = getCurrentInstance();
  3516. if (i) {
  3517. return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
  3518. } else if (true) {
  3519. warn$1(
  3520. `useId() is called when there is no active component instance to be associated with.`
  3521. );
  3522. }
  3523. return "";
  3524. }
  3525. function markAsyncBoundary(instance) {
  3526. instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
  3527. }
  3528. var knownTemplateRefs = /* @__PURE__ */ new WeakSet();
  3529. function useTemplateRef(key) {
  3530. const i = getCurrentInstance();
  3531. const r = shallowRef(null);
  3532. if (i) {
  3533. const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
  3534. let desc;
  3535. if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
  3536. warn$1(`useTemplateRef('${key}') already exists.`);
  3537. } else {
  3538. Object.defineProperty(refs, key, {
  3539. enumerable: true,
  3540. get: () => r.value,
  3541. set: (val) => r.value = val
  3542. });
  3543. }
  3544. } else if (true) {
  3545. warn$1(
  3546. `useTemplateRef() is called when there is no active component instance to be associated with.`
  3547. );
  3548. }
  3549. const ret = true ? readonly(r) : r;
  3550. if (true) {
  3551. knownTemplateRefs.add(ret);
  3552. }
  3553. return ret;
  3554. }
  3555. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  3556. if (isArray(rawRef)) {
  3557. rawRef.forEach(
  3558. (r, i) => setRef(
  3559. r,
  3560. oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),
  3561. parentSuspense,
  3562. vnode,
  3563. isUnmount
  3564. )
  3565. );
  3566. return;
  3567. }
  3568. if (isAsyncWrapper(vnode) && !isUnmount) {
  3569. return;
  3570. }
  3571. const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
  3572. const value = isUnmount ? null : refValue;
  3573. const { i: owner, r: ref2 } = rawRef;
  3574. if (!owner) {
  3575. warn$1(
  3576. `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
  3577. );
  3578. return;
  3579. }
  3580. const oldRef = oldRawRef && oldRawRef.r;
  3581. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  3582. const setupState = owner.setupState;
  3583. const rawSetupState = toRaw(setupState);
  3584. const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
  3585. if (true) {
  3586. if (hasOwn(rawSetupState, key) && !isRef2(rawSetupState[key])) {
  3587. warn$1(
  3588. `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
  3589. );
  3590. }
  3591. if (knownTemplateRefs.has(rawSetupState[key])) {
  3592. return false;
  3593. }
  3594. }
  3595. return hasOwn(rawSetupState, key);
  3596. };
  3597. if (oldRef != null && oldRef !== ref2) {
  3598. if (isString(oldRef)) {
  3599. refs[oldRef] = null;
  3600. if (canSetSetupRef(oldRef)) {
  3601. setupState[oldRef] = null;
  3602. }
  3603. } else if (isRef2(oldRef)) {
  3604. oldRef.value = null;
  3605. }
  3606. }
  3607. if (isFunction(ref2)) {
  3608. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  3609. } else {
  3610. const _isString = isString(ref2);
  3611. const _isRef = isRef2(ref2);
  3612. if (_isString || _isRef) {
  3613. const doSet = () => {
  3614. if (rawRef.f) {
  3615. const existing = _isString ? canSetSetupRef(ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
  3616. if (isUnmount) {
  3617. isArray(existing) && remove(existing, refValue);
  3618. } else {
  3619. if (!isArray(existing)) {
  3620. if (_isString) {
  3621. refs[ref2] = [refValue];
  3622. if (canSetSetupRef(ref2)) {
  3623. setupState[ref2] = refs[ref2];
  3624. }
  3625. } else {
  3626. ref2.value = [refValue];
  3627. if (rawRef.k) refs[rawRef.k] = ref2.value;
  3628. }
  3629. } else if (!existing.includes(refValue)) {
  3630. existing.push(refValue);
  3631. }
  3632. }
  3633. } else if (_isString) {
  3634. refs[ref2] = value;
  3635. if (canSetSetupRef(ref2)) {
  3636. setupState[ref2] = value;
  3637. }
  3638. } else if (_isRef) {
  3639. ref2.value = value;
  3640. if (rawRef.k) refs[rawRef.k] = value;
  3641. } else if (true) {
  3642. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  3643. }
  3644. };
  3645. if (value) {
  3646. doSet.id = -1;
  3647. queuePostRenderEffect(doSet, parentSuspense);
  3648. } else {
  3649. doSet();
  3650. }
  3651. } else if (true) {
  3652. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  3653. }
  3654. }
  3655. }
  3656. var hasLoggedMismatchError = false;
  3657. var logMismatchError = () => {
  3658. if (hasLoggedMismatchError) {
  3659. return;
  3660. }
  3661. console.error("Hydration completed but contains mismatches.");
  3662. hasLoggedMismatchError = true;
  3663. };
  3664. var isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
  3665. var isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
  3666. var getContainerType = (container) => {
  3667. if (container.nodeType !== 1) return void 0;
  3668. if (isSVGContainer(container)) return "svg";
  3669. if (isMathMLContainer(container)) return "mathml";
  3670. return void 0;
  3671. };
  3672. var isComment = (node) => node.nodeType === 8;
  3673. function createHydrationFunctions(rendererInternals) {
  3674. const {
  3675. mt: mountComponent,
  3676. p: patch,
  3677. o: {
  3678. patchProp: patchProp2,
  3679. createText,
  3680. nextSibling,
  3681. parentNode,
  3682. remove: remove2,
  3683. insert,
  3684. createComment
  3685. }
  3686. } = rendererInternals;
  3687. const hydrate2 = (vnode, container) => {
  3688. if (!container.hasChildNodes()) {
  3689. warn$1(
  3690. `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
  3691. );
  3692. patch(null, vnode, container);
  3693. flushPostFlushCbs();
  3694. container._vnode = vnode;
  3695. return;
  3696. }
  3697. hydrateNode(container.firstChild, vnode, null, null, null);
  3698. flushPostFlushCbs();
  3699. container._vnode = vnode;
  3700. };
  3701. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  3702. optimized = optimized || !!vnode.dynamicChildren;
  3703. const isFragmentStart = isComment(node) && node.data === "[";
  3704. const onMismatch = () => handleMismatch(
  3705. node,
  3706. vnode,
  3707. parentComponent,
  3708. parentSuspense,
  3709. slotScopeIds,
  3710. isFragmentStart
  3711. );
  3712. const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
  3713. let domType = node.nodeType;
  3714. vnode.el = node;
  3715. if (true) {
  3716. def(node, "__vnode", vnode, true);
  3717. def(node, "__vueParentComponent", parentComponent, true);
  3718. }
  3719. if (patchFlag === -2) {
  3720. optimized = false;
  3721. vnode.dynamicChildren = null;
  3722. }
  3723. let nextNode = null;
  3724. switch (type) {
  3725. case Text:
  3726. if (domType !== 3) {
  3727. if (vnode.children === "") {
  3728. insert(vnode.el = createText(""), parentNode(node), node);
  3729. nextNode = node;
  3730. } else {
  3731. nextNode = onMismatch();
  3732. }
  3733. } else {
  3734. if (node.data !== vnode.children) {
  3735. warn$1(
  3736. `Hydration text mismatch in`,
  3737. node.parentNode,
  3738. `
  3739. - rendered on server: ${JSON.stringify(
  3740. node.data
  3741. )}
  3742. - expected on client: ${JSON.stringify(vnode.children)}`
  3743. );
  3744. logMismatchError();
  3745. node.data = vnode.children;
  3746. }
  3747. nextNode = nextSibling(node);
  3748. }
  3749. break;
  3750. case Comment:
  3751. if (isTemplateNode(node)) {
  3752. nextNode = nextSibling(node);
  3753. replaceNode(
  3754. vnode.el = node.content.firstChild,
  3755. node,
  3756. parentComponent
  3757. );
  3758. } else if (domType !== 8 || isFragmentStart) {
  3759. nextNode = onMismatch();
  3760. } else {
  3761. nextNode = nextSibling(node);
  3762. }
  3763. break;
  3764. case Static:
  3765. if (isFragmentStart) {
  3766. node = nextSibling(node);
  3767. domType = node.nodeType;
  3768. }
  3769. if (domType === 1 || domType === 3) {
  3770. nextNode = node;
  3771. const needToAdoptContent = !vnode.children.length;
  3772. for (let i = 0; i < vnode.staticCount; i++) {
  3773. if (needToAdoptContent)
  3774. vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  3775. if (i === vnode.staticCount - 1) {
  3776. vnode.anchor = nextNode;
  3777. }
  3778. nextNode = nextSibling(nextNode);
  3779. }
  3780. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  3781. } else {
  3782. onMismatch();
  3783. }
  3784. break;
  3785. case Fragment:
  3786. if (!isFragmentStart) {
  3787. nextNode = onMismatch();
  3788. } else {
  3789. nextNode = hydrateFragment(
  3790. node,
  3791. vnode,
  3792. parentComponent,
  3793. parentSuspense,
  3794. slotScopeIds,
  3795. optimized
  3796. );
  3797. }
  3798. break;
  3799. default:
  3800. if (shapeFlag & 1) {
  3801. if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
  3802. nextNode = onMismatch();
  3803. } else {
  3804. nextNode = hydrateElement(
  3805. node,
  3806. vnode,
  3807. parentComponent,
  3808. parentSuspense,
  3809. slotScopeIds,
  3810. optimized
  3811. );
  3812. }
  3813. } else if (shapeFlag & 6) {
  3814. vnode.slotScopeIds = slotScopeIds;
  3815. const container = parentNode(node);
  3816. if (isFragmentStart) {
  3817. nextNode = locateClosingAnchor(node);
  3818. } else if (isComment(node) && node.data === "teleport start") {
  3819. nextNode = locateClosingAnchor(node, node.data, "teleport end");
  3820. } else {
  3821. nextNode = nextSibling(node);
  3822. }
  3823. mountComponent(
  3824. vnode,
  3825. container,
  3826. null,
  3827. parentComponent,
  3828. parentSuspense,
  3829. getContainerType(container),
  3830. optimized
  3831. );
  3832. if (isAsyncWrapper(vnode)) {
  3833. let subTree;
  3834. if (isFragmentStart) {
  3835. subTree = createVNode(Fragment);
  3836. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  3837. } else {
  3838. subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  3839. }
  3840. subTree.el = node;
  3841. vnode.component.subTree = subTree;
  3842. }
  3843. } else if (shapeFlag & 64) {
  3844. if (domType !== 8) {
  3845. nextNode = onMismatch();
  3846. } else {
  3847. nextNode = vnode.type.hydrate(
  3848. node,
  3849. vnode,
  3850. parentComponent,
  3851. parentSuspense,
  3852. slotScopeIds,
  3853. optimized,
  3854. rendererInternals,
  3855. hydrateChildren
  3856. );
  3857. }
  3858. } else if (shapeFlag & 128) {
  3859. nextNode = vnode.type.hydrate(
  3860. node,
  3861. vnode,
  3862. parentComponent,
  3863. parentSuspense,
  3864. getContainerType(parentNode(node)),
  3865. slotScopeIds,
  3866. optimized,
  3867. rendererInternals,
  3868. hydrateNode
  3869. );
  3870. } else if (true) {
  3871. warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
  3872. }
  3873. }
  3874. if (ref2 != null) {
  3875. setRef(ref2, null, parentSuspense, vnode);
  3876. }
  3877. return nextNode;
  3878. };
  3879. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  3880. optimized = optimized || !!vnode.dynamicChildren;
  3881. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  3882. const forcePatch = type === "input" || type === "option";
  3883. if (true) {
  3884. if (dirs) {
  3885. invokeDirectiveHook(vnode, null, parentComponent, "created");
  3886. }
  3887. let needCallTransitionHooks = false;
  3888. if (isTemplateNode(el)) {
  3889. needCallTransitionHooks = needTransition(
  3890. null,
  3891. // no need check parentSuspense in hydration
  3892. transition
  3893. ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  3894. const content = el.content.firstChild;
  3895. if (needCallTransitionHooks) {
  3896. transition.beforeEnter(content);
  3897. }
  3898. replaceNode(content, el, parentComponent);
  3899. vnode.el = el = content;
  3900. }
  3901. if (shapeFlag & 16 && // skip if element has innerHTML / textContent
  3902. !(props && (props.innerHTML || props.textContent))) {
  3903. let next = hydrateChildren(
  3904. el.firstChild,
  3905. vnode,
  3906. el,
  3907. parentComponent,
  3908. parentSuspense,
  3909. slotScopeIds,
  3910. optimized
  3911. );
  3912. let hasWarned2 = false;
  3913. while (next) {
  3914. if (!isMismatchAllowed(
  3915. el,
  3916. 1
  3917. /* CHILDREN */
  3918. )) {
  3919. if (!hasWarned2) {
  3920. warn$1(
  3921. `Hydration children mismatch on`,
  3922. el,
  3923. `
  3924. Server rendered element contains more child nodes than client vdom.`
  3925. );
  3926. hasWarned2 = true;
  3927. }
  3928. logMismatchError();
  3929. }
  3930. const cur = next;
  3931. next = next.nextSibling;
  3932. remove2(cur);
  3933. }
  3934. } else if (shapeFlag & 8) {
  3935. let clientText = vnode.children;
  3936. if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
  3937. clientText = clientText.slice(1);
  3938. }
  3939. if (el.textContent !== clientText) {
  3940. if (!isMismatchAllowed(
  3941. el,
  3942. 0
  3943. /* TEXT */
  3944. )) {
  3945. warn$1(
  3946. `Hydration text content mismatch on`,
  3947. el,
  3948. `
  3949. - rendered on server: ${el.textContent}
  3950. - expected on client: ${vnode.children}`
  3951. );
  3952. logMismatchError();
  3953. }
  3954. el.textContent = vnode.children;
  3955. }
  3956. }
  3957. if (props) {
  3958. if (true) {
  3959. const isCustomElement = el.tagName.includes("-");
  3960. for (const key in props) {
  3961. if (// #11189 skip if this node has directives that have created hooks
  3962. // as it could have mutated the DOM in any possible way
  3963. !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
  3964. logMismatchError();
  3965. }
  3966. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
  3967. key[0] === "." || isCustomElement) {
  3968. patchProp2(el, key, null, props[key], void 0, parentComponent);
  3969. }
  3970. }
  3971. } else if (props.onClick) {
  3972. patchProp2(
  3973. el,
  3974. "onClick",
  3975. null,
  3976. props.onClick,
  3977. void 0,
  3978. parentComponent
  3979. );
  3980. } else if (patchFlag & 4 && isReactive(props.style)) {
  3981. for (const key in props.style) props.style[key];
  3982. }
  3983. }
  3984. let vnodeHooks;
  3985. if (vnodeHooks = props && props.onVnodeBeforeMount) {
  3986. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  3987. }
  3988. if (dirs) {
  3989. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  3990. }
  3991. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
  3992. queueEffectWithSuspense(() => {
  3993. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  3994. needCallTransitionHooks && transition.enter(el);
  3995. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  3996. }, parentSuspense);
  3997. }
  3998. }
  3999. return el.nextSibling;
  4000. };
  4001. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  4002. optimized = optimized || !!parentVNode.dynamicChildren;
  4003. const children = parentVNode.children;
  4004. const l = children.length;
  4005. let hasWarned2 = false;
  4006. for (let i = 0; i < l; i++) {
  4007. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  4008. const isText = vnode.type === Text;
  4009. if (node) {
  4010. if (isText && !optimized) {
  4011. if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
  4012. insert(
  4013. createText(
  4014. node.data.slice(vnode.children.length)
  4015. ),
  4016. container,
  4017. nextSibling(node)
  4018. );
  4019. node.data = vnode.children;
  4020. }
  4021. }
  4022. node = hydrateNode(
  4023. node,
  4024. vnode,
  4025. parentComponent,
  4026. parentSuspense,
  4027. slotScopeIds,
  4028. optimized
  4029. );
  4030. } else if (isText && !vnode.children) {
  4031. insert(vnode.el = createText(""), container);
  4032. } else {
  4033. if (!isMismatchAllowed(
  4034. container,
  4035. 1
  4036. /* CHILDREN */
  4037. )) {
  4038. if (!hasWarned2) {
  4039. warn$1(
  4040. `Hydration children mismatch on`,
  4041. container,
  4042. `
  4043. Server rendered element contains fewer child nodes than client vdom.`
  4044. );
  4045. hasWarned2 = true;
  4046. }
  4047. logMismatchError();
  4048. }
  4049. patch(
  4050. null,
  4051. vnode,
  4052. container,
  4053. null,
  4054. parentComponent,
  4055. parentSuspense,
  4056. getContainerType(container),
  4057. slotScopeIds
  4058. );
  4059. }
  4060. }
  4061. return node;
  4062. };
  4063. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  4064. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  4065. if (fragmentSlotScopeIds) {
  4066. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  4067. }
  4068. const container = parentNode(node);
  4069. const next = hydrateChildren(
  4070. nextSibling(node),
  4071. vnode,
  4072. container,
  4073. parentComponent,
  4074. parentSuspense,
  4075. slotScopeIds,
  4076. optimized
  4077. );
  4078. if (next && isComment(next) && next.data === "]") {
  4079. return nextSibling(vnode.anchor = next);
  4080. } else {
  4081. logMismatchError();
  4082. insert(vnode.anchor = createComment(`]`), container, next);
  4083. return next;
  4084. }
  4085. };
  4086. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  4087. if (!isMismatchAllowed(
  4088. node.parentElement,
  4089. 1
  4090. /* CHILDREN */
  4091. )) {
  4092. warn$1(
  4093. `Hydration node mismatch:
  4094. - rendered on server:`,
  4095. node,
  4096. node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
  4097. `
  4098. - expected on client:`,
  4099. vnode.type
  4100. );
  4101. logMismatchError();
  4102. }
  4103. vnode.el = null;
  4104. if (isFragment) {
  4105. const end = locateClosingAnchor(node);
  4106. while (true) {
  4107. const next2 = nextSibling(node);
  4108. if (next2 && next2 !== end) {
  4109. remove2(next2);
  4110. } else {
  4111. break;
  4112. }
  4113. }
  4114. }
  4115. const next = nextSibling(node);
  4116. const container = parentNode(node);
  4117. remove2(node);
  4118. patch(
  4119. null,
  4120. vnode,
  4121. container,
  4122. next,
  4123. parentComponent,
  4124. parentSuspense,
  4125. getContainerType(container),
  4126. slotScopeIds
  4127. );
  4128. return next;
  4129. };
  4130. const locateClosingAnchor = (node, open = "[", close = "]") => {
  4131. let match = 0;
  4132. while (node) {
  4133. node = nextSibling(node);
  4134. if (node && isComment(node)) {
  4135. if (node.data === open) match++;
  4136. if (node.data === close) {
  4137. if (match === 0) {
  4138. return nextSibling(node);
  4139. } else {
  4140. match--;
  4141. }
  4142. }
  4143. }
  4144. }
  4145. return node;
  4146. };
  4147. const replaceNode = (newNode, oldNode, parentComponent) => {
  4148. const parentNode2 = oldNode.parentNode;
  4149. if (parentNode2) {
  4150. parentNode2.replaceChild(newNode, oldNode);
  4151. }
  4152. let parent = parentComponent;
  4153. while (parent) {
  4154. if (parent.vnode.el === oldNode) {
  4155. parent.vnode.el = parent.subTree.el = newNode;
  4156. }
  4157. parent = parent.parent;
  4158. }
  4159. };
  4160. const isTemplateNode = (node) => {
  4161. return node.nodeType === 1 && node.tagName === "TEMPLATE";
  4162. };
  4163. return [hydrate2, hydrateNode];
  4164. }
  4165. function propHasMismatch(el, key, clientValue, vnode, instance) {
  4166. let mismatchType;
  4167. let mismatchKey;
  4168. let actual;
  4169. let expected;
  4170. if (key === "class") {
  4171. actual = el.getAttribute("class");
  4172. expected = normalizeClass(clientValue);
  4173. if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
  4174. mismatchType = 2;
  4175. mismatchKey = `class`;
  4176. }
  4177. } else if (key === "style") {
  4178. actual = el.getAttribute("style") || "";
  4179. expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
  4180. const actualMap = toStyleMap(actual);
  4181. const expectedMap = toStyleMap(expected);
  4182. if (vnode.dirs) {
  4183. for (const { dir, value } of vnode.dirs) {
  4184. if (dir.name === "show" && !value) {
  4185. expectedMap.set("display", "none");
  4186. }
  4187. }
  4188. }
  4189. if (instance) {
  4190. resolveCssVars(instance, vnode, expectedMap);
  4191. }
  4192. if (!isMapEqual(actualMap, expectedMap)) {
  4193. mismatchType = 3;
  4194. mismatchKey = "style";
  4195. }
  4196. } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
  4197. if (isBooleanAttr(key)) {
  4198. actual = el.hasAttribute(key);
  4199. expected = includeBooleanAttr(clientValue);
  4200. } else if (clientValue == null) {
  4201. actual = el.hasAttribute(key);
  4202. expected = false;
  4203. } else {
  4204. if (el.hasAttribute(key)) {
  4205. actual = el.getAttribute(key);
  4206. } else if (key === "value" && el.tagName === "TEXTAREA") {
  4207. actual = el.value;
  4208. } else {
  4209. actual = false;
  4210. }
  4211. expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
  4212. }
  4213. if (actual !== expected) {
  4214. mismatchType = 4;
  4215. mismatchKey = key;
  4216. }
  4217. }
  4218. if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
  4219. const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
  4220. const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;
  4221. const postSegment = `
  4222. - rendered on server: ${format(actual)}
  4223. - expected on client: ${format(expected)}
  4224. Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  4225. You should fix the source of the mismatch.`;
  4226. {
  4227. warn$1(preSegment, el, postSegment);
  4228. }
  4229. return true;
  4230. }
  4231. return false;
  4232. }
  4233. function toClassSet(str) {
  4234. return new Set(str.trim().split(/\s+/));
  4235. }
  4236. function isSetEqual(a, b) {
  4237. if (a.size !== b.size) {
  4238. return false;
  4239. }
  4240. for (const s of a) {
  4241. if (!b.has(s)) {
  4242. return false;
  4243. }
  4244. }
  4245. return true;
  4246. }
  4247. function toStyleMap(str) {
  4248. const styleMap = /* @__PURE__ */ new Map();
  4249. for (const item of str.split(";")) {
  4250. let [key, value] = item.split(":");
  4251. key = key.trim();
  4252. value = value && value.trim();
  4253. if (key && value) {
  4254. styleMap.set(key, value);
  4255. }
  4256. }
  4257. return styleMap;
  4258. }
  4259. function isMapEqual(a, b) {
  4260. if (a.size !== b.size) {
  4261. return false;
  4262. }
  4263. for (const [key, value] of a) {
  4264. if (value !== b.get(key)) {
  4265. return false;
  4266. }
  4267. }
  4268. return true;
  4269. }
  4270. function resolveCssVars(instance, vnode, expectedMap) {
  4271. const root = instance.subTree;
  4272. if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
  4273. const cssVars = instance.getCssVars();
  4274. for (const key in cssVars) {
  4275. expectedMap.set(
  4276. `--${getEscapedCssVarName(key, false)}`,
  4277. String(cssVars[key])
  4278. );
  4279. }
  4280. }
  4281. if (vnode === root && instance.parent) {
  4282. resolveCssVars(instance.parent, instance.vnode, expectedMap);
  4283. }
  4284. }
  4285. var allowMismatchAttr = "data-allow-mismatch";
  4286. var MismatchTypeString = {
  4287. [
  4288. 0
  4289. /* TEXT */
  4290. ]: "text",
  4291. [
  4292. 1
  4293. /* CHILDREN */
  4294. ]: "children",
  4295. [
  4296. 2
  4297. /* CLASS */
  4298. ]: "class",
  4299. [
  4300. 3
  4301. /* STYLE */
  4302. ]: "style",
  4303. [
  4304. 4
  4305. /* ATTRIBUTE */
  4306. ]: "attribute"
  4307. };
  4308. function isMismatchAllowed(el, allowedType) {
  4309. if (allowedType === 0 || allowedType === 1) {
  4310. while (el && !el.hasAttribute(allowMismatchAttr)) {
  4311. el = el.parentElement;
  4312. }
  4313. }
  4314. const allowedAttr = el && el.getAttribute(allowMismatchAttr);
  4315. if (allowedAttr == null) {
  4316. return false;
  4317. } else if (allowedAttr === "") {
  4318. return true;
  4319. } else {
  4320. const list = allowedAttr.split(",");
  4321. if (allowedType === 0 && list.includes("children")) {
  4322. return true;
  4323. }
  4324. return allowedAttr.split(",").includes(MismatchTypeString[allowedType]);
  4325. }
  4326. }
  4327. var requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
  4328. var cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
  4329. var hydrateOnIdle = (timeout = 1e4) => (hydrate2) => {
  4330. const id = requestIdleCallback(hydrate2, { timeout });
  4331. return () => cancelIdleCallback(id);
  4332. };
  4333. function elementIsVisibleInViewport(el) {
  4334. const { top, left, bottom, right } = el.getBoundingClientRect();
  4335. const { innerHeight, innerWidth } = window;
  4336. return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
  4337. }
  4338. var hydrateOnVisible = (opts) => (hydrate2, forEach) => {
  4339. const ob = new IntersectionObserver((entries) => {
  4340. for (const e of entries) {
  4341. if (!e.isIntersecting) continue;
  4342. ob.disconnect();
  4343. hydrate2();
  4344. break;
  4345. }
  4346. }, opts);
  4347. forEach((el) => {
  4348. if (!(el instanceof Element)) return;
  4349. if (elementIsVisibleInViewport(el)) {
  4350. hydrate2();
  4351. ob.disconnect();
  4352. return false;
  4353. }
  4354. ob.observe(el);
  4355. });
  4356. return () => ob.disconnect();
  4357. };
  4358. var hydrateOnMediaQuery = (query) => (hydrate2) => {
  4359. if (query) {
  4360. const mql = matchMedia(query);
  4361. if (mql.matches) {
  4362. hydrate2();
  4363. } else {
  4364. mql.addEventListener("change", hydrate2, { once: true });
  4365. return () => mql.removeEventListener("change", hydrate2);
  4366. }
  4367. }
  4368. };
  4369. var hydrateOnInteraction = (interactions = []) => (hydrate2, forEach) => {
  4370. if (isString(interactions)) interactions = [interactions];
  4371. let hasHydrated = false;
  4372. const doHydrate = (e) => {
  4373. if (!hasHydrated) {
  4374. hasHydrated = true;
  4375. teardown();
  4376. hydrate2();
  4377. e.target.dispatchEvent(new e.constructor(e.type, e));
  4378. }
  4379. };
  4380. const teardown = () => {
  4381. forEach((el) => {
  4382. for (const i of interactions) {
  4383. el.removeEventListener(i, doHydrate);
  4384. }
  4385. });
  4386. };
  4387. forEach((el) => {
  4388. for (const i of interactions) {
  4389. el.addEventListener(i, doHydrate, { once: true });
  4390. }
  4391. });
  4392. return teardown;
  4393. };
  4394. function forEachElement(node, cb) {
  4395. if (isComment(node) && node.data === "[") {
  4396. let depth = 1;
  4397. let next = node.nextSibling;
  4398. while (next) {
  4399. if (next.nodeType === 1) {
  4400. const result = cb(next);
  4401. if (result === false) {
  4402. break;
  4403. }
  4404. } else if (isComment(next)) {
  4405. if (next.data === "]") {
  4406. if (--depth === 0) break;
  4407. } else if (next.data === "[") {
  4408. depth++;
  4409. }
  4410. }
  4411. next = next.nextSibling;
  4412. }
  4413. } else {
  4414. cb(node);
  4415. }
  4416. }
  4417. var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  4418. function defineAsyncComponent(source) {
  4419. if (isFunction(source)) {
  4420. source = { loader: source };
  4421. }
  4422. const {
  4423. loader,
  4424. loadingComponent,
  4425. errorComponent,
  4426. delay = 200,
  4427. hydrate: hydrateStrategy,
  4428. timeout,
  4429. // undefined = never times out
  4430. suspensible = true,
  4431. onError: userOnError
  4432. } = source;
  4433. let pendingRequest = null;
  4434. let resolvedComp;
  4435. let retries = 0;
  4436. const retry = () => {
  4437. retries++;
  4438. pendingRequest = null;
  4439. return load();
  4440. };
  4441. const load = () => {
  4442. let thisRequest;
  4443. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  4444. err = err instanceof Error ? err : new Error(String(err));
  4445. if (userOnError) {
  4446. return new Promise((resolve2, reject) => {
  4447. const userRetry = () => resolve2(retry());
  4448. const userFail = () => reject(err);
  4449. userOnError(err, userRetry, userFail, retries + 1);
  4450. });
  4451. } else {
  4452. throw err;
  4453. }
  4454. }).then((comp) => {
  4455. if (thisRequest !== pendingRequest && pendingRequest) {
  4456. return pendingRequest;
  4457. }
  4458. if (!comp) {
  4459. warn$1(
  4460. `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
  4461. );
  4462. }
  4463. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
  4464. comp = comp.default;
  4465. }
  4466. if (comp && !isObject(comp) && !isFunction(comp)) {
  4467. throw new Error(`Invalid async component load result: ${comp}`);
  4468. }
  4469. resolvedComp = comp;
  4470. return comp;
  4471. }));
  4472. };
  4473. return defineComponent({
  4474. name: "AsyncComponentWrapper",
  4475. __asyncLoader: load,
  4476. __asyncHydrate(el, instance, hydrate2) {
  4477. const doHydrate = hydrateStrategy ? () => {
  4478. const teardown = hydrateStrategy(
  4479. hydrate2,
  4480. (cb) => forEachElement(el, cb)
  4481. );
  4482. if (teardown) {
  4483. (instance.bum || (instance.bum = [])).push(teardown);
  4484. }
  4485. } : hydrate2;
  4486. if (resolvedComp) {
  4487. doHydrate();
  4488. } else {
  4489. load().then(() => !instance.isUnmounted && doHydrate());
  4490. }
  4491. },
  4492. get __asyncResolved() {
  4493. return resolvedComp;
  4494. },
  4495. setup() {
  4496. const instance = currentInstance;
  4497. markAsyncBoundary(instance);
  4498. if (resolvedComp) {
  4499. return () => createInnerComp(resolvedComp, instance);
  4500. }
  4501. const onError = (err) => {
  4502. pendingRequest = null;
  4503. handleError(
  4504. err,
  4505. instance,
  4506. 13,
  4507. !errorComponent
  4508. );
  4509. };
  4510. if (suspensible && instance.suspense || isInSSRComponentSetup) {
  4511. return load().then((comp) => {
  4512. return () => createInnerComp(comp, instance);
  4513. }).catch((err) => {
  4514. onError(err);
  4515. return () => errorComponent ? createVNode(errorComponent, {
  4516. error: err
  4517. }) : null;
  4518. });
  4519. }
  4520. const loaded = ref(false);
  4521. const error = ref();
  4522. const delayed = ref(!!delay);
  4523. if (delay) {
  4524. setTimeout(() => {
  4525. delayed.value = false;
  4526. }, delay);
  4527. }
  4528. if (timeout != null) {
  4529. setTimeout(() => {
  4530. if (!loaded.value && !error.value) {
  4531. const err = new Error(
  4532. `Async component timed out after ${timeout}ms.`
  4533. );
  4534. onError(err);
  4535. error.value = err;
  4536. }
  4537. }, timeout);
  4538. }
  4539. load().then(() => {
  4540. loaded.value = true;
  4541. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  4542. instance.parent.update();
  4543. }
  4544. }).catch((err) => {
  4545. onError(err);
  4546. error.value = err;
  4547. });
  4548. return () => {
  4549. if (loaded.value && resolvedComp) {
  4550. return createInnerComp(resolvedComp, instance);
  4551. } else if (error.value && errorComponent) {
  4552. return createVNode(errorComponent, {
  4553. error: error.value
  4554. });
  4555. } else if (loadingComponent && !delayed.value) {
  4556. return createVNode(loadingComponent);
  4557. }
  4558. };
  4559. }
  4560. });
  4561. }
  4562. function createInnerComp(comp, parent) {
  4563. const { ref: ref2, props, children, ce } = parent.vnode;
  4564. const vnode = createVNode(comp, props, children);
  4565. vnode.ref = ref2;
  4566. vnode.ce = ce;
  4567. delete parent.vnode.ce;
  4568. return vnode;
  4569. }
  4570. var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  4571. var KeepAliveImpl = {
  4572. name: `KeepAlive`,
  4573. // Marker for special handling inside the renderer. We are not using a ===
  4574. // check directly on KeepAlive in the renderer, because importing it directly
  4575. // would prevent it from being tree-shaken.
  4576. __isKeepAlive: true,
  4577. props: {
  4578. include: [String, RegExp, Array],
  4579. exclude: [String, RegExp, Array],
  4580. max: [String, Number]
  4581. },
  4582. setup(props, { slots }) {
  4583. const instance = getCurrentInstance();
  4584. const sharedContext = instance.ctx;
  4585. if (!sharedContext.renderer) {
  4586. return () => {
  4587. const children = slots.default && slots.default();
  4588. return children && children.length === 1 ? children[0] : children;
  4589. };
  4590. }
  4591. const cache = /* @__PURE__ */ new Map();
  4592. const keys = /* @__PURE__ */ new Set();
  4593. let current = null;
  4594. if (true) {
  4595. instance.__v_cache = cache;
  4596. }
  4597. const parentSuspense = instance.suspense;
  4598. const {
  4599. renderer: {
  4600. p: patch,
  4601. m: move,
  4602. um: _unmount,
  4603. o: { createElement }
  4604. }
  4605. } = sharedContext;
  4606. const storageContainer = createElement("div");
  4607. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  4608. const instance2 = vnode.component;
  4609. move(vnode, container, anchor, 0, parentSuspense);
  4610. patch(
  4611. instance2.vnode,
  4612. vnode,
  4613. container,
  4614. anchor,
  4615. instance2,
  4616. parentSuspense,
  4617. namespace,
  4618. vnode.slotScopeIds,
  4619. optimized
  4620. );
  4621. queuePostRenderEffect(() => {
  4622. instance2.isDeactivated = false;
  4623. if (instance2.a) {
  4624. invokeArrayFns(instance2.a);
  4625. }
  4626. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  4627. if (vnodeHook) {
  4628. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4629. }
  4630. }, parentSuspense);
  4631. if (true) {
  4632. devtoolsComponentAdded(instance2);
  4633. }
  4634. };
  4635. sharedContext.deactivate = (vnode) => {
  4636. const instance2 = vnode.component;
  4637. invalidateMount(instance2.m);
  4638. invalidateMount(instance2.a);
  4639. move(vnode, storageContainer, null, 1, parentSuspense);
  4640. queuePostRenderEffect(() => {
  4641. if (instance2.da) {
  4642. invokeArrayFns(instance2.da);
  4643. }
  4644. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  4645. if (vnodeHook) {
  4646. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4647. }
  4648. instance2.isDeactivated = true;
  4649. }, parentSuspense);
  4650. if (true) {
  4651. devtoolsComponentAdded(instance2);
  4652. }
  4653. };
  4654. function unmount(vnode) {
  4655. resetShapeFlag(vnode);
  4656. _unmount(vnode, instance, parentSuspense, true);
  4657. }
  4658. function pruneCache(filter) {
  4659. cache.forEach((vnode, key) => {
  4660. const name = getComponentName(vnode.type);
  4661. if (name && !filter(name)) {
  4662. pruneCacheEntry(key);
  4663. }
  4664. });
  4665. }
  4666. function pruneCacheEntry(key) {
  4667. const cached = cache.get(key);
  4668. if (cached && (!current || !isSameVNodeType(cached, current))) {
  4669. unmount(cached);
  4670. } else if (current) {
  4671. resetShapeFlag(current);
  4672. }
  4673. cache.delete(key);
  4674. keys.delete(key);
  4675. }
  4676. watch2(
  4677. () => [props.include, props.exclude],
  4678. ([include, exclude]) => {
  4679. include && pruneCache((name) => matches(include, name));
  4680. exclude && pruneCache((name) => !matches(exclude, name));
  4681. },
  4682. // prune post-render after `current` has been updated
  4683. { flush: "post", deep: true }
  4684. );
  4685. let pendingCacheKey = null;
  4686. const cacheSubtree = () => {
  4687. if (pendingCacheKey != null) {
  4688. if (isSuspense(instance.subTree.type)) {
  4689. queuePostRenderEffect(() => {
  4690. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4691. }, instance.subTree.suspense);
  4692. } else {
  4693. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4694. }
  4695. }
  4696. };
  4697. onMounted(cacheSubtree);
  4698. onUpdated(cacheSubtree);
  4699. onBeforeUnmount(() => {
  4700. cache.forEach((cached) => {
  4701. const { subTree, suspense } = instance;
  4702. const vnode = getInnerChild(subTree);
  4703. if (cached.type === vnode.type && cached.key === vnode.key) {
  4704. resetShapeFlag(vnode);
  4705. const da = vnode.component.da;
  4706. da && queuePostRenderEffect(da, suspense);
  4707. return;
  4708. }
  4709. unmount(cached);
  4710. });
  4711. });
  4712. return () => {
  4713. pendingCacheKey = null;
  4714. if (!slots.default) {
  4715. return current = null;
  4716. }
  4717. const children = slots.default();
  4718. const rawVNode = children[0];
  4719. if (children.length > 1) {
  4720. if (true) {
  4721. warn$1(`KeepAlive should contain exactly one component child.`);
  4722. }
  4723. current = null;
  4724. return children;
  4725. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  4726. current = null;
  4727. return rawVNode;
  4728. }
  4729. let vnode = getInnerChild(rawVNode);
  4730. if (vnode.type === Comment) {
  4731. current = null;
  4732. return vnode;
  4733. }
  4734. const comp = vnode.type;
  4735. const name = getComponentName(
  4736. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  4737. );
  4738. const { include, exclude, max } = props;
  4739. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  4740. vnode.shapeFlag &= ~256;
  4741. current = vnode;
  4742. return rawVNode;
  4743. }
  4744. const key = vnode.key == null ? comp : vnode.key;
  4745. const cachedVNode = cache.get(key);
  4746. if (vnode.el) {
  4747. vnode = cloneVNode(vnode);
  4748. if (rawVNode.shapeFlag & 128) {
  4749. rawVNode.ssContent = vnode;
  4750. }
  4751. }
  4752. pendingCacheKey = key;
  4753. if (cachedVNode) {
  4754. vnode.el = cachedVNode.el;
  4755. vnode.component = cachedVNode.component;
  4756. if (vnode.transition) {
  4757. setTransitionHooks(vnode, vnode.transition);
  4758. }
  4759. vnode.shapeFlag |= 512;
  4760. keys.delete(key);
  4761. keys.add(key);
  4762. } else {
  4763. keys.add(key);
  4764. if (max && keys.size > parseInt(max, 10)) {
  4765. pruneCacheEntry(keys.values().next().value);
  4766. }
  4767. }
  4768. vnode.shapeFlag |= 256;
  4769. current = vnode;
  4770. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  4771. };
  4772. }
  4773. };
  4774. var KeepAlive = KeepAliveImpl;
  4775. function matches(pattern, name) {
  4776. if (isArray(pattern)) {
  4777. return pattern.some((p2) => matches(p2, name));
  4778. } else if (isString(pattern)) {
  4779. return pattern.split(",").includes(name);
  4780. } else if (isRegExp(pattern)) {
  4781. pattern.lastIndex = 0;
  4782. return pattern.test(name);
  4783. }
  4784. return false;
  4785. }
  4786. function onActivated(hook, target) {
  4787. registerKeepAliveHook(hook, "a", target);
  4788. }
  4789. function onDeactivated(hook, target) {
  4790. registerKeepAliveHook(hook, "da", target);
  4791. }
  4792. function registerKeepAliveHook(hook, type, target = currentInstance) {
  4793. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  4794. let current = target;
  4795. while (current) {
  4796. if (current.isDeactivated) {
  4797. return;
  4798. }
  4799. current = current.parent;
  4800. }
  4801. return hook();
  4802. });
  4803. injectHook(type, wrappedHook, target);
  4804. if (target) {
  4805. let current = target.parent;
  4806. while (current && current.parent) {
  4807. if (isKeepAlive(current.parent.vnode)) {
  4808. injectToKeepAliveRoot(wrappedHook, type, target, current);
  4809. }
  4810. current = current.parent;
  4811. }
  4812. }
  4813. }
  4814. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  4815. const injected = injectHook(
  4816. type,
  4817. hook,
  4818. keepAliveRoot,
  4819. true
  4820. /* prepend */
  4821. );
  4822. onUnmounted(() => {
  4823. remove(keepAliveRoot[type], injected);
  4824. }, target);
  4825. }
  4826. function resetShapeFlag(vnode) {
  4827. vnode.shapeFlag &= ~256;
  4828. vnode.shapeFlag &= ~512;
  4829. }
  4830. function getInnerChild(vnode) {
  4831. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  4832. }
  4833. function injectHook(type, hook, target = currentInstance, prepend = false) {
  4834. if (target) {
  4835. const hooks = target[type] || (target[type] = []);
  4836. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  4837. pauseTracking();
  4838. const reset = setCurrentInstance(target);
  4839. const res = callWithAsyncErrorHandling(hook, target, type, args);
  4840. reset();
  4841. resetTracking();
  4842. return res;
  4843. });
  4844. if (prepend) {
  4845. hooks.unshift(wrappedHook);
  4846. } else {
  4847. hooks.push(wrappedHook);
  4848. }
  4849. return wrappedHook;
  4850. } else if (true) {
  4851. const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
  4852. warn$1(
  4853. `${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(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
  4854. );
  4855. }
  4856. }
  4857. var createHook = (lifecycle) => (hook, target = currentInstance) => {
  4858. if (!isInSSRComponentSetup || lifecycle === "sp") {
  4859. injectHook(lifecycle, (...args) => hook(...args), target);
  4860. }
  4861. };
  4862. var onBeforeMount = createHook("bm");
  4863. var onMounted = createHook("m");
  4864. var onBeforeUpdate = createHook(
  4865. "bu"
  4866. );
  4867. var onUpdated = createHook("u");
  4868. var onBeforeUnmount = createHook(
  4869. "bum"
  4870. );
  4871. var onUnmounted = createHook("um");
  4872. var onServerPrefetch = createHook(
  4873. "sp"
  4874. );
  4875. var onRenderTriggered = createHook("rtg");
  4876. var onRenderTracked = createHook("rtc");
  4877. function onErrorCaptured(hook, target = currentInstance) {
  4878. injectHook("ec", hook, target);
  4879. }
  4880. var COMPONENTS = "components";
  4881. var DIRECTIVES = "directives";
  4882. function resolveComponent(name, maybeSelfReference) {
  4883. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  4884. }
  4885. var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  4886. function resolveDynamicComponent(component) {
  4887. if (isString(component)) {
  4888. return resolveAsset(COMPONENTS, component, false) || component;
  4889. } else {
  4890. return component || NULL_DYNAMIC_COMPONENT;
  4891. }
  4892. }
  4893. function resolveDirective(name) {
  4894. return resolveAsset(DIRECTIVES, name);
  4895. }
  4896. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  4897. const instance = currentRenderingInstance || currentInstance;
  4898. if (instance) {
  4899. const Component = instance.type;
  4900. if (type === COMPONENTS) {
  4901. const selfName = getComponentName(
  4902. Component,
  4903. false
  4904. );
  4905. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  4906. return Component;
  4907. }
  4908. }
  4909. const res = (
  4910. // local registration
  4911. // check instance[type] first which is resolved for options API
  4912. resolve(instance[type] || Component[type], name) || // global registration
  4913. resolve(instance.appContext[type], name)
  4914. );
  4915. if (!res && maybeSelfReference) {
  4916. return Component;
  4917. }
  4918. if (warnMissing && !res) {
  4919. const extra = type === COMPONENTS ? `
  4920. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  4921. warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  4922. }
  4923. return res;
  4924. } else if (true) {
  4925. warn$1(
  4926. `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
  4927. );
  4928. }
  4929. }
  4930. function resolve(registry, name) {
  4931. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  4932. }
  4933. function renderList(source, renderItem, cache, index) {
  4934. let ret;
  4935. const cached = cache && cache[index];
  4936. const sourceIsArray = isArray(source);
  4937. if (sourceIsArray || isString(source)) {
  4938. const sourceIsReactiveArray = sourceIsArray && isReactive(source);
  4939. let needsWrap = false;
  4940. if (sourceIsReactiveArray) {
  4941. needsWrap = !isShallow(source);
  4942. source = shallowReadArray(source);
  4943. }
  4944. ret = new Array(source.length);
  4945. for (let i = 0, l = source.length; i < l; i++) {
  4946. ret[i] = renderItem(
  4947. needsWrap ? toReactive(source[i]) : source[i],
  4948. i,
  4949. void 0,
  4950. cached && cached[i]
  4951. );
  4952. }
  4953. } else if (typeof source === "number") {
  4954. if (!Number.isInteger(source)) {
  4955. warn$1(`The v-for range expect an integer value but got ${source}.`);
  4956. }
  4957. ret = new Array(source);
  4958. for (let i = 0; i < source; i++) {
  4959. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  4960. }
  4961. } else if (isObject(source)) {
  4962. if (source[Symbol.iterator]) {
  4963. ret = Array.from(
  4964. source,
  4965. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  4966. );
  4967. } else {
  4968. const keys = Object.keys(source);
  4969. ret = new Array(keys.length);
  4970. for (let i = 0, l = keys.length; i < l; i++) {
  4971. const key = keys[i];
  4972. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  4973. }
  4974. }
  4975. } else {
  4976. ret = [];
  4977. }
  4978. if (cache) {
  4979. cache[index] = ret;
  4980. }
  4981. return ret;
  4982. }
  4983. function createSlots(slots, dynamicSlots) {
  4984. for (let i = 0; i < dynamicSlots.length; i++) {
  4985. const slot = dynamicSlots[i];
  4986. if (isArray(slot)) {
  4987. for (let j = 0; j < slot.length; j++) {
  4988. slots[slot[j].name] = slot[j].fn;
  4989. }
  4990. } else if (slot) {
  4991. slots[slot.name] = slot.key ? (...args) => {
  4992. const res = slot.fn(...args);
  4993. if (res) res.key = slot.key;
  4994. return res;
  4995. } : slot.fn;
  4996. }
  4997. }
  4998. return slots;
  4999. }
  5000. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  5001. if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
  5002. if (name !== "default") props.name = name;
  5003. return openBlock(), createBlock(
  5004. Fragment,
  5005. null,
  5006. [createVNode("slot", props, fallback && fallback())],
  5007. 64
  5008. );
  5009. }
  5010. let slot = slots[name];
  5011. if (slot && slot.length > 1) {
  5012. warn$1(
  5013. `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
  5014. );
  5015. slot = () => [];
  5016. }
  5017. if (slot && slot._c) {
  5018. slot._d = false;
  5019. }
  5020. openBlock();
  5021. const validSlotContent = slot && ensureValidVNode(slot(props));
  5022. const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
  5023. // key attached in the `createSlots` helper, respect that
  5024. validSlotContent && validSlotContent.key;
  5025. const rendered = createBlock(
  5026. Fragment,
  5027. {
  5028. key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
  5029. (!validSlotContent && fallback ? "_fb" : "")
  5030. },
  5031. validSlotContent || (fallback ? fallback() : []),
  5032. validSlotContent && slots._ === 1 ? 64 : -2
  5033. );
  5034. if (!noSlotted && rendered.scopeId) {
  5035. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  5036. }
  5037. if (slot && slot._c) {
  5038. slot._d = true;
  5039. }
  5040. return rendered;
  5041. }
  5042. function ensureValidVNode(vnodes) {
  5043. return vnodes.some((child) => {
  5044. if (!isVNode(child)) return true;
  5045. if (child.type === Comment) return false;
  5046. if (child.type === Fragment && !ensureValidVNode(child.children))
  5047. return false;
  5048. return true;
  5049. }) ? vnodes : null;
  5050. }
  5051. function toHandlers(obj, preserveCaseIfNecessary) {
  5052. const ret = {};
  5053. if (!isObject(obj)) {
  5054. warn$1(`v-on with no argument expects an object value.`);
  5055. return ret;
  5056. }
  5057. for (const key in obj) {
  5058. ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  5059. }
  5060. return ret;
  5061. }
  5062. var getPublicInstance = (i) => {
  5063. if (!i) return null;
  5064. if (isStatefulComponent(i)) return getComponentPublicInstance(i);
  5065. return getPublicInstance(i.parent);
  5066. };
  5067. var publicPropertiesMap = (
  5068. // Move PURE marker to new line to workaround compiler discarding it
  5069. // due to type annotation
  5070. extend(/* @__PURE__ */ Object.create(null), {
  5071. $: (i) => i,
  5072. $el: (i) => i.vnode.el,
  5073. $data: (i) => i.data,
  5074. $props: (i) => true ? shallowReadonly(i.props) : i.props,
  5075. $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
  5076. $slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
  5077. $refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
  5078. $parent: (i) => getPublicInstance(i.parent),
  5079. $root: (i) => getPublicInstance(i.root),
  5080. $host: (i) => i.ce,
  5081. $emit: (i) => i.emit,
  5082. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  5083. $forceUpdate: (i) => i.f || (i.f = () => {
  5084. queueJob(i.update);
  5085. }),
  5086. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  5087. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  5088. })
  5089. );
  5090. var isReservedPrefix = (key) => key === "_" || key === "$";
  5091. var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  5092. var PublicInstanceProxyHandlers = {
  5093. get({ _: instance }, key) {
  5094. if (key === "__v_skip") {
  5095. return true;
  5096. }
  5097. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  5098. if (key === "__isVue") {
  5099. return true;
  5100. }
  5101. let normalizedProps;
  5102. if (key[0] !== "$") {
  5103. const n = accessCache[key];
  5104. if (n !== void 0) {
  5105. switch (n) {
  5106. case 1:
  5107. return setupState[key];
  5108. case 2:
  5109. return data[key];
  5110. case 4:
  5111. return ctx[key];
  5112. case 3:
  5113. return props[key];
  5114. }
  5115. } else if (hasSetupBinding(setupState, key)) {
  5116. accessCache[key] = 1;
  5117. return setupState[key];
  5118. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  5119. accessCache[key] = 2;
  5120. return data[key];
  5121. } else if (
  5122. // only cache other properties when instance has declared (thus stable)
  5123. // props
  5124. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  5125. ) {
  5126. accessCache[key] = 3;
  5127. return props[key];
  5128. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  5129. accessCache[key] = 4;
  5130. return ctx[key];
  5131. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
  5132. accessCache[key] = 0;
  5133. }
  5134. }
  5135. const publicGetter = publicPropertiesMap[key];
  5136. let cssModule, globalProperties;
  5137. if (publicGetter) {
  5138. if (key === "$attrs") {
  5139. track(instance.attrs, "get", "");
  5140. markAttrsAccessed();
  5141. } else if (key === "$slots") {
  5142. track(instance, "get", key);
  5143. }
  5144. return publicGetter(instance);
  5145. } else if (
  5146. // css module (injected by vue-loader)
  5147. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  5148. ) {
  5149. return cssModule;
  5150. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  5151. accessCache[key] = 4;
  5152. return ctx[key];
  5153. } else if (
  5154. // global properties
  5155. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  5156. ) {
  5157. {
  5158. return globalProperties[key];
  5159. }
  5160. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  5161. // to infinite warning loop
  5162. key.indexOf("__v") !== 0)) {
  5163. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  5164. warn$1(
  5165. `Property ${JSON.stringify(
  5166. key
  5167. )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
  5168. );
  5169. } else if (instance === currentRenderingInstance) {
  5170. warn$1(
  5171. `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
  5172. );
  5173. }
  5174. }
  5175. },
  5176. set({ _: instance }, key, value) {
  5177. const { data, setupState, ctx } = instance;
  5178. if (hasSetupBinding(setupState, key)) {
  5179. setupState[key] = value;
  5180. return true;
  5181. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  5182. warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  5183. return false;
  5184. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  5185. data[key] = value;
  5186. return true;
  5187. } else if (hasOwn(instance.props, key)) {
  5188. warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
  5189. return false;
  5190. }
  5191. if (key[0] === "$" && key.slice(1) in instance) {
  5192. warn$1(
  5193. `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
  5194. );
  5195. return false;
  5196. } else {
  5197. if (key in instance.appContext.config.globalProperties) {
  5198. Object.defineProperty(ctx, key, {
  5199. enumerable: true,
  5200. configurable: true,
  5201. value
  5202. });
  5203. } else {
  5204. ctx[key] = value;
  5205. }
  5206. }
  5207. return true;
  5208. },
  5209. has({
  5210. _: { data, setupState, accessCache, ctx, appContext, propsOptions }
  5211. }, key) {
  5212. let normalizedProps;
  5213. 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);
  5214. },
  5215. defineProperty(target, key, descriptor) {
  5216. if (descriptor.get != null) {
  5217. target._.accessCache[key] = 0;
  5218. } else if (hasOwn(descriptor, "value")) {
  5219. this.set(target, key, descriptor.value, null);
  5220. }
  5221. return Reflect.defineProperty(target, key, descriptor);
  5222. }
  5223. };
  5224. if (true) {
  5225. PublicInstanceProxyHandlers.ownKeys = (target) => {
  5226. warn$1(
  5227. `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
  5228. );
  5229. return Reflect.ownKeys(target);
  5230. };
  5231. }
  5232. var RuntimeCompiledPublicInstanceProxyHandlers = extend({}, PublicInstanceProxyHandlers, {
  5233. get(target, key) {
  5234. if (key === Symbol.unscopables) {
  5235. return;
  5236. }
  5237. return PublicInstanceProxyHandlers.get(target, key, target);
  5238. },
  5239. has(_, key) {
  5240. const has = key[0] !== "_" && !isGloballyAllowed(key);
  5241. if (!has && PublicInstanceProxyHandlers.has(_, key)) {
  5242. warn$1(
  5243. `Property ${JSON.stringify(
  5244. key
  5245. )} should not start with _ which is a reserved prefix for Vue internals.`
  5246. );
  5247. }
  5248. return has;
  5249. }
  5250. });
  5251. function createDevRenderContext(instance) {
  5252. const target = {};
  5253. Object.defineProperty(target, `_`, {
  5254. configurable: true,
  5255. enumerable: false,
  5256. get: () => instance
  5257. });
  5258. Object.keys(publicPropertiesMap).forEach((key) => {
  5259. Object.defineProperty(target, key, {
  5260. configurable: true,
  5261. enumerable: false,
  5262. get: () => publicPropertiesMap[key](instance),
  5263. // intercepted by the proxy so no need for implementation,
  5264. // but needed to prevent set errors
  5265. set: NOOP
  5266. });
  5267. });
  5268. return target;
  5269. }
  5270. function exposePropsOnRenderContext(instance) {
  5271. const {
  5272. ctx,
  5273. propsOptions: [propsOptions]
  5274. } = instance;
  5275. if (propsOptions) {
  5276. Object.keys(propsOptions).forEach((key) => {
  5277. Object.defineProperty(ctx, key, {
  5278. enumerable: true,
  5279. configurable: true,
  5280. get: () => instance.props[key],
  5281. set: NOOP
  5282. });
  5283. });
  5284. }
  5285. }
  5286. function exposeSetupStateOnRenderContext(instance) {
  5287. const { ctx, setupState } = instance;
  5288. Object.keys(toRaw(setupState)).forEach((key) => {
  5289. if (!setupState.__isScriptSetup) {
  5290. if (isReservedPrefix(key[0])) {
  5291. warn$1(
  5292. `setup() return property ${JSON.stringify(
  5293. key
  5294. )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
  5295. );
  5296. return;
  5297. }
  5298. Object.defineProperty(ctx, key, {
  5299. enumerable: true,
  5300. configurable: true,
  5301. get: () => setupState[key],
  5302. set: NOOP
  5303. });
  5304. }
  5305. });
  5306. }
  5307. var warnRuntimeUsage = (method) => warn$1(
  5308. `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
  5309. );
  5310. function defineProps() {
  5311. if (true) {
  5312. warnRuntimeUsage(`defineProps`);
  5313. }
  5314. return null;
  5315. }
  5316. function defineEmits() {
  5317. if (true) {
  5318. warnRuntimeUsage(`defineEmits`);
  5319. }
  5320. return null;
  5321. }
  5322. function defineExpose(exposed) {
  5323. if (true) {
  5324. warnRuntimeUsage(`defineExpose`);
  5325. }
  5326. }
  5327. function defineOptions(options) {
  5328. if (true) {
  5329. warnRuntimeUsage(`defineOptions`);
  5330. }
  5331. }
  5332. function defineSlots() {
  5333. if (true) {
  5334. warnRuntimeUsage(`defineSlots`);
  5335. }
  5336. return null;
  5337. }
  5338. function defineModel() {
  5339. if (true) {
  5340. warnRuntimeUsage("defineModel");
  5341. }
  5342. }
  5343. function withDefaults(props, defaults) {
  5344. if (true) {
  5345. warnRuntimeUsage(`withDefaults`);
  5346. }
  5347. return null;
  5348. }
  5349. function useSlots() {
  5350. return getContext().slots;
  5351. }
  5352. function useAttrs() {
  5353. return getContext().attrs;
  5354. }
  5355. function getContext() {
  5356. const i = getCurrentInstance();
  5357. if (!i) {
  5358. warn$1(`useContext() called without active instance.`);
  5359. }
  5360. return i.setupContext || (i.setupContext = createSetupContext(i));
  5361. }
  5362. function normalizePropsOrEmits(props) {
  5363. return isArray(props) ? props.reduce(
  5364. (normalized, p2) => (normalized[p2] = null, normalized),
  5365. {}
  5366. ) : props;
  5367. }
  5368. function mergeDefaults(raw, defaults) {
  5369. const props = normalizePropsOrEmits(raw);
  5370. for (const key in defaults) {
  5371. if (key.startsWith("__skip")) continue;
  5372. let opt = props[key];
  5373. if (opt) {
  5374. if (isArray(opt) || isFunction(opt)) {
  5375. opt = props[key] = { type: opt, default: defaults[key] };
  5376. } else {
  5377. opt.default = defaults[key];
  5378. }
  5379. } else if (opt === null) {
  5380. opt = props[key] = { default: defaults[key] };
  5381. } else if (true) {
  5382. warn$1(`props default key "${key}" has no corresponding declaration.`);
  5383. }
  5384. if (opt && defaults[`__skip_${key}`]) {
  5385. opt.skipFactory = true;
  5386. }
  5387. }
  5388. return props;
  5389. }
  5390. function mergeModels(a, b) {
  5391. if (!a || !b) return a || b;
  5392. if (isArray(a) && isArray(b)) return a.concat(b);
  5393. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  5394. }
  5395. function createPropsRestProxy(props, excludedKeys) {
  5396. const ret = {};
  5397. for (const key in props) {
  5398. if (!excludedKeys.includes(key)) {
  5399. Object.defineProperty(ret, key, {
  5400. enumerable: true,
  5401. get: () => props[key]
  5402. });
  5403. }
  5404. }
  5405. return ret;
  5406. }
  5407. function withAsyncContext(getAwaitable) {
  5408. const ctx = getCurrentInstance();
  5409. if (!ctx) {
  5410. warn$1(
  5411. `withAsyncContext called without active current instance. This is likely a bug.`
  5412. );
  5413. }
  5414. let awaitable = getAwaitable();
  5415. unsetCurrentInstance();
  5416. if (isPromise(awaitable)) {
  5417. awaitable = awaitable.catch((e) => {
  5418. setCurrentInstance(ctx);
  5419. throw e;
  5420. });
  5421. }
  5422. return [awaitable, () => setCurrentInstance(ctx)];
  5423. }
  5424. function createDuplicateChecker() {
  5425. const cache = /* @__PURE__ */ Object.create(null);
  5426. return (type, key) => {
  5427. if (cache[key]) {
  5428. warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
  5429. } else {
  5430. cache[key] = type;
  5431. }
  5432. };
  5433. }
  5434. var shouldCacheAccess = true;
  5435. function applyOptions(instance) {
  5436. const options = resolveMergedOptions(instance);
  5437. const publicThis = instance.proxy;
  5438. const ctx = instance.ctx;
  5439. shouldCacheAccess = false;
  5440. if (options.beforeCreate) {
  5441. callHook(options.beforeCreate, instance, "bc");
  5442. }
  5443. const {
  5444. // state
  5445. data: dataOptions,
  5446. computed: computedOptions,
  5447. methods,
  5448. watch: watchOptions,
  5449. provide: provideOptions,
  5450. inject: injectOptions,
  5451. // lifecycle
  5452. created,
  5453. beforeMount,
  5454. mounted,
  5455. beforeUpdate,
  5456. updated,
  5457. activated,
  5458. deactivated,
  5459. beforeDestroy,
  5460. beforeUnmount,
  5461. destroyed,
  5462. unmounted,
  5463. render: render2,
  5464. renderTracked,
  5465. renderTriggered,
  5466. errorCaptured,
  5467. serverPrefetch,
  5468. // public API
  5469. expose,
  5470. inheritAttrs,
  5471. // assets
  5472. components,
  5473. directives,
  5474. filters
  5475. } = options;
  5476. const checkDuplicateProperties = true ? createDuplicateChecker() : null;
  5477. if (true) {
  5478. const [propsOptions] = instance.propsOptions;
  5479. if (propsOptions) {
  5480. for (const key in propsOptions) {
  5481. checkDuplicateProperties("Props", key);
  5482. }
  5483. }
  5484. }
  5485. if (injectOptions) {
  5486. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  5487. }
  5488. if (methods) {
  5489. for (const key in methods) {
  5490. const methodHandler = methods[key];
  5491. if (isFunction(methodHandler)) {
  5492. if (true) {
  5493. Object.defineProperty(ctx, key, {
  5494. value: methodHandler.bind(publicThis),
  5495. configurable: true,
  5496. enumerable: true,
  5497. writable: true
  5498. });
  5499. } else {
  5500. ctx[key] = methodHandler.bind(publicThis);
  5501. }
  5502. if (true) {
  5503. checkDuplicateProperties("Methods", key);
  5504. }
  5505. } else if (true) {
  5506. warn$1(
  5507. `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
  5508. );
  5509. }
  5510. }
  5511. }
  5512. if (dataOptions) {
  5513. if (!isFunction(dataOptions)) {
  5514. warn$1(
  5515. `The data option must be a function. Plain object usage is no longer supported.`
  5516. );
  5517. }
  5518. const data = dataOptions.call(publicThis, publicThis);
  5519. if (isPromise(data)) {
  5520. warn$1(
  5521. `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
  5522. );
  5523. }
  5524. if (!isObject(data)) {
  5525. warn$1(`data() should return an object.`);
  5526. } else {
  5527. instance.data = reactive(data);
  5528. if (true) {
  5529. for (const key in data) {
  5530. checkDuplicateProperties("Data", key);
  5531. if (!isReservedPrefix(key[0])) {
  5532. Object.defineProperty(ctx, key, {
  5533. configurable: true,
  5534. enumerable: true,
  5535. get: () => data[key],
  5536. set: NOOP
  5537. });
  5538. }
  5539. }
  5540. }
  5541. }
  5542. }
  5543. shouldCacheAccess = true;
  5544. if (computedOptions) {
  5545. for (const key in computedOptions) {
  5546. const opt = computedOptions[key];
  5547. const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  5548. if (get === NOOP) {
  5549. warn$1(`Computed property "${key}" has no getter.`);
  5550. }
  5551. const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : true ? () => {
  5552. warn$1(
  5553. `Write operation failed: computed property "${key}" is readonly.`
  5554. );
  5555. } : NOOP;
  5556. const c = computed2({
  5557. get,
  5558. set
  5559. });
  5560. Object.defineProperty(ctx, key, {
  5561. enumerable: true,
  5562. configurable: true,
  5563. get: () => c.value,
  5564. set: (v) => c.value = v
  5565. });
  5566. if (true) {
  5567. checkDuplicateProperties("Computed", key);
  5568. }
  5569. }
  5570. }
  5571. if (watchOptions) {
  5572. for (const key in watchOptions) {
  5573. createWatcher(watchOptions[key], ctx, publicThis, key);
  5574. }
  5575. }
  5576. if (provideOptions) {
  5577. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  5578. Reflect.ownKeys(provides).forEach((key) => {
  5579. provide(key, provides[key]);
  5580. });
  5581. }
  5582. if (created) {
  5583. callHook(created, instance, "c");
  5584. }
  5585. function registerLifecycleHook(register, hook) {
  5586. if (isArray(hook)) {
  5587. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  5588. } else if (hook) {
  5589. register(hook.bind(publicThis));
  5590. }
  5591. }
  5592. registerLifecycleHook(onBeforeMount, beforeMount);
  5593. registerLifecycleHook(onMounted, mounted);
  5594. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  5595. registerLifecycleHook(onUpdated, updated);
  5596. registerLifecycleHook(onActivated, activated);
  5597. registerLifecycleHook(onDeactivated, deactivated);
  5598. registerLifecycleHook(onErrorCaptured, errorCaptured);
  5599. registerLifecycleHook(onRenderTracked, renderTracked);
  5600. registerLifecycleHook(onRenderTriggered, renderTriggered);
  5601. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  5602. registerLifecycleHook(onUnmounted, unmounted);
  5603. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  5604. if (isArray(expose)) {
  5605. if (expose.length) {
  5606. const exposed = instance.exposed || (instance.exposed = {});
  5607. expose.forEach((key) => {
  5608. Object.defineProperty(exposed, key, {
  5609. get: () => publicThis[key],
  5610. set: (val) => publicThis[key] = val
  5611. });
  5612. });
  5613. } else if (!instance.exposed) {
  5614. instance.exposed = {};
  5615. }
  5616. }
  5617. if (render2 && instance.render === NOOP) {
  5618. instance.render = render2;
  5619. }
  5620. if (inheritAttrs != null) {
  5621. instance.inheritAttrs = inheritAttrs;
  5622. }
  5623. if (components) instance.components = components;
  5624. if (directives) instance.directives = directives;
  5625. if (serverPrefetch) {
  5626. markAsyncBoundary(instance);
  5627. }
  5628. }
  5629. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  5630. if (isArray(injectOptions)) {
  5631. injectOptions = normalizeInject(injectOptions);
  5632. }
  5633. for (const key in injectOptions) {
  5634. const opt = injectOptions[key];
  5635. let injected;
  5636. if (isObject(opt)) {
  5637. if ("default" in opt) {
  5638. injected = inject(
  5639. opt.from || key,
  5640. opt.default,
  5641. true
  5642. );
  5643. } else {
  5644. injected = inject(opt.from || key);
  5645. }
  5646. } else {
  5647. injected = inject(opt);
  5648. }
  5649. if (isRef2(injected)) {
  5650. Object.defineProperty(ctx, key, {
  5651. enumerable: true,
  5652. configurable: true,
  5653. get: () => injected.value,
  5654. set: (v) => injected.value = v
  5655. });
  5656. } else {
  5657. ctx[key] = injected;
  5658. }
  5659. if (true) {
  5660. checkDuplicateProperties("Inject", key);
  5661. }
  5662. }
  5663. }
  5664. function callHook(hook, instance, type) {
  5665. callWithAsyncErrorHandling(
  5666. isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  5667. instance,
  5668. type
  5669. );
  5670. }
  5671. function createWatcher(raw, ctx, publicThis, key) {
  5672. let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  5673. if (isString(raw)) {
  5674. const handler = ctx[raw];
  5675. if (isFunction(handler)) {
  5676. {
  5677. watch2(getter, handler);
  5678. }
  5679. } else if (true) {
  5680. warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
  5681. }
  5682. } else if (isFunction(raw)) {
  5683. {
  5684. watch2(getter, raw.bind(publicThis));
  5685. }
  5686. } else if (isObject(raw)) {
  5687. if (isArray(raw)) {
  5688. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  5689. } else {
  5690. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  5691. if (isFunction(handler)) {
  5692. watch2(getter, handler, raw);
  5693. } else if (true) {
  5694. warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  5695. }
  5696. }
  5697. } else if (true) {
  5698. warn$1(`Invalid watch option: "${key}"`, raw);
  5699. }
  5700. }
  5701. function resolveMergedOptions(instance) {
  5702. const base = instance.type;
  5703. const { mixins, extends: extendsOptions } = base;
  5704. const {
  5705. mixins: globalMixins,
  5706. optionsCache: cache,
  5707. config: { optionMergeStrategies }
  5708. } = instance.appContext;
  5709. const cached = cache.get(base);
  5710. let resolved;
  5711. if (cached) {
  5712. resolved = cached;
  5713. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  5714. {
  5715. resolved = base;
  5716. }
  5717. } else {
  5718. resolved = {};
  5719. if (globalMixins.length) {
  5720. globalMixins.forEach(
  5721. (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
  5722. );
  5723. }
  5724. mergeOptions(resolved, base, optionMergeStrategies);
  5725. }
  5726. if (isObject(base)) {
  5727. cache.set(base, resolved);
  5728. }
  5729. return resolved;
  5730. }
  5731. function mergeOptions(to, from, strats, asMixin = false) {
  5732. const { mixins, extends: extendsOptions } = from;
  5733. if (extendsOptions) {
  5734. mergeOptions(to, extendsOptions, strats, true);
  5735. }
  5736. if (mixins) {
  5737. mixins.forEach(
  5738. (m) => mergeOptions(to, m, strats, true)
  5739. );
  5740. }
  5741. for (const key in from) {
  5742. if (asMixin && key === "expose") {
  5743. warn$1(
  5744. `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
  5745. );
  5746. } else {
  5747. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  5748. to[key] = strat ? strat(to[key], from[key]) : from[key];
  5749. }
  5750. }
  5751. return to;
  5752. }
  5753. var internalOptionMergeStrats = {
  5754. data: mergeDataFn,
  5755. props: mergeEmitsOrPropsOptions,
  5756. emits: mergeEmitsOrPropsOptions,
  5757. // objects
  5758. methods: mergeObjectOptions,
  5759. computed: mergeObjectOptions,
  5760. // lifecycle
  5761. beforeCreate: mergeAsArray,
  5762. created: mergeAsArray,
  5763. beforeMount: mergeAsArray,
  5764. mounted: mergeAsArray,
  5765. beforeUpdate: mergeAsArray,
  5766. updated: mergeAsArray,
  5767. beforeDestroy: mergeAsArray,
  5768. beforeUnmount: mergeAsArray,
  5769. destroyed: mergeAsArray,
  5770. unmounted: mergeAsArray,
  5771. activated: mergeAsArray,
  5772. deactivated: mergeAsArray,
  5773. errorCaptured: mergeAsArray,
  5774. serverPrefetch: mergeAsArray,
  5775. // assets
  5776. components: mergeObjectOptions,
  5777. directives: mergeObjectOptions,
  5778. // watch
  5779. watch: mergeWatchOptions,
  5780. // provide / inject
  5781. provide: mergeDataFn,
  5782. inject: mergeInject
  5783. };
  5784. function mergeDataFn(to, from) {
  5785. if (!from) {
  5786. return to;
  5787. }
  5788. if (!to) {
  5789. return from;
  5790. }
  5791. return function mergedDataFn() {
  5792. return extend(
  5793. isFunction(to) ? to.call(this, this) : to,
  5794. isFunction(from) ? from.call(this, this) : from
  5795. );
  5796. };
  5797. }
  5798. function mergeInject(to, from) {
  5799. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  5800. }
  5801. function normalizeInject(raw) {
  5802. if (isArray(raw)) {
  5803. const res = {};
  5804. for (let i = 0; i < raw.length; i++) {
  5805. res[raw[i]] = raw[i];
  5806. }
  5807. return res;
  5808. }
  5809. return raw;
  5810. }
  5811. function mergeAsArray(to, from) {
  5812. return to ? [...new Set([].concat(to, from))] : from;
  5813. }
  5814. function mergeObjectOptions(to, from) {
  5815. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  5816. }
  5817. function mergeEmitsOrPropsOptions(to, from) {
  5818. if (to) {
  5819. if (isArray(to) && isArray(from)) {
  5820. return [.../* @__PURE__ */ new Set([...to, ...from])];
  5821. }
  5822. return extend(
  5823. /* @__PURE__ */ Object.create(null),
  5824. normalizePropsOrEmits(to),
  5825. normalizePropsOrEmits(from != null ? from : {})
  5826. );
  5827. } else {
  5828. return from;
  5829. }
  5830. }
  5831. function mergeWatchOptions(to, from) {
  5832. if (!to) return from;
  5833. if (!from) return to;
  5834. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  5835. for (const key in from) {
  5836. merged[key] = mergeAsArray(to[key], from[key]);
  5837. }
  5838. return merged;
  5839. }
  5840. function createAppContext() {
  5841. return {
  5842. app: null,
  5843. config: {
  5844. isNativeTag: NO,
  5845. performance: false,
  5846. globalProperties: {},
  5847. optionMergeStrategies: {},
  5848. errorHandler: void 0,
  5849. warnHandler: void 0,
  5850. compilerOptions: {}
  5851. },
  5852. mixins: [],
  5853. components: {},
  5854. directives: {},
  5855. provides: /* @__PURE__ */ Object.create(null),
  5856. optionsCache: /* @__PURE__ */ new WeakMap(),
  5857. propsCache: /* @__PURE__ */ new WeakMap(),
  5858. emitsCache: /* @__PURE__ */ new WeakMap()
  5859. };
  5860. }
  5861. var uid$1 = 0;
  5862. function createAppAPI(render2, hydrate2) {
  5863. return function createApp2(rootComponent, rootProps = null) {
  5864. if (!isFunction(rootComponent)) {
  5865. rootComponent = extend({}, rootComponent);
  5866. }
  5867. if (rootProps != null && !isObject(rootProps)) {
  5868. warn$1(`root props passed to app.mount() must be an object.`);
  5869. rootProps = null;
  5870. }
  5871. const context = createAppContext();
  5872. const installedPlugins = /* @__PURE__ */ new WeakSet();
  5873. const pluginCleanupFns = [];
  5874. let isMounted = false;
  5875. const app = context.app = {
  5876. _uid: uid$1++,
  5877. _component: rootComponent,
  5878. _props: rootProps,
  5879. _container: null,
  5880. _context: context,
  5881. _instance: null,
  5882. version,
  5883. get config() {
  5884. return context.config;
  5885. },
  5886. set config(v) {
  5887. if (true) {
  5888. warn$1(
  5889. `app.config cannot be replaced. Modify individual options instead.`
  5890. );
  5891. }
  5892. },
  5893. use(plugin, ...options) {
  5894. if (installedPlugins.has(plugin)) {
  5895. warn$1(`Plugin has already been applied to target app.`);
  5896. } else if (plugin && isFunction(plugin.install)) {
  5897. installedPlugins.add(plugin);
  5898. plugin.install(app, ...options);
  5899. } else if (isFunction(plugin)) {
  5900. installedPlugins.add(plugin);
  5901. plugin(app, ...options);
  5902. } else if (true) {
  5903. warn$1(
  5904. `A plugin must either be a function or an object with an "install" function.`
  5905. );
  5906. }
  5907. return app;
  5908. },
  5909. mixin(mixin) {
  5910. if (__VUE_OPTIONS_API__) {
  5911. if (!context.mixins.includes(mixin)) {
  5912. context.mixins.push(mixin);
  5913. } else if (true) {
  5914. warn$1(
  5915. "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
  5916. );
  5917. }
  5918. } else if (true) {
  5919. warn$1("Mixins are only available in builds supporting Options API");
  5920. }
  5921. return app;
  5922. },
  5923. component(name, component) {
  5924. if (true) {
  5925. validateComponentName(name, context.config);
  5926. }
  5927. if (!component) {
  5928. return context.components[name];
  5929. }
  5930. if (context.components[name]) {
  5931. warn$1(`Component "${name}" has already been registered in target app.`);
  5932. }
  5933. context.components[name] = component;
  5934. return app;
  5935. },
  5936. directive(name, directive) {
  5937. if (true) {
  5938. validateDirectiveName(name);
  5939. }
  5940. if (!directive) {
  5941. return context.directives[name];
  5942. }
  5943. if (context.directives[name]) {
  5944. warn$1(`Directive "${name}" has already been registered in target app.`);
  5945. }
  5946. context.directives[name] = directive;
  5947. return app;
  5948. },
  5949. mount(rootContainer, isHydrate, namespace) {
  5950. if (!isMounted) {
  5951. if (rootContainer.__vue_app__) {
  5952. warn$1(
  5953. `There is already an app instance mounted on the host container.
  5954. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
  5955. );
  5956. }
  5957. const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
  5958. vnode.appContext = context;
  5959. if (namespace === true) {
  5960. namespace = "svg";
  5961. } else if (namespace === false) {
  5962. namespace = void 0;
  5963. }
  5964. if (true) {
  5965. context.reload = () => {
  5966. render2(
  5967. cloneVNode(vnode),
  5968. rootContainer,
  5969. namespace
  5970. );
  5971. };
  5972. }
  5973. if (isHydrate && hydrate2) {
  5974. hydrate2(vnode, rootContainer);
  5975. } else {
  5976. render2(vnode, rootContainer, namespace);
  5977. }
  5978. isMounted = true;
  5979. app._container = rootContainer;
  5980. rootContainer.__vue_app__ = app;
  5981. if (true) {
  5982. app._instance = vnode.component;
  5983. devtoolsInitApp(app, version);
  5984. }
  5985. return getComponentPublicInstance(vnode.component);
  5986. } else if (true) {
  5987. warn$1(
  5988. `App has already been mounted.
  5989. If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
  5990. );
  5991. }
  5992. },
  5993. onUnmount(cleanupFn) {
  5994. if (typeof cleanupFn !== "function") {
  5995. warn$1(
  5996. `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
  5997. );
  5998. }
  5999. pluginCleanupFns.push(cleanupFn);
  6000. },
  6001. unmount() {
  6002. if (isMounted) {
  6003. callWithAsyncErrorHandling(
  6004. pluginCleanupFns,
  6005. app._instance,
  6006. 16
  6007. );
  6008. render2(null, app._container);
  6009. if (true) {
  6010. app._instance = null;
  6011. devtoolsUnmountApp(app);
  6012. }
  6013. delete app._container.__vue_app__;
  6014. } else if (true) {
  6015. warn$1(`Cannot unmount an app that is not mounted.`);
  6016. }
  6017. },
  6018. provide(key, value) {
  6019. if (key in context.provides) {
  6020. warn$1(
  6021. `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
  6022. );
  6023. }
  6024. context.provides[key] = value;
  6025. return app;
  6026. },
  6027. runWithContext(fn) {
  6028. const lastApp = currentApp;
  6029. currentApp = app;
  6030. try {
  6031. return fn();
  6032. } finally {
  6033. currentApp = lastApp;
  6034. }
  6035. }
  6036. };
  6037. return app;
  6038. };
  6039. }
  6040. var currentApp = null;
  6041. function provide(key, value) {
  6042. if (!currentInstance) {
  6043. if (true) {
  6044. warn$1(`provide() can only be used inside setup().`);
  6045. }
  6046. } else {
  6047. let provides = currentInstance.provides;
  6048. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  6049. if (parentProvides === provides) {
  6050. provides = currentInstance.provides = Object.create(parentProvides);
  6051. }
  6052. provides[key] = value;
  6053. }
  6054. }
  6055. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  6056. const instance = currentInstance || currentRenderingInstance;
  6057. if (instance || currentApp) {
  6058. const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
  6059. if (provides && key in provides) {
  6060. return provides[key];
  6061. } else if (arguments.length > 1) {
  6062. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  6063. } else if (true) {
  6064. warn$1(`injection "${String(key)}" not found.`);
  6065. }
  6066. } else if (true) {
  6067. warn$1(`inject() can only be used inside setup() or functional components.`);
  6068. }
  6069. }
  6070. function hasInjectionContext() {
  6071. return !!(currentInstance || currentRenderingInstance || currentApp);
  6072. }
  6073. var internalObjectProto = {};
  6074. var createInternalObject = () => Object.create(internalObjectProto);
  6075. var isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  6076. function initProps(instance, rawProps, isStateful, isSSR = false) {
  6077. const props = {};
  6078. const attrs = createInternalObject();
  6079. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  6080. setFullProps(instance, rawProps, props, attrs);
  6081. for (const key in instance.propsOptions[0]) {
  6082. if (!(key in props)) {
  6083. props[key] = void 0;
  6084. }
  6085. }
  6086. if (true) {
  6087. validateProps(rawProps || {}, props, instance);
  6088. }
  6089. if (isStateful) {
  6090. instance.props = isSSR ? props : shallowReactive(props);
  6091. } else {
  6092. if (!instance.type.props) {
  6093. instance.props = attrs;
  6094. } else {
  6095. instance.props = props;
  6096. }
  6097. }
  6098. instance.attrs = attrs;
  6099. }
  6100. function isInHmrContext(instance) {
  6101. while (instance) {
  6102. if (instance.type.__hmrId) return true;
  6103. instance = instance.parent;
  6104. }
  6105. }
  6106. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  6107. const {
  6108. props,
  6109. attrs,
  6110. vnode: { patchFlag }
  6111. } = instance;
  6112. const rawCurrentProps = toRaw(props);
  6113. const [options] = instance.propsOptions;
  6114. let hasAttrsChanged = false;
  6115. if (
  6116. // always force full diff in dev
  6117. // - #1942 if hmr is enabled with sfc component
  6118. // - vite#872 non-sfc component used by sfc component
  6119. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  6120. ) {
  6121. if (patchFlag & 8) {
  6122. const propsToUpdate = instance.vnode.dynamicProps;
  6123. for (let i = 0; i < propsToUpdate.length; i++) {
  6124. let key = propsToUpdate[i];
  6125. if (isEmitListener(instance.emitsOptions, key)) {
  6126. continue;
  6127. }
  6128. const value = rawProps[key];
  6129. if (options) {
  6130. if (hasOwn(attrs, key)) {
  6131. if (value !== attrs[key]) {
  6132. attrs[key] = value;
  6133. hasAttrsChanged = true;
  6134. }
  6135. } else {
  6136. const camelizedKey = camelize(key);
  6137. props[camelizedKey] = resolvePropValue(
  6138. options,
  6139. rawCurrentProps,
  6140. camelizedKey,
  6141. value,
  6142. instance,
  6143. false
  6144. );
  6145. }
  6146. } else {
  6147. if (value !== attrs[key]) {
  6148. attrs[key] = value;
  6149. hasAttrsChanged = true;
  6150. }
  6151. }
  6152. }
  6153. }
  6154. } else {
  6155. if (setFullProps(instance, rawProps, props, attrs)) {
  6156. hasAttrsChanged = true;
  6157. }
  6158. let kebabKey;
  6159. for (const key in rawCurrentProps) {
  6160. if (!rawProps || // for camelCase
  6161. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  6162. // and converted to camelCase (#955)
  6163. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  6164. if (options) {
  6165. if (rawPrevProps && // for camelCase
  6166. (rawPrevProps[key] !== void 0 || // for kebab-case
  6167. rawPrevProps[kebabKey] !== void 0)) {
  6168. props[key] = resolvePropValue(
  6169. options,
  6170. rawCurrentProps,
  6171. key,
  6172. void 0,
  6173. instance,
  6174. true
  6175. );
  6176. }
  6177. } else {
  6178. delete props[key];
  6179. }
  6180. }
  6181. }
  6182. if (attrs !== rawCurrentProps) {
  6183. for (const key in attrs) {
  6184. if (!rawProps || !hasOwn(rawProps, key) && true) {
  6185. delete attrs[key];
  6186. hasAttrsChanged = true;
  6187. }
  6188. }
  6189. }
  6190. }
  6191. if (hasAttrsChanged) {
  6192. trigger(instance.attrs, "set", "");
  6193. }
  6194. if (true) {
  6195. validateProps(rawProps || {}, props, instance);
  6196. }
  6197. }
  6198. function setFullProps(instance, rawProps, props, attrs) {
  6199. const [options, needCastKeys] = instance.propsOptions;
  6200. let hasAttrsChanged = false;
  6201. let rawCastValues;
  6202. if (rawProps) {
  6203. for (let key in rawProps) {
  6204. if (isReservedProp(key)) {
  6205. continue;
  6206. }
  6207. const value = rawProps[key];
  6208. let camelKey;
  6209. if (options && hasOwn(options, camelKey = camelize(key))) {
  6210. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  6211. props[camelKey] = value;
  6212. } else {
  6213. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  6214. }
  6215. } else if (!isEmitListener(instance.emitsOptions, key)) {
  6216. if (!(key in attrs) || value !== attrs[key]) {
  6217. attrs[key] = value;
  6218. hasAttrsChanged = true;
  6219. }
  6220. }
  6221. }
  6222. }
  6223. if (needCastKeys) {
  6224. const rawCurrentProps = toRaw(props);
  6225. const castValues = rawCastValues || EMPTY_OBJ;
  6226. for (let i = 0; i < needCastKeys.length; i++) {
  6227. const key = needCastKeys[i];
  6228. props[key] = resolvePropValue(
  6229. options,
  6230. rawCurrentProps,
  6231. key,
  6232. castValues[key],
  6233. instance,
  6234. !hasOwn(castValues, key)
  6235. );
  6236. }
  6237. }
  6238. return hasAttrsChanged;
  6239. }
  6240. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  6241. const opt = options[key];
  6242. if (opt != null) {
  6243. const hasDefault = hasOwn(opt, "default");
  6244. if (hasDefault && value === void 0) {
  6245. const defaultValue = opt.default;
  6246. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  6247. const { propsDefaults } = instance;
  6248. if (key in propsDefaults) {
  6249. value = propsDefaults[key];
  6250. } else {
  6251. const reset = setCurrentInstance(instance);
  6252. value = propsDefaults[key] = defaultValue.call(
  6253. null,
  6254. props
  6255. );
  6256. reset();
  6257. }
  6258. } else {
  6259. value = defaultValue;
  6260. }
  6261. if (instance.ce) {
  6262. instance.ce._setProp(key, value);
  6263. }
  6264. }
  6265. if (opt[
  6266. 0
  6267. /* shouldCast */
  6268. ]) {
  6269. if (isAbsent && !hasDefault) {
  6270. value = false;
  6271. } else if (opt[
  6272. 1
  6273. /* shouldCastTrue */
  6274. ] && (value === "" || value === hyphenate(key))) {
  6275. value = true;
  6276. }
  6277. }
  6278. }
  6279. return value;
  6280. }
  6281. var mixinPropsCache = /* @__PURE__ */ new WeakMap();
  6282. function normalizePropsOptions(comp, appContext, asMixin = false) {
  6283. const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
  6284. const cached = cache.get(comp);
  6285. if (cached) {
  6286. return cached;
  6287. }
  6288. const raw = comp.props;
  6289. const normalized = {};
  6290. const needCastKeys = [];
  6291. let hasExtends = false;
  6292. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  6293. const extendProps = (raw2) => {
  6294. hasExtends = true;
  6295. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  6296. extend(normalized, props);
  6297. if (keys) needCastKeys.push(...keys);
  6298. };
  6299. if (!asMixin && appContext.mixins.length) {
  6300. appContext.mixins.forEach(extendProps);
  6301. }
  6302. if (comp.extends) {
  6303. extendProps(comp.extends);
  6304. }
  6305. if (comp.mixins) {
  6306. comp.mixins.forEach(extendProps);
  6307. }
  6308. }
  6309. if (!raw && !hasExtends) {
  6310. if (isObject(comp)) {
  6311. cache.set(comp, EMPTY_ARR);
  6312. }
  6313. return EMPTY_ARR;
  6314. }
  6315. if (isArray(raw)) {
  6316. for (let i = 0; i < raw.length; i++) {
  6317. if (!isString(raw[i])) {
  6318. warn$1(`props must be strings when using array syntax.`, raw[i]);
  6319. }
  6320. const normalizedKey = camelize(raw[i]);
  6321. if (validatePropName(normalizedKey)) {
  6322. normalized[normalizedKey] = EMPTY_OBJ;
  6323. }
  6324. }
  6325. } else if (raw) {
  6326. if (!isObject(raw)) {
  6327. warn$1(`invalid props options`, raw);
  6328. }
  6329. for (const key in raw) {
  6330. const normalizedKey = camelize(key);
  6331. if (validatePropName(normalizedKey)) {
  6332. const opt = raw[key];
  6333. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  6334. const propType = prop.type;
  6335. let shouldCast = false;
  6336. let shouldCastTrue = true;
  6337. if (isArray(propType)) {
  6338. for (let index = 0; index < propType.length; ++index) {
  6339. const type = propType[index];
  6340. const typeName = isFunction(type) && type.name;
  6341. if (typeName === "Boolean") {
  6342. shouldCast = true;
  6343. break;
  6344. } else if (typeName === "String") {
  6345. shouldCastTrue = false;
  6346. }
  6347. }
  6348. } else {
  6349. shouldCast = isFunction(propType) && propType.name === "Boolean";
  6350. }
  6351. prop[
  6352. 0
  6353. /* shouldCast */
  6354. ] = shouldCast;
  6355. prop[
  6356. 1
  6357. /* shouldCastTrue */
  6358. ] = shouldCastTrue;
  6359. if (shouldCast || hasOwn(prop, "default")) {
  6360. needCastKeys.push(normalizedKey);
  6361. }
  6362. }
  6363. }
  6364. }
  6365. const res = [normalized, needCastKeys];
  6366. if (isObject(comp)) {
  6367. cache.set(comp, res);
  6368. }
  6369. return res;
  6370. }
  6371. function validatePropName(key) {
  6372. if (key[0] !== "$" && !isReservedProp(key)) {
  6373. return true;
  6374. } else if (true) {
  6375. warn$1(`Invalid prop name: "${key}" is a reserved property.`);
  6376. }
  6377. return false;
  6378. }
  6379. function getType(ctor) {
  6380. if (ctor === null) {
  6381. return "null";
  6382. }
  6383. if (typeof ctor === "function") {
  6384. return ctor.name || "";
  6385. } else if (typeof ctor === "object") {
  6386. const name = ctor.constructor && ctor.constructor.name;
  6387. return name || "";
  6388. }
  6389. return "";
  6390. }
  6391. function validateProps(rawProps, props, instance) {
  6392. const resolvedValues = toRaw(props);
  6393. const options = instance.propsOptions[0];
  6394. const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
  6395. for (const key in options) {
  6396. let opt = options[key];
  6397. if (opt == null) continue;
  6398. validateProp(
  6399. key,
  6400. resolvedValues[key],
  6401. opt,
  6402. true ? shallowReadonly(resolvedValues) : resolvedValues,
  6403. !camelizePropsKey.includes(key)
  6404. );
  6405. }
  6406. }
  6407. function validateProp(name, value, prop, props, isAbsent) {
  6408. const { type, required, validator, skipCheck } = prop;
  6409. if (required && isAbsent) {
  6410. warn$1('Missing required prop: "' + name + '"');
  6411. return;
  6412. }
  6413. if (value == null && !required) {
  6414. return;
  6415. }
  6416. if (type != null && type !== true && !skipCheck) {
  6417. let isValid = false;
  6418. const types = isArray(type) ? type : [type];
  6419. const expectedTypes = [];
  6420. for (let i = 0; i < types.length && !isValid; i++) {
  6421. const { valid, expectedType } = assertType(value, types[i]);
  6422. expectedTypes.push(expectedType || "");
  6423. isValid = valid;
  6424. }
  6425. if (!isValid) {
  6426. warn$1(getInvalidTypeMessage(name, value, expectedTypes));
  6427. return;
  6428. }
  6429. }
  6430. if (validator && !validator(value, props)) {
  6431. warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
  6432. }
  6433. }
  6434. var isSimpleType = makeMap(
  6435. "String,Number,Boolean,Function,Symbol,BigInt"
  6436. );
  6437. function assertType(value, type) {
  6438. let valid;
  6439. const expectedType = getType(type);
  6440. if (expectedType === "null") {
  6441. valid = value === null;
  6442. } else if (isSimpleType(expectedType)) {
  6443. const t = typeof value;
  6444. valid = t === expectedType.toLowerCase();
  6445. if (!valid && t === "object") {
  6446. valid = value instanceof type;
  6447. }
  6448. } else if (expectedType === "Object") {
  6449. valid = isObject(value);
  6450. } else if (expectedType === "Array") {
  6451. valid = isArray(value);
  6452. } else {
  6453. valid = value instanceof type;
  6454. }
  6455. return {
  6456. valid,
  6457. expectedType
  6458. };
  6459. }
  6460. function getInvalidTypeMessage(name, value, expectedTypes) {
  6461. if (expectedTypes.length === 0) {
  6462. return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  6463. }
  6464. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  6465. const expectedType = expectedTypes[0];
  6466. const receivedType = toRawType(value);
  6467. const expectedValue = styleValue(value, expectedType);
  6468. const receivedValue = styleValue(value, receivedType);
  6469. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  6470. message += ` with value ${expectedValue}`;
  6471. }
  6472. message += `, got ${receivedType} `;
  6473. if (isExplicable(receivedType)) {
  6474. message += `with value ${receivedValue}.`;
  6475. }
  6476. return message;
  6477. }
  6478. function styleValue(value, type) {
  6479. if (type === "String") {
  6480. return `"${value}"`;
  6481. } else if (type === "Number") {
  6482. return `${Number(value)}`;
  6483. } else {
  6484. return `${value}`;
  6485. }
  6486. }
  6487. function isExplicable(type) {
  6488. const explicitTypes = ["string", "number", "boolean"];
  6489. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  6490. }
  6491. function isBoolean(...args) {
  6492. return args.some((elem) => elem.toLowerCase() === "boolean");
  6493. }
  6494. var isInternalKey = (key) => key[0] === "_" || key === "$stable";
  6495. var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  6496. var normalizeSlot = (key, rawSlot, ctx) => {
  6497. if (rawSlot._n) {
  6498. return rawSlot;
  6499. }
  6500. const normalized = withCtx((...args) => {
  6501. if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
  6502. warn$1(
  6503. `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
  6504. );
  6505. }
  6506. return normalizeSlotValue(rawSlot(...args));
  6507. }, ctx);
  6508. normalized._c = false;
  6509. return normalized;
  6510. };
  6511. var normalizeObjectSlots = (rawSlots, slots, instance) => {
  6512. const ctx = rawSlots._ctx;
  6513. for (const key in rawSlots) {
  6514. if (isInternalKey(key)) continue;
  6515. const value = rawSlots[key];
  6516. if (isFunction(value)) {
  6517. slots[key] = normalizeSlot(key, value, ctx);
  6518. } else if (value != null) {
  6519. if (true) {
  6520. warn$1(
  6521. `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
  6522. );
  6523. }
  6524. const normalized = normalizeSlotValue(value);
  6525. slots[key] = () => normalized;
  6526. }
  6527. }
  6528. };
  6529. var normalizeVNodeSlots = (instance, children) => {
  6530. if (!isKeepAlive(instance.vnode) && true) {
  6531. warn$1(
  6532. `Non-function value encountered for default slot. Prefer function slots for better performance.`
  6533. );
  6534. }
  6535. const normalized = normalizeSlotValue(children);
  6536. instance.slots.default = () => normalized;
  6537. };
  6538. var assignSlots = (slots, children, optimized) => {
  6539. for (const key in children) {
  6540. if (optimized || key !== "_") {
  6541. slots[key] = children[key];
  6542. }
  6543. }
  6544. };
  6545. var initSlots = (instance, children, optimized) => {
  6546. const slots = instance.slots = createInternalObject();
  6547. if (instance.vnode.shapeFlag & 32) {
  6548. const type = children._;
  6549. if (type) {
  6550. assignSlots(slots, children, optimized);
  6551. if (optimized) {
  6552. def(slots, "_", type, true);
  6553. }
  6554. } else {
  6555. normalizeObjectSlots(children, slots);
  6556. }
  6557. } else if (children) {
  6558. normalizeVNodeSlots(instance, children);
  6559. }
  6560. };
  6561. var updateSlots = (instance, children, optimized) => {
  6562. const { vnode, slots } = instance;
  6563. let needDeletionCheck = true;
  6564. let deletionComparisonTarget = EMPTY_OBJ;
  6565. if (vnode.shapeFlag & 32) {
  6566. const type = children._;
  6567. if (type) {
  6568. if (isHmrUpdating) {
  6569. assignSlots(slots, children, optimized);
  6570. trigger(instance, "set", "$slots");
  6571. } else if (optimized && type === 1) {
  6572. needDeletionCheck = false;
  6573. } else {
  6574. assignSlots(slots, children, optimized);
  6575. }
  6576. } else {
  6577. needDeletionCheck = !children.$stable;
  6578. normalizeObjectSlots(children, slots);
  6579. }
  6580. deletionComparisonTarget = children;
  6581. } else if (children) {
  6582. normalizeVNodeSlots(instance, children);
  6583. deletionComparisonTarget = { default: 1 };
  6584. }
  6585. if (needDeletionCheck) {
  6586. for (const key in slots) {
  6587. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  6588. delete slots[key];
  6589. }
  6590. }
  6591. }
  6592. };
  6593. var supported;
  6594. var perf;
  6595. function startMeasure(instance, type) {
  6596. if (instance.appContext.config.performance && isSupported()) {
  6597. perf.mark(`vue-${type}-${instance.uid}`);
  6598. }
  6599. if (true) {
  6600. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  6601. }
  6602. }
  6603. function endMeasure(instance, type) {
  6604. if (instance.appContext.config.performance && isSupported()) {
  6605. const startTag = `vue-${type}-${instance.uid}`;
  6606. const endTag = startTag + `:end`;
  6607. perf.mark(endTag);
  6608. perf.measure(
  6609. `<${formatComponentName(instance, instance.type)}> ${type}`,
  6610. startTag,
  6611. endTag
  6612. );
  6613. perf.clearMarks(startTag);
  6614. perf.clearMarks(endTag);
  6615. }
  6616. if (true) {
  6617. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  6618. }
  6619. }
  6620. function isSupported() {
  6621. if (supported !== void 0) {
  6622. return supported;
  6623. }
  6624. if (typeof window !== "undefined" && window.performance) {
  6625. supported = true;
  6626. perf = window.performance;
  6627. } else {
  6628. supported = false;
  6629. }
  6630. return supported;
  6631. }
  6632. function initFeatureFlags() {
  6633. const needWarn = [];
  6634. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  6635. needWarn.push(`__VUE_OPTIONS_API__`);
  6636. getGlobalThis().__VUE_OPTIONS_API__ = true;
  6637. }
  6638. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  6639. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  6640. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  6641. }
  6642. if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
  6643. needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
  6644. getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
  6645. }
  6646. if (needWarn.length) {
  6647. const multi = needWarn.length > 1;
  6648. console.warn(
  6649. `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
  6650. For more details, see https://link.vuejs.org/feature-flags.`
  6651. );
  6652. }
  6653. }
  6654. var queuePostRenderEffect = queueEffectWithSuspense;
  6655. function createRenderer(options) {
  6656. return baseCreateRenderer(options);
  6657. }
  6658. function createHydrationRenderer(options) {
  6659. return baseCreateRenderer(options, createHydrationFunctions);
  6660. }
  6661. function baseCreateRenderer(options, createHydrationFns) {
  6662. {
  6663. initFeatureFlags();
  6664. }
  6665. const target = getGlobalThis();
  6666. target.__VUE__ = true;
  6667. if (true) {
  6668. setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  6669. }
  6670. const {
  6671. insert: hostInsert,
  6672. remove: hostRemove,
  6673. patchProp: hostPatchProp,
  6674. createElement: hostCreateElement,
  6675. createText: hostCreateText,
  6676. createComment: hostCreateComment,
  6677. setText: hostSetText,
  6678. setElementText: hostSetElementText,
  6679. parentNode: hostParentNode,
  6680. nextSibling: hostNextSibling,
  6681. setScopeId: hostSetScopeId = NOOP,
  6682. insertStaticContent: hostInsertStaticContent
  6683. } = options;
  6684. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  6685. if (n1 === n2) {
  6686. return;
  6687. }
  6688. if (n1 && !isSameVNodeType(n1, n2)) {
  6689. anchor = getNextHostNode(n1);
  6690. unmount(n1, parentComponent, parentSuspense, true);
  6691. n1 = null;
  6692. }
  6693. if (n2.patchFlag === -2) {
  6694. optimized = false;
  6695. n2.dynamicChildren = null;
  6696. }
  6697. const { type, ref: ref2, shapeFlag } = n2;
  6698. switch (type) {
  6699. case Text:
  6700. processText(n1, n2, container, anchor);
  6701. break;
  6702. case Comment:
  6703. processCommentNode(n1, n2, container, anchor);
  6704. break;
  6705. case Static:
  6706. if (n1 == null) {
  6707. mountStaticNode(n2, container, anchor, namespace);
  6708. } else if (true) {
  6709. patchStaticNode(n1, n2, container, namespace);
  6710. }
  6711. break;
  6712. case Fragment:
  6713. processFragment(
  6714. n1,
  6715. n2,
  6716. container,
  6717. anchor,
  6718. parentComponent,
  6719. parentSuspense,
  6720. namespace,
  6721. slotScopeIds,
  6722. optimized
  6723. );
  6724. break;
  6725. default:
  6726. if (shapeFlag & 1) {
  6727. processElement(
  6728. n1,
  6729. n2,
  6730. container,
  6731. anchor,
  6732. parentComponent,
  6733. parentSuspense,
  6734. namespace,
  6735. slotScopeIds,
  6736. optimized
  6737. );
  6738. } else if (shapeFlag & 6) {
  6739. processComponent(
  6740. n1,
  6741. n2,
  6742. container,
  6743. anchor,
  6744. parentComponent,
  6745. parentSuspense,
  6746. namespace,
  6747. slotScopeIds,
  6748. optimized
  6749. );
  6750. } else if (shapeFlag & 64) {
  6751. type.process(
  6752. n1,
  6753. n2,
  6754. container,
  6755. anchor,
  6756. parentComponent,
  6757. parentSuspense,
  6758. namespace,
  6759. slotScopeIds,
  6760. optimized,
  6761. internals
  6762. );
  6763. } else if (shapeFlag & 128) {
  6764. type.process(
  6765. n1,
  6766. n2,
  6767. container,
  6768. anchor,
  6769. parentComponent,
  6770. parentSuspense,
  6771. namespace,
  6772. slotScopeIds,
  6773. optimized,
  6774. internals
  6775. );
  6776. } else if (true) {
  6777. warn$1("Invalid VNode type:", type, `(${typeof type})`);
  6778. }
  6779. }
  6780. if (ref2 != null && parentComponent) {
  6781. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  6782. }
  6783. };
  6784. const processText = (n1, n2, container, anchor) => {
  6785. if (n1 == null) {
  6786. hostInsert(
  6787. n2.el = hostCreateText(n2.children),
  6788. container,
  6789. anchor
  6790. );
  6791. } else {
  6792. const el = n2.el = n1.el;
  6793. if (n2.children !== n1.children) {
  6794. hostSetText(el, n2.children);
  6795. }
  6796. }
  6797. };
  6798. const processCommentNode = (n1, n2, container, anchor) => {
  6799. if (n1 == null) {
  6800. hostInsert(
  6801. n2.el = hostCreateComment(n2.children || ""),
  6802. container,
  6803. anchor
  6804. );
  6805. } else {
  6806. n2.el = n1.el;
  6807. }
  6808. };
  6809. const mountStaticNode = (n2, container, anchor, namespace) => {
  6810. [n2.el, n2.anchor] = hostInsertStaticContent(
  6811. n2.children,
  6812. container,
  6813. anchor,
  6814. namespace,
  6815. n2.el,
  6816. n2.anchor
  6817. );
  6818. };
  6819. const patchStaticNode = (n1, n2, container, namespace) => {
  6820. if (n2.children !== n1.children) {
  6821. const anchor = hostNextSibling(n1.anchor);
  6822. removeStaticNode(n1);
  6823. [n2.el, n2.anchor] = hostInsertStaticContent(
  6824. n2.children,
  6825. container,
  6826. anchor,
  6827. namespace
  6828. );
  6829. } else {
  6830. n2.el = n1.el;
  6831. n2.anchor = n1.anchor;
  6832. }
  6833. };
  6834. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  6835. let next;
  6836. while (el && el !== anchor) {
  6837. next = hostNextSibling(el);
  6838. hostInsert(el, container, nextSibling);
  6839. el = next;
  6840. }
  6841. hostInsert(anchor, container, nextSibling);
  6842. };
  6843. const removeStaticNode = ({ el, anchor }) => {
  6844. let next;
  6845. while (el && el !== anchor) {
  6846. next = hostNextSibling(el);
  6847. hostRemove(el);
  6848. el = next;
  6849. }
  6850. hostRemove(anchor);
  6851. };
  6852. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6853. if (n2.type === "svg") {
  6854. namespace = "svg";
  6855. } else if (n2.type === "math") {
  6856. namespace = "mathml";
  6857. }
  6858. if (n1 == null) {
  6859. mountElement(
  6860. n2,
  6861. container,
  6862. anchor,
  6863. parentComponent,
  6864. parentSuspense,
  6865. namespace,
  6866. slotScopeIds,
  6867. optimized
  6868. );
  6869. } else {
  6870. patchElement(
  6871. n1,
  6872. n2,
  6873. parentComponent,
  6874. parentSuspense,
  6875. namespace,
  6876. slotScopeIds,
  6877. optimized
  6878. );
  6879. }
  6880. };
  6881. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6882. let el;
  6883. let vnodeHook;
  6884. const { props, shapeFlag, transition, dirs } = vnode;
  6885. el = vnode.el = hostCreateElement(
  6886. vnode.type,
  6887. namespace,
  6888. props && props.is,
  6889. props
  6890. );
  6891. if (shapeFlag & 8) {
  6892. hostSetElementText(el, vnode.children);
  6893. } else if (shapeFlag & 16) {
  6894. mountChildren(
  6895. vnode.children,
  6896. el,
  6897. null,
  6898. parentComponent,
  6899. parentSuspense,
  6900. resolveChildrenNamespace(vnode, namespace),
  6901. slotScopeIds,
  6902. optimized
  6903. );
  6904. }
  6905. if (dirs) {
  6906. invokeDirectiveHook(vnode, null, parentComponent, "created");
  6907. }
  6908. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  6909. if (props) {
  6910. for (const key in props) {
  6911. if (key !== "value" && !isReservedProp(key)) {
  6912. hostPatchProp(el, key, null, props[key], namespace, parentComponent);
  6913. }
  6914. }
  6915. if ("value" in props) {
  6916. hostPatchProp(el, "value", null, props.value, namespace);
  6917. }
  6918. if (vnodeHook = props.onVnodeBeforeMount) {
  6919. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6920. }
  6921. }
  6922. if (true) {
  6923. def(el, "__vnode", vnode, true);
  6924. def(el, "__vueParentComponent", parentComponent, true);
  6925. }
  6926. if (dirs) {
  6927. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  6928. }
  6929. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  6930. if (needCallTransitionHooks) {
  6931. transition.beforeEnter(el);
  6932. }
  6933. hostInsert(el, container, anchor);
  6934. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  6935. queuePostRenderEffect(() => {
  6936. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6937. needCallTransitionHooks && transition.enter(el);
  6938. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  6939. }, parentSuspense);
  6940. }
  6941. };
  6942. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  6943. if (scopeId) {
  6944. hostSetScopeId(el, scopeId);
  6945. }
  6946. if (slotScopeIds) {
  6947. for (let i = 0; i < slotScopeIds.length; i++) {
  6948. hostSetScopeId(el, slotScopeIds[i]);
  6949. }
  6950. }
  6951. if (parentComponent) {
  6952. let subTree = parentComponent.subTree;
  6953. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
  6954. subTree = filterSingleRoot(subTree.children) || subTree;
  6955. }
  6956. if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
  6957. const parentVNode = parentComponent.vnode;
  6958. setScopeId(
  6959. el,
  6960. parentVNode,
  6961. parentVNode.scopeId,
  6962. parentVNode.slotScopeIds,
  6963. parentComponent.parent
  6964. );
  6965. }
  6966. }
  6967. };
  6968. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  6969. for (let i = start; i < children.length; i++) {
  6970. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  6971. patch(
  6972. null,
  6973. child,
  6974. container,
  6975. anchor,
  6976. parentComponent,
  6977. parentSuspense,
  6978. namespace,
  6979. slotScopeIds,
  6980. optimized
  6981. );
  6982. }
  6983. };
  6984. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6985. const el = n2.el = n1.el;
  6986. if (true) {
  6987. el.__vnode = n2;
  6988. }
  6989. let { patchFlag, dynamicChildren, dirs } = n2;
  6990. patchFlag |= n1.patchFlag & 16;
  6991. const oldProps = n1.props || EMPTY_OBJ;
  6992. const newProps = n2.props || EMPTY_OBJ;
  6993. let vnodeHook;
  6994. parentComponent && toggleRecurse(parentComponent, false);
  6995. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  6996. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  6997. }
  6998. if (dirs) {
  6999. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  7000. }
  7001. parentComponent && toggleRecurse(parentComponent, true);
  7002. if (isHmrUpdating) {
  7003. patchFlag = 0;
  7004. optimized = false;
  7005. dynamicChildren = null;
  7006. }
  7007. if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
  7008. hostSetElementText(el, "");
  7009. }
  7010. if (dynamicChildren) {
  7011. patchBlockChildren(
  7012. n1.dynamicChildren,
  7013. dynamicChildren,
  7014. el,
  7015. parentComponent,
  7016. parentSuspense,
  7017. resolveChildrenNamespace(n2, namespace),
  7018. slotScopeIds
  7019. );
  7020. if (true) {
  7021. traverseStaticChildren(n1, n2);
  7022. }
  7023. } else if (!optimized) {
  7024. patchChildren(
  7025. n1,
  7026. n2,
  7027. el,
  7028. null,
  7029. parentComponent,
  7030. parentSuspense,
  7031. resolveChildrenNamespace(n2, namespace),
  7032. slotScopeIds,
  7033. false
  7034. );
  7035. }
  7036. if (patchFlag > 0) {
  7037. if (patchFlag & 16) {
  7038. patchProps(el, oldProps, newProps, parentComponent, namespace);
  7039. } else {
  7040. if (patchFlag & 2) {
  7041. if (oldProps.class !== newProps.class) {
  7042. hostPatchProp(el, "class", null, newProps.class, namespace);
  7043. }
  7044. }
  7045. if (patchFlag & 4) {
  7046. hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  7047. }
  7048. if (patchFlag & 8) {
  7049. const propsToUpdate = n2.dynamicProps;
  7050. for (let i = 0; i < propsToUpdate.length; i++) {
  7051. const key = propsToUpdate[i];
  7052. const prev = oldProps[key];
  7053. const next = newProps[key];
  7054. if (next !== prev || key === "value") {
  7055. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  7056. }
  7057. }
  7058. }
  7059. }
  7060. if (patchFlag & 1) {
  7061. if (n1.children !== n2.children) {
  7062. hostSetElementText(el, n2.children);
  7063. }
  7064. }
  7065. } else if (!optimized && dynamicChildren == null) {
  7066. patchProps(el, oldProps, newProps, parentComponent, namespace);
  7067. }
  7068. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  7069. queuePostRenderEffect(() => {
  7070. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7071. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  7072. }, parentSuspense);
  7073. }
  7074. };
  7075. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  7076. for (let i = 0; i < newChildren.length; i++) {
  7077. const oldVNode = oldChildren[i];
  7078. const newVNode = newChildren[i];
  7079. const container = (
  7080. // oldVNode may be an errored async setup() component inside Suspense
  7081. // which will not have a mounted element
  7082. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  7083. // of the Fragment itself so it can move its children.
  7084. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  7085. // which also requires the correct parent container
  7086. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  7087. oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
  7088. // In other cases, the parent container is not actually used so we
  7089. // just pass the block element here to avoid a DOM parentNode call.
  7090. fallbackContainer
  7091. )
  7092. );
  7093. patch(
  7094. oldVNode,
  7095. newVNode,
  7096. container,
  7097. null,
  7098. parentComponent,
  7099. parentSuspense,
  7100. namespace,
  7101. slotScopeIds,
  7102. true
  7103. );
  7104. }
  7105. };
  7106. const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
  7107. if (oldProps !== newProps) {
  7108. if (oldProps !== EMPTY_OBJ) {
  7109. for (const key in oldProps) {
  7110. if (!isReservedProp(key) && !(key in newProps)) {
  7111. hostPatchProp(
  7112. el,
  7113. key,
  7114. oldProps[key],
  7115. null,
  7116. namespace,
  7117. parentComponent
  7118. );
  7119. }
  7120. }
  7121. }
  7122. for (const key in newProps) {
  7123. if (isReservedProp(key)) continue;
  7124. const next = newProps[key];
  7125. const prev = oldProps[key];
  7126. if (next !== prev && key !== "value") {
  7127. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  7128. }
  7129. }
  7130. if ("value" in newProps) {
  7131. hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  7132. }
  7133. }
  7134. };
  7135. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7136. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  7137. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  7138. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  7139. if (
  7140. // #5523 dev root fragment may inherit directives
  7141. isHmrUpdating || patchFlag & 2048
  7142. ) {
  7143. patchFlag = 0;
  7144. optimized = false;
  7145. dynamicChildren = null;
  7146. }
  7147. if (fragmentSlotScopeIds) {
  7148. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  7149. }
  7150. if (n1 == null) {
  7151. hostInsert(fragmentStartAnchor, container, anchor);
  7152. hostInsert(fragmentEndAnchor, container, anchor);
  7153. mountChildren(
  7154. // #10007
  7155. // such fragment like `<></>` will be compiled into
  7156. // a fragment which doesn't have a children.
  7157. // In this case fallback to an empty array
  7158. n2.children || [],
  7159. container,
  7160. fragmentEndAnchor,
  7161. parentComponent,
  7162. parentSuspense,
  7163. namespace,
  7164. slotScopeIds,
  7165. optimized
  7166. );
  7167. } else {
  7168. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  7169. // of renderSlot() with no valid children
  7170. n1.dynamicChildren) {
  7171. patchBlockChildren(
  7172. n1.dynamicChildren,
  7173. dynamicChildren,
  7174. container,
  7175. parentComponent,
  7176. parentSuspense,
  7177. namespace,
  7178. slotScopeIds
  7179. );
  7180. if (true) {
  7181. traverseStaticChildren(n1, n2);
  7182. } else if (
  7183. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  7184. // get moved around. Make sure all root level vnodes inherit el.
  7185. // #2134 or if it's a component root, it may also get moved around
  7186. // as the component is being moved.
  7187. n2.key != null || parentComponent && n2 === parentComponent.subTree
  7188. ) {
  7189. traverseStaticChildren(
  7190. n1,
  7191. n2,
  7192. true
  7193. /* shallow */
  7194. );
  7195. }
  7196. } else {
  7197. patchChildren(
  7198. n1,
  7199. n2,
  7200. container,
  7201. fragmentEndAnchor,
  7202. parentComponent,
  7203. parentSuspense,
  7204. namespace,
  7205. slotScopeIds,
  7206. optimized
  7207. );
  7208. }
  7209. }
  7210. };
  7211. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7212. n2.slotScopeIds = slotScopeIds;
  7213. if (n1 == null) {
  7214. if (n2.shapeFlag & 512) {
  7215. parentComponent.ctx.activate(
  7216. n2,
  7217. container,
  7218. anchor,
  7219. namespace,
  7220. optimized
  7221. );
  7222. } else {
  7223. mountComponent(
  7224. n2,
  7225. container,
  7226. anchor,
  7227. parentComponent,
  7228. parentSuspense,
  7229. namespace,
  7230. optimized
  7231. );
  7232. }
  7233. } else {
  7234. updateComponent(n1, n2, optimized);
  7235. }
  7236. };
  7237. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  7238. const instance = initialVNode.component = createComponentInstance(
  7239. initialVNode,
  7240. parentComponent,
  7241. parentSuspense
  7242. );
  7243. if (instance.type.__hmrId) {
  7244. registerHMR(instance);
  7245. }
  7246. if (true) {
  7247. pushWarningContext(initialVNode);
  7248. startMeasure(instance, `mount`);
  7249. }
  7250. if (isKeepAlive(initialVNode)) {
  7251. instance.ctx.renderer = internals;
  7252. }
  7253. {
  7254. if (true) {
  7255. startMeasure(instance, `init`);
  7256. }
  7257. setupComponent(instance, false, optimized);
  7258. if (true) {
  7259. endMeasure(instance, `init`);
  7260. }
  7261. }
  7262. if (instance.asyncDep) {
  7263. if (isHmrUpdating) initialVNode.el = null;
  7264. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
  7265. if (!initialVNode.el) {
  7266. const placeholder = instance.subTree = createVNode(Comment);
  7267. processCommentNode(null, placeholder, container, anchor);
  7268. }
  7269. } else {
  7270. setupRenderEffect(
  7271. instance,
  7272. initialVNode,
  7273. container,
  7274. anchor,
  7275. parentSuspense,
  7276. namespace,
  7277. optimized
  7278. );
  7279. }
  7280. if (true) {
  7281. popWarningContext();
  7282. endMeasure(instance, `mount`);
  7283. }
  7284. };
  7285. const updateComponent = (n1, n2, optimized) => {
  7286. const instance = n2.component = n1.component;
  7287. if (shouldUpdateComponent(n1, n2, optimized)) {
  7288. if (instance.asyncDep && !instance.asyncResolved) {
  7289. if (true) {
  7290. pushWarningContext(n2);
  7291. }
  7292. updateComponentPreRender(instance, n2, optimized);
  7293. if (true) {
  7294. popWarningContext();
  7295. }
  7296. return;
  7297. } else {
  7298. instance.next = n2;
  7299. instance.update();
  7300. }
  7301. } else {
  7302. n2.el = n1.el;
  7303. instance.vnode = n2;
  7304. }
  7305. };
  7306. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  7307. const componentUpdateFn = () => {
  7308. if (!instance.isMounted) {
  7309. let vnodeHook;
  7310. const { el, props } = initialVNode;
  7311. const { bm, m, parent, root, type } = instance;
  7312. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  7313. toggleRecurse(instance, false);
  7314. if (bm) {
  7315. invokeArrayFns(bm);
  7316. }
  7317. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  7318. invokeVNodeHook(vnodeHook, parent, initialVNode);
  7319. }
  7320. toggleRecurse(instance, true);
  7321. if (el && hydrateNode) {
  7322. const hydrateSubTree = () => {
  7323. if (true) {
  7324. startMeasure(instance, `render`);
  7325. }
  7326. instance.subTree = renderComponentRoot(instance);
  7327. if (true) {
  7328. endMeasure(instance, `render`);
  7329. }
  7330. if (true) {
  7331. startMeasure(instance, `hydrate`);
  7332. }
  7333. hydrateNode(
  7334. el,
  7335. instance.subTree,
  7336. instance,
  7337. parentSuspense,
  7338. null
  7339. );
  7340. if (true) {
  7341. endMeasure(instance, `hydrate`);
  7342. }
  7343. };
  7344. if (isAsyncWrapperVNode && type.__asyncHydrate) {
  7345. type.__asyncHydrate(
  7346. el,
  7347. instance,
  7348. hydrateSubTree
  7349. );
  7350. } else {
  7351. hydrateSubTree();
  7352. }
  7353. } else {
  7354. if (root.ce) {
  7355. root.ce._injectChildStyle(type);
  7356. }
  7357. if (true) {
  7358. startMeasure(instance, `render`);
  7359. }
  7360. const subTree = instance.subTree = renderComponentRoot(instance);
  7361. if (true) {
  7362. endMeasure(instance, `render`);
  7363. }
  7364. if (true) {
  7365. startMeasure(instance, `patch`);
  7366. }
  7367. patch(
  7368. null,
  7369. subTree,
  7370. container,
  7371. anchor,
  7372. instance,
  7373. parentSuspense,
  7374. namespace
  7375. );
  7376. if (true) {
  7377. endMeasure(instance, `patch`);
  7378. }
  7379. initialVNode.el = subTree.el;
  7380. }
  7381. if (m) {
  7382. queuePostRenderEffect(m, parentSuspense);
  7383. }
  7384. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  7385. const scopedInitialVNode = initialVNode;
  7386. queuePostRenderEffect(
  7387. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  7388. parentSuspense
  7389. );
  7390. }
  7391. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  7392. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  7393. }
  7394. instance.isMounted = true;
  7395. if (true) {
  7396. devtoolsComponentAdded(instance);
  7397. }
  7398. initialVNode = container = anchor = null;
  7399. } else {
  7400. let { next, bu, u, parent, vnode } = instance;
  7401. {
  7402. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  7403. if (nonHydratedAsyncRoot) {
  7404. if (next) {
  7405. next.el = vnode.el;
  7406. updateComponentPreRender(instance, next, optimized);
  7407. }
  7408. nonHydratedAsyncRoot.asyncDep.then(() => {
  7409. if (!instance.isUnmounted) {
  7410. componentUpdateFn();
  7411. }
  7412. });
  7413. return;
  7414. }
  7415. }
  7416. let originNext = next;
  7417. let vnodeHook;
  7418. if (true) {
  7419. pushWarningContext(next || instance.vnode);
  7420. }
  7421. toggleRecurse(instance, false);
  7422. if (next) {
  7423. next.el = vnode.el;
  7424. updateComponentPreRender(instance, next, optimized);
  7425. } else {
  7426. next = vnode;
  7427. }
  7428. if (bu) {
  7429. invokeArrayFns(bu);
  7430. }
  7431. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  7432. invokeVNodeHook(vnodeHook, parent, next, vnode);
  7433. }
  7434. toggleRecurse(instance, true);
  7435. if (true) {
  7436. startMeasure(instance, `render`);
  7437. }
  7438. const nextTree = renderComponentRoot(instance);
  7439. if (true) {
  7440. endMeasure(instance, `render`);
  7441. }
  7442. const prevTree = instance.subTree;
  7443. instance.subTree = nextTree;
  7444. if (true) {
  7445. startMeasure(instance, `patch`);
  7446. }
  7447. patch(
  7448. prevTree,
  7449. nextTree,
  7450. // parent may have changed if it's in a teleport
  7451. hostParentNode(prevTree.el),
  7452. // anchor may have changed if it's in a fragment
  7453. getNextHostNode(prevTree),
  7454. instance,
  7455. parentSuspense,
  7456. namespace
  7457. );
  7458. if (true) {
  7459. endMeasure(instance, `patch`);
  7460. }
  7461. next.el = nextTree.el;
  7462. if (originNext === null) {
  7463. updateHOCHostEl(instance, nextTree.el);
  7464. }
  7465. if (u) {
  7466. queuePostRenderEffect(u, parentSuspense);
  7467. }
  7468. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  7469. queuePostRenderEffect(
  7470. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  7471. parentSuspense
  7472. );
  7473. }
  7474. if (true) {
  7475. devtoolsComponentUpdated(instance);
  7476. }
  7477. if (true) {
  7478. popWarningContext();
  7479. }
  7480. }
  7481. };
  7482. instance.scope.on();
  7483. const effect2 = instance.effect = new ReactiveEffect(componentUpdateFn);
  7484. instance.scope.off();
  7485. const update = instance.update = effect2.run.bind(effect2);
  7486. const job = instance.job = effect2.runIfDirty.bind(effect2);
  7487. job.i = instance;
  7488. job.id = instance.uid;
  7489. effect2.scheduler = () => queueJob(job);
  7490. toggleRecurse(instance, true);
  7491. if (true) {
  7492. effect2.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  7493. effect2.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  7494. }
  7495. update();
  7496. };
  7497. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  7498. nextVNode.component = instance;
  7499. const prevProps = instance.vnode.props;
  7500. instance.vnode = nextVNode;
  7501. instance.next = null;
  7502. updateProps(instance, nextVNode.props, prevProps, optimized);
  7503. updateSlots(instance, nextVNode.children, optimized);
  7504. pauseTracking();
  7505. flushPreFlushCbs(instance);
  7506. resetTracking();
  7507. };
  7508. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  7509. const c1 = n1 && n1.children;
  7510. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  7511. const c2 = n2.children;
  7512. const { patchFlag, shapeFlag } = n2;
  7513. if (patchFlag > 0) {
  7514. if (patchFlag & 128) {
  7515. patchKeyedChildren(
  7516. c1,
  7517. c2,
  7518. container,
  7519. anchor,
  7520. parentComponent,
  7521. parentSuspense,
  7522. namespace,
  7523. slotScopeIds,
  7524. optimized
  7525. );
  7526. return;
  7527. } else if (patchFlag & 256) {
  7528. patchUnkeyedChildren(
  7529. c1,
  7530. c2,
  7531. container,
  7532. anchor,
  7533. parentComponent,
  7534. parentSuspense,
  7535. namespace,
  7536. slotScopeIds,
  7537. optimized
  7538. );
  7539. return;
  7540. }
  7541. }
  7542. if (shapeFlag & 8) {
  7543. if (prevShapeFlag & 16) {
  7544. unmountChildren(c1, parentComponent, parentSuspense);
  7545. }
  7546. if (c2 !== c1) {
  7547. hostSetElementText(container, c2);
  7548. }
  7549. } else {
  7550. if (prevShapeFlag & 16) {
  7551. if (shapeFlag & 16) {
  7552. patchKeyedChildren(
  7553. c1,
  7554. c2,
  7555. container,
  7556. anchor,
  7557. parentComponent,
  7558. parentSuspense,
  7559. namespace,
  7560. slotScopeIds,
  7561. optimized
  7562. );
  7563. } else {
  7564. unmountChildren(c1, parentComponent, parentSuspense, true);
  7565. }
  7566. } else {
  7567. if (prevShapeFlag & 8) {
  7568. hostSetElementText(container, "");
  7569. }
  7570. if (shapeFlag & 16) {
  7571. mountChildren(
  7572. c2,
  7573. container,
  7574. anchor,
  7575. parentComponent,
  7576. parentSuspense,
  7577. namespace,
  7578. slotScopeIds,
  7579. optimized
  7580. );
  7581. }
  7582. }
  7583. }
  7584. };
  7585. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7586. c1 = c1 || EMPTY_ARR;
  7587. c2 = c2 || EMPTY_ARR;
  7588. const oldLength = c1.length;
  7589. const newLength = c2.length;
  7590. const commonLength = Math.min(oldLength, newLength);
  7591. let i;
  7592. for (i = 0; i < commonLength; i++) {
  7593. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7594. patch(
  7595. c1[i],
  7596. nextChild,
  7597. container,
  7598. null,
  7599. parentComponent,
  7600. parentSuspense,
  7601. namespace,
  7602. slotScopeIds,
  7603. optimized
  7604. );
  7605. }
  7606. if (oldLength > newLength) {
  7607. unmountChildren(
  7608. c1,
  7609. parentComponent,
  7610. parentSuspense,
  7611. true,
  7612. false,
  7613. commonLength
  7614. );
  7615. } else {
  7616. mountChildren(
  7617. c2,
  7618. container,
  7619. anchor,
  7620. parentComponent,
  7621. parentSuspense,
  7622. namespace,
  7623. slotScopeIds,
  7624. optimized,
  7625. commonLength
  7626. );
  7627. }
  7628. };
  7629. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7630. let i = 0;
  7631. const l2 = c2.length;
  7632. let e1 = c1.length - 1;
  7633. let e2 = l2 - 1;
  7634. while (i <= e1 && i <= e2) {
  7635. const n1 = c1[i];
  7636. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7637. if (isSameVNodeType(n1, n2)) {
  7638. patch(
  7639. n1,
  7640. n2,
  7641. container,
  7642. null,
  7643. parentComponent,
  7644. parentSuspense,
  7645. namespace,
  7646. slotScopeIds,
  7647. optimized
  7648. );
  7649. } else {
  7650. break;
  7651. }
  7652. i++;
  7653. }
  7654. while (i <= e1 && i <= e2) {
  7655. const n1 = c1[e1];
  7656. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  7657. if (isSameVNodeType(n1, n2)) {
  7658. patch(
  7659. n1,
  7660. n2,
  7661. container,
  7662. null,
  7663. parentComponent,
  7664. parentSuspense,
  7665. namespace,
  7666. slotScopeIds,
  7667. optimized
  7668. );
  7669. } else {
  7670. break;
  7671. }
  7672. e1--;
  7673. e2--;
  7674. }
  7675. if (i > e1) {
  7676. if (i <= e2) {
  7677. const nextPos = e2 + 1;
  7678. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  7679. while (i <= e2) {
  7680. patch(
  7681. null,
  7682. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  7683. container,
  7684. anchor,
  7685. parentComponent,
  7686. parentSuspense,
  7687. namespace,
  7688. slotScopeIds,
  7689. optimized
  7690. );
  7691. i++;
  7692. }
  7693. }
  7694. } else if (i > e2) {
  7695. while (i <= e1) {
  7696. unmount(c1[i], parentComponent, parentSuspense, true);
  7697. i++;
  7698. }
  7699. } else {
  7700. const s1 = i;
  7701. const s2 = i;
  7702. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  7703. for (i = s2; i <= e2; i++) {
  7704. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7705. if (nextChild.key != null) {
  7706. if (keyToNewIndexMap.has(nextChild.key)) {
  7707. warn$1(
  7708. `Duplicate keys found during update:`,
  7709. JSON.stringify(nextChild.key),
  7710. `Make sure keys are unique.`
  7711. );
  7712. }
  7713. keyToNewIndexMap.set(nextChild.key, i);
  7714. }
  7715. }
  7716. let j;
  7717. let patched = 0;
  7718. const toBePatched = e2 - s2 + 1;
  7719. let moved = false;
  7720. let maxNewIndexSoFar = 0;
  7721. const newIndexToOldIndexMap = new Array(toBePatched);
  7722. for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
  7723. for (i = s1; i <= e1; i++) {
  7724. const prevChild = c1[i];
  7725. if (patched >= toBePatched) {
  7726. unmount(prevChild, parentComponent, parentSuspense, true);
  7727. continue;
  7728. }
  7729. let newIndex;
  7730. if (prevChild.key != null) {
  7731. newIndex = keyToNewIndexMap.get(prevChild.key);
  7732. } else {
  7733. for (j = s2; j <= e2; j++) {
  7734. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  7735. newIndex = j;
  7736. break;
  7737. }
  7738. }
  7739. }
  7740. if (newIndex === void 0) {
  7741. unmount(prevChild, parentComponent, parentSuspense, true);
  7742. } else {
  7743. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  7744. if (newIndex >= maxNewIndexSoFar) {
  7745. maxNewIndexSoFar = newIndex;
  7746. } else {
  7747. moved = true;
  7748. }
  7749. patch(
  7750. prevChild,
  7751. c2[newIndex],
  7752. container,
  7753. null,
  7754. parentComponent,
  7755. parentSuspense,
  7756. namespace,
  7757. slotScopeIds,
  7758. optimized
  7759. );
  7760. patched++;
  7761. }
  7762. }
  7763. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  7764. j = increasingNewIndexSequence.length - 1;
  7765. for (i = toBePatched - 1; i >= 0; i--) {
  7766. const nextIndex = s2 + i;
  7767. const nextChild = c2[nextIndex];
  7768. const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
  7769. if (newIndexToOldIndexMap[i] === 0) {
  7770. patch(
  7771. null,
  7772. nextChild,
  7773. container,
  7774. anchor,
  7775. parentComponent,
  7776. parentSuspense,
  7777. namespace,
  7778. slotScopeIds,
  7779. optimized
  7780. );
  7781. } else if (moved) {
  7782. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  7783. move(nextChild, container, anchor, 2);
  7784. } else {
  7785. j--;
  7786. }
  7787. }
  7788. }
  7789. }
  7790. };
  7791. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  7792. const { el, type, transition, children, shapeFlag } = vnode;
  7793. if (shapeFlag & 6) {
  7794. move(vnode.component.subTree, container, anchor, moveType);
  7795. return;
  7796. }
  7797. if (shapeFlag & 128) {
  7798. vnode.suspense.move(container, anchor, moveType);
  7799. return;
  7800. }
  7801. if (shapeFlag & 64) {
  7802. type.move(vnode, container, anchor, internals);
  7803. return;
  7804. }
  7805. if (type === Fragment) {
  7806. hostInsert(el, container, anchor);
  7807. for (let i = 0; i < children.length; i++) {
  7808. move(children[i], container, anchor, moveType);
  7809. }
  7810. hostInsert(vnode.anchor, container, anchor);
  7811. return;
  7812. }
  7813. if (type === Static) {
  7814. moveStaticNode(vnode, container, anchor);
  7815. return;
  7816. }
  7817. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  7818. if (needTransition2) {
  7819. if (moveType === 0) {
  7820. transition.beforeEnter(el);
  7821. hostInsert(el, container, anchor);
  7822. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  7823. } else {
  7824. const { leave, delayLeave, afterLeave } = transition;
  7825. const remove22 = () => hostInsert(el, container, anchor);
  7826. const performLeave = () => {
  7827. leave(el, () => {
  7828. remove22();
  7829. afterLeave && afterLeave();
  7830. });
  7831. };
  7832. if (delayLeave) {
  7833. delayLeave(el, remove22, performLeave);
  7834. } else {
  7835. performLeave();
  7836. }
  7837. }
  7838. } else {
  7839. hostInsert(el, container, anchor);
  7840. }
  7841. };
  7842. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  7843. const {
  7844. type,
  7845. props,
  7846. ref: ref2,
  7847. children,
  7848. dynamicChildren,
  7849. shapeFlag,
  7850. patchFlag,
  7851. dirs,
  7852. cacheIndex
  7853. } = vnode;
  7854. if (patchFlag === -2) {
  7855. optimized = false;
  7856. }
  7857. if (ref2 != null) {
  7858. setRef(ref2, null, parentSuspense, vnode, true);
  7859. }
  7860. if (cacheIndex != null) {
  7861. parentComponent.renderCache[cacheIndex] = void 0;
  7862. }
  7863. if (shapeFlag & 256) {
  7864. parentComponent.ctx.deactivate(vnode);
  7865. return;
  7866. }
  7867. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  7868. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  7869. let vnodeHook;
  7870. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  7871. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7872. }
  7873. if (shapeFlag & 6) {
  7874. unmountComponent(vnode.component, parentSuspense, doRemove);
  7875. } else {
  7876. if (shapeFlag & 128) {
  7877. vnode.suspense.unmount(parentSuspense, doRemove);
  7878. return;
  7879. }
  7880. if (shouldInvokeDirs) {
  7881. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  7882. }
  7883. if (shapeFlag & 64) {
  7884. vnode.type.remove(
  7885. vnode,
  7886. parentComponent,
  7887. parentSuspense,
  7888. internals,
  7889. doRemove
  7890. );
  7891. } else if (dynamicChildren && // #5154
  7892. // when v-once is used inside a block, setBlockTracking(-1) marks the
  7893. // parent block with hasOnce: true
  7894. // so that it doesn't take the fast path during unmount - otherwise
  7895. // components nested in v-once are never unmounted.
  7896. !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
  7897. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  7898. unmountChildren(
  7899. dynamicChildren,
  7900. parentComponent,
  7901. parentSuspense,
  7902. false,
  7903. true
  7904. );
  7905. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  7906. unmountChildren(children, parentComponent, parentSuspense);
  7907. }
  7908. if (doRemove) {
  7909. remove2(vnode);
  7910. }
  7911. }
  7912. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  7913. queuePostRenderEffect(() => {
  7914. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7915. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  7916. }, parentSuspense);
  7917. }
  7918. };
  7919. const remove2 = (vnode) => {
  7920. const { type, el, anchor, transition } = vnode;
  7921. if (type === Fragment) {
  7922. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
  7923. vnode.children.forEach((child) => {
  7924. if (child.type === Comment) {
  7925. hostRemove(child.el);
  7926. } else {
  7927. remove2(child);
  7928. }
  7929. });
  7930. } else {
  7931. removeFragment(el, anchor);
  7932. }
  7933. return;
  7934. }
  7935. if (type === Static) {
  7936. removeStaticNode(vnode);
  7937. return;
  7938. }
  7939. const performRemove = () => {
  7940. hostRemove(el);
  7941. if (transition && !transition.persisted && transition.afterLeave) {
  7942. transition.afterLeave();
  7943. }
  7944. };
  7945. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  7946. const { leave, delayLeave } = transition;
  7947. const performLeave = () => leave(el, performRemove);
  7948. if (delayLeave) {
  7949. delayLeave(vnode.el, performRemove, performLeave);
  7950. } else {
  7951. performLeave();
  7952. }
  7953. } else {
  7954. performRemove();
  7955. }
  7956. };
  7957. const removeFragment = (cur, end) => {
  7958. let next;
  7959. while (cur !== end) {
  7960. next = hostNextSibling(cur);
  7961. hostRemove(cur);
  7962. cur = next;
  7963. }
  7964. hostRemove(end);
  7965. };
  7966. const unmountComponent = (instance, parentSuspense, doRemove) => {
  7967. if (instance.type.__hmrId) {
  7968. unregisterHMR(instance);
  7969. }
  7970. const { bum, scope, job, subTree, um, m, a } = instance;
  7971. invalidateMount(m);
  7972. invalidateMount(a);
  7973. if (bum) {
  7974. invokeArrayFns(bum);
  7975. }
  7976. scope.stop();
  7977. if (job) {
  7978. job.flags |= 8;
  7979. unmount(subTree, instance, parentSuspense, doRemove);
  7980. }
  7981. if (um) {
  7982. queuePostRenderEffect(um, parentSuspense);
  7983. }
  7984. queuePostRenderEffect(() => {
  7985. instance.isUnmounted = true;
  7986. }, parentSuspense);
  7987. if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
  7988. parentSuspense.deps--;
  7989. if (parentSuspense.deps === 0) {
  7990. parentSuspense.resolve();
  7991. }
  7992. }
  7993. if (true) {
  7994. devtoolsComponentRemoved(instance);
  7995. }
  7996. };
  7997. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  7998. for (let i = start; i < children.length; i++) {
  7999. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  8000. }
  8001. };
  8002. const getNextHostNode = (vnode) => {
  8003. if (vnode.shapeFlag & 6) {
  8004. return getNextHostNode(vnode.component.subTree);
  8005. }
  8006. if (vnode.shapeFlag & 128) {
  8007. return vnode.suspense.next();
  8008. }
  8009. const el = hostNextSibling(vnode.anchor || vnode.el);
  8010. const teleportEnd = el && el[TeleportEndKey];
  8011. return teleportEnd ? hostNextSibling(teleportEnd) : el;
  8012. };
  8013. let isFlushing = false;
  8014. const render2 = (vnode, container, namespace) => {
  8015. if (vnode == null) {
  8016. if (container._vnode) {
  8017. unmount(container._vnode, null, null, true);
  8018. }
  8019. } else {
  8020. patch(
  8021. container._vnode || null,
  8022. vnode,
  8023. container,
  8024. null,
  8025. null,
  8026. null,
  8027. namespace
  8028. );
  8029. }
  8030. container._vnode = vnode;
  8031. if (!isFlushing) {
  8032. isFlushing = true;
  8033. flushPreFlushCbs();
  8034. flushPostFlushCbs();
  8035. isFlushing = false;
  8036. }
  8037. };
  8038. const internals = {
  8039. p: patch,
  8040. um: unmount,
  8041. m: move,
  8042. r: remove2,
  8043. mt: mountComponent,
  8044. mc: mountChildren,
  8045. pc: patchChildren,
  8046. pbc: patchBlockChildren,
  8047. n: getNextHostNode,
  8048. o: options
  8049. };
  8050. let hydrate2;
  8051. let hydrateNode;
  8052. if (createHydrationFns) {
  8053. [hydrate2, hydrateNode] = createHydrationFns(
  8054. internals
  8055. );
  8056. }
  8057. return {
  8058. render: render2,
  8059. hydrate: hydrate2,
  8060. createApp: createAppAPI(render2, hydrate2)
  8061. };
  8062. }
  8063. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  8064. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  8065. }
  8066. function toggleRecurse({ effect: effect2, job }, allowed) {
  8067. if (allowed) {
  8068. effect2.flags |= 32;
  8069. job.flags |= 4;
  8070. } else {
  8071. effect2.flags &= ~32;
  8072. job.flags &= ~4;
  8073. }
  8074. }
  8075. function needTransition(parentSuspense, transition) {
  8076. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  8077. }
  8078. function traverseStaticChildren(n1, n2, shallow = false) {
  8079. const ch1 = n1.children;
  8080. const ch2 = n2.children;
  8081. if (isArray(ch1) && isArray(ch2)) {
  8082. for (let i = 0; i < ch1.length; i++) {
  8083. const c1 = ch1[i];
  8084. let c2 = ch2[i];
  8085. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  8086. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  8087. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  8088. c2.el = c1.el;
  8089. }
  8090. if (!shallow && c2.patchFlag !== -2)
  8091. traverseStaticChildren(c1, c2);
  8092. }
  8093. if (c2.type === Text) {
  8094. c2.el = c1.el;
  8095. }
  8096. if (c2.type === Comment && !c2.el) {
  8097. c2.el = c1.el;
  8098. }
  8099. }
  8100. }
  8101. }
  8102. function getSequence(arr) {
  8103. const p2 = arr.slice();
  8104. const result = [0];
  8105. let i, j, u, v, c;
  8106. const len = arr.length;
  8107. for (i = 0; i < len; i++) {
  8108. const arrI = arr[i];
  8109. if (arrI !== 0) {
  8110. j = result[result.length - 1];
  8111. if (arr[j] < arrI) {
  8112. p2[i] = j;
  8113. result.push(i);
  8114. continue;
  8115. }
  8116. u = 0;
  8117. v = result.length - 1;
  8118. while (u < v) {
  8119. c = u + v >> 1;
  8120. if (arr[result[c]] < arrI) {
  8121. u = c + 1;
  8122. } else {
  8123. v = c;
  8124. }
  8125. }
  8126. if (arrI < arr[result[u]]) {
  8127. if (u > 0) {
  8128. p2[i] = result[u - 1];
  8129. }
  8130. result[u] = i;
  8131. }
  8132. }
  8133. }
  8134. u = result.length;
  8135. v = result[u - 1];
  8136. while (u-- > 0) {
  8137. result[u] = v;
  8138. v = p2[v];
  8139. }
  8140. return result;
  8141. }
  8142. function locateNonHydratedAsyncRoot(instance) {
  8143. const subComponent = instance.subTree.component;
  8144. if (subComponent) {
  8145. if (subComponent.asyncDep && !subComponent.asyncResolved) {
  8146. return subComponent;
  8147. } else {
  8148. return locateNonHydratedAsyncRoot(subComponent);
  8149. }
  8150. }
  8151. }
  8152. function invalidateMount(hooks) {
  8153. if (hooks) {
  8154. for (let i = 0; i < hooks.length; i++)
  8155. hooks[i].flags |= 8;
  8156. }
  8157. }
  8158. var ssrContextKey = Symbol.for("v-scx");
  8159. var useSSRContext = () => {
  8160. {
  8161. const ctx = inject(ssrContextKey);
  8162. if (!ctx) {
  8163. warn$1(
  8164. `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
  8165. );
  8166. }
  8167. return ctx;
  8168. }
  8169. };
  8170. function watchEffect(effect2, options) {
  8171. return doWatch(effect2, null, options);
  8172. }
  8173. function watchPostEffect(effect2, options) {
  8174. return doWatch(
  8175. effect2,
  8176. null,
  8177. true ? extend({}, options, { flush: "post" }) : { flush: "post" }
  8178. );
  8179. }
  8180. function watchSyncEffect(effect2, options) {
  8181. return doWatch(
  8182. effect2,
  8183. null,
  8184. true ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
  8185. );
  8186. }
  8187. function watch2(source, cb, options) {
  8188. if (!isFunction(cb)) {
  8189. warn$1(
  8190. `\`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.`
  8191. );
  8192. }
  8193. return doWatch(source, cb, options);
  8194. }
  8195. function doWatch(source, cb, options = EMPTY_OBJ) {
  8196. const { immediate, deep, flush, once } = options;
  8197. if (!cb) {
  8198. if (immediate !== void 0) {
  8199. warn$1(
  8200. `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
  8201. );
  8202. }
  8203. if (deep !== void 0) {
  8204. warn$1(
  8205. `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
  8206. );
  8207. }
  8208. if (once !== void 0) {
  8209. warn$1(
  8210. `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
  8211. );
  8212. }
  8213. }
  8214. const baseWatchOptions = extend({}, options);
  8215. if (true) baseWatchOptions.onWarn = warn$1;
  8216. const runsImmediately = cb && immediate || !cb && flush !== "post";
  8217. let ssrCleanup;
  8218. if (isInSSRComponentSetup) {
  8219. if (flush === "sync") {
  8220. const ctx = useSSRContext();
  8221. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  8222. } else if (!runsImmediately) {
  8223. const watchStopHandle = () => {
  8224. };
  8225. watchStopHandle.stop = NOOP;
  8226. watchStopHandle.resume = NOOP;
  8227. watchStopHandle.pause = NOOP;
  8228. return watchStopHandle;
  8229. }
  8230. }
  8231. const instance = currentInstance;
  8232. baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
  8233. let isPre = false;
  8234. if (flush === "post") {
  8235. baseWatchOptions.scheduler = (job) => {
  8236. queuePostRenderEffect(job, instance && instance.suspense);
  8237. };
  8238. } else if (flush !== "sync") {
  8239. isPre = true;
  8240. baseWatchOptions.scheduler = (job, isFirstRun) => {
  8241. if (isFirstRun) {
  8242. job();
  8243. } else {
  8244. queueJob(job);
  8245. }
  8246. };
  8247. }
  8248. baseWatchOptions.augmentJob = (job) => {
  8249. if (cb) {
  8250. job.flags |= 4;
  8251. }
  8252. if (isPre) {
  8253. job.flags |= 2;
  8254. if (instance) {
  8255. job.id = instance.uid;
  8256. job.i = instance;
  8257. }
  8258. }
  8259. };
  8260. const watchHandle = watch(source, cb, baseWatchOptions);
  8261. if (isInSSRComponentSetup) {
  8262. if (ssrCleanup) {
  8263. ssrCleanup.push(watchHandle);
  8264. } else if (runsImmediately) {
  8265. watchHandle();
  8266. }
  8267. }
  8268. return watchHandle;
  8269. }
  8270. function instanceWatch(source, value, options) {
  8271. const publicThis = this.proxy;
  8272. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  8273. let cb;
  8274. if (isFunction(value)) {
  8275. cb = value;
  8276. } else {
  8277. cb = value.handler;
  8278. options = value;
  8279. }
  8280. const reset = setCurrentInstance(this);
  8281. const res = doWatch(getter, cb.bind(publicThis), options);
  8282. reset();
  8283. return res;
  8284. }
  8285. function createPathGetter(ctx, path) {
  8286. const segments = path.split(".");
  8287. return () => {
  8288. let cur = ctx;
  8289. for (let i = 0; i < segments.length && cur; i++) {
  8290. cur = cur[segments[i]];
  8291. }
  8292. return cur;
  8293. };
  8294. }
  8295. function useModel(props, name, options = EMPTY_OBJ) {
  8296. const i = getCurrentInstance();
  8297. if (!i) {
  8298. warn$1(`useModel() called without active instance.`);
  8299. return ref();
  8300. }
  8301. const camelizedName = camelize(name);
  8302. if (!i.propsOptions[0][camelizedName]) {
  8303. warn$1(`useModel() called with prop "${name}" which is not declared.`);
  8304. return ref();
  8305. }
  8306. const hyphenatedName = hyphenate(name);
  8307. const modifiers = getModelModifiers(props, camelizedName);
  8308. const res = customRef((track2, trigger2) => {
  8309. let localValue;
  8310. let prevSetValue = EMPTY_OBJ;
  8311. let prevEmittedValue;
  8312. watchSyncEffect(() => {
  8313. const propValue = props[camelizedName];
  8314. if (hasChanged(localValue, propValue)) {
  8315. localValue = propValue;
  8316. trigger2();
  8317. }
  8318. });
  8319. return {
  8320. get() {
  8321. track2();
  8322. return options.get ? options.get(localValue) : localValue;
  8323. },
  8324. set(value) {
  8325. const emittedValue = options.set ? options.set(value) : value;
  8326. if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
  8327. return;
  8328. }
  8329. const rawProps = i.vnode.props;
  8330. if (!(rawProps && // check if parent has passed v-model
  8331. (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
  8332. localValue = value;
  8333. trigger2();
  8334. }
  8335. i.emit(`update:${name}`, emittedValue);
  8336. if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
  8337. trigger2();
  8338. }
  8339. prevSetValue = value;
  8340. prevEmittedValue = emittedValue;
  8341. }
  8342. };
  8343. });
  8344. res[Symbol.iterator] = () => {
  8345. let i2 = 0;
  8346. return {
  8347. next() {
  8348. if (i2 < 2) {
  8349. return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };
  8350. } else {
  8351. return { done: true };
  8352. }
  8353. }
  8354. };
  8355. };
  8356. return res;
  8357. }
  8358. var getModelModifiers = (props, modelName) => {
  8359. return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
  8360. };
  8361. function emit(instance, event, ...rawArgs) {
  8362. if (instance.isUnmounted) return;
  8363. const props = instance.vnode.props || EMPTY_OBJ;
  8364. if (true) {
  8365. const {
  8366. emitsOptions,
  8367. propsOptions: [propsOptions]
  8368. } = instance;
  8369. if (emitsOptions) {
  8370. if (!(event in emitsOptions) && true) {
  8371. if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
  8372. warn$1(
  8373. `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
  8374. );
  8375. }
  8376. } else {
  8377. const validator = emitsOptions[event];
  8378. if (isFunction(validator)) {
  8379. const isValid = validator(...rawArgs);
  8380. if (!isValid) {
  8381. warn$1(
  8382. `Invalid event arguments: event validation failed for event "${event}".`
  8383. );
  8384. }
  8385. }
  8386. }
  8387. }
  8388. }
  8389. let args = rawArgs;
  8390. const isModelListener2 = event.startsWith("update:");
  8391. const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
  8392. if (modifiers) {
  8393. if (modifiers.trim) {
  8394. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  8395. }
  8396. if (modifiers.number) {
  8397. args = rawArgs.map(looseToNumber);
  8398. }
  8399. }
  8400. if (true) {
  8401. devtoolsComponentEmit(instance, event, args);
  8402. }
  8403. if (true) {
  8404. const lowerCaseEvent = event.toLowerCase();
  8405. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
  8406. warn$1(
  8407. `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
  8408. instance,
  8409. instance.type
  8410. )} 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(
  8411. event
  8412. )}" instead of "${event}".`
  8413. );
  8414. }
  8415. }
  8416. let handlerName;
  8417. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  8418. props[handlerName = toHandlerKey(camelize(event))];
  8419. if (!handler && isModelListener2) {
  8420. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  8421. }
  8422. if (handler) {
  8423. callWithAsyncErrorHandling(
  8424. handler,
  8425. instance,
  8426. 6,
  8427. args
  8428. );
  8429. }
  8430. const onceHandler = props[handlerName + `Once`];
  8431. if (onceHandler) {
  8432. if (!instance.emitted) {
  8433. instance.emitted = {};
  8434. } else if (instance.emitted[handlerName]) {
  8435. return;
  8436. }
  8437. instance.emitted[handlerName] = true;
  8438. callWithAsyncErrorHandling(
  8439. onceHandler,
  8440. instance,
  8441. 6,
  8442. args
  8443. );
  8444. }
  8445. }
  8446. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  8447. const cache = appContext.emitsCache;
  8448. const cached = cache.get(comp);
  8449. if (cached !== void 0) {
  8450. return cached;
  8451. }
  8452. const raw = comp.emits;
  8453. let normalized = {};
  8454. let hasExtends = false;
  8455. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  8456. const extendEmits = (raw2) => {
  8457. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  8458. if (normalizedFromExtend) {
  8459. hasExtends = true;
  8460. extend(normalized, normalizedFromExtend);
  8461. }
  8462. };
  8463. if (!asMixin && appContext.mixins.length) {
  8464. appContext.mixins.forEach(extendEmits);
  8465. }
  8466. if (comp.extends) {
  8467. extendEmits(comp.extends);
  8468. }
  8469. if (comp.mixins) {
  8470. comp.mixins.forEach(extendEmits);
  8471. }
  8472. }
  8473. if (!raw && !hasExtends) {
  8474. if (isObject(comp)) {
  8475. cache.set(comp, null);
  8476. }
  8477. return null;
  8478. }
  8479. if (isArray(raw)) {
  8480. raw.forEach((key) => normalized[key] = null);
  8481. } else {
  8482. extend(normalized, raw);
  8483. }
  8484. if (isObject(comp)) {
  8485. cache.set(comp, normalized);
  8486. }
  8487. return normalized;
  8488. }
  8489. function isEmitListener(options, key) {
  8490. if (!options || !isOn(key)) {
  8491. return false;
  8492. }
  8493. key = key.slice(2).replace(/Once$/, "");
  8494. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  8495. }
  8496. var accessedAttrs = false;
  8497. function markAttrsAccessed() {
  8498. accessedAttrs = true;
  8499. }
  8500. function renderComponentRoot(instance) {
  8501. const {
  8502. type: Component,
  8503. vnode,
  8504. proxy,
  8505. withProxy,
  8506. propsOptions: [propsOptions],
  8507. slots,
  8508. attrs,
  8509. emit: emit2,
  8510. render: render2,
  8511. renderCache,
  8512. props,
  8513. data,
  8514. setupState,
  8515. ctx,
  8516. inheritAttrs
  8517. } = instance;
  8518. const prev = setCurrentRenderingInstance(instance);
  8519. let result;
  8520. let fallthroughAttrs;
  8521. if (true) {
  8522. accessedAttrs = false;
  8523. }
  8524. try {
  8525. if (vnode.shapeFlag & 4) {
  8526. const proxyToUse = withProxy || proxy;
  8527. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
  8528. get(target, key, receiver) {
  8529. warn$1(
  8530. `Property '${String(
  8531. key
  8532. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  8533. );
  8534. return Reflect.get(target, key, receiver);
  8535. }
  8536. }) : proxyToUse;
  8537. result = normalizeVNode(
  8538. render2.call(
  8539. thisProxy,
  8540. proxyToUse,
  8541. renderCache,
  8542. true ? shallowReadonly(props) : props,
  8543. setupState,
  8544. data,
  8545. ctx
  8546. )
  8547. );
  8548. fallthroughAttrs = attrs;
  8549. } else {
  8550. const render22 = Component;
  8551. if (attrs === props) {
  8552. markAttrsAccessed();
  8553. }
  8554. result = normalizeVNode(
  8555. render22.length > 1 ? render22(
  8556. true ? shallowReadonly(props) : props,
  8557. true ? {
  8558. get attrs() {
  8559. markAttrsAccessed();
  8560. return shallowReadonly(attrs);
  8561. },
  8562. slots,
  8563. emit: emit2
  8564. } : { attrs, slots, emit: emit2 }
  8565. ) : render22(
  8566. true ? shallowReadonly(props) : props,
  8567. null
  8568. )
  8569. );
  8570. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  8571. }
  8572. } catch (err) {
  8573. blockStack.length = 0;
  8574. handleError(err, instance, 1);
  8575. result = createVNode(Comment);
  8576. }
  8577. let root = result;
  8578. let setRoot = void 0;
  8579. if (result.patchFlag > 0 && result.patchFlag & 2048) {
  8580. [root, setRoot] = getChildRoot(result);
  8581. }
  8582. if (fallthroughAttrs && inheritAttrs !== false) {
  8583. const keys = Object.keys(fallthroughAttrs);
  8584. const { shapeFlag } = root;
  8585. if (keys.length) {
  8586. if (shapeFlag & (1 | 6)) {
  8587. if (propsOptions && keys.some(isModelListener)) {
  8588. fallthroughAttrs = filterModelListeners(
  8589. fallthroughAttrs,
  8590. propsOptions
  8591. );
  8592. }
  8593. root = cloneVNode(root, fallthroughAttrs, false, true);
  8594. } else if (!accessedAttrs && root.type !== Comment) {
  8595. const allAttrs = Object.keys(attrs);
  8596. const eventAttrs = [];
  8597. const extraAttrs = [];
  8598. for (let i = 0, l = allAttrs.length; i < l; i++) {
  8599. const key = allAttrs[i];
  8600. if (isOn(key)) {
  8601. if (!isModelListener(key)) {
  8602. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  8603. }
  8604. } else {
  8605. extraAttrs.push(key);
  8606. }
  8607. }
  8608. if (extraAttrs.length) {
  8609. warn$1(
  8610. `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
  8611. );
  8612. }
  8613. if (eventAttrs.length) {
  8614. warn$1(
  8615. `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
  8616. );
  8617. }
  8618. }
  8619. }
  8620. }
  8621. if (vnode.dirs) {
  8622. if (!isElementRoot(root)) {
  8623. warn$1(
  8624. `Runtime directive used on component with non-element root node. The directives will not function as intended.`
  8625. );
  8626. }
  8627. root = cloneVNode(root, null, false, true);
  8628. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  8629. }
  8630. if (vnode.transition) {
  8631. if (!isElementRoot(root)) {
  8632. warn$1(
  8633. `Component inside <Transition> renders non-element root node that cannot be animated.`
  8634. );
  8635. }
  8636. setTransitionHooks(root, vnode.transition);
  8637. }
  8638. if (setRoot) {
  8639. setRoot(root);
  8640. } else {
  8641. result = root;
  8642. }
  8643. setCurrentRenderingInstance(prev);
  8644. return result;
  8645. }
  8646. var getChildRoot = (vnode) => {
  8647. const rawChildren = vnode.children;
  8648. const dynamicChildren = vnode.dynamicChildren;
  8649. const childRoot = filterSingleRoot(rawChildren, false);
  8650. if (!childRoot) {
  8651. return [vnode, void 0];
  8652. } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
  8653. return getChildRoot(childRoot);
  8654. }
  8655. const index = rawChildren.indexOf(childRoot);
  8656. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  8657. const setRoot = (updatedRoot) => {
  8658. rawChildren[index] = updatedRoot;
  8659. if (dynamicChildren) {
  8660. if (dynamicIndex > -1) {
  8661. dynamicChildren[dynamicIndex] = updatedRoot;
  8662. } else if (updatedRoot.patchFlag > 0) {
  8663. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  8664. }
  8665. }
  8666. };
  8667. return [normalizeVNode(childRoot), setRoot];
  8668. };
  8669. function filterSingleRoot(children, recurse = true) {
  8670. let singleRoot;
  8671. for (let i = 0; i < children.length; i++) {
  8672. const child = children[i];
  8673. if (isVNode(child)) {
  8674. if (child.type !== Comment || child.children === "v-if") {
  8675. if (singleRoot) {
  8676. return;
  8677. } else {
  8678. singleRoot = child;
  8679. if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
  8680. return filterSingleRoot(singleRoot.children);
  8681. }
  8682. }
  8683. }
  8684. } else {
  8685. return;
  8686. }
  8687. }
  8688. return singleRoot;
  8689. }
  8690. var getFunctionalFallthrough = (attrs) => {
  8691. let res;
  8692. for (const key in attrs) {
  8693. if (key === "class" || key === "style" || isOn(key)) {
  8694. (res || (res = {}))[key] = attrs[key];
  8695. }
  8696. }
  8697. return res;
  8698. };
  8699. var filterModelListeners = (attrs, props) => {
  8700. const res = {};
  8701. for (const key in attrs) {
  8702. if (!isModelListener(key) || !(key.slice(9) in props)) {
  8703. res[key] = attrs[key];
  8704. }
  8705. }
  8706. return res;
  8707. };
  8708. var isElementRoot = (vnode) => {
  8709. return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
  8710. };
  8711. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  8712. const { props: prevProps, children: prevChildren, component } = prevVNode;
  8713. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  8714. const emits = component.emitsOptions;
  8715. if ((prevChildren || nextChildren) && isHmrUpdating) {
  8716. return true;
  8717. }
  8718. if (nextVNode.dirs || nextVNode.transition) {
  8719. return true;
  8720. }
  8721. if (optimized && patchFlag >= 0) {
  8722. if (patchFlag & 1024) {
  8723. return true;
  8724. }
  8725. if (patchFlag & 16) {
  8726. if (!prevProps) {
  8727. return !!nextProps;
  8728. }
  8729. return hasPropsChanged(prevProps, nextProps, emits);
  8730. } else if (patchFlag & 8) {
  8731. const dynamicProps = nextVNode.dynamicProps;
  8732. for (let i = 0; i < dynamicProps.length; i++) {
  8733. const key = dynamicProps[i];
  8734. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  8735. return true;
  8736. }
  8737. }
  8738. }
  8739. } else {
  8740. if (prevChildren || nextChildren) {
  8741. if (!nextChildren || !nextChildren.$stable) {
  8742. return true;
  8743. }
  8744. }
  8745. if (prevProps === nextProps) {
  8746. return false;
  8747. }
  8748. if (!prevProps) {
  8749. return !!nextProps;
  8750. }
  8751. if (!nextProps) {
  8752. return true;
  8753. }
  8754. return hasPropsChanged(prevProps, nextProps, emits);
  8755. }
  8756. return false;
  8757. }
  8758. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  8759. const nextKeys = Object.keys(nextProps);
  8760. if (nextKeys.length !== Object.keys(prevProps).length) {
  8761. return true;
  8762. }
  8763. for (let i = 0; i < nextKeys.length; i++) {
  8764. const key = nextKeys[i];
  8765. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  8766. return true;
  8767. }
  8768. }
  8769. return false;
  8770. }
  8771. function updateHOCHostEl({ vnode, parent }, el) {
  8772. while (parent) {
  8773. const root = parent.subTree;
  8774. if (root.suspense && root.suspense.activeBranch === vnode) {
  8775. root.el = vnode.el;
  8776. }
  8777. if (root === vnode) {
  8778. (vnode = parent.vnode).el = el;
  8779. parent = parent.parent;
  8780. } else {
  8781. break;
  8782. }
  8783. }
  8784. }
  8785. var isSuspense = (type) => type.__isSuspense;
  8786. var suspenseId = 0;
  8787. var SuspenseImpl = {
  8788. name: "Suspense",
  8789. // In order to make Suspense tree-shakable, we need to avoid importing it
  8790. // directly in the renderer. The renderer checks for the __isSuspense flag
  8791. // on a vnode's type and calls the `process` method, passing in renderer
  8792. // internals.
  8793. __isSuspense: true,
  8794. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  8795. if (n1 == null) {
  8796. mountSuspense(
  8797. n2,
  8798. container,
  8799. anchor,
  8800. parentComponent,
  8801. parentSuspense,
  8802. namespace,
  8803. slotScopeIds,
  8804. optimized,
  8805. rendererInternals
  8806. );
  8807. } else {
  8808. if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
  8809. n2.suspense = n1.suspense;
  8810. n2.suspense.vnode = n2;
  8811. n2.el = n1.el;
  8812. return;
  8813. }
  8814. patchSuspense(
  8815. n1,
  8816. n2,
  8817. container,
  8818. anchor,
  8819. parentComponent,
  8820. namespace,
  8821. slotScopeIds,
  8822. optimized,
  8823. rendererInternals
  8824. );
  8825. }
  8826. },
  8827. hydrate: hydrateSuspense,
  8828. normalize: normalizeSuspenseChildren
  8829. };
  8830. var Suspense = SuspenseImpl;
  8831. function triggerEvent(vnode, name) {
  8832. const eventListener = vnode.props && vnode.props[name];
  8833. if (isFunction(eventListener)) {
  8834. eventListener();
  8835. }
  8836. }
  8837. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  8838. const {
  8839. p: patch,
  8840. o: { createElement }
  8841. } = rendererInternals;
  8842. const hiddenContainer = createElement("div");
  8843. const suspense = vnode.suspense = createSuspenseBoundary(
  8844. vnode,
  8845. parentSuspense,
  8846. parentComponent,
  8847. container,
  8848. hiddenContainer,
  8849. anchor,
  8850. namespace,
  8851. slotScopeIds,
  8852. optimized,
  8853. rendererInternals
  8854. );
  8855. patch(
  8856. null,
  8857. suspense.pendingBranch = vnode.ssContent,
  8858. hiddenContainer,
  8859. null,
  8860. parentComponent,
  8861. suspense,
  8862. namespace,
  8863. slotScopeIds
  8864. );
  8865. if (suspense.deps > 0) {
  8866. triggerEvent(vnode, "onPending");
  8867. triggerEvent(vnode, "onFallback");
  8868. patch(
  8869. null,
  8870. vnode.ssFallback,
  8871. container,
  8872. anchor,
  8873. parentComponent,
  8874. null,
  8875. // fallback tree will not have suspense context
  8876. namespace,
  8877. slotScopeIds
  8878. );
  8879. setActiveBranch(suspense, vnode.ssFallback);
  8880. } else {
  8881. suspense.resolve(false, true);
  8882. }
  8883. }
  8884. function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  8885. const suspense = n2.suspense = n1.suspense;
  8886. suspense.vnode = n2;
  8887. n2.el = n1.el;
  8888. const newBranch = n2.ssContent;
  8889. const newFallback = n2.ssFallback;
  8890. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  8891. if (pendingBranch) {
  8892. suspense.pendingBranch = newBranch;
  8893. if (isSameVNodeType(newBranch, pendingBranch)) {
  8894. patch(
  8895. pendingBranch,
  8896. newBranch,
  8897. suspense.hiddenContainer,
  8898. null,
  8899. parentComponent,
  8900. suspense,
  8901. namespace,
  8902. slotScopeIds,
  8903. optimized
  8904. );
  8905. if (suspense.deps <= 0) {
  8906. suspense.resolve();
  8907. } else if (isInFallback) {
  8908. if (!isHydrating) {
  8909. patch(
  8910. activeBranch,
  8911. newFallback,
  8912. container,
  8913. anchor,
  8914. parentComponent,
  8915. null,
  8916. // fallback tree will not have suspense context
  8917. namespace,
  8918. slotScopeIds,
  8919. optimized
  8920. );
  8921. setActiveBranch(suspense, newFallback);
  8922. }
  8923. }
  8924. } else {
  8925. suspense.pendingId = suspenseId++;
  8926. if (isHydrating) {
  8927. suspense.isHydrating = false;
  8928. suspense.activeBranch = pendingBranch;
  8929. } else {
  8930. unmount(pendingBranch, parentComponent, suspense);
  8931. }
  8932. suspense.deps = 0;
  8933. suspense.effects.length = 0;
  8934. suspense.hiddenContainer = createElement("div");
  8935. if (isInFallback) {
  8936. patch(
  8937. null,
  8938. newBranch,
  8939. suspense.hiddenContainer,
  8940. null,
  8941. parentComponent,
  8942. suspense,
  8943. namespace,
  8944. slotScopeIds,
  8945. optimized
  8946. );
  8947. if (suspense.deps <= 0) {
  8948. suspense.resolve();
  8949. } else {
  8950. patch(
  8951. activeBranch,
  8952. newFallback,
  8953. container,
  8954. anchor,
  8955. parentComponent,
  8956. null,
  8957. // fallback tree will not have suspense context
  8958. namespace,
  8959. slotScopeIds,
  8960. optimized
  8961. );
  8962. setActiveBranch(suspense, newFallback);
  8963. }
  8964. } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  8965. patch(
  8966. activeBranch,
  8967. newBranch,
  8968. container,
  8969. anchor,
  8970. parentComponent,
  8971. suspense,
  8972. namespace,
  8973. slotScopeIds,
  8974. optimized
  8975. );
  8976. suspense.resolve(true);
  8977. } else {
  8978. patch(
  8979. null,
  8980. newBranch,
  8981. suspense.hiddenContainer,
  8982. null,
  8983. parentComponent,
  8984. suspense,
  8985. namespace,
  8986. slotScopeIds,
  8987. optimized
  8988. );
  8989. if (suspense.deps <= 0) {
  8990. suspense.resolve();
  8991. }
  8992. }
  8993. }
  8994. } else {
  8995. if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  8996. patch(
  8997. activeBranch,
  8998. newBranch,
  8999. container,
  9000. anchor,
  9001. parentComponent,
  9002. suspense,
  9003. namespace,
  9004. slotScopeIds,
  9005. optimized
  9006. );
  9007. setActiveBranch(suspense, newBranch);
  9008. } else {
  9009. triggerEvent(n2, "onPending");
  9010. suspense.pendingBranch = newBranch;
  9011. if (newBranch.shapeFlag & 512) {
  9012. suspense.pendingId = newBranch.component.suspenseId;
  9013. } else {
  9014. suspense.pendingId = suspenseId++;
  9015. }
  9016. patch(
  9017. null,
  9018. newBranch,
  9019. suspense.hiddenContainer,
  9020. null,
  9021. parentComponent,
  9022. suspense,
  9023. namespace,
  9024. slotScopeIds,
  9025. optimized
  9026. );
  9027. if (suspense.deps <= 0) {
  9028. suspense.resolve();
  9029. } else {
  9030. const { timeout, pendingId } = suspense;
  9031. if (timeout > 0) {
  9032. setTimeout(() => {
  9033. if (suspense.pendingId === pendingId) {
  9034. suspense.fallback(newFallback);
  9035. }
  9036. }, timeout);
  9037. } else if (timeout === 0) {
  9038. suspense.fallback(newFallback);
  9039. }
  9040. }
  9041. }
  9042. }
  9043. }
  9044. var hasWarned = false;
  9045. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  9046. if (!hasWarned) {
  9047. hasWarned = true;
  9048. console[console.info ? "info" : "log"](
  9049. `<Suspense> is an experimental feature and its API will likely change.`
  9050. );
  9051. }
  9052. const {
  9053. p: patch,
  9054. m: move,
  9055. um: unmount,
  9056. n: next,
  9057. o: { parentNode, remove: remove2 }
  9058. } = rendererInternals;
  9059. let parentSuspenseId;
  9060. const isSuspensible = isVNodeSuspensible(vnode);
  9061. if (isSuspensible) {
  9062. if (parentSuspense && parentSuspense.pendingBranch) {
  9063. parentSuspenseId = parentSuspense.pendingId;
  9064. parentSuspense.deps++;
  9065. }
  9066. }
  9067. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  9068. if (true) {
  9069. assertNumber(timeout, `Suspense timeout`);
  9070. }
  9071. const initialAnchor = anchor;
  9072. const suspense = {
  9073. vnode,
  9074. parent: parentSuspense,
  9075. parentComponent,
  9076. namespace,
  9077. container,
  9078. hiddenContainer,
  9079. deps: 0,
  9080. pendingId: suspenseId++,
  9081. timeout: typeof timeout === "number" ? timeout : -1,
  9082. activeBranch: null,
  9083. pendingBranch: null,
  9084. isInFallback: !isHydrating,
  9085. isHydrating,
  9086. isUnmounted: false,
  9087. effects: [],
  9088. resolve(resume = false, sync = false) {
  9089. if (true) {
  9090. if (!resume && !suspense.pendingBranch) {
  9091. throw new Error(
  9092. `suspense.resolve() is called without a pending branch.`
  9093. );
  9094. }
  9095. if (suspense.isUnmounted) {
  9096. throw new Error(
  9097. `suspense.resolve() is called on an already unmounted suspense boundary.`
  9098. );
  9099. }
  9100. }
  9101. const {
  9102. vnode: vnode2,
  9103. activeBranch,
  9104. pendingBranch,
  9105. pendingId,
  9106. effects,
  9107. parentComponent: parentComponent2,
  9108. container: container2
  9109. } = suspense;
  9110. let delayEnter = false;
  9111. if (suspense.isHydrating) {
  9112. suspense.isHydrating = false;
  9113. } else if (!resume) {
  9114. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  9115. if (delayEnter) {
  9116. activeBranch.transition.afterLeave = () => {
  9117. if (pendingId === suspense.pendingId) {
  9118. move(
  9119. pendingBranch,
  9120. container2,
  9121. anchor === initialAnchor ? next(activeBranch) : anchor,
  9122. 0
  9123. );
  9124. queuePostFlushCb(effects);
  9125. }
  9126. };
  9127. }
  9128. if (activeBranch) {
  9129. if (parentNode(activeBranch.el) === container2) {
  9130. anchor = next(activeBranch);
  9131. }
  9132. unmount(activeBranch, parentComponent2, suspense, true);
  9133. }
  9134. if (!delayEnter) {
  9135. move(pendingBranch, container2, anchor, 0);
  9136. }
  9137. }
  9138. setActiveBranch(suspense, pendingBranch);
  9139. suspense.pendingBranch = null;
  9140. suspense.isInFallback = false;
  9141. let parent = suspense.parent;
  9142. let hasUnresolvedAncestor = false;
  9143. while (parent) {
  9144. if (parent.pendingBranch) {
  9145. parent.effects.push(...effects);
  9146. hasUnresolvedAncestor = true;
  9147. break;
  9148. }
  9149. parent = parent.parent;
  9150. }
  9151. if (!hasUnresolvedAncestor && !delayEnter) {
  9152. queuePostFlushCb(effects);
  9153. }
  9154. suspense.effects = [];
  9155. if (isSuspensible) {
  9156. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  9157. parentSuspense.deps--;
  9158. if (parentSuspense.deps === 0 && !sync) {
  9159. parentSuspense.resolve();
  9160. }
  9161. }
  9162. }
  9163. triggerEvent(vnode2, "onResolve");
  9164. },
  9165. fallback(fallbackVNode) {
  9166. if (!suspense.pendingBranch) {
  9167. return;
  9168. }
  9169. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
  9170. triggerEvent(vnode2, "onFallback");
  9171. const anchor2 = next(activeBranch);
  9172. const mountFallback = () => {
  9173. if (!suspense.isInFallback) {
  9174. return;
  9175. }
  9176. patch(
  9177. null,
  9178. fallbackVNode,
  9179. container2,
  9180. anchor2,
  9181. parentComponent2,
  9182. null,
  9183. // fallback tree will not have suspense context
  9184. namespace2,
  9185. slotScopeIds,
  9186. optimized
  9187. );
  9188. setActiveBranch(suspense, fallbackVNode);
  9189. };
  9190. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  9191. if (delayEnter) {
  9192. activeBranch.transition.afterLeave = mountFallback;
  9193. }
  9194. suspense.isInFallback = true;
  9195. unmount(
  9196. activeBranch,
  9197. parentComponent2,
  9198. null,
  9199. // no suspense so unmount hooks fire now
  9200. true
  9201. // shouldRemove
  9202. );
  9203. if (!delayEnter) {
  9204. mountFallback();
  9205. }
  9206. },
  9207. move(container2, anchor2, type) {
  9208. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  9209. suspense.container = container2;
  9210. },
  9211. next() {
  9212. return suspense.activeBranch && next(suspense.activeBranch);
  9213. },
  9214. registerDep(instance, setupRenderEffect, optimized2) {
  9215. const isInPendingSuspense = !!suspense.pendingBranch;
  9216. if (isInPendingSuspense) {
  9217. suspense.deps++;
  9218. }
  9219. const hydratedEl = instance.vnode.el;
  9220. instance.asyncDep.catch((err) => {
  9221. handleError(err, instance, 0);
  9222. }).then((asyncSetupResult) => {
  9223. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
  9224. return;
  9225. }
  9226. instance.asyncResolved = true;
  9227. const { vnode: vnode2 } = instance;
  9228. if (true) {
  9229. pushWarningContext(vnode2);
  9230. }
  9231. handleSetupResult(instance, asyncSetupResult, false);
  9232. if (hydratedEl) {
  9233. vnode2.el = hydratedEl;
  9234. }
  9235. const placeholder = !hydratedEl && instance.subTree.el;
  9236. setupRenderEffect(
  9237. instance,
  9238. vnode2,
  9239. // component may have been moved before resolve.
  9240. // if this is not a hydration, instance.subTree will be the comment
  9241. // placeholder.
  9242. parentNode(hydratedEl || instance.subTree.el),
  9243. // anchor will not be used if this is hydration, so only need to
  9244. // consider the comment placeholder case.
  9245. hydratedEl ? null : next(instance.subTree),
  9246. suspense,
  9247. namespace,
  9248. optimized2
  9249. );
  9250. if (placeholder) {
  9251. remove2(placeholder);
  9252. }
  9253. updateHOCHostEl(instance, vnode2.el);
  9254. if (true) {
  9255. popWarningContext();
  9256. }
  9257. if (isInPendingSuspense && --suspense.deps === 0) {
  9258. suspense.resolve();
  9259. }
  9260. });
  9261. },
  9262. unmount(parentSuspense2, doRemove) {
  9263. suspense.isUnmounted = true;
  9264. if (suspense.activeBranch) {
  9265. unmount(
  9266. suspense.activeBranch,
  9267. parentComponent,
  9268. parentSuspense2,
  9269. doRemove
  9270. );
  9271. }
  9272. if (suspense.pendingBranch) {
  9273. unmount(
  9274. suspense.pendingBranch,
  9275. parentComponent,
  9276. parentSuspense2,
  9277. doRemove
  9278. );
  9279. }
  9280. }
  9281. };
  9282. return suspense;
  9283. }
  9284. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  9285. const suspense = vnode.suspense = createSuspenseBoundary(
  9286. vnode,
  9287. parentSuspense,
  9288. parentComponent,
  9289. node.parentNode,
  9290. // eslint-disable-next-line no-restricted-globals
  9291. document.createElement("div"),
  9292. null,
  9293. namespace,
  9294. slotScopeIds,
  9295. optimized,
  9296. rendererInternals,
  9297. true
  9298. );
  9299. const result = hydrateNode(
  9300. node,
  9301. suspense.pendingBranch = vnode.ssContent,
  9302. parentComponent,
  9303. suspense,
  9304. slotScopeIds,
  9305. optimized
  9306. );
  9307. if (suspense.deps === 0) {
  9308. suspense.resolve(false, true);
  9309. }
  9310. return result;
  9311. }
  9312. function normalizeSuspenseChildren(vnode) {
  9313. const { shapeFlag, children } = vnode;
  9314. const isSlotChildren = shapeFlag & 32;
  9315. vnode.ssContent = normalizeSuspenseSlot(
  9316. isSlotChildren ? children.default : children
  9317. );
  9318. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  9319. }
  9320. function normalizeSuspenseSlot(s) {
  9321. let block;
  9322. if (isFunction(s)) {
  9323. const trackBlock = isBlockTreeEnabled && s._c;
  9324. if (trackBlock) {
  9325. s._d = false;
  9326. openBlock();
  9327. }
  9328. s = s();
  9329. if (trackBlock) {
  9330. s._d = true;
  9331. block = currentBlock;
  9332. closeBlock();
  9333. }
  9334. }
  9335. if (isArray(s)) {
  9336. const singleChild = filterSingleRoot(s);
  9337. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
  9338. warn$1(`<Suspense> slots expect a single root node.`);
  9339. }
  9340. s = singleChild;
  9341. }
  9342. s = normalizeVNode(s);
  9343. if (block && !s.dynamicChildren) {
  9344. s.dynamicChildren = block.filter((c) => c !== s);
  9345. }
  9346. return s;
  9347. }
  9348. function queueEffectWithSuspense(fn, suspense) {
  9349. if (suspense && suspense.pendingBranch) {
  9350. if (isArray(fn)) {
  9351. suspense.effects.push(...fn);
  9352. } else {
  9353. suspense.effects.push(fn);
  9354. }
  9355. } else {
  9356. queuePostFlushCb(fn);
  9357. }
  9358. }
  9359. function setActiveBranch(suspense, branch) {
  9360. suspense.activeBranch = branch;
  9361. const { vnode, parentComponent } = suspense;
  9362. let el = branch.el;
  9363. while (!el && branch.component) {
  9364. branch = branch.component.subTree;
  9365. el = branch.el;
  9366. }
  9367. vnode.el = el;
  9368. if (parentComponent && parentComponent.subTree === vnode) {
  9369. parentComponent.vnode.el = el;
  9370. updateHOCHostEl(parentComponent, el);
  9371. }
  9372. }
  9373. function isVNodeSuspensible(vnode) {
  9374. const suspensible = vnode.props && vnode.props.suspensible;
  9375. return suspensible != null && suspensible !== false;
  9376. }
  9377. var Fragment = Symbol.for("v-fgt");
  9378. var Text = Symbol.for("v-txt");
  9379. var Comment = Symbol.for("v-cmt");
  9380. var Static = Symbol.for("v-stc");
  9381. var blockStack = [];
  9382. var currentBlock = null;
  9383. function openBlock(disableTracking = false) {
  9384. blockStack.push(currentBlock = disableTracking ? null : []);
  9385. }
  9386. function closeBlock() {
  9387. blockStack.pop();
  9388. currentBlock = blockStack[blockStack.length - 1] || null;
  9389. }
  9390. var isBlockTreeEnabled = 1;
  9391. function setBlockTracking(value) {
  9392. isBlockTreeEnabled += value;
  9393. if (value < 0 && currentBlock) {
  9394. currentBlock.hasOnce = true;
  9395. }
  9396. }
  9397. function setupBlock(vnode) {
  9398. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  9399. closeBlock();
  9400. if (isBlockTreeEnabled > 0 && currentBlock) {
  9401. currentBlock.push(vnode);
  9402. }
  9403. return vnode;
  9404. }
  9405. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  9406. return setupBlock(
  9407. createBaseVNode(
  9408. type,
  9409. props,
  9410. children,
  9411. patchFlag,
  9412. dynamicProps,
  9413. shapeFlag,
  9414. true
  9415. )
  9416. );
  9417. }
  9418. function createBlock(type, props, children, patchFlag, dynamicProps) {
  9419. return setupBlock(
  9420. createVNode(
  9421. type,
  9422. props,
  9423. children,
  9424. patchFlag,
  9425. dynamicProps,
  9426. true
  9427. )
  9428. );
  9429. }
  9430. function isVNode(value) {
  9431. return value ? value.__v_isVNode === true : false;
  9432. }
  9433. function isSameVNodeType(n1, n2) {
  9434. if (n2.shapeFlag & 6 && n1.component) {
  9435. const dirtyInstances = hmrDirtyComponents.get(n2.type);
  9436. if (dirtyInstances && dirtyInstances.has(n1.component)) {
  9437. n1.shapeFlag &= ~256;
  9438. n2.shapeFlag &= ~512;
  9439. return false;
  9440. }
  9441. }
  9442. return n1.type === n2.type && n1.key === n2.key;
  9443. }
  9444. var vnodeArgsTransformer;
  9445. function transformVNodeArgs(transformer) {
  9446. vnodeArgsTransformer = transformer;
  9447. }
  9448. var createVNodeWithArgsTransform = (...args) => {
  9449. return _createVNode(
  9450. ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
  9451. );
  9452. };
  9453. var normalizeKey = ({ key }) => key != null ? key : null;
  9454. var normalizeRef = ({
  9455. ref: ref2,
  9456. ref_key,
  9457. ref_for
  9458. }) => {
  9459. if (typeof ref2 === "number") {
  9460. ref2 = "" + ref2;
  9461. }
  9462. return ref2 != null ? isString(ref2) || isRef2(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  9463. };
  9464. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  9465. const vnode = {
  9466. __v_isVNode: true,
  9467. __v_skip: true,
  9468. type,
  9469. props,
  9470. key: props && normalizeKey(props),
  9471. ref: props && normalizeRef(props),
  9472. scopeId: currentScopeId,
  9473. slotScopeIds: null,
  9474. children,
  9475. component: null,
  9476. suspense: null,
  9477. ssContent: null,
  9478. ssFallback: null,
  9479. dirs: null,
  9480. transition: null,
  9481. el: null,
  9482. anchor: null,
  9483. target: null,
  9484. targetStart: null,
  9485. targetAnchor: null,
  9486. staticCount: 0,
  9487. shapeFlag,
  9488. patchFlag,
  9489. dynamicProps,
  9490. dynamicChildren: null,
  9491. appContext: null,
  9492. ctx: currentRenderingInstance
  9493. };
  9494. if (needFullChildrenNormalization) {
  9495. normalizeChildren(vnode, children);
  9496. if (shapeFlag & 128) {
  9497. type.normalize(vnode);
  9498. }
  9499. } else if (children) {
  9500. vnode.shapeFlag |= isString(children) ? 8 : 16;
  9501. }
  9502. if (vnode.key !== vnode.key) {
  9503. warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  9504. }
  9505. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  9506. !isBlockNode && // has current parent block
  9507. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  9508. // component nodes also should always be patched, because even if the
  9509. // component doesn't need to update, it needs to persist the instance on to
  9510. // the next vnode so that it can be properly unmounted later.
  9511. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  9512. // vnode should not be considered dynamic due to handler caching.
  9513. vnode.patchFlag !== 32) {
  9514. currentBlock.push(vnode);
  9515. }
  9516. return vnode;
  9517. }
  9518. var createVNode = true ? createVNodeWithArgsTransform : _createVNode;
  9519. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  9520. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  9521. if (!type) {
  9522. warn$1(`Invalid vnode type when creating vnode: ${type}.`);
  9523. }
  9524. type = Comment;
  9525. }
  9526. if (isVNode(type)) {
  9527. const cloned = cloneVNode(
  9528. type,
  9529. props,
  9530. true
  9531. /* mergeRef: true */
  9532. );
  9533. if (children) {
  9534. normalizeChildren(cloned, children);
  9535. }
  9536. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  9537. if (cloned.shapeFlag & 6) {
  9538. currentBlock[currentBlock.indexOf(type)] = cloned;
  9539. } else {
  9540. currentBlock.push(cloned);
  9541. }
  9542. }
  9543. cloned.patchFlag = -2;
  9544. return cloned;
  9545. }
  9546. if (isClassComponent(type)) {
  9547. type = type.__vccOpts;
  9548. }
  9549. if (props) {
  9550. props = guardReactiveProps(props);
  9551. let { class: klass, style } = props;
  9552. if (klass && !isString(klass)) {
  9553. props.class = normalizeClass(klass);
  9554. }
  9555. if (isObject(style)) {
  9556. if (isProxy(style) && !isArray(style)) {
  9557. style = extend({}, style);
  9558. }
  9559. props.style = normalizeStyle(style);
  9560. }
  9561. }
  9562. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  9563. if (shapeFlag & 4 && isProxy(type)) {
  9564. type = toRaw(type);
  9565. warn$1(
  9566. `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
  9567. `
  9568. Component that was made reactive: `,
  9569. type
  9570. );
  9571. }
  9572. return createBaseVNode(
  9573. type,
  9574. props,
  9575. children,
  9576. patchFlag,
  9577. dynamicProps,
  9578. shapeFlag,
  9579. isBlockNode,
  9580. true
  9581. );
  9582. }
  9583. function guardReactiveProps(props) {
  9584. if (!props) return null;
  9585. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  9586. }
  9587. function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
  9588. const { props, ref: ref2, patchFlag, children, transition } = vnode;
  9589. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  9590. const cloned = {
  9591. __v_isVNode: true,
  9592. __v_skip: true,
  9593. type: vnode.type,
  9594. props: mergedProps,
  9595. key: mergedProps && normalizeKey(mergedProps),
  9596. ref: extraProps && extraProps.ref ? (
  9597. // #2078 in the case of <component :is="vnode" ref="extra"/>
  9598. // if the vnode itself already has a ref, cloneVNode will need to merge
  9599. // the refs so the single vnode can be set on multiple refs
  9600. mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  9601. ) : ref2,
  9602. scopeId: vnode.scopeId,
  9603. slotScopeIds: vnode.slotScopeIds,
  9604. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  9605. target: vnode.target,
  9606. targetStart: vnode.targetStart,
  9607. targetAnchor: vnode.targetAnchor,
  9608. staticCount: vnode.staticCount,
  9609. shapeFlag: vnode.shapeFlag,
  9610. // if the vnode is cloned with extra props, we can no longer assume its
  9611. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  9612. // note: preserve flag for fragments since they use the flag for children
  9613. // fast paths only.
  9614. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  9615. dynamicProps: vnode.dynamicProps,
  9616. dynamicChildren: vnode.dynamicChildren,
  9617. appContext: vnode.appContext,
  9618. dirs: vnode.dirs,
  9619. transition,
  9620. // These should technically only be non-null on mounted VNodes. However,
  9621. // they *should* be copied for kept-alive vnodes. So we just always copy
  9622. // them since them being non-null during a mount doesn't affect the logic as
  9623. // they will simply be overwritten.
  9624. component: vnode.component,
  9625. suspense: vnode.suspense,
  9626. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  9627. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  9628. el: vnode.el,
  9629. anchor: vnode.anchor,
  9630. ctx: vnode.ctx,
  9631. ce: vnode.ce
  9632. };
  9633. if (transition && cloneTransition) {
  9634. setTransitionHooks(
  9635. cloned,
  9636. transition.clone(cloned)
  9637. );
  9638. }
  9639. return cloned;
  9640. }
  9641. function deepCloneVNode(vnode) {
  9642. const cloned = cloneVNode(vnode);
  9643. if (isArray(vnode.children)) {
  9644. cloned.children = vnode.children.map(deepCloneVNode);
  9645. }
  9646. return cloned;
  9647. }
  9648. function createTextVNode(text = " ", flag = 0) {
  9649. return createVNode(Text, null, text, flag);
  9650. }
  9651. function createStaticVNode(content, numberOfNodes) {
  9652. const vnode = createVNode(Static, null, content);
  9653. vnode.staticCount = numberOfNodes;
  9654. return vnode;
  9655. }
  9656. function createCommentVNode(text = "", asBlock = false) {
  9657. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  9658. }
  9659. function normalizeVNode(child) {
  9660. if (child == null || typeof child === "boolean") {
  9661. return createVNode(Comment);
  9662. } else if (isArray(child)) {
  9663. return createVNode(
  9664. Fragment,
  9665. null,
  9666. // #3666, avoid reference pollution when reusing vnode
  9667. child.slice()
  9668. );
  9669. } else if (isVNode(child)) {
  9670. return cloneIfMounted(child);
  9671. } else {
  9672. return createVNode(Text, null, String(child));
  9673. }
  9674. }
  9675. function cloneIfMounted(child) {
  9676. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  9677. }
  9678. function normalizeChildren(vnode, children) {
  9679. let type = 0;
  9680. const { shapeFlag } = vnode;
  9681. if (children == null) {
  9682. children = null;
  9683. } else if (isArray(children)) {
  9684. type = 16;
  9685. } else if (typeof children === "object") {
  9686. if (shapeFlag & (1 | 64)) {
  9687. const slot = children.default;
  9688. if (slot) {
  9689. slot._c && (slot._d = false);
  9690. normalizeChildren(vnode, slot());
  9691. slot._c && (slot._d = true);
  9692. }
  9693. return;
  9694. } else {
  9695. type = 32;
  9696. const slotFlag = children._;
  9697. if (!slotFlag && !isInternalObject(children)) {
  9698. children._ctx = currentRenderingInstance;
  9699. } else if (slotFlag === 3 && currentRenderingInstance) {
  9700. if (currentRenderingInstance.slots._ === 1) {
  9701. children._ = 1;
  9702. } else {
  9703. children._ = 2;
  9704. vnode.patchFlag |= 1024;
  9705. }
  9706. }
  9707. }
  9708. } else if (isFunction(children)) {
  9709. children = { default: children, _ctx: currentRenderingInstance };
  9710. type = 32;
  9711. } else {
  9712. children = String(children);
  9713. if (shapeFlag & 64) {
  9714. type = 16;
  9715. children = [createTextVNode(children)];
  9716. } else {
  9717. type = 8;
  9718. }
  9719. }
  9720. vnode.children = children;
  9721. vnode.shapeFlag |= type;
  9722. }
  9723. function mergeProps(...args) {
  9724. const ret = {};
  9725. for (let i = 0; i < args.length; i++) {
  9726. const toMerge = args[i];
  9727. for (const key in toMerge) {
  9728. if (key === "class") {
  9729. if (ret.class !== toMerge.class) {
  9730. ret.class = normalizeClass([ret.class, toMerge.class]);
  9731. }
  9732. } else if (key === "style") {
  9733. ret.style = normalizeStyle([ret.style, toMerge.style]);
  9734. } else if (isOn(key)) {
  9735. const existing = ret[key];
  9736. const incoming = toMerge[key];
  9737. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
  9738. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  9739. }
  9740. } else if (key !== "") {
  9741. ret[key] = toMerge[key];
  9742. }
  9743. }
  9744. }
  9745. return ret;
  9746. }
  9747. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  9748. callWithAsyncErrorHandling(hook, instance, 7, [
  9749. vnode,
  9750. prevVNode
  9751. ]);
  9752. }
  9753. var emptyAppContext = createAppContext();
  9754. var uid = 0;
  9755. function createComponentInstance(vnode, parent, suspense) {
  9756. const type = vnode.type;
  9757. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  9758. const instance = {
  9759. uid: uid++,
  9760. vnode,
  9761. type,
  9762. parent,
  9763. appContext,
  9764. root: null,
  9765. // to be immediately set
  9766. next: null,
  9767. subTree: null,
  9768. // will be set synchronously right after creation
  9769. effect: null,
  9770. update: null,
  9771. // will be set synchronously right after creation
  9772. job: null,
  9773. scope: new EffectScope(
  9774. true
  9775. /* detached */
  9776. ),
  9777. render: null,
  9778. proxy: null,
  9779. exposed: null,
  9780. exposeProxy: null,
  9781. withProxy: null,
  9782. provides: parent ? parent.provides : Object.create(appContext.provides),
  9783. ids: parent ? parent.ids : ["", 0, 0],
  9784. accessCache: null,
  9785. renderCache: [],
  9786. // local resolved assets
  9787. components: null,
  9788. directives: null,
  9789. // resolved props and emits options
  9790. propsOptions: normalizePropsOptions(type, appContext),
  9791. emitsOptions: normalizeEmitsOptions(type, appContext),
  9792. // emit
  9793. emit: null,
  9794. // to be set immediately
  9795. emitted: null,
  9796. // props default value
  9797. propsDefaults: EMPTY_OBJ,
  9798. // inheritAttrs
  9799. inheritAttrs: type.inheritAttrs,
  9800. // state
  9801. ctx: EMPTY_OBJ,
  9802. data: EMPTY_OBJ,
  9803. props: EMPTY_OBJ,
  9804. attrs: EMPTY_OBJ,
  9805. slots: EMPTY_OBJ,
  9806. refs: EMPTY_OBJ,
  9807. setupState: EMPTY_OBJ,
  9808. setupContext: null,
  9809. // suspense related
  9810. suspense,
  9811. suspenseId: suspense ? suspense.pendingId : 0,
  9812. asyncDep: null,
  9813. asyncResolved: false,
  9814. // lifecycle hooks
  9815. // not using enums here because it results in computed properties
  9816. isMounted: false,
  9817. isUnmounted: false,
  9818. isDeactivated: false,
  9819. bc: null,
  9820. c: null,
  9821. bm: null,
  9822. m: null,
  9823. bu: null,
  9824. u: null,
  9825. um: null,
  9826. bum: null,
  9827. da: null,
  9828. a: null,
  9829. rtg: null,
  9830. rtc: null,
  9831. ec: null,
  9832. sp: null
  9833. };
  9834. if (true) {
  9835. instance.ctx = createDevRenderContext(instance);
  9836. } else {
  9837. instance.ctx = { _: instance };
  9838. }
  9839. instance.root = parent ? parent.root : instance;
  9840. instance.emit = emit.bind(null, instance);
  9841. if (vnode.ce) {
  9842. vnode.ce(instance);
  9843. }
  9844. return instance;
  9845. }
  9846. var currentInstance = null;
  9847. var getCurrentInstance = () => currentInstance || currentRenderingInstance;
  9848. var internalSetCurrentInstance;
  9849. var setInSSRSetupState;
  9850. {
  9851. const g = getGlobalThis();
  9852. const registerGlobalSetter = (key, setter) => {
  9853. let setters;
  9854. if (!(setters = g[key])) setters = g[key] = [];
  9855. setters.push(setter);
  9856. return (v) => {
  9857. if (setters.length > 1) setters.forEach((set) => set(v));
  9858. else setters[0](v);
  9859. };
  9860. };
  9861. internalSetCurrentInstance = registerGlobalSetter(
  9862. `__VUE_INSTANCE_SETTERS__`,
  9863. (v) => currentInstance = v
  9864. );
  9865. setInSSRSetupState = registerGlobalSetter(
  9866. `__VUE_SSR_SETTERS__`,
  9867. (v) => isInSSRComponentSetup = v
  9868. );
  9869. }
  9870. var setCurrentInstance = (instance) => {
  9871. const prev = currentInstance;
  9872. internalSetCurrentInstance(instance);
  9873. instance.scope.on();
  9874. return () => {
  9875. instance.scope.off();
  9876. internalSetCurrentInstance(prev);
  9877. };
  9878. };
  9879. var unsetCurrentInstance = () => {
  9880. currentInstance && currentInstance.scope.off();
  9881. internalSetCurrentInstance(null);
  9882. };
  9883. var isBuiltInTag = makeMap("slot,component");
  9884. function validateComponentName(name, { isNativeTag }) {
  9885. if (isBuiltInTag(name) || isNativeTag(name)) {
  9886. warn$1(
  9887. "Do not use built-in or reserved HTML elements as component id: " + name
  9888. );
  9889. }
  9890. }
  9891. function isStatefulComponent(instance) {
  9892. return instance.vnode.shapeFlag & 4;
  9893. }
  9894. var isInSSRComponentSetup = false;
  9895. function setupComponent(instance, isSSR = false, optimized = false) {
  9896. isSSR && setInSSRSetupState(isSSR);
  9897. const { props, children } = instance.vnode;
  9898. const isStateful = isStatefulComponent(instance);
  9899. initProps(instance, props, isStateful, isSSR);
  9900. initSlots(instance, children, optimized);
  9901. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  9902. isSSR && setInSSRSetupState(false);
  9903. return setupResult;
  9904. }
  9905. function setupStatefulComponent(instance, isSSR) {
  9906. var _a;
  9907. const Component = instance.type;
  9908. if (true) {
  9909. if (Component.name) {
  9910. validateComponentName(Component.name, instance.appContext.config);
  9911. }
  9912. if (Component.components) {
  9913. const names = Object.keys(Component.components);
  9914. for (let i = 0; i < names.length; i++) {
  9915. validateComponentName(names[i], instance.appContext.config);
  9916. }
  9917. }
  9918. if (Component.directives) {
  9919. const names = Object.keys(Component.directives);
  9920. for (let i = 0; i < names.length; i++) {
  9921. validateDirectiveName(names[i]);
  9922. }
  9923. }
  9924. if (Component.compilerOptions && isRuntimeOnly()) {
  9925. warn$1(
  9926. `"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.`
  9927. );
  9928. }
  9929. }
  9930. instance.accessCache = /* @__PURE__ */ Object.create(null);
  9931. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  9932. if (true) {
  9933. exposePropsOnRenderContext(instance);
  9934. }
  9935. const { setup } = Component;
  9936. if (setup) {
  9937. pauseTracking();
  9938. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  9939. const reset = setCurrentInstance(instance);
  9940. const setupResult = callWithErrorHandling(
  9941. setup,
  9942. instance,
  9943. 0,
  9944. [
  9945. true ? shallowReadonly(instance.props) : instance.props,
  9946. setupContext
  9947. ]
  9948. );
  9949. const isAsyncSetup = isPromise(setupResult);
  9950. resetTracking();
  9951. reset();
  9952. if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
  9953. markAsyncBoundary(instance);
  9954. }
  9955. if (isAsyncSetup) {
  9956. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  9957. if (isSSR) {
  9958. return setupResult.then((resolvedResult) => {
  9959. handleSetupResult(instance, resolvedResult, isSSR);
  9960. }).catch((e) => {
  9961. handleError(e, instance, 0);
  9962. });
  9963. } else {
  9964. instance.asyncDep = setupResult;
  9965. if (!instance.suspense) {
  9966. const name = (_a = Component.name) != null ? _a : "Anonymous";
  9967. warn$1(
  9968. `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
  9969. );
  9970. }
  9971. }
  9972. } else {
  9973. handleSetupResult(instance, setupResult, isSSR);
  9974. }
  9975. } else {
  9976. finishComponentSetup(instance, isSSR);
  9977. }
  9978. }
  9979. function handleSetupResult(instance, setupResult, isSSR) {
  9980. if (isFunction(setupResult)) {
  9981. if (instance.type.__ssrInlineRender) {
  9982. instance.ssrRender = setupResult;
  9983. } else {
  9984. instance.render = setupResult;
  9985. }
  9986. } else if (isObject(setupResult)) {
  9987. if (isVNode(setupResult)) {
  9988. warn$1(
  9989. `setup() should not return VNodes directly - return a render function instead.`
  9990. );
  9991. }
  9992. if (true) {
  9993. instance.devtoolsRawSetupState = setupResult;
  9994. }
  9995. instance.setupState = proxyRefs(setupResult);
  9996. if (true) {
  9997. exposeSetupStateOnRenderContext(instance);
  9998. }
  9999. } else if (setupResult !== void 0) {
  10000. warn$1(
  10001. `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
  10002. );
  10003. }
  10004. finishComponentSetup(instance, isSSR);
  10005. }
  10006. var compile;
  10007. var installWithProxy;
  10008. function registerRuntimeCompiler(_compile) {
  10009. compile = _compile;
  10010. installWithProxy = (i) => {
  10011. if (i.render._rc) {
  10012. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  10013. }
  10014. };
  10015. }
  10016. var isRuntimeOnly = () => !compile;
  10017. function finishComponentSetup(instance, isSSR, skipOptions) {
  10018. const Component = instance.type;
  10019. if (!instance.render) {
  10020. if (!isSSR && compile && !Component.render) {
  10021. const template = Component.template || resolveMergedOptions(instance).template;
  10022. if (template) {
  10023. if (true) {
  10024. startMeasure(instance, `compile`);
  10025. }
  10026. const { isCustomElement, compilerOptions } = instance.appContext.config;
  10027. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  10028. const finalCompilerOptions = extend(
  10029. extend(
  10030. {
  10031. isCustomElement,
  10032. delimiters
  10033. },
  10034. compilerOptions
  10035. ),
  10036. componentCompilerOptions
  10037. );
  10038. Component.render = compile(template, finalCompilerOptions);
  10039. if (true) {
  10040. endMeasure(instance, `compile`);
  10041. }
  10042. }
  10043. }
  10044. instance.render = Component.render || NOOP;
  10045. if (installWithProxy) {
  10046. installWithProxy(instance);
  10047. }
  10048. }
  10049. if (__VUE_OPTIONS_API__ && true) {
  10050. const reset = setCurrentInstance(instance);
  10051. pauseTracking();
  10052. try {
  10053. applyOptions(instance);
  10054. } finally {
  10055. resetTracking();
  10056. reset();
  10057. }
  10058. }
  10059. if (!Component.render && instance.render === NOOP && !isSSR) {
  10060. if (!compile && Component.template) {
  10061. warn$1(
  10062. `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".`
  10063. );
  10064. } else {
  10065. warn$1(`Component is missing template or render function: `, Component);
  10066. }
  10067. }
  10068. }
  10069. var attrsProxyHandlers = true ? {
  10070. get(target, key) {
  10071. markAttrsAccessed();
  10072. track(target, "get", "");
  10073. return target[key];
  10074. },
  10075. set() {
  10076. warn$1(`setupContext.attrs is readonly.`);
  10077. return false;
  10078. },
  10079. deleteProperty() {
  10080. warn$1(`setupContext.attrs is readonly.`);
  10081. return false;
  10082. }
  10083. } : {
  10084. get(target, key) {
  10085. track(target, "get", "");
  10086. return target[key];
  10087. }
  10088. };
  10089. function getSlotsProxy(instance) {
  10090. return new Proxy(instance.slots, {
  10091. get(target, key) {
  10092. track(instance, "get", "$slots");
  10093. return target[key];
  10094. }
  10095. });
  10096. }
  10097. function createSetupContext(instance) {
  10098. const expose = (exposed) => {
  10099. if (true) {
  10100. if (instance.exposed) {
  10101. warn$1(`expose() should be called only once per setup().`);
  10102. }
  10103. if (exposed != null) {
  10104. let exposedType = typeof exposed;
  10105. if (exposedType === "object") {
  10106. if (isArray(exposed)) {
  10107. exposedType = "array";
  10108. } else if (isRef2(exposed)) {
  10109. exposedType = "ref";
  10110. }
  10111. }
  10112. if (exposedType !== "object") {
  10113. warn$1(
  10114. `expose() should be passed a plain object, received ${exposedType}.`
  10115. );
  10116. }
  10117. }
  10118. }
  10119. instance.exposed = exposed || {};
  10120. };
  10121. if (true) {
  10122. let attrsProxy;
  10123. let slotsProxy;
  10124. return Object.freeze({
  10125. get attrs() {
  10126. return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
  10127. },
  10128. get slots() {
  10129. return slotsProxy || (slotsProxy = getSlotsProxy(instance));
  10130. },
  10131. get emit() {
  10132. return (event, ...args) => instance.emit(event, ...args);
  10133. },
  10134. expose
  10135. });
  10136. } else {
  10137. return {
  10138. attrs: new Proxy(instance.attrs, attrsProxyHandlers),
  10139. slots: instance.slots,
  10140. emit: instance.emit,
  10141. expose
  10142. };
  10143. }
  10144. }
  10145. function getComponentPublicInstance(instance) {
  10146. if (instance.exposed) {
  10147. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  10148. get(target, key) {
  10149. if (key in target) {
  10150. return target[key];
  10151. } else if (key in publicPropertiesMap) {
  10152. return publicPropertiesMap[key](instance);
  10153. }
  10154. },
  10155. has(target, key) {
  10156. return key in target || key in publicPropertiesMap;
  10157. }
  10158. }));
  10159. } else {
  10160. return instance.proxy;
  10161. }
  10162. }
  10163. var classifyRE = /(?:^|[-_])(\w)/g;
  10164. var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  10165. function getComponentName(Component, includeInferred = true) {
  10166. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  10167. }
  10168. function formatComponentName(instance, Component, isRoot = false) {
  10169. let name = getComponentName(Component);
  10170. if (!name && Component.__file) {
  10171. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  10172. if (match) {
  10173. name = match[1];
  10174. }
  10175. }
  10176. if (!name && instance && instance.parent) {
  10177. const inferFromRegistry = (registry) => {
  10178. for (const key in registry) {
  10179. if (registry[key] === Component) {
  10180. return key;
  10181. }
  10182. }
  10183. };
  10184. name = inferFromRegistry(
  10185. instance.components || instance.parent.type.components
  10186. ) || inferFromRegistry(instance.appContext.components);
  10187. }
  10188. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  10189. }
  10190. function isClassComponent(value) {
  10191. return isFunction(value) && "__vccOpts" in value;
  10192. }
  10193. var computed2 = (getterOrOptions, debugOptions) => {
  10194. const c = computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
  10195. if (true) {
  10196. const i = getCurrentInstance();
  10197. if (i && i.appContext.config.warnRecursiveComputed) {
  10198. c._warnRecursive = true;
  10199. }
  10200. }
  10201. return c;
  10202. };
  10203. function h(type, propsOrChildren, children) {
  10204. const l = arguments.length;
  10205. if (l === 2) {
  10206. if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  10207. if (isVNode(propsOrChildren)) {
  10208. return createVNode(type, null, [propsOrChildren]);
  10209. }
  10210. return createVNode(type, propsOrChildren);
  10211. } else {
  10212. return createVNode(type, null, propsOrChildren);
  10213. }
  10214. } else {
  10215. if (l > 3) {
  10216. children = Array.prototype.slice.call(arguments, 2);
  10217. } else if (l === 3 && isVNode(children)) {
  10218. children = [children];
  10219. }
  10220. return createVNode(type, propsOrChildren, children);
  10221. }
  10222. }
  10223. function initCustomFormatter() {
  10224. if (typeof window === "undefined") {
  10225. return;
  10226. }
  10227. const vueStyle = { style: "color:#3ba776" };
  10228. const numberStyle = { style: "color:#1677ff" };
  10229. const stringStyle = { style: "color:#f5222d" };
  10230. const keywordStyle = { style: "color:#eb2f96" };
  10231. const formatter = {
  10232. __vue_custom_formatter: true,
  10233. header(obj) {
  10234. if (!isObject(obj)) {
  10235. return null;
  10236. }
  10237. if (obj.__isVue) {
  10238. return ["div", vueStyle, `VueInstance`];
  10239. } else if (isRef2(obj)) {
  10240. return [
  10241. "div",
  10242. {},
  10243. ["span", vueStyle, genRefFlag(obj)],
  10244. "<",
  10245. // avoid debugger accessing value affecting behavior
  10246. formatValue("_value" in obj ? obj._value : obj),
  10247. `>`
  10248. ];
  10249. } else if (isReactive(obj)) {
  10250. return [
  10251. "div",
  10252. {},
  10253. ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
  10254. "<",
  10255. formatValue(obj),
  10256. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  10257. ];
  10258. } else if (isReadonly(obj)) {
  10259. return [
  10260. "div",
  10261. {},
  10262. ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
  10263. "<",
  10264. formatValue(obj),
  10265. ">"
  10266. ];
  10267. }
  10268. return null;
  10269. },
  10270. hasBody(obj) {
  10271. return obj && obj.__isVue;
  10272. },
  10273. body(obj) {
  10274. if (obj && obj.__isVue) {
  10275. return [
  10276. "div",
  10277. {},
  10278. ...formatInstance(obj.$)
  10279. ];
  10280. }
  10281. }
  10282. };
  10283. function formatInstance(instance) {
  10284. const blocks = [];
  10285. if (instance.type.props && instance.props) {
  10286. blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  10287. }
  10288. if (instance.setupState !== EMPTY_OBJ) {
  10289. blocks.push(createInstanceBlock("setup", instance.setupState));
  10290. }
  10291. if (instance.data !== EMPTY_OBJ) {
  10292. blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  10293. }
  10294. const computed3 = extractKeys(instance, "computed");
  10295. if (computed3) {
  10296. blocks.push(createInstanceBlock("computed", computed3));
  10297. }
  10298. const injected = extractKeys(instance, "inject");
  10299. if (injected) {
  10300. blocks.push(createInstanceBlock("injected", injected));
  10301. }
  10302. blocks.push([
  10303. "div",
  10304. {},
  10305. [
  10306. "span",
  10307. {
  10308. style: keywordStyle.style + ";opacity:0.66"
  10309. },
  10310. "$ (internal): "
  10311. ],
  10312. ["object", { object: instance }]
  10313. ]);
  10314. return blocks;
  10315. }
  10316. function createInstanceBlock(type, target) {
  10317. target = extend({}, target);
  10318. if (!Object.keys(target).length) {
  10319. return ["span", {}];
  10320. }
  10321. return [
  10322. "div",
  10323. { style: "line-height:1.25em;margin-bottom:0.6em" },
  10324. [
  10325. "div",
  10326. {
  10327. style: "color:#476582"
  10328. },
  10329. type
  10330. ],
  10331. [
  10332. "div",
  10333. {
  10334. style: "padding-left:1.25em"
  10335. },
  10336. ...Object.keys(target).map((key) => {
  10337. return [
  10338. "div",
  10339. {},
  10340. ["span", keywordStyle, key + ": "],
  10341. formatValue(target[key], false)
  10342. ];
  10343. })
  10344. ]
  10345. ];
  10346. }
  10347. function formatValue(v, asRaw = true) {
  10348. if (typeof v === "number") {
  10349. return ["span", numberStyle, v];
  10350. } else if (typeof v === "string") {
  10351. return ["span", stringStyle, JSON.stringify(v)];
  10352. } else if (typeof v === "boolean") {
  10353. return ["span", keywordStyle, v];
  10354. } else if (isObject(v)) {
  10355. return ["object", { object: asRaw ? toRaw(v) : v }];
  10356. } else {
  10357. return ["span", stringStyle, String(v)];
  10358. }
  10359. }
  10360. function extractKeys(instance, type) {
  10361. const Comp = instance.type;
  10362. if (isFunction(Comp)) {
  10363. return;
  10364. }
  10365. const extracted = {};
  10366. for (const key in instance.ctx) {
  10367. if (isKeyOfType(Comp, key, type)) {
  10368. extracted[key] = instance.ctx[key];
  10369. }
  10370. }
  10371. return extracted;
  10372. }
  10373. function isKeyOfType(Comp, key, type) {
  10374. const opts = Comp[type];
  10375. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
  10376. return true;
  10377. }
  10378. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  10379. return true;
  10380. }
  10381. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
  10382. return true;
  10383. }
  10384. }
  10385. function genRefFlag(v) {
  10386. if (isShallow(v)) {
  10387. return `ShallowRef`;
  10388. }
  10389. if (v.effect) {
  10390. return `ComputedRef`;
  10391. }
  10392. return `Ref`;
  10393. }
  10394. if (window.devtoolsFormatters) {
  10395. window.devtoolsFormatters.push(formatter);
  10396. } else {
  10397. window.devtoolsFormatters = [formatter];
  10398. }
  10399. }
  10400. function withMemo(memo, render2, cache, index) {
  10401. const cached = cache[index];
  10402. if (cached && isMemoSame(cached, memo)) {
  10403. return cached;
  10404. }
  10405. const ret = render2();
  10406. ret.memo = memo.slice();
  10407. ret.cacheIndex = index;
  10408. return cache[index] = ret;
  10409. }
  10410. function isMemoSame(cached, memo) {
  10411. const prev = cached.memo;
  10412. if (prev.length != memo.length) {
  10413. return false;
  10414. }
  10415. for (let i = 0; i < prev.length; i++) {
  10416. if (hasChanged(prev[i], memo[i])) {
  10417. return false;
  10418. }
  10419. }
  10420. if (isBlockTreeEnabled > 0 && currentBlock) {
  10421. currentBlock.push(cached);
  10422. }
  10423. return true;
  10424. }
  10425. var version = "3.5.12";
  10426. var warn2 = true ? warn$1 : NOOP;
  10427. var ErrorTypeStrings = ErrorTypeStrings$1;
  10428. var devtools = true ? devtools$1 : void 0;
  10429. var setDevtoolsHook = true ? setDevtoolsHook$1 : NOOP;
  10430. var _ssrUtils = {
  10431. createComponentInstance,
  10432. setupComponent,
  10433. renderComponentRoot,
  10434. setCurrentRenderingInstance,
  10435. isVNode,
  10436. normalizeVNode,
  10437. getComponentPublicInstance,
  10438. ensureValidVNode,
  10439. pushWarningContext,
  10440. popWarningContext
  10441. };
  10442. var ssrUtils = _ssrUtils;
  10443. var resolveFilter = null;
  10444. var compatUtils = null;
  10445. var DeprecationTypes = null;
  10446. // node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
  10447. var policy = void 0;
  10448. var tt = typeof window !== "undefined" && window.trustedTypes;
  10449. if (tt) {
  10450. try {
  10451. policy = tt.createPolicy("vue", {
  10452. createHTML: (val) => val
  10453. });
  10454. } catch (e) {
  10455. warn2(`Error creating trusted types policy: ${e}`);
  10456. }
  10457. }
  10458. var unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  10459. var svgNS = "http://www.w3.org/2000/svg";
  10460. var mathmlNS = "http://www.w3.org/1998/Math/MathML";
  10461. var doc = typeof document !== "undefined" ? document : null;
  10462. var templateContainer = doc && doc.createElement("template");
  10463. var nodeOps = {
  10464. insert: (child, parent, anchor) => {
  10465. parent.insertBefore(child, anchor || null);
  10466. },
  10467. remove: (child) => {
  10468. const parent = child.parentNode;
  10469. if (parent) {
  10470. parent.removeChild(child);
  10471. }
  10472. },
  10473. createElement: (tag, namespace, is, props) => {
  10474. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  10475. if (tag === "select" && props && props.multiple != null) {
  10476. el.setAttribute("multiple", props.multiple);
  10477. }
  10478. return el;
  10479. },
  10480. createText: (text) => doc.createTextNode(text),
  10481. createComment: (text) => doc.createComment(text),
  10482. setText: (node, text) => {
  10483. node.nodeValue = text;
  10484. },
  10485. setElementText: (el, text) => {
  10486. el.textContent = text;
  10487. },
  10488. parentNode: (node) => node.parentNode,
  10489. nextSibling: (node) => node.nextSibling,
  10490. querySelector: (selector) => doc.querySelector(selector),
  10491. setScopeId(el, id) {
  10492. el.setAttribute(id, "");
  10493. },
  10494. // __UNSAFE__
  10495. // Reason: innerHTML.
  10496. // Static content here can only come from compiled templates.
  10497. // As long as the user only uses trusted templates, this is safe.
  10498. insertStaticContent(content, parent, anchor, namespace, start, end) {
  10499. const before = anchor ? anchor.previousSibling : parent.lastChild;
  10500. if (start && (start === end || start.nextSibling)) {
  10501. while (true) {
  10502. parent.insertBefore(start.cloneNode(true), anchor);
  10503. if (start === end || !(start = start.nextSibling)) break;
  10504. }
  10505. } else {
  10506. templateContainer.innerHTML = unsafeToTrustedHTML(
  10507. namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
  10508. );
  10509. const template = templateContainer.content;
  10510. if (namespace === "svg" || namespace === "mathml") {
  10511. const wrapper = template.firstChild;
  10512. while (wrapper.firstChild) {
  10513. template.appendChild(wrapper.firstChild);
  10514. }
  10515. template.removeChild(wrapper);
  10516. }
  10517. parent.insertBefore(template, anchor);
  10518. }
  10519. return [
  10520. // first
  10521. before ? before.nextSibling : parent.firstChild,
  10522. // last
  10523. anchor ? anchor.previousSibling : parent.lastChild
  10524. ];
  10525. }
  10526. };
  10527. var TRANSITION = "transition";
  10528. var ANIMATION = "animation";
  10529. var vtcKey = Symbol("_vtc");
  10530. var DOMTransitionPropsValidators = {
  10531. name: String,
  10532. type: String,
  10533. css: {
  10534. type: Boolean,
  10535. default: true
  10536. },
  10537. duration: [String, Number, Object],
  10538. enterFromClass: String,
  10539. enterActiveClass: String,
  10540. enterToClass: String,
  10541. appearFromClass: String,
  10542. appearActiveClass: String,
  10543. appearToClass: String,
  10544. leaveFromClass: String,
  10545. leaveActiveClass: String,
  10546. leaveToClass: String
  10547. };
  10548. var TransitionPropsValidators = extend(
  10549. {},
  10550. BaseTransitionPropsValidators,
  10551. DOMTransitionPropsValidators
  10552. );
  10553. var decorate$1 = (t) => {
  10554. t.displayName = "Transition";
  10555. t.props = TransitionPropsValidators;
  10556. return t;
  10557. };
  10558. var Transition = decorate$1(
  10559. (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
  10560. );
  10561. var callHook2 = (hook, args = []) => {
  10562. if (isArray(hook)) {
  10563. hook.forEach((h2) => h2(...args));
  10564. } else if (hook) {
  10565. hook(...args);
  10566. }
  10567. };
  10568. var hasExplicitCallback = (hook) => {
  10569. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  10570. };
  10571. function resolveTransitionProps(rawProps) {
  10572. const baseProps = {};
  10573. for (const key in rawProps) {
  10574. if (!(key in DOMTransitionPropsValidators)) {
  10575. baseProps[key] = rawProps[key];
  10576. }
  10577. }
  10578. if (rawProps.css === false) {
  10579. return baseProps;
  10580. }
  10581. const {
  10582. name = "v",
  10583. type,
  10584. duration,
  10585. enterFromClass = `${name}-enter-from`,
  10586. enterActiveClass = `${name}-enter-active`,
  10587. enterToClass = `${name}-enter-to`,
  10588. appearFromClass = enterFromClass,
  10589. appearActiveClass = enterActiveClass,
  10590. appearToClass = enterToClass,
  10591. leaveFromClass = `${name}-leave-from`,
  10592. leaveActiveClass = `${name}-leave-active`,
  10593. leaveToClass = `${name}-leave-to`
  10594. } = rawProps;
  10595. const durations = normalizeDuration(duration);
  10596. const enterDuration = durations && durations[0];
  10597. const leaveDuration = durations && durations[1];
  10598. const {
  10599. onBeforeEnter,
  10600. onEnter,
  10601. onEnterCancelled,
  10602. onLeave,
  10603. onLeaveCancelled,
  10604. onBeforeAppear = onBeforeEnter,
  10605. onAppear = onEnter,
  10606. onAppearCancelled = onEnterCancelled
  10607. } = baseProps;
  10608. const finishEnter = (el, isAppear, done) => {
  10609. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  10610. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  10611. done && done();
  10612. };
  10613. const finishLeave = (el, done) => {
  10614. el._isLeaving = false;
  10615. removeTransitionClass(el, leaveFromClass);
  10616. removeTransitionClass(el, leaveToClass);
  10617. removeTransitionClass(el, leaveActiveClass);
  10618. done && done();
  10619. };
  10620. const makeEnterHook = (isAppear) => {
  10621. return (el, done) => {
  10622. const hook = isAppear ? onAppear : onEnter;
  10623. const resolve2 = () => finishEnter(el, isAppear, done);
  10624. callHook2(hook, [el, resolve2]);
  10625. nextFrame(() => {
  10626. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  10627. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  10628. if (!hasExplicitCallback(hook)) {
  10629. whenTransitionEnds(el, type, enterDuration, resolve2);
  10630. }
  10631. });
  10632. };
  10633. };
  10634. return extend(baseProps, {
  10635. onBeforeEnter(el) {
  10636. callHook2(onBeforeEnter, [el]);
  10637. addTransitionClass(el, enterFromClass);
  10638. addTransitionClass(el, enterActiveClass);
  10639. },
  10640. onBeforeAppear(el) {
  10641. callHook2(onBeforeAppear, [el]);
  10642. addTransitionClass(el, appearFromClass);
  10643. addTransitionClass(el, appearActiveClass);
  10644. },
  10645. onEnter: makeEnterHook(false),
  10646. onAppear: makeEnterHook(true),
  10647. onLeave(el, done) {
  10648. el._isLeaving = true;
  10649. const resolve2 = () => finishLeave(el, done);
  10650. addTransitionClass(el, leaveFromClass);
  10651. addTransitionClass(el, leaveActiveClass);
  10652. forceReflow();
  10653. nextFrame(() => {
  10654. if (!el._isLeaving) {
  10655. return;
  10656. }
  10657. removeTransitionClass(el, leaveFromClass);
  10658. addTransitionClass(el, leaveToClass);
  10659. if (!hasExplicitCallback(onLeave)) {
  10660. whenTransitionEnds(el, type, leaveDuration, resolve2);
  10661. }
  10662. });
  10663. callHook2(onLeave, [el, resolve2]);
  10664. },
  10665. onEnterCancelled(el) {
  10666. finishEnter(el, false);
  10667. callHook2(onEnterCancelled, [el]);
  10668. },
  10669. onAppearCancelled(el) {
  10670. finishEnter(el, true);
  10671. callHook2(onAppearCancelled, [el]);
  10672. },
  10673. onLeaveCancelled(el) {
  10674. finishLeave(el);
  10675. callHook2(onLeaveCancelled, [el]);
  10676. }
  10677. });
  10678. }
  10679. function normalizeDuration(duration) {
  10680. if (duration == null) {
  10681. return null;
  10682. } else if (isObject(duration)) {
  10683. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  10684. } else {
  10685. const n = NumberOf(duration);
  10686. return [n, n];
  10687. }
  10688. }
  10689. function NumberOf(val) {
  10690. const res = toNumber(val);
  10691. if (true) {
  10692. assertNumber(res, "<transition> explicit duration");
  10693. }
  10694. return res;
  10695. }
  10696. function addTransitionClass(el, cls) {
  10697. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  10698. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  10699. }
  10700. function removeTransitionClass(el, cls) {
  10701. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  10702. const _vtc = el[vtcKey];
  10703. if (_vtc) {
  10704. _vtc.delete(cls);
  10705. if (!_vtc.size) {
  10706. el[vtcKey] = void 0;
  10707. }
  10708. }
  10709. }
  10710. function nextFrame(cb) {
  10711. requestAnimationFrame(() => {
  10712. requestAnimationFrame(cb);
  10713. });
  10714. }
  10715. var endId = 0;
  10716. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
  10717. const id = el._endId = ++endId;
  10718. const resolveIfNotStale = () => {
  10719. if (id === el._endId) {
  10720. resolve2();
  10721. }
  10722. };
  10723. if (explicitTimeout != null) {
  10724. return setTimeout(resolveIfNotStale, explicitTimeout);
  10725. }
  10726. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  10727. if (!type) {
  10728. return resolve2();
  10729. }
  10730. const endEvent = type + "end";
  10731. let ended = 0;
  10732. const end = () => {
  10733. el.removeEventListener(endEvent, onEnd);
  10734. resolveIfNotStale();
  10735. };
  10736. const onEnd = (e) => {
  10737. if (e.target === el && ++ended >= propCount) {
  10738. end();
  10739. }
  10740. };
  10741. setTimeout(() => {
  10742. if (ended < propCount) {
  10743. end();
  10744. }
  10745. }, timeout + 1);
  10746. el.addEventListener(endEvent, onEnd);
  10747. }
  10748. function getTransitionInfo(el, expectedType) {
  10749. const styles = window.getComputedStyle(el);
  10750. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  10751. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  10752. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  10753. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  10754. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  10755. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  10756. const animationTimeout = getTimeout(animationDelays, animationDurations);
  10757. let type = null;
  10758. let timeout = 0;
  10759. let propCount = 0;
  10760. if (expectedType === TRANSITION) {
  10761. if (transitionTimeout > 0) {
  10762. type = TRANSITION;
  10763. timeout = transitionTimeout;
  10764. propCount = transitionDurations.length;
  10765. }
  10766. } else if (expectedType === ANIMATION) {
  10767. if (animationTimeout > 0) {
  10768. type = ANIMATION;
  10769. timeout = animationTimeout;
  10770. propCount = animationDurations.length;
  10771. }
  10772. } else {
  10773. timeout = Math.max(transitionTimeout, animationTimeout);
  10774. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  10775. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  10776. }
  10777. const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
  10778. getStyleProperties(`${TRANSITION}Property`).toString()
  10779. );
  10780. return {
  10781. type,
  10782. timeout,
  10783. propCount,
  10784. hasTransform
  10785. };
  10786. }
  10787. function getTimeout(delays, durations) {
  10788. while (delays.length < durations.length) {
  10789. delays = delays.concat(delays);
  10790. }
  10791. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  10792. }
  10793. function toMs(s) {
  10794. if (s === "auto") return 0;
  10795. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  10796. }
  10797. function forceReflow() {
  10798. return document.body.offsetHeight;
  10799. }
  10800. function patchClass(el, value, isSVG) {
  10801. const transitionClasses = el[vtcKey];
  10802. if (transitionClasses) {
  10803. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  10804. }
  10805. if (value == null) {
  10806. el.removeAttribute("class");
  10807. } else if (isSVG) {
  10808. el.setAttribute("class", value);
  10809. } else {
  10810. el.className = value;
  10811. }
  10812. }
  10813. var vShowOriginalDisplay = Symbol("_vod");
  10814. var vShowHidden = Symbol("_vsh");
  10815. var vShow = {
  10816. beforeMount(el, { value }, { transition }) {
  10817. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  10818. if (transition && value) {
  10819. transition.beforeEnter(el);
  10820. } else {
  10821. setDisplay(el, value);
  10822. }
  10823. },
  10824. mounted(el, { value }, { transition }) {
  10825. if (transition && value) {
  10826. transition.enter(el);
  10827. }
  10828. },
  10829. updated(el, { value, oldValue }, { transition }) {
  10830. if (!value === !oldValue) return;
  10831. if (transition) {
  10832. if (value) {
  10833. transition.beforeEnter(el);
  10834. setDisplay(el, true);
  10835. transition.enter(el);
  10836. } else {
  10837. transition.leave(el, () => {
  10838. setDisplay(el, false);
  10839. });
  10840. }
  10841. } else {
  10842. setDisplay(el, value);
  10843. }
  10844. },
  10845. beforeUnmount(el, { value }) {
  10846. setDisplay(el, value);
  10847. }
  10848. };
  10849. if (true) {
  10850. vShow.name = "show";
  10851. }
  10852. function setDisplay(el, value) {
  10853. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  10854. el[vShowHidden] = !value;
  10855. }
  10856. function initVShowForSSR() {
  10857. vShow.getSSRProps = ({ value }) => {
  10858. if (!value) {
  10859. return { style: { display: "none" } };
  10860. }
  10861. };
  10862. }
  10863. var CSS_VAR_TEXT = Symbol(true ? "CSS_VAR_TEXT" : "");
  10864. function useCssVars(getter) {
  10865. const instance = getCurrentInstance();
  10866. if (!instance) {
  10867. warn2(`useCssVars is called without current active component instance.`);
  10868. return;
  10869. }
  10870. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  10871. Array.from(
  10872. document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
  10873. ).forEach((node) => setVarsOnNode(node, vars));
  10874. };
  10875. if (true) {
  10876. instance.getCssVars = () => getter(instance.proxy);
  10877. }
  10878. const setVars = () => {
  10879. const vars = getter(instance.proxy);
  10880. if (instance.ce) {
  10881. setVarsOnNode(instance.ce, vars);
  10882. } else {
  10883. setVarsOnVNode(instance.subTree, vars);
  10884. }
  10885. updateTeleports(vars);
  10886. };
  10887. onBeforeMount(() => {
  10888. watchPostEffect(setVars);
  10889. });
  10890. onMounted(() => {
  10891. const ob = new MutationObserver(setVars);
  10892. ob.observe(instance.subTree.el.parentNode, { childList: true });
  10893. onUnmounted(() => ob.disconnect());
  10894. });
  10895. }
  10896. function setVarsOnVNode(vnode, vars) {
  10897. if (vnode.shapeFlag & 128) {
  10898. const suspense = vnode.suspense;
  10899. vnode = suspense.activeBranch;
  10900. if (suspense.pendingBranch && !suspense.isHydrating) {
  10901. suspense.effects.push(() => {
  10902. setVarsOnVNode(suspense.activeBranch, vars);
  10903. });
  10904. }
  10905. }
  10906. while (vnode.component) {
  10907. vnode = vnode.component.subTree;
  10908. }
  10909. if (vnode.shapeFlag & 1 && vnode.el) {
  10910. setVarsOnNode(vnode.el, vars);
  10911. } else if (vnode.type === Fragment) {
  10912. vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  10913. } else if (vnode.type === Static) {
  10914. let { el, anchor } = vnode;
  10915. while (el) {
  10916. setVarsOnNode(el, vars);
  10917. if (el === anchor) break;
  10918. el = el.nextSibling;
  10919. }
  10920. }
  10921. }
  10922. function setVarsOnNode(el, vars) {
  10923. if (el.nodeType === 1) {
  10924. const style = el.style;
  10925. let cssText = "";
  10926. for (const key in vars) {
  10927. style.setProperty(`--${key}`, vars[key]);
  10928. cssText += `--${key}: ${vars[key]};`;
  10929. }
  10930. style[CSS_VAR_TEXT] = cssText;
  10931. }
  10932. }
  10933. var displayRE = /(^|;)\s*display\s*:/;
  10934. function patchStyle(el, prev, next) {
  10935. const style = el.style;
  10936. const isCssString = isString(next);
  10937. let hasControlledDisplay = false;
  10938. if (next && !isCssString) {
  10939. if (prev) {
  10940. if (!isString(prev)) {
  10941. for (const key in prev) {
  10942. if (next[key] == null) {
  10943. setStyle(style, key, "");
  10944. }
  10945. }
  10946. } else {
  10947. for (const prevStyle of prev.split(";")) {
  10948. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  10949. if (next[key] == null) {
  10950. setStyle(style, key, "");
  10951. }
  10952. }
  10953. }
  10954. }
  10955. for (const key in next) {
  10956. if (key === "display") {
  10957. hasControlledDisplay = true;
  10958. }
  10959. setStyle(style, key, next[key]);
  10960. }
  10961. } else {
  10962. if (isCssString) {
  10963. if (prev !== next) {
  10964. const cssVarText = style[CSS_VAR_TEXT];
  10965. if (cssVarText) {
  10966. next += ";" + cssVarText;
  10967. }
  10968. style.cssText = next;
  10969. hasControlledDisplay = displayRE.test(next);
  10970. }
  10971. } else if (prev) {
  10972. el.removeAttribute("style");
  10973. }
  10974. }
  10975. if (vShowOriginalDisplay in el) {
  10976. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  10977. if (el[vShowHidden]) {
  10978. style.display = "none";
  10979. }
  10980. }
  10981. }
  10982. var semicolonRE = /[^\\];\s*$/;
  10983. var importantRE = /\s*!important$/;
  10984. function setStyle(style, name, val) {
  10985. if (isArray(val)) {
  10986. val.forEach((v) => setStyle(style, name, v));
  10987. } else {
  10988. if (val == null) val = "";
  10989. if (true) {
  10990. if (semicolonRE.test(val)) {
  10991. warn2(
  10992. `Unexpected semicolon at the end of '${name}' style value: '${val}'`
  10993. );
  10994. }
  10995. }
  10996. if (name.startsWith("--")) {
  10997. style.setProperty(name, val);
  10998. } else {
  10999. const prefixed = autoPrefix(style, name);
  11000. if (importantRE.test(val)) {
  11001. style.setProperty(
  11002. hyphenate(prefixed),
  11003. val.replace(importantRE, ""),
  11004. "important"
  11005. );
  11006. } else {
  11007. style[prefixed] = val;
  11008. }
  11009. }
  11010. }
  11011. }
  11012. var prefixes = ["Webkit", "Moz", "ms"];
  11013. var prefixCache = {};
  11014. function autoPrefix(style, rawName) {
  11015. const cached = prefixCache[rawName];
  11016. if (cached) {
  11017. return cached;
  11018. }
  11019. let name = camelize(rawName);
  11020. if (name !== "filter" && name in style) {
  11021. return prefixCache[rawName] = name;
  11022. }
  11023. name = capitalize(name);
  11024. for (let i = 0; i < prefixes.length; i++) {
  11025. const prefixed = prefixes[i] + name;
  11026. if (prefixed in style) {
  11027. return prefixCache[rawName] = prefixed;
  11028. }
  11029. }
  11030. return rawName;
  11031. }
  11032. var xlinkNS = "http://www.w3.org/1999/xlink";
  11033. function patchAttr(el, key, value, isSVG, instance, isBoolean2 = isSpecialBooleanAttr(key)) {
  11034. if (isSVG && key.startsWith("xlink:")) {
  11035. if (value == null) {
  11036. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  11037. } else {
  11038. el.setAttributeNS(xlinkNS, key, value);
  11039. }
  11040. } else {
  11041. if (value == null || isBoolean2 && !includeBooleanAttr(value)) {
  11042. el.removeAttribute(key);
  11043. } else {
  11044. el.setAttribute(
  11045. key,
  11046. isBoolean2 ? "" : isSymbol(value) ? String(value) : value
  11047. );
  11048. }
  11049. }
  11050. }
  11051. function patchDOMProp(el, key, value, parentComponent, attrName) {
  11052. if (key === "innerHTML" || key === "textContent") {
  11053. if (value != null) {
  11054. el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  11055. }
  11056. return;
  11057. }
  11058. const tag = el.tagName;
  11059. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  11060. !tag.includes("-")) {
  11061. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  11062. const newValue = value == null ? (
  11063. // #11647: value should be set as empty string for null and undefined,
  11064. // but <input type="checkbox"> should be set as 'on'.
  11065. el.type === "checkbox" ? "on" : ""
  11066. ) : String(value);
  11067. if (oldValue !== newValue || !("_value" in el)) {
  11068. el.value = newValue;
  11069. }
  11070. if (value == null) {
  11071. el.removeAttribute(key);
  11072. }
  11073. el._value = value;
  11074. return;
  11075. }
  11076. let needRemove = false;
  11077. if (value === "" || value == null) {
  11078. const type = typeof el[key];
  11079. if (type === "boolean") {
  11080. value = includeBooleanAttr(value);
  11081. } else if (value == null && type === "string") {
  11082. value = "";
  11083. needRemove = true;
  11084. } else if (type === "number") {
  11085. value = 0;
  11086. needRemove = true;
  11087. }
  11088. }
  11089. try {
  11090. el[key] = value;
  11091. } catch (e) {
  11092. if (!needRemove) {
  11093. warn2(
  11094. `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
  11095. e
  11096. );
  11097. }
  11098. }
  11099. needRemove && el.removeAttribute(attrName || key);
  11100. }
  11101. function addEventListener(el, event, handler, options) {
  11102. el.addEventListener(event, handler, options);
  11103. }
  11104. function removeEventListener(el, event, handler, options) {
  11105. el.removeEventListener(event, handler, options);
  11106. }
  11107. var veiKey = Symbol("_vei");
  11108. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  11109. const invokers = el[veiKey] || (el[veiKey] = {});
  11110. const existingInvoker = invokers[rawName];
  11111. if (nextValue && existingInvoker) {
  11112. existingInvoker.value = true ? sanitizeEventValue(nextValue, rawName) : nextValue;
  11113. } else {
  11114. const [name, options] = parseName(rawName);
  11115. if (nextValue) {
  11116. const invoker = invokers[rawName] = createInvoker(
  11117. true ? sanitizeEventValue(nextValue, rawName) : nextValue,
  11118. instance
  11119. );
  11120. addEventListener(el, name, invoker, options);
  11121. } else if (existingInvoker) {
  11122. removeEventListener(el, name, existingInvoker, options);
  11123. invokers[rawName] = void 0;
  11124. }
  11125. }
  11126. }
  11127. var optionsModifierRE = /(?:Once|Passive|Capture)$/;
  11128. function parseName(name) {
  11129. let options;
  11130. if (optionsModifierRE.test(name)) {
  11131. options = {};
  11132. let m;
  11133. while (m = name.match(optionsModifierRE)) {
  11134. name = name.slice(0, name.length - m[0].length);
  11135. options[m[0].toLowerCase()] = true;
  11136. }
  11137. }
  11138. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  11139. return [event, options];
  11140. }
  11141. var cachedNow = 0;
  11142. var p = Promise.resolve();
  11143. var getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  11144. function createInvoker(initialValue, instance) {
  11145. const invoker = (e) => {
  11146. if (!e._vts) {
  11147. e._vts = Date.now();
  11148. } else if (e._vts <= invoker.attached) {
  11149. return;
  11150. }
  11151. callWithAsyncErrorHandling(
  11152. patchStopImmediatePropagation(e, invoker.value),
  11153. instance,
  11154. 5,
  11155. [e]
  11156. );
  11157. };
  11158. invoker.value = initialValue;
  11159. invoker.attached = getNow();
  11160. return invoker;
  11161. }
  11162. function sanitizeEventValue(value, propName) {
  11163. if (isFunction(value) || isArray(value)) {
  11164. return value;
  11165. }
  11166. warn2(
  11167. `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
  11168. Expected function or array of functions, received type ${typeof value}.`
  11169. );
  11170. return NOOP;
  11171. }
  11172. function patchStopImmediatePropagation(e, value) {
  11173. if (isArray(value)) {
  11174. const originalStop = e.stopImmediatePropagation;
  11175. e.stopImmediatePropagation = () => {
  11176. originalStop.call(e);
  11177. e._stopped = true;
  11178. };
  11179. return value.map(
  11180. (fn) => (e2) => !e2._stopped && fn && fn(e2)
  11181. );
  11182. } else {
  11183. return value;
  11184. }
  11185. }
  11186. var isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  11187. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  11188. var patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  11189. const isSVG = namespace === "svg";
  11190. if (key === "class") {
  11191. patchClass(el, nextValue, isSVG);
  11192. } else if (key === "style") {
  11193. patchStyle(el, prevValue, nextValue);
  11194. } else if (isOn(key)) {
  11195. if (!isModelListener(key)) {
  11196. patchEvent(el, key, prevValue, nextValue, parentComponent);
  11197. }
  11198. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  11199. patchDOMProp(el, key, nextValue);
  11200. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
  11201. patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  11202. }
  11203. } else if (
  11204. // #11081 force set props for possible async custom element
  11205. el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
  11206. ) {
  11207. patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
  11208. } else {
  11209. if (key === "true-value") {
  11210. el._trueValue = nextValue;
  11211. } else if (key === "false-value") {
  11212. el._falseValue = nextValue;
  11213. }
  11214. patchAttr(el, key, nextValue, isSVG);
  11215. }
  11216. };
  11217. function shouldSetAsProp(el, key, value, isSVG) {
  11218. if (isSVG) {
  11219. if (key === "innerHTML" || key === "textContent") {
  11220. return true;
  11221. }
  11222. if (key in el && isNativeOn(key) && isFunction(value)) {
  11223. return true;
  11224. }
  11225. return false;
  11226. }
  11227. if (key === "spellcheck" || key === "draggable" || key === "translate") {
  11228. return false;
  11229. }
  11230. if (key === "form") {
  11231. return false;
  11232. }
  11233. if (key === "list" && el.tagName === "INPUT") {
  11234. return false;
  11235. }
  11236. if (key === "type" && el.tagName === "TEXTAREA") {
  11237. return false;
  11238. }
  11239. if (key === "width" || key === "height") {
  11240. const tag = el.tagName;
  11241. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  11242. return false;
  11243. }
  11244. }
  11245. if (isNativeOn(key) && isString(value)) {
  11246. return false;
  11247. }
  11248. return key in el;
  11249. }
  11250. var REMOVAL = {};
  11251. function defineCustomElement(options, extraOptions, _createApp) {
  11252. const Comp = defineComponent(options, extraOptions);
  11253. if (isPlainObject(Comp)) extend(Comp, extraOptions);
  11254. class VueCustomElement extends VueElement {
  11255. constructor(initialProps) {
  11256. super(Comp, initialProps, _createApp);
  11257. }
  11258. }
  11259. VueCustomElement.def = Comp;
  11260. return VueCustomElement;
  11261. }
  11262. var defineSSRCustomElement = (options, extraOptions) => {
  11263. return defineCustomElement(options, extraOptions, createSSRApp);
  11264. };
  11265. var BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  11266. };
  11267. var VueElement = class _VueElement extends BaseClass {
  11268. constructor(_def, _props = {}, _createApp = createApp) {
  11269. super();
  11270. this._def = _def;
  11271. this._props = _props;
  11272. this._createApp = _createApp;
  11273. this._isVueCE = true;
  11274. this._instance = null;
  11275. this._app = null;
  11276. this._nonce = this._def.nonce;
  11277. this._connected = false;
  11278. this._resolved = false;
  11279. this._numberProps = null;
  11280. this._styleChildren = /* @__PURE__ */ new WeakSet();
  11281. this._ob = null;
  11282. if (this.shadowRoot && _createApp !== createApp) {
  11283. this._root = this.shadowRoot;
  11284. } else {
  11285. if (this.shadowRoot) {
  11286. warn2(
  11287. `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
  11288. );
  11289. }
  11290. if (_def.shadowRoot !== false) {
  11291. this.attachShadow({ mode: "open" });
  11292. this._root = this.shadowRoot;
  11293. } else {
  11294. this._root = this;
  11295. }
  11296. }
  11297. if (!this._def.__asyncLoader) {
  11298. this._resolveProps(this._def);
  11299. }
  11300. }
  11301. connectedCallback() {
  11302. if (!this.isConnected) return;
  11303. if (!this.shadowRoot) {
  11304. this._parseSlots();
  11305. }
  11306. this._connected = true;
  11307. let parent = this;
  11308. while (parent = parent && (parent.parentNode || parent.host)) {
  11309. if (parent instanceof _VueElement) {
  11310. this._parent = parent;
  11311. break;
  11312. }
  11313. }
  11314. if (!this._instance) {
  11315. if (this._resolved) {
  11316. this._setParent();
  11317. this._update();
  11318. } else {
  11319. if (parent && parent._pendingResolve) {
  11320. this._pendingResolve = parent._pendingResolve.then(() => {
  11321. this._pendingResolve = void 0;
  11322. this._resolveDef();
  11323. });
  11324. } else {
  11325. this._resolveDef();
  11326. }
  11327. }
  11328. }
  11329. }
  11330. _setParent(parent = this._parent) {
  11331. if (parent) {
  11332. this._instance.parent = parent._instance;
  11333. this._instance.provides = parent._instance.provides;
  11334. }
  11335. }
  11336. disconnectedCallback() {
  11337. this._connected = false;
  11338. nextTick(() => {
  11339. if (!this._connected) {
  11340. if (this._ob) {
  11341. this._ob.disconnect();
  11342. this._ob = null;
  11343. }
  11344. this._app && this._app.unmount();
  11345. if (this._instance) this._instance.ce = void 0;
  11346. this._app = this._instance = null;
  11347. }
  11348. });
  11349. }
  11350. /**
  11351. * resolve inner component definition (handle possible async component)
  11352. */
  11353. _resolveDef() {
  11354. if (this._pendingResolve) {
  11355. return;
  11356. }
  11357. for (let i = 0; i < this.attributes.length; i++) {
  11358. this._setAttr(this.attributes[i].name);
  11359. }
  11360. this._ob = new MutationObserver((mutations) => {
  11361. for (const m of mutations) {
  11362. this._setAttr(m.attributeName);
  11363. }
  11364. });
  11365. this._ob.observe(this, { attributes: true });
  11366. const resolve2 = (def2, isAsync = false) => {
  11367. this._resolved = true;
  11368. this._pendingResolve = void 0;
  11369. const { props, styles } = def2;
  11370. let numberProps;
  11371. if (props && !isArray(props)) {
  11372. for (const key in props) {
  11373. const opt = props[key];
  11374. if (opt === Number || opt && opt.type === Number) {
  11375. if (key in this._props) {
  11376. this._props[key] = toNumber(this._props[key]);
  11377. }
  11378. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
  11379. }
  11380. }
  11381. }
  11382. this._numberProps = numberProps;
  11383. if (isAsync) {
  11384. this._resolveProps(def2);
  11385. }
  11386. if (this.shadowRoot) {
  11387. this._applyStyles(styles);
  11388. } else if (styles) {
  11389. warn2(
  11390. "Custom element style injection is not supported when using shadowRoot: false"
  11391. );
  11392. }
  11393. this._mount(def2);
  11394. };
  11395. const asyncDef = this._def.__asyncLoader;
  11396. if (asyncDef) {
  11397. this._pendingResolve = asyncDef().then(
  11398. (def2) => resolve2(this._def = def2, true)
  11399. );
  11400. } else {
  11401. resolve2(this._def);
  11402. }
  11403. }
  11404. _mount(def2) {
  11405. if (!def2.name) {
  11406. def2.name = "VueElement";
  11407. }
  11408. this._app = this._createApp(def2);
  11409. if (def2.configureApp) {
  11410. def2.configureApp(this._app);
  11411. }
  11412. this._app._ceVNode = this._createVNode();
  11413. this._app.mount(this._root);
  11414. const exposed = this._instance && this._instance.exposed;
  11415. if (!exposed) return;
  11416. for (const key in exposed) {
  11417. if (!hasOwn(this, key)) {
  11418. Object.defineProperty(this, key, {
  11419. // unwrap ref to be consistent with public instance behavior
  11420. get: () => unref(exposed[key])
  11421. });
  11422. } else if (true) {
  11423. warn2(`Exposed property "${key}" already exists on custom element.`);
  11424. }
  11425. }
  11426. }
  11427. _resolveProps(def2) {
  11428. const { props } = def2;
  11429. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  11430. for (const key of Object.keys(this)) {
  11431. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  11432. this._setProp(key, this[key]);
  11433. }
  11434. }
  11435. for (const key of declaredPropKeys.map(camelize)) {
  11436. Object.defineProperty(this, key, {
  11437. get() {
  11438. return this._getProp(key);
  11439. },
  11440. set(val) {
  11441. this._setProp(key, val, true, true);
  11442. }
  11443. });
  11444. }
  11445. }
  11446. _setAttr(key) {
  11447. if (key.startsWith("data-v-")) return;
  11448. const has = this.hasAttribute(key);
  11449. let value = has ? this.getAttribute(key) : REMOVAL;
  11450. const camelKey = camelize(key);
  11451. if (has && this._numberProps && this._numberProps[camelKey]) {
  11452. value = toNumber(value);
  11453. }
  11454. this._setProp(camelKey, value, false, true);
  11455. }
  11456. /**
  11457. * @internal
  11458. */
  11459. _getProp(key) {
  11460. return this._props[key];
  11461. }
  11462. /**
  11463. * @internal
  11464. */
  11465. _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
  11466. if (val !== this._props[key]) {
  11467. if (val === REMOVAL) {
  11468. delete this._props[key];
  11469. } else {
  11470. this._props[key] = val;
  11471. if (key === "key" && this._app) {
  11472. this._app._ceVNode.key = val;
  11473. }
  11474. }
  11475. if (shouldUpdate && this._instance) {
  11476. this._update();
  11477. }
  11478. if (shouldReflect) {
  11479. if (val === true) {
  11480. this.setAttribute(hyphenate(key), "");
  11481. } else if (typeof val === "string" || typeof val === "number") {
  11482. this.setAttribute(hyphenate(key), val + "");
  11483. } else if (!val) {
  11484. this.removeAttribute(hyphenate(key));
  11485. }
  11486. }
  11487. }
  11488. }
  11489. _update() {
  11490. render(this._createVNode(), this._root);
  11491. }
  11492. _createVNode() {
  11493. const baseProps = {};
  11494. if (!this.shadowRoot) {
  11495. baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
  11496. }
  11497. const vnode = createVNode(this._def, extend(baseProps, this._props));
  11498. if (!this._instance) {
  11499. vnode.ce = (instance) => {
  11500. this._instance = instance;
  11501. instance.ce = this;
  11502. instance.isCE = true;
  11503. if (true) {
  11504. instance.ceReload = (newStyles) => {
  11505. if (this._styles) {
  11506. this._styles.forEach((s) => this._root.removeChild(s));
  11507. this._styles.length = 0;
  11508. }
  11509. this._applyStyles(newStyles);
  11510. this._instance = null;
  11511. this._update();
  11512. };
  11513. }
  11514. const dispatch = (event, args) => {
  11515. this.dispatchEvent(
  11516. new CustomEvent(
  11517. event,
  11518. isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
  11519. )
  11520. );
  11521. };
  11522. instance.emit = (event, ...args) => {
  11523. dispatch(event, args);
  11524. if (hyphenate(event) !== event) {
  11525. dispatch(hyphenate(event), args);
  11526. }
  11527. };
  11528. this._setParent();
  11529. };
  11530. }
  11531. return vnode;
  11532. }
  11533. _applyStyles(styles, owner) {
  11534. if (!styles) return;
  11535. if (owner) {
  11536. if (owner === this._def || this._styleChildren.has(owner)) {
  11537. return;
  11538. }
  11539. this._styleChildren.add(owner);
  11540. }
  11541. const nonce = this._nonce;
  11542. for (let i = styles.length - 1; i >= 0; i--) {
  11543. const s = document.createElement("style");
  11544. if (nonce) s.setAttribute("nonce", nonce);
  11545. s.textContent = styles[i];
  11546. this.shadowRoot.prepend(s);
  11547. if (true) {
  11548. if (owner) {
  11549. if (owner.__hmrId) {
  11550. if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
  11551. let entry = this._childStyles.get(owner.__hmrId);
  11552. if (!entry) {
  11553. this._childStyles.set(owner.__hmrId, entry = []);
  11554. }
  11555. entry.push(s);
  11556. }
  11557. } else {
  11558. (this._styles || (this._styles = [])).push(s);
  11559. }
  11560. }
  11561. }
  11562. }
  11563. /**
  11564. * Only called when shadowRoot is false
  11565. */
  11566. _parseSlots() {
  11567. const slots = this._slots = {};
  11568. let n;
  11569. while (n = this.firstChild) {
  11570. const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
  11571. (slots[slotName] || (slots[slotName] = [])).push(n);
  11572. this.removeChild(n);
  11573. }
  11574. }
  11575. /**
  11576. * Only called when shadowRoot is false
  11577. */
  11578. _renderSlots() {
  11579. const outlets = (this._teleportTarget || this).querySelectorAll("slot");
  11580. const scopeId = this._instance.type.__scopeId;
  11581. for (let i = 0; i < outlets.length; i++) {
  11582. const o = outlets[i];
  11583. const slotName = o.getAttribute("name") || "default";
  11584. const content = this._slots[slotName];
  11585. const parent = o.parentNode;
  11586. if (content) {
  11587. for (const n of content) {
  11588. if (scopeId && n.nodeType === 1) {
  11589. const id = scopeId + "-s";
  11590. const walker = document.createTreeWalker(n, 1);
  11591. n.setAttribute(id, "");
  11592. let child;
  11593. while (child = walker.nextNode()) {
  11594. child.setAttribute(id, "");
  11595. }
  11596. }
  11597. parent.insertBefore(n, o);
  11598. }
  11599. } else {
  11600. while (o.firstChild) parent.insertBefore(o.firstChild, o);
  11601. }
  11602. parent.removeChild(o);
  11603. }
  11604. }
  11605. /**
  11606. * @internal
  11607. */
  11608. _injectChildStyle(comp) {
  11609. this._applyStyles(comp.styles, comp);
  11610. }
  11611. /**
  11612. * @internal
  11613. */
  11614. _removeChildStyle(comp) {
  11615. if (true) {
  11616. this._styleChildren.delete(comp);
  11617. if (this._childStyles && comp.__hmrId) {
  11618. const oldStyles = this._childStyles.get(comp.__hmrId);
  11619. if (oldStyles) {
  11620. oldStyles.forEach((s) => this._root.removeChild(s));
  11621. oldStyles.length = 0;
  11622. }
  11623. }
  11624. }
  11625. }
  11626. };
  11627. function useHost(caller) {
  11628. const instance = getCurrentInstance();
  11629. const el = instance && instance.ce;
  11630. if (el) {
  11631. return el;
  11632. } else if (true) {
  11633. if (!instance) {
  11634. warn2(
  11635. `${caller || "useHost"} called without an active component instance.`
  11636. );
  11637. } else {
  11638. warn2(
  11639. `${caller || "useHost"} can only be used in components defined via defineCustomElement.`
  11640. );
  11641. }
  11642. }
  11643. return null;
  11644. }
  11645. function useShadowRoot() {
  11646. const el = true ? useHost("useShadowRoot") : useHost();
  11647. return el && el.shadowRoot;
  11648. }
  11649. function useCssModule(name = "$style") {
  11650. {
  11651. const instance = getCurrentInstance();
  11652. if (!instance) {
  11653. warn2(`useCssModule must be called inside setup()`);
  11654. return EMPTY_OBJ;
  11655. }
  11656. const modules = instance.type.__cssModules;
  11657. if (!modules) {
  11658. warn2(`Current instance does not have CSS modules injected.`);
  11659. return EMPTY_OBJ;
  11660. }
  11661. const mod = modules[name];
  11662. if (!mod) {
  11663. warn2(`Current instance does not have CSS module named "${name}".`);
  11664. return EMPTY_OBJ;
  11665. }
  11666. return mod;
  11667. }
  11668. }
  11669. var positionMap = /* @__PURE__ */ new WeakMap();
  11670. var newPositionMap = /* @__PURE__ */ new WeakMap();
  11671. var moveCbKey = Symbol("_moveCb");
  11672. var enterCbKey2 = Symbol("_enterCb");
  11673. var decorate = (t) => {
  11674. delete t.props.mode;
  11675. return t;
  11676. };
  11677. var TransitionGroupImpl = decorate({
  11678. name: "TransitionGroup",
  11679. props: extend({}, TransitionPropsValidators, {
  11680. tag: String,
  11681. moveClass: String
  11682. }),
  11683. setup(props, { slots }) {
  11684. const instance = getCurrentInstance();
  11685. const state = useTransitionState();
  11686. let prevChildren;
  11687. let children;
  11688. onUpdated(() => {
  11689. if (!prevChildren.length) {
  11690. return;
  11691. }
  11692. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  11693. if (!hasCSSTransform(
  11694. prevChildren[0].el,
  11695. instance.vnode.el,
  11696. moveClass
  11697. )) {
  11698. return;
  11699. }
  11700. prevChildren.forEach(callPendingCbs);
  11701. prevChildren.forEach(recordPosition);
  11702. const movedChildren = prevChildren.filter(applyTranslation);
  11703. forceReflow();
  11704. movedChildren.forEach((c) => {
  11705. const el = c.el;
  11706. const style = el.style;
  11707. addTransitionClass(el, moveClass);
  11708. style.transform = style.webkitTransform = style.transitionDuration = "";
  11709. const cb = el[moveCbKey] = (e) => {
  11710. if (e && e.target !== el) {
  11711. return;
  11712. }
  11713. if (!e || /transform$/.test(e.propertyName)) {
  11714. el.removeEventListener("transitionend", cb);
  11715. el[moveCbKey] = null;
  11716. removeTransitionClass(el, moveClass);
  11717. }
  11718. };
  11719. el.addEventListener("transitionend", cb);
  11720. });
  11721. });
  11722. return () => {
  11723. const rawProps = toRaw(props);
  11724. const cssTransitionProps = resolveTransitionProps(rawProps);
  11725. let tag = rawProps.tag || Fragment;
  11726. prevChildren = [];
  11727. if (children) {
  11728. for (let i = 0; i < children.length; i++) {
  11729. const child = children[i];
  11730. if (child.el && child.el instanceof Element) {
  11731. prevChildren.push(child);
  11732. setTransitionHooks(
  11733. child,
  11734. resolveTransitionHooks(
  11735. child,
  11736. cssTransitionProps,
  11737. state,
  11738. instance
  11739. )
  11740. );
  11741. positionMap.set(
  11742. child,
  11743. child.el.getBoundingClientRect()
  11744. );
  11745. }
  11746. }
  11747. }
  11748. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  11749. for (let i = 0; i < children.length; i++) {
  11750. const child = children[i];
  11751. if (child.key != null) {
  11752. setTransitionHooks(
  11753. child,
  11754. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  11755. );
  11756. } else if (child.type !== Text) {
  11757. warn2(`<TransitionGroup> children must be keyed.`);
  11758. }
  11759. }
  11760. return createVNode(tag, null, children);
  11761. };
  11762. }
  11763. });
  11764. var TransitionGroup = TransitionGroupImpl;
  11765. function callPendingCbs(c) {
  11766. const el = c.el;
  11767. if (el[moveCbKey]) {
  11768. el[moveCbKey]();
  11769. }
  11770. if (el[enterCbKey2]) {
  11771. el[enterCbKey2]();
  11772. }
  11773. }
  11774. function recordPosition(c) {
  11775. newPositionMap.set(c, c.el.getBoundingClientRect());
  11776. }
  11777. function applyTranslation(c) {
  11778. const oldPos = positionMap.get(c);
  11779. const newPos = newPositionMap.get(c);
  11780. const dx = oldPos.left - newPos.left;
  11781. const dy = oldPos.top - newPos.top;
  11782. if (dx || dy) {
  11783. const s = c.el.style;
  11784. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  11785. s.transitionDuration = "0s";
  11786. return c;
  11787. }
  11788. }
  11789. function hasCSSTransform(el, root, moveClass) {
  11790. const clone = el.cloneNode();
  11791. const _vtc = el[vtcKey];
  11792. if (_vtc) {
  11793. _vtc.forEach((cls) => {
  11794. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  11795. });
  11796. }
  11797. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  11798. clone.style.display = "none";
  11799. const container = root.nodeType === 1 ? root : root.parentNode;
  11800. container.appendChild(clone);
  11801. const { hasTransform } = getTransitionInfo(clone);
  11802. container.removeChild(clone);
  11803. return hasTransform;
  11804. }
  11805. var getModelAssigner = (vnode) => {
  11806. const fn = vnode.props["onUpdate:modelValue"] || false;
  11807. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  11808. };
  11809. function onCompositionStart(e) {
  11810. e.target.composing = true;
  11811. }
  11812. function onCompositionEnd(e) {
  11813. const target = e.target;
  11814. if (target.composing) {
  11815. target.composing = false;
  11816. target.dispatchEvent(new Event("input"));
  11817. }
  11818. }
  11819. var assignKey = Symbol("_assign");
  11820. var vModelText = {
  11821. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  11822. el[assignKey] = getModelAssigner(vnode);
  11823. const castToNumber = number || vnode.props && vnode.props.type === "number";
  11824. addEventListener(el, lazy ? "change" : "input", (e) => {
  11825. if (e.target.composing) return;
  11826. let domValue = el.value;
  11827. if (trim) {
  11828. domValue = domValue.trim();
  11829. }
  11830. if (castToNumber) {
  11831. domValue = looseToNumber(domValue);
  11832. }
  11833. el[assignKey](domValue);
  11834. });
  11835. if (trim) {
  11836. addEventListener(el, "change", () => {
  11837. el.value = el.value.trim();
  11838. });
  11839. }
  11840. if (!lazy) {
  11841. addEventListener(el, "compositionstart", onCompositionStart);
  11842. addEventListener(el, "compositionend", onCompositionEnd);
  11843. addEventListener(el, "change", onCompositionEnd);
  11844. }
  11845. },
  11846. // set value on mounted so it's after min/max for type="range"
  11847. mounted(el, { value }) {
  11848. el.value = value == null ? "" : value;
  11849. },
  11850. beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
  11851. el[assignKey] = getModelAssigner(vnode);
  11852. if (el.composing) return;
  11853. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
  11854. const newValue = value == null ? "" : value;
  11855. if (elValue === newValue) {
  11856. return;
  11857. }
  11858. if (document.activeElement === el && el.type !== "range") {
  11859. if (lazy && value === oldValue) {
  11860. return;
  11861. }
  11862. if (trim && el.value.trim() === newValue) {
  11863. return;
  11864. }
  11865. }
  11866. el.value = newValue;
  11867. }
  11868. };
  11869. var vModelCheckbox = {
  11870. // #4096 array checkboxes need to be deep traversed
  11871. deep: true,
  11872. created(el, _, vnode) {
  11873. el[assignKey] = getModelAssigner(vnode);
  11874. addEventListener(el, "change", () => {
  11875. const modelValue = el._modelValue;
  11876. const elementValue = getValue(el);
  11877. const checked = el.checked;
  11878. const assign = el[assignKey];
  11879. if (isArray(modelValue)) {
  11880. const index = looseIndexOf(modelValue, elementValue);
  11881. const found = index !== -1;
  11882. if (checked && !found) {
  11883. assign(modelValue.concat(elementValue));
  11884. } else if (!checked && found) {
  11885. const filtered = [...modelValue];
  11886. filtered.splice(index, 1);
  11887. assign(filtered);
  11888. }
  11889. } else if (isSet(modelValue)) {
  11890. const cloned = new Set(modelValue);
  11891. if (checked) {
  11892. cloned.add(elementValue);
  11893. } else {
  11894. cloned.delete(elementValue);
  11895. }
  11896. assign(cloned);
  11897. } else {
  11898. assign(getCheckboxValue(el, checked));
  11899. }
  11900. });
  11901. },
  11902. // set initial checked on mount to wait for true-value/false-value
  11903. mounted: setChecked,
  11904. beforeUpdate(el, binding, vnode) {
  11905. el[assignKey] = getModelAssigner(vnode);
  11906. setChecked(el, binding, vnode);
  11907. }
  11908. };
  11909. function setChecked(el, { value, oldValue }, vnode) {
  11910. el._modelValue = value;
  11911. let checked;
  11912. if (isArray(value)) {
  11913. checked = looseIndexOf(value, vnode.props.value) > -1;
  11914. } else if (isSet(value)) {
  11915. checked = value.has(vnode.props.value);
  11916. } else {
  11917. if (value === oldValue) return;
  11918. checked = looseEqual(value, getCheckboxValue(el, true));
  11919. }
  11920. if (el.checked !== checked) {
  11921. el.checked = checked;
  11922. }
  11923. }
  11924. var vModelRadio = {
  11925. created(el, { value }, vnode) {
  11926. el.checked = looseEqual(value, vnode.props.value);
  11927. el[assignKey] = getModelAssigner(vnode);
  11928. addEventListener(el, "change", () => {
  11929. el[assignKey](getValue(el));
  11930. });
  11931. },
  11932. beforeUpdate(el, { value, oldValue }, vnode) {
  11933. el[assignKey] = getModelAssigner(vnode);
  11934. if (value !== oldValue) {
  11935. el.checked = looseEqual(value, vnode.props.value);
  11936. }
  11937. }
  11938. };
  11939. var vModelSelect = {
  11940. // <select multiple> value need to be deep traversed
  11941. deep: true,
  11942. created(el, { value, modifiers: { number } }, vnode) {
  11943. const isSetModel = isSet(value);
  11944. addEventListener(el, "change", () => {
  11945. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  11946. (o) => number ? looseToNumber(getValue(o)) : getValue(o)
  11947. );
  11948. el[assignKey](
  11949. el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
  11950. );
  11951. el._assigning = true;
  11952. nextTick(() => {
  11953. el._assigning = false;
  11954. });
  11955. });
  11956. el[assignKey] = getModelAssigner(vnode);
  11957. },
  11958. // set value in mounted & updated because <select> relies on its children
  11959. // <option>s.
  11960. mounted(el, { value }) {
  11961. setSelected(el, value);
  11962. },
  11963. beforeUpdate(el, _binding, vnode) {
  11964. el[assignKey] = getModelAssigner(vnode);
  11965. },
  11966. updated(el, { value }) {
  11967. if (!el._assigning) {
  11968. setSelected(el, value);
  11969. }
  11970. }
  11971. };
  11972. function setSelected(el, value) {
  11973. const isMultiple = el.multiple;
  11974. const isArrayValue = isArray(value);
  11975. if (isMultiple && !isArrayValue && !isSet(value)) {
  11976. warn2(
  11977. `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
  11978. );
  11979. return;
  11980. }
  11981. for (let i = 0, l = el.options.length; i < l; i++) {
  11982. const option = el.options[i];
  11983. const optionValue = getValue(option);
  11984. if (isMultiple) {
  11985. if (isArrayValue) {
  11986. const optionType = typeof optionValue;
  11987. if (optionType === "string" || optionType === "number") {
  11988. option.selected = value.some((v) => String(v) === String(optionValue));
  11989. } else {
  11990. option.selected = looseIndexOf(value, optionValue) > -1;
  11991. }
  11992. } else {
  11993. option.selected = value.has(optionValue);
  11994. }
  11995. } else if (looseEqual(getValue(option), value)) {
  11996. if (el.selectedIndex !== i) el.selectedIndex = i;
  11997. return;
  11998. }
  11999. }
  12000. if (!isMultiple && el.selectedIndex !== -1) {
  12001. el.selectedIndex = -1;
  12002. }
  12003. }
  12004. function getValue(el) {
  12005. return "_value" in el ? el._value : el.value;
  12006. }
  12007. function getCheckboxValue(el, checked) {
  12008. const key = checked ? "_trueValue" : "_falseValue";
  12009. return key in el ? el[key] : checked;
  12010. }
  12011. var vModelDynamic = {
  12012. created(el, binding, vnode) {
  12013. callModelHook(el, binding, vnode, null, "created");
  12014. },
  12015. mounted(el, binding, vnode) {
  12016. callModelHook(el, binding, vnode, null, "mounted");
  12017. },
  12018. beforeUpdate(el, binding, vnode, prevVNode) {
  12019. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  12020. },
  12021. updated(el, binding, vnode, prevVNode) {
  12022. callModelHook(el, binding, vnode, prevVNode, "updated");
  12023. }
  12024. };
  12025. function resolveDynamicModel(tagName, type) {
  12026. switch (tagName) {
  12027. case "SELECT":
  12028. return vModelSelect;
  12029. case "TEXTAREA":
  12030. return vModelText;
  12031. default:
  12032. switch (type) {
  12033. case "checkbox":
  12034. return vModelCheckbox;
  12035. case "radio":
  12036. return vModelRadio;
  12037. default:
  12038. return vModelText;
  12039. }
  12040. }
  12041. }
  12042. function callModelHook(el, binding, vnode, prevVNode, hook) {
  12043. const modelToUse = resolveDynamicModel(
  12044. el.tagName,
  12045. vnode.props && vnode.props.type
  12046. );
  12047. const fn = modelToUse[hook];
  12048. fn && fn(el, binding, vnode, prevVNode);
  12049. }
  12050. function initVModelForSSR() {
  12051. vModelText.getSSRProps = ({ value }) => ({ value });
  12052. vModelRadio.getSSRProps = ({ value }, vnode) => {
  12053. if (vnode.props && looseEqual(vnode.props.value, value)) {
  12054. return { checked: true };
  12055. }
  12056. };
  12057. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  12058. if (isArray(value)) {
  12059. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
  12060. return { checked: true };
  12061. }
  12062. } else if (isSet(value)) {
  12063. if (vnode.props && value.has(vnode.props.value)) {
  12064. return { checked: true };
  12065. }
  12066. } else if (value) {
  12067. return { checked: true };
  12068. }
  12069. };
  12070. vModelDynamic.getSSRProps = (binding, vnode) => {
  12071. if (typeof vnode.type !== "string") {
  12072. return;
  12073. }
  12074. const modelToUse = resolveDynamicModel(
  12075. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  12076. vnode.type.toUpperCase(),
  12077. vnode.props && vnode.props.type
  12078. );
  12079. if (modelToUse.getSSRProps) {
  12080. return modelToUse.getSSRProps(binding, vnode);
  12081. }
  12082. };
  12083. }
  12084. var systemModifiers = ["ctrl", "shift", "alt", "meta"];
  12085. var modifierGuards = {
  12086. stop: (e) => e.stopPropagation(),
  12087. prevent: (e) => e.preventDefault(),
  12088. self: (e) => e.target !== e.currentTarget,
  12089. ctrl: (e) => !e.ctrlKey,
  12090. shift: (e) => !e.shiftKey,
  12091. alt: (e) => !e.altKey,
  12092. meta: (e) => !e.metaKey,
  12093. left: (e) => "button" in e && e.button !== 0,
  12094. middle: (e) => "button" in e && e.button !== 1,
  12095. right: (e) => "button" in e && e.button !== 2,
  12096. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  12097. };
  12098. var withModifiers = (fn, modifiers) => {
  12099. const cache = fn._withMods || (fn._withMods = {});
  12100. const cacheKey = modifiers.join(".");
  12101. return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
  12102. for (let i = 0; i < modifiers.length; i++) {
  12103. const guard = modifierGuards[modifiers[i]];
  12104. if (guard && guard(event, modifiers)) return;
  12105. }
  12106. return fn(event, ...args);
  12107. });
  12108. };
  12109. var keyNames = {
  12110. esc: "escape",
  12111. space: " ",
  12112. up: "arrow-up",
  12113. left: "arrow-left",
  12114. right: "arrow-right",
  12115. down: "arrow-down",
  12116. delete: "backspace"
  12117. };
  12118. var withKeys = (fn, modifiers) => {
  12119. const cache = fn._withKeys || (fn._withKeys = {});
  12120. const cacheKey = modifiers.join(".");
  12121. return cache[cacheKey] || (cache[cacheKey] = (event) => {
  12122. if (!("key" in event)) {
  12123. return;
  12124. }
  12125. const eventKey = hyphenate(event.key);
  12126. if (modifiers.some(
  12127. (k) => k === eventKey || keyNames[k] === eventKey
  12128. )) {
  12129. return fn(event);
  12130. }
  12131. });
  12132. };
  12133. var rendererOptions = extend({ patchProp }, nodeOps);
  12134. var renderer;
  12135. var enabledHydration = false;
  12136. function ensureRenderer() {
  12137. return renderer || (renderer = createRenderer(rendererOptions));
  12138. }
  12139. function ensureHydrationRenderer() {
  12140. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  12141. enabledHydration = true;
  12142. return renderer;
  12143. }
  12144. var render = (...args) => {
  12145. ensureRenderer().render(...args);
  12146. };
  12147. var hydrate = (...args) => {
  12148. ensureHydrationRenderer().hydrate(...args);
  12149. };
  12150. var createApp = (...args) => {
  12151. const app = ensureRenderer().createApp(...args);
  12152. if (true) {
  12153. injectNativeTagCheck(app);
  12154. injectCompilerOptionsCheck(app);
  12155. }
  12156. const { mount } = app;
  12157. app.mount = (containerOrSelector) => {
  12158. const container = normalizeContainer(containerOrSelector);
  12159. if (!container) return;
  12160. const component = app._component;
  12161. if (!isFunction(component) && !component.render && !component.template) {
  12162. component.template = container.innerHTML;
  12163. }
  12164. if (container.nodeType === 1) {
  12165. container.textContent = "";
  12166. }
  12167. const proxy = mount(container, false, resolveRootNamespace(container));
  12168. if (container instanceof Element) {
  12169. container.removeAttribute("v-cloak");
  12170. container.setAttribute("data-v-app", "");
  12171. }
  12172. return proxy;
  12173. };
  12174. return app;
  12175. };
  12176. var createSSRApp = (...args) => {
  12177. const app = ensureHydrationRenderer().createApp(...args);
  12178. if (true) {
  12179. injectNativeTagCheck(app);
  12180. injectCompilerOptionsCheck(app);
  12181. }
  12182. const { mount } = app;
  12183. app.mount = (containerOrSelector) => {
  12184. const container = normalizeContainer(containerOrSelector);
  12185. if (container) {
  12186. return mount(container, true, resolveRootNamespace(container));
  12187. }
  12188. };
  12189. return app;
  12190. };
  12191. function resolveRootNamespace(container) {
  12192. if (container instanceof SVGElement) {
  12193. return "svg";
  12194. }
  12195. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  12196. return "mathml";
  12197. }
  12198. }
  12199. function injectNativeTagCheck(app) {
  12200. Object.defineProperty(app.config, "isNativeTag", {
  12201. value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
  12202. writable: false
  12203. });
  12204. }
  12205. function injectCompilerOptionsCheck(app) {
  12206. if (isRuntimeOnly()) {
  12207. const isCustomElement = app.config.isCustomElement;
  12208. Object.defineProperty(app.config, "isCustomElement", {
  12209. get() {
  12210. return isCustomElement;
  12211. },
  12212. set() {
  12213. warn2(
  12214. `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
  12215. );
  12216. }
  12217. });
  12218. const compilerOptions = app.config.compilerOptions;
  12219. const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
  12220. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  12221. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  12222. - For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
  12223. Object.defineProperty(app.config, "compilerOptions", {
  12224. get() {
  12225. warn2(msg);
  12226. return compilerOptions;
  12227. },
  12228. set() {
  12229. warn2(msg);
  12230. }
  12231. });
  12232. }
  12233. }
  12234. function normalizeContainer(container) {
  12235. if (isString(container)) {
  12236. const res = document.querySelector(container);
  12237. if (!res) {
  12238. warn2(
  12239. `Failed to mount app: mount target selector "${container}" returned null.`
  12240. );
  12241. }
  12242. return res;
  12243. }
  12244. if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
  12245. warn2(
  12246. `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
  12247. );
  12248. }
  12249. return container;
  12250. }
  12251. var ssrDirectiveInitialized = false;
  12252. var initDirectivesForSSR = () => {
  12253. if (!ssrDirectiveInitialized) {
  12254. ssrDirectiveInitialized = true;
  12255. initVModelForSSR();
  12256. initVShowForSSR();
  12257. }
  12258. };
  12259. // node_modules/vue/dist/vue.runtime.esm-bundler.js
  12260. function initDev() {
  12261. {
  12262. initCustomFormatter();
  12263. }
  12264. }
  12265. if (true) {
  12266. initDev();
  12267. }
  12268. var compile2 = () => {
  12269. if (true) {
  12270. warn2(
  12271. `Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  12272. );
  12273. }
  12274. };
  12275. export {
  12276. BaseTransition,
  12277. BaseTransitionPropsValidators,
  12278. Comment,
  12279. DeprecationTypes,
  12280. EffectScope,
  12281. ErrorCodes,
  12282. ErrorTypeStrings,
  12283. Fragment,
  12284. KeepAlive,
  12285. ReactiveEffect,
  12286. Static,
  12287. Suspense,
  12288. Teleport,
  12289. Text,
  12290. TrackOpTypes,
  12291. Transition,
  12292. TransitionGroup,
  12293. TriggerOpTypes,
  12294. VueElement,
  12295. assertNumber,
  12296. callWithAsyncErrorHandling,
  12297. callWithErrorHandling,
  12298. camelize,
  12299. capitalize,
  12300. cloneVNode,
  12301. compatUtils,
  12302. compile2 as compile,
  12303. computed2 as computed,
  12304. createApp,
  12305. createBlock,
  12306. createCommentVNode,
  12307. createElementBlock,
  12308. createBaseVNode as createElementVNode,
  12309. createHydrationRenderer,
  12310. createPropsRestProxy,
  12311. createRenderer,
  12312. createSSRApp,
  12313. createSlots,
  12314. createStaticVNode,
  12315. createTextVNode,
  12316. createVNode,
  12317. customRef,
  12318. defineAsyncComponent,
  12319. defineComponent,
  12320. defineCustomElement,
  12321. defineEmits,
  12322. defineExpose,
  12323. defineModel,
  12324. defineOptions,
  12325. defineProps,
  12326. defineSSRCustomElement,
  12327. defineSlots,
  12328. devtools,
  12329. effect,
  12330. effectScope,
  12331. getCurrentInstance,
  12332. getCurrentScope,
  12333. getCurrentWatcher,
  12334. getTransitionRawChildren,
  12335. guardReactiveProps,
  12336. h,
  12337. handleError,
  12338. hasInjectionContext,
  12339. hydrate,
  12340. hydrateOnIdle,
  12341. hydrateOnInteraction,
  12342. hydrateOnMediaQuery,
  12343. hydrateOnVisible,
  12344. initCustomFormatter,
  12345. initDirectivesForSSR,
  12346. inject,
  12347. isMemoSame,
  12348. isProxy,
  12349. isReactive,
  12350. isReadonly,
  12351. isRef2 as isRef,
  12352. isRuntimeOnly,
  12353. isShallow,
  12354. isVNode,
  12355. markRaw,
  12356. mergeDefaults,
  12357. mergeModels,
  12358. mergeProps,
  12359. nextTick,
  12360. normalizeClass,
  12361. normalizeProps,
  12362. normalizeStyle,
  12363. onActivated,
  12364. onBeforeMount,
  12365. onBeforeUnmount,
  12366. onBeforeUpdate,
  12367. onDeactivated,
  12368. onErrorCaptured,
  12369. onMounted,
  12370. onRenderTracked,
  12371. onRenderTriggered,
  12372. onScopeDispose,
  12373. onServerPrefetch,
  12374. onUnmounted,
  12375. onUpdated,
  12376. onWatcherCleanup,
  12377. openBlock,
  12378. popScopeId,
  12379. provide,
  12380. proxyRefs,
  12381. pushScopeId,
  12382. queuePostFlushCb,
  12383. reactive,
  12384. readonly,
  12385. ref,
  12386. registerRuntimeCompiler,
  12387. render,
  12388. renderList,
  12389. renderSlot,
  12390. resolveComponent,
  12391. resolveDirective,
  12392. resolveDynamicComponent,
  12393. resolveFilter,
  12394. resolveTransitionHooks,
  12395. setBlockTracking,
  12396. setDevtoolsHook,
  12397. setTransitionHooks,
  12398. shallowReactive,
  12399. shallowReadonly,
  12400. shallowRef,
  12401. ssrContextKey,
  12402. ssrUtils,
  12403. stop,
  12404. toDisplayString,
  12405. toHandlerKey,
  12406. toHandlers,
  12407. toRaw,
  12408. toRef,
  12409. toRefs,
  12410. toValue,
  12411. transformVNodeArgs,
  12412. triggerRef,
  12413. unref,
  12414. useAttrs,
  12415. useCssModule,
  12416. useCssVars,
  12417. useHost,
  12418. useId,
  12419. useModel,
  12420. useSSRContext,
  12421. useShadowRoot,
  12422. useSlots,
  12423. useTemplateRef,
  12424. useTransitionState,
  12425. vModelCheckbox,
  12426. vModelDynamic,
  12427. vModelRadio,
  12428. vModelSelect,
  12429. vModelText,
  12430. vShow,
  12431. version,
  12432. warn2 as warn,
  12433. watch2 as watch,
  12434. watchEffect,
  12435. watchPostEffect,
  12436. watchSyncEffect,
  12437. withAsyncContext,
  12438. withCtx,
  12439. withDefaults,
  12440. withDirectives,
  12441. withKeys,
  12442. withMemo,
  12443. withModifiers,
  12444. withScopeId
  12445. };
  12446. /*! Bundled license information:
  12447. @vue/shared/dist/shared.esm-bundler.js:
  12448. (**
  12449. * @vue/shared v3.5.12
  12450. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12451. * @license MIT
  12452. **)
  12453. (*! #__NO_SIDE_EFFECTS__ *)
  12454. @vue/reactivity/dist/reactivity.esm-bundler.js:
  12455. (**
  12456. * @vue/reactivity v3.5.12
  12457. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12458. * @license MIT
  12459. **)
  12460. @vue/runtime-core/dist/runtime-core.esm-bundler.js:
  12461. (**
  12462. * @vue/runtime-core v3.5.12
  12463. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12464. * @license MIT
  12465. **)
  12466. (*! #__NO_SIDE_EFFECTS__ *)
  12467. @vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
  12468. (**
  12469. * @vue/runtime-dom v3.5.12
  12470. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12471. * @license MIT
  12472. **)
  12473. (*! #__NO_SIDE_EFFECTS__ *)
  12474. vue/dist/vue.runtime.esm-bundler.js:
  12475. (**
  12476. * vue v3.5.12
  12477. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12478. * @license MIT
  12479. **)
  12480. */
  12481. //# sourceMappingURL=vue.js.map