@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,1977 @@
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: () => document4,
134
+ global: () => global,
135
+ self: () => self,
136
+ window: () => window2
137
+ });
138
+ module2.exports = __toCommonJS2(globals_exports);
139
+ var global = globalThis;
140
+ var self = globalThis;
141
+ var window2 = globalThis;
142
+ var document4 = window2.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_globals3 = require_globals();
174
+ var isNode = (obj) => {
175
+ return (typeof Node === "object" ? obj instanceof import_globals3.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_globals3.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: () => isArray6,
209
+ isBoolean: () => isBoolean,
210
+ isDefined: () => isDefined2,
211
+ isFunction: () => isFunction,
212
+ isNot: () => isNot,
213
+ isNull: () => isNull,
214
+ isNumber: () => isNumber2,
215
+ isObject: () => isObject7,
216
+ isObjectLike: () => isObjectLike3,
217
+ isString: () => isString9,
218
+ isUndefined: () => isUndefined
219
+ });
220
+ module2.exports = __toCommonJS2(types_exports);
221
+ var import_node = require_node();
222
+ var isObject7 = (arg) => {
223
+ if (arg === null)
224
+ return false;
225
+ return typeof arg === "object" && arg.constructor === Object;
226
+ };
227
+ var isString9 = (arg) => typeof arg === "string";
228
+ var isNumber2 = (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 isArray6 = (arg) => Array.isArray(arg);
233
+ var isObjectLike3 = (arg) => {
234
+ if (arg === null)
235
+ return false;
236
+ return typeof arg === "object";
237
+ };
238
+ var isDefined2 = (arg) => {
239
+ return isObject7(arg) || isObjectLike3(arg) || isString9(arg) || isNumber2(arg) || isFunction(arg) || isArray6(arg) || isObjectLike3(arg) || isBoolean(arg) || isNull(arg);
240
+ };
241
+ var isUndefined = (arg) => {
242
+ return arg === void 0;
243
+ };
244
+ var TYPES = {
245
+ boolean: isBoolean,
246
+ array: isArray6,
247
+ object: isObject7,
248
+ string: isString9,
249
+ number: isNumber2,
250
+ null: isNull,
251
+ function: isFunction,
252
+ objectLike: isObjectLike3,
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: () => deepMerge3,
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: () => merge5,
467
+ mergeArrayExclude: () => mergeArrayExclude,
468
+ mergeIfExisted: () => mergeIfExisted,
469
+ objectToString: () => objectToString,
470
+ overwrite: () => overwrite,
471
+ overwriteDeep: () => overwriteDeep2,
472
+ overwriteShallow: () => overwriteShallow,
473
+ removeFromObject: () => removeFromObject,
474
+ stringToObject: () => stringToObject
475
+ });
476
+ module2.exports = __toCommonJS2(object_exports);
477
+ var import_globals3 = 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 merge5 = (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 deepMerge3 = (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
+ deepMerge3(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) => deepMerge3(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_globals3.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_globals3.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_globals3.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 overwriteDeep2 = (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
+ overwriteDeep2(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 deepMerge3(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
+ // ../../node_modules/@domql/globals/dist/cjs/index.js
1199
+ var require_cjs2 = __commonJS({
1200
+ "../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
1201
+ "use strict";
1202
+ var __defProp2 = Object.defineProperty;
1203
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1204
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1205
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1206
+ var __export2 = (target, all) => {
1207
+ for (var name in all)
1208
+ __defProp2(target, name, { get: all[name], enumerable: true });
1209
+ };
1210
+ var __copyProps2 = (to, from, except, desc) => {
1211
+ if (from && typeof from === "object" || typeof from === "function") {
1212
+ for (let key of __getOwnPropNames2(from))
1213
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1214
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1215
+ }
1216
+ return to;
1217
+ };
1218
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1219
+ var globals_exports = {};
1220
+ __export2(globals_exports, {
1221
+ document: () => document4,
1222
+ global: () => global,
1223
+ self: () => self,
1224
+ window: () => window2
1225
+ });
1226
+ module2.exports = __toCommonJS2(globals_exports);
1227
+ var global = globalThis;
1228
+ var self = globalThis;
1229
+ var window2 = globalThis;
1230
+ var document4 = window2.document;
1231
+ }
1232
+ });
1233
+
1234
+ // src/transforms/index.js
1235
+ var transforms_exports = {};
1236
+ __export(transforms_exports, {
1237
+ splitTransition: () => splitTransition,
1238
+ transformBackgroundImage: () => transformBackgroundImage,
1239
+ transformBorder: () => transformBorder,
1240
+ transformDuration: () => transformDuration,
1241
+ transformShadow: () => transformShadow,
1242
+ transformTextStroke: () => transformTextStroke,
1243
+ transformTransition: () => transformTransition,
1244
+ transfromGap: () => transfromGap
1245
+ });
1246
+ module.exports = __toCommonJS(transforms_exports);
1247
+ var import_utils26 = __toESM(require_cjs(), 1);
1248
+
1249
+ // src/factory.js
1250
+ var import_utils = __toESM(require_cjs(), 1);
1251
+
1252
+ // src/defaultConfig/index.js
1253
+ var defaultConfig_exports = {};
1254
+ __export(defaultConfig_exports, {
1255
+ ANIMATION: () => ANIMATION,
1256
+ BREAKPOINTS: () => BREAKPOINTS,
1257
+ CASES: () => CASES,
1258
+ COLOR: () => COLOR,
1259
+ DEVICES: () => DEVICES,
1260
+ DOCUMENT: () => DOCUMENT,
1261
+ FONT: () => FONT,
1262
+ FONT_FACE: () => FONT_FACE,
1263
+ FONT_FAMILY: () => FONT_FAMILY,
1264
+ FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
1265
+ GRADIENT: () => GRADIENT,
1266
+ ICONS: () => ICONS,
1267
+ MEDIA: () => MEDIA,
1268
+ RESET: () => RESET,
1269
+ SEQUENCE: () => SEQUENCE,
1270
+ SPACING: () => SPACING,
1271
+ SVG: () => SVG,
1272
+ SVG_DATA: () => SVG_DATA,
1273
+ TEMPLATES: () => TEMPLATES,
1274
+ THEME: () => THEME,
1275
+ TIMING: () => TIMING,
1276
+ TYPOGRAPHY: () => TYPOGRAPHY,
1277
+ UNIT: () => UNIT
1278
+ });
1279
+
1280
+ // src/defaultConfig/sequence.js
1281
+ var SEQUENCE = {
1282
+ "minor-second": 1.067,
1283
+ "major-second": 1.125,
1284
+ "minor-third": 1.2,
1285
+ "major-third": 1.25,
1286
+ "perfect-fourth": 1.333,
1287
+ "augmented-fourth": 1.414,
1288
+ "perfect-fifth": 1.5,
1289
+ "minor-sixth": 1.6,
1290
+ phi: 1.618,
1291
+ // golden-ratio
1292
+ "major-sixth": 1.667,
1293
+ "square-root-3": 1.732,
1294
+ // theodorus
1295
+ "minor-seventh": 1.778,
1296
+ "major-seventh": 1.875,
1297
+ octave: 2,
1298
+ "square-root-5": 2.23,
1299
+ // pythagoras
1300
+ "major-tenth": 2.5,
1301
+ "major-eleventh": 2.667,
1302
+ "major-twelfth": 3,
1303
+ pi: 3.14,
1304
+ // archimedes
1305
+ "double-octave": 4
1306
+ };
1307
+
1308
+ // src/defaultConfig/unit.js
1309
+ var UNIT = {
1310
+ default: "em"
1311
+ };
1312
+
1313
+ // src/defaultConfig/typography.js
1314
+ var defaultProps = {
1315
+ browserDefault: 16,
1316
+ base: 16,
1317
+ type: "font-size",
1318
+ ratio: SEQUENCE["minor-third"],
1319
+ range: [-3, 12],
1320
+ h1Matches: 6,
1321
+ lineHeight: 1.5,
1322
+ subSequence: true,
1323
+ unit: "em",
1324
+ templates: {},
1325
+ sequence: {},
1326
+ scales: {},
1327
+ vars: {}
1328
+ };
1329
+ var TYPOGRAPHY = defaultProps;
1330
+
1331
+ // src/defaultConfig/font.js
1332
+ var FONT = {};
1333
+
1334
+ // src/defaultConfig/font-family.js
1335
+ var FONT_FAMILY = {};
1336
+ var FONT_FAMILY_TYPES = {
1337
+ "sans-serif": "Helvetica, Arial, sans-serif, --system-default",
1338
+ serif: "Times New Roman, Georgia, serif, --system-default",
1339
+ monospace: "Courier New, monospace, --system-default"
1340
+ };
1341
+ var FONT_FACE = {};
1342
+
1343
+ // src/defaultConfig/media.js
1344
+ var MEDIA = {
1345
+ tv: "(min-width: 2780px)",
1346
+ screenL: "(max-width: 1920px)",
1347
+ "screenL<": "(min-width: 1920px)",
1348
+ screenM: "(max-width: 1680px)",
1349
+ "screenM<": "(min-width: 1680px)",
1350
+ screenS: "(max-width: 1440px)",
1351
+ "screenS<": "(min-width: 1440px)",
1352
+ tabletL: "(max-width: 1366px)",
1353
+ "tabletL<": "(min-width: 1366px)",
1354
+ tabletM: "(max-width: 1280px)",
1355
+ "tabletM<": "(min-width: 1280px)",
1356
+ tabletS: "(max-width: 1024px)",
1357
+ "tabletS<": "(min-width: 1024px)",
1358
+ mobileL: "(max-width: 768px)",
1359
+ "mobileL<": "(min-width: 768px)",
1360
+ mobileM: "(max-width: 560px)",
1361
+ "mobileM<": "(min-width: 560px)",
1362
+ mobileS: "(max-width: 480px)",
1363
+ "mobileS<": "(min-width: 480px)",
1364
+ mobileXS: "(max-width: 375px)",
1365
+ "mobileXS<": "(min-width: 375px)",
1366
+ light: "(prefers-color-scheme: light)",
1367
+ dark: "(prefers-color-scheme: dark)",
1368
+ print: "print"
1369
+ };
1370
+
1371
+ // src/defaultConfig/spacing.js
1372
+ var defaultProps2 = {
1373
+ base: TYPOGRAPHY.base,
1374
+ type: "spacing",
1375
+ ratio: SEQUENCE.phi,
1376
+ range: [-5, 15],
1377
+ subSequence: true,
1378
+ unit: "em",
1379
+ sequence: {},
1380
+ scales: {},
1381
+ vars: {}
1382
+ };
1383
+ var SPACING = defaultProps2;
1384
+
1385
+ // src/defaultConfig/color.js
1386
+ var COLOR = {};
1387
+ var GRADIENT = {};
1388
+
1389
+ // src/defaultConfig/theme.js
1390
+ var THEME = {};
1391
+
1392
+ // src/defaultConfig/icons.js
1393
+ var ICONS = {};
1394
+
1395
+ // src/defaultConfig/timing.js
1396
+ var defaultProps3 = {
1397
+ default: 150,
1398
+ base: 150,
1399
+ type: "timing",
1400
+ ratio: SEQUENCE["perfect-fourth"],
1401
+ range: [-3, 12],
1402
+ unit: "ms",
1403
+ sequence: {},
1404
+ scales: {},
1405
+ vars: {}
1406
+ };
1407
+ var TIMING = defaultProps3;
1408
+
1409
+ // src/defaultConfig/document.js
1410
+ var DOCUMENT = {};
1411
+
1412
+ // src/defaultConfig/responsive.js
1413
+ var BREAKPOINTS = {
1414
+ screenL: 1920,
1415
+ screenM: 1680,
1416
+ screenS: 1440,
1417
+ tabletL: 1366,
1418
+ tabletM: 1280,
1419
+ tabletS: 1024,
1420
+ mobileL: 768,
1421
+ mobileM: 560,
1422
+ mobileS: 480,
1423
+ mobileXS: 375
1424
+ };
1425
+ var DEVICES = {
1426
+ screenL: [1920, 1024],
1427
+ screenM: [1680, 1024],
1428
+ screenS: [1440, 978],
1429
+ tabletL: [1366, 926],
1430
+ tabletM: [1280, 768],
1431
+ tabletS: [1024, 768],
1432
+ mobileL: [768, 375],
1433
+ mobileM: [560, 768],
1434
+ mobileS: [480, 768],
1435
+ mobileXS: [375, 768]
1436
+ };
1437
+
1438
+ // src/defaultConfig/cases.js
1439
+ var CASES = {};
1440
+
1441
+ // src/defaultConfig/animation.js
1442
+ var ANIMATION = {};
1443
+
1444
+ // src/defaultConfig/svg.js
1445
+ var SVG = {};
1446
+ var SVG_DATA = {};
1447
+
1448
+ // src/defaultConfig/templates.js
1449
+ var TEMPLATES = {};
1450
+
1451
+ // src/defaultConfig/index.js
1452
+ var RESET = {};
1453
+
1454
+ // src/factory.js
1455
+ var CSS_VARS = {};
1456
+ var CONFIG = {
1457
+ verbose: false,
1458
+ useVariable: true,
1459
+ useReset: true,
1460
+ CSS_VARS,
1461
+ ...defaultConfig_exports
1462
+ };
1463
+ var cachedConfig = (0, import_utils.deepClone)(CONFIG);
1464
+ var FACTORY = {
1465
+ active: "0",
1466
+ 0: CONFIG
1467
+ };
1468
+ var getActiveConfig = (def) => {
1469
+ return FACTORY[def || FACTORY.active];
1470
+ };
1471
+
1472
+ // src/system/color.js
1473
+ var import_utils9 = __toESM(require_cjs(), 1);
1474
+
1475
+ // src/utils/color.js
1476
+ var import_globals = __toESM(require_cjs2(), 1);
1477
+ var import_utils2 = __toESM(require_cjs(), 1);
1478
+ var hexToRgbArray = (hex, alpha = 1) => {
1479
+ const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
1480
+ return [r, g, b];
1481
+ };
1482
+ var rgbArrayToHex = ([r, g, b]) => {
1483
+ return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
1484
+ };
1485
+ var rgbToHSL = (r, g, b) => {
1486
+ const a = Math.max(r, g, b);
1487
+ const n = a - Math.min(r, g, b);
1488
+ const f = 1 - Math.abs(a + a - n - 1);
1489
+ const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
1490
+ return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
1491
+ };
1492
+ var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
1493
+ Math.min(k - 3, 9 - k, 1),
1494
+ -1
1495
+ )) => [f(0), f(8), f(4)];
1496
+ var getColorShade = (col, amt) => {
1497
+ const num = parseInt(col, 16);
1498
+ let r = (num >> 16) + amt;
1499
+ if (r > 255)
1500
+ r = 255;
1501
+ else if (r < 0)
1502
+ r = 0;
1503
+ let b = (num >> 8 & 255) + amt;
1504
+ if (b > 255)
1505
+ b = 255;
1506
+ else if (b < 0)
1507
+ b = 0;
1508
+ let g = (num & 255) + amt;
1509
+ if (g > 255)
1510
+ g = 255;
1511
+ else if (g < 0)
1512
+ g = 0;
1513
+ return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
1514
+ };
1515
+ var getRgbTone = (rgb, tone) => {
1516
+ if ((0, import_utils2.isString)(rgb))
1517
+ rgb = rgb.split(", ").map((v) => parseFloat(v));
1518
+ if ((0, import_utils2.isNumber)(tone))
1519
+ tone += "";
1520
+ const toHex = rgbArrayToHex(rgb);
1521
+ const abs = tone.slice(0, 1);
1522
+ if (abs === "-" || abs === "+") {
1523
+ const colorShade = getColorShade(toHex, parseFloat(tone));
1524
+ return hexToRgbArray(colorShade).join(", ");
1525
+ } else {
1526
+ const [r, g, b] = rgb;
1527
+ const hsl = rgbToHSL(r, g, b);
1528
+ const [h, s, l] = hsl;
1529
+ const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
1530
+ return newRgb;
1531
+ }
1532
+ };
1533
+
1534
+ // src/utils/sequence.js
1535
+ var import_utils5 = __toESM(require_cjs(), 1);
1536
+
1537
+ // ../utils/src/index.js
1538
+ var import_utils4 = __toESM(require_cjs());
1539
+
1540
+ // ../utils/src/scaling.js
1541
+ var import_utils3 = __toESM(require_cjs());
1542
+
1543
+ // ../utils/src/index.js
1544
+ var toCamelCase = (str) => {
1545
+ return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
1546
+ return index === 0 ? word.toLowerCase() : word.toUpperCase();
1547
+ }).replaceAll(/\s+/g, "");
1548
+ };
1549
+ var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
1550
+ var arrayzeValue = (val) => {
1551
+ if ((0, import_utils4.isString)(val))
1552
+ return val.split(" ");
1553
+ if ((0, import_utils4.isObject)(val))
1554
+ return Object.keys(val).map((v) => val[v]);
1555
+ if ((0, import_utils4.isArray)(val))
1556
+ return val;
1557
+ };
1558
+
1559
+ // src/utils/sequence.js
1560
+ var numToLetterMap = {
1561
+ "-6": "U",
1562
+ "-5": "V",
1563
+ "-4": "W",
1564
+ "-3": "X",
1565
+ "-2": "Y",
1566
+ "-1": "Z",
1567
+ 0: "A",
1568
+ 1: "B",
1569
+ 2: "C",
1570
+ 3: "D",
1571
+ 4: "E",
1572
+ 5: "F",
1573
+ 6: "G",
1574
+ 7: "H",
1575
+ 8: "I",
1576
+ 9: "J",
1577
+ 10: "K",
1578
+ 11: "L",
1579
+ 12: "M",
1580
+ 13: "N",
1581
+ 14: "O",
1582
+ 15: "P",
1583
+ 16: "Q",
1584
+ 17: "R",
1585
+ 18: "S",
1586
+ 19: "T"
1587
+ };
1588
+ var setSequenceValue = (props, sequenceProps) => {
1589
+ const { key, variable, value, scaling, index } = props;
1590
+ sequenceProps.sequence[key] = {
1591
+ key,
1592
+ decimal: ~~(value * 100) / 100,
1593
+ val: ~~value,
1594
+ scaling,
1595
+ index,
1596
+ variable
1597
+ };
1598
+ sequenceProps.scales[key] = scaling;
1599
+ sequenceProps.vars[variable] = scaling + sequenceProps.unit;
1600
+ };
1601
+ var generateSubSequence = (props, sequenceProps) => {
1602
+ const { key, base, value, ratio, variable, index } = props;
1603
+ const next = value * ratio;
1604
+ const diff = next - value;
1605
+ const smallscale = diff / 1.618;
1606
+ const valueRounded = ~~value;
1607
+ const nextRounded = ~~next;
1608
+ const diffRounded = nextRounded - valueRounded;
1609
+ let arr = [];
1610
+ const first = next - smallscale;
1611
+ const second = value + smallscale;
1612
+ const middle = (first + second) / 2;
1613
+ if (diffRounded > 16)
1614
+ arr = [first, middle, second];
1615
+ else
1616
+ arr = [first, second];
1617
+ arr.map((v, k) => {
1618
+ const scaling = ~~(v / base * 1e3) / 1e3;
1619
+ const newVar = variable + (k + 1);
1620
+ const props2 = {
1621
+ key: key + (k + 1),
1622
+ variable: newVar,
1623
+ value: v,
1624
+ scaling,
1625
+ index: index + (k + 1) / 10
1626
+ };
1627
+ return setSequenceValue(props2, sequenceProps);
1628
+ });
1629
+ };
1630
+ var switchSequenceOnNegative = (key, base, ratio) => {
1631
+ return base * Math.pow(ratio, key);
1632
+ };
1633
+ var generateSequence = (sequenceProps) => {
1634
+ const { type, base, ratio, range, subSequence } = sequenceProps;
1635
+ const n = Math.abs(range[0]) + Math.abs(range[1]);
1636
+ const prefix = "--" + (type && type.replace(".", "-")) + "-";
1637
+ for (let i = 0; i <= n; i++) {
1638
+ const key = range[1] - i;
1639
+ const letterKey = numToLetterMap[key];
1640
+ const value = switchSequenceOnNegative(key, base, ratio);
1641
+ const scaling = ~~(value / base * 100) / 100;
1642
+ const variable = prefix + letterKey;
1643
+ const props = {
1644
+ key: letterKey,
1645
+ variable,
1646
+ value,
1647
+ base,
1648
+ scaling,
1649
+ ratio,
1650
+ index: key
1651
+ };
1652
+ setSequenceValue(props, sequenceProps);
1653
+ if (subSequence)
1654
+ generateSubSequence(props, sequenceProps);
1655
+ }
1656
+ return sequenceProps;
1657
+ };
1658
+ var getSequenceValue = (value = "A", sequenceProps) => {
1659
+ const CONFIG2 = getActiveConfig();
1660
+ const { UNIT: UNIT2 } = CONFIG2;
1661
+ const {
1662
+ sequence,
1663
+ unit = UNIT2.default,
1664
+ useVariable
1665
+ } = sequenceProps;
1666
+ if ((0, import_utils5.isString)(value) && value.slice(0, 2) === "--")
1667
+ return `var(${value})`;
1668
+ const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
1669
+ const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
1670
+ const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
1671
+ if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || !startsWithDashOrLetter)
1672
+ return value;
1673
+ const letterVal = value.toUpperCase();
1674
+ const isNegative = letterVal.slice(0, 1) === "-" ? "-" : "";
1675
+ let absValue = isNegative ? letterVal.slice(1) : letterVal;
1676
+ let mediaName = "";
1677
+ if (absValue.includes("-")) {
1678
+ mediaName = "-" + absValue.split("-")[1].toLowerCase();
1679
+ absValue = absValue.split("-")[0];
1680
+ }
1681
+ const varValue = (v) => `var(${prefix}${v}${mediaName})`;
1682
+ if (absValue.includes("+")) {
1683
+ const args = absValue.split("+");
1684
+ const [first, second] = args;
1685
+ const joint = `${varValue(first)} + ${varValue(second)}`;
1686
+ return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
1687
+ } else if (absValue.includes("-")) {
1688
+ const args = absValue.split("-");
1689
+ const [first, second] = args;
1690
+ const joint = `${varValue(first)} - ${varValue(second)}`;
1691
+ return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
1692
+ }
1693
+ if (!sequence[absValue] && absValue.length === 2) {
1694
+ if (CONFIG2.verbose)
1695
+ console.warn(absValue, "- value is not found because `subSequence` is set to false");
1696
+ absValue = absValue.slice(0, 1);
1697
+ }
1698
+ if (useVariable || CONFIG2.useVariable) {
1699
+ const varValue2 = `var(${prefix}${absValue}${mediaName})`;
1700
+ return isNegative ? `calc(${varValue2} * -1)` : varValue2;
1701
+ }
1702
+ const sequenceItem = sequence ? sequence[absValue] : null;
1703
+ if (!sequenceItem)
1704
+ return console.warn("can't find", sequence, absValue);
1705
+ if (unit === "ms" || unit === "s") {
1706
+ return isNegative + sequenceItem.val + unit;
1707
+ }
1708
+ return isNegative + sequenceItem.scaling + unit;
1709
+ };
1710
+ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
1711
+ if (typeof value !== "string") {
1712
+ console.warn(propertyName, value, "is not a string");
1713
+ return {};
1714
+ }
1715
+ if (value === "-" || value === "")
1716
+ return {};
1717
+ return { [propertyName]: getSequenceValue(value, sequenceProps) };
1718
+ };
1719
+
1720
+ // src/utils/var.js
1721
+ var import_utils7 = __toESM(require_cjs(), 1);
1722
+
1723
+ // src/utils/sprite.js
1724
+ var import_utils8 = __toESM(require_cjs(), 1);
1725
+
1726
+ // src/system/color.js
1727
+ var getColor = (value, key, config) => {
1728
+ const CONFIG2 = config || getActiveConfig();
1729
+ if (!(0, import_utils9.isString)(value)) {
1730
+ if (CONFIG2.verbose)
1731
+ console.warn(value, "- type for color is not valid");
1732
+ return;
1733
+ }
1734
+ if (value.slice(0, 2) === "--")
1735
+ return `var(${value})`;
1736
+ if (key && value[key])
1737
+ value = value[key];
1738
+ const [name, alpha, tone] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
1739
+ const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
1740
+ let val = COLOR2[name] || GRADIENT2[name];
1741
+ if (!val) {
1742
+ if (CONFIG2.verbose)
1743
+ console.warn("Can't find color ", name);
1744
+ return value;
1745
+ }
1746
+ if (key) {
1747
+ if (val[key])
1748
+ val = val[key];
1749
+ else if (CONFIG2.verbose)
1750
+ console.warn(value, " - does not have ", key);
1751
+ }
1752
+ let rgb = val.rgb;
1753
+ if (!rgb) {
1754
+ return CONFIG2.useVariable ? `var(${val.var})` : val.value;
1755
+ }
1756
+ if (tone && !val[tone]) {
1757
+ rgb = getRgbTone(rgb, tone);
1758
+ val[tone] = { rgb, var: `${val.var}-${tone}` };
1759
+ }
1760
+ if (val[tone])
1761
+ rgb = val[tone].rgb;
1762
+ if (alpha)
1763
+ return `rgba(${rgb}, ${alpha})`;
1764
+ return CONFIG2.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
1765
+ };
1766
+ var getMediaColor = (value, globalTheme, config) => {
1767
+ const CONFIG2 = config || getActiveConfig();
1768
+ if (!globalTheme)
1769
+ globalTheme = CONFIG2.globalTheme;
1770
+ if (!(0, import_utils9.isString)(value)) {
1771
+ if (CONFIG2.verbose)
1772
+ console.warn(value, "- type for color is not valid");
1773
+ return;
1774
+ }
1775
+ if (value.slice(0, 2) === "--")
1776
+ return `var(${value})`;
1777
+ const [name] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
1778
+ const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
1779
+ const val = COLOR2[name] || GRADIENT2[name];
1780
+ const isObj = (0, import_utils9.isObject)(val);
1781
+ if (isObj && val.value)
1782
+ return getColor(value, `@${globalTheme}`, config);
1783
+ else if (isObj) {
1784
+ if (globalTheme)
1785
+ return getColor(value, `@${globalTheme}`, config);
1786
+ else {
1787
+ const obj = {};
1788
+ for (const mediaName in val) {
1789
+ const query = CONFIG2.MEDIA[mediaName.slice(1)];
1790
+ const media = `@media screen and ${query}`;
1791
+ obj[media] = getColor(value, mediaName, config);
1792
+ }
1793
+ return obj;
1794
+ }
1795
+ } else {
1796
+ if (CONFIG2.verbose)
1797
+ console.warn("Can't find color", value);
1798
+ return value;
1799
+ }
1800
+ };
1801
+
1802
+ // src/system/theme.js
1803
+ var import_utils11 = __toESM(require_cjs(), 1);
1804
+
1805
+ // src/system/font.js
1806
+ var import_utils12 = __toESM(require_cjs(), 1);
1807
+
1808
+ // src/system/typography.js
1809
+ var import_utils15 = __toESM(require_cjs(), 1);
1810
+
1811
+ // src/system/spacing.js
1812
+ var import_utils18 = __toESM(require_cjs(), 1);
1813
+ var getSequence = (sequenceProps) => {
1814
+ const CONFIG2 = getActiveConfig();
1815
+ const { SPACING: SPACING2 } = CONFIG2;
1816
+ if (!sequenceProps)
1817
+ return SPACING2;
1818
+ const hasGenerated = Object.keys(sequenceProps.sequence).length > 0;
1819
+ return hasGenerated ? sequenceProps : generateSequence(sequenceProps);
1820
+ };
1821
+ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
1822
+ const sequence = getSequence(sequenceProps);
1823
+ const stack = arrayzeValue(value);
1824
+ if (!stack)
1825
+ return;
1826
+ if ((0, import_utils18.isString)(value) && value.includes("calc")) {
1827
+ return { [propertyName]: value };
1828
+ }
1829
+ if (stack.length > 1) {
1830
+ let suffix = "";
1831
+ if (propertyName === "borderWidth") {
1832
+ propertyName = "border";
1833
+ suffix = "Width";
1834
+ }
1835
+ const directions = {
1836
+ 2: ["Block", "Inline"],
1837
+ 3: ["BlockStart", "Inline", "BlockEnd"],
1838
+ 4: ["BlockStart", "InlineEnd", "BlockEnd", "InlineStart"]
1839
+ };
1840
+ const wrapSequenceValueByDirection = (direction, i) => getSequenceValuePropertyPair(
1841
+ stack[i],
1842
+ propertyName + direction + suffix,
1843
+ sequence
1844
+ );
1845
+ return directions[stack.length].map((dir, key) => wrapSequenceValueByDirection(dir, key));
1846
+ }
1847
+ return getSequenceValuePropertyPair(
1848
+ value,
1849
+ propertyName,
1850
+ sequence
1851
+ );
1852
+ };
1853
+
1854
+ // src/system/timing.js
1855
+ var getTimingFunction = (value) => {
1856
+ const CONFIG2 = getActiveConfig();
1857
+ const { TIMING: TIMING2 } = CONFIG2;
1858
+ return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
1859
+ };
1860
+ var getTimingByKey = (value, property = "timing") => {
1861
+ const CONFIG2 = getActiveConfig();
1862
+ const { TIMING: TIMING2 } = CONFIG2;
1863
+ return getSequenceValuePropertyPair(
1864
+ value,
1865
+ property,
1866
+ TIMING2
1867
+ );
1868
+ };
1869
+
1870
+ // src/system/document.js
1871
+ var import_utils22 = __toESM(require_cjs(), 1);
1872
+
1873
+ // src/system/svg.js
1874
+ var import_globals2 = __toESM(require_cjs2(), 1);
1875
+
1876
+ // src/system/reset.js
1877
+ var import_utils25 = __toESM(require_cjs(), 1);
1878
+
1879
+ // src/transforms/index.js
1880
+ var isBorderStyle = (str) => [
1881
+ "none",
1882
+ "hidden",
1883
+ "dotted",
1884
+ "dashed",
1885
+ "solid",
1886
+ "double",
1887
+ "groove",
1888
+ "ridge",
1889
+ "inset",
1890
+ "outset",
1891
+ "initial"
1892
+ ].some((v) => str.includes(v));
1893
+ var transformBorder = (border) => {
1894
+ const arr = border.split(", ");
1895
+ return arr.map((v) => {
1896
+ v = v.trim();
1897
+ if (v.slice(0, 2) === "--")
1898
+ return `var(${v})`;
1899
+ else if (isBorderStyle(v))
1900
+ return v || "solid";
1901
+ else if (v.slice(-2) === "px" || v.slice(-2) === "em")
1902
+ return v;
1903
+ else if (getColor(v).length > 2)
1904
+ return getColor(v);
1905
+ return getSpacingByKey(v, "border").border;
1906
+ }).join(" ");
1907
+ };
1908
+ var transformTextStroke = (stroke) => {
1909
+ return stroke.split(", ").map((v) => {
1910
+ if (v.slice(0, 2) === "--")
1911
+ return `var(${v})`;
1912
+ if (v.includes("px"))
1913
+ return v;
1914
+ else if (getColor(v))
1915
+ return getColor(v);
1916
+ return v;
1917
+ }).join(" ");
1918
+ };
1919
+ var transformShadow = (shadows) => shadows.split("|").map((shadow) => {
1920
+ return shadow.split(", ").map((v) => {
1921
+ v = v.trim();
1922
+ if (v.slice(0, 2) === "--")
1923
+ return `var(${v})`;
1924
+ if (getColor(v).length > 2)
1925
+ return getColor(v);
1926
+ if (v.includes("px") || v.slice(-2) === "em")
1927
+ return v;
1928
+ const arr = v.split(" ");
1929
+ if (!arr.length)
1930
+ return v;
1931
+ return arr.map((v2) => getSpacingByKey(v2, "shadow").shadow).join(" ");
1932
+ }).join(" ");
1933
+ }).join(",");
1934
+ var transformBackgroundImage = (backgroundImage, globalTheme) => {
1935
+ const CONFIG2 = getActiveConfig();
1936
+ return backgroundImage.split(", ").map((v) => {
1937
+ if (v.slice(0, 2) === "--")
1938
+ return `var(${v})`;
1939
+ if (v.includes("url") || v.includes("gradient"))
1940
+ return v;
1941
+ else if (CONFIG2.GRADIENT[backgroundImage]) {
1942
+ return {
1943
+ backgroundImage: getMediaColor(backgroundImage, globalTheme || CONFIG2.globalTheme)
1944
+ };
1945
+ } else if (v.includes("/") || v.includes("http"))
1946
+ return `url(${v})`;
1947
+ return v;
1948
+ }).join(" ");
1949
+ };
1950
+ var transfromGap = (gap) => (0, import_utils26.isString)(gap) && gap.split(" ").map((v) => getSpacingByKey(v, "gap").gap).join(" ");
1951
+ var transformTransition = (transition) => {
1952
+ const arr = transition.split(" ");
1953
+ if (!arr.length)
1954
+ return transition;
1955
+ return arr.map((v) => {
1956
+ if (v.slice(0, 2) === "--")
1957
+ return `var(${v})`;
1958
+ if (v.length < 3 || v.includes("ms")) {
1959
+ const mapWithSequence = getTimingByKey(v);
1960
+ return mapWithSequence.timing || v;
1961
+ }
1962
+ if (getTimingFunction(v))
1963
+ return getTimingFunction(v);
1964
+ return v;
1965
+ }).join(" ");
1966
+ };
1967
+ var transformDuration = (duration, props, propertyName) => {
1968
+ if (!(0, import_utils26.isString)(duration))
1969
+ return;
1970
+ return duration.split(",").map((v) => getTimingByKey(v).timing || v).join(",");
1971
+ };
1972
+ var splitTransition = (transition) => {
1973
+ const arr = transition.split(",");
1974
+ if (!arr.length)
1975
+ return;
1976
+ return arr.map(transformTransition).join(",");
1977
+ };