chunk-J6475X5X.js 307 KB

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