@symbo.ls/scratch 2.11.131 → 2.11.133

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