@vitejs/devtools 0.0.0-alpha.18 → 0.0.0-alpha.19
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.
- package/dist/{cli-commands-zRt72Hns.js → cli-commands-DRuCf81B.js} +2 -2
- package/dist/cli-commands.js +2 -2
- package/dist/cli.js +2 -2
- package/dist/client/inject.js +85 -2
- package/dist/client/standalone/assets/index-BdwMlRiX.css +1 -0
- package/dist/client/standalone/assets/index-Brys-GL2.js +7 -0
- package/dist/client/standalone/index.html +2 -2
- package/dist/client/webcomponents.d.ts +10 -10
- package/dist/client/webcomponents.js +1234 -2
- package/dist/{webcomponents-DheoZ3qc.js → docks-j8O6WvbD.js} +639 -1812
- package/dist/{index-Dt5HYF60.d.ts → index-Wdefo_Ne.d.ts} +113 -10
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1 -1
- package/dist/{plugins-LceePuMU.js → plugins-l6D28NJB.js} +198 -38
- package/package.json +13 -11
- package/dist/client/standalone/assets/index-SrlfcErH.js +0 -1
- package/dist/client/standalone/assets/index-t2O2s5Eq.css +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createEventEmitter } from "@vitejs/devtools-kit/utils/events";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@vue+shared@3.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@vue+shared@3.5.25/node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
4
4
|
/**
|
|
5
|
-
* @vue/shared v3.5.
|
|
5
|
+
* @vue/shared v3.5.25
|
|
6
6
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
7
7
|
* @license MIT
|
|
8
8
|
**/
|
|
@@ -157,9 +157,9 @@ const stringifySymbol = (v, i = "") => {
|
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
//#endregion
|
|
160
|
-
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.
|
|
160
|
+
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.25/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
161
161
|
/**
|
|
162
|
-
* @vue/reactivity v3.5.
|
|
162
|
+
* @vue/reactivity v3.5.25
|
|
163
163
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
164
164
|
* @license MIT
|
|
165
165
|
**/
|
|
@@ -710,17 +710,21 @@ function shallowReadArray(arr) {
|
|
|
710
710
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
711
711
|
return arr;
|
|
712
712
|
}
|
|
713
|
+
function toWrapped(target, item) {
|
|
714
|
+
if (isReadonly(target)) return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
715
|
+
return toReactive(item);
|
|
716
|
+
}
|
|
713
717
|
const arrayInstrumentations = {
|
|
714
718
|
__proto__: null,
|
|
715
719
|
[Symbol.iterator]() {
|
|
716
|
-
return iterator(this, Symbol.iterator,
|
|
720
|
+
return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
|
|
717
721
|
},
|
|
718
722
|
concat(...args) {
|
|
719
723
|
return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
|
|
720
724
|
},
|
|
721
725
|
entries() {
|
|
722
726
|
return iterator(this, "entries", (value) => {
|
|
723
|
-
value[1] =
|
|
727
|
+
value[1] = toWrapped(this, value[1]);
|
|
724
728
|
return value;
|
|
725
729
|
});
|
|
726
730
|
},
|
|
@@ -728,16 +732,16 @@ const arrayInstrumentations = {
|
|
|
728
732
|
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
729
733
|
},
|
|
730
734
|
filter(fn, thisArg) {
|
|
731
|
-
return apply(this, "filter", fn, thisArg, (v) => v.map(
|
|
735
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
|
|
732
736
|
},
|
|
733
737
|
find(fn, thisArg) {
|
|
734
|
-
return apply(this, "find", fn, thisArg,
|
|
738
|
+
return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
|
|
735
739
|
},
|
|
736
740
|
findIndex(fn, thisArg) {
|
|
737
741
|
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
738
742
|
},
|
|
739
743
|
findLast(fn, thisArg) {
|
|
740
|
-
return apply(this, "findLast", fn, thisArg,
|
|
744
|
+
return apply(this, "findLast", fn, thisArg, (item) => toWrapped(this, item), arguments);
|
|
741
745
|
},
|
|
742
746
|
findLastIndex(fn, thisArg) {
|
|
743
747
|
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
@@ -794,7 +798,7 @@ const arrayInstrumentations = {
|
|
|
794
798
|
return noTracking(this, "unshift", args);
|
|
795
799
|
},
|
|
796
800
|
values() {
|
|
797
|
-
return iterator(this, "values",
|
|
801
|
+
return iterator(this, "values", (item) => toWrapped(this, item));
|
|
798
802
|
}
|
|
799
803
|
};
|
|
800
804
|
function iterator(self$1, method, wrapValue) {
|
|
@@ -822,7 +826,7 @@ function apply(self$1, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
822
826
|
let wrappedFn = fn;
|
|
823
827
|
if (arr !== self$1) {
|
|
824
828
|
if (needsWrap) wrappedFn = function(item, index) {
|
|
825
|
-
return fn.call(this,
|
|
829
|
+
return fn.call(this, toWrapped(self$1, item), index, self$1);
|
|
826
830
|
};
|
|
827
831
|
else if (fn.length > 2) wrappedFn = function(item, index) {
|
|
828
832
|
return fn.call(this, item, index, self$1);
|
|
@@ -836,7 +840,7 @@ function reduce(self$1, method, fn, args) {
|
|
|
836
840
|
let wrappedFn = fn;
|
|
837
841
|
if (arr !== self$1) {
|
|
838
842
|
if (!isShallow(self$1)) wrappedFn = function(acc, item, index) {
|
|
839
|
-
return fn.call(this, acc,
|
|
843
|
+
return fn.call(this, acc, toWrapped(self$1, item), index, self$1);
|
|
840
844
|
};
|
|
841
845
|
else if (fn.length > 3) wrappedFn = function(acc, item, index) {
|
|
842
846
|
return fn.call(this, acc, item, index, self$1);
|
|
@@ -909,13 +913,14 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
909
913
|
}
|
|
910
914
|
set(target, key, value, receiver) {
|
|
911
915
|
let oldValue = target[key];
|
|
916
|
+
const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
|
|
912
917
|
if (!this._isShallow) {
|
|
913
918
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
914
919
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
915
920
|
oldValue = toRaw(oldValue);
|
|
916
921
|
value = toRaw(value);
|
|
917
922
|
}
|
|
918
|
-
if (!
|
|
923
|
+
if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) if (isOldValueReadonly) {
|
|
919
924
|
if (!!(process.env.NODE_ENV !== "production")) warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
920
925
|
return true;
|
|
921
926
|
} else {
|
|
@@ -923,7 +928,7 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
923
928
|
return true;
|
|
924
929
|
}
|
|
925
930
|
}
|
|
926
|
-
const hadKey =
|
|
931
|
+
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn$1(target, key);
|
|
927
932
|
const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
|
|
928
933
|
if (target === toRaw(receiver)) {
|
|
929
934
|
if (!hadKey) trigger(target, "add", key, value);
|
|
@@ -1282,7 +1287,7 @@ var CustomRefImpl = class {
|
|
|
1282
1287
|
function customRef(factory) {
|
|
1283
1288
|
return new CustomRefImpl(factory);
|
|
1284
1289
|
}
|
|
1285
|
-
function toRefs(object) {
|
|
1290
|
+
function toRefs$1(object) {
|
|
1286
1291
|
if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
1287
1292
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1288
1293
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1295,16 +1300,31 @@ var ObjectRefImpl = class {
|
|
|
1295
1300
|
this._defaultValue = _defaultValue;
|
|
1296
1301
|
this["__v_isRef"] = true;
|
|
1297
1302
|
this._value = void 0;
|
|
1303
|
+
this._raw = toRaw(_object);
|
|
1304
|
+
let shallow = true;
|
|
1305
|
+
let obj = _object;
|
|
1306
|
+
if (!isArray(_object) || !isIntegerKey(String(_key))) do
|
|
1307
|
+
shallow = !isProxy(obj) || isShallow(obj);
|
|
1308
|
+
while (shallow && (obj = obj["__v_raw"]));
|
|
1309
|
+
this._shallow = shallow;
|
|
1298
1310
|
}
|
|
1299
1311
|
get value() {
|
|
1300
|
-
|
|
1312
|
+
let val = this._object[this._key];
|
|
1313
|
+
if (this._shallow) val = unref(val);
|
|
1301
1314
|
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1302
1315
|
}
|
|
1303
1316
|
set value(newVal) {
|
|
1317
|
+
if (this._shallow && isRef(this._raw[this._key])) {
|
|
1318
|
+
const nestedRef = this._object[this._key];
|
|
1319
|
+
if (isRef(nestedRef)) {
|
|
1320
|
+
nestedRef.value = newVal;
|
|
1321
|
+
return;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1304
1324
|
this._object[this._key] = newVal;
|
|
1305
1325
|
}
|
|
1306
1326
|
get dep() {
|
|
1307
|
-
return getDepFromReactive(
|
|
1327
|
+
return getDepFromReactive(this._raw, this._key);
|
|
1308
1328
|
}
|
|
1309
1329
|
};
|
|
1310
1330
|
var GetterRefImpl = class {
|
|
@@ -1325,8 +1345,7 @@ function toRef$1(source, key, defaultValue) {
|
|
|
1325
1345
|
else return ref(source);
|
|
1326
1346
|
}
|
|
1327
1347
|
function propertyToRef(source, key, defaultValue) {
|
|
1328
|
-
|
|
1329
|
-
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1348
|
+
return new ObjectRefImpl(source, key, defaultValue);
|
|
1330
1349
|
}
|
|
1331
1350
|
var ComputedRefImpl = class {
|
|
1332
1351
|
constructor(fn, setter, isSSR) {
|
|
@@ -1555,9 +1574,9 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
1555
1574
|
}
|
|
1556
1575
|
|
|
1557
1576
|
//#endregion
|
|
1558
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.
|
|
1577
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.25/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
|
1559
1578
|
/**
|
|
1560
|
-
* @vue/runtime-core v3.5.
|
|
1579
|
+
* @vue/runtime-core v3.5.25
|
|
1561
1580
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1562
1581
|
* @license MIT
|
|
1563
1582
|
**/
|
|
@@ -2394,13 +2413,12 @@ const publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create
|
|
|
2394
2413
|
$watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
|
|
2395
2414
|
});
|
|
2396
2415
|
const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
2397
|
-
const hasSetupBinding = (state
|
|
2416
|
+
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$1(state, key);
|
|
2398
2417
|
const PublicInstanceProxyHandlers = {
|
|
2399
2418
|
get({ _: instance }, key) {
|
|
2400
2419
|
if (key === "__v_skip") return true;
|
|
2401
2420
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
2402
2421
|
if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") return true;
|
|
2403
|
-
let normalizedProps;
|
|
2404
2422
|
if (key[0] !== "$") {
|
|
2405
2423
|
const n = accessCache[key];
|
|
2406
2424
|
if (n !== void 0) switch (n) {
|
|
@@ -2415,7 +2433,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2415
2433
|
} else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn$1(data, key)) {
|
|
2416
2434
|
accessCache[key] = 2;
|
|
2417
2435
|
return data[key];
|
|
2418
|
-
} else if (
|
|
2436
|
+
} else if (hasOwn$1(props, key)) {
|
|
2419
2437
|
accessCache[key] = 3;
|
|
2420
2438
|
return props[key];
|
|
2421
2439
|
} else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) {
|
|
@@ -2467,9 +2485,9 @@ const PublicInstanceProxyHandlers = {
|
|
|
2467
2485
|
else ctx[key] = value;
|
|
2468
2486
|
return true;
|
|
2469
2487
|
},
|
|
2470
|
-
has({ _: { data, setupState, accessCache, ctx, appContext,
|
|
2471
|
-
let
|
|
2472
|
-
return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn$1(data, key) || hasSetupBinding(setupState, key) ||
|
|
2488
|
+
has({ _: { data, setupState, accessCache, ctx, appContext, props, type } }, key) {
|
|
2489
|
+
let cssModules;
|
|
2490
|
+
return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || hasOwn$1(props, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
2473
2491
|
},
|
|
2474
2492
|
defineProperty(target, key, descriptor) {
|
|
2475
2493
|
if (descriptor.get != null) target._.accessCache[key] = 0;
|
|
@@ -2909,9 +2927,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
2909
2927
|
}
|
|
2910
2928
|
let currentApp = null;
|
|
2911
2929
|
function provide(key, value) {
|
|
2912
|
-
if (
|
|
2913
|
-
if (
|
|
2914
|
-
}
|
|
2930
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2931
|
+
if (!currentInstance || currentInstance.isMounted) warn$1(`provide() can only be used inside setup().`);
|
|
2932
|
+
}
|
|
2933
|
+
if (currentInstance) {
|
|
2915
2934
|
let provides = currentInstance.provides;
|
|
2916
2935
|
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
2917
2936
|
if (parentProvides === provides) provides = currentInstance.provides = Object.create(parentProvides);
|
|
@@ -2930,246 +2949,583 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
2930
2949
|
function hasInjectionContext() {
|
|
2931
2950
|
return !!(getCurrentInstance() || currentApp);
|
|
2932
2951
|
}
|
|
2933
|
-
const
|
|
2934
|
-
const
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
2940
|
-
setFullProps(instance, rawProps, props, attrs);
|
|
2941
|
-
for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
|
|
2942
|
-
if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
|
|
2943
|
-
if (isStateful) instance.props = isSSR ? props : shallowReactive(props);
|
|
2944
|
-
else if (!instance.type.props) instance.props = attrs;
|
|
2945
|
-
else instance.props = props;
|
|
2946
|
-
instance.attrs = attrs;
|
|
2947
|
-
}
|
|
2948
|
-
function isInHmrContext(instance) {
|
|
2949
|
-
while (instance) {
|
|
2950
|
-
if (instance.type.__hmrId) return true;
|
|
2951
|
-
instance = instance.parent;
|
|
2952
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
2953
|
+
const useSSRContext = () => {
|
|
2954
|
+
{
|
|
2955
|
+
const ctx = inject(ssrContextKey);
|
|
2956
|
+
if (!ctx) process.env.NODE_ENV !== "production" && warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
|
|
2957
|
+
return ctx;
|
|
2952
2958
|
}
|
|
2959
|
+
};
|
|
2960
|
+
function watchEffect(effect$1, options) {
|
|
2961
|
+
return doWatch(effect$1, null, options);
|
|
2953
2962
|
}
|
|
2954
|
-
function
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
}
|
|
2963
|
+
function watch(source, cb, options) {
|
|
2964
|
+
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
|
|
2965
|
+
return doWatch(source, cb, options);
|
|
2966
|
+
}
|
|
2967
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
2968
|
+
const { immediate, deep, flush, once } = options;
|
|
2969
|
+
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
2970
|
+
if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
2971
|
+
if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
2972
|
+
if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
2973
|
+
}
|
|
2974
|
+
const baseWatchOptions = extend({}, options);
|
|
2975
|
+
if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
2976
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
2977
|
+
let ssrCleanup;
|
|
2978
|
+
if (isInSSRComponentSetup) {
|
|
2979
|
+
if (flush === "sync") {
|
|
2980
|
+
const ctx = useSSRContext();
|
|
2981
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
2982
|
+
} else if (!runsImmediately) {
|
|
2983
|
+
const watchStopHandle = () => {};
|
|
2984
|
+
watchStopHandle.stop = NOOP;
|
|
2985
|
+
watchStopHandle.resume = NOOP;
|
|
2986
|
+
watchStopHandle.pause = NOOP;
|
|
2987
|
+
return watchStopHandle;
|
|
2980
2988
|
}
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2989
|
+
}
|
|
2990
|
+
const instance = currentInstance;
|
|
2991
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
2992
|
+
let isPre = false;
|
|
2993
|
+
if (flush === "post") baseWatchOptions.scheduler = (job) => {
|
|
2994
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
2995
|
+
};
|
|
2996
|
+
else if (flush !== "sync") {
|
|
2997
|
+
isPre = true;
|
|
2998
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
2999
|
+
if (isFirstRun) job();
|
|
3000
|
+
else queueJob(job);
|
|
3001
|
+
};
|
|
3002
|
+
}
|
|
3003
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
3004
|
+
if (cb) job.flags |= 4;
|
|
3005
|
+
if (isPre) {
|
|
3006
|
+
job.flags |= 2;
|
|
3007
|
+
if (instance) {
|
|
3008
|
+
job.id = instance.uid;
|
|
3009
|
+
job.i = instance;
|
|
2991
3010
|
}
|
|
2992
3011
|
}
|
|
3012
|
+
};
|
|
3013
|
+
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
3014
|
+
if (isInSSRComponentSetup) {
|
|
3015
|
+
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
3016
|
+
else if (runsImmediately) watchHandle();
|
|
2993
3017
|
}
|
|
2994
|
-
|
|
2995
|
-
if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
|
|
3018
|
+
return watchHandle;
|
|
2996
3019
|
}
|
|
2997
|
-
function
|
|
2998
|
-
const
|
|
2999
|
-
|
|
3000
|
-
let
|
|
3001
|
-
if (
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3020
|
+
function instanceWatch(source, value, options) {
|
|
3021
|
+
const publicThis = this.proxy;
|
|
3022
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
3023
|
+
let cb;
|
|
3024
|
+
if (isFunction(value)) cb = value;
|
|
3025
|
+
else {
|
|
3026
|
+
cb = value.handler;
|
|
3027
|
+
options = value;
|
|
3028
|
+
}
|
|
3029
|
+
const reset = setCurrentInstance(this);
|
|
3030
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3031
|
+
reset();
|
|
3032
|
+
return res;
|
|
3033
|
+
}
|
|
3034
|
+
function createPathGetter(ctx, path) {
|
|
3035
|
+
const segments = path.split(".");
|
|
3036
|
+
return () => {
|
|
3037
|
+
let cur = ctx;
|
|
3038
|
+
for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
|
|
3039
|
+
return cur;
|
|
3040
|
+
};
|
|
3041
|
+
}
|
|
3042
|
+
const getModelModifiers = (props, modelName) => {
|
|
3043
|
+
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize$1(modelName)}Modifiers`] || props[`${hyphenate$1(modelName)}Modifiers`];
|
|
3044
|
+
};
|
|
3045
|
+
function emit(instance, event, ...rawArgs) {
|
|
3046
|
+
if (instance.isUnmounted) return;
|
|
3047
|
+
const props = instance.vnode.props || EMPTY_OBJ;
|
|
3048
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3049
|
+
const { emitsOptions, propsOptions: [propsOptions] } = instance;
|
|
3050
|
+
if (emitsOptions) if (!(event in emitsOptions) && true) {
|
|
3051
|
+
if (!propsOptions || !(toHandlerKey(camelize$1(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize$1(event))}" prop.`);
|
|
3052
|
+
} else {
|
|
3053
|
+
const validator = emitsOptions[event];
|
|
3054
|
+
if (isFunction(validator)) {
|
|
3055
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
3011
3056
|
}
|
|
3012
3057
|
}
|
|
3013
3058
|
}
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
}
|
|
3059
|
+
let args = rawArgs;
|
|
3060
|
+
const isModelListener$1 = event.startsWith("update:");
|
|
3061
|
+
const modifiers = isModelListener$1 && getModelModifiers(props, event.slice(7));
|
|
3062
|
+
if (modifiers) {
|
|
3063
|
+
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
3064
|
+
if (modifiers.number) args = rawArgs.map(looseToNumber);
|
|
3021
3065
|
}
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
}
|
|
3038
|
-
} else value = defaultValue;
|
|
3039
|
-
if (instance.ce) instance.ce._setProp(key, value);
|
|
3040
|
-
}
|
|
3041
|
-
if (opt[0]) {
|
|
3042
|
-
if (isAbsent && !hasDefault) value = false;
|
|
3043
|
-
else if (opt[1] && (value === "" || value === hyphenate$1(key))) value = true;
|
|
3044
|
-
}
|
|
3066
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
|
|
3067
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3068
|
+
const lowerCaseEvent = event.toLowerCase();
|
|
3069
|
+
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1(event)}" instead of "${event}".`);
|
|
3070
|
+
}
|
|
3071
|
+
let handlerName;
|
|
3072
|
+
let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))];
|
|
3073
|
+
if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate$1(event))];
|
|
3074
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
|
|
3075
|
+
const onceHandler = props[handlerName + `Once`];
|
|
3076
|
+
if (onceHandler) {
|
|
3077
|
+
if (!instance.emitted) instance.emitted = {};
|
|
3078
|
+
else if (instance.emitted[handlerName]) return;
|
|
3079
|
+
instance.emitted[handlerName] = true;
|
|
3080
|
+
callWithAsyncErrorHandling(onceHandler, instance, 6, args);
|
|
3045
3081
|
}
|
|
3046
|
-
return value;
|
|
3047
3082
|
}
|
|
3048
|
-
const
|
|
3049
|
-
function
|
|
3050
|
-
const cache = __VUE_OPTIONS_API__ && asMixin ?
|
|
3083
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
3084
|
+
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
3085
|
+
const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
3051
3086
|
const cached = cache.get(comp);
|
|
3052
|
-
if (cached) return cached;
|
|
3053
|
-
const raw = comp.
|
|
3054
|
-
|
|
3055
|
-
const needCastKeys = [];
|
|
3087
|
+
if (cached !== void 0) return cached;
|
|
3088
|
+
const raw = comp.emits;
|
|
3089
|
+
let normalized = {};
|
|
3056
3090
|
let hasExtends = false;
|
|
3057
3091
|
if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
|
|
3058
|
-
const
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3092
|
+
const extendEmits = (raw2) => {
|
|
3093
|
+
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
3094
|
+
if (normalizedFromExtend) {
|
|
3095
|
+
hasExtends = true;
|
|
3096
|
+
extend(normalized, normalizedFromExtend);
|
|
3097
|
+
}
|
|
3063
3098
|
};
|
|
3064
|
-
if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(
|
|
3065
|
-
if (comp.extends)
|
|
3066
|
-
if (comp.mixins) comp.mixins.forEach(
|
|
3067
|
-
}
|
|
3068
|
-
if (!raw && !hasExtends) {
|
|
3069
|
-
if (isObject$1(comp)) cache.set(comp, EMPTY_ARR);
|
|
3070
|
-
return EMPTY_ARR;
|
|
3099
|
+
if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendEmits);
|
|
3100
|
+
if (comp.extends) extendEmits(comp.extends);
|
|
3101
|
+
if (comp.mixins) comp.mixins.forEach(extendEmits);
|
|
3071
3102
|
}
|
|
3072
|
-
if (
|
|
3073
|
-
if (
|
|
3074
|
-
|
|
3075
|
-
if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
|
|
3103
|
+
if (!raw && !hasExtends) {
|
|
3104
|
+
if (isObject$1(comp)) cache.set(comp, null);
|
|
3105
|
+
return null;
|
|
3076
3106
|
}
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3107
|
+
if (isArray(raw)) raw.forEach((key) => normalized[key] = null);
|
|
3108
|
+
else extend(normalized, raw);
|
|
3109
|
+
if (isObject$1(comp)) cache.set(comp, normalized);
|
|
3110
|
+
return normalized;
|
|
3111
|
+
}
|
|
3112
|
+
function isEmitListener(options, key) {
|
|
3113
|
+
if (!options || !isOn(key)) return false;
|
|
3114
|
+
key = key.slice(2).replace(/Once$/, "");
|
|
3115
|
+
return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate$1(key)) || hasOwn$1(options, key);
|
|
3116
|
+
}
|
|
3117
|
+
let accessedAttrs = false;
|
|
3118
|
+
function markAttrsAccessed() {
|
|
3119
|
+
accessedAttrs = true;
|
|
3120
|
+
}
|
|
3121
|
+
function renderComponentRoot(instance) {
|
|
3122
|
+
const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit: emit$2, render: render$1, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
|
|
3123
|
+
const prev = setCurrentRenderingInstance(instance);
|
|
3124
|
+
let result;
|
|
3125
|
+
let fallthroughAttrs;
|
|
3126
|
+
if (!!(process.env.NODE_ENV !== "production")) accessedAttrs = false;
|
|
3127
|
+
try {
|
|
3128
|
+
if (vnode.shapeFlag & 4) {
|
|
3129
|
+
const proxyToUse = withProxy || proxy;
|
|
3130
|
+
const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { get(target, key, receiver) {
|
|
3131
|
+
warn$1(`Property '${String(key)}' was accessed via 'this'. Avoid using 'this' in templates.`);
|
|
3132
|
+
return Reflect.get(target, key, receiver);
|
|
3133
|
+
} }) : proxyToUse;
|
|
3134
|
+
result = normalizeVNode(render$1.call(thisProxy, proxyToUse, renderCache, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, setupState, data, ctx));
|
|
3135
|
+
fallthroughAttrs = attrs;
|
|
3136
|
+
} else {
|
|
3137
|
+
const render2 = Component;
|
|
3138
|
+
if (!!(process.env.NODE_ENV !== "production") && attrs === props) markAttrsAccessed();
|
|
3139
|
+
result = normalizeVNode(render2.length > 1 ? render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, !!(process.env.NODE_ENV !== "production") ? {
|
|
3140
|
+
get attrs() {
|
|
3141
|
+
markAttrsAccessed();
|
|
3142
|
+
return shallowReadonly(attrs);
|
|
3143
|
+
},
|
|
3144
|
+
slots,
|
|
3145
|
+
emit: emit$2
|
|
3146
|
+
} : {
|
|
3147
|
+
attrs,
|
|
3148
|
+
slots,
|
|
3149
|
+
emit: emit$2
|
|
3150
|
+
}) : render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, null));
|
|
3151
|
+
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
3152
|
+
}
|
|
3153
|
+
} catch (err) {
|
|
3154
|
+
blockStack.length = 0;
|
|
3155
|
+
handleError(err, instance, 1);
|
|
3156
|
+
result = createVNode(Comment);
|
|
3157
|
+
}
|
|
3158
|
+
let root = result;
|
|
3159
|
+
let setRoot = void 0;
|
|
3160
|
+
if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) [root, setRoot] = getChildRoot(result);
|
|
3161
|
+
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
3162
|
+
const keys = Object.keys(fallthroughAttrs);
|
|
3163
|
+
const { shapeFlag } = root;
|
|
3164
|
+
if (keys.length) {
|
|
3165
|
+
if (shapeFlag & 7) {
|
|
3166
|
+
if (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
|
|
3167
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
3168
|
+
} else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
|
|
3169
|
+
const allAttrs = Object.keys(attrs);
|
|
3170
|
+
const eventAttrs = [];
|
|
3171
|
+
const extraAttrs = [];
|
|
3172
|
+
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
3173
|
+
const key = allAttrs[i];
|
|
3174
|
+
if (isOn(key)) {
|
|
3175
|
+
if (!isModelListener(key)) eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
3176
|
+
} else extraAttrs.push(key);
|
|
3094
3177
|
}
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
prop[1] = shouldCastTrue;
|
|
3098
|
-
if (shouldCast || hasOwn$1(prop, "default")) needCastKeys.push(normalizedKey);
|
|
3178
|
+
if (extraAttrs.length) warn$1(`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`);
|
|
3179
|
+
if (eventAttrs.length) warn$1(`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
|
|
3099
3180
|
}
|
|
3100
3181
|
}
|
|
3101
3182
|
}
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
if (
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
}
|
|
3111
|
-
function getType(ctor) {
|
|
3112
|
-
if (ctor === null) return "null";
|
|
3113
|
-
if (typeof ctor === "function") return ctor.name || "";
|
|
3114
|
-
else if (typeof ctor === "object") return ctor.constructor && ctor.constructor.name || "";
|
|
3115
|
-
return "";
|
|
3116
|
-
}
|
|
3117
|
-
function validateProps(rawProps, props, instance) {
|
|
3118
|
-
const resolvedValues = toRaw(props);
|
|
3119
|
-
const options = instance.propsOptions[0];
|
|
3120
|
-
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize$1(key));
|
|
3121
|
-
for (const key in options) {
|
|
3122
|
-
let opt = options[key];
|
|
3123
|
-
if (opt == null) continue;
|
|
3124
|
-
validateProp(key, resolvedValues[key], opt, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, !camelizePropsKey.includes(key));
|
|
3183
|
+
if (vnode.dirs) {
|
|
3184
|
+
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Runtime directive used on component with non-element root node. The directives will not function as intended.`);
|
|
3185
|
+
root = cloneVNode(root, null, false, true);
|
|
3186
|
+
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3187
|
+
}
|
|
3188
|
+
if (vnode.transition) {
|
|
3189
|
+
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Component inside <Transition> renders non-element root node that cannot be animated.`);
|
|
3190
|
+
setTransitionHooks(root, vnode.transition);
|
|
3125
3191
|
}
|
|
3192
|
+
if (!!(process.env.NODE_ENV !== "production") && setRoot) setRoot(root);
|
|
3193
|
+
else result = root;
|
|
3194
|
+
setCurrentRenderingInstance(prev);
|
|
3195
|
+
return result;
|
|
3126
3196
|
}
|
|
3127
|
-
|
|
3128
|
-
const
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3197
|
+
const getChildRoot = (vnode) => {
|
|
3198
|
+
const rawChildren = vnode.children;
|
|
3199
|
+
const dynamicChildren = vnode.dynamicChildren;
|
|
3200
|
+
const childRoot = filterSingleRoot(rawChildren, false);
|
|
3201
|
+
if (!childRoot) return [vnode, void 0];
|
|
3202
|
+
else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) return getChildRoot(childRoot);
|
|
3203
|
+
const index = rawChildren.indexOf(childRoot);
|
|
3204
|
+
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
3205
|
+
const setRoot = (updatedRoot) => {
|
|
3206
|
+
rawChildren[index] = updatedRoot;
|
|
3207
|
+
if (dynamicChildren) {
|
|
3208
|
+
if (dynamicIndex > -1) dynamicChildren[dynamicIndex] = updatedRoot;
|
|
3209
|
+
else if (updatedRoot.patchFlag > 0) vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
3210
|
+
}
|
|
3211
|
+
};
|
|
3212
|
+
return [normalizeVNode(childRoot), setRoot];
|
|
3213
|
+
};
|
|
3214
|
+
function filterSingleRoot(children, recurse = true) {
|
|
3215
|
+
let singleRoot;
|
|
3216
|
+
for (let i = 0; i < children.length; i++) {
|
|
3217
|
+
const child = children[i];
|
|
3218
|
+
if (isVNode(child)) {
|
|
3219
|
+
if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
|
|
3220
|
+
else {
|
|
3221
|
+
singleRoot = child;
|
|
3222
|
+
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
3223
|
+
}
|
|
3224
|
+
} else return;
|
|
3132
3225
|
}
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3226
|
+
return singleRoot;
|
|
3227
|
+
}
|
|
3228
|
+
const getFunctionalFallthrough = (attrs) => {
|
|
3229
|
+
let res;
|
|
3230
|
+
for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
|
|
3231
|
+
return res;
|
|
3232
|
+
};
|
|
3233
|
+
const filterModelListeners = (attrs, props) => {
|
|
3234
|
+
const res = {};
|
|
3235
|
+
for (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];
|
|
3236
|
+
return res;
|
|
3237
|
+
};
|
|
3238
|
+
const isElementRoot = (vnode) => {
|
|
3239
|
+
return vnode.shapeFlag & 7 || vnode.type === Comment;
|
|
3240
|
+
};
|
|
3241
|
+
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
3242
|
+
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
3243
|
+
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
3244
|
+
const emits = component.emitsOptions;
|
|
3245
|
+
if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) return true;
|
|
3246
|
+
if (nextVNode.dirs || nextVNode.transition) return true;
|
|
3247
|
+
if (optimized && patchFlag >= 0) {
|
|
3248
|
+
if (patchFlag & 1024) return true;
|
|
3249
|
+
if (patchFlag & 16) {
|
|
3250
|
+
if (!prevProps) return !!nextProps;
|
|
3251
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3252
|
+
} else if (patchFlag & 8) {
|
|
3253
|
+
const dynamicProps = nextVNode.dynamicProps;
|
|
3254
|
+
for (let i = 0; i < dynamicProps.length; i++) {
|
|
3255
|
+
const key = dynamicProps[i];
|
|
3256
|
+
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) return true;
|
|
3257
|
+
}
|
|
3142
3258
|
}
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
return;
|
|
3259
|
+
} else {
|
|
3260
|
+
if (prevChildren || nextChildren) {
|
|
3261
|
+
if (!nextChildren || !nextChildren.$stable) return true;
|
|
3146
3262
|
}
|
|
3263
|
+
if (prevProps === nextProps) return false;
|
|
3264
|
+
if (!prevProps) return !!nextProps;
|
|
3265
|
+
if (!nextProps) return true;
|
|
3266
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3147
3267
|
}
|
|
3148
|
-
|
|
3268
|
+
return false;
|
|
3149
3269
|
}
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
if (!valid && t === "object") valid = value instanceof type;
|
|
3159
|
-
} else if (expectedType === "Object") valid = isObject$1(value);
|
|
3160
|
-
else if (expectedType === "Array") valid = isArray(value);
|
|
3161
|
-
else valid = value instanceof type;
|
|
3162
|
-
return {
|
|
3163
|
-
valid,
|
|
3164
|
-
expectedType
|
|
3165
|
-
};
|
|
3270
|
+
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
3271
|
+
const nextKeys = Object.keys(nextProps);
|
|
3272
|
+
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
3273
|
+
for (let i = 0; i < nextKeys.length; i++) {
|
|
3274
|
+
const key = nextKeys[i];
|
|
3275
|
+
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) return true;
|
|
3276
|
+
}
|
|
3277
|
+
return false;
|
|
3166
3278
|
}
|
|
3167
|
-
function
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3279
|
+
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3280
|
+
while (parent) {
|
|
3281
|
+
const root = parent.subTree;
|
|
3282
|
+
if (root.suspense && root.suspense.activeBranch === vnode) root.el = vnode.el;
|
|
3283
|
+
if (root === vnode) {
|
|
3284
|
+
(vnode = parent.vnode).el = el;
|
|
3285
|
+
parent = parent.parent;
|
|
3286
|
+
} else break;
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
const internalObjectProto = {};
|
|
3290
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
3291
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
3292
|
+
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
3293
|
+
const props = {};
|
|
3294
|
+
const attrs = createInternalObject();
|
|
3295
|
+
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
3296
|
+
setFullProps(instance, rawProps, props, attrs);
|
|
3297
|
+
for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
|
|
3298
|
+
if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
|
|
3299
|
+
if (isStateful) instance.props = isSSR ? props : shallowReactive(props);
|
|
3300
|
+
else if (!instance.type.props) instance.props = attrs;
|
|
3301
|
+
else instance.props = props;
|
|
3302
|
+
instance.attrs = attrs;
|
|
3303
|
+
}
|
|
3304
|
+
function isInHmrContext(instance) {
|
|
3305
|
+
while (instance) {
|
|
3306
|
+
if (instance.type.__hmrId) return true;
|
|
3307
|
+
instance = instance.parent;
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
3311
|
+
const { props, attrs, vnode: { patchFlag } } = instance;
|
|
3312
|
+
const rawCurrentProps = toRaw(props);
|
|
3313
|
+
const [options] = instance.propsOptions;
|
|
3314
|
+
let hasAttrsChanged = false;
|
|
3315
|
+
if (!(!!(process.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)) {
|
|
3316
|
+
if (patchFlag & 8) {
|
|
3317
|
+
const propsToUpdate = instance.vnode.dynamicProps;
|
|
3318
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3319
|
+
let key = propsToUpdate[i];
|
|
3320
|
+
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
3321
|
+
const value = rawProps[key];
|
|
3322
|
+
if (options) if (hasOwn$1(attrs, key)) {
|
|
3323
|
+
if (value !== attrs[key]) {
|
|
3324
|
+
attrs[key] = value;
|
|
3325
|
+
hasAttrsChanged = true;
|
|
3326
|
+
}
|
|
3327
|
+
} else {
|
|
3328
|
+
const camelizedKey = camelize$1(key);
|
|
3329
|
+
props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
|
|
3330
|
+
}
|
|
3331
|
+
else if (value !== attrs[key]) {
|
|
3332
|
+
attrs[key] = value;
|
|
3333
|
+
hasAttrsChanged = true;
|
|
3334
|
+
}
|
|
3335
|
+
}
|
|
3336
|
+
}
|
|
3337
|
+
} else {
|
|
3338
|
+
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
3339
|
+
let kebabKey;
|
|
3340
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn$1(rawProps, key) && ((kebabKey = hyphenate$1(key)) === key || !hasOwn$1(rawProps, kebabKey))) if (options) {
|
|
3341
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
|
|
3342
|
+
} else delete props[key];
|
|
3343
|
+
if (attrs !== rawCurrentProps) {
|
|
3344
|
+
for (const key in attrs) if (!rawProps || !hasOwn$1(rawProps, key) && true) {
|
|
3345
|
+
delete attrs[key];
|
|
3346
|
+
hasAttrsChanged = true;
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
if (hasAttrsChanged) trigger(instance.attrs, "set", "");
|
|
3351
|
+
if (!!(process.env.NODE_ENV !== "production")) validateProps(rawProps || {}, props, instance);
|
|
3352
|
+
}
|
|
3353
|
+
function setFullProps(instance, rawProps, props, attrs) {
|
|
3354
|
+
const [options, needCastKeys] = instance.propsOptions;
|
|
3355
|
+
let hasAttrsChanged = false;
|
|
3356
|
+
let rawCastValues;
|
|
3357
|
+
if (rawProps) for (let key in rawProps) {
|
|
3358
|
+
if (isReservedProp(key)) continue;
|
|
3359
|
+
const value = rawProps[key];
|
|
3360
|
+
let camelKey;
|
|
3361
|
+
if (options && hasOwn$1(options, camelKey = camelize$1(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
3362
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
3363
|
+
else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
3364
|
+
if (!(key in attrs) || value !== attrs[key]) {
|
|
3365
|
+
attrs[key] = value;
|
|
3366
|
+
hasAttrsChanged = true;
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
if (needCastKeys) {
|
|
3371
|
+
const rawCurrentProps = toRaw(props);
|
|
3372
|
+
const castValues = rawCastValues || EMPTY_OBJ;
|
|
3373
|
+
for (let i = 0; i < needCastKeys.length; i++) {
|
|
3374
|
+
const key = needCastKeys[i];
|
|
3375
|
+
props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key));
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
return hasAttrsChanged;
|
|
3379
|
+
}
|
|
3380
|
+
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
3381
|
+
const opt = options[key];
|
|
3382
|
+
if (opt != null) {
|
|
3383
|
+
const hasDefault = hasOwn$1(opt, "default");
|
|
3384
|
+
if (hasDefault && value === void 0) {
|
|
3385
|
+
const defaultValue = opt.default;
|
|
3386
|
+
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
|
|
3387
|
+
const { propsDefaults } = instance;
|
|
3388
|
+
if (key in propsDefaults) value = propsDefaults[key];
|
|
3389
|
+
else {
|
|
3390
|
+
const reset = setCurrentInstance(instance);
|
|
3391
|
+
value = propsDefaults[key] = defaultValue.call(null, props);
|
|
3392
|
+
reset();
|
|
3393
|
+
}
|
|
3394
|
+
} else value = defaultValue;
|
|
3395
|
+
if (instance.ce) instance.ce._setProp(key, value);
|
|
3396
|
+
}
|
|
3397
|
+
if (opt[0]) {
|
|
3398
|
+
if (isAbsent && !hasDefault) value = false;
|
|
3399
|
+
else if (opt[1] && (value === "" || value === hyphenate$1(key))) value = true;
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
return value;
|
|
3403
|
+
}
|
|
3404
|
+
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
3405
|
+
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
3406
|
+
const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
|
|
3407
|
+
const cached = cache.get(comp);
|
|
3408
|
+
if (cached) return cached;
|
|
3409
|
+
const raw = comp.props;
|
|
3410
|
+
const normalized = {};
|
|
3411
|
+
const needCastKeys = [];
|
|
3412
|
+
let hasExtends = false;
|
|
3413
|
+
if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
|
|
3414
|
+
const extendProps = (raw2) => {
|
|
3415
|
+
hasExtends = true;
|
|
3416
|
+
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
3417
|
+
extend(normalized, props);
|
|
3418
|
+
if (keys) needCastKeys.push(...keys);
|
|
3419
|
+
};
|
|
3420
|
+
if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendProps);
|
|
3421
|
+
if (comp.extends) extendProps(comp.extends);
|
|
3422
|
+
if (comp.mixins) comp.mixins.forEach(extendProps);
|
|
3423
|
+
}
|
|
3424
|
+
if (!raw && !hasExtends) {
|
|
3425
|
+
if (isObject$1(comp)) cache.set(comp, EMPTY_ARR);
|
|
3426
|
+
return EMPTY_ARR;
|
|
3427
|
+
}
|
|
3428
|
+
if (isArray(raw)) for (let i = 0; i < raw.length; i++) {
|
|
3429
|
+
if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
3430
|
+
const normalizedKey = camelize$1(raw[i]);
|
|
3431
|
+
if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
|
|
3432
|
+
}
|
|
3433
|
+
else if (raw) {
|
|
3434
|
+
if (!!(process.env.NODE_ENV !== "production") && !isObject$1(raw)) warn$1(`invalid props options`, raw);
|
|
3435
|
+
for (const key in raw) {
|
|
3436
|
+
const normalizedKey = camelize$1(key);
|
|
3437
|
+
if (validatePropName(normalizedKey)) {
|
|
3438
|
+
const opt = raw[key];
|
|
3439
|
+
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
3440
|
+
const propType = prop.type;
|
|
3441
|
+
let shouldCast = false;
|
|
3442
|
+
let shouldCastTrue = true;
|
|
3443
|
+
if (isArray(propType)) for (let index = 0; index < propType.length; ++index) {
|
|
3444
|
+
const type = propType[index];
|
|
3445
|
+
const typeName = isFunction(type) && type.name;
|
|
3446
|
+
if (typeName === "Boolean") {
|
|
3447
|
+
shouldCast = true;
|
|
3448
|
+
break;
|
|
3449
|
+
} else if (typeName === "String") shouldCastTrue = false;
|
|
3450
|
+
}
|
|
3451
|
+
else shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
3452
|
+
prop[0] = shouldCast;
|
|
3453
|
+
prop[1] = shouldCastTrue;
|
|
3454
|
+
if (shouldCast || hasOwn$1(prop, "default")) needCastKeys.push(normalizedKey);
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
const res = [normalized, needCastKeys];
|
|
3459
|
+
if (isObject$1(comp)) cache.set(comp, res);
|
|
3460
|
+
return res;
|
|
3461
|
+
}
|
|
3462
|
+
function validatePropName(key) {
|
|
3463
|
+
if (key[0] !== "$" && !isReservedProp(key)) return true;
|
|
3464
|
+
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
3465
|
+
return false;
|
|
3466
|
+
}
|
|
3467
|
+
function getType(ctor) {
|
|
3468
|
+
if (ctor === null) return "null";
|
|
3469
|
+
if (typeof ctor === "function") return ctor.name || "";
|
|
3470
|
+
else if (typeof ctor === "object") return ctor.constructor && ctor.constructor.name || "";
|
|
3471
|
+
return "";
|
|
3472
|
+
}
|
|
3473
|
+
function validateProps(rawProps, props, instance) {
|
|
3474
|
+
const resolvedValues = toRaw(props);
|
|
3475
|
+
const options = instance.propsOptions[0];
|
|
3476
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize$1(key));
|
|
3477
|
+
for (const key in options) {
|
|
3478
|
+
let opt = options[key];
|
|
3479
|
+
if (opt == null) continue;
|
|
3480
|
+
validateProp(key, resolvedValues[key], opt, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, !camelizePropsKey.includes(key));
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
function validateProp(name, value, prop, props, isAbsent) {
|
|
3484
|
+
const { type, required, validator, skipCheck } = prop;
|
|
3485
|
+
if (required && isAbsent) {
|
|
3486
|
+
warn$1("Missing required prop: \"" + name + "\"");
|
|
3487
|
+
return;
|
|
3488
|
+
}
|
|
3489
|
+
if (value == null && !required) return;
|
|
3490
|
+
if (type != null && type !== true && !skipCheck) {
|
|
3491
|
+
let isValid = false;
|
|
3492
|
+
const types = isArray(type) ? type : [type];
|
|
3493
|
+
const expectedTypes = [];
|
|
3494
|
+
for (let i = 0; i < types.length && !isValid; i++) {
|
|
3495
|
+
const { valid, expectedType } = assertType(value, types[i]);
|
|
3496
|
+
expectedTypes.push(expectedType || "");
|
|
3497
|
+
isValid = valid;
|
|
3498
|
+
}
|
|
3499
|
+
if (!isValid) {
|
|
3500
|
+
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
3501
|
+
return;
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
if (validator && !validator(value, props)) warn$1("Invalid prop: custom validator check failed for prop \"" + name + "\".");
|
|
3505
|
+
}
|
|
3506
|
+
const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
3507
|
+
function assertType(value, type) {
|
|
3508
|
+
let valid;
|
|
3509
|
+
const expectedType = getType(type);
|
|
3510
|
+
if (expectedType === "null") valid = value === null;
|
|
3511
|
+
else if (isSimpleType(expectedType)) {
|
|
3512
|
+
const t = typeof value;
|
|
3513
|
+
valid = t === expectedType.toLowerCase();
|
|
3514
|
+
if (!valid && t === "object") valid = value instanceof type;
|
|
3515
|
+
} else if (expectedType === "Object") valid = isObject$1(value);
|
|
3516
|
+
else if (expectedType === "Array") valid = isArray(value);
|
|
3517
|
+
else valid = value instanceof type;
|
|
3518
|
+
return {
|
|
3519
|
+
valid,
|
|
3520
|
+
expectedType
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3523
|
+
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
3524
|
+
if (expectedTypes.length === 0) return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
3525
|
+
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
3526
|
+
const expectedType = expectedTypes[0];
|
|
3527
|
+
const receivedType = toRawType(value);
|
|
3528
|
+
const expectedValue = styleValue(value, expectedType);
|
|
3173
3529
|
const receivedValue = styleValue(value, receivedType);
|
|
3174
3530
|
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) message += ` with value ${expectedValue}`;
|
|
3175
3531
|
message += `, got ${receivedType} `;
|
|
@@ -4039,371 +4395,34 @@ function getSequence(arr) {
|
|
|
4039
4395
|
result.push(i);
|
|
4040
4396
|
continue;
|
|
4041
4397
|
}
|
|
4042
|
-
u = 0;
|
|
4043
|
-
v = result.length - 1;
|
|
4044
|
-
while (u < v) {
|
|
4045
|
-
c = u + v >> 1;
|
|
4046
|
-
if (arr[result[c]] < arrI) u = c + 1;
|
|
4047
|
-
else v = c;
|
|
4048
|
-
}
|
|
4049
|
-
if (arrI < arr[result[u]]) {
|
|
4050
|
-
if (u > 0) p$1[i] = result[u - 1];
|
|
4051
|
-
result[u] = i;
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
}
|
|
4055
|
-
u = result.length;
|
|
4056
|
-
v = result[u - 1];
|
|
4057
|
-
while (u-- > 0) {
|
|
4058
|
-
result[u] = v;
|
|
4059
|
-
v = p$1[v];
|
|
4060
|
-
}
|
|
4061
|
-
return result;
|
|
4062
|
-
}
|
|
4063
|
-
function locateNonHydratedAsyncRoot(instance) {
|
|
4064
|
-
const subComponent = instance.subTree.component;
|
|
4065
|
-
if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
4066
|
-
else return locateNonHydratedAsyncRoot(subComponent);
|
|
4067
|
-
}
|
|
4068
|
-
function invalidateMount(hooks) {
|
|
4069
|
-
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
|
|
4070
|
-
}
|
|
4071
|
-
const ssrContextKey = Symbol.for("v-scx");
|
|
4072
|
-
const useSSRContext = () => {
|
|
4073
|
-
{
|
|
4074
|
-
const ctx = inject(ssrContextKey);
|
|
4075
|
-
if (!ctx) process.env.NODE_ENV !== "production" && warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
|
|
4076
|
-
return ctx;
|
|
4077
|
-
}
|
|
4078
|
-
};
|
|
4079
|
-
function watchEffect(effect$1, options) {
|
|
4080
|
-
return doWatch(effect$1, null, options);
|
|
4081
|
-
}
|
|
4082
|
-
function watch(source, cb, options) {
|
|
4083
|
-
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
|
|
4084
|
-
return doWatch(source, cb, options);
|
|
4085
|
-
}
|
|
4086
|
-
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
4087
|
-
const { immediate, deep, flush, once } = options;
|
|
4088
|
-
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
4089
|
-
if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
4090
|
-
if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
4091
|
-
if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
4092
|
-
}
|
|
4093
|
-
const baseWatchOptions = extend({}, options);
|
|
4094
|
-
if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
4095
|
-
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
4096
|
-
let ssrCleanup;
|
|
4097
|
-
if (isInSSRComponentSetup) {
|
|
4098
|
-
if (flush === "sync") {
|
|
4099
|
-
const ctx = useSSRContext();
|
|
4100
|
-
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
4101
|
-
} else if (!runsImmediately) {
|
|
4102
|
-
const watchStopHandle = () => {};
|
|
4103
|
-
watchStopHandle.stop = NOOP;
|
|
4104
|
-
watchStopHandle.resume = NOOP;
|
|
4105
|
-
watchStopHandle.pause = NOOP;
|
|
4106
|
-
return watchStopHandle;
|
|
4107
|
-
}
|
|
4108
|
-
}
|
|
4109
|
-
const instance = currentInstance;
|
|
4110
|
-
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
4111
|
-
let isPre = false;
|
|
4112
|
-
if (flush === "post") baseWatchOptions.scheduler = (job) => {
|
|
4113
|
-
queuePostRenderEffect(job, instance && instance.suspense);
|
|
4114
|
-
};
|
|
4115
|
-
else if (flush !== "sync") {
|
|
4116
|
-
isPre = true;
|
|
4117
|
-
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
4118
|
-
if (isFirstRun) job();
|
|
4119
|
-
else queueJob(job);
|
|
4120
|
-
};
|
|
4121
|
-
}
|
|
4122
|
-
baseWatchOptions.augmentJob = (job) => {
|
|
4123
|
-
if (cb) job.flags |= 4;
|
|
4124
|
-
if (isPre) {
|
|
4125
|
-
job.flags |= 2;
|
|
4126
|
-
if (instance) {
|
|
4127
|
-
job.id = instance.uid;
|
|
4128
|
-
job.i = instance;
|
|
4129
|
-
}
|
|
4130
|
-
}
|
|
4131
|
-
};
|
|
4132
|
-
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
4133
|
-
if (isInSSRComponentSetup) {
|
|
4134
|
-
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
4135
|
-
else if (runsImmediately) watchHandle();
|
|
4136
|
-
}
|
|
4137
|
-
return watchHandle;
|
|
4138
|
-
}
|
|
4139
|
-
function instanceWatch(source, value, options) {
|
|
4140
|
-
const publicThis = this.proxy;
|
|
4141
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
4142
|
-
let cb;
|
|
4143
|
-
if (isFunction(value)) cb = value;
|
|
4144
|
-
else {
|
|
4145
|
-
cb = value.handler;
|
|
4146
|
-
options = value;
|
|
4147
|
-
}
|
|
4148
|
-
const reset = setCurrentInstance(this);
|
|
4149
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4150
|
-
reset();
|
|
4151
|
-
return res;
|
|
4152
|
-
}
|
|
4153
|
-
function createPathGetter(ctx, path) {
|
|
4154
|
-
const segments = path.split(".");
|
|
4155
|
-
return () => {
|
|
4156
|
-
let cur = ctx;
|
|
4157
|
-
for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
|
|
4158
|
-
return cur;
|
|
4159
|
-
};
|
|
4160
|
-
}
|
|
4161
|
-
const getModelModifiers = (props, modelName) => {
|
|
4162
|
-
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize$1(modelName)}Modifiers`] || props[`${hyphenate$1(modelName)}Modifiers`];
|
|
4163
|
-
};
|
|
4164
|
-
function emit(instance, event, ...rawArgs) {
|
|
4165
|
-
if (instance.isUnmounted) return;
|
|
4166
|
-
const props = instance.vnode.props || EMPTY_OBJ;
|
|
4167
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4168
|
-
const { emitsOptions, propsOptions: [propsOptions] } = instance;
|
|
4169
|
-
if (emitsOptions) if (!(event in emitsOptions) && true) {
|
|
4170
|
-
if (!propsOptions || !(toHandlerKey(camelize$1(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize$1(event))}" prop.`);
|
|
4171
|
-
} else {
|
|
4172
|
-
const validator = emitsOptions[event];
|
|
4173
|
-
if (isFunction(validator)) {
|
|
4174
|
-
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
4175
|
-
}
|
|
4176
|
-
}
|
|
4177
|
-
}
|
|
4178
|
-
let args = rawArgs;
|
|
4179
|
-
const isModelListener$1 = event.startsWith("update:");
|
|
4180
|
-
const modifiers = isModelListener$1 && getModelModifiers(props, event.slice(7));
|
|
4181
|
-
if (modifiers) {
|
|
4182
|
-
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
4183
|
-
if (modifiers.number) args = rawArgs.map(looseToNumber);
|
|
4184
|
-
}
|
|
4185
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
|
|
4186
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4187
|
-
const lowerCaseEvent = event.toLowerCase();
|
|
4188
|
-
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1(event)}" instead of "${event}".`);
|
|
4189
|
-
}
|
|
4190
|
-
let handlerName;
|
|
4191
|
-
let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize$1(event))];
|
|
4192
|
-
if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate$1(event))];
|
|
4193
|
-
if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
|
|
4194
|
-
const onceHandler = props[handlerName + `Once`];
|
|
4195
|
-
if (onceHandler) {
|
|
4196
|
-
if (!instance.emitted) instance.emitted = {};
|
|
4197
|
-
else if (instance.emitted[handlerName]) return;
|
|
4198
|
-
instance.emitted[handlerName] = true;
|
|
4199
|
-
callWithAsyncErrorHandling(onceHandler, instance, 6, args);
|
|
4200
|
-
}
|
|
4201
|
-
}
|
|
4202
|
-
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
4203
|
-
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
4204
|
-
const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
4205
|
-
const cached = cache.get(comp);
|
|
4206
|
-
if (cached !== void 0) return cached;
|
|
4207
|
-
const raw = comp.emits;
|
|
4208
|
-
let normalized = {};
|
|
4209
|
-
let hasExtends = false;
|
|
4210
|
-
if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
|
|
4211
|
-
const extendEmits = (raw2) => {
|
|
4212
|
-
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
4213
|
-
if (normalizedFromExtend) {
|
|
4214
|
-
hasExtends = true;
|
|
4215
|
-
extend(normalized, normalizedFromExtend);
|
|
4216
|
-
}
|
|
4217
|
-
};
|
|
4218
|
-
if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendEmits);
|
|
4219
|
-
if (comp.extends) extendEmits(comp.extends);
|
|
4220
|
-
if (comp.mixins) comp.mixins.forEach(extendEmits);
|
|
4221
|
-
}
|
|
4222
|
-
if (!raw && !hasExtends) {
|
|
4223
|
-
if (isObject$1(comp)) cache.set(comp, null);
|
|
4224
|
-
return null;
|
|
4225
|
-
}
|
|
4226
|
-
if (isArray(raw)) raw.forEach((key) => normalized[key] = null);
|
|
4227
|
-
else extend(normalized, raw);
|
|
4228
|
-
if (isObject$1(comp)) cache.set(comp, normalized);
|
|
4229
|
-
return normalized;
|
|
4230
|
-
}
|
|
4231
|
-
function isEmitListener(options, key) {
|
|
4232
|
-
if (!options || !isOn(key)) return false;
|
|
4233
|
-
key = key.slice(2).replace(/Once$/, "");
|
|
4234
|
-
return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate$1(key)) || hasOwn$1(options, key);
|
|
4235
|
-
}
|
|
4236
|
-
let accessedAttrs = false;
|
|
4237
|
-
function markAttrsAccessed() {
|
|
4238
|
-
accessedAttrs = true;
|
|
4239
|
-
}
|
|
4240
|
-
function renderComponentRoot(instance) {
|
|
4241
|
-
const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit: emit$2, render: render$1, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
|
|
4242
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
4243
|
-
let result;
|
|
4244
|
-
let fallthroughAttrs;
|
|
4245
|
-
if (!!(process.env.NODE_ENV !== "production")) accessedAttrs = false;
|
|
4246
|
-
try {
|
|
4247
|
-
if (vnode.shapeFlag & 4) {
|
|
4248
|
-
const proxyToUse = withProxy || proxy;
|
|
4249
|
-
const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { get(target, key, receiver) {
|
|
4250
|
-
warn$1(`Property '${String(key)}' was accessed via 'this'. Avoid using 'this' in templates.`);
|
|
4251
|
-
return Reflect.get(target, key, receiver);
|
|
4252
|
-
} }) : proxyToUse;
|
|
4253
|
-
result = normalizeVNode(render$1.call(thisProxy, proxyToUse, renderCache, !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, setupState, data, ctx));
|
|
4254
|
-
fallthroughAttrs = attrs;
|
|
4255
|
-
} else {
|
|
4256
|
-
const render2 = Component;
|
|
4257
|
-
if (!!(process.env.NODE_ENV !== "production") && attrs === props) markAttrsAccessed();
|
|
4258
|
-
result = normalizeVNode(render2.length > 1 ? render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, !!(process.env.NODE_ENV !== "production") ? {
|
|
4259
|
-
get attrs() {
|
|
4260
|
-
markAttrsAccessed();
|
|
4261
|
-
return shallowReadonly(attrs);
|
|
4262
|
-
},
|
|
4263
|
-
slots,
|
|
4264
|
-
emit: emit$2
|
|
4265
|
-
} : {
|
|
4266
|
-
attrs,
|
|
4267
|
-
slots,
|
|
4268
|
-
emit: emit$2
|
|
4269
|
-
}) : render2(!!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, null));
|
|
4270
|
-
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
4271
|
-
}
|
|
4272
|
-
} catch (err) {
|
|
4273
|
-
blockStack.length = 0;
|
|
4274
|
-
handleError(err, instance, 1);
|
|
4275
|
-
result = createVNode(Comment);
|
|
4276
|
-
}
|
|
4277
|
-
let root = result;
|
|
4278
|
-
let setRoot = void 0;
|
|
4279
|
-
if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) [root, setRoot] = getChildRoot(result);
|
|
4280
|
-
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
4281
|
-
const keys = Object.keys(fallthroughAttrs);
|
|
4282
|
-
const { shapeFlag } = root;
|
|
4283
|
-
if (keys.length) {
|
|
4284
|
-
if (shapeFlag & 7) {
|
|
4285
|
-
if (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
|
|
4286
|
-
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
4287
|
-
} else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
|
|
4288
|
-
const allAttrs = Object.keys(attrs);
|
|
4289
|
-
const eventAttrs = [];
|
|
4290
|
-
const extraAttrs = [];
|
|
4291
|
-
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
4292
|
-
const key = allAttrs[i];
|
|
4293
|
-
if (isOn(key)) {
|
|
4294
|
-
if (!isModelListener(key)) eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
4295
|
-
} else extraAttrs.push(key);
|
|
4296
|
-
}
|
|
4297
|
-
if (extraAttrs.length) warn$1(`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`);
|
|
4298
|
-
if (eventAttrs.length) warn$1(`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
|
|
4299
|
-
}
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
|
-
if (vnode.dirs) {
|
|
4303
|
-
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Runtime directive used on component with non-element root node. The directives will not function as intended.`);
|
|
4304
|
-
root = cloneVNode(root, null, false, true);
|
|
4305
|
-
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
4306
|
-
}
|
|
4307
|
-
if (vnode.transition) {
|
|
4308
|
-
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) warn$1(`Component inside <Transition> renders non-element root node that cannot be animated.`);
|
|
4309
|
-
setTransitionHooks(root, vnode.transition);
|
|
4310
|
-
}
|
|
4311
|
-
if (!!(process.env.NODE_ENV !== "production") && setRoot) setRoot(root);
|
|
4312
|
-
else result = root;
|
|
4313
|
-
setCurrentRenderingInstance(prev);
|
|
4314
|
-
return result;
|
|
4315
|
-
}
|
|
4316
|
-
const getChildRoot = (vnode) => {
|
|
4317
|
-
const rawChildren = vnode.children;
|
|
4318
|
-
const dynamicChildren = vnode.dynamicChildren;
|
|
4319
|
-
const childRoot = filterSingleRoot(rawChildren, false);
|
|
4320
|
-
if (!childRoot) return [vnode, void 0];
|
|
4321
|
-
else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) return getChildRoot(childRoot);
|
|
4322
|
-
const index = rawChildren.indexOf(childRoot);
|
|
4323
|
-
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
4324
|
-
const setRoot = (updatedRoot) => {
|
|
4325
|
-
rawChildren[index] = updatedRoot;
|
|
4326
|
-
if (dynamicChildren) {
|
|
4327
|
-
if (dynamicIndex > -1) dynamicChildren[dynamicIndex] = updatedRoot;
|
|
4328
|
-
else if (updatedRoot.patchFlag > 0) vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
4329
|
-
}
|
|
4330
|
-
};
|
|
4331
|
-
return [normalizeVNode(childRoot), setRoot];
|
|
4332
|
-
};
|
|
4333
|
-
function filterSingleRoot(children, recurse = true) {
|
|
4334
|
-
let singleRoot;
|
|
4335
|
-
for (let i = 0; i < children.length; i++) {
|
|
4336
|
-
const child = children[i];
|
|
4337
|
-
if (isVNode(child)) {
|
|
4338
|
-
if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
|
|
4339
|
-
else {
|
|
4340
|
-
singleRoot = child;
|
|
4341
|
-
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
4342
|
-
}
|
|
4343
|
-
} else return;
|
|
4344
|
-
}
|
|
4345
|
-
return singleRoot;
|
|
4346
|
-
}
|
|
4347
|
-
const getFunctionalFallthrough = (attrs) => {
|
|
4348
|
-
let res;
|
|
4349
|
-
for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
|
|
4350
|
-
return res;
|
|
4351
|
-
};
|
|
4352
|
-
const filterModelListeners = (attrs, props) => {
|
|
4353
|
-
const res = {};
|
|
4354
|
-
for (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];
|
|
4355
|
-
return res;
|
|
4356
|
-
};
|
|
4357
|
-
const isElementRoot = (vnode) => {
|
|
4358
|
-
return vnode.shapeFlag & 7 || vnode.type === Comment;
|
|
4359
|
-
};
|
|
4360
|
-
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
4361
|
-
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
4362
|
-
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
4363
|
-
const emits = component.emitsOptions;
|
|
4364
|
-
if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) return true;
|
|
4365
|
-
if (nextVNode.dirs || nextVNode.transition) return true;
|
|
4366
|
-
if (optimized && patchFlag >= 0) {
|
|
4367
|
-
if (patchFlag & 1024) return true;
|
|
4368
|
-
if (patchFlag & 16) {
|
|
4369
|
-
if (!prevProps) return !!nextProps;
|
|
4370
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
4371
|
-
} else if (patchFlag & 8) {
|
|
4372
|
-
const dynamicProps = nextVNode.dynamicProps;
|
|
4373
|
-
for (let i = 0; i < dynamicProps.length; i++) {
|
|
4374
|
-
const key = dynamicProps[i];
|
|
4375
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) return true;
|
|
4376
|
-
}
|
|
4377
|
-
}
|
|
4378
|
-
} else {
|
|
4379
|
-
if (prevChildren || nextChildren) {
|
|
4380
|
-
if (!nextChildren || !nextChildren.$stable) return true;
|
|
4398
|
+
u = 0;
|
|
4399
|
+
v = result.length - 1;
|
|
4400
|
+
while (u < v) {
|
|
4401
|
+
c = u + v >> 1;
|
|
4402
|
+
if (arr[result[c]] < arrI) u = c + 1;
|
|
4403
|
+
else v = c;
|
|
4404
|
+
}
|
|
4405
|
+
if (arrI < arr[result[u]]) {
|
|
4406
|
+
if (u > 0) p$1[i] = result[u - 1];
|
|
4407
|
+
result[u] = i;
|
|
4408
|
+
}
|
|
4381
4409
|
}
|
|
4382
|
-
if (prevProps === nextProps) return false;
|
|
4383
|
-
if (!prevProps) return !!nextProps;
|
|
4384
|
-
if (!nextProps) return true;
|
|
4385
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
4386
4410
|
}
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
for (let i = 0; i < nextKeys.length; i++) {
|
|
4393
|
-
const key = nextKeys[i];
|
|
4394
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) return true;
|
|
4411
|
+
u = result.length;
|
|
4412
|
+
v = result[u - 1];
|
|
4413
|
+
while (u-- > 0) {
|
|
4414
|
+
result[u] = v;
|
|
4415
|
+
v = p$1[v];
|
|
4395
4416
|
}
|
|
4396
|
-
return
|
|
4417
|
+
return result;
|
|
4397
4418
|
}
|
|
4398
|
-
function
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
} else break;
|
|
4406
|
-
}
|
|
4419
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
4420
|
+
const subComponent = instance.subTree.component;
|
|
4421
|
+
if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
4422
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
4423
|
+
}
|
|
4424
|
+
function invalidateMount(hooks) {
|
|
4425
|
+
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
|
|
4407
4426
|
}
|
|
4408
4427
|
const isSuspense = (type) => type.__isSuspense;
|
|
4409
4428
|
function queueEffectWithSuspense(fn, suspense) {
|
|
@@ -4788,7 +4807,6 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
4788
4807
|
return setupResult;
|
|
4789
4808
|
}
|
|
4790
4809
|
function setupStatefulComponent(instance, isSSR) {
|
|
4791
|
-
var _a;
|
|
4792
4810
|
const Component = instance.type;
|
|
4793
4811
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4794
4812
|
if (Component.name) validateComponentName(Component.name, instance.appContext.config);
|
|
@@ -4824,7 +4842,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
4824
4842
|
});
|
|
4825
4843
|
else {
|
|
4826
4844
|
instance.asyncDep = setupResult;
|
|
4827
|
-
if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) warn$1(`Component <${(
|
|
4845
|
+
if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) warn$1(`Component <${formatComponentName(instance, Component)}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`);
|
|
4828
4846
|
}
|
|
4829
4847
|
} else handleSetupResult(instance, setupResult, isSSR);
|
|
4830
4848
|
} else finishComponentSetup(instance, isSSR);
|
|
@@ -4960,11 +4978,11 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
4960
4978
|
const match = Component.__file.match(/([^/\\]+)\.\w+$/);
|
|
4961
4979
|
if (match) name = match[1];
|
|
4962
4980
|
}
|
|
4963
|
-
if (!name && instance
|
|
4981
|
+
if (!name && instance) {
|
|
4964
4982
|
const inferFromRegistry = (registry) => {
|
|
4965
4983
|
for (const key in registry) if (registry[key] === Component) return key;
|
|
4966
4984
|
};
|
|
4967
|
-
name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
|
|
4985
|
+
name = inferFromRegistry(instance.components) || instance.parent && inferFromRegistry(instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
|
|
4968
4986
|
}
|
|
4969
4987
|
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|
|
4970
4988
|
}
|
|
@@ -5141,15 +5159,15 @@ function initCustomFormatter() {
|
|
|
5141
5159
|
if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
|
|
5142
5160
|
else window.devtoolsFormatters = [formatter];
|
|
5143
5161
|
}
|
|
5144
|
-
const version = "3.5.
|
|
5162
|
+
const version = "3.5.25";
|
|
5145
5163
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
5146
5164
|
const devtools = (process.env.NODE_ENV, devtools$1);
|
|
5147
5165
|
const setDevtoolsHook = (process.env.NODE_ENV, setDevtoolsHook$1);
|
|
5148
5166
|
|
|
5149
5167
|
//#endregion
|
|
5150
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.
|
|
5168
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.25/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
5151
5169
|
/**
|
|
5152
|
-
* @vue/runtime-dom v3.5.
|
|
5170
|
+
* @vue/runtime-dom v3.5.25
|
|
5153
5171
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5154
5172
|
* @license MIT
|
|
5155
5173
|
**/
|
|
@@ -5896,9 +5914,9 @@ function normalizeContainer(container) {
|
|
|
5896
5914
|
}
|
|
5897
5915
|
|
|
5898
5916
|
//#endregion
|
|
5899
|
-
//#region ../../node_modules/.pnpm/vue@3.5.
|
|
5917
|
+
//#region ../../node_modules/.pnpm/vue@3.5.25_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
|
|
5900
5918
|
/**
|
|
5901
|
-
* vue v3.5.
|
|
5919
|
+
* vue v3.5.25
|
|
5902
5920
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5903
5921
|
* @license MIT
|
|
5904
5922
|
**/
|
|
@@ -5908,7 +5926,7 @@ function initDev() {
|
|
|
5908
5926
|
if (!!(process.env.NODE_ENV !== "production")) initDev();
|
|
5909
5927
|
|
|
5910
5928
|
//#endregion
|
|
5911
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.0.0_vue@3.5.
|
|
5929
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.0.0_vue@3.5.25_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
|
|
5912
5930
|
/**
|
|
5913
5931
|
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
5914
5932
|
*
|
|
@@ -6123,7 +6141,7 @@ function watchImmediate(source, cb, options) {
|
|
|
6123
6141
|
}
|
|
6124
6142
|
|
|
6125
6143
|
//#endregion
|
|
6126
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.0.0_vue@3.5.
|
|
6144
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.0.0_vue@3.5.25_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js
|
|
6127
6145
|
const defaultWindow = isClient ? window : void 0;
|
|
6128
6146
|
const defaultDocument = isClient ? window.document : void 0;
|
|
6129
6147
|
const defaultNavigator = isClient ? window.navigator : void 0;
|
|
@@ -6729,1151 +6747,7 @@ function useWindowSize(options = {}) {
|
|
|
6729
6747
|
}
|
|
6730
6748
|
|
|
6731
6749
|
//#endregion
|
|
6732
|
-
//#region src/client/webcomponents
|
|
6733
|
-
var css_default = "*{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before{--un-content:\"\"}:after{--un-content:\"\"}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button{-webkit-appearance:button;background-color:transparent;background-image:none}[type=button]{-webkit-appearance:button;background-color:transparent;background-image:none}[type=reset]{-webkit-appearance:button;background-color:transparent;background-image:none}[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder{opacity:1;color:#9ca3af}textarea::placeholder{opacity:1;color:#9ca3af}button{cursor:pointer}[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--un-text-opacity:100%}#vite-devtools-anchor{z-index:2147483644;box-sizing:border-box;transform-origin:50%;width:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:15px;position:fixed;transform:translate(-50%,-50%)rotate(0)}#vite-devtools-anchor #vite-devtools-dock-container{width:max-content;min-width:100px;height:40px;display:flex;position:absolute;top:0;left:0;transform:translate(-50%,-50%)}#vite-devtools-anchor.vite-devtools-vertical #vite-devtools-dock-container{transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(-50%,-50%)rotate(90deg)}#vite-devtools-anchor #vite-devtools-dock{touch-action:none;user-select:none;--vdt-backdrop-blur:blur(5px);height:40px;backdrop-filter:var(--vdt-backdrop-blur)var(--vdt-backdrop-brightness)var(--vdt-backdrop-contrast)var(--vdt-backdrop-grayscale)var(--vdt-backdrop-hue-rotate)var(--vdt-backdrop-invert)var(--vdt-backdrop-opacity)var(--vdt-backdrop-saturate)var(--vdt-backdrop-sepia);--vdt-text-opacity:1;color:rgba(255,255,255,var(--vdt-text-opacity));--vdt-shadow:var(--vdt-shadow-inset)0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset)0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow),var(--vdt-ring-shadow),var(--vdt-shadow);width:calc-size(max-content,size);background-color:rgba(255,255,255,.5);-webkit-border-radius:9999px;border-radius:9999px;margin:auto;padding-left:1rem;padding-right:1rem;transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (prefers-color-scheme:dark){#vite-devtools-anchor #vite-devtools-dock{background-color:rgba(17,17,17,.5)}}#vite-devtools-anchor.vite-devtools-minimized #vite-devtools-dock{width:22px;height:22px;padding:2px 0}#vite-devtools-anchor.vite-devtools-minimized .vite-devtools-dock-bracket{opacity:.5;width:.375rem}#vite-devtools-anchor:hover #vite-devtools-glowing{opacity:.6}#vite-devtools-anchor #vite-devtools-glowing{pointer-events:none;z-index:-1;opacity:0;--vdt-blur:blur(60px);width:160px;height:160px;filter:var(--vdt-blur)var(--vdt-brightness)var(--vdt-contrast)var(--vdt-drop-shadow)var(--vdt-grayscale)var(--vdt-hue-rotate)var(--vdt-invert)var(--vdt-saturate)var(--vdt-sepia);background-image:linear-gradient(45deg,#61d9ff,#7a23a1,#715ebd);-webkit-border-radius:9999px;border-radius:9999px;transition-property:all;transition-duration:1s;transition-timing-function:cubic-bezier(0,0,.2,1);position:absolute;top:0;left:0;transform:translate(-50%,-50%)}@media print{#vite-devtools-anchor{display:none}}.vite-devtools-resize-handle-horizontal{cursor:ns-resize;-webkit-border-radius:.375rem;border-radius:.375rem;height:10px;margin-top:-5px;margin-bottom:-5px;position:absolute;left:6px;right:6px}.vite-devtools-resize-handle-vertical{cursor:ew-resize;-webkit-border-radius:.375rem;border-radius:.375rem;width:10px;margin-left:-5px;margin-right:-5px;position:absolute;top:6px;bottom:0}.vite-devtools-resize-handle-corner{-webkit-border-radius:.375rem;border-radius:.375rem;width:14px;height:14px;margin:-6px;position:absolute}.vite-devtools-resize-handle{z-index:30}.vite-devtools-resize-handle:hover{background-color:rgba(156,163,175,.1)}*{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:before{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:after{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }::backdrop{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }.i-ph-check-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-rocket-launch-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M184 120v61.65a8 8 0 0 1-2.34 5.65l-34.35 34.35a8 8 0 0 1-13.57-4.53L128 176Zm-48-48H74.35a8 8 0 0 0-5.65 2.34l-34.35 34.35a8 8 0 0 0 4.53 13.57L80 128ZM40 216c37.65 0 50.69-19.69 54.56-28.18l-26.38-26.38C59.69 165.31 40 178.35 40 216' opacity='.2'/%3E%3Cpath d='M223.85 47.12a16 16 0 0 0-15-15c-12.58-.75-44.73.4-71.41 27.07L132.69 64H74.36A15.9 15.9 0 0 0 63 68.68L28.7 103a16 16 0 0 0 9.07 27.16l38.47 5.37l44.21 44.21l5.37 38.49a15.94 15.94 0 0 0 10.78 12.92a16.1 16.1 0 0 0 5.1.83a15.9 15.9 0 0 0 11.3-4.68l34.32-34.3a15.9 15.9 0 0 0 4.68-11.36v-58.33l4.77-4.77c26.68-26.68 27.83-58.83 27.08-71.42M74.36 80h42.33l-39.53 39.52L40 114.34Zm74.41-9.45a76.65 76.65 0 0 1 59.11-22.47a76.46 76.46 0 0 1-22.42 59.16L128 164.68L91.32 128ZM176 181.64L141.67 216l-5.19-37.17L176 139.31Zm-74.16 9.5C97.34 201 82.29 224 40 224a8 8 0 0 1-8-8c0-42.29 23-57.34 32.86-61.85a8 8 0 0 1 6.64 14.56c-6.43 2.93-20.62 12.36-23.12 38.91c26.55-2.5 36-16.69 38.91-23.12a8 8 0 1 1 14.56 6.64Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-warning-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M215.46 216H40.54c-12.62 0-20.54-13.21-14.41-23.91l87.46-151.87c6.3-11 22.52-11 28.82 0l87.46 151.87c6.13 10.7-1.79 23.91-14.41 23.91' opacity='.2'/%3E%3Cpath d='M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-svg-spinners-8-dots-rotate{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Ccircle cx='3' cy='12' r='2' fill='currentColor'/%3E%3Ccircle cx='21' cy='12' r='2' fill='currentColor'/%3E%3Ccircle cx='12' cy='21' r='2' fill='currentColor'/%3E%3Ccircle cx='12' cy='3' r='2' fill='currentColor'/%3E%3Ccircle cx='5.64' cy='5.64' r='2' fill='currentColor'/%3E%3Ccircle cx='18.36' cy='18.36' r='2' fill='currentColor'/%3E%3Ccircle cx='5.64' cy='18.36' r='2' fill='currentColor'/%3E%3Ccircle cx='18.36' cy='5.64' r='2' fill='currentColor'/%3E%3CanimateTransform attributeName='transform' dur='1.5s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.container{width:100%}.z-floating-tooltip{z-index:2147483645}.border-base{--vdt-border-opacity:.13;border-color:rgba(136,136,136,var(--vdt-border-opacity))}.bg-glass{--vdt-backdrop-blur:blur(5px);backdrop-filter:var(--vdt-backdrop-blur)var(--vdt-backdrop-brightness)var(--vdt-backdrop-contrast)var(--vdt-backdrop-grayscale)var(--vdt-backdrop-hue-rotate)var(--vdt-backdrop-invert)var(--vdt-backdrop-opacity)var(--vdt-backdrop-saturate)var(--vdt-backdrop-sepia);background-color:rgba(255,255,255,.5)}@media (prefers-color-scheme:dark){.bg-glass{background-color:rgba(17,17,17,.5)}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.disabled\\:pointer-events-none:disabled{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;bottom:0;left:0;right:0}.bottom-0{bottom:0}.left--1{left:-.25rem}.left-0{left:0}.left-1\\/2{left:50%}.right--1{right:-.25rem}.right-0{right:0}.top-0{top:0}.top-1\\/2{top:50%}.z--1{z-index:-1}.m-auto{margin:auto}.h-10{height:2.5rem}.h-3{height:.75rem}.h-5{height:1.25rem}.h-full{height:100%}.w-10{width:2.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-full{width:100%}.w-max{width:max-content}.flex{display:flex}.flex-col{flex-direction:column}.translate-x--1\\/2{--vdt-translate-x:-50%;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.translate-y--1\\/2{--vdt-translate-y:-50%;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.rotate-270{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:270deg;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.scale-120{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.hover\\:scale-120:hover{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.scale-y--100{--vdt-scale-y:-1;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.transform{transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.select-none{user-select:none}.resize{resize:both}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-4{gap:1rem}.border{border-width:1px}.rounded{-webkit-border-radius:.25rem;border-radius:.25rem}.rounded-lg{-webkit-border-radius:.5rem;border-radius:.5rem}.rounded-xl{-webkit-border-radius:.75rem;border-radius:.75rem}.bg-lime6{--vdt-bg-opacity:1;background-color:rgba(101,163,13,var(--vdt-bg-opacity))}.hover\\:bg-\\[\\#8881\\]:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.hover\\:bg-lime7:hover{--vdt-bg-opacity:1;background-color:rgba(77,124,15,var(--vdt-bg-opacity))}.disabled\\:bg-gray6\\!:disabled{--vdt-bg-opacity:1!important;background-color:rgba(75,85,99,var(--vdt-bg-opacity))!important}.fill-black{--vdt-fill-opacity:1;fill:rgba(0,0,0,var(--vdt-fill-opacity))}.p1{padding:.25rem}.p1\\.5{padding:.375rem}.px,.px4{padding-left:1rem;padding-right:1rem}.px2{padding-left:.5rem;padding-right:.5rem}.py1{padding-top:.25rem;padding-bottom:.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-xs{font-size:.75rem;line-height:1rem}.text-purple{--vdt-text-opacity:1;color:rgba(192,132,252,var(--vdt-text-opacity))}.font-bold{font-weight:700}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.op0,.opacity-0{opacity:0}.op100,.opacity-100{opacity:1}.op50{opacity:.5}.op60\\!{opacity:.6!important}.op75{opacity:.75}.shadow{--vdt-shadow:var(--vdt-shadow-inset)0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset)0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow),var(--vdt-ring-shadow),var(--vdt-shadow)}.saturate-0{--vdt-saturate:saturate(0);filter:var(--vdt-blur)var(--vdt-brightness)var(--vdt-contrast)var(--vdt-drop-shadow)var(--vdt-grayscale)var(--vdt-hue-rotate)var(--vdt-invert)var(--vdt-saturate)var(--vdt-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@media (prefers-color-scheme:dark){.dark\\:fill-white{--vdt-fill-opacity:1;fill:rgba(255,255,255,var(--vdt-fill-opacity))}}";
|
|
6734
|
-
|
|
6735
|
-
//#endregion
|
|
6736
|
-
//#region src/client/webcomponents/state/state.ts
|
|
6737
|
-
function useStateHandlers(context) {
|
|
6738
|
-
function _setupScript(entry, context$1) {
|
|
6739
|
-
const id = `${entry.type}:${entry.id}`;
|
|
6740
|
-
return import(
|
|
6741
|
-
/* @vite-ignore */
|
|
6742
|
-
["/.devtools", "imports"].join("-")
|
|
6743
|
-
).then((module) => {
|
|
6744
|
-
const importFn = module.importsMap[id];
|
|
6745
|
-
if (!importFn) return Promise.reject(/* @__PURE__ */ new Error(`[VITE DEVTOOLS] No import found for id: ${id}`));
|
|
6746
|
-
return importFn().then((fn) => fn(context$1));
|
|
6747
|
-
}).catch((error) => {
|
|
6748
|
-
console.error("[VITE DEVTOOLS] Error executing import action", error);
|
|
6749
|
-
return Promise.reject(error);
|
|
6750
|
-
});
|
|
6751
|
-
}
|
|
6752
|
-
const setupPromises = /* @__PURE__ */ new Map();
|
|
6753
|
-
function setupScript(entry, context$1) {
|
|
6754
|
-
if (setupPromises.has(entry.id)) return setupPromises.get(entry.id);
|
|
6755
|
-
const promise = _setupScript(entry, context$1);
|
|
6756
|
-
setupPromises.set(entry.id, promise);
|
|
6757
|
-
return promise;
|
|
6758
|
-
}
|
|
6759
|
-
async function selectDockEntry(entry) {
|
|
6760
|
-
if (!entry) {
|
|
6761
|
-
context.panel.store.open = false;
|
|
6762
|
-
context.docks.selectedId = null;
|
|
6763
|
-
return;
|
|
6764
|
-
}
|
|
6765
|
-
if (context.docks.selectedId === entry.id) return;
|
|
6766
|
-
const current = context.docks.getStateById(entry.id);
|
|
6767
|
-
const scriptContext = reactive({
|
|
6768
|
-
...toRefs(context),
|
|
6769
|
-
current
|
|
6770
|
-
});
|
|
6771
|
-
if (entry.type === "action" || entry.type === "custom-render" || entry.type === "iframe" && entry.clientScript) await setupScript(entry, scriptContext);
|
|
6772
|
-
context.docks.selectedId = entry.id;
|
|
6773
|
-
context.panel.store.open = true;
|
|
6774
|
-
}
|
|
6775
|
-
return { selectDockEntry };
|
|
6776
|
-
}
|
|
6777
|
-
|
|
6778
|
-
//#endregion
|
|
6779
|
-
//#region src/client/webcomponents/state/floating-tooltip.ts
|
|
6780
|
-
const state = shallowRef(null);
|
|
6781
|
-
function setFloatingTooltip(info) {
|
|
6782
|
-
state.value = info;
|
|
6783
|
-
}
|
|
6784
|
-
function useFloatingTooltip() {
|
|
6785
|
-
return state;
|
|
6786
|
-
}
|
|
6787
|
-
|
|
6788
|
-
//#endregion
|
|
6789
|
-
//#region \0/plugin-vue/export-helper
|
|
6790
|
-
var export_helper_default = (sfc, props) => {
|
|
6791
|
-
const target = sfc.__vccOpts || sfc;
|
|
6792
|
-
for (const [key, val] of props) target[key] = val;
|
|
6793
|
-
return target;
|
|
6794
|
-
};
|
|
6795
|
-
|
|
6796
|
-
//#endregion
|
|
6797
|
-
//#region src/client/webcomponents/components/icons/VitePlusCore.vue
|
|
6798
|
-
const _sfc_main$14 = {};
|
|
6799
|
-
const _hoisted_1$7 = {
|
|
6800
|
-
viewBox: "0 0 22 22",
|
|
6801
|
-
fill: "none",
|
|
6802
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
6803
|
-
};
|
|
6804
|
-
function _sfc_render$2(_ctx, _cache) {
|
|
6805
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [createStaticVNode("<g clip-path=\"url(#clip0_2_2)\"><path d=\"M11.85 20.535C11.7881 20.6144 11.7029 20.6726 11.6064 20.7012C11.5098 20.7298 11.4067 20.7276 11.3115 20.6947C11.2163 20.6619 11.1337 20.6001 11.0754 20.5181C11.017 20.436 10.9858 20.3377 10.986 20.237V15.834C10.986 15.5775 10.8841 15.3316 10.7028 15.1502C10.5214 14.9689 10.2755 14.867 10.019 14.867H5.157C5.06821 14.867 4.98114 14.8426 4.90534 14.7964C4.82954 14.7501 4.76795 14.6839 4.72734 14.6049C4.68673 14.526 4.66866 14.4374 4.67513 14.3488C4.6816 14.2603 4.71235 14.1752 4.764 14.103L7.961 9.62801C8.06459 9.48335 8.12626 9.31291 8.13923 9.13546C8.15219 8.95801 8.11594 8.78042 8.03448 8.62224C7.95301 8.46406 7.82948 8.33143 7.67749 8.23893C7.52549 8.14644 7.35093 8.09768 7.173 8.09801H1.29C1.20122 8.09803 1.11414 8.07359 1.03834 8.02736C0.962542 7.98113 0.900953 7.91489 0.86034 7.83594C0.819727 7.75699 0.801662 7.66837 0.80813 7.57982C0.814597 7.49127 0.845347 7.40622 0.897 7.33401L5.04 1.53301C5.08452 1.46999 5.14358 1.41864 5.21217 1.38331C5.28075 1.34797 5.35685 1.32969 5.434 1.33001H17.782C18.175 1.33001 18.404 1.77501 18.175 2.09401L14.978 6.57001C14.521 7.21001 14.978 8.10001 15.766 8.10001H20.627C21.031 8.10001 21.257 8.56401 21.007 8.88201L11.85 20.535Z\" fill=\"#6254FE\"></path><mask id=\"mask0_2_2\" style=\"mask-type:alpha;\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"1\" width=\"22\" height=\"20\"><path d=\"M11.85 20.535C11.7881 20.6144 11.7029 20.6726 11.6064 20.7012C11.5098 20.7298 11.4067 20.7276 11.3115 20.6947C11.2163 20.6619 11.1337 20.6001 11.0754 20.5181C11.017 20.436 10.9858 20.3377 10.986 20.237V15.834C10.986 15.5775 10.8841 15.3316 10.7028 15.1502C10.5214 14.9689 10.2755 14.867 10.019 14.867H5.157C5.06821 14.867 4.98114 14.8426 4.90534 14.7964C4.82954 14.7501 4.76795 14.6839 4.72734 14.6049C4.68673 14.526 4.66866 14.4374 4.67513 14.3488C4.6816 14.2603 4.71235 14.1752 4.764 14.103L7.961 9.62801C8.06459 9.48335 8.12626 9.31291 8.13923 9.13546C8.15219 8.95801 8.11594 8.78042 8.03448 8.62224C7.95301 8.46406 7.82948 8.33143 7.67749 8.23893C7.52549 8.14644 7.35093 8.09768 7.173 8.09801H1.29C1.20122 8.09803 1.11414 8.07359 1.03834 8.02736C0.962542 7.98113 0.900953 7.91489 0.86034 7.83594C0.819727 7.75699 0.801662 7.66837 0.80813 7.57982C0.814597 7.49127 0.845347 7.40622 0.897 7.33401L5.04 1.53301C5.08452 1.46999 5.14358 1.41864 5.21217 1.38331C5.28075 1.34797 5.35685 1.32969 5.434 1.33001H17.782C18.175 1.33001 18.404 1.77501 18.175 2.09401L14.978 6.57001C14.521 7.21001 14.978 8.10001 15.766 8.10001H20.627C21.031 8.10001 21.257 8.56401 21.007 8.88201L11.85 20.535Z\" fill=\"#833BFF\"></path></mask><g mask=\"url(#mask0_2_2)\"><g filter=\"url(#filter0_f_2_2)\"><path d=\"M11.4271 17.1119C11.4313 18.412 8.62134 19.475 5.1508 19.4863C1.68026 19.4975 -1.13659 18.4528 -1.14081 17.1527C-1.14503 15.8526 1.66497 14.7896 5.13551 14.7783C8.60605 14.767 11.4229 15.8118 11.4271 17.1119Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter1_f_2_2)\"><path d=\"M9.48364 9.06048C9.49161 11.5148 3.78614 13.523 -3.25987 13.5459C-10.3059 13.5688 -16.0243 11.5977 -16.0322 9.14332C-16.0402 6.68898 -10.3347 4.6808 -3.28872 4.65792C3.75729 4.63505 9.47567 6.60614 9.48364 9.06048Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter2_f_2_2)\"><path d=\"M9.53104 8.43813C9.53526 9.7382 3.70543 10.8111 -3.49025 10.8344C-10.6859 10.8578 -16.5226 9.82279 -16.5268 8.52272C-16.531 7.22265 -10.7012 6.1498 -3.50554 6.12644C3.69014 6.10308 9.52682 7.13806 9.53104 8.43813Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter3_f_2_2)\"><path d=\"M11.5916 16.1293C11.5958 17.4293 5.74448 18.5022 -1.47775 18.5256C-8.69997 18.549 -14.5582 17.5141 -14.5624 16.214C-14.5666 14.9139 -8.71523 13.841 -1.493 13.8176C5.72923 13.7942 11.5874 14.8292 11.5916 16.1293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter4_f_2_2)\"><path d=\"M12.2473 16.6206C12.2515 17.9206 6.40021 18.9935 -0.821978 19.017C-8.04417 19.0404 -13.9023 18.0055 -13.9066 16.7055C-13.9108 15.4054 -8.05945 14.3325 -0.837261 14.309C6.38493 14.2856 12.2431 15.3205 12.2473 16.6206Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter5_f_2_2)\"><path d=\"M14.047 5.7039C14.2411 2.38813 18.6158 -0.0529585 23.8183 0.251568C29.0207 0.556095 33.0808 3.49092 32.8867 6.80669C32.6926 10.1225 28.3179 12.5635 23.1154 12.259C17.913 11.9545 13.8529 9.01966 14.047 5.7039Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter6_f_2_2)\"><path d=\"M14.7518 7.88531C14.7376 7.06639 18.8396 6.33138 23.9137 6.2436C28.9879 6.15583 33.1129 6.74854 33.127 7.56745C33.1412 8.38637 29.0392 9.12139 23.965 9.20916C18.8909 9.29693 14.7659 8.70422 14.7518 7.88531Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter7_f_2_2)\"><path d=\"M14.7518 7.88531C14.7376 7.06639 18.8396 6.33138 23.9137 6.2436C28.9879 6.15583 33.1129 6.74854 33.127 7.56745C33.1412 8.38637 29.0392 9.12139 23.965 9.20916C18.8909 9.29693 14.7659 8.70422 14.7518 7.88531Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter8_f_2_2)\"><path d=\"M-6.98848 14.7616C-6.18615 15.4233 -1.99229 11.6626 2.37876 6.362C6.74982 1.06138 9.64283 -3.77199 8.84049 -4.43362C8.03816 -5.09525 3.8443 -1.3346 -0.526755 3.96602C-4.89781 9.26665 -7.79082 14.1 -6.98848 14.7616Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter9_f_2_2)\"><path d=\"M13.4305 8.5449C14.2512 9.18361 18.3372 5.30605 22.5568 -0.115883C26.7764 -5.53781 29.5318 -10.4509 28.7111 -11.0896C27.8904 -11.7284 23.8044 -7.8508 19.5848 -2.42887C15.3651 2.99306 12.6098 7.90619 13.4305 8.5449Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter10_f_2_2)\"><path d=\"M14.9501 9.73878C16.4926 10.9392 19.2111 10.026 21.0221 7.69897C22.8331 5.37198 23.0507 2.51245 21.5083 1.31202C19.9658 0.111596 17.2473 1.02485 15.4363 3.35184C13.6253 5.67882 13.4077 8.53835 14.9501 9.73878Z\" fill=\"#2BFDD2\"></path></g><g filter=\"url(#filter11_f_2_2)\"><path d=\"M-7.68233 27.5293C-6.86163 28.168 -2.77563 24.2904 1.44401 18.8685C5.66365 13.4466 8.41904 8.53346 7.59834 7.89474C6.77764 7.25603 2.69164 11.1336 -1.528 16.5555C-5.74764 21.9775 -8.50303 26.8906 -7.68233 27.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter12_f_2_2)\"><path d=\"M-7.68233 27.5293C-6.86163 28.168 -2.77563 24.2904 1.44401 18.8685C5.66365 13.4466 8.41904 8.53346 7.59834 7.89474C6.77764 7.25603 2.69164 11.1336 -1.528 16.5555C-5.74764 21.9775 -8.50303 26.8906 -7.68233 27.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter13_f_2_2)\"><path d=\"M8.26366 23.8563C9.13579 24.535 13.2635 20.6899 17.4831 15.268C21.7028 9.84604 24.4165 4.90047 23.5443 4.22173C22.6722 3.54299 18.5445 7.38811 14.3249 12.81C10.1052 18.232 7.39153 23.1775 8.26366 23.8563Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter14_f_2_2)\"><path d=\"M12.2866 22.5389C13.7846 23.7047 17.4746 21.4689 20.5284 17.5449C23.5822 13.621 24.8434 9.49495 23.3454 8.32912C21.8474 7.16329 18.1574 9.39917 15.1036 13.3231C12.0498 17.247 10.7886 21.3731 12.2866 22.5389Z\" fill=\"#2BFDD2\"></path></g></g></g><defs><filter id=\"filter0_f_2_2\" x=\"-7.68682\" y=\"8.2322\" width=\"25.6599\" height=\"17.8002\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter1_f_2_2\" x=\"-22.5782\" y=\"-1.88827\" width=\"38.6079\" height=\"21.9804\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter2_f_2_2\" x=\"-20.4548\" y=\"2.19805\" width=\"33.9139\" height=\"12.5647\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter3_f_2_2\" x=\"-18.4904\" y=\"9.88925\" width=\"34.01\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter4_f_2_2\" x=\"-17.8346\" y=\"10.3806\" width=\"34.0099\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter5_f_2_2\" x=\"7.4943\" y=\"-6.32009\" width=\"31.9451\" height=\"25.1508\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter6_f_2_2\" x=\"10.8237\" y=\"2.30699\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter7_f_2_2\" x=\"10.8237\" y=\"2.30699\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter8_f_2_2\" x=\"-11.0501\" y=\"-8.43711\" width=\"23.9523\" height=\"27.2022\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter9_f_2_2\" x=\"9.35783\" y=\"-15.0865\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter10_f_2_2\" x=\"9.99386\" y=\"-3.14457\" width=\"16.4707\" height=\"17.3399\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter11_f_2_2\" x=\"-11.755\" y=\"3.89791\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter12_f_2_2\" x=\"-11.755\" y=\"3.89791\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter13_f_2_2\" x=\"4.17262\" y=\"0.216058\" width=\"23.4628\" height=\"27.6459\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter14_f_2_2\" x=\"7.72776\" y=\"4.09222\" width=\"20.1765\" height=\"22.6836\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><clipPath id=\"clip0_2_2\"><rect width=\"22\" height=\"22\" fill=\"white\"></rect></clipPath></defs>", 2)])]);
|
|
6806
|
-
}
|
|
6807
|
-
var VitePlusCore_default = /* @__PURE__ */ export_helper_default(_sfc_main$14, [["render", _sfc_render$2]]);
|
|
6808
|
-
|
|
6809
|
-
//#endregion
|
|
6810
|
-
//#region src/client/webcomponents/components/DockIcon.vue
|
|
6811
|
-
const _hoisted_1$6 = { key: 1 };
|
|
6812
|
-
const _hoisted_2$1 = ["srcset"];
|
|
6813
|
-
const _hoisted_3$1 = ["srcset"];
|
|
6814
|
-
const _hoisted_4 = ["src", "alt"];
|
|
6815
|
-
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
6816
|
-
__name: "DockIcon",
|
|
6817
|
-
props: {
|
|
6818
|
-
icon: {},
|
|
6819
|
-
title: {}
|
|
6820
|
-
},
|
|
6821
|
-
setup(__props) {
|
|
6822
|
-
const props = __props;
|
|
6823
|
-
function getIconUrl(str, color) {
|
|
6824
|
-
if (str.includes("/") || str.startsWith("data:") || str.startsWith("builtin:")) return str;
|
|
6825
|
-
const match = str.match(/^([\w-]+):([\w-]+)$/);
|
|
6826
|
-
if (match) {
|
|
6827
|
-
const [, collection, icon2] = match;
|
|
6828
|
-
return `https://api.iconify.design/${collection}/${icon2}.svg${color === "dark" ? "?color=%23eee" : "?color=%23111"}`;
|
|
6829
|
-
}
|
|
6830
|
-
return str;
|
|
6831
|
-
}
|
|
6832
|
-
const icon = computed(() => {
|
|
6833
|
-
if (typeof props.icon === "string") return {
|
|
6834
|
-
dark: getIconUrl(props.icon, "dark"),
|
|
6835
|
-
light: getIconUrl(props.icon, "light")
|
|
6836
|
-
};
|
|
6837
|
-
return {
|
|
6838
|
-
dark: getIconUrl(props.icon.dark, "dark"),
|
|
6839
|
-
light: getIconUrl(props.icon.light, "light")
|
|
6840
|
-
};
|
|
6841
|
-
});
|
|
6842
|
-
return (_ctx, _cache) => {
|
|
6843
|
-
return icon.value.light === "builtin:vite-plus-core" ? (openBlock(), createBlock(VitePlusCore_default, { key: 0 })) : (openBlock(), createElementBlock("picture", _hoisted_1$6, [
|
|
6844
|
-
createBaseVNode("source", {
|
|
6845
|
-
srcset: icon.value.dark,
|
|
6846
|
-
media: "(prefers-color-scheme: dark)"
|
|
6847
|
-
}, null, 8, _hoisted_2$1),
|
|
6848
|
-
createBaseVNode("source", {
|
|
6849
|
-
srcset: icon.value.light,
|
|
6850
|
-
media: "(prefers-color-scheme: light)"
|
|
6851
|
-
}, null, 8, _hoisted_3$1),
|
|
6852
|
-
createBaseVNode("img", {
|
|
6853
|
-
src: icon.value.light,
|
|
6854
|
-
alt: __props.title,
|
|
6855
|
-
class: "w-full h-full m-auto",
|
|
6856
|
-
draggable: "false"
|
|
6857
|
-
}, null, 8, _hoisted_4)
|
|
6858
|
-
]));
|
|
6859
|
-
};
|
|
6860
|
-
}
|
|
6861
|
-
});
|
|
6862
|
-
var DockIcon_default = _sfc_main$13;
|
|
6863
|
-
|
|
6864
|
-
//#endregion
|
|
6865
|
-
//#region src/client/webcomponents/components/DockEntry.vue
|
|
6866
|
-
const _hoisted_1$5 = ["title"];
|
|
6867
|
-
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
6868
|
-
__name: "DockEntry",
|
|
6869
|
-
props: {
|
|
6870
|
-
dock: {},
|
|
6871
|
-
isSelected: { type: Boolean },
|
|
6872
|
-
isDimmed: { type: Boolean },
|
|
6873
|
-
isVertical: { type: Boolean }
|
|
6874
|
-
},
|
|
6875
|
-
setup(__props) {
|
|
6876
|
-
const props = __props;
|
|
6877
|
-
const button = useTemplateRef("button");
|
|
6878
|
-
function updatePos() {
|
|
6879
|
-
const rect = button.value?.getBoundingClientRect();
|
|
6880
|
-
if (rect) setFloatingTooltip({
|
|
6881
|
-
text: props.dock.title,
|
|
6882
|
-
width: rect.width,
|
|
6883
|
-
height: rect.height,
|
|
6884
|
-
left: rect.left,
|
|
6885
|
-
top: rect.top
|
|
6886
|
-
});
|
|
6887
|
-
}
|
|
6888
|
-
function showTitle() {
|
|
6889
|
-
updatePos();
|
|
6890
|
-
}
|
|
6891
|
-
function clearTitle() {
|
|
6892
|
-
setFloatingTooltip(null);
|
|
6893
|
-
}
|
|
6894
|
-
useEventListener("pointerdown", () => {
|
|
6895
|
-
setFloatingTooltip(null);
|
|
6896
|
-
});
|
|
6897
|
-
return (_ctx, _cache) => {
|
|
6898
|
-
return openBlock(), createElementBlock("div", {
|
|
6899
|
-
key: __props.dock.id,
|
|
6900
|
-
class: "relative group vite-devtools-dock-entry",
|
|
6901
|
-
onPointerenter: showTitle,
|
|
6902
|
-
onPointerleave: clearTitle
|
|
6903
|
-
}, [createBaseVNode("button", {
|
|
6904
|
-
ref_key: "button",
|
|
6905
|
-
ref: button,
|
|
6906
|
-
title: __props.dock.title,
|
|
6907
|
-
class: normalizeClass([[
|
|
6908
|
-
__props.isVertical ? "rotate-270" : "",
|
|
6909
|
-
__props.isDimmed ? "op50 saturate-0" : "",
|
|
6910
|
-
__props.isSelected ? "scale-120 text-purple" : ""
|
|
6911
|
-
], "flex items-center justify-center p1.5 rounded-xl hover:bg-[#8881] hover:scale-120 transition-all duration-300 relative"])
|
|
6912
|
-
}, [createVNode(DockIcon_default, {
|
|
6913
|
-
icon: __props.dock.icon,
|
|
6914
|
-
title: __props.dock.title,
|
|
6915
|
-
class: "w-5 h-5 select-none"
|
|
6916
|
-
}, null, 8, ["icon", "title"])], 10, _hoisted_1$5)], 32);
|
|
6917
|
-
};
|
|
6918
|
-
}
|
|
6919
|
-
});
|
|
6920
|
-
var DockEntry_default = _sfc_main$12;
|
|
6921
|
-
|
|
6922
|
-
//#endregion
|
|
6923
|
-
//#region src/client/webcomponents/components/DockEntries.vue
|
|
6924
|
-
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
6925
|
-
__name: "DockEntries",
|
|
6926
|
-
props: {
|
|
6927
|
-
entries: {},
|
|
6928
|
-
selected: {},
|
|
6929
|
-
isVertical: { type: Boolean }
|
|
6930
|
-
},
|
|
6931
|
-
emits: ["select"],
|
|
6932
|
-
setup(__props, { emit: __emit }) {
|
|
6933
|
-
const props = __props;
|
|
6934
|
-
const emit$2 = __emit;
|
|
6935
|
-
const { selected, isVertical, entries } = toRefs(props);
|
|
6936
|
-
function toggleDockEntry(dock) {
|
|
6937
|
-
if (selected.value?.id === dock.id) emit$2("select", void 0);
|
|
6938
|
-
else emit$2("select", dock);
|
|
6939
|
-
}
|
|
6940
|
-
return (_ctx, _cache) => {
|
|
6941
|
-
return openBlock(), createElementBlock("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
|
|
6942
|
-
return openBlock(), createBlock(DockEntry_default, {
|
|
6943
|
-
key: dock.id,
|
|
6944
|
-
dock,
|
|
6945
|
-
"is-selected": unref(selected)?.id === dock.id,
|
|
6946
|
-
"is-dimmed": unref(selected) ? unref(selected).id !== dock.id : false,
|
|
6947
|
-
"is-vertical": unref(isVertical),
|
|
6948
|
-
onClick: ($event) => toggleDockEntry(dock)
|
|
6949
|
-
}, null, 8, [
|
|
6950
|
-
"dock",
|
|
6951
|
-
"is-selected",
|
|
6952
|
-
"is-dimmed",
|
|
6953
|
-
"is-vertical",
|
|
6954
|
-
"onClick"
|
|
6955
|
-
]);
|
|
6956
|
-
}), 128))]);
|
|
6957
|
-
};
|
|
6958
|
-
}
|
|
6959
|
-
});
|
|
6960
|
-
var DockEntries_default = _sfc_main$11;
|
|
6961
|
-
|
|
6962
|
-
//#endregion
|
|
6963
|
-
//#region src/client/webcomponents/components/icons/BracketLeft.vue
|
|
6964
|
-
const _sfc_main$10 = {};
|
|
6965
|
-
const _hoisted_1$4 = {
|
|
6966
|
-
viewBox: "0 0 9 20",
|
|
6967
|
-
fill: "none",
|
|
6968
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
6969
|
-
};
|
|
6970
|
-
function _sfc_render$1(_ctx, _cache) {
|
|
6971
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
6972
|
-
d: "M4.95763 0C1.02563 5.628 1.00263 14.351 4.95763 20H7.61363C3.65963 14.35 3.68363 5.627 7.61363 0H4.95763Z",
|
|
6973
|
-
class: "fill-black dark:fill-white"
|
|
6974
|
-
}, null, -1)])]);
|
|
6975
|
-
}
|
|
6976
|
-
var BracketLeft_default = /* @__PURE__ */ export_helper_default(_sfc_main$10, [["render", _sfc_render$1]]);
|
|
6977
|
-
|
|
6978
|
-
//#endregion
|
|
6979
|
-
//#region src/client/webcomponents/components/icons/BracketRight.vue
|
|
6980
|
-
const _sfc_main$9 = {};
|
|
6981
|
-
const _hoisted_1$3 = {
|
|
6982
|
-
viewBox: "0 0 9 20",
|
|
6983
|
-
fill: "none",
|
|
6984
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
6985
|
-
};
|
|
6986
|
-
function _sfc_render(_ctx, _cache) {
|
|
6987
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
6988
|
-
d: "M4.246 10H6.903C6.902 6.407 5.913 2.816 3.946 0H1.29C3.256 2.816 4.244 6.407 4.246 10ZM8.935 14.907H6.27C6.46624 14.1665 6.61752 13.4148 6.723 12.656H4.066C3.96052 13.4148 3.80924 14.1665 3.613 14.907H0.944C0.703507 15.8176 0.387753 16.7067 0 17.565H2.669C2.2859 18.4179 1.82388 19.2331 1.289 20H3.945C4.47988 19.2331 4.9419 18.4179 5.325 17.565H7.99C8.376 16.714 8.691 15.823 8.935 14.907Z",
|
|
6989
|
-
class: "fill-black dark:fill-white"
|
|
6990
|
-
}, null, -1)])]);
|
|
6991
|
-
}
|
|
6992
|
-
var BracketRight_default = /* @__PURE__ */ export_helper_default(_sfc_main$9, [["render", _sfc_render]]);
|
|
6993
|
-
|
|
6994
|
-
//#endregion
|
|
6995
|
-
//#region src/client/webcomponents/components/Dock.vue
|
|
6996
|
-
const PANEL_MARGIN = 5;
|
|
6997
|
-
const SNAP_THRESHOLD = 2;
|
|
6998
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
6999
|
-
__name: "Dock",
|
|
7000
|
-
props: { context: {} },
|
|
7001
|
-
setup(__props) {
|
|
7002
|
-
const context = __props.context;
|
|
7003
|
-
const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
|
|
7004
|
-
const panelMargins = reactive({
|
|
7005
|
-
left: PANEL_MARGIN,
|
|
7006
|
-
top: PANEL_MARGIN,
|
|
7007
|
-
right: PANEL_MARGIN,
|
|
7008
|
-
bottom: PANEL_MARGIN
|
|
7009
|
-
});
|
|
7010
|
-
const safeArea = useScreenSafeArea();
|
|
7011
|
-
function toNumber$1(value) {
|
|
7012
|
-
const num = +value;
|
|
7013
|
-
if (Number.isNaN(num)) return 0;
|
|
7014
|
-
return num;
|
|
7015
|
-
}
|
|
7016
|
-
watchEffect(() => {
|
|
7017
|
-
panelMargins.left = toNumber$1(safeArea.left.value) + PANEL_MARGIN;
|
|
7018
|
-
panelMargins.top = toNumber$1(safeArea.top.value) + PANEL_MARGIN;
|
|
7019
|
-
panelMargins.right = toNumber$1(safeArea.right.value) + PANEL_MARGIN;
|
|
7020
|
-
panelMargins.bottom = toNumber$1(safeArea.bottom.value) + PANEL_MARGIN;
|
|
7021
|
-
});
|
|
7022
|
-
const dockEl = useTemplateRef("dockEl");
|
|
7023
|
-
const anchorEl = useTemplateRef("anchorEl");
|
|
7024
|
-
const recalculateCounter = ref(0);
|
|
7025
|
-
const isHovering = ref(false);
|
|
7026
|
-
const windowSize = reactive({
|
|
7027
|
-
width: window.innerWidth,
|
|
7028
|
-
height: window.innerHeight
|
|
7029
|
-
});
|
|
7030
|
-
const draggingOffset = reactive({
|
|
7031
|
-
x: 0,
|
|
7032
|
-
y: 0
|
|
7033
|
-
});
|
|
7034
|
-
const mousePosition = reactive({
|
|
7035
|
-
x: 0,
|
|
7036
|
-
y: 0
|
|
7037
|
-
});
|
|
7038
|
-
function onPointerDown(e) {
|
|
7039
|
-
if (!dockEl.value) return;
|
|
7040
|
-
context.panel.isDragging = true;
|
|
7041
|
-
const { left, top, width, height } = dockEl.value.getBoundingClientRect();
|
|
7042
|
-
draggingOffset.x = e.clientX - left - width / 2;
|
|
7043
|
-
draggingOffset.y = e.clientY - top - height / 2;
|
|
7044
|
-
}
|
|
7045
|
-
onMounted(() => {
|
|
7046
|
-
windowSize.width = window.innerWidth;
|
|
7047
|
-
windowSize.height = window.innerHeight;
|
|
7048
|
-
useEventListener(window, "resize", () => {
|
|
7049
|
-
windowSize.width = window.innerWidth;
|
|
7050
|
-
windowSize.height = window.innerHeight;
|
|
7051
|
-
});
|
|
7052
|
-
useEventListener(window, "pointermove", (e) => {
|
|
7053
|
-
if (!context.panel.isDragging) return;
|
|
7054
|
-
const store = context.panel.store;
|
|
7055
|
-
const centerX = window.innerWidth / 2;
|
|
7056
|
-
const centerY = window.innerHeight / 2;
|
|
7057
|
-
const x = e.clientX - draggingOffset.x;
|
|
7058
|
-
const y = e.clientY - draggingOffset.y;
|
|
7059
|
-
if (Number.isNaN(x) || Number.isNaN(y)) return;
|
|
7060
|
-
mousePosition.x = x;
|
|
7061
|
-
mousePosition.y = y;
|
|
7062
|
-
const deg = Math.atan2(y - centerY, x - centerX);
|
|
7063
|
-
const HORIZONTAL_MARGIN = 70;
|
|
7064
|
-
const TL = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, 0 - centerX);
|
|
7065
|
-
const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
|
|
7066
|
-
const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
|
|
7067
|
-
const BR = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, window.innerWidth - centerX);
|
|
7068
|
-
store.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
|
|
7069
|
-
store.left = snapToPoints(x / window.innerWidth * 100);
|
|
7070
|
-
store.top = snapToPoints(y / window.innerHeight * 100);
|
|
7071
|
-
});
|
|
7072
|
-
useEventListener(window, "pointerup", () => {
|
|
7073
|
-
context.panel.isDragging = false;
|
|
7074
|
-
});
|
|
7075
|
-
useEventListener(window, "pointerleave", () => {
|
|
7076
|
-
context.panel.isDragging = false;
|
|
7077
|
-
});
|
|
7078
|
-
});
|
|
7079
|
-
function snapToPoints(value) {
|
|
7080
|
-
if (value < 5) return 0;
|
|
7081
|
-
if (value > 95) return 100;
|
|
7082
|
-
if (Math.abs(value - 50) < SNAP_THRESHOLD) return 50;
|
|
7083
|
-
return value;
|
|
7084
|
-
}
|
|
7085
|
-
function clamp$1(value, min, max) {
|
|
7086
|
-
return Math.min(Math.max(value, min), max);
|
|
7087
|
-
}
|
|
7088
|
-
const anchorPos = computed(() => {
|
|
7089
|
-
recalculateCounter.value;
|
|
7090
|
-
const store = context.panel.store;
|
|
7091
|
-
const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
|
|
7092
|
-
const halfHeight = (dockEl.value?.clientHeight || 0) / 2;
|
|
7093
|
-
const left = store.left * windowSize.width / 100;
|
|
7094
|
-
const top = store.top * windowSize.height / 100;
|
|
7095
|
-
switch (store.position) {
|
|
7096
|
-
case "top": return {
|
|
7097
|
-
left: clamp$1(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
|
|
7098
|
-
top: panelMargins.top + halfHeight
|
|
7099
|
-
};
|
|
7100
|
-
case "right": return {
|
|
7101
|
-
left: windowSize.width - panelMargins.right - halfHeight,
|
|
7102
|
-
top: clamp$1(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
|
|
7103
|
-
};
|
|
7104
|
-
case "left": return {
|
|
7105
|
-
left: panelMargins.left + halfHeight,
|
|
7106
|
-
top: clamp$1(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
|
|
7107
|
-
};
|
|
7108
|
-
case "bottom":
|
|
7109
|
-
default: return {
|
|
7110
|
-
left: clamp$1(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
|
|
7111
|
-
top: windowSize.height - panelMargins.bottom - halfHeight
|
|
7112
|
-
};
|
|
7113
|
-
}
|
|
7114
|
-
});
|
|
7115
|
-
let _timer = null;
|
|
7116
|
-
function bringUp() {
|
|
7117
|
-
isHovering.value = true;
|
|
7118
|
-
if (context.panel.store.inactiveTimeout < 0) return;
|
|
7119
|
-
if (_timer) clearTimeout(_timer);
|
|
7120
|
-
_timer = setTimeout(() => {
|
|
7121
|
-
isHovering.value = false;
|
|
7122
|
-
}, +context.panel.store.inactiveTimeout || 0);
|
|
7123
|
-
}
|
|
7124
|
-
const isHidden = computed(() => false);
|
|
7125
|
-
const isMinimized = computed(() => {
|
|
7126
|
-
if (context.panel.store.inactiveTimeout < 0) return false;
|
|
7127
|
-
if (context.panel.store.inactiveTimeout === 0) return true;
|
|
7128
|
-
const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
7129
|
-
return !context.panel.isDragging && !context.panel.store.open && !isHovering.value && !isTouchDevice && context.panel.store.inactiveTimeout;
|
|
7130
|
-
});
|
|
7131
|
-
const anchorStyle = computed(() => {
|
|
7132
|
-
return {
|
|
7133
|
-
left: `${anchorPos.value.left}px`,
|
|
7134
|
-
top: `${anchorPos.value.top}px`,
|
|
7135
|
-
pointerEvents: isHidden.value ? "none" : "auto"
|
|
7136
|
-
};
|
|
7137
|
-
});
|
|
7138
|
-
const panelStyle = computed(() => {
|
|
7139
|
-
const style = { transform: context.panel.isVertical ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
|
|
7140
|
-
if (isHidden.value) {
|
|
7141
|
-
style.opacity = 0;
|
|
7142
|
-
style.pointerEvents = "none";
|
|
7143
|
-
}
|
|
7144
|
-
if (context.panel.isDragging) style.transition = "none !important";
|
|
7145
|
-
return style;
|
|
7146
|
-
});
|
|
7147
|
-
const { selectDockEntry } = useStateHandlers(context);
|
|
7148
|
-
onMounted(() => {
|
|
7149
|
-
bringUp();
|
|
7150
|
-
recalculateCounter.value++;
|
|
7151
|
-
});
|
|
7152
|
-
return (_ctx, _cache) => {
|
|
7153
|
-
return openBlock(), createElementBlock("div", {
|
|
7154
|
-
id: "vite-devtools-anchor",
|
|
7155
|
-
ref_key: "anchorEl",
|
|
7156
|
-
ref: anchorEl,
|
|
7157
|
-
style: normalizeStyle([anchorStyle.value]),
|
|
7158
|
-
class: normalizeClass({
|
|
7159
|
-
"vite-devtools-horizontal": !unref(context).panel.isVertical,
|
|
7160
|
-
"vite-devtools-vertical": unref(context).panel.isVertical,
|
|
7161
|
-
"vite-devtools-minimized": isMinimized.value
|
|
7162
|
-
}),
|
|
7163
|
-
onMousemove: bringUp
|
|
7164
|
-
}, [
|
|
7165
|
-
!unref(isSafari) ? (openBlock(), createElementBlock("div", {
|
|
7166
|
-
key: 0,
|
|
7167
|
-
id: "vite-devtools-glowing",
|
|
7168
|
-
class: normalizeClass(unref(context).panel.isDragging ? "op60!" : "")
|
|
7169
|
-
}, null, 2)) : createCommentVNode("v-if", true),
|
|
7170
|
-
renderSlot(_ctx.$slots, "default", {
|
|
7171
|
-
context: unref(context),
|
|
7172
|
-
dockEl: dockEl.value,
|
|
7173
|
-
selected: unref(context).docks.selected,
|
|
7174
|
-
panelMargins
|
|
7175
|
-
}),
|
|
7176
|
-
createBaseVNode("div", {
|
|
7177
|
-
id: "vite-devtools-dock-container",
|
|
7178
|
-
ref_key: "dockEl",
|
|
7179
|
-
ref: dockEl,
|
|
7180
|
-
style: normalizeStyle(panelStyle.value)
|
|
7181
|
-
}, [createBaseVNode("div", {
|
|
7182
|
-
id: "vite-devtools-dock",
|
|
7183
|
-
onPointerdown: onPointerDown
|
|
7184
|
-
}, [
|
|
7185
|
-
createVNode(BracketLeft_default, { class: "vite-devtools-dock-bracket absolute left--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300" }),
|
|
7186
|
-
createVNode(BracketRight_default, { class: normalizeClass(["vite-devtools-dock-bracket absolute right--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300", unref(context).panel.isVertical ? "scale-y--100" : ""]) }, null, 8, ["class"]),
|
|
7187
|
-
createVNode(VitePlusCore_default, { class: normalizeClass(["w-3 h-3 absolute left-1/2 top-1/2 translate-x--1/2 translate-y--1/2 transition-opacity duration-300", isMinimized.value ? "op100" : "op0"]) }, null, 8, ["class"]),
|
|
7188
|
-
createVNode(DockEntries_default, {
|
|
7189
|
-
entries: unref(context).docks.entries,
|
|
7190
|
-
class: normalizeClass(["transition duration-200 flex items-center w-full h-full justify-center", isMinimized.value ? "opacity-0 pointer-events-none" : "opacity-100"]),
|
|
7191
|
-
"is-vertical": unref(context).panel.isVertical,
|
|
7192
|
-
selected: unref(context).docks.selected,
|
|
7193
|
-
onSelect: unref(selectDockEntry)
|
|
7194
|
-
}, null, 8, [
|
|
7195
|
-
"entries",
|
|
7196
|
-
"class",
|
|
7197
|
-
"is-vertical",
|
|
7198
|
-
"selected",
|
|
7199
|
-
"onSelect"
|
|
7200
|
-
])
|
|
7201
|
-
], 32)], 4)
|
|
7202
|
-
], 38);
|
|
7203
|
-
};
|
|
7204
|
-
}
|
|
7205
|
-
});
|
|
7206
|
-
var Dock_default = _sfc_main$8;
|
|
7207
|
-
|
|
7208
|
-
//#endregion
|
|
7209
|
-
//#region src/client/webcomponents/utils/PresistedDomViewsManager.ts
|
|
7210
|
-
var PresistedDomViewsManager = class {
|
|
7211
|
-
holders = {};
|
|
7212
|
-
constructor(container) {
|
|
7213
|
-
this.container = container;
|
|
7214
|
-
}
|
|
7215
|
-
getHolder(id, _type) {
|
|
7216
|
-
return this.holders[id];
|
|
7217
|
-
}
|
|
7218
|
-
getOrCreateHolder(id, type) {
|
|
7219
|
-
if (!this.container.value) throw new Error("[VITE DEVTOOLS] PresistedDomViewsManager: container is not set");
|
|
7220
|
-
let holder;
|
|
7221
|
-
if (!this.holders[id]) {
|
|
7222
|
-
const el = document.createElement(type);
|
|
7223
|
-
this.holders[id] = new PresistedDomHolder(id, el);
|
|
7224
|
-
this.container.value.appendChild(el);
|
|
7225
|
-
holder = this.holders[id];
|
|
7226
|
-
} else holder = this.holders[id];
|
|
7227
|
-
return holder;
|
|
7228
|
-
}
|
|
7229
|
-
removeHolder(id) {
|
|
7230
|
-
const holder = this.holders[id];
|
|
7231
|
-
if (!holder) return false;
|
|
7232
|
-
holder.unmount();
|
|
7233
|
-
holder.element.remove();
|
|
7234
|
-
delete this.holders[id];
|
|
7235
|
-
return true;
|
|
7236
|
-
}
|
|
7237
|
-
};
|
|
7238
|
-
var PresistedDomHolder = class {
|
|
7239
|
-
element;
|
|
7240
|
-
id;
|
|
7241
|
-
parent;
|
|
7242
|
-
_cleanups = [];
|
|
7243
|
-
constructor(id, iframe) {
|
|
7244
|
-
this.id = id;
|
|
7245
|
-
this.element = iframe;
|
|
7246
|
-
}
|
|
7247
|
-
cleanup() {
|
|
7248
|
-
this._cleanups.forEach((cleanup) => cleanup());
|
|
7249
|
-
this._cleanups = [];
|
|
7250
|
-
}
|
|
7251
|
-
mount(parent) {
|
|
7252
|
-
if (this.parent === parent) {
|
|
7253
|
-
this.show();
|
|
7254
|
-
return;
|
|
7255
|
-
}
|
|
7256
|
-
this.cleanup();
|
|
7257
|
-
this.parent = parent;
|
|
7258
|
-
const func = () => this.update();
|
|
7259
|
-
window.addEventListener("resize", func);
|
|
7260
|
-
this._cleanups.push(() => window.removeEventListener("resize", func));
|
|
7261
|
-
this.show();
|
|
7262
|
-
}
|
|
7263
|
-
hide() {
|
|
7264
|
-
this.element.style.display = "none";
|
|
7265
|
-
}
|
|
7266
|
-
show() {
|
|
7267
|
-
this.element.style.display = "block";
|
|
7268
|
-
this.update();
|
|
7269
|
-
}
|
|
7270
|
-
update() {
|
|
7271
|
-
if (!this.parent) return;
|
|
7272
|
-
const rect = this.parent.getBoundingClientRect();
|
|
7273
|
-
this.element.style.position = "absolute";
|
|
7274
|
-
this.element.style.width = `${rect.width}px`;
|
|
7275
|
-
this.element.style.height = `${rect.height}px`;
|
|
7276
|
-
}
|
|
7277
|
-
unmount() {
|
|
7278
|
-
this.cleanup();
|
|
7279
|
-
this.hide();
|
|
7280
|
-
this.parent = void 0;
|
|
7281
|
-
}
|
|
7282
|
-
};
|
|
7283
|
-
|
|
7284
|
-
//#endregion
|
|
7285
|
-
//#region src/client/webcomponents/components/DockPanelResizer.vue
|
|
7286
|
-
const PANEL_MIN = 20;
|
|
7287
|
-
const PANEL_MAX = 100;
|
|
7288
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
7289
|
-
__name: "DockPanelResizer",
|
|
7290
|
-
props: { panel: {} },
|
|
7291
|
-
setup(__props) {
|
|
7292
|
-
const props = __props;
|
|
7293
|
-
const container = ref();
|
|
7294
|
-
const resizingState = ref(false);
|
|
7295
|
-
function handleResize(e) {
|
|
7296
|
-
if (!resizingState.value) return;
|
|
7297
|
-
const box = container.value?.getBoundingClientRect();
|
|
7298
|
-
if (!box) return;
|
|
7299
|
-
const store = props.panel.store;
|
|
7300
|
-
let widthPx, heightPx;
|
|
7301
|
-
if (resizingState.value.right) {
|
|
7302
|
-
widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0));
|
|
7303
|
-
store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
|
|
7304
|
-
} else if (resizingState.value.left) {
|
|
7305
|
-
widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : e.touches[0]?.clientX || 0));
|
|
7306
|
-
store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
|
|
7307
|
-
}
|
|
7308
|
-
if (resizingState.value.top) {
|
|
7309
|
-
heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : e.touches[0]?.clientY || 0));
|
|
7310
|
-
store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
|
|
7311
|
-
} else if (resizingState.value.bottom) {
|
|
7312
|
-
heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0));
|
|
7313
|
-
store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
|
|
7314
|
-
}
|
|
7315
|
-
}
|
|
7316
|
-
useEventListener(window, "mousemove", handleResize);
|
|
7317
|
-
useEventListener(window, "touchmove", handleResize);
|
|
7318
|
-
useEventListener(window, "mouseup", () => resizingState.value = false);
|
|
7319
|
-
useEventListener(window, "touchend", () => resizingState.value = false);
|
|
7320
|
-
useEventListener(window, "mouseleave", () => resizingState.value = false);
|
|
7321
|
-
watch(resizingState, (value) => {
|
|
7322
|
-
props.panel.isResizing = !!value;
|
|
7323
|
-
}, { flush: "sync" });
|
|
7324
|
-
return (_ctx, _cache) => {
|
|
7325
|
-
return openBlock(), createElementBlock("div", {
|
|
7326
|
-
id: "vite-devtools-resize-container",
|
|
7327
|
-
ref_key: "container",
|
|
7328
|
-
ref: container,
|
|
7329
|
-
class: "w-full h-full absolute left-0 right-0 bottom-0 top-0 antialiased pointer-events-auto"
|
|
7330
|
-
}, [
|
|
7331
|
-
createCommentVNode(" Handlers "),
|
|
7332
|
-
withDirectives(createBaseVNode("div", {
|
|
7333
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
|
|
7334
|
-
style: { top: 0 },
|
|
7335
|
-
onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
|
|
7336
|
-
onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
|
|
7337
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "top"]]),
|
|
7338
|
-
withDirectives(createBaseVNode("div", {
|
|
7339
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
|
|
7340
|
-
style: { bottom: 0 },
|
|
7341
|
-
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
|
|
7342
|
-
onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
|
|
7343
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "bottom"]]),
|
|
7344
|
-
withDirectives(createBaseVNode("div", {
|
|
7345
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
|
|
7346
|
-
style: { left: 0 },
|
|
7347
|
-
onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
|
|
7348
|
-
onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
|
|
7349
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "left"]]),
|
|
7350
|
-
withDirectives(createBaseVNode("div", {
|
|
7351
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
|
|
7352
|
-
style: { right: 0 },
|
|
7353
|
-
onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
|
|
7354
|
-
onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
|
|
7355
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "right"]]),
|
|
7356
|
-
withDirectives(createBaseVNode("div", {
|
|
7357
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7358
|
-
style: {
|
|
7359
|
-
top: 0,
|
|
7360
|
-
left: 0,
|
|
7361
|
-
cursor: "nwse-resize"
|
|
7362
|
-
},
|
|
7363
|
-
onMousedown: _cache[8] || (_cache[8] = withModifiers(() => resizingState.value = {
|
|
7364
|
-
top: true,
|
|
7365
|
-
left: true
|
|
7366
|
-
}, ["prevent"])),
|
|
7367
|
-
onTouchstartPassive: _cache[9] || (_cache[9] = () => resizingState.value = {
|
|
7368
|
-
top: true,
|
|
7369
|
-
left: true
|
|
7370
|
-
})
|
|
7371
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "left"]]),
|
|
7372
|
-
withDirectives(createBaseVNode("div", {
|
|
7373
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7374
|
-
style: {
|
|
7375
|
-
top: 0,
|
|
7376
|
-
right: 0,
|
|
7377
|
-
cursor: "nesw-resize"
|
|
7378
|
-
},
|
|
7379
|
-
onMousedown: _cache[10] || (_cache[10] = withModifiers(() => resizingState.value = {
|
|
7380
|
-
top: true,
|
|
7381
|
-
right: true
|
|
7382
|
-
}, ["prevent"])),
|
|
7383
|
-
onTouchstartPassive: _cache[11] || (_cache[11] = () => resizingState.value = {
|
|
7384
|
-
top: true,
|
|
7385
|
-
right: true
|
|
7386
|
-
})
|
|
7387
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "right"]]),
|
|
7388
|
-
withDirectives(createBaseVNode("div", {
|
|
7389
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7390
|
-
style: {
|
|
7391
|
-
bottom: 0,
|
|
7392
|
-
left: 0,
|
|
7393
|
-
cursor: "nesw-resize"
|
|
7394
|
-
},
|
|
7395
|
-
onMousedown: _cache[12] || (_cache[12] = withModifiers(() => resizingState.value = {
|
|
7396
|
-
bottom: true,
|
|
7397
|
-
left: true
|
|
7398
|
-
}, ["prevent"])),
|
|
7399
|
-
onTouchstartPassive: _cache[13] || (_cache[13] = () => resizingState.value = {
|
|
7400
|
-
bottom: true,
|
|
7401
|
-
left: true
|
|
7402
|
-
})
|
|
7403
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "left"]]),
|
|
7404
|
-
withDirectives(createBaseVNode("div", {
|
|
7405
|
-
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7406
|
-
style: {
|
|
7407
|
-
bottom: 0,
|
|
7408
|
-
right: 0,
|
|
7409
|
-
cursor: "nwse-resize"
|
|
7410
|
-
},
|
|
7411
|
-
onMousedown: _cache[14] || (_cache[14] = withModifiers(() => resizingState.value = {
|
|
7412
|
-
bottom: true,
|
|
7413
|
-
right: true
|
|
7414
|
-
}, ["prevent"])),
|
|
7415
|
-
onTouchstartPassive: _cache[15] || (_cache[15] = () => resizingState.value = {
|
|
7416
|
-
bottom: true,
|
|
7417
|
-
right: true
|
|
7418
|
-
})
|
|
7419
|
-
}, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "right"]])
|
|
7420
|
-
], 512);
|
|
7421
|
-
};
|
|
7422
|
-
}
|
|
7423
|
-
});
|
|
7424
|
-
var DockPanelResizer_default = _sfc_main$7;
|
|
7425
|
-
|
|
7426
|
-
//#endregion
|
|
7427
|
-
//#region src/client/webcomponents/components/ViewCustomRenderer.vue
|
|
7428
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
7429
|
-
__name: "ViewCustomRenderer",
|
|
7430
|
-
props: {
|
|
7431
|
-
context: {},
|
|
7432
|
-
entry: {},
|
|
7433
|
-
presistedDoms: {},
|
|
7434
|
-
divStyle: {}
|
|
7435
|
-
},
|
|
7436
|
-
setup(__props) {
|
|
7437
|
-
const props = __props;
|
|
7438
|
-
const isLoading = ref(true);
|
|
7439
|
-
const viewFrame = useTemplateRef("viewFrame");
|
|
7440
|
-
onMounted(() => {
|
|
7441
|
-
const holder = props.presistedDoms.getOrCreateHolder(props.entry.id, "div");
|
|
7442
|
-
holder.element.style.boxShadow = "none";
|
|
7443
|
-
holder.element.style.outline = "none";
|
|
7444
|
-
Object.assign(holder.element.style, props.divStyle);
|
|
7445
|
-
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
7446
|
-
if (entryState) entryState.domElements.panel = holder.element;
|
|
7447
|
-
holder.mount(viewFrame.value);
|
|
7448
|
-
isLoading.value = false;
|
|
7449
|
-
nextTick(() => {
|
|
7450
|
-
holder.update();
|
|
7451
|
-
});
|
|
7452
|
-
watch(() => props.context.panel, () => {
|
|
7453
|
-
holder.update();
|
|
7454
|
-
}, { deep: true });
|
|
7455
|
-
watchEffect(() => {
|
|
7456
|
-
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
7457
|
-
}, { flush: "sync" });
|
|
7458
|
-
});
|
|
7459
|
-
onUnmounted(() => {
|
|
7460
|
-
props.presistedDoms.getHolder(props.entry.id, "div")?.unmount();
|
|
7461
|
-
});
|
|
7462
|
-
return (_ctx, _cache) => {
|
|
7463
|
-
return openBlock(), createElementBlock("div", {
|
|
7464
|
-
ref_key: "viewFrame",
|
|
7465
|
-
ref: viewFrame,
|
|
7466
|
-
class: "vite-devtools-view-custom-renderer w-full h-full flex items-center justify-center"
|
|
7467
|
-
}, null, 512);
|
|
7468
|
-
};
|
|
7469
|
-
}
|
|
7470
|
-
});
|
|
7471
|
-
var ViewCustomRenderer_default = _sfc_main$6;
|
|
7472
|
-
|
|
7473
|
-
//#endregion
|
|
7474
|
-
//#region src/client/webcomponents/components/ViewIframe.vue
|
|
7475
|
-
const _hoisted_1$2 = {
|
|
7476
|
-
key: 0,
|
|
7477
|
-
class: "op50 z--1"
|
|
7478
|
-
};
|
|
7479
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
7480
|
-
__name: "ViewIframe",
|
|
7481
|
-
props: {
|
|
7482
|
-
context: {},
|
|
7483
|
-
entry: {},
|
|
7484
|
-
presistedDoms: {},
|
|
7485
|
-
iframeStyle: {}
|
|
7486
|
-
},
|
|
7487
|
-
setup(__props) {
|
|
7488
|
-
const props = __props;
|
|
7489
|
-
const isLoading = ref(true);
|
|
7490
|
-
const viewFrame = useTemplateRef("viewFrame");
|
|
7491
|
-
onMounted(() => {
|
|
7492
|
-
const holder = props.presistedDoms.getOrCreateHolder(props.entry.id, "iframe");
|
|
7493
|
-
holder.element.style.boxShadow = "none";
|
|
7494
|
-
holder.element.style.outline = "none";
|
|
7495
|
-
Object.assign(holder.element.style, props.iframeStyle);
|
|
7496
|
-
if (!holder.element.src) holder.element.src = props.entry.url;
|
|
7497
|
-
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
7498
|
-
if (entryState) entryState.domElements.iframe = holder.element;
|
|
7499
|
-
holder.mount(viewFrame.value);
|
|
7500
|
-
isLoading.value = false;
|
|
7501
|
-
nextTick(() => {
|
|
7502
|
-
holder.update();
|
|
7503
|
-
});
|
|
7504
|
-
watch(() => props.context.panel, () => {
|
|
7505
|
-
holder.update();
|
|
7506
|
-
}, { deep: true });
|
|
7507
|
-
watchEffect(() => {
|
|
7508
|
-
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
7509
|
-
}, { flush: "sync" });
|
|
7510
|
-
});
|
|
7511
|
-
onUnmounted(() => {
|
|
7512
|
-
props.presistedDoms.getHolder(props.entry.id, "iframe")?.unmount();
|
|
7513
|
-
});
|
|
7514
|
-
return (_ctx, _cache) => {
|
|
7515
|
-
return openBlock(), createElementBlock("div", {
|
|
7516
|
-
ref_key: "viewFrame",
|
|
7517
|
-
ref: viewFrame,
|
|
7518
|
-
class: "vite-devtools-view-iframe w-full h-full flex items-center justify-center"
|
|
7519
|
-
}, [isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, " Loading iframe... ")) : createCommentVNode("v-if", true)], 512);
|
|
7520
|
-
};
|
|
7521
|
-
}
|
|
7522
|
-
});
|
|
7523
|
-
var ViewIframe_default = _sfc_main$5;
|
|
7524
|
-
|
|
7525
|
-
//#endregion
|
|
7526
|
-
//#region src/client/webcomponents/components/ViewLauncher.vue
|
|
7527
|
-
const _hoisted_1$1 = { class: "flex flex-col gap-4 items-center justify-center h-full relative" };
|
|
7528
|
-
const _hoisted_2 = { class: "text-2xl font-bold" };
|
|
7529
|
-
const _hoisted_3 = ["disabled"];
|
|
7530
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
7531
|
-
__name: "ViewLauncher",
|
|
7532
|
-
props: {
|
|
7533
|
-
context: {},
|
|
7534
|
-
entry: {}
|
|
7535
|
-
},
|
|
7536
|
-
setup(__props) {
|
|
7537
|
-
const props = __props;
|
|
7538
|
-
function onLaunch() {
|
|
7539
|
-
props.context.rpc.$call("vite:core:on-dock-launch", props.entry.id);
|
|
7540
|
-
}
|
|
7541
|
-
const status = computed(() => props.entry.launcher.status || "idle");
|
|
7542
|
-
const iconsMap = {
|
|
7543
|
-
error: "i-ph-warning-duotone",
|
|
7544
|
-
idle: "i-ph-rocket-launch-duotone",
|
|
7545
|
-
loading: "i-svg-spinners-8-dots-rotate",
|
|
7546
|
-
success: "i-ph-check-duotone"
|
|
7547
|
-
};
|
|
7548
|
-
const buttonText = computed(() => {
|
|
7549
|
-
if (status.value === "idle") return props.entry.launcher.buttonStart || "Launch";
|
|
7550
|
-
else if (status.value === "loading") return props.entry.launcher.buttonLoading || "Loading...";
|
|
7551
|
-
else if (status.value === "error") return "ERROR";
|
|
7552
|
-
else if (status.value === "success") return "Success";
|
|
7553
|
-
else return `UNKNOWN STATUS: ${status.value}`;
|
|
7554
|
-
});
|
|
7555
|
-
return (_ctx, _cache) => {
|
|
7556
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
7557
|
-
createVNode(DockIcon_default, {
|
|
7558
|
-
icon: __props.entry.launcher.icon || __props.entry.icon,
|
|
7559
|
-
class: "w-10 h-10"
|
|
7560
|
-
}, null, 8, ["icon"]),
|
|
7561
|
-
createBaseVNode("h1", _hoisted_2, toDisplayString(__props.entry.launcher.title), 1),
|
|
7562
|
-
createBaseVNode("p", null, toDisplayString(__props.entry.launcher.description), 1),
|
|
7563
|
-
createBaseVNode("button", {
|
|
7564
|
-
class: "bg-lime6 px4 py1 rounded hover:bg-lime7 transition-all duration-300 flex gap-2 items-center disabled:bg-gray6! disabled:pointer-events-none",
|
|
7565
|
-
disabled: status.value !== "idle",
|
|
7566
|
-
onClick: onLaunch
|
|
7567
|
-
}, [createBaseVNode("div", { class: normalizeClass(iconsMap[status.value]) }, null, 2), createBaseVNode("div", null, toDisplayString(buttonText.value), 1)], 8, _hoisted_3)
|
|
7568
|
-
]);
|
|
7569
|
-
};
|
|
7570
|
-
}
|
|
7571
|
-
});
|
|
7572
|
-
var ViewLauncher_default = _sfc_main$4;
|
|
7573
|
-
|
|
7574
|
-
//#endregion
|
|
7575
|
-
//#region src/client/webcomponents/components/ViewEntry.vue
|
|
7576
|
-
const _hoisted_1 = { key: 4 };
|
|
7577
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
7578
|
-
__name: "ViewEntry",
|
|
7579
|
-
props: {
|
|
7580
|
-
context: {},
|
|
7581
|
-
entry: {},
|
|
7582
|
-
presistedDoms: {},
|
|
7583
|
-
iframeStyle: {},
|
|
7584
|
-
divStyle: {}
|
|
7585
|
-
},
|
|
7586
|
-
setup(__props) {
|
|
7587
|
-
return (_ctx, _cache) => {
|
|
7588
|
-
return __props.entry.type === "action" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [], 64)) : __props.entry.type === "iframe" ? (openBlock(), createBlock(ViewIframe_default, {
|
|
7589
|
-
key: 1,
|
|
7590
|
-
context: __props.context,
|
|
7591
|
-
entry: __props.entry,
|
|
7592
|
-
"presisted-doms": __props.presistedDoms,
|
|
7593
|
-
"iframe-style": __props.iframeStyle
|
|
7594
|
-
}, null, 8, [
|
|
7595
|
-
"context",
|
|
7596
|
-
"entry",
|
|
7597
|
-
"presisted-doms",
|
|
7598
|
-
"iframe-style"
|
|
7599
|
-
])) : __props.entry.type === "custom-render" ? (openBlock(), createBlock(ViewCustomRenderer_default, {
|
|
7600
|
-
key: 2,
|
|
7601
|
-
context: __props.context,
|
|
7602
|
-
entry: __props.entry,
|
|
7603
|
-
"presisted-doms": __props.presistedDoms,
|
|
7604
|
-
"div-style": __props.divStyle
|
|
7605
|
-
}, null, 8, [
|
|
7606
|
-
"context",
|
|
7607
|
-
"entry",
|
|
7608
|
-
"presisted-doms",
|
|
7609
|
-
"div-style"
|
|
7610
|
-
])) : __props.entry.type === "launcher" ? (openBlock(), createBlock(ViewLauncher_default, {
|
|
7611
|
-
key: 3,
|
|
7612
|
-
context: __props.context,
|
|
7613
|
-
entry: __props.entry
|
|
7614
|
-
}, null, 8, ["context", "entry"])) : (openBlock(), createElementBlock("div", _hoisted_1, " Unknown entry: " + toDisplayString(__props.entry), 1));
|
|
7615
|
-
};
|
|
7616
|
-
}
|
|
7617
|
-
});
|
|
7618
|
-
var ViewEntry_default = _sfc_main$3;
|
|
7619
|
-
|
|
7620
|
-
//#endregion
|
|
7621
|
-
//#region src/client/webcomponents/components/DockPanel.vue
|
|
7622
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7623
|
-
__name: "DockPanel",
|
|
7624
|
-
props: {
|
|
7625
|
-
context: {},
|
|
7626
|
-
selected: {},
|
|
7627
|
-
dockEl: {},
|
|
7628
|
-
panelMargins: {}
|
|
7629
|
-
},
|
|
7630
|
-
setup(__props) {
|
|
7631
|
-
const props = __props;
|
|
7632
|
-
const context = props.context;
|
|
7633
|
-
const { selected, panelMargins } = toRefs(props);
|
|
7634
|
-
const windowSize = reactive(useWindowSize());
|
|
7635
|
-
const isHovering = ref(false);
|
|
7636
|
-
const mousePosition = reactive({
|
|
7637
|
-
x: 0,
|
|
7638
|
-
y: 0
|
|
7639
|
-
});
|
|
7640
|
-
const dockPanel = useTemplateRef("dockPanel");
|
|
7641
|
-
const viewsContainer = useTemplateRef("viewsContainer");
|
|
7642
|
-
const presistedDoms = markRaw(new PresistedDomViewsManager(viewsContainer));
|
|
7643
|
-
function clamp$1(value, min, max) {
|
|
7644
|
-
return Math.min(Math.max(value, min), max);
|
|
7645
|
-
}
|
|
7646
|
-
const anchorPos = computed(() => {
|
|
7647
|
-
const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
|
|
7648
|
-
const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
|
|
7649
|
-
const store = context.panel.store;
|
|
7650
|
-
const left = store.left * windowSize.width / 100;
|
|
7651
|
-
const top = store.top * windowSize.height / 100;
|
|
7652
|
-
switch (store.position) {
|
|
7653
|
-
case "top": return {
|
|
7654
|
-
left: clamp$1(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
|
|
7655
|
-
top: panelMargins.value.top + halfHeight
|
|
7656
|
-
};
|
|
7657
|
-
case "right": return {
|
|
7658
|
-
left: windowSize.width - panelMargins.value.right - halfHeight,
|
|
7659
|
-
top: clamp$1(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
|
|
7660
|
-
};
|
|
7661
|
-
case "left": return {
|
|
7662
|
-
left: panelMargins.value.left + halfHeight,
|
|
7663
|
-
top: clamp$1(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
|
|
7664
|
-
};
|
|
7665
|
-
case "bottom":
|
|
7666
|
-
default: return {
|
|
7667
|
-
left: clamp$1(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
|
|
7668
|
-
top: windowSize.height - panelMargins.value.bottom - halfHeight
|
|
7669
|
-
};
|
|
7670
|
-
}
|
|
7671
|
-
});
|
|
7672
|
-
let _timer = null;
|
|
7673
|
-
function bringUp() {
|
|
7674
|
-
isHovering.value = true;
|
|
7675
|
-
if (context.panel.store.inactiveTimeout < 0) return;
|
|
7676
|
-
if (_timer) clearTimeout(_timer);
|
|
7677
|
-
_timer = setTimeout(() => {
|
|
7678
|
-
isHovering.value = false;
|
|
7679
|
-
}, +context.panel.store.inactiveTimeout || 0);
|
|
7680
|
-
}
|
|
7681
|
-
const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
|
|
7682
|
-
const panelStyle = computed(() => {
|
|
7683
|
-
mousePosition.x, mousePosition.y;
|
|
7684
|
-
const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
|
|
7685
|
-
const frameMargin = {
|
|
7686
|
-
left: panelMargins.value.left + halfHeight,
|
|
7687
|
-
top: panelMargins.value.top + halfHeight,
|
|
7688
|
-
right: panelMargins.value.right + halfHeight,
|
|
7689
|
-
bottom: panelMargins.value.bottom + halfHeight
|
|
7690
|
-
};
|
|
7691
|
-
const marginHorizontal = frameMargin.left + frameMargin.right;
|
|
7692
|
-
const marginVertical = frameMargin.top + frameMargin.bottom;
|
|
7693
|
-
const maxWidth = windowSize.width - marginHorizontal;
|
|
7694
|
-
const maxHeight = windowSize.height - marginVertical;
|
|
7695
|
-
const panel = context.panel;
|
|
7696
|
-
const store = panel.store;
|
|
7697
|
-
const style = {
|
|
7698
|
-
position: "fixed",
|
|
7699
|
-
pointerEvents: panel.isDragging || panel.isResizing ? "none" : "auto",
|
|
7700
|
-
width: `min(${store.width}vw, calc(100vw - ${marginHorizontal}px))`,
|
|
7701
|
-
height: `min(${store.height}vh, calc(100vh - ${marginVertical}px))`
|
|
7702
|
-
};
|
|
7703
|
-
const anchor = anchorPos.value;
|
|
7704
|
-
const width = Math.min(maxWidth, store.width * windowSize.width / 100);
|
|
7705
|
-
const height = Math.min(maxHeight, store.height * windowSize.height / 100);
|
|
7706
|
-
const anchorX = anchor?.left || 0;
|
|
7707
|
-
const anchorY = anchor?.top || 0;
|
|
7708
|
-
switch (store.position) {
|
|
7709
|
-
case "top":
|
|
7710
|
-
case "bottom":
|
|
7711
|
-
style.left = `${-frameWidth.value / 2}px`;
|
|
7712
|
-
style.transform = "translate(0, 0)";
|
|
7713
|
-
if (anchorX - frameMargin.left < width / 2) style.left = `${width / 2 - anchorX + frameMargin.left - frameWidth.value / 2}px`;
|
|
7714
|
-
else if (windowSize.width - anchorX - frameMargin.right < width / 2) style.left = `${windowSize.width - anchorX - width / 2 - frameMargin.right - frameWidth.value / 2}px`;
|
|
7715
|
-
break;
|
|
7716
|
-
case "right":
|
|
7717
|
-
case "left":
|
|
7718
|
-
style.top = `${-frameHeight.value / 2}px`;
|
|
7719
|
-
style.transform = "translate(0, 0)";
|
|
7720
|
-
if (anchorY - frameMargin.top < height / 2) style.top = `${height / 2 - anchorY + frameMargin.top - frameHeight.value / 2}px`;
|
|
7721
|
-
else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
|
|
7722
|
-
break;
|
|
7723
|
-
}
|
|
7724
|
-
switch (store.position) {
|
|
7725
|
-
case "top":
|
|
7726
|
-
style.top = 0;
|
|
7727
|
-
break;
|
|
7728
|
-
case "right":
|
|
7729
|
-
style.right = 0;
|
|
7730
|
-
break;
|
|
7731
|
-
case "left":
|
|
7732
|
-
style.left = 0;
|
|
7733
|
-
break;
|
|
7734
|
-
case "bottom":
|
|
7735
|
-
default:
|
|
7736
|
-
style.bottom = 0;
|
|
7737
|
-
break;
|
|
7738
|
-
}
|
|
7739
|
-
return style;
|
|
7740
|
-
});
|
|
7741
|
-
onMounted(() => {
|
|
7742
|
-
bringUp();
|
|
7743
|
-
});
|
|
7744
|
-
return (_ctx, _cache) => {
|
|
7745
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
7746
|
-
ref_key: "dockPanel",
|
|
7747
|
-
ref: dockPanel,
|
|
7748
|
-
class: "bg-glass rounded-lg border border-base shadow",
|
|
7749
|
-
style: normalizeStyle(panelStyle.value)
|
|
7750
|
-
}, [
|
|
7751
|
-
createVNode(DockPanelResizer_default, { panel: unref(context).panel }, null, 8, ["panel"]),
|
|
7752
|
-
unref(selected) && viewsContainer.value ? (openBlock(), createBlock(ViewEntry_default, {
|
|
7753
|
-
key: unref(selected).id,
|
|
7754
|
-
context: unref(context),
|
|
7755
|
-
entry: unref(selected),
|
|
7756
|
-
"presisted-doms": unref(presistedDoms),
|
|
7757
|
-
"iframe-style": {
|
|
7758
|
-
border: "1px solid #8883",
|
|
7759
|
-
borderRadius: "0.5rem"
|
|
7760
|
-
}
|
|
7761
|
-
}, null, 8, [
|
|
7762
|
-
"context",
|
|
7763
|
-
"entry",
|
|
7764
|
-
"presisted-doms"
|
|
7765
|
-
])) : createCommentVNode("v-if", true),
|
|
7766
|
-
createBaseVNode("div", {
|
|
7767
|
-
id: "vite-devtools-views-container",
|
|
7768
|
-
ref_key: "viewsContainer",
|
|
7769
|
-
ref: viewsContainer,
|
|
7770
|
-
class: "absolute inset-0 pointer-events-none"
|
|
7771
|
-
}, null, 512)
|
|
7772
|
-
], 4)), [[vShow, unref(context).docks.selected && unref(context).docks.selected.type !== "action"]]);
|
|
7773
|
-
};
|
|
7774
|
-
}
|
|
7775
|
-
});
|
|
7776
|
-
var DockPanel_default = _sfc_main$2;
|
|
7777
|
-
|
|
7778
|
-
//#endregion
|
|
7779
|
-
//#region src/client/webcomponents/components/FloatingTooltip.vue
|
|
7780
|
-
const DETECT_MARGIN = 100;
|
|
7781
|
-
const GAP = 10;
|
|
7782
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7783
|
-
__name: "FloatingTooltip",
|
|
7784
|
-
setup(__props) {
|
|
7785
|
-
const current = useFloatingTooltip();
|
|
7786
|
-
const box = ref({
|
|
7787
|
-
text: "",
|
|
7788
|
-
width: 0,
|
|
7789
|
-
height: 0,
|
|
7790
|
-
left: 0,
|
|
7791
|
-
top: 0
|
|
7792
|
-
});
|
|
7793
|
-
const align = computed(() => {
|
|
7794
|
-
const vw = window.innerWidth;
|
|
7795
|
-
const vh = window.innerHeight;
|
|
7796
|
-
if (box.value.left < DETECT_MARGIN) return "right";
|
|
7797
|
-
if (box.value.left + box.value.width > vw - DETECT_MARGIN) return "left";
|
|
7798
|
-
if (box.value.top < DETECT_MARGIN) return "bottom";
|
|
7799
|
-
if (box.value.top + box.value.height > vh - DETECT_MARGIN) return "top";
|
|
7800
|
-
return "bottom";
|
|
7801
|
-
});
|
|
7802
|
-
const style = computed(() => {
|
|
7803
|
-
switch (align.value) {
|
|
7804
|
-
case "bottom": return {
|
|
7805
|
-
left: `${box.value.left + box.value.width / 2}px`,
|
|
7806
|
-
top: `${box.value.top + box.value.height + GAP}px`,
|
|
7807
|
-
transform: "translateX(-50%)"
|
|
7808
|
-
};
|
|
7809
|
-
case "top": return {
|
|
7810
|
-
left: `${box.value.left + box.value.width / 2}px`,
|
|
7811
|
-
bottom: `${window.innerHeight - box.value.top + GAP}px`,
|
|
7812
|
-
transform: "translateX(-50%)"
|
|
7813
|
-
};
|
|
7814
|
-
case "left": return {
|
|
7815
|
-
right: `${window.innerWidth - box.value.left + GAP}px`,
|
|
7816
|
-
top: `${box.value.top + box.value.height / 2}px`,
|
|
7817
|
-
transform: "translateY(-50%)"
|
|
7818
|
-
};
|
|
7819
|
-
case "right": return {
|
|
7820
|
-
left: `${box.value.left + box.value.width + GAP}px`,
|
|
7821
|
-
top: `${box.value.top + box.value.height / 2}px`,
|
|
7822
|
-
transform: "translateY(-50%)"
|
|
7823
|
-
};
|
|
7824
|
-
default: throw new Error("Unreachable");
|
|
7825
|
-
}
|
|
7826
|
-
});
|
|
7827
|
-
watchEffect(() => {
|
|
7828
|
-
if (current.value) box.value = { ...current.value };
|
|
7829
|
-
});
|
|
7830
|
-
return (_ctx, _cache) => {
|
|
7831
|
-
return box.value.text ? (openBlock(), createElementBlock("div", {
|
|
7832
|
-
key: 0,
|
|
7833
|
-
class: normalizeClass(["z-floating-tooltip text-xs transition-all duration-300 w-max bg-glass border border-base rounded px2 fixed p1", unref(current) ? "op100" : "op0 pointer-events-none"]),
|
|
7834
|
-
style: normalizeStyle(style.value)
|
|
7835
|
-
}, toDisplayString(box.value.text), 7)) : createCommentVNode("v-if", true);
|
|
7836
|
-
};
|
|
7837
|
-
}
|
|
7838
|
-
});
|
|
7839
|
-
var FloatingTooltip_default = _sfc_main$1;
|
|
7840
|
-
|
|
7841
|
-
//#endregion
|
|
7842
|
-
//#region src/client/webcomponents/components/DockEmbedded.vue
|
|
7843
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7844
|
-
__name: "DockEmbedded",
|
|
7845
|
-
props: { context: {} },
|
|
7846
|
-
setup(__props) {
|
|
7847
|
-
return (_ctx, _cache) => {
|
|
7848
|
-
return openBlock(), createElementBlock(Fragment, null, [createVNode(Dock_default, { context: __props.context }, {
|
|
7849
|
-
default: withCtx(({ dockEl, panelMargins, selected }) => [createVNode(DockPanel_default, {
|
|
7850
|
-
context: __props.context,
|
|
7851
|
-
selected,
|
|
7852
|
-
"dock-el": dockEl,
|
|
7853
|
-
"panel-margins": panelMargins
|
|
7854
|
-
}, null, 8, [
|
|
7855
|
-
"context",
|
|
7856
|
-
"selected",
|
|
7857
|
-
"dock-el",
|
|
7858
|
-
"panel-margins"
|
|
7859
|
-
])]),
|
|
7860
|
-
_: 1
|
|
7861
|
-
}, 8, ["context"]), createVNode(FloatingTooltip_default)], 64);
|
|
7862
|
-
};
|
|
7863
|
-
}
|
|
7864
|
-
});
|
|
7865
|
-
var DockEmbedded_default = _sfc_main;
|
|
7866
|
-
|
|
7867
|
-
//#endregion
|
|
7868
|
-
//#region src/client/webcomponents/components/DockEmbedded.ts
|
|
7869
|
-
const DockEmbedded = defineCustomElement(DockEmbedded_default, {
|
|
7870
|
-
shadowRoot: true,
|
|
7871
|
-
styles: [css_default]
|
|
7872
|
-
});
|
|
7873
|
-
customElements.define("vite-devtools-dock-embedded", DockEmbedded);
|
|
7874
|
-
|
|
7875
|
-
//#endregion
|
|
7876
|
-
//#region src/client/webcomponents/state/dock.ts
|
|
6750
|
+
//#region src/client/webcomponents/state/docks.ts
|
|
7877
6751
|
function DEFAULT_DOCK_PANEL_STORE() {
|
|
7878
6752
|
return {
|
|
7879
6753
|
width: 80,
|
|
@@ -7886,8 +6760,8 @@ function DEFAULT_DOCK_PANEL_STORE() {
|
|
|
7886
6760
|
};
|
|
7887
6761
|
}
|
|
7888
6762
|
function createDockEntryState(entry, selected) {
|
|
7889
|
-
const events =
|
|
7890
|
-
const state
|
|
6763
|
+
const events = createEventEmitter();
|
|
6764
|
+
const state = reactive({
|
|
7891
6765
|
entryMeta: entry,
|
|
7892
6766
|
get isActive() {
|
|
7893
6767
|
return selected.value?.id === entry.id;
|
|
@@ -7899,77 +6773,30 @@ function createDockEntryState(entry, selected) {
|
|
|
7899
6773
|
if (newSelectedId === entry.id) events.emit("entry:activated");
|
|
7900
6774
|
else events.emit("entry:deactivated");
|
|
7901
6775
|
});
|
|
7902
|
-
watch(() => state
|
|
6776
|
+
watch(() => state.domElements.iframe, (newIframe) => {
|
|
7903
6777
|
if (newIframe) events.emit("dom:iframe:mounted", newIframe);
|
|
7904
6778
|
});
|
|
7905
|
-
watch(() => state
|
|
6779
|
+
watch(() => state.domElements.panel, (newPanel) => {
|
|
7906
6780
|
if (newPanel) events.emit("dom:panel:mounted", newPanel);
|
|
7907
6781
|
});
|
|
7908
|
-
return state
|
|
6782
|
+
return state;
|
|
7909
6783
|
}
|
|
7910
6784
|
let _docksEntriesRef;
|
|
7911
6785
|
async function useDocksEntries(rpcReturn) {
|
|
7912
6786
|
if (_docksEntriesRef) return _docksEntriesRef;
|
|
7913
6787
|
const dockEntries = _docksEntriesRef = shallowRef([]);
|
|
7914
6788
|
async function updateDocksEntries() {
|
|
7915
|
-
dockEntries.value = (await rpcReturn.rpc.$call("vite:
|
|
6789
|
+
dockEntries.value = (await rpcReturn.rpc.$call("vite:internal:docks:list")).map((entry) => Object.freeze(entry));
|
|
7916
6790
|
console.log("[VITE DEVTOOLS] Docks Entries Updated", [...dockEntries.value]);
|
|
7917
6791
|
}
|
|
7918
6792
|
rpcReturn.clientRpc.register({
|
|
7919
|
-
name: "vite:
|
|
6793
|
+
name: "vite:internal:docks:updated",
|
|
7920
6794
|
type: "action",
|
|
7921
6795
|
handler: () => updateDocksEntries()
|
|
7922
6796
|
});
|
|
7923
6797
|
await updateDocksEntries();
|
|
7924
6798
|
return dockEntries;
|
|
7925
6799
|
}
|
|
7926
|
-
let _docksContext;
|
|
7927
|
-
async function createDocksContext(clientType, rpcReturn, panelStore) {
|
|
7928
|
-
if (_docksContext) return _docksContext;
|
|
7929
|
-
const selectedId = ref(null);
|
|
7930
|
-
const dockEntries = await useDocksEntries(rpcReturn);
|
|
7931
|
-
const selected = computed(() => dockEntries.value.find((entry) => entry.id === selectedId.value) ?? null);
|
|
7932
|
-
const dockEntryStateMap = reactive(/* @__PURE__ */ new Map());
|
|
7933
|
-
watchEffect(() => {
|
|
7934
|
-
for (const entry of dockEntries.value) {
|
|
7935
|
-
if (dockEntryStateMap.has(entry.id)) {
|
|
7936
|
-
dockEntryStateMap.get(entry.id).entryMeta = entry;
|
|
7937
|
-
continue;
|
|
7938
|
-
}
|
|
7939
|
-
dockEntryStateMap.set(entry.id, createDockEntryState(entry, selected));
|
|
7940
|
-
}
|
|
7941
|
-
});
|
|
7942
|
-
panelStore ||= ref(DEFAULT_DOCK_PANEL_STORE());
|
|
7943
|
-
_docksContext = reactive({
|
|
7944
|
-
panel: {
|
|
7945
|
-
store: panelStore,
|
|
7946
|
-
isDragging: false,
|
|
7947
|
-
isResizing: false,
|
|
7948
|
-
isVertical: computed(() => panelStore.value.position === "left" || panelStore.value.position === "right")
|
|
7949
|
-
},
|
|
7950
|
-
docks: {
|
|
7951
|
-
selectedId,
|
|
7952
|
-
selected,
|
|
7953
|
-
entries: dockEntries,
|
|
7954
|
-
entryToStateMap: markRaw(dockEntryStateMap),
|
|
7955
|
-
getStateById: (id) => dockEntryStateMap.get(id),
|
|
7956
|
-
switchEntry: async (id) => {
|
|
7957
|
-
if (id === null) {
|
|
7958
|
-
selectedId.value = null;
|
|
7959
|
-
return true;
|
|
7960
|
-
}
|
|
7961
|
-
const entry = dockEntries.value.find((e) => e.id === id);
|
|
7962
|
-
if (!entry) return false;
|
|
7963
|
-
selectedId.value = entry.id;
|
|
7964
|
-
return true;
|
|
7965
|
-
}
|
|
7966
|
-
},
|
|
7967
|
-
rpc: rpcReturn.rpc,
|
|
7968
|
-
clientRpc: rpcReturn.clientRpc,
|
|
7969
|
-
clientType
|
|
7970
|
-
});
|
|
7971
|
-
return _docksContext;
|
|
7972
|
-
}
|
|
7973
6800
|
|
|
7974
6801
|
//#endregion
|
|
7975
|
-
export {
|
|
6802
|
+
export { watchEffect as A, normalizeStyle as B, onMounted as C, renderSlot as D, renderList as E, ref as F, shallowRef as I, toRefs$1 as L, withDirectives as M, markRaw as N, useTemplateRef as O, reactive as P, unref as R, nextTick as S, openBlock as T, toDisplayString as V, createCommentVNode as _, useEventListener as a, createVNode as b, useWindowSize as c, vShow as d, withModifiers as f, createBlock as g, createBaseVNode as h, useElementBounding as i, withCtx as j, watch as k, watchImmediate as l, computed as m, createDockEntryState as n, useLocalStorage as o, Fragment as p, useDocksEntries as r, useScreenSafeArea as s, DEFAULT_DOCK_PANEL_STORE as t, defineCustomElement as u, createElementBlock as v, onUnmounted as w, defineComponent as x, createStaticVNode as y, normalizeClass as z };
|