runtime-core.esm-bundler.js 255 KB

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