@symbo.ls/uikit 2.11.14 → 2.11.16
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.
- package/dist/index.cjs.js +2870 -208
- package/dist/index.cjs.js.map +4 -4
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// node_modules/@symbo.ls/scratch/dist/cjs/index.js
|
|
34
34
|
var require_cjs = __commonJS({
|
|
35
|
-
"
|
|
35
|
+
"node_modules/@symbo.ls/scratch/dist/cjs/index.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var __create2 = Object.create;
|
|
38
38
|
var __defProp2 = Object.defineProperty;
|
|
@@ -64,7 +64,7 @@ var require_cjs = __commonJS({
|
|
|
64
64
|
mod
|
|
65
65
|
));
|
|
66
66
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
67
|
-
var
|
|
67
|
+
var require_cjs12 = __commonJS2({
|
|
68
68
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports2, module22) {
|
|
69
69
|
"use strict";
|
|
70
70
|
var __defProp22 = Object.defineProperty;
|
|
@@ -344,7 +344,7 @@ var require_cjs = __commonJS({
|
|
|
344
344
|
isNode: () => isNode
|
|
345
345
|
});
|
|
346
346
|
module22.exports = __toCommonJS22(node_exports);
|
|
347
|
-
var import_globals3 =
|
|
347
|
+
var import_globals3 = require_cjs12();
|
|
348
348
|
var isNode = (obj) => {
|
|
349
349
|
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
350
350
|
};
|
|
@@ -478,15 +478,17 @@ var require_cjs = __commonJS({
|
|
|
478
478
|
isEqualDeep: () => isEqualDeep,
|
|
479
479
|
map: () => map,
|
|
480
480
|
merge: () => merge52,
|
|
481
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray2,
|
|
482
|
+
mergeArray: () => mergeArray2,
|
|
483
|
+
mergeArrayExclude: () => mergeArrayExclude2,
|
|
481
484
|
mergeIfExisted: () => mergeIfExisted,
|
|
482
485
|
overwrite: () => overwrite,
|
|
483
486
|
overwriteDeep: () => overwriteDeep2,
|
|
484
487
|
overwriteObj: () => overwriteObj,
|
|
485
|
-
overwriteShallow: () => overwriteShallow2,
|
|
486
488
|
removeFromObject: () => removeFromObject2
|
|
487
489
|
});
|
|
488
490
|
module22.exports = __toCommonJS22(object_exports);
|
|
489
|
-
var import_globals3 =
|
|
491
|
+
var import_globals3 = require_cjs12();
|
|
490
492
|
var import_types = require_types2();
|
|
491
493
|
var exec6 = (param, element, state, context) => {
|
|
492
494
|
if ((0, import_types.isFunction)(param)) {
|
|
@@ -513,12 +515,12 @@ var require_cjs = __commonJS({
|
|
|
513
515
|
}
|
|
514
516
|
return element;
|
|
515
517
|
};
|
|
516
|
-
var deepMerge3 = (element, extend
|
|
518
|
+
var deepMerge3 = (element, extend) => {
|
|
517
519
|
for (const e2 in extend) {
|
|
518
|
-
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
519
|
-
continue;
|
|
520
520
|
const elementProp = element[e2];
|
|
521
521
|
const extendProp = extend[e2];
|
|
522
|
+
if (e2 === "parent" || e2 === "props")
|
|
523
|
+
continue;
|
|
522
524
|
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
523
525
|
deepMerge3(elementProp, extendProp);
|
|
524
526
|
} else if (elementProp === void 0) {
|
|
@@ -527,47 +529,53 @@ var require_cjs = __commonJS({
|
|
|
527
529
|
}
|
|
528
530
|
return element;
|
|
529
531
|
};
|
|
530
|
-
var clone = (obj
|
|
532
|
+
var clone = (obj) => {
|
|
531
533
|
const o = {};
|
|
532
534
|
for (const prop in obj) {
|
|
533
|
-
if (
|
|
535
|
+
if (prop === "node")
|
|
534
536
|
continue;
|
|
535
537
|
o[prop] = obj[prop];
|
|
536
538
|
}
|
|
537
539
|
return o;
|
|
538
540
|
};
|
|
539
|
-
var deepCloneExclude = (obj,
|
|
541
|
+
var deepCloneExclude = (obj, exclude = []) => {
|
|
540
542
|
if ((0, import_types.isArray)(obj)) {
|
|
541
|
-
return obj.map((x) => deepCloneExclude(x,
|
|
543
|
+
return obj.map((x) => deepCloneExclude(x, exclude));
|
|
542
544
|
}
|
|
543
545
|
const o = {};
|
|
544
546
|
for (const k in obj) {
|
|
545
|
-
if (
|
|
547
|
+
if (exclude.indexOf(k) > -1)
|
|
546
548
|
continue;
|
|
547
549
|
let v = obj[k];
|
|
548
550
|
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
549
|
-
v =
|
|
551
|
+
v = mergeArrayExclude2(v, exclude);
|
|
550
552
|
}
|
|
551
553
|
if ((0, import_types.isArray)(v)) {
|
|
552
|
-
o[k] = v.map((x) => deepCloneExclude(x,
|
|
554
|
+
o[k] = v.map((x) => deepCloneExclude(x, exclude));
|
|
553
555
|
} else if ((0, import_types.isObject)(v)) {
|
|
554
|
-
o[k] = deepCloneExclude(v,
|
|
556
|
+
o[k] = deepCloneExclude(v, exclude);
|
|
555
557
|
} else
|
|
556
558
|
o[k] = v;
|
|
557
559
|
}
|
|
558
560
|
return o;
|
|
559
561
|
};
|
|
560
|
-
var
|
|
561
|
-
|
|
562
|
+
var mergeArrayExclude2 = (arr, excl = []) => {
|
|
563
|
+
return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
|
|
564
|
+
};
|
|
565
|
+
var deepClone22 = (obj) => {
|
|
566
|
+
if ((0, import_types.isArray)(obj)) {
|
|
567
|
+
return obj.map(deepClone22);
|
|
568
|
+
}
|
|
569
|
+
const o = {};
|
|
562
570
|
for (const prop in obj) {
|
|
563
|
-
if (excludeFrom.includes(prop) || prop.includes("__"))
|
|
564
|
-
continue;
|
|
565
571
|
let objProp = obj[prop];
|
|
566
572
|
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
567
|
-
objProp =
|
|
573
|
+
objProp = mergeArray2(objProp);
|
|
568
574
|
}
|
|
569
|
-
if ((0, import_types.
|
|
570
|
-
o[prop] =
|
|
575
|
+
if ((0, import_types.isArray)(objProp)) {
|
|
576
|
+
o[prop] = objProp.map((v) => (0, import_types.isObject)(v) ? deepClone22(v) : v);
|
|
577
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
578
|
+
o[prop] = deepClone22(objProp);
|
|
571
579
|
} else
|
|
572
580
|
o[prop] = objProp;
|
|
573
581
|
}
|
|
@@ -669,11 +677,11 @@ var require_cjs = __commonJS({
|
|
|
669
677
|
}
|
|
670
678
|
return stringified;
|
|
671
679
|
};
|
|
672
|
-
var overwrite = (element, params,
|
|
680
|
+
var overwrite = (element, params, options) => {
|
|
673
681
|
const { ref } = element;
|
|
674
682
|
const changes = {};
|
|
675
683
|
for (const e2 in params) {
|
|
676
|
-
if (
|
|
684
|
+
if (e2 === "props")
|
|
677
685
|
continue;
|
|
678
686
|
const elementProp = element[e2];
|
|
679
687
|
const paramsProp = params[e2];
|
|
@@ -736,18 +744,8 @@ var require_cjs = __commonJS({
|
|
|
736
744
|
}
|
|
737
745
|
return changes;
|
|
738
746
|
};
|
|
739
|
-
var
|
|
740
|
-
for (const e2 in params) {
|
|
741
|
-
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
742
|
-
continue;
|
|
743
|
-
obj[e2] = params[e2];
|
|
744
|
-
}
|
|
745
|
-
return obj;
|
|
746
|
-
};
|
|
747
|
-
var overwriteDeep2 = (params, obj, excludeFrom = []) => {
|
|
747
|
+
var overwriteDeep2 = (params, obj) => {
|
|
748
748
|
for (const e2 in params) {
|
|
749
|
-
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
750
|
-
continue;
|
|
751
749
|
const objProp = obj[e2];
|
|
752
750
|
const paramsProp = params[e2];
|
|
753
751
|
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
@@ -763,8 +761,14 @@ var require_cjs = __commonJS({
|
|
|
763
761
|
return deepMerge3(a, b);
|
|
764
762
|
return a || b;
|
|
765
763
|
};
|
|
764
|
+
var mergeArray2 = (arr) => {
|
|
765
|
+
return arr.reduce((a, c) => deepMerge3(a, deepClone22(c)), {});
|
|
766
|
+
};
|
|
767
|
+
var mergeAndCloneIfArray2 = (obj) => {
|
|
768
|
+
return (0, import_types.isArray)(obj) ? mergeArray2(obj) : deepClone22(obj);
|
|
769
|
+
};
|
|
766
770
|
var flattenRecursive = (param, prop, stack = []) => {
|
|
767
|
-
const objectized =
|
|
771
|
+
const objectized = mergeAndCloneIfArray2(param);
|
|
768
772
|
stack.push(objectized);
|
|
769
773
|
const extendOfExtend = objectized[prop];
|
|
770
774
|
if (extendOfExtend)
|
|
@@ -880,13 +884,10 @@ var require_cjs = __commonJS({
|
|
|
880
884
|
__export22(array_exports, {
|
|
881
885
|
arrayContainsOtherArray: () => arrayContainsOtherArray2,
|
|
882
886
|
joinArrays: () => joinArrays,
|
|
883
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray2,
|
|
884
|
-
mergeArray: () => mergeArray2,
|
|
885
887
|
removeFromArray: () => removeFromArray2,
|
|
886
888
|
swapItemsInArray: () => swapItemsInArray
|
|
887
889
|
});
|
|
888
890
|
module22.exports = __toCommonJS22(array_exports);
|
|
889
|
-
var import_object = require_object2();
|
|
890
891
|
var import_types = require_types2();
|
|
891
892
|
var arrayContainsOtherArray2 = (arr1, arr2) => {
|
|
892
893
|
return arr2.every((val) => arr1.includes(val));
|
|
@@ -912,12 +913,6 @@ var require_cjs = __commonJS({
|
|
|
912
913
|
var joinArrays = (...arrays) => {
|
|
913
914
|
return [].concat(...arrays);
|
|
914
915
|
};
|
|
915
|
-
var mergeArray2 = (arr, excludeFrom = []) => {
|
|
916
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
917
|
-
};
|
|
918
|
-
var mergeAndCloneIfArray2 = (obj) => {
|
|
919
|
-
return (0, import_types.isArray)(obj) ? mergeArray2(obj) : (0, import_object.deepClone)(obj);
|
|
920
|
-
};
|
|
921
916
|
}
|
|
922
917
|
});
|
|
923
918
|
var require_log2 = __commonJS2({
|
|
@@ -1133,7 +1128,7 @@ var require_cjs = __commonJS({
|
|
|
1133
1128
|
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
1134
1129
|
setVariables: () => setVariables
|
|
1135
1130
|
});
|
|
1136
|
-
var import_globals = __toESM2(
|
|
1131
|
+
var import_globals = __toESM2(require_cjs12(), 1);
|
|
1137
1132
|
var ENV = "development";
|
|
1138
1133
|
var colorStringToRgbaArray = (color) => {
|
|
1139
1134
|
if (color === "")
|
|
@@ -2375,7 +2370,7 @@ var require_cjs = __commonJS({
|
|
|
2375
2370
|
lineHeight: TYPOGRAPHY2.lineHeight
|
|
2376
2371
|
});
|
|
2377
2372
|
};
|
|
2378
|
-
var import_globals2 = __toESM2(
|
|
2373
|
+
var import_globals2 = __toESM2(require_cjs12(), 1);
|
|
2379
2374
|
var DEF_OPTIONS = {
|
|
2380
2375
|
document: import_globals2.document
|
|
2381
2376
|
};
|
|
@@ -3884,7 +3879,7 @@ var require_cjs8 = __commonJS({
|
|
|
3884
3879
|
mod
|
|
3885
3880
|
));
|
|
3886
3881
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
3887
|
-
var
|
|
3882
|
+
var require_cjs12 = __commonJS2({
|
|
3888
3883
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports2, module22) {
|
|
3889
3884
|
"use strict";
|
|
3890
3885
|
var __defProp22 = Object.defineProperty;
|
|
@@ -4164,7 +4159,7 @@ var require_cjs8 = __commonJS({
|
|
|
4164
4159
|
isNode: () => isNode
|
|
4165
4160
|
});
|
|
4166
4161
|
module22.exports = __toCommonJS22(node_exports);
|
|
4167
|
-
var import_globals3 =
|
|
4162
|
+
var import_globals3 = require_cjs12();
|
|
4168
4163
|
var isNode = (obj) => {
|
|
4169
4164
|
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
4170
4165
|
};
|
|
@@ -4308,7 +4303,7 @@ var require_cjs8 = __commonJS({
|
|
|
4308
4303
|
removeFromObject: () => removeFromObject2
|
|
4309
4304
|
});
|
|
4310
4305
|
module22.exports = __toCommonJS22(object_exports);
|
|
4311
|
-
var import_globals3 =
|
|
4306
|
+
var import_globals3 = require_cjs12();
|
|
4312
4307
|
var import_types = require_types2();
|
|
4313
4308
|
var exec6 = (param, element, state, context) => {
|
|
4314
4309
|
if ((0, import_types.isFunction)(param)) {
|
|
@@ -4948,7 +4943,7 @@ var require_cjs8 = __commonJS({
|
|
|
4948
4943
|
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
4949
4944
|
setVariables: () => setVariables
|
|
4950
4945
|
});
|
|
4951
|
-
var import_globals = __toESM2(
|
|
4946
|
+
var import_globals = __toESM2(require_cjs12(), 1);
|
|
4952
4947
|
var ENV = "development";
|
|
4953
4948
|
var colorStringToRgbaArray = (color) => {
|
|
4954
4949
|
if (color === "")
|
|
@@ -6190,7 +6185,7 @@ var require_cjs8 = __commonJS({
|
|
|
6190
6185
|
lineHeight: TYPOGRAPHY2.lineHeight
|
|
6191
6186
|
});
|
|
6192
6187
|
};
|
|
6193
|
-
var import_globals2 = __toESM2(
|
|
6188
|
+
var import_globals2 = __toESM2(require_cjs12(), 1);
|
|
6194
6189
|
var DEF_OPTIONS = {
|
|
6195
6190
|
document: import_globals2.document
|
|
6196
6191
|
};
|
|
@@ -6600,9 +6595,9 @@ var require_cjs9 = __commonJS({
|
|
|
6600
6595
|
}
|
|
6601
6596
|
});
|
|
6602
6597
|
|
|
6603
|
-
//
|
|
6598
|
+
// ../../packages/scratch/dist/cjs/index.js
|
|
6604
6599
|
var require_cjs10 = __commonJS({
|
|
6605
|
-
"
|
|
6600
|
+
"../../packages/scratch/dist/cjs/index.js"(exports, module2) {
|
|
6606
6601
|
"use strict";
|
|
6607
6602
|
var __create2 = Object.create;
|
|
6608
6603
|
var __defProp2 = Object.defineProperty;
|
|
@@ -6634,7 +6629,7 @@ var require_cjs10 = __commonJS({
|
|
|
6634
6629
|
mod
|
|
6635
6630
|
));
|
|
6636
6631
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
6637
|
-
var
|
|
6632
|
+
var require_cjs12 = __commonJS2({
|
|
6638
6633
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports2, module22) {
|
|
6639
6634
|
"use strict";
|
|
6640
6635
|
var __defProp22 = Object.defineProperty;
|
|
@@ -6914,7 +6909,7 @@ var require_cjs10 = __commonJS({
|
|
|
6914
6909
|
isNode: () => isNode
|
|
6915
6910
|
});
|
|
6916
6911
|
module22.exports = __toCommonJS22(node_exports);
|
|
6917
|
-
var import_globals3 =
|
|
6912
|
+
var import_globals3 = require_cjs12();
|
|
6918
6913
|
var isNode = (obj) => {
|
|
6919
6914
|
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
6920
6915
|
};
|
|
@@ -7048,17 +7043,15 @@ var require_cjs10 = __commonJS({
|
|
|
7048
7043
|
isEqualDeep: () => isEqualDeep,
|
|
7049
7044
|
map: () => map,
|
|
7050
7045
|
merge: () => merge52,
|
|
7051
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray2,
|
|
7052
|
-
mergeArray: () => mergeArray2,
|
|
7053
|
-
mergeArrayExclude: () => mergeArrayExclude2,
|
|
7054
7046
|
mergeIfExisted: () => mergeIfExisted,
|
|
7055
7047
|
overwrite: () => overwrite,
|
|
7056
7048
|
overwriteDeep: () => overwriteDeep2,
|
|
7057
7049
|
overwriteObj: () => overwriteObj,
|
|
7050
|
+
overwriteShallow: () => overwriteShallow2,
|
|
7058
7051
|
removeFromObject: () => removeFromObject2
|
|
7059
7052
|
});
|
|
7060
7053
|
module22.exports = __toCommonJS22(object_exports);
|
|
7061
|
-
var import_globals3 =
|
|
7054
|
+
var import_globals3 = require_cjs12();
|
|
7062
7055
|
var import_types = require_types2();
|
|
7063
7056
|
var exec6 = (param, element, state, context) => {
|
|
7064
7057
|
if ((0, import_types.isFunction)(param)) {
|
|
@@ -7085,12 +7078,12 @@ var require_cjs10 = __commonJS({
|
|
|
7085
7078
|
}
|
|
7086
7079
|
return element;
|
|
7087
7080
|
};
|
|
7088
|
-
var deepMerge3 = (element, extend) => {
|
|
7081
|
+
var deepMerge3 = (element, extend, excludeFrom = []) => {
|
|
7089
7082
|
for (const e2 in extend) {
|
|
7083
|
+
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
7084
|
+
continue;
|
|
7090
7085
|
const elementProp = element[e2];
|
|
7091
7086
|
const extendProp = extend[e2];
|
|
7092
|
-
if (e2 === "parent" || e2 === "props")
|
|
7093
|
-
continue;
|
|
7094
7087
|
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
7095
7088
|
deepMerge3(elementProp, extendProp);
|
|
7096
7089
|
} else if (elementProp === void 0) {
|
|
@@ -7099,53 +7092,47 @@ var require_cjs10 = __commonJS({
|
|
|
7099
7092
|
}
|
|
7100
7093
|
return element;
|
|
7101
7094
|
};
|
|
7102
|
-
var clone = (obj) => {
|
|
7095
|
+
var clone = (obj, excludeFrom = []) => {
|
|
7103
7096
|
const o = {};
|
|
7104
7097
|
for (const prop in obj) {
|
|
7105
|
-
if (
|
|
7098
|
+
if (excludeFrom.includes(e) || e.includes("__"))
|
|
7106
7099
|
continue;
|
|
7107
7100
|
o[prop] = obj[prop];
|
|
7108
7101
|
}
|
|
7109
7102
|
return o;
|
|
7110
7103
|
};
|
|
7111
|
-
var deepCloneExclude = (obj,
|
|
7104
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
7112
7105
|
if ((0, import_types.isArray)(obj)) {
|
|
7113
|
-
return obj.map((x) => deepCloneExclude(x,
|
|
7106
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
7114
7107
|
}
|
|
7115
7108
|
const o = {};
|
|
7116
7109
|
for (const k in obj) {
|
|
7117
|
-
if (
|
|
7110
|
+
if (excludeFrom.includes(k) || k.includes("__"))
|
|
7118
7111
|
continue;
|
|
7119
7112
|
let v = obj[k];
|
|
7120
7113
|
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
7121
|
-
v =
|
|
7114
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
7122
7115
|
}
|
|
7123
7116
|
if ((0, import_types.isArray)(v)) {
|
|
7124
|
-
o[k] = v.map((x) => deepCloneExclude(x,
|
|
7117
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
7125
7118
|
} else if ((0, import_types.isObject)(v)) {
|
|
7126
|
-
o[k] = deepCloneExclude(v,
|
|
7119
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
7127
7120
|
} else
|
|
7128
7121
|
o[k] = v;
|
|
7129
7122
|
}
|
|
7130
7123
|
return o;
|
|
7131
7124
|
};
|
|
7132
|
-
var
|
|
7133
|
-
|
|
7134
|
-
};
|
|
7135
|
-
var deepClone22 = (obj) => {
|
|
7136
|
-
if ((0, import_types.isArray)(obj)) {
|
|
7137
|
-
return obj.map(deepClone22);
|
|
7138
|
-
}
|
|
7139
|
-
const o = {};
|
|
7125
|
+
var deepClone22 = (obj, excludeFrom = []) => {
|
|
7126
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
7140
7127
|
for (const prop in obj) {
|
|
7128
|
+
if (excludeFrom.includes(prop) || prop.includes("__"))
|
|
7129
|
+
continue;
|
|
7141
7130
|
let objProp = obj[prop];
|
|
7142
7131
|
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
7143
|
-
objProp =
|
|
7132
|
+
objProp = mergeArray(objProp);
|
|
7144
7133
|
}
|
|
7145
|
-
if ((0, import_types.
|
|
7146
|
-
o[prop] = objProp
|
|
7147
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
7148
|
-
o[prop] = deepClone22(objProp);
|
|
7134
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
7135
|
+
o[prop] = deepClone22(objProp, excludeFrom);
|
|
7149
7136
|
} else
|
|
7150
7137
|
o[prop] = objProp;
|
|
7151
7138
|
}
|
|
@@ -7247,11 +7234,11 @@ var require_cjs10 = __commonJS({
|
|
|
7247
7234
|
}
|
|
7248
7235
|
return stringified;
|
|
7249
7236
|
};
|
|
7250
|
-
var overwrite = (element, params,
|
|
7237
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
7251
7238
|
const { ref } = element;
|
|
7252
7239
|
const changes = {};
|
|
7253
7240
|
for (const e2 in params) {
|
|
7254
|
-
if (e2
|
|
7241
|
+
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
7255
7242
|
continue;
|
|
7256
7243
|
const elementProp = element[e2];
|
|
7257
7244
|
const paramsProp = params[e2];
|
|
@@ -7314,8 +7301,18 @@ var require_cjs10 = __commonJS({
|
|
|
7314
7301
|
}
|
|
7315
7302
|
return changes;
|
|
7316
7303
|
};
|
|
7317
|
-
var
|
|
7304
|
+
var overwriteShallow2 = (obj, params, excludeFrom = []) => {
|
|
7305
|
+
for (const e2 in params) {
|
|
7306
|
+
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
7307
|
+
continue;
|
|
7308
|
+
obj[e2] = params[e2];
|
|
7309
|
+
}
|
|
7310
|
+
return obj;
|
|
7311
|
+
};
|
|
7312
|
+
var overwriteDeep2 = (params, obj, excludeFrom = []) => {
|
|
7318
7313
|
for (const e2 in params) {
|
|
7314
|
+
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
7315
|
+
continue;
|
|
7319
7316
|
const objProp = obj[e2];
|
|
7320
7317
|
const paramsProp = params[e2];
|
|
7321
7318
|
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
@@ -7331,14 +7328,8 @@ var require_cjs10 = __commonJS({
|
|
|
7331
7328
|
return deepMerge3(a, b);
|
|
7332
7329
|
return a || b;
|
|
7333
7330
|
};
|
|
7334
|
-
var mergeArray2 = (arr) => {
|
|
7335
|
-
return arr.reduce((a, c) => deepMerge3(a, deepClone22(c)), {});
|
|
7336
|
-
};
|
|
7337
|
-
var mergeAndCloneIfArray2 = (obj) => {
|
|
7338
|
-
return (0, import_types.isArray)(obj) ? mergeArray2(obj) : deepClone22(obj);
|
|
7339
|
-
};
|
|
7340
7331
|
var flattenRecursive = (param, prop, stack = []) => {
|
|
7341
|
-
const objectized =
|
|
7332
|
+
const objectized = mergeAndCloneIfArray(param);
|
|
7342
7333
|
stack.push(objectized);
|
|
7343
7334
|
const extendOfExtend = objectized[prop];
|
|
7344
7335
|
if (extendOfExtend)
|
|
@@ -7454,10 +7445,13 @@ var require_cjs10 = __commonJS({
|
|
|
7454
7445
|
__export22(array_exports, {
|
|
7455
7446
|
arrayContainsOtherArray: () => arrayContainsOtherArray2,
|
|
7456
7447
|
joinArrays: () => joinArrays,
|
|
7448
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray2,
|
|
7449
|
+
mergeArray: () => mergeArray2,
|
|
7457
7450
|
removeFromArray: () => removeFromArray2,
|
|
7458
7451
|
swapItemsInArray: () => swapItemsInArray
|
|
7459
7452
|
});
|
|
7460
7453
|
module22.exports = __toCommonJS22(array_exports);
|
|
7454
|
+
var import_object = require_object2();
|
|
7461
7455
|
var import_types = require_types2();
|
|
7462
7456
|
var arrayContainsOtherArray2 = (arr1, arr2) => {
|
|
7463
7457
|
return arr2.every((val) => arr1.includes(val));
|
|
@@ -7483,6 +7477,12 @@ var require_cjs10 = __commonJS({
|
|
|
7483
7477
|
var joinArrays = (...arrays) => {
|
|
7484
7478
|
return [].concat(...arrays);
|
|
7485
7479
|
};
|
|
7480
|
+
var mergeArray2 = (arr, excludeFrom = []) => {
|
|
7481
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
7482
|
+
};
|
|
7483
|
+
var mergeAndCloneIfArray2 = (obj) => {
|
|
7484
|
+
return (0, import_types.isArray)(obj) ? mergeArray2(obj) : (0, import_object.deepClone)(obj);
|
|
7485
|
+
};
|
|
7486
7486
|
}
|
|
7487
7487
|
});
|
|
7488
7488
|
var require_log2 = __commonJS2({
|
|
@@ -7698,7 +7698,7 @@ var require_cjs10 = __commonJS({
|
|
|
7698
7698
|
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
7699
7699
|
setVariables: () => setVariables
|
|
7700
7700
|
});
|
|
7701
|
-
var import_globals = __toESM2(
|
|
7701
|
+
var import_globals = __toESM2(require_cjs12(), 1);
|
|
7702
7702
|
var ENV = "development";
|
|
7703
7703
|
var colorStringToRgbaArray = (color) => {
|
|
7704
7704
|
if (color === "")
|
|
@@ -8360,8 +8360,8 @@ var require_cjs10 = __commonJS({
|
|
|
8360
8360
|
setTheme: () => setTheme
|
|
8361
8361
|
});
|
|
8362
8362
|
var import_utils82 = __toESM2(require_cjs42(), 1);
|
|
8363
|
-
var getColor5 = (value, key) => {
|
|
8364
|
-
const CONFIG22 = getActiveConfig5();
|
|
8363
|
+
var getColor5 = (value, key, config) => {
|
|
8364
|
+
const CONFIG22 = config || getActiveConfig5();
|
|
8365
8365
|
if (!(0, import_utils82.isString)(value)) {
|
|
8366
8366
|
if (CONFIG22.verbose)
|
|
8367
8367
|
console.warn(value, "- type for color is not valid");
|
|
@@ -8386,34 +8386,32 @@ var require_cjs10 = __commonJS({
|
|
|
8386
8386
|
console.warn(value, " - does not have ", key);
|
|
8387
8387
|
}
|
|
8388
8388
|
let rgb = val.rgb;
|
|
8389
|
-
if (rgb)
|
|
8390
|
-
if (tone) {
|
|
8391
|
-
if (!val[tone]) {
|
|
8392
|
-
const toHex = rgbArrayToHex(rgb.split(", ").map((v) => parseFloat(v)));
|
|
8393
|
-
const abs2 = tone.slice(0, 1);
|
|
8394
|
-
if (abs2 === "-" || abs2 === "+") {
|
|
8395
|
-
rgb = hexToRgbArray(
|
|
8396
|
-
getColorShade(toHex, parseFloat(tone))
|
|
8397
|
-
).join(", ");
|
|
8398
|
-
} else {
|
|
8399
|
-
const [r, g, b] = [...rgb.split(", ").map((v) => parseInt(v))];
|
|
8400
|
-
const hsl = rgbToHSL(r, g, b);
|
|
8401
|
-
const [h, s, l] = hsl;
|
|
8402
|
-
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
8403
|
-
rgb = newRgb;
|
|
8404
|
-
}
|
|
8405
|
-
val[tone] = { rgb, var: `${val.var}-${tone}` };
|
|
8406
|
-
} else
|
|
8407
|
-
rgb = val[tone].rgb;
|
|
8408
|
-
}
|
|
8409
|
-
if (alpha)
|
|
8410
|
-
return `rgba(${rgb}, ${alpha})`;
|
|
8411
|
-
return CONFIG22.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
8412
|
-
} else
|
|
8389
|
+
if (!rgb)
|
|
8413
8390
|
return CONFIG22.useVariable ? `var(${val.var})` : val.value;
|
|
8391
|
+
if (tone && !val[tone]) {
|
|
8392
|
+
const toHex = rgbArrayToHex(rgb.split(", ").map((v) => parseFloat(v)));
|
|
8393
|
+
const abs2 = tone.slice(0, 1);
|
|
8394
|
+
if (abs2 === "-" || abs2 === "+") {
|
|
8395
|
+
rgb = hexToRgbArray(
|
|
8396
|
+
getColorShade(toHex, parseFloat(tone))
|
|
8397
|
+
).join(", ");
|
|
8398
|
+
} else {
|
|
8399
|
+
const [r, g, b] = [...rgb.split(", ").map((v) => parseInt(v))];
|
|
8400
|
+
const hsl = rgbToHSL(r, g, b);
|
|
8401
|
+
const [h, s, l] = hsl;
|
|
8402
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
8403
|
+
rgb = newRgb;
|
|
8404
|
+
}
|
|
8405
|
+
val[tone] = { rgb, var: `${val.var}-${tone}` };
|
|
8406
|
+
}
|
|
8407
|
+
if (val[tone])
|
|
8408
|
+
rgb = val[tone].rgb;
|
|
8409
|
+
if (alpha)
|
|
8410
|
+
return `rgba(${rgb}, ${alpha})`;
|
|
8411
|
+
return CONFIG22.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
8414
8412
|
};
|
|
8415
|
-
var getMediaColor9 = (value, globalTheme) => {
|
|
8416
|
-
const CONFIG22 = getActiveConfig5();
|
|
8413
|
+
var getMediaColor9 = (value, globalTheme, config) => {
|
|
8414
|
+
const CONFIG22 = config || getActiveConfig5();
|
|
8417
8415
|
if (!globalTheme)
|
|
8418
8416
|
globalTheme = CONFIG22.globalTheme;
|
|
8419
8417
|
if (!(0, import_utils82.isString)(value)) {
|
|
@@ -8428,16 +8426,16 @@ var require_cjs10 = __commonJS({
|
|
|
8428
8426
|
const val = COLOR2[name] || GRADIENT2[name];
|
|
8429
8427
|
const isObj = (0, import_utils82.isObject)(val);
|
|
8430
8428
|
if (isObj && val.value)
|
|
8431
|
-
return getColor5(value, `@${globalTheme}
|
|
8429
|
+
return getColor5(value, `@${globalTheme}`, config);
|
|
8432
8430
|
else if (isObj) {
|
|
8433
8431
|
if (globalTheme)
|
|
8434
|
-
return getColor5(value, `@${globalTheme}
|
|
8432
|
+
return getColor5(value, `@${globalTheme}`, config);
|
|
8435
8433
|
else {
|
|
8436
8434
|
const obj = {};
|
|
8437
8435
|
for (const mediaName in val) {
|
|
8438
8436
|
const query = CONFIG22.MEDIA[mediaName.slice(1)];
|
|
8439
8437
|
const media = `@media screen and ${query}`;
|
|
8440
|
-
obj[media] = getColor5(value, mediaName);
|
|
8438
|
+
obj[media] = getColor5(value, mediaName, config);
|
|
8441
8439
|
}
|
|
8442
8440
|
return obj;
|
|
8443
8441
|
}
|
|
@@ -8940,7 +8938,7 @@ var require_cjs10 = __commonJS({
|
|
|
8940
8938
|
lineHeight: TYPOGRAPHY2.lineHeight
|
|
8941
8939
|
});
|
|
8942
8940
|
};
|
|
8943
|
-
var import_globals2 = __toESM2(
|
|
8941
|
+
var import_globals2 = __toESM2(require_cjs12(), 1);
|
|
8944
8942
|
var DEF_OPTIONS = {
|
|
8945
8943
|
document: import_globals2.document
|
|
8946
8944
|
};
|
|
@@ -9038,7 +9036,7 @@ var require_cjs10 = __commonJS({
|
|
|
9038
9036
|
top: "0",
|
|
9039
9037
|
left: "0",
|
|
9040
9038
|
margin: "0",
|
|
9041
|
-
WebkitFontSmoothing: "antialiased",
|
|
9039
|
+
WebkitFontSmoothing: "subpixel-antialiased",
|
|
9042
9040
|
scrollBehavior: "smooth",
|
|
9043
9041
|
fontSize: TYPOGRAPHY2.browserDefault + "px",
|
|
9044
9042
|
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
@@ -9259,63 +9257,2722 @@ var require_cjs10 = __commonJS({
|
|
|
9259
9257
|
}
|
|
9260
9258
|
});
|
|
9261
9259
|
|
|
9262
|
-
// index.js
|
|
9263
|
-
var
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9260
|
+
// Notification/node_modules/@symbo.ls/scratch/dist/cjs/index.js
|
|
9261
|
+
var require_cjs11 = __commonJS({
|
|
9262
|
+
"Notification/node_modules/@symbo.ls/scratch/dist/cjs/index.js"(exports, module2) {
|
|
9263
|
+
"use strict";
|
|
9264
|
+
var __create2 = Object.create;
|
|
9265
|
+
var __defProp2 = Object.defineProperty;
|
|
9266
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
9267
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
9268
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
9269
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
9270
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
9271
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9272
|
+
};
|
|
9273
|
+
var __export2 = (target, all) => {
|
|
9274
|
+
for (var name in all)
|
|
9275
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
9276
|
+
};
|
|
9277
|
+
var __copyProps2 = (to, from2, except, desc) => {
|
|
9278
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9279
|
+
for (let key of __getOwnPropNames2(from2))
|
|
9280
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
9281
|
+
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
9282
|
+
}
|
|
9283
|
+
return to;
|
|
9284
|
+
};
|
|
9285
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
9286
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
9287
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
9288
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
9289
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
9290
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
9291
|
+
mod
|
|
9292
|
+
));
|
|
9293
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
9294
|
+
var require_cjs12 = __commonJS2({
|
|
9295
|
+
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports2, module22) {
|
|
9296
|
+
"use strict";
|
|
9297
|
+
var __defProp22 = Object.defineProperty;
|
|
9298
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9299
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9300
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9301
|
+
var __export22 = (target, all) => {
|
|
9302
|
+
for (var name in all)
|
|
9303
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
9304
|
+
};
|
|
9305
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9306
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9307
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9308
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9309
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9310
|
+
}
|
|
9311
|
+
return to;
|
|
9312
|
+
};
|
|
9313
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9314
|
+
var globals_exports = {};
|
|
9315
|
+
__export22(globals_exports, {
|
|
9316
|
+
document: () => document4,
|
|
9317
|
+
global: () => global,
|
|
9318
|
+
self: () => self,
|
|
9319
|
+
window: () => window3
|
|
9320
|
+
});
|
|
9321
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
9322
|
+
var global = globalThis;
|
|
9323
|
+
var self = globalThis;
|
|
9324
|
+
var window3 = globalThis;
|
|
9325
|
+
var document4 = window3.document;
|
|
9326
|
+
}
|
|
9327
|
+
});
|
|
9328
|
+
var require_cjs22 = __commonJS2({
|
|
9329
|
+
"../../node_modules/@domql/key/dist/cjs/index.js"(exports2, module22) {
|
|
9330
|
+
"use strict";
|
|
9331
|
+
var __defProp22 = Object.defineProperty;
|
|
9332
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9333
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9334
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9335
|
+
var __export22 = (target, all) => {
|
|
9336
|
+
for (var name in all)
|
|
9337
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
9338
|
+
};
|
|
9339
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9340
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9341
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9342
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9343
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9344
|
+
}
|
|
9345
|
+
return to;
|
|
9346
|
+
};
|
|
9347
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9348
|
+
var key_exports = {};
|
|
9349
|
+
__export22(key_exports, {
|
|
9350
|
+
createKey: () => createKey,
|
|
9351
|
+
createSnapshotId: () => createSnapshotId
|
|
9352
|
+
});
|
|
9353
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
9354
|
+
var createKey = function() {
|
|
9355
|
+
let index = 0;
|
|
9356
|
+
function newId() {
|
|
9357
|
+
index++;
|
|
9358
|
+
return index;
|
|
9359
|
+
}
|
|
9360
|
+
return newId;
|
|
9361
|
+
}();
|
|
9362
|
+
var createSnapshotId = createKey;
|
|
9363
|
+
}
|
|
9364
|
+
});
|
|
9365
|
+
var require_htmlTags2 = __commonJS2({
|
|
9366
|
+
"../../node_modules/@domql/tags/dist/cjs/htmlTags.js"(exports2, module22) {
|
|
9367
|
+
"use strict";
|
|
9368
|
+
var __defProp22 = Object.defineProperty;
|
|
9369
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9370
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9371
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9372
|
+
var __export22 = (target, all) => {
|
|
9373
|
+
for (var name in all)
|
|
9374
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
9375
|
+
};
|
|
9376
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9377
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9378
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9379
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9380
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9381
|
+
}
|
|
9382
|
+
return to;
|
|
9383
|
+
};
|
|
9384
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9385
|
+
var htmlTags_exports = {};
|
|
9386
|
+
__export22(htmlTags_exports, {
|
|
9387
|
+
HTML_TAGS: () => HTML_TAGS
|
|
9388
|
+
});
|
|
9389
|
+
module22.exports = __toCommonJS22(htmlTags_exports);
|
|
9390
|
+
var HTML_TAGS = {
|
|
9391
|
+
root: [
|
|
9392
|
+
"body",
|
|
9393
|
+
"html"
|
|
9394
|
+
],
|
|
9395
|
+
head: [
|
|
9396
|
+
"title",
|
|
9397
|
+
"base",
|
|
9398
|
+
"meta",
|
|
9399
|
+
"style"
|
|
9400
|
+
],
|
|
9401
|
+
body: [
|
|
9402
|
+
"string",
|
|
9403
|
+
"fragment",
|
|
9404
|
+
"a",
|
|
9405
|
+
"abbr",
|
|
9406
|
+
"acronym",
|
|
9407
|
+
"address",
|
|
9408
|
+
"applet",
|
|
9409
|
+
"area",
|
|
9410
|
+
"article",
|
|
9411
|
+
"aside",
|
|
9412
|
+
"audio",
|
|
9413
|
+
"b",
|
|
9414
|
+
"basefont",
|
|
9415
|
+
"bdi",
|
|
9416
|
+
"bdo",
|
|
9417
|
+
"big",
|
|
9418
|
+
"blockquote",
|
|
9419
|
+
"br",
|
|
9420
|
+
"button",
|
|
9421
|
+
"canvas",
|
|
9422
|
+
"caption",
|
|
9423
|
+
"center",
|
|
9424
|
+
"cite",
|
|
9425
|
+
"code",
|
|
9426
|
+
"col",
|
|
9427
|
+
"colgroup",
|
|
9428
|
+
"data",
|
|
9429
|
+
"datalist",
|
|
9430
|
+
"dd",
|
|
9431
|
+
"del",
|
|
9432
|
+
"details",
|
|
9433
|
+
"dfn",
|
|
9434
|
+
"dialog",
|
|
9435
|
+
"dir",
|
|
9436
|
+
"div",
|
|
9437
|
+
"dl",
|
|
9438
|
+
"dt",
|
|
9439
|
+
"em",
|
|
9440
|
+
"embed",
|
|
9441
|
+
"fieldset",
|
|
9442
|
+
"figcaption",
|
|
9443
|
+
"figure",
|
|
9444
|
+
"font",
|
|
9445
|
+
"footer",
|
|
9446
|
+
"form",
|
|
9447
|
+
"frame",
|
|
9448
|
+
"frameset",
|
|
9449
|
+
"h1",
|
|
9450
|
+
"h2",
|
|
9451
|
+
"h3",
|
|
9452
|
+
"h4",
|
|
9453
|
+
"h5",
|
|
9454
|
+
"h6",
|
|
9455
|
+
"head",
|
|
9456
|
+
"header",
|
|
9457
|
+
"hr",
|
|
9458
|
+
"i",
|
|
9459
|
+
"iframe",
|
|
9460
|
+
"img",
|
|
9461
|
+
"input",
|
|
9462
|
+
"ins",
|
|
9463
|
+
"kbd",
|
|
9464
|
+
"label",
|
|
9465
|
+
"legend",
|
|
9466
|
+
"li",
|
|
9467
|
+
"link",
|
|
9468
|
+
"main",
|
|
9469
|
+
"map",
|
|
9470
|
+
"mark",
|
|
9471
|
+
"meter",
|
|
9472
|
+
"nav",
|
|
9473
|
+
"noframes",
|
|
9474
|
+
"noscript",
|
|
9475
|
+
"object",
|
|
9476
|
+
"ol",
|
|
9477
|
+
"optgroup",
|
|
9478
|
+
"option",
|
|
9479
|
+
"output",
|
|
9480
|
+
"p",
|
|
9481
|
+
"param",
|
|
9482
|
+
"picture",
|
|
9483
|
+
"pre",
|
|
9484
|
+
"progress",
|
|
9485
|
+
"q",
|
|
9486
|
+
"rp",
|
|
9487
|
+
"rt",
|
|
9488
|
+
"ruby",
|
|
9489
|
+
"s",
|
|
9490
|
+
"samp",
|
|
9491
|
+
"script",
|
|
9492
|
+
"section",
|
|
9493
|
+
"select",
|
|
9494
|
+
"small",
|
|
9495
|
+
"source",
|
|
9496
|
+
"span",
|
|
9497
|
+
"strike",
|
|
9498
|
+
"strong",
|
|
9499
|
+
"sub",
|
|
9500
|
+
"summary",
|
|
9501
|
+
"sup",
|
|
9502
|
+
"table",
|
|
9503
|
+
"tbody",
|
|
9504
|
+
"td",
|
|
9505
|
+
"template",
|
|
9506
|
+
"textarea",
|
|
9507
|
+
"tfoot",
|
|
9508
|
+
"th",
|
|
9509
|
+
"thead",
|
|
9510
|
+
"time",
|
|
9511
|
+
"tr",
|
|
9512
|
+
"track",
|
|
9513
|
+
"tt",
|
|
9514
|
+
"u",
|
|
9515
|
+
"ul",
|
|
9516
|
+
"var",
|
|
9517
|
+
"video",
|
|
9518
|
+
"wbr",
|
|
9519
|
+
// SVG
|
|
9520
|
+
"svg",
|
|
9521
|
+
"path"
|
|
9522
|
+
]
|
|
9523
|
+
};
|
|
9524
|
+
}
|
|
9525
|
+
});
|
|
9526
|
+
var require_cjs32 = __commonJS2({
|
|
9527
|
+
"../../node_modules/@domql/tags/dist/cjs/index.js"(exports2, module22) {
|
|
9528
|
+
"use strict";
|
|
9529
|
+
var __defProp22 = Object.defineProperty;
|
|
9530
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9531
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9532
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9533
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9534
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9535
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9536
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9537
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9538
|
+
}
|
|
9539
|
+
return to;
|
|
9540
|
+
};
|
|
9541
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
9542
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9543
|
+
var tags_exports = {};
|
|
9544
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
9545
|
+
__reExport(tags_exports, require_htmlTags2(), module22.exports);
|
|
9546
|
+
}
|
|
9547
|
+
});
|
|
9548
|
+
var require_node2 = __commonJS2({
|
|
9549
|
+
"../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module22) {
|
|
9550
|
+
"use strict";
|
|
9551
|
+
var __defProp22 = Object.defineProperty;
|
|
9552
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9553
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9554
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9555
|
+
var __export22 = (target, all) => {
|
|
9556
|
+
for (var name in all)
|
|
9557
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
9558
|
+
};
|
|
9559
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9560
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9561
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9562
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9563
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9564
|
+
}
|
|
9565
|
+
return to;
|
|
9566
|
+
};
|
|
9567
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9568
|
+
var node_exports = {};
|
|
9569
|
+
__export22(node_exports, {
|
|
9570
|
+
isHtmlElement: () => isHtmlElement,
|
|
9571
|
+
isNode: () => isNode
|
|
9572
|
+
});
|
|
9573
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
9574
|
+
var import_globals3 = require_cjs12();
|
|
9575
|
+
var isNode = (obj) => {
|
|
9576
|
+
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
9577
|
+
};
|
|
9578
|
+
var isHtmlElement = (obj) => {
|
|
9579
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
9580
|
+
};
|
|
9581
|
+
}
|
|
9582
|
+
});
|
|
9583
|
+
var require_types2 = __commonJS2({
|
|
9584
|
+
"../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module22) {
|
|
9585
|
+
"use strict";
|
|
9586
|
+
var __defProp22 = Object.defineProperty;
|
|
9587
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9588
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9589
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9590
|
+
var __export22 = (target, all) => {
|
|
9591
|
+
for (var name in all)
|
|
9592
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
9593
|
+
};
|
|
9594
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9595
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9596
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9597
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9598
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9599
|
+
}
|
|
9600
|
+
return to;
|
|
9601
|
+
};
|
|
9602
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9603
|
+
var types_exports = {};
|
|
9604
|
+
__export22(types_exports, {
|
|
9605
|
+
TYPES: () => TYPES,
|
|
9606
|
+
is: () => is2,
|
|
9607
|
+
isArray: () => isArray52,
|
|
9608
|
+
isBoolean: () => isBoolean,
|
|
9609
|
+
isDefined: () => isDefined2,
|
|
9610
|
+
isFunction: () => isFunction22,
|
|
9611
|
+
isNot: () => isNot5,
|
|
9612
|
+
isNull: () => isNull,
|
|
9613
|
+
isNumber: () => isNumber,
|
|
9614
|
+
isObject: () => isObject72,
|
|
9615
|
+
isObjectLike: () => isObjectLike32,
|
|
9616
|
+
isString: () => isString8,
|
|
9617
|
+
isUndefined: () => isUndefined2,
|
|
9618
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
9619
|
+
});
|
|
9620
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
9621
|
+
var import_tags = require_cjs32();
|
|
9622
|
+
var import_node = require_node2();
|
|
9623
|
+
var isValidHtmlTag = (arg) => import_tags.HTML_TAGS.body.includes(arg);
|
|
9624
|
+
var isObject72 = (arg) => {
|
|
9625
|
+
if (arg === null)
|
|
9626
|
+
return false;
|
|
9627
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
9628
|
+
};
|
|
9629
|
+
var isString8 = (arg) => typeof arg === "string";
|
|
9630
|
+
var isNumber = (arg) => typeof arg === "number";
|
|
9631
|
+
var isFunction22 = (arg) => typeof arg === "function";
|
|
9632
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
9633
|
+
var isNull = (arg) => arg === null;
|
|
9634
|
+
var isArray52 = (arg) => Array.isArray(arg);
|
|
9635
|
+
var isObjectLike32 = (arg) => {
|
|
9636
|
+
if (arg === null)
|
|
9637
|
+
return false;
|
|
9638
|
+
return typeof arg === "object";
|
|
9639
|
+
};
|
|
9640
|
+
var isDefined2 = (arg) => {
|
|
9641
|
+
return isObject72(arg) || isObjectLike32(arg) || isString8(arg) || isNumber(arg) || isFunction22(arg) || isArray52(arg) || isObjectLike32(arg) || isBoolean(arg) || isNull(arg);
|
|
9642
|
+
};
|
|
9643
|
+
var isUndefined2 = (arg) => {
|
|
9644
|
+
return arg === void 0;
|
|
9645
|
+
};
|
|
9646
|
+
var TYPES = {
|
|
9647
|
+
boolean: isBoolean,
|
|
9648
|
+
array: isArray52,
|
|
9649
|
+
object: isObject72,
|
|
9650
|
+
string: isString8,
|
|
9651
|
+
number: isNumber,
|
|
9652
|
+
null: isNull,
|
|
9653
|
+
function: isFunction22,
|
|
9654
|
+
objectLike: isObjectLike32,
|
|
9655
|
+
node: import_node.isNode,
|
|
9656
|
+
htmlElement: import_node.isHtmlElement,
|
|
9657
|
+
defined: isDefined2
|
|
9658
|
+
};
|
|
9659
|
+
var is2 = (arg) => {
|
|
9660
|
+
return (...args) => {
|
|
9661
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
9662
|
+
};
|
|
9663
|
+
};
|
|
9664
|
+
var isNot5 = (arg) => {
|
|
9665
|
+
return (...args) => {
|
|
9666
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
9667
|
+
};
|
|
9668
|
+
};
|
|
9669
|
+
}
|
|
9670
|
+
});
|
|
9671
|
+
var require_object2 = __commonJS2({
|
|
9672
|
+
"../../node_modules/@domql/utils/dist/cjs/object.js"(exports2, module22) {
|
|
9673
|
+
"use strict";
|
|
9674
|
+
var __defProp22 = Object.defineProperty;
|
|
9675
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
9676
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
9677
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
9678
|
+
var __export22 = (target, all) => {
|
|
9679
|
+
for (var name in all)
|
|
9680
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
9681
|
+
};
|
|
9682
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
9683
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
9684
|
+
for (let key of __getOwnPropNames22(from2))
|
|
9685
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
9686
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
9687
|
+
}
|
|
9688
|
+
return to;
|
|
9689
|
+
};
|
|
9690
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
9691
|
+
var object_exports = {};
|
|
9692
|
+
__export22(object_exports, {
|
|
9693
|
+
clone: () => clone,
|
|
9694
|
+
deepClone: () => deepClone22,
|
|
9695
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
9696
|
+
deepDestringify: () => deepDestringify,
|
|
9697
|
+
deepMerge: () => deepMerge3,
|
|
9698
|
+
deepStringify: () => deepStringify,
|
|
9699
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
9700
|
+
diff: () => diff5,
|
|
9701
|
+
diffArrays: () => diffArrays,
|
|
9702
|
+
diffObjects: () => diffObjects,
|
|
9703
|
+
exec: () => exec6,
|
|
9704
|
+
flattenRecursive: () => flattenRecursive,
|
|
9705
|
+
isEqualDeep: () => isEqualDeep,
|
|
9706
|
+
map: () => map,
|
|
9707
|
+
merge: () => merge52,
|
|
9708
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray2,
|
|
9709
|
+
mergeArray: () => mergeArray2,
|
|
9710
|
+
mergeArrayExclude: () => mergeArrayExclude2,
|
|
9711
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
9712
|
+
overwrite: () => overwrite,
|
|
9713
|
+
overwriteDeep: () => overwriteDeep2,
|
|
9714
|
+
overwriteObj: () => overwriteObj,
|
|
9715
|
+
removeFromObject: () => removeFromObject2
|
|
9716
|
+
});
|
|
9717
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
9718
|
+
var import_globals3 = require_cjs12();
|
|
9719
|
+
var import_types = require_types2();
|
|
9720
|
+
var exec6 = (param, element, state, context) => {
|
|
9721
|
+
if ((0, import_types.isFunction)(param)) {
|
|
9722
|
+
return param(
|
|
9723
|
+
element,
|
|
9724
|
+
state || element.state,
|
|
9725
|
+
context || element.context
|
|
9726
|
+
);
|
|
9727
|
+
}
|
|
9728
|
+
return param;
|
|
9729
|
+
};
|
|
9730
|
+
var map = (obj, extention, element) => {
|
|
9731
|
+
for (const e2 in extention) {
|
|
9732
|
+
obj[e2] = exec6(extention[e2], element);
|
|
9733
|
+
}
|
|
9734
|
+
};
|
|
9735
|
+
var merge52 = (element, obj) => {
|
|
9736
|
+
for (const e2 in obj) {
|
|
9737
|
+
const elementProp = element[e2];
|
|
9738
|
+
const objProp = obj[e2];
|
|
9739
|
+
if (elementProp === void 0) {
|
|
9740
|
+
element[e2] = objProp;
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
return element;
|
|
9744
|
+
};
|
|
9745
|
+
var deepMerge3 = (element, extend) => {
|
|
9746
|
+
for (const e2 in extend) {
|
|
9747
|
+
const elementProp = element[e2];
|
|
9748
|
+
const extendProp = extend[e2];
|
|
9749
|
+
if (e2 === "parent" || e2 === "props")
|
|
9750
|
+
continue;
|
|
9751
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
9752
|
+
deepMerge3(elementProp, extendProp);
|
|
9753
|
+
} else if (elementProp === void 0) {
|
|
9754
|
+
element[e2] = extendProp;
|
|
9755
|
+
}
|
|
9756
|
+
}
|
|
9757
|
+
return element;
|
|
9758
|
+
};
|
|
9759
|
+
var clone = (obj) => {
|
|
9760
|
+
const o = {};
|
|
9761
|
+
for (const prop in obj) {
|
|
9762
|
+
if (prop === "node")
|
|
9763
|
+
continue;
|
|
9764
|
+
o[prop] = obj[prop];
|
|
9765
|
+
}
|
|
9766
|
+
return o;
|
|
9767
|
+
};
|
|
9768
|
+
var deepCloneExclude = (obj, exclude = []) => {
|
|
9769
|
+
if ((0, import_types.isArray)(obj)) {
|
|
9770
|
+
return obj.map((x) => deepCloneExclude(x, exclude));
|
|
9771
|
+
}
|
|
9772
|
+
const o = {};
|
|
9773
|
+
for (const k in obj) {
|
|
9774
|
+
if (exclude.indexOf(k) > -1)
|
|
9775
|
+
continue;
|
|
9776
|
+
let v = obj[k];
|
|
9777
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
9778
|
+
v = mergeArrayExclude2(v, exclude);
|
|
9779
|
+
}
|
|
9780
|
+
if ((0, import_types.isArray)(v)) {
|
|
9781
|
+
o[k] = v.map((x) => deepCloneExclude(x, exclude));
|
|
9782
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
9783
|
+
o[k] = deepCloneExclude(v, exclude);
|
|
9784
|
+
} else
|
|
9785
|
+
o[k] = v;
|
|
9786
|
+
}
|
|
9787
|
+
return o;
|
|
9788
|
+
};
|
|
9789
|
+
var mergeArrayExclude2 = (arr, excl = []) => {
|
|
9790
|
+
return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
|
|
9791
|
+
};
|
|
9792
|
+
var deepClone22 = (obj) => {
|
|
9793
|
+
if ((0, import_types.isArray)(obj)) {
|
|
9794
|
+
return obj.map(deepClone22);
|
|
9795
|
+
}
|
|
9796
|
+
const o = {};
|
|
9797
|
+
for (const prop in obj) {
|
|
9798
|
+
let objProp = obj[prop];
|
|
9799
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
9800
|
+
objProp = mergeArray2(objProp);
|
|
9801
|
+
}
|
|
9802
|
+
if ((0, import_types.isArray)(objProp)) {
|
|
9803
|
+
o[prop] = objProp.map((v) => (0, import_types.isObject)(v) ? deepClone22(v) : v);
|
|
9804
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
9805
|
+
o[prop] = deepClone22(objProp);
|
|
9806
|
+
} else
|
|
9807
|
+
o[prop] = objProp;
|
|
9808
|
+
}
|
|
9809
|
+
return o;
|
|
9810
|
+
};
|
|
9811
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
9812
|
+
for (const prop in obj) {
|
|
9813
|
+
const objProp = obj[prop];
|
|
9814
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
9815
|
+
stringified[prop] = objProp.toString();
|
|
9816
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
9817
|
+
stringified[prop] = {};
|
|
9818
|
+
deepStringify(objProp, stringified[prop]);
|
|
9819
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
9820
|
+
stringified[prop] = [];
|
|
9821
|
+
objProp.forEach((v, i) => {
|
|
9822
|
+
if ((0, import_types.isObject)(v)) {
|
|
9823
|
+
stringified[prop][i] = {};
|
|
9824
|
+
deepStringify(v, stringified[prop][i]);
|
|
9825
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
9826
|
+
stringified[prop][i] = v.toString();
|
|
9827
|
+
} else {
|
|
9828
|
+
stringified[prop][i] = v;
|
|
9829
|
+
}
|
|
9830
|
+
});
|
|
9831
|
+
} else {
|
|
9832
|
+
stringified[prop] = objProp;
|
|
9833
|
+
}
|
|
9834
|
+
}
|
|
9835
|
+
return stringified;
|
|
9836
|
+
};
|
|
9837
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
9838
|
+
for (const prop in obj) {
|
|
9839
|
+
const objProp = obj[prop];
|
|
9840
|
+
if ((0, import_types.isFunction)(objProp))
|
|
9841
|
+
continue;
|
|
9842
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
9843
|
+
detached[prop] = {};
|
|
9844
|
+
deepStringify(objProp, detached[prop]);
|
|
9845
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
9846
|
+
detached[prop] = [];
|
|
9847
|
+
objProp.forEach((v, i) => {
|
|
9848
|
+
if ((0, import_types.isFunction)(v))
|
|
9849
|
+
return;
|
|
9850
|
+
if ((0, import_types.isObject)(v)) {
|
|
9851
|
+
detached[prop][i] = {};
|
|
9852
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
9853
|
+
} else {
|
|
9854
|
+
detached[prop][i] = v;
|
|
9855
|
+
}
|
|
9856
|
+
});
|
|
9857
|
+
} else {
|
|
9858
|
+
detached[prop] = objProp;
|
|
9859
|
+
}
|
|
9860
|
+
}
|
|
9861
|
+
return detached;
|
|
9862
|
+
};
|
|
9863
|
+
var deepDestringify = (obj, stringified = {}) => {
|
|
9864
|
+
for (const prop in obj) {
|
|
9865
|
+
const objProp = obj[prop];
|
|
9866
|
+
if ((0, import_types.isString)(objProp)) {
|
|
9867
|
+
if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
|
|
9868
|
+
try {
|
|
9869
|
+
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
9870
|
+
stringified[prop] = evalProp;
|
|
9871
|
+
} catch (e2) {
|
|
9872
|
+
if (e2)
|
|
9873
|
+
stringified[prop] = objProp;
|
|
9874
|
+
}
|
|
9875
|
+
} else {
|
|
9876
|
+
stringified[prop] = objProp;
|
|
9877
|
+
}
|
|
9878
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
9879
|
+
stringified[prop] = [];
|
|
9880
|
+
objProp.forEach((arrProp) => {
|
|
9881
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
9882
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
9883
|
+
try {
|
|
9884
|
+
const evalProp = import_globals3.window.eval(`(${arrProp})`);
|
|
9885
|
+
stringified[prop].push(evalProp);
|
|
9886
|
+
} catch (e2) {
|
|
9887
|
+
if (e2)
|
|
9888
|
+
stringified[prop].push(arrProp);
|
|
9889
|
+
}
|
|
9890
|
+
} else {
|
|
9891
|
+
stringified[prop].push(arrProp);
|
|
9892
|
+
}
|
|
9893
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
9894
|
+
stringified[prop].push(deepDestringify(arrProp));
|
|
9895
|
+
} else {
|
|
9896
|
+
stringified[prop].push(arrProp);
|
|
9897
|
+
}
|
|
9898
|
+
});
|
|
9899
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
9900
|
+
stringified[prop] = deepDestringify(objProp, stringified[prop]);
|
|
9901
|
+
} else {
|
|
9902
|
+
stringified[prop] = objProp;
|
|
9903
|
+
}
|
|
9904
|
+
}
|
|
9905
|
+
return stringified;
|
|
9906
|
+
};
|
|
9907
|
+
var overwrite = (element, params, options) => {
|
|
9908
|
+
const { ref } = element;
|
|
9909
|
+
const changes = {};
|
|
9910
|
+
for (const e2 in params) {
|
|
9911
|
+
if (e2 === "props")
|
|
9912
|
+
continue;
|
|
9913
|
+
const elementProp = element[e2];
|
|
9914
|
+
const paramsProp = params[e2];
|
|
9915
|
+
if (paramsProp) {
|
|
9916
|
+
ref.__cache[e2] = changes[e2] = elementProp;
|
|
9917
|
+
ref[e2] = paramsProp;
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
9920
|
+
return changes;
|
|
9921
|
+
};
|
|
9922
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
9923
|
+
for (const e2 in objToDiff) {
|
|
9924
|
+
if (e2 === "ref")
|
|
9925
|
+
continue;
|
|
9926
|
+
const originalProp = original[e2];
|
|
9927
|
+
const objToDiffProp = objToDiff[e2];
|
|
9928
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
9929
|
+
cache[e2] = {};
|
|
9930
|
+
diff5(originalProp, objToDiffProp, cache[e2]);
|
|
9931
|
+
} else if (objToDiffProp !== void 0) {
|
|
9932
|
+
cache[e2] = objToDiffProp;
|
|
9933
|
+
}
|
|
9934
|
+
}
|
|
9935
|
+
return cache;
|
|
9936
|
+
};
|
|
9937
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
9938
|
+
if (original.length !== objToDiff.length) {
|
|
9939
|
+
cache = objToDiff;
|
|
9940
|
+
} else {
|
|
9941
|
+
const diffArr = [];
|
|
9942
|
+
for (let i = 0; i < original.length; i++) {
|
|
9943
|
+
const diffObj = diff5(original[i], objToDiff[i]);
|
|
9944
|
+
if (Object.keys(diffObj).length > 0) {
|
|
9945
|
+
diffArr.push(diffObj);
|
|
9946
|
+
}
|
|
9947
|
+
}
|
|
9948
|
+
if (diffArr.length > 0) {
|
|
9949
|
+
cache = diffArr;
|
|
9950
|
+
}
|
|
9951
|
+
}
|
|
9952
|
+
return cache;
|
|
9953
|
+
};
|
|
9954
|
+
var diff5 = (original, objToDiff, cache = {}) => {
|
|
9955
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
9956
|
+
cache = [];
|
|
9957
|
+
diffArrays(original, objToDiff, cache);
|
|
9958
|
+
} else {
|
|
9959
|
+
diffObjects(original, objToDiff, cache);
|
|
9960
|
+
}
|
|
9961
|
+
return cache;
|
|
9962
|
+
};
|
|
9963
|
+
var overwriteObj = (params, obj) => {
|
|
9964
|
+
const changes = {};
|
|
9965
|
+
for (const e2 in params) {
|
|
9966
|
+
const objProp = obj[e2];
|
|
9967
|
+
const paramsProp = params[e2];
|
|
9968
|
+
if (paramsProp) {
|
|
9969
|
+
obj[e2] = changes[e2] = objProp;
|
|
9970
|
+
}
|
|
9971
|
+
}
|
|
9972
|
+
return changes;
|
|
9973
|
+
};
|
|
9974
|
+
var overwriteDeep2 = (params, obj) => {
|
|
9975
|
+
for (const e2 in params) {
|
|
9976
|
+
const objProp = obj[e2];
|
|
9977
|
+
const paramsProp = params[e2];
|
|
9978
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
9979
|
+
overwriteDeep2(paramsProp, objProp);
|
|
9980
|
+
} else if (paramsProp !== void 0) {
|
|
9981
|
+
obj[e2] = paramsProp;
|
|
9982
|
+
}
|
|
9983
|
+
}
|
|
9984
|
+
return obj;
|
|
9985
|
+
};
|
|
9986
|
+
var mergeIfExisted = (a, b) => {
|
|
9987
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
9988
|
+
return deepMerge3(a, b);
|
|
9989
|
+
return a || b;
|
|
9990
|
+
};
|
|
9991
|
+
var mergeArray2 = (arr) => {
|
|
9992
|
+
return arr.reduce((a, c) => deepMerge3(a, deepClone22(c)), {});
|
|
9993
|
+
};
|
|
9994
|
+
var mergeAndCloneIfArray2 = (obj) => {
|
|
9995
|
+
return (0, import_types.isArray)(obj) ? mergeArray2(obj) : deepClone22(obj);
|
|
9996
|
+
};
|
|
9997
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
9998
|
+
const objectized = mergeAndCloneIfArray2(param);
|
|
9999
|
+
stack.push(objectized);
|
|
10000
|
+
const extendOfExtend = objectized[prop];
|
|
10001
|
+
if (extendOfExtend)
|
|
10002
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
10003
|
+
delete objectized[prop];
|
|
10004
|
+
return stack;
|
|
10005
|
+
};
|
|
10006
|
+
var isEqualDeep = (param, element) => {
|
|
10007
|
+
if (param === element)
|
|
10008
|
+
return true;
|
|
10009
|
+
if (!param || !element)
|
|
10010
|
+
return false;
|
|
10011
|
+
for (const prop in param) {
|
|
10012
|
+
const paramProp = param[prop];
|
|
10013
|
+
const elementProp = element[prop];
|
|
10014
|
+
if ((0, import_types.isObjectLike)(paramProp)) {
|
|
10015
|
+
const isEqual = isEqualDeep(paramProp, elementProp);
|
|
10016
|
+
if (!isEqual)
|
|
10017
|
+
return false;
|
|
10018
|
+
} else {
|
|
10019
|
+
const isEqual = paramProp === elementProp;
|
|
10020
|
+
if (!isEqual)
|
|
10021
|
+
return false;
|
|
10022
|
+
}
|
|
10023
|
+
}
|
|
10024
|
+
return true;
|
|
10025
|
+
};
|
|
10026
|
+
var removeFromObject2 = (obj, props3) => {
|
|
10027
|
+
if (props3 === void 0 || props3 === null)
|
|
10028
|
+
return obj;
|
|
10029
|
+
if ((0, import_types.is)(props3)("string", "number")) {
|
|
10030
|
+
delete obj[props3];
|
|
10031
|
+
} else if ((0, import_types.isArray)(props3)) {
|
|
10032
|
+
props3.forEach((prop) => delete obj[prop]);
|
|
10033
|
+
} else {
|
|
10034
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
10035
|
+
}
|
|
10036
|
+
return obj;
|
|
10037
|
+
};
|
|
10038
|
+
}
|
|
10039
|
+
});
|
|
10040
|
+
var require_function2 = __commonJS2({
|
|
10041
|
+
"../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module22) {
|
|
10042
|
+
"use strict";
|
|
10043
|
+
var __defProp22 = Object.defineProperty;
|
|
10044
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
10045
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
10046
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
10047
|
+
var __export22 = (target, all) => {
|
|
10048
|
+
for (var name in all)
|
|
10049
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
10050
|
+
};
|
|
10051
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
10052
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
10053
|
+
for (let key of __getOwnPropNames22(from2))
|
|
10054
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
10055
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
10056
|
+
}
|
|
10057
|
+
return to;
|
|
10058
|
+
};
|
|
10059
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
10060
|
+
var function_exports = {};
|
|
10061
|
+
__export22(function_exports, {
|
|
10062
|
+
debounce: () => debounce,
|
|
10063
|
+
memoize: () => memoize2
|
|
10064
|
+
});
|
|
10065
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
10066
|
+
var debounce = (element, func, timeout = 300) => {
|
|
10067
|
+
let timer;
|
|
10068
|
+
return (...args) => {
|
|
10069
|
+
clearTimeout(timer);
|
|
10070
|
+
timer = setTimeout(() => {
|
|
10071
|
+
func.apply(element, args);
|
|
10072
|
+
}, timeout);
|
|
10073
|
+
};
|
|
10074
|
+
};
|
|
10075
|
+
var memoize2 = (fn) => {
|
|
10076
|
+
const cache = {};
|
|
10077
|
+
return (...args) => {
|
|
10078
|
+
const n = args[0];
|
|
10079
|
+
if (n in cache) {
|
|
10080
|
+
return cache[n];
|
|
10081
|
+
} else {
|
|
10082
|
+
const result = fn(n);
|
|
10083
|
+
cache[n] = result;
|
|
10084
|
+
return result;
|
|
10085
|
+
}
|
|
10086
|
+
};
|
|
10087
|
+
};
|
|
10088
|
+
}
|
|
10089
|
+
});
|
|
10090
|
+
var require_array2 = __commonJS2({
|
|
10091
|
+
"../../node_modules/@domql/utils/dist/cjs/array.js"(exports2, module22) {
|
|
10092
|
+
"use strict";
|
|
10093
|
+
var __defProp22 = Object.defineProperty;
|
|
10094
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
10095
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
10096
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
10097
|
+
var __export22 = (target, all) => {
|
|
10098
|
+
for (var name in all)
|
|
10099
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
10100
|
+
};
|
|
10101
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
10102
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
10103
|
+
for (let key of __getOwnPropNames22(from2))
|
|
10104
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
10105
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
10106
|
+
}
|
|
10107
|
+
return to;
|
|
10108
|
+
};
|
|
10109
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
10110
|
+
var array_exports = {};
|
|
10111
|
+
__export22(array_exports, {
|
|
10112
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray2,
|
|
10113
|
+
joinArrays: () => joinArrays,
|
|
10114
|
+
removeFromArray: () => removeFromArray2,
|
|
10115
|
+
swapItemsInArray: () => swapItemsInArray
|
|
10116
|
+
});
|
|
10117
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
10118
|
+
var import_types = require_types2();
|
|
10119
|
+
var arrayContainsOtherArray2 = (arr1, arr2) => {
|
|
10120
|
+
return arr2.every((val) => arr1.includes(val));
|
|
10121
|
+
};
|
|
10122
|
+
var removeFromArray2 = (arr, index) => {
|
|
10123
|
+
if ((0, import_types.isString)(index))
|
|
10124
|
+
index = parseInt(index);
|
|
10125
|
+
if ((0, import_types.isNumber)(index)) {
|
|
10126
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
10127
|
+
throw new Error("Invalid index");
|
|
10128
|
+
}
|
|
10129
|
+
arr.splice(index, 1);
|
|
10130
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
10131
|
+
index.forEach((idx) => removeFromArray2(arr, idx));
|
|
10132
|
+
} else {
|
|
10133
|
+
throw new Error("Invalid index");
|
|
10134
|
+
}
|
|
10135
|
+
return arr;
|
|
10136
|
+
};
|
|
10137
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
10138
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
10139
|
+
};
|
|
10140
|
+
var joinArrays = (...arrays) => {
|
|
10141
|
+
return [].concat(...arrays);
|
|
10142
|
+
};
|
|
10143
|
+
}
|
|
10144
|
+
});
|
|
10145
|
+
var require_log2 = __commonJS2({
|
|
10146
|
+
"../../node_modules/@domql/utils/dist/cjs/log.js"(exports2, module22) {
|
|
10147
|
+
"use strict";
|
|
10148
|
+
var __defProp22 = Object.defineProperty;
|
|
10149
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
10150
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
10151
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
10152
|
+
var __export22 = (target, all) => {
|
|
10153
|
+
for (var name in all)
|
|
10154
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
10155
|
+
};
|
|
10156
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
10157
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
10158
|
+
for (let key of __getOwnPropNames22(from2))
|
|
10159
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
10160
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
10161
|
+
}
|
|
10162
|
+
return to;
|
|
10163
|
+
};
|
|
10164
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
10165
|
+
var log_exports = {};
|
|
10166
|
+
__export22(log_exports, {
|
|
10167
|
+
logGroupIf: () => logGroupIf,
|
|
10168
|
+
logIf: () => logIf
|
|
10169
|
+
});
|
|
10170
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
10171
|
+
var logIf = (bool, ...arg) => {
|
|
10172
|
+
if (bool)
|
|
10173
|
+
arg.map((v) => console.log(v));
|
|
10174
|
+
};
|
|
10175
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
10176
|
+
if (bool) {
|
|
10177
|
+
console.group(key);
|
|
10178
|
+
arg.map((v) => console.log(v));
|
|
10179
|
+
console.groupEnd(key);
|
|
10180
|
+
}
|
|
10181
|
+
};
|
|
10182
|
+
}
|
|
10183
|
+
});
|
|
10184
|
+
var require_cjs42 = __commonJS2({
|
|
10185
|
+
"../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module22) {
|
|
10186
|
+
"use strict";
|
|
10187
|
+
var __defProp22 = Object.defineProperty;
|
|
10188
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
10189
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
10190
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
10191
|
+
var __copyProps22 = (to, from2, except, desc) => {
|
|
10192
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
10193
|
+
for (let key of __getOwnPropNames22(from2))
|
|
10194
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
10195
|
+
__defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
|
|
10196
|
+
}
|
|
10197
|
+
return to;
|
|
10198
|
+
};
|
|
10199
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
10200
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
10201
|
+
var utils_exports2 = {};
|
|
10202
|
+
module22.exports = __toCommonJS22(utils_exports2);
|
|
10203
|
+
__reExport(utils_exports2, require_cjs22(), module22.exports);
|
|
10204
|
+
__reExport(utils_exports2, require_types2(), module22.exports);
|
|
10205
|
+
__reExport(utils_exports2, require_object2(), module22.exports);
|
|
10206
|
+
__reExport(utils_exports2, require_function2(), module22.exports);
|
|
10207
|
+
__reExport(utils_exports2, require_array2(), module22.exports);
|
|
10208
|
+
__reExport(utils_exports2, require_node2(), module22.exports);
|
|
10209
|
+
__reExport(utils_exports2, require_log2(), module22.exports);
|
|
10210
|
+
}
|
|
10211
|
+
});
|
|
10212
|
+
var src_exports = {};
|
|
10213
|
+
__export2(src_exports, {
|
|
10214
|
+
ANIMATION: () => ANIMATION,
|
|
10215
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
10216
|
+
CASES: () => CASES,
|
|
10217
|
+
COLOR: () => COLOR,
|
|
10218
|
+
CONFIG: () => CONFIG5,
|
|
10219
|
+
CSS_VARS: () => CSS_VARS,
|
|
10220
|
+
DEVICES: () => DEVICES,
|
|
10221
|
+
DOCUMENT: () => DOCUMENT,
|
|
10222
|
+
FACTORY: () => FACTORY,
|
|
10223
|
+
FONT: () => FONT,
|
|
10224
|
+
FONT_FACE: () => FONT_FACE,
|
|
10225
|
+
FONT_FAMILY: () => FONT_FAMILY,
|
|
10226
|
+
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
10227
|
+
GRADIENT: () => GRADIENT,
|
|
10228
|
+
ICONS: () => ICONS,
|
|
10229
|
+
MEDIA: () => MEDIA,
|
|
10230
|
+
RESET: () => RESET,
|
|
10231
|
+
SEQUENCE: () => SEQUENCE,
|
|
10232
|
+
SPACING: () => SPACING,
|
|
10233
|
+
SVG: () => SVG,
|
|
10234
|
+
SVG_DATA: () => SVG_DATA,
|
|
10235
|
+
THEME: () => THEME,
|
|
10236
|
+
TIMING: () => TIMING,
|
|
10237
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
10238
|
+
UNIT: () => UNIT,
|
|
10239
|
+
VALUE_TRANSFORMERS: () => VALUE_TRANSFORMERS,
|
|
10240
|
+
activateConfig: () => activateConfig,
|
|
10241
|
+
appendIconsSprite: () => appendIconsSprite,
|
|
10242
|
+
appendSVGSprite: () => appendSVGSprite,
|
|
10243
|
+
applyDocument: () => applyDocument,
|
|
10244
|
+
applyHeadings: () => applyHeadings,
|
|
10245
|
+
applyReset: () => applyReset,
|
|
10246
|
+
applySequenceVars: () => applySequenceVars,
|
|
10247
|
+
applySpacingSequence: () => applySpacingSequence,
|
|
10248
|
+
applyTimingSequence: () => applyTimingSequence,
|
|
10249
|
+
applyTypographySequence: () => applyTypographySequence,
|
|
10250
|
+
changeLightness: () => changeLightness,
|
|
10251
|
+
colorStringToRgbaArray: () => colorStringToRgbaArray,
|
|
10252
|
+
convertSvgToSymbol: () => convertSvgToSymbol,
|
|
10253
|
+
findHeadingLetter: () => findHeadingLetter,
|
|
10254
|
+
findHeadings: () => findHeadings,
|
|
10255
|
+
generateSequence: () => generateSequence,
|
|
10256
|
+
generateSprite: () => generateSprite,
|
|
10257
|
+
generateSubSequence: () => generateSubSequence,
|
|
10258
|
+
getActiveConfig: () => getActiveConfig5,
|
|
10259
|
+
getColor: () => getColor5,
|
|
10260
|
+
getColorShade: () => getColorShade,
|
|
10261
|
+
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
10262
|
+
getFontFace: () => getFontFace,
|
|
10263
|
+
getFontFaceEach: () => getFontFaceEach,
|
|
10264
|
+
getFontFaceEachString: () => getFontFaceEachString,
|
|
10265
|
+
getFontFaceString: () => getFontFaceString,
|
|
10266
|
+
getFontFamily: () => getFontFamily5,
|
|
10267
|
+
getFontFormat: () => getFontFormat,
|
|
10268
|
+
getFontSizeByKey: () => getFontSizeByKey5,
|
|
10269
|
+
getMediaColor: () => getMediaColor9,
|
|
10270
|
+
getMediaTheme: () => getMediaTheme5,
|
|
10271
|
+
getSequenceValue: () => getSequenceValue,
|
|
10272
|
+
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
10273
|
+
getSpacingBasedOnRatio: () => getSpacingBasedOnRatio13,
|
|
10274
|
+
getSpacingByKey: () => getSpacingByKey9,
|
|
10275
|
+
getTheme: () => getTheme5,
|
|
10276
|
+
getTimingByKey: () => getTimingByKey5,
|
|
10277
|
+
getTimingFunction: () => getTimingFunction9,
|
|
10278
|
+
hexToRgb: () => hexToRgb,
|
|
10279
|
+
hexToRgbArray: () => hexToRgbArray,
|
|
10280
|
+
hexToRgba: () => hexToRgba,
|
|
10281
|
+
hslToRgb: () => hslToRgb,
|
|
10282
|
+
mixTwoColors: () => mixTwoColors,
|
|
10283
|
+
mixTwoRgb: () => mixTwoRgb,
|
|
10284
|
+
mixTwoRgba: () => mixTwoRgba,
|
|
10285
|
+
numToLetterMap: () => numToLetterMap,
|
|
10286
|
+
opacify: () => opacify3,
|
|
10287
|
+
returnSubThemeOrDefault: () => returnSubThemeOrDefault,
|
|
10288
|
+
rgbArrayToHex: () => rgbArrayToHex,
|
|
10289
|
+
rgbToHSL: () => rgbToHSL,
|
|
10290
|
+
rgbToHex: () => rgbToHex,
|
|
10291
|
+
runThroughMedia: () => runThroughMedia,
|
|
10292
|
+
scratchSystem: () => system_exports,
|
|
10293
|
+
scratchUtils: () => utils_exports,
|
|
10294
|
+
set: () => set2,
|
|
10295
|
+
setActiveConfig: () => setActiveConfig,
|
|
10296
|
+
setColor: () => setColor,
|
|
10297
|
+
setCustomFont: () => setCustomFont,
|
|
10298
|
+
setCustomFontMedia: () => setCustomFontMedia,
|
|
10299
|
+
setEach: () => setEach,
|
|
10300
|
+
setFont: () => setFont,
|
|
10301
|
+
setFontFamily: () => setFontFamily,
|
|
10302
|
+
setGradient: () => setGradient,
|
|
10303
|
+
setIcon: () => setIcon,
|
|
10304
|
+
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
10305
|
+
setMediaTheme: () => setMediaTheme,
|
|
10306
|
+
setSVG: () => setSVG,
|
|
10307
|
+
setTheme: () => setTheme,
|
|
10308
|
+
setValue: () => setValue,
|
|
10309
|
+
setVariables: () => setVariables,
|
|
10310
|
+
splitTransition: () => splitTransition5,
|
|
10311
|
+
transformBackgroundImage: () => transformBackgroundImage5,
|
|
10312
|
+
transformBorder: () => transformBorder5,
|
|
10313
|
+
transformDuration: () => transformDuration5,
|
|
10314
|
+
transformShadow: () => transformShadow5,
|
|
10315
|
+
transformTextStroke: () => transformTextStroke5,
|
|
10316
|
+
transformTransition: () => transformTransition,
|
|
10317
|
+
transfromGap: () => transfromGap5
|
|
10318
|
+
});
|
|
10319
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
10320
|
+
var utils_exports = {};
|
|
10321
|
+
__export2(utils_exports, {
|
|
10322
|
+
applySequenceVars: () => applySequenceVars,
|
|
10323
|
+
changeLightness: () => changeLightness,
|
|
10324
|
+
colorStringToRgbaArray: () => colorStringToRgbaArray,
|
|
10325
|
+
convertSvgToSymbol: () => convertSvgToSymbol,
|
|
10326
|
+
findHeadingLetter: () => findHeadingLetter,
|
|
10327
|
+
findHeadings: () => findHeadings,
|
|
10328
|
+
generateSequence: () => generateSequence,
|
|
10329
|
+
generateSprite: () => generateSprite,
|
|
10330
|
+
generateSubSequence: () => generateSubSequence,
|
|
10331
|
+
getColorShade: () => getColorShade,
|
|
10332
|
+
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
10333
|
+
getFontFace: () => getFontFace,
|
|
10334
|
+
getFontFaceEach: () => getFontFaceEach,
|
|
10335
|
+
getFontFaceEachString: () => getFontFaceEachString,
|
|
10336
|
+
getFontFaceString: () => getFontFaceString,
|
|
10337
|
+
getFontFormat: () => getFontFormat,
|
|
10338
|
+
getSequenceValue: () => getSequenceValue,
|
|
10339
|
+
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
10340
|
+
hexToRgb: () => hexToRgb,
|
|
10341
|
+
hexToRgbArray: () => hexToRgbArray,
|
|
10342
|
+
hexToRgba: () => hexToRgba,
|
|
10343
|
+
hslToRgb: () => hslToRgb,
|
|
10344
|
+
mixTwoColors: () => mixTwoColors,
|
|
10345
|
+
mixTwoRgb: () => mixTwoRgb,
|
|
10346
|
+
mixTwoRgba: () => mixTwoRgba,
|
|
10347
|
+
numToLetterMap: () => numToLetterMap,
|
|
10348
|
+
opacify: () => opacify3,
|
|
10349
|
+
returnSubThemeOrDefault: () => returnSubThemeOrDefault,
|
|
10350
|
+
rgbArrayToHex: () => rgbArrayToHex,
|
|
10351
|
+
rgbToHSL: () => rgbToHSL,
|
|
10352
|
+
rgbToHex: () => rgbToHex,
|
|
10353
|
+
setCustomFont: () => setCustomFont,
|
|
10354
|
+
setCustomFontMedia: () => setCustomFontMedia,
|
|
10355
|
+
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
10356
|
+
setVariables: () => setVariables
|
|
10357
|
+
});
|
|
10358
|
+
var import_globals = __toESM2(require_cjs12(), 1);
|
|
10359
|
+
var ENV = "development";
|
|
10360
|
+
var colorStringToRgbaArray = (color) => {
|
|
10361
|
+
if (color === "")
|
|
10362
|
+
return;
|
|
10363
|
+
if (color.toLowerCase() === "transparent")
|
|
10364
|
+
return [0, 0, 0, 0];
|
|
10365
|
+
if (color[0] === "#") {
|
|
10366
|
+
if (color.length < 7) {
|
|
10367
|
+
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
10368
|
+
}
|
|
10369
|
+
return [
|
|
10370
|
+
parseInt(color.substr(1, 2), 16),
|
|
10371
|
+
parseInt(color.substr(3, 2), 16),
|
|
10372
|
+
parseInt(color.substr(5, 2), 16),
|
|
10373
|
+
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
10374
|
+
];
|
|
10375
|
+
}
|
|
10376
|
+
if (color.indexOf("rgb") === -1) {
|
|
10377
|
+
if (import_globals.document && import_globals.window) {
|
|
10378
|
+
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
10379
|
+
const flag = "rgb(1, 2, 3)";
|
|
10380
|
+
elem.style.color = flag;
|
|
10381
|
+
if (elem.style.color !== flag)
|
|
10382
|
+
return;
|
|
10383
|
+
elem.style.color = color;
|
|
10384
|
+
if (elem.style.color === flag || elem.style.color === "")
|
|
10385
|
+
return;
|
|
10386
|
+
color = import_globals.window.getComputedStyle(elem).color;
|
|
10387
|
+
import_globals.document.body.removeChild(elem);
|
|
10388
|
+
}
|
|
10389
|
+
}
|
|
10390
|
+
if (color.indexOf("rgb") === 0) {
|
|
10391
|
+
if (color.indexOf("rgba") === -1)
|
|
10392
|
+
color = `${color}, 1`;
|
|
10393
|
+
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
10394
|
+
}
|
|
10395
|
+
return [];
|
|
10396
|
+
};
|
|
10397
|
+
var mixTwoColors = (colorA, colorB, range = 0.5) => {
|
|
10398
|
+
colorA = colorStringToRgbaArray(colorA);
|
|
10399
|
+
colorB = colorStringToRgbaArray(colorB);
|
|
10400
|
+
return mixTwoRgba(colorA, colorB, range);
|
|
10401
|
+
};
|
|
10402
|
+
var hexToRgb = (hex, alpha = 1) => {
|
|
10403
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
10404
|
+
return `rgb(${r},${g},${b})`;
|
|
10405
|
+
};
|
|
10406
|
+
var hexToRgbArray = (hex, alpha = 1) => {
|
|
10407
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
10408
|
+
return [r, g, b];
|
|
10409
|
+
};
|
|
10410
|
+
var rgbToHex = (r, g, b) => {
|
|
10411
|
+
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
10412
|
+
};
|
|
10413
|
+
var rgbArrayToHex = ([r, g, b]) => {
|
|
10414
|
+
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
10415
|
+
};
|
|
10416
|
+
var hexToRgba = (hex, alpha = 1) => {
|
|
10417
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
10418
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
10419
|
+
};
|
|
10420
|
+
var mixTwoRgb = (colorA, colorB, range = 0.5) => {
|
|
10421
|
+
const arr = [];
|
|
10422
|
+
for (let i = 0; i < 3; i++) {
|
|
10423
|
+
arr[i] = ~~(colorA[i] + (colorB[i] - colorA[i]) * range);
|
|
10424
|
+
}
|
|
10425
|
+
return `rgb(${arr})`;
|
|
10426
|
+
};
|
|
10427
|
+
var changeLightness = (delta, hsl) => {
|
|
10428
|
+
const [hue, saturation, lightness] = hsl;
|
|
10429
|
+
const newLightness = Math.max(
|
|
10430
|
+
0,
|
|
10431
|
+
Math.min(100, lightness + parseFloat(delta))
|
|
10432
|
+
);
|
|
10433
|
+
return [hue, saturation, newLightness];
|
|
10434
|
+
};
|
|
10435
|
+
var rgbToHSL = (r, g, b) => {
|
|
10436
|
+
const a = Math.max(r, g, b);
|
|
10437
|
+
const n = a - Math.min(r, g, b);
|
|
10438
|
+
const f = 1 - Math.abs(a + a - n - 1);
|
|
10439
|
+
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
10440
|
+
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
10441
|
+
};
|
|
10442
|
+
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
10443
|
+
Math.min(k - 3, 9 - k, 1),
|
|
10444
|
+
-1
|
|
10445
|
+
)) => [f(0), f(8), f(4)];
|
|
10446
|
+
var getColorShade = (col, amt) => {
|
|
10447
|
+
const num = parseInt(col, 16);
|
|
10448
|
+
let r = (num >> 16) + amt;
|
|
10449
|
+
if (r > 255)
|
|
10450
|
+
r = 255;
|
|
10451
|
+
else if (r < 0)
|
|
10452
|
+
r = 0;
|
|
10453
|
+
let b = (num >> 8 & 255) + amt;
|
|
10454
|
+
if (b > 255)
|
|
10455
|
+
b = 255;
|
|
10456
|
+
else if (b < 0)
|
|
10457
|
+
b = 0;
|
|
10458
|
+
let g = (num & 255) + amt;
|
|
10459
|
+
if (g > 255)
|
|
10460
|
+
g = 255;
|
|
10461
|
+
else if (g < 0)
|
|
10462
|
+
g = 0;
|
|
10463
|
+
return (g | b << 8 | r << 16).toString(16);
|
|
10464
|
+
};
|
|
10465
|
+
var mixTwoRgba = (colorA, colorB, range = 0.5) => {
|
|
10466
|
+
const arr = [];
|
|
10467
|
+
for (let i = 0; i < 4; i++) {
|
|
10468
|
+
const round = i === 3 ? (x) => x : Math.round;
|
|
10469
|
+
arr[i] = round(
|
|
10470
|
+
colorA[i] + (colorB[i] - colorA[i]) * range
|
|
10471
|
+
);
|
|
10472
|
+
}
|
|
10473
|
+
return `rgba(${arr})`;
|
|
10474
|
+
};
|
|
10475
|
+
var opacify3 = (color, opacity) => {
|
|
10476
|
+
const arr = colorStringToRgbaArray(color);
|
|
10477
|
+
if (!arr) {
|
|
10478
|
+
if (ENV === "test" || ENV === "development")
|
|
10479
|
+
console.warn(color + "color is not rgba");
|
|
10480
|
+
return;
|
|
10481
|
+
}
|
|
10482
|
+
arr[3] = opacity;
|
|
10483
|
+
return `rgba(${arr})`;
|
|
10484
|
+
};
|
|
10485
|
+
var returnSubThemeOrDefault = (orig, theme) => {
|
|
10486
|
+
if (!orig)
|
|
10487
|
+
return;
|
|
10488
|
+
if (orig.themes && orig.themes[theme])
|
|
10489
|
+
return orig.themes[theme];
|
|
10490
|
+
if (orig[theme])
|
|
10491
|
+
return [orig, orig[theme]];
|
|
10492
|
+
return orig;
|
|
10493
|
+
};
|
|
10494
|
+
var getDefaultOrFirstKey = (LIBRARY, key) => {
|
|
10495
|
+
if (LIBRARY[key])
|
|
10496
|
+
return LIBRARY[key].value;
|
|
10497
|
+
if (LIBRARY.default)
|
|
10498
|
+
return LIBRARY[LIBRARY.default].value;
|
|
10499
|
+
const hasValue = Object.keys(LIBRARY)[0];
|
|
10500
|
+
return hasValue && LIBRARY[hasValue] && LIBRARY[hasValue].value;
|
|
10501
|
+
};
|
|
10502
|
+
var getFontFormat = (url) => url.split(/[#?]/)[0].split(".").pop().trim();
|
|
10503
|
+
var setInCustomFontMedia = (str) => `@font-face { ${str} }`;
|
|
10504
|
+
var setCustomFont = (name, url, weight) => `
|
|
10505
|
+
font-family: '${name}';
|
|
10506
|
+
font-style: normal;
|
|
10507
|
+
${weight && `font-weight: ${weight};`}
|
|
10508
|
+
src: url('${url}') format('${getFontFormat(url)}');`;
|
|
10509
|
+
var setCustomFontMedia = (name, url, weight) => `@font-face {
|
|
10510
|
+
${setCustomFont(name, url, weight)}
|
|
10511
|
+
}`;
|
|
10512
|
+
var getFontFaceEach = (name, weights) => {
|
|
10513
|
+
const keys = Object.keys(weights);
|
|
10514
|
+
return keys.map((key) => {
|
|
10515
|
+
const { url, fontWeight } = weights[key];
|
|
10516
|
+
return setCustomFont(name, url, fontWeight);
|
|
10517
|
+
});
|
|
10518
|
+
};
|
|
10519
|
+
var getFontFace = (LIBRARY) => {
|
|
10520
|
+
const keys = Object.keys(LIBRARY);
|
|
10521
|
+
return keys.map((key) => getFontFaceEach(key, LIBRARY[key].value));
|
|
10522
|
+
};
|
|
10523
|
+
var getFontFaceEachString = (name, weights) => {
|
|
10524
|
+
const isArr = weights[0];
|
|
10525
|
+
if (isArr)
|
|
10526
|
+
return getFontFaceEach(name, weights).map(setInCustomFontMedia);
|
|
10527
|
+
return setCustomFontMedia(name, weights.url);
|
|
10528
|
+
};
|
|
10529
|
+
var getFontFaceString = (LIBRARY) => {
|
|
10530
|
+
const keys = Object.keys(LIBRARY);
|
|
10531
|
+
return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
|
|
10532
|
+
};
|
|
10533
|
+
var import_utils42 = __toESM2(require_cjs42(), 1);
|
|
10534
|
+
var import_utils22 = __toESM2(require_cjs42());
|
|
10535
|
+
var import_utils21 = __toESM2(require_cjs42());
|
|
10536
|
+
var toCamelCase = (str) => {
|
|
10537
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
10538
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
10539
|
+
}).replaceAll(/\s+/g, "");
|
|
10540
|
+
};
|
|
10541
|
+
var toDashCase = (val) => val.replace(/[A-Z]/g, (match2, offset) => (offset > 0 ? "-" : "") + match2.toLowerCase()).replace(".", "-");
|
|
10542
|
+
var arrayzeValue = (val) => {
|
|
10543
|
+
if ((0, import_utils22.isString)(val))
|
|
10544
|
+
return val.split(" ");
|
|
10545
|
+
if ((0, import_utils22.isObject)(val))
|
|
10546
|
+
return Object.keys(val).map((v) => val[v]);
|
|
10547
|
+
if ((0, import_utils22.isArray)(val))
|
|
10548
|
+
return val;
|
|
10549
|
+
};
|
|
10550
|
+
var import_utils32 = __toESM2(require_cjs42(), 1);
|
|
10551
|
+
var defaultConfig_exports = {};
|
|
10552
|
+
__export2(defaultConfig_exports, {
|
|
10553
|
+
ANIMATION: () => ANIMATION,
|
|
10554
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
10555
|
+
CASES: () => CASES,
|
|
10556
|
+
COLOR: () => COLOR,
|
|
10557
|
+
DEVICES: () => DEVICES,
|
|
10558
|
+
DOCUMENT: () => DOCUMENT,
|
|
10559
|
+
FONT: () => FONT,
|
|
10560
|
+
FONT_FACE: () => FONT_FACE,
|
|
10561
|
+
FONT_FAMILY: () => FONT_FAMILY,
|
|
10562
|
+
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
10563
|
+
GRADIENT: () => GRADIENT,
|
|
10564
|
+
ICONS: () => ICONS,
|
|
10565
|
+
MEDIA: () => MEDIA,
|
|
10566
|
+
RESET: () => RESET,
|
|
10567
|
+
SEQUENCE: () => SEQUENCE,
|
|
10568
|
+
SPACING: () => SPACING,
|
|
10569
|
+
SVG: () => SVG,
|
|
10570
|
+
SVG_DATA: () => SVG_DATA,
|
|
10571
|
+
THEME: () => THEME,
|
|
10572
|
+
TIMING: () => TIMING,
|
|
10573
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
10574
|
+
UNIT: () => UNIT
|
|
10575
|
+
});
|
|
10576
|
+
var SEQUENCE = {
|
|
10577
|
+
"minor-second": 1.067,
|
|
10578
|
+
"major-second": 1.125,
|
|
10579
|
+
"minor-third": 1.2,
|
|
10580
|
+
"major-third": 1.25,
|
|
10581
|
+
"perfect-fourth": 1.333,
|
|
10582
|
+
"augmented-fourth": 1.414,
|
|
10583
|
+
"perfect-fifth": 1.5,
|
|
10584
|
+
"minor-sixth": 1.6,
|
|
10585
|
+
phi: 1.618,
|
|
10586
|
+
// golden-ratio
|
|
10587
|
+
"major-sixth": 1.667,
|
|
10588
|
+
"square-root-3": 1.732,
|
|
10589
|
+
// theodorus
|
|
10590
|
+
"minor-seventh": 1.778,
|
|
10591
|
+
"major-seventh": 1.875,
|
|
10592
|
+
octave: 2,
|
|
10593
|
+
"square-root-5": 2.23,
|
|
10594
|
+
// pythagoras
|
|
10595
|
+
"major-tenth": 2.5,
|
|
10596
|
+
"major-eleventh": 2.667,
|
|
10597
|
+
"major-twelfth": 3,
|
|
10598
|
+
pi: 3.14,
|
|
10599
|
+
// archimedes
|
|
10600
|
+
"double-octave": 4
|
|
10601
|
+
};
|
|
10602
|
+
var UNIT = {
|
|
10603
|
+
default: "em"
|
|
10604
|
+
};
|
|
10605
|
+
var defaultProps = {
|
|
10606
|
+
browserDefault: 16,
|
|
10607
|
+
base: 16,
|
|
10608
|
+
type: "font-size",
|
|
10609
|
+
ratio: SEQUENCE["minor-third"],
|
|
10610
|
+
range: [-3, 12],
|
|
10611
|
+
h1Matches: 6,
|
|
10612
|
+
lineHeight: 1.5,
|
|
10613
|
+
unit: "em",
|
|
10614
|
+
templates: {},
|
|
10615
|
+
sequence: {},
|
|
10616
|
+
scales: {},
|
|
10617
|
+
vars: {}
|
|
10618
|
+
};
|
|
10619
|
+
var TYPOGRAPHY = defaultProps;
|
|
10620
|
+
var FONT = {};
|
|
10621
|
+
var FONT_FAMILY = {};
|
|
10622
|
+
var FONT_FAMILY_TYPES = {
|
|
10623
|
+
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
10624
|
+
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
10625
|
+
monospace: "Courier New, monospace, --system-default"
|
|
10626
|
+
};
|
|
10627
|
+
var FONT_FACE = {};
|
|
10628
|
+
var MEDIA = {
|
|
10629
|
+
tv: "(min-width: 2780px)",
|
|
10630
|
+
screenL: "(max-width: 1920px)",
|
|
10631
|
+
"screenL<": "(min-width: 1920px)",
|
|
10632
|
+
screenM: "(max-width: 1680px)",
|
|
10633
|
+
"screenM<": "(min-width: 1680px)",
|
|
10634
|
+
screenS: "(max-width: 1440px)",
|
|
10635
|
+
"screenS<": "(min-width: 1440px)",
|
|
10636
|
+
tabletL: "(max-width: 1366px)",
|
|
10637
|
+
"tabletL<": "(min-width: 1366px)",
|
|
10638
|
+
tabletM: "(max-width: 1280px)",
|
|
10639
|
+
"tabletM<": "(min-width: 1280px)",
|
|
10640
|
+
tabletS: "(max-width: 1024px)",
|
|
10641
|
+
"tabletS<": "(min-width: 1024px)",
|
|
10642
|
+
mobileL: "(max-width: 768px)",
|
|
10643
|
+
"mobileL<": "(min-width: 768px)",
|
|
10644
|
+
mobileM: "(max-width: 560px)",
|
|
10645
|
+
"mobileM<": "(min-width: 560px)",
|
|
10646
|
+
mobileS: "(max-width: 480px)",
|
|
10647
|
+
"mobileS<": "(min-width: 480px)",
|
|
10648
|
+
mobileXS: "(max-width: 375px)",
|
|
10649
|
+
"mobileXS<": "(min-width: 375px)",
|
|
10650
|
+
light: "(prefers-color-scheme: light)",
|
|
10651
|
+
dark: "(prefers-color-scheme: dark)",
|
|
10652
|
+
print: "print"
|
|
10653
|
+
};
|
|
10654
|
+
var defaultProps2 = {
|
|
10655
|
+
base: TYPOGRAPHY.base,
|
|
10656
|
+
type: "spacing",
|
|
10657
|
+
ratio: SEQUENCE.phi,
|
|
10658
|
+
range: [-5, 15],
|
|
10659
|
+
subSequence: true,
|
|
10660
|
+
unit: "em",
|
|
10661
|
+
sequence: {},
|
|
10662
|
+
scales: {},
|
|
10663
|
+
vars: {}
|
|
10664
|
+
};
|
|
10665
|
+
var SPACING = defaultProps2;
|
|
10666
|
+
var COLOR = {};
|
|
10667
|
+
var GRADIENT = {};
|
|
10668
|
+
var THEME = {};
|
|
10669
|
+
var ICONS = {};
|
|
10670
|
+
var defaultProps3 = {
|
|
10671
|
+
default: 150,
|
|
10672
|
+
base: 150,
|
|
10673
|
+
type: "timing",
|
|
10674
|
+
ratio: SEQUENCE["perfect-fourth"],
|
|
10675
|
+
range: [-3, 12],
|
|
10676
|
+
unit: "ms",
|
|
10677
|
+
sequence: {},
|
|
10678
|
+
scales: {},
|
|
10679
|
+
vars: {}
|
|
10680
|
+
};
|
|
10681
|
+
var TIMING = defaultProps3;
|
|
10682
|
+
var DOCUMENT = {};
|
|
10683
|
+
var BREAKPOINTS = {
|
|
10684
|
+
screenL: 1920,
|
|
10685
|
+
screenM: 1680,
|
|
10686
|
+
screenS: 1440,
|
|
10687
|
+
tabletL: 1366,
|
|
10688
|
+
tabletM: 1280,
|
|
10689
|
+
tabletS: 1024,
|
|
10690
|
+
mobileL: 768,
|
|
10691
|
+
mobileM: 560,
|
|
10692
|
+
mobileS: 480,
|
|
10693
|
+
mobileXS: 375
|
|
10694
|
+
};
|
|
10695
|
+
var DEVICES = {
|
|
10696
|
+
screenL: [1920, 1024],
|
|
10697
|
+
screenM: [1680, 1024],
|
|
10698
|
+
screenS: [1440, 978],
|
|
10699
|
+
tabletL: [1366, 926],
|
|
10700
|
+
tabletM: [1280, 768],
|
|
10701
|
+
tabletS: [1024, 768],
|
|
10702
|
+
mobileL: [768, 375],
|
|
10703
|
+
mobileM: [560, 768],
|
|
10704
|
+
mobileS: [480, 768],
|
|
10705
|
+
mobileXS: [375, 768]
|
|
10706
|
+
};
|
|
10707
|
+
var CASES = {};
|
|
10708
|
+
var ANIMATION = {};
|
|
10709
|
+
var SVG = {};
|
|
10710
|
+
var SVG_DATA = {};
|
|
10711
|
+
var RESET = {};
|
|
10712
|
+
var CSS_VARS = {};
|
|
10713
|
+
var CONFIG5 = {
|
|
10714
|
+
verbose: false,
|
|
10715
|
+
useVariable: true,
|
|
10716
|
+
useReset: true,
|
|
10717
|
+
CSS_VARS,
|
|
10718
|
+
...defaultConfig_exports
|
|
10719
|
+
};
|
|
10720
|
+
var cachedConfig = (0, import_utils32.deepClone)(CONFIG5);
|
|
10721
|
+
var FACTORY = {
|
|
10722
|
+
active: "0",
|
|
10723
|
+
0: CONFIG5
|
|
10724
|
+
};
|
|
10725
|
+
var activateConfig = (def) => {
|
|
10726
|
+
if ((0, import_utils32.isDefined)(def)) {
|
|
10727
|
+
FACTORY.active = def;
|
|
10728
|
+
}
|
|
10729
|
+
return FACTORY[def || FACTORY.active];
|
|
10730
|
+
};
|
|
10731
|
+
var getActiveConfig5 = (def) => {
|
|
10732
|
+
return FACTORY[def || FACTORY.active];
|
|
10733
|
+
};
|
|
10734
|
+
var setActiveConfig = (newConfig) => {
|
|
10735
|
+
if (!(0, import_utils32.isObject)(newConfig))
|
|
10736
|
+
return;
|
|
10737
|
+
FACTORY.active = "1";
|
|
10738
|
+
FACTORY["1"] = (0, import_utils32.deepMerge)(newConfig, (0, import_utils32.deepClone)(cachedConfig));
|
|
10739
|
+
return newConfig;
|
|
10740
|
+
};
|
|
10741
|
+
var numToLetterMap = {
|
|
10742
|
+
"-6": "U",
|
|
10743
|
+
"-5": "V",
|
|
10744
|
+
"-4": "W",
|
|
10745
|
+
"-3": "X",
|
|
10746
|
+
"-2": "Y",
|
|
10747
|
+
"-1": "Z",
|
|
10748
|
+
0: "A",
|
|
10749
|
+
1: "B",
|
|
10750
|
+
2: "C",
|
|
10751
|
+
3: "D",
|
|
10752
|
+
4: "E",
|
|
10753
|
+
5: "F",
|
|
10754
|
+
6: "G",
|
|
10755
|
+
7: "H",
|
|
10756
|
+
8: "I",
|
|
10757
|
+
9: "J",
|
|
10758
|
+
10: "K",
|
|
10759
|
+
11: "L",
|
|
10760
|
+
12: "M",
|
|
10761
|
+
13: "N",
|
|
10762
|
+
14: "O",
|
|
10763
|
+
15: "P",
|
|
10764
|
+
16: "Q",
|
|
10765
|
+
17: "R",
|
|
10766
|
+
18: "S",
|
|
10767
|
+
19: "T"
|
|
10768
|
+
};
|
|
10769
|
+
var setSequenceValue = (props3, sequenceProps) => {
|
|
10770
|
+
const { key, variable, value, scaling, index } = props3;
|
|
10771
|
+
sequenceProps.sequence[key] = {
|
|
10772
|
+
key,
|
|
10773
|
+
decimal: ~~(value * 100) / 100,
|
|
10774
|
+
val: ~~value,
|
|
10775
|
+
scaling,
|
|
10776
|
+
index,
|
|
10777
|
+
variable
|
|
10778
|
+
};
|
|
10779
|
+
sequenceProps.scales[key] = scaling;
|
|
10780
|
+
sequenceProps.vars[variable] = scaling + sequenceProps.unit;
|
|
10781
|
+
};
|
|
10782
|
+
var generateSubSequence = (props3, sequenceProps) => {
|
|
10783
|
+
const { key, base, value, ratio, variable, index } = props3;
|
|
10784
|
+
const next2 = value * ratio;
|
|
10785
|
+
const diff5 = next2 - value;
|
|
10786
|
+
const smallscale = diff5 / 1.618;
|
|
10787
|
+
const valueRounded = ~~value;
|
|
10788
|
+
const nextRounded = ~~next2;
|
|
10789
|
+
const diffRounded = nextRounded - valueRounded;
|
|
10790
|
+
let arr = [];
|
|
10791
|
+
const first = next2 - smallscale;
|
|
10792
|
+
const second = value + smallscale;
|
|
10793
|
+
const middle = (first + second) / 2;
|
|
10794
|
+
if (diffRounded > 16)
|
|
10795
|
+
arr = [first, middle, second];
|
|
10796
|
+
else
|
|
10797
|
+
arr = [first, second];
|
|
10798
|
+
arr.map((v, k) => {
|
|
10799
|
+
const scaling = ~~(v / base * 1e3) / 1e3;
|
|
10800
|
+
const newVar = variable + (k + 1);
|
|
10801
|
+
const props22 = {
|
|
10802
|
+
key: key + (k + 1),
|
|
10803
|
+
variable: newVar,
|
|
10804
|
+
value: v,
|
|
10805
|
+
scaling,
|
|
10806
|
+
index: index + (k + 1) / 10
|
|
10807
|
+
};
|
|
10808
|
+
return setSequenceValue(props22, sequenceProps);
|
|
10809
|
+
});
|
|
10810
|
+
};
|
|
10811
|
+
var switchSequenceOnNegative = (key, base, ratio) => {
|
|
10812
|
+
return base * Math.pow(ratio, key);
|
|
10813
|
+
};
|
|
10814
|
+
var generateSequence = (sequenceProps) => {
|
|
10815
|
+
const { type, base, ratio, range, subSequence } = sequenceProps;
|
|
10816
|
+
const n = Math.abs(range[0]) + Math.abs(range[1]);
|
|
10817
|
+
const prefix2 = "--" + (type && type.replace(".", "-")) + "-";
|
|
10818
|
+
for (let i = 0; i <= n; i++) {
|
|
10819
|
+
const key = range[1] - i;
|
|
10820
|
+
const letterKey = numToLetterMap[key];
|
|
10821
|
+
const value = switchSequenceOnNegative(key, base, ratio);
|
|
10822
|
+
const scaling = ~~(value / base * 100) / 100;
|
|
10823
|
+
const variable = prefix2 + letterKey;
|
|
10824
|
+
const props3 = {
|
|
10825
|
+
key: letterKey,
|
|
10826
|
+
variable,
|
|
10827
|
+
value,
|
|
10828
|
+
base,
|
|
10829
|
+
scaling,
|
|
10830
|
+
ratio,
|
|
10831
|
+
index: key
|
|
10832
|
+
};
|
|
10833
|
+
setSequenceValue(props3, sequenceProps);
|
|
10834
|
+
if (subSequence)
|
|
10835
|
+
generateSubSequence(props3, sequenceProps);
|
|
10836
|
+
}
|
|
10837
|
+
return sequenceProps;
|
|
10838
|
+
};
|
|
10839
|
+
var getSequenceValue = (value = "A", sequenceProps) => {
|
|
10840
|
+
const CONFIG22 = getActiveConfig5();
|
|
10841
|
+
const { UNIT: UNIT2 } = CONFIG22;
|
|
10842
|
+
const {
|
|
10843
|
+
sequence,
|
|
10844
|
+
unit = UNIT2.default,
|
|
10845
|
+
useVariable
|
|
10846
|
+
} = sequenceProps;
|
|
10847
|
+
if ((0, import_utils42.isString)(value) && value.slice(0, 2) === "--")
|
|
10848
|
+
return `var(${value})`;
|
|
10849
|
+
const prefix2 = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
|
|
10850
|
+
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
10851
|
+
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
10852
|
+
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || !startsWithDashOrLetter)
|
|
10853
|
+
return value;
|
|
10854
|
+
const letterVal = value.toUpperCase();
|
|
10855
|
+
const isNegative = letterVal.slice(0, 1) === "-" ? "-" : "";
|
|
10856
|
+
let absValue = isNegative ? letterVal.slice(1) : letterVal;
|
|
10857
|
+
let mediaName = "";
|
|
10858
|
+
if (absValue.includes("-")) {
|
|
10859
|
+
mediaName = "-" + absValue.split("-")[1].toLowerCase();
|
|
10860
|
+
absValue = absValue.split("-")[0];
|
|
10861
|
+
}
|
|
10862
|
+
const varValue = (v) => `var(${prefix2}${v}${mediaName})`;
|
|
10863
|
+
if (absValue.includes("+")) {
|
|
10864
|
+
const args = absValue.split("+");
|
|
10865
|
+
const [first, second] = args;
|
|
10866
|
+
const joint = `${varValue(first)} + ${varValue(second)}`;
|
|
10867
|
+
return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
|
|
10868
|
+
} else if (absValue.includes("-")) {
|
|
10869
|
+
const args = absValue.split("-");
|
|
10870
|
+
const [first, second] = args;
|
|
10871
|
+
const joint = `${varValue(first)} - ${varValue(second)}`;
|
|
10872
|
+
return isNegative ? `calc((${joint}) * -1)` : `calc(${joint})`;
|
|
10873
|
+
}
|
|
10874
|
+
if (!sequence[absValue] && absValue.length === 2) {
|
|
10875
|
+
if (CONFIG22.verbose)
|
|
10876
|
+
console.warn(absValue, "- value is not found because `subSequence` is set to false");
|
|
10877
|
+
absValue = absValue.slice(0, 1);
|
|
10878
|
+
}
|
|
10879
|
+
if (useVariable || CONFIG22.useVariable) {
|
|
10880
|
+
const varValue2 = `var(${prefix2}${absValue}${mediaName})`;
|
|
10881
|
+
return isNegative ? `calc(${varValue2} * -1)` : varValue2;
|
|
10882
|
+
}
|
|
10883
|
+
const sequenceItem = sequence ? sequence[absValue] : null;
|
|
10884
|
+
if (!sequenceItem)
|
|
10885
|
+
return console.warn("can't find", sequence, absValue);
|
|
10886
|
+
if (unit === "ms" || unit === "s") {
|
|
10887
|
+
return isNegative + sequenceItem.val + unit;
|
|
10888
|
+
}
|
|
10889
|
+
return isNegative + sequenceItem.scaling + unit;
|
|
10890
|
+
};
|
|
10891
|
+
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
10892
|
+
if (typeof value !== "string") {
|
|
10893
|
+
console.warn(propertyName, value, "is not a string");
|
|
10894
|
+
return {};
|
|
10895
|
+
}
|
|
10896
|
+
if (value === "-" || value === "")
|
|
10897
|
+
return {};
|
|
10898
|
+
return { [propertyName]: getSequenceValue(value, sequenceProps) };
|
|
10899
|
+
};
|
|
10900
|
+
var findHeadingLetter = (h1Matches, index) => numToLetterMap[h1Matches - index];
|
|
10901
|
+
var findHeadings = (propertyNames) => {
|
|
10902
|
+
const { h1Matches, sequence } = propertyNames;
|
|
10903
|
+
return new Array(6).fill(null).map((_, i) => {
|
|
10904
|
+
const findLetter = findHeadingLetter(h1Matches, i);
|
|
10905
|
+
return sequence[findLetter];
|
|
10906
|
+
});
|
|
10907
|
+
};
|
|
10908
|
+
var import_utils62 = __toESM2(require_cjs42(), 1);
|
|
10909
|
+
var setVariables = (result, key) => {
|
|
10910
|
+
const CONFIG22 = getActiveConfig5();
|
|
10911
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
10912
|
+
if ((0, import_utils62.isObjectLike)(result.value)) {
|
|
10913
|
+
} else {
|
|
10914
|
+
CSS_VARS2[result.var] = result.value;
|
|
10915
|
+
}
|
|
10916
|
+
};
|
|
10917
|
+
var applySequenceVars = (props3, mediaName, options = {}) => {
|
|
10918
|
+
const CONFIG22 = getActiveConfig5();
|
|
10919
|
+
const { UNIT: UNIT2, MEDIA: MEDIA2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
10920
|
+
const unit = props3.unit || UNIT2.default;
|
|
10921
|
+
const { sequence, scales } = props3;
|
|
10922
|
+
for (const key in sequence) {
|
|
10923
|
+
const item = sequence[key];
|
|
10924
|
+
const value = (props3.type === TIMING2.type ? sequence[key].val : scales[key]) + unit;
|
|
10925
|
+
if (mediaName) {
|
|
10926
|
+
const query = MEDIA2[mediaName];
|
|
10927
|
+
if (!query) {
|
|
10928
|
+
if (CONFIG22.verbose)
|
|
10929
|
+
console.warn("Can't find query ", query);
|
|
10930
|
+
}
|
|
10931
|
+
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
10932
|
+
if (!underMediaQuery)
|
|
10933
|
+
underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
10934
|
+
underMediaQuery[item.variable] = `var(${item.variable + "-" + mediaName})`;
|
|
10935
|
+
CSS_VARS2[item.variable + "-" + mediaName] = value;
|
|
10936
|
+
} else {
|
|
10937
|
+
if (options.useDefault === false) {
|
|
10938
|
+
CSS_VARS2[item.variable] = value;
|
|
10939
|
+
} else {
|
|
10940
|
+
CSS_VARS2[item.variable + "-default"] = value;
|
|
10941
|
+
CSS_VARS2[item.variable] = `var(${item.variable + "-default"})`;
|
|
10942
|
+
}
|
|
10943
|
+
}
|
|
10944
|
+
}
|
|
10945
|
+
};
|
|
10946
|
+
var import_utils72 = __toESM2(require_cjs42(), 1);
|
|
10947
|
+
var generateSprite = (icons) => {
|
|
10948
|
+
const CONFIG22 = getActiveConfig5();
|
|
10949
|
+
let sprite = "";
|
|
10950
|
+
for (const key in icons) {
|
|
10951
|
+
if (CONFIG22.__svg_cache[key])
|
|
10952
|
+
continue;
|
|
10953
|
+
else
|
|
10954
|
+
CONFIG22.__svg_cache[key] = true;
|
|
10955
|
+
sprite += icons[key];
|
|
10956
|
+
}
|
|
10957
|
+
return sprite;
|
|
10958
|
+
};
|
|
10959
|
+
var parseRootAttributes = (htmlString) => {
|
|
10960
|
+
if (!(0, import_utils72.isString)(htmlString)) {
|
|
10961
|
+
return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
|
|
10962
|
+
}
|
|
10963
|
+
const match2 = htmlString.match(/<svg\s+(.*?)>/);
|
|
10964
|
+
if (!match2 || !match2[1]) {
|
|
10965
|
+
return {};
|
|
10966
|
+
}
|
|
10967
|
+
const attrString = match2[1];
|
|
10968
|
+
const attrs = attrString.match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);
|
|
10969
|
+
return attrs.reduce((acc, attr) => {
|
|
10970
|
+
const [key, value] = attr.split("=");
|
|
10971
|
+
acc[key] = value.replace(/['"]/g, "");
|
|
10972
|
+
return acc;
|
|
10973
|
+
}, {});
|
|
10974
|
+
};
|
|
10975
|
+
var convertSvgToSymbol = (key, code) => {
|
|
10976
|
+
const extractAttrs = parseRootAttributes(code);
|
|
10977
|
+
const { width, height } = extractAttrs;
|
|
10978
|
+
const viewBox = extractAttrs.viewBox || `0 0 ${width || 24} ${height || 24}`;
|
|
10979
|
+
const xmlns = "http://www.w3.org/2000/svg";
|
|
10980
|
+
let symbol = code.replace(
|
|
10981
|
+
"<svg",
|
|
10982
|
+
`<symbol id="${key}" xmlns="${xmlns}" viewBox="${viewBox}"`
|
|
10983
|
+
);
|
|
10984
|
+
symbol = symbol.replace(/width="[^"]*"/, "");
|
|
10985
|
+
symbol = symbol.replace(/height="[^"]*"/, "");
|
|
10986
|
+
symbol = symbol.replace("</svg", "</symbol");
|
|
10987
|
+
return symbol;
|
|
10988
|
+
};
|
|
10989
|
+
var system_exports = {};
|
|
10990
|
+
__export2(system_exports, {
|
|
10991
|
+
appendIconsSprite: () => appendIconsSprite,
|
|
10992
|
+
appendSVGSprite: () => appendSVGSprite,
|
|
10993
|
+
applyDocument: () => applyDocument,
|
|
10994
|
+
applyHeadings: () => applyHeadings,
|
|
10995
|
+
applyReset: () => applyReset,
|
|
10996
|
+
applySpacingSequence: () => applySpacingSequence,
|
|
10997
|
+
applyTimingSequence: () => applyTimingSequence,
|
|
10998
|
+
applyTypographySequence: () => applyTypographySequence,
|
|
10999
|
+
getColor: () => getColor5,
|
|
11000
|
+
getFontFamily: () => getFontFamily5,
|
|
11001
|
+
getFontSizeByKey: () => getFontSizeByKey5,
|
|
11002
|
+
getMediaColor: () => getMediaColor9,
|
|
11003
|
+
getMediaTheme: () => getMediaTheme5,
|
|
11004
|
+
getSpacingBasedOnRatio: () => getSpacingBasedOnRatio13,
|
|
11005
|
+
getSpacingByKey: () => getSpacingByKey9,
|
|
11006
|
+
getTheme: () => getTheme5,
|
|
11007
|
+
getTimingByKey: () => getTimingByKey5,
|
|
11008
|
+
getTimingFunction: () => getTimingFunction9,
|
|
11009
|
+
runThroughMedia: () => runThroughMedia,
|
|
11010
|
+
setColor: () => setColor,
|
|
11011
|
+
setFont: () => setFont,
|
|
11012
|
+
setFontFamily: () => setFontFamily,
|
|
11013
|
+
setGradient: () => setGradient,
|
|
11014
|
+
setIcon: () => setIcon,
|
|
11015
|
+
setMediaTheme: () => setMediaTheme,
|
|
11016
|
+
setSVG: () => setSVG,
|
|
11017
|
+
setTheme: () => setTheme
|
|
11018
|
+
});
|
|
11019
|
+
var import_utils82 = __toESM2(require_cjs42(), 1);
|
|
11020
|
+
var getColor5 = (value, key) => {
|
|
11021
|
+
const CONFIG22 = getActiveConfig5();
|
|
11022
|
+
if (!(0, import_utils82.isString)(value)) {
|
|
11023
|
+
if (CONFIG22.verbose)
|
|
11024
|
+
console.warn(value, "- type for color is not valid");
|
|
11025
|
+
return;
|
|
11026
|
+
}
|
|
11027
|
+
if (value.slice(0, 2) === "--")
|
|
11028
|
+
return `var(${value})`;
|
|
11029
|
+
if (key && value[key])
|
|
11030
|
+
value = value[key];
|
|
11031
|
+
const [name, alpha, tone] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
11032
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
11033
|
+
let val = COLOR2[name] || GRADIENT2[name];
|
|
11034
|
+
if (!val) {
|
|
11035
|
+
if (CONFIG22.verbose)
|
|
11036
|
+
console.warn("Can't find color ", name);
|
|
11037
|
+
return value;
|
|
11038
|
+
}
|
|
11039
|
+
if (key) {
|
|
11040
|
+
if (val[key])
|
|
11041
|
+
val = val[key];
|
|
11042
|
+
else if (CONFIG22.verbose)
|
|
11043
|
+
console.warn(value, " - does not have ", key);
|
|
11044
|
+
}
|
|
11045
|
+
let rgb = val.rgb;
|
|
11046
|
+
if (rgb) {
|
|
11047
|
+
if (tone) {
|
|
11048
|
+
if (!val[tone]) {
|
|
11049
|
+
const toHex = rgbArrayToHex(rgb.split(", ").map((v) => parseFloat(v)));
|
|
11050
|
+
const abs2 = tone.slice(0, 1);
|
|
11051
|
+
if (abs2 === "-" || abs2 === "+") {
|
|
11052
|
+
rgb = hexToRgbArray(
|
|
11053
|
+
getColorShade(toHex, parseFloat(tone))
|
|
11054
|
+
).join(", ");
|
|
11055
|
+
} else {
|
|
11056
|
+
const [r, g, b] = [...rgb.split(", ").map((v) => parseInt(v))];
|
|
11057
|
+
const hsl = rgbToHSL(r, g, b);
|
|
11058
|
+
const [h, s, l] = hsl;
|
|
11059
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
11060
|
+
rgb = newRgb;
|
|
11061
|
+
}
|
|
11062
|
+
val[tone] = { rgb, var: `${val.var}-${tone}` };
|
|
11063
|
+
} else
|
|
11064
|
+
rgb = val[tone].rgb;
|
|
11065
|
+
}
|
|
11066
|
+
if (alpha)
|
|
11067
|
+
return `rgba(${rgb}, ${alpha})`;
|
|
11068
|
+
return CONFIG22.useVariable ? `var(${val.var})` : `rgb(${rgb})`;
|
|
11069
|
+
} else
|
|
11070
|
+
return CONFIG22.useVariable ? `var(${val.var})` : val.value;
|
|
11071
|
+
};
|
|
11072
|
+
var getMediaColor9 = (value, globalTheme) => {
|
|
11073
|
+
const CONFIG22 = getActiveConfig5();
|
|
11074
|
+
if (!globalTheme)
|
|
11075
|
+
globalTheme = CONFIG22.globalTheme;
|
|
11076
|
+
if (!(0, import_utils82.isString)(value)) {
|
|
11077
|
+
if (CONFIG22.verbose)
|
|
11078
|
+
console.warn(value, "- type for color is not valid");
|
|
11079
|
+
return;
|
|
11080
|
+
}
|
|
11081
|
+
if (value.slice(0, 2) === "--")
|
|
11082
|
+
return `var(${value})`;
|
|
11083
|
+
const [name] = (0, import_utils82.isArray)(value) ? value : value.split(" ");
|
|
11084
|
+
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG22;
|
|
11085
|
+
const val = COLOR2[name] || GRADIENT2[name];
|
|
11086
|
+
const isObj = (0, import_utils82.isObject)(val);
|
|
11087
|
+
if (isObj && val.value)
|
|
11088
|
+
return getColor5(value, `@${globalTheme}`);
|
|
11089
|
+
else if (isObj) {
|
|
11090
|
+
if (globalTheme)
|
|
11091
|
+
return getColor5(value, `@${globalTheme}`);
|
|
11092
|
+
else {
|
|
11093
|
+
const obj = {};
|
|
11094
|
+
for (const mediaName in val) {
|
|
11095
|
+
const query = CONFIG22.MEDIA[mediaName.slice(1)];
|
|
11096
|
+
const media = `@media screen and ${query}`;
|
|
11097
|
+
obj[media] = getColor5(value, mediaName);
|
|
11098
|
+
}
|
|
11099
|
+
return obj;
|
|
11100
|
+
}
|
|
11101
|
+
} else {
|
|
11102
|
+
if (CONFIG22.verbose)
|
|
11103
|
+
console.warn("Can't find color", value);
|
|
11104
|
+
return value;
|
|
11105
|
+
}
|
|
11106
|
+
};
|
|
11107
|
+
var setColor = (val, key, suffix) => {
|
|
11108
|
+
const CONFIG22 = getActiveConfig5();
|
|
11109
|
+
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
11110
|
+
val = getColor5(val.slice(2));
|
|
11111
|
+
if ((0, import_utils82.isArray)(val)) {
|
|
11112
|
+
return {
|
|
11113
|
+
"@light": setColor(val[0], key, "light"),
|
|
11114
|
+
"@dark": setColor(val[1], key, "dark")
|
|
11115
|
+
};
|
|
11116
|
+
}
|
|
11117
|
+
if ((0, import_utils82.isObject)(val)) {
|
|
11118
|
+
const obj = {};
|
|
11119
|
+
for (const variant in val)
|
|
11120
|
+
obj[variant] = setColor(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
|
|
11121
|
+
return obj;
|
|
11122
|
+
}
|
|
11123
|
+
const CSSVar = `--color-${key}` + (suffix ? `-${suffix}` : "");
|
|
11124
|
+
const [r, g, b, a = 1] = colorStringToRgbaArray(val.value || val);
|
|
11125
|
+
const alpha = parseFloat(a.toFixed(2));
|
|
11126
|
+
const rgb = `${r}, ${g}, ${b}`;
|
|
11127
|
+
const value = `rgba(${rgb}, ${alpha})`;
|
|
11128
|
+
if (CONFIG22.useVariable) {
|
|
11129
|
+
CONFIG22.CSS_VARS[CSSVar] = value;
|
|
11130
|
+
}
|
|
11131
|
+
return {
|
|
11132
|
+
var: CSSVar,
|
|
11133
|
+
rgb,
|
|
11134
|
+
alpha,
|
|
11135
|
+
value
|
|
11136
|
+
};
|
|
11137
|
+
};
|
|
11138
|
+
var setGradient = (val, key, suffix) => {
|
|
11139
|
+
const CONFIG22 = getActiveConfig5();
|
|
11140
|
+
if ((0, import_utils82.isString)(val) && val.slice(0, 2) === "--")
|
|
11141
|
+
val = getColor5(val.slice(2));
|
|
11142
|
+
if ((0, import_utils82.isArray)(val)) {
|
|
11143
|
+
return {
|
|
11144
|
+
"@light": setGradient(val[0], key, "light"),
|
|
11145
|
+
"@dark": setGradient(val[0], key, "dark")
|
|
11146
|
+
};
|
|
11147
|
+
}
|
|
11148
|
+
if ((0, import_utils82.isObject)(val)) {
|
|
11149
|
+
const obj = {};
|
|
11150
|
+
for (const variant in val)
|
|
11151
|
+
obj[variant] = setGradient(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
|
|
11152
|
+
return obj;
|
|
11153
|
+
}
|
|
11154
|
+
const CSSVar = `--gradient-${key}` + (suffix ? `-${suffix}` : "");
|
|
11155
|
+
if (CONFIG22.useVariable) {
|
|
11156
|
+
CONFIG22.CSS_VARS[CSSVar] = val.value || val;
|
|
11157
|
+
}
|
|
11158
|
+
return {
|
|
11159
|
+
var: CSSVar,
|
|
11160
|
+
value: val.value || val
|
|
11161
|
+
};
|
|
11162
|
+
};
|
|
11163
|
+
var import_utils102 = __toESM2(require_cjs42(), 1);
|
|
11164
|
+
var setThemeValue = (theme) => {
|
|
11165
|
+
const value = {};
|
|
11166
|
+
const { state, media, helpers, ...rest } = theme;
|
|
11167
|
+
const keys = Object.keys(rest);
|
|
11168
|
+
keys.map((key) => {
|
|
11169
|
+
const conditions = ["color", "Color", "background", "border"];
|
|
11170
|
+
const isColor = conditions.some((k) => key.includes(k));
|
|
11171
|
+
return value[key] = isColor ? getColor5(theme[key]) : theme[key];
|
|
11172
|
+
});
|
|
11173
|
+
return value;
|
|
11174
|
+
};
|
|
11175
|
+
var getThemeValue = (theme) => {
|
|
11176
|
+
if (theme.value)
|
|
11177
|
+
return theme.value;
|
|
11178
|
+
theme.value = setThemeValue(theme);
|
|
11179
|
+
return theme.value;
|
|
11180
|
+
};
|
|
11181
|
+
var getTheme5 = (value, modifier) => {
|
|
11182
|
+
const CONFIG22 = getActiveConfig5();
|
|
11183
|
+
if (CONFIG22.useVariable)
|
|
11184
|
+
return getMediaTheme5(value, modifier);
|
|
11185
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
11186
|
+
if ((0, import_utils102.isString)(value)) {
|
|
11187
|
+
const [theme, subtheme] = value.split(" ");
|
|
11188
|
+
const isOurTheme = THEME2[theme];
|
|
11189
|
+
if (isOurTheme) {
|
|
11190
|
+
if (!subtheme && !modifier)
|
|
11191
|
+
return getThemeValue(isOurTheme);
|
|
11192
|
+
value = [theme, subtheme || modifier];
|
|
11193
|
+
}
|
|
11194
|
+
}
|
|
11195
|
+
if ((0, import_utils102.isObjectLike)(value) && value[1]) {
|
|
11196
|
+
const themeName = value[0];
|
|
11197
|
+
const subThemeName = value[1];
|
|
11198
|
+
const { helpers, media, state } = THEME2[themeName];
|
|
11199
|
+
if (media && media[subThemeName])
|
|
11200
|
+
return getThemeValue(media[subThemeName]);
|
|
11201
|
+
if (helpers && helpers[subThemeName])
|
|
11202
|
+
return getThemeValue(helpers[subThemeName]);
|
|
11203
|
+
if (state && state[subThemeName])
|
|
11204
|
+
return getThemeValue(state[subThemeName]);
|
|
11205
|
+
} else if ((0, import_utils102.isObject)(value))
|
|
11206
|
+
return setThemeValue(value);
|
|
11207
|
+
};
|
|
11208
|
+
var setInverseTheme = (theme, variant, value) => {
|
|
11209
|
+
if ((0, import_utils102.isObject)(variant)) {
|
|
11210
|
+
theme.variants.inverse.value = setThemeValue(variant);
|
|
11211
|
+
} else if (variant === true) {
|
|
11212
|
+
const { color, background } = value;
|
|
11213
|
+
theme.variants.inverse = {
|
|
11214
|
+
value: {
|
|
11215
|
+
color: background,
|
|
11216
|
+
background: color
|
|
11217
|
+
}
|
|
11218
|
+
};
|
|
11219
|
+
}
|
|
11220
|
+
};
|
|
11221
|
+
var setPseudo = (theme, key, variant, themeValue) => {
|
|
11222
|
+
const result = getTheme5(variant);
|
|
11223
|
+
themeValue[`&:${key}`] = result;
|
|
11224
|
+
if ((0, import_utils102.isObject)(variant) && !variant.value)
|
|
11225
|
+
variant.value = result;
|
|
11226
|
+
};
|
|
11227
|
+
var setSelectors = (theme, value) => {
|
|
11228
|
+
const { state } = theme;
|
|
11229
|
+
if (!state)
|
|
11230
|
+
return;
|
|
11231
|
+
const keys = Object.keys(state);
|
|
11232
|
+
keys.map((key) => {
|
|
11233
|
+
const variant = state[key];
|
|
11234
|
+
setPseudo(theme, key, variant, value);
|
|
11235
|
+
return theme;
|
|
11236
|
+
});
|
|
11237
|
+
return theme;
|
|
11238
|
+
};
|
|
11239
|
+
var setPrefersScheme = (theme, key, variant, themeValue) => {
|
|
11240
|
+
const result = getTheme5(variant);
|
|
11241
|
+
themeValue[`@media (prefers-color-scheme: ${key})`] = result;
|
|
11242
|
+
if ((0, import_utils102.isObject)(variant) && !variant.value)
|
|
11243
|
+
variant.value = result;
|
|
11244
|
+
};
|
|
11245
|
+
var setMedia = (theme, value) => {
|
|
11246
|
+
const { media } = theme;
|
|
11247
|
+
if (!media)
|
|
11248
|
+
return;
|
|
11249
|
+
const keys = Object.keys(media);
|
|
11250
|
+
keys.map((key) => {
|
|
11251
|
+
const variant = media[key];
|
|
11252
|
+
if (key === "dark" || key === "light")
|
|
11253
|
+
setPrefersScheme(theme, key, variant, value);
|
|
11254
|
+
if (key === "inverse")
|
|
11255
|
+
setInverseTheme(theme, variant, value);
|
|
11256
|
+
return theme;
|
|
11257
|
+
});
|
|
11258
|
+
return theme;
|
|
11259
|
+
};
|
|
11260
|
+
var setHelpers = (theme, value) => {
|
|
11261
|
+
const CONFIG22 = getActiveConfig5();
|
|
11262
|
+
const { helpers } = theme;
|
|
11263
|
+
if (!helpers)
|
|
11264
|
+
return;
|
|
11265
|
+
const keys = Object.keys(helpers);
|
|
11266
|
+
keys.map((key) => {
|
|
11267
|
+
const helper = helpers[key];
|
|
11268
|
+
if ((0, import_utils102.isString)(helper))
|
|
11269
|
+
helpers[key] = CONFIG22.THEME[helper];
|
|
11270
|
+
else
|
|
11271
|
+
getThemeValue(helpers[key]);
|
|
11272
|
+
return theme;
|
|
11273
|
+
});
|
|
11274
|
+
return theme;
|
|
11275
|
+
};
|
|
11276
|
+
var setTheme = (val, key) => {
|
|
11277
|
+
const CONFIG22 = getActiveConfig5();
|
|
11278
|
+
if (CONFIG22.useVariable)
|
|
11279
|
+
return setMediaTheme(val, key);
|
|
11280
|
+
const { state, media, helpers } = val;
|
|
11281
|
+
const value = setThemeValue(val, key);
|
|
11282
|
+
const CSSvar = `--theme-${key}`;
|
|
11283
|
+
setSelectors(val, value);
|
|
11284
|
+
setMedia(val, value);
|
|
11285
|
+
setHelpers(val, value);
|
|
11286
|
+
return { var: CSSvar, value, state, media, helpers };
|
|
11287
|
+
};
|
|
11288
|
+
var setMediaTheme = (val, key, suffix, prefers) => {
|
|
11289
|
+
const CONFIG22 = getActiveConfig5();
|
|
11290
|
+
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
11291
|
+
const theme = { value: val };
|
|
11292
|
+
if ((0, import_utils102.isObjectLike)(val)) {
|
|
11293
|
+
for (const param in val) {
|
|
11294
|
+
const symb = param.slice(0, 1);
|
|
11295
|
+
const value = val[param];
|
|
11296
|
+
if (symb === "@" || symb === ":" || symb === ".") {
|
|
11297
|
+
const hasPrefers = symb === "@" && param;
|
|
11298
|
+
theme[param] = setMediaTheme(value, key, param, prefers || hasPrefers);
|
|
11299
|
+
} else {
|
|
11300
|
+
const color = getColor5(value, prefers);
|
|
11301
|
+
const metaSuffixes = [...new Set([prefers, suffix].filter((v) => v).map((v) => v.slice(1)))];
|
|
11302
|
+
const varmetaSuffixName = metaSuffixes.length ? "-" + metaSuffixes.join("-") : "";
|
|
11303
|
+
const CSSVar = `--theme-${key}${varmetaSuffixName}-${param}`;
|
|
11304
|
+
if (CONFIG22.useVariable) {
|
|
11305
|
+
CSS_VARS2[CSSVar] = color;
|
|
11306
|
+
theme[param] = `var(${CSSVar})`;
|
|
11307
|
+
} else {
|
|
11308
|
+
theme[param] = color;
|
|
11309
|
+
}
|
|
11310
|
+
theme[`.${param}`] = { [param]: theme[param] };
|
|
11311
|
+
}
|
|
11312
|
+
}
|
|
11313
|
+
if (theme.background || theme.color || theme.backgroundColor) {
|
|
11314
|
+
theme[".inversed"] = {
|
|
11315
|
+
color: theme.background || theme.backgroundColor,
|
|
11316
|
+
background: theme.color
|
|
11317
|
+
};
|
|
11318
|
+
}
|
|
11319
|
+
}
|
|
11320
|
+
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--") {
|
|
11321
|
+
const { THEME: THEME2 } = CONFIG22;
|
|
11322
|
+
const value = THEME2[val.slice(2)];
|
|
11323
|
+
const getReferenced = getMediaTheme5(value, prefers);
|
|
11324
|
+
return getReferenced;
|
|
11325
|
+
}
|
|
11326
|
+
return theme;
|
|
11327
|
+
};
|
|
11328
|
+
var recursiveTheme = (val) => {
|
|
11329
|
+
const CONFIG22 = getActiveConfig5();
|
|
11330
|
+
const obj = {};
|
|
11331
|
+
for (const param in val) {
|
|
11332
|
+
const symb = param.slice(0, 1);
|
|
11333
|
+
if ((0, import_utils102.isObjectLike)(val[param])) {
|
|
11334
|
+
if (symb === "@") {
|
|
11335
|
+
const query = CONFIG22.MEDIA[param.slice(1)];
|
|
11336
|
+
const media = `@media screen and ${query}`;
|
|
11337
|
+
obj[media] = recursiveTheme(val[param]);
|
|
11338
|
+
} else if (symb === ":") {
|
|
11339
|
+
obj[`&${param}`] = recursiveTheme(val[param]);
|
|
11340
|
+
}
|
|
11341
|
+
} else
|
|
11342
|
+
obj[param] = val[param];
|
|
11343
|
+
}
|
|
11344
|
+
return obj;
|
|
11345
|
+
};
|
|
11346
|
+
var findModifierFromArray = (val, modifierArray) => {
|
|
11347
|
+
const currentMod = modifierArray.shift();
|
|
11348
|
+
if (val[currentMod])
|
|
11349
|
+
return findModifierFromArray(val[currentMod], modifierArray);
|
|
11350
|
+
return val;
|
|
11351
|
+
};
|
|
11352
|
+
var findModifier = (val, modifier) => {
|
|
11353
|
+
if ((0, import_utils102.isArray)(modifier))
|
|
11354
|
+
return findModifierFromArray(val, modifier);
|
|
11355
|
+
else if ((0, import_utils102.isString)(modifier) && val[modifier])
|
|
11356
|
+
return val[modifier];
|
|
11357
|
+
else
|
|
11358
|
+
return val;
|
|
11359
|
+
};
|
|
11360
|
+
var getMediaTheme5 = (val, mod) => {
|
|
11361
|
+
const CONFIG22 = getActiveConfig5();
|
|
11362
|
+
if ((0, import_utils102.isString)(val) && val.slice(0, 2) === "--")
|
|
11363
|
+
val = getMediaTheme5(val.slice(2));
|
|
11364
|
+
if (!val || !(0, import_utils102.isString)(val)) {
|
|
11365
|
+
if (CONFIG22.verbose)
|
|
11366
|
+
console.warn(val, "- theme is not string");
|
|
11367
|
+
return;
|
|
11368
|
+
}
|
|
11369
|
+
const [name, ...modifier] = (0, import_utils102.isArray)(val) ? val : val.split(" ");
|
|
11370
|
+
let value = CONFIG22.THEME[name];
|
|
11371
|
+
if (value && (modifier || mod)) {
|
|
11372
|
+
value = findModifier(value, modifier.length ? modifier : mod);
|
|
11373
|
+
}
|
|
11374
|
+
const r = recursiveTheme(value);
|
|
11375
|
+
return r;
|
|
11376
|
+
};
|
|
11377
|
+
var import_utils112 = __toESM2(require_cjs42(), 1);
|
|
11378
|
+
var setFont = (val, key) => {
|
|
11379
|
+
const CSSvar = `--font-${key}`;
|
|
11380
|
+
const fontFace = val[0] ? getFontFaceEach(key, val) : setCustomFontMedia(key, val.url);
|
|
11381
|
+
return { var: CSSvar, value: val, fontFace };
|
|
11382
|
+
};
|
|
11383
|
+
var getFontFamily5 = (key, factory) => {
|
|
11384
|
+
const CONFIG22 = getActiveConfig5();
|
|
11385
|
+
const { FONT_FAMILY: FONT_FAMILY2 } = CONFIG22;
|
|
11386
|
+
return getDefaultOrFirstKey(factory || FONT_FAMILY2, key);
|
|
11387
|
+
};
|
|
11388
|
+
var setFontFamily = (val, key) => {
|
|
11389
|
+
const CONFIG22 = getActiveConfig5();
|
|
11390
|
+
const { FONT_FAMILY: FONT_FAMILY2, FONT_FAMILY_TYPES: FONT_FAMILY_TYPES2 } = CONFIG22;
|
|
11391
|
+
let { value, type } = val;
|
|
11392
|
+
if (val.isDefault)
|
|
11393
|
+
FONT_FAMILY2.default = key;
|
|
11394
|
+
if ((0, import_utils112.isObject)(value))
|
|
11395
|
+
value = arrayzeValue(value);
|
|
11396
|
+
const CSSvar = `--font-family-${key}`;
|
|
11397
|
+
const str = `${value.join(", ")}, ${FONT_FAMILY_TYPES2[type]}`;
|
|
11398
|
+
return { var: CSSvar, value: str, arr: value, type };
|
|
11399
|
+
};
|
|
11400
|
+
var import_utils142 = __toESM2(require_cjs42(), 1);
|
|
11401
|
+
var runThroughMedia = (props3) => {
|
|
11402
|
+
const CONFIG22 = getActiveConfig5();
|
|
11403
|
+
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG22;
|
|
11404
|
+
for (const prop in props3) {
|
|
11405
|
+
const mediaProps = props3[prop];
|
|
11406
|
+
if (prop.slice(0, 1) === "@") {
|
|
11407
|
+
const { type, base, ratio, range, subSequence, h1Matches, unit } = props3;
|
|
11408
|
+
(0, import_utils142.merge)(mediaProps, {
|
|
11409
|
+
type,
|
|
11410
|
+
base,
|
|
11411
|
+
ratio,
|
|
11412
|
+
range,
|
|
11413
|
+
subSequence,
|
|
11414
|
+
h1Matches,
|
|
11415
|
+
unit,
|
|
11416
|
+
sequence: {},
|
|
11417
|
+
scales: {},
|
|
11418
|
+
templates: {},
|
|
11419
|
+
vars: {}
|
|
11420
|
+
});
|
|
11421
|
+
generateSequence(mediaProps);
|
|
11422
|
+
const mediaName = prop.slice(1);
|
|
11423
|
+
applySequenceVars(mediaProps, mediaName);
|
|
11424
|
+
const query = MEDIA2[mediaName];
|
|
11425
|
+
TYPOGRAPHY2.templates[`@media screen and ${query}`] = {
|
|
11426
|
+
fontSize: mediaProps.base / TYPOGRAPHY2.browserDefault + unit
|
|
11427
|
+
};
|
|
11428
|
+
}
|
|
11429
|
+
}
|
|
11430
|
+
};
|
|
11431
|
+
var applyHeadings = (props3) => {
|
|
11432
|
+
const CONFIG22 = getActiveConfig5();
|
|
11433
|
+
if (props3.h1Matches) {
|
|
11434
|
+
const unit = props3.unit;
|
|
11435
|
+
const HEADINGS = findHeadings(props3);
|
|
11436
|
+
const { templates } = props3;
|
|
11437
|
+
for (const k in HEADINGS) {
|
|
11438
|
+
const headerName = `h${parseInt(k) + 1}`;
|
|
11439
|
+
const headerStyle = templates[headerName];
|
|
11440
|
+
templates[headerName] = {
|
|
11441
|
+
fontSize: CONFIG22.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
|
|
11442
|
+
margin: headerStyle ? headerStyle.margin : 0,
|
|
11443
|
+
lineHeight: headerStyle ? headerStyle.lineHeight : props3.lineHeight,
|
|
11444
|
+
letterSpacing: headerStyle ? headerStyle.letterSpacing : props3.letterSpacing,
|
|
11445
|
+
fontWeight: headerStyle ? headerStyle.fontWeight : 900 - k * 100
|
|
11446
|
+
};
|
|
11447
|
+
}
|
|
11448
|
+
}
|
|
11449
|
+
};
|
|
11450
|
+
var applyTypographySequence = () => {
|
|
11451
|
+
const CONFIG22 = getActiveConfig5();
|
|
11452
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
11453
|
+
generateSequence(TYPOGRAPHY2);
|
|
11454
|
+
applyHeadings(TYPOGRAPHY2);
|
|
11455
|
+
applySequenceVars(TYPOGRAPHY2);
|
|
11456
|
+
runThroughMedia(TYPOGRAPHY2);
|
|
11457
|
+
};
|
|
11458
|
+
var getFontSizeByKey5 = (value) => {
|
|
11459
|
+
const CONFIG22 = getActiveConfig5();
|
|
11460
|
+
const { TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
11461
|
+
return getSequenceValuePropertyPair(
|
|
11462
|
+
value,
|
|
11463
|
+
"fontSize",
|
|
11464
|
+
TYPOGRAPHY2
|
|
11465
|
+
);
|
|
11466
|
+
};
|
|
11467
|
+
var import_utils172 = __toESM2(require_cjs42(), 1);
|
|
11468
|
+
var runThroughMedia2 = (sequenceProps) => {
|
|
11469
|
+
for (const prop in sequenceProps) {
|
|
11470
|
+
const mediaProps = sequenceProps[prop];
|
|
11471
|
+
if (prop.slice(0, 1) === "@") {
|
|
11472
|
+
const { type, base, ratio, range, subSequence, h1Matches, unit } = sequenceProps;
|
|
11473
|
+
(0, import_utils172.merge)(mediaProps, {
|
|
11474
|
+
type,
|
|
11475
|
+
base,
|
|
11476
|
+
ratio,
|
|
11477
|
+
range,
|
|
11478
|
+
subSequence,
|
|
11479
|
+
h1Matches,
|
|
11480
|
+
unit,
|
|
11481
|
+
sequence: {},
|
|
11482
|
+
scales: {},
|
|
11483
|
+
templates: {},
|
|
11484
|
+
vars: {}
|
|
11485
|
+
});
|
|
11486
|
+
generateSequence(mediaProps);
|
|
11487
|
+
const mediaName = prop.slice(1);
|
|
11488
|
+
applySequenceVars(mediaProps, mediaName);
|
|
11489
|
+
}
|
|
11490
|
+
}
|
|
11491
|
+
};
|
|
11492
|
+
var applySpacingSequence = () => {
|
|
11493
|
+
const CONFIG22 = getActiveConfig5();
|
|
11494
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
11495
|
+
generateSequence(SPACING2);
|
|
11496
|
+
applySequenceVars(SPACING2);
|
|
11497
|
+
runThroughMedia2(SPACING2);
|
|
11498
|
+
};
|
|
11499
|
+
var getSequence = (sequenceProps) => {
|
|
11500
|
+
const CONFIG22 = getActiveConfig5();
|
|
11501
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
11502
|
+
if (!sequenceProps)
|
|
11503
|
+
return SPACING2;
|
|
11504
|
+
const hasGenerated = Object.keys(sequenceProps.sequence).length > 0;
|
|
11505
|
+
return hasGenerated ? sequenceProps : generateSequence(sequenceProps);
|
|
11506
|
+
};
|
|
11507
|
+
var getSpacingByKey9 = (value, propertyName = "padding", sequenceProps) => {
|
|
11508
|
+
const sequence = getSequence(sequenceProps);
|
|
11509
|
+
const stack = arrayzeValue(value);
|
|
11510
|
+
if (!stack)
|
|
11511
|
+
return;
|
|
11512
|
+
if ((0, import_utils172.isString)(value) && value.includes("calc")) {
|
|
11513
|
+
return { [propertyName]: value };
|
|
11514
|
+
}
|
|
11515
|
+
if (stack.length > 1) {
|
|
11516
|
+
let suffix = "";
|
|
11517
|
+
if (propertyName === "borderWidth") {
|
|
11518
|
+
propertyName = "border";
|
|
11519
|
+
suffix = "Width";
|
|
11520
|
+
}
|
|
11521
|
+
const directions = {
|
|
11522
|
+
2: ["Block", "Inline"],
|
|
11523
|
+
3: ["BlockStart", "Inline", "BlockEnd"],
|
|
11524
|
+
4: ["BlockStart", "InlineEnd", "BlockEnd", "InlineStart"]
|
|
11525
|
+
};
|
|
11526
|
+
const wrapSequenceValueByDirection = (direction, i) => getSequenceValuePropertyPair(
|
|
11527
|
+
stack[i],
|
|
11528
|
+
propertyName + direction + suffix,
|
|
11529
|
+
sequence
|
|
11530
|
+
);
|
|
11531
|
+
return directions[stack.length].map((dir, key) => wrapSequenceValueByDirection(dir, key));
|
|
11532
|
+
}
|
|
11533
|
+
return getSequenceValuePropertyPair(
|
|
11534
|
+
value,
|
|
11535
|
+
propertyName,
|
|
11536
|
+
sequence
|
|
11537
|
+
);
|
|
11538
|
+
};
|
|
11539
|
+
var getSpacingBasedOnRatio13 = (props3, propertyName, val) => {
|
|
11540
|
+
const CONFIG22 = getActiveConfig5();
|
|
11541
|
+
const { SPACING: SPACING2 } = CONFIG22;
|
|
11542
|
+
const { spacingRatio, unit } = props3;
|
|
11543
|
+
const value = val || props3[propertyName];
|
|
11544
|
+
if (spacingRatio) {
|
|
11545
|
+
let sequenceProps = SPACING2[spacingRatio];
|
|
11546
|
+
if (!sequenceProps) {
|
|
11547
|
+
const { type, base, range, subSequence } = SPACING2;
|
|
11548
|
+
sequenceProps = SPACING2[spacingRatio] = (0, import_utils172.merge)({
|
|
11549
|
+
ratio: spacingRatio,
|
|
11550
|
+
type: type + "-" + spacingRatio,
|
|
11551
|
+
unit,
|
|
11552
|
+
sequence: {},
|
|
11553
|
+
scales: {},
|
|
11554
|
+
templates: {},
|
|
11555
|
+
vars: {}
|
|
11556
|
+
}, {
|
|
11557
|
+
base,
|
|
11558
|
+
range,
|
|
11559
|
+
subSequence,
|
|
11560
|
+
ratio: SPACING2.ratio,
|
|
11561
|
+
unit: SPACING2.unit
|
|
11562
|
+
});
|
|
11563
|
+
}
|
|
11564
|
+
applySequenceVars(sequenceProps, null, { useDefault: false });
|
|
11565
|
+
return getSpacingByKey9(value, propertyName, sequenceProps);
|
|
11566
|
+
}
|
|
11567
|
+
return getSpacingByKey9(value, propertyName);
|
|
11568
|
+
};
|
|
11569
|
+
var applyTimingSequence = () => {
|
|
11570
|
+
const CONFIG22 = getActiveConfig5();
|
|
11571
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
11572
|
+
generateSequence(TIMING2);
|
|
11573
|
+
applySequenceVars(TIMING2);
|
|
11574
|
+
};
|
|
11575
|
+
var getTimingFunction9 = (value) => {
|
|
11576
|
+
const CONFIG22 = getActiveConfig5();
|
|
11577
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
11578
|
+
return TIMING2[value] || TIMING2[toCamelCase(value)] || value;
|
|
11579
|
+
};
|
|
11580
|
+
var getTimingByKey5 = (value, property = "timing") => {
|
|
11581
|
+
const CONFIG22 = getActiveConfig5();
|
|
11582
|
+
const { TIMING: TIMING2 } = CONFIG22;
|
|
11583
|
+
return getSequenceValuePropertyPair(
|
|
11584
|
+
value,
|
|
11585
|
+
property,
|
|
11586
|
+
TIMING2
|
|
11587
|
+
);
|
|
11588
|
+
};
|
|
11589
|
+
var import_utils212 = __toESM2(require_cjs42(), 1);
|
|
11590
|
+
var applyDocument = () => {
|
|
11591
|
+
const CONFIG22 = getActiveConfig5();
|
|
11592
|
+
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
11593
|
+
return (0, import_utils212.merge)(DOCUMENT2, {
|
|
11594
|
+
theme: THEME2.document,
|
|
11595
|
+
fontFamily: getDefaultOrFirstKey(FONT_FAMILY2),
|
|
11596
|
+
fontSize: TYPOGRAPHY2.base,
|
|
11597
|
+
lineHeight: TYPOGRAPHY2.lineHeight
|
|
11598
|
+
});
|
|
11599
|
+
};
|
|
11600
|
+
var import_globals2 = __toESM2(require_cjs12(), 1);
|
|
11601
|
+
var DEF_OPTIONS = {
|
|
11602
|
+
document: import_globals2.document
|
|
11603
|
+
};
|
|
11604
|
+
var setSVG = (val, key) => {
|
|
11605
|
+
const CONFIG22 = getActiveConfig5();
|
|
11606
|
+
if (!val) {
|
|
11607
|
+
if (CONFIG22.verbose)
|
|
11608
|
+
console.warn("setSVG: val is not defined", key);
|
|
11609
|
+
return;
|
|
11610
|
+
}
|
|
11611
|
+
if (CONFIG22.useSvgSprite) {
|
|
11612
|
+
return convertSvgToSymbol(key, val);
|
|
11613
|
+
}
|
|
11614
|
+
return val;
|
|
11615
|
+
};
|
|
11616
|
+
var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
11617
|
+
const CONFIG22 = getActiveConfig5();
|
|
11618
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.SVG;
|
|
11619
|
+
for (const key in LIBRARY)
|
|
11620
|
+
lib[key] = CONFIG22.SVG[key];
|
|
11621
|
+
appendSVG(lib, options);
|
|
11622
|
+
};
|
|
11623
|
+
var setIcon = (val, key) => {
|
|
11624
|
+
const CONFIG22 = getActiveConfig5();
|
|
11625
|
+
if (CONFIG22.useIconSprite) {
|
|
11626
|
+
return setSVG(val, key);
|
|
11627
|
+
}
|
|
11628
|
+
return val;
|
|
11629
|
+
};
|
|
11630
|
+
var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
|
|
11631
|
+
const CONFIG22 = getActiveConfig5();
|
|
11632
|
+
const lib = Object.keys(LIBRARY).length ? {} : CONFIG22.ICONS;
|
|
11633
|
+
for (const key in LIBRARY)
|
|
11634
|
+
lib[key] = CONFIG22.ICONS[key];
|
|
11635
|
+
appendSVG(lib, options);
|
|
11636
|
+
};
|
|
11637
|
+
var createSVGSpriteElement = (options = { isRoot: true }) => {
|
|
11638
|
+
const svgElem = import_globals2.document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
11639
|
+
if (options.isRoot) {
|
|
11640
|
+
svgElem.setAttribute("aria-hidden", "true");
|
|
11641
|
+
svgElem.setAttribute("width", "0");
|
|
11642
|
+
svgElem.setAttribute("height", "0");
|
|
11643
|
+
svgElem.setAttribute("style", "position:absolute");
|
|
11644
|
+
svgElem.setAttribute("id", "svgSprite");
|
|
11645
|
+
}
|
|
11646
|
+
return svgElem;
|
|
11647
|
+
};
|
|
11648
|
+
var appendSVG = (lib, options = DEF_OPTIONS) => {
|
|
11649
|
+
const CONFIG22 = getActiveConfig5();
|
|
11650
|
+
const doc = options.document || import_globals2.document;
|
|
11651
|
+
if (!doc) {
|
|
11652
|
+
if (CONFIG22.verbose) {
|
|
11653
|
+
console.warn("To append SVG sprites it should be run in browser environment");
|
|
11654
|
+
}
|
|
11655
|
+
return generateSprite(lib);
|
|
11656
|
+
}
|
|
11657
|
+
const exists = doc.querySelector("#svgSprite");
|
|
11658
|
+
const SVGsprite = generateSprite(lib);
|
|
11659
|
+
if (exists) {
|
|
11660
|
+
const tempSVG = createSVGSpriteElement({ isRoot: false });
|
|
11661
|
+
tempSVG.innerHTML = SVGsprite;
|
|
11662
|
+
exists.append(...tempSVG.children);
|
|
11663
|
+
} else {
|
|
11664
|
+
const svgSpriteDOM = createSVGSpriteElement();
|
|
11665
|
+
svgSpriteDOM.innerHTML = SVGsprite;
|
|
11666
|
+
doc.body.prepend(svgSpriteDOM);
|
|
11667
|
+
}
|
|
11668
|
+
};
|
|
11669
|
+
var import_utils24 = __toESM2(require_cjs42(), 1);
|
|
11670
|
+
var applyReset = (reset = {}) => {
|
|
11671
|
+
const CONFIG22 = getActiveConfig5();
|
|
11672
|
+
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG22;
|
|
11673
|
+
if (RESET2) {
|
|
11674
|
+
if (RESET2[":root"]) {
|
|
11675
|
+
const configReset = RESET2;
|
|
11676
|
+
const configTemplates = TYPOGRAPHY2.templates;
|
|
11677
|
+
configReset.body = {
|
|
11678
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
11679
|
+
...configTemplates.body
|
|
11680
|
+
};
|
|
11681
|
+
configReset.h1 = configTemplates.h1;
|
|
11682
|
+
configReset.h2 = configTemplates.h2;
|
|
11683
|
+
configReset.h3 = configTemplates.h3;
|
|
11684
|
+
configReset.h4 = configTemplates.h4;
|
|
11685
|
+
configReset.h5 = configTemplates.h5;
|
|
11686
|
+
configReset.h6 = configTemplates.h6;
|
|
11687
|
+
}
|
|
11688
|
+
const { body, ...templates } = TYPOGRAPHY2.templates;
|
|
11689
|
+
return (0, import_utils24.deepMerge)((0, import_utils24.merge)(RESET2, reset), {
|
|
11690
|
+
html: {
|
|
11691
|
+
position: "absolute",
|
|
11692
|
+
// overflow: 'hidden',
|
|
11693
|
+
width: "100%",
|
|
11694
|
+
height: "100%",
|
|
11695
|
+
top: "0",
|
|
11696
|
+
left: "0",
|
|
11697
|
+
margin: "0",
|
|
11698
|
+
WebkitFontSmoothing: "antialiased",
|
|
11699
|
+
scrollBehavior: "smooth",
|
|
11700
|
+
fontSize: TYPOGRAPHY2.browserDefault + "px",
|
|
11701
|
+
...CONFIG22.useDocumentTheme ? getMediaTheme5("document", `@${CONFIG22.globalTheme}`) : {},
|
|
11702
|
+
fontFamily: DOCUMENT2.fontFamily,
|
|
11703
|
+
lineHeight: DOCUMENT2.lineHeight
|
|
11704
|
+
},
|
|
11705
|
+
body: {
|
|
11706
|
+
boxSizing: "border-box",
|
|
11707
|
+
height: "100%",
|
|
11708
|
+
margin: 0,
|
|
11709
|
+
fontFamily: DOCUMENT2.fontFamily,
|
|
11710
|
+
fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault + CONFIG22.UNIT.default,
|
|
11711
|
+
...templates,
|
|
11712
|
+
...body
|
|
11713
|
+
},
|
|
11714
|
+
// form elements
|
|
11715
|
+
fieldset: {
|
|
11716
|
+
border: 0,
|
|
11717
|
+
padding: 0,
|
|
11718
|
+
margin: 0
|
|
11719
|
+
},
|
|
11720
|
+
"select, input": {
|
|
11721
|
+
fontFamily: DOCUMENT2.fontFamily
|
|
11722
|
+
}
|
|
11723
|
+
});
|
|
11724
|
+
}
|
|
11725
|
+
};
|
|
11726
|
+
var import_utils25 = __toESM2(require_cjs42(), 1);
|
|
11727
|
+
var isBorderStyle = (str) => [
|
|
11728
|
+
"none",
|
|
11729
|
+
"hidden",
|
|
11730
|
+
"dotted",
|
|
11731
|
+
"dashed",
|
|
11732
|
+
"solid",
|
|
11733
|
+
"double",
|
|
11734
|
+
"groove",
|
|
11735
|
+
"ridge",
|
|
11736
|
+
"inset",
|
|
11737
|
+
"outset",
|
|
11738
|
+
"initial"
|
|
11739
|
+
].some((v) => str.includes(v));
|
|
11740
|
+
var transformBorder5 = (border) => {
|
|
11741
|
+
const arr = border.split(", ");
|
|
11742
|
+
return arr.map((v) => {
|
|
11743
|
+
v = v.trim();
|
|
11744
|
+
if (v.slice(0, 2) === "--")
|
|
11745
|
+
return `var(${v})`;
|
|
11746
|
+
else if (isBorderStyle(v))
|
|
11747
|
+
return v || "solid";
|
|
11748
|
+
else if (v.slice(-2) === "px" || v.slice(-2) === "em")
|
|
11749
|
+
return v;
|
|
11750
|
+
else if (getColor5(v).length > 2)
|
|
11751
|
+
return getColor5(v);
|
|
11752
|
+
return getSpacingByKey9(v, "border").border;
|
|
11753
|
+
}).join(" ");
|
|
11754
|
+
};
|
|
11755
|
+
var transformTextStroke5 = (stroke) => {
|
|
11756
|
+
return stroke.split(", ").map((v) => {
|
|
11757
|
+
if (v.slice(0, 2) === "--")
|
|
11758
|
+
return `var(${v})`;
|
|
11759
|
+
if (v.includes("px"))
|
|
11760
|
+
return v;
|
|
11761
|
+
else if (getColor5(v))
|
|
11762
|
+
return getColor5(v);
|
|
11763
|
+
return v;
|
|
11764
|
+
}).join(" ");
|
|
11765
|
+
};
|
|
11766
|
+
var transformShadow5 = (shadows) => shadows.split("|").map((shadow) => {
|
|
11767
|
+
return shadow.split(", ").map((v) => {
|
|
11768
|
+
v = v.trim();
|
|
11769
|
+
if (v.slice(0, 2) === "--")
|
|
11770
|
+
return `var(${v})`;
|
|
11771
|
+
if (getColor5(v).length > 2)
|
|
11772
|
+
return getColor5(v);
|
|
11773
|
+
if (v.includes("px") || v.slice(-2) === "em")
|
|
11774
|
+
return v;
|
|
11775
|
+
const arr = v.split(" ");
|
|
11776
|
+
if (!arr.length)
|
|
11777
|
+
return v;
|
|
11778
|
+
return arr.map((v2) => getSpacingByKey9(v2, "shadow").shadow).join(" ");
|
|
11779
|
+
}).join(" ");
|
|
11780
|
+
}).join(",");
|
|
11781
|
+
var transformBackgroundImage5 = (backgroundImage, globalTheme) => {
|
|
11782
|
+
const CONFIG22 = getActiveConfig5();
|
|
11783
|
+
return backgroundImage.split(", ").map((v) => {
|
|
11784
|
+
if (v.slice(0, 2) === "--")
|
|
11785
|
+
return `var(${v})`;
|
|
11786
|
+
if (v.includes("url") || v.includes("gradient"))
|
|
11787
|
+
return v;
|
|
11788
|
+
else if (CONFIG22.GRADIENT[backgroundImage]) {
|
|
11789
|
+
return {
|
|
11790
|
+
backgroundImage: getMediaColor9(backgroundImage, globalTheme || CONFIG22.globalTheme)
|
|
11791
|
+
};
|
|
11792
|
+
} else if (v.includes("/") || v.includes("http"))
|
|
11793
|
+
return `url(${v})`;
|
|
11794
|
+
return v;
|
|
11795
|
+
}).join(" ");
|
|
11796
|
+
};
|
|
11797
|
+
var transfromGap5 = (gap) => (0, import_utils25.isString)(gap) && gap.split(" ").map((v) => getSpacingByKey9(v, "gap").gap).join(" ");
|
|
11798
|
+
var transformTransition = (transition) => {
|
|
11799
|
+
const arr = transition.split(" ");
|
|
11800
|
+
if (!arr.length)
|
|
11801
|
+
return transition;
|
|
11802
|
+
return arr.map((v) => {
|
|
11803
|
+
if (v.slice(0, 2) === "--")
|
|
11804
|
+
return `var(${v})`;
|
|
11805
|
+
if (v.length < 3 || v.includes("ms")) {
|
|
11806
|
+
const mapWithSequence = getTimingByKey5(v);
|
|
11807
|
+
return mapWithSequence.timing || v;
|
|
11808
|
+
}
|
|
11809
|
+
if (getTimingFunction9(v))
|
|
11810
|
+
return getTimingFunction9(v);
|
|
11811
|
+
return v;
|
|
11812
|
+
}).join(" ");
|
|
11813
|
+
};
|
|
11814
|
+
var transformDuration5 = (duration, props3, propertyName) => {
|
|
11815
|
+
if (!(0, import_utils25.isString)(duration))
|
|
11816
|
+
return;
|
|
11817
|
+
return duration.split(",").map((v) => getTimingByKey5(v).timing || v).join(",");
|
|
11818
|
+
};
|
|
11819
|
+
var splitTransition5 = (transition) => {
|
|
11820
|
+
const arr = transition.split(",");
|
|
11821
|
+
if (!arr.length)
|
|
11822
|
+
return;
|
|
11823
|
+
return arr.map(transformTransition).join(",");
|
|
11824
|
+
};
|
|
11825
|
+
var import_utils26 = __toESM2(require_cjs42(), 1);
|
|
11826
|
+
var setCases = (val, key) => {
|
|
11827
|
+
if ((0, import_utils26.isFunction)(val))
|
|
11828
|
+
return val();
|
|
11829
|
+
return val;
|
|
11830
|
+
};
|
|
11831
|
+
var setSameValue = (val, key) => val;
|
|
11832
|
+
var VALUE_TRANSFORMERS = {
|
|
11833
|
+
color: setColor,
|
|
11834
|
+
gradient: setGradient,
|
|
11835
|
+
font: setFont,
|
|
11836
|
+
font_family: setFontFamily,
|
|
11837
|
+
theme: setTheme,
|
|
11838
|
+
icons: setIcon,
|
|
11839
|
+
svg: setSVG,
|
|
11840
|
+
svg_data: setSameValue,
|
|
11841
|
+
typography: setSameValue,
|
|
11842
|
+
cases: setCases,
|
|
11843
|
+
spacing: setSameValue,
|
|
11844
|
+
media: setSameValue,
|
|
11845
|
+
timing: setSameValue,
|
|
11846
|
+
reset: setSameValue,
|
|
11847
|
+
unit: setSameValue,
|
|
11848
|
+
animation: setSameValue
|
|
11849
|
+
};
|
|
11850
|
+
var setValue = (FACTORY_NAME, value, key) => {
|
|
11851
|
+
const CONFIG22 = getActiveConfig5();
|
|
11852
|
+
const factoryName = FACTORY_NAME.toLowerCase();
|
|
11853
|
+
const FACTORY2 = CONFIG22[FACTORY_NAME];
|
|
11854
|
+
if (VALUE_TRANSFORMERS[factoryName]) {
|
|
11855
|
+
const result = VALUE_TRANSFORMERS[factoryName](value, key);
|
|
11856
|
+
FACTORY2[key] = result;
|
|
11857
|
+
return FACTORY2;
|
|
11858
|
+
}
|
|
11859
|
+
if (CONFIG22.verbose)
|
|
11860
|
+
console.warn("Can not find", factoryName, "method in scratch");
|
|
11861
|
+
};
|
|
11862
|
+
var setEach = (factoryName, props3) => {
|
|
11863
|
+
const CONFIG22 = getActiveConfig5();
|
|
11864
|
+
const FACTORY_NAME = factoryName.toUpperCase();
|
|
11865
|
+
const keys = Object.keys(props3);
|
|
11866
|
+
keys.map((key) => setValue(FACTORY_NAME, props3[key], key));
|
|
11867
|
+
return CONFIG22[FACTORY_NAME];
|
|
11868
|
+
};
|
|
11869
|
+
var SET_OPTIONS = {};
|
|
11870
|
+
var set2 = (recivedConfig, options = SET_OPTIONS) => {
|
|
11871
|
+
let CONFIG22 = getActiveConfig5();
|
|
11872
|
+
const {
|
|
11873
|
+
version,
|
|
11874
|
+
verbose,
|
|
11875
|
+
useVariable,
|
|
11876
|
+
useReset,
|
|
11877
|
+
useSvgSprite,
|
|
11878
|
+
useFontImport,
|
|
11879
|
+
useIconSprite,
|
|
11880
|
+
globalTheme,
|
|
11881
|
+
useDocumentTheme,
|
|
11882
|
+
...config
|
|
11883
|
+
} = recivedConfig;
|
|
11884
|
+
if (options.newConfig) {
|
|
11885
|
+
CONFIG22 = setActiveConfig(options.newConfig);
|
|
11886
|
+
}
|
|
11887
|
+
if (verbose !== void 0)
|
|
11888
|
+
CONFIG22.verbose = verbose;
|
|
11889
|
+
if (useVariable !== void 0)
|
|
11890
|
+
CONFIG22.useVariable = useVariable;
|
|
11891
|
+
if (useReset !== void 0)
|
|
11892
|
+
CONFIG22.useReset = useReset;
|
|
11893
|
+
if (useFontImport !== void 0)
|
|
11894
|
+
CONFIG22.useFontImport = useFontImport;
|
|
11895
|
+
if (useSvgSprite !== void 0)
|
|
11896
|
+
CONFIG22.useSvgSprite = useSvgSprite;
|
|
11897
|
+
if (useIconSprite !== void 0)
|
|
11898
|
+
CONFIG22.useIconSprite = useIconSprite;
|
|
11899
|
+
if (useDocumentTheme !== void 0)
|
|
11900
|
+
CONFIG22.useDocumentTheme = useDocumentTheme;
|
|
11901
|
+
if (globalTheme !== void 0)
|
|
11902
|
+
CONFIG22.globalTheme = globalTheme;
|
|
11903
|
+
if (CONFIG22.verbose)
|
|
11904
|
+
console.log(CONFIG22);
|
|
11905
|
+
if (!CONFIG22.__svg_cache)
|
|
11906
|
+
CONFIG22.__svg_cache = {};
|
|
11907
|
+
const keys = Object.keys(config);
|
|
11908
|
+
keys.map((key) => setEach(key, config[key]));
|
|
11909
|
+
applyTypographySequence();
|
|
11910
|
+
applySpacingSequence();
|
|
11911
|
+
applyTimingSequence();
|
|
11912
|
+
applyDocument();
|
|
11913
|
+
applyReset();
|
|
11914
|
+
return CONFIG22;
|
|
11915
|
+
};
|
|
11916
|
+
}
|
|
11917
|
+
});
|
|
11918
|
+
|
|
11919
|
+
// index.js
|
|
11920
|
+
var domql_exports = {};
|
|
11921
|
+
__export(domql_exports, {
|
|
11922
|
+
Animation: () => Animation,
|
|
11923
|
+
Avatar: () => Avatar,
|
|
11924
|
+
AvatarBundle: () => AvatarBundle,
|
|
11925
|
+
Block: () => Block,
|
|
11926
|
+
Box: () => Box,
|
|
11927
|
+
Button: () => Button,
|
|
11928
|
+
ButtonSet: () => ButtonSet,
|
|
11929
|
+
Caption: () => Caption,
|
|
11930
|
+
CircleButton: () => CircleButton,
|
|
11931
|
+
Clickable: () => Clickable,
|
|
11932
|
+
Collection: () => Collection,
|
|
11933
|
+
DatePicker: () => DatePicker,
|
|
11934
|
+
Direction: () => Direction,
|
|
11935
|
+
DropdownList: () => DropdownList,
|
|
11936
|
+
DropdownParent: () => DropdownParent,
|
|
11937
|
+
Field: () => Field,
|
|
11938
|
+
Flex: () => Flex,
|
|
11939
|
+
Focusable: () => Focusable,
|
|
11940
|
+
FocusableComponent: () => FocusableComponent,
|
|
11941
|
+
Form: () => Form,
|
|
11942
|
+
Grid: () => Grid,
|
|
11943
|
+
H1: () => H1,
|
|
11944
|
+
H2: () => H2,
|
|
11945
|
+
H3: () => H3,
|
|
11946
|
+
H4: () => H4,
|
|
11947
|
+
H5: () => H5,
|
|
11948
|
+
H6: () => H6,
|
|
11949
|
+
Hoverable: () => Hoverable,
|
|
11950
|
+
Icon: () => Icon2,
|
|
11951
|
+
IconText: () => IconText2,
|
|
11952
|
+
Iframe: () => Iframe,
|
|
11953
|
+
Img: () => Img,
|
|
11954
|
+
Input: () => Input,
|
|
11955
|
+
Interaction: () => Interaction,
|
|
11956
|
+
Italic: () => Italic,
|
|
11957
|
+
KangorooButton: () => KangorooButton,
|
|
11958
|
+
Label: () => Label,
|
|
11959
|
+
Link: () => Link,
|
|
11960
|
+
List: () => List,
|
|
11961
|
+
Media: () => Media,
|
|
11962
|
+
Notification: () => Notification,
|
|
11963
|
+
Overflow: () => Overflow,
|
|
11964
|
+
P: () => P,
|
|
11965
|
+
Picture: () => Picture,
|
|
11966
|
+
Pills: () => Pills,
|
|
11967
|
+
Position: () => Position,
|
|
11968
|
+
Pseudo: () => Pseudo,
|
|
11969
|
+
Range: () => Range,
|
|
11970
|
+
RangeSlider: () => RangeSlider,
|
|
11971
|
+
RangeWithButtons: () => RangeWithButtons,
|
|
11972
|
+
RouteLink: () => RouteLink,
|
|
11973
|
+
RouterLink: () => RouterLink,
|
|
11974
|
+
Select: () => Select,
|
|
11975
|
+
Shape: () => Shape,
|
|
9319
11976
|
Slider: () => Slider,
|
|
9320
11977
|
Span: () => Span,
|
|
9321
11978
|
SquareButton: () => SquareButton,
|
|
@@ -9994,6 +12651,8 @@ var beforeClassAssign = (element, s) => {
|
|
|
9994
12651
|
};
|
|
9995
12652
|
var initUpdate = (changes, element) => {
|
|
9996
12653
|
const { props: props3, context, class: className } = element;
|
|
12654
|
+
if (!context)
|
|
12655
|
+
return;
|
|
9997
12656
|
const globalTheme = context.designSystem.globalTheme;
|
|
9998
12657
|
const parentProps = element.parent.props;
|
|
9999
12658
|
if (parentProps && parentProps.spacingRatio && parentProps.inheritSpacingRatio) {
|
|
@@ -11739,7 +14398,7 @@ var classnames = function classnames2(args) {
|
|
|
11739
14398
|
};
|
|
11740
14399
|
var emotion_css_create_instance_esm_default = createEmotion;
|
|
11741
14400
|
|
|
11742
|
-
//
|
|
14401
|
+
// node_modules/@symbo.ls/emotion/index.js
|
|
11743
14402
|
var createEmotion3 = (key = "smbls", container) => {
|
|
11744
14403
|
const cleanKey = key.replaceAll(/\./g, "-");
|
|
11745
14404
|
return emotion_css_create_instance_esm_default({ key: cleanKey, container });
|
|
@@ -11901,6 +14560,7 @@ var IconText = {
|
|
|
11901
14560
|
if: ({ parent }) => parent.props.icon
|
|
11902
14561
|
},
|
|
11903
14562
|
Icon: {
|
|
14563
|
+
props: {},
|
|
11904
14564
|
if: ({ props: props3 }) => props3.name || props3.icon
|
|
11905
14565
|
},
|
|
11906
14566
|
text: ({ props: props3 }) => props3.text
|
|
@@ -12394,22 +15054,22 @@ var Input = {
|
|
|
12394
15054
|
};
|
|
12395
15055
|
|
|
12396
15056
|
// Field/node_modules/@symbo.ls/atoms/Block.js
|
|
12397
|
-
var import_scratch19 = __toESM(
|
|
15057
|
+
var import_scratch19 = __toESM(require_cjs10());
|
|
12398
15058
|
|
|
12399
15059
|
// Field/node_modules/@symbo.ls/atoms/Grid.js
|
|
12400
|
-
var import_scratch20 = __toESM(
|
|
15060
|
+
var import_scratch20 = __toESM(require_cjs10());
|
|
12401
15061
|
|
|
12402
15062
|
// Field/node_modules/@symbo.ls/atoms/Media.js
|
|
12403
15063
|
var import_utils11 = __toESM(require_cjs5());
|
|
12404
15064
|
|
|
12405
15065
|
// Field/node_modules/@symbo.ls/atoms/Theme.js
|
|
12406
|
-
var import_scratch23 = __toESM(
|
|
15066
|
+
var import_scratch23 = __toESM(require_cjs10());
|
|
12407
15067
|
|
|
12408
15068
|
// Field/node_modules/@symbo.ls/atoms/Shape/style.js
|
|
12409
|
-
var import_scratch22 = __toESM(
|
|
15069
|
+
var import_scratch22 = __toESM(require_cjs10());
|
|
12410
15070
|
|
|
12411
15071
|
// Field/node_modules/@symbo.ls/atoms/Timing.js
|
|
12412
|
-
var import_scratch21 = __toESM(
|
|
15072
|
+
var import_scratch21 = __toESM(require_cjs10());
|
|
12413
15073
|
|
|
12414
15074
|
// Field/node_modules/@symbo.ls/atoms/Shape/style.js
|
|
12415
15075
|
var CONFIG3 = (0, import_scratch22.getActiveConfig)();
|
|
@@ -12442,17 +15102,17 @@ var Focusable2 = {
|
|
|
12442
15102
|
var import_utils12 = __toESM(require_cjs5());
|
|
12443
15103
|
|
|
12444
15104
|
// Field/node_modules/@symbo.ls/atoms/Position.js
|
|
12445
|
-
var import_scratch24 = __toESM(
|
|
15105
|
+
var import_scratch24 = __toESM(require_cjs10());
|
|
12446
15106
|
|
|
12447
15107
|
// Field/node_modules/@symbo.ls/atoms/Shape/index.js
|
|
12448
15108
|
var import_utils13 = __toESM(require_cjs5());
|
|
12449
|
-
var import_scratch25 = __toESM(
|
|
15109
|
+
var import_scratch25 = __toESM(require_cjs10());
|
|
12450
15110
|
|
|
12451
15111
|
// Field/node_modules/@symbo.ls/atoms/Text.js
|
|
12452
|
-
var import_scratch26 = __toESM(
|
|
15112
|
+
var import_scratch26 = __toESM(require_cjs10());
|
|
12453
15113
|
|
|
12454
15114
|
// Field/node_modules/@symbo.ls/atoms/Animation.js
|
|
12455
|
-
var import_scratch27 = __toESM(
|
|
15115
|
+
var import_scratch27 = __toESM(require_cjs10());
|
|
12456
15116
|
var import_utils14 = __toESM(require_cjs5());
|
|
12457
15117
|
|
|
12458
15118
|
// Field/node_modules/@symbo.ls/emotion/index.js
|
|
@@ -12519,13 +15179,15 @@ var Video = {
|
|
|
12519
15179
|
|
|
12520
15180
|
// Range/index.js
|
|
12521
15181
|
var import_utils15 = __toESM(require_cjs5());
|
|
12522
|
-
var import_scratch28 = __toESM(
|
|
15182
|
+
var import_scratch28 = __toESM(require_cjs10());
|
|
12523
15183
|
var props = {
|
|
12524
15184
|
appearance: "none",
|
|
12525
15185
|
width: "100%",
|
|
12526
15186
|
height: "2px",
|
|
12527
15187
|
outline: "none",
|
|
12528
15188
|
flex: 1,
|
|
15189
|
+
onInput: (ev, el, s) => s.update({ value: el.node.value }),
|
|
15190
|
+
onChange: (ev, el, s) => s.update({ value: el.node.value }),
|
|
12529
15191
|
style: {
|
|
12530
15192
|
appearance: "none"
|
|
12531
15193
|
},
|
|
@@ -12649,7 +15311,7 @@ var style_default2 = {
|
|
|
12649
15311
|
};
|
|
12650
15312
|
|
|
12651
15313
|
// Slider/index.js
|
|
12652
|
-
var import_scratch29 = __toESM(
|
|
15314
|
+
var import_scratch29 = __toESM(require_cjs10());
|
|
12653
15315
|
var import_utils16 = __toESM(require_cjs5());
|
|
12654
15316
|
(0, import_scratch29.set)({
|
|
12655
15317
|
theme: {
|
|
@@ -12741,7 +15403,7 @@ var Slider = {
|
|
|
12741
15403
|
};
|
|
12742
15404
|
|
|
12743
15405
|
// Notification/node_modules/@symbo.ls/atoms/Block.js
|
|
12744
|
-
var import_scratch30 = __toESM(
|
|
15406
|
+
var import_scratch30 = __toESM(require_cjs11());
|
|
12745
15407
|
|
|
12746
15408
|
// Notification/node_modules/@symbo.ls/atoms/Flex.js
|
|
12747
15409
|
var Flex3 = {
|
|
@@ -12761,19 +15423,19 @@ var Flex3 = {
|
|
|
12761
15423
|
};
|
|
12762
15424
|
|
|
12763
15425
|
// Notification/node_modules/@symbo.ls/atoms/Grid.js
|
|
12764
|
-
var import_scratch31 = __toESM(
|
|
15426
|
+
var import_scratch31 = __toESM(require_cjs11());
|
|
12765
15427
|
|
|
12766
15428
|
// Notification/node_modules/@symbo.ls/atoms/Media.js
|
|
12767
15429
|
var import_utils17 = __toESM(require_cjs5());
|
|
12768
15430
|
|
|
12769
15431
|
// Notification/node_modules/@symbo.ls/atoms/Theme.js
|
|
12770
|
-
var import_scratch34 = __toESM(
|
|
15432
|
+
var import_scratch34 = __toESM(require_cjs11());
|
|
12771
15433
|
|
|
12772
15434
|
// Notification/node_modules/@symbo.ls/atoms/Shape/style.js
|
|
12773
|
-
var import_scratch33 = __toESM(
|
|
15435
|
+
var import_scratch33 = __toESM(require_cjs11());
|
|
12774
15436
|
|
|
12775
15437
|
// Notification/node_modules/@symbo.ls/atoms/Timing.js
|
|
12776
|
-
var import_scratch32 = __toESM(
|
|
15438
|
+
var import_scratch32 = __toESM(require_cjs11());
|
|
12777
15439
|
|
|
12778
15440
|
// Notification/node_modules/@symbo.ls/atoms/Shape/style.js
|
|
12779
15441
|
var CONFIG4 = (0, import_scratch33.getActiveConfig)();
|
|
@@ -12790,17 +15452,17 @@ var depth4 = {
|
|
|
12790
15452
|
var import_utils18 = __toESM(require_cjs5());
|
|
12791
15453
|
|
|
12792
15454
|
// Notification/node_modules/@symbo.ls/atoms/Position.js
|
|
12793
|
-
var import_scratch35 = __toESM(
|
|
15455
|
+
var import_scratch35 = __toESM(require_cjs11());
|
|
12794
15456
|
|
|
12795
15457
|
// Notification/node_modules/@symbo.ls/atoms/Shape/index.js
|
|
12796
15458
|
var import_utils19 = __toESM(require_cjs5());
|
|
12797
|
-
var import_scratch36 = __toESM(
|
|
15459
|
+
var import_scratch36 = __toESM(require_cjs11());
|
|
12798
15460
|
|
|
12799
15461
|
// Notification/node_modules/@symbo.ls/atoms/Text.js
|
|
12800
|
-
var import_scratch37 = __toESM(
|
|
15462
|
+
var import_scratch37 = __toESM(require_cjs11());
|
|
12801
15463
|
|
|
12802
15464
|
// Notification/node_modules/@symbo.ls/atoms/Animation.js
|
|
12803
|
-
var import_scratch38 = __toESM(
|
|
15465
|
+
var import_scratch38 = __toESM(require_cjs11());
|
|
12804
15466
|
var import_utils20 = __toESM(require_cjs5());
|
|
12805
15467
|
|
|
12806
15468
|
// Notification/node_modules/@symbo.ls/emotion/index.js
|