@symbo.ls/scratch 2.11.410 → 2.11.429
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 +18 -4
- package/dist/cjs/index.js +2297 -2248
- package/dist/cjs/set.js +2234 -2187
- package/dist/cjs/system/color.js +2145 -2101
- package/dist/cjs/system/document.js +2072 -2028
- package/dist/cjs/system/font.js +1846 -1801
- package/dist/cjs/system/index.js +2277 -2230
- package/dist/cjs/system/reset.js +2057 -2013
- package/dist/cjs/system/shadow.js +2154 -2109
- package/dist/cjs/system/spacing.js +1907 -1862
- package/dist/cjs/system/svg.js +1837 -1793
- package/dist/cjs/system/theme.js +2153 -2109
- package/dist/cjs/system/timing.js +1908 -1861
- package/dist/cjs/system/typography.js +2065 -2021
- package/dist/cjs/transforms/index.js +2176 -2129
- package/dist/cjs/utils/color.js +18 -4
- package/dist/cjs/utils/index.js +2082 -2036
- package/dist/cjs/utils/sequence.js +1820 -1774
- package/dist/cjs/utils/sprite.js +18 -4
- package/dist/cjs/utils/var.js +2033 -1989
- package/package.json +2 -2
- package/src/utils/sequence.js +2 -1
|
@@ -34,29 +34,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_key = __commonJS({
|
|
35
35
|
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var __defProp2 = Object.defineProperty;
|
|
38
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
39
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
40
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
41
|
+
var __export2 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
|
-
var
|
|
45
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
46
46
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
|
-
for (let key of
|
|
48
|
-
if (!
|
|
49
|
-
|
|
47
|
+
for (let key of __getOwnPropNames2(from))
|
|
48
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
49
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var key_exports = {};
|
|
55
|
-
|
|
55
|
+
__export2(key_exports, {
|
|
56
56
|
createSnapshotId: () => createSnapshotId,
|
|
57
57
|
generateKey: () => generateKey
|
|
58
58
|
});
|
|
59
|
-
module2.exports =
|
|
59
|
+
module2.exports = __toCommonJS2(key_exports);
|
|
60
60
|
var generateKey = /* @__PURE__ */ function() {
|
|
61
61
|
let index = 0;
|
|
62
62
|
function newId() {
|
|
@@ -73,32 +73,32 @@ var require_key = __commonJS({
|
|
|
73
73
|
var require_env = __commonJS({
|
|
74
74
|
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
75
75
|
"use strict";
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
76
|
+
var __defProp2 = Object.defineProperty;
|
|
77
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
78
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
79
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
80
|
+
var __export2 = (target, all) => {
|
|
81
81
|
for (var name in all)
|
|
82
|
-
|
|
82
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
83
83
|
};
|
|
84
|
-
var
|
|
84
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
85
85
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
86
|
-
for (let key of
|
|
87
|
-
if (!
|
|
88
|
-
|
|
86
|
+
for (let key of __getOwnPropNames2(from))
|
|
87
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
88
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
89
89
|
}
|
|
90
90
|
return to;
|
|
91
91
|
};
|
|
92
|
-
var
|
|
92
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
93
93
|
var env_exports = {};
|
|
94
|
-
|
|
94
|
+
__export2(env_exports, {
|
|
95
95
|
NODE_ENV: () => NODE_ENV,
|
|
96
96
|
getNev: () => getNev,
|
|
97
97
|
isDevelopment: () => isDevelopment,
|
|
98
98
|
isProduction: () => isProduction,
|
|
99
99
|
isTest: () => isTest
|
|
100
100
|
});
|
|
101
|
-
module2.exports =
|
|
101
|
+
module2.exports = __toCommonJS2(env_exports);
|
|
102
102
|
var NODE_ENV = "development";
|
|
103
103
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
104
104
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -111,35 +111,35 @@ var require_env = __commonJS({
|
|
|
111
111
|
var require_globals = __commonJS({
|
|
112
112
|
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
113
113
|
"use strict";
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var
|
|
118
|
-
var
|
|
114
|
+
var __defProp2 = Object.defineProperty;
|
|
115
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
116
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
117
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118
|
+
var __export2 = (target, all) => {
|
|
119
119
|
for (var name in all)
|
|
120
|
-
|
|
120
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
121
121
|
};
|
|
122
|
-
var
|
|
122
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
123
123
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
124
|
-
for (let key of
|
|
125
|
-
if (!
|
|
126
|
-
|
|
124
|
+
for (let key of __getOwnPropNames2(from))
|
|
125
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
126
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
127
127
|
}
|
|
128
128
|
return to;
|
|
129
129
|
};
|
|
130
|
-
var
|
|
130
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
131
131
|
var globals_exports = {};
|
|
132
|
-
|
|
132
|
+
__export2(globals_exports, {
|
|
133
133
|
document: () => document2,
|
|
134
134
|
global: () => global,
|
|
135
135
|
self: () => self,
|
|
136
|
-
window: () =>
|
|
136
|
+
window: () => window2
|
|
137
137
|
});
|
|
138
|
-
module2.exports =
|
|
138
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
139
139
|
var global = globalThis;
|
|
140
140
|
var self = globalThis;
|
|
141
|
-
var
|
|
142
|
-
var document2 =
|
|
141
|
+
var window2 = globalThis;
|
|
142
|
+
var document2 = window2.document;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -147,29 +147,29 @@ var require_globals = __commonJS({
|
|
|
147
147
|
var require_node = __commonJS({
|
|
148
148
|
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
var
|
|
150
|
+
var __defProp2 = Object.defineProperty;
|
|
151
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
152
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
153
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __export2 = (target, all) => {
|
|
155
155
|
for (var name in all)
|
|
156
|
-
|
|
156
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
157
157
|
};
|
|
158
|
-
var
|
|
158
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
159
159
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
160
|
-
for (let key of
|
|
161
|
-
if (!
|
|
162
|
-
|
|
160
|
+
for (let key of __getOwnPropNames2(from))
|
|
161
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
162
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
163
163
|
}
|
|
164
164
|
return to;
|
|
165
165
|
};
|
|
166
|
-
var
|
|
166
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var node_exports = {};
|
|
168
|
-
|
|
168
|
+
__export2(node_exports, {
|
|
169
169
|
isHtmlElement: () => isHtmlElement,
|
|
170
170
|
isNode: () => isNode
|
|
171
171
|
});
|
|
172
|
-
module2.exports =
|
|
172
|
+
module2.exports = __toCommonJS2(node_exports);
|
|
173
173
|
var import_globals = require_globals();
|
|
174
174
|
var isNode = (obj) => {
|
|
175
175
|
return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -184,25 +184,25 @@ var require_node = __commonJS({
|
|
|
184
184
|
var require_types = __commonJS({
|
|
185
185
|
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
186
186
|
"use strict";
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
187
|
+
var __defProp2 = Object.defineProperty;
|
|
188
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
189
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
190
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __export2 = (target, all) => {
|
|
192
192
|
for (var name in all)
|
|
193
|
-
|
|
193
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
194
194
|
};
|
|
195
|
-
var
|
|
195
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
196
196
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
197
|
-
for (let key of
|
|
198
|
-
if (!
|
|
199
|
-
|
|
197
|
+
for (let key of __getOwnPropNames2(from))
|
|
198
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
199
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
200
200
|
}
|
|
201
201
|
return to;
|
|
202
202
|
};
|
|
203
|
-
var
|
|
203
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
204
204
|
var types_exports = {};
|
|
205
|
-
|
|
205
|
+
__export2(types_exports, {
|
|
206
206
|
TYPES: () => TYPES,
|
|
207
207
|
is: () => is,
|
|
208
208
|
isArray: () => isArray,
|
|
@@ -218,7 +218,7 @@ var require_types = __commonJS({
|
|
|
218
218
|
isString: () => isString2,
|
|
219
219
|
isUndefined: () => isUndefined
|
|
220
220
|
});
|
|
221
|
-
module2.exports =
|
|
221
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
222
222
|
var import_node = require_node();
|
|
223
223
|
var isObject2 = (arg) => {
|
|
224
224
|
if (arg === null)
|
|
@@ -274,25 +274,25 @@ var require_types = __commonJS({
|
|
|
274
274
|
var require_array = __commonJS({
|
|
275
275
|
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
276
276
|
"use strict";
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
var
|
|
277
|
+
var __defProp2 = Object.defineProperty;
|
|
278
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
279
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
280
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
281
|
+
var __export2 = (target, all) => {
|
|
282
282
|
for (var name in all)
|
|
283
|
-
|
|
283
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
284
284
|
};
|
|
285
|
-
var
|
|
285
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
286
286
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
287
|
-
for (let key of
|
|
288
|
-
if (!
|
|
289
|
-
|
|
287
|
+
for (let key of __getOwnPropNames2(from))
|
|
288
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
289
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
290
290
|
}
|
|
291
291
|
return to;
|
|
292
292
|
};
|
|
293
|
-
var
|
|
293
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
294
294
|
var array_exports = {};
|
|
295
|
-
|
|
295
|
+
__export2(array_exports, {
|
|
296
296
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
297
297
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
298
298
|
arraysEqual: () => arraysEqual,
|
|
@@ -309,7 +309,7 @@ var require_array = __commonJS({
|
|
|
309
309
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
310
310
|
swapItemsInArray: () => swapItemsInArray
|
|
311
311
|
});
|
|
312
|
-
module2.exports =
|
|
312
|
+
module2.exports = __toCommonJS2(array_exports);
|
|
313
313
|
var import_object = require_object();
|
|
314
314
|
var import_types = require_types();
|
|
315
315
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -342,10 +342,10 @@ var require_array = __commonJS({
|
|
|
342
342
|
return [].concat(...arrays);
|
|
343
343
|
};
|
|
344
344
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
345
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
345
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
346
346
|
};
|
|
347
347
|
var mergeAndCloneIfArray = (obj) => {
|
|
348
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
348
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
349
349
|
};
|
|
350
350
|
var cutArrayBeforeValue = (arr, value) => {
|
|
351
351
|
const index = arr.indexOf(value);
|
|
@@ -430,27 +430,29 @@ var require_array = __commonJS({
|
|
|
430
430
|
var require_string = __commonJS({
|
|
431
431
|
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
432
432
|
"use strict";
|
|
433
|
-
var
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
433
|
+
var __defProp2 = Object.defineProperty;
|
|
434
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
435
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
436
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
437
|
+
var __export2 = (target, all) => {
|
|
438
438
|
for (var name in all)
|
|
439
|
-
|
|
439
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
440
440
|
};
|
|
441
|
-
var
|
|
441
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
442
442
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
443
|
-
for (let key of
|
|
444
|
-
if (!
|
|
445
|
-
|
|
443
|
+
for (let key of __getOwnPropNames2(from))
|
|
444
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
445
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
446
446
|
}
|
|
447
447
|
return to;
|
|
448
448
|
};
|
|
449
|
-
var
|
|
449
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
450
450
|
var string_exports = {};
|
|
451
|
-
|
|
451
|
+
__export2(string_exports, {
|
|
452
452
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
453
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
454
|
+
decodeNewlines: () => decodeNewlines,
|
|
455
|
+
encodeNewlines: () => encodeNewlines,
|
|
454
456
|
findKeyPosition: () => findKeyPosition,
|
|
455
457
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
456
458
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -458,7 +460,7 @@ var require_string = __commonJS({
|
|
|
458
460
|
stringIncludesAny: () => stringIncludesAny,
|
|
459
461
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
460
462
|
});
|
|
461
|
-
module2.exports =
|
|
463
|
+
module2.exports = __toCommonJS2(string_exports);
|
|
462
464
|
var stringIncludesAny = (str, characters) => {
|
|
463
465
|
for (const char of characters) {
|
|
464
466
|
if (str.includes(char)) {
|
|
@@ -554,6 +556,12 @@ var require_string = __commonJS({
|
|
|
554
556
|
return char;
|
|
555
557
|
});
|
|
556
558
|
};
|
|
559
|
+
var encodeNewlines = (str) => {
|
|
560
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
561
|
+
};
|
|
562
|
+
var decodeNewlines = (encodedStr) => {
|
|
563
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
564
|
+
};
|
|
557
565
|
var customEncodeURIComponent = (str) => {
|
|
558
566
|
return str.split("").map((char) => {
|
|
559
567
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -572,25 +580,25 @@ var require_string = __commonJS({
|
|
|
572
580
|
var require_object = __commonJS({
|
|
573
581
|
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
574
582
|
"use strict";
|
|
575
|
-
var
|
|
576
|
-
var
|
|
577
|
-
var
|
|
578
|
-
var
|
|
579
|
-
var
|
|
583
|
+
var __defProp2 = Object.defineProperty;
|
|
584
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
585
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
586
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
587
|
+
var __export2 = (target, all) => {
|
|
580
588
|
for (var name in all)
|
|
581
|
-
|
|
589
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
582
590
|
};
|
|
583
|
-
var
|
|
591
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
584
592
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
585
|
-
for (let key of
|
|
586
|
-
if (!
|
|
587
|
-
|
|
593
|
+
for (let key of __getOwnPropNames2(from))
|
|
594
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
595
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
588
596
|
}
|
|
589
597
|
return to;
|
|
590
598
|
};
|
|
591
|
-
var
|
|
599
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
592
600
|
var object_exports = {};
|
|
593
|
-
|
|
601
|
+
__export2(object_exports, {
|
|
594
602
|
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
595
603
|
clone: () => clone,
|
|
596
604
|
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
@@ -626,7 +634,7 @@ var require_object = __commonJS({
|
|
|
626
634
|
removeFromObject: () => removeFromObject,
|
|
627
635
|
stringToObject: () => stringToObject
|
|
628
636
|
});
|
|
629
|
-
module2.exports =
|
|
637
|
+
module2.exports = __toCommonJS2(object_exports);
|
|
630
638
|
var import_globals = require_globals();
|
|
631
639
|
var import_types = require_types();
|
|
632
640
|
var import_array = require_array();
|
|
@@ -732,7 +740,7 @@ var require_object = __commonJS({
|
|
|
732
740
|
return o;
|
|
733
741
|
};
|
|
734
742
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
743
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
744
|
for (const prop in obj) {
|
|
737
745
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
746
|
continue;
|
|
@@ -986,7 +994,7 @@ var require_object = __commonJS({
|
|
|
986
994
|
};
|
|
987
995
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
988
996
|
for (const e in params) {
|
|
989
|
-
if (e === "
|
|
997
|
+
if (e === "__ref")
|
|
990
998
|
continue;
|
|
991
999
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
992
1000
|
continue;
|
|
@@ -1108,6 +1116,12 @@ var require_object = __commonJS({
|
|
|
1108
1116
|
if (foundString || foundInArray)
|
|
1109
1117
|
return el;
|
|
1110
1118
|
}
|
|
1119
|
+
if (el.parent && el.parent.childExtend) {
|
|
1120
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1121
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1122
|
+
if (foundString || foundInArray)
|
|
1123
|
+
return el;
|
|
1124
|
+
}
|
|
1111
1125
|
};
|
|
1112
1126
|
var getExtendsInElement = (obj) => {
|
|
1113
1127
|
let result = [];
|
|
@@ -1140,31 +1154,31 @@ var require_object = __commonJS({
|
|
|
1140
1154
|
var require_function = __commonJS({
|
|
1141
1155
|
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1142
1156
|
"use strict";
|
|
1143
|
-
var
|
|
1144
|
-
var
|
|
1145
|
-
var
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1157
|
+
var __defProp2 = Object.defineProperty;
|
|
1158
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1159
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1160
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1161
|
+
var __export2 = (target, all) => {
|
|
1148
1162
|
for (var name in all)
|
|
1149
|
-
|
|
1163
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1150
1164
|
};
|
|
1151
|
-
var
|
|
1165
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1152
1166
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1153
|
-
for (let key of
|
|
1154
|
-
if (!
|
|
1155
|
-
|
|
1167
|
+
for (let key of __getOwnPropNames2(from))
|
|
1168
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1169
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1156
1170
|
}
|
|
1157
1171
|
return to;
|
|
1158
1172
|
};
|
|
1159
|
-
var
|
|
1173
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1160
1174
|
var function_exports = {};
|
|
1161
|
-
|
|
1175
|
+
__export2(function_exports, {
|
|
1162
1176
|
debounce: () => debounce,
|
|
1163
1177
|
debounceOnContext: () => debounceOnContext,
|
|
1164
1178
|
isStringFunction: () => isStringFunction,
|
|
1165
1179
|
memoize: () => memoize
|
|
1166
1180
|
});
|
|
1167
|
-
module2.exports =
|
|
1181
|
+
module2.exports = __toCommonJS2(function_exports);
|
|
1168
1182
|
function debounce(func, wait, immediate) {
|
|
1169
1183
|
let timeout;
|
|
1170
1184
|
return function() {
|
|
@@ -1215,29 +1229,29 @@ var require_function = __commonJS({
|
|
|
1215
1229
|
var require_log = __commonJS({
|
|
1216
1230
|
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1217
1231
|
"use strict";
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1222
|
-
var
|
|
1232
|
+
var __defProp2 = Object.defineProperty;
|
|
1233
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1234
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1235
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1236
|
+
var __export2 = (target, all) => {
|
|
1223
1237
|
for (var name in all)
|
|
1224
|
-
|
|
1238
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1225
1239
|
};
|
|
1226
|
-
var
|
|
1240
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1227
1241
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1228
|
-
for (let key of
|
|
1229
|
-
if (!
|
|
1230
|
-
|
|
1242
|
+
for (let key of __getOwnPropNames2(from))
|
|
1243
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1244
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1231
1245
|
}
|
|
1232
1246
|
return to;
|
|
1233
1247
|
};
|
|
1234
|
-
var
|
|
1248
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1235
1249
|
var log_exports = {};
|
|
1236
|
-
|
|
1250
|
+
__export2(log_exports, {
|
|
1237
1251
|
logGroupIf: () => logGroupIf,
|
|
1238
1252
|
logIf: () => logIf
|
|
1239
1253
|
});
|
|
1240
|
-
module2.exports =
|
|
1254
|
+
module2.exports = __toCommonJS2(log_exports);
|
|
1241
1255
|
var logIf = (bool, ...arg) => {
|
|
1242
1256
|
if (bool)
|
|
1243
1257
|
arg.map((v) => console.log(v));
|
|
@@ -1256,46 +1270,46 @@ var require_log = __commonJS({
|
|
|
1256
1270
|
var require_cookie = __commonJS({
|
|
1257
1271
|
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1258
1272
|
"use strict";
|
|
1259
|
-
var
|
|
1260
|
-
var
|
|
1261
|
-
var
|
|
1262
|
-
var
|
|
1263
|
-
var
|
|
1273
|
+
var __defProp2 = Object.defineProperty;
|
|
1274
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1275
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1276
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1277
|
+
var __export2 = (target, all) => {
|
|
1264
1278
|
for (var name in all)
|
|
1265
|
-
|
|
1279
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1266
1280
|
};
|
|
1267
|
-
var
|
|
1281
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1268
1282
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1269
|
-
for (let key of
|
|
1270
|
-
if (!
|
|
1271
|
-
|
|
1283
|
+
for (let key of __getOwnPropNames2(from))
|
|
1284
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1285
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1272
1286
|
}
|
|
1273
1287
|
return to;
|
|
1274
1288
|
};
|
|
1275
|
-
var
|
|
1289
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1276
1290
|
var cookie_exports = {};
|
|
1277
|
-
|
|
1291
|
+
__export2(cookie_exports, {
|
|
1278
1292
|
getCookie: () => getCookie,
|
|
1279
1293
|
isMobile: () => isMobile,
|
|
1280
1294
|
setCookie: () => setCookie
|
|
1281
1295
|
});
|
|
1282
|
-
module2.exports =
|
|
1296
|
+
module2.exports = __toCommonJS2(cookie_exports);
|
|
1283
1297
|
var import_types = require_types();
|
|
1284
|
-
var
|
|
1298
|
+
var import_utils4 = require_cjs();
|
|
1285
1299
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1286
1300
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1287
|
-
if ((0, import_types.isUndefined)(
|
|
1301
|
+
if ((0, import_types.isUndefined)(import_utils4.document) || (0, import_types.isUndefined)(import_utils4.document.cookie))
|
|
1288
1302
|
return;
|
|
1289
1303
|
const d = /* @__PURE__ */ new Date();
|
|
1290
1304
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1291
1305
|
const expires = `expires=${d.toUTCString()}`;
|
|
1292
|
-
|
|
1306
|
+
import_utils4.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1293
1307
|
};
|
|
1294
1308
|
var getCookie = (cname) => {
|
|
1295
|
-
if ((0, import_types.isUndefined)(
|
|
1309
|
+
if ((0, import_types.isUndefined)(import_utils4.document) || (0, import_types.isUndefined)(import_utils4.document.cookie))
|
|
1296
1310
|
return;
|
|
1297
1311
|
const name = `${cname}=`;
|
|
1298
|
-
const decodedCookie = decodeURIComponent(
|
|
1312
|
+
const decodedCookie = decodeURIComponent(import_utils4.document.cookie);
|
|
1299
1313
|
const ca = decodedCookie.split(";");
|
|
1300
1314
|
for (let i = 0; i < ca.length; i++) {
|
|
1301
1315
|
let c = ca[i];
|
|
@@ -1313,29 +1327,29 @@ var require_cookie = __commonJS({
|
|
|
1313
1327
|
var require_tags = __commonJS({
|
|
1314
1328
|
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1315
1329
|
"use strict";
|
|
1316
|
-
var
|
|
1317
|
-
var
|
|
1318
|
-
var
|
|
1319
|
-
var
|
|
1320
|
-
var
|
|
1330
|
+
var __defProp2 = Object.defineProperty;
|
|
1331
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1332
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1333
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1334
|
+
var __export2 = (target, all) => {
|
|
1321
1335
|
for (var name in all)
|
|
1322
|
-
|
|
1336
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1323
1337
|
};
|
|
1324
|
-
var
|
|
1338
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1325
1339
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1326
|
-
for (let key of
|
|
1327
|
-
if (!
|
|
1328
|
-
|
|
1340
|
+
for (let key of __getOwnPropNames2(from))
|
|
1341
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1342
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1329
1343
|
}
|
|
1330
1344
|
return to;
|
|
1331
1345
|
};
|
|
1332
|
-
var
|
|
1346
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1333
1347
|
var tags_exports = {};
|
|
1334
|
-
|
|
1348
|
+
__export2(tags_exports, {
|
|
1335
1349
|
HTML_TAGS: () => HTML_TAGS,
|
|
1336
1350
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1337
1351
|
});
|
|
1338
|
-
module2.exports =
|
|
1352
|
+
module2.exports = __toCommonJS2(tags_exports);
|
|
1339
1353
|
var HTML_TAGS = {
|
|
1340
1354
|
root: [
|
|
1341
1355
|
"body",
|
|
@@ -1481,22 +1495,22 @@ var require_tags = __commonJS({
|
|
|
1481
1495
|
var require_cjs = __commonJS({
|
|
1482
1496
|
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1483
1497
|
"use strict";
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
1486
|
-
var
|
|
1487
|
-
var
|
|
1488
|
-
var
|
|
1498
|
+
var __defProp2 = Object.defineProperty;
|
|
1499
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1500
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1501
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1502
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1489
1503
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1490
|
-
for (let key of
|
|
1491
|
-
if (!
|
|
1492
|
-
|
|
1504
|
+
for (let key of __getOwnPropNames2(from))
|
|
1505
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1506
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1493
1507
|
}
|
|
1494
1508
|
return to;
|
|
1495
1509
|
};
|
|
1496
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1497
|
-
var
|
|
1510
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
1511
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1498
1512
|
var utils_exports = {};
|
|
1499
|
-
module2.exports =
|
|
1513
|
+
module2.exports = __toCommonJS2(utils_exports);
|
|
1500
1514
|
__reExport(utils_exports, require_key(), module2.exports);
|
|
1501
1515
|
__reExport(utils_exports, require_env(), module2.exports);
|
|
1502
1516
|
__reExport(utils_exports, require_types(), module2.exports);
|
|
@@ -1512,1667 +1526,1697 @@ var require_cjs = __commonJS({
|
|
|
1512
1526
|
}
|
|
1513
1527
|
});
|
|
1514
1528
|
|
|
1515
|
-
// src/utils/sequence.js
|
|
1516
|
-
var sequence_exports = {};
|
|
1517
|
-
__export(sequence_exports, {
|
|
1518
|
-
findHeadingLetter: () => findHeadingLetter,
|
|
1519
|
-
findHeadings: () => findHeadings,
|
|
1520
|
-
generateSequence: () => generateSequence,
|
|
1521
|
-
generateSubSequence: () => generateSubSequence,
|
|
1522
|
-
getSequenceValue: () => getSequenceValue,
|
|
1523
|
-
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
1524
|
-
getSubratio: () => getSubratio,
|
|
1525
|
-
getSubratioDifference: () => getSubratioDifference,
|
|
1526
|
-
numToLetterMap: () => numToLetterMap,
|
|
1527
|
-
setScalingVar: () => setScalingVar,
|
|
1528
|
-
setSubScalingVar: () => setSubScalingVar
|
|
1529
|
-
});
|
|
1530
|
-
module.exports = __toCommonJS(sequence_exports);
|
|
1531
|
-
var import_utils4 = __toESM(require_cjs(), 1);
|
|
1532
|
-
|
|
1533
1529
|
// ../utils/dist/cjs/index.js
|
|
1534
|
-
var
|
|
1535
|
-
|
|
1536
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1537
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1538
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1539
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1540
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1541
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1542
|
-
};
|
|
1543
|
-
var __export2 = (target, all) => {
|
|
1544
|
-
for (var name in all)
|
|
1545
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1546
|
-
};
|
|
1547
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
1548
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1549
|
-
for (let key of __getOwnPropNames2(from))
|
|
1550
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1551
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1552
|
-
}
|
|
1553
|
-
return to;
|
|
1554
|
-
};
|
|
1555
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1556
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1557
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1558
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1559
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1560
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1561
|
-
mod
|
|
1562
|
-
));
|
|
1563
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1564
|
-
var require_key2 = __commonJS2({
|
|
1565
|
-
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1530
|
+
var require_cjs2 = __commonJS({
|
|
1531
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
1566
1532
|
"use strict";
|
|
1567
|
-
var
|
|
1568
|
-
var
|
|
1569
|
-
var
|
|
1570
|
-
var
|
|
1571
|
-
var
|
|
1533
|
+
var __create2 = Object.create;
|
|
1534
|
+
var __defProp2 = Object.defineProperty;
|
|
1535
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1536
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1537
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1538
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1539
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1540
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1541
|
+
};
|
|
1542
|
+
var __export2 = (target, all) => {
|
|
1572
1543
|
for (var name in all)
|
|
1573
|
-
|
|
1544
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1574
1545
|
};
|
|
1575
|
-
var
|
|
1546
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1576
1547
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1577
|
-
for (let key of
|
|
1578
|
-
if (!
|
|
1579
|
-
|
|
1548
|
+
for (let key of __getOwnPropNames2(from))
|
|
1549
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1550
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1580
1551
|
}
|
|
1581
1552
|
return to;
|
|
1582
1553
|
};
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1554
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1555
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1556
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1557
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1558
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1559
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1560
|
+
mod
|
|
1561
|
+
));
|
|
1562
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1563
|
+
var require_key2 = __commonJS2({
|
|
1564
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports2, module22) {
|
|
1565
|
+
"use strict";
|
|
1566
|
+
var __defProp22 = Object.defineProperty;
|
|
1567
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1568
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1569
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1570
|
+
var __export22 = (target, all) => {
|
|
1571
|
+
for (var name in all)
|
|
1572
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1573
|
+
};
|
|
1574
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1575
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1576
|
+
for (let key of __getOwnPropNames22(from))
|
|
1577
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1578
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1579
|
+
}
|
|
1580
|
+
return to;
|
|
1581
|
+
};
|
|
1582
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1583
|
+
var key_exports = {};
|
|
1584
|
+
__export22(key_exports, {
|
|
1585
|
+
createSnapshotId: () => createSnapshotId,
|
|
1586
|
+
generateKey: () => generateKey
|
|
1587
|
+
});
|
|
1588
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
1589
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1590
|
+
let index = 0;
|
|
1591
|
+
function newId() {
|
|
1592
|
+
index++;
|
|
1593
|
+
return index;
|
|
1594
|
+
}
|
|
1595
|
+
return newId;
|
|
1596
|
+
}();
|
|
1597
|
+
var createSnapshotId = generateKey;
|
|
1617
1598
|
}
|
|
1618
|
-
return to;
|
|
1619
|
-
};
|
|
1620
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1621
|
-
var env_exports = {};
|
|
1622
|
-
__export22(env_exports, {
|
|
1623
|
-
NODE_ENV: () => NODE_ENV,
|
|
1624
|
-
getNev: () => getNev,
|
|
1625
|
-
isDevelopment: () => isDevelopment,
|
|
1626
|
-
isProduction: () => isProduction,
|
|
1627
|
-
isTest: () => isTest
|
|
1628
1599
|
});
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
var
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1600
|
+
var require_env2 = __commonJS2({
|
|
1601
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports2, module22) {
|
|
1602
|
+
"use strict";
|
|
1603
|
+
var __defProp22 = Object.defineProperty;
|
|
1604
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1605
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1606
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1607
|
+
var __export22 = (target, all) => {
|
|
1608
|
+
for (var name in all)
|
|
1609
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1610
|
+
};
|
|
1611
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1612
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1613
|
+
for (let key of __getOwnPropNames22(from))
|
|
1614
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1615
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1616
|
+
}
|
|
1617
|
+
return to;
|
|
1618
|
+
};
|
|
1619
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1620
|
+
var env_exports = {};
|
|
1621
|
+
__export22(env_exports, {
|
|
1622
|
+
NODE_ENV: () => NODE_ENV,
|
|
1623
|
+
getNev: () => getNev,
|
|
1624
|
+
isDevelopment: () => isDevelopment,
|
|
1625
|
+
isProduction: () => isProduction,
|
|
1626
|
+
isTest: () => isTest
|
|
1627
|
+
});
|
|
1628
|
+
module22.exports = __toCommonJS22(env_exports);
|
|
1629
|
+
var NODE_ENV = "development";
|
|
1630
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1631
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1632
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1633
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1653
1634
|
}
|
|
1654
|
-
return to;
|
|
1655
|
-
};
|
|
1656
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1657
|
-
var globals_exports = {};
|
|
1658
|
-
__export22(globals_exports, {
|
|
1659
|
-
document: () => document2,
|
|
1660
|
-
global: () => global,
|
|
1661
|
-
self: () => self,
|
|
1662
|
-
window: () => window
|
|
1663
1635
|
});
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
var
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1636
|
+
var require_globals2 = __commonJS2({
|
|
1637
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
1638
|
+
"use strict";
|
|
1639
|
+
var __defProp22 = Object.defineProperty;
|
|
1640
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1641
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1642
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1643
|
+
var __export22 = (target, all) => {
|
|
1644
|
+
for (var name in all)
|
|
1645
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1646
|
+
};
|
|
1647
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1648
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1649
|
+
for (let key of __getOwnPropNames22(from))
|
|
1650
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1651
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1652
|
+
}
|
|
1653
|
+
return to;
|
|
1654
|
+
};
|
|
1655
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1656
|
+
var globals_exports = {};
|
|
1657
|
+
__export22(globals_exports, {
|
|
1658
|
+
document: () => document2,
|
|
1659
|
+
global: () => global,
|
|
1660
|
+
self: () => self,
|
|
1661
|
+
window: () => window2
|
|
1662
|
+
});
|
|
1663
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
1664
|
+
var global = globalThis;
|
|
1665
|
+
var self = globalThis;
|
|
1666
|
+
var window2 = globalThis;
|
|
1667
|
+
var document2 = window2.document;
|
|
1687
1668
|
}
|
|
1688
|
-
return to;
|
|
1689
|
-
};
|
|
1690
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1691
|
-
var node_exports = {};
|
|
1692
|
-
__export22(node_exports, {
|
|
1693
|
-
isHtmlElement: () => isHtmlElement,
|
|
1694
|
-
isNode: () => isNode
|
|
1695
1669
|
});
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
});
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
__defProp22(
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1670
|
+
var require_node2 = __commonJS2({
|
|
1671
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports2, module22) {
|
|
1672
|
+
"use strict";
|
|
1673
|
+
var __defProp22 = Object.defineProperty;
|
|
1674
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1675
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1676
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1677
|
+
var __export22 = (target, all) => {
|
|
1678
|
+
for (var name in all)
|
|
1679
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1680
|
+
};
|
|
1681
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1682
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1683
|
+
for (let key of __getOwnPropNames22(from))
|
|
1684
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1685
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1686
|
+
}
|
|
1687
|
+
return to;
|
|
1688
|
+
};
|
|
1689
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1690
|
+
var node_exports = {};
|
|
1691
|
+
__export22(node_exports, {
|
|
1692
|
+
isHtmlElement: () => isHtmlElement,
|
|
1693
|
+
isNode: () => isNode
|
|
1694
|
+
});
|
|
1695
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
1696
|
+
var import_globals = require_globals2();
|
|
1697
|
+
var isNode = (obj) => {
|
|
1698
|
+
return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1699
|
+
};
|
|
1700
|
+
var isHtmlElement = (obj) => {
|
|
1701
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1702
|
+
};
|
|
1722
1703
|
}
|
|
1723
|
-
return to;
|
|
1724
|
-
};
|
|
1725
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1726
|
-
var types_exports = {};
|
|
1727
|
-
__export22(types_exports, {
|
|
1728
|
-
TYPES: () => TYPES,
|
|
1729
|
-
is: () => is,
|
|
1730
|
-
isArray: () => isArray3,
|
|
1731
|
-
isBoolean: () => isBoolean,
|
|
1732
|
-
isDate: () => isDate,
|
|
1733
|
-
isDefined: () => isDefined2,
|
|
1734
|
-
isFunction: () => isFunction,
|
|
1735
|
-
isNot: () => isNot,
|
|
1736
|
-
isNull: () => isNull,
|
|
1737
|
-
isNumber: () => isNumber2,
|
|
1738
|
-
isObject: () => isObject3,
|
|
1739
|
-
isObjectLike: () => isObjectLike,
|
|
1740
|
-
isString: () => isString2,
|
|
1741
|
-
isUndefined: () => isUndefined
|
|
1742
1704
|
});
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
var
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1705
|
+
var require_types2 = __commonJS2({
|
|
1706
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports2, module22) {
|
|
1707
|
+
"use strict";
|
|
1708
|
+
var __defProp22 = Object.defineProperty;
|
|
1709
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1710
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1711
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1712
|
+
var __export22 = (target, all) => {
|
|
1713
|
+
for (var name in all)
|
|
1714
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1715
|
+
};
|
|
1716
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1717
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1718
|
+
for (let key of __getOwnPropNames22(from))
|
|
1719
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1720
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1721
|
+
}
|
|
1722
|
+
return to;
|
|
1723
|
+
};
|
|
1724
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1725
|
+
var types_exports = {};
|
|
1726
|
+
__export22(types_exports, {
|
|
1727
|
+
TYPES: () => TYPES,
|
|
1728
|
+
is: () => is,
|
|
1729
|
+
isArray: () => isArray3,
|
|
1730
|
+
isBoolean: () => isBoolean,
|
|
1731
|
+
isDate: () => isDate,
|
|
1732
|
+
isDefined: () => isDefined2,
|
|
1733
|
+
isFunction: () => isFunction,
|
|
1734
|
+
isNot: () => isNot,
|
|
1735
|
+
isNull: () => isNull,
|
|
1736
|
+
isNumber: () => isNumber2,
|
|
1737
|
+
isObject: () => isObject3,
|
|
1738
|
+
isObjectLike: () => isObjectLike,
|
|
1739
|
+
isString: () => isString2,
|
|
1740
|
+
isUndefined: () => isUndefined
|
|
1741
|
+
});
|
|
1742
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
1743
|
+
var import_node = require_node2();
|
|
1744
|
+
var isObject3 = (arg) => {
|
|
1745
|
+
if (arg === null)
|
|
1746
|
+
return false;
|
|
1747
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
1748
|
+
};
|
|
1749
|
+
var isString2 = (arg) => typeof arg === "string";
|
|
1750
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
1751
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
1752
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
1753
|
+
var isNull = (arg) => arg === null;
|
|
1754
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
1755
|
+
var isDate = (d) => d instanceof Date;
|
|
1756
|
+
var isObjectLike = (arg) => {
|
|
1757
|
+
if (arg === null)
|
|
1758
|
+
return false;
|
|
1759
|
+
return typeof arg === "object";
|
|
1760
|
+
};
|
|
1761
|
+
var isDefined2 = (arg) => {
|
|
1762
|
+
return isObject3(arg) || isObjectLike(arg) || isString2(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1763
|
+
};
|
|
1764
|
+
var isUndefined = (arg) => {
|
|
1765
|
+
return arg === void 0;
|
|
1766
|
+
};
|
|
1767
|
+
var TYPES = {
|
|
1768
|
+
boolean: isBoolean,
|
|
1769
|
+
array: isArray3,
|
|
1770
|
+
object: isObject3,
|
|
1771
|
+
string: isString2,
|
|
1772
|
+
date: isDate,
|
|
1773
|
+
number: isNumber2,
|
|
1774
|
+
null: isNull,
|
|
1775
|
+
function: isFunction,
|
|
1776
|
+
objectLike: isObjectLike,
|
|
1777
|
+
node: import_node.isNode,
|
|
1778
|
+
htmlElement: import_node.isHtmlElement,
|
|
1779
|
+
defined: isDefined2
|
|
1780
|
+
};
|
|
1781
|
+
var is = (arg) => {
|
|
1782
|
+
return (...args) => {
|
|
1783
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
var isNot = (arg) => {
|
|
1787
|
+
return (...args) => {
|
|
1788
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1789
|
+
};
|
|
1790
|
+
};
|
|
1810
1791
|
}
|
|
1811
|
-
return to;
|
|
1812
|
-
};
|
|
1813
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1814
|
-
var array_exports = {};
|
|
1815
|
-
__export22(array_exports, {
|
|
1816
|
-
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1817
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1818
|
-
arraysEqual: () => arraysEqual,
|
|
1819
|
-
createNestedObject: () => createNestedObject,
|
|
1820
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1821
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1822
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
1823
|
-
joinArrays: () => joinArrays,
|
|
1824
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1825
|
-
mergeArray: () => mergeArray,
|
|
1826
|
-
removeFromArray: () => removeFromArray,
|
|
1827
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
1828
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1829
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
1830
|
-
swapItemsInArray: () => swapItemsInArray
|
|
1831
1792
|
});
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
const nestedObject = {};
|
|
1888
|
-
if (arr.length === 0) {
|
|
1889
|
-
return lastValue;
|
|
1890
|
-
}
|
|
1891
|
-
arr.reduce((obj, value, index) => {
|
|
1892
|
-
if (!obj[value]) {
|
|
1893
|
-
obj[value] = {};
|
|
1894
|
-
}
|
|
1895
|
-
if (index === arr.length - 1 && lastValue) {
|
|
1896
|
-
obj[value] = lastValue;
|
|
1897
|
-
}
|
|
1898
|
-
return obj[value];
|
|
1899
|
-
}, nestedObject);
|
|
1900
|
-
return nestedObject;
|
|
1901
|
-
};
|
|
1902
|
-
var removeValueFromArray = (arr, value) => {
|
|
1903
|
-
const index = arr.indexOf(value);
|
|
1904
|
-
if (index > -1) {
|
|
1905
|
-
const newArray = [...arr];
|
|
1906
|
-
newArray.splice(index, 1);
|
|
1907
|
-
return newArray;
|
|
1908
|
-
}
|
|
1909
|
-
return arr;
|
|
1910
|
-
};
|
|
1911
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
1912
|
-
return arr.filter((item) => item !== value);
|
|
1913
|
-
};
|
|
1914
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
1915
|
-
const result = [];
|
|
1916
|
-
for (let i = 0; i < array.length; i++) {
|
|
1917
|
-
result.push(array[i]);
|
|
1918
|
-
if (i < array.length - 1) {
|
|
1919
|
-
result.push(item);
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
return result;
|
|
1923
|
-
};
|
|
1924
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1925
|
-
const newArray = [...array];
|
|
1926
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
1927
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1928
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1929
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1930
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1931
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
1932
|
-
}
|
|
1933
|
-
return newArray;
|
|
1934
|
-
};
|
|
1935
|
-
var arraysEqual = (arr1, arr2) => {
|
|
1936
|
-
if (arr1.length !== arr2.length) {
|
|
1937
|
-
return false;
|
|
1938
|
-
}
|
|
1939
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
1940
|
-
if (arr1[i] !== arr2[i]) {
|
|
1941
|
-
return false;
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
return true;
|
|
1945
|
-
};
|
|
1946
|
-
}
|
|
1947
|
-
});
|
|
1948
|
-
var require_string2 = __commonJS2({
|
|
1949
|
-
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
1950
|
-
"use strict";
|
|
1951
|
-
var __defProp22 = Object.defineProperty;
|
|
1952
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1953
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1954
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1955
|
-
var __export22 = (target, all) => {
|
|
1956
|
-
for (var name in all)
|
|
1957
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1958
|
-
};
|
|
1959
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1960
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1961
|
-
for (let key of __getOwnPropNames22(from))
|
|
1962
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1963
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1964
|
-
}
|
|
1965
|
-
return to;
|
|
1966
|
-
};
|
|
1967
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1968
|
-
var string_exports = {};
|
|
1969
|
-
__export22(string_exports, {
|
|
1970
|
-
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
1971
|
-
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
1972
|
-
findKeyPosition: () => findKeyPosition,
|
|
1973
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
1974
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
1975
|
-
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
1976
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
1977
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
1978
|
-
});
|
|
1979
|
-
module2.exports = __toCommonJS22(string_exports);
|
|
1980
|
-
var stringIncludesAny = (str, characters) => {
|
|
1981
|
-
for (const char of characters) {
|
|
1982
|
-
if (str.includes(char)) {
|
|
1983
|
-
return true;
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
return false;
|
|
1987
|
-
};
|
|
1988
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
1989
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
1990
|
-
return str.replace(pattern, "");
|
|
1991
|
-
};
|
|
1992
|
-
var brackRegex = {
|
|
1993
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
1994
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
1995
|
-
};
|
|
1996
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
1997
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
1998
|
-
return str;
|
|
1999
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
2000
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
2001
|
-
if (parentPath) {
|
|
2002
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2003
|
-
let parentState = state;
|
|
2004
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
2005
|
-
parentState = parentState.parent;
|
|
2006
|
-
if (!parentState) {
|
|
2007
|
-
return "";
|
|
1793
|
+
var require_array2 = __commonJS2({
|
|
1794
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports2, module22) {
|
|
1795
|
+
"use strict";
|
|
1796
|
+
var __defProp22 = Object.defineProperty;
|
|
1797
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1798
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1799
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1800
|
+
var __export22 = (target, all) => {
|
|
1801
|
+
for (var name in all)
|
|
1802
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1803
|
+
};
|
|
1804
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1805
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1806
|
+
for (let key of __getOwnPropNames22(from))
|
|
1807
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1808
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1809
|
+
}
|
|
1810
|
+
return to;
|
|
1811
|
+
};
|
|
1812
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1813
|
+
var array_exports = {};
|
|
1814
|
+
__export22(array_exports, {
|
|
1815
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1816
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1817
|
+
arraysEqual: () => arraysEqual,
|
|
1818
|
+
createNestedObject: () => createNestedObject,
|
|
1819
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1820
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1821
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1822
|
+
joinArrays: () => joinArrays,
|
|
1823
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1824
|
+
mergeArray: () => mergeArray,
|
|
1825
|
+
removeFromArray: () => removeFromArray,
|
|
1826
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
1827
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1828
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
1829
|
+
swapItemsInArray: () => swapItemsInArray
|
|
1830
|
+
});
|
|
1831
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
1832
|
+
var import_object = require_object2();
|
|
1833
|
+
var import_types = require_types2();
|
|
1834
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1835
|
+
return arr2.every((val) => arr1.includes(val));
|
|
1836
|
+
};
|
|
1837
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1838
|
+
return arr.reduce((count, currentValue) => {
|
|
1839
|
+
return currentValue === value ? count + 1 : count;
|
|
1840
|
+
}, 0);
|
|
1841
|
+
};
|
|
1842
|
+
var removeFromArray = (arr, index) => {
|
|
1843
|
+
if ((0, import_types.isString)(index))
|
|
1844
|
+
index = parseInt(index);
|
|
1845
|
+
if ((0, import_types.isNumber)(index)) {
|
|
1846
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1847
|
+
throw new Error("Invalid index");
|
|
2008
1848
|
}
|
|
1849
|
+
arr.splice(index, 1);
|
|
1850
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
1851
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1852
|
+
} else {
|
|
1853
|
+
throw new Error("Invalid index");
|
|
2009
1854
|
}
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
let braceCount = 0;
|
|
2029
|
-
let foundKey = false;
|
|
2030
|
-
for (let i = 0; i < lines.length; i++) {
|
|
2031
|
-
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2032
|
-
foundKey = true;
|
|
2033
|
-
startLineNumber = i + 1;
|
|
2034
|
-
startColumn = lines[i].indexOf(key) + 1;
|
|
2035
|
-
if (lines[i].includes("{}")) {
|
|
2036
|
-
endLineNumber = startLineNumber;
|
|
2037
|
-
endColumn = lines[i].indexOf("{}") + 3;
|
|
2038
|
-
break;
|
|
1855
|
+
return arr;
|
|
1856
|
+
};
|
|
1857
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
1858
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1859
|
+
};
|
|
1860
|
+
var joinArrays = (...arrays) => {
|
|
1861
|
+
return [].concat(...arrays);
|
|
1862
|
+
};
|
|
1863
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
1864
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1865
|
+
};
|
|
1866
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
1867
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1868
|
+
};
|
|
1869
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
1870
|
+
const index = arr.indexOf(value);
|
|
1871
|
+
if (index !== -1) {
|
|
1872
|
+
return arr.slice(0, index);
|
|
2039
1873
|
}
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1874
|
+
return arr;
|
|
1875
|
+
};
|
|
1876
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
1877
|
+
if (!(0, import_types.isArray)(arr))
|
|
1878
|
+
return;
|
|
1879
|
+
const index = arr.indexOf(value);
|
|
1880
|
+
if (index !== -1) {
|
|
1881
|
+
return arr.slice(index + 1);
|
|
2047
1882
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
endLineNumber = i + 1;
|
|
2055
|
-
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2056
|
-
break;
|
|
1883
|
+
return arr;
|
|
1884
|
+
};
|
|
1885
|
+
var createNestedObject = (arr, lastValue) => {
|
|
1886
|
+
const nestedObject = {};
|
|
1887
|
+
if (arr.length === 0) {
|
|
1888
|
+
return lastValue;
|
|
2057
1889
|
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
startColumn,
|
|
2062
|
-
endColumn,
|
|
2063
|
-
startLineNumber,
|
|
2064
|
-
endLineNumber
|
|
2065
|
-
};
|
|
2066
|
-
};
|
|
2067
|
-
var replaceOctalEscapeSequences = (str) => {
|
|
2068
|
-
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2069
|
-
return str.replace(octalRegex, (match, p1) => {
|
|
2070
|
-
const octalValue = parseInt(p1, 8);
|
|
2071
|
-
const char = String.fromCharCode(octalValue);
|
|
2072
|
-
return char;
|
|
2073
|
-
});
|
|
2074
|
-
};
|
|
2075
|
-
var customEncodeURIComponent = (str) => {
|
|
2076
|
-
return str.split("").map((char) => {
|
|
2077
|
-
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2078
|
-
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2079
|
-
}
|
|
2080
|
-
return char;
|
|
2081
|
-
}).join("");
|
|
2082
|
-
};
|
|
2083
|
-
var customDecodeURIComponent = (encodedStr) => {
|
|
2084
|
-
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2085
|
-
};
|
|
2086
|
-
}
|
|
2087
|
-
});
|
|
2088
|
-
var require_object2 = __commonJS2({
|
|
2089
|
-
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2090
|
-
"use strict";
|
|
2091
|
-
var __defProp22 = Object.defineProperty;
|
|
2092
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2093
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2094
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2095
|
-
var __export22 = (target, all) => {
|
|
2096
|
-
for (var name in all)
|
|
2097
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2098
|
-
};
|
|
2099
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2100
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2101
|
-
for (let key of __getOwnPropNames22(from))
|
|
2102
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2103
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2104
|
-
}
|
|
2105
|
-
return to;
|
|
2106
|
-
};
|
|
2107
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2108
|
-
var object_exports = {};
|
|
2109
|
-
__export22(object_exports, {
|
|
2110
|
-
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2111
|
-
clone: () => clone,
|
|
2112
|
-
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2113
|
-
deepClone: () => deepClone2,
|
|
2114
|
-
deepCloneExclude: () => deepCloneExclude,
|
|
2115
|
-
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2116
|
-
deepContains: () => deepContains,
|
|
2117
|
-
deepDestringify: () => deepDestringify,
|
|
2118
|
-
deepDiff: () => deepDiff,
|
|
2119
|
-
deepMerge: () => deepMerge2,
|
|
2120
|
-
deepStringify: () => deepStringify,
|
|
2121
|
-
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2122
|
-
diff: () => diff,
|
|
2123
|
-
diffArrays: () => diffArrays,
|
|
2124
|
-
diffObjects: () => diffObjects,
|
|
2125
|
-
exec: () => exec,
|
|
2126
|
-
flattenRecursive: () => flattenRecursive,
|
|
2127
|
-
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2128
|
-
getExtendsInElement: () => getExtendsInElement,
|
|
2129
|
-
hasOwnProperty: () => hasOwnProperty,
|
|
2130
|
-
isEmpty: () => isEmpty,
|
|
2131
|
-
isEmptyObject: () => isEmptyObject,
|
|
2132
|
-
isEqualDeep: () => isEqualDeep,
|
|
2133
|
-
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2134
|
-
map: () => map,
|
|
2135
|
-
merge: () => merge,
|
|
2136
|
-
mergeArrayExclude: () => mergeArrayExclude,
|
|
2137
|
-
mergeIfExisted: () => mergeIfExisted,
|
|
2138
|
-
objectToString: () => objectToString,
|
|
2139
|
-
overwrite: () => overwrite,
|
|
2140
|
-
overwriteDeep: () => overwriteDeep,
|
|
2141
|
-
overwriteShallow: () => overwriteShallow,
|
|
2142
|
-
removeFromObject: () => removeFromObject,
|
|
2143
|
-
stringToObject: () => stringToObject
|
|
2144
|
-
});
|
|
2145
|
-
module2.exports = __toCommonJS22(object_exports);
|
|
2146
|
-
var import_globals = require_globals2();
|
|
2147
|
-
var import_types = require_types2();
|
|
2148
|
-
var import_array = require_array2();
|
|
2149
|
-
var import_string = require_string2();
|
|
2150
|
-
var exec = (param, element, state, context) => {
|
|
2151
|
-
if ((0, import_types.isFunction)(param)) {
|
|
2152
|
-
return param(
|
|
2153
|
-
element,
|
|
2154
|
-
state || element.state,
|
|
2155
|
-
context || element.context
|
|
2156
|
-
);
|
|
2157
|
-
}
|
|
2158
|
-
return param;
|
|
2159
|
-
};
|
|
2160
|
-
var map = (obj, extention, element) => {
|
|
2161
|
-
for (const e in extention) {
|
|
2162
|
-
obj[e] = exec(extention[e], element);
|
|
2163
|
-
}
|
|
2164
|
-
};
|
|
2165
|
-
var merge = (element, obj, excludeFrom = []) => {
|
|
2166
|
-
for (const e in obj) {
|
|
2167
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2168
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2169
|
-
continue;
|
|
2170
|
-
const elementProp = element[e];
|
|
2171
|
-
const objProp = obj[e];
|
|
2172
|
-
if (elementProp === void 0) {
|
|
2173
|
-
element[e] = objProp;
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
return element;
|
|
2177
|
-
};
|
|
2178
|
-
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2179
|
-
for (const e in extend) {
|
|
2180
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2181
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2182
|
-
continue;
|
|
2183
|
-
const elementProp = element[e];
|
|
2184
|
-
const extendProp = extend[e];
|
|
2185
|
-
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2186
|
-
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2187
|
-
} else if (elementProp === void 0) {
|
|
2188
|
-
element[e] = extendProp;
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
return element;
|
|
2192
|
-
};
|
|
2193
|
-
var clone = (obj, excludeFrom = []) => {
|
|
2194
|
-
const o = {};
|
|
2195
|
-
for (const prop in obj) {
|
|
2196
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2197
|
-
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2198
|
-
continue;
|
|
2199
|
-
o[prop] = obj[prop];
|
|
2200
|
-
}
|
|
2201
|
-
return o;
|
|
2202
|
-
};
|
|
2203
|
-
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2204
|
-
if ((0, import_types.isArray)(obj)) {
|
|
2205
|
-
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2206
|
-
}
|
|
2207
|
-
const o = {};
|
|
2208
|
-
for (const k in obj) {
|
|
2209
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2210
|
-
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2211
|
-
continue;
|
|
2212
|
-
let v = obj[k];
|
|
2213
|
-
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2214
|
-
v = mergeArrayExclude(v, excludeFrom);
|
|
2215
|
-
}
|
|
2216
|
-
if ((0, import_types.isArray)(v)) {
|
|
2217
|
-
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2218
|
-
} else if ((0, import_types.isObject)(v)) {
|
|
2219
|
-
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2220
|
-
} else
|
|
2221
|
-
o[k] = v;
|
|
2222
|
-
}
|
|
2223
|
-
return o;
|
|
2224
|
-
};
|
|
2225
|
-
var mergeArrayExclude = (arr, excl = []) => {
|
|
2226
|
-
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2227
|
-
};
|
|
2228
|
-
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2229
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2230
|
-
for (const prop in obj) {
|
|
2231
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2232
|
-
continue;
|
|
2233
|
-
if (prop === "__proto__")
|
|
2234
|
-
continue;
|
|
2235
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2236
|
-
continue;
|
|
2237
|
-
let objProp = obj[prop];
|
|
2238
|
-
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2239
|
-
continue;
|
|
2240
|
-
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2241
|
-
objProp = (0, import_array.mergeArray)(objProp);
|
|
2242
|
-
}
|
|
2243
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2244
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2245
|
-
} else
|
|
2246
|
-
o[prop] = objProp;
|
|
2247
|
-
}
|
|
2248
|
-
return o;
|
|
2249
|
-
};
|
|
2250
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2251
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2252
|
-
for (const prop in obj) {
|
|
2253
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2254
|
-
continue;
|
|
2255
|
-
const objProp = obj[prop];
|
|
2256
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2257
|
-
continue;
|
|
2258
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2259
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2260
|
-
} else
|
|
2261
|
-
o[prop] = objProp;
|
|
2262
|
-
}
|
|
2263
|
-
return o;
|
|
2264
|
-
};
|
|
2265
|
-
var deepStringify = (obj, stringified = {}) => {
|
|
2266
|
-
for (const prop in obj) {
|
|
2267
|
-
const objProp = obj[prop];
|
|
2268
|
-
if ((0, import_types.isFunction)(objProp)) {
|
|
2269
|
-
stringified[prop] = objProp.toString();
|
|
2270
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2271
|
-
stringified[prop] = {};
|
|
2272
|
-
deepStringify(objProp, stringified[prop]);
|
|
2273
|
-
} else if ((0, import_types.isArray)(objProp)) {
|
|
2274
|
-
stringified[prop] = [];
|
|
2275
|
-
objProp.forEach((v, i) => {
|
|
2276
|
-
if ((0, import_types.isObject)(v)) {
|
|
2277
|
-
stringified[prop][i] = {};
|
|
2278
|
-
deepStringify(v, stringified[prop][i]);
|
|
2279
|
-
} else if ((0, import_types.isFunction)(v)) {
|
|
2280
|
-
stringified[prop][i] = v.toString();
|
|
2281
|
-
} else {
|
|
2282
|
-
stringified[prop][i] = v;
|
|
1890
|
+
arr.reduce((obj, value, index) => {
|
|
1891
|
+
if (!obj[value]) {
|
|
1892
|
+
obj[value] = {};
|
|
2283
1893
|
}
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
stringified[prop] = objProp;
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
return stringified;
|
|
2290
|
-
};
|
|
2291
|
-
var objectToString = (obj = {}, indent = 0) => {
|
|
2292
|
-
const spaces = " ".repeat(indent);
|
|
2293
|
-
let str = "{\n";
|
|
2294
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
2295
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2296
|
-
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2297
|
-
str += `${spaces} ${stringedKey}: `;
|
|
2298
|
-
if ((0, import_types.isArray)(value)) {
|
|
2299
|
-
str += "[\n";
|
|
2300
|
-
for (const element of value) {
|
|
2301
|
-
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2302
|
-
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2303
|
-
`;
|
|
2304
|
-
} else if ((0, import_types.isString)(element)) {
|
|
2305
|
-
str += `${spaces} '${element}',
|
|
2306
|
-
`;
|
|
2307
|
-
} else {
|
|
2308
|
-
str += `${spaces} ${element},
|
|
2309
|
-
`;
|
|
1894
|
+
if (index === arr.length - 1 && lastValue) {
|
|
1895
|
+
obj[value] = lastValue;
|
|
2310
1896
|
}
|
|
1897
|
+
return obj[value];
|
|
1898
|
+
}, nestedObject);
|
|
1899
|
+
return nestedObject;
|
|
1900
|
+
};
|
|
1901
|
+
var removeValueFromArray = (arr, value) => {
|
|
1902
|
+
const index = arr.indexOf(value);
|
|
1903
|
+
if (index > -1) {
|
|
1904
|
+
const newArray = [...arr];
|
|
1905
|
+
newArray.splice(index, 1);
|
|
1906
|
+
return newArray;
|
|
2311
1907
|
}
|
|
2312
|
-
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
1908
|
+
return arr;
|
|
1909
|
+
};
|
|
1910
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
1911
|
+
return arr.filter((item) => item !== value);
|
|
1912
|
+
};
|
|
1913
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
1914
|
+
const result = [];
|
|
1915
|
+
for (let i = 0; i < array.length; i++) {
|
|
1916
|
+
result.push(array[i]);
|
|
1917
|
+
if (i < array.length - 1) {
|
|
1918
|
+
result.push(item);
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
return result;
|
|
1922
|
+
};
|
|
1923
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1924
|
+
const newArray = [...array];
|
|
1925
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
1926
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1927
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1928
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1929
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1930
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
1931
|
+
}
|
|
1932
|
+
return newArray;
|
|
1933
|
+
};
|
|
1934
|
+
var arraysEqual = (arr1, arr2) => {
|
|
1935
|
+
if (arr1.length !== arr2.length) {
|
|
1936
|
+
return false;
|
|
1937
|
+
}
|
|
1938
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
1939
|
+
if (arr1[i] !== arr2[i]) {
|
|
1940
|
+
return false;
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
return true;
|
|
1944
|
+
};
|
|
2321
1945
|
}
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
}
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
1946
|
+
});
|
|
1947
|
+
var require_string2 = __commonJS2({
|
|
1948
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports2, module22) {
|
|
1949
|
+
"use strict";
|
|
1950
|
+
var __defProp22 = Object.defineProperty;
|
|
1951
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1952
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1953
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1954
|
+
var __export22 = (target, all) => {
|
|
1955
|
+
for (var name in all)
|
|
1956
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1957
|
+
};
|
|
1958
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1959
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1960
|
+
for (let key of __getOwnPropNames22(from))
|
|
1961
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1962
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1963
|
+
}
|
|
1964
|
+
return to;
|
|
1965
|
+
};
|
|
1966
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1967
|
+
var string_exports = {};
|
|
1968
|
+
__export22(string_exports, {
|
|
1969
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
1970
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
1971
|
+
findKeyPosition: () => findKeyPosition,
|
|
1972
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
1973
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
1974
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
1975
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
1976
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
1977
|
+
});
|
|
1978
|
+
module22.exports = __toCommonJS22(string_exports);
|
|
1979
|
+
var stringIncludesAny = (str, characters) => {
|
|
1980
|
+
for (const char of characters) {
|
|
1981
|
+
if (str.includes(char)) {
|
|
1982
|
+
return true;
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
return false;
|
|
1986
|
+
};
|
|
1987
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
1988
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
1989
|
+
return str.replace(pattern, "");
|
|
1990
|
+
};
|
|
1991
|
+
var brackRegex = {
|
|
1992
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
1993
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
1994
|
+
};
|
|
1995
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
1996
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
1997
|
+
return str;
|
|
1998
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
1999
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2000
|
+
if (parentPath) {
|
|
2001
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2002
|
+
let parentState = state;
|
|
2003
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2004
|
+
parentState = parentState.parent;
|
|
2005
|
+
if (!parentState) {
|
|
2006
|
+
return "";
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
const value = parentState[variable.trim()];
|
|
2010
|
+
return value !== void 0 ? `${value}` : "";
|
|
2341
2011
|
} else {
|
|
2342
|
-
|
|
2012
|
+
const value = state[variable.trim()];
|
|
2013
|
+
return value !== void 0 ? `${value}` : "";
|
|
2014
|
+
}
|
|
2015
|
+
});
|
|
2016
|
+
};
|
|
2017
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2018
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2019
|
+
};
|
|
2020
|
+
var findKeyPosition = (str, key) => {
|
|
2021
|
+
const lines = str.split("\n");
|
|
2022
|
+
let startLineNumber = -1;
|
|
2023
|
+
let endLineNumber = -1;
|
|
2024
|
+
let startColumn = -1;
|
|
2025
|
+
let endColumn = -1;
|
|
2026
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2027
|
+
let braceCount = 0;
|
|
2028
|
+
let foundKey = false;
|
|
2029
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2030
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2031
|
+
foundKey = true;
|
|
2032
|
+
startLineNumber = i + 1;
|
|
2033
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2034
|
+
if (lines[i].includes("{}")) {
|
|
2035
|
+
endLineNumber = startLineNumber;
|
|
2036
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2037
|
+
break;
|
|
2038
|
+
}
|
|
2039
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2040
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2041
|
+
braceCount = 1;
|
|
2042
|
+
} else {
|
|
2043
|
+
endLineNumber = i + 1;
|
|
2044
|
+
endColumn = lines[i].length + 1;
|
|
2045
|
+
break;
|
|
2046
|
+
}
|
|
2047
|
+
} else if (foundKey) {
|
|
2048
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2049
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2050
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2051
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2052
|
+
if (braceCount === 0) {
|
|
2053
|
+
endLineNumber = i + 1;
|
|
2054
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2055
|
+
break;
|
|
2056
|
+
}
|
|
2343
2057
|
}
|
|
2058
|
+
}
|
|
2059
|
+
return {
|
|
2060
|
+
startColumn,
|
|
2061
|
+
endColumn,
|
|
2062
|
+
startLineNumber,
|
|
2063
|
+
endLineNumber
|
|
2064
|
+
};
|
|
2065
|
+
};
|
|
2066
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2067
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2068
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2069
|
+
const octalValue = parseInt(p1, 8);
|
|
2070
|
+
const char = String.fromCharCode(octalValue);
|
|
2071
|
+
return char;
|
|
2344
2072
|
});
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
|
|
2073
|
+
};
|
|
2074
|
+
var customEncodeURIComponent = (str) => {
|
|
2075
|
+
return str.split("").map((char) => {
|
|
2076
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2077
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2078
|
+
}
|
|
2079
|
+
return char;
|
|
2080
|
+
}).join("");
|
|
2081
|
+
};
|
|
2082
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2083
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2084
|
+
};
|
|
2348
2085
|
}
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2086
|
+
});
|
|
2087
|
+
var require_object2 = __commonJS2({
|
|
2088
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports2, module22) {
|
|
2089
|
+
"use strict";
|
|
2090
|
+
var __defProp22 = Object.defineProperty;
|
|
2091
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2092
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2093
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2094
|
+
var __export22 = (target, all) => {
|
|
2095
|
+
for (var name in all)
|
|
2096
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2097
|
+
};
|
|
2098
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2099
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2100
|
+
for (let key of __getOwnPropNames22(from))
|
|
2101
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2102
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2103
|
+
}
|
|
2104
|
+
return to;
|
|
2105
|
+
};
|
|
2106
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2107
|
+
var object_exports = {};
|
|
2108
|
+
__export22(object_exports, {
|
|
2109
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2110
|
+
clone: () => clone,
|
|
2111
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2112
|
+
deepClone: () => deepClone2,
|
|
2113
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2114
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2115
|
+
deepContains: () => deepContains,
|
|
2116
|
+
deepDestringify: () => deepDestringify,
|
|
2117
|
+
deepDiff: () => deepDiff,
|
|
2118
|
+
deepMerge: () => deepMerge2,
|
|
2119
|
+
deepStringify: () => deepStringify,
|
|
2120
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2121
|
+
diff: () => diff,
|
|
2122
|
+
diffArrays: () => diffArrays,
|
|
2123
|
+
diffObjects: () => diffObjects,
|
|
2124
|
+
exec: () => exec,
|
|
2125
|
+
flattenRecursive: () => flattenRecursive,
|
|
2126
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2127
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2128
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2129
|
+
isEmpty: () => isEmpty,
|
|
2130
|
+
isEmptyObject: () => isEmptyObject,
|
|
2131
|
+
isEqualDeep: () => isEqualDeep,
|
|
2132
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2133
|
+
map: () => map,
|
|
2134
|
+
merge: () => merge,
|
|
2135
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2136
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2137
|
+
objectToString: () => objectToString,
|
|
2138
|
+
overwrite: () => overwrite,
|
|
2139
|
+
overwriteDeep: () => overwriteDeep,
|
|
2140
|
+
overwriteShallow: () => overwriteShallow,
|
|
2141
|
+
removeFromObject: () => removeFromObject,
|
|
2142
|
+
stringToObject: () => stringToObject
|
|
2143
|
+
});
|
|
2144
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
2145
|
+
var import_globals = require_globals2();
|
|
2146
|
+
var import_types = require_types2();
|
|
2147
|
+
var import_array = require_array2();
|
|
2148
|
+
var import_string = require_string2();
|
|
2149
|
+
var exec = (param, element, state, context) => {
|
|
2150
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2151
|
+
return param(
|
|
2152
|
+
element,
|
|
2153
|
+
state || element.state,
|
|
2154
|
+
context || element.context
|
|
2155
|
+
);
|
|
2156
|
+
}
|
|
2157
|
+
return param;
|
|
2158
|
+
};
|
|
2159
|
+
var map = (obj, extention, element) => {
|
|
2160
|
+
for (const e in extention) {
|
|
2161
|
+
obj[e] = exec(extention[e], element);
|
|
2162
|
+
}
|
|
2163
|
+
};
|
|
2164
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
2165
|
+
for (const e in obj) {
|
|
2166
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2167
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2168
|
+
continue;
|
|
2169
|
+
const elementProp = element[e];
|
|
2170
|
+
const objProp = obj[e];
|
|
2171
|
+
if (elementProp === void 0) {
|
|
2172
|
+
element[e] = objProp;
|
|
2365
2173
|
}
|
|
2366
|
-
} else {
|
|
2367
|
-
destringified[prop] = objProp;
|
|
2368
2174
|
}
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2175
|
+
return element;
|
|
2176
|
+
};
|
|
2177
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2178
|
+
for (const e in extend) {
|
|
2179
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2180
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2181
|
+
continue;
|
|
2182
|
+
const elementProp = element[e];
|
|
2183
|
+
const extendProp = extend[e];
|
|
2184
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2185
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2186
|
+
} else if (elementProp === void 0) {
|
|
2187
|
+
element[e] = extendProp;
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
return element;
|
|
2191
|
+
};
|
|
2192
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2193
|
+
const o = {};
|
|
2194
|
+
for (const prop in obj) {
|
|
2195
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2196
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2197
|
+
continue;
|
|
2198
|
+
o[prop] = obj[prop];
|
|
2199
|
+
}
|
|
2200
|
+
return o;
|
|
2201
|
+
};
|
|
2202
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2203
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2204
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2205
|
+
}
|
|
2206
|
+
const o = {};
|
|
2207
|
+
for (const k in obj) {
|
|
2208
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2209
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2210
|
+
continue;
|
|
2211
|
+
let v = obj[k];
|
|
2212
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2213
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2214
|
+
}
|
|
2215
|
+
if ((0, import_types.isArray)(v)) {
|
|
2216
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2217
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2218
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2219
|
+
} else
|
|
2220
|
+
o[k] = v;
|
|
2221
|
+
}
|
|
2222
|
+
return o;
|
|
2223
|
+
};
|
|
2224
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2225
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2226
|
+
};
|
|
2227
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2228
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2229
|
+
for (const prop in obj) {
|
|
2230
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2231
|
+
continue;
|
|
2232
|
+
if (prop === "__proto__")
|
|
2233
|
+
continue;
|
|
2234
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2235
|
+
continue;
|
|
2236
|
+
let objProp = obj[prop];
|
|
2237
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2238
|
+
continue;
|
|
2239
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2240
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2241
|
+
}
|
|
2242
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2243
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2244
|
+
} else
|
|
2245
|
+
o[prop] = objProp;
|
|
2246
|
+
}
|
|
2247
|
+
return o;
|
|
2248
|
+
};
|
|
2249
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2250
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
2251
|
+
for (const prop in obj) {
|
|
2252
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2253
|
+
continue;
|
|
2254
|
+
const objProp = obj[prop];
|
|
2255
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2256
|
+
continue;
|
|
2257
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2258
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2259
|
+
} else
|
|
2260
|
+
o[prop] = objProp;
|
|
2261
|
+
}
|
|
2262
|
+
return o;
|
|
2263
|
+
};
|
|
2264
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2265
|
+
for (const prop in obj) {
|
|
2266
|
+
const objProp = obj[prop];
|
|
2267
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2268
|
+
stringified[prop] = objProp.toString();
|
|
2269
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2270
|
+
stringified[prop] = {};
|
|
2271
|
+
deepStringify(objProp, stringified[prop]);
|
|
2272
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2273
|
+
stringified[prop] = [];
|
|
2274
|
+
objProp.forEach((v, i) => {
|
|
2275
|
+
if ((0, import_types.isObject)(v)) {
|
|
2276
|
+
stringified[prop][i] = {};
|
|
2277
|
+
deepStringify(v, stringified[prop][i]);
|
|
2278
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2279
|
+
stringified[prop][i] = v.toString();
|
|
2280
|
+
} else {
|
|
2281
|
+
stringified[prop][i] = v;
|
|
2282
|
+
}
|
|
2283
|
+
});
|
|
2284
|
+
} else {
|
|
2285
|
+
stringified[prop] = objProp;
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
return stringified;
|
|
2289
|
+
};
|
|
2290
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2291
|
+
const spaces = " ".repeat(indent);
|
|
2292
|
+
let str = "{\n";
|
|
2293
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2294
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2295
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2296
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2297
|
+
if ((0, import_types.isArray)(value)) {
|
|
2298
|
+
str += "[\n";
|
|
2299
|
+
for (const element of value) {
|
|
2300
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2301
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2302
|
+
`;
|
|
2303
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2304
|
+
str += `${spaces} '${element}',
|
|
2305
|
+
`;
|
|
2306
|
+
} else {
|
|
2307
|
+
str += `${spaces} ${element},
|
|
2308
|
+
`;
|
|
2380
2309
|
}
|
|
2381
|
-
} else {
|
|
2382
|
-
destringified[prop].push(arrProp);
|
|
2383
2310
|
}
|
|
2384
|
-
|
|
2385
|
-
|
|
2311
|
+
str += `${spaces} ]`;
|
|
2312
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2313
|
+
str += objectToString(value, indent + 1);
|
|
2314
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2315
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2386
2316
|
} else {
|
|
2387
|
-
|
|
2317
|
+
str += value;
|
|
2388
2318
|
}
|
|
2389
|
-
|
|
2390
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2391
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2392
|
-
} else {
|
|
2393
|
-
destringified[prop] = objProp;
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
return destringified;
|
|
2397
|
-
};
|
|
2398
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2399
|
-
try {
|
|
2400
|
-
return import_globals.window.eval("(" + str + ")");
|
|
2401
|
-
} catch (e) {
|
|
2402
|
-
if (opts.verbose)
|
|
2403
|
-
console.warn(e);
|
|
2404
|
-
}
|
|
2405
|
-
};
|
|
2406
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2407
|
-
for (const e in objToDiff) {
|
|
2408
|
-
if (e === "ref")
|
|
2409
|
-
continue;
|
|
2410
|
-
const originalProp = original[e];
|
|
2411
|
-
const objToDiffProp = objToDiff[e];
|
|
2412
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2413
|
-
cache[e] = {};
|
|
2414
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2415
|
-
} else if (objToDiffProp !== void 0) {
|
|
2416
|
-
cache[e] = objToDiffProp;
|
|
2417
|
-
}
|
|
2418
|
-
}
|
|
2419
|
-
return cache;
|
|
2420
|
-
};
|
|
2421
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2422
|
-
if (original.length !== objToDiff.length) {
|
|
2423
|
-
cache = objToDiff;
|
|
2424
|
-
} else {
|
|
2425
|
-
const diffArr = [];
|
|
2426
|
-
for (let i = 0; i < original.length; i++) {
|
|
2427
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2428
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2429
|
-
diffArr.push(diffObj);
|
|
2319
|
+
str += ",\n";
|
|
2430
2320
|
}
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
return
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2321
|
+
str += `${spaces}}`;
|
|
2322
|
+
return str;
|
|
2323
|
+
};
|
|
2324
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2325
|
+
for (const prop in obj) {
|
|
2326
|
+
const objProp = obj[prop];
|
|
2327
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2328
|
+
continue;
|
|
2329
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2330
|
+
detached[prop] = {};
|
|
2331
|
+
deepStringify(objProp, detached[prop]);
|
|
2332
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2333
|
+
detached[prop] = [];
|
|
2334
|
+
objProp.forEach((v, i) => {
|
|
2335
|
+
if ((0, import_types.isFunction)(v))
|
|
2336
|
+
return;
|
|
2337
|
+
if ((0, import_types.isObject)(v)) {
|
|
2338
|
+
detached[prop][i] = {};
|
|
2339
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2340
|
+
} else {
|
|
2341
|
+
detached[prop][i] = v;
|
|
2342
|
+
}
|
|
2343
|
+
});
|
|
2344
|
+
} else {
|
|
2345
|
+
detached[prop] = objProp;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
return detached;
|
|
2349
|
+
};
|
|
2350
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2351
|
+
for (const prop in obj) {
|
|
2352
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2353
|
+
if (!hasOwnProperty2)
|
|
2354
|
+
continue;
|
|
2355
|
+
const objProp = obj[prop];
|
|
2356
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2357
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2358
|
+
try {
|
|
2359
|
+
const evalProp = import_globals.window.eval(`(${objProp})`);
|
|
2360
|
+
destringified[prop] = evalProp;
|
|
2361
|
+
} catch (e) {
|
|
2362
|
+
if (e)
|
|
2363
|
+
destringified[prop] = objProp;
|
|
2364
|
+
}
|
|
2365
|
+
} else {
|
|
2366
|
+
destringified[prop] = objProp;
|
|
2367
|
+
}
|
|
2368
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2369
|
+
destringified[prop] = [];
|
|
2370
|
+
objProp.forEach((arrProp) => {
|
|
2371
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2372
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2373
|
+
try {
|
|
2374
|
+
const evalProp = import_globals.window.eval(`(${arrProp})`);
|
|
2375
|
+
destringified[prop].push(evalProp);
|
|
2376
|
+
} catch (e) {
|
|
2377
|
+
if (e)
|
|
2378
|
+
destringified[prop].push(arrProp);
|
|
2379
|
+
}
|
|
2380
|
+
} else {
|
|
2381
|
+
destringified[prop].push(arrProp);
|
|
2382
|
+
}
|
|
2383
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2384
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2385
|
+
} else {
|
|
2386
|
+
destringified[prop].push(arrProp);
|
|
2387
|
+
}
|
|
2388
|
+
});
|
|
2389
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2390
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2391
|
+
} else {
|
|
2392
|
+
destringified[prop] = objProp;
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
return destringified;
|
|
2396
|
+
};
|
|
2397
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2398
|
+
try {
|
|
2399
|
+
return import_globals.window.eval("(" + str + ")");
|
|
2400
|
+
} catch (e) {
|
|
2401
|
+
if (opts.verbose)
|
|
2402
|
+
console.warn(e);
|
|
2403
|
+
}
|
|
2404
|
+
};
|
|
2405
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2406
|
+
for (const e in objToDiff) {
|
|
2407
|
+
if (e === "ref")
|
|
2408
|
+
continue;
|
|
2409
|
+
const originalProp = original[e];
|
|
2410
|
+
const objToDiffProp = objToDiff[e];
|
|
2411
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2412
|
+
cache[e] = {};
|
|
2413
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2414
|
+
} else if (objToDiffProp !== void 0) {
|
|
2415
|
+
cache[e] = objToDiffProp;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
return cache;
|
|
2419
|
+
};
|
|
2420
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2421
|
+
if (original.length !== objToDiff.length) {
|
|
2422
|
+
cache = objToDiff;
|
|
2423
|
+
} else {
|
|
2424
|
+
const diffArr = [];
|
|
2425
|
+
for (let i = 0; i < original.length; i++) {
|
|
2426
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2427
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2428
|
+
diffArr.push(diffObj);
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
if (diffArr.length > 0) {
|
|
2432
|
+
cache = diffArr;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
return cache;
|
|
2436
|
+
};
|
|
2437
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2438
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2439
|
+
cache = [];
|
|
2440
|
+
diffArrays(original, objToDiff, cache);
|
|
2441
|
+
} else {
|
|
2442
|
+
diffObjects(original, objToDiff, cache);
|
|
2443
|
+
}
|
|
2444
|
+
return cache;
|
|
2445
|
+
};
|
|
2446
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2447
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2448
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2449
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2450
|
+
var deepDiff = (lhs, rhs) => {
|
|
2451
|
+
if (lhs === rhs)
|
|
2452
|
+
return {};
|
|
2453
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2454
|
+
return rhs;
|
|
2455
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2456
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2457
|
+
acc[key] = void 0;
|
|
2458
|
+
}
|
|
2459
|
+
return acc;
|
|
2460
|
+
}, makeObjectWithoutPrototype());
|
|
2461
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2462
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2463
|
+
return {};
|
|
2464
|
+
return rhs;
|
|
2465
|
+
}
|
|
2466
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2467
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2468
|
+
acc[key] = rhs[key];
|
|
2469
|
+
return acc;
|
|
2470
|
+
}
|
|
2471
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2472
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2473
|
+
return acc;
|
|
2474
|
+
}
|
|
2475
|
+
acc[key] = difference;
|
|
2476
|
+
return acc;
|
|
2477
|
+
}, deletedValues);
|
|
2478
|
+
};
|
|
2479
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2480
|
+
const { ref } = element;
|
|
2481
|
+
const changes = {};
|
|
2482
|
+
for (const e in params) {
|
|
2483
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2484
|
+
continue;
|
|
2485
|
+
const elementProp = element[e];
|
|
2486
|
+
const paramsProp = params[e];
|
|
2487
|
+
if (paramsProp) {
|
|
2488
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2489
|
+
ref[e] = paramsProp;
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
return changes;
|
|
2493
|
+
};
|
|
2494
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2495
|
+
for (const e in params) {
|
|
2496
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2497
|
+
continue;
|
|
2498
|
+
obj[e] = params[e];
|
|
2499
|
+
}
|
|
2500
|
+
return obj;
|
|
2501
|
+
};
|
|
2502
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2503
|
+
for (const e in params) {
|
|
2504
|
+
if (e === "__proto__")
|
|
2505
|
+
continue;
|
|
2506
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2507
|
+
continue;
|
|
2508
|
+
const objProp = obj[e];
|
|
2509
|
+
const paramsProp = params[e];
|
|
2510
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2511
|
+
overwriteDeep(objProp, paramsProp);
|
|
2512
|
+
} else if (paramsProp !== void 0) {
|
|
2513
|
+
obj[e] = paramsProp;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
return obj;
|
|
2517
|
+
};
|
|
2518
|
+
var mergeIfExisted = (a, b) => {
|
|
2519
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2520
|
+
return deepMerge2(a, b);
|
|
2521
|
+
return a || b;
|
|
2522
|
+
};
|
|
2523
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2524
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2525
|
+
stack.push(objectized);
|
|
2526
|
+
const extendOfExtend = objectized[prop];
|
|
2527
|
+
if (extendOfExtend)
|
|
2528
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2529
|
+
delete objectized[prop];
|
|
2530
|
+
return stack;
|
|
2531
|
+
};
|
|
2532
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2533
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2534
|
+
return param === element;
|
|
2535
|
+
}
|
|
2536
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2537
|
+
return true;
|
|
2538
|
+
}
|
|
2539
|
+
visited.add(param);
|
|
2540
|
+
visited.add(element);
|
|
2541
|
+
const keysParam = Object.keys(param);
|
|
2542
|
+
const keysElement = Object.keys(element);
|
|
2543
|
+
if (keysParam.length !== keysElement.length) {
|
|
2566
2544
|
return false;
|
|
2567
2545
|
}
|
|
2568
|
-
for (
|
|
2569
|
-
if (!
|
|
2546
|
+
for (const key of keysParam) {
|
|
2547
|
+
if (!keysElement.includes(key)) {
|
|
2570
2548
|
return false;
|
|
2571
2549
|
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2576
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2550
|
+
const paramProp = param[key];
|
|
2551
|
+
const elementProp = element[key];
|
|
2552
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2577
2553
|
return false;
|
|
2578
2554
|
}
|
|
2579
2555
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2603
|
-
for (const key in obj) {
|
|
2604
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2605
|
-
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2606
|
-
}
|
|
2607
|
-
}
|
|
2608
|
-
return newObj;
|
|
2609
|
-
};
|
|
2610
|
-
var checkIfKeyIsComponent = (key) => {
|
|
2611
|
-
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2612
|
-
if (!isFirstKeyString)
|
|
2613
|
-
return;
|
|
2614
|
-
const firstCharKey = key.slice(0, 1);
|
|
2615
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
2616
|
-
};
|
|
2617
|
-
var getChildrenComponentsByKey = (key, el) => {
|
|
2618
|
-
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2619
|
-
return el;
|
|
2620
|
-
}
|
|
2621
|
-
if (el.extend) {
|
|
2622
|
-
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2623
|
-
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2624
|
-
if (foundString || foundInArray)
|
|
2625
|
-
return el;
|
|
2626
|
-
}
|
|
2627
|
-
};
|
|
2628
|
-
var getExtendsInElement = (obj) => {
|
|
2629
|
-
let result = [];
|
|
2630
|
-
function traverse(o) {
|
|
2631
|
-
for (const key in o) {
|
|
2632
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
2633
|
-
if (checkIfKeyIsComponent(key)) {
|
|
2634
|
-
result.push(key);
|
|
2635
|
-
}
|
|
2636
|
-
if (key === "extend") {
|
|
2637
|
-
if (typeof o[key] === "string") {
|
|
2638
|
-
result.push(o[key]);
|
|
2639
|
-
} else if (Array.isArray(o[key])) {
|
|
2640
|
-
result = result.concat(o[key]);
|
|
2556
|
+
return true;
|
|
2557
|
+
};
|
|
2558
|
+
var deepContains = (obj1, obj2) => {
|
|
2559
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2560
|
+
return false;
|
|
2561
|
+
}
|
|
2562
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2563
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2564
|
+
if (obj1.length !== obj2.length) {
|
|
2565
|
+
return false;
|
|
2566
|
+
}
|
|
2567
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2568
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2569
|
+
return false;
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2573
|
+
for (const key in obj1) {
|
|
2574
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2575
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2576
|
+
return false;
|
|
2577
|
+
}
|
|
2641
2578
|
}
|
|
2642
2579
|
}
|
|
2643
|
-
|
|
2644
|
-
|
|
2580
|
+
} else {
|
|
2581
|
+
return obj2 === obj1;
|
|
2582
|
+
}
|
|
2583
|
+
return true;
|
|
2584
|
+
};
|
|
2585
|
+
var removeFromObject = (obj, props) => {
|
|
2586
|
+
if (props === void 0 || props === null)
|
|
2587
|
+
return obj;
|
|
2588
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2589
|
+
delete obj[props];
|
|
2590
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2591
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2592
|
+
} else {
|
|
2593
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2594
|
+
}
|
|
2595
|
+
return obj;
|
|
2596
|
+
};
|
|
2597
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2598
|
+
if (obj === null || typeof obj !== "object") {
|
|
2599
|
+
return obj;
|
|
2600
|
+
}
|
|
2601
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2602
|
+
for (const key in obj) {
|
|
2603
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2604
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
return newObj;
|
|
2608
|
+
};
|
|
2609
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2610
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2611
|
+
if (!isFirstKeyString)
|
|
2612
|
+
return;
|
|
2613
|
+
const firstCharKey = key.slice(0, 1);
|
|
2614
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2615
|
+
};
|
|
2616
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2617
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2618
|
+
return el;
|
|
2619
|
+
}
|
|
2620
|
+
if (el.extend) {
|
|
2621
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2622
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2623
|
+
if (foundString || foundInArray)
|
|
2624
|
+
return el;
|
|
2625
|
+
}
|
|
2626
|
+
if (el.parent && el.parent.childExtend) {
|
|
2627
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
2628
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
2629
|
+
if (foundString || foundInArray)
|
|
2630
|
+
return el;
|
|
2631
|
+
}
|
|
2632
|
+
};
|
|
2633
|
+
var getExtendsInElement = (obj) => {
|
|
2634
|
+
let result = [];
|
|
2635
|
+
function traverse(o) {
|
|
2636
|
+
for (const key in o) {
|
|
2637
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2638
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2639
|
+
result.push(key);
|
|
2640
|
+
}
|
|
2641
|
+
if (key === "extend") {
|
|
2642
|
+
if (typeof o[key] === "string") {
|
|
2643
|
+
result.push(o[key]);
|
|
2644
|
+
} else if (Array.isArray(o[key])) {
|
|
2645
|
+
result = result.concat(o[key]);
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2649
|
+
traverse(o[key]);
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2645
2652
|
}
|
|
2646
2653
|
}
|
|
2654
|
+
traverse(obj);
|
|
2655
|
+
return result;
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
});
|
|
2659
|
+
var require_function2 = __commonJS2({
|
|
2660
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports2, module22) {
|
|
2661
|
+
"use strict";
|
|
2662
|
+
var __defProp22 = Object.defineProperty;
|
|
2663
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2664
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2665
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2666
|
+
var __export22 = (target, all) => {
|
|
2667
|
+
for (var name in all)
|
|
2668
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2669
|
+
};
|
|
2670
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2671
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2672
|
+
for (let key of __getOwnPropNames22(from))
|
|
2673
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2674
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2675
|
+
}
|
|
2676
|
+
return to;
|
|
2677
|
+
};
|
|
2678
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2679
|
+
var function_exports = {};
|
|
2680
|
+
__export22(function_exports, {
|
|
2681
|
+
debounce: () => debounce,
|
|
2682
|
+
debounceOnContext: () => debounceOnContext,
|
|
2683
|
+
isStringFunction: () => isStringFunction,
|
|
2684
|
+
memoize: () => memoize
|
|
2685
|
+
});
|
|
2686
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
2687
|
+
function debounce(func, wait, immediate) {
|
|
2688
|
+
let timeout;
|
|
2689
|
+
return function() {
|
|
2690
|
+
const context = this;
|
|
2691
|
+
const args = arguments;
|
|
2692
|
+
const later = function() {
|
|
2693
|
+
timeout = null;
|
|
2694
|
+
if (!immediate)
|
|
2695
|
+
func.apply(context, args);
|
|
2696
|
+
};
|
|
2697
|
+
const callNow = immediate && !timeout;
|
|
2698
|
+
clearTimeout(timeout);
|
|
2699
|
+
timeout = setTimeout(later, wait);
|
|
2700
|
+
if (callNow)
|
|
2701
|
+
func.apply(context, args);
|
|
2702
|
+
};
|
|
2647
2703
|
}
|
|
2704
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2705
|
+
let timer;
|
|
2706
|
+
return (...args) => {
|
|
2707
|
+
clearTimeout(timer);
|
|
2708
|
+
timer = setTimeout(() => {
|
|
2709
|
+
func.apply(element, args);
|
|
2710
|
+
}, timeout);
|
|
2711
|
+
};
|
|
2712
|
+
};
|
|
2713
|
+
var memoize = (fn) => {
|
|
2714
|
+
const cache = {};
|
|
2715
|
+
return (...args) => {
|
|
2716
|
+
const n = args[0];
|
|
2717
|
+
if (n in cache) {
|
|
2718
|
+
return cache[n];
|
|
2719
|
+
} else {
|
|
2720
|
+
const result = fn(n);
|
|
2721
|
+
cache[n] = result;
|
|
2722
|
+
return result;
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
};
|
|
2726
|
+
var isStringFunction = (inputString) => {
|
|
2727
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2728
|
+
return functionRegex.test(inputString);
|
|
2729
|
+
};
|
|
2648
2730
|
}
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
var
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2731
|
+
});
|
|
2732
|
+
var require_log2 = __commonJS2({
|
|
2733
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports2, module22) {
|
|
2734
|
+
"use strict";
|
|
2735
|
+
var __defProp22 = Object.defineProperty;
|
|
2736
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2737
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2738
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2739
|
+
var __export22 = (target, all) => {
|
|
2740
|
+
for (var name in all)
|
|
2741
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2742
|
+
};
|
|
2743
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2744
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2745
|
+
for (let key of __getOwnPropNames22(from))
|
|
2746
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2747
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2748
|
+
}
|
|
2749
|
+
return to;
|
|
2750
|
+
};
|
|
2751
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2752
|
+
var log_exports = {};
|
|
2753
|
+
__export22(log_exports, {
|
|
2754
|
+
logGroupIf: () => logGroupIf,
|
|
2755
|
+
logIf: () => logIf
|
|
2756
|
+
});
|
|
2757
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
2758
|
+
var logIf = (bool, ...arg) => {
|
|
2759
|
+
if (bool)
|
|
2760
|
+
arg.map((v) => console.log(v));
|
|
2761
|
+
};
|
|
2762
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
2763
|
+
if (bool) {
|
|
2764
|
+
console.group(key);
|
|
2765
|
+
arg.map((v) => console.log(v));
|
|
2766
|
+
console.groupEnd(key);
|
|
2767
|
+
}
|
|
2768
|
+
};
|
|
2670
2769
|
}
|
|
2671
|
-
return to;
|
|
2672
|
-
};
|
|
2673
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2674
|
-
var function_exports = {};
|
|
2675
|
-
__export22(function_exports, {
|
|
2676
|
-
debounce: () => debounce,
|
|
2677
|
-
debounceOnContext: () => debounceOnContext,
|
|
2678
|
-
isStringFunction: () => isStringFunction,
|
|
2679
|
-
memoize: () => memoize
|
|
2680
2770
|
});
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2771
|
+
var require_cookie2 = __commonJS2({
|
|
2772
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports2, module22) {
|
|
2773
|
+
"use strict";
|
|
2774
|
+
var __defProp22 = Object.defineProperty;
|
|
2775
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2776
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2777
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2778
|
+
var __export22 = (target, all) => {
|
|
2779
|
+
for (var name in all)
|
|
2780
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2781
|
+
};
|
|
2782
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2783
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2784
|
+
for (let key of __getOwnPropNames22(from))
|
|
2785
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2786
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2787
|
+
}
|
|
2788
|
+
return to;
|
|
2789
|
+
};
|
|
2790
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2791
|
+
var cookie_exports = {};
|
|
2792
|
+
__export22(cookie_exports, {
|
|
2793
|
+
getCookie: () => getCookie,
|
|
2794
|
+
isMobile: () => isMobile,
|
|
2795
|
+
setCookie: () => setCookie
|
|
2796
|
+
});
|
|
2797
|
+
module22.exports = __toCommonJS22(cookie_exports);
|
|
2798
|
+
var import_types = require_types2();
|
|
2799
|
+
var import_utils32 = require_cjs3();
|
|
2800
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2801
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2802
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2803
|
+
return;
|
|
2804
|
+
const d = /* @__PURE__ */ new Date();
|
|
2805
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2806
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
2807
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2808
|
+
};
|
|
2809
|
+
var getCookie = (cname) => {
|
|
2810
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2811
|
+
return;
|
|
2812
|
+
const name = `${cname}=`;
|
|
2813
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2814
|
+
const ca = decodedCookie.split(";");
|
|
2815
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2816
|
+
let c = ca[i];
|
|
2817
|
+
while (c.charAt(0) === " ")
|
|
2818
|
+
c = c.substring(1);
|
|
2819
|
+
if (c.indexOf(name) === 0)
|
|
2820
|
+
return c.substring(name.length, c.length);
|
|
2821
|
+
}
|
|
2822
|
+
return "";
|
|
2691
2823
|
};
|
|
2692
|
-
const callNow = immediate && !timeout;
|
|
2693
|
-
clearTimeout(timeout);
|
|
2694
|
-
timeout = setTimeout(later, wait);
|
|
2695
|
-
if (callNow)
|
|
2696
|
-
func.apply(context, args);
|
|
2697
|
-
};
|
|
2698
|
-
}
|
|
2699
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2700
|
-
let timer;
|
|
2701
|
-
return (...args) => {
|
|
2702
|
-
clearTimeout(timer);
|
|
2703
|
-
timer = setTimeout(() => {
|
|
2704
|
-
func.apply(element, args);
|
|
2705
|
-
}, timeout);
|
|
2706
|
-
};
|
|
2707
|
-
};
|
|
2708
|
-
var memoize = (fn) => {
|
|
2709
|
-
const cache = {};
|
|
2710
|
-
return (...args) => {
|
|
2711
|
-
const n = args[0];
|
|
2712
|
-
if (n in cache) {
|
|
2713
|
-
return cache[n];
|
|
2714
|
-
} else {
|
|
2715
|
-
const result = fn(n);
|
|
2716
|
-
cache[n] = result;
|
|
2717
|
-
return result;
|
|
2718
|
-
}
|
|
2719
|
-
};
|
|
2720
|
-
};
|
|
2721
|
-
var isStringFunction = (inputString) => {
|
|
2722
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2723
|
-
return functionRegex.test(inputString);
|
|
2724
|
-
};
|
|
2725
|
-
}
|
|
2726
|
-
});
|
|
2727
|
-
var require_log2 = __commonJS2({
|
|
2728
|
-
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
2729
|
-
"use strict";
|
|
2730
|
-
var __defProp22 = Object.defineProperty;
|
|
2731
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2732
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2733
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2734
|
-
var __export22 = (target, all) => {
|
|
2735
|
-
for (var name in all)
|
|
2736
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2737
|
-
};
|
|
2738
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2739
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2740
|
-
for (let key of __getOwnPropNames22(from))
|
|
2741
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2742
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2743
2824
|
}
|
|
2744
|
-
return to;
|
|
2745
|
-
};
|
|
2746
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2747
|
-
var log_exports = {};
|
|
2748
|
-
__export22(log_exports, {
|
|
2749
|
-
logGroupIf: () => logGroupIf,
|
|
2750
|
-
logIf: () => logIf
|
|
2751
2825
|
});
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2826
|
+
var require_tags2 = __commonJS2({
|
|
2827
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports2, module22) {
|
|
2828
|
+
"use strict";
|
|
2829
|
+
var __defProp22 = Object.defineProperty;
|
|
2830
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2831
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2832
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2833
|
+
var __export22 = (target, all) => {
|
|
2834
|
+
for (var name in all)
|
|
2835
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2836
|
+
};
|
|
2837
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2838
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2839
|
+
for (let key of __getOwnPropNames22(from))
|
|
2840
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2841
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2842
|
+
}
|
|
2843
|
+
return to;
|
|
2844
|
+
};
|
|
2845
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2846
|
+
var tags_exports = {};
|
|
2847
|
+
__export22(tags_exports, {
|
|
2848
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
2849
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
2850
|
+
});
|
|
2851
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
2852
|
+
var HTML_TAGS = {
|
|
2853
|
+
root: [
|
|
2854
|
+
"body",
|
|
2855
|
+
"html"
|
|
2856
|
+
],
|
|
2857
|
+
head: [
|
|
2858
|
+
"title",
|
|
2859
|
+
"base",
|
|
2860
|
+
"meta",
|
|
2861
|
+
"style"
|
|
2862
|
+
],
|
|
2863
|
+
body: [
|
|
2864
|
+
"string",
|
|
2865
|
+
"fragment",
|
|
2866
|
+
"a",
|
|
2867
|
+
"abbr",
|
|
2868
|
+
"acronym",
|
|
2869
|
+
"address",
|
|
2870
|
+
"applet",
|
|
2871
|
+
"area",
|
|
2872
|
+
"article",
|
|
2873
|
+
"aside",
|
|
2874
|
+
"audio",
|
|
2875
|
+
"b",
|
|
2876
|
+
"basefont",
|
|
2877
|
+
"bdi",
|
|
2878
|
+
"bdo",
|
|
2879
|
+
"big",
|
|
2880
|
+
"blockquote",
|
|
2881
|
+
"br",
|
|
2882
|
+
"button",
|
|
2883
|
+
"canvas",
|
|
2884
|
+
"caption",
|
|
2885
|
+
"center",
|
|
2886
|
+
"cite",
|
|
2887
|
+
"code",
|
|
2888
|
+
"search",
|
|
2889
|
+
"col",
|
|
2890
|
+
"colgroup",
|
|
2891
|
+
"data",
|
|
2892
|
+
"datalist",
|
|
2893
|
+
"dd",
|
|
2894
|
+
"del",
|
|
2895
|
+
"details",
|
|
2896
|
+
"dfn",
|
|
2897
|
+
"dialog",
|
|
2898
|
+
"dir",
|
|
2899
|
+
"div",
|
|
2900
|
+
"dl",
|
|
2901
|
+
"dt",
|
|
2902
|
+
"em",
|
|
2903
|
+
"embed",
|
|
2904
|
+
"fieldset",
|
|
2905
|
+
"figcaption",
|
|
2906
|
+
"figure",
|
|
2907
|
+
"font",
|
|
2908
|
+
"footer",
|
|
2909
|
+
"form",
|
|
2910
|
+
"frame",
|
|
2911
|
+
"frameset",
|
|
2912
|
+
"h1",
|
|
2913
|
+
"h2",
|
|
2914
|
+
"h3",
|
|
2915
|
+
"h4",
|
|
2916
|
+
"h5",
|
|
2917
|
+
"h6",
|
|
2918
|
+
"head",
|
|
2919
|
+
"header",
|
|
2920
|
+
"hr",
|
|
2921
|
+
"i",
|
|
2922
|
+
"iframe",
|
|
2923
|
+
"img",
|
|
2924
|
+
"input",
|
|
2925
|
+
"ins",
|
|
2926
|
+
"kbd",
|
|
2927
|
+
"label",
|
|
2928
|
+
"legend",
|
|
2929
|
+
"li",
|
|
2930
|
+
"link",
|
|
2931
|
+
"main",
|
|
2932
|
+
"map",
|
|
2933
|
+
"mark",
|
|
2934
|
+
"meter",
|
|
2935
|
+
"nav",
|
|
2936
|
+
"noframes",
|
|
2937
|
+
"noscript",
|
|
2938
|
+
"object",
|
|
2939
|
+
"ol",
|
|
2940
|
+
"optgroup",
|
|
2941
|
+
"option",
|
|
2942
|
+
"output",
|
|
2943
|
+
"p",
|
|
2944
|
+
"param",
|
|
2945
|
+
"picture",
|
|
2946
|
+
"pre",
|
|
2947
|
+
"progress",
|
|
2948
|
+
"hgroup",
|
|
2949
|
+
"q",
|
|
2950
|
+
"rp",
|
|
2951
|
+
"rt",
|
|
2952
|
+
"ruby",
|
|
2953
|
+
"s",
|
|
2954
|
+
"samp",
|
|
2955
|
+
"script",
|
|
2956
|
+
"section",
|
|
2957
|
+
"select",
|
|
2958
|
+
"small",
|
|
2959
|
+
"source",
|
|
2960
|
+
"span",
|
|
2961
|
+
"strike",
|
|
2962
|
+
"strong",
|
|
2963
|
+
"sub",
|
|
2964
|
+
"summary",
|
|
2965
|
+
"sup",
|
|
2966
|
+
"table",
|
|
2967
|
+
"tbody",
|
|
2968
|
+
"td",
|
|
2969
|
+
"template",
|
|
2970
|
+
"hgroup",
|
|
2971
|
+
"textarea",
|
|
2972
|
+
"tfoot",
|
|
2973
|
+
"th",
|
|
2974
|
+
"thead",
|
|
2975
|
+
"time",
|
|
2976
|
+
"tr",
|
|
2977
|
+
"track",
|
|
2978
|
+
"tt",
|
|
2979
|
+
"u",
|
|
2980
|
+
"ul",
|
|
2981
|
+
"var",
|
|
2982
|
+
"video",
|
|
2983
|
+
"wbr",
|
|
2984
|
+
// SVG
|
|
2985
|
+
"svg",
|
|
2986
|
+
"path"
|
|
2987
|
+
]
|
|
2988
|
+
};
|
|
2989
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
2762
2990
|
}
|
|
2763
|
-
};
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2991
|
+
});
|
|
2992
|
+
var require_cjs3 = __commonJS2({
|
|
2993
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports2, module22) {
|
|
2994
|
+
"use strict";
|
|
2995
|
+
var __defProp22 = Object.defineProperty;
|
|
2996
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2997
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2998
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2999
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3000
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3001
|
+
for (let key of __getOwnPropNames22(from))
|
|
3002
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3003
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3004
|
+
}
|
|
3005
|
+
return to;
|
|
3006
|
+
};
|
|
3007
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3008
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3009
|
+
var utils_exports = {};
|
|
3010
|
+
module22.exports = __toCommonJS22(utils_exports);
|
|
3011
|
+
__reExport(utils_exports, require_key2(), module22.exports);
|
|
3012
|
+
__reExport(utils_exports, require_env2(), module22.exports);
|
|
3013
|
+
__reExport(utils_exports, require_types2(), module22.exports);
|
|
3014
|
+
__reExport(utils_exports, require_object2(), module22.exports);
|
|
3015
|
+
__reExport(utils_exports, require_function2(), module22.exports);
|
|
3016
|
+
__reExport(utils_exports, require_array2(), module22.exports);
|
|
3017
|
+
__reExport(utils_exports, require_node2(), module22.exports);
|
|
3018
|
+
__reExport(utils_exports, require_log2(), module22.exports);
|
|
3019
|
+
__reExport(utils_exports, require_string2(), module22.exports);
|
|
3020
|
+
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
3021
|
+
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
3022
|
+
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
2782
3023
|
}
|
|
2783
|
-
return to;
|
|
2784
|
-
};
|
|
2785
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2786
|
-
var cookie_exports = {};
|
|
2787
|
-
__export22(cookie_exports, {
|
|
2788
|
-
getCookie: () => getCookie,
|
|
2789
|
-
isMobile: () => isMobile,
|
|
2790
|
-
setCookie: () => setCookie
|
|
2791
3024
|
});
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
3025
|
+
var src_exports = {};
|
|
3026
|
+
__export2(src_exports, {
|
|
3027
|
+
arrayzeValue: () => arrayzeValue,
|
|
3028
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3029
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3030
|
+
findClosestNumber: () => findClosestNumber,
|
|
3031
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3032
|
+
formatDate: () => formatDate,
|
|
3033
|
+
isPhoto: () => isPhoto,
|
|
3034
|
+
loadCssFile: () => loadCssFile,
|
|
3035
|
+
loadJavascript: () => loadJavascript,
|
|
3036
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3037
|
+
loadJavascriptFileSync: () => loadJavascriptFileSync,
|
|
3038
|
+
removeChars: () => removeChars,
|
|
3039
|
+
toCamelCase: () => toCamelCase,
|
|
3040
|
+
toDashCase: () => toDashCase2,
|
|
3041
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3042
|
+
toTitleCase: () => toTitleCase,
|
|
3043
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3044
|
+
});
|
|
3045
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
3046
|
+
var import_utils22 = __toESM2(require_cjs3(), 1);
|
|
3047
|
+
var toggleFullscreen = async (el) => {
|
|
3048
|
+
if (!document.fullscreenElement) {
|
|
3049
|
+
try {
|
|
3050
|
+
await (el.node || document).requestFullscreen();
|
|
3051
|
+
} catch (err) {
|
|
3052
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3053
|
+
}
|
|
3054
|
+
} else {
|
|
3055
|
+
await document.exitFullscreen();
|
|
2816
3056
|
}
|
|
2817
|
-
return "";
|
|
2818
3057
|
};
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
var __defProp22 = Object.defineProperty;
|
|
2825
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2826
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2827
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2828
|
-
var __export22 = (target, all) => {
|
|
2829
|
-
for (var name in all)
|
|
2830
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3058
|
+
var import_utils4 = __toESM2(require_cjs3(), 1);
|
|
3059
|
+
var findClosestNumber = (number, arr) => {
|
|
3060
|
+
return ((0, import_utils4.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3061
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3062
|
+
});
|
|
2831
3063
|
};
|
|
2832
|
-
var
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
3064
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3065
|
+
val = parseFloat(val);
|
|
3066
|
+
if ((0, import_utils4.isObject)(factory))
|
|
3067
|
+
factory = Object.values(factory);
|
|
3068
|
+
return findClosestNumber(val, factory);
|
|
3069
|
+
};
|
|
3070
|
+
var formatDate = (timestamp) => {
|
|
3071
|
+
if (!timestamp)
|
|
3072
|
+
return "";
|
|
3073
|
+
const d = new Date(timestamp);
|
|
3074
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3075
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3076
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3077
|
+
return `${da} ${mo}, ${ye}`;
|
|
3078
|
+
};
|
|
3079
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3080
|
+
const fib = [0, 1];
|
|
3081
|
+
for (let i = 2; i <= n; i++) {
|
|
3082
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3083
|
+
}
|
|
3084
|
+
return fib[n];
|
|
3085
|
+
};
|
|
3086
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3087
|
+
return new Promise((resolve, reject) => {
|
|
3088
|
+
try {
|
|
3089
|
+
const scriptEle = doc.createElement("script");
|
|
3090
|
+
scriptEle.type = type;
|
|
3091
|
+
scriptEle.async = async;
|
|
3092
|
+
scriptEle.src = FILE_URL;
|
|
3093
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3094
|
+
resolve({
|
|
3095
|
+
status: true
|
|
3096
|
+
});
|
|
3097
|
+
});
|
|
3098
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3099
|
+
reject(new Error({
|
|
3100
|
+
status: false,
|
|
3101
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3102
|
+
}));
|
|
3103
|
+
});
|
|
3104
|
+
doc.body.appendChild(scriptEle);
|
|
3105
|
+
} catch (error) {
|
|
3106
|
+
reject(error);
|
|
3107
|
+
}
|
|
3108
|
+
});
|
|
2839
3109
|
};
|
|
2840
|
-
var
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
"
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
"basefont",
|
|
2872
|
-
"bdi",
|
|
2873
|
-
"bdo",
|
|
2874
|
-
"big",
|
|
2875
|
-
"blockquote",
|
|
2876
|
-
"br",
|
|
2877
|
-
"button",
|
|
2878
|
-
"canvas",
|
|
2879
|
-
"caption",
|
|
2880
|
-
"center",
|
|
2881
|
-
"cite",
|
|
2882
|
-
"code",
|
|
2883
|
-
"search",
|
|
2884
|
-
"col",
|
|
2885
|
-
"colgroup",
|
|
2886
|
-
"data",
|
|
2887
|
-
"datalist",
|
|
2888
|
-
"dd",
|
|
2889
|
-
"del",
|
|
2890
|
-
"details",
|
|
2891
|
-
"dfn",
|
|
2892
|
-
"dialog",
|
|
2893
|
-
"dir",
|
|
2894
|
-
"div",
|
|
2895
|
-
"dl",
|
|
2896
|
-
"dt",
|
|
2897
|
-
"em",
|
|
2898
|
-
"embed",
|
|
2899
|
-
"fieldset",
|
|
2900
|
-
"figcaption",
|
|
2901
|
-
"figure",
|
|
2902
|
-
"font",
|
|
2903
|
-
"footer",
|
|
2904
|
-
"form",
|
|
2905
|
-
"frame",
|
|
2906
|
-
"frameset",
|
|
2907
|
-
"h1",
|
|
2908
|
-
"h2",
|
|
2909
|
-
"h3",
|
|
2910
|
-
"h4",
|
|
2911
|
-
"h5",
|
|
2912
|
-
"h6",
|
|
2913
|
-
"head",
|
|
2914
|
-
"header",
|
|
2915
|
-
"hr",
|
|
2916
|
-
"i",
|
|
2917
|
-
"iframe",
|
|
2918
|
-
"img",
|
|
2919
|
-
"input",
|
|
2920
|
-
"ins",
|
|
2921
|
-
"kbd",
|
|
2922
|
-
"label",
|
|
2923
|
-
"legend",
|
|
2924
|
-
"li",
|
|
2925
|
-
"link",
|
|
2926
|
-
"main",
|
|
2927
|
-
"map",
|
|
2928
|
-
"mark",
|
|
2929
|
-
"meter",
|
|
2930
|
-
"nav",
|
|
2931
|
-
"noframes",
|
|
2932
|
-
"noscript",
|
|
2933
|
-
"object",
|
|
2934
|
-
"ol",
|
|
2935
|
-
"optgroup",
|
|
2936
|
-
"option",
|
|
2937
|
-
"output",
|
|
2938
|
-
"p",
|
|
2939
|
-
"param",
|
|
2940
|
-
"picture",
|
|
2941
|
-
"pre",
|
|
2942
|
-
"progress",
|
|
2943
|
-
"hgroup",
|
|
2944
|
-
"q",
|
|
2945
|
-
"rp",
|
|
2946
|
-
"rt",
|
|
2947
|
-
"ruby",
|
|
2948
|
-
"s",
|
|
2949
|
-
"samp",
|
|
2950
|
-
"script",
|
|
2951
|
-
"section",
|
|
2952
|
-
"select",
|
|
2953
|
-
"small",
|
|
2954
|
-
"source",
|
|
2955
|
-
"span",
|
|
2956
|
-
"strike",
|
|
2957
|
-
"strong",
|
|
2958
|
-
"sub",
|
|
2959
|
-
"summary",
|
|
2960
|
-
"sup",
|
|
2961
|
-
"table",
|
|
2962
|
-
"tbody",
|
|
2963
|
-
"td",
|
|
2964
|
-
"template",
|
|
2965
|
-
"hgroup",
|
|
2966
|
-
"textarea",
|
|
2967
|
-
"tfoot",
|
|
2968
|
-
"th",
|
|
2969
|
-
"thead",
|
|
2970
|
-
"time",
|
|
2971
|
-
"tr",
|
|
2972
|
-
"track",
|
|
2973
|
-
"tt",
|
|
2974
|
-
"u",
|
|
2975
|
-
"ul",
|
|
2976
|
-
"var",
|
|
2977
|
-
"video",
|
|
2978
|
-
"wbr",
|
|
2979
|
-
// SVG
|
|
2980
|
-
"svg",
|
|
2981
|
-
"path"
|
|
2982
|
-
]
|
|
3110
|
+
var loadJavascriptFileSync = (FILE_URL, doc = document, fallback, type = "text/javascript") => {
|
|
3111
|
+
const xhr = new window.XMLHttpRequest();
|
|
3112
|
+
xhr.open("GET", FILE_URL, false);
|
|
3113
|
+
xhr.send();
|
|
3114
|
+
if (xhr.status === 200) {
|
|
3115
|
+
const scriptEle = doc.createElement("script");
|
|
3116
|
+
scriptEle.type = type;
|
|
3117
|
+
scriptEle.text = xhr.responseText;
|
|
3118
|
+
doc.body.appendChild(scriptEle);
|
|
3119
|
+
if (typeof fallback === "function")
|
|
3120
|
+
fallback();
|
|
3121
|
+
} else {
|
|
3122
|
+
throw new Error(`Failed to load the script ${FILE_URL}`);
|
|
3123
|
+
}
|
|
3124
|
+
};
|
|
3125
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3126
|
+
return new Promise((resolve, reject) => {
|
|
3127
|
+
try {
|
|
3128
|
+
const linkElem = doc.createElement("link");
|
|
3129
|
+
linkElem.rel = "stylesheet";
|
|
3130
|
+
linkElem.href = FILE_URL;
|
|
3131
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3132
|
+
resolve({
|
|
3133
|
+
status: true
|
|
3134
|
+
});
|
|
3135
|
+
});
|
|
3136
|
+
doc.head.appendChild(linkElem);
|
|
3137
|
+
} catch (error) {
|
|
3138
|
+
reject(error);
|
|
3139
|
+
}
|
|
3140
|
+
});
|
|
2983
3141
|
};
|
|
2984
|
-
var
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3142
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3143
|
+
try {
|
|
3144
|
+
const scriptEle = doc.createElement("script");
|
|
3145
|
+
scriptEle.type = type;
|
|
3146
|
+
scriptEle.async = async;
|
|
3147
|
+
scriptEle.id = id;
|
|
3148
|
+
scriptEle.innerHTML = body;
|
|
3149
|
+
doc.body.appendChild(scriptEle);
|
|
3150
|
+
} catch (error) {
|
|
3151
|
+
console.warn(error);
|
|
3152
|
+
}
|
|
3153
|
+
};
|
|
3154
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3155
|
+
var copyStringToClipboard = (str) => {
|
|
3156
|
+
const el = document.createElement("textarea");
|
|
3157
|
+
el.value = str;
|
|
3158
|
+
el.setAttribute("readonly", "");
|
|
3159
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
3160
|
+
document.body.appendChild(el);
|
|
3161
|
+
el.select();
|
|
3162
|
+
document.execCommand("copy");
|
|
3163
|
+
document.body.removeChild(el);
|
|
3164
|
+
};
|
|
3165
|
+
var removeChars = (str) => {
|
|
3166
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3167
|
+
};
|
|
3168
|
+
var toCamelCase = (str) => {
|
|
3169
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3170
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3171
|
+
}).replaceAll(/\s+/g, "");
|
|
3172
|
+
};
|
|
3173
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3174
|
+
/\w\S*/g,
|
|
3175
|
+
(txt) => {
|
|
3176
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3177
|
+
}
|
|
3178
|
+
);
|
|
3179
|
+
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3180
|
+
var toDescriptionCase = (str = "") => {
|
|
3181
|
+
if (typeof str !== "string")
|
|
3182
|
+
return;
|
|
3183
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3184
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3185
|
+
};
|
|
3186
|
+
var arrayzeValue = (val) => {
|
|
3187
|
+
if ((0, import_utils22.isArray)(val))
|
|
3188
|
+
return val;
|
|
3189
|
+
if ((0, import_utils22.isString)(val))
|
|
3190
|
+
return val.split(" ");
|
|
3191
|
+
if ((0, import_utils22.isObject)(val))
|
|
3192
|
+
return Object.values(val);
|
|
3193
|
+
if ((0, import_utils22.isNumber)(val))
|
|
3194
|
+
return [val];
|
|
3001
3195
|
};
|
|
3002
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3003
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3004
|
-
var utils_exports = {};
|
|
3005
|
-
module2.exports = __toCommonJS22(utils_exports);
|
|
3006
|
-
__reExport(utils_exports, require_key2(), module2.exports);
|
|
3007
|
-
__reExport(utils_exports, require_env2(), module2.exports);
|
|
3008
|
-
__reExport(utils_exports, require_types2(), module2.exports);
|
|
3009
|
-
__reExport(utils_exports, require_object2(), module2.exports);
|
|
3010
|
-
__reExport(utils_exports, require_function2(), module2.exports);
|
|
3011
|
-
__reExport(utils_exports, require_array2(), module2.exports);
|
|
3012
|
-
__reExport(utils_exports, require_node2(), module2.exports);
|
|
3013
|
-
__reExport(utils_exports, require_log2(), module2.exports);
|
|
3014
|
-
__reExport(utils_exports, require_string2(), module2.exports);
|
|
3015
|
-
__reExport(utils_exports, require_globals2(), module2.exports);
|
|
3016
|
-
__reExport(utils_exports, require_cookie2(), module2.exports);
|
|
3017
|
-
__reExport(utils_exports, require_tags2(), module2.exports);
|
|
3018
3196
|
}
|
|
3019
3197
|
});
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
toDescriptionCase: () => toDescriptionCase,
|
|
3036
|
-
toTitleCase: () => toTitleCase,
|
|
3037
|
-
toggleFullscreen: () => toggleFullscreen
|
|
3198
|
+
|
|
3199
|
+
// src/utils/sequence.js
|
|
3200
|
+
var sequence_exports = {};
|
|
3201
|
+
__export(sequence_exports, {
|
|
3202
|
+
findHeadingLetter: () => findHeadingLetter,
|
|
3203
|
+
findHeadings: () => findHeadings,
|
|
3204
|
+
generateSequence: () => generateSequence,
|
|
3205
|
+
generateSubSequence: () => generateSubSequence,
|
|
3206
|
+
getSequenceValue: () => getSequenceValue,
|
|
3207
|
+
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
3208
|
+
getSubratio: () => getSubratio,
|
|
3209
|
+
getSubratioDifference: () => getSubratioDifference,
|
|
3210
|
+
numToLetterMap: () => numToLetterMap,
|
|
3211
|
+
setScalingVar: () => setScalingVar,
|
|
3212
|
+
setSubScalingVar: () => setSubScalingVar
|
|
3038
3213
|
});
|
|
3039
|
-
module.exports =
|
|
3040
|
-
var import_utils2 =
|
|
3041
|
-
var
|
|
3042
|
-
if (!document.fullscreenElement) {
|
|
3043
|
-
el.node.requestFullscreen().catch((err) => {
|
|
3044
|
-
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3045
|
-
});
|
|
3046
|
-
} else {
|
|
3047
|
-
document.exitFullscreen();
|
|
3048
|
-
}
|
|
3049
|
-
};
|
|
3050
|
-
var import_utils = __toESM2(require_cjs2(), 1);
|
|
3051
|
-
var findClosestNumber = (number, arr) => {
|
|
3052
|
-
return ((0, import_utils.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3053
|
-
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3054
|
-
});
|
|
3055
|
-
};
|
|
3056
|
-
var findClosestNumberInFactory = (val, factory) => {
|
|
3057
|
-
val = parseFloat(val);
|
|
3058
|
-
if ((0, import_utils.isObject)(factory))
|
|
3059
|
-
factory = Object.values(factory);
|
|
3060
|
-
return findClosestNumber(val, factory);
|
|
3061
|
-
};
|
|
3062
|
-
var formatDate = (timestamp) => {
|
|
3063
|
-
if (!timestamp)
|
|
3064
|
-
return "";
|
|
3065
|
-
const d = new Date(timestamp);
|
|
3066
|
-
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3067
|
-
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3068
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3069
|
-
return `${da} ${mo}, ${ye}`;
|
|
3070
|
-
};
|
|
3071
|
-
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3072
|
-
const fib = [0, 1];
|
|
3073
|
-
for (let i = 2; i <= n; i++) {
|
|
3074
|
-
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3075
|
-
}
|
|
3076
|
-
return fib[n];
|
|
3077
|
-
};
|
|
3078
|
-
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3079
|
-
return new Promise((resolve, reject) => {
|
|
3080
|
-
try {
|
|
3081
|
-
const scriptEle = doc.createElement("script");
|
|
3082
|
-
scriptEle.type = type;
|
|
3083
|
-
scriptEle.async = async;
|
|
3084
|
-
scriptEle.src = FILE_URL;
|
|
3085
|
-
scriptEle.addEventListener("load", (ev) => {
|
|
3086
|
-
resolve({
|
|
3087
|
-
status: true
|
|
3088
|
-
});
|
|
3089
|
-
});
|
|
3090
|
-
scriptEle.addEventListener("error", (ev) => {
|
|
3091
|
-
reject({
|
|
3092
|
-
status: false,
|
|
3093
|
-
message: `Failed to load the script ${FILE_URL}`
|
|
3094
|
-
});
|
|
3095
|
-
});
|
|
3096
|
-
doc.body.appendChild(scriptEle);
|
|
3097
|
-
} catch (error) {
|
|
3098
|
-
reject(error);
|
|
3099
|
-
}
|
|
3100
|
-
});
|
|
3101
|
-
};
|
|
3102
|
-
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3103
|
-
return new Promise((resolve, reject) => {
|
|
3104
|
-
try {
|
|
3105
|
-
const linkElem = doc.createElement("link");
|
|
3106
|
-
linkElem.rel = "stylesheet";
|
|
3107
|
-
linkElem.href = FILE_URL;
|
|
3108
|
-
linkElem.addEventListener("load", (ev) => {
|
|
3109
|
-
resolve({
|
|
3110
|
-
status: true
|
|
3111
|
-
});
|
|
3112
|
-
});
|
|
3113
|
-
doc.head.appendChild(linkElem);
|
|
3114
|
-
} catch (error) {
|
|
3115
|
-
reject(error);
|
|
3116
|
-
}
|
|
3117
|
-
});
|
|
3118
|
-
};
|
|
3119
|
-
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3120
|
-
try {
|
|
3121
|
-
const scriptEle = doc.createElement("script");
|
|
3122
|
-
scriptEle.type = type;
|
|
3123
|
-
scriptEle.async = async;
|
|
3124
|
-
scriptEle.id = id;
|
|
3125
|
-
scriptEle.innerHTML = body;
|
|
3126
|
-
doc.body.appendChild(scriptEle);
|
|
3127
|
-
} catch (error) {
|
|
3128
|
-
console.warn(error);
|
|
3129
|
-
}
|
|
3130
|
-
};
|
|
3131
|
-
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3132
|
-
var copyStringToClipboard = (str) => {
|
|
3133
|
-
const el = document.createElement("textarea");
|
|
3134
|
-
el.value = str;
|
|
3135
|
-
el.setAttribute("readonly", "");
|
|
3136
|
-
el.style = { position: "absolute", left: "-9999px" };
|
|
3137
|
-
document.body.appendChild(el);
|
|
3138
|
-
el.select();
|
|
3139
|
-
document.execCommand("copy");
|
|
3140
|
-
document.body.removeChild(el);
|
|
3141
|
-
};
|
|
3142
|
-
var removeChars = (str) => {
|
|
3143
|
-
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3144
|
-
};
|
|
3145
|
-
var toCamelCase = (str) => {
|
|
3146
|
-
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3147
|
-
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3148
|
-
}).replaceAll(/\s+/g, "");
|
|
3149
|
-
};
|
|
3150
|
-
var toTitleCase = (str) => str && str.replace(
|
|
3151
|
-
/\w\S*/g,
|
|
3152
|
-
(txt) => {
|
|
3153
|
-
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3154
|
-
}
|
|
3155
|
-
);
|
|
3156
|
-
var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3157
|
-
var toDescriptionCase = (str = "") => {
|
|
3158
|
-
if (typeof str !== "string")
|
|
3159
|
-
return;
|
|
3160
|
-
const result = str.replace(/([A-Z])/g, " $1");
|
|
3161
|
-
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3162
|
-
};
|
|
3163
|
-
var arrayzeValue = (val) => {
|
|
3164
|
-
if ((0, import_utils2.isArray)(val))
|
|
3165
|
-
return val;
|
|
3166
|
-
if ((0, import_utils2.isString)(val))
|
|
3167
|
-
return val.split(" ");
|
|
3168
|
-
if ((0, import_utils2.isObject)(val))
|
|
3169
|
-
return Object.values(val);
|
|
3170
|
-
if ((0, import_utils2.isNumber)(val))
|
|
3171
|
-
return [val];
|
|
3172
|
-
};
|
|
3214
|
+
module.exports = __toCommonJS(sequence_exports);
|
|
3215
|
+
var import_utils2 = __toESM(require_cjs(), 1);
|
|
3216
|
+
var import_utils3 = __toESM(require_cjs2(), 1);
|
|
3173
3217
|
|
|
3174
3218
|
// src/factory.js
|
|
3175
|
-
var
|
|
3219
|
+
var import_utils = __toESM(require_cjs(), 1);
|
|
3176
3220
|
|
|
3177
3221
|
// src/defaultConfig/index.js
|
|
3178
3222
|
var defaultConfig_exports = {};
|
|
@@ -3379,7 +3423,7 @@ var CONFIG = {
|
|
|
3379
3423
|
CSS_VARS,
|
|
3380
3424
|
...defaultConfig_exports
|
|
3381
3425
|
};
|
|
3382
|
-
var cachedConfig = (0,
|
|
3426
|
+
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
3383
3427
|
var FACTORY = {
|
|
3384
3428
|
active: "0",
|
|
3385
3429
|
0: CONFIG
|
|
@@ -3535,9 +3579,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3535
3579
|
unit = UNIT2.default,
|
|
3536
3580
|
useVariable
|
|
3537
3581
|
} = sequenceProps;
|
|
3538
|
-
if ((0,
|
|
3582
|
+
if ((0, import_utils2.isString)(value) && value.slice(0, 2) === "--")
|
|
3539
3583
|
return `var(${value})`;
|
|
3540
|
-
const prefix = `--${(
|
|
3584
|
+
const prefix = `--${(0, import_utils3.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3541
3585
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3542
3586
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3543
3587
|
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)
|
|
@@ -3583,7 +3627,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3583
3627
|
};
|
|
3584
3628
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
3585
3629
|
if (typeof value !== "string") {
|
|
3586
|
-
|
|
3630
|
+
const CONFIG2 = getActiveConfig();
|
|
3631
|
+
if (CONFIG2.verbose)
|
|
3632
|
+
console.warn(propertyName, value, "is not a string");
|
|
3587
3633
|
return { [propertyName]: value };
|
|
3588
3634
|
}
|
|
3589
3635
|
if (value === "-" || value === "")
|