@symbo.ls/scratch 2.11.410 → 2.11.429

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.
@@ -34,29 +34,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
34
34
  var require_key = __commonJS({
35
35
  "../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
36
36
  "use strict";
37
- var __defProp3 = Object.defineProperty;
38
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
39
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
40
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
41
- var __export3 = (target, all) => {
37
+ var __defProp2 = Object.defineProperty;
38
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
39
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
40
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
41
+ var __export2 = (target, all) => {
42
42
  for (var name in all)
43
- __defProp3(target, name, { get: all[name], enumerable: true });
43
+ __defProp2(target, name, { get: all[name], enumerable: true });
44
44
  };
45
- var __copyProps3 = (to, from, except, desc) => {
45
+ var __copyProps2 = (to, from, except, desc) => {
46
46
  if (from && typeof from === "object" || typeof from === "function") {
47
- for (let key of __getOwnPropNames3(from))
48
- if (!__hasOwnProp3.call(to, key) && key !== except)
49
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
47
+ for (let key of __getOwnPropNames2(from))
48
+ if (!__hasOwnProp2.call(to, key) && key !== except)
49
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
50
50
  }
51
51
  return to;
52
52
  };
53
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
53
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
54
54
  var key_exports = {};
55
- __export3(key_exports, {
55
+ __export2(key_exports, {
56
56
  createSnapshotId: () => createSnapshotId,
57
57
  generateKey: () => generateKey
58
58
  });
59
- module2.exports = __toCommonJS3(key_exports);
59
+ module2.exports = __toCommonJS2(key_exports);
60
60
  var generateKey = /* @__PURE__ */ function() {
61
61
  let index = 0;
62
62
  function newId() {
@@ -73,32 +73,32 @@ var require_key = __commonJS({
73
73
  var require_env = __commonJS({
74
74
  "../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
75
75
  "use strict";
76
- var __defProp3 = Object.defineProperty;
77
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
78
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
79
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
80
- var __export3 = (target, all) => {
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
81
  for (var name in all)
82
- __defProp3(target, name, { get: all[name], enumerable: true });
82
+ __defProp2(target, name, { get: all[name], enumerable: true });
83
83
  };
84
- var __copyProps3 = (to, from, except, desc) => {
84
+ var __copyProps2 = (to, from, except, desc) => {
85
85
  if (from && typeof from === "object" || typeof from === "function") {
86
- for (let key of __getOwnPropNames3(from))
87
- if (!__hasOwnProp3.call(to, key) && key !== except)
88
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
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
89
  }
90
90
  return to;
91
91
  };
92
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
92
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
93
93
  var env_exports = {};
94
- __export3(env_exports, {
94
+ __export2(env_exports, {
95
95
  NODE_ENV: () => NODE_ENV,
96
96
  getNev: () => getNev,
97
97
  isDevelopment: () => isDevelopment,
98
98
  isProduction: () => isProduction,
99
99
  isTest: () => isTest
100
100
  });
101
- module2.exports = __toCommonJS3(env_exports);
101
+ module2.exports = __toCommonJS2(env_exports);
102
102
  var NODE_ENV = "development";
103
103
  var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
104
104
  var isTest = (env = NODE_ENV) => env === "test";
@@ -111,35 +111,35 @@ var require_env = __commonJS({
111
111
  var require_globals = __commonJS({
112
112
  "../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
113
113
  "use strict";
114
- var __defProp3 = Object.defineProperty;
115
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
116
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
117
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
118
- var __export3 = (target, all) => {
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
119
  for (var name in all)
120
- __defProp3(target, name, { get: all[name], enumerable: true });
120
+ __defProp2(target, name, { get: all[name], enumerable: true });
121
121
  };
122
- var __copyProps3 = (to, from, except, desc) => {
122
+ var __copyProps2 = (to, from, except, desc) => {
123
123
  if (from && typeof from === "object" || typeof from === "function") {
124
- for (let key of __getOwnPropNames3(from))
125
- if (!__hasOwnProp3.call(to, key) && key !== except)
126
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
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
127
  }
128
128
  return to;
129
129
  };
130
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
130
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
131
131
  var globals_exports = {};
132
- __export3(globals_exports, {
132
+ __export2(globals_exports, {
133
133
  document: () => document2,
134
134
  global: () => global,
135
135
  self: () => self,
136
- window: () => window
136
+ window: () => window2
137
137
  });
138
- module2.exports = __toCommonJS3(globals_exports);
138
+ module2.exports = __toCommonJS2(globals_exports);
139
139
  var global = globalThis;
140
140
  var self = globalThis;
141
- var window = globalThis;
142
- var document2 = window.document;
141
+ var window2 = globalThis;
142
+ var document2 = window2.document;
143
143
  }
144
144
  });
145
145
 
@@ -147,29 +147,29 @@ var require_globals = __commonJS({
147
147
  var require_node = __commonJS({
148
148
  "../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
149
149
  "use strict";
150
- var __defProp3 = Object.defineProperty;
151
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
152
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
153
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
154
- var __export3 = (target, all) => {
150
+ var __defProp2 = Object.defineProperty;
151
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
152
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
153
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
154
+ var __export2 = (target, all) => {
155
155
  for (var name in all)
156
- __defProp3(target, name, { get: all[name], enumerable: true });
156
+ __defProp2(target, name, { get: all[name], enumerable: true });
157
157
  };
158
- var __copyProps3 = (to, from, except, desc) => {
158
+ var __copyProps2 = (to, from, except, desc) => {
159
159
  if (from && typeof from === "object" || typeof from === "function") {
160
- for (let key of __getOwnPropNames3(from))
161
- if (!__hasOwnProp3.call(to, key) && key !== except)
162
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
160
+ for (let key of __getOwnPropNames2(from))
161
+ if (!__hasOwnProp2.call(to, key) && key !== except)
162
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
163
163
  }
164
164
  return to;
165
165
  };
166
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
166
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
167
167
  var node_exports = {};
168
- __export3(node_exports, {
168
+ __export2(node_exports, {
169
169
  isHtmlElement: () => isHtmlElement,
170
170
  isNode: () => isNode
171
171
  });
172
- module2.exports = __toCommonJS3(node_exports);
172
+ module2.exports = __toCommonJS2(node_exports);
173
173
  var import_globals = require_globals();
174
174
  var isNode = (obj) => {
175
175
  return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
@@ -184,25 +184,25 @@ var require_node = __commonJS({
184
184
  var require_types = __commonJS({
185
185
  "../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
186
186
  "use strict";
187
- var __defProp3 = Object.defineProperty;
188
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
189
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
190
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
191
- var __export3 = (target, all) => {
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
192
  for (var name in all)
193
- __defProp3(target, name, { get: all[name], enumerable: true });
193
+ __defProp2(target, name, { get: all[name], enumerable: true });
194
194
  };
195
- var __copyProps3 = (to, from, except, desc) => {
195
+ var __copyProps2 = (to, from, except, desc) => {
196
196
  if (from && typeof from === "object" || typeof from === "function") {
197
- for (let key of __getOwnPropNames3(from))
198
- if (!__hasOwnProp3.call(to, key) && key !== except)
199
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
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
200
  }
201
201
  return to;
202
202
  };
203
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
203
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
204
204
  var types_exports = {};
205
- __export3(types_exports, {
205
+ __export2(types_exports, {
206
206
  TYPES: () => TYPES,
207
207
  is: () => is,
208
208
  isArray: () => isArray,
@@ -218,7 +218,7 @@ var require_types = __commonJS({
218
218
  isString: () => isString2,
219
219
  isUndefined: () => isUndefined
220
220
  });
221
- module2.exports = __toCommonJS3(types_exports);
221
+ module2.exports = __toCommonJS2(types_exports);
222
222
  var import_node = require_node();
223
223
  var isObject2 = (arg) => {
224
224
  if (arg === null)
@@ -274,25 +274,25 @@ var require_types = __commonJS({
274
274
  var require_array = __commonJS({
275
275
  "../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
276
276
  "use strict";
277
- var __defProp3 = Object.defineProperty;
278
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
279
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
280
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
281
- var __export3 = (target, all) => {
277
+ var __defProp2 = Object.defineProperty;
278
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
279
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
280
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
281
+ var __export2 = (target, all) => {
282
282
  for (var name in all)
283
- __defProp3(target, name, { get: all[name], enumerable: true });
283
+ __defProp2(target, name, { get: all[name], enumerable: true });
284
284
  };
285
- var __copyProps3 = (to, from, except, desc) => {
285
+ var __copyProps2 = (to, from, except, desc) => {
286
286
  if (from && typeof from === "object" || typeof from === "function") {
287
- for (let key of __getOwnPropNames3(from))
288
- if (!__hasOwnProp3.call(to, key) && key !== except)
289
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
287
+ for (let key of __getOwnPropNames2(from))
288
+ if (!__hasOwnProp2.call(to, key) && key !== except)
289
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
290
290
  }
291
291
  return to;
292
292
  };
293
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
293
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
294
294
  var array_exports = {};
295
- __export3(array_exports, {
295
+ __export2(array_exports, {
296
296
  addItemAfterEveryElement: () => addItemAfterEveryElement,
297
297
  arrayContainsOtherArray: () => arrayContainsOtherArray,
298
298
  arraysEqual: () => arraysEqual,
@@ -309,7 +309,7 @@ var require_array = __commonJS({
309
309
  reorderArrayByValues: () => reorderArrayByValues,
310
310
  swapItemsInArray: () => swapItemsInArray
311
311
  });
312
- module2.exports = __toCommonJS3(array_exports);
312
+ module2.exports = __toCommonJS2(array_exports);
313
313
  var import_object = require_object();
314
314
  var import_types = require_types();
315
315
  var arrayContainsOtherArray = (arr1, arr2) => {
@@ -342,10 +342,10 @@ var require_array = __commonJS({
342
342
  return [].concat(...arrays);
343
343
  };
344
344
  var mergeArray = (arr, excludeFrom = []) => {
345
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
345
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
346
346
  };
347
347
  var mergeAndCloneIfArray = (obj) => {
348
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
348
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
349
349
  };
350
350
  var cutArrayBeforeValue = (arr, value) => {
351
351
  const index = arr.indexOf(value);
@@ -430,27 +430,29 @@ var require_array = __commonJS({
430
430
  var require_string = __commonJS({
431
431
  "../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
432
432
  "use strict";
433
- var __defProp3 = Object.defineProperty;
434
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
435
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
436
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
437
- var __export3 = (target, all) => {
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
438
  for (var name in all)
439
- __defProp3(target, name, { get: all[name], enumerable: true });
439
+ __defProp2(target, name, { get: all[name], enumerable: true });
440
440
  };
441
- var __copyProps3 = (to, from, except, desc) => {
441
+ var __copyProps2 = (to, from, except, desc) => {
442
442
  if (from && typeof from === "object" || typeof from === "function") {
443
- for (let key of __getOwnPropNames3(from))
444
- if (!__hasOwnProp3.call(to, key) && key !== except)
445
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
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
446
  }
447
447
  return to;
448
448
  };
449
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
449
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
450
450
  var string_exports = {};
451
- __export3(string_exports, {
451
+ __export2(string_exports, {
452
452
  customDecodeURIComponent: () => customDecodeURIComponent,
453
453
  customEncodeURIComponent: () => customEncodeURIComponent,
454
+ decodeNewlines: () => decodeNewlines,
455
+ encodeNewlines: () => encodeNewlines,
454
456
  findKeyPosition: () => findKeyPosition,
455
457
  lowercaseFirstLetter: () => lowercaseFirstLetter,
456
458
  replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
@@ -458,7 +460,7 @@ var require_string = __commonJS({
458
460
  stringIncludesAny: () => stringIncludesAny,
459
461
  trimStringFromSymbols: () => trimStringFromSymbols
460
462
  });
461
- module2.exports = __toCommonJS3(string_exports);
463
+ module2.exports = __toCommonJS2(string_exports);
462
464
  var stringIncludesAny = (str, characters) => {
463
465
  for (const char of characters) {
464
466
  if (str.includes(char)) {
@@ -554,6 +556,12 @@ var require_string = __commonJS({
554
556
  return char;
555
557
  });
556
558
  };
559
+ var encodeNewlines = (str) => {
560
+ return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
561
+ };
562
+ var decodeNewlines = (encodedStr) => {
563
+ return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
564
+ };
557
565
  var customEncodeURIComponent = (str) => {
558
566
  return str.split("").map((char) => {
559
567
  if (/[^a-zA-Z0-9\s]/.test(char)) {
@@ -572,25 +580,25 @@ var require_string = __commonJS({
572
580
  var require_object = __commonJS({
573
581
  "../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
574
582
  "use strict";
575
- var __defProp3 = Object.defineProperty;
576
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
577
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
578
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
579
- var __export3 = (target, all) => {
583
+ var __defProp2 = Object.defineProperty;
584
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
585
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
586
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
587
+ var __export2 = (target, all) => {
580
588
  for (var name in all)
581
- __defProp3(target, name, { get: all[name], enumerable: true });
589
+ __defProp2(target, name, { get: all[name], enumerable: true });
582
590
  };
583
- var __copyProps3 = (to, from, except, desc) => {
591
+ var __copyProps2 = (to, from, except, desc) => {
584
592
  if (from && typeof from === "object" || typeof from === "function") {
585
- for (let key of __getOwnPropNames3(from))
586
- if (!__hasOwnProp3.call(to, key) && key !== except)
587
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
593
+ for (let key of __getOwnPropNames2(from))
594
+ if (!__hasOwnProp2.call(to, key) && key !== except)
595
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
588
596
  }
589
597
  return to;
590
598
  };
591
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
599
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
592
600
  var object_exports = {};
593
- __export3(object_exports, {
601
+ __export2(object_exports, {
594
602
  checkIfKeyIsComponent: () => checkIfKeyIsComponent,
595
603
  clone: () => clone,
596
604
  createObjectWithoutPrototype: () => createObjectWithoutPrototype,
@@ -626,7 +634,7 @@ var require_object = __commonJS({
626
634
  removeFromObject: () => removeFromObject,
627
635
  stringToObject: () => stringToObject
628
636
  });
629
- module2.exports = __toCommonJS3(object_exports);
637
+ module2.exports = __toCommonJS2(object_exports);
630
638
  var import_globals = require_globals();
631
639
  var import_types = require_types();
632
640
  var import_array = require_array();
@@ -732,7 +740,7 @@ var require_object = __commonJS({
732
740
  return o;
733
741
  };
734
742
  var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
735
- const o = (0, import_types.isArray)(obj) ? [] : {};
743
+ const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
736
744
  for (const prop in obj) {
737
745
  if (!Object.prototype.hasOwnProperty.call(obj, prop))
738
746
  continue;
@@ -986,7 +994,7 @@ var require_object = __commonJS({
986
994
  };
987
995
  var overwriteDeep = (obj, params, excludeFrom = []) => {
988
996
  for (const e in params) {
989
- if (e === "__proto__")
997
+ if (e === "__ref")
990
998
  continue;
991
999
  if (excludeFrom.includes(e) || e.startsWith("__"))
992
1000
  continue;
@@ -1108,6 +1116,12 @@ var require_object = __commonJS({
1108
1116
  if (foundString || foundInArray)
1109
1117
  return el;
1110
1118
  }
1119
+ if (el.parent && el.parent.childExtend) {
1120
+ const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
1121
+ const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
1122
+ if (foundString || foundInArray)
1123
+ return el;
1124
+ }
1111
1125
  };
1112
1126
  var getExtendsInElement = (obj) => {
1113
1127
  let result = [];
@@ -1140,31 +1154,31 @@ var require_object = __commonJS({
1140
1154
  var require_function = __commonJS({
1141
1155
  "../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
1142
1156
  "use strict";
1143
- var __defProp3 = Object.defineProperty;
1144
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
1145
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
1146
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
1147
- var __export3 = (target, all) => {
1157
+ var __defProp2 = Object.defineProperty;
1158
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1159
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1160
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1161
+ var __export2 = (target, all) => {
1148
1162
  for (var name in all)
1149
- __defProp3(target, name, { get: all[name], enumerable: true });
1163
+ __defProp2(target, name, { get: all[name], enumerable: true });
1150
1164
  };
1151
- var __copyProps3 = (to, from, except, desc) => {
1165
+ var __copyProps2 = (to, from, except, desc) => {
1152
1166
  if (from && typeof from === "object" || typeof from === "function") {
1153
- for (let key of __getOwnPropNames3(from))
1154
- if (!__hasOwnProp3.call(to, key) && key !== except)
1155
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
1167
+ for (let key of __getOwnPropNames2(from))
1168
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1169
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1156
1170
  }
1157
1171
  return to;
1158
1172
  };
1159
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
1173
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1160
1174
  var function_exports = {};
1161
- __export3(function_exports, {
1175
+ __export2(function_exports, {
1162
1176
  debounce: () => debounce,
1163
1177
  debounceOnContext: () => debounceOnContext,
1164
1178
  isStringFunction: () => isStringFunction,
1165
1179
  memoize: () => memoize
1166
1180
  });
1167
- module2.exports = __toCommonJS3(function_exports);
1181
+ module2.exports = __toCommonJS2(function_exports);
1168
1182
  function debounce(func, wait, immediate) {
1169
1183
  let timeout;
1170
1184
  return function() {
@@ -1215,29 +1229,29 @@ var require_function = __commonJS({
1215
1229
  var require_log = __commonJS({
1216
1230
  "../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
1217
1231
  "use strict";
1218
- var __defProp3 = Object.defineProperty;
1219
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
1220
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
1221
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
1222
- var __export3 = (target, all) => {
1232
+ var __defProp2 = Object.defineProperty;
1233
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1234
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1235
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1236
+ var __export2 = (target, all) => {
1223
1237
  for (var name in all)
1224
- __defProp3(target, name, { get: all[name], enumerable: true });
1238
+ __defProp2(target, name, { get: all[name], enumerable: true });
1225
1239
  };
1226
- var __copyProps3 = (to, from, except, desc) => {
1240
+ var __copyProps2 = (to, from, except, desc) => {
1227
1241
  if (from && typeof from === "object" || typeof from === "function") {
1228
- for (let key of __getOwnPropNames3(from))
1229
- if (!__hasOwnProp3.call(to, key) && key !== except)
1230
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
1242
+ for (let key of __getOwnPropNames2(from))
1243
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1244
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1231
1245
  }
1232
1246
  return to;
1233
1247
  };
1234
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
1248
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1235
1249
  var log_exports = {};
1236
- __export3(log_exports, {
1250
+ __export2(log_exports, {
1237
1251
  logGroupIf: () => logGroupIf,
1238
1252
  logIf: () => logIf
1239
1253
  });
1240
- module2.exports = __toCommonJS3(log_exports);
1254
+ module2.exports = __toCommonJS2(log_exports);
1241
1255
  var logIf = (bool, ...arg) => {
1242
1256
  if (bool)
1243
1257
  arg.map((v) => console.log(v));
@@ -1256,46 +1270,46 @@ var require_log = __commonJS({
1256
1270
  var require_cookie = __commonJS({
1257
1271
  "../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
1258
1272
  "use strict";
1259
- var __defProp3 = Object.defineProperty;
1260
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
1261
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
1262
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
1263
- var __export3 = (target, all) => {
1273
+ var __defProp2 = Object.defineProperty;
1274
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1275
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1276
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1277
+ var __export2 = (target, all) => {
1264
1278
  for (var name in all)
1265
- __defProp3(target, name, { get: all[name], enumerable: true });
1279
+ __defProp2(target, name, { get: all[name], enumerable: true });
1266
1280
  };
1267
- var __copyProps3 = (to, from, except, desc) => {
1281
+ var __copyProps2 = (to, from, except, desc) => {
1268
1282
  if (from && typeof from === "object" || typeof from === "function") {
1269
- for (let key of __getOwnPropNames3(from))
1270
- if (!__hasOwnProp3.call(to, key) && key !== except)
1271
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
1283
+ for (let key of __getOwnPropNames2(from))
1284
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1285
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1272
1286
  }
1273
1287
  return to;
1274
1288
  };
1275
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
1289
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1276
1290
  var cookie_exports = {};
1277
- __export3(cookie_exports, {
1291
+ __export2(cookie_exports, {
1278
1292
  getCookie: () => getCookie,
1279
1293
  isMobile: () => isMobile,
1280
1294
  setCookie: () => setCookie
1281
1295
  });
1282
- module2.exports = __toCommonJS3(cookie_exports);
1296
+ module2.exports = __toCommonJS2(cookie_exports);
1283
1297
  var import_types = require_types();
1284
- var import_utils7 = require_cjs();
1298
+ var import_utils5 = require_cjs();
1285
1299
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1286
1300
  var setCookie = (cname, cvalue, exdays = 365) => {
1287
- if ((0, import_types.isUndefined)(import_utils7.document) || (0, import_types.isUndefined)(import_utils7.document.cookie))
1301
+ if ((0, import_types.isUndefined)(import_utils5.document) || (0, import_types.isUndefined)(import_utils5.document.cookie))
1288
1302
  return;
1289
1303
  const d = /* @__PURE__ */ new Date();
1290
1304
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1291
1305
  const expires = `expires=${d.toUTCString()}`;
1292
- import_utils7.document.cookie = `${cname}=${cvalue};${expires};path=/`;
1306
+ import_utils5.document.cookie = `${cname}=${cvalue};${expires};path=/`;
1293
1307
  };
1294
1308
  var getCookie = (cname) => {
1295
- if ((0, import_types.isUndefined)(import_utils7.document) || (0, import_types.isUndefined)(import_utils7.document.cookie))
1309
+ if ((0, import_types.isUndefined)(import_utils5.document) || (0, import_types.isUndefined)(import_utils5.document.cookie))
1296
1310
  return;
1297
1311
  const name = `${cname}=`;
1298
- const decodedCookie = decodeURIComponent(import_utils7.document.cookie);
1312
+ const decodedCookie = decodeURIComponent(import_utils5.document.cookie);
1299
1313
  const ca = decodedCookie.split(";");
1300
1314
  for (let i = 0; i < ca.length; i++) {
1301
1315
  let c = ca[i];
@@ -1313,29 +1327,29 @@ var require_cookie = __commonJS({
1313
1327
  var require_tags = __commonJS({
1314
1328
  "../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
1315
1329
  "use strict";
1316
- var __defProp3 = Object.defineProperty;
1317
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
1318
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
1319
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
1320
- var __export3 = (target, all) => {
1330
+ var __defProp2 = Object.defineProperty;
1331
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1332
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1333
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1334
+ var __export2 = (target, all) => {
1321
1335
  for (var name in all)
1322
- __defProp3(target, name, { get: all[name], enumerable: true });
1336
+ __defProp2(target, name, { get: all[name], enumerable: true });
1323
1337
  };
1324
- var __copyProps3 = (to, from, except, desc) => {
1338
+ var __copyProps2 = (to, from, except, desc) => {
1325
1339
  if (from && typeof from === "object" || typeof from === "function") {
1326
- for (let key of __getOwnPropNames3(from))
1327
- if (!__hasOwnProp3.call(to, key) && key !== except)
1328
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
1340
+ for (let key of __getOwnPropNames2(from))
1341
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1342
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1329
1343
  }
1330
1344
  return to;
1331
1345
  };
1332
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
1346
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1333
1347
  var tags_exports = {};
1334
- __export3(tags_exports, {
1348
+ __export2(tags_exports, {
1335
1349
  HTML_TAGS: () => HTML_TAGS,
1336
1350
  isValidHtmlTag: () => isValidHtmlTag
1337
1351
  });
1338
- module2.exports = __toCommonJS3(tags_exports);
1352
+ module2.exports = __toCommonJS2(tags_exports);
1339
1353
  var HTML_TAGS = {
1340
1354
  root: [
1341
1355
  "body",
@@ -1481,22 +1495,22 @@ var require_tags = __commonJS({
1481
1495
  var require_cjs = __commonJS({
1482
1496
  "../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
1483
1497
  "use strict";
1484
- var __defProp3 = Object.defineProperty;
1485
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
1486
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
1487
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
1488
- var __copyProps3 = (to, from, except, desc) => {
1498
+ var __defProp2 = Object.defineProperty;
1499
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1500
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1501
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1502
+ var __copyProps2 = (to, from, except, desc) => {
1489
1503
  if (from && typeof from === "object" || typeof from === "function") {
1490
- for (let key of __getOwnPropNames3(from))
1491
- if (!__hasOwnProp3.call(to, key) && key !== except)
1492
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
1504
+ for (let key of __getOwnPropNames2(from))
1505
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1506
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1493
1507
  }
1494
1508
  return to;
1495
1509
  };
1496
- var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
1497
- var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
1510
+ var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
1511
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1498
1512
  var utils_exports = {};
1499
- module2.exports = __toCommonJS3(utils_exports);
1513
+ module2.exports = __toCommonJS2(utils_exports);
1500
1514
  __reExport(utils_exports, require_key(), module2.exports);
1501
1515
  __reExport(utils_exports, require_env(), module2.exports);
1502
1516
  __reExport(utils_exports, require_types(), module2.exports);
@@ -1512,1878 +1526,1908 @@ var require_cjs = __commonJS({
1512
1526
  }
1513
1527
  });
1514
1528
 
1515
- // src/utils/var.js
1516
- var var_exports = {};
1517
- __export(var_exports, {
1518
- applyMediaSequenceVars: () => applyMediaSequenceVars,
1519
- applySequenceGlobalVars: () => applySequenceGlobalVars,
1520
- applySequenceVars: () => applySequenceVars,
1521
- setVariables: () => setVariables
1522
- });
1523
- module.exports = __toCommonJS(var_exports);
1524
- var import_utils6 = __toESM(require_cjs(), 1);
1525
-
1526
- // src/factory.js
1527
- var import_utils = __toESM(require_cjs(), 1);
1528
-
1529
- // src/defaultConfig/index.js
1530
- var defaultConfig_exports = {};
1531
- __export(defaultConfig_exports, {
1532
- ANIMATION: () => ANIMATION,
1533
- BREAKPOINTS: () => BREAKPOINTS,
1534
- CASES: () => CASES,
1535
- COLOR: () => COLOR,
1536
- DEVICES: () => DEVICES,
1537
- DOCUMENT: () => DOCUMENT,
1538
- FONT: () => FONT,
1539
- FONT_FACE: () => FONT_FACE,
1540
- FONT_FAMILY: () => FONT_FAMILY,
1541
- FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
1542
- GRADIENT: () => GRADIENT,
1543
- GRID: () => GRID,
1544
- ICONS: () => ICONS,
1545
- MEDIA: () => MEDIA,
1546
- RESET: () => RESET,
1547
- SEMANTIC_ICONS: () => SEMANTIC_ICONS,
1548
- SEQUENCE: () => SEQUENCE,
1549
- SHADOW: () => SHADOW,
1550
- SPACING: () => SPACING,
1551
- SVG: () => SVG,
1552
- SVG_DATA: () => SVG_DATA,
1553
- TEMPLATES: () => TEMPLATES,
1554
- THEME: () => THEME,
1555
- TIMING: () => TIMING,
1556
- TYPOGRAPHY: () => TYPOGRAPHY,
1557
- UNIT: () => UNIT
1558
- });
1559
-
1560
- // src/defaultConfig/sequence.js
1561
- var SEQUENCE = {
1562
- "minor-second": 1.067,
1563
- "major-second": 1.125,
1564
- "minor-third": 1.2,
1565
- "major-third": 1.25,
1566
- "perfect-fourth": 1.333,
1567
- "augmented-fourth": 1.414,
1568
- "perfect-fifth": 1.5,
1569
- "minor-sixth": 1.6,
1570
- phi: 1.618,
1571
- // golden-ratio
1572
- "major-sixth": 1.667,
1573
- "square-root-3": 1.732,
1574
- // theodorus
1575
- "minor-seventh": 1.778,
1576
- "major-seventh": 1.875,
1577
- octave: 2,
1578
- "square-root-5": 2.23,
1579
- // pythagoras
1580
- "major-tenth": 2.5,
1581
- "major-eleventh": 2.667,
1582
- "major-twelfth": 3,
1583
- pi: 3.14,
1584
- // archimedes
1585
- "double-octave": 4
1586
- };
1587
-
1588
- // src/defaultConfig/unit.js
1589
- var UNIT = {
1590
- default: "em"
1591
- };
1592
-
1593
- // src/defaultConfig/typography.js
1594
- var defaultProps = {
1595
- browserDefault: 16,
1596
- base: 16,
1597
- type: "font-size",
1598
- ratio: SEQUENCE["minor-third"],
1599
- range: [-3, 12],
1600
- h1Matches: 6,
1601
- lineHeight: 1.5,
1602
- subSequence: true,
1603
- mediaRegenerate: false,
1604
- unit: "em",
1605
- templates: {},
1606
- sequence: {},
1607
- scales: {},
1608
- vars: {}
1609
- };
1610
- var TYPOGRAPHY = defaultProps;
1611
-
1612
- // src/defaultConfig/font.js
1613
- var FONT = {};
1614
-
1615
- // src/defaultConfig/font-family.js
1616
- var FONT_FAMILY = {};
1617
- var FONT_FAMILY_TYPES = {
1618
- "sans-serif": "Helvetica, Arial, sans-serif, --system-default",
1619
- serif: "Times New Roman, Georgia, serif, --system-default",
1620
- monospace: "Courier New, monospace, --system-default"
1621
- };
1622
- var FONT_FACE = {};
1623
-
1624
- // src/defaultConfig/media.js
1625
- var MEDIA = {
1626
- tv: "(min-width: 2780px)",
1627
- light: "(prefers-color-scheme: light)",
1628
- dark: "(prefers-color-scheme: dark)",
1629
- print: "print"
1630
- };
1631
-
1632
- // src/defaultConfig/spacing.js
1633
- var defaultProps2 = {
1634
- base: TYPOGRAPHY.base,
1635
- type: "spacing",
1636
- ratio: SEQUENCE.phi,
1637
- range: [-5, 15],
1638
- subSequence: true,
1639
- mediaRegenerate: false,
1640
- unit: "em",
1641
- sequence: {},
1642
- scales: {},
1643
- vars: {}
1644
- };
1645
- var SPACING = defaultProps2;
1646
-
1647
- // src/defaultConfig/color.js
1648
- var COLOR = {};
1649
- var GRADIENT = {};
1650
-
1651
- // src/defaultConfig/theme.js
1652
- var THEME = {};
1653
-
1654
- // src/defaultConfig/shadow.js
1655
- var SHADOW = {};
1656
-
1657
- // src/defaultConfig/icons.js
1658
- var ICONS = {};
1659
- var SEMANTIC_ICONS = {};
1660
-
1661
- // src/defaultConfig/timing.js
1662
- var defaultProps3 = {
1663
- default: 150,
1664
- base: 150,
1665
- type: "timing",
1666
- ratio: SEQUENCE["perfect-fourth"],
1667
- range: [-3, 12],
1668
- mediaRegenerate: false,
1669
- unit: "ms",
1670
- sequence: {},
1671
- scales: {},
1672
- vars: {}
1673
- };
1674
- var TIMING = defaultProps3;
1675
-
1676
- // src/defaultConfig/document.js
1677
- var DOCUMENT = {};
1678
-
1679
- // src/defaultConfig/responsive.js
1680
- var BREAKPOINTS = {
1681
- screenL: 1920,
1682
- screenM: 1680,
1683
- screenS: 1440,
1684
- tabletL: 1366,
1685
- tabletM: 1280,
1686
- tabletS: 1024,
1687
- mobileL: 768,
1688
- mobileM: 560,
1689
- mobileS: 480,
1690
- mobileXS: 375
1691
- };
1692
- var DEVICES = {
1693
- screenL: [1920, 1024],
1694
- screenM: [1680, 1024],
1695
- screenS: [1440, 978],
1696
- tabletL: [1366, 926],
1697
- tabletM: [1280, 768],
1698
- tabletS: [1024, 768],
1699
- mobileL: [768, 375],
1700
- mobileM: [560, 768],
1701
- mobileS: [480, 768],
1702
- mobileXS: [375, 768]
1703
- };
1704
-
1705
- // src/defaultConfig/cases.js
1706
- var CASES = {};
1707
-
1708
- // src/defaultConfig/animation.js
1709
- var ANIMATION = {};
1710
-
1711
- // src/defaultConfig/svg.js
1712
- var SVG = {};
1713
- var SVG_DATA = {};
1714
-
1715
- // src/defaultConfig/templates.js
1716
- var TEMPLATES = {};
1717
-
1718
- // src/defaultConfig/grid.js
1719
- var defaultProps4 = {};
1720
- var GRID = defaultProps4;
1721
-
1722
- // src/defaultConfig/index.js
1723
- var RESET = {};
1724
-
1725
- // src/factory.js
1726
- var CSS_VARS = {};
1727
- var CONFIG = {
1728
- verbose: false,
1729
- useVariable: true,
1730
- useReset: true,
1731
- CSS_VARS,
1732
- ...defaultConfig_exports
1733
- };
1734
- var cachedConfig = (0, import_utils.deepClone)(CONFIG);
1735
- var FACTORY = {
1736
- active: "0",
1737
- 0: CONFIG
1738
- };
1739
- var getActiveConfig = (def) => {
1740
- return FACTORY[def || FACTORY.active] || CONFIG;
1741
- };
1742
-
1743
- // src/utils/sequence.js
1744
- var import_utils4 = __toESM(require_cjs(), 1);
1745
-
1746
1529
  // ../utils/dist/cjs/index.js
1747
- var __create2 = Object.create;
1748
- var __defProp2 = Object.defineProperty;
1749
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1750
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
1751
- var __getProtoOf2 = Object.getPrototypeOf;
1752
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1753
- var __commonJS2 = (cb, mod) => function __require() {
1754
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
1755
- };
1756
- var __export2 = (target, all) => {
1757
- for (var name in all)
1758
- __defProp2(target, name, { get: all[name], enumerable: true });
1759
- };
1760
- var __copyProps2 = (to, from, except, desc) => {
1761
- if (from && typeof from === "object" || typeof from === "function") {
1762
- for (let key of __getOwnPropNames2(from))
1763
- if (!__hasOwnProp2.call(to, key) && key !== except)
1764
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1765
- }
1766
- return to;
1767
- };
1768
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
1769
- // If the importer is in node compatibility mode or this is not an ESM
1770
- // file that has been converted to a CommonJS file using a Babel-
1771
- // compatible transform (i.e. "__esModule" has not been set), then set
1772
- // "default" to the CommonJS "module.exports" for node compatibility.
1773
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
1774
- mod
1775
- ));
1776
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1777
- var require_key2 = __commonJS2({
1778
- "../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
1530
+ var require_cjs2 = __commonJS({
1531
+ "../utils/dist/cjs/index.js"(exports, module2) {
1779
1532
  "use strict";
1780
- var __defProp22 = Object.defineProperty;
1781
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1782
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
1783
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1784
- var __export22 = (target, all) => {
1533
+ var __create2 = Object.create;
1534
+ var __defProp2 = Object.defineProperty;
1535
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1536
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1537
+ var __getProtoOf2 = Object.getPrototypeOf;
1538
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1539
+ var __commonJS2 = (cb, mod) => function __require() {
1540
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
1541
+ };
1542
+ var __export2 = (target, all) => {
1785
1543
  for (var name in all)
1786
- __defProp22(target, name, { get: all[name], enumerable: true });
1544
+ __defProp2(target, name, { get: all[name], enumerable: true });
1787
1545
  };
1788
- var __copyProps22 = (to, from, except, desc) => {
1546
+ var __copyProps2 = (to, from, except, desc) => {
1789
1547
  if (from && typeof from === "object" || typeof from === "function") {
1790
- for (let key of __getOwnPropNames22(from))
1791
- if (!__hasOwnProp22.call(to, key) && key !== except)
1792
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1548
+ for (let key of __getOwnPropNames2(from))
1549
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1550
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1793
1551
  }
1794
1552
  return to;
1795
1553
  };
1796
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1797
- var key_exports = {};
1798
- __export22(key_exports, {
1799
- createSnapshotId: () => createSnapshotId,
1800
- generateKey: () => generateKey
1801
- });
1802
- module2.exports = __toCommonJS22(key_exports);
1803
- var generateKey = /* @__PURE__ */ function() {
1804
- let index = 0;
1805
- function newId() {
1806
- index++;
1807
- return index;
1808
- }
1809
- return newId;
1810
- }();
1811
- var createSnapshotId = generateKey;
1812
- }
1813
- });
1814
- var require_env2 = __commonJS2({
1815
- "../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
1816
- "use strict";
1817
- var __defProp22 = Object.defineProperty;
1818
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1819
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
1820
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1821
- var __export22 = (target, all) => {
1822
- for (var name in all)
1823
- __defProp22(target, name, { get: all[name], enumerable: true });
1824
- };
1825
- var __copyProps22 = (to, from, except, desc) => {
1826
- if (from && typeof from === "object" || typeof from === "function") {
1827
- for (let key of __getOwnPropNames22(from))
1828
- if (!__hasOwnProp22.call(to, key) && key !== except)
1829
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1554
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
1555
+ // If the importer is in node compatibility mode or this is not an ESM
1556
+ // file that has been converted to a CommonJS file using a Babel-
1557
+ // compatible transform (i.e. "__esModule" has not been set), then set
1558
+ // "default" to the CommonJS "module.exports" for node compatibility.
1559
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
1560
+ mod
1561
+ ));
1562
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1563
+ var require_key2 = __commonJS2({
1564
+ "../../../domql/packages/utils/dist/cjs/key.js"(exports2, module22) {
1565
+ "use strict";
1566
+ var __defProp22 = Object.defineProperty;
1567
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1568
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1569
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1570
+ var __export22 = (target, all) => {
1571
+ for (var name in all)
1572
+ __defProp22(target, name, { get: all[name], enumerable: true });
1573
+ };
1574
+ var __copyProps22 = (to, from, except, desc) => {
1575
+ if (from && typeof from === "object" || typeof from === "function") {
1576
+ for (let key of __getOwnPropNames22(from))
1577
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1578
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1579
+ }
1580
+ return to;
1581
+ };
1582
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1583
+ var key_exports = {};
1584
+ __export22(key_exports, {
1585
+ createSnapshotId: () => createSnapshotId,
1586
+ generateKey: () => generateKey
1587
+ });
1588
+ module22.exports = __toCommonJS22(key_exports);
1589
+ var generateKey = /* @__PURE__ */ function() {
1590
+ let index = 0;
1591
+ function newId() {
1592
+ index++;
1593
+ return index;
1594
+ }
1595
+ return newId;
1596
+ }();
1597
+ var createSnapshotId = generateKey;
1830
1598
  }
1831
- return to;
1832
- };
1833
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1834
- var env_exports = {};
1835
- __export22(env_exports, {
1836
- NODE_ENV: () => NODE_ENV,
1837
- getNev: () => getNev,
1838
- isDevelopment: () => isDevelopment,
1839
- isProduction: () => isProduction,
1840
- isTest: () => isTest
1841
1599
  });
1842
- module2.exports = __toCommonJS22(env_exports);
1843
- var NODE_ENV = "development";
1844
- var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
1845
- var isTest = (env = NODE_ENV) => env === "test";
1846
- var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
1847
- var getNev = (key, env = NODE_ENV) => env[key];
1848
- }
1849
- });
1850
- var require_globals2 = __commonJS2({
1851
- "../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
1852
- "use strict";
1853
- var __defProp22 = Object.defineProperty;
1854
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1855
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
1856
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1857
- var __export22 = (target, all) => {
1858
- for (var name in all)
1859
- __defProp22(target, name, { get: all[name], enumerable: true });
1860
- };
1861
- var __copyProps22 = (to, from, except, desc) => {
1862
- if (from && typeof from === "object" || typeof from === "function") {
1863
- for (let key of __getOwnPropNames22(from))
1864
- if (!__hasOwnProp22.call(to, key) && key !== except)
1865
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1600
+ var require_env2 = __commonJS2({
1601
+ "../../../domql/packages/utils/dist/cjs/env.js"(exports2, module22) {
1602
+ "use strict";
1603
+ var __defProp22 = Object.defineProperty;
1604
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1605
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1606
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1607
+ var __export22 = (target, all) => {
1608
+ for (var name in all)
1609
+ __defProp22(target, name, { get: all[name], enumerable: true });
1610
+ };
1611
+ var __copyProps22 = (to, from, except, desc) => {
1612
+ if (from && typeof from === "object" || typeof from === "function") {
1613
+ for (let key of __getOwnPropNames22(from))
1614
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1615
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1616
+ }
1617
+ return to;
1618
+ };
1619
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1620
+ var env_exports = {};
1621
+ __export22(env_exports, {
1622
+ NODE_ENV: () => NODE_ENV,
1623
+ getNev: () => getNev,
1624
+ isDevelopment: () => isDevelopment,
1625
+ isProduction: () => isProduction,
1626
+ isTest: () => isTest
1627
+ });
1628
+ module22.exports = __toCommonJS22(env_exports);
1629
+ var NODE_ENV = "development";
1630
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
1631
+ var isTest = (env = NODE_ENV) => env === "test";
1632
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
1633
+ var getNev = (key, env = NODE_ENV) => env[key];
1866
1634
  }
1867
- return to;
1868
- };
1869
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1870
- var globals_exports = {};
1871
- __export22(globals_exports, {
1872
- document: () => document2,
1873
- global: () => global,
1874
- self: () => self,
1875
- window: () => window
1876
1635
  });
1877
- module2.exports = __toCommonJS22(globals_exports);
1878
- var global = globalThis;
1879
- var self = globalThis;
1880
- var window = globalThis;
1881
- var document2 = window.document;
1882
- }
1883
- });
1884
- var require_node2 = __commonJS2({
1885
- "../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
1886
- "use strict";
1887
- var __defProp22 = Object.defineProperty;
1888
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1889
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
1890
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1891
- var __export22 = (target, all) => {
1892
- for (var name in all)
1893
- __defProp22(target, name, { get: all[name], enumerable: true });
1894
- };
1895
- var __copyProps22 = (to, from, except, desc) => {
1896
- if (from && typeof from === "object" || typeof from === "function") {
1897
- for (let key of __getOwnPropNames22(from))
1898
- if (!__hasOwnProp22.call(to, key) && key !== except)
1899
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1636
+ var require_globals2 = __commonJS2({
1637
+ "../../../domql/packages/utils/dist/cjs/globals.js"(exports2, module22) {
1638
+ "use strict";
1639
+ var __defProp22 = Object.defineProperty;
1640
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1641
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1642
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1643
+ var __export22 = (target, all) => {
1644
+ for (var name in all)
1645
+ __defProp22(target, name, { get: all[name], enumerable: true });
1646
+ };
1647
+ var __copyProps22 = (to, from, except, desc) => {
1648
+ if (from && typeof from === "object" || typeof from === "function") {
1649
+ for (let key of __getOwnPropNames22(from))
1650
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1651
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1652
+ }
1653
+ return to;
1654
+ };
1655
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1656
+ var globals_exports = {};
1657
+ __export22(globals_exports, {
1658
+ document: () => document2,
1659
+ global: () => global,
1660
+ self: () => self,
1661
+ window: () => window2
1662
+ });
1663
+ module22.exports = __toCommonJS22(globals_exports);
1664
+ var global = globalThis;
1665
+ var self = globalThis;
1666
+ var window2 = globalThis;
1667
+ var document2 = window2.document;
1900
1668
  }
1901
- return to;
1902
- };
1903
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1904
- var node_exports = {};
1905
- __export22(node_exports, {
1906
- isHtmlElement: () => isHtmlElement,
1907
- isNode: () => isNode
1908
1669
  });
1909
- module2.exports = __toCommonJS22(node_exports);
1910
- var import_globals = require_globals2();
1911
- var isNode = (obj) => {
1912
- return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
1913
- };
1914
- var isHtmlElement = (obj) => {
1915
- return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
1916
- };
1917
- }
1918
- });
1919
- var require_types2 = __commonJS2({
1920
- "../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
1921
- "use strict";
1922
- var __defProp22 = Object.defineProperty;
1923
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1924
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
1925
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1926
- var __export22 = (target, all) => {
1927
- for (var name in all)
1928
- __defProp22(target, name, { get: all[name], enumerable: true });
1929
- };
1930
- var __copyProps22 = (to, from, except, desc) => {
1931
- if (from && typeof from === "object" || typeof from === "function") {
1932
- for (let key of __getOwnPropNames22(from))
1933
- if (!__hasOwnProp22.call(to, key) && key !== except)
1934
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1670
+ var require_node2 = __commonJS2({
1671
+ "../../../domql/packages/utils/dist/cjs/node.js"(exports2, module22) {
1672
+ "use strict";
1673
+ var __defProp22 = Object.defineProperty;
1674
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1675
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1676
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1677
+ var __export22 = (target, all) => {
1678
+ for (var name in all)
1679
+ __defProp22(target, name, { get: all[name], enumerable: true });
1680
+ };
1681
+ var __copyProps22 = (to, from, except, desc) => {
1682
+ if (from && typeof from === "object" || typeof from === "function") {
1683
+ for (let key of __getOwnPropNames22(from))
1684
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1685
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1686
+ }
1687
+ return to;
1688
+ };
1689
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1690
+ var node_exports = {};
1691
+ __export22(node_exports, {
1692
+ isHtmlElement: () => isHtmlElement,
1693
+ isNode: () => isNode
1694
+ });
1695
+ module22.exports = __toCommonJS22(node_exports);
1696
+ var import_globals = require_globals2();
1697
+ var isNode = (obj) => {
1698
+ return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
1699
+ };
1700
+ var isHtmlElement = (obj) => {
1701
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
1702
+ };
1935
1703
  }
1936
- return to;
1937
- };
1938
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1939
- var types_exports = {};
1940
- __export22(types_exports, {
1941
- TYPES: () => TYPES,
1942
- is: () => is,
1943
- isArray: () => isArray3,
1944
- isBoolean: () => isBoolean,
1945
- isDate: () => isDate,
1946
- isDefined: () => isDefined2,
1947
- isFunction: () => isFunction,
1948
- isNot: () => isNot,
1949
- isNull: () => isNull,
1950
- isNumber: () => isNumber2,
1951
- isObject: () => isObject3,
1952
- isObjectLike: () => isObjectLike2,
1953
- isString: () => isString2,
1954
- isUndefined: () => isUndefined
1955
1704
  });
1956
- module2.exports = __toCommonJS22(types_exports);
1957
- var import_node = require_node2();
1958
- var isObject3 = (arg) => {
1959
- if (arg === null)
1960
- return false;
1961
- return typeof arg === "object" && arg.constructor === Object;
1962
- };
1963
- var isString2 = (arg) => typeof arg === "string";
1964
- var isNumber2 = (arg) => typeof arg === "number";
1965
- var isFunction = (arg) => typeof arg === "function";
1966
- var isBoolean = (arg) => arg === true || arg === false;
1967
- var isNull = (arg) => arg === null;
1968
- var isArray3 = (arg) => Array.isArray(arg);
1969
- var isDate = (d) => d instanceof Date;
1970
- var isObjectLike2 = (arg) => {
1971
- if (arg === null)
1972
- return false;
1973
- return typeof arg === "object";
1974
- };
1975
- var isDefined2 = (arg) => {
1976
- return isObject3(arg) || isObjectLike2(arg) || isString2(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
1977
- };
1978
- var isUndefined = (arg) => {
1979
- return arg === void 0;
1980
- };
1981
- var TYPES = {
1982
- boolean: isBoolean,
1983
- array: isArray3,
1984
- object: isObject3,
1985
- string: isString2,
1986
- date: isDate,
1987
- number: isNumber2,
1988
- null: isNull,
1989
- function: isFunction,
1990
- objectLike: isObjectLike2,
1991
- node: import_node.isNode,
1992
- htmlElement: import_node.isHtmlElement,
1993
- defined: isDefined2
1994
- };
1995
- var is = (arg) => {
1996
- return (...args) => {
1997
- return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
1998
- };
1999
- };
2000
- var isNot = (arg) => {
2001
- return (...args) => {
2002
- return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
2003
- };
2004
- };
2005
- }
2006
- });
2007
- var require_array2 = __commonJS2({
2008
- "../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
2009
- "use strict";
2010
- var __defProp22 = Object.defineProperty;
2011
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2012
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
2013
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2014
- var __export22 = (target, all) => {
2015
- for (var name in all)
2016
- __defProp22(target, name, { get: all[name], enumerable: true });
2017
- };
2018
- var __copyProps22 = (to, from, except, desc) => {
2019
- if (from && typeof from === "object" || typeof from === "function") {
2020
- for (let key of __getOwnPropNames22(from))
2021
- if (!__hasOwnProp22.call(to, key) && key !== except)
2022
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1705
+ var require_types2 = __commonJS2({
1706
+ "../../../domql/packages/utils/dist/cjs/types.js"(exports2, module22) {
1707
+ "use strict";
1708
+ var __defProp22 = Object.defineProperty;
1709
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1710
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1711
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1712
+ var __export22 = (target, all) => {
1713
+ for (var name in all)
1714
+ __defProp22(target, name, { get: all[name], enumerable: true });
1715
+ };
1716
+ var __copyProps22 = (to, from, except, desc) => {
1717
+ if (from && typeof from === "object" || typeof from === "function") {
1718
+ for (let key of __getOwnPropNames22(from))
1719
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1720
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1721
+ }
1722
+ return to;
1723
+ };
1724
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1725
+ var types_exports = {};
1726
+ __export22(types_exports, {
1727
+ TYPES: () => TYPES,
1728
+ is: () => is,
1729
+ isArray: () => isArray3,
1730
+ isBoolean: () => isBoolean,
1731
+ isDate: () => isDate,
1732
+ isDefined: () => isDefined2,
1733
+ isFunction: () => isFunction,
1734
+ isNot: () => isNot,
1735
+ isNull: () => isNull,
1736
+ isNumber: () => isNumber2,
1737
+ isObject: () => isObject3,
1738
+ isObjectLike: () => isObjectLike2,
1739
+ isString: () => isString2,
1740
+ isUndefined: () => isUndefined
1741
+ });
1742
+ module22.exports = __toCommonJS22(types_exports);
1743
+ var import_node = require_node2();
1744
+ var isObject3 = (arg) => {
1745
+ if (arg === null)
1746
+ return false;
1747
+ return typeof arg === "object" && arg.constructor === Object;
1748
+ };
1749
+ var isString2 = (arg) => typeof arg === "string";
1750
+ var isNumber2 = (arg) => typeof arg === "number";
1751
+ var isFunction = (arg) => typeof arg === "function";
1752
+ var isBoolean = (arg) => arg === true || arg === false;
1753
+ var isNull = (arg) => arg === null;
1754
+ var isArray3 = (arg) => Array.isArray(arg);
1755
+ var isDate = (d) => d instanceof Date;
1756
+ var isObjectLike2 = (arg) => {
1757
+ if (arg === null)
1758
+ return false;
1759
+ return typeof arg === "object";
1760
+ };
1761
+ var isDefined2 = (arg) => {
1762
+ return isObject3(arg) || isObjectLike2(arg) || isString2(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
1763
+ };
1764
+ var isUndefined = (arg) => {
1765
+ return arg === void 0;
1766
+ };
1767
+ var TYPES = {
1768
+ boolean: isBoolean,
1769
+ array: isArray3,
1770
+ object: isObject3,
1771
+ string: isString2,
1772
+ date: isDate,
1773
+ number: isNumber2,
1774
+ null: isNull,
1775
+ function: isFunction,
1776
+ objectLike: isObjectLike2,
1777
+ node: import_node.isNode,
1778
+ htmlElement: import_node.isHtmlElement,
1779
+ defined: isDefined2
1780
+ };
1781
+ var is = (arg) => {
1782
+ return (...args) => {
1783
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
1784
+ };
1785
+ };
1786
+ var isNot = (arg) => {
1787
+ return (...args) => {
1788
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
1789
+ };
1790
+ };
2023
1791
  }
2024
- return to;
2025
- };
2026
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2027
- var array_exports = {};
2028
- __export22(array_exports, {
2029
- addItemAfterEveryElement: () => addItemAfterEveryElement,
2030
- arrayContainsOtherArray: () => arrayContainsOtherArray,
2031
- arraysEqual: () => arraysEqual,
2032
- createNestedObject: () => createNestedObject,
2033
- cutArrayAfterValue: () => cutArrayAfterValue,
2034
- cutArrayBeforeValue: () => cutArrayBeforeValue,
2035
- getFrequencyInArray: () => getFrequencyInArray,
2036
- joinArrays: () => joinArrays,
2037
- mergeAndCloneIfArray: () => mergeAndCloneIfArray,
2038
- mergeArray: () => mergeArray,
2039
- removeFromArray: () => removeFromArray,
2040
- removeValueFromArray: () => removeValueFromArray,
2041
- removeValueFromArrayAll: () => removeValueFromArrayAll,
2042
- reorderArrayByValues: () => reorderArrayByValues,
2043
- swapItemsInArray: () => swapItemsInArray
2044
1792
  });
2045
- module2.exports = __toCommonJS22(array_exports);
2046
- var import_object = require_object2();
2047
- var import_types = require_types2();
2048
- var arrayContainsOtherArray = (arr1, arr2) => {
2049
- return arr2.every((val) => arr1.includes(val));
2050
- };
2051
- var getFrequencyInArray = (arr, value) => {
2052
- return arr.reduce((count, currentValue) => {
2053
- return currentValue === value ? count + 1 : count;
2054
- }, 0);
2055
- };
2056
- var removeFromArray = (arr, index) => {
2057
- if ((0, import_types.isString)(index))
2058
- index = parseInt(index);
2059
- if ((0, import_types.isNumber)(index)) {
2060
- if (index < 0 || index >= arr.length || isNaN(index)) {
2061
- throw new Error("Invalid index");
2062
- }
2063
- arr.splice(index, 1);
2064
- } else if ((0, import_types.isArray)(index)) {
2065
- index.forEach((idx) => removeFromArray(arr, idx));
2066
- } else {
2067
- throw new Error("Invalid index");
2068
- }
2069
- return arr;
2070
- };
2071
- var swapItemsInArray = (arr, i, j) => {
2072
- [arr[i], arr[j]] = [arr[j], arr[i]];
2073
- };
2074
- var joinArrays = (...arrays) => {
2075
- return [].concat(...arrays);
2076
- };
2077
- var mergeArray = (arr, excludeFrom = []) => {
2078
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
2079
- };
2080
- var mergeAndCloneIfArray = (obj) => {
2081
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
2082
- };
2083
- var cutArrayBeforeValue = (arr, value) => {
2084
- const index = arr.indexOf(value);
2085
- if (index !== -1) {
2086
- return arr.slice(0, index);
1793
+ var require_array2 = __commonJS2({
1794
+ "../../../domql/packages/utils/dist/cjs/array.js"(exports2, module22) {
1795
+ "use strict";
1796
+ var __defProp22 = Object.defineProperty;
1797
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1798
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1799
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1800
+ var __export22 = (target, all) => {
1801
+ for (var name in all)
1802
+ __defProp22(target, name, { get: all[name], enumerable: true });
1803
+ };
1804
+ var __copyProps22 = (to, from, except, desc) => {
1805
+ if (from && typeof from === "object" || typeof from === "function") {
1806
+ for (let key of __getOwnPropNames22(from))
1807
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1808
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1809
+ }
1810
+ return to;
1811
+ };
1812
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1813
+ var array_exports = {};
1814
+ __export22(array_exports, {
1815
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
1816
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
1817
+ arraysEqual: () => arraysEqual,
1818
+ createNestedObject: () => createNestedObject,
1819
+ cutArrayAfterValue: () => cutArrayAfterValue,
1820
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
1821
+ getFrequencyInArray: () => getFrequencyInArray,
1822
+ joinArrays: () => joinArrays,
1823
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
1824
+ mergeArray: () => mergeArray,
1825
+ removeFromArray: () => removeFromArray,
1826
+ removeValueFromArray: () => removeValueFromArray,
1827
+ removeValueFromArrayAll: () => removeValueFromArrayAll,
1828
+ reorderArrayByValues: () => reorderArrayByValues,
1829
+ swapItemsInArray: () => swapItemsInArray
1830
+ });
1831
+ module22.exports = __toCommonJS22(array_exports);
1832
+ var import_object = require_object2();
1833
+ var import_types = require_types2();
1834
+ var arrayContainsOtherArray = (arr1, arr2) => {
1835
+ return arr2.every((val) => arr1.includes(val));
1836
+ };
1837
+ var getFrequencyInArray = (arr, value) => {
1838
+ return arr.reduce((count, currentValue) => {
1839
+ return currentValue === value ? count + 1 : count;
1840
+ }, 0);
1841
+ };
1842
+ var removeFromArray = (arr, index) => {
1843
+ if ((0, import_types.isString)(index))
1844
+ index = parseInt(index);
1845
+ if ((0, import_types.isNumber)(index)) {
1846
+ if (index < 0 || index >= arr.length || isNaN(index)) {
1847
+ throw new Error("Invalid index");
1848
+ }
1849
+ arr.splice(index, 1);
1850
+ } else if ((0, import_types.isArray)(index)) {
1851
+ index.forEach((idx) => removeFromArray(arr, idx));
1852
+ } else {
1853
+ throw new Error("Invalid index");
1854
+ }
1855
+ return arr;
1856
+ };
1857
+ var swapItemsInArray = (arr, i, j) => {
1858
+ [arr[i], arr[j]] = [arr[j], arr[i]];
1859
+ };
1860
+ var joinArrays = (...arrays) => {
1861
+ return [].concat(...arrays);
1862
+ };
1863
+ var mergeArray = (arr, excludeFrom = []) => {
1864
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
1865
+ };
1866
+ var mergeAndCloneIfArray = (obj) => {
1867
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
1868
+ };
1869
+ var cutArrayBeforeValue = (arr, value) => {
1870
+ const index = arr.indexOf(value);
1871
+ if (index !== -1) {
1872
+ return arr.slice(0, index);
1873
+ }
1874
+ return arr;
1875
+ };
1876
+ var cutArrayAfterValue = (arr, value) => {
1877
+ if (!(0, import_types.isArray)(arr))
1878
+ return;
1879
+ const index = arr.indexOf(value);
1880
+ if (index !== -1) {
1881
+ return arr.slice(index + 1);
1882
+ }
1883
+ return arr;
1884
+ };
1885
+ var createNestedObject = (arr, lastValue) => {
1886
+ const nestedObject = {};
1887
+ if (arr.length === 0) {
1888
+ return lastValue;
1889
+ }
1890
+ arr.reduce((obj, value, index) => {
1891
+ if (!obj[value]) {
1892
+ obj[value] = {};
1893
+ }
1894
+ if (index === arr.length - 1 && lastValue) {
1895
+ obj[value] = lastValue;
1896
+ }
1897
+ return obj[value];
1898
+ }, nestedObject);
1899
+ return nestedObject;
1900
+ };
1901
+ var removeValueFromArray = (arr, value) => {
1902
+ const index = arr.indexOf(value);
1903
+ if (index > -1) {
1904
+ const newArray = [...arr];
1905
+ newArray.splice(index, 1);
1906
+ return newArray;
1907
+ }
1908
+ return arr;
1909
+ };
1910
+ var removeValueFromArrayAll = (arr, value) => {
1911
+ return arr.filter((item) => item !== value);
1912
+ };
1913
+ var addItemAfterEveryElement = (array, item) => {
1914
+ const result = [];
1915
+ for (let i = 0; i < array.length; i++) {
1916
+ result.push(array[i]);
1917
+ if (i < array.length - 1) {
1918
+ result.push(item);
1919
+ }
1920
+ }
1921
+ return result;
1922
+ };
1923
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
1924
+ const newArray = [...array];
1925
+ const indexToMove = newArray.indexOf(valueToMove);
1926
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
1927
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
1928
+ const removedItem = newArray.splice(indexToMove, 1)[0];
1929
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
1930
+ newArray.splice(insertIndex, 0, removedItem);
1931
+ }
1932
+ return newArray;
1933
+ };
1934
+ var arraysEqual = (arr1, arr2) => {
1935
+ if (arr1.length !== arr2.length) {
1936
+ return false;
1937
+ }
1938
+ for (let i = 0; i < arr1.length; i++) {
1939
+ if (arr1[i] !== arr2[i]) {
1940
+ return false;
1941
+ }
1942
+ }
1943
+ return true;
1944
+ };
2087
1945
  }
2088
- return arr;
2089
- };
2090
- var cutArrayAfterValue = (arr, value) => {
2091
- if (!(0, import_types.isArray)(arr))
2092
- return;
2093
- const index = arr.indexOf(value);
2094
- if (index !== -1) {
2095
- return arr.slice(index + 1);
2096
- }
2097
- return arr;
2098
- };
2099
- var createNestedObject = (arr, lastValue) => {
2100
- const nestedObject = {};
2101
- if (arr.length === 0) {
2102
- return lastValue;
2103
- }
2104
- arr.reduce((obj, value, index) => {
2105
- if (!obj[value]) {
2106
- obj[value] = {};
2107
- }
2108
- if (index === arr.length - 1 && lastValue) {
2109
- obj[value] = lastValue;
2110
- }
2111
- return obj[value];
2112
- }, nestedObject);
2113
- return nestedObject;
2114
- };
2115
- var removeValueFromArray = (arr, value) => {
2116
- const index = arr.indexOf(value);
2117
- if (index > -1) {
2118
- const newArray = [...arr];
2119
- newArray.splice(index, 1);
2120
- return newArray;
2121
- }
2122
- return arr;
2123
- };
2124
- var removeValueFromArrayAll = (arr, value) => {
2125
- return arr.filter((item) => item !== value);
2126
- };
2127
- var addItemAfterEveryElement = (array, item) => {
2128
- const result = [];
2129
- for (let i = 0; i < array.length; i++) {
2130
- result.push(array[i]);
2131
- if (i < array.length - 1) {
2132
- result.push(item);
2133
- }
2134
- }
2135
- return result;
2136
- };
2137
- var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
2138
- const newArray = [...array];
2139
- const indexToMove = newArray.indexOf(valueToMove);
2140
- const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
2141
- if (indexToMove !== -1 && indexToInsertBefore !== -1) {
2142
- const removedItem = newArray.splice(indexToMove, 1)[0];
2143
- const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
2144
- newArray.splice(insertIndex, 0, removedItem);
2145
- }
2146
- return newArray;
2147
- };
2148
- var arraysEqual = (arr1, arr2) => {
2149
- if (arr1.length !== arr2.length) {
2150
- return false;
2151
- }
2152
- for (let i = 0; i < arr1.length; i++) {
2153
- if (arr1[i] !== arr2[i]) {
2154
- return false;
2155
- }
2156
- }
2157
- return true;
2158
- };
2159
- }
2160
- });
2161
- var require_string2 = __commonJS2({
2162
- "../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
2163
- "use strict";
2164
- var __defProp22 = Object.defineProperty;
2165
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2166
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
2167
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2168
- var __export22 = (target, all) => {
2169
- for (var name in all)
2170
- __defProp22(target, name, { get: all[name], enumerable: true });
2171
- };
2172
- var __copyProps22 = (to, from, except, desc) => {
2173
- if (from && typeof from === "object" || typeof from === "function") {
2174
- for (let key of __getOwnPropNames22(from))
2175
- if (!__hasOwnProp22.call(to, key) && key !== except)
2176
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2177
- }
2178
- return to;
2179
- };
2180
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2181
- var string_exports = {};
2182
- __export22(string_exports, {
2183
- customDecodeURIComponent: () => customDecodeURIComponent,
2184
- customEncodeURIComponent: () => customEncodeURIComponent,
2185
- findKeyPosition: () => findKeyPosition,
2186
- lowercaseFirstLetter: () => lowercaseFirstLetter,
2187
- replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
2188
- replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
2189
- stringIncludesAny: () => stringIncludesAny,
2190
- trimStringFromSymbols: () => trimStringFromSymbols
2191
- });
2192
- module2.exports = __toCommonJS22(string_exports);
2193
- var stringIncludesAny = (str, characters) => {
2194
- for (const char of characters) {
2195
- if (str.includes(char)) {
2196
- return true;
2197
- }
2198
- }
2199
- return false;
2200
- };
2201
- var trimStringFromSymbols = (str, characters) => {
2202
- const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
2203
- return str.replace(pattern, "");
2204
- };
2205
- var brackRegex = {
2206
- 2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
2207
- 3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
2208
- };
2209
- var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
2210
- if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
2211
- return str;
2212
- const reg = brackRegex[options.bracketsLength || 2];
2213
- return str.replace(reg, (_, parentPath, variable) => {
2214
- if (parentPath) {
2215
- const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
2216
- let parentState = state;
2217
- for (let i = 0; i < parentLevels; i++) {
2218
- parentState = parentState.parent;
2219
- if (!parentState) {
2220
- return "";
2221
- }
2222
- }
2223
- const value = parentState[variable.trim()];
2224
- return value !== void 0 ? `${value}` : "";
2225
- } else {
2226
- const value = state[variable.trim()];
2227
- return value !== void 0 ? `${value}` : "";
2228
- }
2229
- });
2230
- };
2231
- var lowercaseFirstLetter = (inputString) => {
2232
- return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
2233
- };
2234
- var findKeyPosition = (str, key) => {
2235
- const lines = str.split("\n");
2236
- let startLineNumber = -1;
2237
- let endLineNumber = -1;
2238
- let startColumn = -1;
2239
- let endColumn = -1;
2240
- const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
2241
- let braceCount = 0;
2242
- let foundKey = false;
2243
- for (let i = 0; i < lines.length; i++) {
2244
- if (keyPattern.test(lines[i]) && !foundKey) {
2245
- foundKey = true;
2246
- startLineNumber = i + 1;
2247
- startColumn = lines[i].indexOf(key) + 1;
2248
- if (lines[i].includes("{}")) {
2249
- endLineNumber = startLineNumber;
2250
- endColumn = lines[i].indexOf("{}") + 3;
2251
- break;
2252
- }
2253
- const line = lines[i].slice(startColumn + key.length);
2254
- if (line.includes("{") || line.includes("[")) {
2255
- braceCount = 1;
2256
- } else {
2257
- endLineNumber = i + 1;
2258
- endColumn = lines[i].length + 1;
2259
- break;
2260
- }
2261
- } else if (foundKey) {
2262
- braceCount += (lines[i].match(/{/g) || []).length;
2263
- braceCount += (lines[i].match(/\[/g) || []).length;
2264
- braceCount -= (lines[i].match(/}/g) || []).length;
2265
- braceCount -= (lines[i].match(/]/g) || []).length;
2266
- if (braceCount === 0) {
2267
- endLineNumber = i + 1;
2268
- endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
2269
- break;
2270
- }
2271
- }
2272
- }
2273
- return {
2274
- startColumn,
2275
- endColumn,
2276
- startLineNumber,
2277
- endLineNumber
2278
- };
2279
- };
2280
- var replaceOctalEscapeSequences = (str) => {
2281
- const octalRegex = /\\([0-7]{1,3})/g;
2282
- return str.replace(octalRegex, (match, p1) => {
2283
- const octalValue = parseInt(p1, 8);
2284
- const char = String.fromCharCode(octalValue);
2285
- return char;
2286
- });
2287
- };
2288
- var customEncodeURIComponent = (str) => {
2289
- return str.split("").map((char) => {
2290
- if (/[^a-zA-Z0-9\s]/.test(char)) {
2291
- return "%" + char.charCodeAt(0).toString(16).toUpperCase();
2292
- }
2293
- return char;
2294
- }).join("");
2295
- };
2296
- var customDecodeURIComponent = (encodedStr) => {
2297
- return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
2298
- };
2299
- }
2300
- });
2301
- var require_object2 = __commonJS2({
2302
- "../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
2303
- "use strict";
2304
- var __defProp22 = Object.defineProperty;
2305
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2306
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
2307
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2308
- var __export22 = (target, all) => {
2309
- for (var name in all)
2310
- __defProp22(target, name, { get: all[name], enumerable: true });
2311
- };
2312
- var __copyProps22 = (to, from, except, desc) => {
2313
- if (from && typeof from === "object" || typeof from === "function") {
2314
- for (let key of __getOwnPropNames22(from))
2315
- if (!__hasOwnProp22.call(to, key) && key !== except)
2316
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2317
- }
2318
- return to;
2319
- };
2320
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2321
- var object_exports = {};
2322
- __export22(object_exports, {
2323
- checkIfKeyIsComponent: () => checkIfKeyIsComponent,
2324
- clone: () => clone,
2325
- createObjectWithoutPrototype: () => createObjectWithoutPrototype,
2326
- deepClone: () => deepClone2,
2327
- deepCloneExclude: () => deepCloneExclude,
2328
- deepCloneWithExtend: () => deepCloneWithExtend,
2329
- deepContains: () => deepContains,
2330
- deepDestringify: () => deepDestringify,
2331
- deepDiff: () => deepDiff,
2332
- deepMerge: () => deepMerge2,
2333
- deepStringify: () => deepStringify,
2334
- detachFunctionsFromObject: () => detachFunctionsFromObject,
2335
- diff: () => diff,
2336
- diffArrays: () => diffArrays,
2337
- diffObjects: () => diffObjects,
2338
- exec: () => exec,
2339
- flattenRecursive: () => flattenRecursive,
2340
- getChildrenComponentsByKey: () => getChildrenComponentsByKey,
2341
- getExtendsInElement: () => getExtendsInElement,
2342
- hasOwnProperty: () => hasOwnProperty,
2343
- isEmpty: () => isEmpty,
2344
- isEmptyObject: () => isEmptyObject,
2345
- isEqualDeep: () => isEqualDeep,
2346
- makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
2347
- map: () => map,
2348
- merge: () => merge,
2349
- mergeArrayExclude: () => mergeArrayExclude,
2350
- mergeIfExisted: () => mergeIfExisted,
2351
- objectToString: () => objectToString,
2352
- overwrite: () => overwrite,
2353
- overwriteDeep: () => overwriteDeep,
2354
- overwriteShallow: () => overwriteShallow,
2355
- removeFromObject: () => removeFromObject,
2356
- stringToObject: () => stringToObject
2357
- });
2358
- module2.exports = __toCommonJS22(object_exports);
2359
- var import_globals = require_globals2();
2360
- var import_types = require_types2();
2361
- var import_array = require_array2();
2362
- var import_string = require_string2();
2363
- var exec = (param, element, state, context) => {
2364
- if ((0, import_types.isFunction)(param)) {
2365
- return param(
2366
- element,
2367
- state || element.state,
2368
- context || element.context
2369
- );
2370
- }
2371
- return param;
2372
- };
2373
- var map = (obj, extention, element) => {
2374
- for (const e in extention) {
2375
- obj[e] = exec(extention[e], element);
2376
- }
2377
- };
2378
- var merge = (element, obj, excludeFrom = []) => {
2379
- for (const e in obj) {
2380
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
2381
- if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
2382
- continue;
2383
- const elementProp = element[e];
2384
- const objProp = obj[e];
2385
- if (elementProp === void 0) {
2386
- element[e] = objProp;
2387
- }
2388
- }
2389
- return element;
2390
- };
2391
- var deepMerge2 = (element, extend, excludeFrom = []) => {
2392
- for (const e in extend) {
2393
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
2394
- if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
2395
- continue;
2396
- const elementProp = element[e];
2397
- const extendProp = extend[e];
2398
- if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
2399
- deepMerge2(elementProp, extendProp, excludeFrom);
2400
- } else if (elementProp === void 0) {
2401
- element[e] = extendProp;
2402
- }
2403
- }
2404
- return element;
2405
- };
2406
- var clone = (obj, excludeFrom = []) => {
2407
- const o = {};
2408
- for (const prop in obj) {
2409
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2410
- if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
2411
- continue;
2412
- o[prop] = obj[prop];
2413
- }
2414
- return o;
2415
- };
2416
- var deepCloneExclude = (obj, excludeFrom = []) => {
2417
- if ((0, import_types.isArray)(obj)) {
2418
- return obj.map((x) => deepCloneExclude(x, excludeFrom));
2419
- }
2420
- const o = {};
2421
- for (const k in obj) {
2422
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
2423
- if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
2424
- continue;
2425
- let v = obj[k];
2426
- if (k === "extend" && (0, import_types.isArray)(v)) {
2427
- v = mergeArrayExclude(v, excludeFrom);
2428
- }
2429
- if ((0, import_types.isArray)(v)) {
2430
- o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
2431
- } else if ((0, import_types.isObject)(v)) {
2432
- o[k] = deepCloneExclude(v, excludeFrom);
2433
- } else
2434
- o[k] = v;
2435
- }
2436
- return o;
2437
- };
2438
- var mergeArrayExclude = (arr, excl = []) => {
2439
- return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
2440
- };
2441
- var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
2442
- const o = (0, import_types.isArray)(obj) ? [] : {};
2443
- for (const prop in obj) {
2444
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
2445
- continue;
2446
- if (prop === "__proto__")
2447
- continue;
2448
- if (excludeFrom.includes(prop) || prop.startsWith("__"))
2449
- continue;
2450
- let objProp = obj[prop];
2451
- if (cleanUndefined && (0, import_types.isUndefined)(objProp))
2452
- continue;
2453
- if (prop === "extend" && (0, import_types.isArray)(objProp)) {
2454
- objProp = (0, import_array.mergeArray)(objProp);
2455
- }
2456
- if ((0, import_types.isObjectLike)(objProp)) {
2457
- o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
2458
- } else
2459
- o[prop] = objProp;
2460
- }
2461
- return o;
2462
- };
2463
- var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
2464
- const o = (0, import_types.isArray)(obj) ? [] : {};
2465
- for (const prop in obj) {
2466
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
2467
- continue;
2468
- const objProp = obj[prop];
2469
- if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
2470
- continue;
2471
- if ((0, import_types.isObjectLike)(objProp)) {
2472
- o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
2473
- } else
2474
- o[prop] = objProp;
2475
- }
2476
- return o;
2477
- };
2478
- var deepStringify = (obj, stringified = {}) => {
2479
- for (const prop in obj) {
2480
- const objProp = obj[prop];
2481
- if ((0, import_types.isFunction)(objProp)) {
2482
- stringified[prop] = objProp.toString();
2483
- } else if ((0, import_types.isObject)(objProp)) {
2484
- stringified[prop] = {};
2485
- deepStringify(objProp, stringified[prop]);
2486
- } else if ((0, import_types.isArray)(objProp)) {
2487
- stringified[prop] = [];
2488
- objProp.forEach((v, i) => {
2489
- if ((0, import_types.isObject)(v)) {
2490
- stringified[prop][i] = {};
2491
- deepStringify(v, stringified[prop][i]);
2492
- } else if ((0, import_types.isFunction)(v)) {
2493
- stringified[prop][i] = v.toString();
2494
- } else {
2495
- stringified[prop][i] = v;
2496
- }
2497
- });
2498
- } else {
2499
- stringified[prop] = objProp;
2500
- }
2501
- }
2502
- return stringified;
2503
- };
2504
- var objectToString = (obj = {}, indent = 0) => {
2505
- const spaces = " ".repeat(indent);
2506
- let str = "{\n";
2507
- for (const [key, value] of Object.entries(obj)) {
2508
- const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
2509
- const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
2510
- str += `${spaces} ${stringedKey}: `;
2511
- if ((0, import_types.isArray)(value)) {
2512
- str += "[\n";
2513
- for (const element of value) {
2514
- if ((0, import_types.isObject)(element) && element !== null) {
2515
- str += `${spaces} ${objectToString(element, indent + 2)},
2516
- `;
2517
- } else if ((0, import_types.isString)(element)) {
2518
- str += `${spaces} '${element}',
2519
- `;
2520
- } else {
2521
- str += `${spaces} ${element},
2522
- `;
2523
- }
2524
- }
2525
- str += `${spaces} ]`;
2526
- } else if ((0, import_types.isObjectLike)(value)) {
2527
- str += objectToString(value, indent + 1);
2528
- } else if ((0, import_types.isString)(value)) {
2529
- str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
2530
- } else {
2531
- str += value;
2532
- }
2533
- str += ",\n";
2534
- }
2535
- str += `${spaces}}`;
2536
- return str;
2537
- };
2538
- var detachFunctionsFromObject = (obj, detached = {}) => {
2539
- for (const prop in obj) {
2540
- const objProp = obj[prop];
2541
- if ((0, import_types.isFunction)(objProp))
2542
- continue;
2543
- else if ((0, import_types.isObject)(objProp)) {
2544
- detached[prop] = {};
2545
- deepStringify(objProp, detached[prop]);
2546
- } else if ((0, import_types.isArray)(objProp)) {
2547
- detached[prop] = [];
2548
- objProp.forEach((v, i) => {
2549
- if ((0, import_types.isFunction)(v))
2550
- return;
2551
- if ((0, import_types.isObject)(v)) {
2552
- detached[prop][i] = {};
2553
- detachFunctionsFromObject(v, detached[prop][i]);
2554
- } else {
2555
- detached[prop][i] = v;
2556
- }
2557
- });
2558
- } else {
2559
- detached[prop] = objProp;
2560
- }
2561
- }
2562
- return detached;
2563
- };
2564
- var deepDestringify = (obj, destringified = {}) => {
2565
- for (const prop in obj) {
2566
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2567
- if (!hasOwnProperty2)
2568
- continue;
2569
- const objProp = obj[prop];
2570
- if ((0, import_types.isString)(objProp)) {
2571
- if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2572
- try {
2573
- const evalProp = import_globals.window.eval(`(${objProp})`);
2574
- destringified[prop] = evalProp;
2575
- } catch (e) {
2576
- if (e)
2577
- destringified[prop] = objProp;
2578
- }
2579
- } else {
2580
- destringified[prop] = objProp;
1946
+ });
1947
+ var require_string2 = __commonJS2({
1948
+ "../../../domql/packages/utils/dist/cjs/string.js"(exports2, module22) {
1949
+ "use strict";
1950
+ var __defProp22 = Object.defineProperty;
1951
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1952
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1953
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1954
+ var __export22 = (target, all) => {
1955
+ for (var name in all)
1956
+ __defProp22(target, name, { get: all[name], enumerable: true });
1957
+ };
1958
+ var __copyProps22 = (to, from, except, desc) => {
1959
+ if (from && typeof from === "object" || typeof from === "function") {
1960
+ for (let key of __getOwnPropNames22(from))
1961
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1962
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2581
1963
  }
2582
- } else if ((0, import_types.isArray)(objProp)) {
2583
- destringified[prop] = [];
2584
- objProp.forEach((arrProp) => {
2585
- if ((0, import_types.isString)(arrProp)) {
2586
- if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
2587
- try {
2588
- const evalProp = import_globals.window.eval(`(${arrProp})`);
2589
- destringified[prop].push(evalProp);
2590
- } catch (e) {
2591
- if (e)
2592
- destringified[prop].push(arrProp);
2593
- }
2594
- } else {
2595
- destringified[prop].push(arrProp);
2596
- }
2597
- } else if ((0, import_types.isObject)(arrProp)) {
2598
- destringified[prop].push(deepDestringify(arrProp));
2599
- } else {
2600
- destringified[prop].push(arrProp);
1964
+ return to;
1965
+ };
1966
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1967
+ var string_exports = {};
1968
+ __export22(string_exports, {
1969
+ customDecodeURIComponent: () => customDecodeURIComponent,
1970
+ customEncodeURIComponent: () => customEncodeURIComponent,
1971
+ findKeyPosition: () => findKeyPosition,
1972
+ lowercaseFirstLetter: () => lowercaseFirstLetter,
1973
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
1974
+ replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
1975
+ stringIncludesAny: () => stringIncludesAny,
1976
+ trimStringFromSymbols: () => trimStringFromSymbols
1977
+ });
1978
+ module22.exports = __toCommonJS22(string_exports);
1979
+ var stringIncludesAny = (str, characters) => {
1980
+ for (const char of characters) {
1981
+ if (str.includes(char)) {
1982
+ return true;
2601
1983
  }
2602
- });
2603
- } else if ((0, import_types.isObject)(objProp)) {
2604
- destringified[prop] = deepDestringify(objProp, destringified[prop]);
2605
- } else {
2606
- destringified[prop] = objProp;
2607
- }
2608
- }
2609
- return destringified;
2610
- };
2611
- var stringToObject = (str, opts = { verbose: true }) => {
2612
- try {
2613
- return import_globals.window.eval("(" + str + ")");
2614
- } catch (e) {
2615
- if (opts.verbose)
2616
- console.warn(e);
2617
- }
2618
- };
2619
- var diffObjects = (original, objToDiff, cache) => {
2620
- for (const e in objToDiff) {
2621
- if (e === "ref")
2622
- continue;
2623
- const originalProp = original[e];
2624
- const objToDiffProp = objToDiff[e];
2625
- if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
2626
- cache[e] = {};
2627
- diff(originalProp, objToDiffProp, cache[e]);
2628
- } else if (objToDiffProp !== void 0) {
2629
- cache[e] = objToDiffProp;
2630
- }
2631
- }
2632
- return cache;
2633
- };
2634
- var diffArrays = (original, objToDiff, cache) => {
2635
- if (original.length !== objToDiff.length) {
2636
- cache = objToDiff;
2637
- } else {
2638
- const diffArr = [];
2639
- for (let i = 0; i < original.length; i++) {
2640
- const diffObj = diff(original[i], objToDiff[i]);
2641
- if (Object.keys(diffObj).length > 0) {
2642
- diffArr.push(diffObj);
2643
1984
  }
2644
- }
2645
- if (diffArr.length > 0) {
2646
- cache = diffArr;
2647
- }
2648
- }
2649
- return cache;
2650
- };
2651
- var diff = (original, objToDiff, cache = {}) => {
2652
- if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
2653
- cache = [];
2654
- diffArrays(original, objToDiff, cache);
2655
- } else {
2656
- diffObjects(original, objToDiff, cache);
2657
- }
2658
- return cache;
2659
- };
2660
- var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
2661
- var isEmpty = (o) => Object.keys(o).length === 0;
2662
- var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
2663
- var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
2664
- var deepDiff = (lhs, rhs) => {
2665
- if (lhs === rhs)
2666
- return {};
2667
- if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
2668
- return rhs;
2669
- const deletedValues = Object.keys(lhs).reduce((acc, key) => {
2670
- if (!hasOwnProperty(rhs, key)) {
2671
- acc[key] = void 0;
2672
- }
2673
- return acc;
2674
- }, makeObjectWithoutPrototype());
2675
- if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
2676
- if (lhs.valueOf() === rhs.valueOf())
2677
- return {};
2678
- return rhs;
2679
- }
2680
- return Object.keys(rhs).reduce((acc, key) => {
2681
- if (!hasOwnProperty(lhs, key)) {
2682
- acc[key] = rhs[key];
2683
- return acc;
2684
- }
2685
- const difference = diff(lhs[key], rhs[key]);
2686
- if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
2687
- return acc;
2688
- }
2689
- acc[key] = difference;
2690
- return acc;
2691
- }, deletedValues);
2692
- };
2693
- var overwrite = (element, params, excludeFrom = []) => {
2694
- const { ref } = element;
2695
- const changes = {};
2696
- for (const e in params) {
2697
- if (excludeFrom.includes(e) || e.startsWith("__"))
2698
- continue;
2699
- const elementProp = element[e];
2700
- const paramsProp = params[e];
2701
- if (paramsProp) {
2702
- ref.__cache[e] = changes[e] = elementProp;
2703
- ref[e] = paramsProp;
2704
- }
2705
- }
2706
- return changes;
2707
- };
2708
- var overwriteShallow = (obj, params, excludeFrom = []) => {
2709
- for (const e in params) {
2710
- if (excludeFrom.includes(e) || e.startsWith("__"))
2711
- continue;
2712
- obj[e] = params[e];
2713
- }
2714
- return obj;
2715
- };
2716
- var overwriteDeep = (obj, params, excludeFrom = []) => {
2717
- for (const e in params) {
2718
- if (e === "__proto__")
2719
- continue;
2720
- if (excludeFrom.includes(e) || e.startsWith("__"))
2721
- continue;
2722
- const objProp = obj[e];
2723
- const paramsProp = params[e];
2724
- if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
2725
- overwriteDeep(objProp, paramsProp);
2726
- } else if (paramsProp !== void 0) {
2727
- obj[e] = paramsProp;
2728
- }
2729
- }
2730
- return obj;
2731
- };
2732
- var mergeIfExisted = (a, b) => {
2733
- if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
2734
- return deepMerge2(a, b);
2735
- return a || b;
2736
- };
2737
- var flattenRecursive = (param, prop, stack = []) => {
2738
- const objectized = (0, import_array.mergeAndCloneIfArray)(param);
2739
- stack.push(objectized);
2740
- const extendOfExtend = objectized[prop];
2741
- if (extendOfExtend)
2742
- flattenRecursive(extendOfExtend, prop, stack);
2743
- delete objectized[prop];
2744
- return stack;
2745
- };
2746
- var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
2747
- if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
2748
- return param === element;
2749
- }
2750
- if (visited.has(param) || visited.has(element)) {
2751
- return true;
2752
- }
2753
- visited.add(param);
2754
- visited.add(element);
2755
- const keysParam = Object.keys(param);
2756
- const keysElement = Object.keys(element);
2757
- if (keysParam.length !== keysElement.length) {
2758
- return false;
2759
- }
2760
- for (const key of keysParam) {
2761
- if (!keysElement.includes(key)) {
2762
1985
  return false;
2763
- }
2764
- const paramProp = param[key];
2765
- const elementProp = element[key];
2766
- if (!isEqualDeep(paramProp, elementProp, visited)) {
2767
- return false;
2768
- }
2769
- }
2770
- return true;
2771
- };
2772
- var deepContains = (obj1, obj2) => {
2773
- if (typeof obj1 !== typeof obj2) {
2774
- return false;
1986
+ };
1987
+ var trimStringFromSymbols = (str, characters) => {
1988
+ const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
1989
+ return str.replace(pattern, "");
1990
+ };
1991
+ var brackRegex = {
1992
+ 2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
1993
+ 3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
1994
+ };
1995
+ var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
1996
+ if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
1997
+ return str;
1998
+ const reg = brackRegex[options.bracketsLength || 2];
1999
+ return str.replace(reg, (_, parentPath, variable) => {
2000
+ if (parentPath) {
2001
+ const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
2002
+ let parentState = state;
2003
+ for (let i = 0; i < parentLevels; i++) {
2004
+ parentState = parentState.parent;
2005
+ if (!parentState) {
2006
+ return "";
2007
+ }
2008
+ }
2009
+ const value = parentState[variable.trim()];
2010
+ return value !== void 0 ? `${value}` : "";
2011
+ } else {
2012
+ const value = state[variable.trim()];
2013
+ return value !== void 0 ? `${value}` : "";
2014
+ }
2015
+ });
2016
+ };
2017
+ var lowercaseFirstLetter = (inputString) => {
2018
+ return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
2019
+ };
2020
+ var findKeyPosition = (str, key) => {
2021
+ const lines = str.split("\n");
2022
+ let startLineNumber = -1;
2023
+ let endLineNumber = -1;
2024
+ let startColumn = -1;
2025
+ let endColumn = -1;
2026
+ const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
2027
+ let braceCount = 0;
2028
+ let foundKey = false;
2029
+ for (let i = 0; i < lines.length; i++) {
2030
+ if (keyPattern.test(lines[i]) && !foundKey) {
2031
+ foundKey = true;
2032
+ startLineNumber = i + 1;
2033
+ startColumn = lines[i].indexOf(key) + 1;
2034
+ if (lines[i].includes("{}")) {
2035
+ endLineNumber = startLineNumber;
2036
+ endColumn = lines[i].indexOf("{}") + 3;
2037
+ break;
2038
+ }
2039
+ const line = lines[i].slice(startColumn + key.length);
2040
+ if (line.includes("{") || line.includes("[")) {
2041
+ braceCount = 1;
2042
+ } else {
2043
+ endLineNumber = i + 1;
2044
+ endColumn = lines[i].length + 1;
2045
+ break;
2046
+ }
2047
+ } else if (foundKey) {
2048
+ braceCount += (lines[i].match(/{/g) || []).length;
2049
+ braceCount += (lines[i].match(/\[/g) || []).length;
2050
+ braceCount -= (lines[i].match(/}/g) || []).length;
2051
+ braceCount -= (lines[i].match(/]/g) || []).length;
2052
+ if (braceCount === 0) {
2053
+ endLineNumber = i + 1;
2054
+ endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
2055
+ break;
2056
+ }
2057
+ }
2058
+ }
2059
+ return {
2060
+ startColumn,
2061
+ endColumn,
2062
+ startLineNumber,
2063
+ endLineNumber
2064
+ };
2065
+ };
2066
+ var replaceOctalEscapeSequences = (str) => {
2067
+ const octalRegex = /\\([0-7]{1,3})/g;
2068
+ return str.replace(octalRegex, (match, p1) => {
2069
+ const octalValue = parseInt(p1, 8);
2070
+ const char = String.fromCharCode(octalValue);
2071
+ return char;
2072
+ });
2073
+ };
2074
+ var customEncodeURIComponent = (str) => {
2075
+ return str.split("").map((char) => {
2076
+ if (/[^a-zA-Z0-9\s]/.test(char)) {
2077
+ return "%" + char.charCodeAt(0).toString(16).toUpperCase();
2078
+ }
2079
+ return char;
2080
+ }).join("");
2081
+ };
2082
+ var customDecodeURIComponent = (encodedStr) => {
2083
+ return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
2084
+ };
2775
2085
  }
2776
- if ((0, import_types.isObjectLike)(obj1)) {
2777
- if (Array.isArray(obj1) && Array.isArray(obj2)) {
2778
- if (obj1.length !== obj2.length) {
2086
+ });
2087
+ var require_object2 = __commonJS2({
2088
+ "../../../domql/packages/utils/dist/cjs/object.js"(exports2, module22) {
2089
+ "use strict";
2090
+ var __defProp22 = Object.defineProperty;
2091
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2092
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2093
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2094
+ var __export22 = (target, all) => {
2095
+ for (var name in all)
2096
+ __defProp22(target, name, { get: all[name], enumerable: true });
2097
+ };
2098
+ var __copyProps22 = (to, from, except, desc) => {
2099
+ if (from && typeof from === "object" || typeof from === "function") {
2100
+ for (let key of __getOwnPropNames22(from))
2101
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2102
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2103
+ }
2104
+ return to;
2105
+ };
2106
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2107
+ var object_exports = {};
2108
+ __export22(object_exports, {
2109
+ checkIfKeyIsComponent: () => checkIfKeyIsComponent,
2110
+ clone: () => clone,
2111
+ createObjectWithoutPrototype: () => createObjectWithoutPrototype,
2112
+ deepClone: () => deepClone2,
2113
+ deepCloneExclude: () => deepCloneExclude,
2114
+ deepCloneWithExtend: () => deepCloneWithExtend,
2115
+ deepContains: () => deepContains,
2116
+ deepDestringify: () => deepDestringify,
2117
+ deepDiff: () => deepDiff,
2118
+ deepMerge: () => deepMerge2,
2119
+ deepStringify: () => deepStringify,
2120
+ detachFunctionsFromObject: () => detachFunctionsFromObject,
2121
+ diff: () => diff,
2122
+ diffArrays: () => diffArrays,
2123
+ diffObjects: () => diffObjects,
2124
+ exec: () => exec,
2125
+ flattenRecursive: () => flattenRecursive,
2126
+ getChildrenComponentsByKey: () => getChildrenComponentsByKey,
2127
+ getExtendsInElement: () => getExtendsInElement,
2128
+ hasOwnProperty: () => hasOwnProperty,
2129
+ isEmpty: () => isEmpty,
2130
+ isEmptyObject: () => isEmptyObject,
2131
+ isEqualDeep: () => isEqualDeep,
2132
+ makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
2133
+ map: () => map,
2134
+ merge: () => merge,
2135
+ mergeArrayExclude: () => mergeArrayExclude,
2136
+ mergeIfExisted: () => mergeIfExisted,
2137
+ objectToString: () => objectToString,
2138
+ overwrite: () => overwrite,
2139
+ overwriteDeep: () => overwriteDeep,
2140
+ overwriteShallow: () => overwriteShallow,
2141
+ removeFromObject: () => removeFromObject,
2142
+ stringToObject: () => stringToObject
2143
+ });
2144
+ module22.exports = __toCommonJS22(object_exports);
2145
+ var import_globals = require_globals2();
2146
+ var import_types = require_types2();
2147
+ var import_array = require_array2();
2148
+ var import_string = require_string2();
2149
+ var exec = (param, element, state, context) => {
2150
+ if ((0, import_types.isFunction)(param)) {
2151
+ return param(
2152
+ element,
2153
+ state || element.state,
2154
+ context || element.context
2155
+ );
2156
+ }
2157
+ return param;
2158
+ };
2159
+ var map = (obj, extention, element) => {
2160
+ for (const e in extention) {
2161
+ obj[e] = exec(extention[e], element);
2162
+ }
2163
+ };
2164
+ var merge = (element, obj, excludeFrom = []) => {
2165
+ for (const e in obj) {
2166
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
2167
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
2168
+ continue;
2169
+ const elementProp = element[e];
2170
+ const objProp = obj[e];
2171
+ if (elementProp === void 0) {
2172
+ element[e] = objProp;
2173
+ }
2174
+ }
2175
+ return element;
2176
+ };
2177
+ var deepMerge2 = (element, extend, excludeFrom = []) => {
2178
+ for (const e in extend) {
2179
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
2180
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
2181
+ continue;
2182
+ const elementProp = element[e];
2183
+ const extendProp = extend[e];
2184
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
2185
+ deepMerge2(elementProp, extendProp, excludeFrom);
2186
+ } else if (elementProp === void 0) {
2187
+ element[e] = extendProp;
2188
+ }
2189
+ }
2190
+ return element;
2191
+ };
2192
+ var clone = (obj, excludeFrom = []) => {
2193
+ const o = {};
2194
+ for (const prop in obj) {
2195
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2196
+ if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
2197
+ continue;
2198
+ o[prop] = obj[prop];
2199
+ }
2200
+ return o;
2201
+ };
2202
+ var deepCloneExclude = (obj, excludeFrom = []) => {
2203
+ if ((0, import_types.isArray)(obj)) {
2204
+ return obj.map((x) => deepCloneExclude(x, excludeFrom));
2205
+ }
2206
+ const o = {};
2207
+ for (const k in obj) {
2208
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
2209
+ if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
2210
+ continue;
2211
+ let v = obj[k];
2212
+ if (k === "extend" && (0, import_types.isArray)(v)) {
2213
+ v = mergeArrayExclude(v, excludeFrom);
2214
+ }
2215
+ if ((0, import_types.isArray)(v)) {
2216
+ o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
2217
+ } else if ((0, import_types.isObject)(v)) {
2218
+ o[k] = deepCloneExclude(v, excludeFrom);
2219
+ } else
2220
+ o[k] = v;
2221
+ }
2222
+ return o;
2223
+ };
2224
+ var mergeArrayExclude = (arr, excl = []) => {
2225
+ return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
2226
+ };
2227
+ var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
2228
+ const o = (0, import_types.isArray)(obj) ? [] : {};
2229
+ for (const prop in obj) {
2230
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
2231
+ continue;
2232
+ if (prop === "__proto__")
2233
+ continue;
2234
+ if (excludeFrom.includes(prop) || prop.startsWith("__"))
2235
+ continue;
2236
+ let objProp = obj[prop];
2237
+ if (cleanUndefined && (0, import_types.isUndefined)(objProp))
2238
+ continue;
2239
+ if (prop === "extend" && (0, import_types.isArray)(objProp)) {
2240
+ objProp = (0, import_array.mergeArray)(objProp);
2241
+ }
2242
+ if ((0, import_types.isObjectLike)(objProp)) {
2243
+ o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
2244
+ } else
2245
+ o[prop] = objProp;
2246
+ }
2247
+ return o;
2248
+ };
2249
+ var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
2250
+ const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
2251
+ for (const prop in obj) {
2252
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
2253
+ continue;
2254
+ const objProp = obj[prop];
2255
+ if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
2256
+ continue;
2257
+ if ((0, import_types.isObjectLike)(objProp)) {
2258
+ o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
2259
+ } else
2260
+ o[prop] = objProp;
2261
+ }
2262
+ return o;
2263
+ };
2264
+ var deepStringify = (obj, stringified = {}) => {
2265
+ for (const prop in obj) {
2266
+ const objProp = obj[prop];
2267
+ if ((0, import_types.isFunction)(objProp)) {
2268
+ stringified[prop] = objProp.toString();
2269
+ } else if ((0, import_types.isObject)(objProp)) {
2270
+ stringified[prop] = {};
2271
+ deepStringify(objProp, stringified[prop]);
2272
+ } else if ((0, import_types.isArray)(objProp)) {
2273
+ stringified[prop] = [];
2274
+ objProp.forEach((v, i) => {
2275
+ if ((0, import_types.isObject)(v)) {
2276
+ stringified[prop][i] = {};
2277
+ deepStringify(v, stringified[prop][i]);
2278
+ } else if ((0, import_types.isFunction)(v)) {
2279
+ stringified[prop][i] = v.toString();
2280
+ } else {
2281
+ stringified[prop][i] = v;
2282
+ }
2283
+ });
2284
+ } else {
2285
+ stringified[prop] = objProp;
2286
+ }
2287
+ }
2288
+ return stringified;
2289
+ };
2290
+ var objectToString = (obj = {}, indent = 0) => {
2291
+ const spaces = " ".repeat(indent);
2292
+ let str = "{\n";
2293
+ for (const [key, value] of Object.entries(obj)) {
2294
+ const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
2295
+ const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
2296
+ str += `${spaces} ${stringedKey}: `;
2297
+ if ((0, import_types.isArray)(value)) {
2298
+ str += "[\n";
2299
+ for (const element of value) {
2300
+ if ((0, import_types.isObject)(element) && element !== null) {
2301
+ str += `${spaces} ${objectToString(element, indent + 2)},
2302
+ `;
2303
+ } else if ((0, import_types.isString)(element)) {
2304
+ str += `${spaces} '${element}',
2305
+ `;
2306
+ } else {
2307
+ str += `${spaces} ${element},
2308
+ `;
2309
+ }
2310
+ }
2311
+ str += `${spaces} ]`;
2312
+ } else if ((0, import_types.isObjectLike)(value)) {
2313
+ str += objectToString(value, indent + 1);
2314
+ } else if ((0, import_types.isString)(value)) {
2315
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
2316
+ } else {
2317
+ str += value;
2318
+ }
2319
+ str += ",\n";
2320
+ }
2321
+ str += `${spaces}}`;
2322
+ return str;
2323
+ };
2324
+ var detachFunctionsFromObject = (obj, detached = {}) => {
2325
+ for (const prop in obj) {
2326
+ const objProp = obj[prop];
2327
+ if ((0, import_types.isFunction)(objProp))
2328
+ continue;
2329
+ else if ((0, import_types.isObject)(objProp)) {
2330
+ detached[prop] = {};
2331
+ deepStringify(objProp, detached[prop]);
2332
+ } else if ((0, import_types.isArray)(objProp)) {
2333
+ detached[prop] = [];
2334
+ objProp.forEach((v, i) => {
2335
+ if ((0, import_types.isFunction)(v))
2336
+ return;
2337
+ if ((0, import_types.isObject)(v)) {
2338
+ detached[prop][i] = {};
2339
+ detachFunctionsFromObject(v, detached[prop][i]);
2340
+ } else {
2341
+ detached[prop][i] = v;
2342
+ }
2343
+ });
2344
+ } else {
2345
+ detached[prop] = objProp;
2346
+ }
2347
+ }
2348
+ return detached;
2349
+ };
2350
+ var deepDestringify = (obj, destringified = {}) => {
2351
+ for (const prop in obj) {
2352
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2353
+ if (!hasOwnProperty2)
2354
+ continue;
2355
+ const objProp = obj[prop];
2356
+ if ((0, import_types.isString)(objProp)) {
2357
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2358
+ try {
2359
+ const evalProp = import_globals.window.eval(`(${objProp})`);
2360
+ destringified[prop] = evalProp;
2361
+ } catch (e) {
2362
+ if (e)
2363
+ destringified[prop] = objProp;
2364
+ }
2365
+ } else {
2366
+ destringified[prop] = objProp;
2367
+ }
2368
+ } else if ((0, import_types.isArray)(objProp)) {
2369
+ destringified[prop] = [];
2370
+ objProp.forEach((arrProp) => {
2371
+ if ((0, import_types.isString)(arrProp)) {
2372
+ if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
2373
+ try {
2374
+ const evalProp = import_globals.window.eval(`(${arrProp})`);
2375
+ destringified[prop].push(evalProp);
2376
+ } catch (e) {
2377
+ if (e)
2378
+ destringified[prop].push(arrProp);
2379
+ }
2380
+ } else {
2381
+ destringified[prop].push(arrProp);
2382
+ }
2383
+ } else if ((0, import_types.isObject)(arrProp)) {
2384
+ destringified[prop].push(deepDestringify(arrProp));
2385
+ } else {
2386
+ destringified[prop].push(arrProp);
2387
+ }
2388
+ });
2389
+ } else if ((0, import_types.isObject)(objProp)) {
2390
+ destringified[prop] = deepDestringify(objProp, destringified[prop]);
2391
+ } else {
2392
+ destringified[prop] = objProp;
2393
+ }
2394
+ }
2395
+ return destringified;
2396
+ };
2397
+ var stringToObject = (str, opts = { verbose: true }) => {
2398
+ try {
2399
+ return import_globals.window.eval("(" + str + ")");
2400
+ } catch (e) {
2401
+ if (opts.verbose)
2402
+ console.warn(e);
2403
+ }
2404
+ };
2405
+ var diffObjects = (original, objToDiff, cache) => {
2406
+ for (const e in objToDiff) {
2407
+ if (e === "ref")
2408
+ continue;
2409
+ const originalProp = original[e];
2410
+ const objToDiffProp = objToDiff[e];
2411
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
2412
+ cache[e] = {};
2413
+ diff(originalProp, objToDiffProp, cache[e]);
2414
+ } else if (objToDiffProp !== void 0) {
2415
+ cache[e] = objToDiffProp;
2416
+ }
2417
+ }
2418
+ return cache;
2419
+ };
2420
+ var diffArrays = (original, objToDiff, cache) => {
2421
+ if (original.length !== objToDiff.length) {
2422
+ cache = objToDiff;
2423
+ } else {
2424
+ const diffArr = [];
2425
+ for (let i = 0; i < original.length; i++) {
2426
+ const diffObj = diff(original[i], objToDiff[i]);
2427
+ if (Object.keys(diffObj).length > 0) {
2428
+ diffArr.push(diffObj);
2429
+ }
2430
+ }
2431
+ if (diffArr.length > 0) {
2432
+ cache = diffArr;
2433
+ }
2434
+ }
2435
+ return cache;
2436
+ };
2437
+ var diff = (original, objToDiff, cache = {}) => {
2438
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
2439
+ cache = [];
2440
+ diffArrays(original, objToDiff, cache);
2441
+ } else {
2442
+ diffObjects(original, objToDiff, cache);
2443
+ }
2444
+ return cache;
2445
+ };
2446
+ var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
2447
+ var isEmpty = (o) => Object.keys(o).length === 0;
2448
+ var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
2449
+ var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
2450
+ var deepDiff = (lhs, rhs) => {
2451
+ if (lhs === rhs)
2452
+ return {};
2453
+ if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
2454
+ return rhs;
2455
+ const deletedValues = Object.keys(lhs).reduce((acc, key) => {
2456
+ if (!hasOwnProperty(rhs, key)) {
2457
+ acc[key] = void 0;
2458
+ }
2459
+ return acc;
2460
+ }, makeObjectWithoutPrototype());
2461
+ if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
2462
+ if (lhs.valueOf() === rhs.valueOf())
2463
+ return {};
2464
+ return rhs;
2465
+ }
2466
+ return Object.keys(rhs).reduce((acc, key) => {
2467
+ if (!hasOwnProperty(lhs, key)) {
2468
+ acc[key] = rhs[key];
2469
+ return acc;
2470
+ }
2471
+ const difference = diff(lhs[key], rhs[key]);
2472
+ if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
2473
+ return acc;
2474
+ }
2475
+ acc[key] = difference;
2476
+ return acc;
2477
+ }, deletedValues);
2478
+ };
2479
+ var overwrite = (element, params, excludeFrom = []) => {
2480
+ const { ref } = element;
2481
+ const changes = {};
2482
+ for (const e in params) {
2483
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2484
+ continue;
2485
+ const elementProp = element[e];
2486
+ const paramsProp = params[e];
2487
+ if (paramsProp) {
2488
+ ref.__cache[e] = changes[e] = elementProp;
2489
+ ref[e] = paramsProp;
2490
+ }
2491
+ }
2492
+ return changes;
2493
+ };
2494
+ var overwriteShallow = (obj, params, excludeFrom = []) => {
2495
+ for (const e in params) {
2496
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2497
+ continue;
2498
+ obj[e] = params[e];
2499
+ }
2500
+ return obj;
2501
+ };
2502
+ var overwriteDeep = (obj, params, excludeFrom = []) => {
2503
+ for (const e in params) {
2504
+ if (e === "__proto__")
2505
+ continue;
2506
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2507
+ continue;
2508
+ const objProp = obj[e];
2509
+ const paramsProp = params[e];
2510
+ if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
2511
+ overwriteDeep(objProp, paramsProp);
2512
+ } else if (paramsProp !== void 0) {
2513
+ obj[e] = paramsProp;
2514
+ }
2515
+ }
2516
+ return obj;
2517
+ };
2518
+ var mergeIfExisted = (a, b) => {
2519
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
2520
+ return deepMerge2(a, b);
2521
+ return a || b;
2522
+ };
2523
+ var flattenRecursive = (param, prop, stack = []) => {
2524
+ const objectized = (0, import_array.mergeAndCloneIfArray)(param);
2525
+ stack.push(objectized);
2526
+ const extendOfExtend = objectized[prop];
2527
+ if (extendOfExtend)
2528
+ flattenRecursive(extendOfExtend, prop, stack);
2529
+ delete objectized[prop];
2530
+ return stack;
2531
+ };
2532
+ var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
2533
+ if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
2534
+ return param === element;
2535
+ }
2536
+ if (visited.has(param) || visited.has(element)) {
2537
+ return true;
2538
+ }
2539
+ visited.add(param);
2540
+ visited.add(element);
2541
+ const keysParam = Object.keys(param);
2542
+ const keysElement = Object.keys(element);
2543
+ if (keysParam.length !== keysElement.length) {
2779
2544
  return false;
2780
2545
  }
2781
- for (let i = 0; i < obj1.length; i++) {
2782
- if (!deepContains(obj1[i], obj2[i])) {
2546
+ for (const key of keysParam) {
2547
+ if (!keysElement.includes(key)) {
2783
2548
  return false;
2784
2549
  }
2785
- }
2786
- } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
2787
- for (const key in obj1) {
2788
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
2789
- if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
2550
+ const paramProp = param[key];
2551
+ const elementProp = element[key];
2552
+ if (!isEqualDeep(paramProp, elementProp, visited)) {
2790
2553
  return false;
2791
2554
  }
2792
2555
  }
2793
- }
2794
- } else {
2795
- return obj2 === obj1;
2796
- }
2797
- return true;
2798
- };
2799
- var removeFromObject = (obj, props) => {
2800
- if (props === void 0 || props === null)
2801
- return obj;
2802
- if ((0, import_types.is)(props)("string", "number")) {
2803
- delete obj[props];
2804
- } else if ((0, import_types.isArray)(props)) {
2805
- props.forEach((prop) => delete obj[prop]);
2806
- } else {
2807
- throw new Error("Invalid input: props must be a string or an array of strings");
2808
- }
2809
- return obj;
2810
- };
2811
- var createObjectWithoutPrototype = (obj) => {
2812
- if (obj === null || typeof obj !== "object") {
2813
- return obj;
2814
- }
2815
- const newObj = /* @__PURE__ */ Object.create(null);
2816
- for (const key in obj) {
2817
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
2818
- newObj[key] = createObjectWithoutPrototype(obj[key]);
2819
- }
2820
- }
2821
- return newObj;
2822
- };
2823
- var checkIfKeyIsComponent = (key) => {
2824
- const isFirstKeyString = (0, import_types.isString)(key);
2825
- if (!isFirstKeyString)
2826
- return;
2827
- const firstCharKey = key.slice(0, 1);
2828
- return /^[A-Z]*$/.test(firstCharKey);
2829
- };
2830
- var getChildrenComponentsByKey = (key, el) => {
2831
- if (key === el.key || el.__ref.__componentKey === key) {
2832
- return el;
2833
- }
2834
- if (el.extend) {
2835
- const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
2836
- const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
2837
- if (foundString || foundInArray)
2838
- return el;
2839
- }
2840
- };
2841
- var getExtendsInElement = (obj) => {
2842
- let result = [];
2843
- function traverse(o) {
2844
- for (const key in o) {
2845
- if (Object.hasOwnProperty.call(o, key)) {
2846
- if (checkIfKeyIsComponent(key)) {
2847
- result.push(key);
2848
- }
2849
- if (key === "extend") {
2850
- if (typeof o[key] === "string") {
2851
- result.push(o[key]);
2852
- } else if (Array.isArray(o[key])) {
2853
- result = result.concat(o[key]);
2556
+ return true;
2557
+ };
2558
+ var deepContains = (obj1, obj2) => {
2559
+ if (typeof obj1 !== typeof obj2) {
2560
+ return false;
2561
+ }
2562
+ if ((0, import_types.isObjectLike)(obj1)) {
2563
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
2564
+ if (obj1.length !== obj2.length) {
2565
+ return false;
2566
+ }
2567
+ for (let i = 0; i < obj1.length; i++) {
2568
+ if (!deepContains(obj1[i], obj2[i])) {
2569
+ return false;
2570
+ }
2571
+ }
2572
+ } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
2573
+ for (const key in obj1) {
2574
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
2575
+ if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
2576
+ return false;
2577
+ }
2854
2578
  }
2855
2579
  }
2856
- if (typeof o[key] === "object" && o[key] !== null) {
2857
- traverse(o[key]);
2580
+ } else {
2581
+ return obj2 === obj1;
2582
+ }
2583
+ return true;
2584
+ };
2585
+ var removeFromObject = (obj, props) => {
2586
+ if (props === void 0 || props === null)
2587
+ return obj;
2588
+ if ((0, import_types.is)(props)("string", "number")) {
2589
+ delete obj[props];
2590
+ } else if ((0, import_types.isArray)(props)) {
2591
+ props.forEach((prop) => delete obj[prop]);
2592
+ } else {
2593
+ throw new Error("Invalid input: props must be a string or an array of strings");
2594
+ }
2595
+ return obj;
2596
+ };
2597
+ var createObjectWithoutPrototype = (obj) => {
2598
+ if (obj === null || typeof obj !== "object") {
2599
+ return obj;
2600
+ }
2601
+ const newObj = /* @__PURE__ */ Object.create(null);
2602
+ for (const key in obj) {
2603
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
2604
+ newObj[key] = createObjectWithoutPrototype(obj[key]);
2858
2605
  }
2859
2606
  }
2860
- }
2861
- }
2862
- traverse(obj);
2863
- return result;
2864
- };
2865
- }
2866
- });
2867
- var require_function2 = __commonJS2({
2868
- "../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
2869
- "use strict";
2870
- var __defProp22 = Object.defineProperty;
2871
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2872
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
2873
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2874
- var __export22 = (target, all) => {
2875
- for (var name in all)
2876
- __defProp22(target, name, { get: all[name], enumerable: true });
2877
- };
2878
- var __copyProps22 = (to, from, except, desc) => {
2879
- if (from && typeof from === "object" || typeof from === "function") {
2880
- for (let key of __getOwnPropNames22(from))
2881
- if (!__hasOwnProp22.call(to, key) && key !== except)
2882
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2883
- }
2884
- return to;
2885
- };
2886
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2887
- var function_exports = {};
2888
- __export22(function_exports, {
2889
- debounce: () => debounce,
2890
- debounceOnContext: () => debounceOnContext,
2891
- isStringFunction: () => isStringFunction,
2892
- memoize: () => memoize
2893
- });
2894
- module2.exports = __toCommonJS22(function_exports);
2895
- function debounce(func, wait, immediate) {
2896
- let timeout;
2897
- return function() {
2898
- const context = this;
2899
- const args = arguments;
2900
- const later = function() {
2901
- timeout = null;
2902
- if (!immediate)
2903
- func.apply(context, args);
2607
+ return newObj;
2904
2608
  };
2905
- const callNow = immediate && !timeout;
2906
- clearTimeout(timeout);
2907
- timeout = setTimeout(later, wait);
2908
- if (callNow)
2909
- func.apply(context, args);
2910
- };
2911
- }
2912
- var debounceOnContext = (element, func, timeout = 300) => {
2913
- let timer;
2914
- return (...args) => {
2915
- clearTimeout(timer);
2916
- timer = setTimeout(() => {
2917
- func.apply(element, args);
2918
- }, timeout);
2919
- };
2920
- };
2921
- var memoize = (fn) => {
2922
- const cache = {};
2923
- return (...args) => {
2924
- const n = args[0];
2925
- if (n in cache) {
2926
- return cache[n];
2927
- } else {
2928
- const result = fn(n);
2929
- cache[n] = result;
2609
+ var checkIfKeyIsComponent = (key) => {
2610
+ const isFirstKeyString = (0, import_types.isString)(key);
2611
+ if (!isFirstKeyString)
2612
+ return;
2613
+ const firstCharKey = key.slice(0, 1);
2614
+ return /^[A-Z]*$/.test(firstCharKey);
2615
+ };
2616
+ var getChildrenComponentsByKey = (key, el) => {
2617
+ if (key === el.key || el.__ref.__componentKey === key) {
2618
+ return el;
2619
+ }
2620
+ if (el.extend) {
2621
+ const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
2622
+ const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
2623
+ if (foundString || foundInArray)
2624
+ return el;
2625
+ }
2626
+ if (el.parent && el.parent.childExtend) {
2627
+ const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
2628
+ const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
2629
+ if (foundString || foundInArray)
2630
+ return el;
2631
+ }
2632
+ };
2633
+ var getExtendsInElement = (obj) => {
2634
+ let result = [];
2635
+ function traverse(o) {
2636
+ for (const key in o) {
2637
+ if (Object.hasOwnProperty.call(o, key)) {
2638
+ if (checkIfKeyIsComponent(key)) {
2639
+ result.push(key);
2640
+ }
2641
+ if (key === "extend") {
2642
+ if (typeof o[key] === "string") {
2643
+ result.push(o[key]);
2644
+ } else if (Array.isArray(o[key])) {
2645
+ result = result.concat(o[key]);
2646
+ }
2647
+ }
2648
+ if (typeof o[key] === "object" && o[key] !== null) {
2649
+ traverse(o[key]);
2650
+ }
2651
+ }
2652
+ }
2653
+ }
2654
+ traverse(obj);
2930
2655
  return result;
2931
- }
2932
- };
2933
- };
2934
- var isStringFunction = (inputString) => {
2935
- const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
2936
- return functionRegex.test(inputString);
2937
- };
2938
- }
2939
- });
2940
- var require_log2 = __commonJS2({
2941
- "../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
2942
- "use strict";
2943
- var __defProp22 = Object.defineProperty;
2944
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2945
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
2946
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2947
- var __export22 = (target, all) => {
2948
- for (var name in all)
2949
- __defProp22(target, name, { get: all[name], enumerable: true });
2950
- };
2951
- var __copyProps22 = (to, from, except, desc) => {
2952
- if (from && typeof from === "object" || typeof from === "function") {
2953
- for (let key of __getOwnPropNames22(from))
2954
- if (!__hasOwnProp22.call(to, key) && key !== except)
2955
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2656
+ };
2956
2657
  }
2957
- return to;
2958
- };
2959
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2960
- var log_exports = {};
2961
- __export22(log_exports, {
2962
- logGroupIf: () => logGroupIf,
2963
- logIf: () => logIf
2964
2658
  });
2965
- module2.exports = __toCommonJS22(log_exports);
2966
- var logIf = (bool, ...arg) => {
2967
- if (bool)
2968
- arg.map((v) => console.log(v));
2969
- };
2970
- var logGroupIf = (bool, key, ...arg) => {
2971
- if (bool) {
2972
- console.group(key);
2973
- arg.map((v) => console.log(v));
2974
- console.groupEnd(key);
2659
+ var require_function2 = __commonJS2({
2660
+ "../../../domql/packages/utils/dist/cjs/function.js"(exports2, module22) {
2661
+ "use strict";
2662
+ var __defProp22 = Object.defineProperty;
2663
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2664
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2665
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2666
+ var __export22 = (target, all) => {
2667
+ for (var name in all)
2668
+ __defProp22(target, name, { get: all[name], enumerable: true });
2669
+ };
2670
+ var __copyProps22 = (to, from, except, desc) => {
2671
+ if (from && typeof from === "object" || typeof from === "function") {
2672
+ for (let key of __getOwnPropNames22(from))
2673
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2674
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2675
+ }
2676
+ return to;
2677
+ };
2678
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2679
+ var function_exports = {};
2680
+ __export22(function_exports, {
2681
+ debounce: () => debounce,
2682
+ debounceOnContext: () => debounceOnContext,
2683
+ isStringFunction: () => isStringFunction,
2684
+ memoize: () => memoize
2685
+ });
2686
+ module22.exports = __toCommonJS22(function_exports);
2687
+ function debounce(func, wait, immediate) {
2688
+ let timeout;
2689
+ return function() {
2690
+ const context = this;
2691
+ const args = arguments;
2692
+ const later = function() {
2693
+ timeout = null;
2694
+ if (!immediate)
2695
+ func.apply(context, args);
2696
+ };
2697
+ const callNow = immediate && !timeout;
2698
+ clearTimeout(timeout);
2699
+ timeout = setTimeout(later, wait);
2700
+ if (callNow)
2701
+ func.apply(context, args);
2702
+ };
2703
+ }
2704
+ var debounceOnContext = (element, func, timeout = 300) => {
2705
+ let timer;
2706
+ return (...args) => {
2707
+ clearTimeout(timer);
2708
+ timer = setTimeout(() => {
2709
+ func.apply(element, args);
2710
+ }, timeout);
2711
+ };
2712
+ };
2713
+ var memoize = (fn) => {
2714
+ const cache = {};
2715
+ return (...args) => {
2716
+ const n = args[0];
2717
+ if (n in cache) {
2718
+ return cache[n];
2719
+ } else {
2720
+ const result = fn(n);
2721
+ cache[n] = result;
2722
+ return result;
2723
+ }
2724
+ };
2725
+ };
2726
+ var isStringFunction = (inputString) => {
2727
+ const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
2728
+ return functionRegex.test(inputString);
2729
+ };
2975
2730
  }
2976
- };
2977
- }
2978
- });
2979
- var require_cookie2 = __commonJS2({
2980
- "../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
2981
- "use strict";
2982
- var __defProp22 = Object.defineProperty;
2983
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2984
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
2985
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2986
- var __export22 = (target, all) => {
2987
- for (var name in all)
2988
- __defProp22(target, name, { get: all[name], enumerable: true });
2989
- };
2990
- var __copyProps22 = (to, from, except, desc) => {
2991
- if (from && typeof from === "object" || typeof from === "function") {
2992
- for (let key of __getOwnPropNames22(from))
2993
- if (!__hasOwnProp22.call(to, key) && key !== except)
2994
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2731
+ });
2732
+ var require_log2 = __commonJS2({
2733
+ "../../../domql/packages/utils/dist/cjs/log.js"(exports2, module22) {
2734
+ "use strict";
2735
+ var __defProp22 = Object.defineProperty;
2736
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2737
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2738
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2739
+ var __export22 = (target, all) => {
2740
+ for (var name in all)
2741
+ __defProp22(target, name, { get: all[name], enumerable: true });
2742
+ };
2743
+ var __copyProps22 = (to, from, except, desc) => {
2744
+ if (from && typeof from === "object" || typeof from === "function") {
2745
+ for (let key of __getOwnPropNames22(from))
2746
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2747
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2748
+ }
2749
+ return to;
2750
+ };
2751
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2752
+ var log_exports = {};
2753
+ __export22(log_exports, {
2754
+ logGroupIf: () => logGroupIf,
2755
+ logIf: () => logIf
2756
+ });
2757
+ module22.exports = __toCommonJS22(log_exports);
2758
+ var logIf = (bool, ...arg) => {
2759
+ if (bool)
2760
+ arg.map((v) => console.log(v));
2761
+ };
2762
+ var logGroupIf = (bool, key, ...arg) => {
2763
+ if (bool) {
2764
+ console.group(key);
2765
+ arg.map((v) => console.log(v));
2766
+ console.groupEnd(key);
2767
+ }
2768
+ };
2995
2769
  }
2996
- return to;
2997
- };
2998
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2999
- var cookie_exports = {};
3000
- __export22(cookie_exports, {
3001
- getCookie: () => getCookie,
3002
- isMobile: () => isMobile,
3003
- setCookie: () => setCookie
3004
2770
  });
3005
- module2.exports = __toCommonJS22(cookie_exports);
3006
- var import_types = require_types2();
3007
- var import_utils32 = require_cjs2();
3008
- var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
3009
- var setCookie = (cname, cvalue, exdays = 365) => {
3010
- if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
3011
- return;
3012
- const d = /* @__PURE__ */ new Date();
3013
- d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
3014
- const expires = `expires=${d.toUTCString()}`;
3015
- import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
3016
- };
3017
- var getCookie = (cname) => {
3018
- if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
3019
- return;
3020
- const name = `${cname}=`;
3021
- const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
3022
- const ca = decodedCookie.split(";");
3023
- for (let i = 0; i < ca.length; i++) {
3024
- let c = ca[i];
3025
- while (c.charAt(0) === " ")
3026
- c = c.substring(1);
3027
- if (c.indexOf(name) === 0)
3028
- return c.substring(name.length, c.length);
2771
+ var require_cookie2 = __commonJS2({
2772
+ "../../../domql/packages/utils/dist/cjs/cookie.js"(exports2, module22) {
2773
+ "use strict";
2774
+ var __defProp22 = Object.defineProperty;
2775
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2776
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2777
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2778
+ var __export22 = (target, all) => {
2779
+ for (var name in all)
2780
+ __defProp22(target, name, { get: all[name], enumerable: true });
2781
+ };
2782
+ var __copyProps22 = (to, from, except, desc) => {
2783
+ if (from && typeof from === "object" || typeof from === "function") {
2784
+ for (let key of __getOwnPropNames22(from))
2785
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2786
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2787
+ }
2788
+ return to;
2789
+ };
2790
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2791
+ var cookie_exports = {};
2792
+ __export22(cookie_exports, {
2793
+ getCookie: () => getCookie,
2794
+ isMobile: () => isMobile,
2795
+ setCookie: () => setCookie
2796
+ });
2797
+ module22.exports = __toCommonJS22(cookie_exports);
2798
+ var import_types = require_types2();
2799
+ var import_utils32 = require_cjs3();
2800
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2801
+ var setCookie = (cname, cvalue, exdays = 365) => {
2802
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
2803
+ return;
2804
+ const d = /* @__PURE__ */ new Date();
2805
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2806
+ const expires = `expires=${d.toUTCString()}`;
2807
+ import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
2808
+ };
2809
+ var getCookie = (cname) => {
2810
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
2811
+ return;
2812
+ const name = `${cname}=`;
2813
+ const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
2814
+ const ca = decodedCookie.split(";");
2815
+ for (let i = 0; i < ca.length; i++) {
2816
+ let c = ca[i];
2817
+ while (c.charAt(0) === " ")
2818
+ c = c.substring(1);
2819
+ if (c.indexOf(name) === 0)
2820
+ return c.substring(name.length, c.length);
2821
+ }
2822
+ return "";
2823
+ };
3029
2824
  }
3030
- return "";
3031
- };
3032
- }
3033
- });
3034
- var require_tags2 = __commonJS2({
3035
- "../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
3036
- "use strict";
3037
- var __defProp22 = Object.defineProperty;
3038
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
3039
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
3040
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
3041
- var __export22 = (target, all) => {
3042
- for (var name in all)
3043
- __defProp22(target, name, { get: all[name], enumerable: true });
3044
- };
3045
- var __copyProps22 = (to, from, except, desc) => {
3046
- if (from && typeof from === "object" || typeof from === "function") {
3047
- for (let key of __getOwnPropNames22(from))
3048
- if (!__hasOwnProp22.call(to, key) && key !== except)
3049
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2825
+ });
2826
+ var require_tags2 = __commonJS2({
2827
+ "../../../domql/packages/utils/dist/cjs/tags.js"(exports2, module22) {
2828
+ "use strict";
2829
+ var __defProp22 = Object.defineProperty;
2830
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2831
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2832
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2833
+ var __export22 = (target, all) => {
2834
+ for (var name in all)
2835
+ __defProp22(target, name, { get: all[name], enumerable: true });
2836
+ };
2837
+ var __copyProps22 = (to, from, except, desc) => {
2838
+ if (from && typeof from === "object" || typeof from === "function") {
2839
+ for (let key of __getOwnPropNames22(from))
2840
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2841
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2842
+ }
2843
+ return to;
2844
+ };
2845
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2846
+ var tags_exports = {};
2847
+ __export22(tags_exports, {
2848
+ HTML_TAGS: () => HTML_TAGS,
2849
+ isValidHtmlTag: () => isValidHtmlTag
2850
+ });
2851
+ module22.exports = __toCommonJS22(tags_exports);
2852
+ var HTML_TAGS = {
2853
+ root: [
2854
+ "body",
2855
+ "html"
2856
+ ],
2857
+ head: [
2858
+ "title",
2859
+ "base",
2860
+ "meta",
2861
+ "style"
2862
+ ],
2863
+ body: [
2864
+ "string",
2865
+ "fragment",
2866
+ "a",
2867
+ "abbr",
2868
+ "acronym",
2869
+ "address",
2870
+ "applet",
2871
+ "area",
2872
+ "article",
2873
+ "aside",
2874
+ "audio",
2875
+ "b",
2876
+ "basefont",
2877
+ "bdi",
2878
+ "bdo",
2879
+ "big",
2880
+ "blockquote",
2881
+ "br",
2882
+ "button",
2883
+ "canvas",
2884
+ "caption",
2885
+ "center",
2886
+ "cite",
2887
+ "code",
2888
+ "search",
2889
+ "col",
2890
+ "colgroup",
2891
+ "data",
2892
+ "datalist",
2893
+ "dd",
2894
+ "del",
2895
+ "details",
2896
+ "dfn",
2897
+ "dialog",
2898
+ "dir",
2899
+ "div",
2900
+ "dl",
2901
+ "dt",
2902
+ "em",
2903
+ "embed",
2904
+ "fieldset",
2905
+ "figcaption",
2906
+ "figure",
2907
+ "font",
2908
+ "footer",
2909
+ "form",
2910
+ "frame",
2911
+ "frameset",
2912
+ "h1",
2913
+ "h2",
2914
+ "h3",
2915
+ "h4",
2916
+ "h5",
2917
+ "h6",
2918
+ "head",
2919
+ "header",
2920
+ "hr",
2921
+ "i",
2922
+ "iframe",
2923
+ "img",
2924
+ "input",
2925
+ "ins",
2926
+ "kbd",
2927
+ "label",
2928
+ "legend",
2929
+ "li",
2930
+ "link",
2931
+ "main",
2932
+ "map",
2933
+ "mark",
2934
+ "meter",
2935
+ "nav",
2936
+ "noframes",
2937
+ "noscript",
2938
+ "object",
2939
+ "ol",
2940
+ "optgroup",
2941
+ "option",
2942
+ "output",
2943
+ "p",
2944
+ "param",
2945
+ "picture",
2946
+ "pre",
2947
+ "progress",
2948
+ "hgroup",
2949
+ "q",
2950
+ "rp",
2951
+ "rt",
2952
+ "ruby",
2953
+ "s",
2954
+ "samp",
2955
+ "script",
2956
+ "section",
2957
+ "select",
2958
+ "small",
2959
+ "source",
2960
+ "span",
2961
+ "strike",
2962
+ "strong",
2963
+ "sub",
2964
+ "summary",
2965
+ "sup",
2966
+ "table",
2967
+ "tbody",
2968
+ "td",
2969
+ "template",
2970
+ "hgroup",
2971
+ "textarea",
2972
+ "tfoot",
2973
+ "th",
2974
+ "thead",
2975
+ "time",
2976
+ "tr",
2977
+ "track",
2978
+ "tt",
2979
+ "u",
2980
+ "ul",
2981
+ "var",
2982
+ "video",
2983
+ "wbr",
2984
+ // SVG
2985
+ "svg",
2986
+ "path"
2987
+ ]
2988
+ };
2989
+ var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
3050
2990
  }
3051
- return to;
3052
- };
3053
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
3054
- var tags_exports = {};
3055
- __export22(tags_exports, {
3056
- HTML_TAGS: () => HTML_TAGS,
3057
- isValidHtmlTag: () => isValidHtmlTag
3058
2991
  });
3059
- module2.exports = __toCommonJS22(tags_exports);
3060
- var HTML_TAGS = {
3061
- root: [
3062
- "body",
3063
- "html"
3064
- ],
3065
- head: [
3066
- "title",
3067
- "base",
3068
- "meta",
3069
- "style"
3070
- ],
3071
- body: [
3072
- "string",
3073
- "fragment",
3074
- "a",
3075
- "abbr",
3076
- "acronym",
3077
- "address",
3078
- "applet",
3079
- "area",
3080
- "article",
3081
- "aside",
3082
- "audio",
3083
- "b",
3084
- "basefont",
3085
- "bdi",
3086
- "bdo",
3087
- "big",
3088
- "blockquote",
3089
- "br",
3090
- "button",
3091
- "canvas",
3092
- "caption",
3093
- "center",
3094
- "cite",
3095
- "code",
3096
- "search",
3097
- "col",
3098
- "colgroup",
3099
- "data",
3100
- "datalist",
3101
- "dd",
3102
- "del",
3103
- "details",
3104
- "dfn",
3105
- "dialog",
3106
- "dir",
3107
- "div",
3108
- "dl",
3109
- "dt",
3110
- "em",
3111
- "embed",
3112
- "fieldset",
3113
- "figcaption",
3114
- "figure",
3115
- "font",
3116
- "footer",
3117
- "form",
3118
- "frame",
3119
- "frameset",
3120
- "h1",
3121
- "h2",
3122
- "h3",
3123
- "h4",
3124
- "h5",
3125
- "h6",
3126
- "head",
3127
- "header",
3128
- "hr",
3129
- "i",
3130
- "iframe",
3131
- "img",
3132
- "input",
3133
- "ins",
3134
- "kbd",
3135
- "label",
3136
- "legend",
3137
- "li",
3138
- "link",
3139
- "main",
3140
- "map",
3141
- "mark",
3142
- "meter",
3143
- "nav",
3144
- "noframes",
3145
- "noscript",
3146
- "object",
3147
- "ol",
3148
- "optgroup",
3149
- "option",
3150
- "output",
3151
- "p",
3152
- "param",
3153
- "picture",
3154
- "pre",
3155
- "progress",
3156
- "hgroup",
3157
- "q",
3158
- "rp",
3159
- "rt",
3160
- "ruby",
3161
- "s",
3162
- "samp",
3163
- "script",
3164
- "section",
3165
- "select",
3166
- "small",
3167
- "source",
3168
- "span",
3169
- "strike",
3170
- "strong",
3171
- "sub",
3172
- "summary",
3173
- "sup",
3174
- "table",
3175
- "tbody",
3176
- "td",
3177
- "template",
3178
- "hgroup",
3179
- "textarea",
3180
- "tfoot",
3181
- "th",
3182
- "thead",
3183
- "time",
3184
- "tr",
3185
- "track",
3186
- "tt",
3187
- "u",
3188
- "ul",
3189
- "var",
3190
- "video",
3191
- "wbr",
3192
- // SVG
3193
- "svg",
3194
- "path"
3195
- ]
3196
- };
3197
- var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
3198
- }
3199
- });
3200
- var require_cjs2 = __commonJS2({
3201
- "../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
3202
- "use strict";
3203
- var __defProp22 = Object.defineProperty;
3204
- var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
3205
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
3206
- var __hasOwnProp22 = Object.prototype.hasOwnProperty;
3207
- var __copyProps22 = (to, from, except, desc) => {
3208
- if (from && typeof from === "object" || typeof from === "function") {
3209
- for (let key of __getOwnPropNames22(from))
3210
- if (!__hasOwnProp22.call(to, key) && key !== except)
3211
- __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2992
+ var require_cjs3 = __commonJS2({
2993
+ "../../../domql/packages/utils/dist/cjs/index.js"(exports2, module22) {
2994
+ "use strict";
2995
+ var __defProp22 = Object.defineProperty;
2996
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2997
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2998
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2999
+ var __copyProps22 = (to, from, except, desc) => {
3000
+ if (from && typeof from === "object" || typeof from === "function") {
3001
+ for (let key of __getOwnPropNames22(from))
3002
+ if (!__hasOwnProp22.call(to, key) && key !== except)
3003
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
3004
+ }
3005
+ return to;
3006
+ };
3007
+ var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
3008
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
3009
+ var utils_exports = {};
3010
+ module22.exports = __toCommonJS22(utils_exports);
3011
+ __reExport(utils_exports, require_key2(), module22.exports);
3012
+ __reExport(utils_exports, require_env2(), module22.exports);
3013
+ __reExport(utils_exports, require_types2(), module22.exports);
3014
+ __reExport(utils_exports, require_object2(), module22.exports);
3015
+ __reExport(utils_exports, require_function2(), module22.exports);
3016
+ __reExport(utils_exports, require_array2(), module22.exports);
3017
+ __reExport(utils_exports, require_node2(), module22.exports);
3018
+ __reExport(utils_exports, require_log2(), module22.exports);
3019
+ __reExport(utils_exports, require_string2(), module22.exports);
3020
+ __reExport(utils_exports, require_globals2(), module22.exports);
3021
+ __reExport(utils_exports, require_cookie2(), module22.exports);
3022
+ __reExport(utils_exports, require_tags2(), module22.exports);
3023
+ }
3024
+ });
3025
+ var src_exports = {};
3026
+ __export2(src_exports, {
3027
+ arrayzeValue: () => arrayzeValue,
3028
+ copyStringToClipboard: () => copyStringToClipboard,
3029
+ fibonacciNumberByIndex: () => fibonacciNumberByIndex,
3030
+ findClosestNumber: () => findClosestNumber,
3031
+ findClosestNumberInFactory: () => findClosestNumberInFactory,
3032
+ formatDate: () => formatDate,
3033
+ isPhoto: () => isPhoto,
3034
+ loadCssFile: () => loadCssFile,
3035
+ loadJavascript: () => loadJavascript,
3036
+ loadJavascriptFile: () => loadJavascriptFile,
3037
+ loadJavascriptFileSync: () => loadJavascriptFileSync,
3038
+ removeChars: () => removeChars,
3039
+ toCamelCase: () => toCamelCase,
3040
+ toDashCase: () => toDashCase2,
3041
+ toDescriptionCase: () => toDescriptionCase,
3042
+ toTitleCase: () => toTitleCase,
3043
+ toggleFullscreen: () => toggleFullscreen
3044
+ });
3045
+ module2.exports = __toCommonJS2(src_exports);
3046
+ var import_utils22 = __toESM2(require_cjs3(), 1);
3047
+ var toggleFullscreen = async (el) => {
3048
+ if (!document.fullscreenElement) {
3049
+ try {
3050
+ await (el.node || document).requestFullscreen();
3051
+ } catch (err) {
3052
+ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
3053
+ }
3054
+ } else {
3055
+ await document.exitFullscreen();
3212
3056
  }
3213
- return to;
3214
3057
  };
3215
- var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
3216
- var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
3217
- var utils_exports = {};
3218
- module2.exports = __toCommonJS22(utils_exports);
3219
- __reExport(utils_exports, require_key2(), module2.exports);
3220
- __reExport(utils_exports, require_env2(), module2.exports);
3221
- __reExport(utils_exports, require_types2(), module2.exports);
3222
- __reExport(utils_exports, require_object2(), module2.exports);
3223
- __reExport(utils_exports, require_function2(), module2.exports);
3224
- __reExport(utils_exports, require_array2(), module2.exports);
3225
- __reExport(utils_exports, require_node2(), module2.exports);
3226
- __reExport(utils_exports, require_log2(), module2.exports);
3227
- __reExport(utils_exports, require_string2(), module2.exports);
3228
- __reExport(utils_exports, require_globals2(), module2.exports);
3229
- __reExport(utils_exports, require_cookie2(), module2.exports);
3230
- __reExport(utils_exports, require_tags2(), module2.exports);
3058
+ var import_utils5 = __toESM2(require_cjs3(), 1);
3059
+ var findClosestNumber = (number, arr) => {
3060
+ return ((0, import_utils5.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
3061
+ return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
3062
+ });
3063
+ };
3064
+ var findClosestNumberInFactory = (val, factory) => {
3065
+ val = parseFloat(val);
3066
+ if ((0, import_utils5.isObject)(factory))
3067
+ factory = Object.values(factory);
3068
+ return findClosestNumber(val, factory);
3069
+ };
3070
+ var formatDate = (timestamp) => {
3071
+ if (!timestamp)
3072
+ return "";
3073
+ const d = new Date(timestamp);
3074
+ const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
3075
+ const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
3076
+ const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
3077
+ return `${da} ${mo}, ${ye}`;
3078
+ };
3079
+ var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
3080
+ const fib = [0, 1];
3081
+ for (let i = 2; i <= n; i++) {
3082
+ fib[i] = fib[i - 1] + fib[i - 2];
3083
+ }
3084
+ return fib[n];
3085
+ };
3086
+ var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
3087
+ return new Promise((resolve, reject) => {
3088
+ try {
3089
+ const scriptEle = doc.createElement("script");
3090
+ scriptEle.type = type;
3091
+ scriptEle.async = async;
3092
+ scriptEle.src = FILE_URL;
3093
+ scriptEle.addEventListener("load", (ev) => {
3094
+ resolve({
3095
+ status: true
3096
+ });
3097
+ });
3098
+ scriptEle.addEventListener("error", (ev) => {
3099
+ reject(new Error({
3100
+ status: false,
3101
+ message: `Failed to load the script ${FILE_URL}`
3102
+ }));
3103
+ });
3104
+ doc.body.appendChild(scriptEle);
3105
+ } catch (error) {
3106
+ reject(error);
3107
+ }
3108
+ });
3109
+ };
3110
+ var loadJavascriptFileSync = (FILE_URL, doc = document, fallback, type = "text/javascript") => {
3111
+ const xhr = new window.XMLHttpRequest();
3112
+ xhr.open("GET", FILE_URL, false);
3113
+ xhr.send();
3114
+ if (xhr.status === 200) {
3115
+ const scriptEle = doc.createElement("script");
3116
+ scriptEle.type = type;
3117
+ scriptEle.text = xhr.responseText;
3118
+ doc.body.appendChild(scriptEle);
3119
+ if (typeof fallback === "function")
3120
+ fallback();
3121
+ } else {
3122
+ throw new Error(`Failed to load the script ${FILE_URL}`);
3123
+ }
3124
+ };
3125
+ var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
3126
+ return new Promise((resolve, reject) => {
3127
+ try {
3128
+ const linkElem = doc.createElement("link");
3129
+ linkElem.rel = "stylesheet";
3130
+ linkElem.href = FILE_URL;
3131
+ linkElem.addEventListener("load", (ev) => {
3132
+ resolve({
3133
+ status: true
3134
+ });
3135
+ });
3136
+ doc.head.appendChild(linkElem);
3137
+ } catch (error) {
3138
+ reject(error);
3139
+ }
3140
+ });
3141
+ };
3142
+ var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
3143
+ try {
3144
+ const scriptEle = doc.createElement("script");
3145
+ scriptEle.type = type;
3146
+ scriptEle.async = async;
3147
+ scriptEle.id = id;
3148
+ scriptEle.innerHTML = body;
3149
+ doc.body.appendChild(scriptEle);
3150
+ } catch (error) {
3151
+ console.warn(error);
3152
+ }
3153
+ };
3154
+ var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
3155
+ var copyStringToClipboard = (str) => {
3156
+ const el = document.createElement("textarea");
3157
+ el.value = str;
3158
+ el.setAttribute("readonly", "");
3159
+ el.style = { position: "absolute", left: "-9999px" };
3160
+ document.body.appendChild(el);
3161
+ el.select();
3162
+ document.execCommand("copy");
3163
+ document.body.removeChild(el);
3164
+ };
3165
+ var removeChars = (str) => {
3166
+ return str.replace(/[^a-zA-Z0-9_]/g, "");
3167
+ };
3168
+ var toCamelCase = (str) => {
3169
+ return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
3170
+ return index === 0 ? word.toLowerCase() : word.toUpperCase();
3171
+ }).replaceAll(/\s+/g, "");
3172
+ };
3173
+ var toTitleCase = (str) => str && str.replace(
3174
+ /\w\S*/g,
3175
+ (txt) => {
3176
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
3177
+ }
3178
+ );
3179
+ var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
3180
+ var toDescriptionCase = (str = "") => {
3181
+ if (typeof str !== "string")
3182
+ return;
3183
+ const result = str.replace(/([A-Z])/g, " $1");
3184
+ return result.charAt(0).toUpperCase() + result.slice(1);
3185
+ };
3186
+ var arrayzeValue = (val) => {
3187
+ if ((0, import_utils22.isArray)(val))
3188
+ return val;
3189
+ if ((0, import_utils22.isString)(val))
3190
+ return val.split(" ");
3191
+ if ((0, import_utils22.isObject)(val))
3192
+ return Object.values(val);
3193
+ if ((0, import_utils22.isNumber)(val))
3194
+ return [val];
3195
+ };
3231
3196
  }
3232
3197
  });
3233
- var src_exports = {};
3234
- __export2(src_exports, {
3235
- arrayzeValue: () => arrayzeValue,
3236
- copyStringToClipboard: () => copyStringToClipboard,
3237
- fibonacciNumberByIndex: () => fibonacciNumberByIndex,
3238
- findClosestNumber: () => findClosestNumber,
3239
- findClosestNumberInFactory: () => findClosestNumberInFactory,
3240
- formatDate: () => formatDate,
3241
- isPhoto: () => isPhoto,
3242
- loadCssFile: () => loadCssFile,
3243
- loadJavascript: () => loadJavascript,
3244
- loadJavascriptFile: () => loadJavascriptFile,
3245
- removeChars: () => removeChars,
3246
- toCamelCase: () => toCamelCase,
3247
- toDashCase: () => toDashCase,
3248
- toDescriptionCase: () => toDescriptionCase,
3249
- toTitleCase: () => toTitleCase,
3250
- toggleFullscreen: () => toggleFullscreen
3198
+
3199
+ // src/utils/var.js
3200
+ var var_exports = {};
3201
+ __export(var_exports, {
3202
+ applyMediaSequenceVars: () => applyMediaSequenceVars,
3203
+ applySequenceGlobalVars: () => applySequenceGlobalVars,
3204
+ applySequenceVars: () => applySequenceVars,
3205
+ setVariables: () => setVariables
3251
3206
  });
3252
- module.exports = __toCommonJS2(src_exports);
3253
- var import_utils2 = __toESM2(require_cjs2(), 1);
3254
- var toggleFullscreen = (el) => {
3255
- if (!document.fullscreenElement) {
3256
- el.node.requestFullscreen().catch((err) => {
3257
- console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
3258
- });
3259
- } else {
3260
- document.exitFullscreen();
3261
- }
3262
- };
3263
- var import_utils3 = __toESM2(require_cjs2(), 1);
3264
- var findClosestNumber = (number, arr) => {
3265
- return ((0, import_utils3.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
3266
- return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
3267
- });
3207
+ module.exports = __toCommonJS(var_exports);
3208
+ var import_utils4 = __toESM(require_cjs(), 1);
3209
+
3210
+ // src/factory.js
3211
+ var import_utils = __toESM(require_cjs(), 1);
3212
+
3213
+ // src/defaultConfig/index.js
3214
+ var defaultConfig_exports = {};
3215
+ __export(defaultConfig_exports, {
3216
+ ANIMATION: () => ANIMATION,
3217
+ BREAKPOINTS: () => BREAKPOINTS,
3218
+ CASES: () => CASES,
3219
+ COLOR: () => COLOR,
3220
+ DEVICES: () => DEVICES,
3221
+ DOCUMENT: () => DOCUMENT,
3222
+ FONT: () => FONT,
3223
+ FONT_FACE: () => FONT_FACE,
3224
+ FONT_FAMILY: () => FONT_FAMILY,
3225
+ FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
3226
+ GRADIENT: () => GRADIENT,
3227
+ GRID: () => GRID,
3228
+ ICONS: () => ICONS,
3229
+ MEDIA: () => MEDIA,
3230
+ RESET: () => RESET,
3231
+ SEMANTIC_ICONS: () => SEMANTIC_ICONS,
3232
+ SEQUENCE: () => SEQUENCE,
3233
+ SHADOW: () => SHADOW,
3234
+ SPACING: () => SPACING,
3235
+ SVG: () => SVG,
3236
+ SVG_DATA: () => SVG_DATA,
3237
+ TEMPLATES: () => TEMPLATES,
3238
+ THEME: () => THEME,
3239
+ TIMING: () => TIMING,
3240
+ TYPOGRAPHY: () => TYPOGRAPHY,
3241
+ UNIT: () => UNIT
3242
+ });
3243
+
3244
+ // src/defaultConfig/sequence.js
3245
+ var SEQUENCE = {
3246
+ "minor-second": 1.067,
3247
+ "major-second": 1.125,
3248
+ "minor-third": 1.2,
3249
+ "major-third": 1.25,
3250
+ "perfect-fourth": 1.333,
3251
+ "augmented-fourth": 1.414,
3252
+ "perfect-fifth": 1.5,
3253
+ "minor-sixth": 1.6,
3254
+ phi: 1.618,
3255
+ // golden-ratio
3256
+ "major-sixth": 1.667,
3257
+ "square-root-3": 1.732,
3258
+ // theodorus
3259
+ "minor-seventh": 1.778,
3260
+ "major-seventh": 1.875,
3261
+ octave: 2,
3262
+ "square-root-5": 2.23,
3263
+ // pythagoras
3264
+ "major-tenth": 2.5,
3265
+ "major-eleventh": 2.667,
3266
+ "major-twelfth": 3,
3267
+ pi: 3.14,
3268
+ // archimedes
3269
+ "double-octave": 4
3268
3270
  };
3269
- var findClosestNumberInFactory = (val, factory) => {
3270
- val = parseFloat(val);
3271
- if ((0, import_utils3.isObject)(factory))
3272
- factory = Object.values(factory);
3273
- return findClosestNumber(val, factory);
3271
+
3272
+ // src/defaultConfig/unit.js
3273
+ var UNIT = {
3274
+ default: "em"
3274
3275
  };
3275
- var formatDate = (timestamp) => {
3276
- if (!timestamp)
3277
- return "";
3278
- const d = new Date(timestamp);
3279
- const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
3280
- const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
3281
- const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
3282
- return `${da} ${mo}, ${ye}`;
3276
+
3277
+ // src/defaultConfig/typography.js
3278
+ var defaultProps = {
3279
+ browserDefault: 16,
3280
+ base: 16,
3281
+ type: "font-size",
3282
+ ratio: SEQUENCE["minor-third"],
3283
+ range: [-3, 12],
3284
+ h1Matches: 6,
3285
+ lineHeight: 1.5,
3286
+ subSequence: true,
3287
+ mediaRegenerate: false,
3288
+ unit: "em",
3289
+ templates: {},
3290
+ sequence: {},
3291
+ scales: {},
3292
+ vars: {}
3283
3293
  };
3284
- var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
3285
- const fib = [0, 1];
3286
- for (let i = 2; i <= n; i++) {
3287
- fib[i] = fib[i - 1] + fib[i - 2];
3288
- }
3289
- return fib[n];
3294
+ var TYPOGRAPHY = defaultProps;
3295
+
3296
+ // src/defaultConfig/font.js
3297
+ var FONT = {};
3298
+
3299
+ // src/defaultConfig/font-family.js
3300
+ var FONT_FAMILY = {};
3301
+ var FONT_FAMILY_TYPES = {
3302
+ "sans-serif": "Helvetica, Arial, sans-serif, --system-default",
3303
+ serif: "Times New Roman, Georgia, serif, --system-default",
3304
+ monospace: "Courier New, monospace, --system-default"
3290
3305
  };
3291
- var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
3292
- return new Promise((resolve, reject) => {
3293
- try {
3294
- const scriptEle = doc.createElement("script");
3295
- scriptEle.type = type;
3296
- scriptEle.async = async;
3297
- scriptEle.src = FILE_URL;
3298
- scriptEle.addEventListener("load", (ev) => {
3299
- resolve({
3300
- status: true
3301
- });
3302
- });
3303
- scriptEle.addEventListener("error", (ev) => {
3304
- reject({
3305
- status: false,
3306
- message: `Failed to load the script ${FILE_URL}`
3307
- });
3308
- });
3309
- doc.body.appendChild(scriptEle);
3310
- } catch (error) {
3311
- reject(error);
3312
- }
3313
- });
3306
+ var FONT_FACE = {};
3307
+
3308
+ // src/defaultConfig/media.js
3309
+ var MEDIA = {
3310
+ tv: "(min-width: 2780px)",
3311
+ light: "(prefers-color-scheme: light)",
3312
+ dark: "(prefers-color-scheme: dark)",
3313
+ print: "print"
3314
3314
  };
3315
- var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
3316
- return new Promise((resolve, reject) => {
3317
- try {
3318
- const linkElem = doc.createElement("link");
3319
- linkElem.rel = "stylesheet";
3320
- linkElem.href = FILE_URL;
3321
- linkElem.addEventListener("load", (ev) => {
3322
- resolve({
3323
- status: true
3324
- });
3325
- });
3326
- doc.head.appendChild(linkElem);
3327
- } catch (error) {
3328
- reject(error);
3329
- }
3330
- });
3315
+
3316
+ // src/defaultConfig/spacing.js
3317
+ var defaultProps2 = {
3318
+ base: TYPOGRAPHY.base,
3319
+ type: "spacing",
3320
+ ratio: SEQUENCE.phi,
3321
+ range: [-5, 15],
3322
+ subSequence: true,
3323
+ mediaRegenerate: false,
3324
+ unit: "em",
3325
+ sequence: {},
3326
+ scales: {},
3327
+ vars: {}
3331
3328
  };
3332
- var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
3333
- try {
3334
- const scriptEle = doc.createElement("script");
3335
- scriptEle.type = type;
3336
- scriptEle.async = async;
3337
- scriptEle.id = id;
3338
- scriptEle.innerHTML = body;
3339
- doc.body.appendChild(scriptEle);
3340
- } catch (error) {
3341
- console.warn(error);
3342
- }
3329
+ var SPACING = defaultProps2;
3330
+
3331
+ // src/defaultConfig/color.js
3332
+ var COLOR = {};
3333
+ var GRADIENT = {};
3334
+
3335
+ // src/defaultConfig/theme.js
3336
+ var THEME = {};
3337
+
3338
+ // src/defaultConfig/shadow.js
3339
+ var SHADOW = {};
3340
+
3341
+ // src/defaultConfig/icons.js
3342
+ var ICONS = {};
3343
+ var SEMANTIC_ICONS = {};
3344
+
3345
+ // src/defaultConfig/timing.js
3346
+ var defaultProps3 = {
3347
+ default: 150,
3348
+ base: 150,
3349
+ type: "timing",
3350
+ ratio: SEQUENCE["perfect-fourth"],
3351
+ range: [-3, 12],
3352
+ mediaRegenerate: false,
3353
+ unit: "ms",
3354
+ sequence: {},
3355
+ scales: {},
3356
+ vars: {}
3343
3357
  };
3344
- var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
3345
- var copyStringToClipboard = (str) => {
3346
- const el = document.createElement("textarea");
3347
- el.value = str;
3348
- el.setAttribute("readonly", "");
3349
- el.style = { position: "absolute", left: "-9999px" };
3350
- document.body.appendChild(el);
3351
- el.select();
3352
- document.execCommand("copy");
3353
- document.body.removeChild(el);
3358
+ var TIMING = defaultProps3;
3359
+
3360
+ // src/defaultConfig/document.js
3361
+ var DOCUMENT = {};
3362
+
3363
+ // src/defaultConfig/responsive.js
3364
+ var BREAKPOINTS = {
3365
+ screenL: 1920,
3366
+ screenM: 1680,
3367
+ screenS: 1440,
3368
+ tabletL: 1366,
3369
+ tabletM: 1280,
3370
+ tabletS: 1024,
3371
+ mobileL: 768,
3372
+ mobileM: 560,
3373
+ mobileS: 480,
3374
+ mobileXS: 375
3354
3375
  };
3355
- var removeChars = (str) => {
3356
- return str.replace(/[^a-zA-Z0-9_]/g, "");
3376
+ var DEVICES = {
3377
+ screenL: [1920, 1024],
3378
+ screenM: [1680, 1024],
3379
+ screenS: [1440, 978],
3380
+ tabletL: [1366, 926],
3381
+ tabletM: [1280, 768],
3382
+ tabletS: [1024, 768],
3383
+ mobileL: [768, 375],
3384
+ mobileM: [560, 768],
3385
+ mobileS: [480, 768],
3386
+ mobileXS: [375, 768]
3357
3387
  };
3358
- var toCamelCase = (str) => {
3359
- return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
3360
- return index === 0 ? word.toLowerCase() : word.toUpperCase();
3361
- }).replaceAll(/\s+/g, "");
3388
+
3389
+ // src/defaultConfig/cases.js
3390
+ var CASES = {};
3391
+
3392
+ // src/defaultConfig/animation.js
3393
+ var ANIMATION = {};
3394
+
3395
+ // src/defaultConfig/svg.js
3396
+ var SVG = {};
3397
+ var SVG_DATA = {};
3398
+
3399
+ // src/defaultConfig/templates.js
3400
+ var TEMPLATES = {};
3401
+
3402
+ // src/defaultConfig/grid.js
3403
+ var defaultProps4 = {};
3404
+ var GRID = defaultProps4;
3405
+
3406
+ // src/defaultConfig/index.js
3407
+ var RESET = {};
3408
+
3409
+ // src/factory.js
3410
+ var CSS_VARS = {};
3411
+ var CONFIG = {
3412
+ verbose: false,
3413
+ useVariable: true,
3414
+ useReset: true,
3415
+ CSS_VARS,
3416
+ ...defaultConfig_exports
3362
3417
  };
3363
- var toTitleCase = (str) => str && str.replace(
3364
- /\w\S*/g,
3365
- (txt) => {
3366
- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
3367
- }
3368
- );
3369
- var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
3370
- var toDescriptionCase = (str = "") => {
3371
- if (typeof str !== "string")
3372
- return;
3373
- const result = str.replace(/([A-Z])/g, " $1");
3374
- return result.charAt(0).toUpperCase() + result.slice(1);
3418
+ var cachedConfig = (0, import_utils.deepClone)(CONFIG);
3419
+ var FACTORY = {
3420
+ active: "0",
3421
+ 0: CONFIG
3375
3422
  };
3376
- var arrayzeValue = (val) => {
3377
- if ((0, import_utils2.isArray)(val))
3378
- return val;
3379
- if ((0, import_utils2.isString)(val))
3380
- return val.split(" ");
3381
- if ((0, import_utils2.isObject)(val))
3382
- return Object.values(val);
3383
- if ((0, import_utils2.isNumber)(val))
3384
- return [val];
3423
+ var getActiveConfig = (def) => {
3424
+ return FACTORY[def || FACTORY.active] || CONFIG;
3385
3425
  };
3386
3426
 
3427
+ // src/utils/sequence.js
3428
+ var import_utils2 = __toESM(require_cjs(), 1);
3429
+ var import_utils3 = __toESM(require_cjs2(), 1);
3430
+
3387
3431
  // src/utils/unit.js
3388
3432
  var isScalingUnit = (unit) => {
3389
3433
  return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
@@ -3406,7 +3450,7 @@ var getSubratio = (base, ratio) => {
3406
3450
  var setVariables = (result, key) => {
3407
3451
  const CONFIG2 = getActiveConfig();
3408
3452
  const { CSS_VARS: CSS_VARS2 } = CONFIG2;
3409
- if ((0, import_utils6.isObjectLike)(result.value)) {
3453
+ if ((0, import_utils4.isObjectLike)(result.value)) {
3410
3454
  } else {
3411
3455
  CSS_VARS2[result.var] = result.value;
3412
3456
  }