var _a2; (function polyfill() { const relList = document.createElement("link").relList; if (relList && relList.supports && relList.supports("modulepreload")) { return; } for (const link4 of document.querySelectorAll('link[rel="modulepreload"]')) { processPreload(link4); } new MutationObserver((mutations) => { for (const mutation of mutations) { if (mutation.type !== "childList") { continue; } for (const node of mutation.addedNodes) { if (node.tagName === "LINK" && node.rel === "modulepreload") processPreload(node); } } }).observe(document, { childList: true, subtree: true }); function getFetchOpts(link4) { const fetchOpts = {}; if (link4.integrity) fetchOpts.integrity = link4.integrity; if (link4.referrerPolicy) fetchOpts.referrerPolicy = link4.referrerPolicy; if (link4.crossOrigin === "use-credentials") fetchOpts.credentials = "include"; else if (link4.crossOrigin === "anonymous") fetchOpts.credentials = "omit"; else fetchOpts.credentials = "same-origin"; return fetchOpts; } function processPreload(link4) { if (link4.ep) return; link4.ep = true; const fetchOpts = getFetchOpts(link4); fetch(link4.href, fetchOpts); } })(); function makeMap(str, expectsLowerCase) { const map2 = /* @__PURE__ */ Object.create(null); const list3 = str.split(","); for (let i = 0; i < list3.length; i++) { map2[list3[i]] = true; } return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val]; } function normalizeStyle(value) { if (isArray$2(value)) { const res = {}; for (let i = 0; i < value.length; i++) { const item = value[i]; const normalized = isString$4(item) ? parseStringStyle(item) : normalizeStyle(item); if (normalized) { for (const key in normalized) { res[key] = normalized[key]; } } } return res; } else if (isString$4(value)) { return value; } else if (isObject$6(value)) { return value; } } const listDelimiterRE = /;(?![^(]*\))/g; const propertyDelimiterRE = /:([^]+)/; const styleCommentRE = /\/\*.*?\*\//gs; function parseStringStyle(cssText) { const ret = {}; cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { if (item) { const tmp = item.split(propertyDelimiterRE); tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); } }); return ret; } function normalizeClass(value) { let res = ""; if (isString$4(value)) { res = value; } else if (isArray$2(value)) { for (let i = 0; i < value.length; i++) { const normalized = normalizeClass(value[i]); if (normalized) { res += normalized + " "; } } } else if (isObject$6(value)) { for (const name2 in value) { if (value[name2]) { res += name2 + " "; } } } return res.trim(); } function normalizeProps(props) { if (!props) return null; let { class: klass, style } = props; if (klass && !isString$4(klass)) { props.class = normalizeClass(klass); } if (style) { props.style = normalizeStyle(style); } return props; } const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); function includeBooleanAttr(value) { return !!value || value === ""; } function looseCompareArrays(a2, b2) { if (a2.length !== b2.length) return false; let equal = true; for (let i = 0; equal && i < a2.length; i++) { equal = looseEqual(a2[i], b2[i]); } return equal; } function looseEqual(a2, b2) { if (a2 === b2) return true; let aValidType = isDate$1(a2); let bValidType = isDate$1(b2); if (aValidType || bValidType) { return aValidType && bValidType ? a2.getTime() === b2.getTime() : false; } aValidType = isSymbol(a2); bValidType = isSymbol(b2); if (aValidType || bValidType) { return a2 === b2; } aValidType = isArray$2(a2); bValidType = isArray$2(b2); if (aValidType || bValidType) { return aValidType && bValidType ? looseCompareArrays(a2, b2) : false; } aValidType = isObject$6(a2); bValidType = isObject$6(b2); if (aValidType || bValidType) { if (!aValidType || !bValidType) { return false; } const aKeysCount = Object.keys(a2).length; const bKeysCount = Object.keys(b2).length; if (aKeysCount !== bKeysCount) { return false; } for (const key in a2) { const aHasKey = a2.hasOwnProperty(key); const bHasKey = b2.hasOwnProperty(key); if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key])) { return false; } } } return String(a2) === String(b2); } function looseIndexOf(arr, val) { return arr.findIndex((item) => looseEqual(item, val)); } const toDisplayString$1 = (val) => { return isString$4(val) ? val : val == null ? "" : isArray$2(val) || isObject$6(val) && (val.toString === objectToString$2 || !isFunction$4(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); }; const replacer = (_key, val) => { if (val && val.__v_isRef) { return replacer(_key, val.value); } else if (isMap(val)) { return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { entries[`${key} =>`] = val2; return entries; }, {}) }; } else if (isSet(val)) { return { [`Set(${val.size})`]: [...val.values()] }; } else if (isObject$6(val) && !isArray$2(val) && !isPlainObject$4(val)) { return String(val); } return val; }; const EMPTY_OBJ = {}; const EMPTY_ARR = []; const NOOP = () => { }; const NO = () => false; const onRE = /^on[^a-z]/; const isOn = (key) => onRE.test(key); const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el2) => { const i = arr.indexOf(el2); if (i > -1) { arr.splice(i, 1); } }; const hasOwnProperty$5 = Object.prototype.hasOwnProperty; const hasOwn$1 = (val, key) => hasOwnProperty$5.call(val, key); const isArray$2 = Array.isArray; const isMap = (val) => toTypeString$1(val) === "[object Map]"; const isSet = (val) => toTypeString$1(val) === "[object Set]"; const isDate$1 = (val) => toTypeString$1(val) === "[object Date]"; const isFunction$4 = (val) => typeof val === "function"; const isString$4 = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; const isObject$6 = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { return isObject$6(val) && isFunction$4(val.then) && isFunction$4(val.catch); }; const objectToString$2 = Object.prototype.toString; const toTypeString$1 = (value) => objectToString$2.call(value); const toRawType = (value) => { return toTypeString$1(value).slice(8, -1); }; const isPlainObject$4 = (val) => toTypeString$1(val) === "[object Object]"; const isIntegerKey = (key) => isString$4(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; const isReservedProp = /* @__PURE__ */ makeMap( // the leading comma is intentional so empty string "" is also included ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" ); const cacheStringFunction = (fn2) => { const cache2 = /* @__PURE__ */ Object.create(null); return (str) => { const hit = cache2[str]; return hit || (cache2[str] = fn2(str)); }; }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction((str) => { return str.replace(camelizeRE, (_2, c2) => c2 ? c2.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { for (let i = 0; i < fns.length; i++) { fns[i](arg); } }; const def = (obj, key, value) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, value }); }; const looseToNumber = (val) => { const n = parseFloat(val); return isNaN(n) ? val : n; }; const toNumber = (val) => { const n = isString$4(val) ? Number(val) : NaN; return isNaN(n) ? val : n; }; let _globalThis$3; const getGlobalThis$1 = () => { return _globalThis$3 || (_globalThis$3 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; let activeEffectScope; class EffectScope { constructor(detached = false) { this.detached = detached; this._active = true; this.effects = []; this.cleanups = []; this.parent = activeEffectScope; if (!detached && activeEffectScope) { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; } } get active() { return this._active; } run(fn2) { if (this._active) { const currentEffectScope = activeEffectScope; try { activeEffectScope = this; return fn2(); } finally { activeEffectScope = currentEffectScope; } } } /** * This should only be called on non-detached scopes * @internal */ on() { activeEffectScope = this; } /** * This should only be called on non-detached scopes * @internal */ off() { activeEffectScope = this.parent; } stop(fromParent) { if (this._active) { let i, l2; for (i = 0, l2 = this.effects.length; i < l2; i++) { this.effects[i].stop(); } for (i = 0, l2 = this.cleanups.length; i < l2; i++) { this.cleanups[i](); } if (this.scopes) { for (i = 0, l2 = this.scopes.length; i < l2; i++) { this.scopes[i].stop(true); } } if (!this.detached && this.parent && !fromParent) { const last = this.parent.scopes.pop(); if (last && last !== this) { this.parent.scopes[this.index] = last; last.index = this.index; } } this.parent = void 0; this._active = false; } } } function effectScope(detached) { return new EffectScope(detached); } function recordEffectScope(effect2, scope = activeEffectScope) { if (scope && scope.active) { scope.effects.push(effect2); } } function getCurrentScope() { return activeEffectScope; } function onScopeDispose(fn2) { if (activeEffectScope) { activeEffectScope.cleanups.push(fn2); } } const createDep = (effects) => { const dep = new Set(effects); dep.w = 0; dep.n = 0; return dep; }; const wasTracked = (dep) => (dep.w & trackOpBit) > 0; const newTracked = (dep) => (dep.n & trackOpBit) > 0; const initDepMarkers = ({ deps }) => { if (deps.length) { for (let i = 0; i < deps.length; i++) { deps[i].w |= trackOpBit; } } }; const finalizeDepMarkers = (effect2) => { const { deps } = effect2; if (deps.length) { let ptr = 0; for (let i = 0; i < deps.length; i++) { const dep = deps[i]; if (wasTracked(dep) && !newTracked(dep)) { dep.delete(effect2); } else { deps[ptr++] = dep; } dep.w &= ~trackOpBit; dep.n &= ~trackOpBit; } deps.length = ptr; } }; const targetMap = /* @__PURE__ */ new WeakMap(); let effectTrackDepth = 0; let trackOpBit = 1; const maxMarkerBits = 30; let activeEffect; const ITERATE_KEY = Symbol(""); const MAP_KEY_ITERATE_KEY = Symbol(""); class ReactiveEffect { constructor(fn2, scheduler = null, scope) { this.fn = fn2; this.scheduler = scheduler; this.active = true; this.deps = []; this.parent = void 0; recordEffectScope(this, scope); } run() { if (!this.active) { return this.fn(); } let parent = activeEffect; let lastShouldTrack = shouldTrack; while (parent) { if (parent === this) { return; } parent = parent.parent; } try { this.parent = activeEffect; activeEffect = this; shouldTrack = true; trackOpBit = 1 << ++effectTrackDepth; if (effectTrackDepth <= maxMarkerBits) { initDepMarkers(this); } else { cleanupEffect(this); } return this.fn(); } finally { if (effectTrackDepth <= maxMarkerBits) { finalizeDepMarkers(this); } trackOpBit = 1 << --effectTrackDepth; activeEffect = this.parent; shouldTrack = lastShouldTrack; this.parent = void 0; if (this.deferStop) { this.stop(); } } } stop() { if (activeEffect === this) { this.deferStop = true; } else if (this.active) { cleanupEffect(this); if (this.onStop) { this.onStop(); } this.active = false; } } } function cleanupEffect(effect2) { const { deps } = effect2; if (deps.length) { for (let i = 0; i < deps.length; i++) { deps[i].delete(effect2); } deps.length = 0; } } let shouldTrack = true; const trackStack = []; function pauseTracking() { trackStack.push(shouldTrack); shouldTrack = false; } function resetTracking() { const last = trackStack.pop(); shouldTrack = last === void 0 ? true : last; } function track(target2, type2, key) { if (shouldTrack && activeEffect) { let depsMap = targetMap.get(target2); if (!depsMap) { targetMap.set(target2, depsMap = /* @__PURE__ */ new Map()); } let dep = depsMap.get(key); if (!dep) { depsMap.set(key, dep = createDep()); } trackEffects(dep); } } function trackEffects(dep, debuggerEventExtraInfo) { let shouldTrack2 = false; if (effectTrackDepth <= maxMarkerBits) { if (!newTracked(dep)) { dep.n |= trackOpBit; shouldTrack2 = !wasTracked(dep); } } else { shouldTrack2 = !dep.has(activeEffect); } if (shouldTrack2) { dep.add(activeEffect); activeEffect.deps.push(dep); } } function trigger(target2, type2, key, newValue, oldValue, oldTarget) { const depsMap = targetMap.get(target2); if (!depsMap) { return; } let deps = []; if (type2 === "clear") { deps = [...depsMap.values()]; } else if (key === "length" && isArray$2(target2)) { const newLength = Number(newValue); depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 >= newLength) { deps.push(dep); } }); } else { if (key !== void 0) { deps.push(depsMap.get(key)); } switch (type2) { case "add": if (!isArray$2(target2)) { deps.push(depsMap.get(ITERATE_KEY)); if (isMap(target2)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } else if (isIntegerKey(key)) { deps.push(depsMap.get("length")); } break; case "delete": if (!isArray$2(target2)) { deps.push(depsMap.get(ITERATE_KEY)); if (isMap(target2)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } break; case "set": if (isMap(target2)) { deps.push(depsMap.get(ITERATE_KEY)); } break; } } if (deps.length === 1) { if (deps[0]) { { triggerEffects(deps[0]); } } } else { const effects = []; for (const dep of deps) { if (dep) { effects.push(...dep); } } { triggerEffects(createDep(effects)); } } } function triggerEffects(dep, debuggerEventExtraInfo) { const effects = isArray$2(dep) ? dep : [...dep]; for (const effect2 of effects) { if (effect2.computed) { triggerEffect(effect2); } } for (const effect2 of effects) { if (!effect2.computed) { triggerEffect(effect2); } } } function triggerEffect(effect2, debuggerEventExtraInfo) { if (effect2 !== activeEffect || effect2.allowRecurse) { if (effect2.scheduler) { effect2.scheduler(); } else { effect2.run(); } } } function getDepFromReactive(object, key) { var _a3; return (_a3 = targetMap.get(object)) === null || _a3 === void 0 ? void 0 : _a3.get(key); } const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) ); const get$1 = /* @__PURE__ */ createGetter(); const shallowGet = /* @__PURE__ */ createGetter(false, true); const readonlyGet = /* @__PURE__ */ createGetter(true); const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { const instrumentations = {}; ["includes", "indexOf", "lastIndexOf"].forEach((key) => { instrumentations[key] = function(...args) { const arr = toRaw(this); for (let i = 0, l2 = this.length; i < l2; i++) { track(arr, "get", i + ""); } const res = arr[key](...args); if (res === -1 || res === false) { return arr[key](...args.map(toRaw)); } else { return res; } }; }); ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { instrumentations[key] = function(...args) { pauseTracking(); const res = toRaw(this)[key].apply(this, args); resetTracking(); return res; }; }); return instrumentations; } function hasOwnProperty$4(key) { const obj = toRaw(this); track(obj, "has", key); return obj.hasOwnProperty(key); } function createGetter(isReadonly2 = false, shallow = false) { return function get2(target2, key, receiver) { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_isShallow") { return shallow; } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target2)) { return target2; } const targetIsArray = isArray$2(target2); if (!isReadonly2) { if (targetIsArray && hasOwn$1(arrayInstrumentations, key)) { return Reflect.get(arrayInstrumentations, key, receiver); } if (key === "hasOwnProperty") { return hasOwnProperty$4; } } const res = Reflect.get(target2, key, receiver); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } if (!isReadonly2) { track(target2, "get", key); } if (shallow) { return res; } if (isRef(res)) { return targetIsArray && isIntegerKey(key) ? res : res.value; } if (isObject$6(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; }; } const set$1 = /* @__PURE__ */ createSetter(); const shallowSet = /* @__PURE__ */ createSetter(true); function createSetter(shallow = false) { return function set3(target2, key, value, receiver) { let oldValue = target2[key]; if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { return false; } if (!shallow) { if (!isShallow(value) && !isReadonly(value)) { oldValue = toRaw(oldValue); value = toRaw(value); } if (!isArray$2(target2) && isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } } const hadKey = isArray$2(target2) && isIntegerKey(key) ? Number(key) < target2.length : hasOwn$1(target2, key); const result = Reflect.set(target2, key, value, receiver); if (target2 === toRaw(receiver)) { if (!hadKey) { trigger(target2, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target2, "set", key, value); } } return result; }; } function deleteProperty(target2, key) { const hadKey = hasOwn$1(target2, key); target2[key]; const result = Reflect.deleteProperty(target2, key); if (result && hadKey) { trigger(target2, "delete", key, void 0); } return result; } function has$1$1(target2, key) { const result = Reflect.has(target2, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { track(target2, "has", key); } return result; } function ownKeys(target2) { track(target2, "iterate", isArray$2(target2) ? "length" : ITERATE_KEY); return Reflect.ownKeys(target2); } const mutableHandlers = { get: get$1, set: set$1, deleteProperty, has: has$1$1, ownKeys }; const readonlyHandlers = { get: readonlyGet, set(target2, key) { return true; }, deleteProperty(target2, key) { return true; } }; const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { get: shallowGet, set: shallowSet }); const toShallow = (value) => value; const getProto = (v2) => Reflect.getPrototypeOf(v2); function get$2(target2, key, isReadonly2 = false, isShallow2 = false) { target2 = target2[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target2); const rawKey = toRaw(key); if (!isReadonly2) { if (key !== rawKey) { track(rawTarget, "get", key); } track(rawTarget, "get", rawKey); } const { has: has2 } = getProto(rawTarget); const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; if (has2.call(rawTarget, key)) { return wrap2(target2.get(key)); } else if (has2.call(rawTarget, rawKey)) { return wrap2(target2.get(rawKey)); } else if (target2 !== rawTarget) { target2.get(key); } } function has$2(key, isReadonly2 = false) { const target2 = this[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target2); const rawKey = toRaw(key); if (!isReadonly2) { if (key !== rawKey) { track(rawTarget, "has", key); } track(rawTarget, "has", rawKey); } return key === rawKey ? target2.has(key) : target2.has(key) || target2.has(rawKey); } function size$1(target2, isReadonly2 = false) { target2 = target2[ "__v_raw" /* ReactiveFlags.RAW */ ]; !isReadonly2 && track(toRaw(target2), "iterate", ITERATE_KEY); return Reflect.get(target2, "size", target2); } function add(value) { value = toRaw(value); const target2 = toRaw(this); const proto2 = getProto(target2); const hadKey = proto2.has.call(target2, value); if (!hadKey) { target2.add(value); trigger(target2, "add", value, value); } return this; } function set$2(key, value) { value = toRaw(value); const target2 = toRaw(this); const { has: has2, get: get2 } = getProto(target2); let hadKey = has2.call(target2, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target2, key); } const oldValue = get2.call(target2, key); target2.set(key, value); if (!hadKey) { trigger(target2, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target2, "set", key, value); } return this; } function deleteEntry(key) { const target2 = toRaw(this); const { has: has2, get: get2 } = getProto(target2); let hadKey = has2.call(target2, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target2, key); } get2 ? get2.call(target2, key) : void 0; const result = target2.delete(key); if (hadKey) { trigger(target2, "delete", key, void 0); } return result; } function clear() { const target2 = toRaw(this); const hadItems = target2.size !== 0; const result = target2.clear(); if (hadItems) { trigger(target2, "clear", void 0, void 0); } return result; } function createForEach(isReadonly2, isShallow2) { return function forEach(callback, thisArg) { const observed = this; const target2 = observed[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target2); const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); return target2.forEach((value, key) => { return callback.call(thisArg, wrap2(value), wrap2(key), observed); }); }; } function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target2 = this[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target2); const targetIsMap = isMap(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target2[method](...args); const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); return { // iterator protocol next() { const { value, done } = innerIterator.next(); return done ? { value, done } : { value: isPair ? [wrap2(value[0]), wrap2(value[1])] : wrap2(value), done }; }, // iterable protocol [Symbol.iterator]() { return this; } }; }; } function createReadonlyMethod(type2) { return function(...args) { return type2 === "delete" ? false : this; }; } function createInstrumentations() { const mutableInstrumentations2 = { get(key) { return get$2(this, key); }, get size() { return size$1(this); }, has: has$2, add, set: set$2, delete: deleteEntry, clear, forEach: createForEach(false, false) }; const shallowInstrumentations2 = { get(key) { return get$2(this, key, false, true); }, get size() { return size$1(this); }, has: has$2, add, set: set$2, delete: deleteEntry, clear, forEach: createForEach(false, true) }; const readonlyInstrumentations2 = { get(key) { return get$2(this, key, true); }, get size() { return size$1(this, true); }, has(key) { return has$2.call(this, key, true); }, add: createReadonlyMethod( "add" /* TriggerOpTypes.ADD */ ), set: createReadonlyMethod( "set" /* TriggerOpTypes.SET */ ), delete: createReadonlyMethod( "delete" /* TriggerOpTypes.DELETE */ ), clear: createReadonlyMethod( "clear" /* TriggerOpTypes.CLEAR */ ), forEach: createForEach(true, false) }; const shallowReadonlyInstrumentations2 = { get(key) { return get$2(this, key, true, true); }, get size() { return size$1(this, true); }, has(key) { return has$2.call(this, key, true); }, add: createReadonlyMethod( "add" /* TriggerOpTypes.ADD */ ), set: createReadonlyMethod( "set" /* TriggerOpTypes.SET */ ), delete: createReadonlyMethod( "delete" /* TriggerOpTypes.DELETE */ ), clear: createReadonlyMethod( "clear" /* TriggerOpTypes.CLEAR */ ), forEach: createForEach(true, true) }; const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; iteratorMethods.forEach((method) => { mutableInstrumentations2[method] = createIterableMethod(method, false, false); readonlyInstrumentations2[method] = createIterableMethod(method, true, false); shallowInstrumentations2[method] = createIterableMethod(method, false, true); shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); }); return [ mutableInstrumentations2, readonlyInstrumentations2, shallowInstrumentations2, shallowReadonlyInstrumentations2 ]; } const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly2, shallow) { const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; return (target2, key, receiver) => { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_raw") { return target2; } return Reflect.get(hasOwn$1(instrumentations, key) && key in target2 ? instrumentations : target2, key, receiver); }; } const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const reactiveMap = /* @__PURE__ */ new WeakMap(); const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); const readonlyMap = /* @__PURE__ */ new WeakMap(); const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { switch (rawType) { case "Object": case "Array": return 1; case "Map": case "Set": case "WeakMap": case "WeakSet": return 2; default: return 0; } } function getTargetType(value) { return value[ "__v_skip" /* ReactiveFlags.SKIP */ ] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); } function reactive(target2) { if (isReadonly(target2)) { return target2; } return createReactiveObject(target2, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); } function shallowReactive(target2) { return createReactiveObject(target2, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); } function readonly(target2) { return createReactiveObject(target2, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); } function createReactiveObject(target2, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { if (!isObject$6(target2)) { return target2; } if (target2[ "__v_raw" /* ReactiveFlags.RAW */ ] && !(isReadonly2 && target2[ "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */ ])) { return target2; } const existingProxy = proxyMap.get(target2); if (existingProxy) { return existingProxy; } const targetType = getTargetType(target2); if (targetType === 0) { return target2; } const proxy = new Proxy(target2, targetType === 2 ? collectionHandlers : baseHandlers); proxyMap.set(target2, proxy); return proxy; } function isReactive(value) { if (isReadonly(value)) { return isReactive(value[ "__v_raw" /* ReactiveFlags.RAW */ ]); } return !!(value && value[ "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */ ]); } function isReadonly(value) { return !!(value && value[ "__v_isReadonly" /* ReactiveFlags.IS_READONLY */ ]); } function isShallow(value) { return !!(value && value[ "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */ ]); } function isProxy(value) { return isReactive(value) || isReadonly(value); } function toRaw(observed) { const raw = observed && observed[ "__v_raw" /* ReactiveFlags.RAW */ ]; return raw ? toRaw(raw) : observed; } function markRaw(value) { def(value, "__v_skip", true); return value; } const toReactive = (value) => isObject$6(value) ? reactive(value) : value; const toReadonly = (value) => isObject$6(value) ? readonly(value) : value; function trackRefValue(ref2) { if (shouldTrack && activeEffect) { ref2 = toRaw(ref2); { trackEffects(ref2.dep || (ref2.dep = createDep())); } } } function triggerRefValue(ref2, newVal) { ref2 = toRaw(ref2); const dep = ref2.dep; if (dep) { { triggerEffects(dep); } } } function isRef(r2) { return !!(r2 && r2.__v_isRef === true); } function ref(value) { return createRef(value, false); } function shallowRef(value) { return createRef(value, true); } function createRef(rawValue, shallow) { if (isRef(rawValue)) { return rawValue; } return new RefImpl(rawValue, shallow); } class RefImpl { constructor(value, __v_isShallow) { this.__v_isShallow = __v_isShallow; this.dep = void 0; this.__v_isRef = true; this._rawValue = __v_isShallow ? value : toRaw(value); this._value = __v_isShallow ? value : toReactive(value); } get value() { trackRefValue(this); return this._value; } set value(newVal) { const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); newVal = useDirectValue ? newVal : toRaw(newVal); if (hasChanged(newVal, this._rawValue)) { this._rawValue = newVal; this._value = useDirectValue ? newVal : toReactive(newVal); triggerRefValue(this); } } } function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; } const shallowUnwrapHandlers = { get: (target2, key, receiver) => unref(Reflect.get(target2, key, receiver)), set: (target2, key, value, receiver) => { const oldValue = target2[key]; if (isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } else { return Reflect.set(target2, key, value, receiver); } } }; function proxyRefs(objectWithRefs) { return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); } function toRefs(object) { const ret = isArray$2(object) ? new Array(object.length) : {}; for (const key in object) { ret[key] = toRef(object, key); } return ret; } class ObjectRefImpl { constructor(_object, _key, _defaultValue) { this._object = _object; this._key = _key; this._defaultValue = _defaultValue; this.__v_isRef = true; } get value() { const val = this._object[this._key]; return val === void 0 ? this._defaultValue : val; } set value(newVal) { this._object[this._key] = newVal; } get dep() { return getDepFromReactive(toRaw(this._object), this._key); } } function toRef(object, key, defaultValue) { const val = object[key]; return isRef(val) ? val : new ObjectRefImpl(object, key, defaultValue); } var _a$1$2; class ComputedRefImpl { constructor(getter, _setter, isReadonly2, isSSR) { this._setter = _setter; this.dep = void 0; this.__v_isRef = true; this[_a$1$2] = false; this._dirty = true; this.effect = new ReactiveEffect(getter, () => { if (!this._dirty) { this._dirty = true; triggerRefValue(this); } }); this.effect.computed = this; this.effect.active = this._cacheable = !isSSR; this[ "__v_isReadonly" /* ReactiveFlags.IS_READONLY */ ] = isReadonly2; } get value() { const self2 = toRaw(this); trackRefValue(self2); if (self2._dirty || !self2._cacheable) { self2._dirty = false; self2._value = self2.effect.run(); } return self2._value; } set value(newValue) { this._setter(newValue); } } _a$1$2 = "__v_isReadonly"; function computed$1(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; const onlyGetter = isFunction$4(getterOrOptions); if (onlyGetter) { getter = getterOrOptions; setter = NOOP; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; } const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); return cRef; } function warn$1(msg, ...args) { return; } function callWithErrorHandling(fn2, instance, type2, args) { let res; try { res = args ? fn2(...args) : fn2(); } catch (err) { handleError(err, instance, type2); } return res; } function callWithAsyncErrorHandling(fn2, instance, type2, args) { if (isFunction$4(fn2)) { const res = callWithErrorHandling(fn2, instance, type2, args); if (res && isPromise(res)) { res.catch((err) => { handleError(err, instance, type2); }); } return res; } const values = []; for (let i = 0; i < fn2.length; i++) { values.push(callWithAsyncErrorHandling(fn2[i], instance, type2, args)); } return values; } function handleError(err, instance, type2, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; const errorInfo = type2; while (cur) { const errorCapturedHooks = cur.ec; if (errorCapturedHooks) { for (let i = 0; i < errorCapturedHooks.length; i++) { if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; } } } cur = cur.parent; } const appErrorHandler = instance.appContext.config.errorHandler; if (appErrorHandler) { callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); return; } } logError(err, type2, contextVNode, throwInDev); } function logError(err, type2, contextVNode, throwInDev = true) { { console.error(err); } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; function nextTick(fn2) { const p2 = currentFlushPromise || resolvedPromise; return fn2 ? p2.then(this ? fn2.bind(this) : fn2) : p2; } function findInsertionIndex(id2) { let start2 = flushIndex + 1; let end2 = queue.length; while (start2 < end2) { const middle = start2 + end2 >>> 1; const middleJobId = getId$1(queue[middle]); middleJobId < id2 ? start2 = middle + 1 : end2 = middle; } return start2; } function queueJob(job) { if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) { if (job.id == null) { queue.push(job); } else { queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); } } function queueFlush() { if (!isFlushing && !isFlushPending) { isFlushPending = true; currentFlushPromise = resolvedPromise.then(flushJobs); } } function invalidateJob(job) { const i = queue.indexOf(job); if (i > flushIndex) { queue.splice(i, 1); } } function queuePostFlushCb(cb) { if (!isArray$2(cb)) { if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) { pendingPostFlushCbs.push(cb); } } else { pendingPostFlushCbs.push(...cb); } queueFlush(); } function flushPreFlushCbs(seen2, i = isFlushing ? flushIndex + 1 : 0) { for (; i < queue.length; i++) { const cb = queue[i]; if (cb && cb.pre) { queue.splice(i, 1); i--; cb(); } } } function flushPostFlushCbs(seen2) { if (pendingPostFlushCbs.length) { const deduped = [...new Set(pendingPostFlushCbs)]; pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { activePostFlushCbs.push(...deduped); return; } activePostFlushCbs = deduped; activePostFlushCbs.sort((a2, b2) => getId$1(a2) - getId$1(b2)); for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { activePostFlushCbs[postFlushIndex](); } activePostFlushCbs = null; postFlushIndex = 0; } } const getId$1 = (job) => job.id == null ? Infinity : job.id; const comparator = (a2, b2) => { const diff = getId$1(a2) - getId$1(b2); if (diff === 0) { if (a2.pre && !b2.pre) return -1; if (b2.pre && !a2.pre) return 1; } return diff; }; function flushJobs(seen2) { isFlushPending = false; isFlushing = true; queue.sort(comparator); const check2 = NOOP; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; if (job && job.active !== false) { if (false) ; callWithErrorHandling( job, null, 14 /* ErrorCodes.SCHEDULER */ ); } } } finally { flushIndex = 0; queue.length = 0; flushPostFlushCbs(); isFlushing = false; currentFlushPromise = null; if (queue.length || pendingPostFlushCbs.length) { flushJobs(); } } } function emit(instance, event, ...rawArgs) { if (instance.isUnmounted) return; const props = instance.vnode.props || EMPTY_OBJ; let args = rawArgs; const isModelListener2 = event.startsWith("update:"); const modelArg = isModelListener2 && event.slice(7); if (modelArg && modelArg in props) { const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; const { number: number2, trim: trim2 } = props[modifiersKey] || EMPTY_OBJ; if (trim2) { args = rawArgs.map((a2) => isString$4(a2) ? a2.trim() : a2); } if (number2) { args = rawArgs.map(looseToNumber); } } let handlerName; let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) props[handlerName = toHandlerKey(camelize(event))]; if (!handler && isModelListener2) { handler = props[handlerName = toHandlerKey(hyphenate(event))]; } if (handler) { callWithAsyncErrorHandling(handler, instance, 6, args); } const onceHandler = props[handlerName + `Once`]; if (onceHandler) { if (!instance.emitted) { instance.emitted = {}; } else if (instance.emitted[handlerName]) { return; } instance.emitted[handlerName] = true; callWithAsyncErrorHandling(onceHandler, instance, 6, args); } } function normalizeEmitsOptions(comp2, appContext, asMixin = false) { const cache2 = appContext.emitsCache; const cached = cache2.get(comp2); if (cached !== void 0) { return cached; } const raw = comp2.emits; let normalized = {}; let hasExtends = false; if (!isFunction$4(comp2)) { const extendEmits = (raw2) => { const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); if (normalizedFromExtend) { hasExtends = true; extend(normalized, normalizedFromExtend); } }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendEmits); } if (comp2.extends) { extendEmits(comp2.extends); } if (comp2.mixins) { comp2.mixins.forEach(extendEmits); } } if (!raw && !hasExtends) { if (isObject$6(comp2)) { cache2.set(comp2, null); } return null; } if (isArray$2(raw)) { raw.forEach((key) => normalized[key] = null); } else { extend(normalized, raw); } if (isObject$6(comp2)) { cache2.set(comp2, normalized); } return normalized; } function isEmitListener(options2, key) { if (!options2 || !isOn(key)) { return false; } key = key.slice(2).replace(/Once$/, ""); return hasOwn$1(options2, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options2, hyphenate(key)) || hasOwn$1(options2, key); } let currentRenderingInstance = null; let currentScopeId = null; function setCurrentRenderingInstance(instance) { const prev2 = currentRenderingInstance; currentRenderingInstance = instance; currentScopeId = instance && instance.type.__scopeId || null; return prev2; } function pushScopeId(id2) { currentScopeId = id2; } function popScopeId() { currentScopeId = null; } const withScopeId = (_id) => withCtx; function withCtx(fn2, ctx = currentRenderingInstance, isNonScopedSlot) { if (!ctx) return fn2; if (fn2._n) { return fn2; } const renderFnWithContext = (...args) => { if (renderFnWithContext._d) { setBlockTracking(-1); } const prevInstance = setCurrentRenderingInstance(ctx); let res; try { res = fn2(...args); } finally { setCurrentRenderingInstance(prevInstance); if (renderFnWithContext._d) { setBlockTracking(1); } } return res; }; renderFnWithContext._n = true; renderFnWithContext._c = true; renderFnWithContext._d = true; return renderFnWithContext; } function markAttrsAccessed() { } function renderComponentRoot(instance) { const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit: emit3, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance; let result; let fallthroughAttrs; const prev2 = setCurrentRenderingInstance(instance); try { if (vnode.shapeFlag & 4) { const proxyToUse = withProxy || proxy; result = normalizeVNode(render2.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); fallthroughAttrs = attrs; } else { const render3 = Component; if (false) ; result = normalizeVNode(render3.length > 1 ? render3(props, false ? { get attrs() { markAttrsAccessed(); return attrs; }, slots, emit: emit3 } : { attrs, slots, emit: emit3 }) : render3( props, null /* we know it doesn't need it */ )); fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); } } catch (err) { blockStack.length = 0; handleError( err, instance, 1 /* ErrorCodes.RENDER_FUNCTION */ ); result = createVNode(Comment); } let root2 = result; if (fallthroughAttrs && inheritAttrs !== false) { const keys = Object.keys(fallthroughAttrs); const { shapeFlag } = root2; if (keys.length) { if (shapeFlag & (1 | 6)) { if (propsOptions && keys.some(isModelListener)) { fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); } root2 = cloneVNode(root2, fallthroughAttrs); } } } if (vnode.dirs) { root2 = cloneVNode(root2); root2.dirs = root2.dirs ? root2.dirs.concat(vnode.dirs) : vnode.dirs; } if (vnode.transition) { root2.transition = vnode.transition; } { result = root2; } setCurrentRenderingInstance(prev2); return result; } const getFunctionalFallthrough = (attrs) => { let res; for (const key in attrs) { if (key === "class" || key === "style" || isOn(key)) { (res || (res = {}))[key] = attrs[key]; } } return res; }; const filterModelListeners = (attrs, props) => { const res = {}; for (const key in attrs) { if (!isModelListener(key) || !(key.slice(9) in props)) { res[key] = attrs[key]; } } return res; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { const { props: prevProps, children: prevChildren, component } = prevVNode; const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; const emits = component.emitsOptions; if (nextVNode.dirs || nextVNode.transition) { return true; } if (optimized && patchFlag >= 0) { if (patchFlag & 1024) { return true; } if (patchFlag & 16) { if (!prevProps) { return !!nextProps; } return hasPropsChanged(prevProps, nextProps, emits); } else if (patchFlag & 8) { const dynamicProps = nextVNode.dynamicProps; for (let i = 0; i < dynamicProps.length; i++) { const key = dynamicProps[i]; if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { return true; } } } } else { if (prevChildren || nextChildren) { if (!nextChildren || !nextChildren.$stable) { return true; } } if (prevProps === nextProps) { return false; } if (!prevProps) { return !!nextProps; } if (!nextProps) { return true; } return hasPropsChanged(prevProps, nextProps, emits); } return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { const nextKeys = Object.keys(nextProps); if (nextKeys.length !== Object.keys(prevProps).length) { return true; } for (let i = 0; i < nextKeys.length; i++) { const key = nextKeys[i]; if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { return true; } } return false; } function updateHOCHostEl({ vnode, parent }, el2) { while (parent && parent.subTree === vnode) { (vnode = parent.vnode).el = el2; parent = parent.parent; } } const isSuspense = (type2) => type2.__isSuspense; function queueEffectWithSuspense(fn2, suspense) { if (suspense && suspense.pendingBranch) { if (isArray$2(fn2)) { suspense.effects.push(...fn2); } else { suspense.effects.push(fn2); } } else { queuePostFlushCb(fn2); } } function provide(key, value) { if (!currentInstance) ; else { let provides = currentInstance.provides; const parentProvides = currentInstance.parent && currentInstance.parent.provides; if (parentProvides === provides) { provides = currentInstance.provides = Object.create(parentProvides); } provides[key] = value; } } function inject(key, defaultValue, treatDefaultAsFactory = false) { const instance = currentInstance || currentRenderingInstance; if (instance) { const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides; if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { return treatDefaultAsFactory && isFunction$4(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue; } else ; } } function watchEffect(effect2, options2) { return doWatch(effect2, null, options2); } function watchPostEffect(effect2, options2) { return doWatch(effect2, null, { flush: "post" }); } const INITIAL_WATCHER_VALUE = {}; function watch(source, cb, options2) { return doWatch(source, cb, options2); } function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null; let getter; let forceTrigger = false; let isMultiSource = false; if (isRef(source)) { getter = () => source.value; forceTrigger = isShallow(source); } else if (isReactive(source)) { getter = () => source; deep = true; } else if (isArray$2(source)) { isMultiSource = true; forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2)); getter = () => source.map((s2) => { if (isRef(s2)) { return s2.value; } else if (isReactive(s2)) { return traverse(s2); } else if (isFunction$4(s2)) { return callWithErrorHandling( s2, instance, 2 /* ErrorCodes.WATCH_GETTER */ ); } else ; }); } else if (isFunction$4(source)) { if (cb) { getter = () => callWithErrorHandling( source, instance, 2 /* ErrorCodes.WATCH_GETTER */ ); } else { getter = () => { if (instance && instance.isUnmounted) { return; } if (cleanup) { cleanup(); } return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]); }; } } else { getter = NOOP; } if (cb && deep) { const baseGetter = getter; getter = () => traverse(baseGetter()); } let cleanup; let onCleanup = (fn2) => { cleanup = effect2.onStop = () => { callWithErrorHandling( fn2, instance, 4 /* ErrorCodes.WATCH_CLEANUP */ ); }; }; let ssrCleanup; if (isInSSRComponentSetup) { onCleanup = NOOP; if (!cb) { getter(); } else if (immediate) { callWithAsyncErrorHandling(cb, instance, 3, [ getter(), isMultiSource ? [] : void 0, onCleanup ]); } if (flush === "sync") { const ctx = useSSRContext(); ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); } else { return NOOP; } } let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; const job = () => { if (!effect2.active) { return; } if (cb) { const newValue = effect2.run(); if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i) => hasChanged(v2, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { if (cleanup) { cleanup(); } callWithAsyncErrorHandling(cb, instance, 3, [ newValue, // pass undefined as the old value when it's changed for the first time oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, onCleanup ]); oldValue = newValue; } } else { effect2.run(); } }; job.allowRecurse = !!cb; let scheduler; if (flush === "sync") { scheduler = job; } else if (flush === "post") { scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); } else { job.pre = true; if (instance) job.id = instance.uid; scheduler = () => queueJob(job); } const effect2 = new ReactiveEffect(getter, scheduler); if (cb) { if (immediate) { job(); } else { oldValue = effect2.run(); } } else if (flush === "post") { queuePostRenderEffect(effect2.run.bind(effect2), instance && instance.suspense); } else { effect2.run(); } const unwatch = () => { effect2.stop(); if (instance && instance.scope) { remove(instance.scope.effects, effect2); } }; if (ssrCleanup) ssrCleanup.push(unwatch); return unwatch; } function instanceWatch(source, value, options2) { const publicThis = this.proxy; const getter = isString$4(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); let cb; if (isFunction$4(value)) { cb = value; } else { cb = value.handler; options2 = value; } const cur = currentInstance; setCurrentInstance(this); const res = doWatch(getter, cb.bind(publicThis), options2); if (cur) { setCurrentInstance(cur); } else { unsetCurrentInstance(); } return res; } function createPathGetter(ctx, path) { const segments = path.split("."); return () => { let cur = ctx; for (let i = 0; i < segments.length && cur; i++) { cur = cur[segments[i]]; } return cur; }; } function traverse(value, seen2) { if (!isObject$6(value) || value[ "__v_skip" /* ReactiveFlags.SKIP */ ]) { return value; } seen2 = seen2 || /* @__PURE__ */ new Set(); if (seen2.has(value)) { return value; } seen2.add(value); if (isRef(value)) { traverse(value.value, seen2); } else if (isArray$2(value)) { for (let i = 0; i < value.length; i++) { traverse(value[i], seen2); } } else if (isSet(value) || isMap(value)) { value.forEach((v2) => { traverse(v2, seen2); }); } else if (isPlainObject$4(value)) { for (const key in value) { traverse(value[key], seen2); } } return value; } function useTransitionState() { const state = { isMounted: false, isLeaving: false, isUnmounting: false, leavingVNodes: /* @__PURE__ */ new Map() }; onMounted(() => { state.isMounted = true; }); onBeforeUnmount(() => { state.isUnmounting = true; }); return state; } const TransitionHookValidator = [Function, Array]; const BaseTransitionImpl = { name: `BaseTransition`, props: { mode: String, appear: Boolean, persisted: Boolean, // enter onBeforeEnter: TransitionHookValidator, onEnter: TransitionHookValidator, onAfterEnter: TransitionHookValidator, onEnterCancelled: TransitionHookValidator, // leave onBeforeLeave: TransitionHookValidator, onLeave: TransitionHookValidator, onAfterLeave: TransitionHookValidator, onLeaveCancelled: TransitionHookValidator, // appear onBeforeAppear: TransitionHookValidator, onAppear: TransitionHookValidator, onAfterAppear: TransitionHookValidator, onAppearCancelled: TransitionHookValidator }, setup(props, { slots }) { const instance = getCurrentInstance(); const state = useTransitionState(); let prevTransitionKey; return () => { const children = slots.default && getTransitionRawChildren(slots.default(), true); if (!children || !children.length) { return; } let child = children[0]; if (children.length > 1) { for (const c2 of children) { if (c2.type !== Comment) { child = c2; break; } } } const rawProps = toRaw(props); const { mode } = rawProps; if (state.isLeaving) { return emptyPlaceholder(child); } const innerChild = getKeepAliveChild(child); if (!innerChild) { return emptyPlaceholder(child); } const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); setTransitionHooks(innerChild, enterHooks); const oldChild = instance.subTree; const oldInnerChild = oldChild && getKeepAliveChild(oldChild); let transitionKeyChanged = false; const { getTransitionKey } = innerChild.type; if (getTransitionKey) { const key = getTransitionKey(); if (prevTransitionKey === void 0) { prevTransitionKey = key; } else if (key !== prevTransitionKey) { prevTransitionKey = key; transitionKeyChanged = true; } } if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); setTransitionHooks(oldInnerChild, leavingHooks); if (mode === "out-in") { state.isLeaving = true; leavingHooks.afterLeave = () => { state.isLeaving = false; if (instance.update.active !== false) { instance.update(); } }; return emptyPlaceholder(child); } else if (mode === "in-out" && innerChild.type !== Comment) { leavingHooks.delayLeave = (el2, earlyRemove, delayedLeave) => { const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; el2._leaveCb = () => { earlyRemove(); el2._leaveCb = void 0; delete enterHooks.delayedLeave; }; enterHooks.delayedLeave = delayedLeave; }; } } return child; }; } }; const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { const { leavingVNodes } = state; let leavingVNodesCache = leavingVNodes.get(vnode.type); if (!leavingVNodesCache) { leavingVNodesCache = /* @__PURE__ */ Object.create(null); leavingVNodes.set(vnode.type, leavingVNodesCache); } return leavingVNodesCache; } function resolveTransitionHooks(vnode, props, state, instance) { const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; const key = String(vnode.key); const leavingVNodesCache = getLeavingNodesForType(state, vnode); const callHook2 = (hook, args) => { hook && callWithAsyncErrorHandling(hook, instance, 9, args); }; const callAsyncHook = (hook, args) => { const done = args[1]; callHook2(hook, args); if (isArray$2(hook)) { if (hook.every((hook2) => hook2.length <= 1)) done(); } else if (hook.length <= 1) { done(); } }; const hooks = { mode, persisted, beforeEnter(el2) { let hook = onBeforeEnter; if (!state.isMounted) { if (appear) { hook = onBeforeAppear || onBeforeEnter; } else { return; } } if (el2._leaveCb) { el2._leaveCb( true /* cancelled */ ); } const leavingVNode = leavingVNodesCache[key]; if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) { leavingVNode.el._leaveCb(); } callHook2(hook, [el2]); }, enter(el2) { let hook = onEnter; let afterHook = onAfterEnter; let cancelHook = onEnterCancelled; if (!state.isMounted) { if (appear) { hook = onAppear || onEnter; afterHook = onAfterAppear || onAfterEnter; cancelHook = onAppearCancelled || onEnterCancelled; } else { return; } } let called = false; const done = el2._enterCb = (cancelled) => { if (called) return; called = true; if (cancelled) { callHook2(cancelHook, [el2]); } else { callHook2(afterHook, [el2]); } if (hooks.delayedLeave) { hooks.delayedLeave(); } el2._enterCb = void 0; }; if (hook) { callAsyncHook(hook, [el2, done]); } else { done(); } }, leave(el2, remove2) { const key2 = String(vnode.key); if (el2._enterCb) { el2._enterCb( true /* cancelled */ ); } if (state.isUnmounting) { return remove2(); } callHook2(onBeforeLeave, [el2]); let called = false; const done = el2._leaveCb = (cancelled) => { if (called) return; called = true; remove2(); if (cancelled) { callHook2(onLeaveCancelled, [el2]); } else { callHook2(onAfterLeave, [el2]); } el2._leaveCb = void 0; if (leavingVNodesCache[key2] === vnode) { delete leavingVNodesCache[key2]; } }; leavingVNodesCache[key2] = vnode; if (onLeave) { callAsyncHook(onLeave, [el2, done]); } else { done(); } }, clone(vnode2) { return resolveTransitionHooks(vnode2, props, state, instance); } }; return hooks; } function emptyPlaceholder(vnode) { if (isKeepAlive(vnode)) { vnode = cloneVNode(vnode); vnode.children = null; return vnode; } } function getKeepAliveChild(vnode) { return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode; } function setTransitionHooks(vnode, hooks) { if (vnode.shapeFlag & 6 && vnode.component) { setTransitionHooks(vnode.component.subTree, hooks); } else if (vnode.shapeFlag & 128) { vnode.ssContent.transition = hooks.clone(vnode.ssContent); vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); } else { vnode.transition = hooks; } } function getTransitionRawChildren(children, keepComment = false, parentKey) { let ret = []; let keyedFragmentCount = 0; for (let i = 0; i < children.length; i++) { let child = children[i]; const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); if (child.type === Fragment) { if (child.patchFlag & 128) keyedFragmentCount++; ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); } else if (keepComment || child.type !== Comment) { ret.push(key != null ? cloneVNode(child, { key }) : child); } } if (keyedFragmentCount > 1) { for (let i = 0; i < ret.length; i++) { ret[i].patchFlag = -2; } } return ret; } function defineComponent(options2) { return isFunction$4(options2) ? { setup: options2, name: options2.name } : options2; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; function onActivated(hook, target2) { registerKeepAliveHook(hook, "a", target2); } function onDeactivated(hook, target2) { registerKeepAliveHook(hook, "da", target2); } function registerKeepAliveHook(hook, type2, target2 = currentInstance) { const wrappedHook = hook.__wdc || (hook.__wdc = () => { let current = target2; while (current) { if (current.isDeactivated) { return; } current = current.parent; } return hook(); }); injectHook(type2, wrappedHook, target2); if (target2) { let current = target2.parent; while (current && current.parent) { if (isKeepAlive(current.parent.vnode)) { injectToKeepAliveRoot(wrappedHook, type2, target2, current); } current = current.parent; } } } function injectToKeepAliveRoot(hook, type2, target2, keepAliveRoot) { const injected = injectHook( type2, hook, keepAliveRoot, true /* prepend */ ); onUnmounted(() => { remove(keepAliveRoot[type2], injected); }, target2); } function injectHook(type2, hook, target2 = currentInstance, prepend = false) { if (target2) { const hooks = target2[type2] || (target2[type2] = []); const wrappedHook = hook.__weh || (hook.__weh = (...args) => { if (target2.isUnmounted) { return; } pauseTracking(); setCurrentInstance(target2); const res = callWithAsyncErrorHandling(hook, target2, type2, args); unsetCurrentInstance(); resetTracking(); return res; }); if (prepend) { hooks.unshift(wrappedHook); } else { hooks.push(wrappedHook); } return wrappedHook; } } const createHook = (lifecycle) => (hook, target2 = currentInstance) => ( // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target2) ); const onBeforeMount = createHook( "bm" /* LifecycleHooks.BEFORE_MOUNT */ ); const onMounted = createHook( "m" /* LifecycleHooks.MOUNTED */ ); const onBeforeUpdate = createHook( "bu" /* LifecycleHooks.BEFORE_UPDATE */ ); const onUpdated = createHook( "u" /* LifecycleHooks.UPDATED */ ); const onBeforeUnmount = createHook( "bum" /* LifecycleHooks.BEFORE_UNMOUNT */ ); const onUnmounted = createHook( "um" /* LifecycleHooks.UNMOUNTED */ ); const onServerPrefetch = createHook( "sp" /* LifecycleHooks.SERVER_PREFETCH */ ); const onRenderTriggered = createHook( "rtg" /* LifecycleHooks.RENDER_TRIGGERED */ ); const onRenderTracked = createHook( "rtc" /* LifecycleHooks.RENDER_TRACKED */ ); function onErrorCaptured(hook, target2 = currentInstance) { injectHook("ec", hook, target2); } function withDirectives(vnode, directives) { const internalInstance = currentRenderingInstance; if (internalInstance === null) { return vnode; } const instance = getExposeProxy(internalInstance) || internalInstance.proxy; const bindings = vnode.dirs || (vnode.dirs = []); for (let i = 0; i < directives.length; i++) { let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; if (dir) { if (isFunction$4(dir)) { dir = { mounted: dir, updated: dir }; } if (dir.deep) { traverse(value); } bindings.push({ dir, instance, value, oldValue: void 0, arg, modifiers }); } } return vnode; } function invokeDirectiveHook(vnode, prevVNode, instance, name2) { const bindings = vnode.dirs; const oldBindings = prevVNode && prevVNode.dirs; for (let i = 0; i < bindings.length; i++) { const binding = bindings[i]; if (oldBindings) { binding.oldValue = oldBindings[i].value; } let hook = binding.dir[name2]; if (hook) { pauseTracking(); callWithAsyncErrorHandling(hook, instance, 8, [ vnode.el, binding, vnode, prevVNode ]); resetTracking(); } } } const COMPONENTS = "components"; function resolveComponent(name2, maybeSelfReference) { return resolveAsset(COMPONENTS, name2, true, maybeSelfReference) || name2; } const NULL_DYNAMIC_COMPONENT = Symbol(); function resolveDynamicComponent(component) { if (isString$4(component)) { return resolveAsset(COMPONENTS, component, false) || component; } else { return component || NULL_DYNAMIC_COMPONENT; } } function resolveAsset(type2, name2, warnMissing = true, maybeSelfReference = false) { const instance = currentRenderingInstance || currentInstance; if (instance) { const Component = instance.type; if (type2 === COMPONENTS) { const selfName = getComponentName( Component, false /* do not include inferred name to avoid breaking existing code */ ); if (selfName && (selfName === name2 || selfName === camelize(name2) || selfName === capitalize(camelize(name2)))) { return Component; } } const res = ( // local registration // check instance[type] first which is resolved for options API resolve(instance[type2] || Component[type2], name2) || // global registration resolve(instance.appContext[type2], name2) ); if (!res && maybeSelfReference) { return Component; } return res; } } function resolve(registry, name2) { return registry && (registry[name2] || registry[camelize(name2)] || registry[capitalize(camelize(name2))]); } function renderList(source, renderItem, cache2, index2) { let ret; const cached = cache2 && cache2[index2]; if (isArray$2(source) || isString$4(source)) { ret = new Array(source.length); for (let i = 0, l2 = source.length; i < l2; i++) { ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } } else if (typeof source === "number") { ret = new Array(source); for (let i = 0; i < source; i++) { ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } } else if (isObject$6(source)) { if (source[Symbol.iterator]) { ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i])); } else { const keys = Object.keys(source); ret = new Array(keys.length); for (let i = 0, l2 = keys.length; i < l2; i++) { const key = keys[i]; ret[i] = renderItem(source[key], key, i, cached && cached[i]); } } } else { ret = []; } if (cache2) { cache2[index2] = ret; } return ret; } function createSlots(slots, dynamicSlots) { for (let i = 0; i < dynamicSlots.length; i++) { const slot = dynamicSlots[i]; if (isArray$2(slot)) { for (let j2 = 0; j2 < slot.length; j2++) { slots[slot[j2].name] = slot[j2].fn; } } else if (slot) { slots[slot.name] = slot.key ? (...args) => { const res = slot.fn(...args); if (res) res.key = slot.key; return res; } : slot.fn; } } return slots; } function renderSlot(slots, name2, props = {}, fallback, noSlotted) { if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { if (name2 !== "default") props.name = name2; return createVNode("slot", props, fallback && fallback()); } let slot = slots[name2]; if (slot && slot._c) { slot._d = false; } openBlock(); const validSlotContent = slot && ensureValidVNode(slot(props)); const rendered = createBlock( Fragment, { key: props.key || // slot content array of a dynamic conditional slot may have a branch // key attached in the `createSlots` helper, respect that validSlotContent && validSlotContent.key || `_${name2}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2 /* PatchFlags.BAIL */ ); if (!noSlotted && rendered.scopeId) { rendered.slotScopeIds = [rendered.scopeId + "-s"]; } if (slot && slot._c) { slot._d = true; } return rendered; } function ensureValidVNode(vnodes) { return vnodes.some((child) => { if (!isVNode(child)) return true; if (child.type === Comment) return false; if (child.type === Fragment && !ensureValidVNode(child.children)) return false; return true; }) ? vnodes : null; } function toHandlers(obj, preserveCaseIfNecessary) { const ret = {}; for (const key in obj) { ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; } return ret; } const getPublicInstance = (i) => { if (!i) return null; if (isStatefulComponent(i)) return getExposeProxy(i) || i.proxy; return getPublicInstance(i.parent); }; const publicPropertiesMap = ( // Move PURE marker to new line to workaround compiler discarding it // due to type annotation /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { $: (i) => i, $el: (i) => i.vnode.el, $data: (i) => i.data, $props: (i) => i.props, $attrs: (i) => i.attrs, $slots: (i) => i.slots, $refs: (i) => i.refs, $parent: (i) => getPublicInstance(i.parent), $root: (i) => getPublicInstance(i.root), $emit: (i) => i.emit, $options: (i) => resolveMergedOptions(i), $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)), $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), $watch: (i) => instanceWatch.bind(i) }) ); const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$1(state, key); const PublicInstanceProxyHandlers = { get({ _: instance }, key) { const { ctx, setupState, data, props, accessCache, type: type2, appContext } = instance; let normalizedProps; if (key[0] !== "$") { const n = accessCache[key]; if (n !== void 0) { switch (n) { case 1: return setupState[key]; case 2: return data[key]; case 4: return ctx[key]; case 3: return props[key]; } } else if (hasSetupBinding(setupState, key)) { accessCache[key] = 1; return setupState[key]; } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) { accessCache[key] = 2; return data[key]; } else if ( // only cache other properties when instance has declared (thus stable) // props (normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key) ) { accessCache[key] = 3; return props[key]; } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) { accessCache[key] = 4; return ctx[key]; } else if (shouldCacheAccess) { accessCache[key] = 0; } } const publicGetter = publicPropertiesMap[key]; let cssModule, globalProperties; if (publicGetter) { if (key === "$attrs") { track(instance, "get", key); } return publicGetter(instance); } else if ( // css module (injected by vue-loader) (cssModule = type2.__cssModules) && (cssModule = cssModule[key]) ) { return cssModule; } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) { accessCache[key] = 4; return ctx[key]; } else if ( // global properties globalProperties = appContext.config.globalProperties, hasOwn$1(globalProperties, key) ) { { return globalProperties[key]; } } else ; }, set({ _: instance }, key, value) { const { data, setupState, ctx } = instance; if (hasSetupBinding(setupState, key)) { setupState[key] = value; return true; } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) { data[key] = value; return true; } else if (hasOwn$1(instance.props, key)) { return false; } if (key[0] === "$" && key.slice(1) in instance) { return false; } else { { ctx[key] = value; } } return true; }, has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { let normalizedProps; return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key); }, defineProperty(target2, key, descriptor) { if (descriptor.get != null) { target2._.accessCache[key] = 0; } else if (hasOwn$1(descriptor, "value")) { this.set(target2, key, descriptor.value, null); } return Reflect.defineProperty(target2, key, descriptor); } }; let shouldCacheAccess = true; function applyOptions(instance) { const options2 = resolveMergedOptions(instance); const publicThis = instance.proxy; const ctx = instance.ctx; shouldCacheAccess = false; if (options2.beforeCreate) { callHook$1( options2.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */ ); } const { // state data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, // lifecycle created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render: render2, renderTracked, renderTriggered, errorCaptured, serverPrefetch, // public API expose, inheritAttrs, // assets components, directives, filters } = options2; const checkDuplicateProperties = null; if (injectOptions) { resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); } if (methods) { for (const key in methods) { const methodHandler = methods[key]; if (isFunction$4(methodHandler)) { { ctx[key] = methodHandler.bind(publicThis); } } } } if (dataOptions) { const data = dataOptions.call(publicThis, publicThis); if (!isObject$6(data)) ; else { instance.data = reactive(data); } } shouldCacheAccess = true; if (computedOptions) { for (const key in computedOptions) { const opt = computedOptions[key]; const get2 = isFunction$4(opt) ? opt.bind(publicThis, publicThis) : isFunction$4(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; const set3 = !isFunction$4(opt) && isFunction$4(opt.set) ? opt.set.bind(publicThis) : NOOP; const c2 = computed({ get: get2, set: set3 }); Object.defineProperty(ctx, key, { enumerable: true, configurable: true, get: () => c2.value, set: (v2) => c2.value = v2 }); } } if (watchOptions) { for (const key in watchOptions) { createWatcher(watchOptions[key], ctx, publicThis, key); } } if (provideOptions) { const provides = isFunction$4(provideOptions) ? provideOptions.call(publicThis) : provideOptions; Reflect.ownKeys(provides).forEach((key) => { provide(key, provides[key]); }); } if (created) { callHook$1( created, instance, "c" /* LifecycleHooks.CREATED */ ); } function registerLifecycleHook(register, hook) { if (isArray$2(hook)) { hook.forEach((_hook) => register(_hook.bind(publicThis))); } else if (hook) { register(hook.bind(publicThis)); } } registerLifecycleHook(onBeforeMount, beforeMount); registerLifecycleHook(onMounted, mounted); registerLifecycleHook(onBeforeUpdate, beforeUpdate); registerLifecycleHook(onUpdated, updated); registerLifecycleHook(onActivated, activated); registerLifecycleHook(onDeactivated, deactivated); registerLifecycleHook(onErrorCaptured, errorCaptured); registerLifecycleHook(onRenderTracked, renderTracked); registerLifecycleHook(onRenderTriggered, renderTriggered); registerLifecycleHook(onBeforeUnmount, beforeUnmount); registerLifecycleHook(onUnmounted, unmounted); registerLifecycleHook(onServerPrefetch, serverPrefetch); if (isArray$2(expose)) { if (expose.length) { const exposed = instance.exposed || (instance.exposed = {}); expose.forEach((key) => { Object.defineProperty(exposed, key, { get: () => publicThis[key], set: (val) => publicThis[key] = val }); }); } else if (!instance.exposed) { instance.exposed = {}; } } if (render2 && instance.render === NOOP) { instance.render = render2; } if (inheritAttrs != null) { instance.inheritAttrs = inheritAttrs; } if (components) instance.components = components; if (directives) instance.directives = directives; } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { if (isArray$2(injectOptions)) { injectOptions = normalizeInject(injectOptions); } for (const key in injectOptions) { const opt = injectOptions[key]; let injected; if (isObject$6(opt)) { if ("default" in opt) { injected = inject( opt.from || key, opt.default, true /* treat default function as factory */ ); } else { injected = inject(opt.from || key); } } else { injected = inject(opt); } if (isRef(injected)) { if (unwrapRef) { Object.defineProperty(ctx, key, { enumerable: true, configurable: true, get: () => injected.value, set: (v2) => injected.value = v2 }); } else { ctx[key] = injected; } } else { ctx[key] = injected; } } } function callHook$1(hook, instance, type2) { callWithAsyncErrorHandling(isArray$2(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type2); } function createWatcher(raw, ctx, publicThis, key) { const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; if (isString$4(raw)) { const handler = ctx[raw]; if (isFunction$4(handler)) { watch(getter, handler); } } else if (isFunction$4(raw)) { watch(getter, raw.bind(publicThis)); } else if (isObject$6(raw)) { if (isArray$2(raw)) { raw.forEach((r2) => createWatcher(r2, ctx, publicThis, key)); } else { const handler = isFunction$4(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; if (isFunction$4(handler)) { watch(getter, handler, raw); } } } else ; } function resolveMergedOptions(instance) { const base2 = instance.type; const { mixins, extends: extendsOptions } = base2; const { mixins: globalMixins, optionsCache: cache2, config: { optionMergeStrategies } } = instance.appContext; const cached = cache2.get(base2); let resolved; if (cached) { resolved = cached; } else if (!globalMixins.length && !mixins && !extendsOptions) { { resolved = base2; } } else { resolved = {}; if (globalMixins.length) { globalMixins.forEach((m2) => mergeOptions$1(resolved, m2, optionMergeStrategies, true)); } mergeOptions$1(resolved, base2, optionMergeStrategies); } if (isObject$6(base2)) { cache2.set(base2, resolved); } return resolved; } function mergeOptions$1(to2, from, strats, asMixin = false) { const { mixins, extends: extendsOptions } = from; if (extendsOptions) { mergeOptions$1(to2, extendsOptions, strats, true); } if (mixins) { mixins.forEach((m2) => mergeOptions$1(to2, m2, strats, true)); } for (const key in from) { if (asMixin && key === "expose") ; else { const strat = internalOptionMergeStrats[key] || strats && strats[key]; to2[key] = strat ? strat(to2[key], from[key]) : from[key]; } } return to2; } const internalOptionMergeStrats = { data: mergeDataFn, props: mergeObjectOptions, emits: mergeObjectOptions, // objects methods: mergeObjectOptions, computed: mergeObjectOptions, // lifecycle beforeCreate: mergeAsArray, created: mergeAsArray, beforeMount: mergeAsArray, mounted: mergeAsArray, beforeUpdate: mergeAsArray, updated: mergeAsArray, beforeDestroy: mergeAsArray, beforeUnmount: mergeAsArray, destroyed: mergeAsArray, unmounted: mergeAsArray, activated: mergeAsArray, deactivated: mergeAsArray, errorCaptured: mergeAsArray, serverPrefetch: mergeAsArray, // assets components: mergeObjectOptions, directives: mergeObjectOptions, // watch watch: mergeWatchOptions, // provide / inject provide: mergeDataFn, inject: mergeInject }; function mergeDataFn(to2, from) { if (!from) { return to2; } if (!to2) { return from; } return function mergedDataFn() { return extend(isFunction$4(to2) ? to2.call(this, this) : to2, isFunction$4(from) ? from.call(this, this) : from); }; } function mergeInject(to2, from) { return mergeObjectOptions(normalizeInject(to2), normalizeInject(from)); } function normalizeInject(raw) { if (isArray$2(raw)) { const res = {}; for (let i = 0; i < raw.length; i++) { res[raw[i]] = raw[i]; } return res; } return raw; } function mergeAsArray(to2, from) { return to2 ? [...new Set([].concat(to2, from))] : from; } function mergeObjectOptions(to2, from) { return to2 ? extend(extend(/* @__PURE__ */ Object.create(null), to2), from) : from; } function mergeWatchOptions(to2, from) { if (!to2) return from; if (!from) return to2; const merged = extend(/* @__PURE__ */ Object.create(null), to2); for (const key in from) { merged[key] = mergeAsArray(to2[key], from[key]); } return merged; } function initProps(instance, rawProps, isStateful, isSSR = false) { const props = {}; const attrs = {}; def(attrs, InternalObjectKey, 1); instance.propsDefaults = /* @__PURE__ */ Object.create(null); setFullProps(instance, rawProps, props, attrs); for (const key in instance.propsOptions[0]) { if (!(key in props)) { props[key] = void 0; } } if (isStateful) { instance.props = isSSR ? props : shallowReactive(props); } else { if (!instance.type.props) { instance.props = attrs; } else { instance.props = props; } } instance.attrs = attrs; } function updateProps(instance, rawProps, rawPrevProps, optimized) { const { props, attrs, vnode: { patchFlag } } = instance; const rawCurrentProps = toRaw(props); const [options2] = instance.propsOptions; let hasAttrsChanged = false; if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component (optimized || patchFlag > 0) && !(patchFlag & 16) ) { if (patchFlag & 8) { const propsToUpdate = instance.vnode.dynamicProps; for (let i = 0; i < propsToUpdate.length; i++) { let key = propsToUpdate[i]; if (isEmitListener(instance.emitsOptions, key)) { continue; } const value = rawProps[key]; if (options2) { if (hasOwn$1(attrs, key)) { if (value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } else { const camelizedKey = camelize(key); props[camelizedKey] = resolvePropValue( options2, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */ ); } } else { if (value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } } } } else { if (setFullProps(instance, rawProps, props, attrs)) { hasAttrsChanged = true; } let kebabKey; for (const key in rawCurrentProps) { if (!rawProps || // for camelCase !hasOwn$1(rawProps, key) && // it's possible the original props was passed in as kebab-case // and converted to camelCase (#955) ((kebabKey = hyphenate(key)) === key || !hasOwn$1(rawProps, kebabKey))) { if (options2) { if (rawPrevProps && // for camelCase (rawPrevProps[key] !== void 0 || // for kebab-case rawPrevProps[kebabKey] !== void 0)) { props[key] = resolvePropValue( options2, rawCurrentProps, key, void 0, instance, true /* isAbsent */ ); } } else { delete props[key]; } } } if (attrs !== rawCurrentProps) { for (const key in attrs) { if (!rawProps || !hasOwn$1(rawProps, key) && true) { delete attrs[key]; hasAttrsChanged = true; } } } } if (hasAttrsChanged) { trigger(instance, "set", "$attrs"); } } function setFullProps(instance, rawProps, props, attrs) { const [options2, needCastKeys] = instance.propsOptions; let hasAttrsChanged = false; let rawCastValues; if (rawProps) { for (let key in rawProps) { if (isReservedProp(key)) { continue; } const value = rawProps[key]; let camelKey; if (options2 && hasOwn$1(options2, camelKey = camelize(key))) { if (!needCastKeys || !needCastKeys.includes(camelKey)) { props[camelKey] = value; } else { (rawCastValues || (rawCastValues = {}))[camelKey] = value; } } else if (!isEmitListener(instance.emitsOptions, key)) { if (!(key in attrs) || value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } } } if (needCastKeys) { const rawCurrentProps = toRaw(props); const castValues = rawCastValues || EMPTY_OBJ; for (let i = 0; i < needCastKeys.length; i++) { const key = needCastKeys[i]; props[key] = resolvePropValue(options2, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key)); } } return hasAttrsChanged; } function resolvePropValue(options2, props, key, value, instance, isAbsent) { const opt = options2[key]; if (opt != null) { const hasDefault = hasOwn$1(opt, "default"); if (hasDefault && value === void 0) { const defaultValue = opt.default; if (opt.type !== Function && isFunction$4(defaultValue)) { const { propsDefaults } = instance; if (key in propsDefaults) { value = propsDefaults[key]; } else { setCurrentInstance(instance); value = propsDefaults[key] = defaultValue.call(null, props); unsetCurrentInstance(); } } else { value = defaultValue; } } if (opt[ 0 /* BooleanFlags.shouldCast */ ]) { if (isAbsent && !hasDefault) { value = false; } else if (opt[ 1 /* BooleanFlags.shouldCastTrue */ ] && (value === "" || value === hyphenate(key))) { value = true; } } } return value; } function normalizePropsOptions(comp2, appContext, asMixin = false) { const cache2 = appContext.propsCache; const cached = cache2.get(comp2); if (cached) { return cached; } const raw = comp2.props; const normalized = {}; const needCastKeys = []; let hasExtends = false; if (!isFunction$4(comp2)) { const extendProps = (raw2) => { hasExtends = true; const [props, keys] = normalizePropsOptions(raw2, appContext, true); extend(normalized, props); if (keys) needCastKeys.push(...keys); }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendProps); } if (comp2.extends) { extendProps(comp2.extends); } if (comp2.mixins) { comp2.mixins.forEach(extendProps); } } if (!raw && !hasExtends) { if (isObject$6(comp2)) { cache2.set(comp2, EMPTY_ARR); } return EMPTY_ARR; } if (isArray$2(raw)) { for (let i = 0; i < raw.length; i++) { const normalizedKey = camelize(raw[i]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } } } else if (raw) { for (const key in raw) { const normalizedKey = camelize(key); if (validatePropName(normalizedKey)) { const opt = raw[key]; const prop2 = normalized[normalizedKey] = isArray$2(opt) || isFunction$4(opt) ? { type: opt } : Object.assign({}, opt); if (prop2) { const booleanIndex = getTypeIndex(Boolean, prop2.type); const stringIndex = getTypeIndex(String, prop2.type); prop2[ 0 /* BooleanFlags.shouldCast */ ] = booleanIndex > -1; prop2[ 1 /* BooleanFlags.shouldCastTrue */ ] = stringIndex < 0 || booleanIndex < stringIndex; if (booleanIndex > -1 || hasOwn$1(prop2, "default")) { needCastKeys.push(normalizedKey); } } } } } const res = [normalized, needCastKeys]; if (isObject$6(comp2)) { cache2.set(comp2, res); } return res; } function validatePropName(key) { if (key[0] !== "$") { return true; } return false; } function getType(ctor) { const match3 = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); return match3 ? match3[2] : ctor === null ? "null" : ""; } function isSameType(a2, b2) { return getType(a2) === getType(b2); } function getTypeIndex(type2, expectedTypes) { if (isArray$2(expectedTypes)) { return expectedTypes.findIndex((t2) => isSameType(t2, type2)); } else if (isFunction$4(expectedTypes)) { return isSameType(expectedTypes, type2) ? 0 : -1; } return -1; } const isInternalKey = (key) => key[0] === "_" || key === "$stable"; const normalizeSlotValue = (value) => isArray$2(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot$1 = (key, rawSlot, ctx) => { if (rawSlot._n) { return rawSlot; } const normalized = withCtx((...args) => { if (false) ; return normalizeSlotValue(rawSlot(...args)); }, ctx); normalized._c = false; return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { const ctx = rawSlots._ctx; for (const key in rawSlots) { if (isInternalKey(key)) continue; const value = rawSlots[key]; if (isFunction$4(value)) { slots[key] = normalizeSlot$1(key, value, ctx); } else if (value != null) { const normalized = normalizeSlotValue(value); slots[key] = () => normalized; } } }; const normalizeVNodeSlots = (instance, children) => { const normalized = normalizeSlotValue(children); instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { if (instance.vnode.shapeFlag & 32) { const type2 = children._; if (type2) { instance.slots = toRaw(children); def(children, "_", type2); } else { normalizeObjectSlots(children, instance.slots = {}); } } else { instance.slots = {}; if (children) { normalizeVNodeSlots(instance, children); } } def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { const { vnode, slots } = instance; let needDeletionCheck = true; let deletionComparisonTarget = EMPTY_OBJ; if (vnode.shapeFlag & 32) { const type2 = children._; if (type2) { if (optimized && type2 === 1) { needDeletionCheck = false; } else { extend(slots, children); if (!optimized && type2 === 1) { delete slots._; } } } else { needDeletionCheck = !children.$stable; normalizeObjectSlots(children, slots); } deletionComparisonTarget = children; } else if (children) { normalizeVNodeSlots(instance, children); deletionComparisonTarget = { default: 1 }; } if (needDeletionCheck) { for (const key in slots) { if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { delete slots[key]; } } } }; function createAppContext() { return { app: null, config: { isNativeTag: NO, performance: false, globalProperties: {}, optionMergeStrategies: {}, errorHandler: void 0, warnHandler: void 0, compilerOptions: {} }, mixins: [], components: {}, directives: {}, provides: /* @__PURE__ */ Object.create(null), optionsCache: /* @__PURE__ */ new WeakMap(), propsCache: /* @__PURE__ */ new WeakMap(), emitsCache: /* @__PURE__ */ new WeakMap() }; } let uid$1 = 0; function createAppAPI(render2, hydrate) { return function createApp2(rootComponent, rootProps = null) { if (!isFunction$4(rootComponent)) { rootComponent = Object.assign({}, rootComponent); } if (rootProps != null && !isObject$6(rootProps)) { rootProps = null; } const context2 = createAppContext(); const installedPlugins = /* @__PURE__ */ new Set(); let isMounted = false; const app2 = context2.app = { _uid: uid$1++, _component: rootComponent, _props: rootProps, _container: null, _context: context2, _instance: null, version: version$9, get config() { return context2.config; }, set config(v2) { }, use(plugin, ...options2) { if (installedPlugins.has(plugin)) ; else if (plugin && isFunction$4(plugin.install)) { installedPlugins.add(plugin); plugin.install(app2, ...options2); } else if (isFunction$4(plugin)) { installedPlugins.add(plugin); plugin(app2, ...options2); } else ; return app2; }, mixin(mixin) { { if (!context2.mixins.includes(mixin)) { context2.mixins.push(mixin); } } return app2; }, component(name2, component) { if (!component) { return context2.components[name2]; } context2.components[name2] = component; return app2; }, directive(name2, directive) { if (!directive) { return context2.directives[name2]; } context2.directives[name2] = directive; return app2; }, mount(rootContainer, isHydrate, isSVG) { if (!isMounted) { const vnode = createVNode(rootComponent, rootProps); vnode.appContext = context2; if (isHydrate && hydrate) { hydrate(vnode, rootContainer); } else { render2(vnode, rootContainer, isSVG); } isMounted = true; app2._container = rootContainer; rootContainer.__vue_app__ = app2; return getExposeProxy(vnode.component) || vnode.component.proxy; } }, unmount() { if (isMounted) { render2(null, app2._container); delete app2._container.__vue_app__; } }, provide(key, value) { context2.provides[key] = value; return app2; } }; return app2; }; } function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { if (isArray$2(rawRef)) { rawRef.forEach((r2, i) => setRef(r2, oldRawRef && (isArray$2(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); return; } if (isAsyncWrapper(vnode) && !isUnmount) { return; } const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; const value = isUnmount ? null : refValue; const { i: owner, r: ref2 } = rawRef; const oldRef = oldRawRef && oldRawRef.r; const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; const setupState = owner.setupState; if (oldRef != null && oldRef !== ref2) { if (isString$4(oldRef)) { refs[oldRef] = null; if (hasOwn$1(setupState, oldRef)) { setupState[oldRef] = null; } } else if (isRef(oldRef)) { oldRef.value = null; } } if (isFunction$4(ref2)) { callWithErrorHandling(ref2, owner, 12, [value, refs]); } else { const _isString = isString$4(ref2); const _isRef = isRef(ref2); if (_isString || _isRef) { const doSet = () => { if (rawRef.f) { const existing = _isString ? hasOwn$1(setupState, ref2) ? setupState[ref2] : refs[ref2] : ref2.value; if (isUnmount) { isArray$2(existing) && remove(existing, refValue); } else { if (!isArray$2(existing)) { if (_isString) { refs[ref2] = [refValue]; if (hasOwn$1(setupState, ref2)) { setupState[ref2] = refs[ref2]; } } else { ref2.value = [refValue]; if (rawRef.k) refs[rawRef.k] = ref2.value; } } else if (!existing.includes(refValue)) { existing.push(refValue); } } } else if (_isString) { refs[ref2] = value; if (hasOwn$1(setupState, ref2)) { setupState[ref2] = value; } } else if (_isRef) { ref2.value = value; if (rawRef.k) refs[rawRef.k] = value; } else ; }; if (value) { doSet.id = -1; queuePostRenderEffect(doSet, parentSuspense); } else { doSet(); } } } } const queuePostRenderEffect = queueEffectWithSuspense; function createRenderer(options2) { return baseCreateRenderer(options2); } function baseCreateRenderer(options2, createHydrationFns) { const target2 = getGlobalThis$1(); target2.__VUE__ = true; const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, insertStaticContent: hostInsertStaticContent } = options2; const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { if (n1 === n2) { return; } if (n1 && !isSameVNodeType(n1, n2)) { anchor = getNextHostNode(n1); unmount(n1, parentComponent, parentSuspense, true); n1 = null; } if (n2.patchFlag === -2) { optimized = false; n2.dynamicChildren = null; } const { type: type2, ref: ref2, shapeFlag } = n2; switch (type2) { case Text: processText(n1, n2, container, anchor); break; case Comment: processCommentNode(n1, n2, container, anchor); break; case Static: if (n1 == null) { mountStaticNode(n2, container, anchor, isSVG); } break; case Fragment: processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); break; default: if (shapeFlag & 1) { processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else if (shapeFlag & 6) { processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else if (shapeFlag & 64) { type2.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); } else if (shapeFlag & 128) { type2.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); } else ; } if (ref2 != null && parentComponent) { setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2); } }; const processText = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert(n2.el = hostCreateText(n2.children), container, anchor); } else { const el2 = n2.el = n1.el; if (n2.children !== n1.children) { hostSetText(el2, n2.children); } } }; const processCommentNode = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert(n2.el = hostCreateComment(n2.children || ""), container, anchor); } else { n2.el = n1.el; } }; const mountStaticNode = (n2, container, anchor, isSVG) => { [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); }; const moveStaticNode = ({ el: el2, anchor }, container, nextSibling) => { let next; while (el2 && el2 !== anchor) { next = hostNextSibling(el2); hostInsert(el2, container, nextSibling); el2 = next; } hostInsert(anchor, container, nextSibling); }; const removeStaticNode = ({ el: el2, anchor }) => { let next; while (el2 && el2 !== anchor) { next = hostNextSibling(el2); hostRemove(el2); el2 = next; } hostRemove(anchor); }; const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { isSVG = isSVG || n2.type === "svg"; if (n1 == null) { mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } }; const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { let el2; let vnodeHook; const { type: type2, props, shapeFlag, transition, dirs } = vnode; el2 = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); if (shapeFlag & 8) { hostSetElementText(el2, vnode.children); } else if (shapeFlag & 16) { mountChildren(vnode.children, el2, null, parentComponent, parentSuspense, isSVG && type2 !== "foreignObject", slotScopeIds, optimized); } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "created"); } setScopeId(el2, vnode, vnode.scopeId, slotScopeIds, parentComponent); if (props) { for (const key in props) { if (key !== "value" && !isReservedProp(key)) { hostPatchProp(el2, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if ("value" in props) { hostPatchProp(el2, "value", null, props.value); } if (vnodeHook = props.onVnodeBeforeMount) { invokeVNodeHook(vnodeHook, parentComponent, vnode); } } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); } const needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; if (needCallTransitionHooks) { transition.beforeEnter(el2); } hostInsert(el2, container, anchor); if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); needCallTransitionHooks && transition.enter(el2); dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); }, parentSuspense); } }; const setScopeId = (el2, vnode, scopeId, slotScopeIds, parentComponent) => { if (scopeId) { hostSetScopeId(el2, scopeId); } if (slotScopeIds) { for (let i = 0; i < slotScopeIds.length; i++) { hostSetScopeId(el2, slotScopeIds[i]); } } if (parentComponent) { let subTree = parentComponent.subTree; if (vnode === subTree) { const parentVNode = parentComponent.vnode; setScopeId(el2, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); } } }; const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start2 = 0) => { for (let i = start2; i < children.length; i++) { const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } }; const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { const el2 = n2.el = n1.el; let { patchFlag, dynamicChildren, dirs } = n2; patchFlag |= n1.patchFlag & 16; const oldProps = n1.props || EMPTY_OBJ; const newProps = n2.props || EMPTY_OBJ; let vnodeHook; parentComponent && toggleRecurse(parentComponent, false); if (vnodeHook = newProps.onVnodeBeforeUpdate) { invokeVNodeHook(vnodeHook, parentComponent, n2, n1); } if (dirs) { invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); } parentComponent && toggleRecurse(parentComponent, true); const areChildrenSVG = isSVG && n2.type !== "foreignObject"; if (dynamicChildren) { patchBlockChildren(n1.dynamicChildren, dynamicChildren, el2, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); } else if (!optimized) { patchChildren(n1, n2, el2, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); } if (patchFlag > 0) { if (patchFlag & 16) { patchProps(el2, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); } else { if (patchFlag & 2) { if (oldProps.class !== newProps.class) { hostPatchProp(el2, "class", null, newProps.class, isSVG); } } if (patchFlag & 4) { hostPatchProp(el2, "style", oldProps.style, newProps.style, isSVG); } if (patchFlag & 8) { const propsToUpdate = n2.dynamicProps; for (let i = 0; i < propsToUpdate.length; i++) { const key = propsToUpdate[i]; const prev2 = oldProps[key]; const next = newProps[key]; if (next !== prev2 || key === "value") { hostPatchProp(el2, key, prev2, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); } } } } if (patchFlag & 1) { if (n1.children !== n2.children) { hostSetElementText(el2, n2.children); } } } else if (!optimized && dynamicChildren == null) { patchProps(el2, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); } if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); }, parentSuspense); } }; const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { for (let i = 0; i < newChildren.length; i++) { const oldVNode = oldChildren[i]; const newVNode = newChildren[i]; const container = ( // oldVNode may be an errored async setup() component inside Suspense // which will not have a mounted element oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent // of the Fragment itself so it can move its children. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement // which also requires the correct parent container !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( // In other cases, the parent container is not actually used so we // just pass the block element here to avoid a DOM parentNode call. fallbackContainer ) ); patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); } }; const patchProps = (el2, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { if (oldProps !== newProps) { if (oldProps !== EMPTY_OBJ) { for (const key in oldProps) { if (!isReservedProp(key) && !(key in newProps)) { hostPatchProp(el2, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } } for (const key in newProps) { if (isReservedProp(key)) continue; const next = newProps[key]; const prev2 = oldProps[key]; if (next !== prev2 && key !== "value") { hostPatchProp(el2, key, prev2, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if ("value" in newProps) { hostPatchProp(el2, "value", oldProps.value, newProps.value); } } }; const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; if (fragmentSlotScopeIds) { slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; } if (n1 == null) { hostInsert(fragmentStartAnchor, container, anchor); hostInsert(fragmentEndAnchor, container, anchor); mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result // of renderSlot() with no valid children n1.dynamicChildren) { patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); if ( // #2080 if the stable fragment has a key, it's a