UNPKG

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