| | |
| | | /** |
| | | * @vue/server-renderer v3.5.25 |
| | | * @vue/server-renderer v3.5.32 |
| | | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| | | * @license MIT |
| | | **/ |
| | |
| | | |
| | | let activeEffectScope; |
| | | class EffectScope { |
| | | // TODO isolatedDeclarations "__v_skip" |
| | | constructor(detached = false) { |
| | | this.detached = detached; |
| | | /** |
| | |
| | | */ |
| | | this.cleanups = []; |
| | | this._isPaused = false; |
| | | this.__v_skip = true; |
| | | this.parent = activeEffectScope; |
| | | if (!detached && activeEffectScope) { |
| | | this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( |
| | |
| | | } |
| | | } |
| | | const targetMap = /* @__PURE__ */ new WeakMap(); |
| | | const ITERATE_KEY = Symbol( |
| | | const ITERATE_KEY = /* @__PURE__ */ Symbol( |
| | | "Object iterate" |
| | | ); |
| | | const MAP_KEY_ITERATE_KEY = Symbol( |
| | | const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol( |
| | | "Map keys iterate" |
| | | ); |
| | | const ARRAY_ITERATE_KEY = Symbol( |
| | | const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol( |
| | | "Array iterate" |
| | | ); |
| | | function track(target, type, key) { |
| | |
| | | } |
| | | function reduce(self, method, fn, args) { |
| | | const arr = shallowReadArray(self); |
| | | const needsWrap = arr !== self && !isShallow(self); |
| | | let wrappedFn = fn; |
| | | let wrapInitialAccumulator = false; |
| | | if (arr !== self) { |
| | | if (!isShallow(self)) { |
| | | if (needsWrap) { |
| | | wrapInitialAccumulator = args.length === 0; |
| | | wrappedFn = function(acc, item, index) { |
| | | if (wrapInitialAccumulator) { |
| | | wrapInitialAccumulator = false; |
| | | acc = toWrapped(self, acc); |
| | | } |
| | | return fn.call(this, acc, toWrapped(self, item), index, self); |
| | | }; |
| | | } else if (fn.length > 3) { |
| | |
| | | }; |
| | | } |
| | | } |
| | | return arr[method](wrappedFn, ...args); |
| | | const result = arr[method](wrappedFn, ...args); |
| | | return wrapInitialAccumulator ? toWrapped(self, result) : result; |
| | | } |
| | | function searchProxy(self, method, args) { |
| | | const arr = toRaw(self); |
| | |
| | | "iterate", |
| | | isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY |
| | | ); |
| | | return { |
| | | // iterator protocol |
| | | next() { |
| | | const { value, done } = innerIterator.next(); |
| | | return done ? { value, done } : { |
| | | value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), |
| | | done |
| | | }; |
| | | }, |
| | | // iterable protocol |
| | | [Symbol.iterator]() { |
| | | return this; |
| | | return extend( |
| | | // inheriting all iterator properties |
| | | Object.create(innerIterator), |
| | | { |
| | | // iterator protocol |
| | | next() { |
| | | const { value, done } = innerIterator.next(); |
| | | return done ? { value, done } : { |
| | | value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), |
| | | done |
| | | }; |
| | | } |
| | | } |
| | | }; |
| | | ); |
| | | }; |
| | | } |
| | | function createReadonlyMethod(type) { |
| | |
| | | clear: createReadonlyMethod("clear") |
| | | } : { |
| | | add(value) { |
| | | if (!shallow && !isShallow(value) && !isReadonly(value)) { |
| | | value = toRaw(value); |
| | | } |
| | | const target = toRaw(this); |
| | | const proto = getProto(target); |
| | | const hadKey = proto.has.call(target, value); |
| | | const rawValue = toRaw(value); |
| | | const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value; |
| | | const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue); |
| | | if (!hadKey) { |
| | | target.add(value); |
| | | trigger(target, "add", value, value); |
| | | target.add(valueToAdd); |
| | | trigger(target, "add", valueToAdd, valueToAdd); |
| | | } |
| | | return this; |
| | | }, |
| | |
| | | function getTargetType(value) { |
| | | return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function reactive(target) { |
| | | if (isReadonly(target)) { |
| | | if (/* @__PURE__ */ isReadonly(target)) { |
| | | return target; |
| | | } |
| | | return createReactiveObject( |
| | |
| | | reactiveMap |
| | | ); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function shallowReactive(target) { |
| | | return createReactiveObject( |
| | | target, |
| | |
| | | shallowReactiveMap |
| | | ); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function readonly(target) { |
| | | return createReactiveObject( |
| | | target, |
| | |
| | | readonlyMap |
| | | ); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function shallowReadonly(target) { |
| | | return createReactiveObject( |
| | | target, |
| | |
| | | proxyMap.set(target, proxy); |
| | | return proxy; |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function isReactive(value) { |
| | | if (isReadonly(value)) { |
| | | return isReactive(value["__v_raw"]); |
| | | if (/* @__PURE__ */ isReadonly(value)) { |
| | | return /* @__PURE__ */ isReactive(value["__v_raw"]); |
| | | } |
| | | return !!(value && value["__v_isReactive"]); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function isReadonly(value) { |
| | | return !!(value && value["__v_isReadonly"]); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function isShallow(value) { |
| | | return !!(value && value["__v_isShallow"]); |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function isProxy(value) { |
| | | return value ? !!value["__v_raw"] : false; |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function toRaw(observed) { |
| | | const raw = observed && observed["__v_raw"]; |
| | | return raw ? toRaw(raw) : observed; |
| | | return raw ? /* @__PURE__ */ toRaw(raw) : observed; |
| | | } |
| | | function markRaw(value) { |
| | | if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { |
| | |
| | | } |
| | | return value; |
| | | } |
| | | const toReactive = (value) => isObject(value) ? reactive(value) : value; |
| | | const toReadonly = (value) => isObject(value) ? readonly(value) : value; |
| | | const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value; |
| | | const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value; |
| | | |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function isRef(r) { |
| | | return r ? r["__v_isRef"] === true : false; |
| | | } |
| | | function unref(ref2) { |
| | | return isRef(ref2) ? ref2.value : ref2; |
| | | return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2; |
| | | } |
| | | const shallowUnwrapHandlers = { |
| | | get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), |
| | | set: (target, key, value, receiver) => { |
| | | const oldValue = target[key]; |
| | | if (isRef(oldValue) && !isRef(value)) { |
| | | if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) { |
| | | oldValue.value = value; |
| | | return true; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | } |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function computed$1(getterOrOptions, debugOptions, isSSR = false) { |
| | | let getter; |
| | | let setter; |
| | |
| | | } |
| | | |
| | | let isHmrUpdating = false; |
| | | const setHmrUpdating = (v) => { |
| | | try { |
| | | return isHmrUpdating; |
| | | } finally { |
| | | isHmrUpdating = v; |
| | | } |
| | | }; |
| | | const hmrDirtyComponents = /* @__PURE__ */ new Map(); |
| | | { |
| | | getGlobalThis().__VUE_HMR_RUNTIME__ = { |
| | |
| | | } |
| | | } |
| | | |
| | | const TeleportEndKey = Symbol("_vte"); |
| | | function provide(key, value) { |
| | | { |
| | | if (!currentInstance || currentInstance.isMounted) { |
| | | warn$1(`provide() can only be used inside setup().`); |
| | | } |
| | | } |
| | | if (currentInstance) { |
| | | 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 = getCurrentInstance(); |
| | | if (instance || currentApp) { |
| | | let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; |
| | | if (provides && key in provides) { |
| | | return provides[key]; |
| | | } else if (arguments.length > 1) { |
| | | return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; |
| | | } else { |
| | | warn$1(`injection "${String(key)}" not found.`); |
| | | } |
| | | } else { |
| | | warn$1(`inject() can only be used inside setup() or functional components.`); |
| | | } |
| | | } |
| | | |
| | | const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx"); |
| | | const useSSRContext = () => { |
| | | { |
| | | const ctx = inject(ssrContextKey); |
| | | if (!ctx) { |
| | | warn$1( |
| | | `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` |
| | | ); |
| | | } |
| | | return ctx; |
| | | } |
| | | }; |
| | | |
| | | function watch(source, cb, options) { |
| | | if (!isFunction(cb)) { |
| | | warn$1( |
| | | `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` |
| | | ); |
| | | } |
| | | return doWatch(source, cb, options); |
| | | } |
| | | function doWatch(source, cb, options = EMPTY_OBJ) { |
| | | const { immediate, deep, flush, once } = options; |
| | | if (!cb) { |
| | | if (immediate !== void 0) { |
| | | warn$1( |
| | | `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` |
| | | ); |
| | | } |
| | | if (deep !== void 0) { |
| | | warn$1( |
| | | `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` |
| | | ); |
| | | } |
| | | if (once !== void 0) { |
| | | warn$1( |
| | | `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` |
| | | ); |
| | | } |
| | | } |
| | | const baseWatchOptions = extend({}, options); |
| | | baseWatchOptions.onWarn = warn$1; |
| | | const runsImmediately = cb && immediate || !cb && flush !== "post"; |
| | | let ssrCleanup; |
| | | if (isInSSRComponentSetup) { |
| | | if (flush === "sync") { |
| | | const ctx = useSSRContext(); |
| | | ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); |
| | | } else if (!runsImmediately) { |
| | | const watchStopHandle = () => { |
| | | }; |
| | | watchStopHandle.stop = NOOP; |
| | | watchStopHandle.resume = NOOP; |
| | | watchStopHandle.pause = NOOP; |
| | | return watchStopHandle; |
| | | } |
| | | } |
| | | const instance = currentInstance; |
| | | baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); |
| | | let isPre = false; |
| | | if (flush === "post") { |
| | | baseWatchOptions.scheduler = (job) => { |
| | | queuePostRenderEffect(job, instance && instance.suspense); |
| | | }; |
| | | } else if (flush !== "sync") { |
| | | isPre = true; |
| | | baseWatchOptions.scheduler = (job, isFirstRun) => { |
| | | if (isFirstRun) { |
| | | job(); |
| | | } else { |
| | | queueJob(job); |
| | | } |
| | | }; |
| | | } |
| | | baseWatchOptions.augmentJob = (job) => { |
| | | if (cb) { |
| | | job.flags |= 4; |
| | | } |
| | | if (isPre) { |
| | | job.flags |= 2; |
| | | if (instance) { |
| | | job.id = instance.uid; |
| | | job.i = instance; |
| | | } |
| | | } |
| | | }; |
| | | const watchHandle = watch$1(source, cb, baseWatchOptions); |
| | | if (isInSSRComponentSetup) { |
| | | if (ssrCleanup) { |
| | | ssrCleanup.push(watchHandle); |
| | | } else if (runsImmediately) { |
| | | watchHandle(); |
| | | } |
| | | } |
| | | return watchHandle; |
| | | } |
| | | function instanceWatch(source, value, options) { |
| | | const publicThis = this.proxy; |
| | | const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); |
| | | let cb; |
| | | if (isFunction(value)) { |
| | | cb = value; |
| | | } else { |
| | | cb = value.handler; |
| | | options = value; |
| | | } |
| | | const reset = setCurrentInstance(this); |
| | | const res = doWatch(getter, cb.bind(publicThis), options); |
| | | reset(); |
| | | 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; |
| | | }; |
| | | } |
| | | |
| | | const TeleportEndKey = /* @__PURE__ */ Symbol("_vte"); |
| | | const isTeleport = (type) => type.__isTeleport; |
| | | |
| | | const leaveCbKey = Symbol("_leaveCb"); |
| | | const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb"); |
| | | function setTransitionHooks(vnode, hooks) { |
| | | if (vnode.shapeFlag & 6 && vnode.component) { |
| | | vnode.transition = hooks; |
| | |
| | | } |
| | | |
| | | const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); |
| | | function isTemplateRefKey(refs, key) { |
| | | let desc; |
| | | return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable); |
| | | } |
| | | |
| | | const pendingSetRefMap = /* @__PURE__ */ new WeakMap(); |
| | | function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { |
| | |
| | | return false; |
| | | } |
| | | } |
| | | if (isTemplateRefKey(refs, key)) { |
| | | return false; |
| | | } |
| | | return hasOwn(rawSetupState, key); |
| | | }; |
| | | const canSetRef = (ref2) => { |
| | | return !knownTemplateRefs.has(ref2); |
| | | const canSetRef = (ref2, key) => { |
| | | if (knownTemplateRefs.has(ref2)) { |
| | | return false; |
| | | } |
| | | if (key && isTemplateRefKey(refs, key)) { |
| | | return false; |
| | | } |
| | | return true; |
| | | }; |
| | | if (oldRef != null && oldRef !== ref) { |
| | | invalidatePendingSetRef(oldRawRef); |
| | |
| | | setupState[oldRef] = null; |
| | | } |
| | | } else if (isRef(oldRef)) { |
| | | if (canSetRef(oldRef)) { |
| | | const oldRawRefAtom = oldRawRef; |
| | | if (canSetRef(oldRef, oldRawRefAtom.k)) { |
| | | oldRef.value = null; |
| | | } |
| | | const oldRawRefAtom = oldRawRef; |
| | | if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null; |
| | | } |
| | | } |
| | |
| | | } |
| | | } else { |
| | | const newVal = [refValue]; |
| | | if (canSetRef(ref)) { |
| | | if (canSetRef(ref, rawRef.k)) { |
| | | ref.value = newVal; |
| | | } |
| | | if (rawRef.k) refs[rawRef.k] = newVal; |
| | |
| | | setupState[ref] = value; |
| | | } |
| | | } else if (_isRef) { |
| | | if (canSetRef(ref)) { |
| | | if (canSetRef(ref, rawRef.k)) { |
| | | ref.value = value; |
| | | } |
| | | if (rawRef.k) refs[rawRef.k] = value; |
| | |
| | | injectHook("ec", hook, target); |
| | | } |
| | | |
| | | const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); |
| | | const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc"); |
| | | |
| | | function ensureValidVNode$1(vnodes) { |
| | | return vnodes.some((child) => { |
| | |
| | | } |
| | | let currentApp = null; |
| | | |
| | | function provide(key, value) { |
| | | { |
| | | if (!currentInstance || currentInstance.isMounted) { |
| | | warn$1(`provide() can only be used inside setup().`); |
| | | } |
| | | } |
| | | if (currentInstance) { |
| | | 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 = getCurrentInstance(); |
| | | if (instance || currentApp) { |
| | | let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; |
| | | if (provides && key in provides) { |
| | | return provides[key]; |
| | | } else if (arguments.length > 1) { |
| | | return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; |
| | | } else { |
| | | warn$1(`injection "${String(key)}" not found.`); |
| | | } |
| | | } else { |
| | | warn$1(`inject() can only be used inside setup() or functional components.`); |
| | | } |
| | | } |
| | | |
| | | const ssrContextKey = Symbol.for("v-scx"); |
| | | const useSSRContext = () => { |
| | | { |
| | | const ctx = inject(ssrContextKey); |
| | | if (!ctx) { |
| | | warn$1( |
| | | `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` |
| | | ); |
| | | } |
| | | return ctx; |
| | | } |
| | | }; |
| | | |
| | | function watch(source, cb, options) { |
| | | if (!isFunction(cb)) { |
| | | warn$1( |
| | | `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` |
| | | ); |
| | | } |
| | | return doWatch(source, cb, options); |
| | | } |
| | | function doWatch(source, cb, options = EMPTY_OBJ) { |
| | | const { immediate, deep, flush, once } = options; |
| | | if (!cb) { |
| | | if (immediate !== void 0) { |
| | | warn$1( |
| | | `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` |
| | | ); |
| | | } |
| | | if (deep !== void 0) { |
| | | warn$1( |
| | | `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` |
| | | ); |
| | | } |
| | | if (once !== void 0) { |
| | | warn$1( |
| | | `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` |
| | | ); |
| | | } |
| | | } |
| | | const baseWatchOptions = extend({}, options); |
| | | baseWatchOptions.onWarn = warn$1; |
| | | const runsImmediately = cb && immediate || !cb && flush !== "post"; |
| | | let ssrCleanup; |
| | | if (isInSSRComponentSetup) { |
| | | if (flush === "sync") { |
| | | const ctx = useSSRContext(); |
| | | ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); |
| | | } else if (!runsImmediately) { |
| | | const watchStopHandle = () => { |
| | | }; |
| | | watchStopHandle.stop = NOOP; |
| | | watchStopHandle.resume = NOOP; |
| | | watchStopHandle.pause = NOOP; |
| | | return watchStopHandle; |
| | | } |
| | | } |
| | | const instance = currentInstance; |
| | | baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); |
| | | let isPre = false; |
| | | if (flush === "post") { |
| | | baseWatchOptions.scheduler = (job) => { |
| | | queuePostRenderEffect(job, instance && instance.suspense); |
| | | }; |
| | | } else if (flush !== "sync") { |
| | | isPre = true; |
| | | baseWatchOptions.scheduler = (job, isFirstRun) => { |
| | | if (isFirstRun) { |
| | | job(); |
| | | } else { |
| | | queueJob(job); |
| | | } |
| | | }; |
| | | } |
| | | baseWatchOptions.augmentJob = (job) => { |
| | | if (cb) { |
| | | job.flags |= 4; |
| | | } |
| | | if (isPre) { |
| | | job.flags |= 2; |
| | | if (instance) { |
| | | job.id = instance.uid; |
| | | job.i = instance; |
| | | } |
| | | } |
| | | }; |
| | | const watchHandle = watch$1(source, cb, baseWatchOptions); |
| | | if (isInSSRComponentSetup) { |
| | | if (ssrCleanup) { |
| | | ssrCleanup.push(watchHandle); |
| | | } else if (runsImmediately) { |
| | | watchHandle(); |
| | | } |
| | | } |
| | | return watchHandle; |
| | | } |
| | | function instanceWatch(source, value, options) { |
| | | const publicThis = this.proxy; |
| | | const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); |
| | | let cb; |
| | | if (isFunction(value)) { |
| | | cb = value; |
| | | } else { |
| | | cb = value.handler; |
| | | options = value; |
| | | } |
| | | const reset = setCurrentInstance(this); |
| | | const res = doWatch(getter, cb.bind(publicThis), options); |
| | | reset(); |
| | | 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; |
| | | }; |
| | | } |
| | | |
| | | const getModelModifiers = (props, modelName) => { |
| | | return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; |
| | | }; |
| | |
| | | const dynamicProps = nextVNode.dynamicProps; |
| | | for (let i = 0; i < dynamicProps.length; i++) { |
| | | const key = dynamicProps[i]; |
| | | if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { |
| | | if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) { |
| | | return true; |
| | | } |
| | | } |
| | |
| | | } |
| | | for (let i = 0; i < nextKeys.length; i++) { |
| | | const key = nextKeys[i]; |
| | | if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { |
| | | if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | function updateHOCHostEl({ vnode, parent }, el) { |
| | | function hasPropValueChanged(nextProps, prevProps, key) { |
| | | const nextProp = nextProps[key]; |
| | | const prevProp = prevProps[key]; |
| | | if (key === "style" && isObject(nextProp) && isObject(prevProp)) { |
| | | return !looseEqual(nextProp, prevProp); |
| | | } |
| | | return nextProp !== prevProp; |
| | | } |
| | | function updateHOCHostEl({ vnode, parent, suspense }, el) { |
| | | while (parent) { |
| | | const root = parent.subTree; |
| | | if (root.suspense && root.suspense.activeBranch === vnode) { |
| | | root.el = vnode.el; |
| | | root.suspense.vnode.el = root.el = el; |
| | | vnode = root; |
| | | } |
| | | if (root === vnode) { |
| | | (vnode = parent.vnode).el = el; |
| | |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | if (suspense && suspense.activeBranch === vnode) { |
| | | suspense.vnode.el = el; |
| | | } |
| | | } |
| | | |
| | |
| | | optimized |
| | | ); |
| | | } else { |
| | | const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null; |
| | | const customElement = n1.el && n1.el._isVueCE ? n1.el : null; |
| | | try { |
| | | if (customElement) { |
| | | customElement._beginPatch(); |
| | |
| | | } |
| | | hostInsert(el, container, anchor); |
| | | if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { |
| | | const isHmr = isHmrUpdating; |
| | | queuePostRenderEffect(() => { |
| | | vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); |
| | | needCallTransitionHooks && transition.enter(el); |
| | | dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); |
| | | let prev; |
| | | prev = setHmrUpdating(isHmr); |
| | | try { |
| | | vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); |
| | | needCallTransitionHooks && transition.enter(el); |
| | | dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); |
| | | } finally { |
| | | setHmrUpdating(prev); |
| | | } |
| | | }, parentSuspense); |
| | | } |
| | | }; |
| | |
| | | } 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) { |
| | | n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) { |
| | | patchBlockChildren( |
| | | n1.dynamicChildren, |
| | | dynamicChildren, |
| | |
| | | } |
| | | toggleRecurse(instance, true); |
| | | { |
| | | if (root.ce && // @ts-expect-error _def is private |
| | | root.ce._def.shadowRoot !== false) { |
| | | root.ce._injectChildStyle(type); |
| | | if (root.ce && root.ce._hasShadowRoot()) { |
| | | root.ce._injectChildStyle( |
| | | type, |
| | | instance.parent ? instance.parent.type : void 0 |
| | | ); |
| | | } |
| | | { |
| | | startMeasure(instance, `render`); |
| | |
| | | updateComponentPreRender(instance, next, optimized); |
| | | } |
| | | nonHydratedAsyncRoot.asyncDep.then(() => { |
| | | if (!instance.isUnmounted) { |
| | | componentUpdateFn(); |
| | | } |
| | | queuePostRenderEffect(() => { |
| | | if (!instance.isUnmounted) update(); |
| | | }, parentSuspense); |
| | | }); |
| | | return; |
| | | } |
| | |
| | | const nextChild = c2[nextIndex]; |
| | | const anchorVNode = c2[nextIndex + 1]; |
| | | const anchor = nextIndex + 1 < l2 ? ( |
| | | // #13559, fallback to el placeholder for unresolved async component |
| | | anchorVNode.el || anchorVNode.placeholder |
| | | // #13559, #14173 fallback to el placeholder for unresolved async component |
| | | anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) |
| | | ) : parentAnchor; |
| | | if (newIndexToOldIndexMap[i] === 0) { |
| | | patch( |
| | |
| | | shapeFlag, |
| | | patchFlag, |
| | | dirs, |
| | | cacheIndex |
| | | cacheIndex, |
| | | memo |
| | | } = vnode; |
| | | if (patchFlag === -2) { |
| | | optimized = false; |
| | |
| | | remove(vnode); |
| | | } |
| | | } |
| | | if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { |
| | | const shouldInvalidateMemo = memo != null && cacheIndex == null; |
| | | if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) { |
| | | queuePostRenderEffect(() => { |
| | | vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); |
| | | shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); |
| | | if (shouldInvalidateMemo) { |
| | | vnode.el = null; |
| | | } |
| | | }, parentSuspense); |
| | | } |
| | | }; |
| | |
| | | }; |
| | | let isFlushing = false; |
| | | const render = (vnode, container, namespace) => { |
| | | let instance; |
| | | if (vnode == null) { |
| | | if (container._vnode) { |
| | | unmount(container._vnode, null, null, true); |
| | | instance = container._vnode.component; |
| | | } |
| | | } else { |
| | | patch( |
| | |
| | | container._vnode = vnode; |
| | | if (!isFlushing) { |
| | | isFlushing = true; |
| | | flushPreFlushCbs(); |
| | | flushPreFlushCbs(instance); |
| | | flushPostFlushCbs(); |
| | | isFlushing = false; |
| | | } |
| | |
| | | if (!shallow && c2.patchFlag !== -2) |
| | | traverseStaticChildren(c1, c2); |
| | | } |
| | | if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes |
| | | c2.patchFlag !== -1) { |
| | | if (c2.type === Text) { |
| | | if (c2.patchFlag === -1) { |
| | | c2 = ch2[i] = cloneIfMounted(c2); |
| | | } |
| | | c2.el = c1.el; |
| | | } |
| | | if (c2.type === Comment && !c2.el) { |
| | |
| | | hooks[i].flags |= 8; |
| | | } |
| | | } |
| | | function resolveAsyncComponentPlaceholder(anchorVnode) { |
| | | if (anchorVnode.placeholder) { |
| | | return anchorVnode.placeholder; |
| | | } |
| | | const instance = anchorVnode.component; |
| | | if (instance) { |
| | | return resolveAsyncComponentPlaceholder(instance.subTree); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | const isSuspense = (type) => type.__isSuspense; |
| | | function queueEffectWithSuspense(fn, suspense) { |
| | |
| | | } |
| | | } |
| | | |
| | | const Fragment = Symbol.for("v-fgt"); |
| | | const Text = Symbol.for("v-txt"); |
| | | const Comment = Symbol.for("v-cmt"); |
| | | const Static = Symbol.for("v-stc"); |
| | | const Fragment = /* @__PURE__ */ Symbol.for("v-fgt"); |
| | | const Text = /* @__PURE__ */ Symbol.for("v-txt"); |
| | | const Comment = /* @__PURE__ */ Symbol.for("v-cmt"); |
| | | const Static = /* @__PURE__ */ Symbol.for("v-stc"); |
| | | let currentBlock = null; |
| | | let isBlockTreeEnabled = 1; |
| | | function setBlockTracking(value, inVOnce = false) { |
| | |
| | | const incoming = toMerge[key]; |
| | | if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { |
| | | ret[key] = existing ? [].concat(existing, incoming) : incoming; |
| | | } else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain |
| | | // the model listener. |
| | | !isModelListener(key)) { |
| | | ret[key] = incoming; |
| | | } |
| | | } else if (key !== "") { |
| | | ret[key] = toMerge[key]; |
| | |
| | | return c; |
| | | }; |
| | | |
| | | const version = "3.5.25"; |
| | | const version = "3.5.32"; |
| | | const warn = warn$1 ; |
| | | const _ssrUtils = { |
| | | createComponentInstance: createComponentInstance$1, |
| | |
| | | } |
| | | }; |
| | | |
| | | const vtcKey = Symbol("_vtc"); |
| | | const vtcKey = /* @__PURE__ */ Symbol("_vtc"); |
| | | |
| | | function patchClass(el, value, isSVG) { |
| | | const transitionClasses = el[vtcKey]; |
| | |
| | | } |
| | | } |
| | | |
| | | const vShowOriginalDisplay = Symbol("_vod"); |
| | | const vShowHidden = Symbol("_vsh"); |
| | | const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod"); |
| | | const vShowHidden = /* @__PURE__ */ Symbol("_vsh"); |
| | | |
| | | const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); |
| | | const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" ); |
| | | |
| | | const displayRE = /(?:^|;)\s*display\s*:/; |
| | | function patchStyle(el, prev, next) { |
| | |
| | | function removeEventListener(el, event, handler, options) { |
| | | el.removeEventListener(event, handler, options); |
| | | } |
| | | const veiKey = Symbol("_vei"); |
| | | const veiKey = /* @__PURE__ */ Symbol("_vei"); |
| | | function patchEvent(el, rawName, prevValue, nextValue, instance = null) { |
| | | const invokers = el[veiKey] || (el[veiKey] = {}); |
| | | const existingInvoker = invokers[rawName]; |
| | |
| | | } |
| | | } else if ( |
| | | // #11081 force set props for possible async custom element |
| | | el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) |
| | | el._isVueCE && // #12408 check if it's declared prop or it's async custom element |
| | | (shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private |
| | | el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue))) |
| | | ) { |
| | | patchDOMProp(el, camelize(key), nextValue, parentComponent, key); |
| | | } else { |
| | |
| | | return false; |
| | | } |
| | | return key in el; |
| | | } |
| | | function shouldSetAsPropForVueCE(el, key) { |
| | | const props = ( |
| | | // @ts-expect-error _def is private |
| | | el._def.props |
| | | ); |
| | | if (!props) { |
| | | return false; |
| | | } |
| | | const camelKey = camelize(key); |
| | | return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey); |
| | | } |
| | | |
| | | const vModelText = { |
| | |
| | | ); |
| | | function ssrRenderAttrs(props, tag) { |
| | | let ret = ""; |
| | | for (const key in props) { |
| | | if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { |
| | | for (let key in props) { |
| | | if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value" || // force as property (not rendered in SSR) |
| | | key.startsWith(".")) { |
| | | continue; |
| | | } |
| | | const value = props[key]; |
| | | if (key.startsWith("^")) key = key.slice(1); |
| | | if (key === "class") { |
| | | ret += ` class="${ssrRenderClass(value)}"`; |
| | | } else if (key === "style") { |
| | | ret += ` style="${ssrRenderStyle(value)}"`; |
| | | } else if (key === "className") { |
| | | ret += ` class="${String(value)}"`; |
| | | if (value != null) { |
| | | ret += ` class="${escapeHtml(String(value))}"`; |
| | | } |
| | | } else { |
| | | ret += ssrRenderDynamicAttr(key, value, tag); |
| | | } |
| | |
| | | renderItem(source[i], i); |
| | | } |
| | | } else if (typeof source === "number") { |
| | | if (!Number.isInteger(source)) { |
| | | warn(`The v-for range expect an integer value but got ${source}.`); |
| | | if (!Number.isInteger(source) || source < 0) { |
| | | warn( |
| | | `The v-for range expects a positive integer value but got ${source}.` |
| | | ); |
| | | return; |
| | | } |
| | | for (let i = 0; i < source; i++) { |