@symbo.ls/scratch 2.11.410 → 2.11.430
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/defaultConfig/index.js +3 -1
- package/dist/cjs/defaultConfig/responsive.js +3 -1
- package/dist/cjs/factory.js +76 -44
- package/dist/cjs/index.js +2362 -2279
- package/dist/cjs/set.js +2328 -2247
- package/dist/cjs/system/color.js +2207 -2129
- package/dist/cjs/system/document.js +2127 -2049
- package/dist/cjs/system/font.js +1926 -1847
- package/dist/cjs/system/index.js +2346 -2265
- package/dist/cjs/system/reset.js +2131 -2053
- package/dist/cjs/system/shadow.js +2218 -2139
- package/dist/cjs/system/spacing.js +1975 -1896
- package/dist/cjs/system/svg.js +1907 -1829
- package/dist/cjs/system/theme.js +2215 -2137
- package/dist/cjs/system/timing.js +1979 -1898
- package/dist/cjs/system/typography.js +2131 -2053
- package/dist/cjs/transforms/index.js +2246 -2165
- package/dist/cjs/utils/color.js +75 -45
- package/dist/cjs/utils/index.js +2153 -2073
- package/dist/cjs/utils/sequence.js +1892 -1812
- package/dist/cjs/utils/sprite.js +76 -44
- package/dist/cjs/utils/var.js +2102 -2024
- package/package.json +2 -2
- package/src/defaultConfig/responsive.js +3 -1
- package/src/utils/sequence.js +2 -1
package/dist/cjs/utils/index.js
CHANGED
|
@@ -34,35 +34,35 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_cjs = __commonJS({
|
|
35
35
|
"../../node_modules/@domql/globals/dist/cjs/index.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 globals_exports = {};
|
|
55
|
-
|
|
55
|
+
__export2(globals_exports, {
|
|
56
56
|
document: () => document3,
|
|
57
57
|
global: () => global,
|
|
58
58
|
self: () => self,
|
|
59
|
-
window: () =>
|
|
59
|
+
window: () => window3
|
|
60
60
|
});
|
|
61
|
-
module2.exports =
|
|
61
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
62
62
|
var global = globalThis;
|
|
63
63
|
var self = globalThis;
|
|
64
|
-
var
|
|
65
|
-
var document3 =
|
|
64
|
+
var window3 = globalThis;
|
|
65
|
+
var document3 = window3.document;
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
|
|
@@ -70,29 +70,29 @@ var require_cjs = __commonJS({
|
|
|
70
70
|
var require_key = __commonJS({
|
|
71
71
|
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
72
72
|
"use strict";
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
73
|
+
var __defProp2 = Object.defineProperty;
|
|
74
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
75
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
76
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
77
|
+
var __export2 = (target, all) => {
|
|
78
78
|
for (var name in all)
|
|
79
|
-
|
|
79
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
80
80
|
};
|
|
81
|
-
var
|
|
81
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
82
82
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
83
|
-
for (let key of
|
|
84
|
-
if (!
|
|
85
|
-
|
|
83
|
+
for (let key of __getOwnPropNames2(from))
|
|
84
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
85
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
86
86
|
}
|
|
87
87
|
return to;
|
|
88
88
|
};
|
|
89
|
-
var
|
|
89
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
90
90
|
var key_exports = {};
|
|
91
|
-
|
|
91
|
+
__export2(key_exports, {
|
|
92
92
|
createSnapshotId: () => createSnapshotId,
|
|
93
93
|
generateKey: () => generateKey
|
|
94
94
|
});
|
|
95
|
-
module2.exports =
|
|
95
|
+
module2.exports = __toCommonJS2(key_exports);
|
|
96
96
|
var generateKey = /* @__PURE__ */ function() {
|
|
97
97
|
let index = 0;
|
|
98
98
|
function newId() {
|
|
@@ -109,32 +109,32 @@ var require_key = __commonJS({
|
|
|
109
109
|
var require_env = __commonJS({
|
|
110
110
|
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
111
111
|
"use strict";
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
112
|
+
var __defProp2 = Object.defineProperty;
|
|
113
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
114
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
115
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
116
|
+
var __export2 = (target, all) => {
|
|
117
117
|
for (var name in all)
|
|
118
|
-
|
|
118
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
119
119
|
};
|
|
120
|
-
var
|
|
120
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
121
121
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
122
|
-
for (let key of
|
|
123
|
-
if (!
|
|
124
|
-
|
|
122
|
+
for (let key of __getOwnPropNames2(from))
|
|
123
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
124
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
125
125
|
}
|
|
126
126
|
return to;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
128
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
129
129
|
var env_exports = {};
|
|
130
|
-
|
|
130
|
+
__export2(env_exports, {
|
|
131
131
|
NODE_ENV: () => NODE_ENV,
|
|
132
132
|
getNev: () => getNev,
|
|
133
133
|
isDevelopment: () => isDevelopment,
|
|
134
134
|
isProduction: () => isProduction,
|
|
135
135
|
isTest: () => isTest
|
|
136
136
|
});
|
|
137
|
-
module2.exports =
|
|
137
|
+
module2.exports = __toCommonJS2(env_exports);
|
|
138
138
|
var NODE_ENV = "development";
|
|
139
139
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
140
140
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -147,35 +147,35 @@ var require_env = __commonJS({
|
|
|
147
147
|
var require_globals = __commonJS({
|
|
148
148
|
"../../../domql/packages/utils/dist/cjs/globals.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 globals_exports = {};
|
|
168
|
-
|
|
168
|
+
__export2(globals_exports, {
|
|
169
169
|
document: () => document3,
|
|
170
170
|
global: () => global,
|
|
171
171
|
self: () => self,
|
|
172
|
-
window: () =>
|
|
172
|
+
window: () => window3
|
|
173
173
|
});
|
|
174
|
-
module2.exports =
|
|
174
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
175
175
|
var global = globalThis;
|
|
176
176
|
var self = globalThis;
|
|
177
|
-
var
|
|
178
|
-
var document3 =
|
|
177
|
+
var window3 = globalThis;
|
|
178
|
+
var document3 = window3.document;
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
@@ -183,29 +183,30 @@ var require_globals = __commonJS({
|
|
|
183
183
|
var require_node = __commonJS({
|
|
184
184
|
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
185
185
|
"use strict";
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
186
|
+
var __defProp2 = Object.defineProperty;
|
|
187
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
188
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
189
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
190
|
+
var __export2 = (target, all) => {
|
|
191
191
|
for (var name in all)
|
|
192
|
-
|
|
192
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
193
193
|
};
|
|
194
|
-
var
|
|
194
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
195
195
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
196
|
-
for (let key of
|
|
197
|
-
if (!
|
|
198
|
-
|
|
196
|
+
for (let key of __getOwnPropNames2(from))
|
|
197
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
198
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
199
199
|
}
|
|
200
200
|
return to;
|
|
201
201
|
};
|
|
202
|
-
var
|
|
202
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
203
203
|
var node_exports = {};
|
|
204
|
-
|
|
204
|
+
__export2(node_exports, {
|
|
205
|
+
isDOMNode: () => isDOMNode,
|
|
205
206
|
isHtmlElement: () => isHtmlElement,
|
|
206
207
|
isNode: () => isNode
|
|
207
208
|
});
|
|
208
|
-
module2.exports =
|
|
209
|
+
module2.exports = __toCommonJS2(node_exports);
|
|
209
210
|
var import_globals2 = require_globals();
|
|
210
211
|
var isNode = (obj) => {
|
|
211
212
|
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -213,6 +214,9 @@ var require_node = __commonJS({
|
|
|
213
214
|
var isHtmlElement = (obj) => {
|
|
214
215
|
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
215
216
|
};
|
|
217
|
+
var isDOMNode = (obj) => {
|
|
218
|
+
return typeof import_globals2.window !== "undefined" && (obj instanceof import_globals2.window.Node || obj instanceof import_globals2.window.Window || obj === import_globals2.window || obj === document);
|
|
219
|
+
};
|
|
216
220
|
}
|
|
217
221
|
});
|
|
218
222
|
|
|
@@ -220,25 +224,25 @@ var require_node = __commonJS({
|
|
|
220
224
|
var require_types = __commonJS({
|
|
221
225
|
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
222
226
|
"use strict";
|
|
223
|
-
var
|
|
224
|
-
var
|
|
225
|
-
var
|
|
226
|
-
var
|
|
227
|
-
var
|
|
227
|
+
var __defProp2 = Object.defineProperty;
|
|
228
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
229
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
230
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
231
|
+
var __export2 = (target, all) => {
|
|
228
232
|
for (var name in all)
|
|
229
|
-
|
|
233
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
230
234
|
};
|
|
231
|
-
var
|
|
235
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
232
236
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
233
|
-
for (let key of
|
|
234
|
-
if (!
|
|
235
|
-
|
|
237
|
+
for (let key of __getOwnPropNames2(from))
|
|
238
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
239
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
236
240
|
}
|
|
237
241
|
return to;
|
|
238
242
|
};
|
|
239
|
-
var
|
|
243
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
240
244
|
var types_exports = {};
|
|
241
|
-
|
|
245
|
+
__export2(types_exports, {
|
|
242
246
|
TYPES: () => TYPES,
|
|
243
247
|
is: () => is,
|
|
244
248
|
isArray: () => isArray2,
|
|
@@ -254,7 +258,7 @@ var require_types = __commonJS({
|
|
|
254
258
|
isString: () => isString4,
|
|
255
259
|
isUndefined: () => isUndefined
|
|
256
260
|
});
|
|
257
|
-
module2.exports =
|
|
261
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
258
262
|
var import_node = require_node();
|
|
259
263
|
var isObject2 = (arg) => {
|
|
260
264
|
if (arg === null)
|
|
@@ -310,25 +314,25 @@ var require_types = __commonJS({
|
|
|
310
314
|
var require_array = __commonJS({
|
|
311
315
|
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
312
316
|
"use strict";
|
|
313
|
-
var
|
|
314
|
-
var
|
|
315
|
-
var
|
|
316
|
-
var
|
|
317
|
-
var
|
|
317
|
+
var __defProp2 = Object.defineProperty;
|
|
318
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
319
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
320
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
321
|
+
var __export2 = (target, all) => {
|
|
318
322
|
for (var name in all)
|
|
319
|
-
|
|
323
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
320
324
|
};
|
|
321
|
-
var
|
|
325
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
322
326
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
323
|
-
for (let key of
|
|
324
|
-
if (!
|
|
325
|
-
|
|
327
|
+
for (let key of __getOwnPropNames2(from))
|
|
328
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
329
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
326
330
|
}
|
|
327
331
|
return to;
|
|
328
332
|
};
|
|
329
|
-
var
|
|
333
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
330
334
|
var array_exports = {};
|
|
331
|
-
|
|
335
|
+
__export2(array_exports, {
|
|
332
336
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
333
337
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
334
338
|
arraysEqual: () => arraysEqual,
|
|
@@ -345,7 +349,7 @@ var require_array = __commonJS({
|
|
|
345
349
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
346
350
|
swapItemsInArray: () => swapItemsInArray
|
|
347
351
|
});
|
|
348
|
-
module2.exports =
|
|
352
|
+
module2.exports = __toCommonJS2(array_exports);
|
|
349
353
|
var import_object = require_object();
|
|
350
354
|
var import_types = require_types();
|
|
351
355
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -378,10 +382,10 @@ var require_array = __commonJS({
|
|
|
378
382
|
return [].concat(...arrays);
|
|
379
383
|
};
|
|
380
384
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
381
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
385
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
382
386
|
};
|
|
383
387
|
var mergeAndCloneIfArray = (obj) => {
|
|
384
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
388
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
385
389
|
};
|
|
386
390
|
var cutArrayBeforeValue = (arr, value) => {
|
|
387
391
|
const index = arr.indexOf(value);
|
|
@@ -466,27 +470,29 @@ var require_array = __commonJS({
|
|
|
466
470
|
var require_string = __commonJS({
|
|
467
471
|
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
468
472
|
"use strict";
|
|
469
|
-
var
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
473
|
-
var
|
|
473
|
+
var __defProp2 = Object.defineProperty;
|
|
474
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
475
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
476
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
477
|
+
var __export2 = (target, all) => {
|
|
474
478
|
for (var name in all)
|
|
475
|
-
|
|
479
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
476
480
|
};
|
|
477
|
-
var
|
|
481
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
478
482
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
479
|
-
for (let key of
|
|
480
|
-
if (!
|
|
481
|
-
|
|
483
|
+
for (let key of __getOwnPropNames2(from))
|
|
484
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
485
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
482
486
|
}
|
|
483
487
|
return to;
|
|
484
488
|
};
|
|
485
|
-
var
|
|
489
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
486
490
|
var string_exports = {};
|
|
487
|
-
|
|
491
|
+
__export2(string_exports, {
|
|
488
492
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
489
493
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
494
|
+
decodeNewlines: () => decodeNewlines,
|
|
495
|
+
encodeNewlines: () => encodeNewlines,
|
|
490
496
|
findKeyPosition: () => findKeyPosition,
|
|
491
497
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
492
498
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -494,7 +500,7 @@ var require_string = __commonJS({
|
|
|
494
500
|
stringIncludesAny: () => stringIncludesAny,
|
|
495
501
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
496
502
|
});
|
|
497
|
-
module2.exports =
|
|
503
|
+
module2.exports = __toCommonJS2(string_exports);
|
|
498
504
|
var stringIncludesAny = (str, characters) => {
|
|
499
505
|
for (const char of characters) {
|
|
500
506
|
if (str.includes(char)) {
|
|
@@ -590,6 +596,12 @@ var require_string = __commonJS({
|
|
|
590
596
|
return char;
|
|
591
597
|
});
|
|
592
598
|
};
|
|
599
|
+
var encodeNewlines = (str) => {
|
|
600
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
601
|
+
};
|
|
602
|
+
var decodeNewlines = (encodedStr) => {
|
|
603
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
604
|
+
};
|
|
593
605
|
var customEncodeURIComponent = (str) => {
|
|
594
606
|
return str.split("").map((char) => {
|
|
595
607
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -608,25 +620,25 @@ var require_string = __commonJS({
|
|
|
608
620
|
var require_object = __commonJS({
|
|
609
621
|
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
610
622
|
"use strict";
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
623
|
+
var __defProp2 = Object.defineProperty;
|
|
624
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
625
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
626
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
627
|
+
var __export2 = (target, all) => {
|
|
616
628
|
for (var name in all)
|
|
617
|
-
|
|
629
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
618
630
|
};
|
|
619
|
-
var
|
|
631
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
620
632
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
621
|
-
for (let key of
|
|
622
|
-
if (!
|
|
623
|
-
|
|
633
|
+
for (let key of __getOwnPropNames2(from))
|
|
634
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
635
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
624
636
|
}
|
|
625
637
|
return to;
|
|
626
638
|
};
|
|
627
|
-
var
|
|
639
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
628
640
|
var object_exports = {};
|
|
629
|
-
|
|
641
|
+
__export2(object_exports, {
|
|
630
642
|
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
631
643
|
clone: () => clone,
|
|
632
644
|
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
@@ -662,11 +674,12 @@ var require_object = __commonJS({
|
|
|
662
674
|
removeFromObject: () => removeFromObject,
|
|
663
675
|
stringToObject: () => stringToObject
|
|
664
676
|
});
|
|
665
|
-
module2.exports =
|
|
677
|
+
module2.exports = __toCommonJS2(object_exports);
|
|
666
678
|
var import_globals2 = require_globals();
|
|
667
679
|
var import_types = require_types();
|
|
668
680
|
var import_array = require_array();
|
|
669
681
|
var import_string = require_string();
|
|
682
|
+
var import_node = require_node();
|
|
670
683
|
var exec = (param, element, state, context) => {
|
|
671
684
|
if ((0, import_types.isFunction)(param)) {
|
|
672
685
|
return param(
|
|
@@ -745,30 +758,31 @@ var require_object = __commonJS({
|
|
|
745
758
|
var mergeArrayExclude = (arr, excl = []) => {
|
|
746
759
|
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
747
760
|
};
|
|
748
|
-
var deepClone2 = (obj,
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
761
|
+
var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
|
|
762
|
+
if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
|
|
763
|
+
return obj;
|
|
764
|
+
if (visited.has(obj))
|
|
765
|
+
return visited.get(obj);
|
|
766
|
+
const clone2 = (0, import_types.isArray)(obj) ? [] : {};
|
|
767
|
+
visited.set(obj, clone2);
|
|
768
|
+
for (const key in obj) {
|
|
769
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
|
|
770
|
+
const value = obj[key];
|
|
771
|
+
if ((0, import_node.isDOMNode)(value)) {
|
|
772
|
+
clone2[key] = value;
|
|
773
|
+
} else if (key === "extend" && (0, import_types.isArray)(value)) {
|
|
774
|
+
clone2[key] = (0, import_array.mergeArray)(value, exclude);
|
|
775
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
776
|
+
clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
|
|
777
|
+
} else {
|
|
778
|
+
clone2[key] = value;
|
|
779
|
+
}
|
|
762
780
|
}
|
|
763
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
764
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
765
|
-
} else
|
|
766
|
-
o[prop] = objProp;
|
|
767
781
|
}
|
|
768
|
-
return
|
|
782
|
+
return clone2;
|
|
769
783
|
};
|
|
770
784
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
771
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
785
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
772
786
|
for (const prop in obj) {
|
|
773
787
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
774
788
|
continue;
|
|
@@ -1022,7 +1036,7 @@ var require_object = __commonJS({
|
|
|
1022
1036
|
};
|
|
1023
1037
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
1024
1038
|
for (const e in params) {
|
|
1025
|
-
if (e === "
|
|
1039
|
+
if (e === "__ref")
|
|
1026
1040
|
continue;
|
|
1027
1041
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
1028
1042
|
continue;
|
|
@@ -1076,30 +1090,40 @@ var require_object = __commonJS({
|
|
|
1076
1090
|
}
|
|
1077
1091
|
return true;
|
|
1078
1092
|
};
|
|
1079
|
-
var deepContains = (obj1, obj2) => {
|
|
1080
|
-
if (
|
|
1093
|
+
var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
|
|
1094
|
+
if (obj1 === obj2)
|
|
1095
|
+
return true;
|
|
1096
|
+
if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
|
|
1081
1097
|
return false;
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1098
|
+
if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
|
|
1099
|
+
return obj1 === obj2;
|
|
1100
|
+
const stack = [[obj1, obj2]];
|
|
1101
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
1102
|
+
while (stack.length > 0) {
|
|
1103
|
+
const [current1, current2] = stack.pop();
|
|
1104
|
+
if (visited.has(current1))
|
|
1105
|
+
continue;
|
|
1106
|
+
visited.add(current1);
|
|
1107
|
+
const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
|
|
1108
|
+
const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
|
|
1109
|
+
if (keys1.length !== keys2.length)
|
|
1110
|
+
return false;
|
|
1111
|
+
for (const key of keys1) {
|
|
1112
|
+
if (!Object.prototype.hasOwnProperty.call(current2, key))
|
|
1086
1113
|
return false;
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
1094
|
-
for (const key in obj1) {
|
|
1095
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
1096
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
1114
|
+
const value1 = current1[key];
|
|
1115
|
+
const value2 = current2[key];
|
|
1116
|
+
if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
|
|
1117
|
+
if (value1 !== value2)
|
|
1097
1118
|
return false;
|
|
1119
|
+
} else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
|
|
1120
|
+
if (value1 !== value2) {
|
|
1121
|
+
stack.push([value1, value2]);
|
|
1098
1122
|
}
|
|
1123
|
+
} else if (value1 !== value2) {
|
|
1124
|
+
return false;
|
|
1099
1125
|
}
|
|
1100
1126
|
}
|
|
1101
|
-
} else {
|
|
1102
|
-
return obj2 === obj1;
|
|
1103
1127
|
}
|
|
1104
1128
|
return true;
|
|
1105
1129
|
};
|
|
@@ -1144,6 +1168,12 @@ var require_object = __commonJS({
|
|
|
1144
1168
|
if (foundString || foundInArray)
|
|
1145
1169
|
return el;
|
|
1146
1170
|
}
|
|
1171
|
+
if (el.parent && el.parent.childExtend) {
|
|
1172
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1173
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1174
|
+
if (foundString || foundInArray)
|
|
1175
|
+
return el;
|
|
1176
|
+
}
|
|
1147
1177
|
};
|
|
1148
1178
|
var getExtendsInElement = (obj) => {
|
|
1149
1179
|
let result = [];
|
|
@@ -1176,31 +1206,31 @@ var require_object = __commonJS({
|
|
|
1176
1206
|
var require_function = __commonJS({
|
|
1177
1207
|
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1178
1208
|
"use strict";
|
|
1179
|
-
var
|
|
1180
|
-
var
|
|
1181
|
-
var
|
|
1182
|
-
var
|
|
1183
|
-
var
|
|
1209
|
+
var __defProp2 = Object.defineProperty;
|
|
1210
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1211
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1212
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1213
|
+
var __export2 = (target, all) => {
|
|
1184
1214
|
for (var name in all)
|
|
1185
|
-
|
|
1215
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1186
1216
|
};
|
|
1187
|
-
var
|
|
1217
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1188
1218
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1189
|
-
for (let key of
|
|
1190
|
-
if (!
|
|
1191
|
-
|
|
1219
|
+
for (let key of __getOwnPropNames2(from))
|
|
1220
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1221
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1192
1222
|
}
|
|
1193
1223
|
return to;
|
|
1194
1224
|
};
|
|
1195
|
-
var
|
|
1225
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1196
1226
|
var function_exports = {};
|
|
1197
|
-
|
|
1227
|
+
__export2(function_exports, {
|
|
1198
1228
|
debounce: () => debounce,
|
|
1199
1229
|
debounceOnContext: () => debounceOnContext,
|
|
1200
1230
|
isStringFunction: () => isStringFunction,
|
|
1201
1231
|
memoize: () => memoize
|
|
1202
1232
|
});
|
|
1203
|
-
module2.exports =
|
|
1233
|
+
module2.exports = __toCommonJS2(function_exports);
|
|
1204
1234
|
function debounce(func, wait, immediate) {
|
|
1205
1235
|
let timeout;
|
|
1206
1236
|
return function() {
|
|
@@ -1251,29 +1281,29 @@ var require_function = __commonJS({
|
|
|
1251
1281
|
var require_log = __commonJS({
|
|
1252
1282
|
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1253
1283
|
"use strict";
|
|
1254
|
-
var
|
|
1255
|
-
var
|
|
1256
|
-
var
|
|
1257
|
-
var
|
|
1258
|
-
var
|
|
1284
|
+
var __defProp2 = Object.defineProperty;
|
|
1285
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1286
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1287
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1288
|
+
var __export2 = (target, all) => {
|
|
1259
1289
|
for (var name in all)
|
|
1260
|
-
|
|
1290
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1261
1291
|
};
|
|
1262
|
-
var
|
|
1292
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1263
1293
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1264
|
-
for (let key of
|
|
1265
|
-
if (!
|
|
1266
|
-
|
|
1294
|
+
for (let key of __getOwnPropNames2(from))
|
|
1295
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1296
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1267
1297
|
}
|
|
1268
1298
|
return to;
|
|
1269
1299
|
};
|
|
1270
|
-
var
|
|
1300
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1271
1301
|
var log_exports = {};
|
|
1272
|
-
|
|
1302
|
+
__export2(log_exports, {
|
|
1273
1303
|
logGroupIf: () => logGroupIf,
|
|
1274
1304
|
logIf: () => logIf
|
|
1275
1305
|
});
|
|
1276
|
-
module2.exports =
|
|
1306
|
+
module2.exports = __toCommonJS2(log_exports);
|
|
1277
1307
|
var logIf = (bool, ...arg) => {
|
|
1278
1308
|
if (bool)
|
|
1279
1309
|
arg.map((v) => console.log(v));
|
|
@@ -1292,46 +1322,46 @@ var require_log = __commonJS({
|
|
|
1292
1322
|
var require_cookie = __commonJS({
|
|
1293
1323
|
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1294
1324
|
"use strict";
|
|
1295
|
-
var
|
|
1296
|
-
var
|
|
1297
|
-
var
|
|
1298
|
-
var
|
|
1299
|
-
var
|
|
1325
|
+
var __defProp2 = Object.defineProperty;
|
|
1326
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1327
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1328
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1329
|
+
var __export2 = (target, all) => {
|
|
1300
1330
|
for (var name in all)
|
|
1301
|
-
|
|
1331
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1302
1332
|
};
|
|
1303
|
-
var
|
|
1333
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1304
1334
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1305
|
-
for (let key of
|
|
1306
|
-
if (!
|
|
1307
|
-
|
|
1335
|
+
for (let key of __getOwnPropNames2(from))
|
|
1336
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1337
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1308
1338
|
}
|
|
1309
1339
|
return to;
|
|
1310
1340
|
};
|
|
1311
|
-
var
|
|
1341
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1312
1342
|
var cookie_exports = {};
|
|
1313
|
-
|
|
1343
|
+
__export2(cookie_exports, {
|
|
1314
1344
|
getCookie: () => getCookie,
|
|
1315
1345
|
isMobile: () => isMobile,
|
|
1316
1346
|
setCookie: () => setCookie
|
|
1317
1347
|
});
|
|
1318
|
-
module2.exports =
|
|
1348
|
+
module2.exports = __toCommonJS2(cookie_exports);
|
|
1319
1349
|
var import_types = require_types();
|
|
1320
|
-
var
|
|
1350
|
+
var import_utils7 = require_cjs2();
|
|
1321
1351
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1322
1352
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1323
|
-
if ((0, import_types.isUndefined)(
|
|
1353
|
+
if ((0, import_types.isUndefined)(import_utils7.document) || (0, import_types.isUndefined)(import_utils7.document.cookie))
|
|
1324
1354
|
return;
|
|
1325
1355
|
const d = /* @__PURE__ */ new Date();
|
|
1326
1356
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1327
1357
|
const expires = `expires=${d.toUTCString()}`;
|
|
1328
|
-
|
|
1358
|
+
import_utils7.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1329
1359
|
};
|
|
1330
1360
|
var getCookie = (cname) => {
|
|
1331
|
-
if ((0, import_types.isUndefined)(
|
|
1361
|
+
if ((0, import_types.isUndefined)(import_utils7.document) || (0, import_types.isUndefined)(import_utils7.document.cookie))
|
|
1332
1362
|
return;
|
|
1333
1363
|
const name = `${cname}=`;
|
|
1334
|
-
const decodedCookie = decodeURIComponent(
|
|
1364
|
+
const decodedCookie = decodeURIComponent(import_utils7.document.cookie);
|
|
1335
1365
|
const ca = decodedCookie.split(";");
|
|
1336
1366
|
for (let i = 0; i < ca.length; i++) {
|
|
1337
1367
|
let c = ca[i];
|
|
@@ -1349,29 +1379,29 @@ var require_cookie = __commonJS({
|
|
|
1349
1379
|
var require_tags = __commonJS({
|
|
1350
1380
|
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1351
1381
|
"use strict";
|
|
1352
|
-
var
|
|
1353
|
-
var
|
|
1354
|
-
var
|
|
1355
|
-
var
|
|
1356
|
-
var
|
|
1382
|
+
var __defProp2 = Object.defineProperty;
|
|
1383
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1384
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1385
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1386
|
+
var __export2 = (target, all) => {
|
|
1357
1387
|
for (var name in all)
|
|
1358
|
-
|
|
1388
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1359
1389
|
};
|
|
1360
|
-
var
|
|
1390
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1361
1391
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1362
|
-
for (let key of
|
|
1363
|
-
if (!
|
|
1364
|
-
|
|
1392
|
+
for (let key of __getOwnPropNames2(from))
|
|
1393
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1394
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1365
1395
|
}
|
|
1366
1396
|
return to;
|
|
1367
1397
|
};
|
|
1368
|
-
var
|
|
1398
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1369
1399
|
var tags_exports = {};
|
|
1370
|
-
|
|
1400
|
+
__export2(tags_exports, {
|
|
1371
1401
|
HTML_TAGS: () => HTML_TAGS,
|
|
1372
1402
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1373
1403
|
});
|
|
1374
|
-
module2.exports =
|
|
1404
|
+
module2.exports = __toCommonJS2(tags_exports);
|
|
1375
1405
|
var HTML_TAGS = {
|
|
1376
1406
|
root: [
|
|
1377
1407
|
"body",
|
|
@@ -1517,22 +1547,22 @@ var require_tags = __commonJS({
|
|
|
1517
1547
|
var require_cjs2 = __commonJS({
|
|
1518
1548
|
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1519
1549
|
"use strict";
|
|
1520
|
-
var
|
|
1521
|
-
var
|
|
1522
|
-
var
|
|
1523
|
-
var
|
|
1524
|
-
var
|
|
1550
|
+
var __defProp2 = Object.defineProperty;
|
|
1551
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1552
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1553
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1554
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1525
1555
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1526
|
-
for (let key of
|
|
1527
|
-
if (!
|
|
1528
|
-
|
|
1556
|
+
for (let key of __getOwnPropNames2(from))
|
|
1557
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1558
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1529
1559
|
}
|
|
1530
1560
|
return to;
|
|
1531
1561
|
};
|
|
1532
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1533
|
-
var
|
|
1562
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
1563
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1534
1564
|
var utils_exports2 = {};
|
|
1535
|
-
module2.exports =
|
|
1565
|
+
module2.exports = __toCommonJS2(utils_exports2);
|
|
1536
1566
|
__reExport(utils_exports2, require_key(), module2.exports);
|
|
1537
1567
|
__reExport(utils_exports2, require_env(), module2.exports);
|
|
1538
1568
|
__reExport(utils_exports2, require_types(), module2.exports);
|
|
@@ -1548,1912 +1578,1958 @@ var require_cjs2 = __commonJS({
|
|
|
1548
1578
|
}
|
|
1549
1579
|
});
|
|
1550
1580
|
|
|
1551
|
-
//
|
|
1552
|
-
var
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
getSequenceValue: () => getSequenceValue,
|
|
1574
|
-
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
1575
|
-
getSubratio: () => getSubratio,
|
|
1576
|
-
getSubratioDifference: () => getSubratioDifference,
|
|
1577
|
-
hexToRgb: () => hexToRgb,
|
|
1578
|
-
hexToRgbArray: () => hexToRgbArray,
|
|
1579
|
-
hexToRgba: () => hexToRgba,
|
|
1580
|
-
hslToRgb: () => hslToRgb,
|
|
1581
|
-
isScalingUnit: () => isScalingUnit,
|
|
1582
|
-
mixTwoColors: () => mixTwoColors,
|
|
1583
|
-
mixTwoRgb: () => mixTwoRgb,
|
|
1584
|
-
mixTwoRgba: () => mixTwoRgba,
|
|
1585
|
-
numToLetterMap: () => numToLetterMap,
|
|
1586
|
-
opacify: () => opacify,
|
|
1587
|
-
returnSubThemeOrDefault: () => returnSubThemeOrDefault,
|
|
1588
|
-
rgbArrayToHex: () => rgbArrayToHex,
|
|
1589
|
-
rgbToHSL: () => rgbToHSL,
|
|
1590
|
-
rgbToHex: () => rgbToHex,
|
|
1591
|
-
setCustomFont: () => setCustomFont,
|
|
1592
|
-
setCustomFontMedia: () => setCustomFontMedia,
|
|
1593
|
-
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
1594
|
-
setScalingVar: () => setScalingVar,
|
|
1595
|
-
setSubScalingVar: () => setSubScalingVar,
|
|
1596
|
-
setVariables: () => setVariables
|
|
1597
|
-
});
|
|
1598
|
-
module.exports = __toCommonJS(utils_exports);
|
|
1599
|
-
|
|
1600
|
-
// src/utils/unit.js
|
|
1601
|
-
var isScalingUnit = (unit) => {
|
|
1602
|
-
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
1603
|
-
};
|
|
1604
|
-
|
|
1605
|
-
// src/utils/color.js
|
|
1606
|
-
var import_globals = __toESM(require_cjs(), 1);
|
|
1607
|
-
var import_utils = __toESM(require_cjs2(), 1);
|
|
1608
|
-
var ENV = "development";
|
|
1609
|
-
var colorStringToRgbaArray = (color) => {
|
|
1610
|
-
if (color === "")
|
|
1611
|
-
return [0, 0, 0, 0];
|
|
1612
|
-
if (color.toLowerCase() === "transparent")
|
|
1613
|
-
return [0, 0, 0, 0];
|
|
1614
|
-
if (color[0] === "#") {
|
|
1615
|
-
if (color.length < 7) {
|
|
1616
|
-
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
1617
|
-
}
|
|
1618
|
-
return [
|
|
1619
|
-
parseInt(color.substr(1, 2), 16),
|
|
1620
|
-
parseInt(color.substr(3, 2), 16),
|
|
1621
|
-
parseInt(color.substr(5, 2), 16),
|
|
1622
|
-
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
1623
|
-
];
|
|
1624
|
-
}
|
|
1625
|
-
if (color.indexOf("rgb") === -1) {
|
|
1626
|
-
if (import_globals.document && import_globals.window) {
|
|
1627
|
-
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
1628
|
-
const flag = "rgb(1, 2, 3)";
|
|
1629
|
-
elem.style.color = flag;
|
|
1630
|
-
if (elem.style.color !== flag) {
|
|
1631
|
-
import_globals.document.body.removeChild(elem);
|
|
1632
|
-
return;
|
|
1581
|
+
// ../utils/dist/cjs/index.js
|
|
1582
|
+
var require_cjs3 = __commonJS({
|
|
1583
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
1584
|
+
"use strict";
|
|
1585
|
+
var __create2 = Object.create;
|
|
1586
|
+
var __defProp2 = Object.defineProperty;
|
|
1587
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1588
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1589
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1590
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1591
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1592
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1593
|
+
};
|
|
1594
|
+
var __export2 = (target, all) => {
|
|
1595
|
+
for (var name in all)
|
|
1596
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1597
|
+
};
|
|
1598
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1599
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1600
|
+
for (let key of __getOwnPropNames2(from))
|
|
1601
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1602
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1633
1603
|
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1604
|
+
return to;
|
|
1605
|
+
};
|
|
1606
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1607
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1608
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1609
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1610
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1611
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1612
|
+
mod
|
|
1613
|
+
));
|
|
1614
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1615
|
+
var require_key2 = __commonJS2({
|
|
1616
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports2, module22) {
|
|
1617
|
+
"use strict";
|
|
1618
|
+
var __defProp22 = Object.defineProperty;
|
|
1619
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1620
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1621
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1622
|
+
var __export22 = (target, all) => {
|
|
1623
|
+
for (var name in all)
|
|
1624
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1625
|
+
};
|
|
1626
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1627
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1628
|
+
for (let key of __getOwnPropNames22(from))
|
|
1629
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1630
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1631
|
+
}
|
|
1632
|
+
return to;
|
|
1633
|
+
};
|
|
1634
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1635
|
+
var key_exports = {};
|
|
1636
|
+
__export22(key_exports, {
|
|
1637
|
+
createSnapshotId: () => createSnapshotId,
|
|
1638
|
+
generateKey: () => generateKey
|
|
1639
|
+
});
|
|
1640
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
1641
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1642
|
+
let index = 0;
|
|
1643
|
+
function newId() {
|
|
1644
|
+
index++;
|
|
1645
|
+
return index;
|
|
1646
|
+
}
|
|
1647
|
+
return newId;
|
|
1648
|
+
}();
|
|
1649
|
+
var createSnapshotId = generateKey;
|
|
1638
1650
|
}
|
|
1639
|
-
color = import_globals.window.getComputedStyle(elem).color;
|
|
1640
|
-
import_globals.document.body.removeChild(elem);
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
if (color.indexOf("rgb") === 0) {
|
|
1644
|
-
if (color.indexOf("rgba") === -1)
|
|
1645
|
-
color = `${color}, 1`;
|
|
1646
|
-
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
1647
|
-
}
|
|
1648
|
-
return [0, 0, 0, 0];
|
|
1649
|
-
};
|
|
1650
|
-
var mixTwoColors = (colorA, colorB, range = 0.5) => {
|
|
1651
|
-
colorA = colorStringToRgbaArray(colorA);
|
|
1652
|
-
colorB = colorStringToRgbaArray(colorB);
|
|
1653
|
-
return mixTwoRgba(colorA, colorB, range);
|
|
1654
|
-
};
|
|
1655
|
-
var hexToRgb = (hex, alpha = 1) => {
|
|
1656
|
-
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1657
|
-
return `rgb(${r},${g},${b})`;
|
|
1658
|
-
};
|
|
1659
|
-
var hexToRgbArray = (hex, alpha = 1) => {
|
|
1660
|
-
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1661
|
-
return [r, g, b];
|
|
1662
|
-
};
|
|
1663
|
-
var rgbToHex = (r, g, b) => {
|
|
1664
|
-
return "#" + (1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1);
|
|
1665
|
-
};
|
|
1666
|
-
var rgbArrayToHex = ([r, g, b]) => {
|
|
1667
|
-
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
1668
|
-
};
|
|
1669
|
-
var hexToRgba = (hex, alpha = 1) => {
|
|
1670
|
-
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1671
|
-
return `rgba(${r},${g},${b},${alpha})`;
|
|
1672
|
-
};
|
|
1673
|
-
var mixTwoRgb = (colorA, colorB, range = 0.5) => {
|
|
1674
|
-
const arr = [];
|
|
1675
|
-
for (let i = 0; i < 3; i++) {
|
|
1676
|
-
arr[i] = ~~(colorA[i] + (colorB[i] - colorA[i]) * range);
|
|
1677
|
-
}
|
|
1678
|
-
return `rgb(${arr})`;
|
|
1679
|
-
};
|
|
1680
|
-
var changeLightness = (delta, hsl) => {
|
|
1681
|
-
const [hue, saturation, lightness] = hsl;
|
|
1682
|
-
const newLightness = Math.max(
|
|
1683
|
-
0,
|
|
1684
|
-
Math.min(100, lightness + parseFloat(delta))
|
|
1685
|
-
);
|
|
1686
|
-
return [hue, saturation, newLightness];
|
|
1687
|
-
};
|
|
1688
|
-
var rgbToHSL = (r, g, b) => {
|
|
1689
|
-
const a = Math.max(r, g, b);
|
|
1690
|
-
const n = a - Math.min(r, g, b);
|
|
1691
|
-
const f = 1 - Math.abs(a + a - n - 1);
|
|
1692
|
-
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
1693
|
-
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
1694
|
-
};
|
|
1695
|
-
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
1696
|
-
Math.min(k - 3, 9 - k, 1),
|
|
1697
|
-
-1
|
|
1698
|
-
)) => [f(0), f(8), f(4)];
|
|
1699
|
-
var getColorShade = (col, amt) => {
|
|
1700
|
-
const num = parseInt(col, 16);
|
|
1701
|
-
let r = (num >> 16) + amt;
|
|
1702
|
-
if (r > 255)
|
|
1703
|
-
r = 255;
|
|
1704
|
-
else if (r < 0)
|
|
1705
|
-
r = 0;
|
|
1706
|
-
let b = (num >> 8 & 255) + amt;
|
|
1707
|
-
if (b > 255)
|
|
1708
|
-
b = 255;
|
|
1709
|
-
else if (b < 0)
|
|
1710
|
-
b = 0;
|
|
1711
|
-
let g = (num & 255) + amt;
|
|
1712
|
-
if (g > 255)
|
|
1713
|
-
g = 255;
|
|
1714
|
-
else if (g < 0)
|
|
1715
|
-
g = 0;
|
|
1716
|
-
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
1717
|
-
};
|
|
1718
|
-
var mixTwoRgba = (colorA, colorB, range = 0.5) => {
|
|
1719
|
-
const arr = [];
|
|
1720
|
-
for (let i = 0; i < 4; i++) {
|
|
1721
|
-
const round = i === 3 ? (x) => x : Math.round;
|
|
1722
|
-
arr[i] = round(
|
|
1723
|
-
colorA[i] + (colorB[i] - colorA[i]) * range
|
|
1724
|
-
);
|
|
1725
|
-
}
|
|
1726
|
-
return `rgba(${arr})`;
|
|
1727
|
-
};
|
|
1728
|
-
var opacify = (color, opacity) => {
|
|
1729
|
-
const arr = colorStringToRgbaArray(color);
|
|
1730
|
-
if (!arr) {
|
|
1731
|
-
if (ENV === "test" || ENV === "development")
|
|
1732
|
-
console.warn(color + " color is not rgba");
|
|
1733
|
-
return;
|
|
1734
|
-
}
|
|
1735
|
-
arr[3] = opacity;
|
|
1736
|
-
return `rgba(${arr})`;
|
|
1737
|
-
};
|
|
1738
|
-
var getRgbTone = (rgb, tone) => {
|
|
1739
|
-
if ((0, import_utils.isString)(rgb) && rgb.includes("rgb"))
|
|
1740
|
-
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
1741
|
-
if ((0, import_utils.isString)(rgb))
|
|
1742
|
-
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
1743
|
-
if ((0, import_utils.isNumber)(tone))
|
|
1744
|
-
tone += "";
|
|
1745
|
-
const toHex = rgbArrayToHex(rgb);
|
|
1746
|
-
const abs = tone.slice(0, 1);
|
|
1747
|
-
if (abs === "-" || abs === "+") {
|
|
1748
|
-
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
1749
|
-
return hexToRgbArray(colorShade).join(", ");
|
|
1750
|
-
} else {
|
|
1751
|
-
const [r, g, b] = rgb;
|
|
1752
|
-
const hsl = rgbToHSL(r, g, b);
|
|
1753
|
-
const [h, s, l] = hsl;
|
|
1754
|
-
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
1755
|
-
return newRgb;
|
|
1756
|
-
}
|
|
1757
|
-
};
|
|
1758
|
-
|
|
1759
|
-
// src/utils/theme.js
|
|
1760
|
-
var returnSubThemeOrDefault = (orig, theme) => {
|
|
1761
|
-
if (!orig)
|
|
1762
|
-
return;
|
|
1763
|
-
if (orig.themes && orig.themes[theme])
|
|
1764
|
-
return orig.themes[theme];
|
|
1765
|
-
if (orig[theme])
|
|
1766
|
-
return [orig, orig[theme]];
|
|
1767
|
-
return orig;
|
|
1768
|
-
};
|
|
1769
|
-
|
|
1770
|
-
// src/utils/font.js
|
|
1771
|
-
var getDefaultOrFirstKey = (LIBRARY, key) => {
|
|
1772
|
-
if (LIBRARY[key])
|
|
1773
|
-
return LIBRARY[key].value;
|
|
1774
|
-
if (LIBRARY.default)
|
|
1775
|
-
return LIBRARY[LIBRARY.default].value;
|
|
1776
|
-
const hasValue = Object.keys(LIBRARY)[0];
|
|
1777
|
-
return hasValue && LIBRARY[hasValue] && LIBRARY[hasValue].value;
|
|
1778
|
-
};
|
|
1779
|
-
var getFontFormat = (url) => url.split(/[#?]/)[0].split(".").pop().trim();
|
|
1780
|
-
var setInCustomFontMedia = (str) => `@font-face { ${str} }`;
|
|
1781
|
-
var setCustomFont = (name, url, weight) => `
|
|
1782
|
-
font-family: '${name}';
|
|
1783
|
-
font-style: normal;
|
|
1784
|
-
${weight && `font-weight: ${weight};`}
|
|
1785
|
-
src: url('${url}') format('${getFontFormat(url)}');`;
|
|
1786
|
-
var setCustomFontMedia = (name, url, weight) => `@font-face {
|
|
1787
|
-
${setCustomFont(name, url, weight)}
|
|
1788
|
-
}`;
|
|
1789
|
-
var getFontFaceEach = (name, weights) => {
|
|
1790
|
-
const keys = Object.keys(weights);
|
|
1791
|
-
return keys.map((key) => {
|
|
1792
|
-
const { url, fontWeight } = weights[key];
|
|
1793
|
-
return setCustomFont(name, url, fontWeight);
|
|
1794
|
-
});
|
|
1795
|
-
};
|
|
1796
|
-
var getFontFace = (LIBRARY) => {
|
|
1797
|
-
const keys = Object.keys(LIBRARY);
|
|
1798
|
-
return keys.map((key) => getFontFaceEach(key, LIBRARY[key].value));
|
|
1799
|
-
};
|
|
1800
|
-
var getFontFaceEachString = (name, weights) => {
|
|
1801
|
-
const isArr = weights[0];
|
|
1802
|
-
if (isArr)
|
|
1803
|
-
return getFontFaceEach(name, weights).map(setInCustomFontMedia);
|
|
1804
|
-
return setCustomFontMedia(name, weights.url);
|
|
1805
|
-
};
|
|
1806
|
-
var getFontFaceString = (LIBRARY) => {
|
|
1807
|
-
const keys = Object.keys(LIBRARY);
|
|
1808
|
-
return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
|
|
1809
|
-
};
|
|
1810
|
-
|
|
1811
|
-
// src/utils/sequence.js
|
|
1812
|
-
var import_utils5 = __toESM(require_cjs2(), 1);
|
|
1813
|
-
|
|
1814
|
-
// ../utils/dist/cjs/index.js
|
|
1815
|
-
var __create2 = Object.create;
|
|
1816
|
-
var __defProp2 = Object.defineProperty;
|
|
1817
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1818
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1819
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1820
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1821
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1822
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1823
|
-
};
|
|
1824
|
-
var __export2 = (target, all) => {
|
|
1825
|
-
for (var name in all)
|
|
1826
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1827
|
-
};
|
|
1828
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
1829
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1830
|
-
for (let key of __getOwnPropNames2(from))
|
|
1831
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1832
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1833
|
-
}
|
|
1834
|
-
return to;
|
|
1835
|
-
};
|
|
1836
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1837
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1838
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1839
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1840
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1841
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1842
|
-
mod
|
|
1843
|
-
));
|
|
1844
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1845
|
-
var require_key2 = __commonJS2({
|
|
1846
|
-
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1847
|
-
"use strict";
|
|
1848
|
-
var __defProp22 = Object.defineProperty;
|
|
1849
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1850
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1851
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1852
|
-
var __export22 = (target, all) => {
|
|
1853
|
-
for (var name in all)
|
|
1854
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1855
|
-
};
|
|
1856
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1857
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1858
|
-
for (let key of __getOwnPropNames22(from))
|
|
1859
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1860
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1861
|
-
}
|
|
1862
|
-
return to;
|
|
1863
|
-
};
|
|
1864
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1865
|
-
var key_exports = {};
|
|
1866
|
-
__export22(key_exports, {
|
|
1867
|
-
createSnapshotId: () => createSnapshotId,
|
|
1868
|
-
generateKey: () => generateKey
|
|
1869
|
-
});
|
|
1870
|
-
module2.exports = __toCommonJS22(key_exports);
|
|
1871
|
-
var generateKey = /* @__PURE__ */ function() {
|
|
1872
|
-
let index = 0;
|
|
1873
|
-
function newId() {
|
|
1874
|
-
index++;
|
|
1875
|
-
return index;
|
|
1876
|
-
}
|
|
1877
|
-
return newId;
|
|
1878
|
-
}();
|
|
1879
|
-
var createSnapshotId = generateKey;
|
|
1880
|
-
}
|
|
1881
|
-
});
|
|
1882
|
-
var require_env2 = __commonJS2({
|
|
1883
|
-
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
1884
|
-
"use strict";
|
|
1885
|
-
var __defProp22 = Object.defineProperty;
|
|
1886
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1887
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1888
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1889
|
-
var __export22 = (target, all) => {
|
|
1890
|
-
for (var name in all)
|
|
1891
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1892
|
-
};
|
|
1893
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1894
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1895
|
-
for (let key of __getOwnPropNames22(from))
|
|
1896
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1897
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1898
|
-
}
|
|
1899
|
-
return to;
|
|
1900
|
-
};
|
|
1901
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1902
|
-
var env_exports = {};
|
|
1903
|
-
__export22(env_exports, {
|
|
1904
|
-
NODE_ENV: () => NODE_ENV,
|
|
1905
|
-
getNev: () => getNev,
|
|
1906
|
-
isDevelopment: () => isDevelopment,
|
|
1907
|
-
isProduction: () => isProduction,
|
|
1908
|
-
isTest: () => isTest
|
|
1909
1651
|
});
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
var
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1652
|
+
var require_env2 = __commonJS2({
|
|
1653
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports2, module22) {
|
|
1654
|
+
"use strict";
|
|
1655
|
+
var __defProp22 = Object.defineProperty;
|
|
1656
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1657
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1658
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1659
|
+
var __export22 = (target, all) => {
|
|
1660
|
+
for (var name in all)
|
|
1661
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1662
|
+
};
|
|
1663
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1664
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1665
|
+
for (let key of __getOwnPropNames22(from))
|
|
1666
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1667
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1668
|
+
}
|
|
1669
|
+
return to;
|
|
1670
|
+
};
|
|
1671
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1672
|
+
var env_exports = {};
|
|
1673
|
+
__export22(env_exports, {
|
|
1674
|
+
NODE_ENV: () => NODE_ENV,
|
|
1675
|
+
getNev: () => getNev,
|
|
1676
|
+
isDevelopment: () => isDevelopment,
|
|
1677
|
+
isProduction: () => isProduction,
|
|
1678
|
+
isTest: () => isTest
|
|
1679
|
+
});
|
|
1680
|
+
module22.exports = __toCommonJS22(env_exports);
|
|
1681
|
+
var NODE_ENV = "development";
|
|
1682
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1683
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1684
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1685
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1934
1686
|
}
|
|
1935
|
-
return to;
|
|
1936
|
-
};
|
|
1937
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1938
|
-
var globals_exports = {};
|
|
1939
|
-
__export22(globals_exports, {
|
|
1940
|
-
document: () => document22,
|
|
1941
|
-
global: () => global,
|
|
1942
|
-
self: () => self,
|
|
1943
|
-
window: () => window2
|
|
1944
1687
|
});
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
var
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1688
|
+
var require_globals2 = __commonJS2({
|
|
1689
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
1690
|
+
"use strict";
|
|
1691
|
+
var __defProp22 = Object.defineProperty;
|
|
1692
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1693
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1694
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1695
|
+
var __export22 = (target, all) => {
|
|
1696
|
+
for (var name in all)
|
|
1697
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1698
|
+
};
|
|
1699
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1700
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1701
|
+
for (let key of __getOwnPropNames22(from))
|
|
1702
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1703
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1704
|
+
}
|
|
1705
|
+
return to;
|
|
1706
|
+
};
|
|
1707
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1708
|
+
var globals_exports = {};
|
|
1709
|
+
__export22(globals_exports, {
|
|
1710
|
+
document: () => document22,
|
|
1711
|
+
global: () => global,
|
|
1712
|
+
self: () => self,
|
|
1713
|
+
window: () => window22
|
|
1714
|
+
});
|
|
1715
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
1716
|
+
var global = globalThis;
|
|
1717
|
+
var self = globalThis;
|
|
1718
|
+
var window22 = globalThis;
|
|
1719
|
+
var document22 = window22.document;
|
|
1968
1720
|
}
|
|
1969
|
-
return to;
|
|
1970
|
-
};
|
|
1971
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1972
|
-
var node_exports = {};
|
|
1973
|
-
__export22(node_exports, {
|
|
1974
|
-
isHtmlElement: () => isHtmlElement,
|
|
1975
|
-
isNode: () => isNode
|
|
1976
1721
|
});
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
});
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
__defProp22(
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1722
|
+
var require_node2 = __commonJS2({
|
|
1723
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports2, module22) {
|
|
1724
|
+
"use strict";
|
|
1725
|
+
var __defProp22 = Object.defineProperty;
|
|
1726
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1727
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1728
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1729
|
+
var __export22 = (target, all) => {
|
|
1730
|
+
for (var name in all)
|
|
1731
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1732
|
+
};
|
|
1733
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1734
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1735
|
+
for (let key of __getOwnPropNames22(from))
|
|
1736
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1737
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1738
|
+
}
|
|
1739
|
+
return to;
|
|
1740
|
+
};
|
|
1741
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1742
|
+
var node_exports = {};
|
|
1743
|
+
__export22(node_exports, {
|
|
1744
|
+
isHtmlElement: () => isHtmlElement,
|
|
1745
|
+
isNode: () => isNode
|
|
1746
|
+
});
|
|
1747
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
1748
|
+
var import_globals2 = require_globals2();
|
|
1749
|
+
var isNode = (obj) => {
|
|
1750
|
+
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1751
|
+
};
|
|
1752
|
+
var isHtmlElement = (obj) => {
|
|
1753
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1754
|
+
};
|
|
2003
1755
|
}
|
|
2004
|
-
return to;
|
|
2005
|
-
};
|
|
2006
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2007
|
-
var types_exports = {};
|
|
2008
|
-
__export22(types_exports, {
|
|
2009
|
-
TYPES: () => TYPES,
|
|
2010
|
-
is: () => is,
|
|
2011
|
-
isArray: () => isArray3,
|
|
2012
|
-
isBoolean: () => isBoolean,
|
|
2013
|
-
isDate: () => isDate,
|
|
2014
|
-
isDefined: () => isDefined2,
|
|
2015
|
-
isFunction: () => isFunction,
|
|
2016
|
-
isNot: () => isNot,
|
|
2017
|
-
isNull: () => isNull,
|
|
2018
|
-
isNumber: () => isNumber2,
|
|
2019
|
-
isObject: () => isObject3,
|
|
2020
|
-
isObjectLike: () => isObjectLike2,
|
|
2021
|
-
isString: () => isString22,
|
|
2022
|
-
isUndefined: () => isUndefined
|
|
2023
1756
|
});
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
var
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
1757
|
+
var require_types2 = __commonJS2({
|
|
1758
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports2, module22) {
|
|
1759
|
+
"use strict";
|
|
1760
|
+
var __defProp22 = Object.defineProperty;
|
|
1761
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1762
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1763
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1764
|
+
var __export22 = (target, all) => {
|
|
1765
|
+
for (var name in all)
|
|
1766
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1767
|
+
};
|
|
1768
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1769
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1770
|
+
for (let key of __getOwnPropNames22(from))
|
|
1771
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1772
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1773
|
+
}
|
|
1774
|
+
return to;
|
|
1775
|
+
};
|
|
1776
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1777
|
+
var types_exports = {};
|
|
1778
|
+
__export22(types_exports, {
|
|
1779
|
+
TYPES: () => TYPES,
|
|
1780
|
+
is: () => is,
|
|
1781
|
+
isArray: () => isArray3,
|
|
1782
|
+
isBoolean: () => isBoolean,
|
|
1783
|
+
isDate: () => isDate,
|
|
1784
|
+
isDefined: () => isDefined2,
|
|
1785
|
+
isFunction: () => isFunction,
|
|
1786
|
+
isNot: () => isNot,
|
|
1787
|
+
isNull: () => isNull,
|
|
1788
|
+
isNumber: () => isNumber2,
|
|
1789
|
+
isObject: () => isObject3,
|
|
1790
|
+
isObjectLike: () => isObjectLike2,
|
|
1791
|
+
isString: () => isString22,
|
|
1792
|
+
isUndefined: () => isUndefined
|
|
1793
|
+
});
|
|
1794
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
1795
|
+
var import_node = require_node2();
|
|
1796
|
+
var isObject3 = (arg) => {
|
|
1797
|
+
if (arg === null)
|
|
1798
|
+
return false;
|
|
1799
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
1800
|
+
};
|
|
1801
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
1802
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
1803
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
1804
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
1805
|
+
var isNull = (arg) => arg === null;
|
|
1806
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
1807
|
+
var isDate = (d) => d instanceof Date;
|
|
1808
|
+
var isObjectLike2 = (arg) => {
|
|
1809
|
+
if (arg === null)
|
|
1810
|
+
return false;
|
|
1811
|
+
return typeof arg === "object";
|
|
1812
|
+
};
|
|
1813
|
+
var isDefined2 = (arg) => {
|
|
1814
|
+
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1815
|
+
};
|
|
1816
|
+
var isUndefined = (arg) => {
|
|
1817
|
+
return arg === void 0;
|
|
1818
|
+
};
|
|
1819
|
+
var TYPES = {
|
|
1820
|
+
boolean: isBoolean,
|
|
1821
|
+
array: isArray3,
|
|
1822
|
+
object: isObject3,
|
|
1823
|
+
string: isString22,
|
|
1824
|
+
date: isDate,
|
|
1825
|
+
number: isNumber2,
|
|
1826
|
+
null: isNull,
|
|
1827
|
+
function: isFunction,
|
|
1828
|
+
objectLike: isObjectLike2,
|
|
1829
|
+
node: import_node.isNode,
|
|
1830
|
+
htmlElement: import_node.isHtmlElement,
|
|
1831
|
+
defined: isDefined2
|
|
1832
|
+
};
|
|
1833
|
+
var is = (arg) => {
|
|
1834
|
+
return (...args) => {
|
|
1835
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1836
|
+
};
|
|
1837
|
+
};
|
|
1838
|
+
var isNot = (arg) => {
|
|
1839
|
+
return (...args) => {
|
|
1840
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
2091
1843
|
}
|
|
2092
|
-
return to;
|
|
2093
|
-
};
|
|
2094
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2095
|
-
var array_exports = {};
|
|
2096
|
-
__export22(array_exports, {
|
|
2097
|
-
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
2098
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
2099
|
-
arraysEqual: () => arraysEqual,
|
|
2100
|
-
createNestedObject: () => createNestedObject,
|
|
2101
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
2102
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
2103
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
2104
|
-
joinArrays: () => joinArrays,
|
|
2105
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
2106
|
-
mergeArray: () => mergeArray,
|
|
2107
|
-
removeFromArray: () => removeFromArray,
|
|
2108
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
2109
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
2110
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
2111
|
-
swapItemsInArray: () => swapItemsInArray
|
|
2112
1844
|
});
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
throw new Error("Invalid index");
|
|
2130
|
-
}
|
|
2131
|
-
arr.splice(index, 1);
|
|
2132
|
-
} else if ((0, import_types.isArray)(index)) {
|
|
2133
|
-
index.forEach((idx) => removeFromArray(arr, idx));
|
|
2134
|
-
} else {
|
|
2135
|
-
throw new Error("Invalid index");
|
|
2136
|
-
}
|
|
2137
|
-
return arr;
|
|
2138
|
-
};
|
|
2139
|
-
var swapItemsInArray = (arr, i, j) => {
|
|
2140
|
-
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
2141
|
-
};
|
|
2142
|
-
var joinArrays = (...arrays) => {
|
|
2143
|
-
return [].concat(...arrays);
|
|
2144
|
-
};
|
|
2145
|
-
var mergeArray = (arr, excludeFrom = []) => {
|
|
2146
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
2147
|
-
};
|
|
2148
|
-
var mergeAndCloneIfArray = (obj) => {
|
|
2149
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
2150
|
-
};
|
|
2151
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
2152
|
-
const index = arr.indexOf(value);
|
|
2153
|
-
if (index !== -1) {
|
|
2154
|
-
return arr.slice(0, index);
|
|
2155
|
-
}
|
|
2156
|
-
return arr;
|
|
2157
|
-
};
|
|
2158
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
2159
|
-
if (!(0, import_types.isArray)(arr))
|
|
2160
|
-
return;
|
|
2161
|
-
const index = arr.indexOf(value);
|
|
2162
|
-
if (index !== -1) {
|
|
2163
|
-
return arr.slice(index + 1);
|
|
2164
|
-
}
|
|
2165
|
-
return arr;
|
|
2166
|
-
};
|
|
2167
|
-
var createNestedObject = (arr, lastValue) => {
|
|
2168
|
-
const nestedObject = {};
|
|
2169
|
-
if (arr.length === 0) {
|
|
2170
|
-
return lastValue;
|
|
2171
|
-
}
|
|
2172
|
-
arr.reduce((obj, value, index) => {
|
|
2173
|
-
if (!obj[value]) {
|
|
2174
|
-
obj[value] = {};
|
|
2175
|
-
}
|
|
2176
|
-
if (index === arr.length - 1 && lastValue) {
|
|
2177
|
-
obj[value] = lastValue;
|
|
2178
|
-
}
|
|
2179
|
-
return obj[value];
|
|
2180
|
-
}, nestedObject);
|
|
2181
|
-
return nestedObject;
|
|
2182
|
-
};
|
|
2183
|
-
var removeValueFromArray = (arr, value) => {
|
|
2184
|
-
const index = arr.indexOf(value);
|
|
2185
|
-
if (index > -1) {
|
|
2186
|
-
const newArray = [...arr];
|
|
2187
|
-
newArray.splice(index, 1);
|
|
2188
|
-
return newArray;
|
|
2189
|
-
}
|
|
2190
|
-
return arr;
|
|
2191
|
-
};
|
|
2192
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
2193
|
-
return arr.filter((item) => item !== value);
|
|
2194
|
-
};
|
|
2195
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
2196
|
-
const result = [];
|
|
2197
|
-
for (let i = 0; i < array.length; i++) {
|
|
2198
|
-
result.push(array[i]);
|
|
2199
|
-
if (i < array.length - 1) {
|
|
2200
|
-
result.push(item);
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
return result;
|
|
2204
|
-
};
|
|
2205
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
2206
|
-
const newArray = [...array];
|
|
2207
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
2208
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
2209
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
2210
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
2211
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
2212
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
2213
|
-
}
|
|
2214
|
-
return newArray;
|
|
2215
|
-
};
|
|
2216
|
-
var arraysEqual = (arr1, arr2) => {
|
|
2217
|
-
if (arr1.length !== arr2.length) {
|
|
2218
|
-
return false;
|
|
2219
|
-
}
|
|
2220
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
2221
|
-
if (arr1[i] !== arr2[i]) {
|
|
2222
|
-
return false;
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
return true;
|
|
2226
|
-
};
|
|
2227
|
-
}
|
|
2228
|
-
});
|
|
2229
|
-
var require_string2 = __commonJS2({
|
|
2230
|
-
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
2231
|
-
"use strict";
|
|
2232
|
-
var __defProp22 = Object.defineProperty;
|
|
2233
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2234
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2235
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2236
|
-
var __export22 = (target, all) => {
|
|
2237
|
-
for (var name in all)
|
|
2238
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2239
|
-
};
|
|
2240
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2241
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2242
|
-
for (let key of __getOwnPropNames22(from))
|
|
2243
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2244
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2245
|
-
}
|
|
2246
|
-
return to;
|
|
2247
|
-
};
|
|
2248
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2249
|
-
var string_exports = {};
|
|
2250
|
-
__export22(string_exports, {
|
|
2251
|
-
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2252
|
-
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2253
|
-
findKeyPosition: () => findKeyPosition,
|
|
2254
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2255
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2256
|
-
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2257
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
2258
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2259
|
-
});
|
|
2260
|
-
module2.exports = __toCommonJS22(string_exports);
|
|
2261
|
-
var stringIncludesAny = (str, characters) => {
|
|
2262
|
-
for (const char of characters) {
|
|
2263
|
-
if (str.includes(char)) {
|
|
2264
|
-
return true;
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
return false;
|
|
2268
|
-
};
|
|
2269
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
2270
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2271
|
-
return str.replace(pattern, "");
|
|
2272
|
-
};
|
|
2273
|
-
var brackRegex = {
|
|
2274
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2275
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2276
|
-
};
|
|
2277
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2278
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2279
|
-
return str;
|
|
2280
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
2281
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
2282
|
-
if (parentPath) {
|
|
2283
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2284
|
-
let parentState = state;
|
|
2285
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
2286
|
-
parentState = parentState.parent;
|
|
2287
|
-
if (!parentState) {
|
|
2288
|
-
return "";
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
const value = parentState[variable.trim()];
|
|
2292
|
-
return value !== void 0 ? `${value}` : "";
|
|
2293
|
-
} else {
|
|
2294
|
-
const value = state[variable.trim()];
|
|
2295
|
-
return value !== void 0 ? `${value}` : "";
|
|
2296
|
-
}
|
|
2297
|
-
});
|
|
2298
|
-
};
|
|
2299
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
2300
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2301
|
-
};
|
|
2302
|
-
var findKeyPosition = (str, key) => {
|
|
2303
|
-
const lines = str.split("\n");
|
|
2304
|
-
let startLineNumber = -1;
|
|
2305
|
-
let endLineNumber = -1;
|
|
2306
|
-
let startColumn = -1;
|
|
2307
|
-
let endColumn = -1;
|
|
2308
|
-
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2309
|
-
let braceCount = 0;
|
|
2310
|
-
let foundKey = false;
|
|
2311
|
-
for (let i = 0; i < lines.length; i++) {
|
|
2312
|
-
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2313
|
-
foundKey = true;
|
|
2314
|
-
startLineNumber = i + 1;
|
|
2315
|
-
startColumn = lines[i].indexOf(key) + 1;
|
|
2316
|
-
if (lines[i].includes("{}")) {
|
|
2317
|
-
endLineNumber = startLineNumber;
|
|
2318
|
-
endColumn = lines[i].indexOf("{}") + 3;
|
|
2319
|
-
break;
|
|
2320
|
-
}
|
|
2321
|
-
const line = lines[i].slice(startColumn + key.length);
|
|
2322
|
-
if (line.includes("{") || line.includes("[")) {
|
|
2323
|
-
braceCount = 1;
|
|
2324
|
-
} else {
|
|
2325
|
-
endLineNumber = i + 1;
|
|
2326
|
-
endColumn = lines[i].length + 1;
|
|
2327
|
-
break;
|
|
2328
|
-
}
|
|
2329
|
-
} else if (foundKey) {
|
|
2330
|
-
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2331
|
-
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2332
|
-
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2333
|
-
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2334
|
-
if (braceCount === 0) {
|
|
2335
|
-
endLineNumber = i + 1;
|
|
2336
|
-
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2337
|
-
break;
|
|
1845
|
+
var require_array2 = __commonJS2({
|
|
1846
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports2, module22) {
|
|
1847
|
+
"use strict";
|
|
1848
|
+
var __defProp22 = Object.defineProperty;
|
|
1849
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1850
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1851
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1852
|
+
var __export22 = (target, all) => {
|
|
1853
|
+
for (var name in all)
|
|
1854
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1855
|
+
};
|
|
1856
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1857
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1858
|
+
for (let key of __getOwnPropNames22(from))
|
|
1859
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1860
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2338
1861
|
}
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
for (var name in all)
|
|
2378
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2379
|
-
};
|
|
2380
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2381
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2382
|
-
for (let key of __getOwnPropNames22(from))
|
|
2383
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2384
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2385
|
-
}
|
|
2386
|
-
return to;
|
|
2387
|
-
};
|
|
2388
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2389
|
-
var object_exports = {};
|
|
2390
|
-
__export22(object_exports, {
|
|
2391
|
-
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2392
|
-
clone: () => clone,
|
|
2393
|
-
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2394
|
-
deepClone: () => deepClone2,
|
|
2395
|
-
deepCloneExclude: () => deepCloneExclude,
|
|
2396
|
-
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2397
|
-
deepContains: () => deepContains,
|
|
2398
|
-
deepDestringify: () => deepDestringify,
|
|
2399
|
-
deepDiff: () => deepDiff,
|
|
2400
|
-
deepMerge: () => deepMerge2,
|
|
2401
|
-
deepStringify: () => deepStringify,
|
|
2402
|
-
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2403
|
-
diff: () => diff,
|
|
2404
|
-
diffArrays: () => diffArrays,
|
|
2405
|
-
diffObjects: () => diffObjects,
|
|
2406
|
-
exec: () => exec,
|
|
2407
|
-
flattenRecursive: () => flattenRecursive,
|
|
2408
|
-
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2409
|
-
getExtendsInElement: () => getExtendsInElement,
|
|
2410
|
-
hasOwnProperty: () => hasOwnProperty,
|
|
2411
|
-
isEmpty: () => isEmpty,
|
|
2412
|
-
isEmptyObject: () => isEmptyObject,
|
|
2413
|
-
isEqualDeep: () => isEqualDeep,
|
|
2414
|
-
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2415
|
-
map: () => map,
|
|
2416
|
-
merge: () => merge,
|
|
2417
|
-
mergeArrayExclude: () => mergeArrayExclude,
|
|
2418
|
-
mergeIfExisted: () => mergeIfExisted,
|
|
2419
|
-
objectToString: () => objectToString,
|
|
2420
|
-
overwrite: () => overwrite,
|
|
2421
|
-
overwriteDeep: () => overwriteDeep,
|
|
2422
|
-
overwriteShallow: () => overwriteShallow,
|
|
2423
|
-
removeFromObject: () => removeFromObject,
|
|
2424
|
-
stringToObject: () => stringToObject
|
|
2425
|
-
});
|
|
2426
|
-
module2.exports = __toCommonJS22(object_exports);
|
|
2427
|
-
var import_globals2 = require_globals2();
|
|
2428
|
-
var import_types = require_types2();
|
|
2429
|
-
var import_array = require_array2();
|
|
2430
|
-
var import_string = require_string2();
|
|
2431
|
-
var exec = (param, element, state, context) => {
|
|
2432
|
-
if ((0, import_types.isFunction)(param)) {
|
|
2433
|
-
return param(
|
|
2434
|
-
element,
|
|
2435
|
-
state || element.state,
|
|
2436
|
-
context || element.context
|
|
2437
|
-
);
|
|
2438
|
-
}
|
|
2439
|
-
return param;
|
|
2440
|
-
};
|
|
2441
|
-
var map = (obj, extention, element) => {
|
|
2442
|
-
for (const e in extention) {
|
|
2443
|
-
obj[e] = exec(extention[e], element);
|
|
2444
|
-
}
|
|
2445
|
-
};
|
|
2446
|
-
var merge = (element, obj, excludeFrom = []) => {
|
|
2447
|
-
for (const e in obj) {
|
|
2448
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2449
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2450
|
-
continue;
|
|
2451
|
-
const elementProp = element[e];
|
|
2452
|
-
const objProp = obj[e];
|
|
2453
|
-
if (elementProp === void 0) {
|
|
2454
|
-
element[e] = objProp;
|
|
2455
|
-
}
|
|
2456
|
-
}
|
|
2457
|
-
return element;
|
|
2458
|
-
};
|
|
2459
|
-
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2460
|
-
for (const e in extend) {
|
|
2461
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2462
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2463
|
-
continue;
|
|
2464
|
-
const elementProp = element[e];
|
|
2465
|
-
const extendProp = extend[e];
|
|
2466
|
-
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2467
|
-
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2468
|
-
} else if (elementProp === void 0) {
|
|
2469
|
-
element[e] = extendProp;
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
return element;
|
|
2473
|
-
};
|
|
2474
|
-
var clone = (obj, excludeFrom = []) => {
|
|
2475
|
-
const o = {};
|
|
2476
|
-
for (const prop in obj) {
|
|
2477
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2478
|
-
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2479
|
-
continue;
|
|
2480
|
-
o[prop] = obj[prop];
|
|
2481
|
-
}
|
|
2482
|
-
return o;
|
|
2483
|
-
};
|
|
2484
|
-
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2485
|
-
if ((0, import_types.isArray)(obj)) {
|
|
2486
|
-
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2487
|
-
}
|
|
2488
|
-
const o = {};
|
|
2489
|
-
for (const k in obj) {
|
|
2490
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2491
|
-
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2492
|
-
continue;
|
|
2493
|
-
let v = obj[k];
|
|
2494
|
-
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2495
|
-
v = mergeArrayExclude(v, excludeFrom);
|
|
2496
|
-
}
|
|
2497
|
-
if ((0, import_types.isArray)(v)) {
|
|
2498
|
-
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2499
|
-
} else if ((0, import_types.isObject)(v)) {
|
|
2500
|
-
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2501
|
-
} else
|
|
2502
|
-
o[k] = v;
|
|
2503
|
-
}
|
|
2504
|
-
return o;
|
|
2505
|
-
};
|
|
2506
|
-
var mergeArrayExclude = (arr, excl = []) => {
|
|
2507
|
-
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2508
|
-
};
|
|
2509
|
-
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2510
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2511
|
-
for (const prop in obj) {
|
|
2512
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2513
|
-
continue;
|
|
2514
|
-
if (prop === "__proto__")
|
|
2515
|
-
continue;
|
|
2516
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2517
|
-
continue;
|
|
2518
|
-
let objProp = obj[prop];
|
|
2519
|
-
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2520
|
-
continue;
|
|
2521
|
-
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2522
|
-
objProp = (0, import_array.mergeArray)(objProp);
|
|
2523
|
-
}
|
|
2524
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2525
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2526
|
-
} else
|
|
2527
|
-
o[prop] = objProp;
|
|
2528
|
-
}
|
|
2529
|
-
return o;
|
|
2530
|
-
};
|
|
2531
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2532
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2533
|
-
for (const prop in obj) {
|
|
2534
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2535
|
-
continue;
|
|
2536
|
-
const objProp = obj[prop];
|
|
2537
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2538
|
-
continue;
|
|
2539
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2540
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2541
|
-
} else
|
|
2542
|
-
o[prop] = objProp;
|
|
2543
|
-
}
|
|
2544
|
-
return o;
|
|
2545
|
-
};
|
|
2546
|
-
var deepStringify = (obj, stringified = {}) => {
|
|
2547
|
-
for (const prop in obj) {
|
|
2548
|
-
const objProp = obj[prop];
|
|
2549
|
-
if ((0, import_types.isFunction)(objProp)) {
|
|
2550
|
-
stringified[prop] = objProp.toString();
|
|
2551
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2552
|
-
stringified[prop] = {};
|
|
2553
|
-
deepStringify(objProp, stringified[prop]);
|
|
2554
|
-
} else if ((0, import_types.isArray)(objProp)) {
|
|
2555
|
-
stringified[prop] = [];
|
|
2556
|
-
objProp.forEach((v, i) => {
|
|
2557
|
-
if ((0, import_types.isObject)(v)) {
|
|
2558
|
-
stringified[prop][i] = {};
|
|
2559
|
-
deepStringify(v, stringified[prop][i]);
|
|
2560
|
-
} else if ((0, import_types.isFunction)(v)) {
|
|
2561
|
-
stringified[prop][i] = v.toString();
|
|
2562
|
-
} else {
|
|
2563
|
-
stringified[prop][i] = v;
|
|
2564
|
-
}
|
|
2565
|
-
});
|
|
2566
|
-
} else {
|
|
2567
|
-
stringified[prop] = objProp;
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
return stringified;
|
|
2571
|
-
};
|
|
2572
|
-
var objectToString = (obj = {}, indent = 0) => {
|
|
2573
|
-
const spaces = " ".repeat(indent);
|
|
2574
|
-
let str = "{\n";
|
|
2575
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
2576
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2577
|
-
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2578
|
-
str += `${spaces} ${stringedKey}: `;
|
|
2579
|
-
if ((0, import_types.isArray)(value)) {
|
|
2580
|
-
str += "[\n";
|
|
2581
|
-
for (const element of value) {
|
|
2582
|
-
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2583
|
-
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2584
|
-
`;
|
|
2585
|
-
} else if ((0, import_types.isString)(element)) {
|
|
2586
|
-
str += `${spaces} '${element}',
|
|
2587
|
-
`;
|
|
2588
|
-
} else {
|
|
2589
|
-
str += `${spaces} ${element},
|
|
2590
|
-
`;
|
|
1862
|
+
return to;
|
|
1863
|
+
};
|
|
1864
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1865
|
+
var array_exports = {};
|
|
1866
|
+
__export22(array_exports, {
|
|
1867
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1868
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1869
|
+
arraysEqual: () => arraysEqual,
|
|
1870
|
+
createNestedObject: () => createNestedObject,
|
|
1871
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1872
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1873
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1874
|
+
joinArrays: () => joinArrays,
|
|
1875
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1876
|
+
mergeArray: () => mergeArray,
|
|
1877
|
+
removeFromArray: () => removeFromArray,
|
|
1878
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
1879
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1880
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
1881
|
+
swapItemsInArray: () => swapItemsInArray
|
|
1882
|
+
});
|
|
1883
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
1884
|
+
var import_object = require_object2();
|
|
1885
|
+
var import_types = require_types2();
|
|
1886
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1887
|
+
return arr2.every((val) => arr1.includes(val));
|
|
1888
|
+
};
|
|
1889
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1890
|
+
return arr.reduce((count, currentValue) => {
|
|
1891
|
+
return currentValue === value ? count + 1 : count;
|
|
1892
|
+
}, 0);
|
|
1893
|
+
};
|
|
1894
|
+
var removeFromArray = (arr, index) => {
|
|
1895
|
+
if ((0, import_types.isString)(index))
|
|
1896
|
+
index = parseInt(index);
|
|
1897
|
+
if ((0, import_types.isNumber)(index)) {
|
|
1898
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1899
|
+
throw new Error("Invalid index");
|
|
2591
1900
|
}
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
1901
|
+
arr.splice(index, 1);
|
|
1902
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
1903
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1904
|
+
} else {
|
|
1905
|
+
throw new Error("Invalid index");
|
|
1906
|
+
}
|
|
1907
|
+
return arr;
|
|
1908
|
+
};
|
|
1909
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
1910
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1911
|
+
};
|
|
1912
|
+
var joinArrays = (...arrays) => {
|
|
1913
|
+
return [].concat(...arrays);
|
|
1914
|
+
};
|
|
1915
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
1916
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
1917
|
+
};
|
|
1918
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
1919
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
1920
|
+
};
|
|
1921
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
1922
|
+
const index = arr.indexOf(value);
|
|
1923
|
+
if (index !== -1) {
|
|
1924
|
+
return arr.slice(0, index);
|
|
1925
|
+
}
|
|
1926
|
+
return arr;
|
|
1927
|
+
};
|
|
1928
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
1929
|
+
if (!(0, import_types.isArray)(arr))
|
|
1930
|
+
return;
|
|
1931
|
+
const index = arr.indexOf(value);
|
|
1932
|
+
if (index !== -1) {
|
|
1933
|
+
return arr.slice(index + 1);
|
|
1934
|
+
}
|
|
1935
|
+
return arr;
|
|
1936
|
+
};
|
|
1937
|
+
var createNestedObject = (arr, lastValue) => {
|
|
1938
|
+
const nestedObject = {};
|
|
1939
|
+
if (arr.length === 0) {
|
|
1940
|
+
return lastValue;
|
|
1941
|
+
}
|
|
1942
|
+
arr.reduce((obj, value, index) => {
|
|
1943
|
+
if (!obj[value]) {
|
|
1944
|
+
obj[value] = {};
|
|
2624
1945
|
}
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
1946
|
+
if (index === arr.length - 1 && lastValue) {
|
|
1947
|
+
obj[value] = lastValue;
|
|
1948
|
+
}
|
|
1949
|
+
return obj[value];
|
|
1950
|
+
}, nestedObject);
|
|
1951
|
+
return nestedObject;
|
|
1952
|
+
};
|
|
1953
|
+
var removeValueFromArray = (arr, value) => {
|
|
1954
|
+
const index = arr.indexOf(value);
|
|
1955
|
+
if (index > -1) {
|
|
1956
|
+
const newArray = [...arr];
|
|
1957
|
+
newArray.splice(index, 1);
|
|
1958
|
+
return newArray;
|
|
1959
|
+
}
|
|
1960
|
+
return arr;
|
|
1961
|
+
};
|
|
1962
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
1963
|
+
return arr.filter((item) => item !== value);
|
|
1964
|
+
};
|
|
1965
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
1966
|
+
const result = [];
|
|
1967
|
+
for (let i = 0; i < array.length; i++) {
|
|
1968
|
+
result.push(array[i]);
|
|
1969
|
+
if (i < array.length - 1) {
|
|
1970
|
+
result.push(item);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
return result;
|
|
1974
|
+
};
|
|
1975
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1976
|
+
const newArray = [...array];
|
|
1977
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
1978
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1979
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1980
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1981
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1982
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
1983
|
+
}
|
|
1984
|
+
return newArray;
|
|
1985
|
+
};
|
|
1986
|
+
var arraysEqual = (arr1, arr2) => {
|
|
1987
|
+
if (arr1.length !== arr2.length) {
|
|
1988
|
+
return false;
|
|
1989
|
+
}
|
|
1990
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
1991
|
+
if (arr1[i] !== arr2[i]) {
|
|
1992
|
+
return false;
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
return true;
|
|
1996
|
+
};
|
|
2629
1997
|
}
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
1998
|
+
});
|
|
1999
|
+
var require_string2 = __commonJS2({
|
|
2000
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports2, module22) {
|
|
2001
|
+
"use strict";
|
|
2002
|
+
var __defProp22 = Object.defineProperty;
|
|
2003
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2004
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2005
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2006
|
+
var __export22 = (target, all) => {
|
|
2007
|
+
for (var name in all)
|
|
2008
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2009
|
+
};
|
|
2010
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2011
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2012
|
+
for (let key of __getOwnPropNames22(from))
|
|
2013
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2014
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2015
|
+
}
|
|
2016
|
+
return to;
|
|
2017
|
+
};
|
|
2018
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2019
|
+
var string_exports = {};
|
|
2020
|
+
__export22(string_exports, {
|
|
2021
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2022
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2023
|
+
decodeNewlines: () => decodeNewlines,
|
|
2024
|
+
encodeNewlines: () => encodeNewlines,
|
|
2025
|
+
findKeyPosition: () => findKeyPosition,
|
|
2026
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2027
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2028
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2029
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
2030
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2031
|
+
});
|
|
2032
|
+
module22.exports = __toCommonJS22(string_exports);
|
|
2033
|
+
var stringIncludesAny = (str, characters) => {
|
|
2034
|
+
for (const char of characters) {
|
|
2035
|
+
if (str.includes(char)) {
|
|
2036
|
+
return true;
|
|
2646
2037
|
}
|
|
2647
|
-
} else {
|
|
2648
|
-
destringified[prop] = objProp;
|
|
2649
2038
|
}
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2039
|
+
return false;
|
|
2040
|
+
};
|
|
2041
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
2042
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2043
|
+
return str.replace(pattern, "");
|
|
2044
|
+
};
|
|
2045
|
+
var brackRegex = {
|
|
2046
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2047
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2048
|
+
};
|
|
2049
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2050
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2051
|
+
return str;
|
|
2052
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
2053
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2054
|
+
if (parentPath) {
|
|
2055
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2056
|
+
let parentState = state;
|
|
2057
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2058
|
+
parentState = parentState.parent;
|
|
2059
|
+
if (!parentState) {
|
|
2060
|
+
return "";
|
|
2661
2061
|
}
|
|
2662
|
-
} else {
|
|
2663
|
-
destringified[prop].push(arrProp);
|
|
2664
2062
|
}
|
|
2665
|
-
|
|
2666
|
-
|
|
2063
|
+
const value = parentState[variable.trim()];
|
|
2064
|
+
return value !== void 0 ? `${value}` : "";
|
|
2667
2065
|
} else {
|
|
2668
|
-
|
|
2066
|
+
const value = state[variable.trim()];
|
|
2067
|
+
return value !== void 0 ? `${value}` : "";
|
|
2669
2068
|
}
|
|
2670
2069
|
});
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2070
|
+
};
|
|
2071
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2072
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2073
|
+
};
|
|
2074
|
+
var findKeyPosition = (str, key) => {
|
|
2075
|
+
const lines = str.split("\n");
|
|
2076
|
+
let startLineNumber = -1;
|
|
2077
|
+
let endLineNumber = -1;
|
|
2078
|
+
let startColumn = -1;
|
|
2079
|
+
let endColumn = -1;
|
|
2080
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2081
|
+
let braceCount = 0;
|
|
2082
|
+
let foundKey = false;
|
|
2083
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2084
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2085
|
+
foundKey = true;
|
|
2086
|
+
startLineNumber = i + 1;
|
|
2087
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2088
|
+
if (lines[i].includes("{}")) {
|
|
2089
|
+
endLineNumber = startLineNumber;
|
|
2090
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2091
|
+
break;
|
|
2092
|
+
}
|
|
2093
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2094
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2095
|
+
braceCount = 1;
|
|
2096
|
+
} else {
|
|
2097
|
+
endLineNumber = i + 1;
|
|
2098
|
+
endColumn = lines[i].length + 1;
|
|
2099
|
+
break;
|
|
2100
|
+
}
|
|
2101
|
+
} else if (foundKey) {
|
|
2102
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2103
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2104
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2105
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2106
|
+
if (braceCount === 0) {
|
|
2107
|
+
endLineNumber = i + 1;
|
|
2108
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2109
|
+
break;
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2711
2112
|
}
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
if (lhs.valueOf() === rhs.valueOf())
|
|
2745
|
-
return {};
|
|
2746
|
-
return rhs;
|
|
2747
|
-
}
|
|
2748
|
-
return Object.keys(rhs).reduce((acc, key) => {
|
|
2749
|
-
if (!hasOwnProperty(lhs, key)) {
|
|
2750
|
-
acc[key] = rhs[key];
|
|
2751
|
-
return acc;
|
|
2752
|
-
}
|
|
2753
|
-
const difference = diff(lhs[key], rhs[key]);
|
|
2754
|
-
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2755
|
-
return acc;
|
|
2756
|
-
}
|
|
2757
|
-
acc[key] = difference;
|
|
2758
|
-
return acc;
|
|
2759
|
-
}, deletedValues);
|
|
2760
|
-
};
|
|
2761
|
-
var overwrite = (element, params, excludeFrom = []) => {
|
|
2762
|
-
const { ref } = element;
|
|
2763
|
-
const changes = {};
|
|
2764
|
-
for (const e in params) {
|
|
2765
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2766
|
-
continue;
|
|
2767
|
-
const elementProp = element[e];
|
|
2768
|
-
const paramsProp = params[e];
|
|
2769
|
-
if (paramsProp) {
|
|
2770
|
-
ref.__cache[e] = changes[e] = elementProp;
|
|
2771
|
-
ref[e] = paramsProp;
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
return changes;
|
|
2775
|
-
};
|
|
2776
|
-
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2777
|
-
for (const e in params) {
|
|
2778
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2779
|
-
continue;
|
|
2780
|
-
obj[e] = params[e];
|
|
2781
|
-
}
|
|
2782
|
-
return obj;
|
|
2783
|
-
};
|
|
2784
|
-
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2785
|
-
for (const e in params) {
|
|
2786
|
-
if (e === "__proto__")
|
|
2787
|
-
continue;
|
|
2788
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2789
|
-
continue;
|
|
2790
|
-
const objProp = obj[e];
|
|
2791
|
-
const paramsProp = params[e];
|
|
2792
|
-
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2793
|
-
overwriteDeep(objProp, paramsProp);
|
|
2794
|
-
} else if (paramsProp !== void 0) {
|
|
2795
|
-
obj[e] = paramsProp;
|
|
2796
|
-
}
|
|
2797
|
-
}
|
|
2798
|
-
return obj;
|
|
2799
|
-
};
|
|
2800
|
-
var mergeIfExisted = (a, b) => {
|
|
2801
|
-
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2802
|
-
return deepMerge2(a, b);
|
|
2803
|
-
return a || b;
|
|
2804
|
-
};
|
|
2805
|
-
var flattenRecursive = (param, prop, stack = []) => {
|
|
2806
|
-
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2807
|
-
stack.push(objectized);
|
|
2808
|
-
const extendOfExtend = objectized[prop];
|
|
2809
|
-
if (extendOfExtend)
|
|
2810
|
-
flattenRecursive(extendOfExtend, prop, stack);
|
|
2811
|
-
delete objectized[prop];
|
|
2812
|
-
return stack;
|
|
2813
|
-
};
|
|
2814
|
-
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2815
|
-
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2816
|
-
return param === element;
|
|
2817
|
-
}
|
|
2818
|
-
if (visited.has(param) || visited.has(element)) {
|
|
2819
|
-
return true;
|
|
2820
|
-
}
|
|
2821
|
-
visited.add(param);
|
|
2822
|
-
visited.add(element);
|
|
2823
|
-
const keysParam = Object.keys(param);
|
|
2824
|
-
const keysElement = Object.keys(element);
|
|
2825
|
-
if (keysParam.length !== keysElement.length) {
|
|
2826
|
-
return false;
|
|
2827
|
-
}
|
|
2828
|
-
for (const key of keysParam) {
|
|
2829
|
-
if (!keysElement.includes(key)) {
|
|
2830
|
-
return false;
|
|
2831
|
-
}
|
|
2832
|
-
const paramProp = param[key];
|
|
2833
|
-
const elementProp = element[key];
|
|
2834
|
-
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2835
|
-
return false;
|
|
2836
|
-
}
|
|
2837
|
-
}
|
|
2838
|
-
return true;
|
|
2839
|
-
};
|
|
2840
|
-
var deepContains = (obj1, obj2) => {
|
|
2841
|
-
if (typeof obj1 !== typeof obj2) {
|
|
2842
|
-
return false;
|
|
2113
|
+
return {
|
|
2114
|
+
startColumn,
|
|
2115
|
+
endColumn,
|
|
2116
|
+
startLineNumber,
|
|
2117
|
+
endLineNumber
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2121
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2122
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2123
|
+
const octalValue = parseInt(p1, 8);
|
|
2124
|
+
const char = String.fromCharCode(octalValue);
|
|
2125
|
+
return char;
|
|
2126
|
+
});
|
|
2127
|
+
};
|
|
2128
|
+
var encodeNewlines = (str) => {
|
|
2129
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
2130
|
+
};
|
|
2131
|
+
var decodeNewlines = (encodedStr) => {
|
|
2132
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
2133
|
+
};
|
|
2134
|
+
var customEncodeURIComponent = (str) => {
|
|
2135
|
+
return str.split("").map((char) => {
|
|
2136
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2137
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2138
|
+
}
|
|
2139
|
+
return char;
|
|
2140
|
+
}).join("");
|
|
2141
|
+
};
|
|
2142
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2143
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2144
|
+
};
|
|
2843
2145
|
}
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2146
|
+
});
|
|
2147
|
+
var require_object2 = __commonJS2({
|
|
2148
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports2, module22) {
|
|
2149
|
+
"use strict";
|
|
2150
|
+
var __defProp22 = Object.defineProperty;
|
|
2151
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2152
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2153
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2154
|
+
var __export22 = (target, all) => {
|
|
2155
|
+
for (var name in all)
|
|
2156
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2157
|
+
};
|
|
2158
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2159
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2160
|
+
for (let key of __getOwnPropNames22(from))
|
|
2161
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2162
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2163
|
+
}
|
|
2164
|
+
return to;
|
|
2165
|
+
};
|
|
2166
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2167
|
+
var object_exports = {};
|
|
2168
|
+
__export22(object_exports, {
|
|
2169
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2170
|
+
clone: () => clone,
|
|
2171
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2172
|
+
deepClone: () => deepClone2,
|
|
2173
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2174
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2175
|
+
deepContains: () => deepContains,
|
|
2176
|
+
deepDestringify: () => deepDestringify,
|
|
2177
|
+
deepDiff: () => deepDiff,
|
|
2178
|
+
deepMerge: () => deepMerge2,
|
|
2179
|
+
deepStringify: () => deepStringify,
|
|
2180
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2181
|
+
diff: () => diff,
|
|
2182
|
+
diffArrays: () => diffArrays,
|
|
2183
|
+
diffObjects: () => diffObjects,
|
|
2184
|
+
exec: () => exec,
|
|
2185
|
+
flattenRecursive: () => flattenRecursive,
|
|
2186
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2187
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2188
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2189
|
+
isEmpty: () => isEmpty,
|
|
2190
|
+
isEmptyObject: () => isEmptyObject,
|
|
2191
|
+
isEqualDeep: () => isEqualDeep,
|
|
2192
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2193
|
+
map: () => map,
|
|
2194
|
+
merge: () => merge,
|
|
2195
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2196
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2197
|
+
objectToString: () => objectToString,
|
|
2198
|
+
overwrite: () => overwrite,
|
|
2199
|
+
overwriteDeep: () => overwriteDeep,
|
|
2200
|
+
overwriteShallow: () => overwriteShallow,
|
|
2201
|
+
removeFromObject: () => removeFromObject,
|
|
2202
|
+
stringToObject: () => stringToObject
|
|
2203
|
+
});
|
|
2204
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
2205
|
+
var import_globals2 = require_globals2();
|
|
2206
|
+
var import_types = require_types2();
|
|
2207
|
+
var import_array = require_array2();
|
|
2208
|
+
var import_string = require_string2();
|
|
2209
|
+
var exec = (param, element, state, context) => {
|
|
2210
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2211
|
+
return param(
|
|
2212
|
+
element,
|
|
2213
|
+
state || element.state,
|
|
2214
|
+
context || element.context
|
|
2215
|
+
);
|
|
2216
|
+
}
|
|
2217
|
+
return param;
|
|
2218
|
+
};
|
|
2219
|
+
var map = (obj, extention, element) => {
|
|
2220
|
+
for (const e in extention) {
|
|
2221
|
+
obj[e] = exec(extention[e], element);
|
|
2222
|
+
}
|
|
2223
|
+
};
|
|
2224
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
2225
|
+
for (const e in obj) {
|
|
2226
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2227
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2228
|
+
continue;
|
|
2229
|
+
const elementProp = element[e];
|
|
2230
|
+
const objProp = obj[e];
|
|
2231
|
+
if (elementProp === void 0) {
|
|
2232
|
+
element[e] = objProp;
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
return element;
|
|
2236
|
+
};
|
|
2237
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2238
|
+
for (const e in extend) {
|
|
2239
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2240
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2241
|
+
continue;
|
|
2242
|
+
const elementProp = element[e];
|
|
2243
|
+
const extendProp = extend[e];
|
|
2244
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2245
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2246
|
+
} else if (elementProp === void 0) {
|
|
2247
|
+
element[e] = extendProp;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
return element;
|
|
2251
|
+
};
|
|
2252
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2253
|
+
const o = {};
|
|
2254
|
+
for (const prop in obj) {
|
|
2255
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2256
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2257
|
+
continue;
|
|
2258
|
+
o[prop] = obj[prop];
|
|
2259
|
+
}
|
|
2260
|
+
return o;
|
|
2261
|
+
};
|
|
2262
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2263
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2264
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2265
|
+
}
|
|
2266
|
+
const o = {};
|
|
2267
|
+
for (const k in obj) {
|
|
2268
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2269
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2270
|
+
continue;
|
|
2271
|
+
let v = obj[k];
|
|
2272
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2273
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2274
|
+
}
|
|
2275
|
+
if ((0, import_types.isArray)(v)) {
|
|
2276
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2277
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2278
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2279
|
+
} else
|
|
2280
|
+
o[k] = v;
|
|
2281
|
+
}
|
|
2282
|
+
return o;
|
|
2283
|
+
};
|
|
2284
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2285
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2286
|
+
};
|
|
2287
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2288
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2289
|
+
for (const prop in obj) {
|
|
2290
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2291
|
+
continue;
|
|
2292
|
+
if (prop === "__proto__")
|
|
2293
|
+
continue;
|
|
2294
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2295
|
+
continue;
|
|
2296
|
+
let objProp = obj[prop];
|
|
2297
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2298
|
+
continue;
|
|
2299
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2300
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2301
|
+
}
|
|
2302
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2303
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2304
|
+
} else
|
|
2305
|
+
o[prop] = objProp;
|
|
2306
|
+
}
|
|
2307
|
+
return o;
|
|
2308
|
+
};
|
|
2309
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2310
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
2311
|
+
for (const prop in obj) {
|
|
2312
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2313
|
+
continue;
|
|
2314
|
+
const objProp = obj[prop];
|
|
2315
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2316
|
+
continue;
|
|
2317
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2318
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2319
|
+
} else
|
|
2320
|
+
o[prop] = objProp;
|
|
2321
|
+
}
|
|
2322
|
+
return o;
|
|
2323
|
+
};
|
|
2324
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2325
|
+
for (const prop in obj) {
|
|
2326
|
+
const objProp = obj[prop];
|
|
2327
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2328
|
+
stringified[prop] = objProp.toString();
|
|
2329
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2330
|
+
stringified[prop] = {};
|
|
2331
|
+
deepStringify(objProp, stringified[prop]);
|
|
2332
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2333
|
+
stringified[prop] = [];
|
|
2334
|
+
objProp.forEach((v, i) => {
|
|
2335
|
+
if ((0, import_types.isObject)(v)) {
|
|
2336
|
+
stringified[prop][i] = {};
|
|
2337
|
+
deepStringify(v, stringified[prop][i]);
|
|
2338
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2339
|
+
stringified[prop][i] = v.toString();
|
|
2340
|
+
} else {
|
|
2341
|
+
stringified[prop][i] = v;
|
|
2342
|
+
}
|
|
2343
|
+
});
|
|
2344
|
+
} else {
|
|
2345
|
+
stringified[prop] = objProp;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
return stringified;
|
|
2349
|
+
};
|
|
2350
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2351
|
+
const spaces = " ".repeat(indent);
|
|
2352
|
+
let str = "{\n";
|
|
2353
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2354
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2355
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2356
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2357
|
+
if ((0, import_types.isArray)(value)) {
|
|
2358
|
+
str += "[\n";
|
|
2359
|
+
for (const element of value) {
|
|
2360
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2361
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2362
|
+
`;
|
|
2363
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2364
|
+
str += `${spaces} '${element}',
|
|
2365
|
+
`;
|
|
2366
|
+
} else {
|
|
2367
|
+
str += `${spaces} ${element},
|
|
2368
|
+
`;
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
str += `${spaces} ]`;
|
|
2372
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2373
|
+
str += objectToString(value, indent + 1);
|
|
2374
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2375
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2376
|
+
} else {
|
|
2377
|
+
str += value;
|
|
2378
|
+
}
|
|
2379
|
+
str += ",\n";
|
|
2380
|
+
}
|
|
2381
|
+
str += `${spaces}}`;
|
|
2382
|
+
return str;
|
|
2383
|
+
};
|
|
2384
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2385
|
+
for (const prop in obj) {
|
|
2386
|
+
const objProp = obj[prop];
|
|
2387
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2388
|
+
continue;
|
|
2389
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2390
|
+
detached[prop] = {};
|
|
2391
|
+
deepStringify(objProp, detached[prop]);
|
|
2392
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2393
|
+
detached[prop] = [];
|
|
2394
|
+
objProp.forEach((v, i) => {
|
|
2395
|
+
if ((0, import_types.isFunction)(v))
|
|
2396
|
+
return;
|
|
2397
|
+
if ((0, import_types.isObject)(v)) {
|
|
2398
|
+
detached[prop][i] = {};
|
|
2399
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2400
|
+
} else {
|
|
2401
|
+
detached[prop][i] = v;
|
|
2402
|
+
}
|
|
2403
|
+
});
|
|
2404
|
+
} else {
|
|
2405
|
+
detached[prop] = objProp;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
return detached;
|
|
2409
|
+
};
|
|
2410
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2411
|
+
for (const prop in obj) {
|
|
2412
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2413
|
+
if (!hasOwnProperty2)
|
|
2414
|
+
continue;
|
|
2415
|
+
const objProp = obj[prop];
|
|
2416
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2417
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2418
|
+
try {
|
|
2419
|
+
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2420
|
+
destringified[prop] = evalProp;
|
|
2421
|
+
} catch (e) {
|
|
2422
|
+
if (e)
|
|
2423
|
+
destringified[prop] = objProp;
|
|
2424
|
+
}
|
|
2425
|
+
} else {
|
|
2426
|
+
destringified[prop] = objProp;
|
|
2427
|
+
}
|
|
2428
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2429
|
+
destringified[prop] = [];
|
|
2430
|
+
objProp.forEach((arrProp) => {
|
|
2431
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2432
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2433
|
+
try {
|
|
2434
|
+
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
2435
|
+
destringified[prop].push(evalProp);
|
|
2436
|
+
} catch (e) {
|
|
2437
|
+
if (e)
|
|
2438
|
+
destringified[prop].push(arrProp);
|
|
2439
|
+
}
|
|
2440
|
+
} else {
|
|
2441
|
+
destringified[prop].push(arrProp);
|
|
2442
|
+
}
|
|
2443
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2444
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2445
|
+
} else {
|
|
2446
|
+
destringified[prop].push(arrProp);
|
|
2447
|
+
}
|
|
2448
|
+
});
|
|
2449
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2450
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2451
|
+
} else {
|
|
2452
|
+
destringified[prop] = objProp;
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
return destringified;
|
|
2456
|
+
};
|
|
2457
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2458
|
+
try {
|
|
2459
|
+
return import_globals2.window.eval("(" + str + ")");
|
|
2460
|
+
} catch (e) {
|
|
2461
|
+
if (opts.verbose)
|
|
2462
|
+
console.warn(e);
|
|
2463
|
+
}
|
|
2464
|
+
};
|
|
2465
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2466
|
+
for (const e in objToDiff) {
|
|
2467
|
+
if (e === "ref")
|
|
2468
|
+
continue;
|
|
2469
|
+
const originalProp = original[e];
|
|
2470
|
+
const objToDiffProp = objToDiff[e];
|
|
2471
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2472
|
+
cache[e] = {};
|
|
2473
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2474
|
+
} else if (objToDiffProp !== void 0) {
|
|
2475
|
+
cache[e] = objToDiffProp;
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
return cache;
|
|
2479
|
+
};
|
|
2480
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2481
|
+
if (original.length !== objToDiff.length) {
|
|
2482
|
+
cache = objToDiff;
|
|
2483
|
+
} else {
|
|
2484
|
+
const diffArr = [];
|
|
2485
|
+
for (let i = 0; i < original.length; i++) {
|
|
2486
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2487
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2488
|
+
diffArr.push(diffObj);
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
if (diffArr.length > 0) {
|
|
2492
|
+
cache = diffArr;
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
return cache;
|
|
2496
|
+
};
|
|
2497
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2498
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2499
|
+
cache = [];
|
|
2500
|
+
diffArrays(original, objToDiff, cache);
|
|
2501
|
+
} else {
|
|
2502
|
+
diffObjects(original, objToDiff, cache);
|
|
2503
|
+
}
|
|
2504
|
+
return cache;
|
|
2505
|
+
};
|
|
2506
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2507
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2508
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2509
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2510
|
+
var deepDiff = (lhs, rhs) => {
|
|
2511
|
+
if (lhs === rhs)
|
|
2512
|
+
return {};
|
|
2513
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2514
|
+
return rhs;
|
|
2515
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2516
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2517
|
+
acc[key] = void 0;
|
|
2518
|
+
}
|
|
2519
|
+
return acc;
|
|
2520
|
+
}, makeObjectWithoutPrototype());
|
|
2521
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2522
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2523
|
+
return {};
|
|
2524
|
+
return rhs;
|
|
2525
|
+
}
|
|
2526
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2527
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2528
|
+
acc[key] = rhs[key];
|
|
2529
|
+
return acc;
|
|
2530
|
+
}
|
|
2531
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2532
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2533
|
+
return acc;
|
|
2534
|
+
}
|
|
2535
|
+
acc[key] = difference;
|
|
2536
|
+
return acc;
|
|
2537
|
+
}, deletedValues);
|
|
2538
|
+
};
|
|
2539
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2540
|
+
const { ref } = element;
|
|
2541
|
+
const changes = {};
|
|
2542
|
+
for (const e in params) {
|
|
2543
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2544
|
+
continue;
|
|
2545
|
+
const elementProp = element[e];
|
|
2546
|
+
const paramsProp = params[e];
|
|
2547
|
+
if (paramsProp) {
|
|
2548
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2549
|
+
ref[e] = paramsProp;
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
return changes;
|
|
2553
|
+
};
|
|
2554
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2555
|
+
for (const e in params) {
|
|
2556
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2557
|
+
continue;
|
|
2558
|
+
obj[e] = params[e];
|
|
2559
|
+
}
|
|
2560
|
+
return obj;
|
|
2561
|
+
};
|
|
2562
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2563
|
+
for (const e in params) {
|
|
2564
|
+
if (e === "__ref")
|
|
2565
|
+
continue;
|
|
2566
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2567
|
+
continue;
|
|
2568
|
+
const objProp = obj[e];
|
|
2569
|
+
const paramsProp = params[e];
|
|
2570
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2571
|
+
overwriteDeep(objProp, paramsProp);
|
|
2572
|
+
} else if (paramsProp !== void 0) {
|
|
2573
|
+
obj[e] = paramsProp;
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
return obj;
|
|
2577
|
+
};
|
|
2578
|
+
var mergeIfExisted = (a, b) => {
|
|
2579
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2580
|
+
return deepMerge2(a, b);
|
|
2581
|
+
return a || b;
|
|
2582
|
+
};
|
|
2583
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2584
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2585
|
+
stack.push(objectized);
|
|
2586
|
+
const extendOfExtend = objectized[prop];
|
|
2587
|
+
if (extendOfExtend)
|
|
2588
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2589
|
+
delete objectized[prop];
|
|
2590
|
+
return stack;
|
|
2591
|
+
};
|
|
2592
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2593
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2594
|
+
return param === element;
|
|
2595
|
+
}
|
|
2596
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2597
|
+
return true;
|
|
2598
|
+
}
|
|
2599
|
+
visited.add(param);
|
|
2600
|
+
visited.add(element);
|
|
2601
|
+
const keysParam = Object.keys(param);
|
|
2602
|
+
const keysElement = Object.keys(element);
|
|
2603
|
+
if (keysParam.length !== keysElement.length) {
|
|
2847
2604
|
return false;
|
|
2848
2605
|
}
|
|
2849
|
-
for (
|
|
2850
|
-
if (!
|
|
2606
|
+
for (const key of keysParam) {
|
|
2607
|
+
if (!keysElement.includes(key)) {
|
|
2851
2608
|
return false;
|
|
2852
2609
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2857
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2610
|
+
const paramProp = param[key];
|
|
2611
|
+
const elementProp = element[key];
|
|
2612
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2858
2613
|
return false;
|
|
2859
2614
|
}
|
|
2860
2615
|
}
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2884
|
-
for (const key in obj) {
|
|
2885
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2886
|
-
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2887
|
-
}
|
|
2888
|
-
}
|
|
2889
|
-
return newObj;
|
|
2890
|
-
};
|
|
2891
|
-
var checkIfKeyIsComponent = (key) => {
|
|
2892
|
-
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2893
|
-
if (!isFirstKeyString)
|
|
2894
|
-
return;
|
|
2895
|
-
const firstCharKey = key.slice(0, 1);
|
|
2896
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
2897
|
-
};
|
|
2898
|
-
var getChildrenComponentsByKey = (key, el) => {
|
|
2899
|
-
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2900
|
-
return el;
|
|
2901
|
-
}
|
|
2902
|
-
if (el.extend) {
|
|
2903
|
-
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2904
|
-
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2905
|
-
if (foundString || foundInArray)
|
|
2906
|
-
return el;
|
|
2907
|
-
}
|
|
2908
|
-
};
|
|
2909
|
-
var getExtendsInElement = (obj) => {
|
|
2910
|
-
let result = [];
|
|
2911
|
-
function traverse(o) {
|
|
2912
|
-
for (const key in o) {
|
|
2913
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
2914
|
-
if (checkIfKeyIsComponent(key)) {
|
|
2915
|
-
result.push(key);
|
|
2916
|
-
}
|
|
2917
|
-
if (key === "extend") {
|
|
2918
|
-
if (typeof o[key] === "string") {
|
|
2919
|
-
result.push(o[key]);
|
|
2920
|
-
} else if (Array.isArray(o[key])) {
|
|
2921
|
-
result = result.concat(o[key]);
|
|
2616
|
+
return true;
|
|
2617
|
+
};
|
|
2618
|
+
var deepContains = (obj1, obj2) => {
|
|
2619
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2620
|
+
return false;
|
|
2621
|
+
}
|
|
2622
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2623
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2624
|
+
if (obj1.length !== obj2.length) {
|
|
2625
|
+
return false;
|
|
2626
|
+
}
|
|
2627
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2628
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2629
|
+
return false;
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2633
|
+
for (const key in obj1) {
|
|
2634
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2635
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2636
|
+
return false;
|
|
2637
|
+
}
|
|
2922
2638
|
}
|
|
2923
2639
|
}
|
|
2924
|
-
|
|
2925
|
-
|
|
2640
|
+
} else {
|
|
2641
|
+
return obj2 === obj1;
|
|
2642
|
+
}
|
|
2643
|
+
return true;
|
|
2644
|
+
};
|
|
2645
|
+
var removeFromObject = (obj, props) => {
|
|
2646
|
+
if (props === void 0 || props === null)
|
|
2647
|
+
return obj;
|
|
2648
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2649
|
+
delete obj[props];
|
|
2650
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2651
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2652
|
+
} else {
|
|
2653
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2654
|
+
}
|
|
2655
|
+
return obj;
|
|
2656
|
+
};
|
|
2657
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2658
|
+
if (obj === null || typeof obj !== "object") {
|
|
2659
|
+
return obj;
|
|
2660
|
+
}
|
|
2661
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2662
|
+
for (const key in obj) {
|
|
2663
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2664
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2926
2665
|
}
|
|
2927
2666
|
}
|
|
2928
|
-
|
|
2667
|
+
return newObj;
|
|
2668
|
+
};
|
|
2669
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2670
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2671
|
+
if (!isFirstKeyString)
|
|
2672
|
+
return;
|
|
2673
|
+
const firstCharKey = key.slice(0, 1);
|
|
2674
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2675
|
+
};
|
|
2676
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2677
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2678
|
+
return el;
|
|
2679
|
+
}
|
|
2680
|
+
if (el.extend) {
|
|
2681
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2682
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2683
|
+
if (foundString || foundInArray)
|
|
2684
|
+
return el;
|
|
2685
|
+
}
|
|
2686
|
+
if (el.parent && el.parent.childExtend) {
|
|
2687
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
2688
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
2689
|
+
if (foundString || foundInArray)
|
|
2690
|
+
return el;
|
|
2691
|
+
}
|
|
2692
|
+
};
|
|
2693
|
+
var getExtendsInElement = (obj) => {
|
|
2694
|
+
let result = [];
|
|
2695
|
+
function traverse(o) {
|
|
2696
|
+
for (const key in o) {
|
|
2697
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2698
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2699
|
+
result.push(key);
|
|
2700
|
+
}
|
|
2701
|
+
if (key === "extend") {
|
|
2702
|
+
if (typeof o[key] === "string") {
|
|
2703
|
+
result.push(o[key]);
|
|
2704
|
+
} else if (Array.isArray(o[key])) {
|
|
2705
|
+
result = result.concat(o[key]);
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2709
|
+
traverse(o[key]);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
traverse(obj);
|
|
2715
|
+
return result;
|
|
2716
|
+
};
|
|
2929
2717
|
}
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
var
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2718
|
+
});
|
|
2719
|
+
var require_function2 = __commonJS2({
|
|
2720
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports2, module22) {
|
|
2721
|
+
"use strict";
|
|
2722
|
+
var __defProp22 = Object.defineProperty;
|
|
2723
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2724
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2725
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2726
|
+
var __export22 = (target, all) => {
|
|
2727
|
+
for (var name in all)
|
|
2728
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2729
|
+
};
|
|
2730
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2731
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2732
|
+
for (let key of __getOwnPropNames22(from))
|
|
2733
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2734
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2735
|
+
}
|
|
2736
|
+
return to;
|
|
2737
|
+
};
|
|
2738
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2739
|
+
var function_exports = {};
|
|
2740
|
+
__export22(function_exports, {
|
|
2741
|
+
debounce: () => debounce,
|
|
2742
|
+
debounceOnContext: () => debounceOnContext,
|
|
2743
|
+
isStringFunction: () => isStringFunction,
|
|
2744
|
+
memoize: () => memoize
|
|
2745
|
+
});
|
|
2746
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
2747
|
+
function debounce(func, wait, immediate) {
|
|
2748
|
+
let timeout;
|
|
2749
|
+
return function() {
|
|
2750
|
+
const context = this;
|
|
2751
|
+
const args = arguments;
|
|
2752
|
+
const later = function() {
|
|
2753
|
+
timeout = null;
|
|
2754
|
+
if (!immediate)
|
|
2755
|
+
func.apply(context, args);
|
|
2756
|
+
};
|
|
2757
|
+
const callNow = immediate && !timeout;
|
|
2758
|
+
clearTimeout(timeout);
|
|
2759
|
+
timeout = setTimeout(later, wait);
|
|
2760
|
+
if (callNow)
|
|
2761
|
+
func.apply(context, args);
|
|
2762
|
+
};
|
|
2763
|
+
}
|
|
2764
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2765
|
+
let timer;
|
|
2766
|
+
return (...args) => {
|
|
2767
|
+
clearTimeout(timer);
|
|
2768
|
+
timer = setTimeout(() => {
|
|
2769
|
+
func.apply(element, args);
|
|
2770
|
+
}, timeout);
|
|
2771
|
+
};
|
|
2772
|
+
};
|
|
2773
|
+
var memoize = (fn) => {
|
|
2774
|
+
const cache = {};
|
|
2775
|
+
return (...args) => {
|
|
2776
|
+
const n = args[0];
|
|
2777
|
+
if (n in cache) {
|
|
2778
|
+
return cache[n];
|
|
2779
|
+
} else {
|
|
2780
|
+
const result = fn(n);
|
|
2781
|
+
cache[n] = result;
|
|
2782
|
+
return result;
|
|
2783
|
+
}
|
|
2784
|
+
};
|
|
2785
|
+
};
|
|
2786
|
+
var isStringFunction = (inputString) => {
|
|
2787
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2788
|
+
return functionRegex.test(inputString);
|
|
2789
|
+
};
|
|
2951
2790
|
}
|
|
2952
|
-
return to;
|
|
2953
|
-
};
|
|
2954
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2955
|
-
var function_exports = {};
|
|
2956
|
-
__export22(function_exports, {
|
|
2957
|
-
debounce: () => debounce,
|
|
2958
|
-
debounceOnContext: () => debounceOnContext,
|
|
2959
|
-
isStringFunction: () => isStringFunction,
|
|
2960
|
-
memoize: () => memoize
|
|
2961
2791
|
});
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2792
|
+
var require_log2 = __commonJS2({
|
|
2793
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports2, module22) {
|
|
2794
|
+
"use strict";
|
|
2795
|
+
var __defProp22 = Object.defineProperty;
|
|
2796
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2797
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2798
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2799
|
+
var __export22 = (target, all) => {
|
|
2800
|
+
for (var name in all)
|
|
2801
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2972
2802
|
};
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2803
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2804
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2805
|
+
for (let key of __getOwnPropNames22(from))
|
|
2806
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2807
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2808
|
+
}
|
|
2809
|
+
return to;
|
|
2810
|
+
};
|
|
2811
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2812
|
+
var log_exports = {};
|
|
2813
|
+
__export22(log_exports, {
|
|
2814
|
+
logGroupIf: () => logGroupIf,
|
|
2815
|
+
logIf: () => logIf
|
|
2816
|
+
});
|
|
2817
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
2818
|
+
var logIf = (bool, ...arg) => {
|
|
2819
|
+
if (bool)
|
|
2820
|
+
arg.map((v) => console.log(v));
|
|
2821
|
+
};
|
|
2822
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
2823
|
+
if (bool) {
|
|
2824
|
+
console.group(key);
|
|
2825
|
+
arg.map((v) => console.log(v));
|
|
2826
|
+
console.groupEnd(key);
|
|
2827
|
+
}
|
|
2828
|
+
};
|
|
2829
|
+
}
|
|
2830
|
+
});
|
|
2831
|
+
var require_cookie2 = __commonJS2({
|
|
2832
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports2, module22) {
|
|
2833
|
+
"use strict";
|
|
2834
|
+
var __defProp22 = Object.defineProperty;
|
|
2835
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2836
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2837
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2838
|
+
var __export22 = (target, all) => {
|
|
2839
|
+
for (var name in all)
|
|
2840
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2841
|
+
};
|
|
2842
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2843
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2844
|
+
for (let key of __getOwnPropNames22(from))
|
|
2845
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2846
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2847
|
+
}
|
|
2848
|
+
return to;
|
|
2849
|
+
};
|
|
2850
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2851
|
+
var cookie_exports = {};
|
|
2852
|
+
__export22(cookie_exports, {
|
|
2853
|
+
getCookie: () => getCookie,
|
|
2854
|
+
isMobile: () => isMobile,
|
|
2855
|
+
setCookie: () => setCookie
|
|
2856
|
+
});
|
|
2857
|
+
module22.exports = __toCommonJS22(cookie_exports);
|
|
2858
|
+
var import_types = require_types2();
|
|
2859
|
+
var import_utils32 = require_cjs4();
|
|
2860
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2861
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2862
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2863
|
+
return;
|
|
2864
|
+
const d = /* @__PURE__ */ new Date();
|
|
2865
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2866
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
2867
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2868
|
+
};
|
|
2869
|
+
var getCookie = (cname) => {
|
|
2870
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2871
|
+
return;
|
|
2872
|
+
const name = `${cname}=`;
|
|
2873
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2874
|
+
const ca = decodedCookie.split(";");
|
|
2875
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2876
|
+
let c = ca[i];
|
|
2877
|
+
while (c.charAt(0) === " ")
|
|
2878
|
+
c = c.substring(1);
|
|
2879
|
+
if (c.indexOf(name) === 0)
|
|
2880
|
+
return c.substring(name.length, c.length);
|
|
2881
|
+
}
|
|
2882
|
+
return "";
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2886
|
+
var require_tags2 = __commonJS2({
|
|
2887
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports2, module22) {
|
|
2888
|
+
"use strict";
|
|
2889
|
+
var __defProp22 = Object.defineProperty;
|
|
2890
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2891
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2892
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2893
|
+
var __export22 = (target, all) => {
|
|
2894
|
+
for (var name in all)
|
|
2895
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2896
|
+
};
|
|
2897
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2898
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2899
|
+
for (let key of __getOwnPropNames22(from))
|
|
2900
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2901
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2902
|
+
}
|
|
2903
|
+
return to;
|
|
2904
|
+
};
|
|
2905
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2906
|
+
var tags_exports = {};
|
|
2907
|
+
__export22(tags_exports, {
|
|
2908
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
2909
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
2910
|
+
});
|
|
2911
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
2912
|
+
var HTML_TAGS = {
|
|
2913
|
+
root: [
|
|
2914
|
+
"body",
|
|
2915
|
+
"html"
|
|
2916
|
+
],
|
|
2917
|
+
head: [
|
|
2918
|
+
"title",
|
|
2919
|
+
"base",
|
|
2920
|
+
"meta",
|
|
2921
|
+
"style"
|
|
2922
|
+
],
|
|
2923
|
+
body: [
|
|
2924
|
+
"string",
|
|
2925
|
+
"fragment",
|
|
2926
|
+
"a",
|
|
2927
|
+
"abbr",
|
|
2928
|
+
"acronym",
|
|
2929
|
+
"address",
|
|
2930
|
+
"applet",
|
|
2931
|
+
"area",
|
|
2932
|
+
"article",
|
|
2933
|
+
"aside",
|
|
2934
|
+
"audio",
|
|
2935
|
+
"b",
|
|
2936
|
+
"basefont",
|
|
2937
|
+
"bdi",
|
|
2938
|
+
"bdo",
|
|
2939
|
+
"big",
|
|
2940
|
+
"blockquote",
|
|
2941
|
+
"br",
|
|
2942
|
+
"button",
|
|
2943
|
+
"canvas",
|
|
2944
|
+
"caption",
|
|
2945
|
+
"center",
|
|
2946
|
+
"cite",
|
|
2947
|
+
"code",
|
|
2948
|
+
"search",
|
|
2949
|
+
"col",
|
|
2950
|
+
"colgroup",
|
|
2951
|
+
"data",
|
|
2952
|
+
"datalist",
|
|
2953
|
+
"dd",
|
|
2954
|
+
"del",
|
|
2955
|
+
"details",
|
|
2956
|
+
"dfn",
|
|
2957
|
+
"dialog",
|
|
2958
|
+
"dir",
|
|
2959
|
+
"div",
|
|
2960
|
+
"dl",
|
|
2961
|
+
"dt",
|
|
2962
|
+
"em",
|
|
2963
|
+
"embed",
|
|
2964
|
+
"fieldset",
|
|
2965
|
+
"figcaption",
|
|
2966
|
+
"figure",
|
|
2967
|
+
"font",
|
|
2968
|
+
"footer",
|
|
2969
|
+
"form",
|
|
2970
|
+
"frame",
|
|
2971
|
+
"frameset",
|
|
2972
|
+
"h1",
|
|
2973
|
+
"h2",
|
|
2974
|
+
"h3",
|
|
2975
|
+
"h4",
|
|
2976
|
+
"h5",
|
|
2977
|
+
"h6",
|
|
2978
|
+
"head",
|
|
2979
|
+
"header",
|
|
2980
|
+
"hr",
|
|
2981
|
+
"i",
|
|
2982
|
+
"iframe",
|
|
2983
|
+
"img",
|
|
2984
|
+
"input",
|
|
2985
|
+
"ins",
|
|
2986
|
+
"kbd",
|
|
2987
|
+
"label",
|
|
2988
|
+
"legend",
|
|
2989
|
+
"li",
|
|
2990
|
+
"link",
|
|
2991
|
+
"main",
|
|
2992
|
+
"map",
|
|
2993
|
+
"mark",
|
|
2994
|
+
"meter",
|
|
2995
|
+
"nav",
|
|
2996
|
+
"noframes",
|
|
2997
|
+
"noscript",
|
|
2998
|
+
"object",
|
|
2999
|
+
"ol",
|
|
3000
|
+
"optgroup",
|
|
3001
|
+
"option",
|
|
3002
|
+
"output",
|
|
3003
|
+
"p",
|
|
3004
|
+
"param",
|
|
3005
|
+
"picture",
|
|
3006
|
+
"pre",
|
|
3007
|
+
"progress",
|
|
3008
|
+
"hgroup",
|
|
3009
|
+
"q",
|
|
3010
|
+
"rp",
|
|
3011
|
+
"rt",
|
|
3012
|
+
"ruby",
|
|
3013
|
+
"s",
|
|
3014
|
+
"samp",
|
|
3015
|
+
"script",
|
|
3016
|
+
"section",
|
|
3017
|
+
"select",
|
|
3018
|
+
"small",
|
|
3019
|
+
"source",
|
|
3020
|
+
"span",
|
|
3021
|
+
"strike",
|
|
3022
|
+
"strong",
|
|
3023
|
+
"sub",
|
|
3024
|
+
"summary",
|
|
3025
|
+
"sup",
|
|
3026
|
+
"table",
|
|
3027
|
+
"tbody",
|
|
3028
|
+
"td",
|
|
3029
|
+
"template",
|
|
3030
|
+
"hgroup",
|
|
3031
|
+
"textarea",
|
|
3032
|
+
"tfoot",
|
|
3033
|
+
"th",
|
|
3034
|
+
"thead",
|
|
3035
|
+
"time",
|
|
3036
|
+
"tr",
|
|
3037
|
+
"track",
|
|
3038
|
+
"tt",
|
|
3039
|
+
"u",
|
|
3040
|
+
"ul",
|
|
3041
|
+
"var",
|
|
3042
|
+
"video",
|
|
3043
|
+
"wbr",
|
|
3044
|
+
// SVG
|
|
3045
|
+
"svg",
|
|
3046
|
+
"path"
|
|
3047
|
+
]
|
|
3048
|
+
};
|
|
3049
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
3050
|
+
}
|
|
3051
|
+
});
|
|
3052
|
+
var require_cjs4 = __commonJS2({
|
|
3053
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports2, module22) {
|
|
3054
|
+
"use strict";
|
|
3055
|
+
var __defProp22 = Object.defineProperty;
|
|
3056
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3057
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3058
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3059
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3060
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3061
|
+
for (let key of __getOwnPropNames22(from))
|
|
3062
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3063
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3064
|
+
}
|
|
3065
|
+
return to;
|
|
3066
|
+
};
|
|
3067
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3068
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3069
|
+
var utils_exports2 = {};
|
|
3070
|
+
module22.exports = __toCommonJS22(utils_exports2);
|
|
3071
|
+
__reExport(utils_exports2, require_key2(), module22.exports);
|
|
3072
|
+
__reExport(utils_exports2, require_env2(), module22.exports);
|
|
3073
|
+
__reExport(utils_exports2, require_types2(), module22.exports);
|
|
3074
|
+
__reExport(utils_exports2, require_object2(), module22.exports);
|
|
3075
|
+
__reExport(utils_exports2, require_function2(), module22.exports);
|
|
3076
|
+
__reExport(utils_exports2, require_array2(), module22.exports);
|
|
3077
|
+
__reExport(utils_exports2, require_node2(), module22.exports);
|
|
3078
|
+
__reExport(utils_exports2, require_log2(), module22.exports);
|
|
3079
|
+
__reExport(utils_exports2, require_string2(), module22.exports);
|
|
3080
|
+
__reExport(utils_exports2, require_globals2(), module22.exports);
|
|
3081
|
+
__reExport(utils_exports2, require_cookie2(), module22.exports);
|
|
3082
|
+
__reExport(utils_exports2, require_tags2(), module22.exports);
|
|
3083
|
+
}
|
|
3084
|
+
});
|
|
3085
|
+
var src_exports = {};
|
|
3086
|
+
__export2(src_exports, {
|
|
3087
|
+
arrayzeValue: () => arrayzeValue,
|
|
3088
|
+
copyJavaScriptToClipboard: () => copyJavaScriptToClipboard,
|
|
3089
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3090
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3091
|
+
findClosestNumber: () => findClosestNumber,
|
|
3092
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3093
|
+
formatDate: () => formatDate,
|
|
3094
|
+
isPhoto: () => isPhoto,
|
|
3095
|
+
loadCssFile: () => loadCssFile,
|
|
3096
|
+
loadJavascript: () => loadJavascript,
|
|
3097
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3098
|
+
loadJavascriptFileSync: () => loadJavascriptFileSync,
|
|
3099
|
+
removeChars: () => removeChars,
|
|
3100
|
+
toCamelCase: () => toCamelCase,
|
|
3101
|
+
toDashCase: () => toDashCase2,
|
|
3102
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3103
|
+
toTitleCase: () => toTitleCase,
|
|
3104
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3105
|
+
});
|
|
3106
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
3107
|
+
var import_utils22 = __toESM2(require_cjs4(), 1);
|
|
3108
|
+
var toggleFullscreen = async (el) => {
|
|
3109
|
+
if (!document.fullscreenElement) {
|
|
3110
|
+
try {
|
|
3111
|
+
await (el.node || document).requestFullscreen();
|
|
3112
|
+
} catch (err) {
|
|
3113
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
2999
3114
|
}
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
|
-
var isStringFunction = (inputString) => {
|
|
3003
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
3004
|
-
return functionRegex.test(inputString);
|
|
3005
|
-
};
|
|
3006
|
-
}
|
|
3007
|
-
});
|
|
3008
|
-
var require_log2 = __commonJS2({
|
|
3009
|
-
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
3010
|
-
"use strict";
|
|
3011
|
-
var __defProp22 = Object.defineProperty;
|
|
3012
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3013
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3014
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3015
|
-
var __export22 = (target, all) => {
|
|
3016
|
-
for (var name in all)
|
|
3017
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3018
|
-
};
|
|
3019
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
3020
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
3021
|
-
for (let key of __getOwnPropNames22(from))
|
|
3022
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3023
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3115
|
+
} else {
|
|
3116
|
+
await document.exitFullscreen();
|
|
3024
3117
|
}
|
|
3025
|
-
return to;
|
|
3026
3118
|
};
|
|
3027
|
-
var
|
|
3028
|
-
var
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
});
|
|
3033
|
-
module2.exports = __toCommonJS22(log_exports);
|
|
3034
|
-
var logIf = (bool, ...arg) => {
|
|
3035
|
-
if (bool)
|
|
3036
|
-
arg.map((v) => console.log(v));
|
|
3119
|
+
var import_utils7 = __toESM2(require_cjs4(), 1);
|
|
3120
|
+
var findClosestNumber = (number, arr) => {
|
|
3121
|
+
return ((0, import_utils7.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3122
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3123
|
+
});
|
|
3037
3124
|
};
|
|
3038
|
-
var
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3125
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3126
|
+
val = parseFloat(val);
|
|
3127
|
+
if ((0, import_utils7.isObject)(factory))
|
|
3128
|
+
factory = Object.values(factory);
|
|
3129
|
+
return findClosestNumber(val, factory);
|
|
3130
|
+
};
|
|
3131
|
+
var formatDate = (timestamp) => {
|
|
3132
|
+
if (!timestamp)
|
|
3133
|
+
return "";
|
|
3134
|
+
const d = new Date(timestamp);
|
|
3135
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3136
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3137
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3138
|
+
return `${da} ${mo}, ${ye}`;
|
|
3139
|
+
};
|
|
3140
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3141
|
+
const fib = [0, 1];
|
|
3142
|
+
for (let i = 2; i <= n; i++) {
|
|
3143
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3144
|
+
}
|
|
3145
|
+
return fib[n];
|
|
3146
|
+
};
|
|
3147
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3148
|
+
return new Promise((resolve, reject) => {
|
|
3149
|
+
try {
|
|
3150
|
+
const scriptEle = doc.createElement("script");
|
|
3151
|
+
scriptEle.type = type;
|
|
3152
|
+
scriptEle.async = async;
|
|
3153
|
+
scriptEle.src = FILE_URL;
|
|
3154
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3155
|
+
resolve({
|
|
3156
|
+
status: true
|
|
3157
|
+
});
|
|
3158
|
+
});
|
|
3159
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3160
|
+
reject(new Error({
|
|
3161
|
+
status: false,
|
|
3162
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3163
|
+
}));
|
|
3164
|
+
});
|
|
3165
|
+
doc.body.appendChild(scriptEle);
|
|
3166
|
+
} catch (error) {
|
|
3167
|
+
reject(error);
|
|
3168
|
+
}
|
|
3169
|
+
});
|
|
3044
3170
|
};
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3171
|
+
var loadJavascriptFileSync = (FILE_URL, doc = document, fallback, type = "text/javascript") => {
|
|
3172
|
+
const xhr = new window.XMLHttpRequest();
|
|
3173
|
+
xhr.open("GET", FILE_URL, false);
|
|
3174
|
+
xhr.send();
|
|
3175
|
+
if (xhr.status === 200) {
|
|
3176
|
+
const scriptEle = doc.createElement("script");
|
|
3177
|
+
scriptEle.type = type;
|
|
3178
|
+
scriptEle.text = xhr.responseText;
|
|
3179
|
+
doc.body.appendChild(scriptEle);
|
|
3180
|
+
if (typeof fallback === "function")
|
|
3181
|
+
fallback();
|
|
3182
|
+
} else {
|
|
3183
|
+
throw new Error(`Failed to load the script ${FILE_URL}`);
|
|
3184
|
+
}
|
|
3185
|
+
};
|
|
3186
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3187
|
+
return new Promise((resolve, reject) => {
|
|
3188
|
+
try {
|
|
3189
|
+
const linkElem = doc.createElement("link");
|
|
3190
|
+
linkElem.rel = "stylesheet";
|
|
3191
|
+
linkElem.href = FILE_URL;
|
|
3192
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3193
|
+
resolve({
|
|
3194
|
+
status: true
|
|
3195
|
+
});
|
|
3196
|
+
});
|
|
3197
|
+
doc.head.appendChild(linkElem);
|
|
3198
|
+
} catch (error) {
|
|
3199
|
+
reject(error);
|
|
3200
|
+
}
|
|
3201
|
+
});
|
|
3057
3202
|
};
|
|
3058
|
-
var
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3203
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3204
|
+
try {
|
|
3205
|
+
const scriptEle = doc.createElement("script");
|
|
3206
|
+
scriptEle.type = type;
|
|
3207
|
+
scriptEle.async = async;
|
|
3208
|
+
scriptEle.id = id;
|
|
3209
|
+
scriptEle.innerHTML = body;
|
|
3210
|
+
doc.body.appendChild(scriptEle);
|
|
3211
|
+
} catch (error) {
|
|
3212
|
+
console.warn(error);
|
|
3213
|
+
}
|
|
3214
|
+
};
|
|
3215
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3216
|
+
var copyStringToClipboard = async (str) => {
|
|
3217
|
+
try {
|
|
3218
|
+
await navigator.clipboard.writeText(str);
|
|
3219
|
+
} catch (err) {
|
|
3220
|
+
console.warn("Failed to copy text: ", err);
|
|
3063
3221
|
}
|
|
3064
|
-
return to;
|
|
3065
|
-
};
|
|
3066
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3067
|
-
var cookie_exports = {};
|
|
3068
|
-
__export22(cookie_exports, {
|
|
3069
|
-
getCookie: () => getCookie,
|
|
3070
|
-
isMobile: () => isMobile,
|
|
3071
|
-
setCookie: () => setCookie
|
|
3072
|
-
});
|
|
3073
|
-
module2.exports = __toCommonJS22(cookie_exports);
|
|
3074
|
-
var import_types = require_types2();
|
|
3075
|
-
var import_utils32 = require_cjs3();
|
|
3076
|
-
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
3077
|
-
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
3078
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
3079
|
-
return;
|
|
3080
|
-
const d = /* @__PURE__ */ new Date();
|
|
3081
|
-
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
3082
|
-
const expires = `expires=${d.toUTCString()}`;
|
|
3083
|
-
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
3084
3222
|
};
|
|
3085
|
-
var
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
while (c.charAt(0) === " ")
|
|
3094
|
-
c = c.substring(1);
|
|
3095
|
-
if (c.indexOf(name) === 0)
|
|
3096
|
-
return c.substring(name.length, c.length);
|
|
3223
|
+
var copyJavaScriptToClipboard = async (jsCode) => {
|
|
3224
|
+
try {
|
|
3225
|
+
const blob = new Blob([jsCode], { type: "text/javascript" });
|
|
3226
|
+
const clipboardItem = new window.ClipboardItem({ "text/plain": blob });
|
|
3227
|
+
await navigator.clipboard.write([clipboardItem]);
|
|
3228
|
+
console.log("JavaScript code copied to clipboard as text/javascript");
|
|
3229
|
+
} catch (err) {
|
|
3230
|
+
console.error("Failed to copy JavaScript code: ", err);
|
|
3097
3231
|
}
|
|
3098
|
-
return "";
|
|
3099
3232
|
};
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
var require_tags2 = __commonJS2({
|
|
3103
|
-
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
3104
|
-
"use strict";
|
|
3105
|
-
var __defProp22 = Object.defineProperty;
|
|
3106
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3107
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3108
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3109
|
-
var __export22 = (target, all) => {
|
|
3110
|
-
for (var name in all)
|
|
3111
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3233
|
+
var removeChars = (str) => {
|
|
3234
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3112
3235
|
};
|
|
3113
|
-
var
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3118
|
-
}
|
|
3119
|
-
return to;
|
|
3236
|
+
var toCamelCase = (str) => {
|
|
3237
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3238
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3239
|
+
}).replaceAll(/\s+/g, "");
|
|
3120
3240
|
};
|
|
3121
|
-
var
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
var
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
"abbr",
|
|
3144
|
-
"acronym",
|
|
3145
|
-
"address",
|
|
3146
|
-
"applet",
|
|
3147
|
-
"area",
|
|
3148
|
-
"article",
|
|
3149
|
-
"aside",
|
|
3150
|
-
"audio",
|
|
3151
|
-
"b",
|
|
3152
|
-
"basefont",
|
|
3153
|
-
"bdi",
|
|
3154
|
-
"bdo",
|
|
3155
|
-
"big",
|
|
3156
|
-
"blockquote",
|
|
3157
|
-
"br",
|
|
3158
|
-
"button",
|
|
3159
|
-
"canvas",
|
|
3160
|
-
"caption",
|
|
3161
|
-
"center",
|
|
3162
|
-
"cite",
|
|
3163
|
-
"code",
|
|
3164
|
-
"search",
|
|
3165
|
-
"col",
|
|
3166
|
-
"colgroup",
|
|
3167
|
-
"data",
|
|
3168
|
-
"datalist",
|
|
3169
|
-
"dd",
|
|
3170
|
-
"del",
|
|
3171
|
-
"details",
|
|
3172
|
-
"dfn",
|
|
3173
|
-
"dialog",
|
|
3174
|
-
"dir",
|
|
3175
|
-
"div",
|
|
3176
|
-
"dl",
|
|
3177
|
-
"dt",
|
|
3178
|
-
"em",
|
|
3179
|
-
"embed",
|
|
3180
|
-
"fieldset",
|
|
3181
|
-
"figcaption",
|
|
3182
|
-
"figure",
|
|
3183
|
-
"font",
|
|
3184
|
-
"footer",
|
|
3185
|
-
"form",
|
|
3186
|
-
"frame",
|
|
3187
|
-
"frameset",
|
|
3188
|
-
"h1",
|
|
3189
|
-
"h2",
|
|
3190
|
-
"h3",
|
|
3191
|
-
"h4",
|
|
3192
|
-
"h5",
|
|
3193
|
-
"h6",
|
|
3194
|
-
"head",
|
|
3195
|
-
"header",
|
|
3196
|
-
"hr",
|
|
3197
|
-
"i",
|
|
3198
|
-
"iframe",
|
|
3199
|
-
"img",
|
|
3200
|
-
"input",
|
|
3201
|
-
"ins",
|
|
3202
|
-
"kbd",
|
|
3203
|
-
"label",
|
|
3204
|
-
"legend",
|
|
3205
|
-
"li",
|
|
3206
|
-
"link",
|
|
3207
|
-
"main",
|
|
3208
|
-
"map",
|
|
3209
|
-
"mark",
|
|
3210
|
-
"meter",
|
|
3211
|
-
"nav",
|
|
3212
|
-
"noframes",
|
|
3213
|
-
"noscript",
|
|
3214
|
-
"object",
|
|
3215
|
-
"ol",
|
|
3216
|
-
"optgroup",
|
|
3217
|
-
"option",
|
|
3218
|
-
"output",
|
|
3219
|
-
"p",
|
|
3220
|
-
"param",
|
|
3221
|
-
"picture",
|
|
3222
|
-
"pre",
|
|
3223
|
-
"progress",
|
|
3224
|
-
"hgroup",
|
|
3225
|
-
"q",
|
|
3226
|
-
"rp",
|
|
3227
|
-
"rt",
|
|
3228
|
-
"ruby",
|
|
3229
|
-
"s",
|
|
3230
|
-
"samp",
|
|
3231
|
-
"script",
|
|
3232
|
-
"section",
|
|
3233
|
-
"select",
|
|
3234
|
-
"small",
|
|
3235
|
-
"source",
|
|
3236
|
-
"span",
|
|
3237
|
-
"strike",
|
|
3238
|
-
"strong",
|
|
3239
|
-
"sub",
|
|
3240
|
-
"summary",
|
|
3241
|
-
"sup",
|
|
3242
|
-
"table",
|
|
3243
|
-
"tbody",
|
|
3244
|
-
"td",
|
|
3245
|
-
"template",
|
|
3246
|
-
"hgroup",
|
|
3247
|
-
"textarea",
|
|
3248
|
-
"tfoot",
|
|
3249
|
-
"th",
|
|
3250
|
-
"thead",
|
|
3251
|
-
"time",
|
|
3252
|
-
"tr",
|
|
3253
|
-
"track",
|
|
3254
|
-
"tt",
|
|
3255
|
-
"u",
|
|
3256
|
-
"ul",
|
|
3257
|
-
"var",
|
|
3258
|
-
"video",
|
|
3259
|
-
"wbr",
|
|
3260
|
-
// SVG
|
|
3261
|
-
"svg",
|
|
3262
|
-
"path"
|
|
3263
|
-
]
|
|
3241
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3242
|
+
/\w\S*/g,
|
|
3243
|
+
(txt) => {
|
|
3244
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3245
|
+
}
|
|
3246
|
+
);
|
|
3247
|
+
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3248
|
+
var toDescriptionCase = (str = "") => {
|
|
3249
|
+
if (typeof str !== "string")
|
|
3250
|
+
return;
|
|
3251
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3252
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3253
|
+
};
|
|
3254
|
+
var arrayzeValue = (val) => {
|
|
3255
|
+
if ((0, import_utils22.isArray)(val))
|
|
3256
|
+
return val;
|
|
3257
|
+
if ((0, import_utils22.isString)(val))
|
|
3258
|
+
return val.split(" ");
|
|
3259
|
+
if ((0, import_utils22.isObject)(val))
|
|
3260
|
+
return Object.values(val);
|
|
3261
|
+
if ((0, import_utils22.isNumber)(val))
|
|
3262
|
+
return [val];
|
|
3264
3263
|
};
|
|
3265
|
-
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
3266
3264
|
}
|
|
3267
3265
|
});
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3266
|
+
|
|
3267
|
+
// src/utils/index.js
|
|
3268
|
+
var utils_exports = {};
|
|
3269
|
+
__export(utils_exports, {
|
|
3270
|
+
applyMediaSequenceVars: () => applyMediaSequenceVars,
|
|
3271
|
+
applySequenceGlobalVars: () => applySequenceGlobalVars,
|
|
3272
|
+
applySequenceVars: () => applySequenceVars,
|
|
3273
|
+
changeLightness: () => changeLightness,
|
|
3274
|
+
colorStringToRgbaArray: () => colorStringToRgbaArray,
|
|
3275
|
+
convertSvgToSymbol: () => convertSvgToSymbol,
|
|
3276
|
+
findHeadingLetter: () => findHeadingLetter,
|
|
3277
|
+
findHeadings: () => findHeadings,
|
|
3278
|
+
generateSequence: () => generateSequence,
|
|
3279
|
+
generateSprite: () => generateSprite,
|
|
3280
|
+
generateSubSequence: () => generateSubSequence,
|
|
3281
|
+
getColorShade: () => getColorShade,
|
|
3282
|
+
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
3283
|
+
getFontFace: () => getFontFace,
|
|
3284
|
+
getFontFaceEach: () => getFontFaceEach,
|
|
3285
|
+
getFontFaceEachString: () => getFontFaceEachString,
|
|
3286
|
+
getFontFaceString: () => getFontFaceString,
|
|
3287
|
+
getFontFormat: () => getFontFormat,
|
|
3288
|
+
getRgbTone: () => getRgbTone,
|
|
3289
|
+
getSequenceValue: () => getSequenceValue,
|
|
3290
|
+
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
3291
|
+
getSubratio: () => getSubratio,
|
|
3292
|
+
getSubratioDifference: () => getSubratioDifference,
|
|
3293
|
+
hexToRgb: () => hexToRgb,
|
|
3294
|
+
hexToRgbArray: () => hexToRgbArray,
|
|
3295
|
+
hexToRgba: () => hexToRgba,
|
|
3296
|
+
hslToRgb: () => hslToRgb,
|
|
3297
|
+
isScalingUnit: () => isScalingUnit,
|
|
3298
|
+
mixTwoColors: () => mixTwoColors,
|
|
3299
|
+
mixTwoRgb: () => mixTwoRgb,
|
|
3300
|
+
mixTwoRgba: () => mixTwoRgba,
|
|
3301
|
+
numToLetterMap: () => numToLetterMap,
|
|
3302
|
+
opacify: () => opacify,
|
|
3303
|
+
returnSubThemeOrDefault: () => returnSubThemeOrDefault,
|
|
3304
|
+
rgbArrayToHex: () => rgbArrayToHex,
|
|
3305
|
+
rgbToHSL: () => rgbToHSL,
|
|
3306
|
+
rgbToHex: () => rgbToHex,
|
|
3307
|
+
setCustomFont: () => setCustomFont,
|
|
3308
|
+
setCustomFontMedia: () => setCustomFontMedia,
|
|
3309
|
+
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
3310
|
+
setScalingVar: () => setScalingVar,
|
|
3311
|
+
setSubScalingVar: () => setSubScalingVar,
|
|
3312
|
+
setVariables: () => setVariables
|
|
3313
|
+
});
|
|
3314
|
+
module.exports = __toCommonJS(utils_exports);
|
|
3315
|
+
|
|
3316
|
+
// src/utils/unit.js
|
|
3317
|
+
var isScalingUnit = (unit) => {
|
|
3318
|
+
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
3319
|
+
};
|
|
3320
|
+
|
|
3321
|
+
// src/utils/color.js
|
|
3322
|
+
var import_globals = __toESM(require_cjs(), 1);
|
|
3323
|
+
var import_utils = __toESM(require_cjs2(), 1);
|
|
3324
|
+
var ENV = "development";
|
|
3325
|
+
var colorStringToRgbaArray = (color) => {
|
|
3326
|
+
if (color === "")
|
|
3327
|
+
return [0, 0, 0, 0];
|
|
3328
|
+
if (color.toLowerCase() === "transparent")
|
|
3329
|
+
return [0, 0, 0, 0];
|
|
3330
|
+
if (color[0] === "#") {
|
|
3331
|
+
if (color.length < 7) {
|
|
3332
|
+
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
3333
|
+
}
|
|
3334
|
+
return [
|
|
3335
|
+
parseInt(color.substr(1, 2), 16),
|
|
3336
|
+
parseInt(color.substr(3, 2), 16),
|
|
3337
|
+
parseInt(color.substr(5, 2), 16),
|
|
3338
|
+
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
3339
|
+
];
|
|
3340
|
+
}
|
|
3341
|
+
if (color.indexOf("rgb") === -1) {
|
|
3342
|
+
if (import_globals.document && import_globals.window) {
|
|
3343
|
+
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
3344
|
+
const flag = "rgb(1, 2, 3)";
|
|
3345
|
+
elem.style.color = flag;
|
|
3346
|
+
if (elem.style.color !== flag) {
|
|
3347
|
+
import_globals.document.body.removeChild(elem);
|
|
3348
|
+
return;
|
|
3280
3349
|
}
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
__reExport(utils_exports2, require_types2(), module2.exports);
|
|
3290
|
-
__reExport(utils_exports2, require_object2(), module2.exports);
|
|
3291
|
-
__reExport(utils_exports2, require_function2(), module2.exports);
|
|
3292
|
-
__reExport(utils_exports2, require_array2(), module2.exports);
|
|
3293
|
-
__reExport(utils_exports2, require_node2(), module2.exports);
|
|
3294
|
-
__reExport(utils_exports2, require_log2(), module2.exports);
|
|
3295
|
-
__reExport(utils_exports2, require_string2(), module2.exports);
|
|
3296
|
-
__reExport(utils_exports2, require_globals2(), module2.exports);
|
|
3297
|
-
__reExport(utils_exports2, require_cookie2(), module2.exports);
|
|
3298
|
-
__reExport(utils_exports2, require_tags2(), module2.exports);
|
|
3350
|
+
elem.style.color = color;
|
|
3351
|
+
if (elem.style.color === flag || elem.style.color === "") {
|
|
3352
|
+
import_globals.document.body.removeChild(elem);
|
|
3353
|
+
return [0, 0, 0, 0];
|
|
3354
|
+
}
|
|
3355
|
+
color = import_globals.window.getComputedStyle(elem).color;
|
|
3356
|
+
import_globals.document.body.removeChild(elem);
|
|
3357
|
+
}
|
|
3299
3358
|
}
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
copyStringToClipboard: () => copyStringToClipboard,
|
|
3305
|
-
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3306
|
-
findClosestNumber: () => findClosestNumber,
|
|
3307
|
-
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3308
|
-
formatDate: () => formatDate,
|
|
3309
|
-
isPhoto: () => isPhoto,
|
|
3310
|
-
loadCssFile: () => loadCssFile,
|
|
3311
|
-
loadJavascript: () => loadJavascript,
|
|
3312
|
-
loadJavascriptFile: () => loadJavascriptFile,
|
|
3313
|
-
removeChars: () => removeChars,
|
|
3314
|
-
toCamelCase: () => toCamelCase,
|
|
3315
|
-
toDashCase: () => toDashCase,
|
|
3316
|
-
toDescriptionCase: () => toDescriptionCase,
|
|
3317
|
-
toTitleCase: () => toTitleCase,
|
|
3318
|
-
toggleFullscreen: () => toggleFullscreen
|
|
3319
|
-
});
|
|
3320
|
-
module.exports = __toCommonJS2(src_exports);
|
|
3321
|
-
var import_utils2 = __toESM2(require_cjs3(), 1);
|
|
3322
|
-
var toggleFullscreen = (el) => {
|
|
3323
|
-
if (!document.fullscreenElement) {
|
|
3324
|
-
el.node.requestFullscreen().catch((err) => {
|
|
3325
|
-
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3326
|
-
});
|
|
3327
|
-
} else {
|
|
3328
|
-
document.exitFullscreen();
|
|
3359
|
+
if (color.indexOf("rgb") === 0) {
|
|
3360
|
+
if (color.indexOf("rgba") === -1)
|
|
3361
|
+
color = `${color}, 1`;
|
|
3362
|
+
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
3329
3363
|
}
|
|
3364
|
+
return [0, 0, 0, 0];
|
|
3330
3365
|
};
|
|
3331
|
-
var
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
});
|
|
3366
|
+
var mixTwoColors = (colorA, colorB, range = 0.5) => {
|
|
3367
|
+
colorA = colorStringToRgbaArray(colorA);
|
|
3368
|
+
colorB = colorStringToRgbaArray(colorB);
|
|
3369
|
+
return mixTwoRgba(colorA, colorB, range);
|
|
3336
3370
|
};
|
|
3337
|
-
var
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
factory = Object.values(factory);
|
|
3341
|
-
return findClosestNumber(val, factory);
|
|
3371
|
+
var hexToRgb = (hex, alpha = 1) => {
|
|
3372
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
3373
|
+
return `rgb(${r},${g},${b})`;
|
|
3342
3374
|
};
|
|
3343
|
-
var
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
const d = new Date(timestamp);
|
|
3347
|
-
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3348
|
-
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3349
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3350
|
-
return `${da} ${mo}, ${ye}`;
|
|
3375
|
+
var hexToRgbArray = (hex, alpha = 1) => {
|
|
3376
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
3377
|
+
return [r, g, b];
|
|
3351
3378
|
};
|
|
3352
|
-
var
|
|
3353
|
-
|
|
3354
|
-
for (let i = 2; i <= n; i++) {
|
|
3355
|
-
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3356
|
-
}
|
|
3357
|
-
return fib[n];
|
|
3379
|
+
var rgbToHex = (r, g, b) => {
|
|
3380
|
+
return "#" + (1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1);
|
|
3358
3381
|
};
|
|
3359
|
-
var
|
|
3360
|
-
return
|
|
3361
|
-
try {
|
|
3362
|
-
const scriptEle = doc.createElement("script");
|
|
3363
|
-
scriptEle.type = type;
|
|
3364
|
-
scriptEle.async = async;
|
|
3365
|
-
scriptEle.src = FILE_URL;
|
|
3366
|
-
scriptEle.addEventListener("load", (ev) => {
|
|
3367
|
-
resolve({
|
|
3368
|
-
status: true
|
|
3369
|
-
});
|
|
3370
|
-
});
|
|
3371
|
-
scriptEle.addEventListener("error", (ev) => {
|
|
3372
|
-
reject({
|
|
3373
|
-
status: false,
|
|
3374
|
-
message: `Failed to load the script ${FILE_URL}`
|
|
3375
|
-
});
|
|
3376
|
-
});
|
|
3377
|
-
doc.body.appendChild(scriptEle);
|
|
3378
|
-
} catch (error) {
|
|
3379
|
-
reject(error);
|
|
3380
|
-
}
|
|
3381
|
-
});
|
|
3382
|
+
var rgbArrayToHex = ([r, g, b]) => {
|
|
3383
|
+
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
3382
3384
|
};
|
|
3383
|
-
var
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
const linkElem = doc.createElement("link");
|
|
3387
|
-
linkElem.rel = "stylesheet";
|
|
3388
|
-
linkElem.href = FILE_URL;
|
|
3389
|
-
linkElem.addEventListener("load", (ev) => {
|
|
3390
|
-
resolve({
|
|
3391
|
-
status: true
|
|
3392
|
-
});
|
|
3393
|
-
});
|
|
3394
|
-
doc.head.appendChild(linkElem);
|
|
3395
|
-
} catch (error) {
|
|
3396
|
-
reject(error);
|
|
3397
|
-
}
|
|
3398
|
-
});
|
|
3385
|
+
var hexToRgba = (hex, alpha = 1) => {
|
|
3386
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
3387
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
3399
3388
|
};
|
|
3400
|
-
var
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
scriptEle.async = async;
|
|
3405
|
-
scriptEle.id = id;
|
|
3406
|
-
scriptEle.innerHTML = body;
|
|
3407
|
-
doc.body.appendChild(scriptEle);
|
|
3408
|
-
} catch (error) {
|
|
3409
|
-
console.warn(error);
|
|
3389
|
+
var mixTwoRgb = (colorA, colorB, range = 0.5) => {
|
|
3390
|
+
const arr = [];
|
|
3391
|
+
for (let i = 0; i < 3; i++) {
|
|
3392
|
+
arr[i] = ~~(colorA[i] + (colorB[i] - colorA[i]) * range);
|
|
3410
3393
|
}
|
|
3394
|
+
return `rgb(${arr})`;
|
|
3395
|
+
};
|
|
3396
|
+
var changeLightness = (delta, hsl) => {
|
|
3397
|
+
const [hue, saturation, lightness] = hsl;
|
|
3398
|
+
const newLightness = Math.max(
|
|
3399
|
+
0,
|
|
3400
|
+
Math.min(100, lightness + parseFloat(delta))
|
|
3401
|
+
);
|
|
3402
|
+
return [hue, saturation, newLightness];
|
|
3403
|
+
};
|
|
3404
|
+
var rgbToHSL = (r, g, b) => {
|
|
3405
|
+
const a = Math.max(r, g, b);
|
|
3406
|
+
const n = a - Math.min(r, g, b);
|
|
3407
|
+
const f = 1 - Math.abs(a + a - n - 1);
|
|
3408
|
+
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
3409
|
+
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
3411
3410
|
};
|
|
3412
|
-
var
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3411
|
+
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
3412
|
+
Math.min(k - 3, 9 - k, 1),
|
|
3413
|
+
-1
|
|
3414
|
+
)) => [f(0), f(8), f(4)];
|
|
3415
|
+
var getColorShade = (col, amt) => {
|
|
3416
|
+
const num = parseInt(col, 16);
|
|
3417
|
+
let r = (num >> 16) + amt;
|
|
3418
|
+
if (r > 255)
|
|
3419
|
+
r = 255;
|
|
3420
|
+
else if (r < 0)
|
|
3421
|
+
r = 0;
|
|
3422
|
+
let b = (num >> 8 & 255) + amt;
|
|
3423
|
+
if (b > 255)
|
|
3424
|
+
b = 255;
|
|
3425
|
+
else if (b < 0)
|
|
3426
|
+
b = 0;
|
|
3427
|
+
let g = (num & 255) + amt;
|
|
3428
|
+
if (g > 255)
|
|
3429
|
+
g = 255;
|
|
3430
|
+
else if (g < 0)
|
|
3431
|
+
g = 0;
|
|
3432
|
+
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
3422
3433
|
};
|
|
3423
|
-
var
|
|
3424
|
-
|
|
3434
|
+
var mixTwoRgba = (colorA, colorB, range = 0.5) => {
|
|
3435
|
+
const arr = [];
|
|
3436
|
+
for (let i = 0; i < 4; i++) {
|
|
3437
|
+
const round = i === 3 ? (x) => x : Math.round;
|
|
3438
|
+
arr[i] = round(
|
|
3439
|
+
colorA[i] + (colorB[i] - colorA[i]) * range
|
|
3440
|
+
);
|
|
3441
|
+
}
|
|
3442
|
+
return `rgba(${arr})`;
|
|
3425
3443
|
};
|
|
3426
|
-
var
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3444
|
+
var opacify = (color, opacity) => {
|
|
3445
|
+
const arr = colorStringToRgbaArray(color);
|
|
3446
|
+
if (!arr) {
|
|
3447
|
+
if (ENV === "test" || ENV === "development")
|
|
3448
|
+
console.warn(color + " color is not rgba");
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3451
|
+
arr[3] = opacity;
|
|
3452
|
+
return `rgba(${arr})`;
|
|
3430
3453
|
};
|
|
3431
|
-
var
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3454
|
+
var getRgbTone = (rgb, tone) => {
|
|
3455
|
+
if ((0, import_utils.isString)(rgb) && rgb.includes("rgb"))
|
|
3456
|
+
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
3457
|
+
if ((0, import_utils.isString)(rgb))
|
|
3458
|
+
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
3459
|
+
if ((0, import_utils.isNumber)(tone))
|
|
3460
|
+
tone += "";
|
|
3461
|
+
const toHex = rgbArrayToHex(rgb);
|
|
3462
|
+
const abs = tone.slice(0, 1);
|
|
3463
|
+
if (abs === "-" || abs === "+") {
|
|
3464
|
+
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
3465
|
+
return hexToRgbArray(colorShade).join(", ");
|
|
3466
|
+
} else {
|
|
3467
|
+
const [r, g, b] = rgb;
|
|
3468
|
+
const hsl = rgbToHSL(r, g, b);
|
|
3469
|
+
const [h, s, l] = hsl;
|
|
3470
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
3471
|
+
return newRgb;
|
|
3435
3472
|
}
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3473
|
+
};
|
|
3474
|
+
|
|
3475
|
+
// src/utils/theme.js
|
|
3476
|
+
var returnSubThemeOrDefault = (orig, theme) => {
|
|
3477
|
+
if (!orig)
|
|
3440
3478
|
return;
|
|
3441
|
-
|
|
3442
|
-
|
|
3479
|
+
if (orig.themes && orig.themes[theme])
|
|
3480
|
+
return orig.themes[theme];
|
|
3481
|
+
if (orig[theme])
|
|
3482
|
+
return [orig, orig[theme]];
|
|
3483
|
+
return orig;
|
|
3484
|
+
};
|
|
3485
|
+
|
|
3486
|
+
// src/utils/font.js
|
|
3487
|
+
var getDefaultOrFirstKey = (LIBRARY, key) => {
|
|
3488
|
+
if (LIBRARY[key])
|
|
3489
|
+
return LIBRARY[key].value;
|
|
3490
|
+
if (LIBRARY.default)
|
|
3491
|
+
return LIBRARY[LIBRARY.default].value;
|
|
3492
|
+
const hasValue = Object.keys(LIBRARY)[0];
|
|
3493
|
+
return hasValue && LIBRARY[hasValue] && LIBRARY[hasValue].value;
|
|
3494
|
+
};
|
|
3495
|
+
var getFontFormat = (url) => url.split(/[#?]/)[0].split(".").pop().trim();
|
|
3496
|
+
var setInCustomFontMedia = (str) => `@font-face { ${str} }`;
|
|
3497
|
+
var setCustomFont = (name, url, weight) => `
|
|
3498
|
+
font-family: '${name}';
|
|
3499
|
+
font-style: normal;
|
|
3500
|
+
${weight && `font-weight: ${weight};`}
|
|
3501
|
+
src: url('${url}') format('${getFontFormat(url)}');`;
|
|
3502
|
+
var setCustomFontMedia = (name, url, weight) => `@font-face {
|
|
3503
|
+
${setCustomFont(name, url, weight)}
|
|
3504
|
+
}`;
|
|
3505
|
+
var getFontFaceEach = (name, weights) => {
|
|
3506
|
+
const keys = Object.keys(weights);
|
|
3507
|
+
return keys.map((key) => {
|
|
3508
|
+
const { url, fontWeight } = weights[key];
|
|
3509
|
+
return setCustomFont(name, url, fontWeight);
|
|
3510
|
+
});
|
|
3511
|
+
};
|
|
3512
|
+
var getFontFace = (LIBRARY) => {
|
|
3513
|
+
const keys = Object.keys(LIBRARY);
|
|
3514
|
+
return keys.map((key) => getFontFaceEach(key, LIBRARY[key].value));
|
|
3515
|
+
};
|
|
3516
|
+
var getFontFaceEachString = (name, weights) => {
|
|
3517
|
+
const isArr = weights[0];
|
|
3518
|
+
if (isArr)
|
|
3519
|
+
return getFontFaceEach(name, weights).map(setInCustomFontMedia);
|
|
3520
|
+
return setCustomFontMedia(name, weights.url);
|
|
3443
3521
|
};
|
|
3444
|
-
var
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
if ((0, import_utils2.isString)(val))
|
|
3448
|
-
return val.split(" ");
|
|
3449
|
-
if ((0, import_utils2.isObject)(val))
|
|
3450
|
-
return Object.values(val);
|
|
3451
|
-
if ((0, import_utils2.isNumber)(val))
|
|
3452
|
-
return [val];
|
|
3522
|
+
var getFontFaceString = (LIBRARY) => {
|
|
3523
|
+
const keys = Object.keys(LIBRARY);
|
|
3524
|
+
return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
|
|
3453
3525
|
};
|
|
3454
3526
|
|
|
3527
|
+
// src/utils/sequence.js
|
|
3528
|
+
var import_utils3 = __toESM(require_cjs2(), 1);
|
|
3529
|
+
var import_utils4 = __toESM(require_cjs3(), 1);
|
|
3530
|
+
|
|
3455
3531
|
// src/factory.js
|
|
3456
|
-
var
|
|
3532
|
+
var import_utils2 = __toESM(require_cjs2(), 1);
|
|
3457
3533
|
|
|
3458
3534
|
// src/defaultConfig/index.js
|
|
3459
3535
|
var defaultConfig_exports = {};
|
|
@@ -3619,9 +3695,11 @@ var BREAKPOINTS = {
|
|
|
3619
3695
|
mobileXS: 375
|
|
3620
3696
|
};
|
|
3621
3697
|
var DEVICES = {
|
|
3698
|
+
screenXXL: [2560, 1440],
|
|
3699
|
+
screenXL: [2240, 1260],
|
|
3622
3700
|
screenL: [1920, 1024],
|
|
3623
3701
|
screenM: [1680, 1024],
|
|
3624
|
-
screenS: [1440,
|
|
3702
|
+
screenS: [1440, 720],
|
|
3625
3703
|
tabletL: [1366, 926],
|
|
3626
3704
|
tabletM: [1280, 768],
|
|
3627
3705
|
tabletS: [1024, 768],
|
|
@@ -3660,7 +3738,7 @@ var CONFIG = {
|
|
|
3660
3738
|
CSS_VARS,
|
|
3661
3739
|
...defaultConfig_exports
|
|
3662
3740
|
};
|
|
3663
|
-
var cachedConfig = (0,
|
|
3741
|
+
var cachedConfig = (0, import_utils2.deepClone)(CONFIG);
|
|
3664
3742
|
var FACTORY = {
|
|
3665
3743
|
active: "0",
|
|
3666
3744
|
0: CONFIG
|
|
@@ -3811,9 +3889,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3811
3889
|
unit = UNIT2.default,
|
|
3812
3890
|
useVariable
|
|
3813
3891
|
} = sequenceProps;
|
|
3814
|
-
if ((0,
|
|
3892
|
+
if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
|
|
3815
3893
|
return `var(${value})`;
|
|
3816
|
-
const prefix = `--${(
|
|
3894
|
+
const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3817
3895
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3818
3896
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3819
3897
|
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)
|
|
@@ -3859,7 +3937,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3859
3937
|
};
|
|
3860
3938
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
3861
3939
|
if (typeof value !== "string") {
|
|
3862
|
-
|
|
3940
|
+
const CONFIG2 = getActiveConfig();
|
|
3941
|
+
if (CONFIG2.verbose)
|
|
3942
|
+
console.warn(propertyName, value, "is not a string");
|
|
3863
3943
|
return { [propertyName]: value };
|
|
3864
3944
|
}
|
|
3865
3945
|
if (value === "-" || value === "")
|
|
@@ -3876,11 +3956,11 @@ var findHeadings = (propertyNames) => {
|
|
|
3876
3956
|
};
|
|
3877
3957
|
|
|
3878
3958
|
// src/utils/var.js
|
|
3879
|
-
var
|
|
3959
|
+
var import_utils5 = __toESM(require_cjs2(), 1);
|
|
3880
3960
|
var setVariables = (result, key) => {
|
|
3881
3961
|
const CONFIG2 = getActiveConfig();
|
|
3882
3962
|
const { CSS_VARS: CSS_VARS2 } = CONFIG2;
|
|
3883
|
-
if ((0,
|
|
3963
|
+
if ((0, import_utils5.isObjectLike)(result.value)) {
|
|
3884
3964
|
} else {
|
|
3885
3965
|
CSS_VARS2[result.var] = result.value;
|
|
3886
3966
|
}
|
|
@@ -3955,7 +4035,7 @@ var applyMediaSequenceVars = (FACTORY2, media, options = {}) => {
|
|
|
3955
4035
|
};
|
|
3956
4036
|
|
|
3957
4037
|
// src/utils/sprite.js
|
|
3958
|
-
var
|
|
4038
|
+
var import_utils6 = __toESM(require_cjs2(), 1);
|
|
3959
4039
|
var generateSprite = (icons) => {
|
|
3960
4040
|
const CONFIG2 = getActiveConfig();
|
|
3961
4041
|
let sprite = "";
|
|
@@ -3969,7 +4049,7 @@ var generateSprite = (icons) => {
|
|
|
3969
4049
|
return sprite;
|
|
3970
4050
|
};
|
|
3971
4051
|
var parseRootAttributes = (htmlString) => {
|
|
3972
|
-
if (!(0,
|
|
4052
|
+
if (!(0, import_utils6.isString)(htmlString)) {
|
|
3973
4053
|
return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
|
|
3974
4054
|
}
|
|
3975
4055
|
const match = htmlString.match(/<svg\s+(.*?)>/);
|
|
@@ -3989,7 +4069,7 @@ var replaceIdsAndUrls = (code, key) => {
|
|
|
3989
4069
|
const urlRegex = /url\(#([^)]*)\)/g;
|
|
3990
4070
|
const matches = code.match(/id="([^"]*)"/g);
|
|
3991
4071
|
let replacedCode = code;
|
|
3992
|
-
if ((0,
|
|
4072
|
+
if ((0, import_utils6.isArray)(matches)) {
|
|
3993
4073
|
matches.forEach(() => {
|
|
3994
4074
|
const randomKey = Math.floor(Math.random() * 1e5);
|
|
3995
4075
|
replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);
|