@vitejs/devtools 0.0.0-alpha.21 → 0.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,3 @@
1
- import { createEventEmitter } from "@vitejs/devtools-kit/utils/events";
2
-
3
1
  //#region ../../node_modules/.pnpm/@vue+shared@3.5.26/node_modules/@vue/shared/dist/shared.esm-bundler.js
4
2
  /**
5
3
  * @vue/shared v3.5.26
@@ -31,9 +29,9 @@ const isSet = (val) => toTypeString(val) === "[object Set]";
31
29
  const isFunction = (val) => typeof val === "function";
32
30
  const isString = (val) => typeof val === "string";
33
31
  const isSymbol = (val) => typeof val === "symbol";
34
- const isObject$1 = (val) => val !== null && typeof val === "object";
32
+ const isObject = (val) => val !== null && typeof val === "object";
35
33
  const isPromise = (val) => {
36
- return (isObject$1(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
34
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
37
35
  };
38
36
  const objectToString = Object.prototype.toString;
39
37
  const toTypeString = (value) => objectToString.call(value);
@@ -44,22 +42,22 @@ const isPlainObject = (val) => toTypeString(val) === "[object Object]";
44
42
  const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
45
43
  const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
46
44
  const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
47
- const cacheStringFunction$1 = (fn) => {
45
+ const cacheStringFunction = (fn) => {
48
46
  const cache = /* @__PURE__ */ Object.create(null);
49
47
  return ((str) => {
50
48
  return cache[str] || (cache[str] = fn(str));
51
49
  });
52
50
  };
53
- const camelizeRE$1 = /-\w/g;
54
- const camelize$1 = cacheStringFunction$1((str) => {
55
- return str.replace(camelizeRE$1, (c) => c.slice(1).toUpperCase());
51
+ const camelizeRE = /-\w/g;
52
+ const camelize = cacheStringFunction((str) => {
53
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
56
54
  });
57
- const hyphenateRE$1 = /\B([A-Z])/g;
58
- const hyphenate$1 = cacheStringFunction$1((str) => str.replace(hyphenateRE$1, "-$1").toLowerCase());
59
- const capitalize = cacheStringFunction$1((str) => {
55
+ const hyphenateRE = /\B([A-Z])/g;
56
+ const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
57
+ const capitalize = cacheStringFunction((str) => {
60
58
  return str.charAt(0).toUpperCase() + str.slice(1);
61
59
  });
62
- const toHandlerKey = cacheStringFunction$1((str) => {
60
+ const toHandlerKey = cacheStringFunction((str) => {
63
61
  return str ? `on${capitalize(str)}` : ``;
64
62
  });
65
63
  const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
@@ -95,7 +93,7 @@ function normalizeStyle(value) {
95
93
  if (normalized) for (const key in normalized) res[key] = normalized[key];
96
94
  }
97
95
  return res;
98
- } else if (isString(value) || isObject$1(value)) return value;
96
+ } else if (isString(value) || isObject(value)) return value;
99
97
  }
100
98
  const listDelimiterRE = /;(?![^(]*\))/g;
101
99
  const propertyDelimiterRE = /:([^]+)/;
@@ -117,7 +115,7 @@ function normalizeClass(value) {
117
115
  const normalized = normalizeClass(value[i]);
118
116
  if (normalized) res += normalized + " ";
119
117
  }
120
- else if (isObject$1(value)) {
118
+ else if (isObject(value)) {
121
119
  for (const name in value) if (value[name]) res += name + " ";
122
120
  }
123
121
  return res.trim();
@@ -138,7 +136,7 @@ const isRef$1 = (val) => {
138
136
  return !!(val && val["__v_isRef"] === true);
139
137
  };
140
138
  const toDisplayString = (val) => {
141
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject$1(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
139
+ return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
142
140
  };
143
141
  const replacer = (_key, val) => {
144
142
  if (isRef$1(val)) return replacer(_key, val.value);
@@ -148,7 +146,7 @@ const replacer = (_key, val) => {
148
146
  }, {}) };
149
147
  else if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) };
150
148
  else if (isSymbol(val)) return stringifySymbol(val);
151
- else if (isObject$1(val) && !isArray(val) && !isPlainObject(val)) return String(val);
149
+ else if (isObject(val) && !isArray(val) && !isPlainObject(val)) return String(val);
152
150
  return val;
153
151
  };
154
152
  const stringifySymbol = (v, i = "") => {
@@ -901,9 +899,9 @@ var BaseReactiveHandler = class {
901
899
  if (isShallow2) return res;
902
900
  if (isRef(res)) {
903
901
  const value = targetIsArray && isIntegerKey(key) ? res : res.value;
904
- return isReadonly2 && isObject$1(value) ? readonly(value) : value;
902
+ return isReadonly2 && isObject(value) ? readonly(value) : value;
905
903
  }
906
- if (isObject$1(res)) return isReadonly2 ? readonly(res) : reactive(res);
904
+ if (isObject(res)) return isReadonly2 ? readonly(res) : reactive(res);
907
905
  return res;
908
906
  }
909
907
  };
@@ -1164,7 +1162,7 @@ function shallowReadonly(target) {
1164
1162
  return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
1165
1163
  }
1166
1164
  function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
1167
- if (!isObject$1(target)) {
1165
+ if (!isObject(target)) {
1168
1166
  if (!!(process.env.NODE_ENV !== "production")) warn$2(`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(target)}`);
1169
1167
  return target;
1170
1168
  }
@@ -1198,8 +1196,8 @@ function markRaw(value) {
1198
1196
  if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) def(value, "__v_skip", true);
1199
1197
  return value;
1200
1198
  }
1201
- const toReactive = (value) => isObject$1(value) ? reactive(value) : value;
1202
- const toReadonly = (value) => isObject$1(value) ? readonly(value) : value;
1199
+ const toReactive = (value) => isObject(value) ? reactive(value) : value;
1200
+ const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1203
1201
  function isRef(r) {
1204
1202
  return r ? r["__v_isRef"] === true : false;
1205
1203
  }
@@ -1338,10 +1336,10 @@ var GetterRefImpl = class {
1338
1336
  return this._value = this._getter();
1339
1337
  }
1340
1338
  };
1341
- function toRef$1(source, key, defaultValue) {
1339
+ function toRef(source, key, defaultValue) {
1342
1340
  if (isRef(source)) return source;
1343
1341
  else if (isFunction(source)) return new GetterRefImpl(source);
1344
- else if (isObject$1(source) && arguments.length > 1) return propertyToRef(source, key, defaultValue);
1342
+ else if (isObject(source) && arguments.length > 1) return propertyToRef(source, key, defaultValue);
1345
1343
  else return ref(source);
1346
1344
  }
1347
1345
  function propertyToRef(source, key, defaultValue) {
@@ -1556,7 +1554,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
1556
1554
  return watchHandle;
1557
1555
  }
1558
1556
  function traverse(value, depth = Infinity, seen) {
1559
- if (depth <= 0 || !isObject$1(value) || value["__v_skip"]) return value;
1557
+ if (depth <= 0 || !isObject(value) || value["__v_skip"]) return value;
1560
1558
  seen = seen || /* @__PURE__ */ new Map();
1561
1559
  if ((seen.get(value) || 0) >= depth) return value;
1562
1560
  seen.set(value, depth);
@@ -1675,6 +1673,12 @@ function formatProp(key, value, raw) {
1675
1673
  return raw ? value : [`${key}=`, value];
1676
1674
  }
1677
1675
  }
1676
+ function assertNumber(val, type) {
1677
+ if (!!!(process.env.NODE_ENV !== "production")) return;
1678
+ if (val === void 0) return;
1679
+ else if (typeof val !== "number") warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1680
+ else if (isNaN(val)) warn$1(`${type} is NaN - the duration expression might be incorrect.`);
1681
+ }
1678
1682
  const ErrorTypeStrings$1 = {
1679
1683
  ["sp"]: "serverPrefetch hook",
1680
1684
  ["bc"]: "beforeCreate hook",
@@ -2257,7 +2261,7 @@ function setTransitionHooks(vnode, hooks) {
2257
2261
  }
2258
2262
  /* @__NO_SIDE_EFFECTS__ */
2259
2263
  function defineComponent(options, extraOptions) {
2260
- return isFunction(options) ? /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
2264
+ return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
2261
2265
  }
2262
2266
  function markAsyncBoundary(instance) {
2263
2267
  instance.ids = [
@@ -2374,9 +2378,130 @@ function invalidatePendingSetRef(rawRef) {
2374
2378
  pendingSetRefMap.delete(rawRef);
2375
2379
  }
2376
2380
  }
2381
+ const isComment = (node) => node.nodeType === 8;
2377
2382
  const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
2378
2383
  const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
2384
+ function forEachElement(node, cb) {
2385
+ if (isComment(node) && node.data === "[") {
2386
+ let depth = 1;
2387
+ let next = node.nextSibling;
2388
+ while (next) {
2389
+ if (next.nodeType === 1) {
2390
+ if (cb(next) === false) break;
2391
+ } else if (isComment(next)) {
2392
+ if (next.data === "]") {
2393
+ if (--depth === 0) break;
2394
+ } else if (next.data === "[") depth++;
2395
+ }
2396
+ next = next.nextSibling;
2397
+ }
2398
+ } else cb(node);
2399
+ }
2379
2400
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2401
+ /* @__NO_SIDE_EFFECTS__ */
2402
+ function defineAsyncComponent(source) {
2403
+ if (isFunction(source)) source = { loader: source };
2404
+ const { loader, loadingComponent, errorComponent, delay = 200, hydrate: hydrateStrategy, timeout, suspensible = true, onError: userOnError } = source;
2405
+ let pendingRequest = null;
2406
+ let resolvedComp;
2407
+ let retries = 0;
2408
+ const retry = () => {
2409
+ retries++;
2410
+ pendingRequest = null;
2411
+ return load();
2412
+ };
2413
+ const load = () => {
2414
+ let thisRequest;
2415
+ return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
2416
+ err = err instanceof Error ? err : new Error(String(err));
2417
+ if (userOnError) return new Promise((resolve, reject) => {
2418
+ const userRetry = () => resolve(retry());
2419
+ const userFail = () => reject(err);
2420
+ userOnError(err, userRetry, userFail, retries + 1);
2421
+ });
2422
+ else throw err;
2423
+ }).then((comp) => {
2424
+ if (thisRequest !== pendingRequest && pendingRequest) return pendingRequest;
2425
+ if (!!(process.env.NODE_ENV !== "production") && !comp) warn$1(`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`);
2426
+ if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) comp = comp.default;
2427
+ if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) throw new Error(`Invalid async component load result: ${comp}`);
2428
+ resolvedComp = comp;
2429
+ return comp;
2430
+ }));
2431
+ };
2432
+ return /* @__PURE__ */ defineComponent({
2433
+ name: "AsyncComponentWrapper",
2434
+ __asyncLoader: load,
2435
+ __asyncHydrate(el, instance, hydrate) {
2436
+ let patched = false;
2437
+ (instance.bu || (instance.bu = [])).push(() => patched = true);
2438
+ const performHydrate = () => {
2439
+ if (patched) {
2440
+ if (!!(process.env.NODE_ENV !== "production")) warn$1(`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`);
2441
+ return;
2442
+ }
2443
+ hydrate();
2444
+ };
2445
+ const doHydrate = hydrateStrategy ? () => {
2446
+ const teardown = hydrateStrategy(performHydrate, (cb) => forEachElement(el, cb));
2447
+ if (teardown) (instance.bum || (instance.bum = [])).push(teardown);
2448
+ } : performHydrate;
2449
+ if (resolvedComp) doHydrate();
2450
+ else load().then(() => !instance.isUnmounted && doHydrate());
2451
+ },
2452
+ get __asyncResolved() {
2453
+ return resolvedComp;
2454
+ },
2455
+ setup() {
2456
+ const instance = currentInstance;
2457
+ markAsyncBoundary(instance);
2458
+ if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
2459
+ const onError = (err) => {
2460
+ pendingRequest = null;
2461
+ handleError(err, instance, 13, !errorComponent);
2462
+ };
2463
+ if (suspensible && instance.suspense || isInSSRComponentSetup) return load().then((comp) => {
2464
+ return () => createInnerComp(comp, instance);
2465
+ }).catch((err) => {
2466
+ onError(err);
2467
+ return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
2468
+ });
2469
+ const loaded = ref(false);
2470
+ const error = ref();
2471
+ const delayed = ref(!!delay);
2472
+ if (delay) setTimeout(() => {
2473
+ delayed.value = false;
2474
+ }, delay);
2475
+ if (timeout != null) setTimeout(() => {
2476
+ if (!loaded.value && !error.value) {
2477
+ const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
2478
+ onError(err);
2479
+ error.value = err;
2480
+ }
2481
+ }, timeout);
2482
+ load().then(() => {
2483
+ loaded.value = true;
2484
+ if (instance.parent && isKeepAlive(instance.parent.vnode)) instance.parent.update();
2485
+ }).catch((err) => {
2486
+ onError(err);
2487
+ error.value = err;
2488
+ });
2489
+ return () => {
2490
+ if (loaded.value && resolvedComp) return createInnerComp(resolvedComp, instance);
2491
+ else if (error.value && errorComponent) return createVNode(errorComponent, { error: error.value });
2492
+ else if (loadingComponent && !delayed.value) return createInnerComp(loadingComponent, instance);
2493
+ };
2494
+ }
2495
+ });
2496
+ }
2497
+ function createInnerComp(comp, parent) {
2498
+ const { ref: ref2, props, children, ce } = parent.vnode;
2499
+ const vnode = createVNode(comp, props, children);
2500
+ vnode.ref = ref2;
2501
+ vnode.ce = ce;
2502
+ delete parent.vnode.ce;
2503
+ return vnode;
2504
+ }
2380
2505
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
2381
2506
  function onActivated(hook, target) {
2382
2507
  registerKeepAliveHook(hook, "a", target);
@@ -2459,7 +2584,7 @@ function renderList(source, renderItem, cache, index) {
2459
2584
  if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) warn$1(`The v-for range expect an integer value but got ${source}.`);
2460
2585
  ret = new Array(source);
2461
2586
  for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
2462
- } else if (isObject$1(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2587
+ } else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2463
2588
  else {
2464
2589
  const keys = Object.keys(source);
2465
2590
  ret = new Array(keys.length);
@@ -2697,7 +2822,7 @@ function applyOptions(instance) {
2697
2822
  if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) warn$1(`The data option must be a function. Plain object usage is no longer supported.`);
2698
2823
  const data = dataOptions.call(publicThis, publicThis);
2699
2824
  if (!!(process.env.NODE_ENV !== "production") && isPromise(data)) warn$1(`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`);
2700
- if (!isObject$1(data)) process.env.NODE_ENV !== "production" && warn$1(`data() should return an object.`);
2825
+ if (!isObject(data)) process.env.NODE_ENV !== "production" && warn$1(`data() should return an object.`);
2701
2826
  else {
2702
2827
  instance.data = reactive(data);
2703
2828
  if (!!(process.env.NODE_ENV !== "production")) for (const key in data) {
@@ -2777,7 +2902,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
2777
2902
  for (const key in injectOptions) {
2778
2903
  const opt = injectOptions[key];
2779
2904
  let injected;
2780
- if (isObject$1(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
2905
+ if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
2781
2906
  else injected = inject(opt.from || key);
2782
2907
  else injected = inject(opt);
2783
2908
  if (isRef(injected)) Object.defineProperty(ctx, key, {
@@ -2800,7 +2925,7 @@ function createWatcher(raw, ctx, publicThis, key) {
2800
2925
  if (isFunction(handler)) watch(getter, handler);
2801
2926
  else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
2802
2927
  } else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
2803
- else if (isObject$1(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
2928
+ else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
2804
2929
  else {
2805
2930
  const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
2806
2931
  if (isFunction(handler)) watch(getter, handler, raw);
@@ -2821,7 +2946,7 @@ function resolveMergedOptions(instance) {
2821
2946
  if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
2822
2947
  mergeOptions(resolved, base, optionMergeStrategies);
2823
2948
  }
2824
- if (isObject$1(base)) cache.set(base, resolved);
2949
+ if (isObject(base)) cache.set(base, resolved);
2825
2950
  return resolved;
2826
2951
  }
2827
2952
  function mergeOptions(to, from, strats, asMixin = false) {
@@ -2923,7 +3048,7 @@ let uid$1 = 0;
2923
3048
  function createAppAPI(render$1, hydrate) {
2924
3049
  return function createApp$1(rootComponent, rootProps = null) {
2925
3050
  if (!isFunction(rootComponent)) rootComponent = extend({}, rootComponent);
2926
- if (rootProps != null && !isObject$1(rootProps)) {
3051
+ if (rootProps != null && !isObject(rootProps)) {
2927
3052
  process.env.NODE_ENV !== "production" && warn$1(`root props passed to app.mount() must be an object.`);
2928
3053
  rootProps = null;
2929
3054
  }
@@ -3039,7 +3164,7 @@ If you want to remount the same app, move your app creation logic into a factory
3039
3164
  }
3040
3165
  let currentApp = null;
3041
3166
  const getModelModifiers = (props, modelName) => {
3042
- return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize$1(modelName)}Modifiers`] || props[`${hyphenate$1(modelName)}Modifiers`];
3167
+ return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
3043
3168
  };
3044
3169
  function emit(instance, event, ...rawArgs) {
3045
3170
  if (instance.isUnmounted) return;
@@ -3047,7 +3172,7 @@ function emit(instance, event, ...rawArgs) {
3047
3172
  if (!!(process.env.NODE_ENV !== "production")) {
3048
3173
  const { emitsOptions, propsOptions: [propsOptions] } = instance;
3049
3174
  if (emitsOptions) if (!(event in emitsOptions) && true) {
3050
- if (!propsOptions || !(toHandlerKey(camelize$1(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize$1(event))}" prop.`);
3175
+ if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
3051
3176
  } else {
3052
3177
  const validator = emitsOptions[event];
3053
3178
  if (isFunction(validator)) {
@@ -3065,11 +3190,11 @@ function emit(instance, event, ...rawArgs) {
3065
3190
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
3066
3191
  if (!!(process.env.NODE_ENV !== "production")) {
3067
3192
  const lowerCaseEvent = event.toLowerCase();
3068
- if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1(event)}" instead of "${event}".`);
3193
+ if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`);
3069
3194
  }
3070
3195
  let handlerName;
3071
- let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))];
3072
- if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate$1(event))];
3196
+ let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))];
3197
+ if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate(event))];
3073
3198
  if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
3074
3199
  const onceHandler = props[handlerName + `Once`];
3075
3200
  if (onceHandler) {
@@ -3100,18 +3225,18 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
3100
3225
  if (comp.mixins) comp.mixins.forEach(extendEmits);
3101
3226
  }
3102
3227
  if (!raw && !hasExtends) {
3103
- if (isObject$1(comp)) cache.set(comp, null);
3228
+ if (isObject(comp)) cache.set(comp, null);
3104
3229
  return null;
3105
3230
  }
3106
3231
  if (isArray(raw)) raw.forEach((key) => normalized[key] = null);
3107
3232
  else extend(normalized, raw);
3108
- if (isObject$1(comp)) cache.set(comp, normalized);
3233
+ if (isObject(comp)) cache.set(comp, normalized);
3109
3234
  return normalized;
3110
3235
  }
3111
3236
  function isEmitListener(options, key) {
3112
3237
  if (!options || !isOn(key)) return false;
3113
3238
  key = key.slice(2).replace(/Once$/, "");
3114
- return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate$1(key)) || hasOwn(options, key);
3239
+ return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
3115
3240
  }
3116
3241
  let accessedAttrs = false;
3117
3242
  function markAttrsAccessed() {
@@ -3324,7 +3449,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3324
3449
  hasAttrsChanged = true;
3325
3450
  }
3326
3451
  } else {
3327
- const camelizedKey = camelize$1(key);
3452
+ const camelizedKey = camelize(key);
3328
3453
  props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
3329
3454
  }
3330
3455
  else if (value !== attrs[key]) {
@@ -3336,7 +3461,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3336
3461
  } else {
3337
3462
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
3338
3463
  let kebabKey;
3339
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate$1(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
3464
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
3340
3465
  if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
3341
3466
  } else delete props[key];
3342
3467
  if (attrs !== rawCurrentProps) {
@@ -3357,7 +3482,7 @@ function setFullProps(instance, rawProps, props, attrs) {
3357
3482
  if (isReservedProp(key)) continue;
3358
3483
  const value = rawProps[key];
3359
3484
  let camelKey;
3360
- if (options && hasOwn(options, camelKey = camelize$1(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3485
+ if (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3361
3486
  else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3362
3487
  else if (!isEmitListener(instance.emitsOptions, key)) {
3363
3488
  if (!(key in attrs) || value !== attrs[key]) {
@@ -3395,7 +3520,7 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
3395
3520
  }
3396
3521
  if (opt[0]) {
3397
3522
  if (isAbsent && !hasDefault) value = false;
3398
- else if (opt[1] && (value === "" || value === hyphenate$1(key))) value = true;
3523
+ else if (opt[1] && (value === "" || value === hyphenate(key))) value = true;
3399
3524
  }
3400
3525
  }
3401
3526
  return value;
@@ -3421,18 +3546,18 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
3421
3546
  if (comp.mixins) comp.mixins.forEach(extendProps);
3422
3547
  }
3423
3548
  if (!raw && !hasExtends) {
3424
- if (isObject$1(comp)) cache.set(comp, EMPTY_ARR);
3549
+ if (isObject(comp)) cache.set(comp, EMPTY_ARR);
3425
3550
  return EMPTY_ARR;
3426
3551
  }
3427
3552
  if (isArray(raw)) for (let i = 0; i < raw.length; i++) {
3428
3553
  if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) warn$1(`props must be strings when using array syntax.`, raw[i]);
3429
- const normalizedKey = camelize$1(raw[i]);
3554
+ const normalizedKey = camelize(raw[i]);
3430
3555
  if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
3431
3556
  }
3432
3557
  else if (raw) {
3433
- if (!!(process.env.NODE_ENV !== "production") && !isObject$1(raw)) warn$1(`invalid props options`, raw);
3558
+ if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) warn$1(`invalid props options`, raw);
3434
3559
  for (const key in raw) {
3435
- const normalizedKey = camelize$1(key);
3560
+ const normalizedKey = camelize(key);
3436
3561
  if (validatePropName(normalizedKey)) {
3437
3562
  const opt = raw[key];
3438
3563
  const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
@@ -3455,7 +3580,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
3455
3580
  }
3456
3581
  }
3457
3582
  const res = [normalized, needCastKeys];
3458
- if (isObject$1(comp)) cache.set(comp, res);
3583
+ if (isObject(comp)) cache.set(comp, res);
3459
3584
  return res;
3460
3585
  }
3461
3586
  function validatePropName(key) {
@@ -3472,7 +3597,7 @@ function getType(ctor) {
3472
3597
  function validateProps(rawProps, props, instance) {
3473
3598
  const resolvedValues = toRaw(props);
3474
3599
  const options = instance.propsOptions[0];
3475
- const camelizePropsKey = Object.keys(rawProps).map((key) => camelize$1(key));
3600
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
3476
3601
  for (const key in options) {
3477
3602
  let opt = options[key];
3478
3603
  if (opt == null) continue;
@@ -3511,7 +3636,7 @@ function assertType(value, type) {
3511
3636
  const t = typeof value;
3512
3637
  valid = t === expectedType.toLowerCase();
3513
3638
  if (!valid && t === "object") valid = value instanceof type;
3514
- } else if (expectedType === "Object") valid = isObject$1(value);
3639
+ } else if (expectedType === "Object") valid = isObject(value);
3515
3640
  else if (expectedType === "Array") valid = isArray(value);
3516
3641
  else valid = value instanceof type;
3517
3642
  return {
@@ -4441,11 +4566,297 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
4441
4566
  return null;
4442
4567
  }
4443
4568
  const isSuspense = (type) => type.__isSuspense;
4569
+ let suspenseId = 0;
4570
+ const Suspense = {
4571
+ name: "Suspense",
4572
+ __isSuspense: true,
4573
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
4574
+ if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
4575
+ else {
4576
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
4577
+ n2.suspense = n1.suspense;
4578
+ n2.suspense.vnode = n2;
4579
+ n2.el = n1.el;
4580
+ return;
4581
+ }
4582
+ patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
4583
+ }
4584
+ },
4585
+ hydrate: hydrateSuspense,
4586
+ normalize: normalizeSuspenseChildren
4587
+ };
4588
+ function triggerEvent(vnode, name) {
4589
+ const eventListener = vnode.props && vnode.props[name];
4590
+ if (isFunction(eventListener)) eventListener();
4591
+ }
4592
+ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
4593
+ const { p: patch, o: { createElement } } = rendererInternals;
4594
+ const hiddenContainer = createElement("div");
4595
+ const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals);
4596
+ patch(null, suspense.pendingBranch = vnode.ssContent, hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds);
4597
+ if (suspense.deps > 0) {
4598
+ triggerEvent(vnode, "onPending");
4599
+ triggerEvent(vnode, "onFallback");
4600
+ patch(null, vnode.ssFallback, container, anchor, parentComponent, null, namespace, slotScopeIds);
4601
+ setActiveBranch(suspense, vnode.ssFallback);
4602
+ } else suspense.resolve(false, true);
4603
+ }
4604
+ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
4605
+ const suspense = n2.suspense = n1.suspense;
4606
+ suspense.vnode = n2;
4607
+ n2.el = n1.el;
4608
+ const newBranch = n2.ssContent;
4609
+ const newFallback = n2.ssFallback;
4610
+ const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
4611
+ if (pendingBranch) {
4612
+ suspense.pendingBranch = newBranch;
4613
+ if (isSameVNodeType(pendingBranch, newBranch)) {
4614
+ patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
4615
+ if (suspense.deps <= 0) suspense.resolve();
4616
+ else if (isInFallback) {
4617
+ if (!isHydrating) {
4618
+ patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4619
+ setActiveBranch(suspense, newFallback);
4620
+ }
4621
+ }
4622
+ } else {
4623
+ suspense.pendingId = suspenseId++;
4624
+ if (isHydrating) {
4625
+ suspense.isHydrating = false;
4626
+ suspense.activeBranch = pendingBranch;
4627
+ } else unmount(pendingBranch, parentComponent, suspense);
4628
+ suspense.deps = 0;
4629
+ suspense.effects.length = 0;
4630
+ suspense.hiddenContainer = createElement("div");
4631
+ if (isInFallback) {
4632
+ patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
4633
+ if (suspense.deps <= 0) suspense.resolve();
4634
+ else {
4635
+ patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4636
+ setActiveBranch(suspense, newFallback);
4637
+ }
4638
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
4639
+ patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, namespace, slotScopeIds, optimized);
4640
+ suspense.resolve(true);
4641
+ } else {
4642
+ patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
4643
+ if (suspense.deps <= 0) suspense.resolve();
4644
+ }
4645
+ }
4646
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
4647
+ patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, namespace, slotScopeIds, optimized);
4648
+ setActiveBranch(suspense, newBranch);
4649
+ } else {
4650
+ triggerEvent(n2, "onPending");
4651
+ suspense.pendingBranch = newBranch;
4652
+ if (newBranch.shapeFlag & 512) suspense.pendingId = newBranch.component.suspenseId;
4653
+ else suspense.pendingId = suspenseId++;
4654
+ patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
4655
+ if (suspense.deps <= 0) suspense.resolve();
4656
+ else {
4657
+ const { timeout, pendingId } = suspense;
4658
+ if (timeout > 0) setTimeout(() => {
4659
+ if (suspense.pendingId === pendingId) suspense.fallback(newFallback);
4660
+ }, timeout);
4661
+ else if (timeout === 0) suspense.fallback(newFallback);
4662
+ }
4663
+ }
4664
+ }
4665
+ let hasWarned = false;
4666
+ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
4667
+ if (!!(process.env.NODE_ENV !== "production") && !hasWarned) {
4668
+ hasWarned = true;
4669
+ console[console.info ? "info" : "log"](`<Suspense> is an experimental feature and its API will likely change.`);
4670
+ }
4671
+ const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove: remove$1 } } = rendererInternals;
4672
+ let parentSuspenseId;
4673
+ const isSuspensible = isVNodeSuspensible(vnode);
4674
+ if (isSuspensible) {
4675
+ if (parentSuspense && parentSuspense.pendingBranch) {
4676
+ parentSuspenseId = parentSuspense.pendingId;
4677
+ parentSuspense.deps++;
4678
+ }
4679
+ }
4680
+ const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
4681
+ if (!!(process.env.NODE_ENV !== "production")) assertNumber(timeout, `Suspense timeout`);
4682
+ const initialAnchor = anchor;
4683
+ const suspense = {
4684
+ vnode,
4685
+ parent: parentSuspense,
4686
+ parentComponent,
4687
+ namespace,
4688
+ container,
4689
+ hiddenContainer,
4690
+ deps: 0,
4691
+ pendingId: suspenseId++,
4692
+ timeout: typeof timeout === "number" ? timeout : -1,
4693
+ activeBranch: null,
4694
+ pendingBranch: null,
4695
+ isInFallback: !isHydrating,
4696
+ isHydrating,
4697
+ isUnmounted: false,
4698
+ effects: [],
4699
+ resolve(resume = false, sync = false) {
4700
+ if (!!(process.env.NODE_ENV !== "production")) {
4701
+ if (!resume && !suspense.pendingBranch) throw new Error(`suspense.resolve() is called without a pending branch.`);
4702
+ if (suspense.isUnmounted) throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);
4703
+ }
4704
+ const { vnode: vnode2, activeBranch, pendingBranch, pendingId, effects, parentComponent: parentComponent2, container: container2, isInFallback } = suspense;
4705
+ let delayEnter = false;
4706
+ if (suspense.isHydrating) suspense.isHydrating = false;
4707
+ else if (!resume) {
4708
+ delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
4709
+ if (delayEnter) activeBranch.transition.afterLeave = () => {
4710
+ if (pendingId === suspense.pendingId) {
4711
+ move(pendingBranch, container2, anchor === initialAnchor ? next(activeBranch) : anchor, 0);
4712
+ queuePostFlushCb(effects);
4713
+ if (isInFallback && vnode2.ssFallback) vnode2.ssFallback.el = null;
4714
+ }
4715
+ };
4716
+ if (activeBranch) {
4717
+ if (parentNode(activeBranch.el) === container2) anchor = next(activeBranch);
4718
+ unmount(activeBranch, parentComponent2, suspense, true);
4719
+ if (!delayEnter && isInFallback && vnode2.ssFallback) queuePostRenderEffect(() => vnode2.ssFallback.el = null, suspense);
4720
+ }
4721
+ if (!delayEnter) move(pendingBranch, container2, anchor, 0);
4722
+ }
4723
+ setActiveBranch(suspense, pendingBranch);
4724
+ suspense.pendingBranch = null;
4725
+ suspense.isInFallback = false;
4726
+ let parent = suspense.parent;
4727
+ let hasUnresolvedAncestor = false;
4728
+ while (parent) {
4729
+ if (parent.pendingBranch) {
4730
+ parent.effects.push(...effects);
4731
+ hasUnresolvedAncestor = true;
4732
+ break;
4733
+ }
4734
+ parent = parent.parent;
4735
+ }
4736
+ if (!hasUnresolvedAncestor && !delayEnter) queuePostFlushCb(effects);
4737
+ suspense.effects = [];
4738
+ if (isSuspensible) {
4739
+ if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
4740
+ parentSuspense.deps--;
4741
+ if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
4742
+ }
4743
+ }
4744
+ triggerEvent(vnode2, "onResolve");
4745
+ },
4746
+ fallback(fallbackVNode) {
4747
+ if (!suspense.pendingBranch) return;
4748
+ const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
4749
+ triggerEvent(vnode2, "onFallback");
4750
+ const anchor2 = next(activeBranch);
4751
+ const mountFallback = () => {
4752
+ if (!suspense.isInFallback) return;
4753
+ patch(null, fallbackVNode, container2, anchor2, parentComponent2, null, namespace2, slotScopeIds, optimized);
4754
+ setActiveBranch(suspense, fallbackVNode);
4755
+ };
4756
+ const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
4757
+ if (delayEnter) activeBranch.transition.afterLeave = mountFallback;
4758
+ suspense.isInFallback = true;
4759
+ unmount(activeBranch, parentComponent2, null, true);
4760
+ if (!delayEnter) mountFallback();
4761
+ },
4762
+ move(container2, anchor2, type) {
4763
+ suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
4764
+ suspense.container = container2;
4765
+ },
4766
+ next() {
4767
+ return suspense.activeBranch && next(suspense.activeBranch);
4768
+ },
4769
+ registerDep(instance, setupRenderEffect, optimized2) {
4770
+ const isInPendingSuspense = !!suspense.pendingBranch;
4771
+ if (isInPendingSuspense) suspense.deps++;
4772
+ const hydratedEl = instance.vnode.el;
4773
+ instance.asyncDep.catch((err) => {
4774
+ handleError(err, instance, 0);
4775
+ }).then((asyncSetupResult) => {
4776
+ if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
4777
+ instance.asyncResolved = true;
4778
+ const { vnode: vnode2 } = instance;
4779
+ if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(vnode2);
4780
+ handleSetupResult(instance, asyncSetupResult, false);
4781
+ if (hydratedEl) vnode2.el = hydratedEl;
4782
+ const placeholder = !hydratedEl && instance.subTree.el;
4783
+ setupRenderEffect(instance, vnode2, parentNode(hydratedEl || instance.subTree.el), hydratedEl ? null : next(instance.subTree), suspense, namespace, optimized2);
4784
+ if (placeholder) {
4785
+ vnode2.placeholder = null;
4786
+ remove$1(placeholder);
4787
+ }
4788
+ updateHOCHostEl(instance, vnode2.el);
4789
+ if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4790
+ if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
4791
+ });
4792
+ },
4793
+ unmount(parentSuspense2, doRemove) {
4794
+ suspense.isUnmounted = true;
4795
+ if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense2, doRemove);
4796
+ if (suspense.pendingBranch) unmount(suspense.pendingBranch, parentComponent, parentSuspense2, doRemove);
4797
+ }
4798
+ };
4799
+ return suspense;
4800
+ }
4801
+ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
4802
+ const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement("div"), null, namespace, slotScopeIds, optimized, rendererInternals, true);
4803
+ const result = hydrateNode(node, suspense.pendingBranch = vnode.ssContent, parentComponent, suspense, slotScopeIds, optimized);
4804
+ if (suspense.deps === 0) suspense.resolve(false, true);
4805
+ return result;
4806
+ }
4807
+ function normalizeSuspenseChildren(vnode) {
4808
+ const { shapeFlag, children } = vnode;
4809
+ const isSlotChildren = shapeFlag & 32;
4810
+ vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
4811
+ vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
4812
+ }
4813
+ function normalizeSuspenseSlot(s) {
4814
+ let block;
4815
+ if (isFunction(s)) {
4816
+ const trackBlock = isBlockTreeEnabled && s._c;
4817
+ if (trackBlock) {
4818
+ s._d = false;
4819
+ openBlock();
4820
+ }
4821
+ s = s();
4822
+ if (trackBlock) {
4823
+ s._d = true;
4824
+ block = currentBlock;
4825
+ closeBlock();
4826
+ }
4827
+ }
4828
+ if (isArray(s)) {
4829
+ const singleChild = filterSingleRoot(s);
4830
+ if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) warn$1(`<Suspense> slots expect a single root node.`);
4831
+ s = singleChild;
4832
+ }
4833
+ s = normalizeVNode(s);
4834
+ if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
4835
+ return s;
4836
+ }
4444
4837
  function queueEffectWithSuspense(fn, suspense) {
4445
4838
  if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
4446
4839
  else suspense.effects.push(fn);
4447
4840
  else queuePostFlushCb(fn);
4448
4841
  }
4842
+ function setActiveBranch(suspense, branch) {
4843
+ suspense.activeBranch = branch;
4844
+ const { vnode, parentComponent } = suspense;
4845
+ let el = branch.el;
4846
+ while (!el && branch.component) {
4847
+ branch = branch.component.subTree;
4848
+ el = branch.el;
4849
+ }
4850
+ vnode.el = el;
4851
+ if (parentComponent && parentComponent.subTree === vnode) {
4852
+ parentComponent.vnode.el = el;
4853
+ updateHOCHostEl(parentComponent, el);
4854
+ }
4855
+ }
4856
+ function isVNodeSuspensible(vnode) {
4857
+ const suspensible = vnode.props && vnode.props.suspensible;
4858
+ return suspensible != null && suspensible !== false;
4859
+ }
4449
4860
  const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
4450
4861
  const Text = /* @__PURE__ */ Symbol.for("v-txt");
4451
4862
  const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
@@ -4561,12 +4972,12 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
4561
4972
  props = guardReactiveProps(props);
4562
4973
  let { class: klass, style } = props;
4563
4974
  if (klass && !isString(klass)) props.class = normalizeClass(klass);
4564
- if (isObject$1(style)) {
4975
+ if (isObject(style)) {
4565
4976
  if (isProxy(style) && !isArray(style)) style = extend({}, style);
4566
4977
  props.style = normalizeStyle(style);
4567
4978
  }
4568
4979
  }
4569
- const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction(type) ? 2 : 0;
4980
+ const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
4570
4981
  if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
4571
4982
  type = toRaw(type);
4572
4983
  warn$1(`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, `
@@ -4866,7 +5277,7 @@ function setupStatefulComponent(instance, isSSR) {
4866
5277
  function handleSetupResult(instance, setupResult, isSSR) {
4867
5278
  if (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
4868
5279
  else instance.render = setupResult;
4869
- else if (isObject$1(setupResult)) {
5280
+ else if (isObject(setupResult)) {
4870
5281
  if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) warn$1(`setup() should not return VNodes directly - return a render function instead.`);
4871
5282
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) instance.devtoolsRawSetupState = setupResult;
4872
5283
  instance.setupState = proxyRefs(setupResult);
@@ -5022,7 +5433,7 @@ function initCustomFormatter() {
5022
5433
  const formatter = {
5023
5434
  __vue_custom_formatter: true,
5024
5435
  header(obj) {
5025
- if (!isObject$1(obj)) return null;
5436
+ if (!isObject(obj)) return null;
5026
5437
  if (obj.__isVue) return [
5027
5438
  "div",
5028
5439
  vueStyle,
@@ -5147,7 +5558,7 @@ function initCustomFormatter() {
5147
5558
  keywordStyle,
5148
5559
  v
5149
5560
  ];
5150
- else if (isObject$1(v)) return ["object", { object: asRaw ? toRaw(v) : v }];
5561
+ else if (isObject(v)) return ["object", { object: asRaw ? toRaw(v) : v }];
5151
5562
  else return [
5152
5563
  "span",
5153
5564
  stringStyle,
@@ -5163,7 +5574,7 @@ function initCustomFormatter() {
5163
5574
  }
5164
5575
  function isKeyOfType(Comp, key, type) {
5165
5576
  const opts = Comp[type];
5166
- if (isArray(opts) && opts.includes(key) || isObject$1(opts) && key in opts) return true;
5577
+ if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) return true;
5167
5578
  if (Comp.extends && isKeyOfType(Comp.extends, key, type)) return true;
5168
5579
  if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) return true;
5169
5580
  }
@@ -5326,7 +5737,7 @@ function setStyle(style, name, val) {
5326
5737
  if (name.startsWith("--")) style.setProperty(name, val);
5327
5738
  else {
5328
5739
  const prefixed = autoPrefix(style, name);
5329
- if (importantRE.test(val)) style.setProperty(hyphenate$1(prefixed), val.replace(importantRE, ""), "important");
5740
+ if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
5330
5741
  else style[prefixed] = val;
5331
5742
  }
5332
5743
  }
@@ -5340,7 +5751,7 @@ const prefixCache = {};
5340
5751
  function autoPrefix(style, rawName) {
5341
5752
  const cached = prefixCache[rawName];
5342
5753
  if (cached) return cached;
5343
- let name = camelize$1(rawName);
5754
+ let name = camelize(rawName);
5344
5755
  if (name !== "filter" && name in style) return prefixCache[rawName] = name;
5345
5756
  name = capitalize(name);
5346
5757
  for (let i = 0; i < prefixes.length; i++) {
@@ -5420,7 +5831,7 @@ function parseName(name) {
5420
5831
  options[m[0].toLowerCase()] = true;
5421
5832
  }
5422
5833
  }
5423
- return [name[2] === ":" ? name.slice(3) : hyphenate$1(name.slice(2)), options];
5834
+ return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
5424
5835
  }
5425
5836
  let cachedNow = 0;
5426
5837
  const p = /* @__PURE__ */ Promise.resolve();
@@ -5461,7 +5872,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
5461
5872
  } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
5462
5873
  patchDOMProp(el, key, nextValue);
5463
5874
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
5464
- } else if (el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))) patchDOMProp(el, camelize$1(key), nextValue, parentComponent, key);
5875
+ } else if (el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
5465
5876
  else {
5466
5877
  if (key === "true-value") el._trueValue = nextValue;
5467
5878
  else if (key === "false-value") el._falseValue = nextValue;
@@ -5598,7 +6009,7 @@ var VueElement = class VueElement extends BaseClass {
5598
6009
  const opt = props[key];
5599
6010
  if (opt === Number || opt && opt.type === Number) {
5600
6011
  if (key in this._props) this._props[key] = toNumber(this._props[key]);
5601
- (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true;
6012
+ (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
5602
6013
  }
5603
6014
  }
5604
6015
  this._numberProps = numberProps;
@@ -5630,7 +6041,7 @@ var VueElement = class VueElement extends BaseClass {
5630
6041
  const { props } = def$1;
5631
6042
  const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
5632
6043
  for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
5633
- for (const key of declaredPropKeys.map(camelize$1)) Object.defineProperty(this, key, {
6044
+ for (const key of declaredPropKeys.map(camelize)) Object.defineProperty(this, key, {
5634
6045
  get() {
5635
6046
  return this._getProp(key);
5636
6047
  },
@@ -5643,7 +6054,7 @@ var VueElement = class VueElement extends BaseClass {
5643
6054
  if (key.startsWith("data-v-")) return;
5644
6055
  const has = this.hasAttribute(key);
5645
6056
  let value = has ? this.getAttribute(key) : REMOVAL;
5646
- const camelKey = camelize$1(key);
6057
+ const camelKey = camelize(key);
5647
6058
  if (has && this._numberProps && this._numberProps[camelKey]) value = toNumber(value);
5648
6059
  this._setProp(camelKey, value, false, true);
5649
6060
  }
@@ -5671,9 +6082,9 @@ var VueElement = class VueElement extends BaseClass {
5671
6082
  this._processMutations(ob.takeRecords());
5672
6083
  ob.disconnect();
5673
6084
  }
5674
- if (val === true) this.setAttribute(hyphenate$1(key), "");
5675
- else if (typeof val === "string" || typeof val === "number") this.setAttribute(hyphenate$1(key), val + "");
5676
- else if (!val) this.removeAttribute(hyphenate$1(key));
6085
+ if (val === true) this.setAttribute(hyphenate(key), "");
6086
+ else if (typeof val === "string" || typeof val === "number") this.setAttribute(hyphenate(key), val + "");
6087
+ else if (!val) this.removeAttribute(hyphenate(key));
5677
6088
  ob && ob.observe(this, { attributes: true });
5678
6089
  }
5679
6090
  }
@@ -5705,7 +6116,7 @@ var VueElement = class VueElement extends BaseClass {
5705
6116
  };
5706
6117
  instance.emit = (event, ...args) => {
5707
6118
  dispatch(event, args);
5708
- if (hyphenate$1(event) !== event) dispatch(hyphenate$1(event), args);
6119
+ if (hyphenate(event) !== event) dispatch(hyphenate(event), args);
5709
6120
  };
5710
6121
  this._setParent();
5711
6122
  };
@@ -5939,885 +6350,4 @@ function initDev() {
5939
6350
  if (!!(process.env.NODE_ENV !== "production")) initDev();
5940
6351
 
5941
6352
  //#endregion
5942
- //#region ../../node_modules/.pnpm/@vueuse+shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
5943
- /**
5944
- * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
5945
- *
5946
- * @param fn
5947
- */
5948
- function tryOnScopeDispose(fn, failSilently) {
5949
- if (getCurrentScope()) {
5950
- onScopeDispose(fn, failSilently);
5951
- return true;
5952
- }
5953
- return false;
5954
- }
5955
- const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
5956
- /**
5957
- * On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
5958
- *
5959
- * @example
5960
- * ```ts
5961
- * injectLocal('MyInjectionKey', 1)
5962
- * const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
5963
- * ```
5964
- *
5965
- * @__NO_SIDE_EFFECTS__
5966
- */
5967
- const injectLocal = (...args) => {
5968
- var _getCurrentInstance;
5969
- const key = args[0];
5970
- const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
5971
- const owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();
5972
- if (owner == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
5973
- if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
5974
- return inject(...args);
5975
- };
5976
- const isClient = typeof window !== "undefined" && typeof document !== "undefined";
5977
- const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
5978
- const notNullish = (val) => val != null;
5979
- const toString = Object.prototype.toString;
5980
- const isObject = (val) => toString.call(val) === "[object Object]";
5981
- const noop = () => {};
5982
- function toRef(...args) {
5983
- if (args.length !== 1) return toRef$1(...args);
5984
- const r = args[0];
5985
- return typeof r === "function" ? readonly(customRef(() => ({
5986
- get: r,
5987
- set: noop
5988
- }))) : ref(r);
5989
- }
5990
- /**
5991
- * @internal
5992
- */
5993
- function createFilterWrapper(filter, fn) {
5994
- function wrapper(...args) {
5995
- return new Promise((resolve, reject) => {
5996
- Promise.resolve(filter(() => fn.apply(this, args), {
5997
- fn,
5998
- thisArg: this,
5999
- args
6000
- })).then(resolve).catch(reject);
6001
- });
6002
- }
6003
- return wrapper;
6004
- }
6005
- const bypassFilter = (invoke$1) => {
6006
- return invoke$1();
6007
- };
6008
- /**
6009
- * Create an EventFilter that debounce the events
6010
- */
6011
- function debounceFilter(ms, options = {}) {
6012
- let timer;
6013
- let maxTimer;
6014
- let lastRejector = noop;
6015
- const _clearTimeout = (timer$1) => {
6016
- clearTimeout(timer$1);
6017
- lastRejector();
6018
- lastRejector = noop;
6019
- };
6020
- let lastInvoker;
6021
- const filter = (invoke$1) => {
6022
- const duration = toValue(ms);
6023
- const maxDuration = toValue(options.maxWait);
6024
- if (timer) _clearTimeout(timer);
6025
- if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
6026
- if (maxTimer) {
6027
- _clearTimeout(maxTimer);
6028
- maxTimer = void 0;
6029
- }
6030
- return Promise.resolve(invoke$1());
6031
- }
6032
- return new Promise((resolve, reject) => {
6033
- lastRejector = options.rejectOnCancel ? reject : resolve;
6034
- lastInvoker = invoke$1;
6035
- if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
6036
- if (timer) _clearTimeout(timer);
6037
- maxTimer = void 0;
6038
- resolve(lastInvoker());
6039
- }, maxDuration);
6040
- timer = setTimeout(() => {
6041
- if (maxTimer) _clearTimeout(maxTimer);
6042
- maxTimer = void 0;
6043
- resolve(invoke$1());
6044
- }, duration);
6045
- });
6046
- };
6047
- return filter;
6048
- }
6049
- /**
6050
- * EventFilter that gives extra controls to pause and resume the filter
6051
- *
6052
- * @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
6053
- * @param options Options to configure the filter
6054
- */
6055
- function pausableFilter(extendFilter = bypassFilter, options = {}) {
6056
- const { initialState = "active" } = options;
6057
- const isActive = toRef(initialState === "active");
6058
- function pause() {
6059
- isActive.value = false;
6060
- }
6061
- function resume() {
6062
- isActive.value = true;
6063
- }
6064
- const eventFilter = (...args) => {
6065
- if (isActive.value) extendFilter(...args);
6066
- };
6067
- return {
6068
- isActive: readonly(isActive),
6069
- pause,
6070
- resume,
6071
- eventFilter
6072
- };
6073
- }
6074
- /**
6075
- * Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
6076
- */
6077
- function pxValue(px) {
6078
- return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
6079
- }
6080
- function toArray(value) {
6081
- return Array.isArray(value) ? value : [value];
6082
- }
6083
- function cacheStringFunction(fn) {
6084
- const cache = Object.create(null);
6085
- return ((str) => {
6086
- return cache[str] || (cache[str] = fn(str));
6087
- });
6088
- }
6089
- const hyphenateRE = /\B([A-Z])/g;
6090
- const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
6091
- const camelizeRE = /-(\w)/g;
6092
- const camelize = cacheStringFunction((str) => {
6093
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
6094
- });
6095
- function getLifeCycleTarget(target) {
6096
- return target || getCurrentInstance();
6097
- }
6098
- /**
6099
- * Debounce execution of a function.
6100
- *
6101
- * @see https://vueuse.org/useDebounceFn
6102
- * @param fn A function to be executed after delay milliseconds debounced.
6103
- * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
6104
- * @param options Options
6105
- *
6106
- * @return A new, debounce, function.
6107
- *
6108
- * @__NO_SIDE_EFFECTS__
6109
- */
6110
- function useDebounceFn(fn, ms = 200, options = {}) {
6111
- return createFilterWrapper(debounceFilter(ms, options), fn);
6112
- }
6113
- function watchWithFilter(source, cb, options = {}) {
6114
- const { eventFilter = bypassFilter, ...watchOptions } = options;
6115
- return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
6116
- }
6117
- function watchPausable(source, cb, options = {}) {
6118
- const { eventFilter: filter, initialState = "active", ...watchOptions } = options;
6119
- const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
6120
- return {
6121
- stop: watchWithFilter(source, cb, {
6122
- ...watchOptions,
6123
- eventFilter
6124
- }),
6125
- pause,
6126
- resume,
6127
- isActive
6128
- };
6129
- }
6130
- /** @deprecated use `watchPausable` instead */
6131
- const pausableWatch = watchPausable;
6132
- /**
6133
- * Call onMounted() if it's inside a component lifecycle, if not, just call the function
6134
- *
6135
- * @param fn
6136
- * @param sync if set to false, it will run in the nextTick() of Vue
6137
- * @param target
6138
- */
6139
- function tryOnMounted(fn, sync = true, target) {
6140
- if (getLifeCycleTarget(target)) onMounted(fn, target);
6141
- else if (sync) fn();
6142
- else nextTick(fn);
6143
- }
6144
- /**
6145
- * Shorthand for watching value with {immediate: true}
6146
- *
6147
- * @see https://vueuse.org/watchImmediate
6148
- */
6149
- function watchImmediate(source, cb, options) {
6150
- return watch(source, cb, {
6151
- ...options,
6152
- immediate: true
6153
- });
6154
- }
6155
-
6156
- //#endregion
6157
- //#region ../../node_modules/.pnpm/@vueuse+core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js
6158
- const defaultWindow = isClient ? window : void 0;
6159
- const defaultDocument = isClient ? window.document : void 0;
6160
- const defaultNavigator = isClient ? window.navigator : void 0;
6161
- const defaultLocation = isClient ? window.location : void 0;
6162
- /**
6163
- * Get the dom element of a ref of element or Vue component instance
6164
- *
6165
- * @param elRef
6166
- */
6167
- function unrefElement(elRef) {
6168
- var _$el;
6169
- const plain = toValue(elRef);
6170
- return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
6171
- }
6172
- function useEventListener(...args) {
6173
- const register = (el, event, listener, options) => {
6174
- el.addEventListener(event, listener, options);
6175
- return () => el.removeEventListener(event, listener, options);
6176
- };
6177
- const firstParamTargets = computed(() => {
6178
- const test = toArray(toValue(args[0])).filter((e) => e != null);
6179
- return test.every((e) => typeof e !== "string") ? test : void 0;
6180
- });
6181
- return watchImmediate(() => {
6182
- var _firstParamTargets$va, _firstParamTargets$va2;
6183
- return [
6184
- (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
6185
- toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
6186
- toArray(unref(firstParamTargets.value ? args[2] : args[1])),
6187
- toValue(firstParamTargets.value ? args[3] : args[2])
6188
- ];
6189
- }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
6190
- if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
6191
- const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
6192
- const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
6193
- onCleanup(() => {
6194
- cleanups.forEach((fn) => fn());
6195
- });
6196
- }, { flush: "post" });
6197
- }
6198
- /**
6199
- * Mounted state in ref.
6200
- *
6201
- * @see https://vueuse.org/useMounted
6202
- *
6203
- * @__NO_SIDE_EFFECTS__
6204
- */
6205
- function useMounted() {
6206
- const isMounted = shallowRef(false);
6207
- const instance = getCurrentInstance();
6208
- if (instance) onMounted(() => {
6209
- isMounted.value = true;
6210
- }, instance);
6211
- return isMounted;
6212
- }
6213
- /* @__NO_SIDE_EFFECTS__ */
6214
- function useSupported(callback) {
6215
- const isMounted = useMounted();
6216
- return computed(() => {
6217
- isMounted.value;
6218
- return Boolean(callback());
6219
- });
6220
- }
6221
- /**
6222
- * Watch for changes being made to the DOM tree.
6223
- *
6224
- * @see https://vueuse.org/useMutationObserver
6225
- * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN
6226
- * @param target
6227
- * @param callback
6228
- * @param options
6229
- */
6230
- function useMutationObserver(target, callback, options = {}) {
6231
- const { window: window$1 = defaultWindow, ...mutationOptions } = options;
6232
- let observer;
6233
- const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "MutationObserver" in window$1);
6234
- const cleanup = () => {
6235
- if (observer) {
6236
- observer.disconnect();
6237
- observer = void 0;
6238
- }
6239
- };
6240
- const stopWatch = watch(computed(() => {
6241
- const items = toArray(toValue(target)).map(unrefElement).filter(notNullish);
6242
- return new Set(items);
6243
- }), (newTargets) => {
6244
- cleanup();
6245
- if (isSupported$1.value && newTargets.size) {
6246
- observer = new MutationObserver(callback);
6247
- newTargets.forEach((el) => observer.observe(el, mutationOptions));
6248
- }
6249
- }, {
6250
- immediate: true,
6251
- flush: "post"
6252
- });
6253
- const takeRecords = () => {
6254
- return observer === null || observer === void 0 ? void 0 : observer.takeRecords();
6255
- };
6256
- const stop = () => {
6257
- stopWatch();
6258
- cleanup();
6259
- };
6260
- tryOnScopeDispose(stop);
6261
- return {
6262
- isSupported: isSupported$1,
6263
- stop,
6264
- takeRecords
6265
- };
6266
- }
6267
- const ssrWidthSymbol = Symbol("vueuse-ssr-width");
6268
- /* @__NO_SIDE_EFFECTS__ */
6269
- function useSSRWidth() {
6270
- const ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
6271
- return typeof ssrWidth === "number" ? ssrWidth : void 0;
6272
- }
6273
- /**
6274
- * Reactive Media Query.
6275
- *
6276
- * @see https://vueuse.org/useMediaQuery
6277
- * @param query
6278
- * @param options
6279
- */
6280
- function useMediaQuery(query, options = {}) {
6281
- const { window: window$1 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
6282
- const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "matchMedia" in window$1 && typeof window$1.matchMedia === "function");
6283
- const ssrSupport = shallowRef(typeof ssrWidth === "number");
6284
- const mediaQuery = shallowRef();
6285
- const matches = shallowRef(false);
6286
- const handler = (event) => {
6287
- matches.value = event.matches;
6288
- };
6289
- watchEffect(() => {
6290
- if (ssrSupport.value) {
6291
- ssrSupport.value = !isSupported$1.value;
6292
- matches.value = toValue(query).split(",").some((queryString) => {
6293
- const not = queryString.includes("not all");
6294
- const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
6295
- const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
6296
- let res = Boolean(minWidth || maxWidth);
6297
- if (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);
6298
- if (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);
6299
- return not ? !res : res;
6300
- });
6301
- return;
6302
- }
6303
- if (!isSupported$1.value) return;
6304
- mediaQuery.value = window$1.matchMedia(toValue(query));
6305
- matches.value = mediaQuery.value.matches;
6306
- });
6307
- useEventListener(mediaQuery, "change", handler, { passive: true });
6308
- return computed(() => matches.value);
6309
- }
6310
- const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6311
- const globalKey = "__vueuse_ssr_handlers__";
6312
- const handlers = /* @__PURE__ */ getHandlers();
6313
- function getHandlers() {
6314
- if (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {};
6315
- return _global[globalKey];
6316
- }
6317
- function getSSRHandler(key, fallback) {
6318
- return handlers[key] || fallback;
6319
- }
6320
- function guessSerializerType(rawInit) {
6321
- return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
6322
- }
6323
- const StorageSerializers = {
6324
- boolean: {
6325
- read: (v) => v === "true",
6326
- write: (v) => String(v)
6327
- },
6328
- object: {
6329
- read: (v) => JSON.parse(v),
6330
- write: (v) => JSON.stringify(v)
6331
- },
6332
- number: {
6333
- read: (v) => Number.parseFloat(v),
6334
- write: (v) => String(v)
6335
- },
6336
- any: {
6337
- read: (v) => v,
6338
- write: (v) => String(v)
6339
- },
6340
- string: {
6341
- read: (v) => v,
6342
- write: (v) => String(v)
6343
- },
6344
- map: {
6345
- read: (v) => new Map(JSON.parse(v)),
6346
- write: (v) => JSON.stringify(Array.from(v.entries()))
6347
- },
6348
- set: {
6349
- read: (v) => new Set(JSON.parse(v)),
6350
- write: (v) => JSON.stringify(Array.from(v))
6351
- },
6352
- date: {
6353
- read: (v) => new Date(v),
6354
- write: (v) => v.toISOString()
6355
- }
6356
- };
6357
- const customStorageEventName = "vueuse-storage";
6358
- /**
6359
- * Reactive LocalStorage/SessionStorage.
6360
- *
6361
- * @see https://vueuse.org/useStorage
6362
- */
6363
- function useStorage(key, defaults$1, storage, options = {}) {
6364
- var _options$serializer;
6365
- const { flush = "pre", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {
6366
- console.error(e);
6367
- }, initOnMounted } = options;
6368
- const data = (shallow ? shallowRef : ref)(typeof defaults$1 === "function" ? defaults$1() : defaults$1);
6369
- const keyComputed = computed(() => toValue(key));
6370
- if (!storage) try {
6371
- storage = getSSRHandler("getDefaultStorage", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();
6372
- } catch (e) {
6373
- onError(e);
6374
- }
6375
- if (!storage) return data;
6376
- const rawInit = toValue(defaults$1);
6377
- const type = guessSerializerType(rawInit);
6378
- const serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];
6379
- const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, (newValue) => write(newValue), {
6380
- flush,
6381
- deep,
6382
- eventFilter
6383
- });
6384
- watch(keyComputed, () => update(), { flush });
6385
- let firstMounted = false;
6386
- const onStorageEvent = (ev) => {
6387
- if (initOnMounted && !firstMounted) return;
6388
- update(ev);
6389
- };
6390
- const onStorageCustomEvent = (ev) => {
6391
- if (initOnMounted && !firstMounted) return;
6392
- updateFromCustomEvent(ev);
6393
- };
6394
- /**
6395
- * The custom event is needed for same-document syncing when using custom
6396
- * storage backends, but it doesn't work across different documents.
6397
- *
6398
- * TODO: Consider implementing a BroadcastChannel-based solution that fixes this.
6399
- */
6400
- if (window$1 && listenToStorageChanges) if (storage instanceof Storage) useEventListener(window$1, "storage", onStorageEvent, { passive: true });
6401
- else useEventListener(window$1, customStorageEventName, onStorageCustomEvent);
6402
- if (initOnMounted) tryOnMounted(() => {
6403
- firstMounted = true;
6404
- update();
6405
- });
6406
- else update();
6407
- function dispatchWriteEvent(oldValue, newValue) {
6408
- if (window$1) {
6409
- const payload = {
6410
- key: keyComputed.value,
6411
- oldValue,
6412
- newValue,
6413
- storageArea: storage
6414
- };
6415
- window$1.dispatchEvent(storage instanceof Storage ? new StorageEvent("storage", payload) : new CustomEvent(customStorageEventName, { detail: payload }));
6416
- }
6417
- }
6418
- function write(v) {
6419
- try {
6420
- const oldValue = storage.getItem(keyComputed.value);
6421
- if (v == null) {
6422
- dispatchWriteEvent(oldValue, null);
6423
- storage.removeItem(keyComputed.value);
6424
- } else {
6425
- const serialized = serializer.write(v);
6426
- if (oldValue !== serialized) {
6427
- storage.setItem(keyComputed.value, serialized);
6428
- dispatchWriteEvent(oldValue, serialized);
6429
- }
6430
- }
6431
- } catch (e) {
6432
- onError(e);
6433
- }
6434
- }
6435
- function read(event) {
6436
- const rawValue = event ? event.newValue : storage.getItem(keyComputed.value);
6437
- if (rawValue == null) {
6438
- if (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit));
6439
- return rawInit;
6440
- } else if (!event && mergeDefaults) {
6441
- const value = serializer.read(rawValue);
6442
- if (typeof mergeDefaults === "function") return mergeDefaults(value, rawInit);
6443
- else if (type === "object" && !Array.isArray(value)) return {
6444
- ...rawInit,
6445
- ...value
6446
- };
6447
- return value;
6448
- } else if (typeof rawValue !== "string") return rawValue;
6449
- else return serializer.read(rawValue);
6450
- }
6451
- function update(event) {
6452
- if (event && event.storageArea !== storage) return;
6453
- if (event && event.key == null) {
6454
- data.value = rawInit;
6455
- return;
6456
- }
6457
- if (event && event.key !== keyComputed.value) return;
6458
- pauseWatch();
6459
- try {
6460
- const serializedData = serializer.write(data.value);
6461
- if (event === void 0 || (event === null || event === void 0 ? void 0 : event.newValue) !== serializedData) data.value = read(event);
6462
- } catch (e) {
6463
- onError(e);
6464
- } finally {
6465
- if (event) nextTick(resumeWatch);
6466
- else resumeWatch();
6467
- }
6468
- }
6469
- function updateFromCustomEvent(event) {
6470
- update(event.detail);
6471
- }
6472
- return data;
6473
- }
6474
- /**
6475
- * Manipulate CSS variables.
6476
- *
6477
- * @see https://vueuse.org/useCssVar
6478
- * @param prop
6479
- * @param target
6480
- * @param options
6481
- */
6482
- function useCssVar(prop, target, options = {}) {
6483
- const { window: window$1 = defaultWindow, initialValue, observe = false } = options;
6484
- const variable = shallowRef(initialValue);
6485
- const elRef = computed(() => {
6486
- var _window$document;
6487
- return unrefElement(target) || (window$1 === null || window$1 === void 0 || (_window$document = window$1.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);
6488
- });
6489
- function updateCssVar() {
6490
- const key = toValue(prop);
6491
- const el = toValue(elRef);
6492
- if (el && window$1 && key) {
6493
- var _window$getComputedSt;
6494
- variable.value = ((_window$getComputedSt = window$1.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;
6495
- }
6496
- }
6497
- if (observe) useMutationObserver(elRef, updateCssVar, {
6498
- attributeFilter: ["style", "class"],
6499
- window: window$1
6500
- });
6501
- watch([elRef, () => toValue(prop)], (_, old) => {
6502
- if (old[0] && old[1]) old[0].style.removeProperty(old[1]);
6503
- updateCssVar();
6504
- }, { immediate: true });
6505
- watch([variable, elRef], ([val, el]) => {
6506
- const raw_prop = toValue(prop);
6507
- if ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);
6508
- else el.style.setProperty(raw_prop, val);
6509
- }, { immediate: true });
6510
- return variable;
6511
- }
6512
- /**
6513
- * Reports changes to the dimensions of an Element's content or the border-box
6514
- *
6515
- * @see https://vueuse.org/useResizeObserver
6516
- * @param target
6517
- * @param callback
6518
- * @param options
6519
- */
6520
- function useResizeObserver(target, callback, options = {}) {
6521
- const { window: window$1 = defaultWindow, ...observerOptions } = options;
6522
- let observer;
6523
- const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "ResizeObserver" in window$1);
6524
- const cleanup = () => {
6525
- if (observer) {
6526
- observer.disconnect();
6527
- observer = void 0;
6528
- }
6529
- };
6530
- const stopWatch = watch(computed(() => {
6531
- const _targets = toValue(target);
6532
- return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
6533
- }), (els) => {
6534
- cleanup();
6535
- if (isSupported$1.value && window$1) {
6536
- observer = new ResizeObserver(callback);
6537
- for (const _el of els) if (_el) observer.observe(_el, observerOptions);
6538
- }
6539
- }, {
6540
- immediate: true,
6541
- flush: "post"
6542
- });
6543
- const stop = () => {
6544
- cleanup();
6545
- stopWatch();
6546
- };
6547
- tryOnScopeDispose(stop);
6548
- return {
6549
- isSupported: isSupported$1,
6550
- stop
6551
- };
6552
- }
6553
- /**
6554
- * Reactive bounding box of an HTML element.
6555
- *
6556
- * @see https://vueuse.org/useElementBounding
6557
- * @param target
6558
- */
6559
- function useElementBounding(target, options = {}) {
6560
- const { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = "sync" } = options;
6561
- const height = shallowRef(0);
6562
- const bottom = shallowRef(0);
6563
- const left = shallowRef(0);
6564
- const right = shallowRef(0);
6565
- const top = shallowRef(0);
6566
- const width = shallowRef(0);
6567
- const x = shallowRef(0);
6568
- const y = shallowRef(0);
6569
- function recalculate() {
6570
- const el = unrefElement(target);
6571
- if (!el) {
6572
- if (reset) {
6573
- height.value = 0;
6574
- bottom.value = 0;
6575
- left.value = 0;
6576
- right.value = 0;
6577
- top.value = 0;
6578
- width.value = 0;
6579
- x.value = 0;
6580
- y.value = 0;
6581
- }
6582
- return;
6583
- }
6584
- const rect = el.getBoundingClientRect();
6585
- height.value = rect.height;
6586
- bottom.value = rect.bottom;
6587
- left.value = rect.left;
6588
- right.value = rect.right;
6589
- top.value = rect.top;
6590
- width.value = rect.width;
6591
- x.value = rect.x;
6592
- y.value = rect.y;
6593
- }
6594
- function update() {
6595
- if (updateTiming === "sync") recalculate();
6596
- else if (updateTiming === "next-frame") requestAnimationFrame(() => recalculate());
6597
- }
6598
- useResizeObserver(target, update);
6599
- watch(() => unrefElement(target), (ele) => !ele && update());
6600
- useMutationObserver(target, update, { attributeFilter: ["style", "class"] });
6601
- if (windowScroll) useEventListener("scroll", update, {
6602
- capture: true,
6603
- passive: true
6604
- });
6605
- if (windowResize) useEventListener("resize", update, { passive: true });
6606
- tryOnMounted(() => {
6607
- if (immediate) update();
6608
- });
6609
- return {
6610
- height,
6611
- bottom,
6612
- left,
6613
- right,
6614
- top,
6615
- width,
6616
- x,
6617
- y,
6618
- update
6619
- };
6620
- }
6621
- /**
6622
- * Reactive LocalStorage.
6623
- *
6624
- * @see https://vueuse.org/useLocalStorage
6625
- * @param key
6626
- * @param initialValue
6627
- * @param options
6628
- */
6629
- function useLocalStorage(key, initialValue, options = {}) {
6630
- const { window: window$1 = defaultWindow } = options;
6631
- return useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.localStorage, options);
6632
- }
6633
- const topVarName = "--vueuse-safe-area-top";
6634
- const rightVarName = "--vueuse-safe-area-right";
6635
- const bottomVarName = "--vueuse-safe-area-bottom";
6636
- const leftVarName = "--vueuse-safe-area-left";
6637
- /**
6638
- * Reactive `env(safe-area-inset-*)`
6639
- *
6640
- * @see https://vueuse.org/useScreenSafeArea
6641
- */
6642
- function useScreenSafeArea() {
6643
- const top = shallowRef("");
6644
- const right = shallowRef("");
6645
- const bottom = shallowRef("");
6646
- const left = shallowRef("");
6647
- if (isClient) {
6648
- const topCssVar = useCssVar(topVarName);
6649
- const rightCssVar = useCssVar(rightVarName);
6650
- const bottomCssVar = useCssVar(bottomVarName);
6651
- const leftCssVar = useCssVar(leftVarName);
6652
- topCssVar.value = "env(safe-area-inset-top, 0px)";
6653
- rightCssVar.value = "env(safe-area-inset-right, 0px)";
6654
- bottomCssVar.value = "env(safe-area-inset-bottom, 0px)";
6655
- leftCssVar.value = "env(safe-area-inset-left, 0px)";
6656
- tryOnMounted(update);
6657
- useEventListener("resize", useDebounceFn(update), { passive: true });
6658
- }
6659
- function update() {
6660
- top.value = getValue(topVarName);
6661
- right.value = getValue(rightVarName);
6662
- bottom.value = getValue(bottomVarName);
6663
- left.value = getValue(leftVarName);
6664
- }
6665
- return {
6666
- top,
6667
- right,
6668
- bottom,
6669
- left,
6670
- update
6671
- };
6672
- }
6673
- function getValue(position) {
6674
- return getComputedStyle(document.documentElement).getPropertyValue(position);
6675
- }
6676
- const DEFAULT_UNITS = [
6677
- {
6678
- max: 6e4,
6679
- value: 1e3,
6680
- name: "second"
6681
- },
6682
- {
6683
- max: 276e4,
6684
- value: 6e4,
6685
- name: "minute"
6686
- },
6687
- {
6688
- max: 72e6,
6689
- value: 36e5,
6690
- name: "hour"
6691
- },
6692
- {
6693
- max: 5184e5,
6694
- value: 864e5,
6695
- name: "day"
6696
- },
6697
- {
6698
- max: 24192e5,
6699
- value: 6048e5,
6700
- name: "week"
6701
- },
6702
- {
6703
- max: 28512e6,
6704
- value: 2592e6,
6705
- name: "month"
6706
- },
6707
- {
6708
- max: Number.POSITIVE_INFINITY,
6709
- value: 31536e6,
6710
- name: "year"
6711
- }
6712
- ];
6713
- /**
6714
- * Reactive window size.
6715
- *
6716
- * @see https://vueuse.org/useWindowSize
6717
- * @param options
6718
- *
6719
- * @__NO_SIDE_EFFECTS__
6720
- */
6721
- function useWindowSize(options = {}) {
6722
- const { window: window$1 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options;
6723
- const width = shallowRef(initialWidth);
6724
- const height = shallowRef(initialHeight);
6725
- const update = () => {
6726
- if (window$1) if (type === "outer") {
6727
- width.value = window$1.outerWidth;
6728
- height.value = window$1.outerHeight;
6729
- } else if (type === "visual" && window$1.visualViewport) {
6730
- const { width: visualViewportWidth, height: visualViewportHeight, scale } = window$1.visualViewport;
6731
- width.value = Math.round(visualViewportWidth * scale);
6732
- height.value = Math.round(visualViewportHeight * scale);
6733
- } else if (includeScrollbar) {
6734
- width.value = window$1.innerWidth;
6735
- height.value = window$1.innerHeight;
6736
- } else {
6737
- width.value = window$1.document.documentElement.clientWidth;
6738
- height.value = window$1.document.documentElement.clientHeight;
6739
- }
6740
- };
6741
- update();
6742
- tryOnMounted(update);
6743
- const listenerOptions = { passive: true };
6744
- useEventListener("resize", update, listenerOptions);
6745
- if (window$1 && type === "visual" && window$1.visualViewport) useEventListener(window$1.visualViewport, "resize", update, listenerOptions);
6746
- if (listenOrientation) watch(useMediaQuery("(orientation: portrait)"), () => update());
6747
- return {
6748
- width,
6749
- height
6750
- };
6751
- }
6752
-
6753
- //#endregion
6754
- //#region src/client/webcomponents/constants.ts
6755
- const BUILTIN_ENTRY_CLIENT_AUTH_NOTICE = Object.freeze({
6756
- type: "~builtin",
6757
- id: "~client-auth-notice",
6758
- title: "Unauthorized",
6759
- icon: "i-fluent-emoji-flat-warning"
6760
- });
6761
- const BUILTIN_ENTRIES = Object.freeze([BUILTIN_ENTRY_CLIENT_AUTH_NOTICE]);
6762
-
6763
- //#endregion
6764
- //#region src/client/webcomponents/state/docks.ts
6765
- function DEFAULT_DOCK_PANEL_STORE() {
6766
- return {
6767
- width: 80,
6768
- height: 80,
6769
- top: 0,
6770
- left: 10,
6771
- position: "bottom",
6772
- open: false,
6773
- inactiveTimeout: 3e3
6774
- };
6775
- }
6776
- function createDockEntryState(entry, selected) {
6777
- const events = createEventEmitter();
6778
- const state = reactive({
6779
- entryMeta: entry,
6780
- get isActive() {
6781
- return selected.value?.id === entry.id;
6782
- },
6783
- domElements: {},
6784
- events: markRaw(events)
6785
- });
6786
- watch(() => selected.value?.id, (newSelectedId) => {
6787
- if (newSelectedId === entry.id) events.emit("entry:activated");
6788
- else events.emit("entry:deactivated");
6789
- }, { immediate: true });
6790
- watch(() => state.domElements.iframe, (newIframe) => {
6791
- if (newIframe) events.emit("dom:iframe:mounted", newIframe);
6792
- }, { immediate: true });
6793
- watch(() => state.domElements.panel, (newPanel) => {
6794
- if (newPanel) events.emit("dom:panel:mounted", newPanel);
6795
- }, { immediate: true });
6796
- return state;
6797
- }
6798
- let _docksEntriesRef;
6799
- async function useDocksEntries(rpc) {
6800
- if (_docksEntriesRef) return _docksEntriesRef;
6801
- const dockEntries = _docksEntriesRef = shallowRef([]);
6802
- async function updateDocksEntries() {
6803
- if (!rpc.isTrusted) {
6804
- console.warn("[VITE DEVTOOLS] Untrusted client, skipping docks entries update");
6805
- return;
6806
- }
6807
- dockEntries.value = (await rpc.call("vite:internal:docks:list")).map((entry) => Object.freeze(entry));
6808
- console.log("[VITE DEVTOOLS] Docks Entries Updated", [...dockEntries.value]);
6809
- }
6810
- rpc.events.on("rpc:is-trusted:updated", (isTrusted) => {
6811
- if (isTrusted) updateDocksEntries();
6812
- });
6813
- rpc.client.register({
6814
- name: "vite:internal:docks:updated",
6815
- type: "action",
6816
- handler: () => updateDocksEntries()
6817
- });
6818
- await updateDocksEntries();
6819
- return dockEntries;
6820
- }
6821
-
6822
- //#endregion
6823
- export { useTemplateRef as A, unref as B, defineComponent as C, openBlock as D, onUnmounted as E, markRaw as F, normalizeStyle as H, reactive as I, ref as L, watchEffect as M, withCtx as N, renderList as O, withDirectives as P, shallowRef as R, createVNode as S, onMounted as T, toDisplayString as U, normalizeClass as V, createBaseVNode as _, BUILTIN_ENTRY_CLIENT_AUTH_NOTICE as a, createElementBlock as b, useLocalStorage as c, watchImmediate as d, defineCustomElement as f, computed as g, Fragment as h, BUILTIN_ENTRIES as i, watch as j, renderSlot as k, useScreenSafeArea as l, withModifiers as m, createDockEntryState as n, useElementBounding as o, vShow as p, useDocksEntries as r, useEventListener as s, DEFAULT_DOCK_PANEL_STORE as t, useWindowSize as u, createBlock as v, nextTick as w, createStaticVNode as x, createCommentVNode as y, toRefs as z };
6353
+ export { getCurrentScope as A, unref as B, renderSlot as C, withCtx as D, watchEffect as E, ref as F, normalizeStyle as H, shallowRef as I, toRef as L, onScopeDispose as M, reactive as N, withDirectives as O, readonly as P, toRefs as R, renderList as S, watch as T, toDisplayString as U, normalizeClass as V, inject as _, Suspense as a, onUnmounted as b, createBlock as c, createStaticVNode as d, createVNode as f, hasInjectionContext as g, getCurrentInstance as h, Fragment as i, markRaw as j, customRef as k, createCommentVNode as l, defineComponent as m, vShow as n, computed as o, defineAsyncComponent as p, withModifiers as r, createBaseVNode as s, defineCustomElement as t, createElementBlock as u, nextTick as v, useTemplateRef as w, openBlock as x, onMounted as y, toValue as z };