cck-ui 0.0.1 → 0.0.2
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/index.full.js +39 -1448
- package/dist/index.full.min.js +3 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +7 -1414
- package/es/packages/components/button/src/button-custom.mjs +2 -2
- package/es/packages/components/button/src/button-custom.mjs.map +1 -1
- package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +15 -15
- package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/packages/components/button/src/use-button.mjs +3 -3
- package/es/packages/components/button/src/use-button.mjs.map +1 -1
- package/es/packages/components/form/src/hooks/use-form-common-props.mjs +4 -4
- package/es/packages/components/form/src/hooks/use-form-common-props.mjs.map +1 -1
- package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs +6 -6
- package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/packages/hooks/use-namespace/index.mjs +4 -4
- package/es/packages/hooks/use-namespace/index.mjs.map +1 -1
- package/es/packages/hooks/use-prop/index.mjs +3 -3
- package/es/packages/hooks/use-prop/index.mjs.map +1 -1
- package/es/packages/hooks/use-theme/index.mjs +3 -3
- package/es/packages/hooks/use-theme/index.mjs.map +1 -1
- package/lib/_virtual/_rolldown/runtime.js +0 -33
- package/lib/packages/components/button/src/button-custom.js +4 -4
- package/lib/packages/components/button/src/button-custom.js.map +1 -1
- package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js +19 -19
- package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/packages/components/button/src/use-button.js +3 -3
- package/lib/packages/components/button/src/use-button.js.map +1 -1
- package/lib/packages/components/form/src/hooks/use-form-common-props.js +6 -6
- package/lib/packages/components/form/src/hooks/use-form-common-props.js.map +1 -1
- package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js +8 -8
- package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/packages/hooks/use-namespace/index.js +4 -4
- package/lib/packages/hooks/use-namespace/index.js.map +1 -1
- package/lib/packages/hooks/use-prop/index.js +3 -3
- package/lib/packages/hooks/use-prop/index.js.map +1 -1
- package/lib/packages/hooks/use-theme/index.js +3 -3
- package/lib/packages/hooks/use-theme/index.js.map +1 -1
- package/package.json +14 -6
- package/es/_virtual/_rolldown/runtime.mjs +0 -27
- package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +0 -22
- package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +0 -1
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js +0 -66
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js.map +0 -1
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js +0 -56
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js.map +0 -1
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js +0 -18
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js.map +0 -1
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js +0 -14
- package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js.map +0 -1
package/dist/index.full.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! CCK UI v0.0.
|
|
1
|
+
/*! CCK UI v0.0.2 */
|
|
2
2
|
|
|
3
3
|
(function(global, factory) {
|
|
4
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
5
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
6
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CckUi = {})));
|
|
7
|
-
})(this, function(exports) {
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CckUi = {}), global.Vue));
|
|
7
|
+
})(this, function(exports, vue) {
|
|
8
8
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
9
9
|
|
|
10
10
|
//#region ../../packages/cck-ui/make-installer.ts
|
|
@@ -1006,29 +1006,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
1006
1006
|
for (const key of str.split(",")) map[key] = 1;
|
|
1007
1007
|
return (val) => val in map;
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1010
|
-
const
|
|
1011
|
-
const NO = () => false;
|
|
1012
|
-
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
1013
|
-
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
1014
|
-
const extend = Object.assign;
|
|
1015
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1016
|
-
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
1009
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1010
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
1017
1011
|
const isArray = Array.isArray;
|
|
1018
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
1019
|
-
const isFunction = (val) => typeof val === "function";
|
|
1020
1012
|
const isString = (val) => typeof val === "string";
|
|
1021
|
-
const isSymbol = (val) => typeof val === "symbol";
|
|
1022
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
1023
|
-
const isPromise = (val) => {
|
|
1024
|
-
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
1025
|
-
};
|
|
1026
|
-
const objectToString = Object.prototype.toString;
|
|
1027
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
1028
|
-
const toRawType = (value) => {
|
|
1029
|
-
return toTypeString(value).slice(8, -1);
|
|
1030
|
-
};
|
|
1031
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
1032
1013
|
const cacheStringFunction = (fn) => {
|
|
1033
1014
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
1034
1015
|
return ((str) => {
|
|
@@ -1047,47 +1028,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
1047
1028
|
const toHandlerKey = cacheStringFunction((str) => {
|
|
1048
1029
|
return str ? `on${capitalize(str)}` : ``;
|
|
1049
1030
|
});
|
|
1050
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
1051
|
-
let _globalThis;
|
|
1052
|
-
const getGlobalThis = () => {
|
|
1053
|
-
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
1054
|
-
};
|
|
1055
|
-
function normalizeStyle(value) {
|
|
1056
|
-
if (isArray(value)) {
|
|
1057
|
-
const res = {};
|
|
1058
|
-
for (let i = 0; i < value.length; i++) {
|
|
1059
|
-
const item = value[i];
|
|
1060
|
-
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
|
1061
|
-
if (normalized) for (const key in normalized) res[key] = normalized[key];
|
|
1062
|
-
}
|
|
1063
|
-
return res;
|
|
1064
|
-
} else if (isString(value) || isObject(value)) return value;
|
|
1065
|
-
}
|
|
1066
|
-
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
1067
|
-
const propertyDelimiterRE = /:([^]+)/;
|
|
1068
|
-
const styleCommentRE = /\/\*[^]*?\*\//g;
|
|
1069
|
-
function parseStringStyle(cssText) {
|
|
1070
|
-
const ret = {};
|
|
1071
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
1072
|
-
if (item) {
|
|
1073
|
-
const tmp = item.split(propertyDelimiterRE);
|
|
1074
|
-
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1077
|
-
return ret;
|
|
1078
|
-
}
|
|
1079
|
-
function normalizeClass(value) {
|
|
1080
|
-
let res = "";
|
|
1081
|
-
if (isString(value)) res = value;
|
|
1082
|
-
else if (isArray(value)) for (let i = 0; i < value.length; i++) {
|
|
1083
|
-
const normalized = normalizeClass(value[i]);
|
|
1084
|
-
if (normalized) res += normalized + " ";
|
|
1085
|
-
}
|
|
1086
|
-
else if (isObject(value)) {
|
|
1087
|
-
for (const name in value) if (value[name]) res += name + " ";
|
|
1088
|
-
}
|
|
1089
|
-
return res.trim();
|
|
1090
|
-
}
|
|
1091
1031
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
1092
1032
|
const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
|
|
1093
1033
|
|
|
@@ -1151,1355 +1091,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
1151
1091
|
return main;
|
|
1152
1092
|
};
|
|
1153
1093
|
|
|
1154
|
-
//#endregion
|
|
1155
|
-
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.35/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
1156
|
-
/**
|
|
1157
|
-
* @vue/reactivity v3.5.35
|
|
1158
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1159
|
-
* @license MIT
|
|
1160
|
-
**/
|
|
1161
|
-
let activeSub;
|
|
1162
|
-
let batchDepth = 0;
|
|
1163
|
-
let batchedSub;
|
|
1164
|
-
let batchedComputed;
|
|
1165
|
-
function batch(sub, isComputed = false) {
|
|
1166
|
-
sub.flags |= 8;
|
|
1167
|
-
if (isComputed) {
|
|
1168
|
-
sub.next = batchedComputed;
|
|
1169
|
-
batchedComputed = sub;
|
|
1170
|
-
return;
|
|
1171
|
-
}
|
|
1172
|
-
sub.next = batchedSub;
|
|
1173
|
-
batchedSub = sub;
|
|
1174
|
-
}
|
|
1175
|
-
function startBatch() {
|
|
1176
|
-
batchDepth++;
|
|
1177
|
-
}
|
|
1178
|
-
function endBatch() {
|
|
1179
|
-
if (--batchDepth > 0) return;
|
|
1180
|
-
if (batchedComputed) {
|
|
1181
|
-
let e = batchedComputed;
|
|
1182
|
-
batchedComputed = void 0;
|
|
1183
|
-
while (e) {
|
|
1184
|
-
const next = e.next;
|
|
1185
|
-
e.next = void 0;
|
|
1186
|
-
e.flags &= -9;
|
|
1187
|
-
e = next;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
let error;
|
|
1191
|
-
while (batchedSub) {
|
|
1192
|
-
let e = batchedSub;
|
|
1193
|
-
batchedSub = void 0;
|
|
1194
|
-
while (e) {
|
|
1195
|
-
const next = e.next;
|
|
1196
|
-
e.next = void 0;
|
|
1197
|
-
e.flags &= -9;
|
|
1198
|
-
if (e.flags & 1) try {
|
|
1199
|
-
e.trigger();
|
|
1200
|
-
} catch (err) {
|
|
1201
|
-
if (!error) error = err;
|
|
1202
|
-
}
|
|
1203
|
-
e = next;
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
if (error) throw error;
|
|
1207
|
-
}
|
|
1208
|
-
function prepareDeps(sub) {
|
|
1209
|
-
for (let link = sub.deps; link; link = link.nextDep) {
|
|
1210
|
-
link.version = -1;
|
|
1211
|
-
link.prevActiveLink = link.dep.activeLink;
|
|
1212
|
-
link.dep.activeLink = link;
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
function cleanupDeps(sub) {
|
|
1216
|
-
let head;
|
|
1217
|
-
let tail = sub.depsTail;
|
|
1218
|
-
let link = tail;
|
|
1219
|
-
while (link) {
|
|
1220
|
-
const prev = link.prevDep;
|
|
1221
|
-
if (link.version === -1) {
|
|
1222
|
-
if (link === tail) tail = prev;
|
|
1223
|
-
removeSub(link);
|
|
1224
|
-
removeDep(link);
|
|
1225
|
-
} else head = link;
|
|
1226
|
-
link.dep.activeLink = link.prevActiveLink;
|
|
1227
|
-
link.prevActiveLink = void 0;
|
|
1228
|
-
link = prev;
|
|
1229
|
-
}
|
|
1230
|
-
sub.deps = head;
|
|
1231
|
-
sub.depsTail = tail;
|
|
1232
|
-
}
|
|
1233
|
-
function isDirty(sub) {
|
|
1234
|
-
for (let link = sub.deps; link; link = link.nextDep) if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) return true;
|
|
1235
|
-
if (sub._dirty) return true;
|
|
1236
|
-
return false;
|
|
1237
|
-
}
|
|
1238
|
-
function refreshComputed(computed) {
|
|
1239
|
-
if (computed.flags & 4 && !(computed.flags & 16)) return;
|
|
1240
|
-
computed.flags &= -17;
|
|
1241
|
-
if (computed.globalVersion === globalVersion) return;
|
|
1242
|
-
computed.globalVersion = globalVersion;
|
|
1243
|
-
if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) return;
|
|
1244
|
-
computed.flags |= 2;
|
|
1245
|
-
const dep = computed.dep;
|
|
1246
|
-
const prevSub = activeSub;
|
|
1247
|
-
const prevShouldTrack = shouldTrack;
|
|
1248
|
-
activeSub = computed;
|
|
1249
|
-
shouldTrack = true;
|
|
1250
|
-
try {
|
|
1251
|
-
prepareDeps(computed);
|
|
1252
|
-
const value = computed.fn(computed._value);
|
|
1253
|
-
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
1254
|
-
computed.flags |= 128;
|
|
1255
|
-
computed._value = value;
|
|
1256
|
-
dep.version++;
|
|
1257
|
-
}
|
|
1258
|
-
} catch (err) {
|
|
1259
|
-
dep.version++;
|
|
1260
|
-
throw err;
|
|
1261
|
-
} finally {
|
|
1262
|
-
activeSub = prevSub;
|
|
1263
|
-
shouldTrack = prevShouldTrack;
|
|
1264
|
-
cleanupDeps(computed);
|
|
1265
|
-
computed.flags &= -3;
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
function removeSub(link, soft = false) {
|
|
1269
|
-
const { dep, prevSub, nextSub } = link;
|
|
1270
|
-
if (prevSub) {
|
|
1271
|
-
prevSub.nextSub = nextSub;
|
|
1272
|
-
link.prevSub = void 0;
|
|
1273
|
-
}
|
|
1274
|
-
if (nextSub) {
|
|
1275
|
-
nextSub.prevSub = prevSub;
|
|
1276
|
-
link.nextSub = void 0;
|
|
1277
|
-
}
|
|
1278
|
-
if (dep.subs === link) {
|
|
1279
|
-
dep.subs = prevSub;
|
|
1280
|
-
if (!prevSub && dep.computed) {
|
|
1281
|
-
dep.computed.flags &= -5;
|
|
1282
|
-
for (let l = dep.computed.deps; l; l = l.nextDep) removeSub(l, true);
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
if (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);
|
|
1286
|
-
}
|
|
1287
|
-
function removeDep(link) {
|
|
1288
|
-
const { prevDep, nextDep } = link;
|
|
1289
|
-
if (prevDep) {
|
|
1290
|
-
prevDep.nextDep = nextDep;
|
|
1291
|
-
link.prevDep = void 0;
|
|
1292
|
-
}
|
|
1293
|
-
if (nextDep) {
|
|
1294
|
-
nextDep.prevDep = prevDep;
|
|
1295
|
-
link.nextDep = void 0;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
let shouldTrack = true;
|
|
1299
|
-
const trackStack = [];
|
|
1300
|
-
function pauseTracking() {
|
|
1301
|
-
trackStack.push(shouldTrack);
|
|
1302
|
-
shouldTrack = false;
|
|
1303
|
-
}
|
|
1304
|
-
function resetTracking() {
|
|
1305
|
-
const last = trackStack.pop();
|
|
1306
|
-
shouldTrack = last === void 0 ? true : last;
|
|
1307
|
-
}
|
|
1308
|
-
let globalVersion = 0;
|
|
1309
|
-
var Link = class {
|
|
1310
|
-
constructor(sub, dep) {
|
|
1311
|
-
this.sub = sub;
|
|
1312
|
-
this.dep = dep;
|
|
1313
|
-
this.version = dep.version;
|
|
1314
|
-
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
var Dep = class {
|
|
1318
|
-
constructor(computed) {
|
|
1319
|
-
this.computed = computed;
|
|
1320
|
-
this.version = 0;
|
|
1321
|
-
this.activeLink = void 0;
|
|
1322
|
-
this.subs = void 0;
|
|
1323
|
-
this.map = void 0;
|
|
1324
|
-
this.key = void 0;
|
|
1325
|
-
this.sc = 0;
|
|
1326
|
-
this.__v_skip = true;
|
|
1327
|
-
}
|
|
1328
|
-
track(debugInfo) {
|
|
1329
|
-
if (!activeSub || !shouldTrack || activeSub === this.computed) return;
|
|
1330
|
-
let link = this.activeLink;
|
|
1331
|
-
if (link === void 0 || link.sub !== activeSub) {
|
|
1332
|
-
link = this.activeLink = new Link(activeSub, this);
|
|
1333
|
-
if (!activeSub.deps) activeSub.deps = activeSub.depsTail = link;
|
|
1334
|
-
else {
|
|
1335
|
-
link.prevDep = activeSub.depsTail;
|
|
1336
|
-
activeSub.depsTail.nextDep = link;
|
|
1337
|
-
activeSub.depsTail = link;
|
|
1338
|
-
}
|
|
1339
|
-
addSub(link);
|
|
1340
|
-
} else if (link.version === -1) {
|
|
1341
|
-
link.version = this.version;
|
|
1342
|
-
if (link.nextDep) {
|
|
1343
|
-
const next = link.nextDep;
|
|
1344
|
-
next.prevDep = link.prevDep;
|
|
1345
|
-
if (link.prevDep) link.prevDep.nextDep = next;
|
|
1346
|
-
link.prevDep = activeSub.depsTail;
|
|
1347
|
-
link.nextDep = void 0;
|
|
1348
|
-
activeSub.depsTail.nextDep = link;
|
|
1349
|
-
activeSub.depsTail = link;
|
|
1350
|
-
if (activeSub.deps === link) activeSub.deps = next;
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
return link;
|
|
1354
|
-
}
|
|
1355
|
-
trigger(debugInfo) {
|
|
1356
|
-
this.version++;
|
|
1357
|
-
globalVersion++;
|
|
1358
|
-
this.notify(debugInfo);
|
|
1359
|
-
}
|
|
1360
|
-
notify(debugInfo) {
|
|
1361
|
-
startBatch();
|
|
1362
|
-
try {
|
|
1363
|
-
for (let link = this.subs; link; link = link.prevSub) if (link.sub.notify()) link.sub.dep.notify();
|
|
1364
|
-
} finally {
|
|
1365
|
-
endBatch();
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
};
|
|
1369
|
-
function addSub(link) {
|
|
1370
|
-
link.dep.sc++;
|
|
1371
|
-
if (link.sub.flags & 4) {
|
|
1372
|
-
const computed = link.dep.computed;
|
|
1373
|
-
if (computed && !link.dep.subs) {
|
|
1374
|
-
computed.flags |= 20;
|
|
1375
|
-
for (let l = computed.deps; l; l = l.nextDep) addSub(l);
|
|
1376
|
-
}
|
|
1377
|
-
const currentTail = link.dep.subs;
|
|
1378
|
-
if (currentTail !== link) {
|
|
1379
|
-
link.prevSub = currentTail;
|
|
1380
|
-
if (currentTail) currentTail.nextSub = link;
|
|
1381
|
-
}
|
|
1382
|
-
link.dep.subs = link;
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
1386
|
-
const ITERATE_KEY = /* @__PURE__ */ Symbol("");
|
|
1387
|
-
const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol("");
|
|
1388
|
-
const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol("");
|
|
1389
|
-
function track(target, type, key) {
|
|
1390
|
-
if (shouldTrack && activeSub) {
|
|
1391
|
-
let depsMap = targetMap.get(target);
|
|
1392
|
-
if (!depsMap) targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
1393
|
-
let dep = depsMap.get(key);
|
|
1394
|
-
if (!dep) {
|
|
1395
|
-
depsMap.set(key, dep = new Dep());
|
|
1396
|
-
dep.map = depsMap;
|
|
1397
|
-
dep.key = key;
|
|
1398
|
-
}
|
|
1399
|
-
dep.track();
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
1403
|
-
const depsMap = targetMap.get(target);
|
|
1404
|
-
if (!depsMap) {
|
|
1405
|
-
globalVersion++;
|
|
1406
|
-
return;
|
|
1407
|
-
}
|
|
1408
|
-
const run = (dep) => {
|
|
1409
|
-
if (dep) dep.trigger();
|
|
1410
|
-
};
|
|
1411
|
-
startBatch();
|
|
1412
|
-
if (type === "clear") depsMap.forEach(run);
|
|
1413
|
-
else {
|
|
1414
|
-
const targetIsArray = isArray(target);
|
|
1415
|
-
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
1416
|
-
if (targetIsArray && key === "length") {
|
|
1417
|
-
const newLength = Number(newValue);
|
|
1418
|
-
depsMap.forEach((dep, key2) => {
|
|
1419
|
-
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) run(dep);
|
|
1420
|
-
});
|
|
1421
|
-
} else {
|
|
1422
|
-
if (key !== void 0 || depsMap.has(void 0)) run(depsMap.get(key));
|
|
1423
|
-
if (isArrayIndex) run(depsMap.get(ARRAY_ITERATE_KEY));
|
|
1424
|
-
switch (type) {
|
|
1425
|
-
case "add":
|
|
1426
|
-
if (!targetIsArray) {
|
|
1427
|
-
run(depsMap.get(ITERATE_KEY));
|
|
1428
|
-
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
1429
|
-
} else if (isArrayIndex) run(depsMap.get("length"));
|
|
1430
|
-
break;
|
|
1431
|
-
case "delete":
|
|
1432
|
-
if (!targetIsArray) {
|
|
1433
|
-
run(depsMap.get(ITERATE_KEY));
|
|
1434
|
-
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
1435
|
-
}
|
|
1436
|
-
break;
|
|
1437
|
-
case "set":
|
|
1438
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
1439
|
-
break;
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
endBatch();
|
|
1444
|
-
}
|
|
1445
|
-
function reactiveReadArray(array) {
|
|
1446
|
-
const raw = /* @__PURE__ */ toRaw(array);
|
|
1447
|
-
if (raw === array) return raw;
|
|
1448
|
-
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1449
|
-
return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
|
|
1450
|
-
}
|
|
1451
|
-
function shallowReadArray(arr) {
|
|
1452
|
-
track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
1453
|
-
return arr;
|
|
1454
|
-
}
|
|
1455
|
-
function toWrapped(target, item) {
|
|
1456
|
-
if (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
1457
|
-
return toReactive(item);
|
|
1458
|
-
}
|
|
1459
|
-
const arrayInstrumentations = {
|
|
1460
|
-
__proto__: null,
|
|
1461
|
-
[Symbol.iterator]() {
|
|
1462
|
-
return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
|
|
1463
|
-
},
|
|
1464
|
-
concat(...args) {
|
|
1465
|
-
return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
|
|
1466
|
-
},
|
|
1467
|
-
entries() {
|
|
1468
|
-
return iterator(this, "entries", (value) => {
|
|
1469
|
-
value[1] = toWrapped(this, value[1]);
|
|
1470
|
-
return value;
|
|
1471
|
-
});
|
|
1472
|
-
},
|
|
1473
|
-
every(fn, thisArg) {
|
|
1474
|
-
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
1475
|
-
},
|
|
1476
|
-
filter(fn, thisArg) {
|
|
1477
|
-
return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
|
|
1478
|
-
},
|
|
1479
|
-
find(fn, thisArg) {
|
|
1480
|
-
return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
|
|
1481
|
-
},
|
|
1482
|
-
findIndex(fn, thisArg) {
|
|
1483
|
-
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1484
|
-
},
|
|
1485
|
-
findLast(fn, thisArg) {
|
|
1486
|
-
return apply(this, "findLast", fn, thisArg, (item) => toWrapped(this, item), arguments);
|
|
1487
|
-
},
|
|
1488
|
-
findLastIndex(fn, thisArg) {
|
|
1489
|
-
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
1490
|
-
},
|
|
1491
|
-
forEach(fn, thisArg) {
|
|
1492
|
-
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
1493
|
-
},
|
|
1494
|
-
includes(...args) {
|
|
1495
|
-
return searchProxy(this, "includes", args);
|
|
1496
|
-
},
|
|
1497
|
-
indexOf(...args) {
|
|
1498
|
-
return searchProxy(this, "indexOf", args);
|
|
1499
|
-
},
|
|
1500
|
-
join(separator) {
|
|
1501
|
-
return reactiveReadArray(this).join(separator);
|
|
1502
|
-
},
|
|
1503
|
-
lastIndexOf(...args) {
|
|
1504
|
-
return searchProxy(this, "lastIndexOf", args);
|
|
1505
|
-
},
|
|
1506
|
-
map(fn, thisArg) {
|
|
1507
|
-
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
1508
|
-
},
|
|
1509
|
-
pop() {
|
|
1510
|
-
return noTracking(this, "pop");
|
|
1511
|
-
},
|
|
1512
|
-
push(...args) {
|
|
1513
|
-
return noTracking(this, "push", args);
|
|
1514
|
-
},
|
|
1515
|
-
reduce(fn, ...args) {
|
|
1516
|
-
return reduce(this, "reduce", fn, args);
|
|
1517
|
-
},
|
|
1518
|
-
reduceRight(fn, ...args) {
|
|
1519
|
-
return reduce(this, "reduceRight", fn, args);
|
|
1520
|
-
},
|
|
1521
|
-
shift() {
|
|
1522
|
-
return noTracking(this, "shift");
|
|
1523
|
-
},
|
|
1524
|
-
some(fn, thisArg) {
|
|
1525
|
-
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
1526
|
-
},
|
|
1527
|
-
splice(...args) {
|
|
1528
|
-
return noTracking(this, "splice", args);
|
|
1529
|
-
},
|
|
1530
|
-
toReversed() {
|
|
1531
|
-
return reactiveReadArray(this).toReversed();
|
|
1532
|
-
},
|
|
1533
|
-
toSorted(comparer) {
|
|
1534
|
-
return reactiveReadArray(this).toSorted(comparer);
|
|
1535
|
-
},
|
|
1536
|
-
toSpliced(...args) {
|
|
1537
|
-
return reactiveReadArray(this).toSpliced(...args);
|
|
1538
|
-
},
|
|
1539
|
-
unshift(...args) {
|
|
1540
|
-
return noTracking(this, "unshift", args);
|
|
1541
|
-
},
|
|
1542
|
-
values() {
|
|
1543
|
-
return iterator(this, "values", (item) => toWrapped(this, item));
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1546
|
-
function iterator(self, method, wrapValue) {
|
|
1547
|
-
const arr = shallowReadArray(self);
|
|
1548
|
-
const iter = arr[method]();
|
|
1549
|
-
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
1550
|
-
iter._next = iter.next;
|
|
1551
|
-
iter.next = () => {
|
|
1552
|
-
const result = iter._next();
|
|
1553
|
-
if (!result.done) result.value = wrapValue(result.value);
|
|
1554
|
-
return result;
|
|
1555
|
-
};
|
|
1556
|
-
}
|
|
1557
|
-
return iter;
|
|
1558
|
-
}
|
|
1559
|
-
const arrayProto = Array.prototype;
|
|
1560
|
-
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1561
|
-
const arr = shallowReadArray(self);
|
|
1562
|
-
const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
|
|
1563
|
-
const methodFn = arr[method];
|
|
1564
|
-
if (methodFn !== arrayProto[method]) {
|
|
1565
|
-
const result2 = methodFn.apply(self, args);
|
|
1566
|
-
return needsWrap ? toReactive(result2) : result2;
|
|
1567
|
-
}
|
|
1568
|
-
let wrappedFn = fn;
|
|
1569
|
-
if (arr !== self) {
|
|
1570
|
-
if (needsWrap) wrappedFn = function(item, index) {
|
|
1571
|
-
return fn.call(this, toWrapped(self, item), index, self);
|
|
1572
|
-
};
|
|
1573
|
-
else if (fn.length > 2) wrappedFn = function(item, index) {
|
|
1574
|
-
return fn.call(this, item, index, self);
|
|
1575
|
-
};
|
|
1576
|
-
}
|
|
1577
|
-
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
1578
|
-
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
1579
|
-
}
|
|
1580
|
-
function reduce(self, method, fn, args) {
|
|
1581
|
-
const arr = shallowReadArray(self);
|
|
1582
|
-
const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
|
|
1583
|
-
let wrappedFn = fn;
|
|
1584
|
-
let wrapInitialAccumulator = false;
|
|
1585
|
-
if (arr !== self) {
|
|
1586
|
-
if (needsWrap) {
|
|
1587
|
-
wrapInitialAccumulator = args.length === 0;
|
|
1588
|
-
wrappedFn = function(acc, item, index) {
|
|
1589
|
-
if (wrapInitialAccumulator) {
|
|
1590
|
-
wrapInitialAccumulator = false;
|
|
1591
|
-
acc = toWrapped(self, acc);
|
|
1592
|
-
}
|
|
1593
|
-
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
1594
|
-
};
|
|
1595
|
-
} else if (fn.length > 3) wrappedFn = function(acc, item, index) {
|
|
1596
|
-
return fn.call(this, acc, item, index, self);
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
const result = arr[method](wrappedFn, ...args);
|
|
1600
|
-
return wrapInitialAccumulator ? toWrapped(self, result) : result;
|
|
1601
|
-
}
|
|
1602
|
-
function searchProxy(self, method, args) {
|
|
1603
|
-
const arr = /* @__PURE__ */ toRaw(self);
|
|
1604
|
-
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
1605
|
-
const res = arr[method](...args);
|
|
1606
|
-
if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
|
|
1607
|
-
args[0] = /* @__PURE__ */ toRaw(args[0]);
|
|
1608
|
-
return arr[method](...args);
|
|
1609
|
-
}
|
|
1610
|
-
return res;
|
|
1611
|
-
}
|
|
1612
|
-
function noTracking(self, method, args = []) {
|
|
1613
|
-
pauseTracking();
|
|
1614
|
-
startBatch();
|
|
1615
|
-
const res = (/* @__PURE__ */ toRaw(self))[method].apply(self, args);
|
|
1616
|
-
endBatch();
|
|
1617
|
-
resetTracking();
|
|
1618
|
-
return res;
|
|
1619
|
-
}
|
|
1620
|
-
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1621
|
-
const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1622
|
-
function hasOwnProperty(key) {
|
|
1623
|
-
if (!isSymbol(key)) key = String(key);
|
|
1624
|
-
const obj = /* @__PURE__ */ toRaw(this);
|
|
1625
|
-
track(obj, "has", key);
|
|
1626
|
-
return obj.hasOwnProperty(key);
|
|
1627
|
-
}
|
|
1628
|
-
var BaseReactiveHandler = class {
|
|
1629
|
-
constructor(_isReadonly = false, _isShallow = false) {
|
|
1630
|
-
this._isReadonly = _isReadonly;
|
|
1631
|
-
this._isShallow = _isShallow;
|
|
1632
|
-
}
|
|
1633
|
-
get(target, key, receiver) {
|
|
1634
|
-
if (key === "__v_skip") return target["__v_skip"];
|
|
1635
|
-
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
1636
|
-
if (key === "__v_isReactive") return !isReadonly2;
|
|
1637
|
-
else if (key === "__v_isReadonly") return isReadonly2;
|
|
1638
|
-
else if (key === "__v_isShallow") return isShallow2;
|
|
1639
|
-
else if (key === "__v_raw") {
|
|
1640
|
-
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) return target;
|
|
1641
|
-
return;
|
|
1642
|
-
}
|
|
1643
|
-
const targetIsArray = isArray(target);
|
|
1644
|
-
if (!isReadonly2) {
|
|
1645
|
-
let fn;
|
|
1646
|
-
if (targetIsArray && (fn = arrayInstrumentations[key])) return fn;
|
|
1647
|
-
if (key === "hasOwnProperty") return hasOwnProperty;
|
|
1648
|
-
}
|
|
1649
|
-
const res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
1650
|
-
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;
|
|
1651
|
-
if (!isReadonly2) track(target, "get", key);
|
|
1652
|
-
if (isShallow2) return res;
|
|
1653
|
-
if (/* @__PURE__ */ isRef(res)) {
|
|
1654
|
-
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1655
|
-
return isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1656
|
-
}
|
|
1657
|
-
if (isObject(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
|
|
1658
|
-
return res;
|
|
1659
|
-
}
|
|
1660
|
-
};
|
|
1661
|
-
var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
1662
|
-
constructor(isShallow2 = false) {
|
|
1663
|
-
super(false, isShallow2);
|
|
1664
|
-
}
|
|
1665
|
-
set(target, key, value, receiver) {
|
|
1666
|
-
let oldValue = target[key];
|
|
1667
|
-
const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
|
|
1668
|
-
if (!this._isShallow) {
|
|
1669
|
-
const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
|
|
1670
|
-
if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
|
|
1671
|
-
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
1672
|
-
value = /* @__PURE__ */ toRaw(value);
|
|
1673
|
-
}
|
|
1674
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) return true;
|
|
1675
|
-
else {
|
|
1676
|
-
oldValue.value = value;
|
|
1677
|
-
return true;
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
1681
|
-
const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
1682
|
-
if (target === /* @__PURE__ */ toRaw(receiver)) {
|
|
1683
|
-
if (!hadKey) trigger(target, "add", key, value);
|
|
1684
|
-
else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
|
|
1685
|
-
}
|
|
1686
|
-
return result;
|
|
1687
|
-
}
|
|
1688
|
-
deleteProperty(target, key) {
|
|
1689
|
-
const hadKey = hasOwn(target, key);
|
|
1690
|
-
const oldValue = target[key];
|
|
1691
|
-
const result = Reflect.deleteProperty(target, key);
|
|
1692
|
-
if (result && hadKey) trigger(target, "delete", key, void 0, oldValue);
|
|
1693
|
-
return result;
|
|
1694
|
-
}
|
|
1695
|
-
has(target, key) {
|
|
1696
|
-
const result = Reflect.has(target, key);
|
|
1697
|
-
if (!isSymbol(key) || !builtInSymbols.has(key)) track(target, "has", key);
|
|
1698
|
-
return result;
|
|
1699
|
-
}
|
|
1700
|
-
ownKeys(target) {
|
|
1701
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
1702
|
-
return Reflect.ownKeys(target);
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
|
-
var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
|
|
1706
|
-
constructor(isShallow2 = false) {
|
|
1707
|
-
super(true, isShallow2);
|
|
1708
|
-
}
|
|
1709
|
-
set(target, key) {
|
|
1710
|
-
return true;
|
|
1711
|
-
}
|
|
1712
|
-
deleteProperty(target, key) {
|
|
1713
|
-
return true;
|
|
1714
|
-
}
|
|
1715
|
-
};
|
|
1716
|
-
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
1717
|
-
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
1718
|
-
const toShallow = (value) => value;
|
|
1719
|
-
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1720
|
-
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1721
|
-
return function(...args) {
|
|
1722
|
-
const target = this["__v_raw"];
|
|
1723
|
-
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1724
|
-
const targetIsMap = isMap(rawTarget);
|
|
1725
|
-
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
1726
|
-
const isKeyOnly = method === "keys" && targetIsMap;
|
|
1727
|
-
const innerIterator = target[method](...args);
|
|
1728
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1729
|
-
!isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
1730
|
-
return extend(Object.create(innerIterator), { next() {
|
|
1731
|
-
const { value, done } = innerIterator.next();
|
|
1732
|
-
return done ? {
|
|
1733
|
-
value,
|
|
1734
|
-
done
|
|
1735
|
-
} : {
|
|
1736
|
-
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
1737
|
-
done
|
|
1738
|
-
};
|
|
1739
|
-
} });
|
|
1740
|
-
};
|
|
1741
|
-
}
|
|
1742
|
-
function createReadonlyMethod(type) {
|
|
1743
|
-
return function(...args) {
|
|
1744
|
-
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1745
|
-
};
|
|
1746
|
-
}
|
|
1747
|
-
function createInstrumentations(readonly, shallow) {
|
|
1748
|
-
const instrumentations = {
|
|
1749
|
-
get(key) {
|
|
1750
|
-
const target = this["__v_raw"];
|
|
1751
|
-
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1752
|
-
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1753
|
-
if (!readonly) {
|
|
1754
|
-
if (hasChanged(key, rawKey)) track(rawTarget, "get", key);
|
|
1755
|
-
track(rawTarget, "get", rawKey);
|
|
1756
|
-
}
|
|
1757
|
-
const { has } = getProto(rawTarget);
|
|
1758
|
-
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1759
|
-
if (has.call(rawTarget, key)) return wrap(target.get(key));
|
|
1760
|
-
else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));
|
|
1761
|
-
else if (target !== rawTarget) target.get(key);
|
|
1762
|
-
},
|
|
1763
|
-
get size() {
|
|
1764
|
-
const target = this["__v_raw"];
|
|
1765
|
-
!readonly && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
|
|
1766
|
-
return target.size;
|
|
1767
|
-
},
|
|
1768
|
-
has(key) {
|
|
1769
|
-
const target = this["__v_raw"];
|
|
1770
|
-
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1771
|
-
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1772
|
-
if (!readonly) {
|
|
1773
|
-
if (hasChanged(key, rawKey)) track(rawTarget, "has", key);
|
|
1774
|
-
track(rawTarget, "has", rawKey);
|
|
1775
|
-
}
|
|
1776
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1777
|
-
},
|
|
1778
|
-
forEach(callback, thisArg) {
|
|
1779
|
-
const observed = this;
|
|
1780
|
-
const target = observed["__v_raw"];
|
|
1781
|
-
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1782
|
-
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1783
|
-
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1784
|
-
return target.forEach((value, key) => {
|
|
1785
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1786
|
-
});
|
|
1787
|
-
}
|
|
1788
|
-
};
|
|
1789
|
-
extend(instrumentations, readonly ? {
|
|
1790
|
-
add: createReadonlyMethod("add"),
|
|
1791
|
-
set: createReadonlyMethod("set"),
|
|
1792
|
-
delete: createReadonlyMethod("delete"),
|
|
1793
|
-
clear: createReadonlyMethod("clear")
|
|
1794
|
-
} : {
|
|
1795
|
-
add(value) {
|
|
1796
|
-
const target = /* @__PURE__ */ toRaw(this);
|
|
1797
|
-
const proto = getProto(target);
|
|
1798
|
-
const rawValue = /* @__PURE__ */ toRaw(value);
|
|
1799
|
-
const valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;
|
|
1800
|
-
if (!(proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue))) {
|
|
1801
|
-
target.add(valueToAdd);
|
|
1802
|
-
trigger(target, "add", valueToAdd, valueToAdd);
|
|
1803
|
-
}
|
|
1804
|
-
return this;
|
|
1805
|
-
},
|
|
1806
|
-
set(key, value) {
|
|
1807
|
-
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
|
|
1808
|
-
const target = /* @__PURE__ */ toRaw(this);
|
|
1809
|
-
const { has, get } = getProto(target);
|
|
1810
|
-
let hadKey = has.call(target, key);
|
|
1811
|
-
if (!hadKey) {
|
|
1812
|
-
key = /* @__PURE__ */ toRaw(key);
|
|
1813
|
-
hadKey = has.call(target, key);
|
|
1814
|
-
}
|
|
1815
|
-
const oldValue = get.call(target, key);
|
|
1816
|
-
target.set(key, value);
|
|
1817
|
-
if (!hadKey) trigger(target, "add", key, value);
|
|
1818
|
-
else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
|
|
1819
|
-
return this;
|
|
1820
|
-
},
|
|
1821
|
-
delete(key) {
|
|
1822
|
-
const target = /* @__PURE__ */ toRaw(this);
|
|
1823
|
-
const { has, get } = getProto(target);
|
|
1824
|
-
let hadKey = has.call(target, key);
|
|
1825
|
-
if (!hadKey) {
|
|
1826
|
-
key = /* @__PURE__ */ toRaw(key);
|
|
1827
|
-
hadKey = has.call(target, key);
|
|
1828
|
-
}
|
|
1829
|
-
const oldValue = get ? get.call(target, key) : void 0;
|
|
1830
|
-
const result = target.delete(key);
|
|
1831
|
-
if (hadKey) trigger(target, "delete", key, void 0, oldValue);
|
|
1832
|
-
return result;
|
|
1833
|
-
},
|
|
1834
|
-
clear() {
|
|
1835
|
-
const target = /* @__PURE__ */ toRaw(this);
|
|
1836
|
-
const hadItems = target.size !== 0;
|
|
1837
|
-
const oldTarget = void 0;
|
|
1838
|
-
const result = target.clear();
|
|
1839
|
-
if (hadItems) trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1840
|
-
return result;
|
|
1841
|
-
}
|
|
1842
|
-
});
|
|
1843
|
-
[
|
|
1844
|
-
"keys",
|
|
1845
|
-
"values",
|
|
1846
|
-
"entries",
|
|
1847
|
-
Symbol.iterator
|
|
1848
|
-
].forEach((method) => {
|
|
1849
|
-
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1850
|
-
});
|
|
1851
|
-
return instrumentations;
|
|
1852
|
-
}
|
|
1853
|
-
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1854
|
-
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1855
|
-
return (target, key, receiver) => {
|
|
1856
|
-
if (key === "__v_isReactive") return !isReadonly2;
|
|
1857
|
-
else if (key === "__v_isReadonly") return isReadonly2;
|
|
1858
|
-
else if (key === "__v_raw") return target;
|
|
1859
|
-
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1860
|
-
};
|
|
1861
|
-
}
|
|
1862
|
-
const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };
|
|
1863
|
-
const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
|
|
1864
|
-
const reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
1865
|
-
const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
|
|
1866
|
-
const readonlyMap = /* @__PURE__ */ new WeakMap();
|
|
1867
|
-
const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
|
|
1868
|
-
function targetTypeMap(rawType) {
|
|
1869
|
-
switch (rawType) {
|
|
1870
|
-
case "Object":
|
|
1871
|
-
case "Array": return 1;
|
|
1872
|
-
case "Map":
|
|
1873
|
-
case "Set":
|
|
1874
|
-
case "WeakMap":
|
|
1875
|
-
case "WeakSet": return 2;
|
|
1876
|
-
default: return 0;
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
// @__NO_SIDE_EFFECTS__
|
|
1880
|
-
function reactive(target) {
|
|
1881
|
-
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1882
|
-
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
1883
|
-
}
|
|
1884
|
-
// @__NO_SIDE_EFFECTS__
|
|
1885
|
-
function readonly(target) {
|
|
1886
|
-
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1887
|
-
}
|
|
1888
|
-
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1889
|
-
if (!isObject(target)) return target;
|
|
1890
|
-
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) return target;
|
|
1891
|
-
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1892
|
-
const existingProxy = proxyMap.get(target);
|
|
1893
|
-
if (existingProxy) return existingProxy;
|
|
1894
|
-
const targetType = targetTypeMap(toRawType(target));
|
|
1895
|
-
if (targetType === 0) return target;
|
|
1896
|
-
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1897
|
-
proxyMap.set(target, proxy);
|
|
1898
|
-
return proxy;
|
|
1899
|
-
}
|
|
1900
|
-
// @__NO_SIDE_EFFECTS__
|
|
1901
|
-
function isReactive(value) {
|
|
1902
|
-
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1903
|
-
return !!(value && value["__v_isReactive"]);
|
|
1904
|
-
}
|
|
1905
|
-
// @__NO_SIDE_EFFECTS__
|
|
1906
|
-
function isReadonly(value) {
|
|
1907
|
-
return !!(value && value["__v_isReadonly"]);
|
|
1908
|
-
}
|
|
1909
|
-
// @__NO_SIDE_EFFECTS__
|
|
1910
|
-
function isShallow(value) {
|
|
1911
|
-
return !!(value && value["__v_isShallow"]);
|
|
1912
|
-
}
|
|
1913
|
-
// @__NO_SIDE_EFFECTS__
|
|
1914
|
-
function isProxy(value) {
|
|
1915
|
-
return value ? !!value["__v_raw"] : false;
|
|
1916
|
-
}
|
|
1917
|
-
// @__NO_SIDE_EFFECTS__
|
|
1918
|
-
function toRaw(observed) {
|
|
1919
|
-
const raw = observed && observed["__v_raw"];
|
|
1920
|
-
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
1921
|
-
}
|
|
1922
|
-
const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
|
|
1923
|
-
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1924
|
-
// @__NO_SIDE_EFFECTS__
|
|
1925
|
-
function isRef(r) {
|
|
1926
|
-
return r ? r["__v_isRef"] === true : false;
|
|
1927
|
-
}
|
|
1928
|
-
// @__NO_SIDE_EFFECTS__
|
|
1929
|
-
function ref(value) {
|
|
1930
|
-
return createRef(value, false);
|
|
1931
|
-
}
|
|
1932
|
-
function createRef(rawValue, shallow) {
|
|
1933
|
-
if (/* @__PURE__ */ isRef(rawValue)) return rawValue;
|
|
1934
|
-
return new RefImpl(rawValue, shallow);
|
|
1935
|
-
}
|
|
1936
|
-
var RefImpl = class {
|
|
1937
|
-
constructor(value, isShallow2) {
|
|
1938
|
-
this.dep = new Dep();
|
|
1939
|
-
this["__v_isRef"] = true;
|
|
1940
|
-
this["__v_isShallow"] = false;
|
|
1941
|
-
this._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);
|
|
1942
|
-
this._value = isShallow2 ? value : toReactive(value);
|
|
1943
|
-
this["__v_isShallow"] = isShallow2;
|
|
1944
|
-
}
|
|
1945
|
-
get value() {
|
|
1946
|
-
this.dep.track();
|
|
1947
|
-
return this._value;
|
|
1948
|
-
}
|
|
1949
|
-
set value(newValue) {
|
|
1950
|
-
const oldValue = this._rawValue;
|
|
1951
|
-
const useDirectValue = this["__v_isShallow"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);
|
|
1952
|
-
newValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);
|
|
1953
|
-
if (hasChanged(newValue, oldValue)) {
|
|
1954
|
-
this._rawValue = newValue;
|
|
1955
|
-
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
1956
|
-
this.dep.trigger();
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
};
|
|
1960
|
-
function unref(ref2) {
|
|
1961
|
-
return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
|
|
1962
|
-
}
|
|
1963
|
-
var ComputedRefImpl = class {
|
|
1964
|
-
constructor(fn, setter, isSSR) {
|
|
1965
|
-
this.fn = fn;
|
|
1966
|
-
this.setter = setter;
|
|
1967
|
-
this._value = void 0;
|
|
1968
|
-
this.dep = new Dep(this);
|
|
1969
|
-
this.__v_isRef = true;
|
|
1970
|
-
this.deps = void 0;
|
|
1971
|
-
this.depsTail = void 0;
|
|
1972
|
-
this.flags = 16;
|
|
1973
|
-
this.globalVersion = globalVersion - 1;
|
|
1974
|
-
this.next = void 0;
|
|
1975
|
-
this.effect = this;
|
|
1976
|
-
this["__v_isReadonly"] = !setter;
|
|
1977
|
-
this.isSSR = isSSR;
|
|
1978
|
-
}
|
|
1979
|
-
notify() {
|
|
1980
|
-
this.flags |= 16;
|
|
1981
|
-
if (!(this.flags & 8) && activeSub !== this) {
|
|
1982
|
-
batch(this, true);
|
|
1983
|
-
return true;
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
get value() {
|
|
1987
|
-
const link = this.dep.track();
|
|
1988
|
-
refreshComputed(this);
|
|
1989
|
-
if (link) link.version = this.dep.version;
|
|
1990
|
-
return this._value;
|
|
1991
|
-
}
|
|
1992
|
-
set value(newValue) {
|
|
1993
|
-
if (this.setter) this.setter(newValue);
|
|
1994
|
-
}
|
|
1995
|
-
};
|
|
1996
|
-
// @__NO_SIDE_EFFECTS__
|
|
1997
|
-
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1998
|
-
let getter;
|
|
1999
|
-
let setter;
|
|
2000
|
-
if (isFunction(getterOrOptions)) getter = getterOrOptions;
|
|
2001
|
-
else {
|
|
2002
|
-
getter = getterOrOptions.get;
|
|
2003
|
-
setter = getterOrOptions.set;
|
|
2004
|
-
}
|
|
2005
|
-
return new ComputedRefImpl(getter, setter, isSSR);
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
//#endregion
|
|
2009
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.35/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
|
2010
|
-
/**
|
|
2011
|
-
* @vue/runtime-core v3.5.35
|
|
2012
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
2013
|
-
* @license MIT
|
|
2014
|
-
**/
|
|
2015
|
-
function callWithErrorHandling(fn, instance, type, args) {
|
|
2016
|
-
try {
|
|
2017
|
-
return args ? fn(...args) : fn();
|
|
2018
|
-
} catch (err) {
|
|
2019
|
-
handleError(err, instance, type);
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
2023
|
-
if (isFunction(fn)) {
|
|
2024
|
-
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2025
|
-
if (res && isPromise(res)) res.catch((err) => {
|
|
2026
|
-
handleError(err, instance, type);
|
|
2027
|
-
});
|
|
2028
|
-
return res;
|
|
2029
|
-
}
|
|
2030
|
-
if (isArray(fn)) {
|
|
2031
|
-
const values = [];
|
|
2032
|
-
for (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
2033
|
-
return values;
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2037
|
-
const contextVNode = instance ? instance.vnode : null;
|
|
2038
|
-
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2039
|
-
if (instance) {
|
|
2040
|
-
let cur = instance.parent;
|
|
2041
|
-
const exposedInstance = instance.proxy;
|
|
2042
|
-
const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
|
|
2043
|
-
while (cur) {
|
|
2044
|
-
const errorCapturedHooks = cur.ec;
|
|
2045
|
-
if (errorCapturedHooks) {
|
|
2046
|
-
for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
|
|
2047
|
-
}
|
|
2048
|
-
cur = cur.parent;
|
|
2049
|
-
}
|
|
2050
|
-
if (errorHandler) {
|
|
2051
|
-
pauseTracking();
|
|
2052
|
-
callWithErrorHandling(errorHandler, null, 10, [
|
|
2053
|
-
err,
|
|
2054
|
-
exposedInstance,
|
|
2055
|
-
errorInfo
|
|
2056
|
-
]);
|
|
2057
|
-
resetTracking();
|
|
2058
|
-
return;
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
|
|
2062
|
-
}
|
|
2063
|
-
function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
|
|
2064
|
-
if (throwInProd) throw err;
|
|
2065
|
-
else console.error(err);
|
|
2066
|
-
}
|
|
2067
|
-
let devtools$1;
|
|
2068
|
-
let buffer = [];
|
|
2069
|
-
let devtoolsNotInstalled = false;
|
|
2070
|
-
function emit$1(event, ...args) {
|
|
2071
|
-
if (devtools$1) devtools$1.emit(event, ...args);
|
|
2072
|
-
else if (!devtoolsNotInstalled) buffer.push({
|
|
2073
|
-
event,
|
|
2074
|
-
args
|
|
2075
|
-
});
|
|
2076
|
-
}
|
|
2077
|
-
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
|
|
2078
|
-
// @__NO_SIDE_EFFECTS__
|
|
2079
|
-
function createDevtoolsComponentHook(hook) {
|
|
2080
|
-
return (component) => {
|
|
2081
|
-
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
let currentRenderingInstance = null;
|
|
2085
|
-
let currentScopeId = null;
|
|
2086
|
-
function setCurrentRenderingInstance(instance) {
|
|
2087
|
-
const prev = currentRenderingInstance;
|
|
2088
|
-
currentRenderingInstance = instance;
|
|
2089
|
-
currentScopeId = instance && instance.type.__scopeId || null;
|
|
2090
|
-
return prev;
|
|
2091
|
-
}
|
|
2092
|
-
function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
2093
|
-
if (!ctx) return fn;
|
|
2094
|
-
if (fn._n) return fn;
|
|
2095
|
-
const renderFnWithContext = (...args) => {
|
|
2096
|
-
if (renderFnWithContext._d) setBlockTracking(-1);
|
|
2097
|
-
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
2098
|
-
let res;
|
|
2099
|
-
try {
|
|
2100
|
-
res = fn(...args);
|
|
2101
|
-
} finally {
|
|
2102
|
-
setCurrentRenderingInstance(prevInstance);
|
|
2103
|
-
if (renderFnWithContext._d) setBlockTracking(1);
|
|
2104
|
-
}
|
|
2105
|
-
if (__VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(ctx);
|
|
2106
|
-
return res;
|
|
2107
|
-
};
|
|
2108
|
-
renderFnWithContext._n = true;
|
|
2109
|
-
renderFnWithContext._c = true;
|
|
2110
|
-
renderFnWithContext._d = true;
|
|
2111
|
-
return renderFnWithContext;
|
|
2112
|
-
}
|
|
2113
|
-
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
2114
|
-
const instance = getCurrentInstance();
|
|
2115
|
-
if (instance || currentApp) {
|
|
2116
|
-
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
2117
|
-
if (provides && key in provides) return provides[key];
|
|
2118
|
-
else if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
const isTeleport = (type) => type.__isTeleport;
|
|
2122
|
-
function setTransitionHooks(vnode, hooks) {
|
|
2123
|
-
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
2124
|
-
vnode.transition = hooks;
|
|
2125
|
-
setTransitionHooks(vnode.component.subTree, hooks);
|
|
2126
|
-
} else if (vnode.shapeFlag & 128) {
|
|
2127
|
-
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
2128
|
-
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
2129
|
-
} else vnode.transition = hooks;
|
|
2130
|
-
}
|
|
2131
|
-
// @__NO_SIDE_EFFECTS__
|
|
2132
|
-
function defineComponent(options, extraOptions) {
|
|
2133
|
-
return isFunction(options) ? /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
2134
|
-
}
|
|
2135
|
-
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
2136
|
-
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
2137
|
-
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2138
|
-
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
2139
|
-
if (target) {
|
|
2140
|
-
const hooks = target[type] || (target[type] = []);
|
|
2141
|
-
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
|
|
2142
|
-
pauseTracking();
|
|
2143
|
-
const reset = setCurrentInstance(target);
|
|
2144
|
-
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
2145
|
-
reset();
|
|
2146
|
-
resetTracking();
|
|
2147
|
-
return res;
|
|
2148
|
-
});
|
|
2149
|
-
if (prepend) hooks.unshift(wrappedHook);
|
|
2150
|
-
else hooks.push(wrappedHook);
|
|
2151
|
-
return wrappedHook;
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
2155
|
-
if (!isInSSRComponentSetup || lifecycle === "sp") injectHook(lifecycle, (...args) => hook(...args), target);
|
|
2156
|
-
};
|
|
2157
|
-
const onBeforeMount = createHook("bm");
|
|
2158
|
-
const onMounted = createHook("m");
|
|
2159
|
-
const onBeforeUpdate = createHook("bu");
|
|
2160
|
-
const onUpdated = createHook("u");
|
|
2161
|
-
const onBeforeUnmount = createHook("bum");
|
|
2162
|
-
const onUnmounted = createHook("um");
|
|
2163
|
-
const onServerPrefetch = createHook("sp");
|
|
2164
|
-
const onRenderTriggered = createHook("rtg");
|
|
2165
|
-
const onRenderTracked = createHook("rtc");
|
|
2166
|
-
const COMPONENTS = "components";
|
|
2167
|
-
const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
|
|
2168
|
-
function resolveDynamicComponent(component) {
|
|
2169
|
-
if (isString(component)) return resolveAsset(COMPONENTS, component, false) || component;
|
|
2170
|
-
else return component || NULL_DYNAMIC_COMPONENT;
|
|
2171
|
-
}
|
|
2172
|
-
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
2173
|
-
const instance = currentRenderingInstance || currentInstance;
|
|
2174
|
-
if (instance) {
|
|
2175
|
-
const Component = instance.type;
|
|
2176
|
-
if (type === COMPONENTS) {
|
|
2177
|
-
const selfName = getComponentName(Component, false);
|
|
2178
|
-
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) return Component;
|
|
2179
|
-
}
|
|
2180
|
-
const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
|
|
2181
|
-
if (!res && maybeSelfReference) return Component;
|
|
2182
|
-
return res;
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2185
|
-
function resolve(registry, name) {
|
|
2186
|
-
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
2187
|
-
}
|
|
2188
|
-
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
2189
|
-
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
2190
|
-
const hasProps = Object.keys(props).length > 0;
|
|
2191
|
-
if (name !== "default") props.name = name;
|
|
2192
|
-
return openBlock(), createBlock(Fragment, null, [createVNode("slot", props, fallback && fallback())], hasProps ? -2 : 64);
|
|
2193
|
-
}
|
|
2194
|
-
let slot = slots[name];
|
|
2195
|
-
if (slot && slot._c) slot._d = false;
|
|
2196
|
-
openBlock();
|
|
2197
|
-
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
2198
|
-
const slotKey = props.key || validSlotContent && validSlotContent.key;
|
|
2199
|
-
const rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
2200
|
-
if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
2201
|
-
if (slot && slot._c) slot._d = true;
|
|
2202
|
-
return rendered;
|
|
2203
|
-
}
|
|
2204
|
-
function ensureValidVNode(vnodes) {
|
|
2205
|
-
return vnodes.some((child) => {
|
|
2206
|
-
if (!isVNode(child)) return true;
|
|
2207
|
-
if (child.type === Comment) return false;
|
|
2208
|
-
if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
|
|
2209
|
-
return true;
|
|
2210
|
-
}) ? vnodes : null;
|
|
2211
|
-
}
|
|
2212
|
-
function useSlots() {
|
|
2213
|
-
return getContext("useSlots").slots;
|
|
2214
|
-
}
|
|
2215
|
-
function getContext(calledFunctionName) {
|
|
2216
|
-
const i = getCurrentInstance();
|
|
2217
|
-
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
2218
|
-
}
|
|
2219
|
-
function createAppContext() {
|
|
2220
|
-
return {
|
|
2221
|
-
app: null,
|
|
2222
|
-
config: {
|
|
2223
|
-
isNativeTag: NO,
|
|
2224
|
-
performance: false,
|
|
2225
|
-
globalProperties: {},
|
|
2226
|
-
optionMergeStrategies: {},
|
|
2227
|
-
errorHandler: void 0,
|
|
2228
|
-
warnHandler: void 0,
|
|
2229
|
-
compilerOptions: {}
|
|
2230
|
-
},
|
|
2231
|
-
mixins: [],
|
|
2232
|
-
components: {},
|
|
2233
|
-
directives: {},
|
|
2234
|
-
provides: /* @__PURE__ */ Object.create(null),
|
|
2235
|
-
optionsCache: /* @__PURE__ */ new WeakMap(),
|
|
2236
|
-
propsCache: /* @__PURE__ */ new WeakMap(),
|
|
2237
|
-
emitsCache: /* @__PURE__ */ new WeakMap()
|
|
2238
|
-
};
|
|
2239
|
-
}
|
|
2240
|
-
let currentApp = null;
|
|
2241
|
-
const internalObjectProto = {};
|
|
2242
|
-
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
2243
|
-
const isSuspense = (type) => type.__isSuspense;
|
|
2244
|
-
const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
|
|
2245
|
-
const Text = /* @__PURE__ */ Symbol.for("v-txt");
|
|
2246
|
-
const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
|
|
2247
|
-
const blockStack = [];
|
|
2248
|
-
let currentBlock = null;
|
|
2249
|
-
function openBlock(disableTracking = false) {
|
|
2250
|
-
blockStack.push(currentBlock = disableTracking ? null : []);
|
|
2251
|
-
}
|
|
2252
|
-
function closeBlock() {
|
|
2253
|
-
blockStack.pop();
|
|
2254
|
-
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
2255
|
-
}
|
|
2256
|
-
let isBlockTreeEnabled = 1;
|
|
2257
|
-
function setBlockTracking(value, inVOnce = false) {
|
|
2258
|
-
isBlockTreeEnabled += value;
|
|
2259
|
-
if (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;
|
|
2260
|
-
}
|
|
2261
|
-
function setupBlock(vnode) {
|
|
2262
|
-
vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
|
|
2263
|
-
closeBlock();
|
|
2264
|
-
if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(vnode);
|
|
2265
|
-
return vnode;
|
|
2266
|
-
}
|
|
2267
|
-
function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
|
|
2268
|
-
return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));
|
|
2269
|
-
}
|
|
2270
|
-
function createBlock(type, props, children, patchFlag, dynamicProps) {
|
|
2271
|
-
return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));
|
|
2272
|
-
}
|
|
2273
|
-
function isVNode(value) {
|
|
2274
|
-
return value ? value.__v_isVNode === true : false;
|
|
2275
|
-
}
|
|
2276
|
-
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
2277
|
-
const normalizeRef = ({ ref, ref_key, ref_for }) => {
|
|
2278
|
-
if (typeof ref === "number") ref = "" + ref;
|
|
2279
|
-
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? {
|
|
2280
|
-
i: currentRenderingInstance,
|
|
2281
|
-
r: ref,
|
|
2282
|
-
k: ref_key,
|
|
2283
|
-
f: !!ref_for
|
|
2284
|
-
} : ref : null;
|
|
2285
|
-
};
|
|
2286
|
-
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
2287
|
-
const vnode = {
|
|
2288
|
-
__v_isVNode: true,
|
|
2289
|
-
__v_skip: true,
|
|
2290
|
-
type,
|
|
2291
|
-
props,
|
|
2292
|
-
key: props && normalizeKey(props),
|
|
2293
|
-
ref: props && normalizeRef(props),
|
|
2294
|
-
scopeId: currentScopeId,
|
|
2295
|
-
slotScopeIds: null,
|
|
2296
|
-
children,
|
|
2297
|
-
component: null,
|
|
2298
|
-
suspense: null,
|
|
2299
|
-
ssContent: null,
|
|
2300
|
-
ssFallback: null,
|
|
2301
|
-
dirs: null,
|
|
2302
|
-
transition: null,
|
|
2303
|
-
el: null,
|
|
2304
|
-
anchor: null,
|
|
2305
|
-
target: null,
|
|
2306
|
-
targetStart: null,
|
|
2307
|
-
targetAnchor: null,
|
|
2308
|
-
staticCount: 0,
|
|
2309
|
-
shapeFlag,
|
|
2310
|
-
patchFlag,
|
|
2311
|
-
dynamicProps,
|
|
2312
|
-
dynamicChildren: null,
|
|
2313
|
-
appContext: null,
|
|
2314
|
-
ctx: currentRenderingInstance
|
|
2315
|
-
};
|
|
2316
|
-
if (needFullChildrenNormalization) {
|
|
2317
|
-
normalizeChildren(vnode, children);
|
|
2318
|
-
if (shapeFlag & 128) type.normalize(vnode);
|
|
2319
|
-
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
2320
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
2321
|
-
return vnode;
|
|
2322
|
-
}
|
|
2323
|
-
const createVNode = _createVNode;
|
|
2324
|
-
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
2325
|
-
if (!type || type === NULL_DYNAMIC_COMPONENT) type = Comment;
|
|
2326
|
-
if (isVNode(type)) {
|
|
2327
|
-
const cloned = cloneVNode(type, props, true);
|
|
2328
|
-
if (children) normalizeChildren(cloned, children);
|
|
2329
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
2330
|
-
else currentBlock.push(cloned);
|
|
2331
|
-
cloned.patchFlag = -2;
|
|
2332
|
-
return cloned;
|
|
2333
|
-
}
|
|
2334
|
-
if (isClassComponent(type)) type = type.__vccOpts;
|
|
2335
|
-
if (props) {
|
|
2336
|
-
props = guardReactiveProps(props);
|
|
2337
|
-
let { class: klass, style } = props;
|
|
2338
|
-
if (klass && !isString(klass)) props.class = normalizeClass(klass);
|
|
2339
|
-
if (isObject(style)) {
|
|
2340
|
-
if (isProxy(style) && !isArray(style)) style = extend({}, style);
|
|
2341
|
-
props.style = normalizeStyle(style);
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
|
|
2345
|
-
return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
|
|
2346
|
-
}
|
|
2347
|
-
function guardReactiveProps(props) {
|
|
2348
|
-
if (!props) return null;
|
|
2349
|
-
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
2350
|
-
}
|
|
2351
|
-
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
2352
|
-
const { props, ref, patchFlag, children, transition } = vnode;
|
|
2353
|
-
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
2354
|
-
const cloned = {
|
|
2355
|
-
__v_isVNode: true,
|
|
2356
|
-
__v_skip: true,
|
|
2357
|
-
type: vnode.type,
|
|
2358
|
-
props: mergedProps,
|
|
2359
|
-
key: mergedProps && normalizeKey(mergedProps),
|
|
2360
|
-
ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref,
|
|
2361
|
-
scopeId: vnode.scopeId,
|
|
2362
|
-
slotScopeIds: vnode.slotScopeIds,
|
|
2363
|
-
children,
|
|
2364
|
-
target: vnode.target,
|
|
2365
|
-
targetStart: vnode.targetStart,
|
|
2366
|
-
targetAnchor: vnode.targetAnchor,
|
|
2367
|
-
staticCount: vnode.staticCount,
|
|
2368
|
-
shapeFlag: vnode.shapeFlag,
|
|
2369
|
-
patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
|
|
2370
|
-
dynamicProps: vnode.dynamicProps,
|
|
2371
|
-
dynamicChildren: vnode.dynamicChildren,
|
|
2372
|
-
appContext: vnode.appContext,
|
|
2373
|
-
dirs: vnode.dirs,
|
|
2374
|
-
transition,
|
|
2375
|
-
component: vnode.component,
|
|
2376
|
-
suspense: vnode.suspense,
|
|
2377
|
-
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
2378
|
-
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
2379
|
-
placeholder: vnode.placeholder,
|
|
2380
|
-
el: vnode.el,
|
|
2381
|
-
anchor: vnode.anchor,
|
|
2382
|
-
ctx: vnode.ctx,
|
|
2383
|
-
ce: vnode.ce
|
|
2384
|
-
};
|
|
2385
|
-
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
2386
|
-
return cloned;
|
|
2387
|
-
}
|
|
2388
|
-
function createTextVNode(text = " ", flag = 0) {
|
|
2389
|
-
return createVNode(Text, null, text, flag);
|
|
2390
|
-
}
|
|
2391
|
-
function createCommentVNode(text = "", asBlock = false) {
|
|
2392
|
-
return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
|
|
2393
|
-
}
|
|
2394
|
-
function normalizeChildren(vnode, children) {
|
|
2395
|
-
let type = 0;
|
|
2396
|
-
const { shapeFlag } = vnode;
|
|
2397
|
-
if (children == null) children = null;
|
|
2398
|
-
else if (isArray(children)) type = 16;
|
|
2399
|
-
else if (typeof children === "object") if (shapeFlag & 65) {
|
|
2400
|
-
const slot = children.default;
|
|
2401
|
-
if (slot) {
|
|
2402
|
-
slot._c && (slot._d = false);
|
|
2403
|
-
normalizeChildren(vnode, slot());
|
|
2404
|
-
slot._c && (slot._d = true);
|
|
2405
|
-
}
|
|
2406
|
-
return;
|
|
2407
|
-
} else {
|
|
2408
|
-
type = 32;
|
|
2409
|
-
const slotFlag = children._;
|
|
2410
|
-
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
2411
|
-
else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
2412
|
-
else {
|
|
2413
|
-
children._ = 2;
|
|
2414
|
-
vnode.patchFlag |= 1024;
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
else if (isFunction(children)) {
|
|
2418
|
-
children = {
|
|
2419
|
-
default: children,
|
|
2420
|
-
_ctx: currentRenderingInstance
|
|
2421
|
-
};
|
|
2422
|
-
type = 32;
|
|
2423
|
-
} else {
|
|
2424
|
-
children = String(children);
|
|
2425
|
-
if (shapeFlag & 64) {
|
|
2426
|
-
type = 16;
|
|
2427
|
-
children = [createTextVNode(children)];
|
|
2428
|
-
} else type = 8;
|
|
2429
|
-
}
|
|
2430
|
-
vnode.children = children;
|
|
2431
|
-
vnode.shapeFlag |= type;
|
|
2432
|
-
}
|
|
2433
|
-
function mergeProps(...args) {
|
|
2434
|
-
const ret = {};
|
|
2435
|
-
for (let i = 0; i < args.length; i++) {
|
|
2436
|
-
const toMerge = args[i];
|
|
2437
|
-
for (const key in toMerge) if (key === "class") {
|
|
2438
|
-
if (ret.class !== toMerge.class) ret.class = normalizeClass([ret.class, toMerge.class]);
|
|
2439
|
-
} else if (key === "style") ret.style = normalizeStyle([ret.style, toMerge.style]);
|
|
2440
|
-
else if (isOn(key)) {
|
|
2441
|
-
const existing = ret[key];
|
|
2442
|
-
const incoming = toMerge[key];
|
|
2443
|
-
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
2444
|
-
else if (incoming == null && existing == null && !isModelListener(key)) ret[key] = incoming;
|
|
2445
|
-
} else if (key !== "") ret[key] = toMerge[key];
|
|
2446
|
-
}
|
|
2447
|
-
return ret;
|
|
2448
|
-
}
|
|
2449
|
-
const emptyAppContext = createAppContext();
|
|
2450
|
-
let currentInstance = null;
|
|
2451
|
-
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
2452
|
-
let internalSetCurrentInstance;
|
|
2453
|
-
let setInSSRSetupState;
|
|
2454
|
-
{
|
|
2455
|
-
const g = getGlobalThis();
|
|
2456
|
-
const registerGlobalSetter = (key, setter) => {
|
|
2457
|
-
let setters;
|
|
2458
|
-
if (!(setters = g[key])) setters = g[key] = [];
|
|
2459
|
-
setters.push(setter);
|
|
2460
|
-
return (v) => {
|
|
2461
|
-
if (setters.length > 1) setters.forEach((set) => set(v));
|
|
2462
|
-
else setters[0](v);
|
|
2463
|
-
};
|
|
2464
|
-
};
|
|
2465
|
-
internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);
|
|
2466
|
-
setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);
|
|
2467
|
-
}
|
|
2468
|
-
const setCurrentInstance = (instance) => {
|
|
2469
|
-
const prev = currentInstance;
|
|
2470
|
-
internalSetCurrentInstance(instance);
|
|
2471
|
-
instance.scope.on();
|
|
2472
|
-
return () => {
|
|
2473
|
-
instance.scope.off();
|
|
2474
|
-
internalSetCurrentInstance(prev);
|
|
2475
|
-
};
|
|
2476
|
-
};
|
|
2477
|
-
let isInSSRComponentSetup = false;
|
|
2478
|
-
const attrsProxyHandlers = { get(target, key) {
|
|
2479
|
-
track(target, "get", "");
|
|
2480
|
-
return target[key];
|
|
2481
|
-
} };
|
|
2482
|
-
function createSetupContext(instance) {
|
|
2483
|
-
const expose = (exposed) => {
|
|
2484
|
-
instance.exposed = exposed || {};
|
|
2485
|
-
};
|
|
2486
|
-
return {
|
|
2487
|
-
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
2488
|
-
slots: instance.slots,
|
|
2489
|
-
emit: instance.emit,
|
|
2490
|
-
expose
|
|
2491
|
-
};
|
|
2492
|
-
}
|
|
2493
|
-
function getComponentName(Component, includeInferred = true) {
|
|
2494
|
-
return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
2495
|
-
}
|
|
2496
|
-
function isClassComponent(value) {
|
|
2497
|
-
return isFunction(value) && "__vccOpts" in value;
|
|
2498
|
-
}
|
|
2499
|
-
const computed = (getterOrOptions, debugOptions) => {
|
|
2500
|
-
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
2501
|
-
};
|
|
2502
|
-
|
|
2503
1094
|
//#endregion
|
|
2504
1095
|
//#region ../../packages/hooks/use-namespace/index.ts
|
|
2505
1096
|
const defaultNamespace = "c";
|
|
@@ -2513,9 +1104,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2513
1104
|
};
|
|
2514
1105
|
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
2515
1106
|
const useGetDerivedNamespace = (namespaceOverrides) => {
|
|
2516
|
-
const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref("c")) : ref("c"));
|
|
2517
|
-
return computed(() => {
|
|
2518
|
-
return unref(derivedNamespace) || "c";
|
|
1107
|
+
const derivedNamespace = namespaceOverrides || ((0, vue.getCurrentInstance)() ? (0, vue.inject)(namespaceContextKey, (0, vue.ref)("c")) : (0, vue.ref)("c"));
|
|
1108
|
+
return (0, vue.computed)(() => {
|
|
1109
|
+
return (0, vue.unref)(derivedNamespace) || "c";
|
|
2519
1110
|
});
|
|
2520
1111
|
};
|
|
2521
1112
|
const useNamespace = (block, namespaceOverrides) => {
|
|
@@ -2563,8 +1154,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2563
1154
|
//#endregion
|
|
2564
1155
|
//#region ../../packages/hooks/use-prop/index.ts
|
|
2565
1156
|
const useProp = (name) => {
|
|
2566
|
-
const vm = getCurrentInstance();
|
|
2567
|
-
return computed(() => (vm?.proxy?.$props)?.[name]);
|
|
1157
|
+
const vm = (0, vue.getCurrentInstance)();
|
|
1158
|
+
return (0, vue.computed)(() => (vm?.proxy?.$props)?.[name]);
|
|
2568
1159
|
};
|
|
2569
1160
|
|
|
2570
1161
|
//#endregion
|
|
@@ -2573,7 +1164,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2573
1164
|
if (typeof document === "undefined") return "light";
|
|
2574
1165
|
return document.documentElement.dataset.cColorScheme === "dark" ? "dark" : "light";
|
|
2575
1166
|
};
|
|
2576
|
-
const colorScheme = ref(getCurrentScheme());
|
|
1167
|
+
const colorScheme = (0, vue.ref)(getCurrentScheme());
|
|
2577
1168
|
if (typeof window !== "undefined") new MutationObserver(() => {
|
|
2578
1169
|
const newScheme = getCurrentScheme();
|
|
2579
1170
|
if (newScheme !== colorScheme.value) colorScheme.value = newScheme;
|
|
@@ -2581,7 +1172,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2581
1172
|
attributes: true,
|
|
2582
1173
|
attributeFilter: ["data-c-color-scheme"]
|
|
2583
1174
|
});
|
|
2584
|
-
const useColorScheme = () => readonly(colorScheme);
|
|
1175
|
+
const useColorScheme = () => (0, vue.readonly)(colorScheme);
|
|
2585
1176
|
|
|
2586
1177
|
//#endregion
|
|
2587
1178
|
//#region ../../packages/components/form/src/constants.ts
|
|
@@ -2591,9 +1182,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2591
1182
|
//#region ../../packages/components/form/src/hooks/use-form-common-props.ts
|
|
2592
1183
|
const useFormDisabled = (fallback) => {
|
|
2593
1184
|
const disabled = useProp("disabled");
|
|
2594
|
-
const form = inject(formContextKey, void 0);
|
|
2595
|
-
return computed(() => {
|
|
2596
|
-
return disabled.value ?? unref(fallback) ?? form?.disabled ?? false;
|
|
1185
|
+
const form = (0, vue.inject)(formContextKey, void 0);
|
|
1186
|
+
return (0, vue.computed)(() => {
|
|
1187
|
+
return disabled.value ?? (0, vue.unref)(fallback) ?? form?.disabled ?? false;
|
|
2597
1188
|
});
|
|
2598
1189
|
};
|
|
2599
1190
|
|
|
@@ -2601,11 +1192,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2601
1192
|
//#region ../../packages/components/button/src/use-button.ts
|
|
2602
1193
|
const useButton = (props, slots) => {
|
|
2603
1194
|
const _disabled = useFormDisabled();
|
|
2604
|
-
const _ref = ref();
|
|
1195
|
+
const _ref = (0, vue.ref)();
|
|
2605
1196
|
const { hasLeftSlot, hasRightSlot } = slots;
|
|
2606
1197
|
const hasLeftSection = hasLeftSlot || !!props.leftSection;
|
|
2607
1198
|
const hasRightSection = hasRightSlot || !!props.rightSection;
|
|
2608
|
-
const _props = computed(() => {
|
|
1199
|
+
const _props = (0, vue.computed)(() => {
|
|
2609
1200
|
const _attrs = {
|
|
2610
1201
|
"data-disabled": _disabled.value || props.loading || void 0,
|
|
2611
1202
|
"data-block": props.fullWidth || void 0,
|
|
@@ -2674,7 +1265,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2674
1265
|
};
|
|
2675
1266
|
function useButtonCustomStyle(props) {
|
|
2676
1267
|
const colorScheme = useColorScheme();
|
|
2677
|
-
return computed(() => {
|
|
1268
|
+
return (0, vue.computed)(() => {
|
|
2678
1269
|
const styles = {};
|
|
2679
1270
|
const { color, gradient, justify, variant } = props;
|
|
2680
1271
|
const scheme = colorScheme.value;
|
|
@@ -2768,7 +1359,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2768
1359
|
key: 3,
|
|
2769
1360
|
"data-position": "right"
|
|
2770
1361
|
};
|
|
2771
|
-
var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
1362
|
+
var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
2772
1363
|
name: "CButton",
|
|
2773
1364
|
__name: "button",
|
|
2774
1365
|
props: {
|
|
@@ -2834,9 +1425,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2834
1425
|
}
|
|
2835
1426
|
},
|
|
2836
1427
|
setup(__props, { expose: __expose }) {
|
|
2837
|
-
const slots = useSlots();
|
|
2838
|
-
const hasLeftSlot = computed(() => !!slots["left-section"]);
|
|
2839
|
-
const hasRightSlot = computed(() => !!slots["right-section"]);
|
|
1428
|
+
const slots = (0, vue.useSlots)();
|
|
1429
|
+
const hasLeftSlot = (0, vue.computed)(() => !!slots["left-section"]);
|
|
1430
|
+
const hasRightSlot = (0, vue.computed)(() => !!slots["right-section"]);
|
|
2840
1431
|
const props = __props;
|
|
2841
1432
|
const { _disabled, _props, _ref, handleClick } = useButton(props, {
|
|
2842
1433
|
hasLeftSlot: hasLeftSlot.value,
|
|
@@ -2844,14 +1435,14 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2844
1435
|
});
|
|
2845
1436
|
const buttonStyle = useButtonCustomStyle(props);
|
|
2846
1437
|
const ns = useNamespace("button");
|
|
2847
|
-
const buttonClass = computed(() => [
|
|
1438
|
+
const buttonClass = (0, vue.computed)(() => [
|
|
2848
1439
|
useNamespace("focus").b("auto"),
|
|
2849
1440
|
!_disabled.value && useNamespace("active").b(),
|
|
2850
1441
|
ns.e("root"),
|
|
2851
1442
|
ns.is("loading", props.loading)
|
|
2852
1443
|
]);
|
|
2853
|
-
const innerClass = computed(() => [ns.e("inner")]);
|
|
2854
|
-
const labelClass = computed(() => [ns.e("label")]);
|
|
1444
|
+
const innerClass = (0, vue.computed)(() => [ns.e("inner")]);
|
|
1445
|
+
const labelClass = (0, vue.computed)(() => [ns.e("label")]);
|
|
2855
1446
|
__expose({
|
|
2856
1447
|
disabled: _disabled.value,
|
|
2857
1448
|
ref: _ref,
|
|
@@ -2859,15 +1450,15 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2859
1450
|
variant: props.variant
|
|
2860
1451
|
});
|
|
2861
1452
|
return (_ctx, _cache) => {
|
|
2862
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps(unref(_props), {
|
|
1453
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.tag), (0, vue.mergeProps)((0, vue.unref)(_props), {
|
|
2863
1454
|
class: buttonClass.value,
|
|
2864
|
-
style: unref(buttonStyle),
|
|
2865
|
-
onClick: unref(handleClick)
|
|
1455
|
+
style: (0, vue.unref)(buttonStyle),
|
|
1456
|
+
onClick: (0, vue.unref)(handleClick)
|
|
2866
1457
|
}), {
|
|
2867
|
-
default: withCtx(() => [
|
|
2868
|
-
_ctx.$slots["left-section"] ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "left-section")])) : __props.leftSection ? (openBlock(), createElementBlock("span", _hoisted_2, [(openBlock(), createBlock(resolveDynamicComponent(__props.leftSection)))])) : createCommentVNode("v-if", true),
|
|
2869
|
-
|
|
2870
|
-
_ctx.$slots["right-section"] ? (openBlock(), createElementBlock("span", _hoisted_3, [renderSlot(_ctx.$slots, "right-section")])) : __props.rightSection ? (openBlock(), createElementBlock("span", _hoisted_4, [(openBlock(), createBlock(resolveDynamicComponent(__props.rightSection)))])) : createCommentVNode("v-if", true)
|
|
1458
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(innerClass.value) }, [
|
|
1459
|
+
_ctx.$slots["left-section"] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1, [(0, vue.renderSlot)(_ctx.$slots, "left-section")])) : __props.leftSection ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2, [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.leftSection)))])) : (0, vue.createCommentVNode)("v-if", true),
|
|
1460
|
+
(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(labelClass.value) }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 2),
|
|
1461
|
+
_ctx.$slots["right-section"] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3, [(0, vue.renderSlot)(_ctx.$slots, "right-section")])) : __props.rightSection ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4, [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.rightSection)))])) : (0, vue.createCommentVNode)("v-if", true)
|
|
2871
1462
|
], 2)]),
|
|
2872
1463
|
_: 3
|
|
2873
1464
|
}, 16, [
|
|
@@ -2889,7 +1480,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2889
1480
|
|
|
2890
1481
|
//#endregion
|
|
2891
1482
|
//#region ../../packages/components/icon/src/icon.vue?vue&type=script&setup=true&lang.ts
|
|
2892
|
-
var icon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
1483
|
+
var icon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
2893
1484
|
name: "CIcon",
|
|
2894
1485
|
inheritAttrs: false,
|
|
2895
1486
|
__name: "icon",
|
|
@@ -2906,7 +1497,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2906
1497
|
setup(__props) {
|
|
2907
1498
|
const props = __props;
|
|
2908
1499
|
const ns = useNamespace("icon");
|
|
2909
|
-
const style = computed(() => {
|
|
1500
|
+
const style = (0, vue.computed)(() => {
|
|
2910
1501
|
const { size, color } = props;
|
|
2911
1502
|
if (!size && !color) return {};
|
|
2912
1503
|
return {
|
|
@@ -2915,10 +1506,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2915
1506
|
};
|
|
2916
1507
|
});
|
|
2917
1508
|
return (_ctx, _cache) => {
|
|
2918
|
-
return openBlock(), createElementBlock("i", mergeProps({
|
|
2919
|
-
class: unref(ns).b(),
|
|
1509
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("i", (0, vue.mergeProps)({
|
|
1510
|
+
class: (0, vue.unref)(ns).b(),
|
|
2920
1511
|
style: style.value
|
|
2921
|
-
}, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16);
|
|
1512
|
+
}, _ctx.$attrs), [(0, vue.renderSlot)(_ctx.$slots, "default")], 16);
|
|
2922
1513
|
};
|
|
2923
1514
|
}
|
|
2924
1515
|
});
|