@dcloudio/uni-cli-shared 3.0.0-alpha-4070720250804001 → 3.0.0-alpha-4070620250731002
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/easycom.d.ts +0 -1
- package/dist/easycom.js +13 -17
- package/dist/hbx/alias.js +10 -43
- package/dist/hbx/index.js +0 -10
- package/dist/hbx/log.js +1 -23
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -3
- package/dist/json/index.d.ts +1 -1
- package/dist/json/index.js +1 -2
- package/dist/json/manifest.d.ts +0 -1
- package/dist/json/manifest.js +1 -11
- package/dist/json/mp/jsonFile.js +2 -4
- package/dist/json/mp/pages.js +0 -1
- package/dist/json/mp/types.d.ts +1 -4
- package/dist/json/uni-x/manifest.d.ts +0 -1
- package/dist/json/uni-x/manifest.js +1 -5
- package/dist/messages/zh_CN.js +0 -1
- package/dist/uni_modules.cloud.d.ts +4 -10
- package/dist/uni_modules.cloud.js +19 -58
- package/dist/uni_modules.d.ts +0 -2
- package/dist/uni_modules.js +2 -81
- package/dist/uts.js +0 -16
- package/dist/vite/autoImport.js +0 -2
- package/dist/vite/cloud.js +5 -51
- package/dist/vite/plugins/index.d.ts +0 -1
- package/dist/vite/plugins/index.js +1 -3
- package/dist/vite/plugins/inject.js +1 -3
- package/dist/vite/plugins/uts/uni_modules.d.ts +0 -1
- package/dist/vite/plugins/uts/uni_modules.js +14 -63
- package/dist/vite/plugins/uts/uvue.js +3 -17
- package/dist/vite/plugins/vitejs/plugins/css.js +5 -40
- package/dist/vue/transforms/transformUTSComponent.js +3 -8
- package/package.json +38 -38
- package/dist/vite/plugins/stats.d.ts +0 -2
- package/dist/vite/plugins/stats.js +0 -42
- package/dist/workers.d.ts +0 -14
- package/dist/workers.js +0 -187
- package/lib/vapor/@vitejs/plugin-vue/LICENSE +0 -21
- package/lib/vapor/@vitejs/plugin-vue/README.md +0 -278
- package/lib/vapor/@vitejs/plugin-vue/dist/index.cjs +0 -3105
- package/lib/vapor/@vitejs/plugin-vue/dist/index.d.cts +0 -113
- package/lib/vapor/@vitejs/plugin-vue/dist/index.d.mts +0 -111
- package/lib/vapor/@vitejs/plugin-vue/dist/index.d.ts +0 -113
- package/lib/vapor/@vitejs/plugin-vue/dist/index.mjs +0 -3090
- package/lib/vapor/@vitejs/plugin-vue/package.json +0 -50
- package/lib/vapor/@vue/compiler-core/LICENSE +0 -21
- package/lib/vapor/@vue/compiler-core/README.md +0 -1
- package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.js +0 -6902
- package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.prod.js +0 -6779
- package/lib/vapor/@vue/compiler-core/dist/compiler-core.esm-bundler.js +0 -5870
- package/lib/vapor/@vue/compiler-core/index.js +0 -7
- package/lib/vapor/@vue/compiler-core/package.json +0 -58
- package/lib/vapor/@vue/compiler-dom/LICENSE +0 -21
- package/lib/vapor/@vue/compiler-dom/README.md +0 -1
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.cjs.js +0 -936
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +0 -856
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +0 -6682
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +0 -14
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +0 -693
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.global.js +0 -6855
- package/lib/vapor/@vue/compiler-dom/dist/compiler-dom.global.prod.js +0 -14
- package/lib/vapor/@vue/compiler-dom/index.js +0 -7
- package/lib/vapor/@vue/compiler-dom/package.json +0 -57
- package/lib/vapor/@vue/compiler-sfc/LICENSE +0 -21
- package/lib/vapor/@vue/compiler-sfc/README.md +0 -80
- package/lib/vapor/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +0 -21682
- package/lib/vapor/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +0 -66272
- package/lib/vapor/@vue/compiler-sfc/package.json +0 -68
- package/lib/vapor/@vue/compiler-ssr/LICENSE +0 -21
- package/lib/vapor/@vue/compiler-ssr/README.md +0 -1
- package/lib/vapor/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +0 -1402
- package/lib/vapor/@vue/compiler-ssr/package.json +0 -34
- package/lib/vapor/@vue/compiler-vapor/LICENSE +0 -21
- package/lib/vapor/@vue/compiler-vapor/README.md +0 -1
- package/lib/vapor/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +0 -4540
- package/lib/vapor/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +0 -37020
- package/lib/vapor/@vue/compiler-vapor/package.json +0 -49
- package/lib/vapor/@vue/reactivity/LICENSE +0 -21
- package/lib/vapor/@vue/reactivity/README.md +0 -19
- package/lib/vapor/@vue/reactivity/dist/reactivity.cjs.js +0 -2033
- package/lib/vapor/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1841
- package/lib/vapor/@vue/reactivity/dist/reactivity.esm-browser.js +0 -2023
- package/lib/vapor/@vue/reactivity/dist/reactivity.esm-browser.prod.js +0 -5
- package/lib/vapor/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -1992
- package/lib/vapor/@vue/reactivity/dist/reactivity.global.js +0 -2082
- package/lib/vapor/@vue/reactivity/dist/reactivity.global.prod.js +0 -5
- package/lib/vapor/@vue/reactivity/index.js +0 -7
- package/lib/vapor/@vue/reactivity/package.json +0 -55
- package/lib/vapor/@vue/runtime-core/LICENSE +0 -21
- package/lib/vapor/@vue/runtime-core/README.md +0 -28
- package/lib/vapor/@vue/runtime-core/dist/runtime-core.cjs.js +0 -8972
- package/lib/vapor/@vue/runtime-core/dist/runtime-core.cjs.prod.js +0 -7088
- package/lib/vapor/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -8913
- package/lib/vapor/@vue/runtime-core/index.js +0 -7
- package/lib/vapor/@vue/runtime-core/package.json +0 -54
- package/lib/vapor/@vue/runtime-dom/LICENSE +0 -21
- package/lib/vapor/@vue/runtime-dom/README.md +0 -13
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.cjs.js +0 -1797
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1646
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +0 -12929
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +0 -6
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1838
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.global.js +0 -13086
- package/lib/vapor/@vue/runtime-dom/dist/runtime-dom.global.prod.js +0 -6
- package/lib/vapor/@vue/runtime-dom/index.js +0 -7
- package/lib/vapor/@vue/runtime-dom/package.json +0 -60
- package/lib/vapor/@vue/runtime-vapor/LICENSE +0 -21
- package/lib/vapor/@vue/runtime-vapor/README.md +0 -8
- package/lib/vapor/@vue/runtime-vapor/dist/runtime-vapor.esm-bundler.js +0 -3242
- package/lib/vapor/@vue/runtime-vapor/package.json +0 -47
- package/lib/vapor/@vue/server-renderer/LICENSE +0 -21
- package/lib/vapor/@vue/server-renderer/README.md +0 -178
- package/lib/vapor/@vue/server-renderer/dist/server-renderer.cjs.js +0 -1144
- package/lib/vapor/@vue/server-renderer/dist/server-renderer.cjs.prod.js +0 -871
- package/lib/vapor/@vue/server-renderer/dist/server-renderer.esm-browser.js +0 -8756
- package/lib/vapor/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js +0 -5
- package/lib/vapor/@vue/server-renderer/dist/server-renderer.esm-bundler.js +0 -1366
- package/lib/vapor/@vue/server-renderer/index.js +0 -7
- package/lib/vapor/@vue/server-renderer/package.json +0 -55
- package/lib/vapor/@vue/shared/LICENSE +0 -21
- package/lib/vapor/@vue/shared/README.md +0 -3
- package/lib/vapor/@vue/shared/dist/shared.cjs.js +0 -698
- package/lib/vapor/@vue/shared/dist/shared.cjs.prod.js +0 -690
- package/lib/vapor/@vue/shared/dist/shared.esm-bundler.js +0 -616
- package/lib/vapor/@vue/shared/index.js +0 -7
- package/lib/vapor/@vue/shared/package.json +0 -47
- package/lib/vapor/@vue/vue/LICENSE +0 -21
- package/lib/vapor/@vue/vue/README.md +0 -62
- package/lib/vapor/@vue/vue/compiler-sfc/index.browser.js +0 -1
- package/lib/vapor/@vue/vue/compiler-sfc/index.browser.mjs +0 -1
- package/lib/vapor/@vue/vue/compiler-sfc/index.d.mts +0 -1
- package/lib/vapor/@vue/vue/compiler-sfc/index.d.ts +0 -1
- package/lib/vapor/@vue/vue/compiler-sfc/index.js +0 -3
- package/lib/vapor/@vue/vue/compiler-sfc/index.mjs +0 -3
- package/lib/vapor/@vue/vue/compiler-sfc/package.json +0 -4
- package/lib/vapor/@vue/vue/compiler-sfc/register-ts.js +0 -3
- package/lib/vapor/@vue/vue/dist/vue.cjs.js +0 -80
- package/lib/vapor/@vue/vue/dist/vue.cjs.prod.js +0 -66
- package/lib/vapor/@vue/vue/dist/vue.esm-browser.js +0 -18840
- package/lib/vapor/@vue/vue/dist/vue.esm-browser.prod.js +0 -12
- package/lib/vapor/@vue/vue/dist/vue.esm-bundler.js +0 -72
- package/lib/vapor/@vue/vue/dist/vue.global.js +0 -18820
- package/lib/vapor/@vue/vue/dist/vue.global.prod.js +0 -12
- package/lib/vapor/@vue/vue/dist/vue.runtime-with-vapor.esm-browser.js +0 -15648
- package/lib/vapor/@vue/vue/dist/vue.runtime-with-vapor.esm-browser.prod.js +0 -9
- package/lib/vapor/@vue/vue/dist/vue.runtime.esm-browser.js +0 -12953
- package/lib/vapor/@vue/vue/dist/vue.runtime.esm-browser.prod.js +0 -6
- package/lib/vapor/@vue/vue/dist/vue.runtime.esm-bundler.js +0 -29
- package/lib/vapor/@vue/vue/dist/vue.runtime.global.js +0 -13111
- package/lib/vapor/@vue/vue/dist/vue.runtime.global.prod.js +0 -6
- package/lib/vapor/@vue/vue/index.js +0 -7
- package/lib/vapor/@vue/vue/index.mjs +0 -1
- package/lib/vapor/@vue/vue/jsx-runtime/index.d.ts +0 -25
- package/lib/vapor/@vue/vue/jsx-runtime/index.js +0 -15
- package/lib/vapor/@vue/vue/jsx-runtime/index.mjs +0 -12
- package/lib/vapor/@vue/vue/jsx-runtime/package.json +0 -5
- package/lib/vapor/@vue/vue/jsx.d.ts +0 -22
- package/lib/vapor/@vue/vue/package.json +0 -114
- package/lib/vapor/@vue/vue/server-renderer/index.d.mts +0 -1
- package/lib/vapor/@vue/vue/server-renderer/index.d.ts +0 -1
- package/lib/vapor/@vue/vue/server-renderer/index.js +0 -1
- package/lib/vapor/@vue/vue/server-renderer/index.mjs +0 -1
- package/lib/vapor/@vue/vue/server-renderer/package.json +0 -4
|
@@ -1,616 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @vue/shared v3.6.0-alpha.2
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/
|
|
6
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
|
-
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function makeMap(str) {
|
|
9
|
-
const map = /* @__PURE__ */ Object.create(null);
|
|
10
|
-
for (const key of str.split(",")) map[key] = 1;
|
|
11
|
-
return (val) => val in map;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
|
15
|
-
const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
|
16
|
-
const NOOP = () => {
|
|
17
|
-
};
|
|
18
|
-
const YES = () => true;
|
|
19
|
-
const NO = () => false;
|
|
20
|
-
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
21
|
-
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
22
|
-
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
23
|
-
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
24
|
-
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
25
|
-
const extend = Object.assign;
|
|
26
|
-
const remove = (arr, el) => {
|
|
27
|
-
const i = arr.indexOf(el);
|
|
28
|
-
if (i > -1) {
|
|
29
|
-
arr.splice(i, 1);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
33
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
34
|
-
const isArray = Array.isArray;
|
|
35
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
36
|
-
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
37
|
-
const isDate = (val) => toTypeString(val) === "[object Date]";
|
|
38
|
-
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
|
39
|
-
const isFunction = (val) => typeof val === "function";
|
|
40
|
-
const isString = (val) => typeof val === "string";
|
|
41
|
-
const isSymbol = (val) => typeof val === "symbol";
|
|
42
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
43
|
-
const isPromise = (val) => {
|
|
44
|
-
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
45
|
-
};
|
|
46
|
-
const objectToString = Object.prototype.toString;
|
|
47
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
48
|
-
const toRawType = (value) => {
|
|
49
|
-
return toTypeString(value).slice(8, -1);
|
|
50
|
-
};
|
|
51
|
-
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
52
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
53
|
-
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
54
|
-
// the leading comma is intentional so empty string "" is also included
|
|
55
|
-
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
56
|
-
);
|
|
57
|
-
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
58
|
-
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
59
|
-
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
60
|
-
);
|
|
61
|
-
const cacheStringFunction = (fn) => {
|
|
62
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
63
|
-
return (str) => {
|
|
64
|
-
const hit = cache[str];
|
|
65
|
-
return hit || (cache[str] = fn(str));
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
const camelizeRE = /-(\w)/g;
|
|
69
|
-
const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
70
|
-
const camelize = cacheStringFunction(
|
|
71
|
-
(str) => str.replace(camelizeRE, camelizeReplacer)
|
|
72
|
-
);
|
|
73
|
-
const hyphenateRE = /\B([A-Z])/g;
|
|
74
|
-
const hyphenate = cacheStringFunction(
|
|
75
|
-
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
76
|
-
);
|
|
77
|
-
const capitalize = cacheStringFunction((str) => {
|
|
78
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
79
|
-
});
|
|
80
|
-
const toHandlerKey = cacheStringFunction(
|
|
81
|
-
(str) => {
|
|
82
|
-
const s = str ? `on${capitalize(str)}` : ``;
|
|
83
|
-
return s;
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
87
|
-
const invokeArrayFns = (fns, ...arg) => {
|
|
88
|
-
for (let i = 0; i < fns.length; i++) {
|
|
89
|
-
fns[i](...arg);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const def = (obj, key, value, writable = false) => {
|
|
93
|
-
Object.defineProperty(obj, key, {
|
|
94
|
-
configurable: true,
|
|
95
|
-
enumerable: false,
|
|
96
|
-
writable,
|
|
97
|
-
value
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
const looseToNumber = (val) => {
|
|
101
|
-
const n = parseFloat(val);
|
|
102
|
-
return isNaN(n) ? val : n;
|
|
103
|
-
};
|
|
104
|
-
const toNumber = (val) => {
|
|
105
|
-
const n = isString(val) ? Number(val) : NaN;
|
|
106
|
-
return isNaN(n) ? val : n;
|
|
107
|
-
};
|
|
108
|
-
let _globalThis;
|
|
109
|
-
const getGlobalThis = () => {
|
|
110
|
-
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
111
|
-
};
|
|
112
|
-
const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
|
|
113
|
-
function genPropsAccessExp(name) {
|
|
114
|
-
return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
|
|
115
|
-
}
|
|
116
|
-
function genCacheKey(source, options) {
|
|
117
|
-
return source + JSON.stringify(
|
|
118
|
-
options,
|
|
119
|
-
(_, val) => typeof val === "function" ? val.toString() : val
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
function canSetValueDirectly(tagName) {
|
|
123
|
-
return tagName !== "PROGRESS" && // custom elements may use _value internally
|
|
124
|
-
!tagName.includes("-");
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const PatchFlags = {
|
|
128
|
-
"TEXT": 1,
|
|
129
|
-
"1": "TEXT",
|
|
130
|
-
"CLASS": 2,
|
|
131
|
-
"2": "CLASS",
|
|
132
|
-
"STYLE": 4,
|
|
133
|
-
"4": "STYLE",
|
|
134
|
-
"PROPS": 8,
|
|
135
|
-
"8": "PROPS",
|
|
136
|
-
"FULL_PROPS": 16,
|
|
137
|
-
"16": "FULL_PROPS",
|
|
138
|
-
"NEED_HYDRATION": 32,
|
|
139
|
-
"32": "NEED_HYDRATION",
|
|
140
|
-
"STABLE_FRAGMENT": 64,
|
|
141
|
-
"64": "STABLE_FRAGMENT",
|
|
142
|
-
"KEYED_FRAGMENT": 128,
|
|
143
|
-
"128": "KEYED_FRAGMENT",
|
|
144
|
-
"UNKEYED_FRAGMENT": 256,
|
|
145
|
-
"256": "UNKEYED_FRAGMENT",
|
|
146
|
-
"NEED_PATCH": 512,
|
|
147
|
-
"512": "NEED_PATCH",
|
|
148
|
-
"DYNAMIC_SLOTS": 1024,
|
|
149
|
-
"1024": "DYNAMIC_SLOTS",
|
|
150
|
-
"DEV_ROOT_FRAGMENT": 2048,
|
|
151
|
-
"2048": "DEV_ROOT_FRAGMENT",
|
|
152
|
-
"CACHED": -1,
|
|
153
|
-
"-1": "CACHED",
|
|
154
|
-
"BAIL": -2,
|
|
155
|
-
"-2": "BAIL"
|
|
156
|
-
};
|
|
157
|
-
const PatchFlagNames = {
|
|
158
|
-
[1]: `TEXT`,
|
|
159
|
-
[2]: `CLASS`,
|
|
160
|
-
[4]: `STYLE`,
|
|
161
|
-
[8]: `PROPS`,
|
|
162
|
-
[16]: `FULL_PROPS`,
|
|
163
|
-
[32]: `NEED_HYDRATION`,
|
|
164
|
-
[64]: `STABLE_FRAGMENT`,
|
|
165
|
-
[128]: `KEYED_FRAGMENT`,
|
|
166
|
-
[256]: `UNKEYED_FRAGMENT`,
|
|
167
|
-
[512]: `NEED_PATCH`,
|
|
168
|
-
[1024]: `DYNAMIC_SLOTS`,
|
|
169
|
-
[2048]: `DEV_ROOT_FRAGMENT`,
|
|
170
|
-
[-1]: `CACHED`,
|
|
171
|
-
[-2]: `BAIL`
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
const ShapeFlags = {
|
|
175
|
-
"ELEMENT": 1,
|
|
176
|
-
"1": "ELEMENT",
|
|
177
|
-
"FUNCTIONAL_COMPONENT": 2,
|
|
178
|
-
"2": "FUNCTIONAL_COMPONENT",
|
|
179
|
-
"STATEFUL_COMPONENT": 4,
|
|
180
|
-
"4": "STATEFUL_COMPONENT",
|
|
181
|
-
"TEXT_CHILDREN": 8,
|
|
182
|
-
"8": "TEXT_CHILDREN",
|
|
183
|
-
"ARRAY_CHILDREN": 16,
|
|
184
|
-
"16": "ARRAY_CHILDREN",
|
|
185
|
-
"SLOTS_CHILDREN": 32,
|
|
186
|
-
"32": "SLOTS_CHILDREN",
|
|
187
|
-
"TELEPORT": 64,
|
|
188
|
-
"64": "TELEPORT",
|
|
189
|
-
"SUSPENSE": 128,
|
|
190
|
-
"128": "SUSPENSE",
|
|
191
|
-
"COMPONENT_SHOULD_KEEP_ALIVE": 256,
|
|
192
|
-
"256": "COMPONENT_SHOULD_KEEP_ALIVE",
|
|
193
|
-
"COMPONENT_KEPT_ALIVE": 512,
|
|
194
|
-
"512": "COMPONENT_KEPT_ALIVE",
|
|
195
|
-
"COMPONENT": 6,
|
|
196
|
-
"6": "COMPONENT"
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
const SlotFlags = {
|
|
200
|
-
"STABLE": 1,
|
|
201
|
-
"1": "STABLE",
|
|
202
|
-
"DYNAMIC": 2,
|
|
203
|
-
"2": "DYNAMIC",
|
|
204
|
-
"FORWARDED": 3,
|
|
205
|
-
"3": "FORWARDED"
|
|
206
|
-
};
|
|
207
|
-
const slotFlagsText = {
|
|
208
|
-
[1]: "STABLE",
|
|
209
|
-
[2]: "DYNAMIC",
|
|
210
|
-
[3]: "FORWARDED"
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
|
|
214
|
-
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
215
|
-
const isGloballyWhitelisted = isGloballyAllowed;
|
|
216
|
-
|
|
217
|
-
const range = 2;
|
|
218
|
-
function generateCodeFrame(source, start = 0, end = source.length) {
|
|
219
|
-
start = Math.max(0, Math.min(start, source.length));
|
|
220
|
-
end = Math.max(0, Math.min(end, source.length));
|
|
221
|
-
if (start > end) return "";
|
|
222
|
-
let lines = source.split(/(\r?\n)/);
|
|
223
|
-
const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
|
|
224
|
-
lines = lines.filter((_, idx) => idx % 2 === 0);
|
|
225
|
-
let count = 0;
|
|
226
|
-
const res = [];
|
|
227
|
-
for (let i = 0; i < lines.length; i++) {
|
|
228
|
-
count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
|
|
229
|
-
if (count >= start) {
|
|
230
|
-
for (let j = i - range; j <= i + range || end > count; j++) {
|
|
231
|
-
if (j < 0 || j >= lines.length) continue;
|
|
232
|
-
const line = j + 1;
|
|
233
|
-
res.push(
|
|
234
|
-
`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`
|
|
235
|
-
);
|
|
236
|
-
const lineLength = lines[j].length;
|
|
237
|
-
const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
|
|
238
|
-
if (j === i) {
|
|
239
|
-
const pad = start - (count - (lineLength + newLineSeqLength));
|
|
240
|
-
const length = Math.max(
|
|
241
|
-
1,
|
|
242
|
-
end > count ? lineLength - pad : end - start
|
|
243
|
-
);
|
|
244
|
-
res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
|
|
245
|
-
} else if (j > i) {
|
|
246
|
-
if (end > count) {
|
|
247
|
-
const length = Math.max(Math.min(end - count, lineLength), 1);
|
|
248
|
-
res.push(` | ` + "^".repeat(length));
|
|
249
|
-
}
|
|
250
|
-
count += lineLength + newLineSeqLength;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return res.join("\n");
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function normalizeStyle(value) {
|
|
260
|
-
if (isArray(value)) {
|
|
261
|
-
const res = {};
|
|
262
|
-
for (let i = 0; i < value.length; i++) {
|
|
263
|
-
const item = value[i];
|
|
264
|
-
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
|
265
|
-
if (normalized) {
|
|
266
|
-
for (const key in normalized) {
|
|
267
|
-
res[key] = normalized[key];
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
return res;
|
|
272
|
-
} else if (isString(value) || isObject(value)) {
|
|
273
|
-
return value;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
277
|
-
const propertyDelimiterRE = /:([^]+)/;
|
|
278
|
-
const styleCommentRE = /\/\*[^]*?\*\//g;
|
|
279
|
-
function parseStringStyle(cssText) {
|
|
280
|
-
const ret = {};
|
|
281
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
282
|
-
if (item) {
|
|
283
|
-
const tmp = item.split(propertyDelimiterRE);
|
|
284
|
-
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
return ret;
|
|
288
|
-
}
|
|
289
|
-
function stringifyStyle(styles) {
|
|
290
|
-
if (!styles) return "";
|
|
291
|
-
if (isString(styles)) return styles;
|
|
292
|
-
let ret = "";
|
|
293
|
-
for (const key in styles) {
|
|
294
|
-
const value = styles[key];
|
|
295
|
-
if (isString(value) || typeof value === "number") {
|
|
296
|
-
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
|
|
297
|
-
ret += `${normalizedKey}:${value};`;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return ret;
|
|
301
|
-
}
|
|
302
|
-
function normalizeClass(value) {
|
|
303
|
-
let res = "";
|
|
304
|
-
if (isString(value)) {
|
|
305
|
-
res = value;
|
|
306
|
-
} else if (isArray(value)) {
|
|
307
|
-
for (let i = 0; i < value.length; i++) {
|
|
308
|
-
const normalized = normalizeClass(value[i]);
|
|
309
|
-
if (normalized) {
|
|
310
|
-
res += normalized + " ";
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
} else if (isObject(value)) {
|
|
314
|
-
for (const name in value) {
|
|
315
|
-
if (value[name]) {
|
|
316
|
-
res += name + " ";
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
return res.trim();
|
|
321
|
-
}
|
|
322
|
-
function normalizeProps(props) {
|
|
323
|
-
if (!props) return null;
|
|
324
|
-
let { class: klass, style } = props;
|
|
325
|
-
if (klass && !isString(klass)) {
|
|
326
|
-
props.class = normalizeClass(klass);
|
|
327
|
-
}
|
|
328
|
-
if (style) {
|
|
329
|
-
props.style = normalizeStyle(style);
|
|
330
|
-
}
|
|
331
|
-
return props;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
335
|
-
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
336
|
-
const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
|
|
337
|
-
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
338
|
-
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
339
|
-
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
340
|
-
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
341
|
-
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
342
|
-
|
|
343
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
344
|
-
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
345
|
-
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
346
|
-
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
347
|
-
);
|
|
348
|
-
function includeBooleanAttr(value) {
|
|
349
|
-
return !!value || value === "";
|
|
350
|
-
}
|
|
351
|
-
const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
|
|
352
|
-
const attrValidationCache = {};
|
|
353
|
-
function isSSRSafeAttrName(name) {
|
|
354
|
-
if (attrValidationCache.hasOwnProperty(name)) {
|
|
355
|
-
return attrValidationCache[name];
|
|
356
|
-
}
|
|
357
|
-
const isUnsafe = unsafeAttrCharRE.test(name);
|
|
358
|
-
if (isUnsafe) {
|
|
359
|
-
console.error(`unsafe attribute name: ${name}`);
|
|
360
|
-
}
|
|
361
|
-
return attrValidationCache[name] = !isUnsafe;
|
|
362
|
-
}
|
|
363
|
-
const propsToAttrMap = {
|
|
364
|
-
acceptCharset: "accept-charset",
|
|
365
|
-
className: "class",
|
|
366
|
-
htmlFor: "for",
|
|
367
|
-
httpEquiv: "http-equiv"
|
|
368
|
-
};
|
|
369
|
-
const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|
370
|
-
`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
|
|
371
|
-
);
|
|
372
|
-
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
|
373
|
-
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
|
374
|
-
);
|
|
375
|
-
const isKnownMathMLAttr = /* @__PURE__ */ makeMap(
|
|
376
|
-
`accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`
|
|
377
|
-
);
|
|
378
|
-
function isRenderableAttrValue(value) {
|
|
379
|
-
if (value == null) {
|
|
380
|
-
return false;
|
|
381
|
-
}
|
|
382
|
-
const type = typeof value;
|
|
383
|
-
return type === "string" || type === "number" || type === "boolean";
|
|
384
|
-
}
|
|
385
|
-
function shouldSetAsAttr(tagName, key) {
|
|
386
|
-
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
|
|
387
|
-
return true;
|
|
388
|
-
}
|
|
389
|
-
if (key === "form") {
|
|
390
|
-
return true;
|
|
391
|
-
}
|
|
392
|
-
if (key === "list" && tagName === "INPUT") {
|
|
393
|
-
return true;
|
|
394
|
-
}
|
|
395
|
-
if (key === "type" && tagName === "TEXTAREA") {
|
|
396
|
-
return true;
|
|
397
|
-
}
|
|
398
|
-
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
399
|
-
return true;
|
|
400
|
-
}
|
|
401
|
-
return false;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
const escapeRE = /["'&<>]/;
|
|
405
|
-
function escapeHtml(string) {
|
|
406
|
-
const str = "" + string;
|
|
407
|
-
const match = escapeRE.exec(str);
|
|
408
|
-
if (!match) {
|
|
409
|
-
return str;
|
|
410
|
-
}
|
|
411
|
-
let html = "";
|
|
412
|
-
let escaped;
|
|
413
|
-
let index;
|
|
414
|
-
let lastIndex = 0;
|
|
415
|
-
for (index = match.index; index < str.length; index++) {
|
|
416
|
-
switch (str.charCodeAt(index)) {
|
|
417
|
-
case 34:
|
|
418
|
-
escaped = """;
|
|
419
|
-
break;
|
|
420
|
-
case 38:
|
|
421
|
-
escaped = "&";
|
|
422
|
-
break;
|
|
423
|
-
case 39:
|
|
424
|
-
escaped = "'";
|
|
425
|
-
break;
|
|
426
|
-
case 60:
|
|
427
|
-
escaped = "<";
|
|
428
|
-
break;
|
|
429
|
-
case 62:
|
|
430
|
-
escaped = ">";
|
|
431
|
-
break;
|
|
432
|
-
default:
|
|
433
|
-
continue;
|
|
434
|
-
}
|
|
435
|
-
if (lastIndex !== index) {
|
|
436
|
-
html += str.slice(lastIndex, index);
|
|
437
|
-
}
|
|
438
|
-
lastIndex = index + 1;
|
|
439
|
-
html += escaped;
|
|
440
|
-
}
|
|
441
|
-
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
442
|
-
}
|
|
443
|
-
const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
444
|
-
function escapeHtmlComment(src) {
|
|
445
|
-
return src.replace(commentStripRE, "");
|
|
446
|
-
}
|
|
447
|
-
const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
|
|
448
|
-
function getEscapedCssVarName(key, doubleEscape) {
|
|
449
|
-
return key.replace(
|
|
450
|
-
cssVarNameEscapeSymbolsRE,
|
|
451
|
-
(s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
|
|
452
|
-
);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
function looseCompareArrays(a, b) {
|
|
456
|
-
if (a.length !== b.length) return false;
|
|
457
|
-
let equal = true;
|
|
458
|
-
for (let i = 0; equal && i < a.length; i++) {
|
|
459
|
-
equal = looseEqual(a[i], b[i]);
|
|
460
|
-
}
|
|
461
|
-
return equal;
|
|
462
|
-
}
|
|
463
|
-
function looseEqual(a, b) {
|
|
464
|
-
if (a === b) return true;
|
|
465
|
-
let aValidType = isDate(a);
|
|
466
|
-
let bValidType = isDate(b);
|
|
467
|
-
if (aValidType || bValidType) {
|
|
468
|
-
return aValidType && bValidType ? a.getTime() === b.getTime() : false;
|
|
469
|
-
}
|
|
470
|
-
aValidType = isSymbol(a);
|
|
471
|
-
bValidType = isSymbol(b);
|
|
472
|
-
if (aValidType || bValidType) {
|
|
473
|
-
return a === b;
|
|
474
|
-
}
|
|
475
|
-
aValidType = isArray(a);
|
|
476
|
-
bValidType = isArray(b);
|
|
477
|
-
if (aValidType || bValidType) {
|
|
478
|
-
return aValidType && bValidType ? looseCompareArrays(a, b) : false;
|
|
479
|
-
}
|
|
480
|
-
aValidType = isObject(a);
|
|
481
|
-
bValidType = isObject(b);
|
|
482
|
-
if (aValidType || bValidType) {
|
|
483
|
-
if (!aValidType || !bValidType) {
|
|
484
|
-
return false;
|
|
485
|
-
}
|
|
486
|
-
const aKeysCount = Object.keys(a).length;
|
|
487
|
-
const bKeysCount = Object.keys(b).length;
|
|
488
|
-
if (aKeysCount !== bKeysCount) {
|
|
489
|
-
return false;
|
|
490
|
-
}
|
|
491
|
-
for (const key in a) {
|
|
492
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
493
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
494
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
495
|
-
return false;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
return String(a) === String(b);
|
|
500
|
-
}
|
|
501
|
-
function looseIndexOf(arr, val) {
|
|
502
|
-
return arr.findIndex((item) => looseEqual(item, val));
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
const isRef = (val) => {
|
|
506
|
-
return !!(val && val["__v_isRef"] === true);
|
|
507
|
-
};
|
|
508
|
-
const toDisplayString = (val) => {
|
|
509
|
-
switch (typeof val) {
|
|
510
|
-
case "string":
|
|
511
|
-
return val;
|
|
512
|
-
case "object":
|
|
513
|
-
if (val) {
|
|
514
|
-
if (isRef(val)) {
|
|
515
|
-
return toDisplayString(val.value);
|
|
516
|
-
} else if (isArray(val) || val.toString === objectToString || !isFunction(val.toString)) {
|
|
517
|
-
return JSON.stringify(val, replacer, 2);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
default:
|
|
521
|
-
return val == null ? "" : String(val);
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
const replacer = (_key, val) => {
|
|
525
|
-
if (isRef(val)) {
|
|
526
|
-
return replacer(_key, val.value);
|
|
527
|
-
} else if (isMap(val)) {
|
|
528
|
-
return {
|
|
529
|
-
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
530
|
-
(entries, [key, val2], i) => {
|
|
531
|
-
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
532
|
-
return entries;
|
|
533
|
-
},
|
|
534
|
-
{}
|
|
535
|
-
)
|
|
536
|
-
};
|
|
537
|
-
} else if (isSet(val)) {
|
|
538
|
-
return {
|
|
539
|
-
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
|
540
|
-
};
|
|
541
|
-
} else if (isSymbol(val)) {
|
|
542
|
-
return stringifySymbol(val);
|
|
543
|
-
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
|
544
|
-
return String(val);
|
|
545
|
-
}
|
|
546
|
-
return val;
|
|
547
|
-
};
|
|
548
|
-
const stringifySymbol = (v, i = "") => {
|
|
549
|
-
var _a;
|
|
550
|
-
return (
|
|
551
|
-
// Symbol.description in es2019+ so we need to cast here to pass
|
|
552
|
-
// the lib: es2016 check
|
|
553
|
-
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
554
|
-
);
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
function getSequence(arr) {
|
|
558
|
-
const p = arr.slice();
|
|
559
|
-
const result = [0];
|
|
560
|
-
let i, j, u, v, c;
|
|
561
|
-
const len = arr.length;
|
|
562
|
-
for (i = 0; i < len; i++) {
|
|
563
|
-
const arrI = arr[i];
|
|
564
|
-
if (arrI !== 0) {
|
|
565
|
-
j = result[result.length - 1];
|
|
566
|
-
if (arr[j] < arrI) {
|
|
567
|
-
p[i] = j;
|
|
568
|
-
result.push(i);
|
|
569
|
-
continue;
|
|
570
|
-
}
|
|
571
|
-
u = 0;
|
|
572
|
-
v = result.length - 1;
|
|
573
|
-
while (u < v) {
|
|
574
|
-
c = u + v >> 1;
|
|
575
|
-
if (arr[result[c]] < arrI) {
|
|
576
|
-
u = c + 1;
|
|
577
|
-
} else {
|
|
578
|
-
v = c;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
if (arrI < arr[result[u]]) {
|
|
582
|
-
if (u > 0) {
|
|
583
|
-
p[i] = result[u - 1];
|
|
584
|
-
}
|
|
585
|
-
result[u] = i;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
u = result.length;
|
|
590
|
-
v = result[u - 1];
|
|
591
|
-
while (u-- > 0) {
|
|
592
|
-
result[u] = v;
|
|
593
|
-
v = p[v];
|
|
594
|
-
}
|
|
595
|
-
return result;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
function normalizeCssVarValue(value) {
|
|
599
|
-
if (value == null) {
|
|
600
|
-
return "initial";
|
|
601
|
-
}
|
|
602
|
-
if (typeof value === "string") {
|
|
603
|
-
return value === "" ? " " : value;
|
|
604
|
-
}
|
|
605
|
-
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
606
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
607
|
-
console.warn(
|
|
608
|
-
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
609
|
-
value
|
|
610
|
-
);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return String(value);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, YES, camelize, canSetValueDirectly, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, getSequence, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isNativeOn, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeCssVarValue, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, shouldSetAsAttr, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vue/shared",
|
|
3
|
-
"version": "3.5.14",
|
|
4
|
-
"description": "internal utils shared across @vue packages",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "dist/shared.esm-bundler.js",
|
|
7
|
-
"types": "dist/shared.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"index.js",
|
|
10
|
-
"dist"
|
|
11
|
-
],
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./dist/shared.d.ts",
|
|
15
|
-
"node": {
|
|
16
|
-
"production": "./dist/shared.cjs.prod.js",
|
|
17
|
-
"development": "./dist/shared.cjs.js",
|
|
18
|
-
"default": "./index.js"
|
|
19
|
-
},
|
|
20
|
-
"module": "./dist/shared.esm-bundler.js",
|
|
21
|
-
"import": "./dist/shared.esm-bundler.js",
|
|
22
|
-
"require": "./index.js"
|
|
23
|
-
},
|
|
24
|
-
"./*": "./*"
|
|
25
|
-
},
|
|
26
|
-
"sideEffects": false,
|
|
27
|
-
"buildOptions": {
|
|
28
|
-
"formats": [
|
|
29
|
-
"esm-bundler",
|
|
30
|
-
"cjs"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/vuejs/core.git",
|
|
36
|
-
"directory": "packages/shared"
|
|
37
|
-
},
|
|
38
|
-
"keywords": [
|
|
39
|
-
"vue"
|
|
40
|
-
],
|
|
41
|
-
"author": "Evan You",
|
|
42
|
-
"license": "MIT",
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/vuejs/core/issues"
|
|
45
|
-
},
|
|
46
|
-
"homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme"
|
|
47
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018-present, Yuxi (Evan) You
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|