@symbo.ls/scratch 2.11.131 → 2.11.132

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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/defaultConfig/animation.js +26 -0
  3. package/dist/cjs/defaultConfig/cases.js +26 -0
  4. package/dist/cjs/defaultConfig/color.js +28 -0
  5. package/dist/cjs/defaultConfig/document.js +26 -0
  6. package/dist/cjs/defaultConfig/font-family.js +34 -0
  7. package/dist/cjs/defaultConfig/font.js +26 -0
  8. package/dist/cjs/defaultConfig/icons.js +26 -0
  9. package/dist/cjs/defaultConfig/index.js +221 -0
  10. package/dist/cjs/defaultConfig/media.js +51 -0
  11. package/dist/cjs/defaultConfig/responsive.js +50 -0
  12. package/dist/cjs/defaultConfig/sequence.js +51 -0
  13. package/dist/cjs/defaultConfig/spacing.js +85 -0
  14. package/dist/cjs/defaultConfig/svg.js +28 -0
  15. package/dist/cjs/defaultConfig/templates.js +26 -0
  16. package/dist/cjs/defaultConfig/theme.js +26 -0
  17. package/dist/cjs/defaultConfig/timing.js +67 -0
  18. package/dist/cjs/defaultConfig/typography.js +71 -0
  19. package/dist/cjs/defaultConfig/unit.js +28 -0
  20. package/dist/cjs/factory.js +1442 -0
  21. package/dist/cjs/index.js +3059 -0
  22. package/dist/cjs/package.json +4 -0
  23. package/dist/cjs/set.js +2428 -0
  24. package/dist/cjs/system/color.js +1711 -0
  25. package/dist/cjs/system/document.js +1504 -0
  26. package/dist/cjs/system/font.js +1544 -0
  27. package/dist/cjs/system/index.js +2616 -0
  28. package/dist/cjs/system/reset.js +1613 -0
  29. package/dist/cjs/system/spacing.js +1788 -0
  30. package/dist/cjs/system/svg.js +1615 -0
  31. package/dist/cjs/system/theme.js +1799 -0
  32. package/dist/cjs/system/timing.js +1701 -0
  33. package/dist/cjs/system/typography.js +1754 -0
  34. package/dist/cjs/tests/index.js +30 -0
  35. package/dist/cjs/transforms/index.js +1977 -0
  36. package/dist/cjs/utils/color.js +1399 -0
  37. package/dist/cjs/utils/font.js +72 -0
  38. package/dist/cjs/utils/index.js +1977 -0
  39. package/dist/cjs/utils/sequence.js +1611 -0
  40. package/dist/cjs/utils/sprite.js +1486 -0
  41. package/dist/cjs/utils/theme.js +34 -0
  42. package/dist/cjs/utils/var.js +1467 -0
  43. package/package.json +2 -2
@@ -0,0 +1,1615 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../node_modules/@domql/globals/dist/cjs/index.js
34
+ var require_cjs = __commonJS({
35
+ "../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
36
+ "use strict";
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
+ for (var name in all)
43
+ __defProp2(target, name, { get: all[name], enumerable: true });
44
+ };
45
+ var __copyProps2 = (to, from, except, desc) => {
46
+ if (from && typeof from === "object" || typeof from === "function") {
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
+ }
51
+ return to;
52
+ };
53
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
54
+ var globals_exports = {};
55
+ __export2(globals_exports, {
56
+ document: () => document4,
57
+ global: () => global,
58
+ self: () => self,
59
+ window: () => window2
60
+ });
61
+ module2.exports = __toCommonJS2(globals_exports);
62
+ var global = globalThis;
63
+ var self = globalThis;
64
+ var window2 = globalThis;
65
+ var document4 = window2.document;
66
+ }
67
+ });
68
+
69
+ // ../../node_modules/@domql/utils/dist/cjs/key.js
70
+ var require_key = __commonJS({
71
+ "../../node_modules/@domql/utils/dist/cjs/key.js"(exports, module2) {
72
+ "use strict";
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
+ for (var name in all)
79
+ __defProp2(target, name, { get: all[name], enumerable: true });
80
+ };
81
+ var __copyProps2 = (to, from, except, desc) => {
82
+ if (from && typeof from === "object" || typeof from === "function") {
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
+ }
87
+ return to;
88
+ };
89
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
90
+ var key_exports = {};
91
+ __export2(key_exports, {
92
+ createKey: () => createKey,
93
+ createSnapshotId: () => createSnapshotId
94
+ });
95
+ module2.exports = __toCommonJS2(key_exports);
96
+ var createKey = function() {
97
+ let index = 0;
98
+ function newId() {
99
+ index++;
100
+ return index;
101
+ }
102
+ return newId;
103
+ }();
104
+ var createSnapshotId = createKey;
105
+ }
106
+ });
107
+
108
+ // ../../node_modules/@domql/utils/dist/cjs/env.js
109
+ var require_env = __commonJS({
110
+ "../../node_modules/@domql/utils/dist/cjs/env.js"(exports, module2) {
111
+ "use strict";
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
+ for (var name in all)
118
+ __defProp2(target, name, { get: all[name], enumerable: true });
119
+ };
120
+ var __copyProps2 = (to, from, except, desc) => {
121
+ if (from && typeof from === "object" || typeof from === "function") {
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
+ }
126
+ return to;
127
+ };
128
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
129
+ var env_exports = {};
130
+ __export2(env_exports, {
131
+ NODE_ENV: () => NODE_ENV,
132
+ getNev: () => getNev,
133
+ isDevelopment: () => isDevelopment,
134
+ isProduction: () => isProduction,
135
+ isTest: () => isTest
136
+ });
137
+ module2.exports = __toCommonJS2(env_exports);
138
+ var NODE_ENV = "development";
139
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
140
+ var isTest = (env = NODE_ENV) => env === "test";
141
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
142
+ var getNev = (key, env = NODE_ENV) => env[key];
143
+ }
144
+ });
145
+
146
+ // ../../node_modules/@domql/utils/dist/cjs/globals.js
147
+ var require_globals = __commonJS({
148
+ "../../node_modules/@domql/utils/dist/cjs/globals.js"(exports, module2) {
149
+ "use strict";
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
+ for (var name in all)
156
+ __defProp2(target, name, { get: all[name], enumerable: true });
157
+ };
158
+ var __copyProps2 = (to, from, except, desc) => {
159
+ if (from && typeof from === "object" || typeof from === "function") {
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
+ }
164
+ return to;
165
+ };
166
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
167
+ var globals_exports = {};
168
+ __export2(globals_exports, {
169
+ document: () => document4,
170
+ global: () => global,
171
+ self: () => self,
172
+ window: () => window2
173
+ });
174
+ module2.exports = __toCommonJS2(globals_exports);
175
+ var global = globalThis;
176
+ var self = globalThis;
177
+ var window2 = globalThis;
178
+ var document4 = window2.document;
179
+ }
180
+ });
181
+
182
+ // ../../node_modules/@domql/utils/dist/cjs/node.js
183
+ var require_node = __commonJS({
184
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports, module2) {
185
+ "use strict";
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
+ for (var name in all)
192
+ __defProp2(target, name, { get: all[name], enumerable: true });
193
+ };
194
+ var __copyProps2 = (to, from, except, desc) => {
195
+ if (from && typeof from === "object" || typeof from === "function") {
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
+ }
200
+ return to;
201
+ };
202
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
203
+ var node_exports = {};
204
+ __export2(node_exports, {
205
+ isHtmlElement: () => isHtmlElement,
206
+ isNode: () => isNode
207
+ });
208
+ module2.exports = __toCommonJS2(node_exports);
209
+ var import_globals3 = require_globals();
210
+ var isNode = (obj) => {
211
+ return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
212
+ };
213
+ var isHtmlElement = (obj) => {
214
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
215
+ };
216
+ }
217
+ });
218
+
219
+ // ../../node_modules/@domql/utils/dist/cjs/types.js
220
+ var require_types = __commonJS({
221
+ "../../node_modules/@domql/utils/dist/cjs/types.js"(exports, module2) {
222
+ "use strict";
223
+ var __defProp2 = Object.defineProperty;
224
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
225
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
226
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
227
+ var __export2 = (target, all) => {
228
+ for (var name in all)
229
+ __defProp2(target, name, { get: all[name], enumerable: true });
230
+ };
231
+ var __copyProps2 = (to, from, except, desc) => {
232
+ if (from && typeof from === "object" || typeof from === "function") {
233
+ for (let key of __getOwnPropNames2(from))
234
+ if (!__hasOwnProp2.call(to, key) && key !== except)
235
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
236
+ }
237
+ return to;
238
+ };
239
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
240
+ var types_exports = {};
241
+ __export2(types_exports, {
242
+ TYPES: () => TYPES,
243
+ is: () => is,
244
+ isArray: () => isArray4,
245
+ isBoolean: () => isBoolean,
246
+ isDefined: () => isDefined2,
247
+ isFunction: () => isFunction,
248
+ isNot: () => isNot,
249
+ isNull: () => isNull,
250
+ isNumber: () => isNumber2,
251
+ isObject: () => isObject4,
252
+ isObjectLike: () => isObjectLike2,
253
+ isString: () => isString5,
254
+ isUndefined: () => isUndefined
255
+ });
256
+ module2.exports = __toCommonJS2(types_exports);
257
+ var import_node = require_node();
258
+ var isObject4 = (arg) => {
259
+ if (arg === null)
260
+ return false;
261
+ return typeof arg === "object" && arg.constructor === Object;
262
+ };
263
+ var isString5 = (arg) => typeof arg === "string";
264
+ var isNumber2 = (arg) => typeof arg === "number";
265
+ var isFunction = (arg) => typeof arg === "function";
266
+ var isBoolean = (arg) => arg === true || arg === false;
267
+ var isNull = (arg) => arg === null;
268
+ var isArray4 = (arg) => Array.isArray(arg);
269
+ var isObjectLike2 = (arg) => {
270
+ if (arg === null)
271
+ return false;
272
+ return typeof arg === "object";
273
+ };
274
+ var isDefined2 = (arg) => {
275
+ return isObject4(arg) || isObjectLike2(arg) || isString5(arg) || isNumber2(arg) || isFunction(arg) || isArray4(arg) || isObjectLike2(arg) || isBoolean(arg) || isNull(arg);
276
+ };
277
+ var isUndefined = (arg) => {
278
+ return arg === void 0;
279
+ };
280
+ var TYPES = {
281
+ boolean: isBoolean,
282
+ array: isArray4,
283
+ object: isObject4,
284
+ string: isString5,
285
+ number: isNumber2,
286
+ null: isNull,
287
+ function: isFunction,
288
+ objectLike: isObjectLike2,
289
+ node: import_node.isNode,
290
+ htmlElement: import_node.isHtmlElement,
291
+ defined: isDefined2
292
+ };
293
+ var is = (arg) => {
294
+ return (...args) => {
295
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
296
+ };
297
+ };
298
+ var isNot = (arg) => {
299
+ return (...args) => {
300
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
301
+ };
302
+ };
303
+ }
304
+ });
305
+
306
+ // ../../node_modules/@domql/utils/dist/cjs/array.js
307
+ var require_array = __commonJS({
308
+ "../../node_modules/@domql/utils/dist/cjs/array.js"(exports, module2) {
309
+ "use strict";
310
+ var __defProp2 = Object.defineProperty;
311
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
312
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
313
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
314
+ var __export2 = (target, all) => {
315
+ for (var name in all)
316
+ __defProp2(target, name, { get: all[name], enumerable: true });
317
+ };
318
+ var __copyProps2 = (to, from, except, desc) => {
319
+ if (from && typeof from === "object" || typeof from === "function") {
320
+ for (let key of __getOwnPropNames2(from))
321
+ if (!__hasOwnProp2.call(to, key) && key !== except)
322
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
323
+ }
324
+ return to;
325
+ };
326
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
327
+ var array_exports = {};
328
+ __export2(array_exports, {
329
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
330
+ createNestedObject: () => createNestedObject,
331
+ cutArrayAfterValue: () => cutArrayAfterValue,
332
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
333
+ joinArrays: () => joinArrays,
334
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
335
+ mergeArray: () => mergeArray,
336
+ removeFromArray: () => removeFromArray,
337
+ swapItemsInArray: () => swapItemsInArray
338
+ });
339
+ module2.exports = __toCommonJS2(array_exports);
340
+ var import_object = require_object();
341
+ var import_types = require_types();
342
+ var arrayContainsOtherArray = (arr1, arr2) => {
343
+ return arr2.every((val) => arr1.includes(val));
344
+ };
345
+ var removeFromArray = (arr, index) => {
346
+ if ((0, import_types.isString)(index))
347
+ index = parseInt(index);
348
+ if ((0, import_types.isNumber)(index)) {
349
+ if (index < 0 || index >= arr.length || isNaN(index)) {
350
+ throw new Error("Invalid index");
351
+ }
352
+ arr.splice(index, 1);
353
+ } else if ((0, import_types.isArray)(index)) {
354
+ index.forEach((idx) => removeFromArray(arr, idx));
355
+ } else {
356
+ throw new Error("Invalid index");
357
+ }
358
+ return arr;
359
+ };
360
+ var swapItemsInArray = (arr, i, j) => {
361
+ [arr[i], arr[j]] = [arr[j], arr[i]];
362
+ };
363
+ var joinArrays = (...arrays) => {
364
+ return [].concat(...arrays);
365
+ };
366
+ var mergeArray = (arr, excludeFrom = []) => {
367
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
368
+ };
369
+ var mergeAndCloneIfArray = (obj) => {
370
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
371
+ };
372
+ var cutArrayBeforeValue = (arr, value) => {
373
+ const index = arr.indexOf(value);
374
+ if (index !== -1) {
375
+ return arr.slice(0, index);
376
+ }
377
+ return arr;
378
+ };
379
+ var cutArrayAfterValue = (arr, value) => {
380
+ const index = arr.indexOf(value);
381
+ if (index !== -1) {
382
+ return arr.slice(index + 1);
383
+ }
384
+ return arr;
385
+ };
386
+ var createNestedObject = (arr, lastValue) => {
387
+ const nestedObject = {};
388
+ if (arr.length === 0) {
389
+ return lastValue;
390
+ }
391
+ arr.reduce((obj, value, index) => {
392
+ if (!obj[value]) {
393
+ obj[value] = {};
394
+ }
395
+ if (index === arr.length - 1 && lastValue) {
396
+ obj[value] = lastValue;
397
+ }
398
+ return obj[value];
399
+ }, nestedObject);
400
+ return nestedObject;
401
+ };
402
+ }
403
+ });
404
+
405
+ // ../../node_modules/@domql/utils/dist/cjs/string.js
406
+ var require_string = __commonJS({
407
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports, module2) {
408
+ "use strict";
409
+ var __defProp2 = Object.defineProperty;
410
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
411
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
412
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
413
+ var __export2 = (target, all) => {
414
+ for (var name in all)
415
+ __defProp2(target, name, { get: all[name], enumerable: true });
416
+ };
417
+ var __copyProps2 = (to, from, except, desc) => {
418
+ if (from && typeof from === "object" || typeof from === "function") {
419
+ for (let key of __getOwnPropNames2(from))
420
+ if (!__hasOwnProp2.call(to, key) && key !== except)
421
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
422
+ }
423
+ return to;
424
+ };
425
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
426
+ var string_exports = {};
427
+ __export2(string_exports, {
428
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
429
+ stringIncludesAny: () => stringIncludesAny
430
+ });
431
+ module2.exports = __toCommonJS2(string_exports);
432
+ var stringIncludesAny = (str, characters) => {
433
+ for (const char of characters) {
434
+ if (str.includes(char)) {
435
+ return true;
436
+ }
437
+ }
438
+ return false;
439
+ };
440
+ var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
441
+ var replaceLiteralsWithObjectFields = (str, state) => {
442
+ if (!str.includes("{{"))
443
+ return str;
444
+ return str.replace(brackRegex, (_, parentPath, variable) => {
445
+ if (parentPath) {
446
+ const parentLevels = parentPath.match(/\.\.\//g).length;
447
+ let parentState = state;
448
+ for (let i = 0; i < parentLevels; i++) {
449
+ parentState = parentState.parent;
450
+ if (!parentState) {
451
+ return "";
452
+ }
453
+ }
454
+ const value = parentState[variable.trim()];
455
+ return value !== void 0 ? `${value}` : "";
456
+ } else {
457
+ const value = state[variable.trim()];
458
+ return value !== void 0 ? `${value}` : "";
459
+ }
460
+ });
461
+ };
462
+ }
463
+ });
464
+
465
+ // ../../node_modules/@domql/utils/dist/cjs/object.js
466
+ var require_object = __commonJS({
467
+ "../../node_modules/@domql/utils/dist/cjs/object.js"(exports, module2) {
468
+ "use strict";
469
+ var __defProp2 = Object.defineProperty;
470
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
471
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
472
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
473
+ var __export2 = (target, all) => {
474
+ for (var name in all)
475
+ __defProp2(target, name, { get: all[name], enumerable: true });
476
+ };
477
+ var __copyProps2 = (to, from, except, desc) => {
478
+ if (from && typeof from === "object" || typeof from === "function") {
479
+ for (let key of __getOwnPropNames2(from))
480
+ if (!__hasOwnProp2.call(to, key) && key !== except)
481
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
482
+ }
483
+ return to;
484
+ };
485
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
486
+ var object_exports = {};
487
+ __export2(object_exports, {
488
+ clone: () => clone,
489
+ deepClone: () => deepClone2,
490
+ deepCloneExclude: () => deepCloneExclude,
491
+ deepDestringify: () => deepDestringify,
492
+ deepMerge: () => deepMerge2,
493
+ deepStringify: () => deepStringify,
494
+ detachFunctionsFromObject: () => detachFunctionsFromObject,
495
+ diff: () => diff,
496
+ diffArrays: () => diffArrays,
497
+ diffObjects: () => diffObjects,
498
+ exec: () => exec,
499
+ flattenRecursive: () => flattenRecursive,
500
+ isEqualDeep: () => isEqualDeep,
501
+ map: () => map,
502
+ merge: () => merge,
503
+ mergeArrayExclude: () => mergeArrayExclude,
504
+ mergeIfExisted: () => mergeIfExisted,
505
+ objectToString: () => objectToString,
506
+ overwrite: () => overwrite,
507
+ overwriteDeep: () => overwriteDeep,
508
+ overwriteShallow: () => overwriteShallow,
509
+ removeFromObject: () => removeFromObject,
510
+ stringToObject: () => stringToObject
511
+ });
512
+ module2.exports = __toCommonJS2(object_exports);
513
+ var import_globals3 = require_globals();
514
+ var import_types = require_types();
515
+ var import_array = require_array();
516
+ var import_string = require_string();
517
+ var exec = (param, element, state, context) => {
518
+ if ((0, import_types.isFunction)(param)) {
519
+ return param(
520
+ element,
521
+ state || element.state,
522
+ context || element.context
523
+ );
524
+ }
525
+ return param;
526
+ };
527
+ var map = (obj, extention, element) => {
528
+ for (const e in extention) {
529
+ obj[e] = exec(extention[e], element);
530
+ }
531
+ };
532
+ var merge = (element, obj, excludeFrom = []) => {
533
+ for (const e in obj) {
534
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
535
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
536
+ continue;
537
+ const elementProp = element[e];
538
+ const objProp = obj[e];
539
+ if (elementProp === void 0) {
540
+ element[e] = objProp;
541
+ }
542
+ }
543
+ return element;
544
+ };
545
+ var deepMerge2 = (element, extend, excludeFrom = []) => {
546
+ for (const e in extend) {
547
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
548
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
549
+ continue;
550
+ const elementProp = element[e];
551
+ const extendProp = extend[e];
552
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
553
+ deepMerge2(elementProp, extendProp);
554
+ } else if (elementProp === void 0) {
555
+ element[e] = extendProp;
556
+ }
557
+ }
558
+ return element;
559
+ };
560
+ var clone = (obj, excludeFrom = []) => {
561
+ const o = {};
562
+ for (const prop in obj) {
563
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
564
+ if (!hasOwnProperty || excludeFrom.includes(prop) || prop.startsWith("__"))
565
+ continue;
566
+ o[prop] = obj[prop];
567
+ }
568
+ return o;
569
+ };
570
+ var deepCloneExclude = (obj, excludeFrom = []) => {
571
+ if ((0, import_types.isArray)(obj)) {
572
+ return obj.map((x) => deepCloneExclude(x, excludeFrom));
573
+ }
574
+ const o = {};
575
+ for (const k in obj) {
576
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, k);
577
+ if (!hasOwnProperty || excludeFrom.includes(k) || k.startsWith("__"))
578
+ continue;
579
+ let v = obj[k];
580
+ if (k === "extend" && (0, import_types.isArray)(v)) {
581
+ v = mergeArrayExclude(v, excludeFrom);
582
+ }
583
+ if ((0, import_types.isArray)(v)) {
584
+ o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
585
+ } else if ((0, import_types.isObject)(v)) {
586
+ o[k] = deepCloneExclude(v, excludeFrom);
587
+ } else
588
+ o[k] = v;
589
+ }
590
+ return o;
591
+ };
592
+ var mergeArrayExclude = (arr, excl = []) => {
593
+ return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
594
+ };
595
+ var deepClone2 = (obj, excludeFrom = []) => {
596
+ const o = (0, import_types.isArray)(obj) ? [] : {};
597
+ for (const prop in obj) {
598
+ if (prop === "__proto__")
599
+ continue;
600
+ if (excludeFrom.includes(prop) || prop.startsWith("__"))
601
+ continue;
602
+ let objProp = obj[prop];
603
+ if (prop === "extend" && (0, import_types.isArray)(objProp)) {
604
+ objProp = (0, import_array.mergeArray)(objProp);
605
+ }
606
+ if ((0, import_types.isObjectLike)(objProp)) {
607
+ o[prop] = deepClone2(objProp, excludeFrom);
608
+ } else
609
+ o[prop] = objProp;
610
+ }
611
+ return o;
612
+ };
613
+ var deepStringify = (obj, stringified = {}) => {
614
+ for (const prop in obj) {
615
+ const objProp = obj[prop];
616
+ if ((0, import_types.isFunction)(objProp)) {
617
+ stringified[prop] = objProp.toString();
618
+ } else if ((0, import_types.isObject)(objProp)) {
619
+ stringified[prop] = {};
620
+ deepStringify(objProp, stringified[prop]);
621
+ } else if ((0, import_types.isArray)(objProp)) {
622
+ stringified[prop] = [];
623
+ objProp.forEach((v, i) => {
624
+ if ((0, import_types.isObject)(v)) {
625
+ stringified[prop][i] = {};
626
+ deepStringify(v, stringified[prop][i]);
627
+ } else if ((0, import_types.isFunction)(v)) {
628
+ stringified[prop][i] = v.toString();
629
+ } else {
630
+ stringified[prop][i] = v;
631
+ }
632
+ });
633
+ } else {
634
+ stringified[prop] = objProp;
635
+ }
636
+ }
637
+ return stringified;
638
+ };
639
+ var objectToString = (obj, indent = 0) => {
640
+ const spaces = " ".repeat(indent);
641
+ let str = "{\n";
642
+ for (const [key, value] of Object.entries(obj)) {
643
+ const keyAllowdChars = (0, import_string.stringIncludesAny)(key, ["-", ":", "@", ".", "!"]);
644
+ const stringedKey = keyAllowdChars ? `'${key}'` : key;
645
+ str += `${spaces} ${stringedKey}: `;
646
+ if ((0, import_types.isArray)(value)) {
647
+ str += "[\n";
648
+ for (const element of value) {
649
+ if ((0, import_types.isObject)(element) && element !== null) {
650
+ str += `${spaces} ${objectToString(element, indent + 2)},
651
+ `;
652
+ } else if ((0, import_types.isString)(element)) {
653
+ str += `${spaces} '${element}',
654
+ `;
655
+ } else {
656
+ str += `${spaces} ${element},
657
+ `;
658
+ }
659
+ }
660
+ str += `${spaces} ]`;
661
+ } else if ((0, import_types.isObject)(value)) {
662
+ str += objectToString(value, indent + 1);
663
+ } else if ((0, import_types.isString)(value)) {
664
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
665
+ } else {
666
+ str += value;
667
+ }
668
+ str += ",\n";
669
+ }
670
+ str += `${spaces}}`;
671
+ return str;
672
+ };
673
+ var detachFunctionsFromObject = (obj, detached = {}) => {
674
+ for (const prop in obj) {
675
+ const objProp = obj[prop];
676
+ if ((0, import_types.isFunction)(objProp))
677
+ continue;
678
+ else if ((0, import_types.isObject)(objProp)) {
679
+ detached[prop] = {};
680
+ deepStringify(objProp, detached[prop]);
681
+ } else if ((0, import_types.isArray)(objProp)) {
682
+ detached[prop] = [];
683
+ objProp.forEach((v, i) => {
684
+ if ((0, import_types.isFunction)(v))
685
+ return;
686
+ if ((0, import_types.isObject)(v)) {
687
+ detached[prop][i] = {};
688
+ detachFunctionsFromObject(v, detached[prop][i]);
689
+ } else {
690
+ detached[prop][i] = v;
691
+ }
692
+ });
693
+ } else {
694
+ detached[prop] = objProp;
695
+ }
696
+ }
697
+ return detached;
698
+ };
699
+ var deepDestringify = (obj, stringified = {}) => {
700
+ for (const prop in obj) {
701
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
702
+ if (!hasOwnProperty)
703
+ continue;
704
+ const objProp = obj[prop];
705
+ if ((0, import_types.isString)(objProp)) {
706
+ if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
707
+ try {
708
+ const evalProp = import_globals3.window.eval(`(${objProp})`);
709
+ stringified[prop] = evalProp;
710
+ } catch (e) {
711
+ if (e)
712
+ stringified[prop] = objProp;
713
+ }
714
+ } else {
715
+ stringified[prop] = objProp;
716
+ }
717
+ } else if ((0, import_types.isArray)(objProp)) {
718
+ stringified[prop] = [];
719
+ objProp.forEach((arrProp) => {
720
+ if ((0, import_types.isString)(arrProp)) {
721
+ if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
722
+ try {
723
+ const evalProp = import_globals3.window.eval(`(${arrProp})`);
724
+ stringified[prop].push(evalProp);
725
+ } catch (e) {
726
+ if (e)
727
+ stringified[prop].push(arrProp);
728
+ }
729
+ } else {
730
+ stringified[prop].push(arrProp);
731
+ }
732
+ } else if ((0, import_types.isObject)(arrProp)) {
733
+ stringified[prop].push(deepDestringify(arrProp));
734
+ } else {
735
+ stringified[prop].push(arrProp);
736
+ }
737
+ });
738
+ } else if ((0, import_types.isObject)(objProp)) {
739
+ stringified[prop] = deepDestringify(objProp, stringified[prop]);
740
+ } else {
741
+ stringified[prop] = objProp;
742
+ }
743
+ }
744
+ return stringified;
745
+ };
746
+ var stringToObject = (str) => {
747
+ let obj;
748
+ try {
749
+ obj = import_globals3.window.eval("(" + str + ")");
750
+ } catch (e) {
751
+ console.warn(e);
752
+ }
753
+ if (obj)
754
+ return obj;
755
+ };
756
+ var diffObjects = (original, objToDiff, cache) => {
757
+ for (const e in objToDiff) {
758
+ if (e === "ref")
759
+ continue;
760
+ const originalProp = original[e];
761
+ const objToDiffProp = objToDiff[e];
762
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
763
+ cache[e] = {};
764
+ diff(originalProp, objToDiffProp, cache[e]);
765
+ } else if (objToDiffProp !== void 0) {
766
+ cache[e] = objToDiffProp;
767
+ }
768
+ }
769
+ return cache;
770
+ };
771
+ var diffArrays = (original, objToDiff, cache) => {
772
+ if (original.length !== objToDiff.length) {
773
+ cache = objToDiff;
774
+ } else {
775
+ const diffArr = [];
776
+ for (let i = 0; i < original.length; i++) {
777
+ const diffObj = diff(original[i], objToDiff[i]);
778
+ if (Object.keys(diffObj).length > 0) {
779
+ diffArr.push(diffObj);
780
+ }
781
+ }
782
+ if (diffArr.length > 0) {
783
+ cache = diffArr;
784
+ }
785
+ }
786
+ return cache;
787
+ };
788
+ var diff = (original, objToDiff, cache = {}) => {
789
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
790
+ cache = [];
791
+ diffArrays(original, objToDiff, cache);
792
+ } else {
793
+ diffObjects(original, objToDiff, cache);
794
+ }
795
+ return cache;
796
+ };
797
+ var overwrite = (element, params, excludeFrom = []) => {
798
+ const { ref } = element;
799
+ const changes = {};
800
+ for (const e in params) {
801
+ if (excludeFrom.includes(e) || e.startsWith("__"))
802
+ continue;
803
+ const elementProp = element[e];
804
+ const paramsProp = params[e];
805
+ if (paramsProp) {
806
+ ref.__cache[e] = changes[e] = elementProp;
807
+ ref[e] = paramsProp;
808
+ }
809
+ }
810
+ return changes;
811
+ };
812
+ var overwriteShallow = (obj, params, excludeFrom = []) => {
813
+ for (const e in params) {
814
+ if (excludeFrom.includes(e) || e.startsWith("__"))
815
+ continue;
816
+ obj[e] = params[e];
817
+ }
818
+ return obj;
819
+ };
820
+ var overwriteDeep = (obj, params, excludeFrom = []) => {
821
+ for (const e in params) {
822
+ if (e === "__proto__")
823
+ continue;
824
+ if (excludeFrom.includes(e) || e.startsWith("__"))
825
+ continue;
826
+ const objProp = obj[e];
827
+ const paramsProp = params[e];
828
+ if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
829
+ overwriteDeep(objProp, paramsProp);
830
+ } else if (paramsProp !== void 0) {
831
+ obj[e] = paramsProp;
832
+ }
833
+ }
834
+ return obj;
835
+ };
836
+ var mergeIfExisted = (a, b) => {
837
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
838
+ return deepMerge2(a, b);
839
+ return a || b;
840
+ };
841
+ var flattenRecursive = (param, prop, stack = []) => {
842
+ const objectized = (0, import_array.mergeAndCloneIfArray)(param);
843
+ stack.push(objectized);
844
+ const extendOfExtend = objectized[prop];
845
+ if (extendOfExtend)
846
+ flattenRecursive(extendOfExtend, prop, stack);
847
+ delete objectized[prop];
848
+ return stack;
849
+ };
850
+ var isEqualDeep = (param, element) => {
851
+ if (param === element)
852
+ return true;
853
+ if (!param || !element)
854
+ return false;
855
+ for (const prop in param) {
856
+ const paramProp = param[prop];
857
+ const elementProp = element[prop];
858
+ if ((0, import_types.isObjectLike)(paramProp)) {
859
+ const isEqual = isEqualDeep(paramProp, elementProp);
860
+ if (!isEqual)
861
+ return false;
862
+ } else {
863
+ const isEqual = paramProp === elementProp;
864
+ if (!isEqual)
865
+ return false;
866
+ }
867
+ }
868
+ return true;
869
+ };
870
+ var removeFromObject = (obj, props) => {
871
+ if (props === void 0 || props === null)
872
+ return obj;
873
+ if ((0, import_types.is)(props)("string", "number")) {
874
+ delete obj[props];
875
+ } else if ((0, import_types.isArray)(props)) {
876
+ props.forEach((prop) => delete obj[prop]);
877
+ } else {
878
+ throw new Error("Invalid input: props must be a string or an array of strings");
879
+ }
880
+ return obj;
881
+ };
882
+ }
883
+ });
884
+
885
+ // ../../node_modules/@domql/utils/dist/cjs/function.js
886
+ var require_function = __commonJS({
887
+ "../../node_modules/@domql/utils/dist/cjs/function.js"(exports, module2) {
888
+ "use strict";
889
+ var __defProp2 = Object.defineProperty;
890
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
891
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
892
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
893
+ var __export2 = (target, all) => {
894
+ for (var name in all)
895
+ __defProp2(target, name, { get: all[name], enumerable: true });
896
+ };
897
+ var __copyProps2 = (to, from, except, desc) => {
898
+ if (from && typeof from === "object" || typeof from === "function") {
899
+ for (let key of __getOwnPropNames2(from))
900
+ if (!__hasOwnProp2.call(to, key) && key !== except)
901
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
902
+ }
903
+ return to;
904
+ };
905
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
906
+ var function_exports = {};
907
+ __export2(function_exports, {
908
+ debounce: () => debounce,
909
+ memoize: () => memoize
910
+ });
911
+ module2.exports = __toCommonJS2(function_exports);
912
+ var debounce = (element, func, timeout = 300) => {
913
+ let timer;
914
+ return (...args) => {
915
+ clearTimeout(timer);
916
+ timer = setTimeout(() => {
917
+ func.apply(element, args);
918
+ }, timeout);
919
+ };
920
+ };
921
+ var memoize = (fn) => {
922
+ const cache = {};
923
+ return (...args) => {
924
+ const n = args[0];
925
+ if (n in cache) {
926
+ return cache[n];
927
+ } else {
928
+ const result = fn(n);
929
+ cache[n] = result;
930
+ return result;
931
+ }
932
+ };
933
+ };
934
+ }
935
+ });
936
+
937
+ // ../../node_modules/@domql/utils/dist/cjs/log.js
938
+ var require_log = __commonJS({
939
+ "../../node_modules/@domql/utils/dist/cjs/log.js"(exports, module2) {
940
+ "use strict";
941
+ var __defProp2 = Object.defineProperty;
942
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
943
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
944
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
945
+ var __export2 = (target, all) => {
946
+ for (var name in all)
947
+ __defProp2(target, name, { get: all[name], enumerable: true });
948
+ };
949
+ var __copyProps2 = (to, from, except, desc) => {
950
+ if (from && typeof from === "object" || typeof from === "function") {
951
+ for (let key of __getOwnPropNames2(from))
952
+ if (!__hasOwnProp2.call(to, key) && key !== except)
953
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
954
+ }
955
+ return to;
956
+ };
957
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
958
+ var log_exports = {};
959
+ __export2(log_exports, {
960
+ logGroupIf: () => logGroupIf,
961
+ logIf: () => logIf
962
+ });
963
+ module2.exports = __toCommonJS2(log_exports);
964
+ var logIf = (bool, ...arg) => {
965
+ if (bool)
966
+ arg.map((v) => console.log(v));
967
+ };
968
+ var logGroupIf = (bool, key, ...arg) => {
969
+ if (bool) {
970
+ console.group(key);
971
+ arg.map((v) => console.log(v));
972
+ console.groupEnd(key);
973
+ }
974
+ };
975
+ }
976
+ });
977
+
978
+ // ../../node_modules/@domql/utils/dist/cjs/cookie.js
979
+ var require_cookie = __commonJS({
980
+ "../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports, module2) {
981
+ "use strict";
982
+ var __defProp2 = Object.defineProperty;
983
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
984
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
985
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
986
+ var __export2 = (target, all) => {
987
+ for (var name in all)
988
+ __defProp2(target, name, { get: all[name], enumerable: true });
989
+ };
990
+ var __copyProps2 = (to, from, except, desc) => {
991
+ if (from && typeof from === "object" || typeof from === "function") {
992
+ for (let key of __getOwnPropNames2(from))
993
+ if (!__hasOwnProp2.call(to, key) && key !== except)
994
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
995
+ }
996
+ return to;
997
+ };
998
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
999
+ var cookie_exports = {};
1000
+ __export2(cookie_exports, {
1001
+ getCookie: () => getCookie,
1002
+ isMobile: () => isMobile,
1003
+ setCookie: () => setCookie
1004
+ });
1005
+ module2.exports = __toCommonJS2(cookie_exports);
1006
+ var import_types = require_types();
1007
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1008
+ var setCookie = (cname, cvalue, exdays = 365) => {
1009
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1010
+ return;
1011
+ const d = /* @__PURE__ */ new Date();
1012
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1013
+ const expires = `expires=${d.toUTCString()}`;
1014
+ document.cookie = `${cname}=${cvalue};${expires};path=/`;
1015
+ };
1016
+ var getCookie = (cname) => {
1017
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1018
+ return;
1019
+ const name = `${cname}=`;
1020
+ const decodedCookie = decodeURIComponent(document.cookie);
1021
+ const ca = decodedCookie.split(";");
1022
+ for (let i = 0; i < ca.length; i++) {
1023
+ let c = ca[i];
1024
+ while (c.charAt(0) === " ")
1025
+ c = c.substring(1);
1026
+ if (c.indexOf(name) === 0)
1027
+ return c.substring(name.length, c.length);
1028
+ }
1029
+ return "";
1030
+ };
1031
+ }
1032
+ });
1033
+
1034
+ // ../../node_modules/@domql/utils/dist/cjs/tags.js
1035
+ var require_tags = __commonJS({
1036
+ "../../node_modules/@domql/utils/dist/cjs/tags.js"(exports, module2) {
1037
+ "use strict";
1038
+ var __defProp2 = Object.defineProperty;
1039
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1040
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1041
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1042
+ var __export2 = (target, all) => {
1043
+ for (var name in all)
1044
+ __defProp2(target, name, { get: all[name], enumerable: true });
1045
+ };
1046
+ var __copyProps2 = (to, from, except, desc) => {
1047
+ if (from && typeof from === "object" || typeof from === "function") {
1048
+ for (let key of __getOwnPropNames2(from))
1049
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1050
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1051
+ }
1052
+ return to;
1053
+ };
1054
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1055
+ var tags_exports = {};
1056
+ __export2(tags_exports, {
1057
+ HTML_TAGS: () => HTML_TAGS,
1058
+ isValidHtmlTag: () => isValidHtmlTag
1059
+ });
1060
+ module2.exports = __toCommonJS2(tags_exports);
1061
+ var HTML_TAGS = {
1062
+ root: [
1063
+ "body",
1064
+ "html"
1065
+ ],
1066
+ head: [
1067
+ "title",
1068
+ "base",
1069
+ "meta",
1070
+ "style"
1071
+ ],
1072
+ body: [
1073
+ "string",
1074
+ "fragment",
1075
+ "a",
1076
+ "abbr",
1077
+ "acronym",
1078
+ "address",
1079
+ "applet",
1080
+ "area",
1081
+ "article",
1082
+ "aside",
1083
+ "audio",
1084
+ "b",
1085
+ "basefont",
1086
+ "bdi",
1087
+ "bdo",
1088
+ "big",
1089
+ "blockquote",
1090
+ "br",
1091
+ "button",
1092
+ "canvas",
1093
+ "caption",
1094
+ "center",
1095
+ "cite",
1096
+ "code",
1097
+ "col",
1098
+ "colgroup",
1099
+ "data",
1100
+ "datalist",
1101
+ "dd",
1102
+ "del",
1103
+ "details",
1104
+ "dfn",
1105
+ "dialog",
1106
+ "dir",
1107
+ "div",
1108
+ "dl",
1109
+ "dt",
1110
+ "em",
1111
+ "embed",
1112
+ "fieldset",
1113
+ "figcaption",
1114
+ "figure",
1115
+ "font",
1116
+ "footer",
1117
+ "form",
1118
+ "frame",
1119
+ "frameset",
1120
+ "h1",
1121
+ "h2",
1122
+ "h3",
1123
+ "h4",
1124
+ "h5",
1125
+ "h6",
1126
+ "head",
1127
+ "header",
1128
+ "hr",
1129
+ "i",
1130
+ "iframe",
1131
+ "img",
1132
+ "input",
1133
+ "ins",
1134
+ "kbd",
1135
+ "label",
1136
+ "legend",
1137
+ "li",
1138
+ "link",
1139
+ "main",
1140
+ "map",
1141
+ "mark",
1142
+ "meter",
1143
+ "nav",
1144
+ "noframes",
1145
+ "noscript",
1146
+ "object",
1147
+ "ol",
1148
+ "optgroup",
1149
+ "option",
1150
+ "output",
1151
+ "p",
1152
+ "param",
1153
+ "picture",
1154
+ "pre",
1155
+ "progress",
1156
+ "q",
1157
+ "rp",
1158
+ "rt",
1159
+ "ruby",
1160
+ "s",
1161
+ "samp",
1162
+ "script",
1163
+ "section",
1164
+ "select",
1165
+ "small",
1166
+ "source",
1167
+ "span",
1168
+ "strike",
1169
+ "strong",
1170
+ "sub",
1171
+ "summary",
1172
+ "sup",
1173
+ "table",
1174
+ "tbody",
1175
+ "td",
1176
+ "template",
1177
+ "textarea",
1178
+ "tfoot",
1179
+ "th",
1180
+ "thead",
1181
+ "time",
1182
+ "tr",
1183
+ "track",
1184
+ "tt",
1185
+ "u",
1186
+ "ul",
1187
+ "var",
1188
+ "video",
1189
+ "wbr",
1190
+ // SVG
1191
+ "svg",
1192
+ "path"
1193
+ ]
1194
+ };
1195
+ var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
1196
+ }
1197
+ });
1198
+
1199
+ // ../../node_modules/@domql/utils/dist/cjs/index.js
1200
+ var require_cjs2 = __commonJS({
1201
+ "../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
1202
+ "use strict";
1203
+ var __defProp2 = Object.defineProperty;
1204
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1205
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1206
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1207
+ var __copyProps2 = (to, from, except, desc) => {
1208
+ if (from && typeof from === "object" || typeof from === "function") {
1209
+ for (let key of __getOwnPropNames2(from))
1210
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1211
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1212
+ }
1213
+ return to;
1214
+ };
1215
+ var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
1216
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1217
+ var utils_exports = {};
1218
+ module2.exports = __toCommonJS2(utils_exports);
1219
+ __reExport(utils_exports, require_key(), module2.exports);
1220
+ __reExport(utils_exports, require_env(), module2.exports);
1221
+ __reExport(utils_exports, require_types(), module2.exports);
1222
+ __reExport(utils_exports, require_object(), module2.exports);
1223
+ __reExport(utils_exports, require_function(), module2.exports);
1224
+ __reExport(utils_exports, require_array(), module2.exports);
1225
+ __reExport(utils_exports, require_node(), module2.exports);
1226
+ __reExport(utils_exports, require_log(), module2.exports);
1227
+ __reExport(utils_exports, require_string(), module2.exports);
1228
+ __reExport(utils_exports, require_globals(), module2.exports);
1229
+ __reExport(utils_exports, require_cookie(), module2.exports);
1230
+ __reExport(utils_exports, require_tags(), module2.exports);
1231
+ }
1232
+ });
1233
+
1234
+ // src/system/svg.js
1235
+ var svg_exports = {};
1236
+ __export(svg_exports, {
1237
+ appendIconsSprite: () => appendIconsSprite,
1238
+ appendSVGSprite: () => appendSVGSprite,
1239
+ setIcon: () => setIcon,
1240
+ setSVG: () => setSVG
1241
+ });
1242
+ module.exports = __toCommonJS(svg_exports);
1243
+ var import_globals2 = __toESM(require_cjs(), 1);
1244
+
1245
+ // src/utils/color.js
1246
+ var import_globals = __toESM(require_cjs(), 1);
1247
+ var import_utils = __toESM(require_cjs2(), 1);
1248
+
1249
+ // src/utils/sequence.js
1250
+ var import_utils5 = __toESM(require_cjs2(), 1);
1251
+
1252
+ // ../utils/src/index.js
1253
+ var import_utils3 = __toESM(require_cjs2());
1254
+
1255
+ // ../utils/src/scaling.js
1256
+ var import_utils2 = __toESM(require_cjs2());
1257
+
1258
+ // src/factory.js
1259
+ var import_utils4 = __toESM(require_cjs2(), 1);
1260
+
1261
+ // src/defaultConfig/index.js
1262
+ var defaultConfig_exports = {};
1263
+ __export(defaultConfig_exports, {
1264
+ ANIMATION: () => ANIMATION,
1265
+ BREAKPOINTS: () => BREAKPOINTS,
1266
+ CASES: () => CASES,
1267
+ COLOR: () => COLOR,
1268
+ DEVICES: () => DEVICES,
1269
+ DOCUMENT: () => DOCUMENT,
1270
+ FONT: () => FONT,
1271
+ FONT_FACE: () => FONT_FACE,
1272
+ FONT_FAMILY: () => FONT_FAMILY,
1273
+ FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
1274
+ GRADIENT: () => GRADIENT,
1275
+ ICONS: () => ICONS,
1276
+ MEDIA: () => MEDIA,
1277
+ RESET: () => RESET,
1278
+ SEQUENCE: () => SEQUENCE,
1279
+ SPACING: () => SPACING,
1280
+ SVG: () => SVG,
1281
+ SVG_DATA: () => SVG_DATA,
1282
+ TEMPLATES: () => TEMPLATES,
1283
+ THEME: () => THEME,
1284
+ TIMING: () => TIMING,
1285
+ TYPOGRAPHY: () => TYPOGRAPHY,
1286
+ UNIT: () => UNIT
1287
+ });
1288
+
1289
+ // src/defaultConfig/sequence.js
1290
+ var SEQUENCE = {
1291
+ "minor-second": 1.067,
1292
+ "major-second": 1.125,
1293
+ "minor-third": 1.2,
1294
+ "major-third": 1.25,
1295
+ "perfect-fourth": 1.333,
1296
+ "augmented-fourth": 1.414,
1297
+ "perfect-fifth": 1.5,
1298
+ "minor-sixth": 1.6,
1299
+ phi: 1.618,
1300
+ // golden-ratio
1301
+ "major-sixth": 1.667,
1302
+ "square-root-3": 1.732,
1303
+ // theodorus
1304
+ "minor-seventh": 1.778,
1305
+ "major-seventh": 1.875,
1306
+ octave: 2,
1307
+ "square-root-5": 2.23,
1308
+ // pythagoras
1309
+ "major-tenth": 2.5,
1310
+ "major-eleventh": 2.667,
1311
+ "major-twelfth": 3,
1312
+ pi: 3.14,
1313
+ // archimedes
1314
+ "double-octave": 4
1315
+ };
1316
+
1317
+ // src/defaultConfig/unit.js
1318
+ var UNIT = {
1319
+ default: "em"
1320
+ };
1321
+
1322
+ // src/defaultConfig/typography.js
1323
+ var defaultProps = {
1324
+ browserDefault: 16,
1325
+ base: 16,
1326
+ type: "font-size",
1327
+ ratio: SEQUENCE["minor-third"],
1328
+ range: [-3, 12],
1329
+ h1Matches: 6,
1330
+ lineHeight: 1.5,
1331
+ subSequence: true,
1332
+ unit: "em",
1333
+ templates: {},
1334
+ sequence: {},
1335
+ scales: {},
1336
+ vars: {}
1337
+ };
1338
+ var TYPOGRAPHY = defaultProps;
1339
+
1340
+ // src/defaultConfig/font.js
1341
+ var FONT = {};
1342
+
1343
+ // src/defaultConfig/font-family.js
1344
+ var FONT_FAMILY = {};
1345
+ var FONT_FAMILY_TYPES = {
1346
+ "sans-serif": "Helvetica, Arial, sans-serif, --system-default",
1347
+ serif: "Times New Roman, Georgia, serif, --system-default",
1348
+ monospace: "Courier New, monospace, --system-default"
1349
+ };
1350
+ var FONT_FACE = {};
1351
+
1352
+ // src/defaultConfig/media.js
1353
+ var MEDIA = {
1354
+ tv: "(min-width: 2780px)",
1355
+ screenL: "(max-width: 1920px)",
1356
+ "screenL<": "(min-width: 1920px)",
1357
+ screenM: "(max-width: 1680px)",
1358
+ "screenM<": "(min-width: 1680px)",
1359
+ screenS: "(max-width: 1440px)",
1360
+ "screenS<": "(min-width: 1440px)",
1361
+ tabletL: "(max-width: 1366px)",
1362
+ "tabletL<": "(min-width: 1366px)",
1363
+ tabletM: "(max-width: 1280px)",
1364
+ "tabletM<": "(min-width: 1280px)",
1365
+ tabletS: "(max-width: 1024px)",
1366
+ "tabletS<": "(min-width: 1024px)",
1367
+ mobileL: "(max-width: 768px)",
1368
+ "mobileL<": "(min-width: 768px)",
1369
+ mobileM: "(max-width: 560px)",
1370
+ "mobileM<": "(min-width: 560px)",
1371
+ mobileS: "(max-width: 480px)",
1372
+ "mobileS<": "(min-width: 480px)",
1373
+ mobileXS: "(max-width: 375px)",
1374
+ "mobileXS<": "(min-width: 375px)",
1375
+ light: "(prefers-color-scheme: light)",
1376
+ dark: "(prefers-color-scheme: dark)",
1377
+ print: "print"
1378
+ };
1379
+
1380
+ // src/defaultConfig/spacing.js
1381
+ var defaultProps2 = {
1382
+ base: TYPOGRAPHY.base,
1383
+ type: "spacing",
1384
+ ratio: SEQUENCE.phi,
1385
+ range: [-5, 15],
1386
+ subSequence: true,
1387
+ unit: "em",
1388
+ sequence: {},
1389
+ scales: {},
1390
+ vars: {}
1391
+ };
1392
+ var SPACING = defaultProps2;
1393
+
1394
+ // src/defaultConfig/color.js
1395
+ var COLOR = {};
1396
+ var GRADIENT = {};
1397
+
1398
+ // src/defaultConfig/theme.js
1399
+ var THEME = {};
1400
+
1401
+ // src/defaultConfig/icons.js
1402
+ var ICONS = {};
1403
+
1404
+ // src/defaultConfig/timing.js
1405
+ var defaultProps3 = {
1406
+ default: 150,
1407
+ base: 150,
1408
+ type: "timing",
1409
+ ratio: SEQUENCE["perfect-fourth"],
1410
+ range: [-3, 12],
1411
+ unit: "ms",
1412
+ sequence: {},
1413
+ scales: {},
1414
+ vars: {}
1415
+ };
1416
+ var TIMING = defaultProps3;
1417
+
1418
+ // src/defaultConfig/document.js
1419
+ var DOCUMENT = {};
1420
+
1421
+ // src/defaultConfig/responsive.js
1422
+ var BREAKPOINTS = {
1423
+ screenL: 1920,
1424
+ screenM: 1680,
1425
+ screenS: 1440,
1426
+ tabletL: 1366,
1427
+ tabletM: 1280,
1428
+ tabletS: 1024,
1429
+ mobileL: 768,
1430
+ mobileM: 560,
1431
+ mobileS: 480,
1432
+ mobileXS: 375
1433
+ };
1434
+ var DEVICES = {
1435
+ screenL: [1920, 1024],
1436
+ screenM: [1680, 1024],
1437
+ screenS: [1440, 978],
1438
+ tabletL: [1366, 926],
1439
+ tabletM: [1280, 768],
1440
+ tabletS: [1024, 768],
1441
+ mobileL: [768, 375],
1442
+ mobileM: [560, 768],
1443
+ mobileS: [480, 768],
1444
+ mobileXS: [375, 768]
1445
+ };
1446
+
1447
+ // src/defaultConfig/cases.js
1448
+ var CASES = {};
1449
+
1450
+ // src/defaultConfig/animation.js
1451
+ var ANIMATION = {};
1452
+
1453
+ // src/defaultConfig/svg.js
1454
+ var SVG = {};
1455
+ var SVG_DATA = {};
1456
+
1457
+ // src/defaultConfig/templates.js
1458
+ var TEMPLATES = {};
1459
+
1460
+ // src/defaultConfig/index.js
1461
+ var RESET = {};
1462
+
1463
+ // src/factory.js
1464
+ var CSS_VARS = {};
1465
+ var CONFIG = {
1466
+ verbose: false,
1467
+ useVariable: true,
1468
+ useReset: true,
1469
+ CSS_VARS,
1470
+ ...defaultConfig_exports
1471
+ };
1472
+ var cachedConfig = (0, import_utils4.deepClone)(CONFIG);
1473
+ var FACTORY = {
1474
+ active: "0",
1475
+ 0: CONFIG
1476
+ };
1477
+ var getActiveConfig = (def) => {
1478
+ return FACTORY[def || FACTORY.active];
1479
+ };
1480
+
1481
+ // src/utils/var.js
1482
+ var import_utils7 = __toESM(require_cjs2(), 1);
1483
+
1484
+ // src/utils/sprite.js
1485
+ var import_utils8 = __toESM(require_cjs2(), 1);
1486
+ var generateSprite = (icons) => {
1487
+ const CONFIG2 = getActiveConfig();
1488
+ let sprite = "";
1489
+ for (const key in icons) {
1490
+ if (CONFIG2.__svg_cache[key])
1491
+ continue;
1492
+ else
1493
+ CONFIG2.__svg_cache[key] = true;
1494
+ sprite += icons[key];
1495
+ }
1496
+ return sprite;
1497
+ };
1498
+ var parseRootAttributes = (htmlString) => {
1499
+ if (!(0, import_utils8.isString)(htmlString)) {
1500
+ return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
1501
+ }
1502
+ const match = htmlString.match(/<svg\s+(.*?)>/);
1503
+ if (!match || !match[1]) {
1504
+ return {};
1505
+ }
1506
+ const attrString = match[1];
1507
+ const attrs = attrString.match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);
1508
+ return attrs.reduce((acc, attr) => {
1509
+ const [key, value] = attr.split("=");
1510
+ acc[key] = value.replace(/['"]/g, "");
1511
+ return acc;
1512
+ }, {});
1513
+ };
1514
+ var replaceIdsAndUrls = (code, key) => {
1515
+ const idRegex = /id="([^"]*)"/;
1516
+ const urlRegex = /url\(#([^)]*)\)/g;
1517
+ const matches = code.match(/id="([^"]*)"/g);
1518
+ let replacedCode = code;
1519
+ if ((0, import_utils8.isArray)(matches)) {
1520
+ matches.forEach(() => {
1521
+ const randomKey = Math.floor(Math.random() * 1e5);
1522
+ replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);
1523
+ });
1524
+ }
1525
+ return replacedCode;
1526
+ };
1527
+ var convertSvgToSymbol = (key, code) => {
1528
+ const extractAttrs = parseRootAttributes(code);
1529
+ const { width, height } = extractAttrs;
1530
+ const viewBox = extractAttrs.viewBox || `0 0 ${width || 24} ${height || 24}`;
1531
+ const xmlns = "http://www.w3.org/2000/svg";
1532
+ const replacedCode = replaceIdsAndUrls(code, key);
1533
+ let symbol = replacedCode.replace(
1534
+ "<svg",
1535
+ `<symbol id="${key}" xmlns="${xmlns}" viewBox="${viewBox}"`
1536
+ );
1537
+ symbol = symbol.replace(/width="[^"]*"/, "");
1538
+ symbol = symbol.replace(/height="[^"]*"/, "");
1539
+ symbol = symbol.replace("</svg", "</symbol");
1540
+ return symbol;
1541
+ };
1542
+
1543
+ // src/system/svg.js
1544
+ var DEF_OPTIONS = {
1545
+ document: import_globals2.document
1546
+ };
1547
+ var setSVG = (val, key) => {
1548
+ const CONFIG2 = getActiveConfig();
1549
+ if (!val) {
1550
+ if (CONFIG2.verbose)
1551
+ console.warn("setSVG: val is not defined", key);
1552
+ return;
1553
+ }
1554
+ if (CONFIG2.useSvgSprite) {
1555
+ return convertSvgToSymbol(key, val);
1556
+ }
1557
+ return val;
1558
+ };
1559
+ var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
1560
+ const CONFIG2 = getActiveConfig();
1561
+ const lib = Object.keys(LIBRARY).length ? {} : CONFIG2.SVG;
1562
+ for (const key in LIBRARY)
1563
+ lib[key] = CONFIG2.SVG[key];
1564
+ appendSVG(lib, options);
1565
+ };
1566
+ var setIcon = (val, key) => {
1567
+ const CONFIG2 = getActiveConfig();
1568
+ if (CONFIG2.useIconSprite) {
1569
+ return setSVG(val, key);
1570
+ }
1571
+ return val;
1572
+ };
1573
+ var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
1574
+ const CONFIG2 = getActiveConfig();
1575
+ const lib = Object.keys(LIBRARY).length ? {} : CONFIG2.ICONS;
1576
+ for (const key in LIBRARY)
1577
+ lib[key] = CONFIG2.ICONS[key];
1578
+ appendSVG(lib, options);
1579
+ };
1580
+ var createSVGSpriteElement = (options = { isRoot: true }) => {
1581
+ if (!import_globals2.document || !import_globals2.document.createElementNS)
1582
+ return;
1583
+ const svgElem = import_globals2.document.createElementNS("http://www.w3.org/2000/svg", "svg");
1584
+ if (options.isRoot) {
1585
+ svgElem.setAttribute("aria-hidden", "true");
1586
+ svgElem.setAttribute("width", "0");
1587
+ svgElem.setAttribute("height", "0");
1588
+ svgElem.setAttribute("style", "position:absolute");
1589
+ svgElem.setAttribute("id", "svgSprite");
1590
+ }
1591
+ return svgElem;
1592
+ };
1593
+ var appendSVG = (lib, options = DEF_OPTIONS) => {
1594
+ const CONFIG2 = getActiveConfig();
1595
+ const doc = options.document || import_globals2.document;
1596
+ if (!doc || !doc.documentElement) {
1597
+ if (CONFIG2.verbose) {
1598
+ console.warn("To append SVG sprites it should be run in browser environment");
1599
+ }
1600
+ return generateSprite(lib);
1601
+ }
1602
+ const exists = doc.querySelector("#svgSprite");
1603
+ const SVGsprite = generateSprite(lib);
1604
+ if (exists) {
1605
+ const tempSVG = createSVGSpriteElement({ isRoot: false });
1606
+ tempSVG.innerHTML = SVGsprite;
1607
+ exists.append(...tempSVG.children);
1608
+ } else {
1609
+ const svgSpriteDOM = createSVGSpriteElement();
1610
+ if (svgSpriteDOM && svgSpriteDOM.nodeType) {
1611
+ svgSpriteDOM.innerHTML = SVGsprite;
1612
+ doc.body.prepend(svgSpriteDOM);
1613
+ }
1614
+ }
1615
+ };