chunk-YVHZHMSQ.js 277 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532
  1. import {
  2. EMPTY_ARR,
  3. EMPTY_OBJ,
  4. NO,
  5. NOOP,
  6. camelize,
  7. capitalize,
  8. def,
  9. extend,
  10. getGlobalThis,
  11. hasChanged,
  12. hasOwn,
  13. hyphenate,
  14. includeBooleanAttr,
  15. init_shared_esm_bundler,
  16. invokeArrayFns,
  17. isArray,
  18. isBooleanAttr,
  19. isBuiltInDirective,
  20. isFunction,
  21. isGloballyAllowed,
  22. isIntegerKey,
  23. isKnownHtmlAttr,
  24. isKnownSvgAttr,
  25. isMap,
  26. isModelListener,
  27. isObject,
  28. isOn,
  29. isPlainObject,
  30. isPromise,
  31. isRegExp,
  32. isRenderableAttrValue,
  33. isReservedProp,
  34. isSet,
  35. isString,
  36. isSymbol,
  37. looseToNumber,
  38. makeMap,
  39. normalizeClass,
  40. normalizeStyle,
  41. remove,
  42. stringifyStyle,
  43. toHandlerKey,
  44. toNumber,
  45. toRawType
  46. } from "./chunk-VNBICN6T.js";
  47. import {
  48. __esm
  49. } from "./chunk-2LSFTFF7.js";
  50. // node_modules/.pnpm/@vue+reactivity@3.4.27/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  51. function warn(msg, ...args) {
  52. console.warn(`[Vue warn] ${msg}`, ...args);
  53. }
  54. function effectScope(detached) {
  55. return new EffectScope(detached);
  56. }
  57. function recordEffectScope(effect2, scope = activeEffectScope) {
  58. if (scope && scope.active) {
  59. scope.effects.push(effect2);
  60. }
  61. }
  62. function getCurrentScope() {
  63. return activeEffectScope;
  64. }
  65. function onScopeDispose(fn) {
  66. if (activeEffectScope) {
  67. activeEffectScope.cleanups.push(fn);
  68. } else if (true) {
  69. warn(
  70. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  71. );
  72. }
  73. }
  74. function triggerComputed(computed3) {
  75. return computed3.value;
  76. }
  77. function preCleanupEffect(effect2) {
  78. effect2._trackId++;
  79. effect2._depsLength = 0;
  80. }
  81. function postCleanupEffect(effect2) {
  82. if (effect2.deps.length > effect2._depsLength) {
  83. for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
  84. cleanupDepEffect(effect2.deps[i], effect2);
  85. }
  86. effect2.deps.length = effect2._depsLength;
  87. }
  88. }
  89. function cleanupDepEffect(dep, effect2) {
  90. const trackId = dep.get(effect2);
  91. if (trackId !== void 0 && effect2._trackId !== trackId) {
  92. dep.delete(effect2);
  93. if (dep.size === 0) {
  94. dep.cleanup();
  95. }
  96. }
  97. }
  98. function effect(fn, options) {
  99. if (fn.effect instanceof ReactiveEffect) {
  100. fn = fn.effect.fn;
  101. }
  102. const _effect = new ReactiveEffect(fn, NOOP, () => {
  103. if (_effect.dirty) {
  104. _effect.run();
  105. }
  106. });
  107. if (options) {
  108. extend(_effect, options);
  109. if (options.scope)
  110. recordEffectScope(_effect, options.scope);
  111. }
  112. if (!options || !options.lazy) {
  113. _effect.run();
  114. }
  115. const runner = _effect.run.bind(_effect);
  116. runner.effect = _effect;
  117. return runner;
  118. }
  119. function stop(runner) {
  120. runner.effect.stop();
  121. }
  122. function pauseTracking() {
  123. trackStack.push(shouldTrack);
  124. shouldTrack = false;
  125. }
  126. function resetTracking() {
  127. const last = trackStack.pop();
  128. shouldTrack = last === void 0 ? true : last;
  129. }
  130. function pauseScheduling() {
  131. pauseScheduleStack++;
  132. }
  133. function resetScheduling() {
  134. pauseScheduleStack--;
  135. while (!pauseScheduleStack && queueEffectSchedulers.length) {
  136. queueEffectSchedulers.shift()();
  137. }
  138. }
  139. function trackEffect(effect2, dep, debuggerEventExtraInfo) {
  140. var _a;
  141. if (dep.get(effect2) !== effect2._trackId) {
  142. dep.set(effect2, effect2._trackId);
  143. const oldDep = effect2.deps[effect2._depsLength];
  144. if (oldDep !== dep) {
  145. if (oldDep) {
  146. cleanupDepEffect(oldDep, effect2);
  147. }
  148. effect2.deps[effect2._depsLength++] = dep;
  149. } else {
  150. effect2._depsLength++;
  151. }
  152. if (true) {
  153. (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
  154. }
  155. }
  156. }
  157. function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
  158. var _a;
  159. pauseScheduling();
  160. for (const effect2 of dep.keys()) {
  161. let tracking;
  162. if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
  163. effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
  164. effect2._dirtyLevel = dirtyLevel;
  165. }
  166. if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
  167. if (true) {
  168. (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
  169. }
  170. effect2.trigger();
  171. if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
  172. effect2._shouldSchedule = false;
  173. if (effect2.scheduler) {
  174. queueEffectSchedulers.push(effect2.scheduler);
  175. }
  176. }
  177. }
  178. }
  179. resetScheduling();
  180. }
  181. function track(target, type, key) {
  182. if (shouldTrack && activeEffect) {
  183. let depsMap = targetMap.get(target);
  184. if (!depsMap) {
  185. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  186. }
  187. let dep = depsMap.get(key);
  188. if (!dep) {
  189. depsMap.set(key, dep = createDep(() => depsMap.delete(key)));
  190. }
  191. trackEffect(
  192. activeEffect,
  193. dep,
  194. true ? {
  195. target,
  196. type,
  197. key
  198. } : void 0
  199. );
  200. }
  201. }
  202. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  203. const depsMap = targetMap.get(target);
  204. if (!depsMap) {
  205. return;
  206. }
  207. let deps = [];
  208. if (type === "clear") {
  209. deps = [...depsMap.values()];
  210. } else if (key === "length" && isArray(target)) {
  211. const newLength = Number(newValue);
  212. depsMap.forEach((dep, key2) => {
  213. if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
  214. deps.push(dep);
  215. }
  216. });
  217. } else {
  218. if (key !== void 0) {
  219. deps.push(depsMap.get(key));
  220. }
  221. switch (type) {
  222. case "add":
  223. if (!isArray(target)) {
  224. deps.push(depsMap.get(ITERATE_KEY));
  225. if (isMap(target)) {
  226. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  227. }
  228. } else if (isIntegerKey(key)) {
  229. deps.push(depsMap.get("length"));
  230. }
  231. break;
  232. case "delete":
  233. if (!isArray(target)) {
  234. deps.push(depsMap.get(ITERATE_KEY));
  235. if (isMap(target)) {
  236. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  237. }
  238. }
  239. break;
  240. case "set":
  241. if (isMap(target)) {
  242. deps.push(depsMap.get(ITERATE_KEY));
  243. }
  244. break;
  245. }
  246. }
  247. pauseScheduling();
  248. for (const dep of deps) {
  249. if (dep) {
  250. triggerEffects(
  251. dep,
  252. 4,
  253. true ? {
  254. target,
  255. type,
  256. key,
  257. newValue,
  258. oldValue,
  259. oldTarget
  260. } : void 0
  261. );
  262. }
  263. }
  264. resetScheduling();
  265. }
  266. function getDepFromReactive(object, key) {
  267. const depsMap = targetMap.get(object);
  268. return depsMap && depsMap.get(key);
  269. }
  270. function createArrayInstrumentations() {
  271. const instrumentations = {};
  272. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  273. instrumentations[key] = function(...args) {
  274. const arr = toRaw(this);
  275. for (let i = 0, l = this.length; i < l; i++) {
  276. track(arr, "get", i + "");
  277. }
  278. const res = arr[key](...args);
  279. if (res === -1 || res === false) {
  280. return arr[key](...args.map(toRaw));
  281. } else {
  282. return res;
  283. }
  284. };
  285. });
  286. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  287. instrumentations[key] = function(...args) {
  288. pauseTracking();
  289. pauseScheduling();
  290. const res = toRaw(this)[key].apply(this, args);
  291. resetScheduling();
  292. resetTracking();
  293. return res;
  294. };
  295. });
  296. return instrumentations;
  297. }
  298. function hasOwnProperty(key) {
  299. if (!isSymbol(key))
  300. key = String(key);
  301. const obj = toRaw(this);
  302. track(obj, "has", key);
  303. return obj.hasOwnProperty(key);
  304. }
  305. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  306. target = target["__v_raw"];
  307. const rawTarget = toRaw(target);
  308. const rawKey = toRaw(key);
  309. if (!isReadonly2) {
  310. if (hasChanged(key, rawKey)) {
  311. track(rawTarget, "get", key);
  312. }
  313. track(rawTarget, "get", rawKey);
  314. }
  315. const { has: has2 } = getProto(rawTarget);
  316. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  317. if (has2.call(rawTarget, key)) {
  318. return wrap(target.get(key));
  319. } else if (has2.call(rawTarget, rawKey)) {
  320. return wrap(target.get(rawKey));
  321. } else if (target !== rawTarget) {
  322. target.get(key);
  323. }
  324. }
  325. function has(key, isReadonly2 = false) {
  326. const target = this["__v_raw"];
  327. const rawTarget = toRaw(target);
  328. const rawKey = toRaw(key);
  329. if (!isReadonly2) {
  330. if (hasChanged(key, rawKey)) {
  331. track(rawTarget, "has", key);
  332. }
  333. track(rawTarget, "has", rawKey);
  334. }
  335. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  336. }
  337. function size(target, isReadonly2 = false) {
  338. target = target["__v_raw"];
  339. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  340. return Reflect.get(target, "size", target);
  341. }
  342. function add(value) {
  343. value = toRaw(value);
  344. const target = toRaw(this);
  345. const proto = getProto(target);
  346. const hadKey = proto.has.call(target, value);
  347. if (!hadKey) {
  348. target.add(value);
  349. trigger(target, "add", value, value);
  350. }
  351. return this;
  352. }
  353. function set(key, value) {
  354. value = toRaw(value);
  355. const target = toRaw(this);
  356. const { has: has2, get: get2 } = getProto(target);
  357. let hadKey = has2.call(target, key);
  358. if (!hadKey) {
  359. key = toRaw(key);
  360. hadKey = has2.call(target, key);
  361. } else if (true) {
  362. checkIdentityKeys(target, has2, key);
  363. }
  364. const oldValue = get2.call(target, key);
  365. target.set(key, value);
  366. if (!hadKey) {
  367. trigger(target, "add", key, value);
  368. } else if (hasChanged(value, oldValue)) {
  369. trigger(target, "set", key, value, oldValue);
  370. }
  371. return this;
  372. }
  373. function deleteEntry(key) {
  374. const target = toRaw(this);
  375. const { has: has2, get: get2 } = getProto(target);
  376. let hadKey = has2.call(target, key);
  377. if (!hadKey) {
  378. key = toRaw(key);
  379. hadKey = has2.call(target, key);
  380. } else if (true) {
  381. checkIdentityKeys(target, has2, key);
  382. }
  383. const oldValue = get2 ? get2.call(target, key) : void 0;
  384. const result = target.delete(key);
  385. if (hadKey) {
  386. trigger(target, "delete", key, void 0, oldValue);
  387. }
  388. return result;
  389. }
  390. function clear() {
  391. const target = toRaw(this);
  392. const hadItems = target.size !== 0;
  393. const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
  394. const result = target.clear();
  395. if (hadItems) {
  396. trigger(target, "clear", void 0, void 0, oldTarget);
  397. }
  398. return result;
  399. }
  400. function createForEach(isReadonly2, isShallow2) {
  401. return function forEach(callback, thisArg) {
  402. const observed = this;
  403. const target = observed["__v_raw"];
  404. const rawTarget = toRaw(target);
  405. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  406. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  407. return target.forEach((value, key) => {
  408. return callback.call(thisArg, wrap(value), wrap(key), observed);
  409. });
  410. };
  411. }
  412. function createIterableMethod(method, isReadonly2, isShallow2) {
  413. return function(...args) {
  414. const target = this["__v_raw"];
  415. const rawTarget = toRaw(target);
  416. const targetIsMap = isMap(rawTarget);
  417. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  418. const isKeyOnly = method === "keys" && targetIsMap;
  419. const innerIterator = target[method](...args);
  420. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  421. !isReadonly2 && track(
  422. rawTarget,
  423. "iterate",
  424. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  425. );
  426. return {
  427. // iterator protocol
  428. next() {
  429. const { value, done } = innerIterator.next();
  430. return done ? { value, done } : {
  431. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  432. done
  433. };
  434. },
  435. // iterable protocol
  436. [Symbol.iterator]() {
  437. return this;
  438. }
  439. };
  440. };
  441. }
  442. function createReadonlyMethod(type) {
  443. return function(...args) {
  444. if (true) {
  445. const key = args[0] ? `on key "${args[0]}" ` : ``;
  446. warn(
  447. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  448. toRaw(this)
  449. );
  450. }
  451. return type === "delete" ? false : type === "clear" ? void 0 : this;
  452. };
  453. }
  454. function createInstrumentations() {
  455. const mutableInstrumentations2 = {
  456. get(key) {
  457. return get(this, key);
  458. },
  459. get size() {
  460. return size(this);
  461. },
  462. has,
  463. add,
  464. set,
  465. delete: deleteEntry,
  466. clear,
  467. forEach: createForEach(false, false)
  468. };
  469. const shallowInstrumentations2 = {
  470. get(key) {
  471. return get(this, key, false, true);
  472. },
  473. get size() {
  474. return size(this);
  475. },
  476. has,
  477. add,
  478. set,
  479. delete: deleteEntry,
  480. clear,
  481. forEach: createForEach(false, true)
  482. };
  483. const readonlyInstrumentations2 = {
  484. get(key) {
  485. return get(this, key, true);
  486. },
  487. get size() {
  488. return size(this, true);
  489. },
  490. has(key) {
  491. return has.call(this, key, true);
  492. },
  493. add: createReadonlyMethod("add"),
  494. set: createReadonlyMethod("set"),
  495. delete: createReadonlyMethod("delete"),
  496. clear: createReadonlyMethod("clear"),
  497. forEach: createForEach(true, false)
  498. };
  499. const shallowReadonlyInstrumentations2 = {
  500. get(key) {
  501. return get(this, key, true, true);
  502. },
  503. get size() {
  504. return size(this, true);
  505. },
  506. has(key) {
  507. return has.call(this, key, true);
  508. },
  509. add: createReadonlyMethod("add"),
  510. set: createReadonlyMethod("set"),
  511. delete: createReadonlyMethod("delete"),
  512. clear: createReadonlyMethod("clear"),
  513. forEach: createForEach(true, true)
  514. };
  515. const iteratorMethods = [
  516. "keys",
  517. "values",
  518. "entries",
  519. Symbol.iterator
  520. ];
  521. iteratorMethods.forEach((method) => {
  522. mutableInstrumentations2[method] = createIterableMethod(method, false, false);
  523. readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
  524. shallowInstrumentations2[method] = createIterableMethod(method, false, true);
  525. shallowReadonlyInstrumentations2[method] = createIterableMethod(
  526. method,
  527. true,
  528. true
  529. );
  530. });
  531. return [
  532. mutableInstrumentations2,
  533. readonlyInstrumentations2,
  534. shallowInstrumentations2,
  535. shallowReadonlyInstrumentations2
  536. ];
  537. }
  538. function createInstrumentationGetter(isReadonly2, shallow) {
  539. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  540. return (target, key, receiver) => {
  541. if (key === "__v_isReactive") {
  542. return !isReadonly2;
  543. } else if (key === "__v_isReadonly") {
  544. return isReadonly2;
  545. } else if (key === "__v_raw") {
  546. return target;
  547. }
  548. return Reflect.get(
  549. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  550. key,
  551. receiver
  552. );
  553. };
  554. }
  555. function checkIdentityKeys(target, has2, key) {
  556. const rawKey = toRaw(key);
  557. if (rawKey !== key && has2.call(target, rawKey)) {
  558. const type = toRawType(target);
  559. warn(
  560. `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.`
  561. );
  562. }
  563. }
  564. function targetTypeMap(rawType) {
  565. switch (rawType) {
  566. case "Object":
  567. case "Array":
  568. return 1;
  569. case "Map":
  570. case "Set":
  571. case "WeakMap":
  572. case "WeakSet":
  573. return 2;
  574. default:
  575. return 0;
  576. }
  577. }
  578. function getTargetType(value) {
  579. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  580. }
  581. function reactive(target) {
  582. if (isReadonly(target)) {
  583. return target;
  584. }
  585. return createReactiveObject(
  586. target,
  587. false,
  588. mutableHandlers,
  589. mutableCollectionHandlers,
  590. reactiveMap
  591. );
  592. }
  593. function shallowReactive(target) {
  594. return createReactiveObject(
  595. target,
  596. false,
  597. shallowReactiveHandlers,
  598. shallowCollectionHandlers,
  599. shallowReactiveMap
  600. );
  601. }
  602. function readonly(target) {
  603. return createReactiveObject(
  604. target,
  605. true,
  606. readonlyHandlers,
  607. readonlyCollectionHandlers,
  608. readonlyMap
  609. );
  610. }
  611. function shallowReadonly(target) {
  612. return createReactiveObject(
  613. target,
  614. true,
  615. shallowReadonlyHandlers,
  616. shallowReadonlyCollectionHandlers,
  617. shallowReadonlyMap
  618. );
  619. }
  620. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  621. if (!isObject(target)) {
  622. if (true) {
  623. warn(`value cannot be made reactive: ${String(target)}`);
  624. }
  625. return target;
  626. }
  627. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  628. return target;
  629. }
  630. const existingProxy = proxyMap.get(target);
  631. if (existingProxy) {
  632. return existingProxy;
  633. }
  634. const targetType = getTargetType(target);
  635. if (targetType === 0) {
  636. return target;
  637. }
  638. const proxy = new Proxy(
  639. target,
  640. targetType === 2 ? collectionHandlers : baseHandlers
  641. );
  642. proxyMap.set(target, proxy);
  643. return proxy;
  644. }
  645. function isReactive(value) {
  646. if (isReadonly(value)) {
  647. return isReactive(value["__v_raw"]);
  648. }
  649. return !!(value && value["__v_isReactive"]);
  650. }
  651. function isReadonly(value) {
  652. return !!(value && value["__v_isReadonly"]);
  653. }
  654. function isShallow(value) {
  655. return !!(value && value["__v_isShallow"]);
  656. }
  657. function isProxy(value) {
  658. return value ? !!value["__v_raw"] : false;
  659. }
  660. function toRaw(observed) {
  661. const raw = observed && observed["__v_raw"];
  662. return raw ? toRaw(raw) : observed;
  663. }
  664. function markRaw(value) {
  665. if (Object.isExtensible(value)) {
  666. def(value, "__v_skip", true);
  667. }
  668. return value;
  669. }
  670. function computed(getterOrOptions, debugOptions, isSSR = false) {
  671. let getter;
  672. let setter;
  673. const onlyGetter = isFunction(getterOrOptions);
  674. if (onlyGetter) {
  675. getter = getterOrOptions;
  676. setter = true ? () => {
  677. warn("Write operation failed: computed value is readonly");
  678. } : NOOP;
  679. } else {
  680. getter = getterOrOptions.get;
  681. setter = getterOrOptions.set;
  682. }
  683. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  684. if (debugOptions && !isSSR) {
  685. cRef.effect.onTrack = debugOptions.onTrack;
  686. cRef.effect.onTrigger = debugOptions.onTrigger;
  687. }
  688. return cRef;
  689. }
  690. function trackRefValue(ref2) {
  691. var _a;
  692. if (shouldTrack && activeEffect) {
  693. ref2 = toRaw(ref2);
  694. trackEffect(
  695. activeEffect,
  696. (_a = ref2.dep) != null ? _a : ref2.dep = createDep(
  697. () => ref2.dep = void 0,
  698. ref2 instanceof ComputedRefImpl ? ref2 : void 0
  699. ),
  700. true ? {
  701. target: ref2,
  702. type: "get",
  703. key: "value"
  704. } : void 0
  705. );
  706. }
  707. }
  708. function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
  709. ref2 = toRaw(ref2);
  710. const dep = ref2.dep;
  711. if (dep) {
  712. triggerEffects(
  713. dep,
  714. dirtyLevel,
  715. true ? {
  716. target: ref2,
  717. type: "set",
  718. key: "value",
  719. newValue: newVal
  720. } : void 0
  721. );
  722. }
  723. }
  724. function isRef(r) {
  725. return !!(r && r.__v_isRef === true);
  726. }
  727. function ref(value) {
  728. return createRef(value, false);
  729. }
  730. function shallowRef(value) {
  731. return createRef(value, true);
  732. }
  733. function createRef(rawValue, shallow) {
  734. if (isRef(rawValue)) {
  735. return rawValue;
  736. }
  737. return new RefImpl(rawValue, shallow);
  738. }
  739. function triggerRef(ref2) {
  740. triggerRefValue(ref2, 4, true ? ref2.value : void 0);
  741. }
  742. function unref(ref2) {
  743. return isRef(ref2) ? ref2.value : ref2;
  744. }
  745. function toValue(source) {
  746. return isFunction(source) ? source() : unref(source);
  747. }
  748. function proxyRefs(objectWithRefs) {
  749. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  750. }
  751. function customRef(factory) {
  752. return new CustomRefImpl(factory);
  753. }
  754. function toRefs(object) {
  755. if (!isProxy(object)) {
  756. warn(`toRefs() expects a reactive object but received a plain one.`);
  757. }
  758. const ret = isArray(object) ? new Array(object.length) : {};
  759. for (const key in object) {
  760. ret[key] = propertyToRef(object, key);
  761. }
  762. return ret;
  763. }
  764. function toRef(source, key, defaultValue) {
  765. if (isRef(source)) {
  766. return source;
  767. } else if (isFunction(source)) {
  768. return new GetterRefImpl(source);
  769. } else if (isObject(source) && arguments.length > 1) {
  770. return propertyToRef(source, key, defaultValue);
  771. } else {
  772. return ref(source);
  773. }
  774. }
  775. function propertyToRef(source, key, defaultValue) {
  776. const val = source[key];
  777. return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  778. }
  779. var activeEffectScope, EffectScope, activeEffect, ReactiveEffect, shouldTrack, pauseScheduleStack, trackStack, queueEffectSchedulers, createDep, targetMap, ITERATE_KEY, MAP_KEY_ITERATE_KEY, isNonTrackableKeys, builtInSymbols, arrayInstrumentations, BaseReactiveHandler, MutableReactiveHandler, ReadonlyReactiveHandler, mutableHandlers, readonlyHandlers, shallowReactiveHandlers, shallowReadonlyHandlers, toShallow, getProto, mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations, mutableCollectionHandlers, shallowCollectionHandlers, readonlyCollectionHandlers, shallowReadonlyCollectionHandlers, reactiveMap, shallowReactiveMap, readonlyMap, shallowReadonlyMap, toReactive, toReadonly, COMPUTED_SIDE_EFFECT_WARN, ComputedRefImpl, RefImpl, shallowUnwrapHandlers, CustomRefImpl, ObjectRefImpl, GetterRefImpl, TrackOpTypes, TriggerOpTypes;
  780. var init_reactivity_esm_bundler = __esm({
  781. "node_modules/.pnpm/@vue+reactivity@3.4.27/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js"() {
  782. init_shared_esm_bundler();
  783. EffectScope = class {
  784. constructor(detached = false) {
  785. this.detached = detached;
  786. this._active = true;
  787. this.effects = [];
  788. this.cleanups = [];
  789. this.parent = activeEffectScope;
  790. if (!detached && activeEffectScope) {
  791. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  792. this
  793. ) - 1;
  794. }
  795. }
  796. get active() {
  797. return this._active;
  798. }
  799. run(fn) {
  800. if (this._active) {
  801. const currentEffectScope = activeEffectScope;
  802. try {
  803. activeEffectScope = this;
  804. return fn();
  805. } finally {
  806. activeEffectScope = currentEffectScope;
  807. }
  808. } else if (true) {
  809. warn(`cannot run an inactive effect scope.`);
  810. }
  811. }
  812. /**
  813. * This should only be called on non-detached scopes
  814. * @internal
  815. */
  816. on() {
  817. activeEffectScope = this;
  818. }
  819. /**
  820. * This should only be called on non-detached scopes
  821. * @internal
  822. */
  823. off() {
  824. activeEffectScope = this.parent;
  825. }
  826. stop(fromParent) {
  827. if (this._active) {
  828. let i, l;
  829. for (i = 0, l = this.effects.length; i < l; i++) {
  830. this.effects[i].stop();
  831. }
  832. for (i = 0, l = this.cleanups.length; i < l; i++) {
  833. this.cleanups[i]();
  834. }
  835. if (this.scopes) {
  836. for (i = 0, l = this.scopes.length; i < l; i++) {
  837. this.scopes[i].stop(true);
  838. }
  839. }
  840. if (!this.detached && this.parent && !fromParent) {
  841. const last = this.parent.scopes.pop();
  842. if (last && last !== this) {
  843. this.parent.scopes[this.index] = last;
  844. last.index = this.index;
  845. }
  846. }
  847. this.parent = void 0;
  848. this._active = false;
  849. }
  850. }
  851. };
  852. ReactiveEffect = class {
  853. constructor(fn, trigger2, scheduler, scope) {
  854. this.fn = fn;
  855. this.trigger = trigger2;
  856. this.scheduler = scheduler;
  857. this.active = true;
  858. this.deps = [];
  859. this._dirtyLevel = 4;
  860. this._trackId = 0;
  861. this._runnings = 0;
  862. this._shouldSchedule = false;
  863. this._depsLength = 0;
  864. recordEffectScope(this, scope);
  865. }
  866. get dirty() {
  867. if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
  868. this._dirtyLevel = 1;
  869. pauseTracking();
  870. for (let i = 0; i < this._depsLength; i++) {
  871. const dep = this.deps[i];
  872. if (dep.computed) {
  873. triggerComputed(dep.computed);
  874. if (this._dirtyLevel >= 4) {
  875. break;
  876. }
  877. }
  878. }
  879. if (this._dirtyLevel === 1) {
  880. this._dirtyLevel = 0;
  881. }
  882. resetTracking();
  883. }
  884. return this._dirtyLevel >= 4;
  885. }
  886. set dirty(v) {
  887. this._dirtyLevel = v ? 4 : 0;
  888. }
  889. run() {
  890. this._dirtyLevel = 0;
  891. if (!this.active) {
  892. return this.fn();
  893. }
  894. let lastShouldTrack = shouldTrack;
  895. let lastEffect = activeEffect;
  896. try {
  897. shouldTrack = true;
  898. activeEffect = this;
  899. this._runnings++;
  900. preCleanupEffect(this);
  901. return this.fn();
  902. } finally {
  903. postCleanupEffect(this);
  904. this._runnings--;
  905. activeEffect = lastEffect;
  906. shouldTrack = lastShouldTrack;
  907. }
  908. }
  909. stop() {
  910. if (this.active) {
  911. preCleanupEffect(this);
  912. postCleanupEffect(this);
  913. this.onStop && this.onStop();
  914. this.active = false;
  915. }
  916. }
  917. };
  918. shouldTrack = true;
  919. pauseScheduleStack = 0;
  920. trackStack = [];
  921. queueEffectSchedulers = [];
  922. createDep = (cleanup, computed3) => {
  923. const dep = /* @__PURE__ */ new Map();
  924. dep.cleanup = cleanup;
  925. dep.computed = computed3;
  926. return dep;
  927. };
  928. targetMap = /* @__PURE__ */ new WeakMap();
  929. ITERATE_KEY = Symbol(true ? "iterate" : "");
  930. MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : "");
  931. isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
  932. builtInSymbols = new Set(
  933. Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  934. );
  935. arrayInstrumentations = createArrayInstrumentations();
  936. BaseReactiveHandler = class {
  937. constructor(_isReadonly = false, _isShallow = false) {
  938. this._isReadonly = _isReadonly;
  939. this._isShallow = _isShallow;
  940. }
  941. get(target, key, receiver) {
  942. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  943. if (key === "__v_isReactive") {
  944. return !isReadonly2;
  945. } else if (key === "__v_isReadonly") {
  946. return isReadonly2;
  947. } else if (key === "__v_isShallow") {
  948. return isShallow2;
  949. } else if (key === "__v_raw") {
  950. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  951. // this means the reciever is a user proxy of the reactive proxy
  952. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  953. return target;
  954. }
  955. return;
  956. }
  957. const targetIsArray = isArray(target);
  958. if (!isReadonly2) {
  959. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  960. return Reflect.get(arrayInstrumentations, key, receiver);
  961. }
  962. if (key === "hasOwnProperty") {
  963. return hasOwnProperty;
  964. }
  965. }
  966. const res = Reflect.get(target, key, receiver);
  967. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  968. return res;
  969. }
  970. if (!isReadonly2) {
  971. track(target, "get", key);
  972. }
  973. if (isShallow2) {
  974. return res;
  975. }
  976. if (isRef(res)) {
  977. return targetIsArray && isIntegerKey(key) ? res : res.value;
  978. }
  979. if (isObject(res)) {
  980. return isReadonly2 ? readonly(res) : reactive(res);
  981. }
  982. return res;
  983. }
  984. };
  985. MutableReactiveHandler = class extends BaseReactiveHandler {
  986. constructor(isShallow2 = false) {
  987. super(false, isShallow2);
  988. }
  989. set(target, key, value, receiver) {
  990. let oldValue = target[key];
  991. if (!this._isShallow) {
  992. const isOldValueReadonly = isReadonly(oldValue);
  993. if (!isShallow(value) && !isReadonly(value)) {
  994. oldValue = toRaw(oldValue);
  995. value = toRaw(value);
  996. }
  997. if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
  998. if (isOldValueReadonly) {
  999. return false;
  1000. } else {
  1001. oldValue.value = value;
  1002. return true;
  1003. }
  1004. }
  1005. }
  1006. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1007. const result = Reflect.set(target, key, value, receiver);
  1008. if (target === toRaw(receiver)) {
  1009. if (!hadKey) {
  1010. trigger(target, "add", key, value);
  1011. } else if (hasChanged(value, oldValue)) {
  1012. trigger(target, "set", key, value, oldValue);
  1013. }
  1014. }
  1015. return result;
  1016. }
  1017. deleteProperty(target, key) {
  1018. const hadKey = hasOwn(target, key);
  1019. const oldValue = target[key];
  1020. const result = Reflect.deleteProperty(target, key);
  1021. if (result && hadKey) {
  1022. trigger(target, "delete", key, void 0, oldValue);
  1023. }
  1024. return result;
  1025. }
  1026. has(target, key) {
  1027. const result = Reflect.has(target, key);
  1028. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  1029. track(target, "has", key);
  1030. }
  1031. return result;
  1032. }
  1033. ownKeys(target) {
  1034. track(
  1035. target,
  1036. "iterate",
  1037. isArray(target) ? "length" : ITERATE_KEY
  1038. );
  1039. return Reflect.ownKeys(target);
  1040. }
  1041. };
  1042. ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  1043. constructor(isShallow2 = false) {
  1044. super(true, isShallow2);
  1045. }
  1046. set(target, key) {
  1047. if (true) {
  1048. warn(
  1049. `Set operation on key "${String(key)}" failed: target is readonly.`,
  1050. target
  1051. );
  1052. }
  1053. return true;
  1054. }
  1055. deleteProperty(target, key) {
  1056. if (true) {
  1057. warn(
  1058. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  1059. target
  1060. );
  1061. }
  1062. return true;
  1063. }
  1064. };
  1065. mutableHandlers = new MutableReactiveHandler();
  1066. readonlyHandlers = new ReadonlyReactiveHandler();
  1067. shallowReactiveHandlers = new MutableReactiveHandler(
  1068. true
  1069. );
  1070. shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
  1071. toShallow = (value) => value;
  1072. getProto = (v) => Reflect.getPrototypeOf(v);
  1073. [
  1074. mutableInstrumentations,
  1075. readonlyInstrumentations,
  1076. shallowInstrumentations,
  1077. shallowReadonlyInstrumentations
  1078. ] = createInstrumentations();
  1079. mutableCollectionHandlers = {
  1080. get: createInstrumentationGetter(false, false)
  1081. };
  1082. shallowCollectionHandlers = {
  1083. get: createInstrumentationGetter(false, true)
  1084. };
  1085. readonlyCollectionHandlers = {
  1086. get: createInstrumentationGetter(true, false)
  1087. };
  1088. shallowReadonlyCollectionHandlers = {
  1089. get: createInstrumentationGetter(true, true)
  1090. };
  1091. reactiveMap = /* @__PURE__ */ new WeakMap();
  1092. shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1093. readonlyMap = /* @__PURE__ */ new WeakMap();
  1094. shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1095. toReactive = (value) => isObject(value) ? reactive(value) : value;
  1096. toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1097. COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;
  1098. ComputedRefImpl = class {
  1099. constructor(getter, _setter, isReadonly2, isSSR) {
  1100. this.getter = getter;
  1101. this._setter = _setter;
  1102. this.dep = void 0;
  1103. this.__v_isRef = true;
  1104. this["__v_isReadonly"] = false;
  1105. this.effect = new ReactiveEffect(
  1106. () => getter(this._value),
  1107. () => triggerRefValue(
  1108. this,
  1109. this.effect._dirtyLevel === 2 ? 2 : 3
  1110. )
  1111. );
  1112. this.effect.computed = this;
  1113. this.effect.active = this._cacheable = !isSSR;
  1114. this["__v_isReadonly"] = isReadonly2;
  1115. }
  1116. get value() {
  1117. const self = toRaw(this);
  1118. if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
  1119. triggerRefValue(self, 4);
  1120. }
  1121. trackRefValue(self);
  1122. if (self.effect._dirtyLevel >= 2) {
  1123. if (this._warnRecursive) {
  1124. warn(COMPUTED_SIDE_EFFECT_WARN, `
  1125. getter: `, this.getter);
  1126. }
  1127. triggerRefValue(self, 2);
  1128. }
  1129. return self._value;
  1130. }
  1131. set value(newValue) {
  1132. this._setter(newValue);
  1133. }
  1134. // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
  1135. get _dirty() {
  1136. return this.effect.dirty;
  1137. }
  1138. set _dirty(v) {
  1139. this.effect.dirty = v;
  1140. }
  1141. // #endregion
  1142. };
  1143. RefImpl = class {
  1144. constructor(value, __v_isShallow) {
  1145. this.__v_isShallow = __v_isShallow;
  1146. this.dep = void 0;
  1147. this.__v_isRef = true;
  1148. this._rawValue = __v_isShallow ? value : toRaw(value);
  1149. this._value = __v_isShallow ? value : toReactive(value);
  1150. }
  1151. get value() {
  1152. trackRefValue(this);
  1153. return this._value;
  1154. }
  1155. set value(newVal) {
  1156. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  1157. newVal = useDirectValue ? newVal : toRaw(newVal);
  1158. if (hasChanged(newVal, this._rawValue)) {
  1159. this._rawValue = newVal;
  1160. this._value = useDirectValue ? newVal : toReactive(newVal);
  1161. triggerRefValue(this, 4, newVal);
  1162. }
  1163. }
  1164. };
  1165. shallowUnwrapHandlers = {
  1166. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  1167. set: (target, key, value, receiver) => {
  1168. const oldValue = target[key];
  1169. if (isRef(oldValue) && !isRef(value)) {
  1170. oldValue.value = value;
  1171. return true;
  1172. } else {
  1173. return Reflect.set(target, key, value, receiver);
  1174. }
  1175. }
  1176. };
  1177. CustomRefImpl = class {
  1178. constructor(factory) {
  1179. this.dep = void 0;
  1180. this.__v_isRef = true;
  1181. const { get: get2, set: set2 } = factory(
  1182. () => trackRefValue(this),
  1183. () => triggerRefValue(this)
  1184. );
  1185. this._get = get2;
  1186. this._set = set2;
  1187. }
  1188. get value() {
  1189. return this._get();
  1190. }
  1191. set value(newVal) {
  1192. this._set(newVal);
  1193. }
  1194. };
  1195. ObjectRefImpl = class {
  1196. constructor(_object, _key, _defaultValue) {
  1197. this._object = _object;
  1198. this._key = _key;
  1199. this._defaultValue = _defaultValue;
  1200. this.__v_isRef = true;
  1201. }
  1202. get value() {
  1203. const val = this._object[this._key];
  1204. return val === void 0 ? this._defaultValue : val;
  1205. }
  1206. set value(newVal) {
  1207. this._object[this._key] = newVal;
  1208. }
  1209. get dep() {
  1210. return getDepFromReactive(toRaw(this._object), this._key);
  1211. }
  1212. };
  1213. GetterRefImpl = class {
  1214. constructor(_getter) {
  1215. this._getter = _getter;
  1216. this.__v_isRef = true;
  1217. this.__v_isReadonly = true;
  1218. }
  1219. get value() {
  1220. return this._getter();
  1221. }
  1222. };
  1223. TrackOpTypes = {
  1224. "GET": "get",
  1225. "HAS": "has",
  1226. "ITERATE": "iterate"
  1227. };
  1228. TriggerOpTypes = {
  1229. "SET": "set",
  1230. "ADD": "add",
  1231. "DELETE": "delete",
  1232. "CLEAR": "clear"
  1233. };
  1234. }
  1235. });
  1236. // node_modules/.pnpm/@vue+runtime-core@3.4.27/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  1237. function pushWarningContext(vnode) {
  1238. stack.push(vnode);
  1239. }
  1240. function popWarningContext() {
  1241. stack.pop();
  1242. }
  1243. function warn$1(msg, ...args) {
  1244. pauseTracking();
  1245. const instance = stack.length ? stack[stack.length - 1].component : null;
  1246. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  1247. const trace = getComponentTrace();
  1248. if (appWarnHandler) {
  1249. callWithErrorHandling(
  1250. appWarnHandler,
  1251. instance,
  1252. 11,
  1253. [
  1254. msg + args.map((a) => {
  1255. var _a, _b;
  1256. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  1257. }).join(""),
  1258. instance && instance.proxy,
  1259. trace.map(
  1260. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  1261. ).join("\n"),
  1262. trace
  1263. ]
  1264. );
  1265. } else {
  1266. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  1267. if (trace.length && // avoid spamming console during tests
  1268. true) {
  1269. warnArgs.push(`
  1270. `, ...formatTrace(trace));
  1271. }
  1272. console.warn(...warnArgs);
  1273. }
  1274. resetTracking();
  1275. }
  1276. function getComponentTrace() {
  1277. let currentVNode = stack[stack.length - 1];
  1278. if (!currentVNode) {
  1279. return [];
  1280. }
  1281. const normalizedStack = [];
  1282. while (currentVNode) {
  1283. const last = normalizedStack[0];
  1284. if (last && last.vnode === currentVNode) {
  1285. last.recurseCount++;
  1286. } else {
  1287. normalizedStack.push({
  1288. vnode: currentVNode,
  1289. recurseCount: 0
  1290. });
  1291. }
  1292. const parentInstance = currentVNode.component && currentVNode.component.parent;
  1293. currentVNode = parentInstance && parentInstance.vnode;
  1294. }
  1295. return normalizedStack;
  1296. }
  1297. function formatTrace(trace) {
  1298. const logs = [];
  1299. trace.forEach((entry, i) => {
  1300. logs.push(...i === 0 ? [] : [`
  1301. `], ...formatTraceEntry(entry));
  1302. });
  1303. return logs;
  1304. }
  1305. function formatTraceEntry({ vnode, recurseCount }) {
  1306. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  1307. const isRoot = vnode.component ? vnode.component.parent == null : false;
  1308. const open = ` at <${formatComponentName(
  1309. vnode.component,
  1310. vnode.type,
  1311. isRoot
  1312. )}`;
  1313. const close = `>` + postfix;
  1314. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  1315. }
  1316. function formatProps(props) {
  1317. const res = [];
  1318. const keys = Object.keys(props);
  1319. keys.slice(0, 3).forEach((key) => {
  1320. res.push(...formatProp(key, props[key]));
  1321. });
  1322. if (keys.length > 3) {
  1323. res.push(` ...`);
  1324. }
  1325. return res;
  1326. }
  1327. function formatProp(key, value, raw) {
  1328. if (isString(value)) {
  1329. value = JSON.stringify(value);
  1330. return raw ? value : [`${key}=${value}`];
  1331. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  1332. return raw ? value : [`${key}=${value}`];
  1333. } else if (isRef(value)) {
  1334. value = formatProp(key, toRaw(value.value), true);
  1335. return raw ? value : [`${key}=Ref<`, value, `>`];
  1336. } else if (isFunction(value)) {
  1337. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  1338. } else {
  1339. value = toRaw(value);
  1340. return raw ? value : [`${key}=`, value];
  1341. }
  1342. }
  1343. function assertNumber(val, type) {
  1344. if (false)
  1345. return;
  1346. if (val === void 0) {
  1347. return;
  1348. } else if (typeof val !== "number") {
  1349. warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  1350. } else if (isNaN(val)) {
  1351. warn$1(`${type} is NaN - the duration expression might be incorrect.`);
  1352. }
  1353. }
  1354. function callWithErrorHandling(fn, instance, type, args) {
  1355. try {
  1356. return args ? fn(...args) : fn();
  1357. } catch (err) {
  1358. handleError(err, instance, type);
  1359. }
  1360. }
  1361. function callWithAsyncErrorHandling(fn, instance, type, args) {
  1362. if (isFunction(fn)) {
  1363. const res = callWithErrorHandling(fn, instance, type, args);
  1364. if (res && isPromise(res)) {
  1365. res.catch((err) => {
  1366. handleError(err, instance, type);
  1367. });
  1368. }
  1369. return res;
  1370. }
  1371. if (isArray(fn)) {
  1372. const values = [];
  1373. for (let i = 0; i < fn.length; i++) {
  1374. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  1375. }
  1376. return values;
  1377. } else if (true) {
  1378. warn$1(
  1379. `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
  1380. );
  1381. }
  1382. }
  1383. function handleError(err, instance, type, throwInDev = true) {
  1384. const contextVNode = instance ? instance.vnode : null;
  1385. if (instance) {
  1386. let cur = instance.parent;
  1387. const exposedInstance = instance.proxy;
  1388. const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
  1389. while (cur) {
  1390. const errorCapturedHooks = cur.ec;
  1391. if (errorCapturedHooks) {
  1392. for (let i = 0; i < errorCapturedHooks.length; i++) {
  1393. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  1394. return;
  1395. }
  1396. }
  1397. }
  1398. cur = cur.parent;
  1399. }
  1400. const appErrorHandler = instance.appContext.config.errorHandler;
  1401. if (appErrorHandler) {
  1402. pauseTracking();
  1403. callWithErrorHandling(
  1404. appErrorHandler,
  1405. null,
  1406. 10,
  1407. [err, exposedInstance, errorInfo]
  1408. );
  1409. resetTracking();
  1410. return;
  1411. }
  1412. }
  1413. logError(err, type, contextVNode, throwInDev);
  1414. }
  1415. function logError(err, type, contextVNode, throwInDev = true) {
  1416. if (true) {
  1417. const info = ErrorTypeStrings$1[type];
  1418. if (contextVNode) {
  1419. pushWarningContext(contextVNode);
  1420. }
  1421. warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  1422. if (contextVNode) {
  1423. popWarningContext();
  1424. }
  1425. if (throwInDev) {
  1426. throw err;
  1427. } else {
  1428. console.error(err);
  1429. }
  1430. } else {
  1431. console.error(err);
  1432. }
  1433. }
  1434. function nextTick(fn) {
  1435. const p = currentFlushPromise || resolvedPromise;
  1436. return fn ? p.then(this ? fn.bind(this) : fn) : p;
  1437. }
  1438. function findInsertionIndex(id) {
  1439. let start = flushIndex + 1;
  1440. let end = queue.length;
  1441. while (start < end) {
  1442. const middle = start + end >>> 1;
  1443. const middleJob = queue[middle];
  1444. const middleJobId = getId(middleJob);
  1445. if (middleJobId < id || middleJobId === id && middleJob.pre) {
  1446. start = middle + 1;
  1447. } else {
  1448. end = middle;
  1449. }
  1450. }
  1451. return start;
  1452. }
  1453. function queueJob(job) {
  1454. if (!queue.length || !queue.includes(
  1455. job,
  1456. isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
  1457. )) {
  1458. if (job.id == null) {
  1459. queue.push(job);
  1460. } else {
  1461. queue.splice(findInsertionIndex(job.id), 0, job);
  1462. }
  1463. queueFlush();
  1464. }
  1465. }
  1466. function queueFlush() {
  1467. if (!isFlushing && !isFlushPending) {
  1468. isFlushPending = true;
  1469. currentFlushPromise = resolvedPromise.then(flushJobs);
  1470. }
  1471. }
  1472. function invalidateJob(job) {
  1473. const i = queue.indexOf(job);
  1474. if (i > flushIndex) {
  1475. queue.splice(i, 1);
  1476. }
  1477. }
  1478. function queuePostFlushCb(cb) {
  1479. if (!isArray(cb)) {
  1480. if (!activePostFlushCbs || !activePostFlushCbs.includes(
  1481. cb,
  1482. cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
  1483. )) {
  1484. pendingPostFlushCbs.push(cb);
  1485. }
  1486. } else {
  1487. pendingPostFlushCbs.push(...cb);
  1488. }
  1489. queueFlush();
  1490. }
  1491. function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
  1492. if (true) {
  1493. seen = seen || /* @__PURE__ */ new Map();
  1494. }
  1495. for (; i < queue.length; i++) {
  1496. const cb = queue[i];
  1497. if (cb && cb.pre) {
  1498. if (instance && cb.id !== instance.uid) {
  1499. continue;
  1500. }
  1501. if (checkRecursiveUpdates(seen, cb)) {
  1502. continue;
  1503. }
  1504. queue.splice(i, 1);
  1505. i--;
  1506. cb();
  1507. }
  1508. }
  1509. }
  1510. function flushPostFlushCbs(seen) {
  1511. if (pendingPostFlushCbs.length) {
  1512. const deduped = [...new Set(pendingPostFlushCbs)].sort(
  1513. (a, b) => getId(a) - getId(b)
  1514. );
  1515. pendingPostFlushCbs.length = 0;
  1516. if (activePostFlushCbs) {
  1517. activePostFlushCbs.push(...deduped);
  1518. return;
  1519. }
  1520. activePostFlushCbs = deduped;
  1521. if (true) {
  1522. seen = seen || /* @__PURE__ */ new Map();
  1523. }
  1524. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  1525. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  1526. continue;
  1527. }
  1528. activePostFlushCbs[postFlushIndex]();
  1529. }
  1530. activePostFlushCbs = null;
  1531. postFlushIndex = 0;
  1532. }
  1533. }
  1534. function flushJobs(seen) {
  1535. isFlushPending = false;
  1536. isFlushing = true;
  1537. if (true) {
  1538. seen = seen || /* @__PURE__ */ new Map();
  1539. }
  1540. queue.sort(comparator);
  1541. const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
  1542. try {
  1543. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  1544. const job = queue[flushIndex];
  1545. if (job && job.active !== false) {
  1546. if (check(job)) {
  1547. continue;
  1548. }
  1549. callWithErrorHandling(job, null, 14);
  1550. }
  1551. }
  1552. } finally {
  1553. flushIndex = 0;
  1554. queue.length = 0;
  1555. flushPostFlushCbs(seen);
  1556. isFlushing = false;
  1557. currentFlushPromise = null;
  1558. if (queue.length || pendingPostFlushCbs.length) {
  1559. flushJobs(seen);
  1560. }
  1561. }
  1562. }
  1563. function checkRecursiveUpdates(seen, fn) {
  1564. if (!seen.has(fn)) {
  1565. seen.set(fn, 1);
  1566. } else {
  1567. const count = seen.get(fn);
  1568. if (count > RECURSION_LIMIT) {
  1569. const instance = fn.ownerInstance;
  1570. const componentName = instance && getComponentName(instance.type);
  1571. handleError(
  1572. `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.`,
  1573. null,
  1574. 10
  1575. );
  1576. return true;
  1577. } else {
  1578. seen.set(fn, count + 1);
  1579. }
  1580. }
  1581. }
  1582. function registerHMR(instance) {
  1583. const id = instance.type.__hmrId;
  1584. let record = map.get(id);
  1585. if (!record) {
  1586. createRecord(id, instance.type);
  1587. record = map.get(id);
  1588. }
  1589. record.instances.add(instance);
  1590. }
  1591. function unregisterHMR(instance) {
  1592. map.get(instance.type.__hmrId).instances.delete(instance);
  1593. }
  1594. function createRecord(id, initialDef) {
  1595. if (map.has(id)) {
  1596. return false;
  1597. }
  1598. map.set(id, {
  1599. initialDef: normalizeClassComponent(initialDef),
  1600. instances: /* @__PURE__ */ new Set()
  1601. });
  1602. return true;
  1603. }
  1604. function normalizeClassComponent(component) {
  1605. return isClassComponent(component) ? component.__vccOpts : component;
  1606. }
  1607. function rerender(id, newRender) {
  1608. const record = map.get(id);
  1609. if (!record) {
  1610. return;
  1611. }
  1612. record.initialDef.render = newRender;
  1613. [...record.instances].forEach((instance) => {
  1614. if (newRender) {
  1615. instance.render = newRender;
  1616. normalizeClassComponent(instance.type).render = newRender;
  1617. }
  1618. instance.renderCache = [];
  1619. isHmrUpdating = true;
  1620. instance.effect.dirty = true;
  1621. instance.update();
  1622. isHmrUpdating = false;
  1623. });
  1624. }
  1625. function reload(id, newComp) {
  1626. const record = map.get(id);
  1627. if (!record)
  1628. return;
  1629. newComp = normalizeClassComponent(newComp);
  1630. updateComponentDef(record.initialDef, newComp);
  1631. const instances = [...record.instances];
  1632. for (const instance of instances) {
  1633. const oldComp = normalizeClassComponent(instance.type);
  1634. if (!hmrDirtyComponents.has(oldComp)) {
  1635. if (oldComp !== record.initialDef) {
  1636. updateComponentDef(oldComp, newComp);
  1637. }
  1638. hmrDirtyComponents.add(oldComp);
  1639. }
  1640. instance.appContext.propsCache.delete(instance.type);
  1641. instance.appContext.emitsCache.delete(instance.type);
  1642. instance.appContext.optionsCache.delete(instance.type);
  1643. if (instance.ceReload) {
  1644. hmrDirtyComponents.add(oldComp);
  1645. instance.ceReload(newComp.styles);
  1646. hmrDirtyComponents.delete(oldComp);
  1647. } else if (instance.parent) {
  1648. instance.parent.effect.dirty = true;
  1649. queueJob(instance.parent.update);
  1650. } else if (instance.appContext.reload) {
  1651. instance.appContext.reload();
  1652. } else if (typeof window !== "undefined") {
  1653. window.location.reload();
  1654. } else {
  1655. console.warn(
  1656. "[HMR] Root or manually mounted instance modified. Full reload required."
  1657. );
  1658. }
  1659. }
  1660. queuePostFlushCb(() => {
  1661. for (const instance of instances) {
  1662. hmrDirtyComponents.delete(
  1663. normalizeClassComponent(instance.type)
  1664. );
  1665. }
  1666. });
  1667. }
  1668. function updateComponentDef(oldComp, newComp) {
  1669. extend(oldComp, newComp);
  1670. for (const key in oldComp) {
  1671. if (key !== "__file" && !(key in newComp)) {
  1672. delete oldComp[key];
  1673. }
  1674. }
  1675. }
  1676. function tryWrap(fn) {
  1677. return (id, arg) => {
  1678. try {
  1679. return fn(id, arg);
  1680. } catch (e) {
  1681. console.error(e);
  1682. console.warn(
  1683. `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
  1684. );
  1685. }
  1686. };
  1687. }
  1688. function emit$1(event, ...args) {
  1689. if (devtools$1) {
  1690. devtools$1.emit(event, ...args);
  1691. } else if (!devtoolsNotInstalled) {
  1692. buffer.push({ event, args });
  1693. }
  1694. }
  1695. function setDevtoolsHook$1(hook, target) {
  1696. var _a, _b;
  1697. devtools$1 = hook;
  1698. if (devtools$1) {
  1699. devtools$1.enabled = true;
  1700. buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
  1701. buffer = [];
  1702. } else if (
  1703. // handle late devtools injection - only do this if we are in an actual
  1704. // browser environment to avoid the timer handle stalling test runner exit
  1705. // (#4815)
  1706. typeof window !== "undefined" && // some envs mock window but not fully
  1707. window.HTMLElement && // also exclude jsdom
  1708. !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
  1709. ) {
  1710. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  1711. replay.push((newHook) => {
  1712. setDevtoolsHook$1(newHook, target);
  1713. });
  1714. setTimeout(() => {
  1715. if (!devtools$1) {
  1716. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  1717. devtoolsNotInstalled = true;
  1718. buffer = [];
  1719. }
  1720. }, 3e3);
  1721. } else {
  1722. devtoolsNotInstalled = true;
  1723. buffer = [];
  1724. }
  1725. }
  1726. function devtoolsInitApp(app, version2) {
  1727. emit$1("app:init", app, version2, {
  1728. Fragment,
  1729. Text,
  1730. Comment,
  1731. Static
  1732. });
  1733. }
  1734. function devtoolsUnmountApp(app) {
  1735. emit$1("app:unmount", app);
  1736. }
  1737. function createDevtoolsComponentHook(hook) {
  1738. return (component) => {
  1739. emit$1(
  1740. hook,
  1741. component.appContext.app,
  1742. component.uid,
  1743. component.parent ? component.parent.uid : void 0,
  1744. component
  1745. );
  1746. };
  1747. }
  1748. function createDevtoolsPerformanceHook(hook) {
  1749. return (component, type, time) => {
  1750. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  1751. };
  1752. }
  1753. function devtoolsComponentEmit(component, event, params) {
  1754. emit$1(
  1755. "component:emit",
  1756. component.appContext.app,
  1757. component,
  1758. event,
  1759. params
  1760. );
  1761. }
  1762. function emit(instance, event, ...rawArgs) {
  1763. if (instance.isUnmounted)
  1764. return;
  1765. const props = instance.vnode.props || EMPTY_OBJ;
  1766. if (true) {
  1767. const {
  1768. emitsOptions,
  1769. propsOptions: [propsOptions]
  1770. } = instance;
  1771. if (emitsOptions) {
  1772. if (!(event in emitsOptions) && true) {
  1773. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  1774. warn$1(
  1775. `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
  1776. );
  1777. }
  1778. } else {
  1779. const validator = emitsOptions[event];
  1780. if (isFunction(validator)) {
  1781. const isValid = validator(...rawArgs);
  1782. if (!isValid) {
  1783. warn$1(
  1784. `Invalid event arguments: event validation failed for event "${event}".`
  1785. );
  1786. }
  1787. }
  1788. }
  1789. }
  1790. }
  1791. let args = rawArgs;
  1792. const isModelListener2 = event.startsWith("update:");
  1793. const modelArg = isModelListener2 && event.slice(7);
  1794. if (modelArg && modelArg in props) {
  1795. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  1796. const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
  1797. if (trim) {
  1798. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  1799. }
  1800. if (number) {
  1801. args = rawArgs.map(looseToNumber);
  1802. }
  1803. }
  1804. if (true) {
  1805. devtoolsComponentEmit(instance, event, args);
  1806. }
  1807. if (true) {
  1808. const lowerCaseEvent = event.toLowerCase();
  1809. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
  1810. warn$1(
  1811. `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
  1812. instance,
  1813. instance.type
  1814. )} 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(
  1815. event
  1816. )}" instead of "${event}".`
  1817. );
  1818. }
  1819. }
  1820. let handlerName;
  1821. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  1822. props[handlerName = toHandlerKey(camelize(event))];
  1823. if (!handler && isModelListener2) {
  1824. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  1825. }
  1826. if (handler) {
  1827. callWithAsyncErrorHandling(
  1828. handler,
  1829. instance,
  1830. 6,
  1831. args
  1832. );
  1833. }
  1834. const onceHandler = props[handlerName + `Once`];
  1835. if (onceHandler) {
  1836. if (!instance.emitted) {
  1837. instance.emitted = {};
  1838. } else if (instance.emitted[handlerName]) {
  1839. return;
  1840. }
  1841. instance.emitted[handlerName] = true;
  1842. callWithAsyncErrorHandling(
  1843. onceHandler,
  1844. instance,
  1845. 6,
  1846. args
  1847. );
  1848. }
  1849. }
  1850. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  1851. const cache = appContext.emitsCache;
  1852. const cached = cache.get(comp);
  1853. if (cached !== void 0) {
  1854. return cached;
  1855. }
  1856. const raw = comp.emits;
  1857. let normalized = {};
  1858. let hasExtends = false;
  1859. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  1860. const extendEmits = (raw2) => {
  1861. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  1862. if (normalizedFromExtend) {
  1863. hasExtends = true;
  1864. extend(normalized, normalizedFromExtend);
  1865. }
  1866. };
  1867. if (!asMixin && appContext.mixins.length) {
  1868. appContext.mixins.forEach(extendEmits);
  1869. }
  1870. if (comp.extends) {
  1871. extendEmits(comp.extends);
  1872. }
  1873. if (comp.mixins) {
  1874. comp.mixins.forEach(extendEmits);
  1875. }
  1876. }
  1877. if (!raw && !hasExtends) {
  1878. if (isObject(comp)) {
  1879. cache.set(comp, null);
  1880. }
  1881. return null;
  1882. }
  1883. if (isArray(raw)) {
  1884. raw.forEach((key) => normalized[key] = null);
  1885. } else {
  1886. extend(normalized, raw);
  1887. }
  1888. if (isObject(comp)) {
  1889. cache.set(comp, normalized);
  1890. }
  1891. return normalized;
  1892. }
  1893. function isEmitListener(options, key) {
  1894. if (!options || !isOn(key)) {
  1895. return false;
  1896. }
  1897. key = key.slice(2).replace(/Once$/, "");
  1898. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  1899. }
  1900. function setCurrentRenderingInstance(instance) {
  1901. const prev = currentRenderingInstance;
  1902. currentRenderingInstance = instance;
  1903. currentScopeId = instance && instance.type.__scopeId || null;
  1904. return prev;
  1905. }
  1906. function pushScopeId(id) {
  1907. currentScopeId = id;
  1908. }
  1909. function popScopeId() {
  1910. currentScopeId = null;
  1911. }
  1912. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  1913. if (!ctx)
  1914. return fn;
  1915. if (fn._n) {
  1916. return fn;
  1917. }
  1918. const renderFnWithContext = (...args) => {
  1919. if (renderFnWithContext._d) {
  1920. setBlockTracking(-1);
  1921. }
  1922. const prevInstance = setCurrentRenderingInstance(ctx);
  1923. let res;
  1924. try {
  1925. res = fn(...args);
  1926. } finally {
  1927. setCurrentRenderingInstance(prevInstance);
  1928. if (renderFnWithContext._d) {
  1929. setBlockTracking(1);
  1930. }
  1931. }
  1932. if (true) {
  1933. devtoolsComponentUpdated(ctx);
  1934. }
  1935. return res;
  1936. };
  1937. renderFnWithContext._n = true;
  1938. renderFnWithContext._c = true;
  1939. renderFnWithContext._d = true;
  1940. return renderFnWithContext;
  1941. }
  1942. function markAttrsAccessed() {
  1943. accessedAttrs = true;
  1944. }
  1945. function renderComponentRoot(instance) {
  1946. const {
  1947. type: Component,
  1948. vnode,
  1949. proxy,
  1950. withProxy,
  1951. propsOptions: [propsOptions],
  1952. slots,
  1953. attrs,
  1954. emit: emit2,
  1955. render,
  1956. renderCache,
  1957. props,
  1958. data,
  1959. setupState,
  1960. ctx,
  1961. inheritAttrs
  1962. } = instance;
  1963. const prev = setCurrentRenderingInstance(instance);
  1964. let result;
  1965. let fallthroughAttrs;
  1966. if (true) {
  1967. accessedAttrs = false;
  1968. }
  1969. try {
  1970. if (vnode.shapeFlag & 4) {
  1971. const proxyToUse = withProxy || proxy;
  1972. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
  1973. get(target, key, receiver) {
  1974. warn$1(
  1975. `Property '${String(
  1976. key
  1977. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  1978. );
  1979. return Reflect.get(target, key, receiver);
  1980. }
  1981. }) : proxyToUse;
  1982. result = normalizeVNode(
  1983. render.call(
  1984. thisProxy,
  1985. proxyToUse,
  1986. renderCache,
  1987. true ? shallowReadonly(props) : props,
  1988. setupState,
  1989. data,
  1990. ctx
  1991. )
  1992. );
  1993. fallthroughAttrs = attrs;
  1994. } else {
  1995. const render2 = Component;
  1996. if (attrs === props) {
  1997. markAttrsAccessed();
  1998. }
  1999. result = normalizeVNode(
  2000. render2.length > 1 ? render2(
  2001. true ? shallowReadonly(props) : props,
  2002. true ? {
  2003. get attrs() {
  2004. markAttrsAccessed();
  2005. return shallowReadonly(attrs);
  2006. },
  2007. slots,
  2008. emit: emit2
  2009. } : { attrs, slots, emit: emit2 }
  2010. ) : render2(
  2011. true ? shallowReadonly(props) : props,
  2012. null
  2013. )
  2014. );
  2015. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  2016. }
  2017. } catch (err) {
  2018. blockStack.length = 0;
  2019. handleError(err, instance, 1);
  2020. result = createVNode(Comment);
  2021. }
  2022. let root = result;
  2023. let setRoot = void 0;
  2024. if (result.patchFlag > 0 && result.patchFlag & 2048) {
  2025. [root, setRoot] = getChildRoot(result);
  2026. }
  2027. if (fallthroughAttrs && inheritAttrs !== false) {
  2028. const keys = Object.keys(fallthroughAttrs);
  2029. const { shapeFlag } = root;
  2030. if (keys.length) {
  2031. if (shapeFlag & (1 | 6)) {
  2032. if (propsOptions && keys.some(isModelListener)) {
  2033. fallthroughAttrs = filterModelListeners(
  2034. fallthroughAttrs,
  2035. propsOptions
  2036. );
  2037. }
  2038. root = cloneVNode(root, fallthroughAttrs, false, true);
  2039. } else if (!accessedAttrs && root.type !== Comment) {
  2040. const allAttrs = Object.keys(attrs);
  2041. const eventAttrs = [];
  2042. const extraAttrs = [];
  2043. for (let i = 0, l = allAttrs.length; i < l; i++) {
  2044. const key = allAttrs[i];
  2045. if (isOn(key)) {
  2046. if (!isModelListener(key)) {
  2047. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  2048. }
  2049. } else {
  2050. extraAttrs.push(key);
  2051. }
  2052. }
  2053. if (extraAttrs.length) {
  2054. warn$1(
  2055. `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
  2056. );
  2057. }
  2058. if (eventAttrs.length) {
  2059. warn$1(
  2060. `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.`
  2061. );
  2062. }
  2063. }
  2064. }
  2065. }
  2066. if (vnode.dirs) {
  2067. if (!isElementRoot(root)) {
  2068. warn$1(
  2069. `Runtime directive used on component with non-element root node. The directives will not function as intended.`
  2070. );
  2071. }
  2072. root = cloneVNode(root, null, false, true);
  2073. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  2074. }
  2075. if (vnode.transition) {
  2076. if (!isElementRoot(root)) {
  2077. warn$1(
  2078. `Component inside <Transition> renders non-element root node that cannot be animated.`
  2079. );
  2080. }
  2081. root.transition = vnode.transition;
  2082. }
  2083. if (setRoot) {
  2084. setRoot(root);
  2085. } else {
  2086. result = root;
  2087. }
  2088. setCurrentRenderingInstance(prev);
  2089. return result;
  2090. }
  2091. function filterSingleRoot(children, recurse = true) {
  2092. let singleRoot;
  2093. for (let i = 0; i < children.length; i++) {
  2094. const child = children[i];
  2095. if (isVNode(child)) {
  2096. if (child.type !== Comment || child.children === "v-if") {
  2097. if (singleRoot) {
  2098. return;
  2099. } else {
  2100. singleRoot = child;
  2101. if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
  2102. return filterSingleRoot(singleRoot.children);
  2103. }
  2104. }
  2105. }
  2106. } else {
  2107. return;
  2108. }
  2109. }
  2110. return singleRoot;
  2111. }
  2112. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  2113. const { props: prevProps, children: prevChildren, component } = prevVNode;
  2114. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  2115. const emits = component.emitsOptions;
  2116. if ((prevChildren || nextChildren) && isHmrUpdating) {
  2117. return true;
  2118. }
  2119. if (nextVNode.dirs || nextVNode.transition) {
  2120. return true;
  2121. }
  2122. if (optimized && patchFlag >= 0) {
  2123. if (patchFlag & 1024) {
  2124. return true;
  2125. }
  2126. if (patchFlag & 16) {
  2127. if (!prevProps) {
  2128. return !!nextProps;
  2129. }
  2130. return hasPropsChanged(prevProps, nextProps, emits);
  2131. } else if (patchFlag & 8) {
  2132. const dynamicProps = nextVNode.dynamicProps;
  2133. for (let i = 0; i < dynamicProps.length; i++) {
  2134. const key = dynamicProps[i];
  2135. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  2136. return true;
  2137. }
  2138. }
  2139. }
  2140. } else {
  2141. if (prevChildren || nextChildren) {
  2142. if (!nextChildren || !nextChildren.$stable) {
  2143. return true;
  2144. }
  2145. }
  2146. if (prevProps === nextProps) {
  2147. return false;
  2148. }
  2149. if (!prevProps) {
  2150. return !!nextProps;
  2151. }
  2152. if (!nextProps) {
  2153. return true;
  2154. }
  2155. return hasPropsChanged(prevProps, nextProps, emits);
  2156. }
  2157. return false;
  2158. }
  2159. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  2160. const nextKeys = Object.keys(nextProps);
  2161. if (nextKeys.length !== Object.keys(prevProps).length) {
  2162. return true;
  2163. }
  2164. for (let i = 0; i < nextKeys.length; i++) {
  2165. const key = nextKeys[i];
  2166. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  2167. return true;
  2168. }
  2169. }
  2170. return false;
  2171. }
  2172. function updateHOCHostEl({ vnode, parent }, el) {
  2173. while (parent) {
  2174. const root = parent.subTree;
  2175. if (root.suspense && root.suspense.activeBranch === vnode) {
  2176. root.el = vnode.el;
  2177. }
  2178. if (root === vnode) {
  2179. (vnode = parent.vnode).el = el;
  2180. parent = parent.parent;
  2181. } else {
  2182. break;
  2183. }
  2184. }
  2185. }
  2186. function resolveComponent(name, maybeSelfReference) {
  2187. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  2188. }
  2189. function resolveDynamicComponent(component) {
  2190. if (isString(component)) {
  2191. return resolveAsset(COMPONENTS, component, false) || component;
  2192. } else {
  2193. return component || NULL_DYNAMIC_COMPONENT;
  2194. }
  2195. }
  2196. function resolveDirective(name) {
  2197. return resolveAsset(DIRECTIVES, name);
  2198. }
  2199. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  2200. const instance = currentRenderingInstance || currentInstance;
  2201. if (instance) {
  2202. const Component = instance.type;
  2203. if (type === COMPONENTS) {
  2204. const selfName = getComponentName(
  2205. Component,
  2206. false
  2207. );
  2208. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  2209. return Component;
  2210. }
  2211. }
  2212. const res = (
  2213. // local registration
  2214. // check instance[type] first which is resolved for options API
  2215. resolve(instance[type] || Component[type], name) || // global registration
  2216. resolve(instance.appContext[type], name)
  2217. );
  2218. if (!res && maybeSelfReference) {
  2219. return Component;
  2220. }
  2221. if (warnMissing && !res) {
  2222. const extra = type === COMPONENTS ? `
  2223. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  2224. warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  2225. }
  2226. return res;
  2227. } else if (true) {
  2228. warn$1(
  2229. `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
  2230. );
  2231. }
  2232. }
  2233. function resolve(registry, name) {
  2234. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  2235. }
  2236. function triggerEvent(vnode, name) {
  2237. const eventListener = vnode.props && vnode.props[name];
  2238. if (isFunction(eventListener)) {
  2239. eventListener();
  2240. }
  2241. }
  2242. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  2243. const {
  2244. p: patch,
  2245. o: { createElement }
  2246. } = rendererInternals;
  2247. const hiddenContainer = createElement("div");
  2248. const suspense = vnode.suspense = createSuspenseBoundary(
  2249. vnode,
  2250. parentSuspense,
  2251. parentComponent,
  2252. container,
  2253. hiddenContainer,
  2254. anchor,
  2255. namespace,
  2256. slotScopeIds,
  2257. optimized,
  2258. rendererInternals
  2259. );
  2260. patch(
  2261. null,
  2262. suspense.pendingBranch = vnode.ssContent,
  2263. hiddenContainer,
  2264. null,
  2265. parentComponent,
  2266. suspense,
  2267. namespace,
  2268. slotScopeIds
  2269. );
  2270. if (suspense.deps > 0) {
  2271. triggerEvent(vnode, "onPending");
  2272. triggerEvent(vnode, "onFallback");
  2273. patch(
  2274. null,
  2275. vnode.ssFallback,
  2276. container,
  2277. anchor,
  2278. parentComponent,
  2279. null,
  2280. // fallback tree will not have suspense context
  2281. namespace,
  2282. slotScopeIds
  2283. );
  2284. setActiveBranch(suspense, vnode.ssFallback);
  2285. } else {
  2286. suspense.resolve(false, true);
  2287. }
  2288. }
  2289. function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  2290. const suspense = n2.suspense = n1.suspense;
  2291. suspense.vnode = n2;
  2292. n2.el = n1.el;
  2293. const newBranch = n2.ssContent;
  2294. const newFallback = n2.ssFallback;
  2295. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  2296. if (pendingBranch) {
  2297. suspense.pendingBranch = newBranch;
  2298. if (isSameVNodeType(newBranch, pendingBranch)) {
  2299. patch(
  2300. pendingBranch,
  2301. newBranch,
  2302. suspense.hiddenContainer,
  2303. null,
  2304. parentComponent,
  2305. suspense,
  2306. namespace,
  2307. slotScopeIds,
  2308. optimized
  2309. );
  2310. if (suspense.deps <= 0) {
  2311. suspense.resolve();
  2312. } else if (isInFallback) {
  2313. if (!isHydrating) {
  2314. patch(
  2315. activeBranch,
  2316. newFallback,
  2317. container,
  2318. anchor,
  2319. parentComponent,
  2320. null,
  2321. // fallback tree will not have suspense context
  2322. namespace,
  2323. slotScopeIds,
  2324. optimized
  2325. );
  2326. setActiveBranch(suspense, newFallback);
  2327. }
  2328. }
  2329. } else {
  2330. suspense.pendingId = suspenseId++;
  2331. if (isHydrating) {
  2332. suspense.isHydrating = false;
  2333. suspense.activeBranch = pendingBranch;
  2334. } else {
  2335. unmount(pendingBranch, parentComponent, suspense);
  2336. }
  2337. suspense.deps = 0;
  2338. suspense.effects.length = 0;
  2339. suspense.hiddenContainer = createElement("div");
  2340. if (isInFallback) {
  2341. patch(
  2342. null,
  2343. newBranch,
  2344. suspense.hiddenContainer,
  2345. null,
  2346. parentComponent,
  2347. suspense,
  2348. namespace,
  2349. slotScopeIds,
  2350. optimized
  2351. );
  2352. if (suspense.deps <= 0) {
  2353. suspense.resolve();
  2354. } else {
  2355. patch(
  2356. activeBranch,
  2357. newFallback,
  2358. container,
  2359. anchor,
  2360. parentComponent,
  2361. null,
  2362. // fallback tree will not have suspense context
  2363. namespace,
  2364. slotScopeIds,
  2365. optimized
  2366. );
  2367. setActiveBranch(suspense, newFallback);
  2368. }
  2369. } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  2370. patch(
  2371. activeBranch,
  2372. newBranch,
  2373. container,
  2374. anchor,
  2375. parentComponent,
  2376. suspense,
  2377. namespace,
  2378. slotScopeIds,
  2379. optimized
  2380. );
  2381. suspense.resolve(true);
  2382. } else {
  2383. patch(
  2384. null,
  2385. newBranch,
  2386. suspense.hiddenContainer,
  2387. null,
  2388. parentComponent,
  2389. suspense,
  2390. namespace,
  2391. slotScopeIds,
  2392. optimized
  2393. );
  2394. if (suspense.deps <= 0) {
  2395. suspense.resolve();
  2396. }
  2397. }
  2398. }
  2399. } else {
  2400. if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  2401. patch(
  2402. activeBranch,
  2403. newBranch,
  2404. container,
  2405. anchor,
  2406. parentComponent,
  2407. suspense,
  2408. namespace,
  2409. slotScopeIds,
  2410. optimized
  2411. );
  2412. setActiveBranch(suspense, newBranch);
  2413. } else {
  2414. triggerEvent(n2, "onPending");
  2415. suspense.pendingBranch = newBranch;
  2416. if (newBranch.shapeFlag & 512) {
  2417. suspense.pendingId = newBranch.component.suspenseId;
  2418. } else {
  2419. suspense.pendingId = suspenseId++;
  2420. }
  2421. patch(
  2422. null,
  2423. newBranch,
  2424. suspense.hiddenContainer,
  2425. null,
  2426. parentComponent,
  2427. suspense,
  2428. namespace,
  2429. slotScopeIds,
  2430. optimized
  2431. );
  2432. if (suspense.deps <= 0) {
  2433. suspense.resolve();
  2434. } else {
  2435. const { timeout, pendingId } = suspense;
  2436. if (timeout > 0) {
  2437. setTimeout(() => {
  2438. if (suspense.pendingId === pendingId) {
  2439. suspense.fallback(newFallback);
  2440. }
  2441. }, timeout);
  2442. } else if (timeout === 0) {
  2443. suspense.fallback(newFallback);
  2444. }
  2445. }
  2446. }
  2447. }
  2448. }
  2449. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  2450. if (!hasWarned) {
  2451. hasWarned = true;
  2452. console[console.info ? "info" : "log"](
  2453. `<Suspense> is an experimental feature and its API will likely change.`
  2454. );
  2455. }
  2456. const {
  2457. p: patch,
  2458. m: move,
  2459. um: unmount,
  2460. n: next,
  2461. o: { parentNode, remove: remove2 }
  2462. } = rendererInternals;
  2463. let parentSuspenseId;
  2464. const isSuspensible = isVNodeSuspensible(vnode);
  2465. if (isSuspensible) {
  2466. if (parentSuspense && parentSuspense.pendingBranch) {
  2467. parentSuspenseId = parentSuspense.pendingId;
  2468. parentSuspense.deps++;
  2469. }
  2470. }
  2471. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  2472. if (true) {
  2473. assertNumber(timeout, `Suspense timeout`);
  2474. }
  2475. const initialAnchor = anchor;
  2476. const suspense = {
  2477. vnode,
  2478. parent: parentSuspense,
  2479. parentComponent,
  2480. namespace,
  2481. container,
  2482. hiddenContainer,
  2483. deps: 0,
  2484. pendingId: suspenseId++,
  2485. timeout: typeof timeout === "number" ? timeout : -1,
  2486. activeBranch: null,
  2487. pendingBranch: null,
  2488. isInFallback: !isHydrating,
  2489. isHydrating,
  2490. isUnmounted: false,
  2491. effects: [],
  2492. resolve(resume = false, sync = false) {
  2493. if (true) {
  2494. if (!resume && !suspense.pendingBranch) {
  2495. throw new Error(
  2496. `suspense.resolve() is called without a pending branch.`
  2497. );
  2498. }
  2499. if (suspense.isUnmounted) {
  2500. throw new Error(
  2501. `suspense.resolve() is called on an already unmounted suspense boundary.`
  2502. );
  2503. }
  2504. }
  2505. const {
  2506. vnode: vnode2,
  2507. activeBranch,
  2508. pendingBranch,
  2509. pendingId,
  2510. effects,
  2511. parentComponent: parentComponent2,
  2512. container: container2
  2513. } = suspense;
  2514. let delayEnter = false;
  2515. if (suspense.isHydrating) {
  2516. suspense.isHydrating = false;
  2517. } else if (!resume) {
  2518. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  2519. if (delayEnter) {
  2520. activeBranch.transition.afterLeave = () => {
  2521. if (pendingId === suspense.pendingId) {
  2522. move(
  2523. pendingBranch,
  2524. container2,
  2525. anchor === initialAnchor ? next(activeBranch) : anchor,
  2526. 0
  2527. );
  2528. queuePostFlushCb(effects);
  2529. }
  2530. };
  2531. }
  2532. if (activeBranch) {
  2533. if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
  2534. anchor = next(activeBranch);
  2535. }
  2536. unmount(activeBranch, parentComponent2, suspense, true);
  2537. }
  2538. if (!delayEnter) {
  2539. move(pendingBranch, container2, anchor, 0);
  2540. }
  2541. }
  2542. setActiveBranch(suspense, pendingBranch);
  2543. suspense.pendingBranch = null;
  2544. suspense.isInFallback = false;
  2545. let parent = suspense.parent;
  2546. let hasUnresolvedAncestor = false;
  2547. while (parent) {
  2548. if (parent.pendingBranch) {
  2549. parent.effects.push(...effects);
  2550. hasUnresolvedAncestor = true;
  2551. break;
  2552. }
  2553. parent = parent.parent;
  2554. }
  2555. if (!hasUnresolvedAncestor && !delayEnter) {
  2556. queuePostFlushCb(effects);
  2557. }
  2558. suspense.effects = [];
  2559. if (isSuspensible) {
  2560. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  2561. parentSuspense.deps--;
  2562. if (parentSuspense.deps === 0 && !sync) {
  2563. parentSuspense.resolve();
  2564. }
  2565. }
  2566. }
  2567. triggerEvent(vnode2, "onResolve");
  2568. },
  2569. fallback(fallbackVNode) {
  2570. if (!suspense.pendingBranch) {
  2571. return;
  2572. }
  2573. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
  2574. triggerEvent(vnode2, "onFallback");
  2575. const anchor2 = next(activeBranch);
  2576. const mountFallback = () => {
  2577. if (!suspense.isInFallback) {
  2578. return;
  2579. }
  2580. patch(
  2581. null,
  2582. fallbackVNode,
  2583. container2,
  2584. anchor2,
  2585. parentComponent2,
  2586. null,
  2587. // fallback tree will not have suspense context
  2588. namespace2,
  2589. slotScopeIds,
  2590. optimized
  2591. );
  2592. setActiveBranch(suspense, fallbackVNode);
  2593. };
  2594. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  2595. if (delayEnter) {
  2596. activeBranch.transition.afterLeave = mountFallback;
  2597. }
  2598. suspense.isInFallback = true;
  2599. unmount(
  2600. activeBranch,
  2601. parentComponent2,
  2602. null,
  2603. // no suspense so unmount hooks fire now
  2604. true
  2605. // shouldRemove
  2606. );
  2607. if (!delayEnter) {
  2608. mountFallback();
  2609. }
  2610. },
  2611. move(container2, anchor2, type) {
  2612. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  2613. suspense.container = container2;
  2614. },
  2615. next() {
  2616. return suspense.activeBranch && next(suspense.activeBranch);
  2617. },
  2618. registerDep(instance, setupRenderEffect) {
  2619. const isInPendingSuspense = !!suspense.pendingBranch;
  2620. if (isInPendingSuspense) {
  2621. suspense.deps++;
  2622. }
  2623. const hydratedEl = instance.vnode.el;
  2624. instance.asyncDep.catch((err) => {
  2625. handleError(err, instance, 0);
  2626. }).then((asyncSetupResult) => {
  2627. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
  2628. return;
  2629. }
  2630. instance.asyncResolved = true;
  2631. const { vnode: vnode2 } = instance;
  2632. if (true) {
  2633. pushWarningContext(vnode2);
  2634. }
  2635. handleSetupResult(instance, asyncSetupResult, false);
  2636. if (hydratedEl) {
  2637. vnode2.el = hydratedEl;
  2638. }
  2639. const placeholder = !hydratedEl && instance.subTree.el;
  2640. setupRenderEffect(
  2641. instance,
  2642. vnode2,
  2643. // component may have been moved before resolve.
  2644. // if this is not a hydration, instance.subTree will be the comment
  2645. // placeholder.
  2646. parentNode(hydratedEl || instance.subTree.el),
  2647. // anchor will not be used if this is hydration, so only need to
  2648. // consider the comment placeholder case.
  2649. hydratedEl ? null : next(instance.subTree),
  2650. suspense,
  2651. namespace,
  2652. optimized
  2653. );
  2654. if (placeholder) {
  2655. remove2(placeholder);
  2656. }
  2657. updateHOCHostEl(instance, vnode2.el);
  2658. if (true) {
  2659. popWarningContext();
  2660. }
  2661. if (isInPendingSuspense && --suspense.deps === 0) {
  2662. suspense.resolve();
  2663. }
  2664. });
  2665. },
  2666. unmount(parentSuspense2, doRemove) {
  2667. suspense.isUnmounted = true;
  2668. if (suspense.activeBranch) {
  2669. unmount(
  2670. suspense.activeBranch,
  2671. parentComponent,
  2672. parentSuspense2,
  2673. doRemove
  2674. );
  2675. }
  2676. if (suspense.pendingBranch) {
  2677. unmount(
  2678. suspense.pendingBranch,
  2679. parentComponent,
  2680. parentSuspense2,
  2681. doRemove
  2682. );
  2683. }
  2684. }
  2685. };
  2686. return suspense;
  2687. }
  2688. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  2689. const suspense = vnode.suspense = createSuspenseBoundary(
  2690. vnode,
  2691. parentSuspense,
  2692. parentComponent,
  2693. node.parentNode,
  2694. // eslint-disable-next-line no-restricted-globals
  2695. document.createElement("div"),
  2696. null,
  2697. namespace,
  2698. slotScopeIds,
  2699. optimized,
  2700. rendererInternals,
  2701. true
  2702. );
  2703. const result = hydrateNode(
  2704. node,
  2705. suspense.pendingBranch = vnode.ssContent,
  2706. parentComponent,
  2707. suspense,
  2708. slotScopeIds,
  2709. optimized
  2710. );
  2711. if (suspense.deps === 0) {
  2712. suspense.resolve(false, true);
  2713. }
  2714. return result;
  2715. }
  2716. function normalizeSuspenseChildren(vnode) {
  2717. const { shapeFlag, children } = vnode;
  2718. const isSlotChildren = shapeFlag & 32;
  2719. vnode.ssContent = normalizeSuspenseSlot(
  2720. isSlotChildren ? children.default : children
  2721. );
  2722. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  2723. }
  2724. function normalizeSuspenseSlot(s) {
  2725. let block;
  2726. if (isFunction(s)) {
  2727. const trackBlock = isBlockTreeEnabled && s._c;
  2728. if (trackBlock) {
  2729. s._d = false;
  2730. openBlock();
  2731. }
  2732. s = s();
  2733. if (trackBlock) {
  2734. s._d = true;
  2735. block = currentBlock;
  2736. closeBlock();
  2737. }
  2738. }
  2739. if (isArray(s)) {
  2740. const singleChild = filterSingleRoot(s);
  2741. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
  2742. warn$1(`<Suspense> slots expect a single root node.`);
  2743. }
  2744. s = singleChild;
  2745. }
  2746. s = normalizeVNode(s);
  2747. if (block && !s.dynamicChildren) {
  2748. s.dynamicChildren = block.filter((c) => c !== s);
  2749. }
  2750. return s;
  2751. }
  2752. function queueEffectWithSuspense(fn, suspense) {
  2753. if (suspense && suspense.pendingBranch) {
  2754. if (isArray(fn)) {
  2755. suspense.effects.push(...fn);
  2756. } else {
  2757. suspense.effects.push(fn);
  2758. }
  2759. } else {
  2760. queuePostFlushCb(fn);
  2761. }
  2762. }
  2763. function setActiveBranch(suspense, branch) {
  2764. suspense.activeBranch = branch;
  2765. const { vnode, parentComponent } = suspense;
  2766. let el = branch.el;
  2767. while (!el && branch.component) {
  2768. branch = branch.component.subTree;
  2769. el = branch.el;
  2770. }
  2771. vnode.el = el;
  2772. if (parentComponent && parentComponent.subTree === vnode) {
  2773. parentComponent.vnode.el = el;
  2774. updateHOCHostEl(parentComponent, el);
  2775. }
  2776. }
  2777. function isVNodeSuspensible(vnode) {
  2778. const suspensible = vnode.props && vnode.props.suspensible;
  2779. return suspensible != null && suspensible !== false;
  2780. }
  2781. function watchEffect(effect2, options) {
  2782. return doWatch(effect2, null, options);
  2783. }
  2784. function watchPostEffect(effect2, options) {
  2785. return doWatch(
  2786. effect2,
  2787. null,
  2788. true ? extend({}, options, { flush: "post" }) : { flush: "post" }
  2789. );
  2790. }
  2791. function watchSyncEffect(effect2, options) {
  2792. return doWatch(
  2793. effect2,
  2794. null,
  2795. true ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
  2796. );
  2797. }
  2798. function watch(source, cb, options) {
  2799. if (!isFunction(cb)) {
  2800. warn$1(
  2801. `\`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.`
  2802. );
  2803. }
  2804. return doWatch(source, cb, options);
  2805. }
  2806. function doWatch(source, cb, {
  2807. immediate,
  2808. deep,
  2809. flush,
  2810. once,
  2811. onTrack,
  2812. onTrigger
  2813. } = EMPTY_OBJ) {
  2814. if (cb && once) {
  2815. const _cb = cb;
  2816. cb = (...args) => {
  2817. _cb(...args);
  2818. unwatch();
  2819. };
  2820. }
  2821. if (deep !== void 0 && typeof deep === "number") {
  2822. warn$1(
  2823. `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
  2824. );
  2825. }
  2826. if (!cb) {
  2827. if (immediate !== void 0) {
  2828. warn$1(
  2829. `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
  2830. );
  2831. }
  2832. if (deep !== void 0) {
  2833. warn$1(
  2834. `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
  2835. );
  2836. }
  2837. if (once !== void 0) {
  2838. warn$1(
  2839. `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
  2840. );
  2841. }
  2842. }
  2843. const warnInvalidSource = (s) => {
  2844. warn$1(
  2845. `Invalid watch source: `,
  2846. s,
  2847. `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
  2848. );
  2849. };
  2850. const instance = currentInstance;
  2851. const reactiveGetter = (source2) => deep === true ? source2 : (
  2852. // for deep: false, only traverse root-level properties
  2853. traverse(source2, deep === false ? 1 : void 0)
  2854. );
  2855. let getter;
  2856. let forceTrigger = false;
  2857. let isMultiSource = false;
  2858. if (isRef(source)) {
  2859. getter = () => source.value;
  2860. forceTrigger = isShallow(source);
  2861. } else if (isReactive(source)) {
  2862. getter = () => reactiveGetter(source);
  2863. forceTrigger = true;
  2864. } else if (isArray(source)) {
  2865. isMultiSource = true;
  2866. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  2867. getter = () => source.map((s) => {
  2868. if (isRef(s)) {
  2869. return s.value;
  2870. } else if (isReactive(s)) {
  2871. return reactiveGetter(s);
  2872. } else if (isFunction(s)) {
  2873. return callWithErrorHandling(s, instance, 2);
  2874. } else {
  2875. warnInvalidSource(s);
  2876. }
  2877. });
  2878. } else if (isFunction(source)) {
  2879. if (cb) {
  2880. getter = () => callWithErrorHandling(source, instance, 2);
  2881. } else {
  2882. getter = () => {
  2883. if (cleanup) {
  2884. cleanup();
  2885. }
  2886. return callWithAsyncErrorHandling(
  2887. source,
  2888. instance,
  2889. 3,
  2890. [onCleanup]
  2891. );
  2892. };
  2893. }
  2894. } else {
  2895. getter = NOOP;
  2896. warnInvalidSource(source);
  2897. }
  2898. if (cb && deep) {
  2899. const baseGetter = getter;
  2900. getter = () => traverse(baseGetter());
  2901. }
  2902. let cleanup;
  2903. let onCleanup = (fn) => {
  2904. cleanup = effect2.onStop = () => {
  2905. callWithErrorHandling(fn, instance, 4);
  2906. cleanup = effect2.onStop = void 0;
  2907. };
  2908. };
  2909. let ssrCleanup;
  2910. if (isInSSRComponentSetup) {
  2911. onCleanup = NOOP;
  2912. if (!cb) {
  2913. getter();
  2914. } else if (immediate) {
  2915. callWithAsyncErrorHandling(cb, instance, 3, [
  2916. getter(),
  2917. isMultiSource ? [] : void 0,
  2918. onCleanup
  2919. ]);
  2920. }
  2921. if (flush === "sync") {
  2922. const ctx = useSSRContext();
  2923. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  2924. } else {
  2925. return NOOP;
  2926. }
  2927. }
  2928. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  2929. const job = () => {
  2930. if (!effect2.active || !effect2.dirty) {
  2931. return;
  2932. }
  2933. if (cb) {
  2934. const newValue = effect2.run();
  2935. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
  2936. if (cleanup) {
  2937. cleanup();
  2938. }
  2939. callWithAsyncErrorHandling(cb, instance, 3, [
  2940. newValue,
  2941. // pass undefined as the old value when it's changed for the first time
  2942. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  2943. onCleanup
  2944. ]);
  2945. oldValue = newValue;
  2946. }
  2947. } else {
  2948. effect2.run();
  2949. }
  2950. };
  2951. job.allowRecurse = !!cb;
  2952. let scheduler;
  2953. if (flush === "sync") {
  2954. scheduler = job;
  2955. } else if (flush === "post") {
  2956. scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
  2957. } else {
  2958. job.pre = true;
  2959. if (instance)
  2960. job.id = instance.uid;
  2961. scheduler = () => queueJob(job);
  2962. }
  2963. const effect2 = new ReactiveEffect(getter, NOOP, scheduler);
  2964. const scope = getCurrentScope();
  2965. const unwatch = () => {
  2966. effect2.stop();
  2967. if (scope) {
  2968. remove(scope.effects, effect2);
  2969. }
  2970. };
  2971. if (true) {
  2972. effect2.onTrack = onTrack;
  2973. effect2.onTrigger = onTrigger;
  2974. }
  2975. if (cb) {
  2976. if (immediate) {
  2977. job();
  2978. } else {
  2979. oldValue = effect2.run();
  2980. }
  2981. } else if (flush === "post") {
  2982. queuePostRenderEffect(
  2983. effect2.run.bind(effect2),
  2984. instance && instance.suspense
  2985. );
  2986. } else {
  2987. effect2.run();
  2988. }
  2989. if (ssrCleanup)
  2990. ssrCleanup.push(unwatch);
  2991. return unwatch;
  2992. }
  2993. function instanceWatch(source, value, options) {
  2994. const publicThis = this.proxy;
  2995. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  2996. let cb;
  2997. if (isFunction(value)) {
  2998. cb = value;
  2999. } else {
  3000. cb = value.handler;
  3001. options = value;
  3002. }
  3003. const reset = setCurrentInstance(this);
  3004. const res = doWatch(getter, cb.bind(publicThis), options);
  3005. reset();
  3006. return res;
  3007. }
  3008. function createPathGetter(ctx, path) {
  3009. const segments = path.split(".");
  3010. return () => {
  3011. let cur = ctx;
  3012. for (let i = 0; i < segments.length && cur; i++) {
  3013. cur = cur[segments[i]];
  3014. }
  3015. return cur;
  3016. };
  3017. }
  3018. function traverse(value, depth = Infinity, seen) {
  3019. if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
  3020. return value;
  3021. }
  3022. seen = seen || /* @__PURE__ */ new Set();
  3023. if (seen.has(value)) {
  3024. return value;
  3025. }
  3026. seen.add(value);
  3027. depth--;
  3028. if (isRef(value)) {
  3029. traverse(value.value, depth, seen);
  3030. } else if (isArray(value)) {
  3031. for (let i = 0; i < value.length; i++) {
  3032. traverse(value[i], depth, seen);
  3033. }
  3034. } else if (isSet(value) || isMap(value)) {
  3035. value.forEach((v) => {
  3036. traverse(v, depth, seen);
  3037. });
  3038. } else if (isPlainObject(value)) {
  3039. for (const key in value) {
  3040. traverse(value[key], depth, seen);
  3041. }
  3042. }
  3043. return value;
  3044. }
  3045. function validateDirectiveName(name) {
  3046. if (isBuiltInDirective(name)) {
  3047. warn$1("Do not use built-in directive ids as custom directive id: " + name);
  3048. }
  3049. }
  3050. function withDirectives(vnode, directives) {
  3051. if (currentRenderingInstance === null) {
  3052. warn$1(`withDirectives can only be used inside render functions.`);
  3053. return vnode;
  3054. }
  3055. const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
  3056. const bindings = vnode.dirs || (vnode.dirs = []);
  3057. for (let i = 0; i < directives.length; i++) {
  3058. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  3059. if (dir) {
  3060. if (isFunction(dir)) {
  3061. dir = {
  3062. mounted: dir,
  3063. updated: dir
  3064. };
  3065. }
  3066. if (dir.deep) {
  3067. traverse(value);
  3068. }
  3069. bindings.push({
  3070. dir,
  3071. instance,
  3072. value,
  3073. oldValue: void 0,
  3074. arg,
  3075. modifiers
  3076. });
  3077. }
  3078. }
  3079. return vnode;
  3080. }
  3081. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  3082. const bindings = vnode.dirs;
  3083. const oldBindings = prevVNode && prevVNode.dirs;
  3084. for (let i = 0; i < bindings.length; i++) {
  3085. const binding = bindings[i];
  3086. if (oldBindings) {
  3087. binding.oldValue = oldBindings[i].value;
  3088. }
  3089. let hook = binding.dir[name];
  3090. if (hook) {
  3091. pauseTracking();
  3092. callWithAsyncErrorHandling(hook, instance, 8, [
  3093. vnode.el,
  3094. binding,
  3095. vnode,
  3096. prevVNode
  3097. ]);
  3098. resetTracking();
  3099. }
  3100. }
  3101. }
  3102. function useTransitionState() {
  3103. const state = {
  3104. isMounted: false,
  3105. isLeaving: false,
  3106. isUnmounting: false,
  3107. leavingVNodes: /* @__PURE__ */ new Map()
  3108. };
  3109. onMounted(() => {
  3110. state.isMounted = true;
  3111. });
  3112. onBeforeUnmount(() => {
  3113. state.isUnmounting = true;
  3114. });
  3115. return state;
  3116. }
  3117. function getLeavingNodesForType(state, vnode) {
  3118. const { leavingVNodes } = state;
  3119. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  3120. if (!leavingVNodesCache) {
  3121. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  3122. leavingVNodes.set(vnode.type, leavingVNodesCache);
  3123. }
  3124. return leavingVNodesCache;
  3125. }
  3126. function resolveTransitionHooks(vnode, props, state, instance) {
  3127. const {
  3128. appear,
  3129. mode,
  3130. persisted = false,
  3131. onBeforeEnter,
  3132. onEnter,
  3133. onAfterEnter,
  3134. onEnterCancelled,
  3135. onBeforeLeave,
  3136. onLeave,
  3137. onAfterLeave,
  3138. onLeaveCancelled,
  3139. onBeforeAppear,
  3140. onAppear,
  3141. onAfterAppear,
  3142. onAppearCancelled
  3143. } = props;
  3144. const key = String(vnode.key);
  3145. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  3146. const callHook2 = (hook, args) => {
  3147. hook && callWithAsyncErrorHandling(
  3148. hook,
  3149. instance,
  3150. 9,
  3151. args
  3152. );
  3153. };
  3154. const callAsyncHook = (hook, args) => {
  3155. const done = args[1];
  3156. callHook2(hook, args);
  3157. if (isArray(hook)) {
  3158. if (hook.every((hook2) => hook2.length <= 1))
  3159. done();
  3160. } else if (hook.length <= 1) {
  3161. done();
  3162. }
  3163. };
  3164. const hooks = {
  3165. mode,
  3166. persisted,
  3167. beforeEnter(el) {
  3168. let hook = onBeforeEnter;
  3169. if (!state.isMounted) {
  3170. if (appear) {
  3171. hook = onBeforeAppear || onBeforeEnter;
  3172. } else {
  3173. return;
  3174. }
  3175. }
  3176. if (el[leaveCbKey]) {
  3177. el[leaveCbKey](
  3178. true
  3179. /* cancelled */
  3180. );
  3181. }
  3182. const leavingVNode = leavingVNodesCache[key];
  3183. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  3184. leavingVNode.el[leaveCbKey]();
  3185. }
  3186. callHook2(hook, [el]);
  3187. },
  3188. enter(el) {
  3189. let hook = onEnter;
  3190. let afterHook = onAfterEnter;
  3191. let cancelHook = onEnterCancelled;
  3192. if (!state.isMounted) {
  3193. if (appear) {
  3194. hook = onAppear || onEnter;
  3195. afterHook = onAfterAppear || onAfterEnter;
  3196. cancelHook = onAppearCancelled || onEnterCancelled;
  3197. } else {
  3198. return;
  3199. }
  3200. }
  3201. let called = false;
  3202. const done = el[enterCbKey] = (cancelled) => {
  3203. if (called)
  3204. return;
  3205. called = true;
  3206. if (cancelled) {
  3207. callHook2(cancelHook, [el]);
  3208. } else {
  3209. callHook2(afterHook, [el]);
  3210. }
  3211. if (hooks.delayedLeave) {
  3212. hooks.delayedLeave();
  3213. }
  3214. el[enterCbKey] = void 0;
  3215. };
  3216. if (hook) {
  3217. callAsyncHook(hook, [el, done]);
  3218. } else {
  3219. done();
  3220. }
  3221. },
  3222. leave(el, remove2) {
  3223. const key2 = String(vnode.key);
  3224. if (el[enterCbKey]) {
  3225. el[enterCbKey](
  3226. true
  3227. /* cancelled */
  3228. );
  3229. }
  3230. if (state.isUnmounting) {
  3231. return remove2();
  3232. }
  3233. callHook2(onBeforeLeave, [el]);
  3234. let called = false;
  3235. const done = el[leaveCbKey] = (cancelled) => {
  3236. if (called)
  3237. return;
  3238. called = true;
  3239. remove2();
  3240. if (cancelled) {
  3241. callHook2(onLeaveCancelled, [el]);
  3242. } else {
  3243. callHook2(onAfterLeave, [el]);
  3244. }
  3245. el[leaveCbKey] = void 0;
  3246. if (leavingVNodesCache[key2] === vnode) {
  3247. delete leavingVNodesCache[key2];
  3248. }
  3249. };
  3250. leavingVNodesCache[key2] = vnode;
  3251. if (onLeave) {
  3252. callAsyncHook(onLeave, [el, done]);
  3253. } else {
  3254. done();
  3255. }
  3256. },
  3257. clone(vnode2) {
  3258. return resolveTransitionHooks(vnode2, props, state, instance);
  3259. }
  3260. };
  3261. return hooks;
  3262. }
  3263. function emptyPlaceholder(vnode) {
  3264. if (isKeepAlive(vnode)) {
  3265. vnode = cloneVNode(vnode);
  3266. vnode.children = null;
  3267. return vnode;
  3268. }
  3269. }
  3270. function getKeepAliveChild(vnode) {
  3271. if (!isKeepAlive(vnode)) {
  3272. return vnode;
  3273. }
  3274. if (vnode.component) {
  3275. return vnode.component.subTree;
  3276. }
  3277. const { shapeFlag, children } = vnode;
  3278. if (children) {
  3279. if (shapeFlag & 16) {
  3280. return children[0];
  3281. }
  3282. if (shapeFlag & 32 && isFunction(children.default)) {
  3283. return children.default();
  3284. }
  3285. }
  3286. }
  3287. function setTransitionHooks(vnode, hooks) {
  3288. if (vnode.shapeFlag & 6 && vnode.component) {
  3289. setTransitionHooks(vnode.component.subTree, hooks);
  3290. } else if (vnode.shapeFlag & 128) {
  3291. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  3292. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  3293. } else {
  3294. vnode.transition = hooks;
  3295. }
  3296. }
  3297. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  3298. let ret = [];
  3299. let keyedFragmentCount = 0;
  3300. for (let i = 0; i < children.length; i++) {
  3301. let child = children[i];
  3302. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  3303. if (child.type === Fragment) {
  3304. if (child.patchFlag & 128)
  3305. keyedFragmentCount++;
  3306. ret = ret.concat(
  3307. getTransitionRawChildren(child.children, keepComment, key)
  3308. );
  3309. } else if (keepComment || child.type !== Comment) {
  3310. ret.push(key != null ? cloneVNode(child, { key }) : child);
  3311. }
  3312. }
  3313. if (keyedFragmentCount > 1) {
  3314. for (let i = 0; i < ret.length; i++) {
  3315. ret[i].patchFlag = -2;
  3316. }
  3317. }
  3318. return ret;
  3319. }
  3320. function defineComponent(options, extraOptions) {
  3321. return isFunction(options) ? (
  3322. // #8326: extend call and options.name access are considered side-effects
  3323. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  3324. (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  3325. ) : options;
  3326. }
  3327. function defineAsyncComponent(source) {
  3328. if (isFunction(source)) {
  3329. source = { loader: source };
  3330. }
  3331. const {
  3332. loader,
  3333. loadingComponent,
  3334. errorComponent,
  3335. delay = 200,
  3336. timeout,
  3337. // undefined = never times out
  3338. suspensible = true,
  3339. onError: userOnError
  3340. } = source;
  3341. let pendingRequest = null;
  3342. let resolvedComp;
  3343. let retries = 0;
  3344. const retry = () => {
  3345. retries++;
  3346. pendingRequest = null;
  3347. return load();
  3348. };
  3349. const load = () => {
  3350. let thisRequest;
  3351. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  3352. err = err instanceof Error ? err : new Error(String(err));
  3353. if (userOnError) {
  3354. return new Promise((resolve2, reject) => {
  3355. const userRetry = () => resolve2(retry());
  3356. const userFail = () => reject(err);
  3357. userOnError(err, userRetry, userFail, retries + 1);
  3358. });
  3359. } else {
  3360. throw err;
  3361. }
  3362. }).then((comp) => {
  3363. if (thisRequest !== pendingRequest && pendingRequest) {
  3364. return pendingRequest;
  3365. }
  3366. if (!comp) {
  3367. warn$1(
  3368. `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
  3369. );
  3370. }
  3371. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
  3372. comp = comp.default;
  3373. }
  3374. if (comp && !isObject(comp) && !isFunction(comp)) {
  3375. throw new Error(`Invalid async component load result: ${comp}`);
  3376. }
  3377. resolvedComp = comp;
  3378. return comp;
  3379. }));
  3380. };
  3381. return defineComponent({
  3382. name: "AsyncComponentWrapper",
  3383. __asyncLoader: load,
  3384. get __asyncResolved() {
  3385. return resolvedComp;
  3386. },
  3387. setup() {
  3388. const instance = currentInstance;
  3389. if (resolvedComp) {
  3390. return () => createInnerComp(resolvedComp, instance);
  3391. }
  3392. const onError = (err) => {
  3393. pendingRequest = null;
  3394. handleError(
  3395. err,
  3396. instance,
  3397. 13,
  3398. !errorComponent
  3399. );
  3400. };
  3401. if (suspensible && instance.suspense || isInSSRComponentSetup) {
  3402. return load().then((comp) => {
  3403. return () => createInnerComp(comp, instance);
  3404. }).catch((err) => {
  3405. onError(err);
  3406. return () => errorComponent ? createVNode(errorComponent, {
  3407. error: err
  3408. }) : null;
  3409. });
  3410. }
  3411. const loaded = ref(false);
  3412. const error = ref();
  3413. const delayed = ref(!!delay);
  3414. if (delay) {
  3415. setTimeout(() => {
  3416. delayed.value = false;
  3417. }, delay);
  3418. }
  3419. if (timeout != null) {
  3420. setTimeout(() => {
  3421. if (!loaded.value && !error.value) {
  3422. const err = new Error(
  3423. `Async component timed out after ${timeout}ms.`
  3424. );
  3425. onError(err);
  3426. error.value = err;
  3427. }
  3428. }, timeout);
  3429. }
  3430. load().then(() => {
  3431. loaded.value = true;
  3432. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  3433. instance.parent.effect.dirty = true;
  3434. queueJob(instance.parent.update);
  3435. }
  3436. }).catch((err) => {
  3437. onError(err);
  3438. error.value = err;
  3439. });
  3440. return () => {
  3441. if (loaded.value && resolvedComp) {
  3442. return createInnerComp(resolvedComp, instance);
  3443. } else if (error.value && errorComponent) {
  3444. return createVNode(errorComponent, {
  3445. error: error.value
  3446. });
  3447. } else if (loadingComponent && !delayed.value) {
  3448. return createVNode(loadingComponent);
  3449. }
  3450. };
  3451. }
  3452. });
  3453. }
  3454. function createInnerComp(comp, parent) {
  3455. const { ref: ref2, props, children, ce } = parent.vnode;
  3456. const vnode = createVNode(comp, props, children);
  3457. vnode.ref = ref2;
  3458. vnode.ce = ce;
  3459. delete parent.vnode.ce;
  3460. return vnode;
  3461. }
  3462. function matches(pattern, name) {
  3463. if (isArray(pattern)) {
  3464. return pattern.some((p) => matches(p, name));
  3465. } else if (isString(pattern)) {
  3466. return pattern.split(",").includes(name);
  3467. } else if (isRegExp(pattern)) {
  3468. return pattern.test(name);
  3469. }
  3470. return false;
  3471. }
  3472. function onActivated(hook, target) {
  3473. registerKeepAliveHook(hook, "a", target);
  3474. }
  3475. function onDeactivated(hook, target) {
  3476. registerKeepAliveHook(hook, "da", target);
  3477. }
  3478. function registerKeepAliveHook(hook, type, target = currentInstance) {
  3479. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3480. let current = target;
  3481. while (current) {
  3482. if (current.isDeactivated) {
  3483. return;
  3484. }
  3485. current = current.parent;
  3486. }
  3487. return hook();
  3488. });
  3489. injectHook(type, wrappedHook, target);
  3490. if (target) {
  3491. let current = target.parent;
  3492. while (current && current.parent) {
  3493. if (isKeepAlive(current.parent.vnode)) {
  3494. injectToKeepAliveRoot(wrappedHook, type, target, current);
  3495. }
  3496. current = current.parent;
  3497. }
  3498. }
  3499. }
  3500. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  3501. const injected = injectHook(
  3502. type,
  3503. hook,
  3504. keepAliveRoot,
  3505. true
  3506. /* prepend */
  3507. );
  3508. onUnmounted(() => {
  3509. remove(keepAliveRoot[type], injected);
  3510. }, target);
  3511. }
  3512. function resetShapeFlag(vnode) {
  3513. vnode.shapeFlag &= ~256;
  3514. vnode.shapeFlag &= ~512;
  3515. }
  3516. function getInnerChild(vnode) {
  3517. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  3518. }
  3519. function injectHook(type, hook, target = currentInstance, prepend = false) {
  3520. if (target) {
  3521. const hooks = target[type] || (target[type] = []);
  3522. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3523. if (target.isUnmounted) {
  3524. return;
  3525. }
  3526. pauseTracking();
  3527. const reset = setCurrentInstance(target);
  3528. const res = callWithAsyncErrorHandling(hook, target, type, args);
  3529. reset();
  3530. resetTracking();
  3531. return res;
  3532. });
  3533. if (prepend) {
  3534. hooks.unshift(wrappedHook);
  3535. } else {
  3536. hooks.push(wrappedHook);
  3537. }
  3538. return wrappedHook;
  3539. } else if (true) {
  3540. const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
  3541. warn$1(
  3542. `${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.`
  3543. );
  3544. }
  3545. }
  3546. function onErrorCaptured(hook, target = currentInstance) {
  3547. injectHook("ec", hook, target);
  3548. }
  3549. function renderList(source, renderItem, cache, index) {
  3550. let ret;
  3551. const cached = cache && cache[index];
  3552. if (isArray(source) || isString(source)) {
  3553. ret = new Array(source.length);
  3554. for (let i = 0, l = source.length; i < l; i++) {
  3555. ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
  3556. }
  3557. } else if (typeof source === "number") {
  3558. if (!Number.isInteger(source)) {
  3559. warn$1(`The v-for range expect an integer value but got ${source}.`);
  3560. }
  3561. ret = new Array(source);
  3562. for (let i = 0; i < source; i++) {
  3563. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  3564. }
  3565. } else if (isObject(source)) {
  3566. if (source[Symbol.iterator]) {
  3567. ret = Array.from(
  3568. source,
  3569. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  3570. );
  3571. } else {
  3572. const keys = Object.keys(source);
  3573. ret = new Array(keys.length);
  3574. for (let i = 0, l = keys.length; i < l; i++) {
  3575. const key = keys[i];
  3576. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  3577. }
  3578. }
  3579. } else {
  3580. ret = [];
  3581. }
  3582. if (cache) {
  3583. cache[index] = ret;
  3584. }
  3585. return ret;
  3586. }
  3587. function createSlots(slots, dynamicSlots) {
  3588. for (let i = 0; i < dynamicSlots.length; i++) {
  3589. const slot = dynamicSlots[i];
  3590. if (isArray(slot)) {
  3591. for (let j = 0; j < slot.length; j++) {
  3592. slots[slot[j].name] = slot[j].fn;
  3593. }
  3594. } else if (slot) {
  3595. slots[slot.name] = slot.key ? (...args) => {
  3596. const res = slot.fn(...args);
  3597. if (res)
  3598. res.key = slot.key;
  3599. return res;
  3600. } : slot.fn;
  3601. }
  3602. }
  3603. return slots;
  3604. }
  3605. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  3606. if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
  3607. if (name !== "default")
  3608. props.name = name;
  3609. return createVNode("slot", props, fallback && fallback());
  3610. }
  3611. let slot = slots[name];
  3612. if (slot && slot.length > 1) {
  3613. warn$1(
  3614. `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.`
  3615. );
  3616. slot = () => [];
  3617. }
  3618. if (slot && slot._c) {
  3619. slot._d = false;
  3620. }
  3621. openBlock();
  3622. const validSlotContent = slot && ensureValidVNode(slot(props));
  3623. const rendered = createBlock(
  3624. Fragment,
  3625. {
  3626. key: props.key || // slot content array of a dynamic conditional slot may have a branch
  3627. // key attached in the `createSlots` helper, respect that
  3628. validSlotContent && validSlotContent.key || `_${name}`
  3629. },
  3630. validSlotContent || (fallback ? fallback() : []),
  3631. validSlotContent && slots._ === 1 ? 64 : -2
  3632. );
  3633. if (!noSlotted && rendered.scopeId) {
  3634. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  3635. }
  3636. if (slot && slot._c) {
  3637. slot._d = true;
  3638. }
  3639. return rendered;
  3640. }
  3641. function ensureValidVNode(vnodes) {
  3642. return vnodes.some((child) => {
  3643. if (!isVNode(child))
  3644. return true;
  3645. if (child.type === Comment)
  3646. return false;
  3647. if (child.type === Fragment && !ensureValidVNode(child.children))
  3648. return false;
  3649. return true;
  3650. }) ? vnodes : null;
  3651. }
  3652. function toHandlers(obj, preserveCaseIfNecessary) {
  3653. const ret = {};
  3654. if (!isObject(obj)) {
  3655. warn$1(`v-on with no argument expects an object value.`);
  3656. return ret;
  3657. }
  3658. for (const key in obj) {
  3659. ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  3660. }
  3661. return ret;
  3662. }
  3663. function createDevRenderContext(instance) {
  3664. const target = {};
  3665. Object.defineProperty(target, `_`, {
  3666. configurable: true,
  3667. enumerable: false,
  3668. get: () => instance
  3669. });
  3670. Object.keys(publicPropertiesMap).forEach((key) => {
  3671. Object.defineProperty(target, key, {
  3672. configurable: true,
  3673. enumerable: false,
  3674. get: () => publicPropertiesMap[key](instance),
  3675. // intercepted by the proxy so no need for implementation,
  3676. // but needed to prevent set errors
  3677. set: NOOP
  3678. });
  3679. });
  3680. return target;
  3681. }
  3682. function exposePropsOnRenderContext(instance) {
  3683. const {
  3684. ctx,
  3685. propsOptions: [propsOptions]
  3686. } = instance;
  3687. if (propsOptions) {
  3688. Object.keys(propsOptions).forEach((key) => {
  3689. Object.defineProperty(ctx, key, {
  3690. enumerable: true,
  3691. configurable: true,
  3692. get: () => instance.props[key],
  3693. set: NOOP
  3694. });
  3695. });
  3696. }
  3697. }
  3698. function exposeSetupStateOnRenderContext(instance) {
  3699. const { ctx, setupState } = instance;
  3700. Object.keys(toRaw(setupState)).forEach((key) => {
  3701. if (!setupState.__isScriptSetup) {
  3702. if (isReservedPrefix(key[0])) {
  3703. warn$1(
  3704. `setup() return property ${JSON.stringify(
  3705. key
  3706. )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
  3707. );
  3708. return;
  3709. }
  3710. Object.defineProperty(ctx, key, {
  3711. enumerable: true,
  3712. configurable: true,
  3713. get: () => setupState[key],
  3714. set: NOOP
  3715. });
  3716. }
  3717. });
  3718. }
  3719. function defineProps() {
  3720. if (true) {
  3721. warnRuntimeUsage(`defineProps`);
  3722. }
  3723. return null;
  3724. }
  3725. function defineEmits() {
  3726. if (true) {
  3727. warnRuntimeUsage(`defineEmits`);
  3728. }
  3729. return null;
  3730. }
  3731. function defineExpose(exposed) {
  3732. if (true) {
  3733. warnRuntimeUsage(`defineExpose`);
  3734. }
  3735. }
  3736. function defineOptions(options) {
  3737. if (true) {
  3738. warnRuntimeUsage(`defineOptions`);
  3739. }
  3740. }
  3741. function defineSlots() {
  3742. if (true) {
  3743. warnRuntimeUsage(`defineSlots`);
  3744. }
  3745. return null;
  3746. }
  3747. function defineModel() {
  3748. if (true) {
  3749. warnRuntimeUsage("defineModel");
  3750. }
  3751. }
  3752. function withDefaults(props, defaults) {
  3753. if (true) {
  3754. warnRuntimeUsage(`withDefaults`);
  3755. }
  3756. return null;
  3757. }
  3758. function useSlots() {
  3759. return getContext().slots;
  3760. }
  3761. function useAttrs() {
  3762. return getContext().attrs;
  3763. }
  3764. function getContext() {
  3765. const i = getCurrentInstance();
  3766. if (!i) {
  3767. warn$1(`useContext() called without active instance.`);
  3768. }
  3769. return i.setupContext || (i.setupContext = createSetupContext(i));
  3770. }
  3771. function normalizePropsOrEmits(props) {
  3772. return isArray(props) ? props.reduce(
  3773. (normalized, p) => (normalized[p] = null, normalized),
  3774. {}
  3775. ) : props;
  3776. }
  3777. function mergeDefaults(raw, defaults) {
  3778. const props = normalizePropsOrEmits(raw);
  3779. for (const key in defaults) {
  3780. if (key.startsWith("__skip"))
  3781. continue;
  3782. let opt = props[key];
  3783. if (opt) {
  3784. if (isArray(opt) || isFunction(opt)) {
  3785. opt = props[key] = { type: opt, default: defaults[key] };
  3786. } else {
  3787. opt.default = defaults[key];
  3788. }
  3789. } else if (opt === null) {
  3790. opt = props[key] = { default: defaults[key] };
  3791. } else if (true) {
  3792. warn$1(`props default key "${key}" has no corresponding declaration.`);
  3793. }
  3794. if (opt && defaults[`__skip_${key}`]) {
  3795. opt.skipFactory = true;
  3796. }
  3797. }
  3798. return props;
  3799. }
  3800. function mergeModels(a, b) {
  3801. if (!a || !b)
  3802. return a || b;
  3803. if (isArray(a) && isArray(b))
  3804. return a.concat(b);
  3805. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  3806. }
  3807. function createPropsRestProxy(props, excludedKeys) {
  3808. const ret = {};
  3809. for (const key in props) {
  3810. if (!excludedKeys.includes(key)) {
  3811. Object.defineProperty(ret, key, {
  3812. enumerable: true,
  3813. get: () => props[key]
  3814. });
  3815. }
  3816. }
  3817. return ret;
  3818. }
  3819. function withAsyncContext(getAwaitable) {
  3820. const ctx = getCurrentInstance();
  3821. if (!ctx) {
  3822. warn$1(
  3823. `withAsyncContext called without active current instance. This is likely a bug.`
  3824. );
  3825. }
  3826. let awaitable = getAwaitable();
  3827. unsetCurrentInstance();
  3828. if (isPromise(awaitable)) {
  3829. awaitable = awaitable.catch((e) => {
  3830. setCurrentInstance(ctx);
  3831. throw e;
  3832. });
  3833. }
  3834. return [awaitable, () => setCurrentInstance(ctx)];
  3835. }
  3836. function createDuplicateChecker() {
  3837. const cache = /* @__PURE__ */ Object.create(null);
  3838. return (type, key) => {
  3839. if (cache[key]) {
  3840. warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
  3841. } else {
  3842. cache[key] = type;
  3843. }
  3844. };
  3845. }
  3846. function applyOptions(instance) {
  3847. const options = resolveMergedOptions(instance);
  3848. const publicThis = instance.proxy;
  3849. const ctx = instance.ctx;
  3850. shouldCacheAccess = false;
  3851. if (options.beforeCreate) {
  3852. callHook(options.beforeCreate, instance, "bc");
  3853. }
  3854. const {
  3855. // state
  3856. data: dataOptions,
  3857. computed: computedOptions,
  3858. methods,
  3859. watch: watchOptions,
  3860. provide: provideOptions,
  3861. inject: injectOptions,
  3862. // lifecycle
  3863. created,
  3864. beforeMount,
  3865. mounted,
  3866. beforeUpdate,
  3867. updated,
  3868. activated,
  3869. deactivated,
  3870. beforeDestroy,
  3871. beforeUnmount,
  3872. destroyed,
  3873. unmounted,
  3874. render,
  3875. renderTracked,
  3876. renderTriggered,
  3877. errorCaptured,
  3878. serverPrefetch,
  3879. // public API
  3880. expose,
  3881. inheritAttrs,
  3882. // assets
  3883. components,
  3884. directives,
  3885. filters
  3886. } = options;
  3887. const checkDuplicateProperties = true ? createDuplicateChecker() : null;
  3888. if (true) {
  3889. const [propsOptions] = instance.propsOptions;
  3890. if (propsOptions) {
  3891. for (const key in propsOptions) {
  3892. checkDuplicateProperties("Props", key);
  3893. }
  3894. }
  3895. }
  3896. if (injectOptions) {
  3897. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  3898. }
  3899. if (methods) {
  3900. for (const key in methods) {
  3901. const methodHandler = methods[key];
  3902. if (isFunction(methodHandler)) {
  3903. if (true) {
  3904. Object.defineProperty(ctx, key, {
  3905. value: methodHandler.bind(publicThis),
  3906. configurable: true,
  3907. enumerable: true,
  3908. writable: true
  3909. });
  3910. } else {
  3911. ctx[key] = methodHandler.bind(publicThis);
  3912. }
  3913. if (true) {
  3914. checkDuplicateProperties("Methods", key);
  3915. }
  3916. } else if (true) {
  3917. warn$1(
  3918. `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
  3919. );
  3920. }
  3921. }
  3922. }
  3923. if (dataOptions) {
  3924. if (!isFunction(dataOptions)) {
  3925. warn$1(
  3926. `The data option must be a function. Plain object usage is no longer supported.`
  3927. );
  3928. }
  3929. const data = dataOptions.call(publicThis, publicThis);
  3930. if (isPromise(data)) {
  3931. warn$1(
  3932. `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
  3933. );
  3934. }
  3935. if (!isObject(data)) {
  3936. warn$1(`data() should return an object.`);
  3937. } else {
  3938. instance.data = reactive(data);
  3939. if (true) {
  3940. for (const key in data) {
  3941. checkDuplicateProperties("Data", key);
  3942. if (!isReservedPrefix(key[0])) {
  3943. Object.defineProperty(ctx, key, {
  3944. configurable: true,
  3945. enumerable: true,
  3946. get: () => data[key],
  3947. set: NOOP
  3948. });
  3949. }
  3950. }
  3951. }
  3952. }
  3953. }
  3954. shouldCacheAccess = true;
  3955. if (computedOptions) {
  3956. for (const key in computedOptions) {
  3957. const opt = computedOptions[key];
  3958. const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  3959. if (get2 === NOOP) {
  3960. warn$1(`Computed property "${key}" has no getter.`);
  3961. }
  3962. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : true ? () => {
  3963. warn$1(
  3964. `Write operation failed: computed property "${key}" is readonly.`
  3965. );
  3966. } : NOOP;
  3967. const c = computed2({
  3968. get: get2,
  3969. set: set2
  3970. });
  3971. Object.defineProperty(ctx, key, {
  3972. enumerable: true,
  3973. configurable: true,
  3974. get: () => c.value,
  3975. set: (v) => c.value = v
  3976. });
  3977. if (true) {
  3978. checkDuplicateProperties("Computed", key);
  3979. }
  3980. }
  3981. }
  3982. if (watchOptions) {
  3983. for (const key in watchOptions) {
  3984. createWatcher(watchOptions[key], ctx, publicThis, key);
  3985. }
  3986. }
  3987. if (provideOptions) {
  3988. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  3989. Reflect.ownKeys(provides).forEach((key) => {
  3990. provide(key, provides[key]);
  3991. });
  3992. }
  3993. if (created) {
  3994. callHook(created, instance, "c");
  3995. }
  3996. function registerLifecycleHook(register, hook) {
  3997. if (isArray(hook)) {
  3998. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  3999. } else if (hook) {
  4000. register(hook.bind(publicThis));
  4001. }
  4002. }
  4003. registerLifecycleHook(onBeforeMount, beforeMount);
  4004. registerLifecycleHook(onMounted, mounted);
  4005. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4006. registerLifecycleHook(onUpdated, updated);
  4007. registerLifecycleHook(onActivated, activated);
  4008. registerLifecycleHook(onDeactivated, deactivated);
  4009. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4010. registerLifecycleHook(onRenderTracked, renderTracked);
  4011. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4012. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4013. registerLifecycleHook(onUnmounted, unmounted);
  4014. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4015. if (isArray(expose)) {
  4016. if (expose.length) {
  4017. const exposed = instance.exposed || (instance.exposed = {});
  4018. expose.forEach((key) => {
  4019. Object.defineProperty(exposed, key, {
  4020. get: () => publicThis[key],
  4021. set: (val) => publicThis[key] = val
  4022. });
  4023. });
  4024. } else if (!instance.exposed) {
  4025. instance.exposed = {};
  4026. }
  4027. }
  4028. if (render && instance.render === NOOP) {
  4029. instance.render = render;
  4030. }
  4031. if (inheritAttrs != null) {
  4032. instance.inheritAttrs = inheritAttrs;
  4033. }
  4034. if (components)
  4035. instance.components = components;
  4036. if (directives)
  4037. instance.directives = directives;
  4038. }
  4039. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  4040. if (isArray(injectOptions)) {
  4041. injectOptions = normalizeInject(injectOptions);
  4042. }
  4043. for (const key in injectOptions) {
  4044. const opt = injectOptions[key];
  4045. let injected;
  4046. if (isObject(opt)) {
  4047. if ("default" in opt) {
  4048. injected = inject(
  4049. opt.from || key,
  4050. opt.default,
  4051. true
  4052. );
  4053. } else {
  4054. injected = inject(opt.from || key);
  4055. }
  4056. } else {
  4057. injected = inject(opt);
  4058. }
  4059. if (isRef(injected)) {
  4060. Object.defineProperty(ctx, key, {
  4061. enumerable: true,
  4062. configurable: true,
  4063. get: () => injected.value,
  4064. set: (v) => injected.value = v
  4065. });
  4066. } else {
  4067. ctx[key] = injected;
  4068. }
  4069. if (true) {
  4070. checkDuplicateProperties("Inject", key);
  4071. }
  4072. }
  4073. }
  4074. function callHook(hook, instance, type) {
  4075. callWithAsyncErrorHandling(
  4076. isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  4077. instance,
  4078. type
  4079. );
  4080. }
  4081. function createWatcher(raw, ctx, publicThis, key) {
  4082. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4083. if (isString(raw)) {
  4084. const handler = ctx[raw];
  4085. if (isFunction(handler)) {
  4086. watch(getter, handler);
  4087. } else if (true) {
  4088. warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
  4089. }
  4090. } else if (isFunction(raw)) {
  4091. watch(getter, raw.bind(publicThis));
  4092. } else if (isObject(raw)) {
  4093. if (isArray(raw)) {
  4094. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  4095. } else {
  4096. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4097. if (isFunction(handler)) {
  4098. watch(getter, handler, raw);
  4099. } else if (true) {
  4100. warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4101. }
  4102. }
  4103. } else if (true) {
  4104. warn$1(`Invalid watch option: "${key}"`, raw);
  4105. }
  4106. }
  4107. function resolveMergedOptions(instance) {
  4108. const base = instance.type;
  4109. const { mixins, extends: extendsOptions } = base;
  4110. const {
  4111. mixins: globalMixins,
  4112. optionsCache: cache,
  4113. config: { optionMergeStrategies }
  4114. } = instance.appContext;
  4115. const cached = cache.get(base);
  4116. let resolved;
  4117. if (cached) {
  4118. resolved = cached;
  4119. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  4120. {
  4121. resolved = base;
  4122. }
  4123. } else {
  4124. resolved = {};
  4125. if (globalMixins.length) {
  4126. globalMixins.forEach(
  4127. (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
  4128. );
  4129. }
  4130. mergeOptions(resolved, base, optionMergeStrategies);
  4131. }
  4132. if (isObject(base)) {
  4133. cache.set(base, resolved);
  4134. }
  4135. return resolved;
  4136. }
  4137. function mergeOptions(to, from, strats, asMixin = false) {
  4138. const { mixins, extends: extendsOptions } = from;
  4139. if (extendsOptions) {
  4140. mergeOptions(to, extendsOptions, strats, true);
  4141. }
  4142. if (mixins) {
  4143. mixins.forEach(
  4144. (m) => mergeOptions(to, m, strats, true)
  4145. );
  4146. }
  4147. for (const key in from) {
  4148. if (asMixin && key === "expose") {
  4149. warn$1(
  4150. `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
  4151. );
  4152. } else {
  4153. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  4154. to[key] = strat ? strat(to[key], from[key]) : from[key];
  4155. }
  4156. }
  4157. return to;
  4158. }
  4159. function mergeDataFn(to, from) {
  4160. if (!from) {
  4161. return to;
  4162. }
  4163. if (!to) {
  4164. return from;
  4165. }
  4166. return function mergedDataFn() {
  4167. return extend(
  4168. isFunction(to) ? to.call(this, this) : to,
  4169. isFunction(from) ? from.call(this, this) : from
  4170. );
  4171. };
  4172. }
  4173. function mergeInject(to, from) {
  4174. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  4175. }
  4176. function normalizeInject(raw) {
  4177. if (isArray(raw)) {
  4178. const res = {};
  4179. for (let i = 0; i < raw.length; i++) {
  4180. res[raw[i]] = raw[i];
  4181. }
  4182. return res;
  4183. }
  4184. return raw;
  4185. }
  4186. function mergeAsArray(to, from) {
  4187. return to ? [...new Set([].concat(to, from))] : from;
  4188. }
  4189. function mergeObjectOptions(to, from) {
  4190. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  4191. }
  4192. function mergeEmitsOrPropsOptions(to, from) {
  4193. if (to) {
  4194. if (isArray(to) && isArray(from)) {
  4195. return [.../* @__PURE__ */ new Set([...to, ...from])];
  4196. }
  4197. return extend(
  4198. /* @__PURE__ */ Object.create(null),
  4199. normalizePropsOrEmits(to),
  4200. normalizePropsOrEmits(from != null ? from : {})
  4201. );
  4202. } else {
  4203. return from;
  4204. }
  4205. }
  4206. function mergeWatchOptions(to, from) {
  4207. if (!to)
  4208. return from;
  4209. if (!from)
  4210. return to;
  4211. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  4212. for (const key in from) {
  4213. merged[key] = mergeAsArray(to[key], from[key]);
  4214. }
  4215. return merged;
  4216. }
  4217. function createAppContext() {
  4218. return {
  4219. app: null,
  4220. config: {
  4221. isNativeTag: NO,
  4222. performance: false,
  4223. globalProperties: {},
  4224. optionMergeStrategies: {},
  4225. errorHandler: void 0,
  4226. warnHandler: void 0,
  4227. compilerOptions: {}
  4228. },
  4229. mixins: [],
  4230. components: {},
  4231. directives: {},
  4232. provides: /* @__PURE__ */ Object.create(null),
  4233. optionsCache: /* @__PURE__ */ new WeakMap(),
  4234. propsCache: /* @__PURE__ */ new WeakMap(),
  4235. emitsCache: /* @__PURE__ */ new WeakMap()
  4236. };
  4237. }
  4238. function createAppAPI(render, hydrate) {
  4239. return function createApp(rootComponent, rootProps = null) {
  4240. if (!isFunction(rootComponent)) {
  4241. rootComponent = extend({}, rootComponent);
  4242. }
  4243. if (rootProps != null && !isObject(rootProps)) {
  4244. warn$1(`root props passed to app.mount() must be an object.`);
  4245. rootProps = null;
  4246. }
  4247. const context = createAppContext();
  4248. const installedPlugins = /* @__PURE__ */ new WeakSet();
  4249. let isMounted = false;
  4250. const app = context.app = {
  4251. _uid: uid$1++,
  4252. _component: rootComponent,
  4253. _props: rootProps,
  4254. _container: null,
  4255. _context: context,
  4256. _instance: null,
  4257. version,
  4258. get config() {
  4259. return context.config;
  4260. },
  4261. set config(v) {
  4262. if (true) {
  4263. warn$1(
  4264. `app.config cannot be replaced. Modify individual options instead.`
  4265. );
  4266. }
  4267. },
  4268. use(plugin, ...options) {
  4269. if (installedPlugins.has(plugin)) {
  4270. warn$1(`Plugin has already been applied to target app.`);
  4271. } else if (plugin && isFunction(plugin.install)) {
  4272. installedPlugins.add(plugin);
  4273. plugin.install(app, ...options);
  4274. } else if (isFunction(plugin)) {
  4275. installedPlugins.add(plugin);
  4276. plugin(app, ...options);
  4277. } else if (true) {
  4278. warn$1(
  4279. `A plugin must either be a function or an object with an "install" function.`
  4280. );
  4281. }
  4282. return app;
  4283. },
  4284. mixin(mixin) {
  4285. if (__VUE_OPTIONS_API__) {
  4286. if (!context.mixins.includes(mixin)) {
  4287. context.mixins.push(mixin);
  4288. } else if (true) {
  4289. warn$1(
  4290. "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
  4291. );
  4292. }
  4293. } else if (true) {
  4294. warn$1("Mixins are only available in builds supporting Options API");
  4295. }
  4296. return app;
  4297. },
  4298. component(name, component) {
  4299. if (true) {
  4300. validateComponentName(name, context.config);
  4301. }
  4302. if (!component) {
  4303. return context.components[name];
  4304. }
  4305. if (context.components[name]) {
  4306. warn$1(`Component "${name}" has already been registered in target app.`);
  4307. }
  4308. context.components[name] = component;
  4309. return app;
  4310. },
  4311. directive(name, directive) {
  4312. if (true) {
  4313. validateDirectiveName(name);
  4314. }
  4315. if (!directive) {
  4316. return context.directives[name];
  4317. }
  4318. if (context.directives[name]) {
  4319. warn$1(`Directive "${name}" has already been registered in target app.`);
  4320. }
  4321. context.directives[name] = directive;
  4322. return app;
  4323. },
  4324. mount(rootContainer, isHydrate, namespace) {
  4325. if (!isMounted) {
  4326. if (rootContainer.__vue_app__) {
  4327. warn$1(
  4328. `There is already an app instance mounted on the host container.
  4329. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
  4330. );
  4331. }
  4332. const vnode = createVNode(rootComponent, rootProps);
  4333. vnode.appContext = context;
  4334. if (namespace === true) {
  4335. namespace = "svg";
  4336. } else if (namespace === false) {
  4337. namespace = void 0;
  4338. }
  4339. if (true) {
  4340. context.reload = () => {
  4341. render(
  4342. cloneVNode(vnode),
  4343. rootContainer,
  4344. namespace
  4345. );
  4346. };
  4347. }
  4348. if (isHydrate && hydrate) {
  4349. hydrate(vnode, rootContainer);
  4350. } else {
  4351. render(vnode, rootContainer, namespace);
  4352. }
  4353. isMounted = true;
  4354. app._container = rootContainer;
  4355. rootContainer.__vue_app__ = app;
  4356. if (true) {
  4357. app._instance = vnode.component;
  4358. devtoolsInitApp(app, version);
  4359. }
  4360. return getExposeProxy(vnode.component) || vnode.component.proxy;
  4361. } else if (true) {
  4362. warn$1(
  4363. `App has already been mounted.
  4364. 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)\``
  4365. );
  4366. }
  4367. },
  4368. unmount() {
  4369. if (isMounted) {
  4370. render(null, app._container);
  4371. if (true) {
  4372. app._instance = null;
  4373. devtoolsUnmountApp(app);
  4374. }
  4375. delete app._container.__vue_app__;
  4376. } else if (true) {
  4377. warn$1(`Cannot unmount an app that is not mounted.`);
  4378. }
  4379. },
  4380. provide(key, value) {
  4381. if (key in context.provides) {
  4382. warn$1(
  4383. `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
  4384. );
  4385. }
  4386. context.provides[key] = value;
  4387. return app;
  4388. },
  4389. runWithContext(fn) {
  4390. const lastApp = currentApp;
  4391. currentApp = app;
  4392. try {
  4393. return fn();
  4394. } finally {
  4395. currentApp = lastApp;
  4396. }
  4397. }
  4398. };
  4399. return app;
  4400. };
  4401. }
  4402. function provide(key, value) {
  4403. if (!currentInstance) {
  4404. if (true) {
  4405. warn$1(`provide() can only be used inside setup().`);
  4406. }
  4407. } else {
  4408. let provides = currentInstance.provides;
  4409. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  4410. if (parentProvides === provides) {
  4411. provides = currentInstance.provides = Object.create(parentProvides);
  4412. }
  4413. provides[key] = value;
  4414. }
  4415. }
  4416. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  4417. const instance = currentInstance || currentRenderingInstance;
  4418. if (instance || currentApp) {
  4419. const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
  4420. if (provides && key in provides) {
  4421. return provides[key];
  4422. } else if (arguments.length > 1) {
  4423. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  4424. } else if (true) {
  4425. warn$1(`injection "${String(key)}" not found.`);
  4426. }
  4427. } else if (true) {
  4428. warn$1(`inject() can only be used inside setup() or functional components.`);
  4429. }
  4430. }
  4431. function hasInjectionContext() {
  4432. return !!(currentInstance || currentRenderingInstance || currentApp);
  4433. }
  4434. function initProps(instance, rawProps, isStateful, isSSR = false) {
  4435. const props = {};
  4436. const attrs = createInternalObject();
  4437. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4438. setFullProps(instance, rawProps, props, attrs);
  4439. for (const key in instance.propsOptions[0]) {
  4440. if (!(key in props)) {
  4441. props[key] = void 0;
  4442. }
  4443. }
  4444. if (true) {
  4445. validateProps(rawProps || {}, props, instance);
  4446. }
  4447. if (isStateful) {
  4448. instance.props = isSSR ? props : shallowReactive(props);
  4449. } else {
  4450. if (!instance.type.props) {
  4451. instance.props = attrs;
  4452. } else {
  4453. instance.props = props;
  4454. }
  4455. }
  4456. instance.attrs = attrs;
  4457. }
  4458. function isInHmrContext(instance) {
  4459. while (instance) {
  4460. if (instance.type.__hmrId)
  4461. return true;
  4462. instance = instance.parent;
  4463. }
  4464. }
  4465. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4466. const {
  4467. props,
  4468. attrs,
  4469. vnode: { patchFlag }
  4470. } = instance;
  4471. const rawCurrentProps = toRaw(props);
  4472. const [options] = instance.propsOptions;
  4473. let hasAttrsChanged = false;
  4474. if (
  4475. // always force full diff in dev
  4476. // - #1942 if hmr is enabled with sfc component
  4477. // - vite#872 non-sfc component used by sfc component
  4478. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  4479. ) {
  4480. if (patchFlag & 8) {
  4481. const propsToUpdate = instance.vnode.dynamicProps;
  4482. for (let i = 0; i < propsToUpdate.length; i++) {
  4483. let key = propsToUpdate[i];
  4484. if (isEmitListener(instance.emitsOptions, key)) {
  4485. continue;
  4486. }
  4487. const value = rawProps[key];
  4488. if (options) {
  4489. if (hasOwn(attrs, key)) {
  4490. if (value !== attrs[key]) {
  4491. attrs[key] = value;
  4492. hasAttrsChanged = true;
  4493. }
  4494. } else {
  4495. const camelizedKey = camelize(key);
  4496. props[camelizedKey] = resolvePropValue(
  4497. options,
  4498. rawCurrentProps,
  4499. camelizedKey,
  4500. value,
  4501. instance,
  4502. false
  4503. );
  4504. }
  4505. } else {
  4506. if (value !== attrs[key]) {
  4507. attrs[key] = value;
  4508. hasAttrsChanged = true;
  4509. }
  4510. }
  4511. }
  4512. }
  4513. } else {
  4514. if (setFullProps(instance, rawProps, props, attrs)) {
  4515. hasAttrsChanged = true;
  4516. }
  4517. let kebabKey;
  4518. for (const key in rawCurrentProps) {
  4519. if (!rawProps || // for camelCase
  4520. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  4521. // and converted to camelCase (#955)
  4522. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  4523. if (options) {
  4524. if (rawPrevProps && // for camelCase
  4525. (rawPrevProps[key] !== void 0 || // for kebab-case
  4526. rawPrevProps[kebabKey] !== void 0)) {
  4527. props[key] = resolvePropValue(
  4528. options,
  4529. rawCurrentProps,
  4530. key,
  4531. void 0,
  4532. instance,
  4533. true
  4534. );
  4535. }
  4536. } else {
  4537. delete props[key];
  4538. }
  4539. }
  4540. }
  4541. if (attrs !== rawCurrentProps) {
  4542. for (const key in attrs) {
  4543. if (!rawProps || !hasOwn(rawProps, key) && true) {
  4544. delete attrs[key];
  4545. hasAttrsChanged = true;
  4546. }
  4547. }
  4548. }
  4549. }
  4550. if (hasAttrsChanged) {
  4551. trigger(instance.attrs, "set", "");
  4552. }
  4553. if (true) {
  4554. validateProps(rawProps || {}, props, instance);
  4555. }
  4556. }
  4557. function setFullProps(instance, rawProps, props, attrs) {
  4558. const [options, needCastKeys] = instance.propsOptions;
  4559. let hasAttrsChanged = false;
  4560. let rawCastValues;
  4561. if (rawProps) {
  4562. for (let key in rawProps) {
  4563. if (isReservedProp(key)) {
  4564. continue;
  4565. }
  4566. const value = rawProps[key];
  4567. let camelKey;
  4568. if (options && hasOwn(options, camelKey = camelize(key))) {
  4569. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  4570. props[camelKey] = value;
  4571. } else {
  4572. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  4573. }
  4574. } else if (!isEmitListener(instance.emitsOptions, key)) {
  4575. if (!(key in attrs) || value !== attrs[key]) {
  4576. attrs[key] = value;
  4577. hasAttrsChanged = true;
  4578. }
  4579. }
  4580. }
  4581. }
  4582. if (needCastKeys) {
  4583. const rawCurrentProps = toRaw(props);
  4584. const castValues = rawCastValues || EMPTY_OBJ;
  4585. for (let i = 0; i < needCastKeys.length; i++) {
  4586. const key = needCastKeys[i];
  4587. props[key] = resolvePropValue(
  4588. options,
  4589. rawCurrentProps,
  4590. key,
  4591. castValues[key],
  4592. instance,
  4593. !hasOwn(castValues, key)
  4594. );
  4595. }
  4596. }
  4597. return hasAttrsChanged;
  4598. }
  4599. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  4600. const opt = options[key];
  4601. if (opt != null) {
  4602. const hasDefault = hasOwn(opt, "default");
  4603. if (hasDefault && value === void 0) {
  4604. const defaultValue = opt.default;
  4605. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  4606. const { propsDefaults } = instance;
  4607. if (key in propsDefaults) {
  4608. value = propsDefaults[key];
  4609. } else {
  4610. const reset = setCurrentInstance(instance);
  4611. value = propsDefaults[key] = defaultValue.call(
  4612. null,
  4613. props
  4614. );
  4615. reset();
  4616. }
  4617. } else {
  4618. value = defaultValue;
  4619. }
  4620. }
  4621. if (opt[
  4622. 0
  4623. /* shouldCast */
  4624. ]) {
  4625. if (isAbsent && !hasDefault) {
  4626. value = false;
  4627. } else if (opt[
  4628. 1
  4629. /* shouldCastTrue */
  4630. ] && (value === "" || value === hyphenate(key))) {
  4631. value = true;
  4632. }
  4633. }
  4634. }
  4635. return value;
  4636. }
  4637. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4638. const cache = appContext.propsCache;
  4639. const cached = cache.get(comp);
  4640. if (cached) {
  4641. return cached;
  4642. }
  4643. const raw = comp.props;
  4644. const normalized = {};
  4645. const needCastKeys = [];
  4646. let hasExtends = false;
  4647. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  4648. const extendProps = (raw2) => {
  4649. hasExtends = true;
  4650. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  4651. extend(normalized, props);
  4652. if (keys)
  4653. needCastKeys.push(...keys);
  4654. };
  4655. if (!asMixin && appContext.mixins.length) {
  4656. appContext.mixins.forEach(extendProps);
  4657. }
  4658. if (comp.extends) {
  4659. extendProps(comp.extends);
  4660. }
  4661. if (comp.mixins) {
  4662. comp.mixins.forEach(extendProps);
  4663. }
  4664. }
  4665. if (!raw && !hasExtends) {
  4666. if (isObject(comp)) {
  4667. cache.set(comp, EMPTY_ARR);
  4668. }
  4669. return EMPTY_ARR;
  4670. }
  4671. if (isArray(raw)) {
  4672. for (let i = 0; i < raw.length; i++) {
  4673. if (!isString(raw[i])) {
  4674. warn$1(`props must be strings when using array syntax.`, raw[i]);
  4675. }
  4676. const normalizedKey = camelize(raw[i]);
  4677. if (validatePropName(normalizedKey)) {
  4678. normalized[normalizedKey] = EMPTY_OBJ;
  4679. }
  4680. }
  4681. } else if (raw) {
  4682. if (!isObject(raw)) {
  4683. warn$1(`invalid props options`, raw);
  4684. }
  4685. for (const key in raw) {
  4686. const normalizedKey = camelize(key);
  4687. if (validatePropName(normalizedKey)) {
  4688. const opt = raw[key];
  4689. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  4690. if (prop) {
  4691. const booleanIndex = getTypeIndex(Boolean, prop.type);
  4692. const stringIndex = getTypeIndex(String, prop.type);
  4693. prop[
  4694. 0
  4695. /* shouldCast */
  4696. ] = booleanIndex > -1;
  4697. prop[
  4698. 1
  4699. /* shouldCastTrue */
  4700. ] = stringIndex < 0 || booleanIndex < stringIndex;
  4701. if (booleanIndex > -1 || hasOwn(prop, "default")) {
  4702. needCastKeys.push(normalizedKey);
  4703. }
  4704. }
  4705. }
  4706. }
  4707. }
  4708. const res = [normalized, needCastKeys];
  4709. if (isObject(comp)) {
  4710. cache.set(comp, res);
  4711. }
  4712. return res;
  4713. }
  4714. function validatePropName(key) {
  4715. if (key[0] !== "$" && !isReservedProp(key)) {
  4716. return true;
  4717. } else if (true) {
  4718. warn$1(`Invalid prop name: "${key}" is a reserved property.`);
  4719. }
  4720. return false;
  4721. }
  4722. function getType(ctor) {
  4723. if (ctor === null) {
  4724. return "null";
  4725. }
  4726. if (typeof ctor === "function") {
  4727. return ctor.name || "";
  4728. } else if (typeof ctor === "object") {
  4729. const name = ctor.constructor && ctor.constructor.name;
  4730. return name || "";
  4731. }
  4732. return "";
  4733. }
  4734. function isSameType(a, b) {
  4735. return getType(a) === getType(b);
  4736. }
  4737. function getTypeIndex(type, expectedTypes) {
  4738. if (isArray(expectedTypes)) {
  4739. return expectedTypes.findIndex((t) => isSameType(t, type));
  4740. } else if (isFunction(expectedTypes)) {
  4741. return isSameType(expectedTypes, type) ? 0 : -1;
  4742. }
  4743. return -1;
  4744. }
  4745. function validateProps(rawProps, props, instance) {
  4746. const resolvedValues = toRaw(props);
  4747. const options = instance.propsOptions[0];
  4748. for (const key in options) {
  4749. let opt = options[key];
  4750. if (opt == null)
  4751. continue;
  4752. validateProp(
  4753. key,
  4754. resolvedValues[key],
  4755. opt,
  4756. true ? shallowReadonly(resolvedValues) : resolvedValues,
  4757. !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
  4758. );
  4759. }
  4760. }
  4761. function validateProp(name, value, prop, props, isAbsent) {
  4762. const { type, required, validator, skipCheck } = prop;
  4763. if (required && isAbsent) {
  4764. warn$1('Missing required prop: "' + name + '"');
  4765. return;
  4766. }
  4767. if (value == null && !required) {
  4768. return;
  4769. }
  4770. if (type != null && type !== true && !skipCheck) {
  4771. let isValid = false;
  4772. const types = isArray(type) ? type : [type];
  4773. const expectedTypes = [];
  4774. for (let i = 0; i < types.length && !isValid; i++) {
  4775. const { valid, expectedType } = assertType(value, types[i]);
  4776. expectedTypes.push(expectedType || "");
  4777. isValid = valid;
  4778. }
  4779. if (!isValid) {
  4780. warn$1(getInvalidTypeMessage(name, value, expectedTypes));
  4781. return;
  4782. }
  4783. }
  4784. if (validator && !validator(value, props)) {
  4785. warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
  4786. }
  4787. }
  4788. function assertType(value, type) {
  4789. let valid;
  4790. const expectedType = getType(type);
  4791. if (isSimpleType(expectedType)) {
  4792. const t = typeof value;
  4793. valid = t === expectedType.toLowerCase();
  4794. if (!valid && t === "object") {
  4795. valid = value instanceof type;
  4796. }
  4797. } else if (expectedType === "Object") {
  4798. valid = isObject(value);
  4799. } else if (expectedType === "Array") {
  4800. valid = isArray(value);
  4801. } else if (expectedType === "null") {
  4802. valid = value === null;
  4803. } else {
  4804. valid = value instanceof type;
  4805. }
  4806. return {
  4807. valid,
  4808. expectedType
  4809. };
  4810. }
  4811. function getInvalidTypeMessage(name, value, expectedTypes) {
  4812. if (expectedTypes.length === 0) {
  4813. return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  4814. }
  4815. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  4816. const expectedType = expectedTypes[0];
  4817. const receivedType = toRawType(value);
  4818. const expectedValue = styleValue(value, expectedType);
  4819. const receivedValue = styleValue(value, receivedType);
  4820. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  4821. message += ` with value ${expectedValue}`;
  4822. }
  4823. message += `, got ${receivedType} `;
  4824. if (isExplicable(receivedType)) {
  4825. message += `with value ${receivedValue}.`;
  4826. }
  4827. return message;
  4828. }
  4829. function styleValue(value, type) {
  4830. if (type === "String") {
  4831. return `"${value}"`;
  4832. } else if (type === "Number") {
  4833. return `${Number(value)}`;
  4834. } else {
  4835. return `${value}`;
  4836. }
  4837. }
  4838. function isExplicable(type) {
  4839. const explicitTypes = ["string", "number", "boolean"];
  4840. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  4841. }
  4842. function isBoolean(...args) {
  4843. return args.some((elem) => elem.toLowerCase() === "boolean");
  4844. }
  4845. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  4846. if (isArray(rawRef)) {
  4847. rawRef.forEach(
  4848. (r, i) => setRef(
  4849. r,
  4850. oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),
  4851. parentSuspense,
  4852. vnode,
  4853. isUnmount
  4854. )
  4855. );
  4856. return;
  4857. }
  4858. if (isAsyncWrapper(vnode) && !isUnmount) {
  4859. return;
  4860. }
  4861. const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
  4862. const value = isUnmount ? null : refValue;
  4863. const { i: owner, r: ref2 } = rawRef;
  4864. if (!owner) {
  4865. warn$1(
  4866. `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
  4867. );
  4868. return;
  4869. }
  4870. const oldRef = oldRawRef && oldRawRef.r;
  4871. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  4872. const setupState = owner.setupState;
  4873. if (oldRef != null && oldRef !== ref2) {
  4874. if (isString(oldRef)) {
  4875. refs[oldRef] = null;
  4876. if (hasOwn(setupState, oldRef)) {
  4877. setupState[oldRef] = null;
  4878. }
  4879. } else if (isRef(oldRef)) {
  4880. oldRef.value = null;
  4881. }
  4882. }
  4883. if (isFunction(ref2)) {
  4884. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  4885. } else {
  4886. const _isString = isString(ref2);
  4887. const _isRef = isRef(ref2);
  4888. if (_isString || _isRef) {
  4889. const doSet = () => {
  4890. if (rawRef.f) {
  4891. const existing = _isString ? hasOwn(setupState, ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
  4892. if (isUnmount) {
  4893. isArray(existing) && remove(existing, refValue);
  4894. } else {
  4895. if (!isArray(existing)) {
  4896. if (_isString) {
  4897. refs[ref2] = [refValue];
  4898. if (hasOwn(setupState, ref2)) {
  4899. setupState[ref2] = refs[ref2];
  4900. }
  4901. } else {
  4902. ref2.value = [refValue];
  4903. if (rawRef.k)
  4904. refs[rawRef.k] = ref2.value;
  4905. }
  4906. } else if (!existing.includes(refValue)) {
  4907. existing.push(refValue);
  4908. }
  4909. }
  4910. } else if (_isString) {
  4911. refs[ref2] = value;
  4912. if (hasOwn(setupState, ref2)) {
  4913. setupState[ref2] = value;
  4914. }
  4915. } else if (_isRef) {
  4916. ref2.value = value;
  4917. if (rawRef.k)
  4918. refs[rawRef.k] = value;
  4919. } else if (true) {
  4920. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  4921. }
  4922. };
  4923. if (value) {
  4924. doSet.id = -1;
  4925. queuePostRenderEffect(doSet, parentSuspense);
  4926. } else {
  4927. doSet();
  4928. }
  4929. } else if (true) {
  4930. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  4931. }
  4932. }
  4933. }
  4934. function createHydrationFunctions(rendererInternals) {
  4935. const {
  4936. mt: mountComponent,
  4937. p: patch,
  4938. o: {
  4939. patchProp,
  4940. createText,
  4941. nextSibling,
  4942. parentNode,
  4943. remove: remove2,
  4944. insert,
  4945. createComment
  4946. }
  4947. } = rendererInternals;
  4948. const hydrate = (vnode, container) => {
  4949. if (!container.hasChildNodes()) {
  4950. warn$1(
  4951. `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
  4952. );
  4953. patch(null, vnode, container);
  4954. flushPostFlushCbs();
  4955. container._vnode = vnode;
  4956. return;
  4957. }
  4958. hasMismatch = false;
  4959. hydrateNode(container.firstChild, vnode, null, null, null);
  4960. flushPostFlushCbs();
  4961. container._vnode = vnode;
  4962. if (hasMismatch && true) {
  4963. console.error(`Hydration completed but contains mismatches.`);
  4964. }
  4965. };
  4966. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  4967. optimized = optimized || !!vnode.dynamicChildren;
  4968. const isFragmentStart = isComment(node) && node.data === "[";
  4969. const onMismatch = () => handleMismatch(
  4970. node,
  4971. vnode,
  4972. parentComponent,
  4973. parentSuspense,
  4974. slotScopeIds,
  4975. isFragmentStart
  4976. );
  4977. const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
  4978. let domType = node.nodeType;
  4979. vnode.el = node;
  4980. if (true) {
  4981. if (!("__vnode" in node)) {
  4982. Object.defineProperty(node, "__vnode", {
  4983. value: vnode,
  4984. enumerable: false
  4985. });
  4986. }
  4987. if (!("__vueParentComponent" in node)) {
  4988. Object.defineProperty(node, "__vueParentComponent", {
  4989. value: parentComponent,
  4990. enumerable: false
  4991. });
  4992. }
  4993. }
  4994. if (patchFlag === -2) {
  4995. optimized = false;
  4996. vnode.dynamicChildren = null;
  4997. }
  4998. let nextNode = null;
  4999. switch (type) {
  5000. case Text:
  5001. if (domType !== 3) {
  5002. if (vnode.children === "") {
  5003. insert(vnode.el = createText(""), parentNode(node), node);
  5004. nextNode = node;
  5005. } else {
  5006. nextNode = onMismatch();
  5007. }
  5008. } else {
  5009. if (node.data !== vnode.children) {
  5010. hasMismatch = true;
  5011. warn$1(
  5012. `Hydration text mismatch in`,
  5013. node.parentNode,
  5014. `
  5015. - rendered on server: ${JSON.stringify(
  5016. node.data
  5017. )}
  5018. - expected on client: ${JSON.stringify(vnode.children)}`
  5019. );
  5020. node.data = vnode.children;
  5021. }
  5022. nextNode = nextSibling(node);
  5023. }
  5024. break;
  5025. case Comment:
  5026. if (isTemplateNode(node)) {
  5027. nextNode = nextSibling(node);
  5028. replaceNode(
  5029. vnode.el = node.content.firstChild,
  5030. node,
  5031. parentComponent
  5032. );
  5033. } else if (domType !== 8 || isFragmentStart) {
  5034. nextNode = onMismatch();
  5035. } else {
  5036. nextNode = nextSibling(node);
  5037. }
  5038. break;
  5039. case Static:
  5040. if (isFragmentStart) {
  5041. node = nextSibling(node);
  5042. domType = node.nodeType;
  5043. }
  5044. if (domType === 1 || domType === 3) {
  5045. nextNode = node;
  5046. const needToAdoptContent = !vnode.children.length;
  5047. for (let i = 0; i < vnode.staticCount; i++) {
  5048. if (needToAdoptContent)
  5049. vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  5050. if (i === vnode.staticCount - 1) {
  5051. vnode.anchor = nextNode;
  5052. }
  5053. nextNode = nextSibling(nextNode);
  5054. }
  5055. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  5056. } else {
  5057. onMismatch();
  5058. }
  5059. break;
  5060. case Fragment:
  5061. if (!isFragmentStart) {
  5062. nextNode = onMismatch();
  5063. } else {
  5064. nextNode = hydrateFragment(
  5065. node,
  5066. vnode,
  5067. parentComponent,
  5068. parentSuspense,
  5069. slotScopeIds,
  5070. optimized
  5071. );
  5072. }
  5073. break;
  5074. default:
  5075. if (shapeFlag & 1) {
  5076. if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
  5077. nextNode = onMismatch();
  5078. } else {
  5079. nextNode = hydrateElement(
  5080. node,
  5081. vnode,
  5082. parentComponent,
  5083. parentSuspense,
  5084. slotScopeIds,
  5085. optimized
  5086. );
  5087. }
  5088. } else if (shapeFlag & 6) {
  5089. vnode.slotScopeIds = slotScopeIds;
  5090. const container = parentNode(node);
  5091. if (isFragmentStart) {
  5092. nextNode = locateClosingAnchor(node);
  5093. } else if (isComment(node) && node.data === "teleport start") {
  5094. nextNode = locateClosingAnchor(node, node.data, "teleport end");
  5095. } else {
  5096. nextNode = nextSibling(node);
  5097. }
  5098. mountComponent(
  5099. vnode,
  5100. container,
  5101. null,
  5102. parentComponent,
  5103. parentSuspense,
  5104. getContainerType(container),
  5105. optimized
  5106. );
  5107. if (isAsyncWrapper(vnode)) {
  5108. let subTree;
  5109. if (isFragmentStart) {
  5110. subTree = createVNode(Fragment);
  5111. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  5112. } else {
  5113. subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  5114. }
  5115. subTree.el = node;
  5116. vnode.component.subTree = subTree;
  5117. }
  5118. } else if (shapeFlag & 64) {
  5119. if (domType !== 8) {
  5120. nextNode = onMismatch();
  5121. } else {
  5122. nextNode = vnode.type.hydrate(
  5123. node,
  5124. vnode,
  5125. parentComponent,
  5126. parentSuspense,
  5127. slotScopeIds,
  5128. optimized,
  5129. rendererInternals,
  5130. hydrateChildren
  5131. );
  5132. }
  5133. } else if (shapeFlag & 128) {
  5134. nextNode = vnode.type.hydrate(
  5135. node,
  5136. vnode,
  5137. parentComponent,
  5138. parentSuspense,
  5139. getContainerType(parentNode(node)),
  5140. slotScopeIds,
  5141. optimized,
  5142. rendererInternals,
  5143. hydrateNode
  5144. );
  5145. } else if (true) {
  5146. warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
  5147. }
  5148. }
  5149. if (ref2 != null) {
  5150. setRef(ref2, null, parentSuspense, vnode);
  5151. }
  5152. return nextNode;
  5153. };
  5154. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  5155. optimized = optimized || !!vnode.dynamicChildren;
  5156. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  5157. const forcePatch = type === "input" || type === "option";
  5158. if (true) {
  5159. if (dirs) {
  5160. invokeDirectiveHook(vnode, null, parentComponent, "created");
  5161. }
  5162. let needCallTransitionHooks = false;
  5163. if (isTemplateNode(el)) {
  5164. needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  5165. const content = el.content.firstChild;
  5166. if (needCallTransitionHooks) {
  5167. transition.beforeEnter(content);
  5168. }
  5169. replaceNode(content, el, parentComponent);
  5170. vnode.el = el = content;
  5171. }
  5172. if (shapeFlag & 16 && // skip if element has innerHTML / textContent
  5173. !(props && (props.innerHTML || props.textContent))) {
  5174. let next = hydrateChildren(
  5175. el.firstChild,
  5176. vnode,
  5177. el,
  5178. parentComponent,
  5179. parentSuspense,
  5180. slotScopeIds,
  5181. optimized
  5182. );
  5183. let hasWarned2 = false;
  5184. while (next) {
  5185. hasMismatch = true;
  5186. if (!hasWarned2) {
  5187. warn$1(
  5188. `Hydration children mismatch on`,
  5189. el,
  5190. `
  5191. Server rendered element contains more child nodes than client vdom.`
  5192. );
  5193. hasWarned2 = true;
  5194. }
  5195. const cur = next;
  5196. next = next.nextSibling;
  5197. remove2(cur);
  5198. }
  5199. } else if (shapeFlag & 8) {
  5200. if (el.textContent !== vnode.children) {
  5201. hasMismatch = true;
  5202. warn$1(
  5203. `Hydration text content mismatch on`,
  5204. el,
  5205. `
  5206. - rendered on server: ${el.textContent}
  5207. - expected on client: ${vnode.children}`
  5208. );
  5209. el.textContent = vnode.children;
  5210. }
  5211. }
  5212. if (props) {
  5213. if (true) {
  5214. for (const key in props) {
  5215. if (propHasMismatch(el, key, props[key], vnode, parentComponent)) {
  5216. hasMismatch = true;
  5217. }
  5218. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
  5219. key[0] === ".") {
  5220. patchProp(
  5221. el,
  5222. key,
  5223. null,
  5224. props[key],
  5225. void 0,
  5226. void 0,
  5227. parentComponent
  5228. );
  5229. }
  5230. }
  5231. } else if (props.onClick) {
  5232. patchProp(
  5233. el,
  5234. "onClick",
  5235. null,
  5236. props.onClick,
  5237. void 0,
  5238. void 0,
  5239. parentComponent
  5240. );
  5241. }
  5242. }
  5243. let vnodeHooks;
  5244. if (vnodeHooks = props && props.onVnodeBeforeMount) {
  5245. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  5246. }
  5247. if (dirs) {
  5248. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  5249. }
  5250. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
  5251. queueEffectWithSuspense(() => {
  5252. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  5253. needCallTransitionHooks && transition.enter(el);
  5254. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  5255. }, parentSuspense);
  5256. }
  5257. }
  5258. return el.nextSibling;
  5259. };
  5260. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  5261. optimized = optimized || !!parentVNode.dynamicChildren;
  5262. const children = parentVNode.children;
  5263. const l = children.length;
  5264. let hasWarned2 = false;
  5265. for (let i = 0; i < l; i++) {
  5266. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  5267. if (node) {
  5268. node = hydrateNode(
  5269. node,
  5270. vnode,
  5271. parentComponent,
  5272. parentSuspense,
  5273. slotScopeIds,
  5274. optimized
  5275. );
  5276. } else if (vnode.type === Text && !vnode.children) {
  5277. continue;
  5278. } else {
  5279. hasMismatch = true;
  5280. if (!hasWarned2) {
  5281. warn$1(
  5282. `Hydration children mismatch on`,
  5283. container,
  5284. `
  5285. Server rendered element contains fewer child nodes than client vdom.`
  5286. );
  5287. hasWarned2 = true;
  5288. }
  5289. patch(
  5290. null,
  5291. vnode,
  5292. container,
  5293. null,
  5294. parentComponent,
  5295. parentSuspense,
  5296. getContainerType(container),
  5297. slotScopeIds
  5298. );
  5299. }
  5300. }
  5301. return node;
  5302. };
  5303. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  5304. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  5305. if (fragmentSlotScopeIds) {
  5306. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  5307. }
  5308. const container = parentNode(node);
  5309. const next = hydrateChildren(
  5310. nextSibling(node),
  5311. vnode,
  5312. container,
  5313. parentComponent,
  5314. parentSuspense,
  5315. slotScopeIds,
  5316. optimized
  5317. );
  5318. if (next && isComment(next) && next.data === "]") {
  5319. return nextSibling(vnode.anchor = next);
  5320. } else {
  5321. hasMismatch = true;
  5322. insert(vnode.anchor = createComment(`]`), container, next);
  5323. return next;
  5324. }
  5325. };
  5326. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  5327. hasMismatch = true;
  5328. warn$1(
  5329. `Hydration node mismatch:
  5330. - rendered on server:`,
  5331. node,
  5332. node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
  5333. `
  5334. - expected on client:`,
  5335. vnode.type
  5336. );
  5337. vnode.el = null;
  5338. if (isFragment) {
  5339. const end = locateClosingAnchor(node);
  5340. while (true) {
  5341. const next2 = nextSibling(node);
  5342. if (next2 && next2 !== end) {
  5343. remove2(next2);
  5344. } else {
  5345. break;
  5346. }
  5347. }
  5348. }
  5349. const next = nextSibling(node);
  5350. const container = parentNode(node);
  5351. remove2(node);
  5352. patch(
  5353. null,
  5354. vnode,
  5355. container,
  5356. next,
  5357. parentComponent,
  5358. parentSuspense,
  5359. getContainerType(container),
  5360. slotScopeIds
  5361. );
  5362. return next;
  5363. };
  5364. const locateClosingAnchor = (node, open = "[", close = "]") => {
  5365. let match = 0;
  5366. while (node) {
  5367. node = nextSibling(node);
  5368. if (node && isComment(node)) {
  5369. if (node.data === open)
  5370. match++;
  5371. if (node.data === close) {
  5372. if (match === 0) {
  5373. return nextSibling(node);
  5374. } else {
  5375. match--;
  5376. }
  5377. }
  5378. }
  5379. }
  5380. return node;
  5381. };
  5382. const replaceNode = (newNode, oldNode, parentComponent) => {
  5383. const parentNode2 = oldNode.parentNode;
  5384. if (parentNode2) {
  5385. parentNode2.replaceChild(newNode, oldNode);
  5386. }
  5387. let parent = parentComponent;
  5388. while (parent) {
  5389. if (parent.vnode.el === oldNode) {
  5390. parent.vnode.el = parent.subTree.el = newNode;
  5391. }
  5392. parent = parent.parent;
  5393. }
  5394. };
  5395. const isTemplateNode = (node) => {
  5396. return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
  5397. };
  5398. return [hydrate, hydrateNode];
  5399. }
  5400. function propHasMismatch(el, key, clientValue, vnode, instance) {
  5401. var _a;
  5402. let mismatchType;
  5403. let mismatchKey;
  5404. let actual;
  5405. let expected;
  5406. if (key === "class") {
  5407. actual = el.getAttribute("class");
  5408. expected = normalizeClass(clientValue);
  5409. if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
  5410. mismatchType = mismatchKey = `class`;
  5411. }
  5412. } else if (key === "style") {
  5413. actual = el.getAttribute("style") || "";
  5414. expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
  5415. const actualMap = toStyleMap(actual);
  5416. const expectedMap = toStyleMap(expected);
  5417. if (vnode.dirs) {
  5418. for (const { dir, value } of vnode.dirs) {
  5419. if (dir.name === "show" && !value) {
  5420. expectedMap.set("display", "none");
  5421. }
  5422. }
  5423. }
  5424. const root = instance == null ? void 0 : instance.subTree;
  5425. if (vnode === root || (root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
  5426. const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
  5427. for (const key2 in cssVars) {
  5428. expectedMap.set(`--${key2}`, String(cssVars[key2]));
  5429. }
  5430. }
  5431. if (!isMapEqual(actualMap, expectedMap)) {
  5432. mismatchType = mismatchKey = "style";
  5433. }
  5434. } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
  5435. if (isBooleanAttr(key)) {
  5436. actual = el.hasAttribute(key);
  5437. expected = includeBooleanAttr(clientValue);
  5438. } else if (clientValue == null) {
  5439. actual = el.hasAttribute(key);
  5440. expected = false;
  5441. } else {
  5442. if (el.hasAttribute(key)) {
  5443. actual = el.getAttribute(key);
  5444. } else if (key === "value" && el.tagName === "TEXTAREA") {
  5445. actual = el.value;
  5446. } else {
  5447. actual = false;
  5448. }
  5449. expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
  5450. }
  5451. if (actual !== expected) {
  5452. mismatchType = `attribute`;
  5453. mismatchKey = key;
  5454. }
  5455. }
  5456. if (mismatchType) {
  5457. const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
  5458. const preSegment = `Hydration ${mismatchType} mismatch on`;
  5459. const postSegment = `
  5460. - rendered on server: ${format(actual)}
  5461. - expected on client: ${format(expected)}
  5462. Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  5463. You should fix the source of the mismatch.`;
  5464. {
  5465. warn$1(preSegment, el, postSegment);
  5466. }
  5467. return true;
  5468. }
  5469. return false;
  5470. }
  5471. function toClassSet(str) {
  5472. return new Set(str.trim().split(/\s+/));
  5473. }
  5474. function isSetEqual(a, b) {
  5475. if (a.size !== b.size) {
  5476. return false;
  5477. }
  5478. for (const s of a) {
  5479. if (!b.has(s)) {
  5480. return false;
  5481. }
  5482. }
  5483. return true;
  5484. }
  5485. function toStyleMap(str) {
  5486. const styleMap = /* @__PURE__ */ new Map();
  5487. for (const item of str.split(";")) {
  5488. let [key, value] = item.split(":");
  5489. key = key == null ? void 0 : key.trim();
  5490. value = value == null ? void 0 : value.trim();
  5491. if (key && value) {
  5492. styleMap.set(key, value);
  5493. }
  5494. }
  5495. return styleMap;
  5496. }
  5497. function isMapEqual(a, b) {
  5498. if (a.size !== b.size) {
  5499. return false;
  5500. }
  5501. for (const [key, value] of a) {
  5502. if (value !== b.get(key)) {
  5503. return false;
  5504. }
  5505. }
  5506. return true;
  5507. }
  5508. function startMeasure(instance, type) {
  5509. if (instance.appContext.config.performance && isSupported()) {
  5510. perf.mark(`vue-${type}-${instance.uid}`);
  5511. }
  5512. if (true) {
  5513. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  5514. }
  5515. }
  5516. function endMeasure(instance, type) {
  5517. if (instance.appContext.config.performance && isSupported()) {
  5518. const startTag = `vue-${type}-${instance.uid}`;
  5519. const endTag = startTag + `:end`;
  5520. perf.mark(endTag);
  5521. perf.measure(
  5522. `<${formatComponentName(instance, instance.type)}> ${type}`,
  5523. startTag,
  5524. endTag
  5525. );
  5526. perf.clearMarks(startTag);
  5527. perf.clearMarks(endTag);
  5528. }
  5529. if (true) {
  5530. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  5531. }
  5532. }
  5533. function isSupported() {
  5534. if (supported !== void 0) {
  5535. return supported;
  5536. }
  5537. if (typeof window !== "undefined" && window.performance) {
  5538. supported = true;
  5539. perf = window.performance;
  5540. } else {
  5541. supported = false;
  5542. }
  5543. return supported;
  5544. }
  5545. function initFeatureFlags() {
  5546. const needWarn = [];
  5547. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  5548. needWarn.push(`__VUE_OPTIONS_API__`);
  5549. getGlobalThis().__VUE_OPTIONS_API__ = true;
  5550. }
  5551. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  5552. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  5553. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  5554. }
  5555. if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
  5556. needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
  5557. getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
  5558. }
  5559. if (needWarn.length) {
  5560. const multi = needWarn.length > 1;
  5561. console.warn(
  5562. `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.
  5563. For more details, see https://link.vuejs.org/feature-flags.`
  5564. );
  5565. }
  5566. }
  5567. function createRenderer(options) {
  5568. return baseCreateRenderer(options);
  5569. }
  5570. function createHydrationRenderer(options) {
  5571. return baseCreateRenderer(options, createHydrationFunctions);
  5572. }
  5573. function baseCreateRenderer(options, createHydrationFns) {
  5574. {
  5575. initFeatureFlags();
  5576. }
  5577. const target = getGlobalThis();
  5578. target.__VUE__ = true;
  5579. if (true) {
  5580. setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  5581. }
  5582. const {
  5583. insert: hostInsert,
  5584. remove: hostRemove,
  5585. patchProp: hostPatchProp,
  5586. createElement: hostCreateElement,
  5587. createText: hostCreateText,
  5588. createComment: hostCreateComment,
  5589. setText: hostSetText,
  5590. setElementText: hostSetElementText,
  5591. parentNode: hostParentNode,
  5592. nextSibling: hostNextSibling,
  5593. setScopeId: hostSetScopeId = NOOP,
  5594. insertStaticContent: hostInsertStaticContent
  5595. } = options;
  5596. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  5597. if (n1 === n2) {
  5598. return;
  5599. }
  5600. if (n1 && !isSameVNodeType(n1, n2)) {
  5601. anchor = getNextHostNode(n1);
  5602. unmount(n1, parentComponent, parentSuspense, true);
  5603. n1 = null;
  5604. }
  5605. if (n2.patchFlag === -2) {
  5606. optimized = false;
  5607. n2.dynamicChildren = null;
  5608. }
  5609. const { type, ref: ref2, shapeFlag } = n2;
  5610. switch (type) {
  5611. case Text:
  5612. processText(n1, n2, container, anchor);
  5613. break;
  5614. case Comment:
  5615. processCommentNode(n1, n2, container, anchor);
  5616. break;
  5617. case Static:
  5618. if (n1 == null) {
  5619. mountStaticNode(n2, container, anchor, namespace);
  5620. } else if (true) {
  5621. patchStaticNode(n1, n2, container, namespace);
  5622. }
  5623. break;
  5624. case Fragment:
  5625. processFragment(
  5626. n1,
  5627. n2,
  5628. container,
  5629. anchor,
  5630. parentComponent,
  5631. parentSuspense,
  5632. namespace,
  5633. slotScopeIds,
  5634. optimized
  5635. );
  5636. break;
  5637. default:
  5638. if (shapeFlag & 1) {
  5639. processElement(
  5640. n1,
  5641. n2,
  5642. container,
  5643. anchor,
  5644. parentComponent,
  5645. parentSuspense,
  5646. namespace,
  5647. slotScopeIds,
  5648. optimized
  5649. );
  5650. } else if (shapeFlag & 6) {
  5651. processComponent(
  5652. n1,
  5653. n2,
  5654. container,
  5655. anchor,
  5656. parentComponent,
  5657. parentSuspense,
  5658. namespace,
  5659. slotScopeIds,
  5660. optimized
  5661. );
  5662. } else if (shapeFlag & 64) {
  5663. type.process(
  5664. n1,
  5665. n2,
  5666. container,
  5667. anchor,
  5668. parentComponent,
  5669. parentSuspense,
  5670. namespace,
  5671. slotScopeIds,
  5672. optimized,
  5673. internals
  5674. );
  5675. } else if (shapeFlag & 128) {
  5676. type.process(
  5677. n1,
  5678. n2,
  5679. container,
  5680. anchor,
  5681. parentComponent,
  5682. parentSuspense,
  5683. namespace,
  5684. slotScopeIds,
  5685. optimized,
  5686. internals
  5687. );
  5688. } else if (true) {
  5689. warn$1("Invalid VNode type:", type, `(${typeof type})`);
  5690. }
  5691. }
  5692. if (ref2 != null && parentComponent) {
  5693. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  5694. }
  5695. };
  5696. const processText = (n1, n2, container, anchor) => {
  5697. if (n1 == null) {
  5698. hostInsert(
  5699. n2.el = hostCreateText(n2.children),
  5700. container,
  5701. anchor
  5702. );
  5703. } else {
  5704. const el = n2.el = n1.el;
  5705. if (n2.children !== n1.children) {
  5706. hostSetText(el, n2.children);
  5707. }
  5708. }
  5709. };
  5710. const processCommentNode = (n1, n2, container, anchor) => {
  5711. if (n1 == null) {
  5712. hostInsert(
  5713. n2.el = hostCreateComment(n2.children || ""),
  5714. container,
  5715. anchor
  5716. );
  5717. } else {
  5718. n2.el = n1.el;
  5719. }
  5720. };
  5721. const mountStaticNode = (n2, container, anchor, namespace) => {
  5722. [n2.el, n2.anchor] = hostInsertStaticContent(
  5723. n2.children,
  5724. container,
  5725. anchor,
  5726. namespace,
  5727. n2.el,
  5728. n2.anchor
  5729. );
  5730. };
  5731. const patchStaticNode = (n1, n2, container, namespace) => {
  5732. if (n2.children !== n1.children) {
  5733. const anchor = hostNextSibling(n1.anchor);
  5734. removeStaticNode(n1);
  5735. [n2.el, n2.anchor] = hostInsertStaticContent(
  5736. n2.children,
  5737. container,
  5738. anchor,
  5739. namespace
  5740. );
  5741. } else {
  5742. n2.el = n1.el;
  5743. n2.anchor = n1.anchor;
  5744. }
  5745. };
  5746. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  5747. let next;
  5748. while (el && el !== anchor) {
  5749. next = hostNextSibling(el);
  5750. hostInsert(el, container, nextSibling);
  5751. el = next;
  5752. }
  5753. hostInsert(anchor, container, nextSibling);
  5754. };
  5755. const removeStaticNode = ({ el, anchor }) => {
  5756. let next;
  5757. while (el && el !== anchor) {
  5758. next = hostNextSibling(el);
  5759. hostRemove(el);
  5760. el = next;
  5761. }
  5762. hostRemove(anchor);
  5763. };
  5764. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5765. if (n2.type === "svg") {
  5766. namespace = "svg";
  5767. } else if (n2.type === "math") {
  5768. namespace = "mathml";
  5769. }
  5770. if (n1 == null) {
  5771. mountElement(
  5772. n2,
  5773. container,
  5774. anchor,
  5775. parentComponent,
  5776. parentSuspense,
  5777. namespace,
  5778. slotScopeIds,
  5779. optimized
  5780. );
  5781. } else {
  5782. patchElement(
  5783. n1,
  5784. n2,
  5785. parentComponent,
  5786. parentSuspense,
  5787. namespace,
  5788. slotScopeIds,
  5789. optimized
  5790. );
  5791. }
  5792. };
  5793. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5794. let el;
  5795. let vnodeHook;
  5796. const { props, shapeFlag, transition, dirs } = vnode;
  5797. el = vnode.el = hostCreateElement(
  5798. vnode.type,
  5799. namespace,
  5800. props && props.is,
  5801. props
  5802. );
  5803. if (shapeFlag & 8) {
  5804. hostSetElementText(el, vnode.children);
  5805. } else if (shapeFlag & 16) {
  5806. mountChildren(
  5807. vnode.children,
  5808. el,
  5809. null,
  5810. parentComponent,
  5811. parentSuspense,
  5812. resolveChildrenNamespace(vnode, namespace),
  5813. slotScopeIds,
  5814. optimized
  5815. );
  5816. }
  5817. if (dirs) {
  5818. invokeDirectiveHook(vnode, null, parentComponent, "created");
  5819. }
  5820. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  5821. if (props) {
  5822. for (const key in props) {
  5823. if (key !== "value" && !isReservedProp(key)) {
  5824. hostPatchProp(
  5825. el,
  5826. key,
  5827. null,
  5828. props[key],
  5829. namespace,
  5830. vnode.children,
  5831. parentComponent,
  5832. parentSuspense,
  5833. unmountChildren
  5834. );
  5835. }
  5836. }
  5837. if ("value" in props) {
  5838. hostPatchProp(el, "value", null, props.value, namespace);
  5839. }
  5840. if (vnodeHook = props.onVnodeBeforeMount) {
  5841. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5842. }
  5843. }
  5844. if (true) {
  5845. Object.defineProperty(el, "__vnode", {
  5846. value: vnode,
  5847. enumerable: false
  5848. });
  5849. Object.defineProperty(el, "__vueParentComponent", {
  5850. value: parentComponent,
  5851. enumerable: false
  5852. });
  5853. }
  5854. if (dirs) {
  5855. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  5856. }
  5857. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  5858. if (needCallTransitionHooks) {
  5859. transition.beforeEnter(el);
  5860. }
  5861. hostInsert(el, container, anchor);
  5862. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  5863. queuePostRenderEffect(() => {
  5864. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5865. needCallTransitionHooks && transition.enter(el);
  5866. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  5867. }, parentSuspense);
  5868. }
  5869. };
  5870. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  5871. if (scopeId) {
  5872. hostSetScopeId(el, scopeId);
  5873. }
  5874. if (slotScopeIds) {
  5875. for (let i = 0; i < slotScopeIds.length; i++) {
  5876. hostSetScopeId(el, slotScopeIds[i]);
  5877. }
  5878. }
  5879. if (parentComponent) {
  5880. let subTree = parentComponent.subTree;
  5881. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
  5882. subTree = filterSingleRoot(subTree.children) || subTree;
  5883. }
  5884. if (vnode === subTree) {
  5885. const parentVNode = parentComponent.vnode;
  5886. setScopeId(
  5887. el,
  5888. parentVNode,
  5889. parentVNode.scopeId,
  5890. parentVNode.slotScopeIds,
  5891. parentComponent.parent
  5892. );
  5893. }
  5894. }
  5895. };
  5896. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  5897. for (let i = start; i < children.length; i++) {
  5898. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  5899. patch(
  5900. null,
  5901. child,
  5902. container,
  5903. anchor,
  5904. parentComponent,
  5905. parentSuspense,
  5906. namespace,
  5907. slotScopeIds,
  5908. optimized
  5909. );
  5910. }
  5911. };
  5912. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5913. const el = n2.el = n1.el;
  5914. let { patchFlag, dynamicChildren, dirs } = n2;
  5915. patchFlag |= n1.patchFlag & 16;
  5916. const oldProps = n1.props || EMPTY_OBJ;
  5917. const newProps = n2.props || EMPTY_OBJ;
  5918. let vnodeHook;
  5919. parentComponent && toggleRecurse(parentComponent, false);
  5920. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  5921. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  5922. }
  5923. if (dirs) {
  5924. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  5925. }
  5926. parentComponent && toggleRecurse(parentComponent, true);
  5927. if (isHmrUpdating) {
  5928. patchFlag = 0;
  5929. optimized = false;
  5930. dynamicChildren = null;
  5931. }
  5932. if (dynamicChildren) {
  5933. patchBlockChildren(
  5934. n1.dynamicChildren,
  5935. dynamicChildren,
  5936. el,
  5937. parentComponent,
  5938. parentSuspense,
  5939. resolveChildrenNamespace(n2, namespace),
  5940. slotScopeIds
  5941. );
  5942. if (true) {
  5943. traverseStaticChildren(n1, n2);
  5944. }
  5945. } else if (!optimized) {
  5946. patchChildren(
  5947. n1,
  5948. n2,
  5949. el,
  5950. null,
  5951. parentComponent,
  5952. parentSuspense,
  5953. resolveChildrenNamespace(n2, namespace),
  5954. slotScopeIds,
  5955. false
  5956. );
  5957. }
  5958. if (patchFlag > 0) {
  5959. if (patchFlag & 16) {
  5960. patchProps(
  5961. el,
  5962. n2,
  5963. oldProps,
  5964. newProps,
  5965. parentComponent,
  5966. parentSuspense,
  5967. namespace
  5968. );
  5969. } else {
  5970. if (patchFlag & 2) {
  5971. if (oldProps.class !== newProps.class) {
  5972. hostPatchProp(el, "class", null, newProps.class, namespace);
  5973. }
  5974. }
  5975. if (patchFlag & 4) {
  5976. hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  5977. }
  5978. if (patchFlag & 8) {
  5979. const propsToUpdate = n2.dynamicProps;
  5980. for (let i = 0; i < propsToUpdate.length; i++) {
  5981. const key = propsToUpdate[i];
  5982. const prev = oldProps[key];
  5983. const next = newProps[key];
  5984. if (next !== prev || key === "value") {
  5985. hostPatchProp(
  5986. el,
  5987. key,
  5988. prev,
  5989. next,
  5990. namespace,
  5991. n1.children,
  5992. parentComponent,
  5993. parentSuspense,
  5994. unmountChildren
  5995. );
  5996. }
  5997. }
  5998. }
  5999. }
  6000. if (patchFlag & 1) {
  6001. if (n1.children !== n2.children) {
  6002. hostSetElementText(el, n2.children);
  6003. }
  6004. }
  6005. } else if (!optimized && dynamicChildren == null) {
  6006. patchProps(
  6007. el,
  6008. n2,
  6009. oldProps,
  6010. newProps,
  6011. parentComponent,
  6012. parentSuspense,
  6013. namespace
  6014. );
  6015. }
  6016. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  6017. queuePostRenderEffect(() => {
  6018. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  6019. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  6020. }, parentSuspense);
  6021. }
  6022. };
  6023. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  6024. for (let i = 0; i < newChildren.length; i++) {
  6025. const oldVNode = oldChildren[i];
  6026. const newVNode = newChildren[i];
  6027. const container = (
  6028. // oldVNode may be an errored async setup() component inside Suspense
  6029. // which will not have a mounted element
  6030. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  6031. // of the Fragment itself so it can move its children.
  6032. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  6033. // which also requires the correct parent container
  6034. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  6035. oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
  6036. // In other cases, the parent container is not actually used so we
  6037. // just pass the block element here to avoid a DOM parentNode call.
  6038. fallbackContainer
  6039. )
  6040. );
  6041. patch(
  6042. oldVNode,
  6043. newVNode,
  6044. container,
  6045. null,
  6046. parentComponent,
  6047. parentSuspense,
  6048. namespace,
  6049. slotScopeIds,
  6050. true
  6051. );
  6052. }
  6053. };
  6054. const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
  6055. if (oldProps !== newProps) {
  6056. if (oldProps !== EMPTY_OBJ) {
  6057. for (const key in oldProps) {
  6058. if (!isReservedProp(key) && !(key in newProps)) {
  6059. hostPatchProp(
  6060. el,
  6061. key,
  6062. oldProps[key],
  6063. null,
  6064. namespace,
  6065. vnode.children,
  6066. parentComponent,
  6067. parentSuspense,
  6068. unmountChildren
  6069. );
  6070. }
  6071. }
  6072. }
  6073. for (const key in newProps) {
  6074. if (isReservedProp(key))
  6075. continue;
  6076. const next = newProps[key];
  6077. const prev = oldProps[key];
  6078. if (next !== prev && key !== "value") {
  6079. hostPatchProp(
  6080. el,
  6081. key,
  6082. prev,
  6083. next,
  6084. namespace,
  6085. vnode.children,
  6086. parentComponent,
  6087. parentSuspense,
  6088. unmountChildren
  6089. );
  6090. }
  6091. }
  6092. if ("value" in newProps) {
  6093. hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  6094. }
  6095. }
  6096. };
  6097. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6098. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  6099. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  6100. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  6101. if (
  6102. // #5523 dev root fragment may inherit directives
  6103. isHmrUpdating || patchFlag & 2048
  6104. ) {
  6105. patchFlag = 0;
  6106. optimized = false;
  6107. dynamicChildren = null;
  6108. }
  6109. if (fragmentSlotScopeIds) {
  6110. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  6111. }
  6112. if (n1 == null) {
  6113. hostInsert(fragmentStartAnchor, container, anchor);
  6114. hostInsert(fragmentEndAnchor, container, anchor);
  6115. mountChildren(
  6116. // #10007
  6117. // such fragment like `<></>` will be compiled into
  6118. // a fragment which doesn't have a children.
  6119. // In this case fallback to an empty array
  6120. n2.children || [],
  6121. container,
  6122. fragmentEndAnchor,
  6123. parentComponent,
  6124. parentSuspense,
  6125. namespace,
  6126. slotScopeIds,
  6127. optimized
  6128. );
  6129. } else {
  6130. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  6131. // of renderSlot() with no valid children
  6132. n1.dynamicChildren) {
  6133. patchBlockChildren(
  6134. n1.dynamicChildren,
  6135. dynamicChildren,
  6136. container,
  6137. parentComponent,
  6138. parentSuspense,
  6139. namespace,
  6140. slotScopeIds
  6141. );
  6142. if (true) {
  6143. traverseStaticChildren(n1, n2);
  6144. } else if (
  6145. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  6146. // get moved around. Make sure all root level vnodes inherit el.
  6147. // #2134 or if it's a component root, it may also get moved around
  6148. // as the component is being moved.
  6149. n2.key != null || parentComponent && n2 === parentComponent.subTree
  6150. ) {
  6151. traverseStaticChildren(
  6152. n1,
  6153. n2,
  6154. true
  6155. /* shallow */
  6156. );
  6157. }
  6158. } else {
  6159. patchChildren(
  6160. n1,
  6161. n2,
  6162. container,
  6163. fragmentEndAnchor,
  6164. parentComponent,
  6165. parentSuspense,
  6166. namespace,
  6167. slotScopeIds,
  6168. optimized
  6169. );
  6170. }
  6171. }
  6172. };
  6173. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6174. n2.slotScopeIds = slotScopeIds;
  6175. if (n1 == null) {
  6176. if (n2.shapeFlag & 512) {
  6177. parentComponent.ctx.activate(
  6178. n2,
  6179. container,
  6180. anchor,
  6181. namespace,
  6182. optimized
  6183. );
  6184. } else {
  6185. mountComponent(
  6186. n2,
  6187. container,
  6188. anchor,
  6189. parentComponent,
  6190. parentSuspense,
  6191. namespace,
  6192. optimized
  6193. );
  6194. }
  6195. } else {
  6196. updateComponent(n1, n2, optimized);
  6197. }
  6198. };
  6199. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  6200. const instance = initialVNode.component = createComponentInstance(
  6201. initialVNode,
  6202. parentComponent,
  6203. parentSuspense
  6204. );
  6205. if (instance.type.__hmrId) {
  6206. registerHMR(instance);
  6207. }
  6208. if (true) {
  6209. pushWarningContext(initialVNode);
  6210. startMeasure(instance, `mount`);
  6211. }
  6212. if (isKeepAlive(initialVNode)) {
  6213. instance.ctx.renderer = internals;
  6214. }
  6215. {
  6216. if (true) {
  6217. startMeasure(instance, `init`);
  6218. }
  6219. setupComponent(instance);
  6220. if (true) {
  6221. endMeasure(instance, `init`);
  6222. }
  6223. }
  6224. if (instance.asyncDep) {
  6225. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
  6226. if (!initialVNode.el) {
  6227. const placeholder = instance.subTree = createVNode(Comment);
  6228. processCommentNode(null, placeholder, container, anchor);
  6229. }
  6230. } else {
  6231. setupRenderEffect(
  6232. instance,
  6233. initialVNode,
  6234. container,
  6235. anchor,
  6236. parentSuspense,
  6237. namespace,
  6238. optimized
  6239. );
  6240. }
  6241. if (true) {
  6242. popWarningContext();
  6243. endMeasure(instance, `mount`);
  6244. }
  6245. };
  6246. const updateComponent = (n1, n2, optimized) => {
  6247. const instance = n2.component = n1.component;
  6248. if (shouldUpdateComponent(n1, n2, optimized)) {
  6249. if (instance.asyncDep && !instance.asyncResolved) {
  6250. if (true) {
  6251. pushWarningContext(n2);
  6252. }
  6253. updateComponentPreRender(instance, n2, optimized);
  6254. if (true) {
  6255. popWarningContext();
  6256. }
  6257. return;
  6258. } else {
  6259. instance.next = n2;
  6260. invalidateJob(instance.update);
  6261. instance.effect.dirty = true;
  6262. instance.update();
  6263. }
  6264. } else {
  6265. n2.el = n1.el;
  6266. instance.vnode = n2;
  6267. }
  6268. };
  6269. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  6270. const componentUpdateFn = () => {
  6271. if (!instance.isMounted) {
  6272. let vnodeHook;
  6273. const { el, props } = initialVNode;
  6274. const { bm, m, parent } = instance;
  6275. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  6276. toggleRecurse(instance, false);
  6277. if (bm) {
  6278. invokeArrayFns(bm);
  6279. }
  6280. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  6281. invokeVNodeHook(vnodeHook, parent, initialVNode);
  6282. }
  6283. toggleRecurse(instance, true);
  6284. if (el && hydrateNode) {
  6285. const hydrateSubTree = () => {
  6286. if (true) {
  6287. startMeasure(instance, `render`);
  6288. }
  6289. instance.subTree = renderComponentRoot(instance);
  6290. if (true) {
  6291. endMeasure(instance, `render`);
  6292. }
  6293. if (true) {
  6294. startMeasure(instance, `hydrate`);
  6295. }
  6296. hydrateNode(
  6297. el,
  6298. instance.subTree,
  6299. instance,
  6300. parentSuspense,
  6301. null
  6302. );
  6303. if (true) {
  6304. endMeasure(instance, `hydrate`);
  6305. }
  6306. };
  6307. if (isAsyncWrapperVNode) {
  6308. initialVNode.type.__asyncLoader().then(
  6309. // note: we are moving the render call into an async callback,
  6310. // which means it won't track dependencies - but it's ok because
  6311. // a server-rendered async wrapper is already in resolved state
  6312. // and it will never need to change.
  6313. () => !instance.isUnmounted && hydrateSubTree()
  6314. );
  6315. } else {
  6316. hydrateSubTree();
  6317. }
  6318. } else {
  6319. if (true) {
  6320. startMeasure(instance, `render`);
  6321. }
  6322. const subTree = instance.subTree = renderComponentRoot(instance);
  6323. if (true) {
  6324. endMeasure(instance, `render`);
  6325. }
  6326. if (true) {
  6327. startMeasure(instance, `patch`);
  6328. }
  6329. patch(
  6330. null,
  6331. subTree,
  6332. container,
  6333. anchor,
  6334. instance,
  6335. parentSuspense,
  6336. namespace
  6337. );
  6338. if (true) {
  6339. endMeasure(instance, `patch`);
  6340. }
  6341. initialVNode.el = subTree.el;
  6342. }
  6343. if (m) {
  6344. queuePostRenderEffect(m, parentSuspense);
  6345. }
  6346. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  6347. const scopedInitialVNode = initialVNode;
  6348. queuePostRenderEffect(
  6349. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  6350. parentSuspense
  6351. );
  6352. }
  6353. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  6354. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  6355. }
  6356. instance.isMounted = true;
  6357. if (true) {
  6358. devtoolsComponentAdded(instance);
  6359. }
  6360. initialVNode = container = anchor = null;
  6361. } else {
  6362. let { next, bu, u, parent, vnode } = instance;
  6363. {
  6364. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  6365. if (nonHydratedAsyncRoot) {
  6366. if (next) {
  6367. next.el = vnode.el;
  6368. updateComponentPreRender(instance, next, optimized);
  6369. }
  6370. nonHydratedAsyncRoot.asyncDep.then(() => {
  6371. if (!instance.isUnmounted) {
  6372. componentUpdateFn();
  6373. }
  6374. });
  6375. return;
  6376. }
  6377. }
  6378. let originNext = next;
  6379. let vnodeHook;
  6380. if (true) {
  6381. pushWarningContext(next || instance.vnode);
  6382. }
  6383. toggleRecurse(instance, false);
  6384. if (next) {
  6385. next.el = vnode.el;
  6386. updateComponentPreRender(instance, next, optimized);
  6387. } else {
  6388. next = vnode;
  6389. }
  6390. if (bu) {
  6391. invokeArrayFns(bu);
  6392. }
  6393. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  6394. invokeVNodeHook(vnodeHook, parent, next, vnode);
  6395. }
  6396. toggleRecurse(instance, true);
  6397. if (true) {
  6398. startMeasure(instance, `render`);
  6399. }
  6400. const nextTree = renderComponentRoot(instance);
  6401. if (true) {
  6402. endMeasure(instance, `render`);
  6403. }
  6404. const prevTree = instance.subTree;
  6405. instance.subTree = nextTree;
  6406. if (true) {
  6407. startMeasure(instance, `patch`);
  6408. }
  6409. patch(
  6410. prevTree,
  6411. nextTree,
  6412. // parent may have changed if it's in a teleport
  6413. hostParentNode(prevTree.el),
  6414. // anchor may have changed if it's in a fragment
  6415. getNextHostNode(prevTree),
  6416. instance,
  6417. parentSuspense,
  6418. namespace
  6419. );
  6420. if (true) {
  6421. endMeasure(instance, `patch`);
  6422. }
  6423. next.el = nextTree.el;
  6424. if (originNext === null) {
  6425. updateHOCHostEl(instance, nextTree.el);
  6426. }
  6427. if (u) {
  6428. queuePostRenderEffect(u, parentSuspense);
  6429. }
  6430. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  6431. queuePostRenderEffect(
  6432. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  6433. parentSuspense
  6434. );
  6435. }
  6436. if (true) {
  6437. devtoolsComponentUpdated(instance);
  6438. }
  6439. if (true) {
  6440. popWarningContext();
  6441. }
  6442. }
  6443. };
  6444. const effect2 = instance.effect = new ReactiveEffect(
  6445. componentUpdateFn,
  6446. NOOP,
  6447. () => queueJob(update),
  6448. instance.scope
  6449. // track it in component's effect scope
  6450. );
  6451. const update = instance.update = () => {
  6452. if (effect2.dirty) {
  6453. effect2.run();
  6454. }
  6455. };
  6456. update.id = instance.uid;
  6457. toggleRecurse(instance, true);
  6458. if (true) {
  6459. effect2.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  6460. effect2.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  6461. update.ownerInstance = instance;
  6462. }
  6463. update();
  6464. };
  6465. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  6466. nextVNode.component = instance;
  6467. const prevProps = instance.vnode.props;
  6468. instance.vnode = nextVNode;
  6469. instance.next = null;
  6470. updateProps(instance, nextVNode.props, prevProps, optimized);
  6471. updateSlots(instance, nextVNode.children, optimized);
  6472. pauseTracking();
  6473. flushPreFlushCbs(instance);
  6474. resetTracking();
  6475. };
  6476. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  6477. const c1 = n1 && n1.children;
  6478. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  6479. const c2 = n2.children;
  6480. const { patchFlag, shapeFlag } = n2;
  6481. if (patchFlag > 0) {
  6482. if (patchFlag & 128) {
  6483. patchKeyedChildren(
  6484. c1,
  6485. c2,
  6486. container,
  6487. anchor,
  6488. parentComponent,
  6489. parentSuspense,
  6490. namespace,
  6491. slotScopeIds,
  6492. optimized
  6493. );
  6494. return;
  6495. } else if (patchFlag & 256) {
  6496. patchUnkeyedChildren(
  6497. c1,
  6498. c2,
  6499. container,
  6500. anchor,
  6501. parentComponent,
  6502. parentSuspense,
  6503. namespace,
  6504. slotScopeIds,
  6505. optimized
  6506. );
  6507. return;
  6508. }
  6509. }
  6510. if (shapeFlag & 8) {
  6511. if (prevShapeFlag & 16) {
  6512. unmountChildren(c1, parentComponent, parentSuspense);
  6513. }
  6514. if (c2 !== c1) {
  6515. hostSetElementText(container, c2);
  6516. }
  6517. } else {
  6518. if (prevShapeFlag & 16) {
  6519. if (shapeFlag & 16) {
  6520. patchKeyedChildren(
  6521. c1,
  6522. c2,
  6523. container,
  6524. anchor,
  6525. parentComponent,
  6526. parentSuspense,
  6527. namespace,
  6528. slotScopeIds,
  6529. optimized
  6530. );
  6531. } else {
  6532. unmountChildren(c1, parentComponent, parentSuspense, true);
  6533. }
  6534. } else {
  6535. if (prevShapeFlag & 8) {
  6536. hostSetElementText(container, "");
  6537. }
  6538. if (shapeFlag & 16) {
  6539. mountChildren(
  6540. c2,
  6541. container,
  6542. anchor,
  6543. parentComponent,
  6544. parentSuspense,
  6545. namespace,
  6546. slotScopeIds,
  6547. optimized
  6548. );
  6549. }
  6550. }
  6551. }
  6552. };
  6553. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6554. c1 = c1 || EMPTY_ARR;
  6555. c2 = c2 || EMPTY_ARR;
  6556. const oldLength = c1.length;
  6557. const newLength = c2.length;
  6558. const commonLength = Math.min(oldLength, newLength);
  6559. let i;
  6560. for (i = 0; i < commonLength; i++) {
  6561. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  6562. patch(
  6563. c1[i],
  6564. nextChild,
  6565. container,
  6566. null,
  6567. parentComponent,
  6568. parentSuspense,
  6569. namespace,
  6570. slotScopeIds,
  6571. optimized
  6572. );
  6573. }
  6574. if (oldLength > newLength) {
  6575. unmountChildren(
  6576. c1,
  6577. parentComponent,
  6578. parentSuspense,
  6579. true,
  6580. false,
  6581. commonLength
  6582. );
  6583. } else {
  6584. mountChildren(
  6585. c2,
  6586. container,
  6587. anchor,
  6588. parentComponent,
  6589. parentSuspense,
  6590. namespace,
  6591. slotScopeIds,
  6592. optimized,
  6593. commonLength
  6594. );
  6595. }
  6596. };
  6597. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6598. let i = 0;
  6599. const l2 = c2.length;
  6600. let e1 = c1.length - 1;
  6601. let e2 = l2 - 1;
  6602. while (i <= e1 && i <= e2) {
  6603. const n1 = c1[i];
  6604. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  6605. if (isSameVNodeType(n1, n2)) {
  6606. patch(
  6607. n1,
  6608. n2,
  6609. container,
  6610. null,
  6611. parentComponent,
  6612. parentSuspense,
  6613. namespace,
  6614. slotScopeIds,
  6615. optimized
  6616. );
  6617. } else {
  6618. break;
  6619. }
  6620. i++;
  6621. }
  6622. while (i <= e1 && i <= e2) {
  6623. const n1 = c1[e1];
  6624. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  6625. if (isSameVNodeType(n1, n2)) {
  6626. patch(
  6627. n1,
  6628. n2,
  6629. container,
  6630. null,
  6631. parentComponent,
  6632. parentSuspense,
  6633. namespace,
  6634. slotScopeIds,
  6635. optimized
  6636. );
  6637. } else {
  6638. break;
  6639. }
  6640. e1--;
  6641. e2--;
  6642. }
  6643. if (i > e1) {
  6644. if (i <= e2) {
  6645. const nextPos = e2 + 1;
  6646. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  6647. while (i <= e2) {
  6648. patch(
  6649. null,
  6650. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  6651. container,
  6652. anchor,
  6653. parentComponent,
  6654. parentSuspense,
  6655. namespace,
  6656. slotScopeIds,
  6657. optimized
  6658. );
  6659. i++;
  6660. }
  6661. }
  6662. } else if (i > e2) {
  6663. while (i <= e1) {
  6664. unmount(c1[i], parentComponent, parentSuspense, true);
  6665. i++;
  6666. }
  6667. } else {
  6668. const s1 = i;
  6669. const s2 = i;
  6670. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  6671. for (i = s2; i <= e2; i++) {
  6672. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  6673. if (nextChild.key != null) {
  6674. if (keyToNewIndexMap.has(nextChild.key)) {
  6675. warn$1(
  6676. `Duplicate keys found during update:`,
  6677. JSON.stringify(nextChild.key),
  6678. `Make sure keys are unique.`
  6679. );
  6680. }
  6681. keyToNewIndexMap.set(nextChild.key, i);
  6682. }
  6683. }
  6684. let j;
  6685. let patched = 0;
  6686. const toBePatched = e2 - s2 + 1;
  6687. let moved = false;
  6688. let maxNewIndexSoFar = 0;
  6689. const newIndexToOldIndexMap = new Array(toBePatched);
  6690. for (i = 0; i < toBePatched; i++)
  6691. newIndexToOldIndexMap[i] = 0;
  6692. for (i = s1; i <= e1; i++) {
  6693. const prevChild = c1[i];
  6694. if (patched >= toBePatched) {
  6695. unmount(prevChild, parentComponent, parentSuspense, true);
  6696. continue;
  6697. }
  6698. let newIndex;
  6699. if (prevChild.key != null) {
  6700. newIndex = keyToNewIndexMap.get(prevChild.key);
  6701. } else {
  6702. for (j = s2; j <= e2; j++) {
  6703. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  6704. newIndex = j;
  6705. break;
  6706. }
  6707. }
  6708. }
  6709. if (newIndex === void 0) {
  6710. unmount(prevChild, parentComponent, parentSuspense, true);
  6711. } else {
  6712. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  6713. if (newIndex >= maxNewIndexSoFar) {
  6714. maxNewIndexSoFar = newIndex;
  6715. } else {
  6716. moved = true;
  6717. }
  6718. patch(
  6719. prevChild,
  6720. c2[newIndex],
  6721. container,
  6722. null,
  6723. parentComponent,
  6724. parentSuspense,
  6725. namespace,
  6726. slotScopeIds,
  6727. optimized
  6728. );
  6729. patched++;
  6730. }
  6731. }
  6732. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  6733. j = increasingNewIndexSequence.length - 1;
  6734. for (i = toBePatched - 1; i >= 0; i--) {
  6735. const nextIndex = s2 + i;
  6736. const nextChild = c2[nextIndex];
  6737. const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
  6738. if (newIndexToOldIndexMap[i] === 0) {
  6739. patch(
  6740. null,
  6741. nextChild,
  6742. container,
  6743. anchor,
  6744. parentComponent,
  6745. parentSuspense,
  6746. namespace,
  6747. slotScopeIds,
  6748. optimized
  6749. );
  6750. } else if (moved) {
  6751. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  6752. move(nextChild, container, anchor, 2);
  6753. } else {
  6754. j--;
  6755. }
  6756. }
  6757. }
  6758. }
  6759. };
  6760. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  6761. const { el, type, transition, children, shapeFlag } = vnode;
  6762. if (shapeFlag & 6) {
  6763. move(vnode.component.subTree, container, anchor, moveType);
  6764. return;
  6765. }
  6766. if (shapeFlag & 128) {
  6767. vnode.suspense.move(container, anchor, moveType);
  6768. return;
  6769. }
  6770. if (shapeFlag & 64) {
  6771. type.move(vnode, container, anchor, internals);
  6772. return;
  6773. }
  6774. if (type === Fragment) {
  6775. hostInsert(el, container, anchor);
  6776. for (let i = 0; i < children.length; i++) {
  6777. move(children[i], container, anchor, moveType);
  6778. }
  6779. hostInsert(vnode.anchor, container, anchor);
  6780. return;
  6781. }
  6782. if (type === Static) {
  6783. moveStaticNode(vnode, container, anchor);
  6784. return;
  6785. }
  6786. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  6787. if (needTransition2) {
  6788. if (moveType === 0) {
  6789. transition.beforeEnter(el);
  6790. hostInsert(el, container, anchor);
  6791. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  6792. } else {
  6793. const { leave, delayLeave, afterLeave } = transition;
  6794. const remove22 = () => hostInsert(el, container, anchor);
  6795. const performLeave = () => {
  6796. leave(el, () => {
  6797. remove22();
  6798. afterLeave && afterLeave();
  6799. });
  6800. };
  6801. if (delayLeave) {
  6802. delayLeave(el, remove22, performLeave);
  6803. } else {
  6804. performLeave();
  6805. }
  6806. }
  6807. } else {
  6808. hostInsert(el, container, anchor);
  6809. }
  6810. };
  6811. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  6812. const {
  6813. type,
  6814. props,
  6815. ref: ref2,
  6816. children,
  6817. dynamicChildren,
  6818. shapeFlag,
  6819. patchFlag,
  6820. dirs
  6821. } = vnode;
  6822. if (ref2 != null) {
  6823. setRef(ref2, null, parentSuspense, vnode, true);
  6824. }
  6825. if (shapeFlag & 256) {
  6826. parentComponent.ctx.deactivate(vnode);
  6827. return;
  6828. }
  6829. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  6830. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  6831. let vnodeHook;
  6832. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  6833. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6834. }
  6835. if (shapeFlag & 6) {
  6836. unmountComponent(vnode.component, parentSuspense, doRemove);
  6837. } else {
  6838. if (shapeFlag & 128) {
  6839. vnode.suspense.unmount(parentSuspense, doRemove);
  6840. return;
  6841. }
  6842. if (shouldInvokeDirs) {
  6843. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  6844. }
  6845. if (shapeFlag & 64) {
  6846. vnode.type.remove(
  6847. vnode,
  6848. parentComponent,
  6849. parentSuspense,
  6850. optimized,
  6851. internals,
  6852. doRemove
  6853. );
  6854. } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
  6855. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  6856. unmountChildren(
  6857. dynamicChildren,
  6858. parentComponent,
  6859. parentSuspense,
  6860. false,
  6861. true
  6862. );
  6863. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  6864. unmountChildren(children, parentComponent, parentSuspense);
  6865. }
  6866. if (doRemove) {
  6867. remove2(vnode);
  6868. }
  6869. }
  6870. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  6871. queuePostRenderEffect(() => {
  6872. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6873. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  6874. }, parentSuspense);
  6875. }
  6876. };
  6877. const remove2 = (vnode) => {
  6878. const { type, el, anchor, transition } = vnode;
  6879. if (type === Fragment) {
  6880. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
  6881. vnode.children.forEach((child) => {
  6882. if (child.type === Comment) {
  6883. hostRemove(child.el);
  6884. } else {
  6885. remove2(child);
  6886. }
  6887. });
  6888. } else {
  6889. removeFragment(el, anchor);
  6890. }
  6891. return;
  6892. }
  6893. if (type === Static) {
  6894. removeStaticNode(vnode);
  6895. return;
  6896. }
  6897. const performRemove = () => {
  6898. hostRemove(el);
  6899. if (transition && !transition.persisted && transition.afterLeave) {
  6900. transition.afterLeave();
  6901. }
  6902. };
  6903. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  6904. const { leave, delayLeave } = transition;
  6905. const performLeave = () => leave(el, performRemove);
  6906. if (delayLeave) {
  6907. delayLeave(vnode.el, performRemove, performLeave);
  6908. } else {
  6909. performLeave();
  6910. }
  6911. } else {
  6912. performRemove();
  6913. }
  6914. };
  6915. const removeFragment = (cur, end) => {
  6916. let next;
  6917. while (cur !== end) {
  6918. next = hostNextSibling(cur);
  6919. hostRemove(cur);
  6920. cur = next;
  6921. }
  6922. hostRemove(end);
  6923. };
  6924. const unmountComponent = (instance, parentSuspense, doRemove) => {
  6925. if (instance.type.__hmrId) {
  6926. unregisterHMR(instance);
  6927. }
  6928. const { bum, scope, update, subTree, um } = instance;
  6929. if (bum) {
  6930. invokeArrayFns(bum);
  6931. }
  6932. scope.stop();
  6933. if (update) {
  6934. update.active = false;
  6935. unmount(subTree, instance, parentSuspense, doRemove);
  6936. }
  6937. if (um) {
  6938. queuePostRenderEffect(um, parentSuspense);
  6939. }
  6940. queuePostRenderEffect(() => {
  6941. instance.isUnmounted = true;
  6942. }, parentSuspense);
  6943. if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
  6944. parentSuspense.deps--;
  6945. if (parentSuspense.deps === 0) {
  6946. parentSuspense.resolve();
  6947. }
  6948. }
  6949. if (true) {
  6950. devtoolsComponentRemoved(instance);
  6951. }
  6952. };
  6953. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  6954. for (let i = start; i < children.length; i++) {
  6955. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  6956. }
  6957. };
  6958. const getNextHostNode = (vnode) => {
  6959. if (vnode.shapeFlag & 6) {
  6960. return getNextHostNode(vnode.component.subTree);
  6961. }
  6962. if (vnode.shapeFlag & 128) {
  6963. return vnode.suspense.next();
  6964. }
  6965. return hostNextSibling(vnode.anchor || vnode.el);
  6966. };
  6967. let isFlushing2 = false;
  6968. const render = (vnode, container, namespace) => {
  6969. if (vnode == null) {
  6970. if (container._vnode) {
  6971. unmount(container._vnode, null, null, true);
  6972. }
  6973. } else {
  6974. patch(
  6975. container._vnode || null,
  6976. vnode,
  6977. container,
  6978. null,
  6979. null,
  6980. null,
  6981. namespace
  6982. );
  6983. }
  6984. if (!isFlushing2) {
  6985. isFlushing2 = true;
  6986. flushPreFlushCbs();
  6987. flushPostFlushCbs();
  6988. isFlushing2 = false;
  6989. }
  6990. container._vnode = vnode;
  6991. };
  6992. const internals = {
  6993. p: patch,
  6994. um: unmount,
  6995. m: move,
  6996. r: remove2,
  6997. mt: mountComponent,
  6998. mc: mountChildren,
  6999. pc: patchChildren,
  7000. pbc: patchBlockChildren,
  7001. n: getNextHostNode,
  7002. o: options
  7003. };
  7004. let hydrate;
  7005. let hydrateNode;
  7006. if (createHydrationFns) {
  7007. [hydrate, hydrateNode] = createHydrationFns(
  7008. internals
  7009. );
  7010. }
  7011. return {
  7012. render,
  7013. hydrate,
  7014. createApp: createAppAPI(render, hydrate)
  7015. };
  7016. }
  7017. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  7018. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  7019. }
  7020. function toggleRecurse({ effect: effect2, update }, allowed) {
  7021. effect2.allowRecurse = update.allowRecurse = allowed;
  7022. }
  7023. function needTransition(parentSuspense, transition) {
  7024. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  7025. }
  7026. function traverseStaticChildren(n1, n2, shallow = false) {
  7027. const ch1 = n1.children;
  7028. const ch2 = n2.children;
  7029. if (isArray(ch1) && isArray(ch2)) {
  7030. for (let i = 0; i < ch1.length; i++) {
  7031. const c1 = ch1[i];
  7032. let c2 = ch2[i];
  7033. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  7034. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  7035. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  7036. c2.el = c1.el;
  7037. }
  7038. if (!shallow)
  7039. traverseStaticChildren(c1, c2);
  7040. }
  7041. if (c2.type === Text) {
  7042. c2.el = c1.el;
  7043. }
  7044. if (c2.type === Comment && !c2.el) {
  7045. c2.el = c1.el;
  7046. }
  7047. }
  7048. }
  7049. }
  7050. function getSequence(arr) {
  7051. const p = arr.slice();
  7052. const result = [0];
  7053. let i, j, u, v, c;
  7054. const len = arr.length;
  7055. for (i = 0; i < len; i++) {
  7056. const arrI = arr[i];
  7057. if (arrI !== 0) {
  7058. j = result[result.length - 1];
  7059. if (arr[j] < arrI) {
  7060. p[i] = j;
  7061. result.push(i);
  7062. continue;
  7063. }
  7064. u = 0;
  7065. v = result.length - 1;
  7066. while (u < v) {
  7067. c = u + v >> 1;
  7068. if (arr[result[c]] < arrI) {
  7069. u = c + 1;
  7070. } else {
  7071. v = c;
  7072. }
  7073. }
  7074. if (arrI < arr[result[u]]) {
  7075. if (u > 0) {
  7076. p[i] = result[u - 1];
  7077. }
  7078. result[u] = i;
  7079. }
  7080. }
  7081. }
  7082. u = result.length;
  7083. v = result[u - 1];
  7084. while (u-- > 0) {
  7085. result[u] = v;
  7086. v = p[v];
  7087. }
  7088. return result;
  7089. }
  7090. function locateNonHydratedAsyncRoot(instance) {
  7091. const subComponent = instance.subTree.component;
  7092. if (subComponent) {
  7093. if (subComponent.asyncDep && !subComponent.asyncResolved) {
  7094. return subComponent;
  7095. } else {
  7096. return locateNonHydratedAsyncRoot(subComponent);
  7097. }
  7098. }
  7099. }
  7100. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  7101. if (moveType === 0) {
  7102. insert(vnode.targetAnchor, container, parentAnchor);
  7103. }
  7104. const { el, anchor, shapeFlag, children, props } = vnode;
  7105. const isReorder = moveType === 2;
  7106. if (isReorder) {
  7107. insert(el, container, parentAnchor);
  7108. }
  7109. if (!isReorder || isTeleportDisabled(props)) {
  7110. if (shapeFlag & 16) {
  7111. for (let i = 0; i < children.length; i++) {
  7112. move(
  7113. children[i],
  7114. container,
  7115. parentAnchor,
  7116. 2
  7117. );
  7118. }
  7119. }
  7120. }
  7121. if (isReorder) {
  7122. insert(anchor, container, parentAnchor);
  7123. }
  7124. }
  7125. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  7126. o: { nextSibling, parentNode, querySelector }
  7127. }, hydrateChildren) {
  7128. const target = vnode.target = resolveTarget(
  7129. vnode.props,
  7130. querySelector
  7131. );
  7132. if (target) {
  7133. const targetNode = target._lpa || target.firstChild;
  7134. if (vnode.shapeFlag & 16) {
  7135. if (isTeleportDisabled(vnode.props)) {
  7136. vnode.anchor = hydrateChildren(
  7137. nextSibling(node),
  7138. vnode,
  7139. parentNode(node),
  7140. parentComponent,
  7141. parentSuspense,
  7142. slotScopeIds,
  7143. optimized
  7144. );
  7145. vnode.targetAnchor = targetNode;
  7146. } else {
  7147. vnode.anchor = nextSibling(node);
  7148. let targetAnchor = targetNode;
  7149. while (targetAnchor) {
  7150. targetAnchor = nextSibling(targetAnchor);
  7151. if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
  7152. vnode.targetAnchor = targetAnchor;
  7153. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  7154. break;
  7155. }
  7156. }
  7157. hydrateChildren(
  7158. targetNode,
  7159. vnode,
  7160. target,
  7161. parentComponent,
  7162. parentSuspense,
  7163. slotScopeIds,
  7164. optimized
  7165. );
  7166. }
  7167. }
  7168. updateCssVars(vnode);
  7169. }
  7170. return vnode.anchor && nextSibling(vnode.anchor);
  7171. }
  7172. function updateCssVars(vnode) {
  7173. const ctx = vnode.ctx;
  7174. if (ctx && ctx.ut) {
  7175. let node = vnode.children[0].el;
  7176. while (node && node !== vnode.targetAnchor) {
  7177. if (node.nodeType === 1)
  7178. node.setAttribute("data-v-owner", ctx.uid);
  7179. node = node.nextSibling;
  7180. }
  7181. ctx.ut();
  7182. }
  7183. }
  7184. function openBlock(disableTracking = false) {
  7185. blockStack.push(currentBlock = disableTracking ? null : []);
  7186. }
  7187. function closeBlock() {
  7188. blockStack.pop();
  7189. currentBlock = blockStack[blockStack.length - 1] || null;
  7190. }
  7191. function setBlockTracking(value) {
  7192. isBlockTreeEnabled += value;
  7193. }
  7194. function setupBlock(vnode) {
  7195. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  7196. closeBlock();
  7197. if (isBlockTreeEnabled > 0 && currentBlock) {
  7198. currentBlock.push(vnode);
  7199. }
  7200. return vnode;
  7201. }
  7202. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  7203. return setupBlock(
  7204. createBaseVNode(
  7205. type,
  7206. props,
  7207. children,
  7208. patchFlag,
  7209. dynamicProps,
  7210. shapeFlag,
  7211. true
  7212. )
  7213. );
  7214. }
  7215. function createBlock(type, props, children, patchFlag, dynamicProps) {
  7216. return setupBlock(
  7217. createVNode(
  7218. type,
  7219. props,
  7220. children,
  7221. patchFlag,
  7222. dynamicProps,
  7223. true
  7224. )
  7225. );
  7226. }
  7227. function isVNode(value) {
  7228. return value ? value.__v_isVNode === true : false;
  7229. }
  7230. function isSameVNodeType(n1, n2) {
  7231. if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) {
  7232. n1.shapeFlag &= ~256;
  7233. n2.shapeFlag &= ~512;
  7234. return false;
  7235. }
  7236. return n1.type === n2.type && n1.key === n2.key;
  7237. }
  7238. function transformVNodeArgs(transformer) {
  7239. vnodeArgsTransformer = transformer;
  7240. }
  7241. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  7242. const vnode = {
  7243. __v_isVNode: true,
  7244. __v_skip: true,
  7245. type,
  7246. props,
  7247. key: props && normalizeKey(props),
  7248. ref: props && normalizeRef(props),
  7249. scopeId: currentScopeId,
  7250. slotScopeIds: null,
  7251. children,
  7252. component: null,
  7253. suspense: null,
  7254. ssContent: null,
  7255. ssFallback: null,
  7256. dirs: null,
  7257. transition: null,
  7258. el: null,
  7259. anchor: null,
  7260. target: null,
  7261. targetAnchor: null,
  7262. staticCount: 0,
  7263. shapeFlag,
  7264. patchFlag,
  7265. dynamicProps,
  7266. dynamicChildren: null,
  7267. appContext: null,
  7268. ctx: currentRenderingInstance
  7269. };
  7270. if (needFullChildrenNormalization) {
  7271. normalizeChildren(vnode, children);
  7272. if (shapeFlag & 128) {
  7273. type.normalize(vnode);
  7274. }
  7275. } else if (children) {
  7276. vnode.shapeFlag |= isString(children) ? 8 : 16;
  7277. }
  7278. if (vnode.key !== vnode.key) {
  7279. warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  7280. }
  7281. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  7282. !isBlockNode && // has current parent block
  7283. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  7284. // component nodes also should always be patched, because even if the
  7285. // component doesn't need to update, it needs to persist the instance on to
  7286. // the next vnode so that it can be properly unmounted later.
  7287. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  7288. // vnode should not be considered dynamic due to handler caching.
  7289. vnode.patchFlag !== 32) {
  7290. currentBlock.push(vnode);
  7291. }
  7292. return vnode;
  7293. }
  7294. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  7295. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  7296. if (!type) {
  7297. warn$1(`Invalid vnode type when creating vnode: ${type}.`);
  7298. }
  7299. type = Comment;
  7300. }
  7301. if (isVNode(type)) {
  7302. const cloned = cloneVNode(
  7303. type,
  7304. props,
  7305. true
  7306. /* mergeRef: true */
  7307. );
  7308. if (children) {
  7309. normalizeChildren(cloned, children);
  7310. }
  7311. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  7312. if (cloned.shapeFlag & 6) {
  7313. currentBlock[currentBlock.indexOf(type)] = cloned;
  7314. } else {
  7315. currentBlock.push(cloned);
  7316. }
  7317. }
  7318. cloned.patchFlag |= -2;
  7319. return cloned;
  7320. }
  7321. if (isClassComponent(type)) {
  7322. type = type.__vccOpts;
  7323. }
  7324. if (props) {
  7325. props = guardReactiveProps(props);
  7326. let { class: klass, style } = props;
  7327. if (klass && !isString(klass)) {
  7328. props.class = normalizeClass(klass);
  7329. }
  7330. if (isObject(style)) {
  7331. if (isProxy(style) && !isArray(style)) {
  7332. style = extend({}, style);
  7333. }
  7334. props.style = normalizeStyle(style);
  7335. }
  7336. }
  7337. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  7338. if (shapeFlag & 4 && isProxy(type)) {
  7339. type = toRaw(type);
  7340. warn$1(
  7341. `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\`.`,
  7342. `
  7343. Component that was made reactive: `,
  7344. type
  7345. );
  7346. }
  7347. return createBaseVNode(
  7348. type,
  7349. props,
  7350. children,
  7351. patchFlag,
  7352. dynamicProps,
  7353. shapeFlag,
  7354. isBlockNode,
  7355. true
  7356. );
  7357. }
  7358. function guardReactiveProps(props) {
  7359. if (!props)
  7360. return null;
  7361. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  7362. }
  7363. function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
  7364. const { props, ref: ref2, patchFlag, children, transition } = vnode;
  7365. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  7366. const cloned = {
  7367. __v_isVNode: true,
  7368. __v_skip: true,
  7369. type: vnode.type,
  7370. props: mergedProps,
  7371. key: mergedProps && normalizeKey(mergedProps),
  7372. ref: extraProps && extraProps.ref ? (
  7373. // #2078 in the case of <component :is="vnode" ref="extra"/>
  7374. // if the vnode itself already has a ref, cloneVNode will need to merge
  7375. // the refs so the single vnode can be set on multiple refs
  7376. mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  7377. ) : ref2,
  7378. scopeId: vnode.scopeId,
  7379. slotScopeIds: vnode.slotScopeIds,
  7380. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  7381. target: vnode.target,
  7382. targetAnchor: vnode.targetAnchor,
  7383. staticCount: vnode.staticCount,
  7384. shapeFlag: vnode.shapeFlag,
  7385. // if the vnode is cloned with extra props, we can no longer assume its
  7386. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  7387. // note: preserve flag for fragments since they use the flag for children
  7388. // fast paths only.
  7389. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  7390. dynamicProps: vnode.dynamicProps,
  7391. dynamicChildren: vnode.dynamicChildren,
  7392. appContext: vnode.appContext,
  7393. dirs: vnode.dirs,
  7394. transition,
  7395. // These should technically only be non-null on mounted VNodes. However,
  7396. // they *should* be copied for kept-alive vnodes. So we just always copy
  7397. // them since them being non-null during a mount doesn't affect the logic as
  7398. // they will simply be overwritten.
  7399. component: vnode.component,
  7400. suspense: vnode.suspense,
  7401. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  7402. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  7403. el: vnode.el,
  7404. anchor: vnode.anchor,
  7405. ctx: vnode.ctx,
  7406. ce: vnode.ce
  7407. };
  7408. if (transition && cloneTransition) {
  7409. cloned.transition = transition.clone(cloned);
  7410. }
  7411. return cloned;
  7412. }
  7413. function deepCloneVNode(vnode) {
  7414. const cloned = cloneVNode(vnode);
  7415. if (isArray(vnode.children)) {
  7416. cloned.children = vnode.children.map(deepCloneVNode);
  7417. }
  7418. return cloned;
  7419. }
  7420. function createTextVNode(text = " ", flag = 0) {
  7421. return createVNode(Text, null, text, flag);
  7422. }
  7423. function createStaticVNode(content, numberOfNodes) {
  7424. const vnode = createVNode(Static, null, content);
  7425. vnode.staticCount = numberOfNodes;
  7426. return vnode;
  7427. }
  7428. function createCommentVNode(text = "", asBlock = false) {
  7429. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  7430. }
  7431. function normalizeVNode(child) {
  7432. if (child == null || typeof child === "boolean") {
  7433. return createVNode(Comment);
  7434. } else if (isArray(child)) {
  7435. return createVNode(
  7436. Fragment,
  7437. null,
  7438. // #3666, avoid reference pollution when reusing vnode
  7439. child.slice()
  7440. );
  7441. } else if (typeof child === "object") {
  7442. return cloneIfMounted(child);
  7443. } else {
  7444. return createVNode(Text, null, String(child));
  7445. }
  7446. }
  7447. function cloneIfMounted(child) {
  7448. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  7449. }
  7450. function normalizeChildren(vnode, children) {
  7451. let type = 0;
  7452. const { shapeFlag } = vnode;
  7453. if (children == null) {
  7454. children = null;
  7455. } else if (isArray(children)) {
  7456. type = 16;
  7457. } else if (typeof children === "object") {
  7458. if (shapeFlag & (1 | 64)) {
  7459. const slot = children.default;
  7460. if (slot) {
  7461. slot._c && (slot._d = false);
  7462. normalizeChildren(vnode, slot());
  7463. slot._c && (slot._d = true);
  7464. }
  7465. return;
  7466. } else {
  7467. type = 32;
  7468. const slotFlag = children._;
  7469. if (!slotFlag && !isInternalObject(children)) {
  7470. children._ctx = currentRenderingInstance;
  7471. } else if (slotFlag === 3 && currentRenderingInstance) {
  7472. if (currentRenderingInstance.slots._ === 1) {
  7473. children._ = 1;
  7474. } else {
  7475. children._ = 2;
  7476. vnode.patchFlag |= 1024;
  7477. }
  7478. }
  7479. }
  7480. } else if (isFunction(children)) {
  7481. children = { default: children, _ctx: currentRenderingInstance };
  7482. type = 32;
  7483. } else {
  7484. children = String(children);
  7485. if (shapeFlag & 64) {
  7486. type = 16;
  7487. children = [createTextVNode(children)];
  7488. } else {
  7489. type = 8;
  7490. }
  7491. }
  7492. vnode.children = children;
  7493. vnode.shapeFlag |= type;
  7494. }
  7495. function mergeProps(...args) {
  7496. const ret = {};
  7497. for (let i = 0; i < args.length; i++) {
  7498. const toMerge = args[i];
  7499. for (const key in toMerge) {
  7500. if (key === "class") {
  7501. if (ret.class !== toMerge.class) {
  7502. ret.class = normalizeClass([ret.class, toMerge.class]);
  7503. }
  7504. } else if (key === "style") {
  7505. ret.style = normalizeStyle([ret.style, toMerge.style]);
  7506. } else if (isOn(key)) {
  7507. const existing = ret[key];
  7508. const incoming = toMerge[key];
  7509. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
  7510. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  7511. }
  7512. } else if (key !== "") {
  7513. ret[key] = toMerge[key];
  7514. }
  7515. }
  7516. }
  7517. return ret;
  7518. }
  7519. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  7520. callWithAsyncErrorHandling(hook, instance, 7, [
  7521. vnode,
  7522. prevVNode
  7523. ]);
  7524. }
  7525. function createComponentInstance(vnode, parent, suspense) {
  7526. const type = vnode.type;
  7527. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  7528. const instance = {
  7529. uid: uid++,
  7530. vnode,
  7531. type,
  7532. parent,
  7533. appContext,
  7534. root: null,
  7535. // to be immediately set
  7536. next: null,
  7537. subTree: null,
  7538. // will be set synchronously right after creation
  7539. effect: null,
  7540. update: null,
  7541. // will be set synchronously right after creation
  7542. scope: new EffectScope(
  7543. true
  7544. /* detached */
  7545. ),
  7546. render: null,
  7547. proxy: null,
  7548. exposed: null,
  7549. exposeProxy: null,
  7550. withProxy: null,
  7551. provides: parent ? parent.provides : Object.create(appContext.provides),
  7552. accessCache: null,
  7553. renderCache: [],
  7554. // local resolved assets
  7555. components: null,
  7556. directives: null,
  7557. // resolved props and emits options
  7558. propsOptions: normalizePropsOptions(type, appContext),
  7559. emitsOptions: normalizeEmitsOptions(type, appContext),
  7560. // emit
  7561. emit: null,
  7562. // to be set immediately
  7563. emitted: null,
  7564. // props default value
  7565. propsDefaults: EMPTY_OBJ,
  7566. // inheritAttrs
  7567. inheritAttrs: type.inheritAttrs,
  7568. // state
  7569. ctx: EMPTY_OBJ,
  7570. data: EMPTY_OBJ,
  7571. props: EMPTY_OBJ,
  7572. attrs: EMPTY_OBJ,
  7573. slots: EMPTY_OBJ,
  7574. refs: EMPTY_OBJ,
  7575. setupState: EMPTY_OBJ,
  7576. setupContext: null,
  7577. attrsProxy: null,
  7578. slotsProxy: null,
  7579. // suspense related
  7580. suspense,
  7581. suspenseId: suspense ? suspense.pendingId : 0,
  7582. asyncDep: null,
  7583. asyncResolved: false,
  7584. // lifecycle hooks
  7585. // not using enums here because it results in computed properties
  7586. isMounted: false,
  7587. isUnmounted: false,
  7588. isDeactivated: false,
  7589. bc: null,
  7590. c: null,
  7591. bm: null,
  7592. m: null,
  7593. bu: null,
  7594. u: null,
  7595. um: null,
  7596. bum: null,
  7597. da: null,
  7598. a: null,
  7599. rtg: null,
  7600. rtc: null,
  7601. ec: null,
  7602. sp: null
  7603. };
  7604. if (true) {
  7605. instance.ctx = createDevRenderContext(instance);
  7606. } else {
  7607. instance.ctx = { _: instance };
  7608. }
  7609. instance.root = parent ? parent.root : instance;
  7610. instance.emit = emit.bind(null, instance);
  7611. if (vnode.ce) {
  7612. vnode.ce(instance);
  7613. }
  7614. return instance;
  7615. }
  7616. function validateComponentName(name, { isNativeTag }) {
  7617. if (isBuiltInTag(name) || isNativeTag(name)) {
  7618. warn$1(
  7619. "Do not use built-in or reserved HTML elements as component id: " + name
  7620. );
  7621. }
  7622. }
  7623. function isStatefulComponent(instance) {
  7624. return instance.vnode.shapeFlag & 4;
  7625. }
  7626. function setupComponent(instance, isSSR = false) {
  7627. isSSR && setInSSRSetupState(isSSR);
  7628. const { props, children } = instance.vnode;
  7629. const isStateful = isStatefulComponent(instance);
  7630. initProps(instance, props, isStateful, isSSR);
  7631. initSlots(instance, children);
  7632. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  7633. isSSR && setInSSRSetupState(false);
  7634. return setupResult;
  7635. }
  7636. function setupStatefulComponent(instance, isSSR) {
  7637. var _a;
  7638. const Component = instance.type;
  7639. if (true) {
  7640. if (Component.name) {
  7641. validateComponentName(Component.name, instance.appContext.config);
  7642. }
  7643. if (Component.components) {
  7644. const names = Object.keys(Component.components);
  7645. for (let i = 0; i < names.length; i++) {
  7646. validateComponentName(names[i], instance.appContext.config);
  7647. }
  7648. }
  7649. if (Component.directives) {
  7650. const names = Object.keys(Component.directives);
  7651. for (let i = 0; i < names.length; i++) {
  7652. validateDirectiveName(names[i]);
  7653. }
  7654. }
  7655. if (Component.compilerOptions && isRuntimeOnly()) {
  7656. warn$1(
  7657. `"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.`
  7658. );
  7659. }
  7660. }
  7661. instance.accessCache = /* @__PURE__ */ Object.create(null);
  7662. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  7663. if (true) {
  7664. exposePropsOnRenderContext(instance);
  7665. }
  7666. const { setup } = Component;
  7667. if (setup) {
  7668. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  7669. const reset = setCurrentInstance(instance);
  7670. pauseTracking();
  7671. const setupResult = callWithErrorHandling(
  7672. setup,
  7673. instance,
  7674. 0,
  7675. [
  7676. true ? shallowReadonly(instance.props) : instance.props,
  7677. setupContext
  7678. ]
  7679. );
  7680. resetTracking();
  7681. reset();
  7682. if (isPromise(setupResult)) {
  7683. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  7684. if (isSSR) {
  7685. return setupResult.then((resolvedResult) => {
  7686. handleSetupResult(instance, resolvedResult, isSSR);
  7687. }).catch((e) => {
  7688. handleError(e, instance, 0);
  7689. });
  7690. } else {
  7691. instance.asyncDep = setupResult;
  7692. if (!instance.suspense) {
  7693. const name = (_a = Component.name) != null ? _a : "Anonymous";
  7694. warn$1(
  7695. `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.`
  7696. );
  7697. }
  7698. }
  7699. } else {
  7700. handleSetupResult(instance, setupResult, isSSR);
  7701. }
  7702. } else {
  7703. finishComponentSetup(instance, isSSR);
  7704. }
  7705. }
  7706. function handleSetupResult(instance, setupResult, isSSR) {
  7707. if (isFunction(setupResult)) {
  7708. if (instance.type.__ssrInlineRender) {
  7709. instance.ssrRender = setupResult;
  7710. } else {
  7711. instance.render = setupResult;
  7712. }
  7713. } else if (isObject(setupResult)) {
  7714. if (isVNode(setupResult)) {
  7715. warn$1(
  7716. `setup() should not return VNodes directly - return a render function instead.`
  7717. );
  7718. }
  7719. if (true) {
  7720. instance.devtoolsRawSetupState = setupResult;
  7721. }
  7722. instance.setupState = proxyRefs(setupResult);
  7723. if (true) {
  7724. exposeSetupStateOnRenderContext(instance);
  7725. }
  7726. } else if (setupResult !== void 0) {
  7727. warn$1(
  7728. `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
  7729. );
  7730. }
  7731. finishComponentSetup(instance, isSSR);
  7732. }
  7733. function registerRuntimeCompiler(_compile) {
  7734. compile = _compile;
  7735. installWithProxy = (i) => {
  7736. if (i.render._rc) {
  7737. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  7738. }
  7739. };
  7740. }
  7741. function finishComponentSetup(instance, isSSR, skipOptions) {
  7742. const Component = instance.type;
  7743. if (!instance.render) {
  7744. if (!isSSR && compile && !Component.render) {
  7745. const template = Component.template || resolveMergedOptions(instance).template;
  7746. if (template) {
  7747. if (true) {
  7748. startMeasure(instance, `compile`);
  7749. }
  7750. const { isCustomElement, compilerOptions } = instance.appContext.config;
  7751. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  7752. const finalCompilerOptions = extend(
  7753. extend(
  7754. {
  7755. isCustomElement,
  7756. delimiters
  7757. },
  7758. compilerOptions
  7759. ),
  7760. componentCompilerOptions
  7761. );
  7762. Component.render = compile(template, finalCompilerOptions);
  7763. if (true) {
  7764. endMeasure(instance, `compile`);
  7765. }
  7766. }
  7767. }
  7768. instance.render = Component.render || NOOP;
  7769. if (installWithProxy) {
  7770. installWithProxy(instance);
  7771. }
  7772. }
  7773. if (__VUE_OPTIONS_API__ && true) {
  7774. const reset = setCurrentInstance(instance);
  7775. pauseTracking();
  7776. try {
  7777. applyOptions(instance);
  7778. } finally {
  7779. resetTracking();
  7780. reset();
  7781. }
  7782. }
  7783. if (!Component.render && instance.render === NOOP && !isSSR) {
  7784. if (!compile && Component.template) {
  7785. warn$1(
  7786. `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".`
  7787. );
  7788. } else {
  7789. warn$1(`Component is missing template or render function.`);
  7790. }
  7791. }
  7792. }
  7793. function getSlotsProxy(instance) {
  7794. return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
  7795. get(target, key) {
  7796. track(instance, "get", "$slots");
  7797. return target[key];
  7798. }
  7799. }));
  7800. }
  7801. function createSetupContext(instance) {
  7802. const expose = (exposed) => {
  7803. if (true) {
  7804. if (instance.exposed) {
  7805. warn$1(`expose() should be called only once per setup().`);
  7806. }
  7807. if (exposed != null) {
  7808. let exposedType = typeof exposed;
  7809. if (exposedType === "object") {
  7810. if (isArray(exposed)) {
  7811. exposedType = "array";
  7812. } else if (isRef(exposed)) {
  7813. exposedType = "ref";
  7814. }
  7815. }
  7816. if (exposedType !== "object") {
  7817. warn$1(
  7818. `expose() should be passed a plain object, received ${exposedType}.`
  7819. );
  7820. }
  7821. }
  7822. }
  7823. instance.exposed = exposed || {};
  7824. };
  7825. if (true) {
  7826. let attrsProxy;
  7827. return Object.freeze({
  7828. get attrs() {
  7829. return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
  7830. },
  7831. get slots() {
  7832. return getSlotsProxy(instance);
  7833. },
  7834. get emit() {
  7835. return (event, ...args) => instance.emit(event, ...args);
  7836. },
  7837. expose
  7838. });
  7839. } else {
  7840. return {
  7841. attrs: new Proxy(instance.attrs, attrsProxyHandlers),
  7842. slots: instance.slots,
  7843. emit: instance.emit,
  7844. expose
  7845. };
  7846. }
  7847. }
  7848. function getExposeProxy(instance) {
  7849. if (instance.exposed) {
  7850. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  7851. get(target, key) {
  7852. if (key in target) {
  7853. return target[key];
  7854. } else if (key in publicPropertiesMap) {
  7855. return publicPropertiesMap[key](instance);
  7856. }
  7857. },
  7858. has(target, key) {
  7859. return key in target || key in publicPropertiesMap;
  7860. }
  7861. }));
  7862. }
  7863. }
  7864. function getComponentName(Component, includeInferred = true) {
  7865. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  7866. }
  7867. function formatComponentName(instance, Component, isRoot = false) {
  7868. let name = getComponentName(Component);
  7869. if (!name && Component.__file) {
  7870. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  7871. if (match) {
  7872. name = match[1];
  7873. }
  7874. }
  7875. if (!name && instance && instance.parent) {
  7876. const inferFromRegistry = (registry) => {
  7877. for (const key in registry) {
  7878. if (registry[key] === Component) {
  7879. return key;
  7880. }
  7881. }
  7882. };
  7883. name = inferFromRegistry(
  7884. instance.components || instance.parent.type.components
  7885. ) || inferFromRegistry(instance.appContext.components);
  7886. }
  7887. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  7888. }
  7889. function isClassComponent(value) {
  7890. return isFunction(value) && "__vccOpts" in value;
  7891. }
  7892. function useModel(props, name, options = EMPTY_OBJ) {
  7893. const i = getCurrentInstance();
  7894. if (!i) {
  7895. warn$1(`useModel() called without active instance.`);
  7896. return ref();
  7897. }
  7898. if (!i.propsOptions[0][name]) {
  7899. warn$1(`useModel() called with prop "${name}" which is not declared.`);
  7900. return ref();
  7901. }
  7902. const camelizedName = camelize(name);
  7903. const hyphenatedName = hyphenate(name);
  7904. const res = customRef((track2, trigger2) => {
  7905. let localValue;
  7906. watchSyncEffect(() => {
  7907. const propValue = props[name];
  7908. if (hasChanged(localValue, propValue)) {
  7909. localValue = propValue;
  7910. trigger2();
  7911. }
  7912. });
  7913. return {
  7914. get() {
  7915. track2();
  7916. return options.get ? options.get(localValue) : localValue;
  7917. },
  7918. set(value) {
  7919. const rawProps = i.vnode.props;
  7920. if (!(rawProps && // check if parent has passed v-model
  7921. (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
  7922. localValue = value;
  7923. trigger2();
  7924. }
  7925. i.emit(`update:${name}`, options.set ? options.set(value) : value);
  7926. }
  7927. };
  7928. });
  7929. const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
  7930. res[Symbol.iterator] = () => {
  7931. let i2 = 0;
  7932. return {
  7933. next() {
  7934. if (i2 < 2) {
  7935. return { value: i2++ ? props[modifierKey] || {} : res, done: false };
  7936. } else {
  7937. return { done: true };
  7938. }
  7939. }
  7940. };
  7941. };
  7942. return res;
  7943. }
  7944. function h(type, propsOrChildren, children) {
  7945. const l = arguments.length;
  7946. if (l === 2) {
  7947. if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  7948. if (isVNode(propsOrChildren)) {
  7949. return createVNode(type, null, [propsOrChildren]);
  7950. }
  7951. return createVNode(type, propsOrChildren);
  7952. } else {
  7953. return createVNode(type, null, propsOrChildren);
  7954. }
  7955. } else {
  7956. if (l > 3) {
  7957. children = Array.prototype.slice.call(arguments, 2);
  7958. } else if (l === 3 && isVNode(children)) {
  7959. children = [children];
  7960. }
  7961. return createVNode(type, propsOrChildren, children);
  7962. }
  7963. }
  7964. function initCustomFormatter() {
  7965. if (typeof window === "undefined") {
  7966. return;
  7967. }
  7968. const vueStyle = { style: "color:#3ba776" };
  7969. const numberStyle = { style: "color:#1677ff" };
  7970. const stringStyle = { style: "color:#f5222d" };
  7971. const keywordStyle = { style: "color:#eb2f96" };
  7972. const formatter = {
  7973. header(obj) {
  7974. if (!isObject(obj)) {
  7975. return null;
  7976. }
  7977. if (obj.__isVue) {
  7978. return ["div", vueStyle, `VueInstance`];
  7979. } else if (isRef(obj)) {
  7980. return [
  7981. "div",
  7982. {},
  7983. ["span", vueStyle, genRefFlag(obj)],
  7984. "<",
  7985. formatValue(obj.value),
  7986. `>`
  7987. ];
  7988. } else if (isReactive(obj)) {
  7989. return [
  7990. "div",
  7991. {},
  7992. ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
  7993. "<",
  7994. formatValue(obj),
  7995. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  7996. ];
  7997. } else if (isReadonly(obj)) {
  7998. return [
  7999. "div",
  8000. {},
  8001. ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
  8002. "<",
  8003. formatValue(obj),
  8004. ">"
  8005. ];
  8006. }
  8007. return null;
  8008. },
  8009. hasBody(obj) {
  8010. return obj && obj.__isVue;
  8011. },
  8012. body(obj) {
  8013. if (obj && obj.__isVue) {
  8014. return [
  8015. "div",
  8016. {},
  8017. ...formatInstance(obj.$)
  8018. ];
  8019. }
  8020. }
  8021. };
  8022. function formatInstance(instance) {
  8023. const blocks = [];
  8024. if (instance.type.props && instance.props) {
  8025. blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  8026. }
  8027. if (instance.setupState !== EMPTY_OBJ) {
  8028. blocks.push(createInstanceBlock("setup", instance.setupState));
  8029. }
  8030. if (instance.data !== EMPTY_OBJ) {
  8031. blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  8032. }
  8033. const computed3 = extractKeys(instance, "computed");
  8034. if (computed3) {
  8035. blocks.push(createInstanceBlock("computed", computed3));
  8036. }
  8037. const injected = extractKeys(instance, "inject");
  8038. if (injected) {
  8039. blocks.push(createInstanceBlock("injected", injected));
  8040. }
  8041. blocks.push([
  8042. "div",
  8043. {},
  8044. [
  8045. "span",
  8046. {
  8047. style: keywordStyle.style + ";opacity:0.66"
  8048. },
  8049. "$ (internal): "
  8050. ],
  8051. ["object", { object: instance }]
  8052. ]);
  8053. return blocks;
  8054. }
  8055. function createInstanceBlock(type, target) {
  8056. target = extend({}, target);
  8057. if (!Object.keys(target).length) {
  8058. return ["span", {}];
  8059. }
  8060. return [
  8061. "div",
  8062. { style: "line-height:1.25em;margin-bottom:0.6em" },
  8063. [
  8064. "div",
  8065. {
  8066. style: "color:#476582"
  8067. },
  8068. type
  8069. ],
  8070. [
  8071. "div",
  8072. {
  8073. style: "padding-left:1.25em"
  8074. },
  8075. ...Object.keys(target).map((key) => {
  8076. return [
  8077. "div",
  8078. {},
  8079. ["span", keywordStyle, key + ": "],
  8080. formatValue(target[key], false)
  8081. ];
  8082. })
  8083. ]
  8084. ];
  8085. }
  8086. function formatValue(v, asRaw = true) {
  8087. if (typeof v === "number") {
  8088. return ["span", numberStyle, v];
  8089. } else if (typeof v === "string") {
  8090. return ["span", stringStyle, JSON.stringify(v)];
  8091. } else if (typeof v === "boolean") {
  8092. return ["span", keywordStyle, v];
  8093. } else if (isObject(v)) {
  8094. return ["object", { object: asRaw ? toRaw(v) : v }];
  8095. } else {
  8096. return ["span", stringStyle, String(v)];
  8097. }
  8098. }
  8099. function extractKeys(instance, type) {
  8100. const Comp = instance.type;
  8101. if (isFunction(Comp)) {
  8102. return;
  8103. }
  8104. const extracted = {};
  8105. for (const key in instance.ctx) {
  8106. if (isKeyOfType(Comp, key, type)) {
  8107. extracted[key] = instance.ctx[key];
  8108. }
  8109. }
  8110. return extracted;
  8111. }
  8112. function isKeyOfType(Comp, key, type) {
  8113. const opts = Comp[type];
  8114. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
  8115. return true;
  8116. }
  8117. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  8118. return true;
  8119. }
  8120. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
  8121. return true;
  8122. }
  8123. }
  8124. function genRefFlag(v) {
  8125. if (isShallow(v)) {
  8126. return `ShallowRef`;
  8127. }
  8128. if (v.effect) {
  8129. return `ComputedRef`;
  8130. }
  8131. return `Ref`;
  8132. }
  8133. if (window.devtoolsFormatters) {
  8134. window.devtoolsFormatters.push(formatter);
  8135. } else {
  8136. window.devtoolsFormatters = [formatter];
  8137. }
  8138. }
  8139. function withMemo(memo, render, cache, index) {
  8140. const cached = cache[index];
  8141. if (cached && isMemoSame(cached, memo)) {
  8142. return cached;
  8143. }
  8144. const ret = render();
  8145. ret.memo = memo.slice();
  8146. return cache[index] = ret;
  8147. }
  8148. function isMemoSame(cached, memo) {
  8149. const prev = cached.memo;
  8150. if (prev.length != memo.length) {
  8151. return false;
  8152. }
  8153. for (let i = 0; i < prev.length; i++) {
  8154. if (hasChanged(prev[i], memo[i])) {
  8155. return false;
  8156. }
  8157. }
  8158. if (isBlockTreeEnabled > 0 && currentBlock) {
  8159. currentBlock.push(cached);
  8160. }
  8161. return true;
  8162. }
  8163. var stack, ErrorCodes, ErrorTypeStrings$1, isFlushing, isFlushPending, queue, flushIndex, pendingPostFlushCbs, activePostFlushCbs, postFlushIndex, resolvedPromise, currentFlushPromise, RECURSION_LIMIT, getId, comparator, isHmrUpdating, hmrDirtyComponents, map, devtools$1, buffer, devtoolsNotInstalled, devtoolsComponentAdded, devtoolsComponentUpdated, _devtoolsComponentRemoved, devtoolsComponentRemoved, devtoolsPerfStart, devtoolsPerfEnd, currentRenderingInstance, currentScopeId, withScopeId, accessedAttrs, getChildRoot, getFunctionalFallthrough, filterModelListeners, isElementRoot, COMPONENTS, DIRECTIVES, NULL_DYNAMIC_COMPONENT, isSuspense, suspenseId, SuspenseImpl, Suspense, hasWarned, ssrContextKey, useSSRContext, INITIAL_WATCHER_VALUE, leaveCbKey, enterCbKey, TransitionHookValidator, BaseTransitionPropsValidators, BaseTransitionImpl, BaseTransition, isAsyncWrapper, isKeepAlive, KeepAliveImpl, KeepAlive, createHook, onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted, onServerPrefetch, onRenderTriggered, onRenderTracked, getPublicInstance, publicPropertiesMap, isReservedPrefix, hasSetupBinding, PublicInstanceProxyHandlers, RuntimeCompiledPublicInstanceProxyHandlers, warnRuntimeUsage, shouldCacheAccess, internalOptionMergeStrats, uid$1, currentApp, internalObjectProto, createInternalObject, isInternalObject, isSimpleType, isInternalKey, normalizeSlotValue, normalizeSlot, normalizeObjectSlots, normalizeVNodeSlots, initSlots, updateSlots, hasMismatch, isSVGContainer, isMathMLContainer, getContainerType, isComment, supported, perf, queuePostRenderEffect, isTeleport, isTeleportDisabled, isTargetSVG, isTargetMathML, resolveTarget, TeleportImpl, Teleport, Fragment, Text, Comment, Static, blockStack, currentBlock, isBlockTreeEnabled, vnodeArgsTransformer, createVNodeWithArgsTransform, normalizeKey, normalizeRef, createVNode, emptyAppContext, uid, currentInstance, getCurrentInstance, internalSetCurrentInstance, setInSSRSetupState, setCurrentInstance, unsetCurrentInstance, isBuiltInTag, isInSSRComponentSetup, compile, installWithProxy, isRuntimeOnly, attrsProxyHandlers, classifyRE, classify, computed2, version, warn2, ErrorTypeStrings, devtools, setDevtoolsHook, _ssrUtils, ssrUtils, resolveFilter, compatUtils, DeprecationTypes;
  8164. var init_runtime_core_esm_bundler = __esm({
  8165. "node_modules/.pnpm/@vue+runtime-core@3.4.27/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js"() {
  8166. init_reactivity_esm_bundler();
  8167. init_reactivity_esm_bundler();
  8168. init_shared_esm_bundler();
  8169. init_shared_esm_bundler();
  8170. stack = [];
  8171. ErrorCodes = {
  8172. "SETUP_FUNCTION": 0,
  8173. "0": "SETUP_FUNCTION",
  8174. "RENDER_FUNCTION": 1,
  8175. "1": "RENDER_FUNCTION",
  8176. "WATCH_GETTER": 2,
  8177. "2": "WATCH_GETTER",
  8178. "WATCH_CALLBACK": 3,
  8179. "3": "WATCH_CALLBACK",
  8180. "WATCH_CLEANUP": 4,
  8181. "4": "WATCH_CLEANUP",
  8182. "NATIVE_EVENT_HANDLER": 5,
  8183. "5": "NATIVE_EVENT_HANDLER",
  8184. "COMPONENT_EVENT_HANDLER": 6,
  8185. "6": "COMPONENT_EVENT_HANDLER",
  8186. "VNODE_HOOK": 7,
  8187. "7": "VNODE_HOOK",
  8188. "DIRECTIVE_HOOK": 8,
  8189. "8": "DIRECTIVE_HOOK",
  8190. "TRANSITION_HOOK": 9,
  8191. "9": "TRANSITION_HOOK",
  8192. "APP_ERROR_HANDLER": 10,
  8193. "10": "APP_ERROR_HANDLER",
  8194. "APP_WARN_HANDLER": 11,
  8195. "11": "APP_WARN_HANDLER",
  8196. "FUNCTION_REF": 12,
  8197. "12": "FUNCTION_REF",
  8198. "ASYNC_COMPONENT_LOADER": 13,
  8199. "13": "ASYNC_COMPONENT_LOADER",
  8200. "SCHEDULER": 14,
  8201. "14": "SCHEDULER"
  8202. };
  8203. ErrorTypeStrings$1 = {
  8204. ["sp"]: "serverPrefetch hook",
  8205. ["bc"]: "beforeCreate hook",
  8206. ["c"]: "created hook",
  8207. ["bm"]: "beforeMount hook",
  8208. ["m"]: "mounted hook",
  8209. ["bu"]: "beforeUpdate hook",
  8210. ["u"]: "updated",
  8211. ["bum"]: "beforeUnmount hook",
  8212. ["um"]: "unmounted hook",
  8213. ["a"]: "activated hook",
  8214. ["da"]: "deactivated hook",
  8215. ["ec"]: "errorCaptured hook",
  8216. ["rtc"]: "renderTracked hook",
  8217. ["rtg"]: "renderTriggered hook",
  8218. [0]: "setup function",
  8219. [1]: "render function",
  8220. [2]: "watcher getter",
  8221. [3]: "watcher callback",
  8222. [4]: "watcher cleanup function",
  8223. [5]: "native event handler",
  8224. [6]: "component event handler",
  8225. [7]: "vnode hook",
  8226. [8]: "directive hook",
  8227. [9]: "transition hook",
  8228. [10]: "app errorHandler",
  8229. [11]: "app warnHandler",
  8230. [12]: "ref function",
  8231. [13]: "async component loader",
  8232. [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
  8233. };
  8234. isFlushing = false;
  8235. isFlushPending = false;
  8236. queue = [];
  8237. flushIndex = 0;
  8238. pendingPostFlushCbs = [];
  8239. activePostFlushCbs = null;
  8240. postFlushIndex = 0;
  8241. resolvedPromise = Promise.resolve();
  8242. currentFlushPromise = null;
  8243. RECURSION_LIMIT = 100;
  8244. getId = (job) => job.id == null ? Infinity : job.id;
  8245. comparator = (a, b) => {
  8246. const diff = getId(a) - getId(b);
  8247. if (diff === 0) {
  8248. if (a.pre && !b.pre)
  8249. return -1;
  8250. if (b.pre && !a.pre)
  8251. return 1;
  8252. }
  8253. return diff;
  8254. };
  8255. isHmrUpdating = false;
  8256. hmrDirtyComponents = /* @__PURE__ */ new Set();
  8257. if (true) {
  8258. getGlobalThis().__VUE_HMR_RUNTIME__ = {
  8259. createRecord: tryWrap(createRecord),
  8260. rerender: tryWrap(rerender),
  8261. reload: tryWrap(reload)
  8262. };
  8263. }
  8264. map = /* @__PURE__ */ new Map();
  8265. buffer = [];
  8266. devtoolsNotInstalled = false;
  8267. devtoolsComponentAdded = createDevtoolsComponentHook(
  8268. "component:added"
  8269. /* COMPONENT_ADDED */
  8270. );
  8271. devtoolsComponentUpdated = createDevtoolsComponentHook(
  8272. "component:updated"
  8273. /* COMPONENT_UPDATED */
  8274. );
  8275. _devtoolsComponentRemoved = createDevtoolsComponentHook(
  8276. "component:removed"
  8277. /* COMPONENT_REMOVED */
  8278. );
  8279. devtoolsComponentRemoved = (component) => {
  8280. if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  8281. !devtools$1.cleanupBuffer(component)) {
  8282. _devtoolsComponentRemoved(component);
  8283. }
  8284. };
  8285. devtoolsPerfStart = createDevtoolsPerformanceHook(
  8286. "perf:start"
  8287. /* PERFORMANCE_START */
  8288. );
  8289. devtoolsPerfEnd = createDevtoolsPerformanceHook(
  8290. "perf:end"
  8291. /* PERFORMANCE_END */
  8292. );
  8293. currentRenderingInstance = null;
  8294. currentScopeId = null;
  8295. withScopeId = (_id) => withCtx;
  8296. accessedAttrs = false;
  8297. getChildRoot = (vnode) => {
  8298. const rawChildren = vnode.children;
  8299. const dynamicChildren = vnode.dynamicChildren;
  8300. const childRoot = filterSingleRoot(rawChildren, false);
  8301. if (!childRoot) {
  8302. return [vnode, void 0];
  8303. } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
  8304. return getChildRoot(childRoot);
  8305. }
  8306. const index = rawChildren.indexOf(childRoot);
  8307. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  8308. const setRoot = (updatedRoot) => {
  8309. rawChildren[index] = updatedRoot;
  8310. if (dynamicChildren) {
  8311. if (dynamicIndex > -1) {
  8312. dynamicChildren[dynamicIndex] = updatedRoot;
  8313. } else if (updatedRoot.patchFlag > 0) {
  8314. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  8315. }
  8316. }
  8317. };
  8318. return [normalizeVNode(childRoot), setRoot];
  8319. };
  8320. getFunctionalFallthrough = (attrs) => {
  8321. let res;
  8322. for (const key in attrs) {
  8323. if (key === "class" || key === "style" || isOn(key)) {
  8324. (res || (res = {}))[key] = attrs[key];
  8325. }
  8326. }
  8327. return res;
  8328. };
  8329. filterModelListeners = (attrs, props) => {
  8330. const res = {};
  8331. for (const key in attrs) {
  8332. if (!isModelListener(key) || !(key.slice(9) in props)) {
  8333. res[key] = attrs[key];
  8334. }
  8335. }
  8336. return res;
  8337. };
  8338. isElementRoot = (vnode) => {
  8339. return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
  8340. };
  8341. COMPONENTS = "components";
  8342. DIRECTIVES = "directives";
  8343. NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  8344. isSuspense = (type) => type.__isSuspense;
  8345. suspenseId = 0;
  8346. SuspenseImpl = {
  8347. name: "Suspense",
  8348. // In order to make Suspense tree-shakable, we need to avoid importing it
  8349. // directly in the renderer. The renderer checks for the __isSuspense flag
  8350. // on a vnode's type and calls the `process` method, passing in renderer
  8351. // internals.
  8352. __isSuspense: true,
  8353. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  8354. if (n1 == null) {
  8355. mountSuspense(
  8356. n2,
  8357. container,
  8358. anchor,
  8359. parentComponent,
  8360. parentSuspense,
  8361. namespace,
  8362. slotScopeIds,
  8363. optimized,
  8364. rendererInternals
  8365. );
  8366. } else {
  8367. if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
  8368. n2.suspense = n1.suspense;
  8369. n2.suspense.vnode = n2;
  8370. n2.el = n1.el;
  8371. return;
  8372. }
  8373. patchSuspense(
  8374. n1,
  8375. n2,
  8376. container,
  8377. anchor,
  8378. parentComponent,
  8379. namespace,
  8380. slotScopeIds,
  8381. optimized,
  8382. rendererInternals
  8383. );
  8384. }
  8385. },
  8386. hydrate: hydrateSuspense,
  8387. create: createSuspenseBoundary,
  8388. normalize: normalizeSuspenseChildren
  8389. };
  8390. Suspense = SuspenseImpl;
  8391. hasWarned = false;
  8392. ssrContextKey = Symbol.for("v-scx");
  8393. useSSRContext = () => {
  8394. {
  8395. const ctx = inject(ssrContextKey);
  8396. if (!ctx) {
  8397. warn$1(
  8398. `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
  8399. );
  8400. }
  8401. return ctx;
  8402. }
  8403. };
  8404. INITIAL_WATCHER_VALUE = {};
  8405. leaveCbKey = Symbol("_leaveCb");
  8406. enterCbKey = Symbol("_enterCb");
  8407. TransitionHookValidator = [Function, Array];
  8408. BaseTransitionPropsValidators = {
  8409. mode: String,
  8410. appear: Boolean,
  8411. persisted: Boolean,
  8412. // enter
  8413. onBeforeEnter: TransitionHookValidator,
  8414. onEnter: TransitionHookValidator,
  8415. onAfterEnter: TransitionHookValidator,
  8416. onEnterCancelled: TransitionHookValidator,
  8417. // leave
  8418. onBeforeLeave: TransitionHookValidator,
  8419. onLeave: TransitionHookValidator,
  8420. onAfterLeave: TransitionHookValidator,
  8421. onLeaveCancelled: TransitionHookValidator,
  8422. // appear
  8423. onBeforeAppear: TransitionHookValidator,
  8424. onAppear: TransitionHookValidator,
  8425. onAfterAppear: TransitionHookValidator,
  8426. onAppearCancelled: TransitionHookValidator
  8427. };
  8428. BaseTransitionImpl = {
  8429. name: `BaseTransition`,
  8430. props: BaseTransitionPropsValidators,
  8431. setup(props, { slots }) {
  8432. const instance = getCurrentInstance();
  8433. const state = useTransitionState();
  8434. return () => {
  8435. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  8436. if (!children || !children.length) {
  8437. return;
  8438. }
  8439. let child = children[0];
  8440. if (children.length > 1) {
  8441. let hasFound = false;
  8442. for (const c of children) {
  8443. if (c.type !== Comment) {
  8444. if (hasFound) {
  8445. warn$1(
  8446. "<transition> can only be used on a single element or component. Use <transition-group> for lists."
  8447. );
  8448. break;
  8449. }
  8450. child = c;
  8451. hasFound = true;
  8452. if (false)
  8453. break;
  8454. }
  8455. }
  8456. }
  8457. const rawProps = toRaw(props);
  8458. const { mode } = rawProps;
  8459. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
  8460. warn$1(`invalid <transition> mode: ${mode}`);
  8461. }
  8462. if (state.isLeaving) {
  8463. return emptyPlaceholder(child);
  8464. }
  8465. const innerChild = getKeepAliveChild(child);
  8466. if (!innerChild) {
  8467. return emptyPlaceholder(child);
  8468. }
  8469. const enterHooks = resolveTransitionHooks(
  8470. innerChild,
  8471. rawProps,
  8472. state,
  8473. instance
  8474. );
  8475. setTransitionHooks(innerChild, enterHooks);
  8476. const oldChild = instance.subTree;
  8477. const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
  8478. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
  8479. const leavingHooks = resolveTransitionHooks(
  8480. oldInnerChild,
  8481. rawProps,
  8482. state,
  8483. instance
  8484. );
  8485. setTransitionHooks(oldInnerChild, leavingHooks);
  8486. if (mode === "out-in" && innerChild.type !== Comment) {
  8487. state.isLeaving = true;
  8488. leavingHooks.afterLeave = () => {
  8489. state.isLeaving = false;
  8490. if (instance.update.active !== false) {
  8491. instance.effect.dirty = true;
  8492. instance.update();
  8493. }
  8494. };
  8495. return emptyPlaceholder(child);
  8496. } else if (mode === "in-out" && innerChild.type !== Comment) {
  8497. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  8498. const leavingVNodesCache = getLeavingNodesForType(
  8499. state,
  8500. oldInnerChild
  8501. );
  8502. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  8503. el[leaveCbKey] = () => {
  8504. earlyRemove();
  8505. el[leaveCbKey] = void 0;
  8506. delete enterHooks.delayedLeave;
  8507. };
  8508. enterHooks.delayedLeave = delayedLeave;
  8509. };
  8510. }
  8511. }
  8512. return child;
  8513. };
  8514. }
  8515. };
  8516. BaseTransition = BaseTransitionImpl;
  8517. isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  8518. isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  8519. KeepAliveImpl = {
  8520. name: `KeepAlive`,
  8521. // Marker for special handling inside the renderer. We are not using a ===
  8522. // check directly on KeepAlive in the renderer, because importing it directly
  8523. // would prevent it from being tree-shaken.
  8524. __isKeepAlive: true,
  8525. props: {
  8526. include: [String, RegExp, Array],
  8527. exclude: [String, RegExp, Array],
  8528. max: [String, Number]
  8529. },
  8530. setup(props, { slots }) {
  8531. const instance = getCurrentInstance();
  8532. const sharedContext = instance.ctx;
  8533. if (!sharedContext.renderer) {
  8534. return () => {
  8535. const children = slots.default && slots.default();
  8536. return children && children.length === 1 ? children[0] : children;
  8537. };
  8538. }
  8539. const cache = /* @__PURE__ */ new Map();
  8540. const keys = /* @__PURE__ */ new Set();
  8541. let current = null;
  8542. if (true) {
  8543. instance.__v_cache = cache;
  8544. }
  8545. const parentSuspense = instance.suspense;
  8546. const {
  8547. renderer: {
  8548. p: patch,
  8549. m: move,
  8550. um: _unmount,
  8551. o: { createElement }
  8552. }
  8553. } = sharedContext;
  8554. const storageContainer = createElement("div");
  8555. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  8556. const instance2 = vnode.component;
  8557. move(vnode, container, anchor, 0, parentSuspense);
  8558. patch(
  8559. instance2.vnode,
  8560. vnode,
  8561. container,
  8562. anchor,
  8563. instance2,
  8564. parentSuspense,
  8565. namespace,
  8566. vnode.slotScopeIds,
  8567. optimized
  8568. );
  8569. queuePostRenderEffect(() => {
  8570. instance2.isDeactivated = false;
  8571. if (instance2.a) {
  8572. invokeArrayFns(instance2.a);
  8573. }
  8574. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  8575. if (vnodeHook) {
  8576. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  8577. }
  8578. }, parentSuspense);
  8579. if (true) {
  8580. devtoolsComponentAdded(instance2);
  8581. }
  8582. };
  8583. sharedContext.deactivate = (vnode) => {
  8584. const instance2 = vnode.component;
  8585. move(vnode, storageContainer, null, 1, parentSuspense);
  8586. queuePostRenderEffect(() => {
  8587. if (instance2.da) {
  8588. invokeArrayFns(instance2.da);
  8589. }
  8590. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  8591. if (vnodeHook) {
  8592. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  8593. }
  8594. instance2.isDeactivated = true;
  8595. }, parentSuspense);
  8596. if (true) {
  8597. devtoolsComponentAdded(instance2);
  8598. }
  8599. };
  8600. function unmount(vnode) {
  8601. resetShapeFlag(vnode);
  8602. _unmount(vnode, instance, parentSuspense, true);
  8603. }
  8604. function pruneCache(filter) {
  8605. cache.forEach((vnode, key) => {
  8606. const name = getComponentName(vnode.type);
  8607. if (name && (!filter || !filter(name))) {
  8608. pruneCacheEntry(key);
  8609. }
  8610. });
  8611. }
  8612. function pruneCacheEntry(key) {
  8613. const cached = cache.get(key);
  8614. if (!current || !isSameVNodeType(cached, current)) {
  8615. unmount(cached);
  8616. } else if (current) {
  8617. resetShapeFlag(current);
  8618. }
  8619. cache.delete(key);
  8620. keys.delete(key);
  8621. }
  8622. watch(
  8623. () => [props.include, props.exclude],
  8624. ([include, exclude]) => {
  8625. include && pruneCache((name) => matches(include, name));
  8626. exclude && pruneCache((name) => !matches(exclude, name));
  8627. },
  8628. // prune post-render after `current` has been updated
  8629. { flush: "post", deep: true }
  8630. );
  8631. let pendingCacheKey = null;
  8632. const cacheSubtree = () => {
  8633. if (pendingCacheKey != null) {
  8634. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  8635. }
  8636. };
  8637. onMounted(cacheSubtree);
  8638. onUpdated(cacheSubtree);
  8639. onBeforeUnmount(() => {
  8640. cache.forEach((cached) => {
  8641. const { subTree, suspense } = instance;
  8642. const vnode = getInnerChild(subTree);
  8643. if (cached.type === vnode.type && cached.key === vnode.key) {
  8644. resetShapeFlag(vnode);
  8645. const da = vnode.component.da;
  8646. da && queuePostRenderEffect(da, suspense);
  8647. return;
  8648. }
  8649. unmount(cached);
  8650. });
  8651. });
  8652. return () => {
  8653. pendingCacheKey = null;
  8654. if (!slots.default) {
  8655. return null;
  8656. }
  8657. const children = slots.default();
  8658. const rawVNode = children[0];
  8659. if (children.length > 1) {
  8660. if (true) {
  8661. warn$1(`KeepAlive should contain exactly one component child.`);
  8662. }
  8663. current = null;
  8664. return children;
  8665. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  8666. current = null;
  8667. return rawVNode;
  8668. }
  8669. let vnode = getInnerChild(rawVNode);
  8670. const comp = vnode.type;
  8671. const name = getComponentName(
  8672. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  8673. );
  8674. const { include, exclude, max } = props;
  8675. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  8676. current = vnode;
  8677. return rawVNode;
  8678. }
  8679. const key = vnode.key == null ? comp : vnode.key;
  8680. const cachedVNode = cache.get(key);
  8681. if (vnode.el) {
  8682. vnode = cloneVNode(vnode);
  8683. if (rawVNode.shapeFlag & 128) {
  8684. rawVNode.ssContent = vnode;
  8685. }
  8686. }
  8687. pendingCacheKey = key;
  8688. if (cachedVNode) {
  8689. vnode.el = cachedVNode.el;
  8690. vnode.component = cachedVNode.component;
  8691. if (vnode.transition) {
  8692. setTransitionHooks(vnode, vnode.transition);
  8693. }
  8694. vnode.shapeFlag |= 512;
  8695. keys.delete(key);
  8696. keys.add(key);
  8697. } else {
  8698. keys.add(key);
  8699. if (max && keys.size > parseInt(max, 10)) {
  8700. pruneCacheEntry(keys.values().next().value);
  8701. }
  8702. }
  8703. vnode.shapeFlag |= 256;
  8704. current = vnode;
  8705. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  8706. };
  8707. }
  8708. };
  8709. KeepAlive = KeepAliveImpl;
  8710. createHook = (lifecycle) => (hook, target = currentInstance) => (
  8711. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  8712. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  8713. );
  8714. onBeforeMount = createHook("bm");
  8715. onMounted = createHook("m");
  8716. onBeforeUpdate = createHook("bu");
  8717. onUpdated = createHook("u");
  8718. onBeforeUnmount = createHook("bum");
  8719. onUnmounted = createHook("um");
  8720. onServerPrefetch = createHook("sp");
  8721. onRenderTriggered = createHook(
  8722. "rtg"
  8723. );
  8724. onRenderTracked = createHook(
  8725. "rtc"
  8726. );
  8727. getPublicInstance = (i) => {
  8728. if (!i)
  8729. return null;
  8730. if (isStatefulComponent(i))
  8731. return getExposeProxy(i) || i.proxy;
  8732. return getPublicInstance(i.parent);
  8733. };
  8734. publicPropertiesMap = // Move PURE marker to new line to workaround compiler discarding it
  8735. // due to type annotation
  8736. extend(/* @__PURE__ */ Object.create(null), {
  8737. $: (i) => i,
  8738. $el: (i) => i.vnode.el,
  8739. $data: (i) => i.data,
  8740. $props: (i) => true ? shallowReadonly(i.props) : i.props,
  8741. $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
  8742. $slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
  8743. $refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
  8744. $parent: (i) => getPublicInstance(i.parent),
  8745. $root: (i) => getPublicInstance(i.root),
  8746. $emit: (i) => i.emit,
  8747. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  8748. $forceUpdate: (i) => i.f || (i.f = () => {
  8749. i.effect.dirty = true;
  8750. queueJob(i.update);
  8751. }),
  8752. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  8753. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  8754. });
  8755. isReservedPrefix = (key) => key === "_" || key === "$";
  8756. hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  8757. PublicInstanceProxyHandlers = {
  8758. get({ _: instance }, key) {
  8759. if (key === "__v_skip") {
  8760. return true;
  8761. }
  8762. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  8763. if (key === "__isVue") {
  8764. return true;
  8765. }
  8766. let normalizedProps;
  8767. if (key[0] !== "$") {
  8768. const n = accessCache[key];
  8769. if (n !== void 0) {
  8770. switch (n) {
  8771. case 1:
  8772. return setupState[key];
  8773. case 2:
  8774. return data[key];
  8775. case 4:
  8776. return ctx[key];
  8777. case 3:
  8778. return props[key];
  8779. }
  8780. } else if (hasSetupBinding(setupState, key)) {
  8781. accessCache[key] = 1;
  8782. return setupState[key];
  8783. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  8784. accessCache[key] = 2;
  8785. return data[key];
  8786. } else if (
  8787. // only cache other properties when instance has declared (thus stable)
  8788. // props
  8789. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  8790. ) {
  8791. accessCache[key] = 3;
  8792. return props[key];
  8793. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  8794. accessCache[key] = 4;
  8795. return ctx[key];
  8796. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
  8797. accessCache[key] = 0;
  8798. }
  8799. }
  8800. const publicGetter = publicPropertiesMap[key];
  8801. let cssModule, globalProperties;
  8802. if (publicGetter) {
  8803. if (key === "$attrs") {
  8804. track(instance.attrs, "get", "");
  8805. markAttrsAccessed();
  8806. } else if (key === "$slots") {
  8807. track(instance, "get", key);
  8808. }
  8809. return publicGetter(instance);
  8810. } else if (
  8811. // css module (injected by vue-loader)
  8812. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  8813. ) {
  8814. return cssModule;
  8815. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  8816. accessCache[key] = 4;
  8817. return ctx[key];
  8818. } else if (
  8819. // global properties
  8820. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  8821. ) {
  8822. {
  8823. return globalProperties[key];
  8824. }
  8825. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  8826. // to infinite warning loop
  8827. key.indexOf("__v") !== 0)) {
  8828. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  8829. warn$1(
  8830. `Property ${JSON.stringify(
  8831. key
  8832. )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
  8833. );
  8834. } else if (instance === currentRenderingInstance) {
  8835. warn$1(
  8836. `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
  8837. );
  8838. }
  8839. }
  8840. },
  8841. set({ _: instance }, key, value) {
  8842. const { data, setupState, ctx } = instance;
  8843. if (hasSetupBinding(setupState, key)) {
  8844. setupState[key] = value;
  8845. return true;
  8846. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  8847. warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  8848. return false;
  8849. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  8850. data[key] = value;
  8851. return true;
  8852. } else if (hasOwn(instance.props, key)) {
  8853. warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
  8854. return false;
  8855. }
  8856. if (key[0] === "$" && key.slice(1) in instance) {
  8857. warn$1(
  8858. `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
  8859. );
  8860. return false;
  8861. } else {
  8862. if (key in instance.appContext.config.globalProperties) {
  8863. Object.defineProperty(ctx, key, {
  8864. enumerable: true,
  8865. configurable: true,
  8866. value
  8867. });
  8868. } else {
  8869. ctx[key] = value;
  8870. }
  8871. }
  8872. return true;
  8873. },
  8874. has({
  8875. _: { data, setupState, accessCache, ctx, appContext, propsOptions }
  8876. }, key) {
  8877. let normalizedProps;
  8878. 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);
  8879. },
  8880. defineProperty(target, key, descriptor) {
  8881. if (descriptor.get != null) {
  8882. target._.accessCache[key] = 0;
  8883. } else if (hasOwn(descriptor, "value")) {
  8884. this.set(target, key, descriptor.value, null);
  8885. }
  8886. return Reflect.defineProperty(target, key, descriptor);
  8887. }
  8888. };
  8889. if (true) {
  8890. PublicInstanceProxyHandlers.ownKeys = (target) => {
  8891. warn$1(
  8892. `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
  8893. );
  8894. return Reflect.ownKeys(target);
  8895. };
  8896. }
  8897. RuntimeCompiledPublicInstanceProxyHandlers = extend(
  8898. {},
  8899. PublicInstanceProxyHandlers,
  8900. {
  8901. get(target, key) {
  8902. if (key === Symbol.unscopables) {
  8903. return;
  8904. }
  8905. return PublicInstanceProxyHandlers.get(target, key, target);
  8906. },
  8907. has(_, key) {
  8908. const has2 = key[0] !== "_" && !isGloballyAllowed(key);
  8909. if (!has2 && PublicInstanceProxyHandlers.has(_, key)) {
  8910. warn$1(
  8911. `Property ${JSON.stringify(
  8912. key
  8913. )} should not start with _ which is a reserved prefix for Vue internals.`
  8914. );
  8915. }
  8916. return has2;
  8917. }
  8918. }
  8919. );
  8920. warnRuntimeUsage = (method) => warn$1(
  8921. `${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.`
  8922. );
  8923. shouldCacheAccess = true;
  8924. internalOptionMergeStrats = {
  8925. data: mergeDataFn,
  8926. props: mergeEmitsOrPropsOptions,
  8927. emits: mergeEmitsOrPropsOptions,
  8928. // objects
  8929. methods: mergeObjectOptions,
  8930. computed: mergeObjectOptions,
  8931. // lifecycle
  8932. beforeCreate: mergeAsArray,
  8933. created: mergeAsArray,
  8934. beforeMount: mergeAsArray,
  8935. mounted: mergeAsArray,
  8936. beforeUpdate: mergeAsArray,
  8937. updated: mergeAsArray,
  8938. beforeDestroy: mergeAsArray,
  8939. beforeUnmount: mergeAsArray,
  8940. destroyed: mergeAsArray,
  8941. unmounted: mergeAsArray,
  8942. activated: mergeAsArray,
  8943. deactivated: mergeAsArray,
  8944. errorCaptured: mergeAsArray,
  8945. serverPrefetch: mergeAsArray,
  8946. // assets
  8947. components: mergeObjectOptions,
  8948. directives: mergeObjectOptions,
  8949. // watch
  8950. watch: mergeWatchOptions,
  8951. // provide / inject
  8952. provide: mergeDataFn,
  8953. inject: mergeInject
  8954. };
  8955. uid$1 = 0;
  8956. currentApp = null;
  8957. internalObjectProto = {};
  8958. createInternalObject = () => Object.create(internalObjectProto);
  8959. isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  8960. isSimpleType = makeMap(
  8961. "String,Number,Boolean,Function,Symbol,BigInt"
  8962. );
  8963. isInternalKey = (key) => key[0] === "_" || key === "$stable";
  8964. normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  8965. normalizeSlot = (key, rawSlot, ctx) => {
  8966. if (rawSlot._n) {
  8967. return rawSlot;
  8968. }
  8969. const normalized = withCtx((...args) => {
  8970. if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
  8971. warn$1(
  8972. `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.`
  8973. );
  8974. }
  8975. return normalizeSlotValue(rawSlot(...args));
  8976. }, ctx);
  8977. normalized._c = false;
  8978. return normalized;
  8979. };
  8980. normalizeObjectSlots = (rawSlots, slots, instance) => {
  8981. const ctx = rawSlots._ctx;
  8982. for (const key in rawSlots) {
  8983. if (isInternalKey(key))
  8984. continue;
  8985. const value = rawSlots[key];
  8986. if (isFunction(value)) {
  8987. slots[key] = normalizeSlot(key, value, ctx);
  8988. } else if (value != null) {
  8989. if (true) {
  8990. warn$1(
  8991. `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
  8992. );
  8993. }
  8994. const normalized = normalizeSlotValue(value);
  8995. slots[key] = () => normalized;
  8996. }
  8997. }
  8998. };
  8999. normalizeVNodeSlots = (instance, children) => {
  9000. if (!isKeepAlive(instance.vnode) && true) {
  9001. warn$1(
  9002. `Non-function value encountered for default slot. Prefer function slots for better performance.`
  9003. );
  9004. }
  9005. const normalized = normalizeSlotValue(children);
  9006. instance.slots.default = () => normalized;
  9007. };
  9008. initSlots = (instance, children) => {
  9009. const slots = instance.slots = createInternalObject();
  9010. if (instance.vnode.shapeFlag & 32) {
  9011. const type = children._;
  9012. if (type) {
  9013. extend(slots, children);
  9014. def(slots, "_", type, true);
  9015. } else {
  9016. normalizeObjectSlots(children, slots);
  9017. }
  9018. } else if (children) {
  9019. normalizeVNodeSlots(instance, children);
  9020. }
  9021. };
  9022. updateSlots = (instance, children, optimized) => {
  9023. const { vnode, slots } = instance;
  9024. let needDeletionCheck = true;
  9025. let deletionComparisonTarget = EMPTY_OBJ;
  9026. if (vnode.shapeFlag & 32) {
  9027. const type = children._;
  9028. if (type) {
  9029. if (isHmrUpdating) {
  9030. extend(slots, children);
  9031. trigger(instance, "set", "$slots");
  9032. } else if (optimized && type === 1) {
  9033. needDeletionCheck = false;
  9034. } else {
  9035. extend(slots, children);
  9036. if (!optimized && type === 1) {
  9037. delete slots._;
  9038. }
  9039. }
  9040. } else {
  9041. needDeletionCheck = !children.$stable;
  9042. normalizeObjectSlots(children, slots);
  9043. }
  9044. deletionComparisonTarget = children;
  9045. } else if (children) {
  9046. normalizeVNodeSlots(instance, children);
  9047. deletionComparisonTarget = { default: 1 };
  9048. }
  9049. if (needDeletionCheck) {
  9050. for (const key in slots) {
  9051. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  9052. delete slots[key];
  9053. }
  9054. }
  9055. }
  9056. };
  9057. hasMismatch = false;
  9058. isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
  9059. isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
  9060. getContainerType = (container) => {
  9061. if (isSVGContainer(container))
  9062. return "svg";
  9063. if (isMathMLContainer(container))
  9064. return "mathml";
  9065. return void 0;
  9066. };
  9067. isComment = (node) => node.nodeType === 8;
  9068. queuePostRenderEffect = queueEffectWithSuspense;
  9069. isTeleport = (type) => type.__isTeleport;
  9070. isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  9071. isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  9072. isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  9073. resolveTarget = (props, select) => {
  9074. const targetSelector = props && props.to;
  9075. if (isString(targetSelector)) {
  9076. if (!select) {
  9077. warn$1(
  9078. `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
  9079. );
  9080. return null;
  9081. } else {
  9082. const target = select(targetSelector);
  9083. if (!target) {
  9084. warn$1(
  9085. `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.`
  9086. );
  9087. }
  9088. return target;
  9089. }
  9090. } else {
  9091. if (!targetSelector && !isTeleportDisabled(props)) {
  9092. warn$1(`Invalid Teleport target: ${targetSelector}`);
  9093. }
  9094. return targetSelector;
  9095. }
  9096. };
  9097. TeleportImpl = {
  9098. name: "Teleport",
  9099. __isTeleport: true,
  9100. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  9101. const {
  9102. mc: mountChildren,
  9103. pc: patchChildren,
  9104. pbc: patchBlockChildren,
  9105. o: { insert, querySelector, createText, createComment }
  9106. } = internals;
  9107. const disabled = isTeleportDisabled(n2.props);
  9108. let { shapeFlag, children, dynamicChildren } = n2;
  9109. if (isHmrUpdating) {
  9110. optimized = false;
  9111. dynamicChildren = null;
  9112. }
  9113. if (n1 == null) {
  9114. const placeholder = n2.el = true ? createComment("teleport start") : createText("");
  9115. const mainAnchor = n2.anchor = true ? createComment("teleport end") : createText("");
  9116. insert(placeholder, container, anchor);
  9117. insert(mainAnchor, container, anchor);
  9118. const target = n2.target = resolveTarget(n2.props, querySelector);
  9119. const targetAnchor = n2.targetAnchor = createText("");
  9120. if (target) {
  9121. insert(targetAnchor, target);
  9122. if (namespace === "svg" || isTargetSVG(target)) {
  9123. namespace = "svg";
  9124. } else if (namespace === "mathml" || isTargetMathML(target)) {
  9125. namespace = "mathml";
  9126. }
  9127. } else if (!disabled) {
  9128. warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
  9129. }
  9130. const mount = (container2, anchor2) => {
  9131. if (shapeFlag & 16) {
  9132. mountChildren(
  9133. children,
  9134. container2,
  9135. anchor2,
  9136. parentComponent,
  9137. parentSuspense,
  9138. namespace,
  9139. slotScopeIds,
  9140. optimized
  9141. );
  9142. }
  9143. };
  9144. if (disabled) {
  9145. mount(container, mainAnchor);
  9146. } else if (target) {
  9147. mount(target, targetAnchor);
  9148. }
  9149. } else {
  9150. n2.el = n1.el;
  9151. const mainAnchor = n2.anchor = n1.anchor;
  9152. const target = n2.target = n1.target;
  9153. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  9154. const wasDisabled = isTeleportDisabled(n1.props);
  9155. const currentContainer = wasDisabled ? container : target;
  9156. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  9157. if (namespace === "svg" || isTargetSVG(target)) {
  9158. namespace = "svg";
  9159. } else if (namespace === "mathml" || isTargetMathML(target)) {
  9160. namespace = "mathml";
  9161. }
  9162. if (dynamicChildren) {
  9163. patchBlockChildren(
  9164. n1.dynamicChildren,
  9165. dynamicChildren,
  9166. currentContainer,
  9167. parentComponent,
  9168. parentSuspense,
  9169. namespace,
  9170. slotScopeIds
  9171. );
  9172. traverseStaticChildren(n1, n2, true);
  9173. } else if (!optimized) {
  9174. patchChildren(
  9175. n1,
  9176. n2,
  9177. currentContainer,
  9178. currentAnchor,
  9179. parentComponent,
  9180. parentSuspense,
  9181. namespace,
  9182. slotScopeIds,
  9183. false
  9184. );
  9185. }
  9186. if (disabled) {
  9187. if (!wasDisabled) {
  9188. moveTeleport(
  9189. n2,
  9190. container,
  9191. mainAnchor,
  9192. internals,
  9193. 1
  9194. );
  9195. } else {
  9196. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  9197. n2.props.to = n1.props.to;
  9198. }
  9199. }
  9200. } else {
  9201. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  9202. const nextTarget = n2.target = resolveTarget(
  9203. n2.props,
  9204. querySelector
  9205. );
  9206. if (nextTarget) {
  9207. moveTeleport(
  9208. n2,
  9209. nextTarget,
  9210. null,
  9211. internals,
  9212. 0
  9213. );
  9214. } else if (true) {
  9215. warn$1(
  9216. "Invalid Teleport target on update:",
  9217. target,
  9218. `(${typeof target})`
  9219. );
  9220. }
  9221. } else if (wasDisabled) {
  9222. moveTeleport(
  9223. n2,
  9224. target,
  9225. targetAnchor,
  9226. internals,
  9227. 1
  9228. );
  9229. }
  9230. }
  9231. }
  9232. updateCssVars(n2);
  9233. },
  9234. remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  9235. const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
  9236. if (target) {
  9237. hostRemove(targetAnchor);
  9238. }
  9239. doRemove && hostRemove(anchor);
  9240. if (shapeFlag & 16) {
  9241. const shouldRemove = doRemove || !isTeleportDisabled(props);
  9242. for (let i = 0; i < children.length; i++) {
  9243. const child = children[i];
  9244. unmount(
  9245. child,
  9246. parentComponent,
  9247. parentSuspense,
  9248. shouldRemove,
  9249. !!child.dynamicChildren
  9250. );
  9251. }
  9252. }
  9253. },
  9254. move: moveTeleport,
  9255. hydrate: hydrateTeleport
  9256. };
  9257. Teleport = TeleportImpl;
  9258. Fragment = Symbol.for("v-fgt");
  9259. Text = Symbol.for("v-txt");
  9260. Comment = Symbol.for("v-cmt");
  9261. Static = Symbol.for("v-stc");
  9262. blockStack = [];
  9263. currentBlock = null;
  9264. isBlockTreeEnabled = 1;
  9265. createVNodeWithArgsTransform = (...args) => {
  9266. return _createVNode(
  9267. ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
  9268. );
  9269. };
  9270. normalizeKey = ({ key }) => key != null ? key : null;
  9271. normalizeRef = ({
  9272. ref: ref2,
  9273. ref_key,
  9274. ref_for
  9275. }) => {
  9276. if (typeof ref2 === "number") {
  9277. ref2 = "" + ref2;
  9278. }
  9279. return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  9280. };
  9281. createVNode = true ? createVNodeWithArgsTransform : _createVNode;
  9282. emptyAppContext = createAppContext();
  9283. uid = 0;
  9284. currentInstance = null;
  9285. getCurrentInstance = () => currentInstance || currentRenderingInstance;
  9286. {
  9287. const g = getGlobalThis();
  9288. const registerGlobalSetter = (key, setter) => {
  9289. let setters;
  9290. if (!(setters = g[key]))
  9291. setters = g[key] = [];
  9292. setters.push(setter);
  9293. return (v) => {
  9294. if (setters.length > 1)
  9295. setters.forEach((set2) => set2(v));
  9296. else
  9297. setters[0](v);
  9298. };
  9299. };
  9300. internalSetCurrentInstance = registerGlobalSetter(
  9301. `__VUE_INSTANCE_SETTERS__`,
  9302. (v) => currentInstance = v
  9303. );
  9304. setInSSRSetupState = registerGlobalSetter(
  9305. `__VUE_SSR_SETTERS__`,
  9306. (v) => isInSSRComponentSetup = v
  9307. );
  9308. }
  9309. setCurrentInstance = (instance) => {
  9310. const prev = currentInstance;
  9311. internalSetCurrentInstance(instance);
  9312. instance.scope.on();
  9313. return () => {
  9314. instance.scope.off();
  9315. internalSetCurrentInstance(prev);
  9316. };
  9317. };
  9318. unsetCurrentInstance = () => {
  9319. currentInstance && currentInstance.scope.off();
  9320. internalSetCurrentInstance(null);
  9321. };
  9322. isBuiltInTag = makeMap("slot,component");
  9323. isInSSRComponentSetup = false;
  9324. isRuntimeOnly = () => !compile;
  9325. attrsProxyHandlers = true ? {
  9326. get(target, key) {
  9327. markAttrsAccessed();
  9328. track(target, "get", "");
  9329. return target[key];
  9330. },
  9331. set() {
  9332. warn$1(`setupContext.attrs is readonly.`);
  9333. return false;
  9334. },
  9335. deleteProperty() {
  9336. warn$1(`setupContext.attrs is readonly.`);
  9337. return false;
  9338. }
  9339. } : {
  9340. get(target, key) {
  9341. track(target, "get", "");
  9342. return target[key];
  9343. }
  9344. };
  9345. classifyRE = /(?:^|[-_])(\w)/g;
  9346. classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  9347. computed2 = (getterOrOptions, debugOptions) => {
  9348. const c = computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
  9349. if (true) {
  9350. const i = getCurrentInstance();
  9351. if (i && i.appContext.config.warnRecursiveComputed) {
  9352. c._warnRecursive = true;
  9353. }
  9354. }
  9355. return c;
  9356. };
  9357. version = "3.4.27";
  9358. warn2 = true ? warn$1 : NOOP;
  9359. ErrorTypeStrings = ErrorTypeStrings$1;
  9360. devtools = true ? devtools$1 : void 0;
  9361. setDevtoolsHook = true ? setDevtoolsHook$1 : NOOP;
  9362. _ssrUtils = {
  9363. createComponentInstance,
  9364. setupComponent,
  9365. renderComponentRoot,
  9366. setCurrentRenderingInstance,
  9367. isVNode,
  9368. normalizeVNode
  9369. };
  9370. ssrUtils = _ssrUtils;
  9371. resolveFilter = null;
  9372. compatUtils = null;
  9373. DeprecationTypes = null;
  9374. }
  9375. });
  9376. export {
  9377. EffectScope,
  9378. effectScope,
  9379. getCurrentScope,
  9380. onScopeDispose,
  9381. ReactiveEffect,
  9382. effect,
  9383. stop,
  9384. reactive,
  9385. shallowReactive,
  9386. readonly,
  9387. shallowReadonly,
  9388. isReactive,
  9389. isReadonly,
  9390. isShallow,
  9391. isProxy,
  9392. toRaw,
  9393. markRaw,
  9394. isRef,
  9395. ref,
  9396. shallowRef,
  9397. triggerRef,
  9398. unref,
  9399. toValue,
  9400. proxyRefs,
  9401. customRef,
  9402. toRefs,
  9403. toRef,
  9404. TrackOpTypes,
  9405. TriggerOpTypes,
  9406. assertNumber,
  9407. ErrorCodes,
  9408. callWithErrorHandling,
  9409. callWithAsyncErrorHandling,
  9410. handleError,
  9411. nextTick,
  9412. queuePostFlushCb,
  9413. pushScopeId,
  9414. popScopeId,
  9415. withScopeId,
  9416. withCtx,
  9417. resolveComponent,
  9418. resolveDynamicComponent,
  9419. resolveDirective,
  9420. Suspense,
  9421. ssrContextKey,
  9422. useSSRContext,
  9423. watchEffect,
  9424. watchPostEffect,
  9425. watchSyncEffect,
  9426. watch,
  9427. withDirectives,
  9428. useTransitionState,
  9429. BaseTransitionPropsValidators,
  9430. BaseTransition,
  9431. resolveTransitionHooks,
  9432. setTransitionHooks,
  9433. getTransitionRawChildren,
  9434. defineComponent,
  9435. defineAsyncComponent,
  9436. KeepAlive,
  9437. onActivated,
  9438. onDeactivated,
  9439. onBeforeMount,
  9440. onMounted,
  9441. onBeforeUpdate,
  9442. onUpdated,
  9443. onBeforeUnmount,
  9444. onUnmounted,
  9445. onServerPrefetch,
  9446. onRenderTriggered,
  9447. onRenderTracked,
  9448. onErrorCaptured,
  9449. renderList,
  9450. createSlots,
  9451. renderSlot,
  9452. toHandlers,
  9453. defineProps,
  9454. defineEmits,
  9455. defineExpose,
  9456. defineOptions,
  9457. defineSlots,
  9458. defineModel,
  9459. withDefaults,
  9460. useSlots,
  9461. useAttrs,
  9462. mergeDefaults,
  9463. mergeModels,
  9464. createPropsRestProxy,
  9465. withAsyncContext,
  9466. provide,
  9467. inject,
  9468. hasInjectionContext,
  9469. createRenderer,
  9470. createHydrationRenderer,
  9471. Teleport,
  9472. Fragment,
  9473. Text,
  9474. Comment,
  9475. Static,
  9476. openBlock,
  9477. setBlockTracking,
  9478. createElementBlock,
  9479. createBlock,
  9480. isVNode,
  9481. transformVNodeArgs,
  9482. createBaseVNode,
  9483. createVNode,
  9484. guardReactiveProps,
  9485. cloneVNode,
  9486. createTextVNode,
  9487. createStaticVNode,
  9488. createCommentVNode,
  9489. mergeProps,
  9490. getCurrentInstance,
  9491. registerRuntimeCompiler,
  9492. isRuntimeOnly,
  9493. computed2 as computed,
  9494. useModel,
  9495. h,
  9496. initCustomFormatter,
  9497. withMemo,
  9498. isMemoSame,
  9499. version,
  9500. warn2 as warn,
  9501. ErrorTypeStrings,
  9502. devtools,
  9503. setDevtoolsHook,
  9504. ssrUtils,
  9505. resolveFilter,
  9506. compatUtils,
  9507. DeprecationTypes,
  9508. init_runtime_core_esm_bundler
  9509. };
  9510. /*! Bundled license information:
  9511. @vue/reactivity/dist/reactivity.esm-bundler.js:
  9512. (**
  9513. * @vue/reactivity v3.4.27
  9514. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  9515. * @license MIT
  9516. **)
  9517. @vue/runtime-core/dist/runtime-core.esm-bundler.js:
  9518. (**
  9519. * @vue/runtime-core v3.4.27
  9520. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  9521. * @license MIT
  9522. **)
  9523. (*! #__NO_SIDE_EFFECTS__ *)
  9524. */
  9525. //# sourceMappingURL=chunk-YVHZHMSQ.js.map