@symbo.ls/scratch 2.11.352 → 2.11.365

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.
@@ -205,32 +205,32 @@ var require_types = __commonJS({
205
205
  __export2(types_exports, {
206
206
  TYPES: () => TYPES,
207
207
  is: () => is,
208
- isArray: () => isArray9,
208
+ isArray: () => isArray7,
209
209
  isBoolean: () => isBoolean,
210
210
  isDate: () => isDate,
211
211
  isDefined: () => isDefined2,
212
212
  isFunction: () => isFunction,
213
213
  isNot: () => isNot,
214
214
  isNull: () => isNull2,
215
- isNumber: () => isNumber3,
216
- isObject: () => isObject8,
215
+ isNumber: () => isNumber2,
216
+ isObject: () => isObject6,
217
217
  isObjectLike: () => isObjectLike3,
218
- isString: () => isString10,
218
+ isString: () => isString9,
219
219
  isUndefined: () => isUndefined2
220
220
  });
221
221
  module2.exports = __toCommonJS2(types_exports);
222
222
  var import_node = require_node();
223
- var isObject8 = (arg) => {
223
+ var isObject6 = (arg) => {
224
224
  if (arg === null)
225
225
  return false;
226
226
  return typeof arg === "object" && arg.constructor === Object;
227
227
  };
228
- var isString10 = (arg) => typeof arg === "string";
229
- var isNumber3 = (arg) => typeof arg === "number";
228
+ var isString9 = (arg) => typeof arg === "string";
229
+ var isNumber2 = (arg) => typeof arg === "number";
230
230
  var isFunction = (arg) => typeof arg === "function";
231
231
  var isBoolean = (arg) => arg === true || arg === false;
232
232
  var isNull2 = (arg) => arg === null;
233
- var isArray9 = (arg) => Array.isArray(arg);
233
+ var isArray7 = (arg) => Array.isArray(arg);
234
234
  var isDate = (d) => d instanceof Date;
235
235
  var isObjectLike3 = (arg) => {
236
236
  if (arg === null)
@@ -238,18 +238,18 @@ var require_types = __commonJS({
238
238
  return typeof arg === "object";
239
239
  };
240
240
  var isDefined2 = (arg) => {
241
- return isObject8(arg) || isObjectLike3(arg) || isString10(arg) || isNumber3(arg) || isFunction(arg) || isArray9(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull2(arg);
241
+ return isObject6(arg) || isObjectLike3(arg) || isString9(arg) || isNumber2(arg) || isFunction(arg) || isArray7(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull2(arg);
242
242
  };
243
243
  var isUndefined2 = (arg) => {
244
244
  return arg === void 0;
245
245
  };
246
246
  var TYPES = {
247
247
  boolean: isBoolean,
248
- array: isArray9,
249
- object: isObject8,
250
- string: isString10,
248
+ array: isArray7,
249
+ object: isObject6,
250
+ string: isString9,
251
251
  date: isDate,
252
- number: isNumber3,
252
+ number: isNumber2,
253
253
  null: isNull2,
254
254
  function: isFunction,
255
255
  objectLike: isObjectLike3,
@@ -1379,6 +1379,1448 @@ var require_cjs2 = __commonJS({
1379
1379
  }
1380
1380
  });
1381
1381
 
1382
+ // ../utils/dist/cjs/index.js
1383
+ var require_cjs3 = __commonJS({
1384
+ "../utils/dist/cjs/index.js"(exports, module2) {
1385
+ "use strict";
1386
+ var __create2 = Object.create;
1387
+ var __defProp2 = Object.defineProperty;
1388
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1389
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1390
+ var __getProtoOf2 = Object.getPrototypeOf;
1391
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1392
+ var __commonJS2 = (cb, mod) => function __require() {
1393
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
1394
+ };
1395
+ var __export2 = (target, all) => {
1396
+ for (var name in all)
1397
+ __defProp2(target, name, { get: all[name], enumerable: true });
1398
+ };
1399
+ var __copyProps2 = (to, from, except, desc) => {
1400
+ if (from && typeof from === "object" || typeof from === "function") {
1401
+ for (let key of __getOwnPropNames2(from))
1402
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1403
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1404
+ }
1405
+ return to;
1406
+ };
1407
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
1408
+ // If the importer is in node compatibility mode or this is not an ESM
1409
+ // file that has been converted to a CommonJS file using a Babel-
1410
+ // compatible transform (i.e. "__esModule" has not been set), then set
1411
+ // "default" to the CommonJS "module.exports" for node compatibility.
1412
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
1413
+ mod
1414
+ ));
1415
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1416
+ var require_key2 = __commonJS2({
1417
+ "../../node_modules/@domql/utils/dist/cjs/key.js"(exports2, module22) {
1418
+ "use strict";
1419
+ var __defProp22 = Object.defineProperty;
1420
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1421
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1422
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1423
+ var __export22 = (target, all) => {
1424
+ for (var name in all)
1425
+ __defProp22(target, name, { get: all[name], enumerable: true });
1426
+ };
1427
+ var __copyProps22 = (to, from, except, desc) => {
1428
+ if (from && typeof from === "object" || typeof from === "function") {
1429
+ for (let key of __getOwnPropNames22(from))
1430
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1431
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1432
+ }
1433
+ return to;
1434
+ };
1435
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1436
+ var key_exports = {};
1437
+ __export22(key_exports, {
1438
+ createSnapshotId: () => createSnapshotId,
1439
+ generateKey: () => generateKey
1440
+ });
1441
+ module22.exports = __toCommonJS22(key_exports);
1442
+ var generateKey = /* @__PURE__ */ function() {
1443
+ let index = 0;
1444
+ function newId() {
1445
+ index++;
1446
+ return index;
1447
+ }
1448
+ return newId;
1449
+ }();
1450
+ var createSnapshotId = generateKey;
1451
+ }
1452
+ });
1453
+ var require_env2 = __commonJS2({
1454
+ "../../node_modules/@domql/utils/dist/cjs/env.js"(exports2, module22) {
1455
+ "use strict";
1456
+ var __defProp22 = Object.defineProperty;
1457
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1458
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1459
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1460
+ var __export22 = (target, all) => {
1461
+ for (var name in all)
1462
+ __defProp22(target, name, { get: all[name], enumerable: true });
1463
+ };
1464
+ var __copyProps22 = (to, from, except, desc) => {
1465
+ if (from && typeof from === "object" || typeof from === "function") {
1466
+ for (let key of __getOwnPropNames22(from))
1467
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1468
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1469
+ }
1470
+ return to;
1471
+ };
1472
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1473
+ var env_exports = {};
1474
+ __export22(env_exports, {
1475
+ NODE_ENV: () => NODE_ENV,
1476
+ getNev: () => getNev,
1477
+ isDevelopment: () => isDevelopment,
1478
+ isProduction: () => isProduction,
1479
+ isTest: () => isTest
1480
+ });
1481
+ module22.exports = __toCommonJS22(env_exports);
1482
+ var NODE_ENV = "development";
1483
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
1484
+ var isTest = (env = NODE_ENV) => env === "test";
1485
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
1486
+ var getNev = (key, env = NODE_ENV) => env[key];
1487
+ }
1488
+ });
1489
+ var require_globals2 = __commonJS2({
1490
+ "../../node_modules/@domql/utils/dist/cjs/globals.js"(exports2, module22) {
1491
+ "use strict";
1492
+ var __defProp22 = Object.defineProperty;
1493
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1494
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1495
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1496
+ var __export22 = (target, all) => {
1497
+ for (var name in all)
1498
+ __defProp22(target, name, { get: all[name], enumerable: true });
1499
+ };
1500
+ var __copyProps22 = (to, from, except, desc) => {
1501
+ if (from && typeof from === "object" || typeof from === "function") {
1502
+ for (let key of __getOwnPropNames22(from))
1503
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1504
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1505
+ }
1506
+ return to;
1507
+ };
1508
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1509
+ var globals_exports = {};
1510
+ __export22(globals_exports, {
1511
+ document: () => document22,
1512
+ global: () => global,
1513
+ self: () => self,
1514
+ window: () => window2
1515
+ });
1516
+ module22.exports = __toCommonJS22(globals_exports);
1517
+ var global = globalThis;
1518
+ var self = globalThis;
1519
+ var window2 = globalThis;
1520
+ var document22 = window2.document;
1521
+ }
1522
+ });
1523
+ var require_node2 = __commonJS2({
1524
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module22) {
1525
+ "use strict";
1526
+ var __defProp22 = Object.defineProperty;
1527
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1528
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1529
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1530
+ var __export22 = (target, all) => {
1531
+ for (var name in all)
1532
+ __defProp22(target, name, { get: all[name], enumerable: true });
1533
+ };
1534
+ var __copyProps22 = (to, from, except, desc) => {
1535
+ if (from && typeof from === "object" || typeof from === "function") {
1536
+ for (let key of __getOwnPropNames22(from))
1537
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1538
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1539
+ }
1540
+ return to;
1541
+ };
1542
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1543
+ var node_exports = {};
1544
+ __export22(node_exports, {
1545
+ isHtmlElement: () => isHtmlElement,
1546
+ isNode: () => isNode
1547
+ });
1548
+ module22.exports = __toCommonJS22(node_exports);
1549
+ var import_globals3 = require_globals2();
1550
+ var isNode = (obj) => {
1551
+ return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
1552
+ };
1553
+ var isHtmlElement = (obj) => {
1554
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
1555
+ };
1556
+ }
1557
+ });
1558
+ var require_types2 = __commonJS2({
1559
+ "../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module22) {
1560
+ "use strict";
1561
+ var __defProp22 = Object.defineProperty;
1562
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1563
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1564
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1565
+ var __export22 = (target, all) => {
1566
+ for (var name in all)
1567
+ __defProp22(target, name, { get: all[name], enumerable: true });
1568
+ };
1569
+ var __copyProps22 = (to, from, except, desc) => {
1570
+ if (from && typeof from === "object" || typeof from === "function") {
1571
+ for (let key of __getOwnPropNames22(from))
1572
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1573
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1574
+ }
1575
+ return to;
1576
+ };
1577
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1578
+ var types_exports = {};
1579
+ __export22(types_exports, {
1580
+ TYPES: () => TYPES,
1581
+ is: () => is,
1582
+ isArray: () => isArray32,
1583
+ isBoolean: () => isBoolean,
1584
+ isDate: () => isDate,
1585
+ isDefined: () => isDefined2,
1586
+ isFunction: () => isFunction,
1587
+ isNot: () => isNot,
1588
+ isNull: () => isNull2,
1589
+ isNumber: () => isNumber2,
1590
+ isObject: () => isObject32,
1591
+ isObjectLike: () => isObjectLike3,
1592
+ isString: () => isString22,
1593
+ isUndefined: () => isUndefined2
1594
+ });
1595
+ module22.exports = __toCommonJS22(types_exports);
1596
+ var import_node = require_node2();
1597
+ var isObject32 = (arg) => {
1598
+ if (arg === null)
1599
+ return false;
1600
+ return typeof arg === "object" && arg.constructor === Object;
1601
+ };
1602
+ var isString22 = (arg) => typeof arg === "string";
1603
+ var isNumber2 = (arg) => typeof arg === "number";
1604
+ var isFunction = (arg) => typeof arg === "function";
1605
+ var isBoolean = (arg) => arg === true || arg === false;
1606
+ var isNull2 = (arg) => arg === null;
1607
+ var isArray32 = (arg) => Array.isArray(arg);
1608
+ var isDate = (d) => d instanceof Date;
1609
+ var isObjectLike3 = (arg) => {
1610
+ if (arg === null)
1611
+ return false;
1612
+ return typeof arg === "object";
1613
+ };
1614
+ var isDefined2 = (arg) => {
1615
+ return isObject32(arg) || isObjectLike3(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray32(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull2(arg);
1616
+ };
1617
+ var isUndefined2 = (arg) => {
1618
+ return arg === void 0;
1619
+ };
1620
+ var TYPES = {
1621
+ boolean: isBoolean,
1622
+ array: isArray32,
1623
+ object: isObject32,
1624
+ string: isString22,
1625
+ date: isDate,
1626
+ number: isNumber2,
1627
+ null: isNull2,
1628
+ function: isFunction,
1629
+ objectLike: isObjectLike3,
1630
+ node: import_node.isNode,
1631
+ htmlElement: import_node.isHtmlElement,
1632
+ defined: isDefined2
1633
+ };
1634
+ var is = (arg) => {
1635
+ return (...args) => {
1636
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
1637
+ };
1638
+ };
1639
+ var isNot = (arg) => {
1640
+ return (...args) => {
1641
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
1642
+ };
1643
+ };
1644
+ }
1645
+ });
1646
+ var require_array2 = __commonJS2({
1647
+ "../../node_modules/@domql/utils/dist/cjs/array.js"(exports2, module22) {
1648
+ "use strict";
1649
+ var __defProp22 = Object.defineProperty;
1650
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1651
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1652
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1653
+ var __export22 = (target, all) => {
1654
+ for (var name in all)
1655
+ __defProp22(target, name, { get: all[name], enumerable: true });
1656
+ };
1657
+ var __copyProps22 = (to, from, except, desc) => {
1658
+ if (from && typeof from === "object" || typeof from === "function") {
1659
+ for (let key of __getOwnPropNames22(from))
1660
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1661
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1662
+ }
1663
+ return to;
1664
+ };
1665
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1666
+ var array_exports = {};
1667
+ __export22(array_exports, {
1668
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
1669
+ createNestedObject: () => createNestedObject,
1670
+ cutArrayAfterValue: () => cutArrayAfterValue,
1671
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
1672
+ joinArrays: () => joinArrays,
1673
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
1674
+ mergeArray: () => mergeArray,
1675
+ removeFromArray: () => removeFromArray,
1676
+ removeValueFromArray: () => removeValueFromArray,
1677
+ removeValueFromArrayAll: () => removeValueFromArrayAll,
1678
+ swapItemsInArray: () => swapItemsInArray
1679
+ });
1680
+ module22.exports = __toCommonJS22(array_exports);
1681
+ var import_object = require_object2();
1682
+ var import_types = require_types2();
1683
+ var arrayContainsOtherArray = (arr1, arr2) => {
1684
+ return arr2.every((val) => arr1.includes(val));
1685
+ };
1686
+ var removeFromArray = (arr, index) => {
1687
+ if ((0, import_types.isString)(index))
1688
+ index = parseInt(index);
1689
+ if ((0, import_types.isNumber)(index)) {
1690
+ if (index < 0 || index >= arr.length || isNaN(index)) {
1691
+ throw new Error("Invalid index");
1692
+ }
1693
+ arr.splice(index, 1);
1694
+ } else if ((0, import_types.isArray)(index)) {
1695
+ index.forEach((idx) => removeFromArray(arr, idx));
1696
+ } else {
1697
+ throw new Error("Invalid index");
1698
+ }
1699
+ return arr;
1700
+ };
1701
+ var swapItemsInArray = (arr, i, j) => {
1702
+ [arr[i], arr[j]] = [arr[j], arr[i]];
1703
+ };
1704
+ var joinArrays = (...arrays) => {
1705
+ return [].concat(...arrays);
1706
+ };
1707
+ var mergeArray = (arr, excludeFrom = []) => {
1708
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
1709
+ };
1710
+ var mergeAndCloneIfArray = (obj) => {
1711
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
1712
+ };
1713
+ var cutArrayBeforeValue = (arr, value) => {
1714
+ const index = arr.indexOf(value);
1715
+ if (index !== -1) {
1716
+ return arr.slice(0, index);
1717
+ }
1718
+ return arr;
1719
+ };
1720
+ var cutArrayAfterValue = (arr, value) => {
1721
+ if (!(0, import_types.isArray)(arr))
1722
+ return;
1723
+ const index = arr.indexOf(value);
1724
+ if (index !== -1) {
1725
+ return arr.slice(index + 1);
1726
+ }
1727
+ return arr;
1728
+ };
1729
+ var createNestedObject = (arr, lastValue) => {
1730
+ const nestedObject = {};
1731
+ if (arr.length === 0) {
1732
+ return lastValue;
1733
+ }
1734
+ arr.reduce((obj, value, index) => {
1735
+ if (!obj[value]) {
1736
+ obj[value] = {};
1737
+ }
1738
+ if (index === arr.length - 1 && lastValue) {
1739
+ obj[value] = lastValue;
1740
+ }
1741
+ return obj[value];
1742
+ }, nestedObject);
1743
+ return nestedObject;
1744
+ };
1745
+ var removeValueFromArray = (arr, value) => {
1746
+ const index = arr.indexOf(value);
1747
+ if (index > -1) {
1748
+ const newArray = [...arr];
1749
+ newArray.splice(index, 1);
1750
+ return newArray;
1751
+ }
1752
+ return arr.slice();
1753
+ };
1754
+ var removeValueFromArrayAll = (arr, value) => {
1755
+ return arr.filter((item) => item !== value);
1756
+ };
1757
+ }
1758
+ });
1759
+ var require_string2 = __commonJS2({
1760
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports2, module22) {
1761
+ "use strict";
1762
+ var __defProp22 = Object.defineProperty;
1763
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1764
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1765
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1766
+ var __export22 = (target, all) => {
1767
+ for (var name in all)
1768
+ __defProp22(target, name, { get: all[name], enumerable: true });
1769
+ };
1770
+ var __copyProps22 = (to, from, except, desc) => {
1771
+ if (from && typeof from === "object" || typeof from === "function") {
1772
+ for (let key of __getOwnPropNames22(from))
1773
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1774
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1775
+ }
1776
+ return to;
1777
+ };
1778
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1779
+ var string_exports = {};
1780
+ __export22(string_exports, {
1781
+ lowercaseFirstLetter: () => lowercaseFirstLetter,
1782
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
1783
+ stringIncludesAny: () => stringIncludesAny,
1784
+ trimStringFromSymbols: () => trimStringFromSymbols
1785
+ });
1786
+ module22.exports = __toCommonJS22(string_exports);
1787
+ var stringIncludesAny = (str, characters) => {
1788
+ for (const char of characters) {
1789
+ if (str.includes(char)) {
1790
+ return true;
1791
+ }
1792
+ }
1793
+ return false;
1794
+ };
1795
+ var trimStringFromSymbols = (str, characters) => {
1796
+ const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
1797
+ return str.replace(pattern, "");
1798
+ };
1799
+ var brackRegex = {
1800
+ 2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
1801
+ 3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
1802
+ };
1803
+ var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
1804
+ if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
1805
+ return str;
1806
+ const reg = brackRegex[options.bracketsLength || 2];
1807
+ return str.replace(reg, (_, parentPath, variable) => {
1808
+ if (parentPath) {
1809
+ const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
1810
+ let parentState = state;
1811
+ for (let i = 0; i < parentLevels; i++) {
1812
+ parentState = parentState.parent;
1813
+ if (!parentState) {
1814
+ return "";
1815
+ }
1816
+ }
1817
+ const value = parentState[variable.trim()];
1818
+ return value !== void 0 ? `${value}` : "";
1819
+ } else {
1820
+ const value = state[variable.trim()];
1821
+ return value !== void 0 ? `${value}` : "";
1822
+ }
1823
+ });
1824
+ };
1825
+ var lowercaseFirstLetter = (inputString) => {
1826
+ return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
1827
+ };
1828
+ }
1829
+ });
1830
+ var require_object2 = __commonJS2({
1831
+ "../../node_modules/@domql/utils/dist/cjs/object.js"(exports2, module22) {
1832
+ "use strict";
1833
+ var __defProp22 = Object.defineProperty;
1834
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1835
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1836
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1837
+ var __export22 = (target, all) => {
1838
+ for (var name in all)
1839
+ __defProp22(target, name, { get: all[name], enumerable: true });
1840
+ };
1841
+ var __copyProps22 = (to, from, except, desc) => {
1842
+ if (from && typeof from === "object" || typeof from === "function") {
1843
+ for (let key of __getOwnPropNames22(from))
1844
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1845
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1846
+ }
1847
+ return to;
1848
+ };
1849
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1850
+ var object_exports = {};
1851
+ __export22(object_exports, {
1852
+ clone: () => clone,
1853
+ deepClone: () => deepClone2,
1854
+ deepCloneExclude: () => deepCloneExclude,
1855
+ deepCloneWithExtend: () => deepCloneWithExtend,
1856
+ deepContains: () => deepContains,
1857
+ deepDestringify: () => deepDestringify,
1858
+ deepDiff: () => deepDiff,
1859
+ deepMerge: () => deepMerge3,
1860
+ deepStringify: () => deepStringify,
1861
+ detachFunctionsFromObject: () => detachFunctionsFromObject,
1862
+ diff: () => diff,
1863
+ diffArrays: () => diffArrays,
1864
+ diffObjects: () => diffObjects,
1865
+ exec: () => exec,
1866
+ flattenRecursive: () => flattenRecursive,
1867
+ hasOwnProperty: () => hasOwnProperty,
1868
+ isEmpty: () => isEmpty,
1869
+ isEmptyObject: () => isEmptyObject,
1870
+ isEqualDeep: () => isEqualDeep,
1871
+ makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
1872
+ map: () => map,
1873
+ merge: () => merge5,
1874
+ mergeArrayExclude: () => mergeArrayExclude,
1875
+ mergeIfExisted: () => mergeIfExisted,
1876
+ objectToString: () => objectToString,
1877
+ overwrite: () => overwrite,
1878
+ overwriteDeep: () => overwriteDeep2,
1879
+ overwriteShallow: () => overwriteShallow,
1880
+ removeFromObject: () => removeFromObject,
1881
+ stringToObject: () => stringToObject
1882
+ });
1883
+ module22.exports = __toCommonJS22(object_exports);
1884
+ var import_globals3 = require_globals2();
1885
+ var import_types = require_types2();
1886
+ var import_array = require_array2();
1887
+ var import_string = require_string2();
1888
+ var exec = (param, element, state, context) => {
1889
+ if ((0, import_types.isFunction)(param)) {
1890
+ return param(
1891
+ element,
1892
+ state || element.state,
1893
+ context || element.context
1894
+ );
1895
+ }
1896
+ return param;
1897
+ };
1898
+ var map = (obj, extention, element) => {
1899
+ for (const e in extention) {
1900
+ obj[e] = exec(extention[e], element);
1901
+ }
1902
+ };
1903
+ var merge5 = (element, obj, excludeFrom = []) => {
1904
+ for (const e in obj) {
1905
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
1906
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
1907
+ continue;
1908
+ const elementProp = element[e];
1909
+ const objProp = obj[e];
1910
+ if (elementProp === void 0) {
1911
+ element[e] = objProp;
1912
+ }
1913
+ }
1914
+ return element;
1915
+ };
1916
+ var deepMerge3 = (element, extend, excludeFrom = []) => {
1917
+ for (const e in extend) {
1918
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
1919
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
1920
+ continue;
1921
+ const elementProp = element[e];
1922
+ const extendProp = extend[e];
1923
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
1924
+ deepMerge3(elementProp, extendProp, excludeFrom);
1925
+ } else if (elementProp === void 0) {
1926
+ element[e] = extendProp;
1927
+ }
1928
+ }
1929
+ return element;
1930
+ };
1931
+ var clone = (obj, excludeFrom = []) => {
1932
+ const o = {};
1933
+ for (const prop in obj) {
1934
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
1935
+ if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
1936
+ continue;
1937
+ o[prop] = obj[prop];
1938
+ }
1939
+ return o;
1940
+ };
1941
+ var deepCloneExclude = (obj, excludeFrom = []) => {
1942
+ if ((0, import_types.isArray)(obj)) {
1943
+ return obj.map((x) => deepCloneExclude(x, excludeFrom));
1944
+ }
1945
+ const o = {};
1946
+ for (const k in obj) {
1947
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
1948
+ if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
1949
+ continue;
1950
+ let v = obj[k];
1951
+ if (k === "extend" && (0, import_types.isArray)(v)) {
1952
+ v = mergeArrayExclude(v, excludeFrom);
1953
+ }
1954
+ if ((0, import_types.isArray)(v)) {
1955
+ o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
1956
+ } else if ((0, import_types.isObject)(v)) {
1957
+ o[k] = deepCloneExclude(v, excludeFrom);
1958
+ } else
1959
+ o[k] = v;
1960
+ }
1961
+ return o;
1962
+ };
1963
+ var mergeArrayExclude = (arr, excl = []) => {
1964
+ return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
1965
+ };
1966
+ var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
1967
+ const o = (0, import_types.isArray)(obj) ? [] : {};
1968
+ for (const prop in obj) {
1969
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
1970
+ continue;
1971
+ if (prop === "__proto__")
1972
+ continue;
1973
+ if (excludeFrom.includes(prop) || prop.startsWith("__"))
1974
+ continue;
1975
+ let objProp = obj[prop];
1976
+ if (cleanUndefined && (0, import_types.isUndefined)(objProp))
1977
+ continue;
1978
+ if (prop === "extend" && (0, import_types.isArray)(objProp)) {
1979
+ objProp = (0, import_array.mergeArray)(objProp);
1980
+ }
1981
+ if ((0, import_types.isObjectLike)(objProp)) {
1982
+ o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
1983
+ } else
1984
+ o[prop] = objProp;
1985
+ }
1986
+ return o;
1987
+ };
1988
+ var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
1989
+ const o = (0, import_types.isArray)(obj) ? [] : {};
1990
+ for (const prop in obj) {
1991
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
1992
+ continue;
1993
+ const objProp = obj[prop];
1994
+ if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
1995
+ continue;
1996
+ if ((0, import_types.isObjectLike)(objProp)) {
1997
+ o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
1998
+ } else
1999
+ o[prop] = objProp;
2000
+ }
2001
+ return o;
2002
+ };
2003
+ var deepStringify = (obj, stringified = {}) => {
2004
+ for (const prop in obj) {
2005
+ const objProp = obj[prop];
2006
+ if ((0, import_types.isFunction)(objProp)) {
2007
+ stringified[prop] = objProp.toString();
2008
+ } else if ((0, import_types.isObject)(objProp)) {
2009
+ stringified[prop] = {};
2010
+ deepStringify(objProp, stringified[prop]);
2011
+ } else if ((0, import_types.isArray)(objProp)) {
2012
+ stringified[prop] = [];
2013
+ objProp.forEach((v, i) => {
2014
+ if ((0, import_types.isObject)(v)) {
2015
+ stringified[prop][i] = {};
2016
+ deepStringify(v, stringified[prop][i]);
2017
+ } else if ((0, import_types.isFunction)(v)) {
2018
+ stringified[prop][i] = v.toString();
2019
+ } else {
2020
+ stringified[prop][i] = v;
2021
+ }
2022
+ });
2023
+ } else {
2024
+ stringified[prop] = objProp;
2025
+ }
2026
+ }
2027
+ return stringified;
2028
+ };
2029
+ var objectToString = (obj, indent = 0) => {
2030
+ const spaces = " ".repeat(indent);
2031
+ let str = "{\n";
2032
+ for (const [key, value] of Object.entries(obj)) {
2033
+ const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
2034
+ const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
2035
+ str += `${spaces} ${stringedKey}: `;
2036
+ if ((0, import_types.isArray)(value)) {
2037
+ str += "[\n";
2038
+ for (const element of value) {
2039
+ if ((0, import_types.isObject)(element) && element !== null) {
2040
+ str += `${spaces} ${objectToString(element, indent + 2)},
2041
+ `;
2042
+ } else if ((0, import_types.isString)(element)) {
2043
+ str += `${spaces} '${element}',
2044
+ `;
2045
+ } else {
2046
+ str += `${spaces} ${element},
2047
+ `;
2048
+ }
2049
+ }
2050
+ str += `${spaces} ]`;
2051
+ } else if ((0, import_types.isObjectLike)(value)) {
2052
+ str += objectToString(value, indent + 1);
2053
+ } else if ((0, import_types.isString)(value)) {
2054
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
2055
+ } else {
2056
+ str += value;
2057
+ }
2058
+ str += ",\n";
2059
+ }
2060
+ str += `${spaces}}`;
2061
+ return str;
2062
+ };
2063
+ var detachFunctionsFromObject = (obj, detached = {}) => {
2064
+ for (const prop in obj) {
2065
+ const objProp = obj[prop];
2066
+ if ((0, import_types.isFunction)(objProp))
2067
+ continue;
2068
+ else if ((0, import_types.isObject)(objProp)) {
2069
+ detached[prop] = {};
2070
+ deepStringify(objProp, detached[prop]);
2071
+ } else if ((0, import_types.isArray)(objProp)) {
2072
+ detached[prop] = [];
2073
+ objProp.forEach((v, i) => {
2074
+ if ((0, import_types.isFunction)(v))
2075
+ return;
2076
+ if ((0, import_types.isObject)(v)) {
2077
+ detached[prop][i] = {};
2078
+ detachFunctionsFromObject(v, detached[prop][i]);
2079
+ } else {
2080
+ detached[prop][i] = v;
2081
+ }
2082
+ });
2083
+ } else {
2084
+ detached[prop] = objProp;
2085
+ }
2086
+ }
2087
+ return detached;
2088
+ };
2089
+ var deepDestringify = (obj, destringified = {}) => {
2090
+ for (const prop in obj) {
2091
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2092
+ if (!hasOwnProperty2)
2093
+ continue;
2094
+ const objProp = obj[prop];
2095
+ if ((0, import_types.isString)(objProp)) {
2096
+ if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
2097
+ try {
2098
+ const evalProp = import_globals3.window.eval(`(${objProp})`);
2099
+ destringified[prop] = evalProp;
2100
+ } catch (e) {
2101
+ if (e)
2102
+ destringified[prop] = objProp;
2103
+ }
2104
+ } else {
2105
+ destringified[prop] = objProp;
2106
+ }
2107
+ } else if ((0, import_types.isArray)(objProp)) {
2108
+ destringified[prop] = [];
2109
+ objProp.forEach((arrProp) => {
2110
+ if ((0, import_types.isString)(arrProp)) {
2111
+ if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
2112
+ try {
2113
+ const evalProp = import_globals3.window.eval(`(${arrProp})`);
2114
+ destringified[prop].push(evalProp);
2115
+ } catch (e) {
2116
+ if (e)
2117
+ destringified[prop].push(arrProp);
2118
+ }
2119
+ } else {
2120
+ destringified[prop].push(arrProp);
2121
+ }
2122
+ } else if ((0, import_types.isObject)(arrProp)) {
2123
+ destringified[prop].push(deepDestringify(arrProp));
2124
+ } else {
2125
+ destringified[prop].push(arrProp);
2126
+ }
2127
+ });
2128
+ } else if ((0, import_types.isObject)(objProp)) {
2129
+ destringified[prop] = deepDestringify(objProp, destringified[prop]);
2130
+ } else {
2131
+ destringified[prop] = objProp;
2132
+ }
2133
+ }
2134
+ return destringified;
2135
+ };
2136
+ var stringToObject = (str, verbose) => {
2137
+ try {
2138
+ return import_globals3.window.eval("(" + str + ")");
2139
+ } catch (e) {
2140
+ if (verbose)
2141
+ console.warn(e);
2142
+ }
2143
+ };
2144
+ var diffObjects = (original, objToDiff, cache) => {
2145
+ for (const e in objToDiff) {
2146
+ if (e === "ref")
2147
+ continue;
2148
+ const originalProp = original[e];
2149
+ const objToDiffProp = objToDiff[e];
2150
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
2151
+ cache[e] = {};
2152
+ diff(originalProp, objToDiffProp, cache[e]);
2153
+ } else if (objToDiffProp !== void 0) {
2154
+ cache[e] = objToDiffProp;
2155
+ }
2156
+ }
2157
+ return cache;
2158
+ };
2159
+ var diffArrays = (original, objToDiff, cache) => {
2160
+ if (original.length !== objToDiff.length) {
2161
+ cache = objToDiff;
2162
+ } else {
2163
+ const diffArr = [];
2164
+ for (let i = 0; i < original.length; i++) {
2165
+ const diffObj = diff(original[i], objToDiff[i]);
2166
+ if (Object.keys(diffObj).length > 0) {
2167
+ diffArr.push(diffObj);
2168
+ }
2169
+ }
2170
+ if (diffArr.length > 0) {
2171
+ cache = diffArr;
2172
+ }
2173
+ }
2174
+ return cache;
2175
+ };
2176
+ var diff = (original, objToDiff, cache = {}) => {
2177
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
2178
+ cache = [];
2179
+ diffArrays(original, objToDiff, cache);
2180
+ } else {
2181
+ diffObjects(original, objToDiff, cache);
2182
+ }
2183
+ return cache;
2184
+ };
2185
+ var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
2186
+ var isEmpty = (o) => Object.keys(o).length === 0;
2187
+ var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
2188
+ var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
2189
+ var deepDiff = (lhs, rhs) => {
2190
+ if (lhs === rhs)
2191
+ return {};
2192
+ if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
2193
+ return rhs;
2194
+ const deletedValues = Object.keys(lhs).reduce((acc, key) => {
2195
+ if (!hasOwnProperty(rhs, key)) {
2196
+ acc[key] = void 0;
2197
+ }
2198
+ return acc;
2199
+ }, makeObjectWithoutPrototype());
2200
+ if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
2201
+ if (lhs.valueOf() === rhs.valueOf())
2202
+ return {};
2203
+ return rhs;
2204
+ }
2205
+ return Object.keys(rhs).reduce((acc, key) => {
2206
+ if (!hasOwnProperty(lhs, key)) {
2207
+ acc[key] = rhs[key];
2208
+ return acc;
2209
+ }
2210
+ const difference = diff(lhs[key], rhs[key]);
2211
+ if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
2212
+ return acc;
2213
+ }
2214
+ acc[key] = difference;
2215
+ return acc;
2216
+ }, deletedValues);
2217
+ };
2218
+ var overwrite = (element, params, excludeFrom = []) => {
2219
+ const { ref } = element;
2220
+ const changes = {};
2221
+ for (const e in params) {
2222
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2223
+ continue;
2224
+ const elementProp = element[e];
2225
+ const paramsProp = params[e];
2226
+ if (paramsProp) {
2227
+ ref.__cache[e] = changes[e] = elementProp;
2228
+ ref[e] = paramsProp;
2229
+ }
2230
+ }
2231
+ return changes;
2232
+ };
2233
+ var overwriteShallow = (obj, params, excludeFrom = []) => {
2234
+ for (const e in params) {
2235
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2236
+ continue;
2237
+ obj[e] = params[e];
2238
+ }
2239
+ return obj;
2240
+ };
2241
+ var overwriteDeep2 = (obj, params, excludeFrom = []) => {
2242
+ for (const e in params) {
2243
+ if (e === "__proto__")
2244
+ continue;
2245
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2246
+ continue;
2247
+ const objProp = obj[e];
2248
+ const paramsProp = params[e];
2249
+ if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
2250
+ overwriteDeep2(objProp, paramsProp);
2251
+ } else if (paramsProp !== void 0) {
2252
+ obj[e] = paramsProp;
2253
+ }
2254
+ }
2255
+ return obj;
2256
+ };
2257
+ var mergeIfExisted = (a, b) => {
2258
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
2259
+ return deepMerge3(a, b);
2260
+ return a || b;
2261
+ };
2262
+ var flattenRecursive = (param, prop, stack = []) => {
2263
+ const objectized = (0, import_array.mergeAndCloneIfArray)(param);
2264
+ stack.push(objectized);
2265
+ const extendOfExtend = objectized[prop];
2266
+ if (extendOfExtend)
2267
+ flattenRecursive(extendOfExtend, prop, stack);
2268
+ delete objectized[prop];
2269
+ return stack;
2270
+ };
2271
+ var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
2272
+ if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
2273
+ return param === element;
2274
+ }
2275
+ if (visited.has(param) || visited.has(element)) {
2276
+ return true;
2277
+ }
2278
+ visited.add(param);
2279
+ visited.add(element);
2280
+ const keysParam = Object.keys(param);
2281
+ const keysElement = Object.keys(element);
2282
+ if (keysParam.length !== keysElement.length) {
2283
+ return false;
2284
+ }
2285
+ for (const key of keysParam) {
2286
+ if (!keysElement.includes(key)) {
2287
+ return false;
2288
+ }
2289
+ const paramProp = param[key];
2290
+ const elementProp = element[key];
2291
+ if (!isEqualDeep(paramProp, elementProp, visited)) {
2292
+ return false;
2293
+ }
2294
+ }
2295
+ return true;
2296
+ };
2297
+ var deepContains = (obj1, obj2) => {
2298
+ if (typeof obj1 !== typeof obj2) {
2299
+ return false;
2300
+ }
2301
+ if ((0, import_types.isObjectLike)(obj1)) {
2302
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
2303
+ if (obj1.length !== obj2.length) {
2304
+ return false;
2305
+ }
2306
+ for (let i = 0; i < obj1.length; i++) {
2307
+ if (!deepContains(obj1[i], obj2[i])) {
2308
+ return false;
2309
+ }
2310
+ }
2311
+ } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
2312
+ for (const key in obj1) {
2313
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
2314
+ if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
2315
+ return false;
2316
+ }
2317
+ }
2318
+ }
2319
+ } else {
2320
+ return obj2 === obj1;
2321
+ }
2322
+ return true;
2323
+ };
2324
+ var removeFromObject = (obj, props) => {
2325
+ if (props === void 0 || props === null)
2326
+ return obj;
2327
+ if ((0, import_types.is)(props)("string", "number")) {
2328
+ delete obj[props];
2329
+ } else if ((0, import_types.isArray)(props)) {
2330
+ props.forEach((prop) => delete obj[prop]);
2331
+ } else {
2332
+ throw new Error("Invalid input: props must be a string or an array of strings");
2333
+ }
2334
+ return obj;
2335
+ };
2336
+ }
2337
+ });
2338
+ var require_function2 = __commonJS2({
2339
+ "../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module22) {
2340
+ "use strict";
2341
+ var __defProp22 = Object.defineProperty;
2342
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2343
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2344
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2345
+ var __export22 = (target, all) => {
2346
+ for (var name in all)
2347
+ __defProp22(target, name, { get: all[name], enumerable: true });
2348
+ };
2349
+ var __copyProps22 = (to, from, except, desc) => {
2350
+ if (from && typeof from === "object" || typeof from === "function") {
2351
+ for (let key of __getOwnPropNames22(from))
2352
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2353
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2354
+ }
2355
+ return to;
2356
+ };
2357
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2358
+ var function_exports = {};
2359
+ __export22(function_exports, {
2360
+ debounce: () => debounce,
2361
+ debounceOnContext: () => debounceOnContext,
2362
+ isStringFunction: () => isStringFunction,
2363
+ memoize: () => memoize
2364
+ });
2365
+ module22.exports = __toCommonJS22(function_exports);
2366
+ function debounce(func, wait, immediate) {
2367
+ let timeout;
2368
+ return function() {
2369
+ const context = this;
2370
+ const args = arguments;
2371
+ const later = function() {
2372
+ timeout = null;
2373
+ if (!immediate)
2374
+ func.apply(context, args);
2375
+ };
2376
+ const callNow = immediate && !timeout;
2377
+ clearTimeout(timeout);
2378
+ timeout = setTimeout(later, wait);
2379
+ if (callNow)
2380
+ func.apply(context, args);
2381
+ };
2382
+ }
2383
+ var debounceOnContext = (element, func, timeout = 300) => {
2384
+ let timer;
2385
+ return (...args) => {
2386
+ clearTimeout(timer);
2387
+ timer = setTimeout(() => {
2388
+ func.apply(element, args);
2389
+ }, timeout);
2390
+ };
2391
+ };
2392
+ var memoize = (fn) => {
2393
+ const cache = {};
2394
+ return (...args) => {
2395
+ const n = args[0];
2396
+ if (n in cache) {
2397
+ return cache[n];
2398
+ } else {
2399
+ const result = fn(n);
2400
+ cache[n] = result;
2401
+ return result;
2402
+ }
2403
+ };
2404
+ };
2405
+ var isStringFunction = (inputString) => {
2406
+ const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
2407
+ return functionRegex.test(inputString);
2408
+ };
2409
+ }
2410
+ });
2411
+ var require_log2 = __commonJS2({
2412
+ "../../node_modules/@domql/utils/dist/cjs/log.js"(exports2, module22) {
2413
+ "use strict";
2414
+ var __defProp22 = Object.defineProperty;
2415
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2416
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2417
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2418
+ var __export22 = (target, all) => {
2419
+ for (var name in all)
2420
+ __defProp22(target, name, { get: all[name], enumerable: true });
2421
+ };
2422
+ var __copyProps22 = (to, from, except, desc) => {
2423
+ if (from && typeof from === "object" || typeof from === "function") {
2424
+ for (let key of __getOwnPropNames22(from))
2425
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2426
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2427
+ }
2428
+ return to;
2429
+ };
2430
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2431
+ var log_exports = {};
2432
+ __export22(log_exports, {
2433
+ logGroupIf: () => logGroupIf,
2434
+ logIf: () => logIf
2435
+ });
2436
+ module22.exports = __toCommonJS22(log_exports);
2437
+ var logIf = (bool, ...arg) => {
2438
+ if (bool)
2439
+ arg.map((v) => console.log(v));
2440
+ };
2441
+ var logGroupIf = (bool, key, ...arg) => {
2442
+ if (bool) {
2443
+ console.group(key);
2444
+ arg.map((v) => console.log(v));
2445
+ console.groupEnd(key);
2446
+ }
2447
+ };
2448
+ }
2449
+ });
2450
+ var require_cookie2 = __commonJS2({
2451
+ "../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports2, module22) {
2452
+ "use strict";
2453
+ var __defProp22 = Object.defineProperty;
2454
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2455
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2456
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2457
+ var __export22 = (target, all) => {
2458
+ for (var name in all)
2459
+ __defProp22(target, name, { get: all[name], enumerable: true });
2460
+ };
2461
+ var __copyProps22 = (to, from, except, desc) => {
2462
+ if (from && typeof from === "object" || typeof from === "function") {
2463
+ for (let key of __getOwnPropNames22(from))
2464
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2465
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2466
+ }
2467
+ return to;
2468
+ };
2469
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2470
+ var cookie_exports = {};
2471
+ __export22(cookie_exports, {
2472
+ getCookie: () => getCookie,
2473
+ isMobile: () => isMobile,
2474
+ setCookie: () => setCookie
2475
+ });
2476
+ module22.exports = __toCommonJS22(cookie_exports);
2477
+ var import_types = require_types2();
2478
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2479
+ var setCookie = (cname, cvalue, exdays = 365) => {
2480
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2481
+ return;
2482
+ const d = /* @__PURE__ */ new Date();
2483
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2484
+ const expires = `expires=${d.toUTCString()}`;
2485
+ document.cookie = `${cname}=${cvalue};${expires};path=/`;
2486
+ };
2487
+ var getCookie = (cname) => {
2488
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2489
+ return;
2490
+ const name = `${cname}=`;
2491
+ const decodedCookie = decodeURIComponent(document.cookie);
2492
+ const ca = decodedCookie.split(";");
2493
+ for (let i = 0; i < ca.length; i++) {
2494
+ let c = ca[i];
2495
+ while (c.charAt(0) === " ")
2496
+ c = c.substring(1);
2497
+ if (c.indexOf(name) === 0)
2498
+ return c.substring(name.length, c.length);
2499
+ }
2500
+ return "";
2501
+ };
2502
+ }
2503
+ });
2504
+ var require_tags2 = __commonJS2({
2505
+ "../../node_modules/@domql/utils/dist/cjs/tags.js"(exports2, module22) {
2506
+ "use strict";
2507
+ var __defProp22 = Object.defineProperty;
2508
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2509
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2510
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2511
+ var __export22 = (target, all) => {
2512
+ for (var name in all)
2513
+ __defProp22(target, name, { get: all[name], enumerable: true });
2514
+ };
2515
+ var __copyProps22 = (to, from, except, desc) => {
2516
+ if (from && typeof from === "object" || typeof from === "function") {
2517
+ for (let key of __getOwnPropNames22(from))
2518
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2519
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2520
+ }
2521
+ return to;
2522
+ };
2523
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2524
+ var tags_exports = {};
2525
+ __export22(tags_exports, {
2526
+ HTML_TAGS: () => HTML_TAGS,
2527
+ isValidHtmlTag: () => isValidHtmlTag
2528
+ });
2529
+ module22.exports = __toCommonJS22(tags_exports);
2530
+ var HTML_TAGS = {
2531
+ root: [
2532
+ "body",
2533
+ "html"
2534
+ ],
2535
+ head: [
2536
+ "title",
2537
+ "base",
2538
+ "meta",
2539
+ "style"
2540
+ ],
2541
+ body: [
2542
+ "string",
2543
+ "fragment",
2544
+ "a",
2545
+ "abbr",
2546
+ "acronym",
2547
+ "address",
2548
+ "applet",
2549
+ "area",
2550
+ "article",
2551
+ "aside",
2552
+ "audio",
2553
+ "b",
2554
+ "basefont",
2555
+ "bdi",
2556
+ "bdo",
2557
+ "big",
2558
+ "blockquote",
2559
+ "br",
2560
+ "button",
2561
+ "canvas",
2562
+ "caption",
2563
+ "center",
2564
+ "cite",
2565
+ "code",
2566
+ "search",
2567
+ "col",
2568
+ "colgroup",
2569
+ "data",
2570
+ "datalist",
2571
+ "dd",
2572
+ "del",
2573
+ "details",
2574
+ "dfn",
2575
+ "dialog",
2576
+ "dir",
2577
+ "div",
2578
+ "dl",
2579
+ "dt",
2580
+ "em",
2581
+ "embed",
2582
+ "fieldset",
2583
+ "figcaption",
2584
+ "figure",
2585
+ "font",
2586
+ "footer",
2587
+ "form",
2588
+ "frame",
2589
+ "frameset",
2590
+ "h1",
2591
+ "h2",
2592
+ "h3",
2593
+ "h4",
2594
+ "h5",
2595
+ "h6",
2596
+ "head",
2597
+ "header",
2598
+ "hr",
2599
+ "i",
2600
+ "iframe",
2601
+ "img",
2602
+ "input",
2603
+ "ins",
2604
+ "kbd",
2605
+ "label",
2606
+ "legend",
2607
+ "li",
2608
+ "link",
2609
+ "main",
2610
+ "map",
2611
+ "mark",
2612
+ "meter",
2613
+ "nav",
2614
+ "noframes",
2615
+ "noscript",
2616
+ "object",
2617
+ "ol",
2618
+ "optgroup",
2619
+ "option",
2620
+ "output",
2621
+ "p",
2622
+ "param",
2623
+ "picture",
2624
+ "pre",
2625
+ "progress",
2626
+ "hgroup",
2627
+ "q",
2628
+ "rp",
2629
+ "rt",
2630
+ "ruby",
2631
+ "s",
2632
+ "samp",
2633
+ "script",
2634
+ "section",
2635
+ "select",
2636
+ "small",
2637
+ "source",
2638
+ "span",
2639
+ "strike",
2640
+ "strong",
2641
+ "sub",
2642
+ "summary",
2643
+ "sup",
2644
+ "table",
2645
+ "tbody",
2646
+ "td",
2647
+ "template",
2648
+ "hgroup",
2649
+ "textarea",
2650
+ "tfoot",
2651
+ "th",
2652
+ "thead",
2653
+ "time",
2654
+ "tr",
2655
+ "track",
2656
+ "tt",
2657
+ "u",
2658
+ "ul",
2659
+ "var",
2660
+ "video",
2661
+ "wbr",
2662
+ // SVG
2663
+ "svg",
2664
+ "path"
2665
+ ]
2666
+ };
2667
+ var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
2668
+ }
2669
+ });
2670
+ var require_cjs4 = __commonJS2({
2671
+ "../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module22) {
2672
+ "use strict";
2673
+ var __defProp22 = Object.defineProperty;
2674
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2675
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2676
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2677
+ var __copyProps22 = (to, from, except, desc) => {
2678
+ if (from && typeof from === "object" || typeof from === "function") {
2679
+ for (let key of __getOwnPropNames22(from))
2680
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2681
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2682
+ }
2683
+ return to;
2684
+ };
2685
+ var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
2686
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2687
+ var utils_exports = {};
2688
+ module22.exports = __toCommonJS22(utils_exports);
2689
+ __reExport(utils_exports, require_key2(), module22.exports);
2690
+ __reExport(utils_exports, require_env2(), module22.exports);
2691
+ __reExport(utils_exports, require_types2(), module22.exports);
2692
+ __reExport(utils_exports, require_object2(), module22.exports);
2693
+ __reExport(utils_exports, require_function2(), module22.exports);
2694
+ __reExport(utils_exports, require_array2(), module22.exports);
2695
+ __reExport(utils_exports, require_node2(), module22.exports);
2696
+ __reExport(utils_exports, require_log2(), module22.exports);
2697
+ __reExport(utils_exports, require_string2(), module22.exports);
2698
+ __reExport(utils_exports, require_globals2(), module22.exports);
2699
+ __reExport(utils_exports, require_cookie2(), module22.exports);
2700
+ __reExport(utils_exports, require_tags2(), module22.exports);
2701
+ }
2702
+ });
2703
+ var src_exports = {};
2704
+ __export2(src_exports, {
2705
+ arrayzeValue: () => arrayzeValue3,
2706
+ copyStringToClipboard: () => copyStringToClipboard,
2707
+ fibonacciNumberByIndex: () => fibonacciNumberByIndex,
2708
+ findClosestNumber: () => findClosestNumber,
2709
+ findClosestNumberInFactory: () => findClosestNumberInFactory,
2710
+ formatDate: () => formatDate,
2711
+ loadJavascriptFile: () => loadJavascriptFile,
2712
+ removeChars: () => removeChars,
2713
+ toCamelCase: () => toCamelCase2,
2714
+ toDashCase: () => toDashCase2,
2715
+ toDescriptionCase: () => toDescriptionCase,
2716
+ toTitleCase: () => toTitleCase,
2717
+ toggleFullscreen: () => toggleFullscreen
2718
+ });
2719
+ module2.exports = __toCommonJS2(src_exports);
2720
+ var import_utils26 = __toESM2(require_cjs4(), 1);
2721
+ var toggleFullscreen = (el) => {
2722
+ if (!document.fullscreenElement) {
2723
+ el.node.requestFullscreen().catch((err) => {
2724
+ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
2725
+ });
2726
+ } else {
2727
+ document.exitFullscreen();
2728
+ }
2729
+ };
2730
+ var import_utils27 = __toESM2(require_cjs4(), 1);
2731
+ var findClosestNumber = (number, arr) => {
2732
+ return ((0, import_utils27.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
2733
+ return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
2734
+ });
2735
+ };
2736
+ var findClosestNumberInFactory = (val, factory) => {
2737
+ val = parseFloat(val);
2738
+ if ((0, import_utils27.isObject)(factory))
2739
+ factory = Object.values(factory);
2740
+ return findClosestNumber(val, factory);
2741
+ };
2742
+ var formatDate = (timestamp) => {
2743
+ if (!timestamp)
2744
+ return "";
2745
+ const d = new Date(timestamp);
2746
+ const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
2747
+ const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
2748
+ const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
2749
+ return `${da} ${mo}, ${ye}`;
2750
+ };
2751
+ var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
2752
+ const fib = [0, 1];
2753
+ for (let i = 2; i <= n; i++) {
2754
+ fib[i] = fib[i - 1] + fib[i - 2];
2755
+ }
2756
+ return fib[n];
2757
+ };
2758
+ var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
2759
+ return new Promise((resolve, reject) => {
2760
+ try {
2761
+ const scriptEle = doc.createElement("script");
2762
+ scriptEle.type = type;
2763
+ scriptEle.async = async;
2764
+ scriptEle.src = FILE_URL;
2765
+ scriptEle.addEventListener("load", (ev) => {
2766
+ resolve({
2767
+ status: true
2768
+ });
2769
+ });
2770
+ scriptEle.addEventListener("error", (ev) => {
2771
+ reject({
2772
+ status: false,
2773
+ message: `Failed to load the script ${FILE_URL}`
2774
+ });
2775
+ });
2776
+ doc.body.appendChild(scriptEle);
2777
+ } catch (error) {
2778
+ reject(error);
2779
+ }
2780
+ });
2781
+ };
2782
+ var copyStringToClipboard = (str) => {
2783
+ const el = document.createElement("textarea");
2784
+ el.value = str;
2785
+ el.setAttribute("readonly", "");
2786
+ el.style = { position: "absolute", left: "-9999px" };
2787
+ document.body.appendChild(el);
2788
+ el.select();
2789
+ document.execCommand("copy");
2790
+ document.body.removeChild(el);
2791
+ };
2792
+ var removeChars = (str) => {
2793
+ return str.replace(/[^a-zA-Z0-9_]/g, "");
2794
+ };
2795
+ var toCamelCase2 = (str) => {
2796
+ return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
2797
+ return index === 0 ? word.toLowerCase() : word.toUpperCase();
2798
+ }).replaceAll(/\s+/g, "");
2799
+ };
2800
+ var toTitleCase = (str) => str && str.replace(
2801
+ /\w\S*/g,
2802
+ (txt) => {
2803
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
2804
+ }
2805
+ );
2806
+ var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
2807
+ var toDescriptionCase = (str = "") => {
2808
+ const result = str.replace(/([A-Z])/g, " $1");
2809
+ return result.charAt(0).toUpperCase() + result.slice(1);
2810
+ };
2811
+ var arrayzeValue3 = (val) => {
2812
+ if ((0, import_utils26.isArray)(val))
2813
+ return val;
2814
+ if ((0, import_utils26.isString)(val))
2815
+ return val.split(" ");
2816
+ if ((0, import_utils26.isObject)(val))
2817
+ return Object.values(val);
2818
+ if ((0, import_utils26.isNumber)(val))
2819
+ return [val];
2820
+ };
2821
+ }
2822
+ });
2823
+
1382
2824
  // src/transforms/index.js
1383
2825
  var transforms_exports = {};
1384
2826
  __export(transforms_exports, {
@@ -1396,7 +2838,7 @@ __export(transforms_exports, {
1396
2838
  transfromGap: () => transfromGap
1397
2839
  });
1398
2840
  module.exports = __toCommonJS(transforms_exports);
1399
- var import_utils27 = __toESM(require_cjs(), 1);
2841
+ var import_utils25 = __toESM(require_cjs(), 1);
1400
2842
 
1401
2843
  // src/factory.js
1402
2844
  var import_utils = __toESM(require_cjs(), 1);
@@ -1614,7 +3056,7 @@ var getActiveConfig = (def) => {
1614
3056
  };
1615
3057
 
1616
3058
  // src/system/color.js
1617
- var import_utils9 = __toESM(require_cjs(), 1);
3059
+ var import_utils7 = __toESM(require_cjs(), 1);
1618
3060
 
1619
3061
  // src/utils/unit.js
1620
3062
  var isScalingUnit = (unit) => {
@@ -1724,33 +3166,8 @@ var getRgbTone = (rgb, tone) => {
1724
3166
  };
1725
3167
 
1726
3168
  // src/utils/sequence.js
1727
- var import_utils5 = __toESM(require_cjs(), 1);
1728
-
1729
- // ../../node_modules/@symbo.ls/utils/src/index.js
1730
- var import_utils4 = __toESM(require_cjs());
1731
-
1732
- // ../../node_modules/@symbo.ls/utils/src/scaling.js
1733
- var import_utils3 = __toESM(require_cjs());
1734
-
1735
- // ../../node_modules/@symbo.ls/utils/src/index.js
1736
- var toCamelCase = (str) => {
1737
- return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
1738
- return index === 0 ? word.toLowerCase() : word.toUpperCase();
1739
- }).replaceAll(/\s+/g, "");
1740
- };
1741
- var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
1742
- var arrayzeValue = (val) => {
1743
- if ((0, import_utils4.isArray)(val))
1744
- return val;
1745
- if ((0, import_utils4.isString)(val))
1746
- return val.split(" ");
1747
- if ((0, import_utils4.isObject)(val))
1748
- return Object.values(val);
1749
- if ((0, import_utils4.isNumber)(val))
1750
- return [val];
1751
- };
1752
-
1753
- // src/utils/sequence.js
3169
+ var import_utils3 = __toESM(require_cjs(), 1);
3170
+ var import_utils4 = __toESM(require_cjs3(), 1);
1754
3171
  var numToLetterMap = {
1755
3172
  "-6": "U",
1756
3173
  "-5": "V",
@@ -1892,9 +3309,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
1892
3309
  unit = UNIT2.default,
1893
3310
  useVariable
1894
3311
  } = sequenceProps;
1895
- if ((0, import_utils5.isString)(value) && value.slice(0, 2) === "--")
3312
+ if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
1896
3313
  return `var(${value})`;
1897
- const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
3314
+ const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
1898
3315
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
1899
3316
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
1900
3317
  if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
@@ -1949,7 +3366,7 @@ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
1949
3366
  };
1950
3367
 
1951
3368
  // src/utils/var.js
1952
- var import_utils7 = __toESM(require_cjs(), 1);
3369
+ var import_utils5 = __toESM(require_cjs(), 1);
1953
3370
  var applySequenceGlobalVars = (vars, obj, options) => {
1954
3371
  const CONFIG2 = getActiveConfig();
1955
3372
  const { UNIT: UNIT2 } = CONFIG2;
@@ -1991,12 +3408,12 @@ var applySequenceVars = (FACTORY2, options = {}) => {
1991
3408
  };
1992
3409
 
1993
3410
  // src/utils/sprite.js
1994
- var import_utils8 = __toESM(require_cjs(), 1);
3411
+ var import_utils6 = __toESM(require_cjs(), 1);
1995
3412
 
1996
3413
  // src/system/color.js
1997
3414
  var getColor = (value, key, config) => {
1998
3415
  const CONFIG2 = config || getActiveConfig();
1999
- if (!(0, import_utils9.isString)(value)) {
3416
+ if (!(0, import_utils7.isString)(value)) {
2000
3417
  if (CONFIG2.verbose)
2001
3418
  console.warn(value, "- type for color is not valid");
2002
3419
  return;
@@ -2005,7 +3422,7 @@ var getColor = (value, key, config) => {
2005
3422
  return `var(${value})`;
2006
3423
  if (key && value[key])
2007
3424
  value = value[key];
2008
- const [name, alpha, tone] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
3425
+ const [name, alpha, tone] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
2009
3426
  const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
2010
3427
  let val = COLOR2[name] || GRADIENT2[name];
2011
3428
  if (!val) {
@@ -2037,17 +3454,17 @@ var getMediaColor = (value, globalTheme, config) => {
2037
3454
  const CONFIG2 = config || getActiveConfig();
2038
3455
  if (!globalTheme)
2039
3456
  globalTheme = CONFIG2.globalTheme;
2040
- if (!(0, import_utils9.isString)(value)) {
3457
+ if (!(0, import_utils7.isString)(value)) {
2041
3458
  if (CONFIG2.verbose)
2042
3459
  console.warn(value, "- type for color is not valid");
2043
3460
  return;
2044
3461
  }
2045
3462
  if (value.slice(0, 2) === "--")
2046
3463
  return `var(${value})`;
2047
- const [name] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
3464
+ const [name] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
2048
3465
  const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
2049
3466
  const val = COLOR2[name] || GRADIENT2[name];
2050
- const isObj = (0, import_utils9.isObject)(val);
3467
+ const isObj = (0, import_utils7.isObject)(val);
2051
3468
  if (isObj && val.value)
2052
3469
  return getColor(value, `@${globalTheme}`, config);
2053
3470
  else if (isObj) {
@@ -2070,16 +3487,18 @@ var getMediaColor = (value, globalTheme, config) => {
2070
3487
  };
2071
3488
 
2072
3489
  // src/system/theme.js
2073
- var import_utils11 = __toESM(require_cjs(), 1);
3490
+ var import_utils9 = __toESM(require_cjs(), 1);
2074
3491
 
2075
3492
  // src/system/font.js
2076
- var import_utils12 = __toESM(require_cjs(), 1);
3493
+ var import_utils10 = __toESM(require_cjs(), 1);
3494
+ var import_utils11 = __toESM(require_cjs3(), 1);
2077
3495
 
2078
3496
  // src/system/typography.js
2079
- var import_utils15 = __toESM(require_cjs(), 1);
3497
+ var import_utils13 = __toESM(require_cjs(), 1);
2080
3498
 
2081
3499
  // src/system/spacing.js
2082
- var import_utils18 = __toESM(require_cjs(), 1);
3500
+ var import_utils15 = __toESM(require_cjs3(), 1);
3501
+ var import_utils16 = __toESM(require_cjs(), 1);
2083
3502
  var getSequence = (sequenceProps) => {
2084
3503
  const CONFIG2 = getActiveConfig();
2085
3504
  const { SPACING: SPACING2 } = CONFIG2;
@@ -2090,11 +3509,11 @@ var getSequence = (sequenceProps) => {
2090
3509
  };
2091
3510
  var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
2092
3511
  const sequence = getSequence(sequenceProps);
2093
- if ((0, import_utils18.isString)(value) && (value.includes("calc") || value.includes("var"))) {
3512
+ if ((0, import_utils16.isString)(value) && (value.includes("calc") || value.includes("var"))) {
2094
3513
  return { [propertyName]: value };
2095
3514
  }
2096
- const stack = arrayzeValue(value);
2097
- if (!(0, import_utils18.isArray)(stack))
3515
+ const stack = (0, import_utils15.arrayzeValue)(value);
3516
+ if (!(0, import_utils16.isArray)(stack))
2098
3517
  return;
2099
3518
  if (stack.length > 1) {
2100
3519
  let suffix = "";
@@ -2129,7 +3548,7 @@ var getSpacingBasedOnRatio = (props, propertyName, val) => {
2129
3548
  let sequenceProps = SPACING2[spacingRatio];
2130
3549
  if (!sequenceProps) {
2131
3550
  const { type, base, range, subSequence } = SPACING2;
2132
- sequenceProps = SPACING2[spacingRatio] = (0, import_utils18.merge)({
3551
+ sequenceProps = SPACING2[spacingRatio] = (0, import_utils16.merge)({
2133
3552
  ratio: spacingRatio,
2134
3553
  type: type + "-" + spacingRatio,
2135
3554
  unit,
@@ -2152,22 +3571,22 @@ var getSpacingBasedOnRatio = (props, propertyName, val) => {
2152
3571
  };
2153
3572
 
2154
3573
  // src/system/shadow.js
2155
- var import_utils20 = __toESM(require_cjs(), 1);
3574
+ var import_utils18 = __toESM(require_cjs(), 1);
2156
3575
  var getShadow = (value, globalTheme) => {
2157
3576
  const CONFIG2 = getActiveConfig();
2158
3577
  if (!globalTheme)
2159
3578
  globalTheme = CONFIG2.globalTheme;
2160
- if (!(0, import_utils20.isString)(value)) {
3579
+ if (!(0, import_utils18.isString)(value)) {
2161
3580
  if (CONFIG2.verbose)
2162
3581
  console.warn(value, "- type for color is not valid");
2163
3582
  return;
2164
3583
  }
2165
3584
  if (value.slice(0, 2) === "--")
2166
3585
  return `var(${value})`;
2167
- const [name] = (0, import_utils20.isArray)(value) ? value : value.split(" ");
3586
+ const [name] = (0, import_utils18.isArray)(value) ? value : value.split(" ");
2168
3587
  const { SHADOW: SHADOW2 } = CONFIG2;
2169
3588
  const val = SHADOW2[name];
2170
- const isObj = (0, import_utils20.isObject)(val);
3589
+ const isObj = (0, import_utils18.isObject)(val);
2171
3590
  if (!val) {
2172
3591
  if (CONFIG2.verbose)
2173
3592
  console.warn("Can't find color ", name);
@@ -2196,10 +3615,11 @@ var getShadow = (value, globalTheme) => {
2196
3615
  };
2197
3616
 
2198
3617
  // src/system/timing.js
3618
+ var import_utils19 = __toESM(require_cjs3(), 1);
2199
3619
  var getTimingFunction = (value) => {
2200
3620
  const CONFIG2 = getActiveConfig();
2201
3621
  const { TIMING: TIMING2 } = CONFIG2;
2202
- return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
3622
+ return TIMING2[value] || TIMING2[(0, import_utils19.toCamelCase)(value)] || value;
2203
3623
  };
2204
3624
  var getTimingByKey = (value, property = "timing") => {
2205
3625
  const CONFIG2 = getActiveConfig();
@@ -2212,13 +3632,13 @@ var getTimingByKey = (value, property = "timing") => {
2212
3632
  };
2213
3633
 
2214
3634
  // src/system/document.js
2215
- var import_utils23 = __toESM(require_cjs(), 1);
3635
+ var import_utils21 = __toESM(require_cjs(), 1);
2216
3636
 
2217
3637
  // src/system/svg.js
2218
3638
  var import_globals2 = __toESM(require_cjs2(), 1);
2219
3639
 
2220
3640
  // src/system/reset.js
2221
- var import_utils26 = __toESM(require_cjs(), 1);
3641
+ var import_utils24 = __toESM(require_cjs(), 1);
2222
3642
 
2223
3643
  // src/transforms/index.js
2224
3644
  var isBorderStyle = (str) => [
@@ -2292,7 +3712,7 @@ var transformBackgroundImage = (backgroundImage, globalTheme) => {
2292
3712
  return v;
2293
3713
  }).join(" ");
2294
3714
  };
2295
- var transfromGap = (gap) => (0, import_utils27.isString)(gap) && gap.split(" ").map((v) => getSpacingByKey(v, "gap").gap).join(" ");
3715
+ var transfromGap = (gap) => (0, import_utils25.isString)(gap) && gap.split(" ").map((v) => getSpacingByKey(v, "gap").gap).join(" ");
2296
3716
  var transformTransition = (transition) => {
2297
3717
  const arr = transition.split(" ");
2298
3718
  if (!arr.length)
@@ -2310,7 +3730,7 @@ var transformTransition = (transition) => {
2310
3730
  }).join(" ");
2311
3731
  };
2312
3732
  var transformDuration = (duration, props, propertyName) => {
2313
- if (!(0, import_utils27.isString)(duration))
3733
+ if (!(0, import_utils25.isString)(duration))
2314
3734
  return;
2315
3735
  return duration.split(",").map((v) => getTimingByKey(v).timing || v).join(",");
2316
3736
  };
@@ -2326,11 +3746,11 @@ var checkIfBoxSize = (propertyName) => {
2326
3746
  };
2327
3747
  var transformSize = (propertyName, val, props = {}, opts = {}) => {
2328
3748
  let value = val || props[propertyName];
2329
- if ((0, import_utils27.isUndefined)(value) && (0, import_utils27.isNull)(value))
3749
+ if ((0, import_utils25.isUndefined)(value) && (0, import_utils25.isNull)(value))
2330
3750
  return;
2331
3751
  const shouldScaleBoxSize = props.scaleBoxSize;
2332
3752
  const isBoxSize = checkIfBoxSize(propertyName);
2333
- if (!shouldScaleBoxSize && isBoxSize && (0, import_utils27.isString)(value)) {
3753
+ if (!shouldScaleBoxSize && isBoxSize && (0, import_utils25.isString)(value)) {
2334
3754
  value = value.split(" ").map((v) => {
2335
3755
  const isSingleLetter = v.length < 3 && /[A-Z]/.test(v);
2336
3756
  const hasUnits = ["%", "vw", "vh", "ch"].some((unit) => value.includes(unit));