@symbo.ls/scratch 2.11.360 → 2.11.373
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/cjs/factory.js +10 -4
- package/dist/cjs/index.js +1549 -115
- package/dist/cjs/set.js +1530 -93
- package/dist/cjs/system/color.js +1487 -38
- package/dist/cjs/system/document.js +1477 -28
- package/dist/cjs/system/font.js +1485 -47
- package/dist/cjs/system/index.js +1536 -104
- package/dist/cjs/system/reset.js +1486 -37
- package/dist/cjs/system/shadow.js +1492 -57
- package/dist/cjs/system/spacing.js +1490 -55
- package/dist/cjs/system/svg.js +1479 -30
- package/dist/cjs/system/theme.js +1494 -45
- package/dist/cjs/system/timing.js +1485 -43
- package/dist/cjs/system/typography.js +1480 -36
- package/dist/cjs/transforms/index.js +1506 -74
- package/dist/cjs/utils/color.js +10 -4
- package/dist/cjs/utils/index.js +1482 -36
- package/dist/cjs/utils/sequence.js +1477 -31
- package/dist/cjs/utils/sprite.js +10 -4
- package/dist/cjs/utils/var.js +1475 -26
- package/package.json +3 -3
|
@@ -30,6 +30,1454 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
+
// ../utils/dist/cjs/index.js
|
|
34
|
+
var require_cjs = __commonJS({
|
|
35
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
var __create2 = Object.create;
|
|
38
|
+
var __defProp2 = Object.defineProperty;
|
|
39
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
40
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
41
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
42
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
43
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
44
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
45
|
+
};
|
|
46
|
+
var __export2 = (target, all) => {
|
|
47
|
+
for (var name in all)
|
|
48
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
49
|
+
};
|
|
50
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
51
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
52
|
+
for (let key of __getOwnPropNames2(from))
|
|
53
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
54
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
55
|
+
}
|
|
56
|
+
return to;
|
|
57
|
+
};
|
|
58
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
59
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
60
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
61
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
62
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
63
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
64
|
+
mod
|
|
65
|
+
));
|
|
66
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
67
|
+
var require_key2 = __commonJS2({
|
|
68
|
+
"../../node_modules/@domql/utils/dist/cjs/key.js"(exports2, module22) {
|
|
69
|
+
"use strict";
|
|
70
|
+
var __defProp22 = Object.defineProperty;
|
|
71
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
72
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
73
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
74
|
+
var __export22 = (target, all) => {
|
|
75
|
+
for (var name in all)
|
|
76
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
77
|
+
};
|
|
78
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
79
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
80
|
+
for (let key of __getOwnPropNames22(from))
|
|
81
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
82
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
83
|
+
}
|
|
84
|
+
return to;
|
|
85
|
+
};
|
|
86
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
87
|
+
var key_exports = {};
|
|
88
|
+
__export22(key_exports, {
|
|
89
|
+
createSnapshotId: () => createSnapshotId,
|
|
90
|
+
generateKey: () => generateKey
|
|
91
|
+
});
|
|
92
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
93
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
94
|
+
let index = 0;
|
|
95
|
+
function newId() {
|
|
96
|
+
index++;
|
|
97
|
+
return index;
|
|
98
|
+
}
|
|
99
|
+
return newId;
|
|
100
|
+
}();
|
|
101
|
+
var createSnapshotId = generateKey;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
var require_env2 = __commonJS2({
|
|
105
|
+
"../../node_modules/@domql/utils/dist/cjs/env.js"(exports2, module22) {
|
|
106
|
+
"use strict";
|
|
107
|
+
var __defProp22 = Object.defineProperty;
|
|
108
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
109
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
110
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
111
|
+
var __export22 = (target, all) => {
|
|
112
|
+
for (var name in all)
|
|
113
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
114
|
+
};
|
|
115
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
116
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
117
|
+
for (let key of __getOwnPropNames22(from))
|
|
118
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
119
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
120
|
+
}
|
|
121
|
+
return to;
|
|
122
|
+
};
|
|
123
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
124
|
+
var env_exports = {};
|
|
125
|
+
__export22(env_exports, {
|
|
126
|
+
NODE_ENV: () => NODE_ENV,
|
|
127
|
+
getNev: () => getNev,
|
|
128
|
+
isDevelopment: () => isDevelopment,
|
|
129
|
+
isProduction: () => isProduction,
|
|
130
|
+
isTest: () => isTest
|
|
131
|
+
});
|
|
132
|
+
module22.exports = __toCommonJS22(env_exports);
|
|
133
|
+
var NODE_ENV = "development";
|
|
134
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
135
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
136
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
137
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var require_globals2 = __commonJS2({
|
|
141
|
+
"../../node_modules/@domql/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
142
|
+
"use strict";
|
|
143
|
+
var __defProp22 = Object.defineProperty;
|
|
144
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
145
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
146
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
147
|
+
var __export22 = (target, all) => {
|
|
148
|
+
for (var name in all)
|
|
149
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
150
|
+
};
|
|
151
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
152
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
153
|
+
for (let key of __getOwnPropNames22(from))
|
|
154
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
155
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
156
|
+
}
|
|
157
|
+
return to;
|
|
158
|
+
};
|
|
159
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
160
|
+
var globals_exports = {};
|
|
161
|
+
__export22(globals_exports, {
|
|
162
|
+
document: () => document22,
|
|
163
|
+
global: () => global,
|
|
164
|
+
self: () => self,
|
|
165
|
+
window: () => window2
|
|
166
|
+
});
|
|
167
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
168
|
+
var global = globalThis;
|
|
169
|
+
var self = globalThis;
|
|
170
|
+
var window2 = globalThis;
|
|
171
|
+
var document22 = window2.document;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
var require_node2 = __commonJS2({
|
|
175
|
+
"../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module22) {
|
|
176
|
+
"use strict";
|
|
177
|
+
var __defProp22 = Object.defineProperty;
|
|
178
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
179
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
180
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
181
|
+
var __export22 = (target, all) => {
|
|
182
|
+
for (var name in all)
|
|
183
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
184
|
+
};
|
|
185
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
186
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
187
|
+
for (let key of __getOwnPropNames22(from))
|
|
188
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
189
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
190
|
+
}
|
|
191
|
+
return to;
|
|
192
|
+
};
|
|
193
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
194
|
+
var node_exports = {};
|
|
195
|
+
__export22(node_exports, {
|
|
196
|
+
isHtmlElement: () => isHtmlElement,
|
|
197
|
+
isNode: () => isNode
|
|
198
|
+
});
|
|
199
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
200
|
+
var import_globals2 = require_globals2();
|
|
201
|
+
var isNode = (obj) => {
|
|
202
|
+
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
203
|
+
};
|
|
204
|
+
var isHtmlElement = (obj) => {
|
|
205
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
var require_types2 = __commonJS2({
|
|
210
|
+
"../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module22) {
|
|
211
|
+
"use strict";
|
|
212
|
+
var __defProp22 = Object.defineProperty;
|
|
213
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
214
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
215
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
216
|
+
var __export22 = (target, all) => {
|
|
217
|
+
for (var name in all)
|
|
218
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
219
|
+
};
|
|
220
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
221
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
222
|
+
for (let key of __getOwnPropNames22(from))
|
|
223
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
224
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
225
|
+
}
|
|
226
|
+
return to;
|
|
227
|
+
};
|
|
228
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
229
|
+
var types_exports = {};
|
|
230
|
+
__export22(types_exports, {
|
|
231
|
+
TYPES: () => TYPES,
|
|
232
|
+
is: () => is,
|
|
233
|
+
isArray: () => isArray3,
|
|
234
|
+
isBoolean: () => isBoolean,
|
|
235
|
+
isDate: () => isDate,
|
|
236
|
+
isDefined: () => isDefined2,
|
|
237
|
+
isFunction: () => isFunction,
|
|
238
|
+
isNot: () => isNot,
|
|
239
|
+
isNull: () => isNull,
|
|
240
|
+
isNumber: () => isNumber2,
|
|
241
|
+
isObject: () => isObject3,
|
|
242
|
+
isObjectLike: () => isObjectLike2,
|
|
243
|
+
isString: () => isString22,
|
|
244
|
+
isUndefined: () => isUndefined
|
|
245
|
+
});
|
|
246
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
247
|
+
var import_node = require_node2();
|
|
248
|
+
var isObject3 = (arg) => {
|
|
249
|
+
if (arg === null)
|
|
250
|
+
return false;
|
|
251
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
252
|
+
};
|
|
253
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
254
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
255
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
256
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
257
|
+
var isNull = (arg) => arg === null;
|
|
258
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
259
|
+
var isDate = (d) => d instanceof Date;
|
|
260
|
+
var isObjectLike2 = (arg) => {
|
|
261
|
+
if (arg === null)
|
|
262
|
+
return false;
|
|
263
|
+
return typeof arg === "object";
|
|
264
|
+
};
|
|
265
|
+
var isDefined2 = (arg) => {
|
|
266
|
+
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
267
|
+
};
|
|
268
|
+
var isUndefined = (arg) => {
|
|
269
|
+
return arg === void 0;
|
|
270
|
+
};
|
|
271
|
+
var TYPES = {
|
|
272
|
+
boolean: isBoolean,
|
|
273
|
+
array: isArray3,
|
|
274
|
+
object: isObject3,
|
|
275
|
+
string: isString22,
|
|
276
|
+
date: isDate,
|
|
277
|
+
number: isNumber2,
|
|
278
|
+
null: isNull,
|
|
279
|
+
function: isFunction,
|
|
280
|
+
objectLike: isObjectLike2,
|
|
281
|
+
node: import_node.isNode,
|
|
282
|
+
htmlElement: import_node.isHtmlElement,
|
|
283
|
+
defined: isDefined2
|
|
284
|
+
};
|
|
285
|
+
var is = (arg) => {
|
|
286
|
+
return (...args) => {
|
|
287
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
var isNot = (arg) => {
|
|
291
|
+
return (...args) => {
|
|
292
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
var require_array2 = __commonJS2({
|
|
298
|
+
"../../node_modules/@domql/utils/dist/cjs/array.js"(exports2, module22) {
|
|
299
|
+
"use strict";
|
|
300
|
+
var __defProp22 = Object.defineProperty;
|
|
301
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
302
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
303
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
304
|
+
var __export22 = (target, all) => {
|
|
305
|
+
for (var name in all)
|
|
306
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
307
|
+
};
|
|
308
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
309
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
310
|
+
for (let key of __getOwnPropNames22(from))
|
|
311
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
312
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
313
|
+
}
|
|
314
|
+
return to;
|
|
315
|
+
};
|
|
316
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
317
|
+
var array_exports = {};
|
|
318
|
+
__export22(array_exports, {
|
|
319
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
320
|
+
createNestedObject: () => createNestedObject,
|
|
321
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
322
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
323
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
324
|
+
joinArrays: () => joinArrays,
|
|
325
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
326
|
+
mergeArray: () => mergeArray,
|
|
327
|
+
removeFromArray: () => removeFromArray,
|
|
328
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
329
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
330
|
+
swapItemsInArray: () => swapItemsInArray
|
|
331
|
+
});
|
|
332
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
333
|
+
var import_object = require_object2();
|
|
334
|
+
var import_types = require_types2();
|
|
335
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
336
|
+
return arr2.every((val) => arr1.includes(val));
|
|
337
|
+
};
|
|
338
|
+
var getFrequencyInArray = (arr, value) => {
|
|
339
|
+
return arr.reduce((count, currentValue) => {
|
|
340
|
+
return currentValue === value ? count + 1 : count;
|
|
341
|
+
}, 0);
|
|
342
|
+
};
|
|
343
|
+
var removeFromArray = (arr, index) => {
|
|
344
|
+
if ((0, import_types.isString)(index))
|
|
345
|
+
index = parseInt(index);
|
|
346
|
+
if ((0, import_types.isNumber)(index)) {
|
|
347
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
348
|
+
throw new Error("Invalid index");
|
|
349
|
+
}
|
|
350
|
+
arr.splice(index, 1);
|
|
351
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
352
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
353
|
+
} else {
|
|
354
|
+
throw new Error("Invalid index");
|
|
355
|
+
}
|
|
356
|
+
return arr;
|
|
357
|
+
};
|
|
358
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
359
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
360
|
+
};
|
|
361
|
+
var joinArrays = (...arrays) => {
|
|
362
|
+
return [].concat(...arrays);
|
|
363
|
+
};
|
|
364
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
365
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
366
|
+
};
|
|
367
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
368
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
369
|
+
};
|
|
370
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
371
|
+
const index = arr.indexOf(value);
|
|
372
|
+
if (index !== -1) {
|
|
373
|
+
return arr.slice(0, index);
|
|
374
|
+
}
|
|
375
|
+
return arr;
|
|
376
|
+
};
|
|
377
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
378
|
+
if (!(0, import_types.isArray)(arr))
|
|
379
|
+
return;
|
|
380
|
+
const index = arr.indexOf(value);
|
|
381
|
+
if (index !== -1) {
|
|
382
|
+
return arr.slice(index + 1);
|
|
383
|
+
}
|
|
384
|
+
return arr;
|
|
385
|
+
};
|
|
386
|
+
var createNestedObject = (arr, lastValue) => {
|
|
387
|
+
const nestedObject = {};
|
|
388
|
+
if (arr.length === 0) {
|
|
389
|
+
return lastValue;
|
|
390
|
+
}
|
|
391
|
+
arr.reduce((obj, value, index) => {
|
|
392
|
+
if (!obj[value]) {
|
|
393
|
+
obj[value] = {};
|
|
394
|
+
}
|
|
395
|
+
if (index === arr.length - 1 && lastValue) {
|
|
396
|
+
obj[value] = lastValue;
|
|
397
|
+
}
|
|
398
|
+
return obj[value];
|
|
399
|
+
}, nestedObject);
|
|
400
|
+
return nestedObject;
|
|
401
|
+
};
|
|
402
|
+
var removeValueFromArray = (arr, value) => {
|
|
403
|
+
const index = arr.indexOf(value);
|
|
404
|
+
if (index > -1) {
|
|
405
|
+
const newArray = [...arr];
|
|
406
|
+
newArray.splice(index, 1);
|
|
407
|
+
return newArray;
|
|
408
|
+
}
|
|
409
|
+
return arr;
|
|
410
|
+
};
|
|
411
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
412
|
+
return arr.filter((item) => item !== value);
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
var require_string2 = __commonJS2({
|
|
417
|
+
"../../node_modules/@domql/utils/dist/cjs/string.js"(exports2, module22) {
|
|
418
|
+
"use strict";
|
|
419
|
+
var __defProp22 = Object.defineProperty;
|
|
420
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
421
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
422
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
423
|
+
var __export22 = (target, all) => {
|
|
424
|
+
for (var name in all)
|
|
425
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
426
|
+
};
|
|
427
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
428
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
429
|
+
for (let key of __getOwnPropNames22(from))
|
|
430
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
431
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
432
|
+
}
|
|
433
|
+
return to;
|
|
434
|
+
};
|
|
435
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
436
|
+
var string_exports = {};
|
|
437
|
+
__export22(string_exports, {
|
|
438
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
439
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
440
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
441
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
442
|
+
});
|
|
443
|
+
module22.exports = __toCommonJS22(string_exports);
|
|
444
|
+
var stringIncludesAny = (str, characters) => {
|
|
445
|
+
for (const char of characters) {
|
|
446
|
+
if (str.includes(char)) {
|
|
447
|
+
return true;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return false;
|
|
451
|
+
};
|
|
452
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
453
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
454
|
+
return str.replace(pattern, "");
|
|
455
|
+
};
|
|
456
|
+
var brackRegex = {
|
|
457
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
458
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
459
|
+
};
|
|
460
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
461
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
462
|
+
return str;
|
|
463
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
464
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
465
|
+
if (parentPath) {
|
|
466
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
467
|
+
let parentState = state;
|
|
468
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
469
|
+
parentState = parentState.parent;
|
|
470
|
+
if (!parentState) {
|
|
471
|
+
return "";
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
const value = parentState[variable.trim()];
|
|
475
|
+
return value !== void 0 ? `${value}` : "";
|
|
476
|
+
} else {
|
|
477
|
+
const value = state[variable.trim()];
|
|
478
|
+
return value !== void 0 ? `${value}` : "";
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
483
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
var require_object2 = __commonJS2({
|
|
488
|
+
"../../node_modules/@domql/utils/dist/cjs/object.js"(exports2, module22) {
|
|
489
|
+
"use strict";
|
|
490
|
+
var __defProp22 = Object.defineProperty;
|
|
491
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
492
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
493
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
494
|
+
var __export22 = (target, all) => {
|
|
495
|
+
for (var name in all)
|
|
496
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
497
|
+
};
|
|
498
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
499
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
500
|
+
for (let key of __getOwnPropNames22(from))
|
|
501
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
502
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
503
|
+
}
|
|
504
|
+
return to;
|
|
505
|
+
};
|
|
506
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
507
|
+
var object_exports = {};
|
|
508
|
+
__export22(object_exports, {
|
|
509
|
+
clone: () => clone,
|
|
510
|
+
deepClone: () => deepClone2,
|
|
511
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
512
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
513
|
+
deepContains: () => deepContains,
|
|
514
|
+
deepDestringify: () => deepDestringify,
|
|
515
|
+
deepDiff: () => deepDiff,
|
|
516
|
+
deepMerge: () => deepMerge2,
|
|
517
|
+
deepStringify: () => deepStringify,
|
|
518
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
519
|
+
diff: () => diff,
|
|
520
|
+
diffArrays: () => diffArrays,
|
|
521
|
+
diffObjects: () => diffObjects,
|
|
522
|
+
exec: () => exec,
|
|
523
|
+
flattenRecursive: () => flattenRecursive,
|
|
524
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
525
|
+
isEmpty: () => isEmpty,
|
|
526
|
+
isEmptyObject: () => isEmptyObject,
|
|
527
|
+
isEqualDeep: () => isEqualDeep,
|
|
528
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
529
|
+
map: () => map,
|
|
530
|
+
merge: () => merge,
|
|
531
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
532
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
533
|
+
objectToString: () => objectToString,
|
|
534
|
+
overwrite: () => overwrite,
|
|
535
|
+
overwriteDeep: () => overwriteDeep,
|
|
536
|
+
overwriteShallow: () => overwriteShallow,
|
|
537
|
+
removeFromObject: () => removeFromObject,
|
|
538
|
+
stringToObject: () => stringToObject
|
|
539
|
+
});
|
|
540
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
541
|
+
var import_globals2 = require_globals2();
|
|
542
|
+
var import_types = require_types2();
|
|
543
|
+
var import_array = require_array2();
|
|
544
|
+
var import_string = require_string2();
|
|
545
|
+
var exec = (param, element, state, context) => {
|
|
546
|
+
if ((0, import_types.isFunction)(param)) {
|
|
547
|
+
return param(
|
|
548
|
+
element,
|
|
549
|
+
state || element.state,
|
|
550
|
+
context || element.context
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
return param;
|
|
554
|
+
};
|
|
555
|
+
var map = (obj, extention, element) => {
|
|
556
|
+
for (const e in extention) {
|
|
557
|
+
obj[e] = exec(extention[e], element);
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
561
|
+
for (const e in obj) {
|
|
562
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
563
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
564
|
+
continue;
|
|
565
|
+
const elementProp = element[e];
|
|
566
|
+
const objProp = obj[e];
|
|
567
|
+
if (elementProp === void 0) {
|
|
568
|
+
element[e] = objProp;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return element;
|
|
572
|
+
};
|
|
573
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
574
|
+
for (const e in extend) {
|
|
575
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
576
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
577
|
+
continue;
|
|
578
|
+
const elementProp = element[e];
|
|
579
|
+
const extendProp = extend[e];
|
|
580
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
581
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
582
|
+
} else if (elementProp === void 0) {
|
|
583
|
+
element[e] = extendProp;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return element;
|
|
587
|
+
};
|
|
588
|
+
var clone = (obj, excludeFrom = []) => {
|
|
589
|
+
const o = {};
|
|
590
|
+
for (const prop in obj) {
|
|
591
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
592
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
593
|
+
continue;
|
|
594
|
+
o[prop] = obj[prop];
|
|
595
|
+
}
|
|
596
|
+
return o;
|
|
597
|
+
};
|
|
598
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
599
|
+
if ((0, import_types.isArray)(obj)) {
|
|
600
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
601
|
+
}
|
|
602
|
+
const o = {};
|
|
603
|
+
for (const k in obj) {
|
|
604
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
605
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
606
|
+
continue;
|
|
607
|
+
let v = obj[k];
|
|
608
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
609
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
610
|
+
}
|
|
611
|
+
if ((0, import_types.isArray)(v)) {
|
|
612
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
613
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
614
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
615
|
+
} else
|
|
616
|
+
o[k] = v;
|
|
617
|
+
}
|
|
618
|
+
return o;
|
|
619
|
+
};
|
|
620
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
621
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
622
|
+
};
|
|
623
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
624
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
625
|
+
for (const prop in obj) {
|
|
626
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
627
|
+
continue;
|
|
628
|
+
if (prop === "__proto__")
|
|
629
|
+
continue;
|
|
630
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
631
|
+
continue;
|
|
632
|
+
let objProp = obj[prop];
|
|
633
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
634
|
+
continue;
|
|
635
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
636
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
637
|
+
}
|
|
638
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
639
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
640
|
+
} else
|
|
641
|
+
o[prop] = objProp;
|
|
642
|
+
}
|
|
643
|
+
return o;
|
|
644
|
+
};
|
|
645
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
646
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
647
|
+
for (const prop in obj) {
|
|
648
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
649
|
+
continue;
|
|
650
|
+
const objProp = obj[prop];
|
|
651
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
652
|
+
continue;
|
|
653
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
654
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
655
|
+
} else
|
|
656
|
+
o[prop] = objProp;
|
|
657
|
+
}
|
|
658
|
+
return o;
|
|
659
|
+
};
|
|
660
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
661
|
+
for (const prop in obj) {
|
|
662
|
+
const objProp = obj[prop];
|
|
663
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
664
|
+
stringified[prop] = objProp.toString();
|
|
665
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
666
|
+
stringified[prop] = {};
|
|
667
|
+
deepStringify(objProp, stringified[prop]);
|
|
668
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
669
|
+
stringified[prop] = [];
|
|
670
|
+
objProp.forEach((v, i) => {
|
|
671
|
+
if ((0, import_types.isObject)(v)) {
|
|
672
|
+
stringified[prop][i] = {};
|
|
673
|
+
deepStringify(v, stringified[prop][i]);
|
|
674
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
675
|
+
stringified[prop][i] = v.toString();
|
|
676
|
+
} else {
|
|
677
|
+
stringified[prop][i] = v;
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
} else {
|
|
681
|
+
stringified[prop] = objProp;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return stringified;
|
|
685
|
+
};
|
|
686
|
+
var objectToString = (obj, indent = 0) => {
|
|
687
|
+
const spaces = " ".repeat(indent);
|
|
688
|
+
let str = "{\n";
|
|
689
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
690
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
691
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
692
|
+
str += `${spaces} ${stringedKey}: `;
|
|
693
|
+
if ((0, import_types.isArray)(value)) {
|
|
694
|
+
str += "[\n";
|
|
695
|
+
for (const element of value) {
|
|
696
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
697
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
698
|
+
`;
|
|
699
|
+
} else if ((0, import_types.isString)(element)) {
|
|
700
|
+
str += `${spaces} '${element}',
|
|
701
|
+
`;
|
|
702
|
+
} else {
|
|
703
|
+
str += `${spaces} ${element},
|
|
704
|
+
`;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
str += `${spaces} ]`;
|
|
708
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
709
|
+
str += objectToString(value, indent + 1);
|
|
710
|
+
} else if ((0, import_types.isString)(value)) {
|
|
711
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
712
|
+
} else {
|
|
713
|
+
str += value;
|
|
714
|
+
}
|
|
715
|
+
str += ",\n";
|
|
716
|
+
}
|
|
717
|
+
str += `${spaces}}`;
|
|
718
|
+
return str;
|
|
719
|
+
};
|
|
720
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
721
|
+
for (const prop in obj) {
|
|
722
|
+
const objProp = obj[prop];
|
|
723
|
+
if ((0, import_types.isFunction)(objProp))
|
|
724
|
+
continue;
|
|
725
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
726
|
+
detached[prop] = {};
|
|
727
|
+
deepStringify(objProp, detached[prop]);
|
|
728
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
729
|
+
detached[prop] = [];
|
|
730
|
+
objProp.forEach((v, i) => {
|
|
731
|
+
if ((0, import_types.isFunction)(v))
|
|
732
|
+
return;
|
|
733
|
+
if ((0, import_types.isObject)(v)) {
|
|
734
|
+
detached[prop][i] = {};
|
|
735
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
736
|
+
} else {
|
|
737
|
+
detached[prop][i] = v;
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
} else {
|
|
741
|
+
detached[prop] = objProp;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
return detached;
|
|
745
|
+
};
|
|
746
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
747
|
+
for (const prop in obj) {
|
|
748
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
749
|
+
if (!hasOwnProperty2)
|
|
750
|
+
continue;
|
|
751
|
+
const objProp = obj[prop];
|
|
752
|
+
if ((0, import_types.isString)(objProp)) {
|
|
753
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
754
|
+
try {
|
|
755
|
+
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
756
|
+
destringified[prop] = evalProp;
|
|
757
|
+
} catch (e) {
|
|
758
|
+
if (e)
|
|
759
|
+
destringified[prop] = objProp;
|
|
760
|
+
}
|
|
761
|
+
} else {
|
|
762
|
+
destringified[prop] = objProp;
|
|
763
|
+
}
|
|
764
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
765
|
+
destringified[prop] = [];
|
|
766
|
+
objProp.forEach((arrProp) => {
|
|
767
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
768
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
769
|
+
try {
|
|
770
|
+
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
771
|
+
destringified[prop].push(evalProp);
|
|
772
|
+
} catch (e) {
|
|
773
|
+
if (e)
|
|
774
|
+
destringified[prop].push(arrProp);
|
|
775
|
+
}
|
|
776
|
+
} else {
|
|
777
|
+
destringified[prop].push(arrProp);
|
|
778
|
+
}
|
|
779
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
780
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
781
|
+
} else {
|
|
782
|
+
destringified[prop].push(arrProp);
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
786
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
787
|
+
} else {
|
|
788
|
+
destringified[prop] = objProp;
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
return destringified;
|
|
792
|
+
};
|
|
793
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
794
|
+
try {
|
|
795
|
+
return import_globals2.window.eval("(" + str + ")");
|
|
796
|
+
} catch (e) {
|
|
797
|
+
if (opts.verbose)
|
|
798
|
+
console.warn(e);
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
802
|
+
for (const e in objToDiff) {
|
|
803
|
+
if (e === "ref")
|
|
804
|
+
continue;
|
|
805
|
+
const originalProp = original[e];
|
|
806
|
+
const objToDiffProp = objToDiff[e];
|
|
807
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
808
|
+
cache[e] = {};
|
|
809
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
810
|
+
} else if (objToDiffProp !== void 0) {
|
|
811
|
+
cache[e] = objToDiffProp;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
return cache;
|
|
815
|
+
};
|
|
816
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
817
|
+
if (original.length !== objToDiff.length) {
|
|
818
|
+
cache = objToDiff;
|
|
819
|
+
} else {
|
|
820
|
+
const diffArr = [];
|
|
821
|
+
for (let i = 0; i < original.length; i++) {
|
|
822
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
823
|
+
if (Object.keys(diffObj).length > 0) {
|
|
824
|
+
diffArr.push(diffObj);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
if (diffArr.length > 0) {
|
|
828
|
+
cache = diffArr;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
return cache;
|
|
832
|
+
};
|
|
833
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
834
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
835
|
+
cache = [];
|
|
836
|
+
diffArrays(original, objToDiff, cache);
|
|
837
|
+
} else {
|
|
838
|
+
diffObjects(original, objToDiff, cache);
|
|
839
|
+
}
|
|
840
|
+
return cache;
|
|
841
|
+
};
|
|
842
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
843
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
844
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
845
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
846
|
+
var deepDiff = (lhs, rhs) => {
|
|
847
|
+
if (lhs === rhs)
|
|
848
|
+
return {};
|
|
849
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
850
|
+
return rhs;
|
|
851
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
852
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
853
|
+
acc[key] = void 0;
|
|
854
|
+
}
|
|
855
|
+
return acc;
|
|
856
|
+
}, makeObjectWithoutPrototype());
|
|
857
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
858
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
859
|
+
return {};
|
|
860
|
+
return rhs;
|
|
861
|
+
}
|
|
862
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
863
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
864
|
+
acc[key] = rhs[key];
|
|
865
|
+
return acc;
|
|
866
|
+
}
|
|
867
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
868
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
869
|
+
return acc;
|
|
870
|
+
}
|
|
871
|
+
acc[key] = difference;
|
|
872
|
+
return acc;
|
|
873
|
+
}, deletedValues);
|
|
874
|
+
};
|
|
875
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
876
|
+
const { ref } = element;
|
|
877
|
+
const changes = {};
|
|
878
|
+
for (const e in params) {
|
|
879
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
880
|
+
continue;
|
|
881
|
+
const elementProp = element[e];
|
|
882
|
+
const paramsProp = params[e];
|
|
883
|
+
if (paramsProp) {
|
|
884
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
885
|
+
ref[e] = paramsProp;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
return changes;
|
|
889
|
+
};
|
|
890
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
891
|
+
for (const e in params) {
|
|
892
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
893
|
+
continue;
|
|
894
|
+
obj[e] = params[e];
|
|
895
|
+
}
|
|
896
|
+
return obj;
|
|
897
|
+
};
|
|
898
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
899
|
+
for (const e in params) {
|
|
900
|
+
if (e === "__proto__")
|
|
901
|
+
continue;
|
|
902
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
903
|
+
continue;
|
|
904
|
+
const objProp = obj[e];
|
|
905
|
+
const paramsProp = params[e];
|
|
906
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
907
|
+
overwriteDeep(objProp, paramsProp);
|
|
908
|
+
} else if (paramsProp !== void 0) {
|
|
909
|
+
obj[e] = paramsProp;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
return obj;
|
|
913
|
+
};
|
|
914
|
+
var mergeIfExisted = (a, b) => {
|
|
915
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
916
|
+
return deepMerge2(a, b);
|
|
917
|
+
return a || b;
|
|
918
|
+
};
|
|
919
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
920
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
921
|
+
stack.push(objectized);
|
|
922
|
+
const extendOfExtend = objectized[prop];
|
|
923
|
+
if (extendOfExtend)
|
|
924
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
925
|
+
delete objectized[prop];
|
|
926
|
+
return stack;
|
|
927
|
+
};
|
|
928
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
929
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
930
|
+
return param === element;
|
|
931
|
+
}
|
|
932
|
+
if (visited.has(param) || visited.has(element)) {
|
|
933
|
+
return true;
|
|
934
|
+
}
|
|
935
|
+
visited.add(param);
|
|
936
|
+
visited.add(element);
|
|
937
|
+
const keysParam = Object.keys(param);
|
|
938
|
+
const keysElement = Object.keys(element);
|
|
939
|
+
if (keysParam.length !== keysElement.length) {
|
|
940
|
+
return false;
|
|
941
|
+
}
|
|
942
|
+
for (const key of keysParam) {
|
|
943
|
+
if (!keysElement.includes(key)) {
|
|
944
|
+
return false;
|
|
945
|
+
}
|
|
946
|
+
const paramProp = param[key];
|
|
947
|
+
const elementProp = element[key];
|
|
948
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
949
|
+
return false;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
return true;
|
|
953
|
+
};
|
|
954
|
+
var deepContains = (obj1, obj2) => {
|
|
955
|
+
if (typeof obj1 !== typeof obj2) {
|
|
956
|
+
return false;
|
|
957
|
+
}
|
|
958
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
959
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
960
|
+
if (obj1.length !== obj2.length) {
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
963
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
964
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
965
|
+
return false;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
969
|
+
for (const key in obj1) {
|
|
970
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
971
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
972
|
+
return false;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
} else {
|
|
977
|
+
return obj2 === obj1;
|
|
978
|
+
}
|
|
979
|
+
return true;
|
|
980
|
+
};
|
|
981
|
+
var removeFromObject = (obj, props) => {
|
|
982
|
+
if (props === void 0 || props === null)
|
|
983
|
+
return obj;
|
|
984
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
985
|
+
delete obj[props];
|
|
986
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
987
|
+
props.forEach((prop) => delete obj[prop]);
|
|
988
|
+
} else {
|
|
989
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
990
|
+
}
|
|
991
|
+
return obj;
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
var require_function2 = __commonJS2({
|
|
996
|
+
"../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module22) {
|
|
997
|
+
"use strict";
|
|
998
|
+
var __defProp22 = Object.defineProperty;
|
|
999
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1000
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1001
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1002
|
+
var __export22 = (target, all) => {
|
|
1003
|
+
for (var name in all)
|
|
1004
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1005
|
+
};
|
|
1006
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1007
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1008
|
+
for (let key of __getOwnPropNames22(from))
|
|
1009
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1010
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1011
|
+
}
|
|
1012
|
+
return to;
|
|
1013
|
+
};
|
|
1014
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1015
|
+
var function_exports = {};
|
|
1016
|
+
__export22(function_exports, {
|
|
1017
|
+
debounce: () => debounce,
|
|
1018
|
+
debounceOnContext: () => debounceOnContext,
|
|
1019
|
+
isStringFunction: () => isStringFunction,
|
|
1020
|
+
memoize: () => memoize
|
|
1021
|
+
});
|
|
1022
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
1023
|
+
function debounce(func, wait, immediate) {
|
|
1024
|
+
let timeout;
|
|
1025
|
+
return function() {
|
|
1026
|
+
const context = this;
|
|
1027
|
+
const args = arguments;
|
|
1028
|
+
const later = function() {
|
|
1029
|
+
timeout = null;
|
|
1030
|
+
if (!immediate)
|
|
1031
|
+
func.apply(context, args);
|
|
1032
|
+
};
|
|
1033
|
+
const callNow = immediate && !timeout;
|
|
1034
|
+
clearTimeout(timeout);
|
|
1035
|
+
timeout = setTimeout(later, wait);
|
|
1036
|
+
if (callNow)
|
|
1037
|
+
func.apply(context, args);
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
1041
|
+
let timer;
|
|
1042
|
+
return (...args) => {
|
|
1043
|
+
clearTimeout(timer);
|
|
1044
|
+
timer = setTimeout(() => {
|
|
1045
|
+
func.apply(element, args);
|
|
1046
|
+
}, timeout);
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
var memoize = (fn) => {
|
|
1050
|
+
const cache = {};
|
|
1051
|
+
return (...args) => {
|
|
1052
|
+
const n = args[0];
|
|
1053
|
+
if (n in cache) {
|
|
1054
|
+
return cache[n];
|
|
1055
|
+
} else {
|
|
1056
|
+
const result = fn(n);
|
|
1057
|
+
cache[n] = result;
|
|
1058
|
+
return result;
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
var isStringFunction = (inputString) => {
|
|
1063
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
1064
|
+
return functionRegex.test(inputString);
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
var require_log2 = __commonJS2({
|
|
1069
|
+
"../../node_modules/@domql/utils/dist/cjs/log.js"(exports2, module22) {
|
|
1070
|
+
"use strict";
|
|
1071
|
+
var __defProp22 = Object.defineProperty;
|
|
1072
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1073
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1074
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1075
|
+
var __export22 = (target, all) => {
|
|
1076
|
+
for (var name in all)
|
|
1077
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1078
|
+
};
|
|
1079
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1080
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1081
|
+
for (let key of __getOwnPropNames22(from))
|
|
1082
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1083
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1084
|
+
}
|
|
1085
|
+
return to;
|
|
1086
|
+
};
|
|
1087
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1088
|
+
var log_exports = {};
|
|
1089
|
+
__export22(log_exports, {
|
|
1090
|
+
logGroupIf: () => logGroupIf,
|
|
1091
|
+
logIf: () => logIf
|
|
1092
|
+
});
|
|
1093
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
1094
|
+
var logIf = (bool, ...arg) => {
|
|
1095
|
+
if (bool)
|
|
1096
|
+
arg.map((v) => console.log(v));
|
|
1097
|
+
};
|
|
1098
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
1099
|
+
if (bool) {
|
|
1100
|
+
console.group(key);
|
|
1101
|
+
arg.map((v) => console.log(v));
|
|
1102
|
+
console.groupEnd(key);
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
var require_cookie2 = __commonJS2({
|
|
1108
|
+
"../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports2, module22) {
|
|
1109
|
+
"use strict";
|
|
1110
|
+
var __defProp22 = Object.defineProperty;
|
|
1111
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1112
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1113
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1114
|
+
var __export22 = (target, all) => {
|
|
1115
|
+
for (var name in all)
|
|
1116
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1117
|
+
};
|
|
1118
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1119
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1120
|
+
for (let key of __getOwnPropNames22(from))
|
|
1121
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1122
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1123
|
+
}
|
|
1124
|
+
return to;
|
|
1125
|
+
};
|
|
1126
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1127
|
+
var cookie_exports = {};
|
|
1128
|
+
__export22(cookie_exports, {
|
|
1129
|
+
getCookie: () => getCookie,
|
|
1130
|
+
isMobile: () => isMobile,
|
|
1131
|
+
setCookie: () => setCookie
|
|
1132
|
+
});
|
|
1133
|
+
module22.exports = __toCommonJS22(cookie_exports);
|
|
1134
|
+
var import_types = require_types2();
|
|
1135
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1136
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1137
|
+
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1138
|
+
return;
|
|
1139
|
+
const d = /* @__PURE__ */ new Date();
|
|
1140
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1141
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
1142
|
+
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1143
|
+
};
|
|
1144
|
+
var getCookie = (cname) => {
|
|
1145
|
+
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1146
|
+
return;
|
|
1147
|
+
const name = `${cname}=`;
|
|
1148
|
+
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1149
|
+
const ca = decodedCookie.split(";");
|
|
1150
|
+
for (let i = 0; i < ca.length; i++) {
|
|
1151
|
+
let c = ca[i];
|
|
1152
|
+
while (c.charAt(0) === " ")
|
|
1153
|
+
c = c.substring(1);
|
|
1154
|
+
if (c.indexOf(name) === 0)
|
|
1155
|
+
return c.substring(name.length, c.length);
|
|
1156
|
+
}
|
|
1157
|
+
return "";
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
var require_tags2 = __commonJS2({
|
|
1162
|
+
"../../node_modules/@domql/utils/dist/cjs/tags.js"(exports2, module22) {
|
|
1163
|
+
"use strict";
|
|
1164
|
+
var __defProp22 = Object.defineProperty;
|
|
1165
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1166
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1167
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1168
|
+
var __export22 = (target, all) => {
|
|
1169
|
+
for (var name in all)
|
|
1170
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1171
|
+
};
|
|
1172
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1173
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1174
|
+
for (let key of __getOwnPropNames22(from))
|
|
1175
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1176
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1177
|
+
}
|
|
1178
|
+
return to;
|
|
1179
|
+
};
|
|
1180
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1181
|
+
var tags_exports = {};
|
|
1182
|
+
__export22(tags_exports, {
|
|
1183
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
1184
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
1185
|
+
});
|
|
1186
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
1187
|
+
var HTML_TAGS = {
|
|
1188
|
+
root: [
|
|
1189
|
+
"body",
|
|
1190
|
+
"html"
|
|
1191
|
+
],
|
|
1192
|
+
head: [
|
|
1193
|
+
"title",
|
|
1194
|
+
"base",
|
|
1195
|
+
"meta",
|
|
1196
|
+
"style"
|
|
1197
|
+
],
|
|
1198
|
+
body: [
|
|
1199
|
+
"string",
|
|
1200
|
+
"fragment",
|
|
1201
|
+
"a",
|
|
1202
|
+
"abbr",
|
|
1203
|
+
"acronym",
|
|
1204
|
+
"address",
|
|
1205
|
+
"applet",
|
|
1206
|
+
"area",
|
|
1207
|
+
"article",
|
|
1208
|
+
"aside",
|
|
1209
|
+
"audio",
|
|
1210
|
+
"b",
|
|
1211
|
+
"basefont",
|
|
1212
|
+
"bdi",
|
|
1213
|
+
"bdo",
|
|
1214
|
+
"big",
|
|
1215
|
+
"blockquote",
|
|
1216
|
+
"br",
|
|
1217
|
+
"button",
|
|
1218
|
+
"canvas",
|
|
1219
|
+
"caption",
|
|
1220
|
+
"center",
|
|
1221
|
+
"cite",
|
|
1222
|
+
"code",
|
|
1223
|
+
"search",
|
|
1224
|
+
"col",
|
|
1225
|
+
"colgroup",
|
|
1226
|
+
"data",
|
|
1227
|
+
"datalist",
|
|
1228
|
+
"dd",
|
|
1229
|
+
"del",
|
|
1230
|
+
"details",
|
|
1231
|
+
"dfn",
|
|
1232
|
+
"dialog",
|
|
1233
|
+
"dir",
|
|
1234
|
+
"div",
|
|
1235
|
+
"dl",
|
|
1236
|
+
"dt",
|
|
1237
|
+
"em",
|
|
1238
|
+
"embed",
|
|
1239
|
+
"fieldset",
|
|
1240
|
+
"figcaption",
|
|
1241
|
+
"figure",
|
|
1242
|
+
"font",
|
|
1243
|
+
"footer",
|
|
1244
|
+
"form",
|
|
1245
|
+
"frame",
|
|
1246
|
+
"frameset",
|
|
1247
|
+
"h1",
|
|
1248
|
+
"h2",
|
|
1249
|
+
"h3",
|
|
1250
|
+
"h4",
|
|
1251
|
+
"h5",
|
|
1252
|
+
"h6",
|
|
1253
|
+
"head",
|
|
1254
|
+
"header",
|
|
1255
|
+
"hr",
|
|
1256
|
+
"i",
|
|
1257
|
+
"iframe",
|
|
1258
|
+
"img",
|
|
1259
|
+
"input",
|
|
1260
|
+
"ins",
|
|
1261
|
+
"kbd",
|
|
1262
|
+
"label",
|
|
1263
|
+
"legend",
|
|
1264
|
+
"li",
|
|
1265
|
+
"link",
|
|
1266
|
+
"main",
|
|
1267
|
+
"map",
|
|
1268
|
+
"mark",
|
|
1269
|
+
"meter",
|
|
1270
|
+
"nav",
|
|
1271
|
+
"noframes",
|
|
1272
|
+
"noscript",
|
|
1273
|
+
"object",
|
|
1274
|
+
"ol",
|
|
1275
|
+
"optgroup",
|
|
1276
|
+
"option",
|
|
1277
|
+
"output",
|
|
1278
|
+
"p",
|
|
1279
|
+
"param",
|
|
1280
|
+
"picture",
|
|
1281
|
+
"pre",
|
|
1282
|
+
"progress",
|
|
1283
|
+
"hgroup",
|
|
1284
|
+
"q",
|
|
1285
|
+
"rp",
|
|
1286
|
+
"rt",
|
|
1287
|
+
"ruby",
|
|
1288
|
+
"s",
|
|
1289
|
+
"samp",
|
|
1290
|
+
"script",
|
|
1291
|
+
"section",
|
|
1292
|
+
"select",
|
|
1293
|
+
"small",
|
|
1294
|
+
"source",
|
|
1295
|
+
"span",
|
|
1296
|
+
"strike",
|
|
1297
|
+
"strong",
|
|
1298
|
+
"sub",
|
|
1299
|
+
"summary",
|
|
1300
|
+
"sup",
|
|
1301
|
+
"table",
|
|
1302
|
+
"tbody",
|
|
1303
|
+
"td",
|
|
1304
|
+
"template",
|
|
1305
|
+
"hgroup",
|
|
1306
|
+
"textarea",
|
|
1307
|
+
"tfoot",
|
|
1308
|
+
"th",
|
|
1309
|
+
"thead",
|
|
1310
|
+
"time",
|
|
1311
|
+
"tr",
|
|
1312
|
+
"track",
|
|
1313
|
+
"tt",
|
|
1314
|
+
"u",
|
|
1315
|
+
"ul",
|
|
1316
|
+
"var",
|
|
1317
|
+
"video",
|
|
1318
|
+
"wbr",
|
|
1319
|
+
// SVG
|
|
1320
|
+
"svg",
|
|
1321
|
+
"path"
|
|
1322
|
+
]
|
|
1323
|
+
};
|
|
1324
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
var require_cjs4 = __commonJS2({
|
|
1328
|
+
"../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module22) {
|
|
1329
|
+
"use strict";
|
|
1330
|
+
var __defProp22 = Object.defineProperty;
|
|
1331
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1332
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1333
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1334
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1335
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1336
|
+
for (let key of __getOwnPropNames22(from))
|
|
1337
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1338
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1339
|
+
}
|
|
1340
|
+
return to;
|
|
1341
|
+
};
|
|
1342
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
1343
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1344
|
+
var utils_exports = {};
|
|
1345
|
+
module22.exports = __toCommonJS22(utils_exports);
|
|
1346
|
+
__reExport(utils_exports, require_key2(), module22.exports);
|
|
1347
|
+
__reExport(utils_exports, require_env2(), module22.exports);
|
|
1348
|
+
__reExport(utils_exports, require_types2(), module22.exports);
|
|
1349
|
+
__reExport(utils_exports, require_object2(), module22.exports);
|
|
1350
|
+
__reExport(utils_exports, require_function2(), module22.exports);
|
|
1351
|
+
__reExport(utils_exports, require_array2(), module22.exports);
|
|
1352
|
+
__reExport(utils_exports, require_node2(), module22.exports);
|
|
1353
|
+
__reExport(utils_exports, require_log2(), module22.exports);
|
|
1354
|
+
__reExport(utils_exports, require_string2(), module22.exports);
|
|
1355
|
+
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
1356
|
+
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
1357
|
+
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
var src_exports = {};
|
|
1361
|
+
__export2(src_exports, {
|
|
1362
|
+
arrayzeValue: () => arrayzeValue,
|
|
1363
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
1364
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
1365
|
+
findClosestNumber: () => findClosestNumber,
|
|
1366
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
1367
|
+
formatDate: () => formatDate,
|
|
1368
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
1369
|
+
removeChars: () => removeChars,
|
|
1370
|
+
toCamelCase: () => toCamelCase2,
|
|
1371
|
+
toDashCase: () => toDashCase2,
|
|
1372
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
1373
|
+
toTitleCase: () => toTitleCase,
|
|
1374
|
+
toggleFullscreen: () => toggleFullscreen
|
|
1375
|
+
});
|
|
1376
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
1377
|
+
var import_utils22 = __toESM2(require_cjs4(), 1);
|
|
1378
|
+
var toggleFullscreen = (el) => {
|
|
1379
|
+
if (!document.fullscreenElement) {
|
|
1380
|
+
el.node.requestFullscreen().catch((err) => {
|
|
1381
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
1382
|
+
});
|
|
1383
|
+
} else {
|
|
1384
|
+
document.exitFullscreen();
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
var import_utils9 = __toESM2(require_cjs4(), 1);
|
|
1388
|
+
var findClosestNumber = (number, arr) => {
|
|
1389
|
+
return ((0, import_utils9.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
1390
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
1391
|
+
});
|
|
1392
|
+
};
|
|
1393
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
1394
|
+
val = parseFloat(val);
|
|
1395
|
+
if ((0, import_utils9.isObject)(factory))
|
|
1396
|
+
factory = Object.values(factory);
|
|
1397
|
+
return findClosestNumber(val, factory);
|
|
1398
|
+
};
|
|
1399
|
+
var formatDate = (timestamp) => {
|
|
1400
|
+
if (!timestamp)
|
|
1401
|
+
return "";
|
|
1402
|
+
const d = new Date(timestamp);
|
|
1403
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
1404
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
1405
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
1406
|
+
return `${da} ${mo}, ${ye}`;
|
|
1407
|
+
};
|
|
1408
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
1409
|
+
const fib = [0, 1];
|
|
1410
|
+
for (let i = 2; i <= n; i++) {
|
|
1411
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
1412
|
+
}
|
|
1413
|
+
return fib[n];
|
|
1414
|
+
};
|
|
1415
|
+
var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
|
|
1416
|
+
return new Promise((resolve, reject) => {
|
|
1417
|
+
try {
|
|
1418
|
+
const scriptEle = doc.createElement("script");
|
|
1419
|
+
scriptEle.type = type;
|
|
1420
|
+
scriptEle.async = async;
|
|
1421
|
+
scriptEle.src = FILE_URL;
|
|
1422
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
1423
|
+
resolve({
|
|
1424
|
+
status: true
|
|
1425
|
+
});
|
|
1426
|
+
});
|
|
1427
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
1428
|
+
reject({
|
|
1429
|
+
status: false,
|
|
1430
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
1431
|
+
});
|
|
1432
|
+
});
|
|
1433
|
+
doc.body.appendChild(scriptEle);
|
|
1434
|
+
} catch (error) {
|
|
1435
|
+
reject(error);
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
};
|
|
1439
|
+
var copyStringToClipboard = (str) => {
|
|
1440
|
+
const el = document.createElement("textarea");
|
|
1441
|
+
el.value = str;
|
|
1442
|
+
el.setAttribute("readonly", "");
|
|
1443
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
1444
|
+
document.body.appendChild(el);
|
|
1445
|
+
el.select();
|
|
1446
|
+
document.execCommand("copy");
|
|
1447
|
+
document.body.removeChild(el);
|
|
1448
|
+
};
|
|
1449
|
+
var removeChars = (str) => {
|
|
1450
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
1451
|
+
};
|
|
1452
|
+
var toCamelCase2 = (str) => {
|
|
1453
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
1454
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
1455
|
+
}).replaceAll(/\s+/g, "");
|
|
1456
|
+
};
|
|
1457
|
+
var toTitleCase = (str) => str && str.replace(
|
|
1458
|
+
/\w\S*/g,
|
|
1459
|
+
(txt) => {
|
|
1460
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
1461
|
+
}
|
|
1462
|
+
);
|
|
1463
|
+
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
1464
|
+
var toDescriptionCase = (str = "") => {
|
|
1465
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
1466
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
1467
|
+
};
|
|
1468
|
+
var arrayzeValue = (val) => {
|
|
1469
|
+
if ((0, import_utils22.isArray)(val))
|
|
1470
|
+
return val;
|
|
1471
|
+
if ((0, import_utils22.isString)(val))
|
|
1472
|
+
return val.split(" ");
|
|
1473
|
+
if ((0, import_utils22.isObject)(val))
|
|
1474
|
+
return Object.values(val);
|
|
1475
|
+
if ((0, import_utils22.isNumber)(val))
|
|
1476
|
+
return [val];
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
});
|
|
1480
|
+
|
|
33
1481
|
// ../../node_modules/@domql/utils/dist/cjs/key.js
|
|
34
1482
|
var require_key = __commonJS({
|
|
35
1483
|
"../../node_modules/@domql/utils/dist/cjs/key.js"(exports, module2) {
|
|
@@ -205,32 +1653,32 @@ var require_types = __commonJS({
|
|
|
205
1653
|
__export2(types_exports, {
|
|
206
1654
|
TYPES: () => TYPES,
|
|
207
1655
|
is: () => is,
|
|
208
|
-
isArray: () =>
|
|
1656
|
+
isArray: () => isArray2,
|
|
209
1657
|
isBoolean: () => isBoolean,
|
|
210
1658
|
isDate: () => isDate,
|
|
211
1659
|
isDefined: () => isDefined2,
|
|
212
1660
|
isFunction: () => isFunction,
|
|
213
1661
|
isNot: () => isNot,
|
|
214
1662
|
isNull: () => isNull,
|
|
215
|
-
isNumber: () =>
|
|
216
|
-
isObject: () =>
|
|
1663
|
+
isNumber: () => isNumber2,
|
|
1664
|
+
isObject: () => isObject2,
|
|
217
1665
|
isObjectLike: () => isObjectLike2,
|
|
218
|
-
isString: () =>
|
|
1666
|
+
isString: () => isString4,
|
|
219
1667
|
isUndefined: () => isUndefined
|
|
220
1668
|
});
|
|
221
1669
|
module2.exports = __toCommonJS2(types_exports);
|
|
222
1670
|
var import_node = require_node();
|
|
223
|
-
var
|
|
1671
|
+
var isObject2 = (arg) => {
|
|
224
1672
|
if (arg === null)
|
|
225
1673
|
return false;
|
|
226
1674
|
return typeof arg === "object" && arg.constructor === Object;
|
|
227
1675
|
};
|
|
228
|
-
var
|
|
229
|
-
var
|
|
1676
|
+
var isString4 = (arg) => typeof arg === "string";
|
|
1677
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
230
1678
|
var isFunction = (arg) => typeof arg === "function";
|
|
231
1679
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
232
1680
|
var isNull = (arg) => arg === null;
|
|
233
|
-
var
|
|
1681
|
+
var isArray2 = (arg) => Array.isArray(arg);
|
|
234
1682
|
var isDate = (d) => d instanceof Date;
|
|
235
1683
|
var isObjectLike2 = (arg) => {
|
|
236
1684
|
if (arg === null)
|
|
@@ -238,18 +1686,18 @@ var require_types = __commonJS({
|
|
|
238
1686
|
return typeof arg === "object";
|
|
239
1687
|
};
|
|
240
1688
|
var isDefined2 = (arg) => {
|
|
241
|
-
return
|
|
1689
|
+
return isObject2(arg) || isObjectLike2(arg) || isString4(arg) || isNumber2(arg) || isFunction(arg) || isArray2(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
242
1690
|
};
|
|
243
1691
|
var isUndefined = (arg) => {
|
|
244
1692
|
return arg === void 0;
|
|
245
1693
|
};
|
|
246
1694
|
var TYPES = {
|
|
247
1695
|
boolean: isBoolean,
|
|
248
|
-
array:
|
|
249
|
-
object:
|
|
250
|
-
string:
|
|
1696
|
+
array: isArray2,
|
|
1697
|
+
object: isObject2,
|
|
1698
|
+
string: isString4,
|
|
251
1699
|
date: isDate,
|
|
252
|
-
number:
|
|
1700
|
+
number: isNumber2,
|
|
253
1701
|
null: isNull,
|
|
254
1702
|
function: isFunction,
|
|
255
1703
|
objectLike: isObjectLike2,
|
|
@@ -297,6 +1745,7 @@ var require_array = __commonJS({
|
|
|
297
1745
|
createNestedObject: () => createNestedObject,
|
|
298
1746
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
1747
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1748
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
1749
|
joinArrays: () => joinArrays,
|
|
301
1750
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
1751
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +1760,11 @@ var require_array = __commonJS({
|
|
|
311
1760
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
1761
|
return arr2.every((val) => arr1.includes(val));
|
|
313
1762
|
};
|
|
1763
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1764
|
+
return arr.reduce((count, currentValue) => {
|
|
1765
|
+
return currentValue === value ? count + 1 : count;
|
|
1766
|
+
}, 0);
|
|
1767
|
+
};
|
|
314
1768
|
var removeFromArray = (arr, index) => {
|
|
315
1769
|
if ((0, import_types.isString)(index))
|
|
316
1770
|
index = parseInt(index);
|
|
@@ -377,7 +1831,7 @@ var require_array = __commonJS({
|
|
|
377
1831
|
newArray.splice(index, 1);
|
|
378
1832
|
return newArray;
|
|
379
1833
|
}
|
|
380
|
-
return arr
|
|
1834
|
+
return arr;
|
|
381
1835
|
};
|
|
382
1836
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
1837
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +2179,7 @@ var require_object = __commonJS({
|
|
|
725
2179
|
continue;
|
|
726
2180
|
const objProp = obj[prop];
|
|
727
2181
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
2182
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
2183
|
try {
|
|
730
2184
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
2185
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +2219,11 @@ var require_object = __commonJS({
|
|
|
765
2219
|
}
|
|
766
2220
|
return destringified;
|
|
767
2221
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
2222
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
2223
|
try {
|
|
770
2224
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
2225
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
2226
|
+
if (opts.verbose)
|
|
773
2227
|
console.warn(e);
|
|
774
2228
|
}
|
|
775
2229
|
};
|
|
@@ -1309,7 +2763,7 @@ var require_tags = __commonJS({
|
|
|
1309
2763
|
});
|
|
1310
2764
|
|
|
1311
2765
|
// ../../node_modules/@domql/utils/dist/cjs/index.js
|
|
1312
|
-
var
|
|
2766
|
+
var require_cjs2 = __commonJS({
|
|
1313
2767
|
"../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
|
|
1314
2768
|
"use strict";
|
|
1315
2769
|
var __defProp2 = Object.defineProperty;
|
|
@@ -1344,7 +2798,7 @@ var require_cjs = __commonJS({
|
|
|
1344
2798
|
});
|
|
1345
2799
|
|
|
1346
2800
|
// ../../node_modules/@domql/globals/dist/cjs/index.js
|
|
1347
|
-
var
|
|
2801
|
+
var require_cjs3 = __commonJS({
|
|
1348
2802
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
1349
2803
|
"use strict";
|
|
1350
2804
|
var __defProp2 = Object.defineProperty;
|
|
@@ -1387,23 +2841,10 @@ __export(timing_exports, {
|
|
|
1387
2841
|
getTimingFunction: () => getTimingFunction
|
|
1388
2842
|
});
|
|
1389
2843
|
module.exports = __toCommonJS(timing_exports);
|
|
1390
|
-
|
|
1391
|
-
// ../utils/src/index.js
|
|
1392
|
-
var import_utils2 = __toESM(require_cjs());
|
|
1393
|
-
|
|
1394
|
-
// ../utils/src/scaling.js
|
|
1395
|
-
var import_utils = __toESM(require_cjs());
|
|
1396
|
-
|
|
1397
|
-
// ../utils/src/index.js
|
|
1398
|
-
var toCamelCase = (str) => {
|
|
1399
|
-
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
1400
|
-
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
1401
|
-
}).replaceAll(/\s+/g, "");
|
|
1402
|
-
};
|
|
1403
|
-
var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2844
|
+
var import_utils7 = __toESM(require_cjs(), 1);
|
|
1404
2845
|
|
|
1405
2846
|
// src/factory.js
|
|
1406
|
-
var
|
|
2847
|
+
var import_utils = __toESM(require_cjs2(), 1);
|
|
1407
2848
|
|
|
1408
2849
|
// src/defaultConfig/index.js
|
|
1409
2850
|
var defaultConfig_exports = {};
|
|
@@ -1608,7 +3049,7 @@ var CONFIG = {
|
|
|
1608
3049
|
CSS_VARS,
|
|
1609
3050
|
...defaultConfig_exports
|
|
1610
3051
|
};
|
|
1611
|
-
var cachedConfig = (0,
|
|
3052
|
+
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
1612
3053
|
var FACTORY = {
|
|
1613
3054
|
active: "0",
|
|
1614
3055
|
0: CONFIG
|
|
@@ -1623,11 +3064,12 @@ var isScalingUnit = (unit) => {
|
|
|
1623
3064
|
};
|
|
1624
3065
|
|
|
1625
3066
|
// src/utils/color.js
|
|
1626
|
-
var import_globals = __toESM(
|
|
1627
|
-
var
|
|
3067
|
+
var import_globals = __toESM(require_cjs3(), 1);
|
|
3068
|
+
var import_utils2 = __toESM(require_cjs2(), 1);
|
|
1628
3069
|
|
|
1629
3070
|
// src/utils/sequence.js
|
|
1630
|
-
var
|
|
3071
|
+
var import_utils3 = __toESM(require_cjs2(), 1);
|
|
3072
|
+
var import_utils4 = __toESM(require_cjs(), 1);
|
|
1631
3073
|
var numToLetterMap = {
|
|
1632
3074
|
"-6": "U",
|
|
1633
3075
|
"-5": "V",
|
|
@@ -1769,9 +3211,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
1769
3211
|
unit = UNIT2.default,
|
|
1770
3212
|
useVariable
|
|
1771
3213
|
} = sequenceProps;
|
|
1772
|
-
if ((0,
|
|
3214
|
+
if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
|
|
1773
3215
|
return `var(${value})`;
|
|
1774
|
-
const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
|
|
3216
|
+
const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
1775
3217
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
1776
3218
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
1777
3219
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
|
|
@@ -1826,7 +3268,7 @@ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
|
1826
3268
|
};
|
|
1827
3269
|
|
|
1828
3270
|
// src/utils/var.js
|
|
1829
|
-
var
|
|
3271
|
+
var import_utils5 = __toESM(require_cjs2(), 1);
|
|
1830
3272
|
var applySequenceGlobalVars = (vars, obj, options) => {
|
|
1831
3273
|
const CONFIG2 = getActiveConfig();
|
|
1832
3274
|
const { UNIT: UNIT2 } = CONFIG2;
|
|
@@ -1868,7 +3310,7 @@ var applySequenceVars = (FACTORY2, options = {}) => {
|
|
|
1868
3310
|
};
|
|
1869
3311
|
|
|
1870
3312
|
// src/utils/sprite.js
|
|
1871
|
-
var
|
|
3313
|
+
var import_utils6 = __toESM(require_cjs2(), 1);
|
|
1872
3314
|
|
|
1873
3315
|
// src/system/timing.js
|
|
1874
3316
|
var applyTimingSequence = () => {
|
|
@@ -1880,7 +3322,7 @@ var applyTimingSequence = () => {
|
|
|
1880
3322
|
var getTimingFunction = (value) => {
|
|
1881
3323
|
const CONFIG2 = getActiveConfig();
|
|
1882
3324
|
const { TIMING: TIMING2 } = CONFIG2;
|
|
1883
|
-
return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
|
|
3325
|
+
return TIMING2[value] || TIMING2[(0, import_utils7.toCamelCase)(value)] || value;
|
|
1884
3326
|
};
|
|
1885
3327
|
var getTimingByKey = (value, property = "timing") => {
|
|
1886
3328
|
const CONFIG2 = getActiveConfig();
|