vite-plugin-vue-devtools 0.4.7 → 0.4.10

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.
Files changed (36) hide show
  1. package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-4c77817b.js → IframeView.vue_vue_type_script_setup_true_lang-e86027e5.js} +1 -1
  2. package/dist/client/assets/{StateFields.vue_vue_type_script_setup_true_lang-6969f024.js → StateFields.vue_vue_type_script_setup_true_lang-a78e5cb0.js} +4 -4
  3. package/dist/client/assets/{VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js → VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js} +1 -1
  4. package/dist/client/assets/{VIconButton.vue_vue_type_script_setup_true_lang-a89f6c88.js → VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js} +2 -2
  5. package/dist/client/assets/{VIconTitle.vue_vue_type_script_setup_true_lang-d3431291.js → VIconTitle.vue_vue_type_script_setup_true_lang-53c720d3.js} +1 -1
  6. package/dist/client/assets/{VPanelGrids-24560813.js → VPanelGrids-dc69b639.js} +1 -1
  7. package/dist/client/assets/{VSectionBlock-ba31730a.js → VSectionBlock-57ec7b68.js} +3 -3
  8. package/dist/client/assets/{VTextInput.vue_vue_type_script_setup_true_lang-5373326c.js → VTextInput.vue_vue_type_script_setup_true_lang-c7c2878d.js} +2 -2
  9. package/dist/client/assets/{__eyedropper-8e124d1e.js → __eyedropper-c3a23916.js} +2 -2
  10. package/dist/client/assets/_commonjsHelpers-65004790.js +37 -0
  11. package/dist/client/assets/{assets-136b5c5e.js → assets-2b8518ac.js} +8 -8
  12. package/dist/client/assets/{component-docs-49ee42b3.js → component-docs-e06030af.js} +5 -5
  13. package/dist/client/assets/{components-f31cfed4.js → components-433e30b5.js} +11 -8
  14. package/dist/client/assets/{documentations-99f74693.js → documentations-a41234ba.js} +3 -3
  15. package/dist/client/assets/{graph-65afb14a.js → graph-d61217d6.js} +2 -2
  16. package/dist/client/assets/{index-8d0405da.js → index-07396aec.js} +1 -1
  17. package/dist/client/assets/{index-7c5b746a.css → index-5221558c.css} +1 -1
  18. package/dist/client/assets/{index-233a79fb.js → index-b8a9099c.js} +2383 -241
  19. package/dist/client/assets/{inspect-4188d5cc.js → inspect-2b7bf157.js} +3 -3
  20. package/dist/client/assets/{npm-6d9ce0f4.js → npm-62fb6b03.js} +7 -7
  21. package/dist/client/assets/{overview-aef80b27.js → overview-95247458.js} +5 -5
  22. package/dist/client/assets/{pages-f80c7a3e.js → pages-72e88bdb.js} +5 -5
  23. package/dist/client/assets/{pinia-8c6ed567.js → pinia-55c3fcd8.js} +6 -6
  24. package/dist/client/assets/{routes-64dbd0f9.js → routes-ab38a14f.js} +7 -7
  25. package/dist/client/assets/{rpc-358fc96c.js → rpc-cf3bd0fc.js} +1 -1
  26. package/dist/client/assets/settings-3815e37a.css +11 -0
  27. package/dist/client/assets/settings-c390240d.js +9699 -0
  28. package/dist/client/assets/{splitpanes.es-2be998f1.js → splitpanes.es-dd27b7fe.js} +1 -1
  29. package/dist/client/assets/{timeline-0c017176.js → timeline-5fa02442.js} +8 -8
  30. package/dist/client/index.html +2 -2
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.mjs +1 -1
  33. package/package.json +2 -1
  34. package/src/node/views/Main.vue +5 -5
  35. package/dist/client/assets/_commonjsHelpers-c0d8ada0.js +0 -9
  36. package/dist/client/assets/settings-5fd1add1.js +0 -337
@@ -73,6 +73,7 @@ const isArray$1 = Array.isArray;
73
73
  const isMap = (val) => toTypeString(val) === "[object Map]";
74
74
  const isSet = (val) => toTypeString(val) === "[object Set]";
75
75
  const isDate = (val) => toTypeString(val) === "[object Date]";
76
+ const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
76
77
  const isFunction = (val) => typeof val === "function";
77
78
  const isString = (val) => typeof val === "string";
78
79
  const isSymbol = (val) => typeof val === "symbol";
@@ -138,6 +139,9 @@ const getGlobalThis = () => {
138
139
  return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
139
140
  };
140
141
 
142
+ const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
143
+ const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
144
+
141
145
  function normalizeStyle(value) {
142
146
  if (isArray$1(value)) {
143
147
  const res = {};
@@ -363,6 +367,9 @@ class EffectScope {
363
367
  }
364
368
  }
365
369
  }
370
+ function effectScope(detached) {
371
+ return new EffectScope(detached);
372
+ }
366
373
  function recordEffectScope(effect, scope = activeEffectScope) {
367
374
  if (scope && scope.active) {
368
375
  scope.effects.push(effect);
@@ -483,6 +490,26 @@ function cleanupEffect(effect2) {
483
490
  deps.length = 0;
484
491
  }
485
492
  }
493
+ function effect(fn, options) {
494
+ if (fn.effect) {
495
+ fn = fn.effect.fn;
496
+ }
497
+ const _effect = new ReactiveEffect(fn);
498
+ if (options) {
499
+ extend(_effect, options);
500
+ if (options.scope)
501
+ recordEffectScope(_effect, options.scope);
502
+ }
503
+ if (!options || !options.lazy) {
504
+ _effect.run();
505
+ }
506
+ const runner = _effect.run.bind(_effect);
507
+ runner.effect = _effect;
508
+ return runner;
509
+ }
510
+ function stop(runner) {
511
+ runner.effect.stop();
512
+ }
486
513
  let shouldTrack = true;
487
514
  const trackStack = [];
488
515
  function pauseTracking() {
@@ -618,6 +645,7 @@ const builtInSymbols = new Set(
618
645
  const get$1 = /* @__PURE__ */ createGetter();
619
646
  const shallowGet = /* @__PURE__ */ createGetter(false, true);
620
647
  const readonlyGet = /* @__PURE__ */ createGetter(true);
648
+ const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
621
649
  const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
622
650
  function createArrayInstrumentations() {
623
651
  const instrumentations = {};
@@ -763,6 +791,13 @@ const shallowReactiveHandlers = /* @__PURE__ */ extend(
763
791
  set: shallowSet
764
792
  }
765
793
  );
794
+ const shallowReadonlyHandlers = /* @__PURE__ */ extend(
795
+ {},
796
+ readonlyHandlers,
797
+ {
798
+ get: shallowReadonlyGet
799
+ }
800
+ );
766
801
 
767
802
  const toShallow = (value) => value;
768
803
  const getProto = (v) => Reflect.getPrototypeOf(v);
@@ -1026,6 +1061,9 @@ const shallowCollectionHandlers = {
1026
1061
  const readonlyCollectionHandlers = {
1027
1062
  get: /* @__PURE__ */ createInstrumentationGetter(true, false)
1028
1063
  };
1064
+ const shallowReadonlyCollectionHandlers = {
1065
+ get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1066
+ };
1029
1067
 
1030
1068
  const reactiveMap = /* @__PURE__ */ new WeakMap();
1031
1069
  const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
@@ -1078,6 +1116,15 @@ function readonly(target) {
1078
1116
  readonlyMap
1079
1117
  );
1080
1118
  }
1119
+ function shallowReadonly(target) {
1120
+ return createReactiveObject(
1121
+ target,
1122
+ true,
1123
+ shallowReadonlyHandlers,
1124
+ shallowReadonlyCollectionHandlers,
1125
+ shallowReadonlyMap
1126
+ );
1127
+ }
1081
1128
  function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
1082
1129
  if (!isObject(target)) {
1083
1130
  return target;
@@ -1186,6 +1233,9 @@ function triggerRef(ref2) {
1186
1233
  function unref(ref2) {
1187
1234
  return isRef(ref2) ? ref2.value : ref2;
1188
1235
  }
1236
+ function toValue$2(source) {
1237
+ return isFunction(source) ? source() : unref(source);
1238
+ }
1189
1239
  const shallowUnwrapHandlers = {
1190
1240
  get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
1191
1241
  set: (target, key, value, receiver) => {
@@ -1327,6 +1377,9 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1327
1377
  function warn(msg, ...args) {
1328
1378
  return;
1329
1379
  }
1380
+ function assertNumber(val, type) {
1381
+ return;
1382
+ }
1330
1383
  function callWithErrorHandling(fn, instance, type, args) {
1331
1384
  let res;
1332
1385
  try {
@@ -1512,6 +1565,38 @@ function flushJobs(seen) {
1512
1565
  }
1513
1566
  }
1514
1567
 
1568
+ let devtools;
1569
+ let buffer = [];
1570
+ function setDevtoolsHook(hook, target) {
1571
+ var _a, _b;
1572
+ devtools = hook;
1573
+ if (devtools) {
1574
+ devtools.enabled = true;
1575
+ buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
1576
+ buffer = [];
1577
+ } else if (
1578
+ // handle late devtools injection - only do this if we are in an actual
1579
+ // browser environment to avoid the timer handle stalling test runner exit
1580
+ // (#4815)
1581
+ typeof window !== "undefined" && // some envs mock window but not fully
1582
+ window.HTMLElement && // also exclude jsdom
1583
+ !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
1584
+ ) {
1585
+ const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
1586
+ replay.push((newHook) => {
1587
+ setDevtoolsHook(newHook, target);
1588
+ });
1589
+ setTimeout(() => {
1590
+ if (!devtools) {
1591
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
1592
+ buffer = [];
1593
+ }
1594
+ }, 3e3);
1595
+ } else {
1596
+ buffer = [];
1597
+ }
1598
+ }
1599
+
1515
1600
  function emit(instance, event, ...rawArgs) {
1516
1601
  if (instance.isUnmounted)
1517
1602
  return;
@@ -1746,6 +1831,24 @@ function renderComponentRoot(instance) {
1746
1831
  setCurrentRenderingInstance(prev);
1747
1832
  return result;
1748
1833
  }
1834
+ function filterSingleRoot(children) {
1835
+ let singleRoot;
1836
+ for (let i = 0; i < children.length; i++) {
1837
+ const child = children[i];
1838
+ if (isVNode(child)) {
1839
+ if (child.type !== Comment || child.children === "v-if") {
1840
+ if (singleRoot) {
1841
+ return;
1842
+ } else {
1843
+ singleRoot = child;
1844
+ }
1845
+ }
1846
+ } else {
1847
+ return;
1848
+ }
1849
+ }
1850
+ return singleRoot;
1851
+ }
1749
1852
  const getFunctionalFallthrough = (attrs) => {
1750
1853
  let res;
1751
1854
  for (const key in attrs) {
@@ -1829,6 +1932,517 @@ function updateHOCHostEl({ vnode, parent }, el) {
1829
1932
  }
1830
1933
 
1831
1934
  const isSuspense = (type) => type.__isSuspense;
1935
+ const SuspenseImpl = {
1936
+ name: "Suspense",
1937
+ // In order to make Suspense tree-shakable, we need to avoid importing it
1938
+ // directly in the renderer. The renderer checks for the __isSuspense flag
1939
+ // on a vnode's type and calls the `process` method, passing in renderer
1940
+ // internals.
1941
+ __isSuspense: true,
1942
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
1943
+ if (n1 == null) {
1944
+ mountSuspense(
1945
+ n2,
1946
+ container,
1947
+ anchor,
1948
+ parentComponent,
1949
+ parentSuspense,
1950
+ isSVG,
1951
+ slotScopeIds,
1952
+ optimized,
1953
+ rendererInternals
1954
+ );
1955
+ } else {
1956
+ patchSuspense(
1957
+ n1,
1958
+ n2,
1959
+ container,
1960
+ anchor,
1961
+ parentComponent,
1962
+ isSVG,
1963
+ slotScopeIds,
1964
+ optimized,
1965
+ rendererInternals
1966
+ );
1967
+ }
1968
+ },
1969
+ hydrate: hydrateSuspense,
1970
+ create: createSuspenseBoundary,
1971
+ normalize: normalizeSuspenseChildren
1972
+ };
1973
+ const Suspense = SuspenseImpl ;
1974
+ function triggerEvent(vnode, name) {
1975
+ const eventListener = vnode.props && vnode.props[name];
1976
+ if (isFunction(eventListener)) {
1977
+ eventListener();
1978
+ }
1979
+ }
1980
+ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
1981
+ const {
1982
+ p: patch,
1983
+ o: { createElement }
1984
+ } = rendererInternals;
1985
+ const hiddenContainer = createElement("div");
1986
+ const suspense = vnode.suspense = createSuspenseBoundary(
1987
+ vnode,
1988
+ parentSuspense,
1989
+ parentComponent,
1990
+ container,
1991
+ hiddenContainer,
1992
+ anchor,
1993
+ isSVG,
1994
+ slotScopeIds,
1995
+ optimized,
1996
+ rendererInternals
1997
+ );
1998
+ patch(
1999
+ null,
2000
+ suspense.pendingBranch = vnode.ssContent,
2001
+ hiddenContainer,
2002
+ null,
2003
+ parentComponent,
2004
+ suspense,
2005
+ isSVG,
2006
+ slotScopeIds
2007
+ );
2008
+ if (suspense.deps > 0) {
2009
+ triggerEvent(vnode, "onPending");
2010
+ triggerEvent(vnode, "onFallback");
2011
+ patch(
2012
+ null,
2013
+ vnode.ssFallback,
2014
+ container,
2015
+ anchor,
2016
+ parentComponent,
2017
+ null,
2018
+ // fallback tree will not have suspense context
2019
+ isSVG,
2020
+ slotScopeIds
2021
+ );
2022
+ setActiveBranch(suspense, vnode.ssFallback);
2023
+ } else {
2024
+ suspense.resolve(false, true);
2025
+ }
2026
+ }
2027
+ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
2028
+ const suspense = n2.suspense = n1.suspense;
2029
+ suspense.vnode = n2;
2030
+ n2.el = n1.el;
2031
+ const newBranch = n2.ssContent;
2032
+ const newFallback = n2.ssFallback;
2033
+ const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
2034
+ if (pendingBranch) {
2035
+ suspense.pendingBranch = newBranch;
2036
+ if (isSameVNodeType(newBranch, pendingBranch)) {
2037
+ patch(
2038
+ pendingBranch,
2039
+ newBranch,
2040
+ suspense.hiddenContainer,
2041
+ null,
2042
+ parentComponent,
2043
+ suspense,
2044
+ isSVG,
2045
+ slotScopeIds,
2046
+ optimized
2047
+ );
2048
+ if (suspense.deps <= 0) {
2049
+ suspense.resolve();
2050
+ } else if (isInFallback) {
2051
+ patch(
2052
+ activeBranch,
2053
+ newFallback,
2054
+ container,
2055
+ anchor,
2056
+ parentComponent,
2057
+ null,
2058
+ // fallback tree will not have suspense context
2059
+ isSVG,
2060
+ slotScopeIds,
2061
+ optimized
2062
+ );
2063
+ setActiveBranch(suspense, newFallback);
2064
+ }
2065
+ } else {
2066
+ suspense.pendingId++;
2067
+ if (isHydrating) {
2068
+ suspense.isHydrating = false;
2069
+ suspense.activeBranch = pendingBranch;
2070
+ } else {
2071
+ unmount(pendingBranch, parentComponent, suspense);
2072
+ }
2073
+ suspense.deps = 0;
2074
+ suspense.effects.length = 0;
2075
+ suspense.hiddenContainer = createElement("div");
2076
+ if (isInFallback) {
2077
+ patch(
2078
+ null,
2079
+ newBranch,
2080
+ suspense.hiddenContainer,
2081
+ null,
2082
+ parentComponent,
2083
+ suspense,
2084
+ isSVG,
2085
+ slotScopeIds,
2086
+ optimized
2087
+ );
2088
+ if (suspense.deps <= 0) {
2089
+ suspense.resolve();
2090
+ } else {
2091
+ patch(
2092
+ activeBranch,
2093
+ newFallback,
2094
+ container,
2095
+ anchor,
2096
+ parentComponent,
2097
+ null,
2098
+ // fallback tree will not have suspense context
2099
+ isSVG,
2100
+ slotScopeIds,
2101
+ optimized
2102
+ );
2103
+ setActiveBranch(suspense, newFallback);
2104
+ }
2105
+ } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
2106
+ patch(
2107
+ activeBranch,
2108
+ newBranch,
2109
+ container,
2110
+ anchor,
2111
+ parentComponent,
2112
+ suspense,
2113
+ isSVG,
2114
+ slotScopeIds,
2115
+ optimized
2116
+ );
2117
+ suspense.resolve(true);
2118
+ } else {
2119
+ patch(
2120
+ null,
2121
+ newBranch,
2122
+ suspense.hiddenContainer,
2123
+ null,
2124
+ parentComponent,
2125
+ suspense,
2126
+ isSVG,
2127
+ slotScopeIds,
2128
+ optimized
2129
+ );
2130
+ if (suspense.deps <= 0) {
2131
+ suspense.resolve();
2132
+ }
2133
+ }
2134
+ }
2135
+ } else {
2136
+ if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
2137
+ patch(
2138
+ activeBranch,
2139
+ newBranch,
2140
+ container,
2141
+ anchor,
2142
+ parentComponent,
2143
+ suspense,
2144
+ isSVG,
2145
+ slotScopeIds,
2146
+ optimized
2147
+ );
2148
+ setActiveBranch(suspense, newBranch);
2149
+ } else {
2150
+ triggerEvent(n2, "onPending");
2151
+ suspense.pendingBranch = newBranch;
2152
+ suspense.pendingId++;
2153
+ patch(
2154
+ null,
2155
+ newBranch,
2156
+ suspense.hiddenContainer,
2157
+ null,
2158
+ parentComponent,
2159
+ suspense,
2160
+ isSVG,
2161
+ slotScopeIds,
2162
+ optimized
2163
+ );
2164
+ if (suspense.deps <= 0) {
2165
+ suspense.resolve();
2166
+ } else {
2167
+ const { timeout, pendingId } = suspense;
2168
+ if (timeout > 0) {
2169
+ setTimeout(() => {
2170
+ if (suspense.pendingId === pendingId) {
2171
+ suspense.fallback(newFallback);
2172
+ }
2173
+ }, timeout);
2174
+ } else if (timeout === 0) {
2175
+ suspense.fallback(newFallback);
2176
+ }
2177
+ }
2178
+ }
2179
+ }
2180
+ }
2181
+ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
2182
+ const {
2183
+ p: patch,
2184
+ m: move,
2185
+ um: unmount,
2186
+ n: next,
2187
+ o: { parentNode, remove }
2188
+ } = rendererInternals;
2189
+ let parentSuspenseId;
2190
+ const isSuspensible = isVNodeSuspensible(vnode);
2191
+ if (isSuspensible) {
2192
+ if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
2193
+ parentSuspenseId = parentSuspense.pendingId;
2194
+ parentSuspense.deps++;
2195
+ }
2196
+ }
2197
+ const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
2198
+ const suspense = {
2199
+ vnode,
2200
+ parent: parentSuspense,
2201
+ parentComponent,
2202
+ isSVG,
2203
+ container,
2204
+ hiddenContainer,
2205
+ anchor,
2206
+ deps: 0,
2207
+ pendingId: 0,
2208
+ timeout: typeof timeout === "number" ? timeout : -1,
2209
+ activeBranch: null,
2210
+ pendingBranch: null,
2211
+ isInFallback: true,
2212
+ isHydrating,
2213
+ isUnmounted: false,
2214
+ effects: [],
2215
+ resolve(resume = false, sync = false) {
2216
+ const {
2217
+ vnode: vnode2,
2218
+ activeBranch,
2219
+ pendingBranch,
2220
+ pendingId,
2221
+ effects,
2222
+ parentComponent: parentComponent2,
2223
+ container: container2
2224
+ } = suspense;
2225
+ if (suspense.isHydrating) {
2226
+ suspense.isHydrating = false;
2227
+ } else if (!resume) {
2228
+ const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
2229
+ if (delayEnter) {
2230
+ activeBranch.transition.afterLeave = () => {
2231
+ if (pendingId === suspense.pendingId) {
2232
+ move(pendingBranch, container2, anchor2, 0);
2233
+ }
2234
+ };
2235
+ }
2236
+ let { anchor: anchor2 } = suspense;
2237
+ if (activeBranch) {
2238
+ anchor2 = next(activeBranch);
2239
+ unmount(activeBranch, parentComponent2, suspense, true);
2240
+ }
2241
+ if (!delayEnter) {
2242
+ move(pendingBranch, container2, anchor2, 0);
2243
+ }
2244
+ }
2245
+ setActiveBranch(suspense, pendingBranch);
2246
+ suspense.pendingBranch = null;
2247
+ suspense.isInFallback = false;
2248
+ let parent = suspense.parent;
2249
+ let hasUnresolvedAncestor = false;
2250
+ while (parent) {
2251
+ if (parent.pendingBranch) {
2252
+ parent.effects.push(...effects);
2253
+ hasUnresolvedAncestor = true;
2254
+ break;
2255
+ }
2256
+ parent = parent.parent;
2257
+ }
2258
+ if (!hasUnresolvedAncestor) {
2259
+ queuePostFlushCb(effects);
2260
+ }
2261
+ suspense.effects = [];
2262
+ if (isSuspensible) {
2263
+ if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
2264
+ parentSuspense.deps--;
2265
+ if (parentSuspense.deps === 0 && !sync) {
2266
+ parentSuspense.resolve();
2267
+ }
2268
+ }
2269
+ }
2270
+ triggerEvent(vnode2, "onResolve");
2271
+ },
2272
+ fallback(fallbackVNode) {
2273
+ if (!suspense.pendingBranch) {
2274
+ return;
2275
+ }
2276
+ const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
2277
+ triggerEvent(vnode2, "onFallback");
2278
+ const anchor2 = next(activeBranch);
2279
+ const mountFallback = () => {
2280
+ if (!suspense.isInFallback) {
2281
+ return;
2282
+ }
2283
+ patch(
2284
+ null,
2285
+ fallbackVNode,
2286
+ container2,
2287
+ anchor2,
2288
+ parentComponent2,
2289
+ null,
2290
+ // fallback tree will not have suspense context
2291
+ isSVG2,
2292
+ slotScopeIds,
2293
+ optimized
2294
+ );
2295
+ setActiveBranch(suspense, fallbackVNode);
2296
+ };
2297
+ const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
2298
+ if (delayEnter) {
2299
+ activeBranch.transition.afterLeave = mountFallback;
2300
+ }
2301
+ suspense.isInFallback = true;
2302
+ unmount(
2303
+ activeBranch,
2304
+ parentComponent2,
2305
+ null,
2306
+ // no suspense so unmount hooks fire now
2307
+ true
2308
+ // shouldRemove
2309
+ );
2310
+ if (!delayEnter) {
2311
+ mountFallback();
2312
+ }
2313
+ },
2314
+ move(container2, anchor2, type) {
2315
+ suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
2316
+ suspense.container = container2;
2317
+ },
2318
+ next() {
2319
+ return suspense.activeBranch && next(suspense.activeBranch);
2320
+ },
2321
+ registerDep(instance, setupRenderEffect) {
2322
+ const isInPendingSuspense = !!suspense.pendingBranch;
2323
+ if (isInPendingSuspense) {
2324
+ suspense.deps++;
2325
+ }
2326
+ const hydratedEl = instance.vnode.el;
2327
+ instance.asyncDep.catch((err) => {
2328
+ handleError(err, instance, 0);
2329
+ }).then((asyncSetupResult) => {
2330
+ if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
2331
+ return;
2332
+ }
2333
+ instance.asyncResolved = true;
2334
+ const { vnode: vnode2 } = instance;
2335
+ handleSetupResult(instance, asyncSetupResult, false);
2336
+ if (hydratedEl) {
2337
+ vnode2.el = hydratedEl;
2338
+ }
2339
+ const placeholder = !hydratedEl && instance.subTree.el;
2340
+ setupRenderEffect(
2341
+ instance,
2342
+ vnode2,
2343
+ // component may have been moved before resolve.
2344
+ // if this is not a hydration, instance.subTree will be the comment
2345
+ // placeholder.
2346
+ parentNode(hydratedEl || instance.subTree.el),
2347
+ // anchor will not be used if this is hydration, so only need to
2348
+ // consider the comment placeholder case.
2349
+ hydratedEl ? null : next(instance.subTree),
2350
+ suspense,
2351
+ isSVG,
2352
+ optimized
2353
+ );
2354
+ if (placeholder) {
2355
+ remove(placeholder);
2356
+ }
2357
+ updateHOCHostEl(instance, vnode2.el);
2358
+ if (isInPendingSuspense && --suspense.deps === 0) {
2359
+ suspense.resolve();
2360
+ }
2361
+ });
2362
+ },
2363
+ unmount(parentSuspense2, doRemove) {
2364
+ suspense.isUnmounted = true;
2365
+ if (suspense.activeBranch) {
2366
+ unmount(
2367
+ suspense.activeBranch,
2368
+ parentComponent,
2369
+ parentSuspense2,
2370
+ doRemove
2371
+ );
2372
+ }
2373
+ if (suspense.pendingBranch) {
2374
+ unmount(
2375
+ suspense.pendingBranch,
2376
+ parentComponent,
2377
+ parentSuspense2,
2378
+ doRemove
2379
+ );
2380
+ }
2381
+ }
2382
+ };
2383
+ return suspense;
2384
+ }
2385
+ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
2386
+ const suspense = vnode.suspense = createSuspenseBoundary(
2387
+ vnode,
2388
+ parentSuspense,
2389
+ parentComponent,
2390
+ node.parentNode,
2391
+ document.createElement("div"),
2392
+ null,
2393
+ isSVG,
2394
+ slotScopeIds,
2395
+ optimized,
2396
+ rendererInternals,
2397
+ true
2398
+ /* hydrating */
2399
+ );
2400
+ const result = hydrateNode(
2401
+ node,
2402
+ suspense.pendingBranch = vnode.ssContent,
2403
+ parentComponent,
2404
+ suspense,
2405
+ slotScopeIds,
2406
+ optimized
2407
+ );
2408
+ if (suspense.deps === 0) {
2409
+ suspense.resolve(false, true);
2410
+ }
2411
+ return result;
2412
+ }
2413
+ function normalizeSuspenseChildren(vnode) {
2414
+ const { shapeFlag, children } = vnode;
2415
+ const isSlotChildren = shapeFlag & 32;
2416
+ vnode.ssContent = normalizeSuspenseSlot(
2417
+ isSlotChildren ? children.default : children
2418
+ );
2419
+ vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
2420
+ }
2421
+ function normalizeSuspenseSlot(s) {
2422
+ let block;
2423
+ if (isFunction(s)) {
2424
+ const trackBlock = isBlockTreeEnabled && s._c;
2425
+ if (trackBlock) {
2426
+ s._d = false;
2427
+ openBlock();
2428
+ }
2429
+ s = s();
2430
+ if (trackBlock) {
2431
+ s._d = true;
2432
+ block = currentBlock;
2433
+ closeBlock();
2434
+ }
2435
+ }
2436
+ if (isArray$1(s)) {
2437
+ const singleChild = filterSingleRoot(s);
2438
+ s = singleChild;
2439
+ }
2440
+ s = normalizeVNode(s);
2441
+ if (block && !s.dynamicChildren) {
2442
+ s.dynamicChildren = block.filter((c) => c !== s);
2443
+ }
2444
+ return s;
2445
+ }
1832
2446
  function queueEffectWithSuspense(fn, suspense) {
1833
2447
  if (suspense && suspense.pendingBranch) {
1834
2448
  if (isArray$1(fn)) {
@@ -1840,10 +2454,37 @@ function queueEffectWithSuspense(fn, suspense) {
1840
2454
  queuePostFlushCb(fn);
1841
2455
  }
1842
2456
  }
2457
+ function setActiveBranch(suspense, branch) {
2458
+ suspense.activeBranch = branch;
2459
+ const { vnode, parentComponent } = suspense;
2460
+ const el = vnode.el = branch.el;
2461
+ if (parentComponent && parentComponent.subTree === vnode) {
2462
+ parentComponent.vnode.el = el;
2463
+ updateHOCHostEl(parentComponent, el);
2464
+ }
2465
+ }
2466
+ function isVNodeSuspensible(vnode) {
2467
+ var _a;
2468
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
2469
+ }
1843
2470
 
1844
2471
  function watchEffect(effect, options) {
1845
2472
  return doWatch(effect, null, options);
1846
2473
  }
2474
+ function watchPostEffect(effect, options) {
2475
+ return doWatch(
2476
+ effect,
2477
+ null,
2478
+ { flush: "post" }
2479
+ );
2480
+ }
2481
+ function watchSyncEffect(effect, options) {
2482
+ return doWatch(
2483
+ effect,
2484
+ null,
2485
+ { flush: "sync" }
2486
+ );
2487
+ }
1847
2488
  const INITIAL_WATCHER_VALUE = {};
1848
2489
  function watch(source, cb, options) {
1849
2490
  return doWatch(source, cb, options);
@@ -2417,15 +3058,331 @@ function defineComponent(options, extraOptions) {
2417
3058
  }
2418
3059
 
2419
3060
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2420
-
2421
- const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
2422
- function onActivated(hook, target) {
2423
- registerKeepAliveHook(hook, "a", target);
2424
- }
2425
- function onDeactivated(hook, target) {
2426
- registerKeepAliveHook(hook, "da", target);
2427
- }
2428
- function registerKeepAliveHook(hook, type, target = currentInstance) {
3061
+ function defineAsyncComponent(source) {
3062
+ if (isFunction(source)) {
3063
+ source = { loader: source };
3064
+ }
3065
+ const {
3066
+ loader,
3067
+ loadingComponent,
3068
+ errorComponent,
3069
+ delay = 200,
3070
+ timeout,
3071
+ // undefined = never times out
3072
+ suspensible = true,
3073
+ onError: userOnError
3074
+ } = source;
3075
+ let pendingRequest = null;
3076
+ let resolvedComp;
3077
+ let retries = 0;
3078
+ const retry = () => {
3079
+ retries++;
3080
+ pendingRequest = null;
3081
+ return load();
3082
+ };
3083
+ const load = () => {
3084
+ let thisRequest;
3085
+ return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
3086
+ err = err instanceof Error ? err : new Error(String(err));
3087
+ if (userOnError) {
3088
+ return new Promise((resolve, reject) => {
3089
+ const userRetry = () => resolve(retry());
3090
+ const userFail = () => reject(err);
3091
+ userOnError(err, userRetry, userFail, retries + 1);
3092
+ });
3093
+ } else {
3094
+ throw err;
3095
+ }
3096
+ }).then((comp) => {
3097
+ if (thisRequest !== pendingRequest && pendingRequest) {
3098
+ return pendingRequest;
3099
+ }
3100
+ if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
3101
+ comp = comp.default;
3102
+ }
3103
+ resolvedComp = comp;
3104
+ return comp;
3105
+ }));
3106
+ };
3107
+ return defineComponent({
3108
+ name: "AsyncComponentWrapper",
3109
+ __asyncLoader: load,
3110
+ get __asyncResolved() {
3111
+ return resolvedComp;
3112
+ },
3113
+ setup() {
3114
+ const instance = currentInstance;
3115
+ if (resolvedComp) {
3116
+ return () => createInnerComp(resolvedComp, instance);
3117
+ }
3118
+ const onError = (err) => {
3119
+ pendingRequest = null;
3120
+ handleError(
3121
+ err,
3122
+ instance,
3123
+ 13,
3124
+ !errorComponent
3125
+ /* do not throw in dev if user provided error component */
3126
+ );
3127
+ };
3128
+ if (suspensible && instance.suspense || isInSSRComponentSetup) {
3129
+ return load().then((comp) => {
3130
+ return () => createInnerComp(comp, instance);
3131
+ }).catch((err) => {
3132
+ onError(err);
3133
+ return () => errorComponent ? createVNode(errorComponent, {
3134
+ error: err
3135
+ }) : null;
3136
+ });
3137
+ }
3138
+ const loaded = ref(false);
3139
+ const error = ref();
3140
+ const delayed = ref(!!delay);
3141
+ if (delay) {
3142
+ setTimeout(() => {
3143
+ delayed.value = false;
3144
+ }, delay);
3145
+ }
3146
+ if (timeout != null) {
3147
+ setTimeout(() => {
3148
+ if (!loaded.value && !error.value) {
3149
+ const err = new Error(
3150
+ `Async component timed out after ${timeout}ms.`
3151
+ );
3152
+ onError(err);
3153
+ error.value = err;
3154
+ }
3155
+ }, timeout);
3156
+ }
3157
+ load().then(() => {
3158
+ loaded.value = true;
3159
+ if (instance.parent && isKeepAlive(instance.parent.vnode)) {
3160
+ queueJob(instance.parent.update);
3161
+ }
3162
+ }).catch((err) => {
3163
+ onError(err);
3164
+ error.value = err;
3165
+ });
3166
+ return () => {
3167
+ if (loaded.value && resolvedComp) {
3168
+ return createInnerComp(resolvedComp, instance);
3169
+ } else if (error.value && errorComponent) {
3170
+ return createVNode(errorComponent, {
3171
+ error: error.value
3172
+ });
3173
+ } else if (loadingComponent && !delayed.value) {
3174
+ return createVNode(loadingComponent);
3175
+ }
3176
+ };
3177
+ }
3178
+ });
3179
+ }
3180
+ function createInnerComp(comp, parent) {
3181
+ const { ref: ref2, props, children, ce } = parent.vnode;
3182
+ const vnode = createVNode(comp, props, children);
3183
+ vnode.ref = ref2;
3184
+ vnode.ce = ce;
3185
+ delete parent.vnode.ce;
3186
+ return vnode;
3187
+ }
3188
+
3189
+ const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
3190
+ const KeepAliveImpl = {
3191
+ name: `KeepAlive`,
3192
+ // Marker for special handling inside the renderer. We are not using a ===
3193
+ // check directly on KeepAlive in the renderer, because importing it directly
3194
+ // would prevent it from being tree-shaken.
3195
+ __isKeepAlive: true,
3196
+ props: {
3197
+ include: [String, RegExp, Array],
3198
+ exclude: [String, RegExp, Array],
3199
+ max: [String, Number]
3200
+ },
3201
+ setup(props, { slots }) {
3202
+ const instance = getCurrentInstance();
3203
+ const sharedContext = instance.ctx;
3204
+ if (!sharedContext.renderer) {
3205
+ return () => {
3206
+ const children = slots.default && slots.default();
3207
+ return children && children.length === 1 ? children[0] : children;
3208
+ };
3209
+ }
3210
+ const cache = /* @__PURE__ */ new Map();
3211
+ const keys = /* @__PURE__ */ new Set();
3212
+ let current = null;
3213
+ const parentSuspense = instance.suspense;
3214
+ const {
3215
+ renderer: {
3216
+ p: patch,
3217
+ m: move,
3218
+ um: _unmount,
3219
+ o: { createElement }
3220
+ }
3221
+ } = sharedContext;
3222
+ const storageContainer = createElement("div");
3223
+ sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
3224
+ const instance2 = vnode.component;
3225
+ move(vnode, container, anchor, 0, parentSuspense);
3226
+ patch(
3227
+ instance2.vnode,
3228
+ vnode,
3229
+ container,
3230
+ anchor,
3231
+ instance2,
3232
+ parentSuspense,
3233
+ isSVG,
3234
+ vnode.slotScopeIds,
3235
+ optimized
3236
+ );
3237
+ queuePostRenderEffect(() => {
3238
+ instance2.isDeactivated = false;
3239
+ if (instance2.a) {
3240
+ invokeArrayFns(instance2.a);
3241
+ }
3242
+ const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
3243
+ if (vnodeHook) {
3244
+ invokeVNodeHook(vnodeHook, instance2.parent, vnode);
3245
+ }
3246
+ }, parentSuspense);
3247
+ };
3248
+ sharedContext.deactivate = (vnode) => {
3249
+ const instance2 = vnode.component;
3250
+ move(vnode, storageContainer, null, 1, parentSuspense);
3251
+ queuePostRenderEffect(() => {
3252
+ if (instance2.da) {
3253
+ invokeArrayFns(instance2.da);
3254
+ }
3255
+ const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
3256
+ if (vnodeHook) {
3257
+ invokeVNodeHook(vnodeHook, instance2.parent, vnode);
3258
+ }
3259
+ instance2.isDeactivated = true;
3260
+ }, parentSuspense);
3261
+ };
3262
+ function unmount(vnode) {
3263
+ resetShapeFlag(vnode);
3264
+ _unmount(vnode, instance, parentSuspense, true);
3265
+ }
3266
+ function pruneCache(filter) {
3267
+ cache.forEach((vnode, key) => {
3268
+ const name = getComponentName(vnode.type);
3269
+ if (name && (!filter || !filter(name))) {
3270
+ pruneCacheEntry(key);
3271
+ }
3272
+ });
3273
+ }
3274
+ function pruneCacheEntry(key) {
3275
+ const cached = cache.get(key);
3276
+ if (!current || !isSameVNodeType(cached, current)) {
3277
+ unmount(cached);
3278
+ } else if (current) {
3279
+ resetShapeFlag(current);
3280
+ }
3281
+ cache.delete(key);
3282
+ keys.delete(key);
3283
+ }
3284
+ watch(
3285
+ () => [props.include, props.exclude],
3286
+ ([include, exclude]) => {
3287
+ include && pruneCache((name) => matches$1(include, name));
3288
+ exclude && pruneCache((name) => !matches$1(exclude, name));
3289
+ },
3290
+ // prune post-render after `current` has been updated
3291
+ { flush: "post", deep: true }
3292
+ );
3293
+ let pendingCacheKey = null;
3294
+ const cacheSubtree = () => {
3295
+ if (pendingCacheKey != null) {
3296
+ cache.set(pendingCacheKey, getInnerChild(instance.subTree));
3297
+ }
3298
+ };
3299
+ onMounted(cacheSubtree);
3300
+ onUpdated(cacheSubtree);
3301
+ onBeforeUnmount(() => {
3302
+ cache.forEach((cached) => {
3303
+ const { subTree, suspense } = instance;
3304
+ const vnode = getInnerChild(subTree);
3305
+ if (cached.type === vnode.type && cached.key === vnode.key) {
3306
+ resetShapeFlag(vnode);
3307
+ const da = vnode.component.da;
3308
+ da && queuePostRenderEffect(da, suspense);
3309
+ return;
3310
+ }
3311
+ unmount(cached);
3312
+ });
3313
+ });
3314
+ return () => {
3315
+ pendingCacheKey = null;
3316
+ if (!slots.default) {
3317
+ return null;
3318
+ }
3319
+ const children = slots.default();
3320
+ const rawVNode = children[0];
3321
+ if (children.length > 1) {
3322
+ current = null;
3323
+ return children;
3324
+ } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
3325
+ current = null;
3326
+ return rawVNode;
3327
+ }
3328
+ let vnode = getInnerChild(rawVNode);
3329
+ const comp = vnode.type;
3330
+ const name = getComponentName(
3331
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
3332
+ );
3333
+ const { include, exclude, max } = props;
3334
+ if (include && (!name || !matches$1(include, name)) || exclude && name && matches$1(exclude, name)) {
3335
+ current = vnode;
3336
+ return rawVNode;
3337
+ }
3338
+ const key = vnode.key == null ? comp : vnode.key;
3339
+ const cachedVNode = cache.get(key);
3340
+ if (vnode.el) {
3341
+ vnode = cloneVNode(vnode);
3342
+ if (rawVNode.shapeFlag & 128) {
3343
+ rawVNode.ssContent = vnode;
3344
+ }
3345
+ }
3346
+ pendingCacheKey = key;
3347
+ if (cachedVNode) {
3348
+ vnode.el = cachedVNode.el;
3349
+ vnode.component = cachedVNode.component;
3350
+ if (vnode.transition) {
3351
+ setTransitionHooks(vnode, vnode.transition);
3352
+ }
3353
+ vnode.shapeFlag |= 512;
3354
+ keys.delete(key);
3355
+ keys.add(key);
3356
+ } else {
3357
+ keys.add(key);
3358
+ if (max && keys.size > parseInt(max, 10)) {
3359
+ pruneCacheEntry(keys.values().next().value);
3360
+ }
3361
+ }
3362
+ vnode.shapeFlag |= 256;
3363
+ current = vnode;
3364
+ return isSuspense(rawVNode.type) ? rawVNode : vnode;
3365
+ };
3366
+ }
3367
+ };
3368
+ const KeepAlive = KeepAliveImpl;
3369
+ function matches$1(pattern, name) {
3370
+ if (isArray$1(pattern)) {
3371
+ return pattern.some((p) => matches$1(p, name));
3372
+ } else if (isString(pattern)) {
3373
+ return pattern.split(",").includes(name);
3374
+ } else if (isRegExp(pattern)) {
3375
+ return pattern.test(name);
3376
+ }
3377
+ return false;
3378
+ }
3379
+ function onActivated(hook, target) {
3380
+ registerKeepAliveHook(hook, "a", target);
3381
+ }
3382
+ function onDeactivated(hook, target) {
3383
+ registerKeepAliveHook(hook, "da", target);
3384
+ }
3385
+ function registerKeepAliveHook(hook, type, target = currentInstance) {
2429
3386
  const wrappedHook = hook.__wdc || (hook.__wdc = () => {
2430
3387
  let current = target;
2431
3388
  while (current) {
@@ -2459,6 +3416,13 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2459
3416
  remove(keepAliveRoot[type], injected);
2460
3417
  }, target);
2461
3418
  }
3419
+ function resetShapeFlag(vnode) {
3420
+ vnode.shapeFlag &= ~256;
3421
+ vnode.shapeFlag &= ~512;
3422
+ }
3423
+ function getInnerChild(vnode) {
3424
+ return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
3425
+ }
2462
3426
 
2463
3427
  function injectHook(type, hook, target = currentInstance, prepend = false) {
2464
3428
  if (target) {
@@ -2585,6 +3549,25 @@ function renderList(source, renderItem, cache, index) {
2585
3549
  return ret;
2586
3550
  }
2587
3551
 
3552
+ function createSlots(slots, dynamicSlots) {
3553
+ for (let i = 0; i < dynamicSlots.length; i++) {
3554
+ const slot = dynamicSlots[i];
3555
+ if (isArray$1(slot)) {
3556
+ for (let j = 0; j < slot.length; j++) {
3557
+ slots[slot[j].name] = slot[j].fn;
3558
+ }
3559
+ } else if (slot) {
3560
+ slots[slot.name] = slot.key ? (...args) => {
3561
+ const res = slot.fn(...args);
3562
+ if (res)
3563
+ res.key = slot.key;
3564
+ return res;
3565
+ } : slot.fn;
3566
+ }
3567
+ }
3568
+ return slots;
3569
+ }
3570
+
2588
3571
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
2589
3572
  if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
2590
3573
  if (name !== "default")
@@ -2759,12 +3742,134 @@ const PublicInstanceProxyHandlers = {
2759
3742
  return Reflect.defineProperty(target, key, descriptor);
2760
3743
  }
2761
3744
  };
3745
+ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
3746
+ {},
3747
+ PublicInstanceProxyHandlers,
3748
+ {
3749
+ get(target, key) {
3750
+ if (key === Symbol.unscopables) {
3751
+ return;
3752
+ }
3753
+ return PublicInstanceProxyHandlers.get(target, key, target);
3754
+ },
3755
+ has(_, key) {
3756
+ const has = key[0] !== "_" && !isGloballyWhitelisted(key);
3757
+ return has;
3758
+ }
3759
+ }
3760
+ );
3761
+ function defineProps() {
3762
+ return null;
3763
+ }
3764
+ function defineEmits() {
3765
+ return null;
3766
+ }
3767
+ function defineExpose(exposed) {
3768
+ }
3769
+ function defineOptions(options) {
3770
+ }
3771
+ function defineSlots() {
3772
+ return null;
3773
+ }
3774
+ function defineModel() {
3775
+ }
3776
+ function withDefaults(props, defaults) {
3777
+ return null;
3778
+ }
3779
+ function useSlots() {
3780
+ return getContext().slots;
3781
+ }
3782
+ function useAttrs() {
3783
+ return getContext().attrs;
3784
+ }
3785
+ function useModel(props, name, options) {
3786
+ const i = getCurrentInstance();
3787
+ if (options && options.local) {
3788
+ const proxy = ref(props[name]);
3789
+ watch(
3790
+ () => props[name],
3791
+ (v) => proxy.value = v
3792
+ );
3793
+ watch(proxy, (value) => {
3794
+ if (value !== props[name]) {
3795
+ i.emit(`update:${name}`, value);
3796
+ }
3797
+ });
3798
+ return proxy;
3799
+ } else {
3800
+ return {
3801
+ __v_isRef: true,
3802
+ get value() {
3803
+ return props[name];
3804
+ },
3805
+ set value(value) {
3806
+ i.emit(`update:${name}`, value);
3807
+ }
3808
+ };
3809
+ }
3810
+ }
3811
+ function getContext() {
3812
+ const i = getCurrentInstance();
3813
+ return i.setupContext || (i.setupContext = createSetupContext(i));
3814
+ }
2762
3815
  function normalizePropsOrEmits(props) {
2763
3816
  return isArray$1(props) ? props.reduce(
2764
3817
  (normalized, p) => (normalized[p] = null, normalized),
2765
3818
  {}
2766
3819
  ) : props;
2767
3820
  }
3821
+ function mergeDefaults(raw, defaults) {
3822
+ const props = normalizePropsOrEmits(raw);
3823
+ for (const key in defaults) {
3824
+ if (key.startsWith("__skip"))
3825
+ continue;
3826
+ let opt = props[key];
3827
+ if (opt) {
3828
+ if (isArray$1(opt) || isFunction(opt)) {
3829
+ opt = props[key] = { type: opt, default: defaults[key] };
3830
+ } else {
3831
+ opt.default = defaults[key];
3832
+ }
3833
+ } else if (opt === null) {
3834
+ opt = props[key] = { default: defaults[key] };
3835
+ } else ;
3836
+ if (opt && defaults[`__skip_${key}`]) {
3837
+ opt.skipFactory = true;
3838
+ }
3839
+ }
3840
+ return props;
3841
+ }
3842
+ function mergeModels(a, b) {
3843
+ if (!a || !b)
3844
+ return a || b;
3845
+ if (isArray$1(a) && isArray$1(b))
3846
+ return a.concat(b);
3847
+ return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
3848
+ }
3849
+ function createPropsRestProxy(props, excludedKeys) {
3850
+ const ret = {};
3851
+ for (const key in props) {
3852
+ if (!excludedKeys.includes(key)) {
3853
+ Object.defineProperty(ret, key, {
3854
+ enumerable: true,
3855
+ get: () => props[key]
3856
+ });
3857
+ }
3858
+ }
3859
+ return ret;
3860
+ }
3861
+ function withAsyncContext(getAwaitable) {
3862
+ const ctx = getCurrentInstance();
3863
+ let awaitable = getAwaitable();
3864
+ unsetCurrentInstance();
3865
+ if (isPromise(awaitable)) {
3866
+ awaitable = awaitable.catch((e) => {
3867
+ setCurrentInstance(ctx);
3868
+ throw e;
3869
+ });
3870
+ }
3871
+ return [awaitable, () => setCurrentInstance(ctx)];
3872
+ }
2768
3873
  let shouldCacheAccess = true;
2769
3874
  function applyOptions(instance) {
2770
3875
  const options = resolveMergedOptions(instance);
@@ -3241,6 +4346,9 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3241
4346
  } else ;
3242
4347
  }
3243
4348
  }
4349
+ function hasInjectionContext() {
4350
+ return !!(currentInstance || currentRenderingInstance || currentApp);
4351
+ }
3244
4352
 
3245
4353
  function initProps(instance, rawProps, isStateful, isSSR = false) {
3246
4354
  const props = {};
@@ -3610,79 +4718,446 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3610
4718
  isUnmount
3611
4719
  )
3612
4720
  );
3613
- return;
3614
- }
3615
- if (isAsyncWrapper(vnode) && !isUnmount) {
3616
- return;
3617
- }
3618
- const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
3619
- const value = isUnmount ? null : refValue;
3620
- const { i: owner, r: ref } = rawRef;
3621
- const oldRef = oldRawRef && oldRawRef.r;
3622
- const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3623
- const setupState = owner.setupState;
3624
- if (oldRef != null && oldRef !== ref) {
3625
- if (isString(oldRef)) {
3626
- refs[oldRef] = null;
3627
- if (hasOwn(setupState, oldRef)) {
3628
- setupState[oldRef] = null;
4721
+ return;
4722
+ }
4723
+ if (isAsyncWrapper(vnode) && !isUnmount) {
4724
+ return;
4725
+ }
4726
+ const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
4727
+ const value = isUnmount ? null : refValue;
4728
+ const { i: owner, r: ref } = rawRef;
4729
+ const oldRef = oldRawRef && oldRawRef.r;
4730
+ const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
4731
+ const setupState = owner.setupState;
4732
+ if (oldRef != null && oldRef !== ref) {
4733
+ if (isString(oldRef)) {
4734
+ refs[oldRef] = null;
4735
+ if (hasOwn(setupState, oldRef)) {
4736
+ setupState[oldRef] = null;
4737
+ }
4738
+ } else if (isRef(oldRef)) {
4739
+ oldRef.value = null;
4740
+ }
4741
+ }
4742
+ if (isFunction(ref)) {
4743
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
4744
+ } else {
4745
+ const _isString = isString(ref);
4746
+ const _isRef = isRef(ref);
4747
+ if (_isString || _isRef) {
4748
+ const doSet = () => {
4749
+ if (rawRef.f) {
4750
+ const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
4751
+ if (isUnmount) {
4752
+ isArray$1(existing) && remove(existing, refValue);
4753
+ } else {
4754
+ if (!isArray$1(existing)) {
4755
+ if (_isString) {
4756
+ refs[ref] = [refValue];
4757
+ if (hasOwn(setupState, ref)) {
4758
+ setupState[ref] = refs[ref];
4759
+ }
4760
+ } else {
4761
+ ref.value = [refValue];
4762
+ if (rawRef.k)
4763
+ refs[rawRef.k] = ref.value;
4764
+ }
4765
+ } else if (!existing.includes(refValue)) {
4766
+ existing.push(refValue);
4767
+ }
4768
+ }
4769
+ } else if (_isString) {
4770
+ refs[ref] = value;
4771
+ if (hasOwn(setupState, ref)) {
4772
+ setupState[ref] = value;
4773
+ }
4774
+ } else if (_isRef) {
4775
+ ref.value = value;
4776
+ if (rawRef.k)
4777
+ refs[rawRef.k] = value;
4778
+ } else ;
4779
+ };
4780
+ if (value) {
4781
+ doSet.id = -1;
4782
+ queuePostRenderEffect(doSet, parentSuspense);
4783
+ } else {
4784
+ doSet();
4785
+ }
4786
+ }
4787
+ }
4788
+ }
4789
+
4790
+ let hasMismatch = false;
4791
+ const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== "foreignObject";
4792
+ const isComment = (node) => node.nodeType === 8 /* COMMENT */;
4793
+ function createHydrationFunctions(rendererInternals) {
4794
+ const {
4795
+ mt: mountComponent,
4796
+ p: patch,
4797
+ o: {
4798
+ patchProp,
4799
+ createText,
4800
+ nextSibling,
4801
+ parentNode,
4802
+ remove,
4803
+ insert,
4804
+ createComment
4805
+ }
4806
+ } = rendererInternals;
4807
+ const hydrate = (vnode, container) => {
4808
+ if (!container.hasChildNodes()) {
4809
+ patch(null, vnode, container);
4810
+ flushPostFlushCbs();
4811
+ container._vnode = vnode;
4812
+ return;
4813
+ }
4814
+ hasMismatch = false;
4815
+ hydrateNode(container.firstChild, vnode, null, null, null);
4816
+ flushPostFlushCbs();
4817
+ container._vnode = vnode;
4818
+ if (hasMismatch && true) {
4819
+ console.error(`Hydration completed but contains mismatches.`);
4820
+ }
4821
+ };
4822
+ const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4823
+ const isFragmentStart = isComment(node) && node.data === "[";
4824
+ const onMismatch = () => handleMismatch(
4825
+ node,
4826
+ vnode,
4827
+ parentComponent,
4828
+ parentSuspense,
4829
+ slotScopeIds,
4830
+ isFragmentStart
4831
+ );
4832
+ const { type, ref, shapeFlag, patchFlag } = vnode;
4833
+ let domType = node.nodeType;
4834
+ vnode.el = node;
4835
+ if (patchFlag === -2) {
4836
+ optimized = false;
4837
+ vnode.dynamicChildren = null;
4838
+ }
4839
+ let nextNode = null;
4840
+ switch (type) {
4841
+ case Text:
4842
+ if (domType !== 3 /* TEXT */) {
4843
+ if (vnode.children === "") {
4844
+ insert(vnode.el = createText(""), parentNode(node), node);
4845
+ nextNode = node;
4846
+ } else {
4847
+ nextNode = onMismatch();
4848
+ }
4849
+ } else {
4850
+ if (node.data !== vnode.children) {
4851
+ hasMismatch = true;
4852
+ node.data = vnode.children;
4853
+ }
4854
+ nextNode = nextSibling(node);
4855
+ }
4856
+ break;
4857
+ case Comment:
4858
+ if (domType !== 8 /* COMMENT */ || isFragmentStart) {
4859
+ nextNode = onMismatch();
4860
+ } else {
4861
+ nextNode = nextSibling(node);
4862
+ }
4863
+ break;
4864
+ case Static:
4865
+ if (isFragmentStart) {
4866
+ node = nextSibling(node);
4867
+ domType = node.nodeType;
4868
+ }
4869
+ if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) {
4870
+ nextNode = node;
4871
+ const needToAdoptContent = !vnode.children.length;
4872
+ for (let i = 0; i < vnode.staticCount; i++) {
4873
+ if (needToAdoptContent)
4874
+ vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data;
4875
+ if (i === vnode.staticCount - 1) {
4876
+ vnode.anchor = nextNode;
4877
+ }
4878
+ nextNode = nextSibling(nextNode);
4879
+ }
4880
+ return isFragmentStart ? nextSibling(nextNode) : nextNode;
4881
+ } else {
4882
+ onMismatch();
4883
+ }
4884
+ break;
4885
+ case Fragment:
4886
+ if (!isFragmentStart) {
4887
+ nextNode = onMismatch();
4888
+ } else {
4889
+ nextNode = hydrateFragment(
4890
+ node,
4891
+ vnode,
4892
+ parentComponent,
4893
+ parentSuspense,
4894
+ slotScopeIds,
4895
+ optimized
4896
+ );
4897
+ }
4898
+ break;
4899
+ default:
4900
+ if (shapeFlag & 1) {
4901
+ if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
4902
+ nextNode = onMismatch();
4903
+ } else {
4904
+ nextNode = hydrateElement(
4905
+ node,
4906
+ vnode,
4907
+ parentComponent,
4908
+ parentSuspense,
4909
+ slotScopeIds,
4910
+ optimized
4911
+ );
4912
+ }
4913
+ } else if (shapeFlag & 6) {
4914
+ vnode.slotScopeIds = slotScopeIds;
4915
+ const container = parentNode(node);
4916
+ mountComponent(
4917
+ vnode,
4918
+ container,
4919
+ null,
4920
+ parentComponent,
4921
+ parentSuspense,
4922
+ isSVGContainer(container),
4923
+ optimized
4924
+ );
4925
+ nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
4926
+ if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
4927
+ nextNode = nextSibling(nextNode);
4928
+ }
4929
+ if (isAsyncWrapper(vnode)) {
4930
+ let subTree;
4931
+ if (isFragmentStart) {
4932
+ subTree = createVNode(Fragment);
4933
+ subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
4934
+ } else {
4935
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
4936
+ }
4937
+ subTree.el = node;
4938
+ vnode.component.subTree = subTree;
4939
+ }
4940
+ } else if (shapeFlag & 64) {
4941
+ if (domType !== 8 /* COMMENT */) {
4942
+ nextNode = onMismatch();
4943
+ } else {
4944
+ nextNode = vnode.type.hydrate(
4945
+ node,
4946
+ vnode,
4947
+ parentComponent,
4948
+ parentSuspense,
4949
+ slotScopeIds,
4950
+ optimized,
4951
+ rendererInternals,
4952
+ hydrateChildren
4953
+ );
4954
+ }
4955
+ } else if (shapeFlag & 128) {
4956
+ nextNode = vnode.type.hydrate(
4957
+ node,
4958
+ vnode,
4959
+ parentComponent,
4960
+ parentSuspense,
4961
+ isSVGContainer(parentNode(node)),
4962
+ slotScopeIds,
4963
+ optimized,
4964
+ rendererInternals,
4965
+ hydrateNode
4966
+ );
4967
+ } else ;
4968
+ }
4969
+ if (ref != null) {
4970
+ setRef(ref, null, parentSuspense, vnode);
4971
+ }
4972
+ return nextNode;
4973
+ };
4974
+ const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
4975
+ optimized = optimized || !!vnode.dynamicChildren;
4976
+ const { type, props, patchFlag, shapeFlag, dirs } = vnode;
4977
+ const forcePatchValue = type === "input" && dirs || type === "option";
4978
+ if (forcePatchValue || patchFlag !== -1) {
4979
+ if (dirs) {
4980
+ invokeDirectiveHook(vnode, null, parentComponent, "created");
4981
+ }
4982
+ if (props) {
4983
+ if (forcePatchValue || !optimized || patchFlag & (16 | 32)) {
4984
+ for (const key in props) {
4985
+ if (forcePatchValue && key.endsWith("value") || isOn(key) && !isReservedProp(key)) {
4986
+ patchProp(
4987
+ el,
4988
+ key,
4989
+ null,
4990
+ props[key],
4991
+ false,
4992
+ void 0,
4993
+ parentComponent
4994
+ );
4995
+ }
4996
+ }
4997
+ } else if (props.onClick) {
4998
+ patchProp(
4999
+ el,
5000
+ "onClick",
5001
+ null,
5002
+ props.onClick,
5003
+ false,
5004
+ void 0,
5005
+ parentComponent
5006
+ );
5007
+ }
5008
+ }
5009
+ let vnodeHooks;
5010
+ if (vnodeHooks = props && props.onVnodeBeforeMount) {
5011
+ invokeVNodeHook(vnodeHooks, parentComponent, vnode);
5012
+ }
5013
+ if (dirs) {
5014
+ invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
5015
+ }
5016
+ if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
5017
+ queueEffectWithSuspense(() => {
5018
+ vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
5019
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
5020
+ }, parentSuspense);
5021
+ }
5022
+ if (shapeFlag & 16 && // skip if element has innerHTML / textContent
5023
+ !(props && (props.innerHTML || props.textContent))) {
5024
+ let next = hydrateChildren(
5025
+ el.firstChild,
5026
+ vnode,
5027
+ el,
5028
+ parentComponent,
5029
+ parentSuspense,
5030
+ slotScopeIds,
5031
+ optimized
5032
+ );
5033
+ while (next) {
5034
+ hasMismatch = true;
5035
+ const cur = next;
5036
+ next = next.nextSibling;
5037
+ remove(cur);
5038
+ }
5039
+ } else if (shapeFlag & 8) {
5040
+ if (el.textContent !== vnode.children) {
5041
+ hasMismatch = true;
5042
+ el.textContent = vnode.children;
5043
+ }
5044
+ }
5045
+ }
5046
+ return el.nextSibling;
5047
+ };
5048
+ const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
5049
+ optimized = optimized || !!parentVNode.dynamicChildren;
5050
+ const children = parentVNode.children;
5051
+ const l = children.length;
5052
+ for (let i = 0; i < l; i++) {
5053
+ const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
5054
+ if (node) {
5055
+ node = hydrateNode(
5056
+ node,
5057
+ vnode,
5058
+ parentComponent,
5059
+ parentSuspense,
5060
+ slotScopeIds,
5061
+ optimized
5062
+ );
5063
+ } else if (vnode.type === Text && !vnode.children) {
5064
+ continue;
5065
+ } else {
5066
+ hasMismatch = true;
5067
+ patch(
5068
+ null,
5069
+ vnode,
5070
+ container,
5071
+ null,
5072
+ parentComponent,
5073
+ parentSuspense,
5074
+ isSVGContainer(container),
5075
+ slotScopeIds
5076
+ );
5077
+ }
5078
+ }
5079
+ return node;
5080
+ };
5081
+ const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
5082
+ const { slotScopeIds: fragmentSlotScopeIds } = vnode;
5083
+ if (fragmentSlotScopeIds) {
5084
+ slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
5085
+ }
5086
+ const container = parentNode(node);
5087
+ const next = hydrateChildren(
5088
+ nextSibling(node),
5089
+ vnode,
5090
+ container,
5091
+ parentComponent,
5092
+ parentSuspense,
5093
+ slotScopeIds,
5094
+ optimized
5095
+ );
5096
+ if (next && isComment(next) && next.data === "]") {
5097
+ return nextSibling(vnode.anchor = next);
5098
+ } else {
5099
+ hasMismatch = true;
5100
+ insert(vnode.anchor = createComment(`]`), container, next);
5101
+ return next;
5102
+ }
5103
+ };
5104
+ const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
5105
+ hasMismatch = true;
5106
+ vnode.el = null;
5107
+ if (isFragment) {
5108
+ const end = locateClosingAsyncAnchor(node);
5109
+ while (true) {
5110
+ const next2 = nextSibling(node);
5111
+ if (next2 && next2 !== end) {
5112
+ remove(next2);
5113
+ } else {
5114
+ break;
5115
+ }
3629
5116
  }
3630
- } else if (isRef(oldRef)) {
3631
- oldRef.value = null;
3632
5117
  }
3633
- }
3634
- if (isFunction(ref)) {
3635
- callWithErrorHandling(ref, owner, 12, [value, refs]);
3636
- } else {
3637
- const _isString = isString(ref);
3638
- const _isRef = isRef(ref);
3639
- if (_isString || _isRef) {
3640
- const doSet = () => {
3641
- if (rawRef.f) {
3642
- const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
3643
- if (isUnmount) {
3644
- isArray$1(existing) && remove(existing, refValue);
5118
+ const next = nextSibling(node);
5119
+ const container = parentNode(node);
5120
+ remove(node);
5121
+ patch(
5122
+ null,
5123
+ vnode,
5124
+ container,
5125
+ next,
5126
+ parentComponent,
5127
+ parentSuspense,
5128
+ isSVGContainer(container),
5129
+ slotScopeIds
5130
+ );
5131
+ return next;
5132
+ };
5133
+ const locateClosingAsyncAnchor = (node) => {
5134
+ let match = 0;
5135
+ while (node) {
5136
+ node = nextSibling(node);
5137
+ if (node && isComment(node)) {
5138
+ if (node.data === "[")
5139
+ match++;
5140
+ if (node.data === "]") {
5141
+ if (match === 0) {
5142
+ return nextSibling(node);
3645
5143
  } else {
3646
- if (!isArray$1(existing)) {
3647
- if (_isString) {
3648
- refs[ref] = [refValue];
3649
- if (hasOwn(setupState, ref)) {
3650
- setupState[ref] = refs[ref];
3651
- }
3652
- } else {
3653
- ref.value = [refValue];
3654
- if (rawRef.k)
3655
- refs[rawRef.k] = ref.value;
3656
- }
3657
- } else if (!existing.includes(refValue)) {
3658
- existing.push(refValue);
3659
- }
3660
- }
3661
- } else if (_isString) {
3662
- refs[ref] = value;
3663
- if (hasOwn(setupState, ref)) {
3664
- setupState[ref] = value;
5144
+ match--;
3665
5145
  }
3666
- } else if (_isRef) {
3667
- ref.value = value;
3668
- if (rawRef.k)
3669
- refs[rawRef.k] = value;
3670
- } else ;
3671
- };
3672
- if (value) {
3673
- doSet.id = -1;
3674
- queuePostRenderEffect(doSet, parentSuspense);
3675
- } else {
3676
- doSet();
5146
+ }
3677
5147
  }
3678
5148
  }
3679
- }
5149
+ return node;
5150
+ };
5151
+ return [hydrate, hydrateNode];
3680
5152
  }
3681
5153
 
3682
5154
  const queuePostRenderEffect = queueEffectWithSuspense ;
3683
5155
  function createRenderer(options) {
3684
5156
  return baseCreateRenderer(options);
3685
5157
  }
5158
+ function createHydrationRenderer(options) {
5159
+ return baseCreateRenderer(options, createHydrationFunctions);
5160
+ }
3686
5161
  function baseCreateRenderer(options, createHydrationFns) {
3687
5162
  const target = getGlobalThis();
3688
5163
  target.__VUE__ = true;
@@ -5294,6 +6769,8 @@ function isVNode(value) {
5294
6769
  function isSameVNodeType(n1, n2) {
5295
6770
  return n1.type === n2.type && n1.key === n2.key;
5296
6771
  }
6772
+ function transformVNodeArgs(transformer) {
6773
+ }
5297
6774
  const InternalObjectKey = `__vInternal`;
5298
6775
  const normalizeKey = ({ key }) => key != null ? key : null;
5299
6776
  const normalizeRef = ({
@@ -5746,6 +7223,16 @@ function handleSetupResult(instance, setupResult, isSSR) {
5746
7223
  finishComponentSetup(instance, isSSR);
5747
7224
  }
5748
7225
  let compile;
7226
+ let installWithProxy;
7227
+ function registerRuntimeCompiler(_compile) {
7228
+ compile = _compile;
7229
+ installWithProxy = (i) => {
7230
+ if (i.render._rc) {
7231
+ i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
7232
+ }
7233
+ };
7234
+ }
7235
+ const isRuntimeOnly = () => !compile;
5749
7236
  function finishComponentSetup(instance, isSSR, skipOptions) {
5750
7237
  const Component = instance.type;
5751
7238
  if (!instance.render) {
@@ -5768,6 +7255,9 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
5768
7255
  }
5769
7256
  }
5770
7257
  instance.render = Component.render || NOOP;
7258
+ if (installWithProxy) {
7259
+ installWithProxy(instance);
7260
+ }
5771
7261
  }
5772
7262
  {
5773
7263
  setCurrentInstance(instance);
@@ -5859,7 +7349,49 @@ const useSSRContext = () => {
5859
7349
  }
5860
7350
  };
5861
7351
 
7352
+ function initCustomFormatter() {
7353
+ {
7354
+ return;
7355
+ }
7356
+ }
7357
+
7358
+ function withMemo(memo, render, cache, index) {
7359
+ const cached = cache[index];
7360
+ if (cached && isMemoSame(cached, memo)) {
7361
+ return cached;
7362
+ }
7363
+ const ret = render();
7364
+ ret.memo = memo.slice();
7365
+ return cache[index] = ret;
7366
+ }
7367
+ function isMemoSame(cached, memo) {
7368
+ const prev = cached.memo;
7369
+ if (prev.length != memo.length) {
7370
+ return false;
7371
+ }
7372
+ for (let i = 0; i < prev.length; i++) {
7373
+ if (hasChanged(prev[i], memo[i])) {
7374
+ return false;
7375
+ }
7376
+ }
7377
+ if (isBlockTreeEnabled > 0 && currentBlock) {
7378
+ currentBlock.push(cached);
7379
+ }
7380
+ return true;
7381
+ }
7382
+
5862
7383
  const version = "3.3.4";
7384
+ const _ssrUtils = {
7385
+ createComponentInstance,
7386
+ setupComponent,
7387
+ renderComponentRoot,
7388
+ setCurrentRenderingInstance,
7389
+ isVNode: isVNode,
7390
+ normalizeVNode
7391
+ };
7392
+ const ssrUtils = _ssrUtils ;
7393
+ const resolveFilter = null;
7394
+ const compatUtils = null;
5863
7395
 
5864
7396
  /* Injected with object hook! */
5865
7397
 
@@ -6203,6 +7735,276 @@ function shouldSetAsProp(el, key, value, isSVG) {
6203
7735
  return key in el;
6204
7736
  }
6205
7737
 
7738
+ function defineCustomElement(options, hydrate2) {
7739
+ const Comp = defineComponent(options);
7740
+ class VueCustomElement extends VueElement {
7741
+ constructor(initialProps) {
7742
+ super(Comp, initialProps, hydrate2);
7743
+ }
7744
+ }
7745
+ VueCustomElement.def = Comp;
7746
+ return VueCustomElement;
7747
+ }
7748
+ const defineSSRCustomElement = (options) => {
7749
+ return defineCustomElement(options, hydrate);
7750
+ };
7751
+ const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
7752
+ };
7753
+ class VueElement extends BaseClass {
7754
+ constructor(_def, _props = {}, hydrate2) {
7755
+ super();
7756
+ this._def = _def;
7757
+ this._props = _props;
7758
+ /**
7759
+ * @internal
7760
+ */
7761
+ this._instance = null;
7762
+ this._connected = false;
7763
+ this._resolved = false;
7764
+ this._numberProps = null;
7765
+ if (this.shadowRoot && hydrate2) {
7766
+ hydrate2(this._createVNode(), this.shadowRoot);
7767
+ } else {
7768
+ this.attachShadow({ mode: "open" });
7769
+ if (!this._def.__asyncLoader) {
7770
+ this._resolveProps(this._def);
7771
+ }
7772
+ }
7773
+ }
7774
+ connectedCallback() {
7775
+ this._connected = true;
7776
+ if (!this._instance) {
7777
+ if (this._resolved) {
7778
+ this._update();
7779
+ } else {
7780
+ this._resolveDef();
7781
+ }
7782
+ }
7783
+ }
7784
+ disconnectedCallback() {
7785
+ this._connected = false;
7786
+ nextTick(() => {
7787
+ if (!this._connected) {
7788
+ render$1(null, this.shadowRoot);
7789
+ this._instance = null;
7790
+ }
7791
+ });
7792
+ }
7793
+ /**
7794
+ * resolve inner component definition (handle possible async component)
7795
+ */
7796
+ _resolveDef() {
7797
+ this._resolved = true;
7798
+ for (let i = 0; i < this.attributes.length; i++) {
7799
+ this._setAttr(this.attributes[i].name);
7800
+ }
7801
+ new MutationObserver((mutations) => {
7802
+ for (const m of mutations) {
7803
+ this._setAttr(m.attributeName);
7804
+ }
7805
+ }).observe(this, { attributes: true });
7806
+ const resolve = (def, isAsync = false) => {
7807
+ const { props, styles } = def;
7808
+ let numberProps;
7809
+ if (props && !isArray$1(props)) {
7810
+ for (const key in props) {
7811
+ const opt = props[key];
7812
+ if (opt === Number || opt && opt.type === Number) {
7813
+ if (key in this._props) {
7814
+ this._props[key] = toNumber(this._props[key]);
7815
+ }
7816
+ (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
7817
+ }
7818
+ }
7819
+ }
7820
+ this._numberProps = numberProps;
7821
+ if (isAsync) {
7822
+ this._resolveProps(def);
7823
+ }
7824
+ this._applyStyles(styles);
7825
+ this._update();
7826
+ };
7827
+ const asyncDef = this._def.__asyncLoader;
7828
+ if (asyncDef) {
7829
+ asyncDef().then((def) => resolve(def, true));
7830
+ } else {
7831
+ resolve(this._def);
7832
+ }
7833
+ }
7834
+ _resolveProps(def) {
7835
+ const { props } = def;
7836
+ const declaredPropKeys = isArray$1(props) ? props : Object.keys(props || {});
7837
+ for (const key of Object.keys(this)) {
7838
+ if (key[0] !== "_" && declaredPropKeys.includes(key)) {
7839
+ this._setProp(key, this[key], true, false);
7840
+ }
7841
+ }
7842
+ for (const key of declaredPropKeys.map(camelize)) {
7843
+ Object.defineProperty(this, key, {
7844
+ get() {
7845
+ return this._getProp(key);
7846
+ },
7847
+ set(val) {
7848
+ this._setProp(key, val);
7849
+ }
7850
+ });
7851
+ }
7852
+ }
7853
+ _setAttr(key) {
7854
+ let value = this.getAttribute(key);
7855
+ const camelKey = camelize(key);
7856
+ if (this._numberProps && this._numberProps[camelKey]) {
7857
+ value = toNumber(value);
7858
+ }
7859
+ this._setProp(camelKey, value, false);
7860
+ }
7861
+ /**
7862
+ * @internal
7863
+ */
7864
+ _getProp(key) {
7865
+ return this._props[key];
7866
+ }
7867
+ /**
7868
+ * @internal
7869
+ */
7870
+ _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
7871
+ if (val !== this._props[key]) {
7872
+ this._props[key] = val;
7873
+ if (shouldUpdate && this._instance) {
7874
+ this._update();
7875
+ }
7876
+ if (shouldReflect) {
7877
+ if (val === true) {
7878
+ this.setAttribute(hyphenate(key), "");
7879
+ } else if (typeof val === "string" || typeof val === "number") {
7880
+ this.setAttribute(hyphenate(key), val + "");
7881
+ } else if (!val) {
7882
+ this.removeAttribute(hyphenate(key));
7883
+ }
7884
+ }
7885
+ }
7886
+ }
7887
+ _update() {
7888
+ render$1(this._createVNode(), this.shadowRoot);
7889
+ }
7890
+ _createVNode() {
7891
+ const vnode = createVNode(this._def, extend({}, this._props));
7892
+ if (!this._instance) {
7893
+ vnode.ce = (instance) => {
7894
+ this._instance = instance;
7895
+ instance.isCE = true;
7896
+ const dispatch = (event, args) => {
7897
+ this.dispatchEvent(
7898
+ new CustomEvent(event, {
7899
+ detail: args
7900
+ })
7901
+ );
7902
+ };
7903
+ instance.emit = (event, ...args) => {
7904
+ dispatch(event, args);
7905
+ if (hyphenate(event) !== event) {
7906
+ dispatch(hyphenate(event), args);
7907
+ }
7908
+ };
7909
+ let parent = this;
7910
+ while (parent = parent && (parent.parentNode || parent.host)) {
7911
+ if (parent instanceof VueElement) {
7912
+ instance.parent = parent._instance;
7913
+ instance.provides = parent._instance.provides;
7914
+ break;
7915
+ }
7916
+ }
7917
+ };
7918
+ }
7919
+ return vnode;
7920
+ }
7921
+ _applyStyles(styles) {
7922
+ if (styles) {
7923
+ styles.forEach((css) => {
7924
+ const s = document.createElement("style");
7925
+ s.textContent = css;
7926
+ this.shadowRoot.appendChild(s);
7927
+ });
7928
+ }
7929
+ }
7930
+ }
7931
+
7932
+ function useCssModule(name = "$style") {
7933
+ {
7934
+ const instance = getCurrentInstance();
7935
+ if (!instance) {
7936
+ return EMPTY_OBJ;
7937
+ }
7938
+ const modules = instance.type.__cssModules;
7939
+ if (!modules) {
7940
+ return EMPTY_OBJ;
7941
+ }
7942
+ const mod = modules[name];
7943
+ if (!mod) {
7944
+ return EMPTY_OBJ;
7945
+ }
7946
+ return mod;
7947
+ }
7948
+ }
7949
+
7950
+ function useCssVars(getter) {
7951
+ const instance = getCurrentInstance();
7952
+ if (!instance) {
7953
+ return;
7954
+ }
7955
+ const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
7956
+ Array.from(
7957
+ document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
7958
+ ).forEach((node) => setVarsOnNode(node, vars));
7959
+ };
7960
+ const setVars = () => {
7961
+ const vars = getter(instance.proxy);
7962
+ setVarsOnVNode(instance.subTree, vars);
7963
+ updateTeleports(vars);
7964
+ };
7965
+ watchPostEffect(setVars);
7966
+ onMounted(() => {
7967
+ const ob = new MutationObserver(setVars);
7968
+ ob.observe(instance.subTree.el.parentNode, { childList: true });
7969
+ onUnmounted(() => ob.disconnect());
7970
+ });
7971
+ }
7972
+ function setVarsOnVNode(vnode, vars) {
7973
+ if (vnode.shapeFlag & 128) {
7974
+ const suspense = vnode.suspense;
7975
+ vnode = suspense.activeBranch;
7976
+ if (suspense.pendingBranch && !suspense.isHydrating) {
7977
+ suspense.effects.push(() => {
7978
+ setVarsOnVNode(suspense.activeBranch, vars);
7979
+ });
7980
+ }
7981
+ }
7982
+ while (vnode.component) {
7983
+ vnode = vnode.component.subTree;
7984
+ }
7985
+ if (vnode.shapeFlag & 1 && vnode.el) {
7986
+ setVarsOnNode(vnode.el, vars);
7987
+ } else if (vnode.type === Fragment) {
7988
+ vnode.children.forEach((c) => setVarsOnVNode(c, vars));
7989
+ } else if (vnode.type === Static) {
7990
+ let { el, anchor } = vnode;
7991
+ while (el) {
7992
+ setVarsOnNode(el, vars);
7993
+ if (el === anchor)
7994
+ break;
7995
+ el = el.nextSibling;
7996
+ }
7997
+ }
7998
+ }
7999
+ function setVarsOnNode(el, vars) {
8000
+ if (el.nodeType === 1) {
8001
+ const style = el.style;
8002
+ for (const key in vars) {
8003
+ style.setProperty(`--${key}`, vars[key]);
8004
+ }
8005
+ }
8006
+ }
8007
+
6206
8008
  const TRANSITION = "transition";
6207
8009
  const ANIMATION = "animation";
6208
8010
  const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
@@ -6225,7 +8027,7 @@ const DOMTransitionPropsValidators = {
6225
8027
  leaveActiveClass: String,
6226
8028
  leaveToClass: String
6227
8029
  };
6228
- Transition.props = /* @__PURE__ */ extend(
8030
+ const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
6229
8031
  {},
6230
8032
  BaseTransitionPropsValidators,
6231
8033
  DOMTransitionPropsValidators
@@ -6443,27 +8245,146 @@ function getTransitionInfo(el, expectedType) {
6443
8245
  type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
6444
8246
  propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
6445
8247
  }
6446
- const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
6447
- getStyleProperties(`${TRANSITION}Property`).toString()
6448
- );
6449
- return {
6450
- type,
6451
- timeout,
6452
- propCount,
6453
- hasTransform
6454
- };
6455
- }
6456
- function getTimeout(delays, durations) {
6457
- while (delays.length < durations.length) {
6458
- delays = delays.concat(delays);
8248
+ const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
8249
+ getStyleProperties(`${TRANSITION}Property`).toString()
8250
+ );
8251
+ return {
8252
+ type,
8253
+ timeout,
8254
+ propCount,
8255
+ hasTransform
8256
+ };
8257
+ }
8258
+ function getTimeout(delays, durations) {
8259
+ while (delays.length < durations.length) {
8260
+ delays = delays.concat(delays);
8261
+ }
8262
+ return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
8263
+ }
8264
+ function toMs(s) {
8265
+ return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
8266
+ }
8267
+ function forceReflow() {
8268
+ return document.body.offsetHeight;
8269
+ }
8270
+
8271
+ const positionMap = /* @__PURE__ */ new WeakMap();
8272
+ const newPositionMap = /* @__PURE__ */ new WeakMap();
8273
+ const TransitionGroupImpl = {
8274
+ name: "TransitionGroup",
8275
+ props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
8276
+ tag: String,
8277
+ moveClass: String
8278
+ }),
8279
+ setup(props, { slots }) {
8280
+ const instance = getCurrentInstance();
8281
+ const state = useTransitionState();
8282
+ let prevChildren;
8283
+ let children;
8284
+ onUpdated(() => {
8285
+ if (!prevChildren.length) {
8286
+ return;
8287
+ }
8288
+ const moveClass = props.moveClass || `${props.name || "v"}-move`;
8289
+ if (!hasCSSTransform(
8290
+ prevChildren[0].el,
8291
+ instance.vnode.el,
8292
+ moveClass
8293
+ )) {
8294
+ return;
8295
+ }
8296
+ prevChildren.forEach(callPendingCbs);
8297
+ prevChildren.forEach(recordPosition);
8298
+ const movedChildren = prevChildren.filter(applyTranslation);
8299
+ forceReflow();
8300
+ movedChildren.forEach((c) => {
8301
+ const el = c.el;
8302
+ const style = el.style;
8303
+ addTransitionClass(el, moveClass);
8304
+ style.transform = style.webkitTransform = style.transitionDuration = "";
8305
+ const cb = el._moveCb = (e) => {
8306
+ if (e && e.target !== el) {
8307
+ return;
8308
+ }
8309
+ if (!e || /transform$/.test(e.propertyName)) {
8310
+ el.removeEventListener("transitionend", cb);
8311
+ el._moveCb = null;
8312
+ removeTransitionClass(el, moveClass);
8313
+ }
8314
+ };
8315
+ el.addEventListener("transitionend", cb);
8316
+ });
8317
+ });
8318
+ return () => {
8319
+ const rawProps = toRaw(props);
8320
+ const cssTransitionProps = resolveTransitionProps(rawProps);
8321
+ let tag = rawProps.tag || Fragment;
8322
+ prevChildren = children;
8323
+ children = slots.default ? getTransitionRawChildren(slots.default()) : [];
8324
+ for (let i = 0; i < children.length; i++) {
8325
+ const child = children[i];
8326
+ if (child.key != null) {
8327
+ setTransitionHooks(
8328
+ child,
8329
+ resolveTransitionHooks(child, cssTransitionProps, state, instance)
8330
+ );
8331
+ }
8332
+ }
8333
+ if (prevChildren) {
8334
+ for (let i = 0; i < prevChildren.length; i++) {
8335
+ const child = prevChildren[i];
8336
+ setTransitionHooks(
8337
+ child,
8338
+ resolveTransitionHooks(child, cssTransitionProps, state, instance)
8339
+ );
8340
+ positionMap.set(child, child.el.getBoundingClientRect());
8341
+ }
8342
+ }
8343
+ return createVNode(tag, null, children);
8344
+ };
8345
+ }
8346
+ };
8347
+ const removeMode = (props) => delete props.mode;
8348
+ /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
8349
+ const TransitionGroup = TransitionGroupImpl;
8350
+ function callPendingCbs(c) {
8351
+ const el = c.el;
8352
+ if (el._moveCb) {
8353
+ el._moveCb();
8354
+ }
8355
+ if (el._enterCb) {
8356
+ el._enterCb();
8357
+ }
8358
+ }
8359
+ function recordPosition(c) {
8360
+ newPositionMap.set(c, c.el.getBoundingClientRect());
8361
+ }
8362
+ function applyTranslation(c) {
8363
+ const oldPos = positionMap.get(c);
8364
+ const newPos = newPositionMap.get(c);
8365
+ const dx = oldPos.left - newPos.left;
8366
+ const dy = oldPos.top - newPos.top;
8367
+ if (dx || dy) {
8368
+ const s = c.el.style;
8369
+ s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
8370
+ s.transitionDuration = "0s";
8371
+ return c;
8372
+ }
8373
+ }
8374
+ function hasCSSTransform(el, root, moveClass) {
8375
+ const clone = el.cloneNode();
8376
+ if (el._vtc) {
8377
+ el._vtc.forEach((cls) => {
8378
+ cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
8379
+ });
6459
8380
  }
6460
- return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
6461
- }
6462
- function toMs(s) {
6463
- return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
6464
- }
6465
- function forceReflow() {
6466
- return document.body.offsetHeight;
8381
+ moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
8382
+ clone.style.display = "none";
8383
+ const container = root.nodeType === 1 ? root : root.parentNode;
8384
+ container.appendChild(clone);
8385
+ const { hasTransform } = getTransitionInfo(clone);
8386
+ container.removeChild(clone);
8387
+ return hasTransform;
6467
8388
  }
6468
8389
 
6469
8390
  const getModelAssigner = (vnode) => {
@@ -6696,6 +8617,40 @@ function callModelHook(el, binding, vnode, prevVNode, hook) {
6696
8617
  const fn = modelToUse[hook];
6697
8618
  fn && fn(el, binding, vnode, prevVNode);
6698
8619
  }
8620
+ function initVModelForSSR() {
8621
+ vModelText.getSSRProps = ({ value }) => ({ value });
8622
+ vModelRadio.getSSRProps = ({ value }, vnode) => {
8623
+ if (vnode.props && looseEqual(vnode.props.value, value)) {
8624
+ return { checked: true };
8625
+ }
8626
+ };
8627
+ vModelCheckbox.getSSRProps = ({ value }, vnode) => {
8628
+ if (isArray$1(value)) {
8629
+ if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
8630
+ return { checked: true };
8631
+ }
8632
+ } else if (isSet(value)) {
8633
+ if (vnode.props && value.has(vnode.props.value)) {
8634
+ return { checked: true };
8635
+ }
8636
+ } else if (value) {
8637
+ return { checked: true };
8638
+ }
8639
+ };
8640
+ vModelDynamic.getSSRProps = (binding, vnode) => {
8641
+ if (typeof vnode.type !== "string") {
8642
+ return;
8643
+ }
8644
+ const modelToUse = resolveDynamicModel(
8645
+ // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
8646
+ vnode.type.toUpperCase(),
8647
+ vnode.props && vnode.props.type
8648
+ );
8649
+ if (modelToUse.getSSRProps) {
8650
+ return modelToUse.getSSRProps(binding, vnode);
8651
+ }
8652
+ };
8653
+ }
6699
8654
 
6700
8655
  const systemModifiers = ["ctrl", "shift", "alt", "meta"];
6701
8656
  const modifierGuards = {
@@ -6780,12 +8735,31 @@ const vShow = {
6780
8735
  function setDisplay(el, value) {
6781
8736
  el.style.display = value ? el._vod : "none";
6782
8737
  }
8738
+ function initVShowForSSR() {
8739
+ vShow.getSSRProps = ({ value }) => {
8740
+ if (!value) {
8741
+ return { style: { display: "none" } };
8742
+ }
8743
+ };
8744
+ }
6783
8745
 
6784
8746
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
6785
8747
  let renderer;
8748
+ let enabledHydration = false;
6786
8749
  function ensureRenderer() {
6787
8750
  return renderer || (renderer = createRenderer(rendererOptions));
6788
8751
  }
8752
+ function ensureHydrationRenderer() {
8753
+ renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
8754
+ enabledHydration = true;
8755
+ return renderer;
8756
+ }
8757
+ const render$1 = (...args) => {
8758
+ ensureRenderer().render(...args);
8759
+ };
8760
+ const hydrate = (...args) => {
8761
+ ensureHydrationRenderer().hydrate(...args);
8762
+ };
6789
8763
  const createApp = (...args) => {
6790
8764
  const app = ensureRenderer().createApp(...args);
6791
8765
  const { mount } = app;
@@ -6807,6 +8781,17 @@ const createApp = (...args) => {
6807
8781
  };
6808
8782
  return app;
6809
8783
  };
8784
+ const createSSRApp = (...args) => {
8785
+ const app = ensureHydrationRenderer().createApp(...args);
8786
+ const { mount } = app;
8787
+ app.mount = (containerOrSelector) => {
8788
+ const container = normalizeContainer(containerOrSelector);
8789
+ if (container) {
8790
+ return mount(container, true, container instanceof SVGElement);
8791
+ }
8792
+ };
8793
+ return app;
8794
+ };
6810
8795
  function normalizeContainer(container) {
6811
8796
  if (isString(container)) {
6812
8797
  const res = document.querySelector(container);
@@ -6814,6 +8799,14 @@ function normalizeContainer(container) {
6814
8799
  }
6815
8800
  return container;
6816
8801
  }
8802
+ let ssrDirectiveInitialized = false;
8803
+ const initDirectivesForSSR = () => {
8804
+ if (!ssrDirectiveInitialized) {
8805
+ ssrDirectiveInitialized = true;
8806
+ initVModelForSSR();
8807
+ initVShowForSSR();
8808
+ }
8809
+ } ;
6817
8810
 
6818
8811
  /* Injected with object hook! */
6819
8812
 
@@ -12780,6 +14773,29 @@ function useTimeoutFn(cb, interval, options = {}) {
12780
14773
  };
12781
14774
  }
12782
14775
 
14776
+ function useToggle(initialValue = false, options = {}) {
14777
+ const {
14778
+ truthyValue = true,
14779
+ falsyValue = false
14780
+ } = options;
14781
+ const valueIsRef = isRef(initialValue);
14782
+ const _value = ref(initialValue);
14783
+ function toggle(value) {
14784
+ if (arguments.length) {
14785
+ _value.value = value;
14786
+ return _value.value;
14787
+ } else {
14788
+ const truthy = toValue$1(truthyValue);
14789
+ _value.value = _value.value === truthy ? toValue$1(falsyValue) : truthy;
14790
+ return _value.value;
14791
+ }
14792
+ }
14793
+ if (valueIsRef)
14794
+ return toggle;
14795
+ else
14796
+ return [_value, toggle];
14797
+ }
14798
+
12783
14799
  var __getOwnPropSymbols$8$1 = Object.getOwnPropertySymbols;
12784
14800
  var __hasOwnProp$8$1 = Object.prototype.hasOwnProperty;
12785
14801
  var __propIsEnum$8$1 = Object.prototype.propertyIsEnumerable;
@@ -14278,6 +16294,8 @@ function useVModel(props, key, emit, options = {}) {
14278
16294
  /* Injected with object hook! */
14279
16295
 
14280
16296
  const FRAME_STATE_STORAGE_KEY = "__vue-devtools-frame-state__";
16297
+ const TABS_STORAGE_KEY = "__vue-devtools-tabs__";
16298
+ const TABS_GROUP_STORAGE_KEY = "__vue-devtools-tabs-group__";
14281
16299
 
14282
16300
  /* Injected with object hook! */
14283
16301
 
@@ -14387,20 +16405,20 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
14387
16405
 
14388
16406
  /* Injected with object hook! */
14389
16407
 
14390
- const __pages_import_0__ = () => __vitePreload(() => import('./timeline-0c017176.js'),true?["./timeline-0c017176.js","./StateFields.vue_vue_type_script_setup_true_lang-6969f024.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./index-8d0405da.js","./VIconButton.vue_vue_type_script_setup_true_lang-a89f6c88.js","./VPanelGrids-24560813.js","./_commonjsHelpers-c0d8ada0.js","./splitpanes.es-2be998f1.js","./timeline-b315b2e0.css"]:void 0,import.meta.url);
14391
- const __pages_import_1__ = () => __vitePreload(() => import('./settings-5fd1add1.js'),true?["./settings-5fd1add1.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./VIconTitle.vue_vue_type_script_setup_true_lang-d3431291.js"]:void 0,import.meta.url);
14392
- const __pages_import_2__ = () => __vitePreload(() => import('./routes-64dbd0f9.js'),true?["./routes-64dbd0f9.js","./VPanelGrids-24560813.js","./StateFields.vue_vue_type_script_setup_true_lang-6969f024.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./index-8d0405da.js","./VIconButton.vue_vue_type_script_setup_true_lang-a89f6c88.js","./splitpanes.es-2be998f1.js"]:void 0,import.meta.url);
14393
- const __pages_import_3__ = () => __vitePreload(() => import('./pinia-8c6ed567.js'),true?["./pinia-8c6ed567.js","./StateFields.vue_vue_type_script_setup_true_lang-6969f024.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./index-8d0405da.js","./VIconButton.vue_vue_type_script_setup_true_lang-a89f6c88.js","./splitpanes.es-2be998f1.js"]:void 0,import.meta.url);
14394
- const __pages_import_4__ = () => __vitePreload(() => import('./pages-f80c7a3e.js'),true?["./pages-f80c7a3e.js","./VSectionBlock-ba31730a.js","./VIconTitle.vue_vue_type_script_setup_true_lang-d3431291.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./VSectionBlock-52804693.css","./VTextInput.vue_vue_type_script_setup_true_lang-5373326c.js"]:void 0,import.meta.url);
14395
- const __pages_import_5__ = () => __vitePreload(() => import('./overview-aef80b27.js'),true?["./overview-aef80b27.js","./VPanelGrids-24560813.js","./rpc-358fc96c.js","./index-8d0405da.js"]:void 0,import.meta.url);
14396
- const __pages_import_6__ = () => __vitePreload(() => import('./npm-6d9ce0f4.js'),true?["./npm-6d9ce0f4.js","./VSectionBlock-ba31730a.js","./VIconTitle.vue_vue_type_script_setup_true_lang-d3431291.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./VSectionBlock-52804693.css","./VTextInput.vue_vue_type_script_setup_true_lang-5373326c.js","./_commonjsHelpers-c0d8ada0.js","./rpc-358fc96c.js","./npm-125f4259.css"]:void 0,import.meta.url);
14397
- const __pages_import_7__ = () => __vitePreload(() => import('./inspect-4188d5cc.js'),true?["./inspect-4188d5cc.js","./IframeView.vue_vue_type_script_setup_true_lang-4c77817b.js","./rpc-358fc96c.js"]:void 0,import.meta.url);
14398
- const __pages_import_9__ = () => __vitePreload(() => import('./graph-65afb14a.js'),true?["./graph-65afb14a.js","./fuse.esm-c317b696.js","./rpc-358fc96c.js"]:void 0,import.meta.url);
14399
- const __pages_import_10__ = () => __vitePreload(() => import('./documentations-99f74693.js'),true?["./documentations-99f74693.js","./IframeView.vue_vue_type_script_setup_true_lang-4c77817b.js","./rpc-358fc96c.js"]:void 0,import.meta.url);
14400
- const __pages_import_11__ = () => __vitePreload(() => import('./components-f31cfed4.js'),true?["./components-f31cfed4.js","./VPanelGrids-24560813.js","./StateFields.vue_vue_type_script_setup_true_lang-6969f024.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./index-8d0405da.js","./VIconButton.vue_vue_type_script_setup_true_lang-a89f6c88.js","./splitpanes.es-2be998f1.js"]:void 0,import.meta.url);
14401
- const __pages_import_12__ = () => __vitePreload(() => import('./component-docs-49ee42b3.js'),true?["./component-docs-49ee42b3.js","./VTextInput.vue_vue_type_script_setup_true_lang-5373326c.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./splitpanes.es-2be998f1.js","./fuse.esm-c317b696.js","./rpc-358fc96c.js","./component-docs-351d62d5.css"]:void 0,import.meta.url);
14402
- const __pages_import_13__ = () => __vitePreload(() => import('./assets-136b5c5e.js'),true?["./assets-136b5c5e.js","./VPanelGrids-24560813.js","./VIconButton.vue_vue_type_script_setup_true_lang-a89f6c88.js","./VIcon.vue_vue_type_script_setup_true_lang-41c110ef.js","./rpc-358fc96c.js","./VSectionBlock-ba31730a.js","./VIconTitle.vue_vue_type_script_setup_true_lang-d3431291.js","./VSectionBlock-52804693.css","./VTextInput.vue_vue_type_script_setup_true_lang-5373326c.js","./fuse.esm-c317b696.js"]:void 0,import.meta.url);
14403
- const __pages_import_14__ = () => __vitePreload(() => import('./__eyedropper-8e124d1e.js'),true?["./__eyedropper-8e124d1e.js","./VPanelGrids-24560813.js"]:void 0,import.meta.url);
16408
+ const __pages_import_0__ = () => __vitePreload(() => import('./timeline-5fa02442.js'),true?["./timeline-5fa02442.js","./StateFields.vue_vue_type_script_setup_true_lang-a78e5cb0.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./index-07396aec.js","./VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js","./VPanelGrids-dc69b639.js","./_commonjsHelpers-65004790.js","./splitpanes.es-dd27b7fe.js","./timeline-b315b2e0.css"]:void 0,import.meta.url);
16409
+ const __pages_import_1__ = () => __vitePreload(() => import('./settings-c390240d.js'),true?["./settings-c390240d.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./_commonjsHelpers-65004790.js","./VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js","./VTextInput.vue_vue_type_script_setup_true_lang-c7c2878d.js","./VIconTitle.vue_vue_type_script_setup_true_lang-53c720d3.js","./settings-3815e37a.css"]:void 0,import.meta.url);
16410
+ const __pages_import_2__ = () => __vitePreload(() => import('./routes-ab38a14f.js'),true?["./routes-ab38a14f.js","./VPanelGrids-dc69b639.js","./StateFields.vue_vue_type_script_setup_true_lang-a78e5cb0.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./index-07396aec.js","./VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js","./splitpanes.es-dd27b7fe.js"]:void 0,import.meta.url);
16411
+ const __pages_import_3__ = () => __vitePreload(() => import('./pinia-55c3fcd8.js'),true?["./pinia-55c3fcd8.js","./StateFields.vue_vue_type_script_setup_true_lang-a78e5cb0.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./index-07396aec.js","./VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js","./splitpanes.es-dd27b7fe.js"]:void 0,import.meta.url);
16412
+ const __pages_import_4__ = () => __vitePreload(() => import('./pages-72e88bdb.js'),true?["./pages-72e88bdb.js","./VSectionBlock-57ec7b68.js","./VIconTitle.vue_vue_type_script_setup_true_lang-53c720d3.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./VSectionBlock-52804693.css","./VTextInput.vue_vue_type_script_setup_true_lang-c7c2878d.js"]:void 0,import.meta.url);
16413
+ const __pages_import_5__ = () => __vitePreload(() => import('./overview-95247458.js'),true?["./overview-95247458.js","./VPanelGrids-dc69b639.js","./rpc-cf3bd0fc.js","./index-07396aec.js"]:void 0,import.meta.url);
16414
+ const __pages_import_6__ = () => __vitePreload(() => import('./npm-62fb6b03.js'),true?["./npm-62fb6b03.js","./VSectionBlock-57ec7b68.js","./VIconTitle.vue_vue_type_script_setup_true_lang-53c720d3.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./VSectionBlock-52804693.css","./VTextInput.vue_vue_type_script_setup_true_lang-c7c2878d.js","./_commonjsHelpers-65004790.js","./rpc-cf3bd0fc.js","./npm-125f4259.css"]:void 0,import.meta.url);
16415
+ const __pages_import_7__ = () => __vitePreload(() => import('./inspect-2b7bf157.js'),true?["./inspect-2b7bf157.js","./IframeView.vue_vue_type_script_setup_true_lang-e86027e5.js","./rpc-cf3bd0fc.js"]:void 0,import.meta.url);
16416
+ const __pages_import_9__ = () => __vitePreload(() => import('./graph-d61217d6.js'),true?["./graph-d61217d6.js","./fuse.esm-c317b696.js","./rpc-cf3bd0fc.js"]:void 0,import.meta.url);
16417
+ const __pages_import_10__ = () => __vitePreload(() => import('./documentations-a41234ba.js'),true?["./documentations-a41234ba.js","./IframeView.vue_vue_type_script_setup_true_lang-e86027e5.js","./rpc-cf3bd0fc.js"]:void 0,import.meta.url);
16418
+ const __pages_import_11__ = () => __vitePreload(() => import('./components-433e30b5.js'),true?["./components-433e30b5.js","./VPanelGrids-dc69b639.js","./StateFields.vue_vue_type_script_setup_true_lang-a78e5cb0.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./index-07396aec.js","./VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js","./splitpanes.es-dd27b7fe.js"]:void 0,import.meta.url);
16419
+ const __pages_import_12__ = () => __vitePreload(() => import('./component-docs-e06030af.js'),true?["./component-docs-e06030af.js","./VTextInput.vue_vue_type_script_setup_true_lang-c7c2878d.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./splitpanes.es-dd27b7fe.js","./fuse.esm-c317b696.js","./rpc-cf3bd0fc.js","./component-docs-351d62d5.css"]:void 0,import.meta.url);
16420
+ const __pages_import_13__ = () => __vitePreload(() => import('./assets-2b8518ac.js'),true?["./assets-2b8518ac.js","./VPanelGrids-dc69b639.js","./VIconButton.vue_vue_type_script_setup_true_lang-fe1578eb.js","./VIcon.vue_vue_type_script_setup_true_lang-82a30fea.js","./rpc-cf3bd0fc.js","./VSectionBlock-57ec7b68.js","./VIconTitle.vue_vue_type_script_setup_true_lang-53c720d3.js","./VSectionBlock-52804693.css","./VTextInput.vue_vue_type_script_setup_true_lang-c7c2878d.js","./fuse.esm-c317b696.js"]:void 0,import.meta.url);
16421
+ const __pages_import_14__ = () => __vitePreload(() => import('./__eyedropper-c3a23916.js'),true?["./__eyedropper-c3a23916.js","./VPanelGrids-dc69b639.js"]:void 0,import.meta.url);
14404
16422
 
14405
16423
  const routes$1 = [{"name":"timeline","path":"/timeline","component":__pages_import_0__,"props":true},{"name":"settings","path":"/settings","component":__pages_import_1__,"props":true},{"name":"routes","path":"/routes","component":__pages_import_2__,"props":true},{"name":"pinia","path":"/pinia","component":__pages_import_3__,"props":true},{"name":"pages","path":"/pages","component":__pages_import_4__,"props":true},{"name":"overview","path":"/overview","component":__pages_import_5__,"props":true},{"name":"npm","path":"/npm","component":__pages_import_6__,"props":true},{"name":"inspect","path":"/inspect","component":__pages_import_7__,"props":true},{"name":"index","path":"/","component":_sfc_main$a,"props":true},{"name":"graph","path":"/graph","component":__pages_import_9__,"props":true},{"name":"documentations","path":"/documentations","component":__pages_import_10__,"props":true},{"name":"components","path":"/components","component":__pages_import_11__,"props":true},{"name":"component-docs","path":"/component-docs","component":__pages_import_12__,"props":true},{"name":"assets","path":"/assets","component":__pages_import_13__,"props":true},{"name":"__eyedropper","path":"/__eyedropper","component":__pages_import_14__,"props":true}];
14406
16424
  /* Injected with object hook! */
@@ -14453,6 +16471,253 @@ function useDevtoolsClient() {
14453
16471
 
14454
16472
  /* Injected with object hook! */
14455
16473
 
16474
+ const devToolsSettings = useLocalStorage("__vue-devtools-settings__", {
16475
+ scale: 1,
16476
+ hiddenTabs: [],
16477
+ hiddenTabGroups: []
16478
+ }, { mergeDefaults: true });
16479
+ const devToolsSettingsRefs = toRefs(devToolsSettings);
16480
+ function useDevToolsSettings() {
16481
+ return devToolsSettingsRefs;
16482
+ }
16483
+
16484
+ /* Injected with object hook! */
16485
+
16486
+ const builtinTabs = [
16487
+ {
16488
+ path: "overview",
16489
+ title: "Overview",
16490
+ icon: "i-carbon-information",
16491
+ group: "app"
16492
+ },
16493
+ {
16494
+ path: "pages",
16495
+ title: "Pages",
16496
+ icon: "i-carbon-tree-view-alt",
16497
+ group: "app"
16498
+ },
16499
+ {
16500
+ path: "components",
16501
+ title: "Components",
16502
+ icon: "i-carbon-assembly-cluster",
16503
+ group: "app"
16504
+ },
16505
+ {
16506
+ path: "assets",
16507
+ title: "Assets",
16508
+ icon: "i-carbon-image-copy",
16509
+ group: "app"
16510
+ },
16511
+ {
16512
+ path: "routes",
16513
+ title: "Routes",
16514
+ icon: "mdi:location-path",
16515
+ group: "modules"
16516
+ },
16517
+ {
16518
+ path: "pinia",
16519
+ title: "Pinia",
16520
+ icon: "icon-park-outline:pineapple",
16521
+ group: "modules"
16522
+ },
16523
+ {
16524
+ path: "timeline",
16525
+ title: "Timeline",
16526
+ icon: "i-icon-park-outline:vertical-timeline",
16527
+ group: "app"
16528
+ },
16529
+ {
16530
+ title: "EyeDropper",
16531
+ icon: "i-mdi:eyedropper",
16532
+ group: "advanced",
16533
+ event: (client, router) => {
16534
+ router.replace("/__eyedropper");
16535
+ client.panel?.toggleViewMode("xs");
16536
+ }
16537
+ },
16538
+ {
16539
+ path: "component-docs",
16540
+ title: "Component docs",
16541
+ icon: "i-carbon-document-preliminary",
16542
+ group: "advanced"
16543
+ },
16544
+ {
16545
+ path: "npm",
16546
+ title: "Search packages",
16547
+ icon: "i-teenyicons:npm-outline",
16548
+ group: "advanced"
16549
+ },
16550
+ {
16551
+ path: "graph",
16552
+ title: "Graph",
16553
+ icon: "i-carbon-network-4",
16554
+ group: "advanced"
16555
+ },
16556
+ {
16557
+ path: "inspect",
16558
+ title: "Inspect",
16559
+ icon: "i-carbon-ibm-watson-discovery",
16560
+ group: "advanced"
16561
+ },
16562
+ {
16563
+ path: "documentations",
16564
+ title: "Documentations",
16565
+ icon: "i-carbon-document",
16566
+ group: "advanced"
16567
+ }
16568
+ ];
16569
+ const DEFAULT_TAB_GROUP = "ungrouped";
16570
+ const settings = useDevToolsSettings();
16571
+ function getInitialTabs() {
16572
+ return builtinTabs.map((tab) => ({
16573
+ ...tab,
16574
+ disabled: settings.hiddenTabs.value.includes(tab.title),
16575
+ group: tab.group ?? DEFAULT_TAB_GROUP,
16576
+ groupIndex: -1
16577
+ }));
16578
+ }
16579
+ const allTabs = useLocalStorage(TABS_STORAGE_KEY, getInitialTabs(), {
16580
+ shallow: true
16581
+ });
16582
+ computed(() => allTabs.value.filter((item) => !item.disabled));
16583
+ const groupsData = useLocalStorage(TABS_GROUP_STORAGE_KEY, initGroupData(allTabs.value));
16584
+ const allGroupedTabs = computed(() => getGroupedTab(allTabs.value));
16585
+ const enabledGroupedTabs = computed(() => getGroupedTab(allTabs.value, true));
16586
+ watch([settings.hiddenTabs, settings.hiddenTabGroups], ([tabsNames, groupNames]) => {
16587
+ const allTabsNames = [...tabsNames, ...groupNames.flatMap((name) => groupsData.value[name].data.map((item) => item.name))];
16588
+ updateDisabledTabs(allTabsNames, groupNames);
16589
+ });
16590
+ function useGroupedTabStore(enabledOnly) {
16591
+ return enabledOnly ? enabledGroupedTabs : allGroupedTabs;
16592
+ }
16593
+ function getGroupedTab(dataSource, enabledOnly = false) {
16594
+ const groupsKeys = Object.keys(groupsData.value);
16595
+ if (groupsKeys.includes(DEFAULT_TAB_GROUP)) {
16596
+ groupsKeys.splice(groupsKeys.indexOf(DEFAULT_TAB_GROUP), 1);
16597
+ groupsKeys.push(DEFAULT_TAB_GROUP);
16598
+ }
16599
+ const groups = groupsKeys.reduce((groups2, key) => {
16600
+ groups2[key] = {
16601
+ show: groupsData.value[key].show,
16602
+ tabs: []
16603
+ };
16604
+ return groups2;
16605
+ }, {});
16606
+ if (!groupsKeys.includes(DEFAULT_TAB_GROUP)) {
16607
+ groups[DEFAULT_TAB_GROUP] = {
16608
+ show: true,
16609
+ tabs: []
16610
+ };
16611
+ }
16612
+ for (const tab of dataSource) {
16613
+ if (enabledOnly && tab.disabled)
16614
+ continue;
16615
+ const group = tab.group;
16616
+ if (!groups[group])
16617
+ console.warn(`Unknown tab group: ${group}`);
16618
+ else
16619
+ groups[group].tabs.push(tab);
16620
+ }
16621
+ return Object.entries(groups);
16622
+ }
16623
+ function initGroupData(tabs) {
16624
+ return tabs.reduce((groups, tab) => {
16625
+ const group = tab.group;
16626
+ if (!groups[group]) {
16627
+ groups[group] = {
16628
+ show: true,
16629
+ data: []
16630
+ };
16631
+ }
16632
+ groups[group].data.push({
16633
+ name: tab.title,
16634
+ index: tab.groupIndex
16635
+ });
16636
+ return groups;
16637
+ }, {});
16638
+ }
16639
+ function updateDisabledTabs(disabledTabNames, disabledGroups = []) {
16640
+ const currentTabs = allTabs.value.slice();
16641
+ currentTabs.forEach((tab) => {
16642
+ tab.disabled = disabledTabNames.includes(tab.title);
16643
+ });
16644
+ allTabs.value = currentTabs;
16645
+ for (const group of Object.values(groupsData.value))
16646
+ group.show = true;
16647
+ if (disabledGroups.length) {
16648
+ for (const group of disabledGroups)
16649
+ groupsData.value[group].show = false;
16650
+ }
16651
+ }
16652
+ function updateTabsPosition(groupName, newTabs) {
16653
+ const currentTabs = allTabs.value.slice();
16654
+ currentTabs.forEach((tab) => {
16655
+ const newTab = newTabs.find((item) => item.title === tab.title);
16656
+ if (newTab) {
16657
+ const index = newTabs.indexOf(newTab);
16658
+ tab.groupIndex = index;
16659
+ if (tab.group !== groupName)
16660
+ tab.group = groupName;
16661
+ }
16662
+ });
16663
+ allTabs.value = currentTabs;
16664
+ groupsData.value[groupName].data = newTabs.map((item) => ({
16665
+ name: item.title,
16666
+ index: item.groupIndex
16667
+ }));
16668
+ }
16669
+ function getSortedTabs(sourceTabs) {
16670
+ const tabs = sourceTabs.slice();
16671
+ tabs.sort((a, b) => a.groupIndex - b.groupIndex);
16672
+ return tabs;
16673
+ }
16674
+ function ungroupAllTabs() {
16675
+ const tabs = allTabs.value.slice();
16676
+ const names = [];
16677
+ tabs.forEach((tab) => {
16678
+ tab.group = DEFAULT_TAB_GROUP;
16679
+ tab.groupIndex = -1;
16680
+ names.push(tab.title);
16681
+ });
16682
+ allTabs.value = tabs;
16683
+ groupsData.value[DEFAULT_TAB_GROUP].data = names.map((name) => ({ name, index: -1 }));
16684
+ }
16685
+ function resetAllTabs() {
16686
+ allTabs.value = getInitialTabs();
16687
+ groupsData.value = initGroupData(allTabs.value);
16688
+ }
16689
+ function shouldHideTabGroup(groupName, tabLength) {
16690
+ return groupName === DEFAULT_TAB_GROUP && tabLength === 0;
16691
+ }
16692
+ function removeTabGroup(group) {
16693
+ const tabs = allTabs.value;
16694
+ const tabNames = [];
16695
+ tabs.forEach((item) => {
16696
+ if (item.group === group) {
16697
+ item.group = DEFAULT_TAB_GROUP;
16698
+ item.groupIndex = -1;
16699
+ tabNames.push(item.title);
16700
+ }
16701
+ });
16702
+ allTabs.value = tabs;
16703
+ Reflect.deleteProperty(groupsData.value, group);
16704
+ groupsData.value[DEFAULT_TAB_GROUP].data.push(...tabNames.map((name) => ({ name, index: -1 })));
16705
+ }
16706
+ function checkGroupExist(groupName) {
16707
+ return groupsData.value[groupName];
16708
+ }
16709
+ function createGroup(groupName) {
16710
+ groupsData.value[groupName] = {
16711
+ show: true,
16712
+ data: []
16713
+ };
16714
+ }
16715
+ function getMappedBuiltinTabs(tab) {
16716
+ return builtinTabs.find((item) => item.title === tab.title);
16717
+ }
16718
+
16719
+ /* Injected with object hook! */
16720
+
14456
16721
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
14457
16722
  __name: "SideNavItem",
14458
16723
  props: {
@@ -14461,6 +16726,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
14461
16726
  setup(__props) {
14462
16727
  const client = useDevtoolsClient();
14463
16728
  const router = useRouter();
16729
+ function handleClick(tab) {
16730
+ const builtinTab = getMappedBuiltinTabs(tab);
16731
+ if (builtinTab)
16732
+ builtinTab.event?.(client.value, router);
16733
+ }
14464
16734
  return (_ctx, _cache) => {
14465
16735
  const _component_TabIcon = _sfc_main$9;
14466
16736
  const _component_VTooltip = resolveComponent("VTooltip");
@@ -14483,7 +16753,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
14483
16753
  p1: "",
14484
16754
  "text-secondary": "",
14485
16755
  "exact-active-class": "!text-primary bg-active",
14486
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.tab.event?.(unref(client), unref(router)))
16756
+ onClick: _cache[0] || (_cache[0] = () => handleClick(_ctx.tab))
14487
16757
  }, {
14488
16758
  default: withCtx(() => [
14489
16759
  createVNode(_component_TabIcon, {
@@ -16276,136 +18546,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
16276
18546
 
16277
18547
  /* Injected with object hook! */
16278
18548
 
16279
- const devToolsSettings = useLocalStorage("__vue-devtools-settings__", {
16280
- scale: 1,
16281
- hiddenTabs: [],
16282
- hiddenTabCategories: []
16283
- }, { mergeDefaults: true });
16284
- const devToolsSettingsRefs = toRefs(devToolsSettings);
16285
- function useDevToolsSettings() {
16286
- return devToolsSettingsRefs;
16287
- }
16288
-
16289
- /* Injected with object hook! */
16290
-
16291
- const builtinTabs = [
16292
- {
16293
- path: "overview",
16294
- title: "Overview",
16295
- icon: "i-carbon-information"
16296
- },
16297
- {
16298
- path: "pages",
16299
- title: "Pages",
16300
- icon: "i-carbon-tree-view-alt"
16301
- },
16302
- {
16303
- path: "components",
16304
- title: "Components",
16305
- icon: "i-carbon-assembly-cluster"
16306
- },
16307
- {
16308
- path: "assets",
16309
- title: "Assets",
16310
- icon: "i-carbon-image-copy"
16311
- },
16312
- {
16313
- path: "routes",
16314
- title: "Routes",
16315
- icon: "mdi:location-path",
16316
- category: "modules"
16317
- },
16318
- {
16319
- path: "pinia",
16320
- title: "Pinia",
16321
- icon: "icon-park-outline:pineapple",
16322
- category: "modules"
16323
- },
16324
- {
16325
- path: "timeline",
16326
- title: "Timeline",
16327
- icon: "i-icon-park-outline:vertical-timeline"
16328
- },
16329
- // migrate to inspector button
16330
- // {
16331
- // title: 'Inspector',
16332
- // icon: 'i-carbon-select-window',
16333
- // category: 'advanced',
16334
- // event: (client, router) => {
16335
- // router.replace('/__inspecting')
16336
- // client?.inspector?.enable()
16337
- // },
16338
- // },
16339
- {
16340
- title: "EyeDropper",
16341
- icon: "i-mdi:eyedropper",
16342
- category: "advanced",
16343
- event: (client, router) => {
16344
- router.replace("/__eyedropper");
16345
- client.panel?.toggleViewMode("xs");
16346
- }
16347
- },
16348
- {
16349
- path: "component-docs",
16350
- title: "Component docs",
16351
- icon: "i-carbon-document-preliminary",
16352
- category: "advanced"
16353
- },
16354
- {
16355
- path: "npm",
16356
- title: "Search packages",
16357
- icon: "i-teenyicons:npm-outline",
16358
- category: "advanced"
16359
- },
16360
- {
16361
- path: "graph",
16362
- title: "Graph",
16363
- icon: "i-carbon-network-4",
16364
- category: "advanced"
16365
- },
16366
- {
16367
- path: "inspect",
16368
- title: "Inspect",
16369
- icon: "i-carbon-ibm-watson-discovery",
16370
- category: "advanced"
16371
- },
16372
- {
16373
- path: "documentations",
16374
- title: "Documentations",
16375
- icon: "i-carbon-document",
16376
- category: "advanced"
16377
- }
16378
- ];
16379
- function useTabs() {
16380
- const settings = useDevToolsSettings();
16381
- return {
16382
- enabled: computed(() => {
16383
- return builtinTabs.filter((tab) => !settings.hiddenTabs.value.includes(tab.title ?? ""));
16384
- }),
16385
- all: computed(() => builtinTabs)
16386
- };
16387
- }
16388
- function useCategorizedTabs(enabledOnly = true) {
16389
- const _tabs = useTabs();
16390
- const tabs = enabledOnly ? _tabs.enabled : _tabs.all;
16391
- const settings = useDevToolsSettings();
16392
- return computed(() => {
16393
- const categories = {
16394
- app: [],
16395
- modules: [],
16396
- advanced: []
16397
- };
16398
- for (const tab of tabs.value) {
16399
- const category = tab?.category || "app";
16400
- if (enabledOnly && settings.hiddenTabCategories.value.includes(category))
16401
- continue;
16402
- if (!categories[category])
16403
- console.warn(`Unknown tab category: ${category}`);
16404
- else
16405
- categories[category].push(tab);
16406
- }
16407
- return Object.entries(categories);
16408
- });
18549
+ function useGroupedTabs(enabledOnly = true) {
18550
+ return useGroupedTabStore(enabledOnly);
16409
18551
  }
16410
18552
 
16411
18553
  /* Injected with object hook! */
@@ -16465,7 +18607,7 @@ const _hoisted_9 = /* @__PURE__ */ createBaseVNode("div", {
16465
18607
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
16466
18608
  __name: "SideNav",
16467
18609
  setup(__props) {
16468
- const categories = useCategorizedTabs();
18610
+ const groupedTabs = useGroupedTabs();
16469
18611
  return (_ctx, _cache) => {
16470
18612
  const _component_DockingPanel = _sfc_main$3;
16471
18613
  const _component_VDropdown = resolveComponent("VDropdown");
@@ -16489,11 +18631,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
16489
18631
  _hoisted_4
16490
18632
  ]),
16491
18633
  createBaseVNode("div", _hoisted_5, [
16492
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(categories), ([name, tabs], idx) => {
18634
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(groupedTabs), ([name, { tabs, show }], idx) => {
16493
18635
  return openBlock(), createElementBlock(Fragment, { key: name }, [
16494
- tabs.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
18636
+ tabs.length && show ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
16495
18637
  idx ? (openBlock(), createElementBlock("div", _hoisted_6)) : createCommentVNode("", true),
16496
- (openBlock(true), createElementBlock(Fragment, null, renderList(tabs, (tab) => {
18638
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSortedTabs)(tabs), (tab) => {
16497
18639
  return openBlock(), createBlock(_component_SideNavItem, {
16498
18640
  key: tab.path,
16499
18641
  tab
@@ -17314,4 +19456,4 @@ app.mount("#app");
17314
19456
 
17315
19457
  /* Injected with object hook! */
17316
19458
 
17317
- export { toggleRouteRecordMatcher as $, timelineLayer as A, activeTimelineEvents as B, activeTimelineEventIndex as C, toggleTimelineEventIndex as D, timelineEventDetails as E, Fragment as F, activeLayerId as G, toggleTimelineLayer as H, useVModel as I, vModelSelect as J, isRef as K, vModelCheckbox as L, withKeys as M, useCategorizedTabs as N, isInPopup as O, createTextVNode as P, useDevToolsSettings as Q, useFrameState as R, _sfc_main$4 as S, _sfc_main$d as T, _sfc_main$7 as U, _sfc_main$9 as V, router$1 as W, routeRecordMatcherState as X, activeRouteRecordMatcherState as Y, activeRouteRecordIndex as Z, __unplugin_components_7 as _, popScopeId as a, __unplugin_components_1 as a0, ref as a1, computed as a2, piniaStoresCategory as a3, toRaw as a4, piniaState as a5, piniaGetters as a6, withModifiers as a7, onMounted as a8, currentRoute as a9, onClickOutside as aA, Transition as aB, useStyleTag as aC, computedAsync as aD, useTimeAgo as aE, onKeyDown as aF, _export_sfc as aG, vModelDynamic as aH, __vitePreload as aI, useRouter as aJ, useDevtoolsClient as aK, routes as aa, vueVersion as ab, __unplugin_components_0 as ac, useEventListener as ad, hookApi as ae, useScrollLock as af, watch as ag, useInfiniteScroll as ah, useStorage as ai, vModelText as aj, useDark as ak, Teleport as al, useColorMode as am, reactive as an, useElementBounding as ao, watchEffect as ap, onUnmounted as aq, shallowRef as ar, onVueInstanceUpdate as as, instance as at, useCopy as au, nanoid as av, vShow as aw, getCurrentInstance as ax, h as ay, useElementSize as az, resolveDirective as b, createBlock as c, withDirectives as d, createElementBlock as e, renderSlot as f, createCommentVNode as g, withCtx as h, renderList as i, resolveDynamicComponent as j, mergeProps as k, normalizeStyle as l, markRaw as m, nextTick as n, openBlock as o, pushScopeId as p, normalizeClass as q, resolveComponent as r, shallowReactive as s, toHandlers as t, createVNode as u, defineComponent as v, withScopeId as w, createBaseVNode as x, toDisplayString as y, unref as z };
19459
+ export { cloneVNode as $, timelineLayer as A, activeTimelineEvents as B, activeTimelineEventIndex as C, toggleTimelineEventIndex as D, timelineEventDetails as E, Fragment as F, activeLayerId as G, toggleTimelineLayer as H, BaseTransition as I, BaseTransitionPropsValidators as J, Comment as K, EffectScope as L, KeepAlive as M, Suspense as N, Text as O, Transition as P, TransitionGroup as Q, ReactiveEffect as R, Static as S, Teleport as T, assertNumber as U, VueElement as V, callWithAsyncErrorHandling as W, callWithErrorHandling as X, camelize as Y, capitalize as Z, __unplugin_components_7 as _, popScopeId as a, ref as a$, compatUtils as a0, computed as a1, createApp as a2, createHydrationRenderer as a3, createPropsRestProxy as a4, createRenderer as a5, createSSRApp as a6, createSlots as a7, createStaticVNode as a8, createTextVNode as a9, isReactive as aA, isReadonly as aB, isRef as aC, isRuntimeOnly as aD, isShallow as aE, isVNode as aF, mergeDefaults as aG, mergeModels as aH, normalizeProps as aI, onActivated as aJ, onBeforeMount as aK, onBeforeUnmount as aL, onBeforeUpdate as aM, onDeactivated as aN, onErrorCaptured as aO, onMounted as aP, onRenderTracked as aQ, onRenderTriggered as aR, onScopeDispose as aS, onServerPrefetch as aT, onUnmounted as aU, onUpdated as aV, provide as aW, proxyRefs as aX, queuePostFlushCb as aY, reactive as aZ, readonly as a_, customRef as aa, defineAsyncComponent as ab, defineCustomElement as ac, defineEmits as ad, defineExpose as ae, defineModel as af, defineOptions as ag, defineProps as ah, defineSSRCustomElement as ai, defineSlots as aj, devtools as ak, effect as al, effectScope as am, getCurrentInstance as an, getCurrentScope as ao, getTransitionRawChildren as ap, guardReactiveProps as aq, h as ar, handleError as as, hasInjectionContext as at, hydrate as au, initCustomFormatter as av, initDirectivesForSSR as aw, inject as ax, isMemoSame as ay, isProxy as az, resolveDirective as b, _sfc_main$9 as b$, registerRuntimeCompiler as b0, render$1 as b1, resolveFilter as b2, resolveTransitionHooks as b3, setBlockTracking as b4, setDevtoolsHook as b5, setTransitionHooks as b6, shallowReadonly as b7, shallowRef as b8, ssrContextKey as b9, watchPostEffect as bA, watchSyncEffect as bB, withAsyncContext as bC, withDefaults as bD, withKeys as bE, withMemo as bF, withModifiers as bG, useVModel as bH, getSortedTabs as bI, updateTabsPosition as bJ, _export_sfc as bK, _sfc_main$d as bL, _sfc_main$5 as bM, useToggle as bN, shouldHideTabGroup as bO, DEFAULT_TAB_GROUP as bP, useGroupedTabs as bQ, ungroupAllTabs as bR, resetAllTabs as bS, removeTabGroup as bT, checkGroupExist as bU, createGroup as bV, isInPopup as bW, useDevToolsSettings as bX, useFrameState as bY, _sfc_main$4 as bZ, _sfc_main$7 as b_, ssrUtils as ba, stop as bb, toHandlerKey as bc, toRaw as bd, toRef$1 as be, toRefs$1 as bf, toValue$2 as bg, transformVNodeArgs as bh, triggerRef as bi, useAttrs as bj, useCssModule as bk, useCssVars as bl, useModel as bm, useSSRContext as bn, useSlots as bo, useTransitionState as bp, vModelCheckbox as bq, vModelDynamic as br, vModelRadio as bs, vModelSelect as bt, vModelText as bu, vShow as bv, version as bw, warn as bx, watch as by, watchEffect as bz, createBlock as c, router$1 as c0, routeRecordMatcherState as c1, activeRouteRecordMatcherState as c2, activeRouteRecordIndex as c3, toggleRouteRecordMatcher as c4, __unplugin_components_1 as c5, piniaStoresCategory as c6, piniaState as c7, piniaGetters as c8, currentRoute as c9, routes as ca, vueVersion as cb, __unplugin_components_0 as cc, useEventListener as cd, hookApi as ce, useScrollLock as cf, useInfiniteScroll as cg, useStorage as ch, useDark as ci, useColorMode as cj, useElementBounding as ck, onVueInstanceUpdate as cl, instance as cm, useCopy as cn, nanoid as co, useElementSize as cp, onClickOutside as cq, useStyleTag as cr, computedAsync as cs, useTimeAgo as ct, onKeyDown as cu, __vitePreload as cv, useRouter as cw, useDevtoolsClient as cx, withDirectives as d, createElementBlock as e, renderSlot as f, createCommentVNode as g, withCtx as h, renderList as i, resolveDynamicComponent as j, mergeProps as k, normalizeStyle as l, markRaw as m, nextTick as n, openBlock as o, pushScopeId as p, normalizeClass as q, resolveComponent as r, shallowReactive as s, toHandlers as t, createVNode as u, defineComponent as v, withScopeId as w, createBaseVNode as x, toDisplayString as y, unref as z };