@symbo.ls/create 2.11.133 → 2.11.136
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/cjs/bundle/index.js +509 -1537
- package/dist/cjs/index.js +13 -3
- package/package.json +2 -2
- package/src/index.js +10 -3
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -54,11 +54,11 @@ var require_key = __commonJS({
|
|
|
54
54
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
55
55
|
var key_exports = {};
|
|
56
56
|
__export2(key_exports, {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
createSnapshotId: () => createSnapshotId,
|
|
58
|
+
generateKey: () => generateKey
|
|
59
59
|
});
|
|
60
60
|
module2.exports = __toCommonJS2(key_exports);
|
|
61
|
-
var
|
|
61
|
+
var generateKey = function() {
|
|
62
62
|
let index = 0;
|
|
63
63
|
function newId() {
|
|
64
64
|
index++;
|
|
@@ -66,7 +66,7 @@ var require_key = __commonJS({
|
|
|
66
66
|
}
|
|
67
67
|
return newId;
|
|
68
68
|
}();
|
|
69
|
-
var createSnapshotId =
|
|
69
|
+
var createSnapshotId = generateKey;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
|
|
@@ -464,7 +464,7 @@ var require_object = __commonJS({
|
|
|
464
464
|
flattenRecursive: () => flattenRecursive,
|
|
465
465
|
isEqualDeep: () => isEqualDeep2,
|
|
466
466
|
map: () => map2,
|
|
467
|
-
merge: () =>
|
|
467
|
+
merge: () => merge5,
|
|
468
468
|
mergeArrayExclude: () => mergeArrayExclude,
|
|
469
469
|
mergeIfExisted: () => mergeIfExisted,
|
|
470
470
|
objectToString: () => objectToString,
|
|
@@ -494,7 +494,7 @@ var require_object = __commonJS({
|
|
|
494
494
|
obj[e] = exec5(extention[e], element);
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
|
-
var
|
|
497
|
+
var merge5 = (element, obj, excludeFrom = []) => {
|
|
498
498
|
for (const e in obj) {
|
|
499
499
|
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
|
|
500
500
|
if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
|
|
@@ -1320,11 +1320,11 @@ var require_tree = __commonJS({
|
|
|
1320
1320
|
TREE: () => TREE
|
|
1321
1321
|
});
|
|
1322
1322
|
module2.exports = __toCommonJS2(tree_exports);
|
|
1323
|
-
var
|
|
1323
|
+
var import_utils25 = require_cjs();
|
|
1324
1324
|
var import_report = require_cjs2();
|
|
1325
1325
|
var ROOT = {
|
|
1326
1326
|
key: ":root",
|
|
1327
|
-
node:
|
|
1327
|
+
node: import_utils25.document ? import_utils25.document.body : (0, import_report.report)("DocumentNotDefined", import_utils25.document)
|
|
1328
1328
|
};
|
|
1329
1329
|
var TREE = ROOT;
|
|
1330
1330
|
}
|
|
@@ -1360,12 +1360,12 @@ var require_on = __commonJS({
|
|
|
1360
1360
|
triggerEventOnUpdate: () => triggerEventOnUpdate
|
|
1361
1361
|
});
|
|
1362
1362
|
module2.exports = __toCommonJS2(on_exports);
|
|
1363
|
-
var
|
|
1363
|
+
var import_utils25 = require_cjs();
|
|
1364
1364
|
var applyEvent = (param, element, state, context, options) => {
|
|
1365
1365
|
return param(element, state || element.state, context || element.context, options);
|
|
1366
1366
|
};
|
|
1367
1367
|
var triggerEventOn = (param, element, options) => {
|
|
1368
|
-
if (element.on && (0,
|
|
1368
|
+
if (element.on && (0, import_utils25.isFunction)(element.on[param])) {
|
|
1369
1369
|
const { state, context } = element;
|
|
1370
1370
|
return applyEvent(element.on[param], element, state, context, options);
|
|
1371
1371
|
}
|
|
@@ -1374,7 +1374,7 @@ var require_on = __commonJS({
|
|
|
1374
1374
|
return param(updatedObj, element, state || element.state, context || element.context, options);
|
|
1375
1375
|
};
|
|
1376
1376
|
var triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
1377
|
-
if (element.on && (0,
|
|
1377
|
+
if (element.on && (0, import_utils25.isFunction)(element.on[param])) {
|
|
1378
1378
|
const { state, context } = element;
|
|
1379
1379
|
return applyEventUpdate(element.on[param], updatedObj, element, state, context, options);
|
|
1380
1380
|
}
|
|
@@ -1385,7 +1385,7 @@ var require_on = __commonJS({
|
|
|
1385
1385
|
if (param === "init" || param === "beforeClassAssign" || param === "render" || param === "renderRouter" || param === "attachNode" || param === "stateInit" || param === "stateCreated" || param === "initStateUpdated" || param === "stateUpdated" || param === "initUpdate" || param === "update")
|
|
1386
1386
|
continue;
|
|
1387
1387
|
const appliedFunction = element.on[param];
|
|
1388
|
-
if ((0,
|
|
1388
|
+
if ((0, import_utils25.isFunction)(appliedFunction)) {
|
|
1389
1389
|
const { state, context } = element;
|
|
1390
1390
|
node2.addEventListener(param, (event) => appliedFunction(event, element, state, context));
|
|
1391
1391
|
}
|
|
@@ -1518,10 +1518,10 @@ var require_can = __commonJS({
|
|
|
1518
1518
|
});
|
|
1519
1519
|
module2.exports = __toCommonJS2(can_exports);
|
|
1520
1520
|
var import_report = require_cjs3();
|
|
1521
|
-
var
|
|
1521
|
+
var import_utils25 = require_cjs();
|
|
1522
1522
|
var canRender = (element) => {
|
|
1523
1523
|
const tag = element.tag || "div";
|
|
1524
|
-
return (0,
|
|
1524
|
+
return (0, import_utils25.isValidHtmlTag)(tag) || (0, import_report.report)("HTMLInvalidTag");
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
1527
|
});
|
|
@@ -1612,7 +1612,7 @@ var require_cache = __commonJS({
|
|
|
1612
1612
|
module2.exports = __toCommonJS2(cache_exports);
|
|
1613
1613
|
var import_report = require_cjs3();
|
|
1614
1614
|
var import_event = require_cjs4();
|
|
1615
|
-
var
|
|
1615
|
+
var import_utils25 = require_cjs();
|
|
1616
1616
|
var cache2 = {};
|
|
1617
1617
|
var createHTMLNode = (element) => {
|
|
1618
1618
|
const { tag } = element;
|
|
@@ -1631,15 +1631,15 @@ var require_cache = __commonJS({
|
|
|
1631
1631
|
};
|
|
1632
1632
|
var detectTag = (element) => {
|
|
1633
1633
|
let { tag, key } = element;
|
|
1634
|
-
tag = (0,
|
|
1634
|
+
tag = (0, import_utils25.exec)(tag, element);
|
|
1635
1635
|
if (tag === true)
|
|
1636
1636
|
tag = key;
|
|
1637
|
-
if ((0,
|
|
1638
|
-
const tagExists = (0,
|
|
1637
|
+
if ((0, import_utils25.isString)(tag)) {
|
|
1638
|
+
const tagExists = (0, import_utils25.isValidHtmlTag)(tag);
|
|
1639
1639
|
if (tagExists)
|
|
1640
1640
|
return tag;
|
|
1641
1641
|
} else {
|
|
1642
|
-
const isKeyATag = (0,
|
|
1642
|
+
const isKeyATag = (0, import_utils25.isValidHtmlTag)(key);
|
|
1643
1643
|
if (isKeyATag)
|
|
1644
1644
|
return key;
|
|
1645
1645
|
}
|
|
@@ -1758,16 +1758,16 @@ var require_attr = __commonJS({
|
|
|
1758
1758
|
default: () => attr_default
|
|
1759
1759
|
});
|
|
1760
1760
|
module2.exports = __toCommonJS2(attr_exports);
|
|
1761
|
-
var
|
|
1761
|
+
var import_utils25 = require_cjs();
|
|
1762
1762
|
var import_report = require_cjs2();
|
|
1763
1763
|
var attr_default = (params, element, node2) => {
|
|
1764
1764
|
const { __ref } = element;
|
|
1765
1765
|
const { __attr } = __ref;
|
|
1766
|
-
if ((0,
|
|
1766
|
+
if ((0, import_utils25.isNot)("object"))
|
|
1767
1767
|
(0, import_report.report)("HTMLInvalidAttr", params);
|
|
1768
1768
|
if (params) {
|
|
1769
1769
|
for (const attr in params) {
|
|
1770
|
-
const val = (0,
|
|
1770
|
+
const val = (0, import_utils25.exec)(params[attr], element);
|
|
1771
1771
|
if (val && node2.setAttribute)
|
|
1772
1772
|
node2.setAttribute(attr, val);
|
|
1773
1773
|
else if (node2.removeAttribute)
|
|
@@ -1804,14 +1804,14 @@ var require_classList = __commonJS({
|
|
|
1804
1804
|
var classList_exports = {};
|
|
1805
1805
|
__export2(classList_exports, {
|
|
1806
1806
|
applyClassListOnNode: () => applyClassListOnNode2,
|
|
1807
|
-
|
|
1807
|
+
assignKeyAsClassname: () => assignKeyAsClassname,
|
|
1808
1808
|
classList: () => classList2,
|
|
1809
1809
|
classify: () => classify2,
|
|
1810
1810
|
default: () => classList_default
|
|
1811
1811
|
});
|
|
1812
1812
|
module2.exports = __toCommonJS2(classList_exports);
|
|
1813
|
-
var
|
|
1814
|
-
var
|
|
1813
|
+
var import_utils25 = require_cjs();
|
|
1814
|
+
var assignKeyAsClassname = (element) => {
|
|
1815
1815
|
const { key } = element;
|
|
1816
1816
|
if (element.class === true)
|
|
1817
1817
|
element.class = key;
|
|
@@ -1828,7 +1828,7 @@ var require_classList = __commonJS({
|
|
|
1828
1828
|
else if (typeof param === "string")
|
|
1829
1829
|
className += ` ${param}`;
|
|
1830
1830
|
else if (typeof param === "function") {
|
|
1831
|
-
className += ` ${(0,
|
|
1831
|
+
className += ` ${(0, import_utils25.exec)(param, element)}`;
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
return className;
|
|
@@ -1839,9 +1839,9 @@ var require_classList = __commonJS({
|
|
|
1839
1839
|
const { key } = element;
|
|
1840
1840
|
if (params === true)
|
|
1841
1841
|
params = element.class = { key };
|
|
1842
|
-
if ((0,
|
|
1842
|
+
if ((0, import_utils25.isString)(params))
|
|
1843
1843
|
params = element.class = { default: params };
|
|
1844
|
-
if ((0,
|
|
1844
|
+
if ((0, import_utils25.isObject)(params))
|
|
1845
1845
|
params = classify2(params, element);
|
|
1846
1846
|
const className = params.replace(/\s+/g, " ").trim();
|
|
1847
1847
|
if (element.ref)
|
|
@@ -1925,15 +1925,15 @@ var require_set = __commonJS({
|
|
|
1925
1925
|
default: () => set_default
|
|
1926
1926
|
});
|
|
1927
1927
|
module2.exports = __toCommonJS2(set_exports);
|
|
1928
|
-
var
|
|
1929
|
-
var import_create = __toESM2(
|
|
1928
|
+
var import_utils25 = require_cjs();
|
|
1929
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
1930
1930
|
var import_options3 = __toESM2(require_options(), 1);
|
|
1931
1931
|
var import_mixins = require_mixins();
|
|
1932
1932
|
var import_content = require_content();
|
|
1933
1933
|
var set5 = function(params, options = {}, el) {
|
|
1934
1934
|
const element = el || this;
|
|
1935
1935
|
const __contentRef = element.content && element.content.__ref;
|
|
1936
|
-
if (__contentRef && __contentRef.__cached && (0,
|
|
1936
|
+
if (__contentRef && __contentRef.__cached && (0, import_utils25.isEqualDeep)(params, element.content)) {
|
|
1937
1937
|
return element;
|
|
1938
1938
|
}
|
|
1939
1939
|
(0, import_content.removeContent)(element);
|
|
@@ -1993,7 +1993,7 @@ var require_content = __commonJS({
|
|
|
1993
1993
|
updateContent: () => updateContent
|
|
1994
1994
|
});
|
|
1995
1995
|
module2.exports = __toCommonJS2(content_exports);
|
|
1996
|
-
var
|
|
1996
|
+
var import_utils25 = require_cjs();
|
|
1997
1997
|
var import_set = __toESM2(require_set(), 1);
|
|
1998
1998
|
var updateContent = function(params, options) {
|
|
1999
1999
|
const element = this;
|
|
@@ -2016,7 +2016,7 @@ var require_content = __commonJS({
|
|
|
2016
2016
|
if (__cached && __cached.content) {
|
|
2017
2017
|
if (__cached.content.tag === "fragment")
|
|
2018
2018
|
__cached.content.parent.node.innerHTML = "";
|
|
2019
|
-
else if (__cached.content && (0,
|
|
2019
|
+
else if (__cached.content && (0, import_utils25.isFunction)(__cached.content.remove))
|
|
2020
2020
|
__cached.content.remove();
|
|
2021
2021
|
}
|
|
2022
2022
|
delete element.content;
|
|
@@ -2061,15 +2061,15 @@ var require_data = __commonJS({
|
|
|
2061
2061
|
default: () => data_default
|
|
2062
2062
|
});
|
|
2063
2063
|
module2.exports = __toCommonJS2(data_exports);
|
|
2064
|
-
var
|
|
2064
|
+
var import_utils25 = require_cjs();
|
|
2065
2065
|
var import_report = require_cjs2();
|
|
2066
2066
|
var data_default = (params, element, node2) => {
|
|
2067
2067
|
if (params && params.showOnNode) {
|
|
2068
|
-
if (!(0,
|
|
2068
|
+
if (!(0, import_utils25.isObject)(params))
|
|
2069
2069
|
(0, import_report.report)("HTMLInvalidData", params);
|
|
2070
2070
|
for (const dataset in params) {
|
|
2071
2071
|
if (dataset !== "showOnNode") {
|
|
2072
|
-
node2.dataset[dataset] = (0,
|
|
2072
|
+
node2.dataset[dataset] = (0, import_utils25.exec)(params[dataset], element);
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
}
|
|
@@ -2103,9 +2103,9 @@ var require_html = __commonJS({
|
|
|
2103
2103
|
default: () => html_default
|
|
2104
2104
|
});
|
|
2105
2105
|
module2.exports = __toCommonJS2(html_exports);
|
|
2106
|
-
var
|
|
2106
|
+
var import_utils25 = require_cjs();
|
|
2107
2107
|
var html_default = (param, element, node2) => {
|
|
2108
|
-
const prop = (0,
|
|
2108
|
+
const prop = (0, import_utils25.exec)(param, element);
|
|
2109
2109
|
const { __ref } = element;
|
|
2110
2110
|
if (prop !== __ref.__html) {
|
|
2111
2111
|
if (node2.nodeName === "SVG")
|
|
@@ -2144,12 +2144,12 @@ var require_style = __commonJS({
|
|
|
2144
2144
|
default: () => style_default2
|
|
2145
2145
|
});
|
|
2146
2146
|
module2.exports = __toCommonJS2(style_exports);
|
|
2147
|
-
var
|
|
2147
|
+
var import_utils25 = require_cjs();
|
|
2148
2148
|
var import_report = require_cjs2();
|
|
2149
2149
|
var style_default2 = (params, element, node2) => {
|
|
2150
2150
|
if (params) {
|
|
2151
|
-
if ((0,
|
|
2152
|
-
(0,
|
|
2151
|
+
if ((0, import_utils25.isObject)(params))
|
|
2152
|
+
(0, import_utils25.map)(node2.style, params, element);
|
|
2153
2153
|
else
|
|
2154
2154
|
(0, import_report.report)("HTMLInvalidStyles", params);
|
|
2155
2155
|
}
|
|
@@ -2185,9 +2185,9 @@ var require_text = __commonJS({
|
|
|
2185
2185
|
});
|
|
2186
2186
|
module2.exports = __toCommonJS2(text_exports);
|
|
2187
2187
|
var import__ = require_cjs17();
|
|
2188
|
-
var
|
|
2188
|
+
var import_utils25 = require_cjs();
|
|
2189
2189
|
var asd = (param, element, node2) => {
|
|
2190
|
-
const prop = (0,
|
|
2190
|
+
const prop = (0, import_utils25.exec)(param, element);
|
|
2191
2191
|
if (element.tag === "string") {
|
|
2192
2192
|
node2.nodeValue = prop;
|
|
2193
2193
|
} else if (param !== void 0 || param !== null) {
|
|
@@ -2201,9 +2201,9 @@ var require_text = __commonJS({
|
|
|
2201
2201
|
}
|
|
2202
2202
|
};
|
|
2203
2203
|
var text_default = (param, element, node2) => {
|
|
2204
|
-
let prop = (0,
|
|
2205
|
-
if ((0,
|
|
2206
|
-
prop = (0,
|
|
2204
|
+
let prop = (0, import_utils25.exec)(param, element);
|
|
2205
|
+
if ((0, import_utils25.isString)(prop) && prop.includes("{{")) {
|
|
2206
|
+
prop = (0, import_utils25.replaceLiteralsWithObjectFields)(prop, element.state);
|
|
2207
2207
|
}
|
|
2208
2208
|
if (element.tag === "string") {
|
|
2209
2209
|
if (element.text === prop)
|
|
@@ -2307,11 +2307,11 @@ var require_methods = __commonJS({
|
|
|
2307
2307
|
toggle: () => toggle
|
|
2308
2308
|
});
|
|
2309
2309
|
module2.exports = __toCommonJS2(methods_exports);
|
|
2310
|
-
var
|
|
2310
|
+
var import_utils25 = require_cjs();
|
|
2311
2311
|
var import_ignore = require_ignore();
|
|
2312
2312
|
var parse3 = function() {
|
|
2313
2313
|
const state = this;
|
|
2314
|
-
if ((0,
|
|
2314
|
+
if ((0, import_utils25.isObject)(state)) {
|
|
2315
2315
|
const obj = {};
|
|
2316
2316
|
for (const param in state) {
|
|
2317
2317
|
if (!import_ignore.IGNORE_STATE_PARAMS.includes(param)) {
|
|
@@ -2319,7 +2319,7 @@ var require_methods = __commonJS({
|
|
|
2319
2319
|
}
|
|
2320
2320
|
}
|
|
2321
2321
|
return obj;
|
|
2322
|
-
} else if ((0,
|
|
2322
|
+
} else if ((0, import_utils25.isArray)(state)) {
|
|
2323
2323
|
return state.filter((item) => !import_ignore.IGNORE_STATE_PARAMS.includes(item));
|
|
2324
2324
|
}
|
|
2325
2325
|
};
|
|
@@ -2339,7 +2339,7 @@ var require_methods = __commonJS({
|
|
|
2339
2339
|
const state = this;
|
|
2340
2340
|
const element = state.__element;
|
|
2341
2341
|
const stateKey = element.__ref.__state;
|
|
2342
|
-
if ((0,
|
|
2342
|
+
if ((0, import_utils25.isString)(stateKey)) {
|
|
2343
2343
|
element.parent.state.remove(stateKey, { isHoisted: true, ...options });
|
|
2344
2344
|
return element.state;
|
|
2345
2345
|
}
|
|
@@ -2374,10 +2374,10 @@ var require_methods = __commonJS({
|
|
|
2374
2374
|
};
|
|
2375
2375
|
var add = function(value2, options = {}) {
|
|
2376
2376
|
const state = this;
|
|
2377
|
-
if ((0,
|
|
2377
|
+
if ((0, import_utils25.isArray)(state)) {
|
|
2378
2378
|
state.push(value2);
|
|
2379
2379
|
state.update(state.parse(), { overwrite: "replace", ...options });
|
|
2380
|
-
} else if ((0,
|
|
2380
|
+
} else if ((0, import_utils25.isObject)(state)) {
|
|
2381
2381
|
const key = Object.keys(state).length;
|
|
2382
2382
|
state.update({ [key]: value2 }, options);
|
|
2383
2383
|
}
|
|
@@ -2388,10 +2388,10 @@ var require_methods = __commonJS({
|
|
|
2388
2388
|
};
|
|
2389
2389
|
var remove = function(key, options = {}) {
|
|
2390
2390
|
const state = this;
|
|
2391
|
-
if ((0,
|
|
2392
|
-
(0,
|
|
2393
|
-
if ((0,
|
|
2394
|
-
(0,
|
|
2391
|
+
if ((0, import_utils25.isArray)(state))
|
|
2392
|
+
(0, import_utils25.removeFromArray)(state, key);
|
|
2393
|
+
if ((0, import_utils25.isObject)(state))
|
|
2394
|
+
(0, import_utils25.removeFromObject)(state, key);
|
|
2395
2395
|
return state.update(state.parse(), { replace: true, ...options });
|
|
2396
2396
|
};
|
|
2397
2397
|
var set5 = function(value2, options = {}) {
|
|
@@ -2400,7 +2400,7 @@ var require_methods = __commonJS({
|
|
|
2400
2400
|
};
|
|
2401
2401
|
var apply = function(func, options = {}) {
|
|
2402
2402
|
const state = this;
|
|
2403
|
-
if ((0,
|
|
2403
|
+
if ((0, import_utils25.isFunction)(func)) {
|
|
2404
2404
|
func(state);
|
|
2405
2405
|
return state.update(state, { replace: true, ...options });
|
|
2406
2406
|
}
|
|
@@ -2440,7 +2440,7 @@ var require_inherit = __commonJS({
|
|
|
2440
2440
|
isState: () => isState3
|
|
2441
2441
|
});
|
|
2442
2442
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
2443
|
-
var
|
|
2443
|
+
var import_utils25 = require_cjs();
|
|
2444
2444
|
var import_ignore = require_ignore();
|
|
2445
2445
|
var getParentStateInKey = (stateKey, parentState) => {
|
|
2446
2446
|
if (!stateKey.includes("../"))
|
|
@@ -2494,9 +2494,9 @@ var require_inherit = __commonJS({
|
|
|
2494
2494
|
const inheritedState = findInheritedState(element, parent);
|
|
2495
2495
|
if (!inheritedState)
|
|
2496
2496
|
return element.state;
|
|
2497
|
-
if ((0,
|
|
2498
|
-
return (0,
|
|
2499
|
-
} else if ((0,
|
|
2497
|
+
if ((0, import_utils25.is)(inheritedState)("object", "array")) {
|
|
2498
|
+
return (0, import_utils25.deepClone)(inheritedState, import_ignore.IGNORE_STATE_PARAMS);
|
|
2499
|
+
} else if ((0, import_utils25.is)(inheritedState)("string", "number")) {
|
|
2500
2500
|
ref.__stateType = "string";
|
|
2501
2501
|
return { value: inheritedState };
|
|
2502
2502
|
}
|
|
@@ -2505,12 +2505,12 @@ var require_inherit = __commonJS({
|
|
|
2505
2505
|
var checkIfInherits = (element) => {
|
|
2506
2506
|
const ref = element.__ref;
|
|
2507
2507
|
const stateKey = ref.__state;
|
|
2508
|
-
if (!stateKey || (0,
|
|
2508
|
+
if (!stateKey || (0, import_utils25.isNot)(stateKey)("number", "string"))
|
|
2509
2509
|
return false;
|
|
2510
2510
|
return true;
|
|
2511
2511
|
};
|
|
2512
2512
|
var isState3 = function(state) {
|
|
2513
|
-
if (!(0,
|
|
2513
|
+
if (!(0, import_utils25.isObjectLike)(state))
|
|
2514
2514
|
return false;
|
|
2515
2515
|
return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.toggle && state.add && state.apply && state.__element && state.__children;
|
|
2516
2516
|
};
|
|
@@ -2559,7 +2559,7 @@ var require_updateState = __commonJS({
|
|
|
2559
2559
|
var import_report = require_cjs3();
|
|
2560
2560
|
var import_event = require_cjs4();
|
|
2561
2561
|
var import_ignore = require_ignore();
|
|
2562
|
-
var
|
|
2562
|
+
var import_utils25 = require_cjs();
|
|
2563
2563
|
var import_inherit = require_inherit();
|
|
2564
2564
|
var STATE_UPDATE_OPTIONS = {
|
|
2565
2565
|
overwrite: true,
|
|
@@ -2573,7 +2573,7 @@ var require_updateState = __commonJS({
|
|
|
2573
2573
|
const state = this;
|
|
2574
2574
|
const element = state.__element;
|
|
2575
2575
|
if (!options.updateByState)
|
|
2576
|
-
(0,
|
|
2576
|
+
(0, import_utils25.merge)(options, STATE_UPDATE_OPTIONS);
|
|
2577
2577
|
if (!state.__element)
|
|
2578
2578
|
(0, import_report.report)("ElementOnStateIsNotDefined");
|
|
2579
2579
|
if (options.preventInheritAtCurrentState === true) {
|
|
@@ -2603,10 +2603,10 @@ var require_updateState = __commonJS({
|
|
|
2603
2603
|
const shallow = overwrite === "shallow";
|
|
2604
2604
|
const merge22 = overwrite === "merge";
|
|
2605
2605
|
if (merge22) {
|
|
2606
|
-
(0,
|
|
2606
|
+
(0, import_utils25.deepMerge)(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
2607
2607
|
return;
|
|
2608
2608
|
}
|
|
2609
|
-
const overwriteFunc = shallow ?
|
|
2609
|
+
const overwriteFunc = shallow ? import_utils25.overwriteShallow : import_utils25.overwriteDeep;
|
|
2610
2610
|
overwriteFunc(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
2611
2611
|
};
|
|
2612
2612
|
var hoistStateUpdate = (state, obj, options) => {
|
|
@@ -2669,9 +2669,9 @@ var require_updateState = __commonJS({
|
|
|
2669
2669
|
}
|
|
2670
2670
|
});
|
|
2671
2671
|
|
|
2672
|
-
// ../../../domql/packages/state/dist/cjs/
|
|
2673
|
-
var
|
|
2674
|
-
"../../../domql/packages/state/dist/cjs/
|
|
2672
|
+
// ../../../domql/packages/state/dist/cjs/create.js
|
|
2673
|
+
var require_create2 = __commonJS({
|
|
2674
|
+
"../../../domql/packages/state/dist/cjs/create.js"(exports, module2) {
|
|
2675
2675
|
"use strict";
|
|
2676
2676
|
var __defProp2 = Object.defineProperty;
|
|
2677
2677
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2690,24 +2690,27 @@ var require_createState = __commonJS({
|
|
|
2690
2690
|
return to;
|
|
2691
2691
|
};
|
|
2692
2692
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2693
|
-
var
|
|
2694
|
-
__export2(
|
|
2693
|
+
var create_exports = {};
|
|
2694
|
+
__export2(create_exports, {
|
|
2695
|
+
applyInitialState: () => applyInitialState,
|
|
2695
2696
|
createState: () => createState
|
|
2696
2697
|
});
|
|
2697
|
-
module2.exports = __toCommonJS2(
|
|
2698
|
+
module2.exports = __toCommonJS2(create_exports);
|
|
2698
2699
|
var import_event = require_cjs4();
|
|
2699
|
-
var
|
|
2700
|
+
var import_utils25 = require_cjs();
|
|
2700
2701
|
var import_ignore = require_ignore();
|
|
2701
2702
|
var import_methods = require_methods();
|
|
2702
2703
|
var import_updateState = require_updateState();
|
|
2703
2704
|
var import_inherit = require_inherit();
|
|
2704
2705
|
var createState = function(element, parent, options) {
|
|
2705
|
-
|
|
2706
|
+
element.state = applyInitialState(element, parent, options);
|
|
2707
|
+
};
|
|
2708
|
+
var applyInitialState = function(element, parent, options) {
|
|
2706
2709
|
const objectizeState = checkForTypes(element);
|
|
2707
2710
|
if (objectizeState === false)
|
|
2708
2711
|
return parent.state || {};
|
|
2709
2712
|
else
|
|
2710
|
-
element.state = (0,
|
|
2713
|
+
element.state = (0, import_utils25.deepClone)(objectizeState, import_ignore.IGNORE_STATE_PARAMS);
|
|
2711
2714
|
const whatInitReturns = (0, import_event.triggerEventOn)("stateInit", element, options);
|
|
2712
2715
|
if (whatInitReturns === false)
|
|
2713
2716
|
return element.state;
|
|
@@ -2718,14 +2721,6 @@ var require_createState = __commonJS({
|
|
|
2718
2721
|
const dependentState = applyDependentState(element, element.state);
|
|
2719
2722
|
if (dependentState)
|
|
2720
2723
|
element.state = dependentState;
|
|
2721
|
-
if (skipApplyMethods) {
|
|
2722
|
-
if (element.parent && element.parent.state) {
|
|
2723
|
-
element.state.parent = element.parent.state;
|
|
2724
|
-
} else {
|
|
2725
|
-
element.state.parent = {};
|
|
2726
|
-
}
|
|
2727
|
-
return element.state;
|
|
2728
|
-
}
|
|
2729
2724
|
applyMethods(element);
|
|
2730
2725
|
(0, import_event.triggerEventOn)("stateCreated", element);
|
|
2731
2726
|
return element.state;
|
|
@@ -2734,18 +2729,18 @@ var require_createState = __commonJS({
|
|
|
2734
2729
|
const { __ref: ref } = state;
|
|
2735
2730
|
if (!ref)
|
|
2736
2731
|
return;
|
|
2737
|
-
const dependentState = (0,
|
|
2732
|
+
const dependentState = (0, import_utils25.deepClone)(ref, import_ignore.IGNORE_STATE_PARAMS);
|
|
2738
2733
|
const newDepends = { [element.key]: dependentState };
|
|
2739
|
-
ref.__depends = (0,
|
|
2734
|
+
ref.__depends = (0, import_utils25.isObject)(ref.__depends) ? { ...ref.__depends, ...newDepends } : newDepends;
|
|
2740
2735
|
return dependentState;
|
|
2741
2736
|
};
|
|
2742
2737
|
var checkForTypes = (element) => {
|
|
2743
2738
|
const { state, __ref: ref } = element;
|
|
2744
|
-
if ((0,
|
|
2739
|
+
if ((0, import_utils25.isFunction)(state)) {
|
|
2745
2740
|
ref.__state = state;
|
|
2746
|
-
return (0,
|
|
2741
|
+
return (0, import_utils25.exec)(state, element);
|
|
2747
2742
|
}
|
|
2748
|
-
if ((0,
|
|
2743
|
+
if ((0, import_utils25.is)(state)("string", "number")) {
|
|
2749
2744
|
ref.__state = state;
|
|
2750
2745
|
return {};
|
|
2751
2746
|
}
|
|
@@ -2793,12 +2788,12 @@ var require_createState = __commonJS({
|
|
|
2793
2788
|
__children: {},
|
|
2794
2789
|
__root: ref.__root ? ref.__root.state : state
|
|
2795
2790
|
};
|
|
2796
|
-
if ((0,
|
|
2791
|
+
if ((0, import_utils25.isArray)(state)) {
|
|
2797
2792
|
addProtoToArray(state, proto);
|
|
2798
2793
|
} else {
|
|
2799
2794
|
Object.setPrototypeOf(state, proto);
|
|
2800
2795
|
}
|
|
2801
|
-
if (state.parent)
|
|
2796
|
+
if (state.parent && state.parent.__children)
|
|
2802
2797
|
state.parent.__children[element.key] = state;
|
|
2803
2798
|
};
|
|
2804
2799
|
}
|
|
@@ -2825,7 +2820,7 @@ var require_cjs6 = __commonJS({
|
|
|
2825
2820
|
var state_exports = {};
|
|
2826
2821
|
module2.exports = __toCommonJS2(state_exports);
|
|
2827
2822
|
__reExport2(state_exports, require_ignore(), module2.exports);
|
|
2828
|
-
__reExport2(state_exports,
|
|
2823
|
+
__reExport2(state_exports, require_create2(), module2.exports);
|
|
2829
2824
|
__reExport2(state_exports, require_updateState(), module2.exports);
|
|
2830
2825
|
__reExport2(state_exports, require_methods(), module2.exports);
|
|
2831
2826
|
__reExport2(state_exports, require_inherit(), module2.exports);
|
|
@@ -2860,16 +2855,16 @@ var require_state = __commonJS({
|
|
|
2860
2855
|
});
|
|
2861
2856
|
module2.exports = __toCommonJS2(state_exports);
|
|
2862
2857
|
var import_state3 = require_cjs6();
|
|
2863
|
-
var
|
|
2858
|
+
var import_utils25 = require_cjs();
|
|
2864
2859
|
var state = (params, element, node2) => {
|
|
2865
|
-
const state2 = (0,
|
|
2866
|
-
if ((0,
|
|
2860
|
+
const state2 = (0, import_utils25.exec)(params, element);
|
|
2861
|
+
if ((0, import_utils25.isObject)(state2)) {
|
|
2867
2862
|
for (const param in state2) {
|
|
2868
2863
|
if (import_state3.IGNORE_STATE_PARAMS.includes(param))
|
|
2869
2864
|
continue;
|
|
2870
2865
|
if (!Object.hasOwnProperty.call(state2, param))
|
|
2871
2866
|
continue;
|
|
2872
|
-
element.state[param] = (0,
|
|
2867
|
+
element.state[param] = (0, import_utils25.exec)(state2[param], element);
|
|
2873
2868
|
}
|
|
2874
2869
|
}
|
|
2875
2870
|
return element;
|
|
@@ -3070,7 +3065,7 @@ var require_methods2 = __commonJS({
|
|
|
3070
3065
|
spotByPath: () => spotByPath
|
|
3071
3066
|
});
|
|
3072
3067
|
module2.exports = __toCommonJS2(methods_exports);
|
|
3073
|
-
var
|
|
3068
|
+
var import_utils25 = require_cjs();
|
|
3074
3069
|
var import_tree = require_tree();
|
|
3075
3070
|
var import_mixins = require_mixins();
|
|
3076
3071
|
var spotByPath = function(path) {
|
|
@@ -3103,9 +3098,9 @@ var require_methods2 = __commonJS({
|
|
|
3103
3098
|
};
|
|
3104
3099
|
var remove = function(params) {
|
|
3105
3100
|
const element = this;
|
|
3106
|
-
if ((0,
|
|
3101
|
+
if ((0, import_utils25.isFunction)(element.node.remove))
|
|
3107
3102
|
element.node.remove();
|
|
3108
|
-
else if (!(0,
|
|
3103
|
+
else if (!(0, import_utils25.isProduction)()) {
|
|
3109
3104
|
console.warn("This item cant be removed");
|
|
3110
3105
|
element.log();
|
|
3111
3106
|
}
|
|
@@ -3145,12 +3140,12 @@ var require_methods2 = __commonJS({
|
|
|
3145
3140
|
if (v === "state") {
|
|
3146
3141
|
if (element.__ref && element.__ref.__hasRootState)
|
|
3147
3142
|
return;
|
|
3148
|
-
if ((0,
|
|
3143
|
+
if ((0, import_utils25.isFunction)(val && val.parse))
|
|
3149
3144
|
val = val.parse();
|
|
3150
3145
|
} else if (v === "props") {
|
|
3151
3146
|
const { __element, update, ...props6 } = element[v];
|
|
3152
3147
|
obj[v] = props6;
|
|
3153
|
-
} else if ((0,
|
|
3148
|
+
} else if ((0, import_utils25.isDefined)(val))
|
|
3154
3149
|
obj[v] = val;
|
|
3155
3150
|
});
|
|
3156
3151
|
return obj;
|
|
@@ -3161,7 +3156,7 @@ var require_methods2 = __commonJS({
|
|
|
3161
3156
|
for (const v in obj) {
|
|
3162
3157
|
if (excl.includes(v))
|
|
3163
3158
|
return;
|
|
3164
|
-
if ((0,
|
|
3159
|
+
if ((0, import_utils25.isObjectLike)(obj[v])) {
|
|
3165
3160
|
obj[v] = parseDeep.call(obj[v], excl);
|
|
3166
3161
|
}
|
|
3167
3162
|
}
|
|
@@ -3279,18 +3274,18 @@ var require_inherit2 = __commonJS({
|
|
|
3279
3274
|
inheritParentProps: () => inheritParentProps
|
|
3280
3275
|
});
|
|
3281
3276
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
3282
|
-
var
|
|
3277
|
+
var import_utils25 = require_cjs();
|
|
3283
3278
|
var objectizeStringProperty = (propValue) => {
|
|
3284
|
-
if ((0,
|
|
3279
|
+
if ((0, import_utils25.is)(propValue)("string", "number")) {
|
|
3285
3280
|
return { inheritedString: propValue };
|
|
3286
3281
|
}
|
|
3287
3282
|
return propValue;
|
|
3288
3283
|
};
|
|
3289
3284
|
var inheritParentProps = (element, parent) => {
|
|
3290
3285
|
let propsStack = [];
|
|
3291
|
-
const parentProps = (0,
|
|
3286
|
+
const parentProps = (0, import_utils25.exec)(parent, parent.state).props;
|
|
3292
3287
|
const matchParent = parent.props && parentProps[element.key];
|
|
3293
|
-
const matchParentIsString = (0,
|
|
3288
|
+
const matchParentIsString = (0, import_utils25.isString)(matchParent);
|
|
3294
3289
|
const matchParentChildProps = parentProps && parentProps.childProps;
|
|
3295
3290
|
if (matchParent) {
|
|
3296
3291
|
if (matchParentIsString) {
|
|
@@ -3312,7 +3307,7 @@ var require_inherit2 = __commonJS({
|
|
|
3312
3307
|
});
|
|
3313
3308
|
|
|
3314
3309
|
// ../../../domql/packages/element/dist/cjs/props/create.js
|
|
3315
|
-
var
|
|
3310
|
+
var require_create3 = __commonJS({
|
|
3316
3311
|
"../../../domql/packages/element/dist/cjs/props/create.js"(exports, module2) {
|
|
3317
3312
|
"use strict";
|
|
3318
3313
|
var __defProp2 = Object.defineProperty;
|
|
@@ -3338,19 +3333,19 @@ var require_create2 = __commonJS({
|
|
|
3338
3333
|
syncProps: () => syncProps
|
|
3339
3334
|
});
|
|
3340
3335
|
module2.exports = __toCommonJS2(create_exports);
|
|
3341
|
-
var
|
|
3336
|
+
var import_utils25 = require_cjs();
|
|
3342
3337
|
var import_ignore = require_ignore2();
|
|
3343
3338
|
var import_inherit = require_inherit2();
|
|
3344
3339
|
var createPropsStack = (element, parent) => {
|
|
3345
3340
|
const { props: props6, __ref } = element;
|
|
3346
3341
|
const propsStack = __ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
|
|
3347
|
-
if ((0,
|
|
3342
|
+
if ((0, import_utils25.isObject)(props6))
|
|
3348
3343
|
propsStack.push(props6);
|
|
3349
3344
|
else if (props6 === "inherit" && parent.props)
|
|
3350
3345
|
propsStack.push(parent.props);
|
|
3351
3346
|
else if (props6)
|
|
3352
3347
|
propsStack.push(props6);
|
|
3353
|
-
if ((0,
|
|
3348
|
+
if ((0, import_utils25.isArray)(__ref.__extend)) {
|
|
3354
3349
|
__ref.__extend.forEach((extend) => {
|
|
3355
3350
|
if (extend.props)
|
|
3356
3351
|
propsStack.push(extend.props);
|
|
@@ -3365,12 +3360,12 @@ var require_create2 = __commonJS({
|
|
|
3365
3360
|
props6.forEach((v) => {
|
|
3366
3361
|
if (import_ignore.IGNORE_PROPS_PARAMS.includes(v))
|
|
3367
3362
|
return;
|
|
3368
|
-
const execProps = (0,
|
|
3369
|
-
if ((0,
|
|
3363
|
+
const execProps = (0, import_utils25.exec)(v, element);
|
|
3364
|
+
if ((0, import_utils25.isObject)(execProps) && execProps.__element)
|
|
3370
3365
|
return;
|
|
3371
|
-
element.props = (0,
|
|
3366
|
+
element.props = (0, import_utils25.deepMerge)(
|
|
3372
3367
|
mergedProps,
|
|
3373
|
-
(0,
|
|
3368
|
+
(0, import_utils25.deepClone)(execProps, import_ignore.IGNORE_PROPS_PARAMS),
|
|
3374
3369
|
import_ignore.IGNORE_PROPS_PARAMS
|
|
3375
3370
|
);
|
|
3376
3371
|
});
|
|
@@ -3379,9 +3374,11 @@ var require_create2 = __commonJS({
|
|
|
3379
3374
|
};
|
|
3380
3375
|
var createProps = function(element, parent, cached) {
|
|
3381
3376
|
const propsStack = cached || createPropsStack(element, parent);
|
|
3382
|
-
const { __ref } = element;
|
|
3377
|
+
const { __ref: ref } = element;
|
|
3378
|
+
if (!ref.__if)
|
|
3379
|
+
return;
|
|
3383
3380
|
if (propsStack.length) {
|
|
3384
|
-
|
|
3381
|
+
ref.__props = propsStack;
|
|
3385
3382
|
syncProps(propsStack, element);
|
|
3386
3383
|
element.props.update = update;
|
|
3387
3384
|
}
|
|
@@ -3420,7 +3417,7 @@ var require_update = __commonJS({
|
|
|
3420
3417
|
updateProps: () => updateProps
|
|
3421
3418
|
});
|
|
3422
3419
|
module2.exports = __toCommonJS2(update_exports);
|
|
3423
|
-
var import_create =
|
|
3420
|
+
var import_create = require_create3();
|
|
3424
3421
|
var import_inherit = require_inherit2();
|
|
3425
3422
|
var updateProps = (newProps, element, parent) => {
|
|
3426
3423
|
const { __ref } = element;
|
|
@@ -3458,7 +3455,7 @@ var require_props = __commonJS({
|
|
|
3458
3455
|
var props_exports = {};
|
|
3459
3456
|
module2.exports = __toCommonJS2(props_exports);
|
|
3460
3457
|
__reExport2(props_exports, require_ignore2(), module2.exports);
|
|
3461
|
-
__reExport2(props_exports,
|
|
3458
|
+
__reExport2(props_exports, require_create3(), module2.exports);
|
|
3462
3459
|
__reExport2(props_exports, require_inherit2(), module2.exports);
|
|
3463
3460
|
__reExport2(props_exports, require_update(), module2.exports);
|
|
3464
3461
|
}
|
|
@@ -3500,11 +3497,11 @@ var require_object2 = __commonJS({
|
|
|
3500
3497
|
overwriteShallow: () => overwriteShallow3
|
|
3501
3498
|
});
|
|
3502
3499
|
module2.exports = __toCommonJS2(object_exports);
|
|
3503
|
-
var
|
|
3500
|
+
var import_utils25 = require_cjs();
|
|
3504
3501
|
var import_state3 = require_cjs6();
|
|
3505
3502
|
var import_props = require_props();
|
|
3506
3503
|
var import_methods = require_methods2();
|
|
3507
|
-
var METHODS_EXL = (0,
|
|
3504
|
+
var METHODS_EXL = (0, import_utils25.joinArrays)(
|
|
3508
3505
|
["node", "state", "context", "extend"],
|
|
3509
3506
|
import_methods.METHODS,
|
|
3510
3507
|
import_state3.IGNORE_STATE_PARAMS,
|
|
@@ -3518,7 +3515,7 @@ var require_object2 = __commonJS({
|
|
|
3518
3515
|
const extendProp = extend[e];
|
|
3519
3516
|
if (elementProp === void 0) {
|
|
3520
3517
|
element[e] = extendProp;
|
|
3521
|
-
} else if ((0,
|
|
3518
|
+
} else if ((0, import_utils25.isObjectLike)(elementProp) && (0, import_utils25.isObject)(extendProp)) {
|
|
3522
3519
|
deepMerge4(elementProp, extendProp);
|
|
3523
3520
|
}
|
|
3524
3521
|
}
|
|
@@ -3534,15 +3531,15 @@ var require_object2 = __commonJS({
|
|
|
3534
3531
|
return o;
|
|
3535
3532
|
};
|
|
3536
3533
|
var deepClone3 = (obj, exclude = METHODS_EXL) => {
|
|
3537
|
-
const o = (0,
|
|
3534
|
+
const o = (0, import_utils25.isArray)(obj) ? [] : {};
|
|
3538
3535
|
for (const e in obj) {
|
|
3539
3536
|
if (exclude.includes(e))
|
|
3540
3537
|
continue;
|
|
3541
3538
|
let objProp = obj[e];
|
|
3542
|
-
if (e === "extend" && (0,
|
|
3539
|
+
if (e === "extend" && (0, import_utils25.isArray)(objProp)) {
|
|
3543
3540
|
objProp = mergeArray(objProp, exclude);
|
|
3544
3541
|
}
|
|
3545
|
-
if ((0,
|
|
3542
|
+
if ((0, import_utils25.isObjectLike)(objProp)) {
|
|
3546
3543
|
o[e] = deepClone3(objProp, exclude);
|
|
3547
3544
|
} else
|
|
3548
3545
|
o[e] = objProp;
|
|
@@ -3581,7 +3578,7 @@ var require_object2 = __commonJS({
|
|
|
3581
3578
|
continue;
|
|
3582
3579
|
const objProp = obj[e];
|
|
3583
3580
|
const paramsProp = params[e];
|
|
3584
|
-
if ((0,
|
|
3581
|
+
if ((0, import_utils25.isObjectLike)(objProp) && (0, import_utils25.isObjectLike)(paramsProp)) {
|
|
3585
3582
|
overwriteDeep(objProp, paramsProp);
|
|
3586
3583
|
} else if (paramsProp !== void 0) {
|
|
3587
3584
|
obj[e] = paramsProp;
|
|
@@ -3590,7 +3587,7 @@ var require_object2 = __commonJS({
|
|
|
3590
3587
|
return obj;
|
|
3591
3588
|
};
|
|
3592
3589
|
var mergeIfExisted = (a, b) => {
|
|
3593
|
-
if ((0,
|
|
3590
|
+
if ((0, import_utils25.isObjectLike)(a) && (0, import_utils25.isObjectLike)(b))
|
|
3594
3591
|
return deepMerge4(a, b);
|
|
3595
3592
|
return a || b;
|
|
3596
3593
|
};
|
|
@@ -3598,7 +3595,7 @@ var require_object2 = __commonJS({
|
|
|
3598
3595
|
return arr.reduce((a, c) => deepMerge4(a, deepClone3(c, exclude)), {});
|
|
3599
3596
|
};
|
|
3600
3597
|
var mergeAndCloneIfArray = (obj) => {
|
|
3601
|
-
return (0,
|
|
3598
|
+
return (0, import_utils25.isArray)(obj) ? mergeArray(obj) : deepClone3(obj);
|
|
3602
3599
|
};
|
|
3603
3600
|
var flattenRecursive = (param, prop, stack = []) => {
|
|
3604
3601
|
const objectized = mergeAndCloneIfArray(param);
|
|
@@ -3653,7 +3650,7 @@ var require_extendUtils = __commonJS({
|
|
|
3653
3650
|
setHashedExtend: () => setHashedExtend
|
|
3654
3651
|
});
|
|
3655
3652
|
module2.exports = __toCommonJS2(extendUtils_exports);
|
|
3656
|
-
var
|
|
3653
|
+
var import_utils25 = require_cjs();
|
|
3657
3654
|
var generateHash = () => Math.random().toString(36).substring(2);
|
|
3658
3655
|
var extendStackRegistry = {};
|
|
3659
3656
|
var extendCachedRegistry = {};
|
|
@@ -3662,7 +3659,7 @@ var require_extendUtils = __commonJS({
|
|
|
3662
3659
|
};
|
|
3663
3660
|
var setHashedExtend = (extend, stack) => {
|
|
3664
3661
|
const hash2 = generateHash();
|
|
3665
|
-
if (!(0,
|
|
3662
|
+
if (!(0, import_utils25.isString)(extend)) {
|
|
3666
3663
|
extend.__hash = hash2;
|
|
3667
3664
|
}
|
|
3668
3665
|
extendStackRegistry[hash2] = stack;
|
|
@@ -3688,7 +3685,7 @@ var require_extendUtils = __commonJS({
|
|
|
3688
3685
|
var flattenExtend = (extend, stack) => {
|
|
3689
3686
|
if (!extend)
|
|
3690
3687
|
return stack;
|
|
3691
|
-
if ((0,
|
|
3688
|
+
if ((0, import_utils25.isArray)(extend))
|
|
3692
3689
|
return extractArrayExtend(extend, stack);
|
|
3693
3690
|
stack.push(extend);
|
|
3694
3691
|
if (extend.extend)
|
|
@@ -3701,9 +3698,9 @@ var require_extendUtils = __commonJS({
|
|
|
3701
3698
|
if (["parent", "node", "__element"].indexOf(prop) > -1)
|
|
3702
3699
|
continue;
|
|
3703
3700
|
const objProp = obj[prop];
|
|
3704
|
-
if ((0,
|
|
3701
|
+
if ((0, import_utils25.isObject)(objProp)) {
|
|
3705
3702
|
o[prop] = deepCloneExtend(objProp);
|
|
3706
|
-
} else if ((0,
|
|
3703
|
+
} else if ((0, import_utils25.isArray)(objProp)) {
|
|
3707
3704
|
o[prop] = objProp.map((x) => x);
|
|
3708
3705
|
} else
|
|
3709
3706
|
o[prop] = objProp;
|
|
@@ -3718,14 +3715,14 @@ var require_extendUtils = __commonJS({
|
|
|
3718
3715
|
const extendProp = extend[e];
|
|
3719
3716
|
if (elementProp === void 0) {
|
|
3720
3717
|
element[e] = extendProp;
|
|
3721
|
-
} else if ((0,
|
|
3718
|
+
} else if ((0, import_utils25.isObject)(elementProp) && (0, import_utils25.isObject)(extendProp)) {
|
|
3722
3719
|
deepMergeExtend(elementProp, extendProp);
|
|
3723
|
-
} else if ((0,
|
|
3720
|
+
} else if ((0, import_utils25.isArray)(elementProp) && (0, import_utils25.isArray)(extendProp)) {
|
|
3724
3721
|
element[e] = elementProp.concat(extendProp);
|
|
3725
|
-
} else if ((0,
|
|
3722
|
+
} else if ((0, import_utils25.isArray)(elementProp) && (0, import_utils25.isObject)(extendProp)) {
|
|
3726
3723
|
const obj = deepMergeExtend({}, elementProp);
|
|
3727
3724
|
element[e] = deepMergeExtend(obj, extendProp);
|
|
3728
|
-
} else if (elementProp === void 0 && (0,
|
|
3725
|
+
} else if (elementProp === void 0 && (0, import_utils25.isFunction)(extendProp)) {
|
|
3729
3726
|
element[e] = extendProp;
|
|
3730
3727
|
}
|
|
3731
3728
|
}
|
|
@@ -3738,7 +3735,7 @@ var require_extendUtils = __commonJS({
|
|
|
3738
3735
|
};
|
|
3739
3736
|
var replaceStringsWithComponents = (stack, components) => {
|
|
3740
3737
|
return stack.map((v) => {
|
|
3741
|
-
if ((0,
|
|
3738
|
+
if ((0, import_utils25.isString)(v))
|
|
3742
3739
|
return components[v];
|
|
3743
3740
|
else
|
|
3744
3741
|
return v;
|
|
@@ -3788,15 +3785,15 @@ var require_extend = __commonJS({
|
|
|
3788
3785
|
applyExtend: () => applyExtend
|
|
3789
3786
|
});
|
|
3790
3787
|
module2.exports = __toCommonJS2(extend_exports);
|
|
3791
|
-
var
|
|
3792
|
-
var
|
|
3788
|
+
var import_utils25 = require_cjs();
|
|
3789
|
+
var import_utils26 = require_utils();
|
|
3793
3790
|
var ENV2 = "development";
|
|
3794
3791
|
var applyExtend = (element, parent, options = {}) => {
|
|
3795
|
-
if ((0,
|
|
3796
|
-
element = (0,
|
|
3792
|
+
if ((0, import_utils25.isFunction)(element))
|
|
3793
|
+
element = (0, import_utils25.exec)(element, parent);
|
|
3797
3794
|
let { extend, props: props6, context, __ref } = element;
|
|
3798
3795
|
const COMPONENTS = context && context.components || options.components;
|
|
3799
|
-
if ((0,
|
|
3796
|
+
if ((0, import_utils25.isString)(extend)) {
|
|
3800
3797
|
if (COMPONENTS && COMPONENTS[extend])
|
|
3801
3798
|
extend = COMPONENTS[extend];
|
|
3802
3799
|
else {
|
|
@@ -3806,7 +3803,7 @@ var require_extend = __commonJS({
|
|
|
3806
3803
|
extend = {};
|
|
3807
3804
|
}
|
|
3808
3805
|
}
|
|
3809
|
-
const extendStack = (0,
|
|
3806
|
+
const extendStack = (0, import_utils26.getExtendStack)(extend);
|
|
3810
3807
|
if (ENV2 !== "test" || ENV2 !== "development")
|
|
3811
3808
|
delete element.extend;
|
|
3812
3809
|
let childExtendStack = [];
|
|
@@ -3815,12 +3812,12 @@ var require_extend = __commonJS({
|
|
|
3815
3812
|
if (!options.ignoreChildExtend) {
|
|
3816
3813
|
if (props6 && props6.ignoreChildExtend)
|
|
3817
3814
|
return;
|
|
3818
|
-
childExtendStack = (0,
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
const canExtendRecursive =
|
|
3815
|
+
childExtendStack = (0, import_utils26.getExtendStack)(parent.childExtend);
|
|
3816
|
+
const ignoreChildExtendRecursive = props6 && props6.ignoreChildExtendRecursive;
|
|
3817
|
+
if (parent.childExtendRecursive && !ignoreChildExtendRecursive) {
|
|
3818
|
+
const canExtendRecursive = element.key !== "__text";
|
|
3822
3819
|
if (canExtendRecursive) {
|
|
3823
|
-
const childExtendRecursiveStack = (0,
|
|
3820
|
+
const childExtendRecursiveStack = (0, import_utils26.getExtendStack)(parent.childExtendRecursive);
|
|
3824
3821
|
childExtendStack = childExtendStack.concat(childExtendRecursiveStack);
|
|
3825
3822
|
element.childExtendRecursive = parent.childExtendRecursive;
|
|
3826
3823
|
}
|
|
@@ -3831,7 +3828,7 @@ var require_extend = __commonJS({
|
|
|
3831
3828
|
const childExtendLength = childExtendStack.length;
|
|
3832
3829
|
let stack = [];
|
|
3833
3830
|
if (extendLength && childExtendLength) {
|
|
3834
|
-
stack = (0,
|
|
3831
|
+
stack = (0, import_utils26.jointStacks)(extendStack, childExtendStack);
|
|
3835
3832
|
} else if (extendLength) {
|
|
3836
3833
|
stack = extendStack;
|
|
3837
3834
|
} else if (childExtendLength) {
|
|
@@ -3839,19 +3836,19 @@ var require_extend = __commonJS({
|
|
|
3839
3836
|
} else if (!options.extend)
|
|
3840
3837
|
return element;
|
|
3841
3838
|
if (options.extend) {
|
|
3842
|
-
const defaultOptionsExtend = (0,
|
|
3839
|
+
const defaultOptionsExtend = (0, import_utils26.getExtendStack)(options.extend);
|
|
3843
3840
|
stack = [].concat(stack, defaultOptionsExtend);
|
|
3844
3841
|
}
|
|
3845
3842
|
if (__ref)
|
|
3846
3843
|
__ref.__extend = stack;
|
|
3847
|
-
const findAndReplaceStrings = (0,
|
|
3848
|
-
let mergedExtend = (0,
|
|
3849
|
-
const component = (0,
|
|
3844
|
+
const findAndReplaceStrings = (0, import_utils26.replaceStringsWithComponents)(stack, COMPONENTS);
|
|
3845
|
+
let mergedExtend = (0, import_utils26.cloneAndMergeArrayExtend)(findAndReplaceStrings);
|
|
3846
|
+
const component = (0, import_utils25.exec)(element.component || mergedExtend.component, element);
|
|
3850
3847
|
if (component && COMPONENTS && COMPONENTS[component]) {
|
|
3851
|
-
const componentExtend = (0,
|
|
3852
|
-
mergedExtend = (0,
|
|
3848
|
+
const componentExtend = (0, import_utils26.cloneAndMergeArrayExtend)((0, import_utils26.getExtendStack)(COMPONENTS[component]));
|
|
3849
|
+
mergedExtend = (0, import_utils26.deepMergeExtend)(componentExtend, mergedExtend);
|
|
3853
3850
|
}
|
|
3854
|
-
return (0,
|
|
3851
|
+
return (0, import_utils26.deepMergeExtend)(element, mergedExtend);
|
|
3855
3852
|
};
|
|
3856
3853
|
}
|
|
3857
3854
|
});
|
|
@@ -3890,11 +3887,11 @@ var require_component = __commonJS({
|
|
|
3890
3887
|
overwriteVariant: () => overwriteVariant
|
|
3891
3888
|
});
|
|
3892
3889
|
module2.exports = __toCommonJS2(component_exports);
|
|
3893
|
-
var
|
|
3890
|
+
var import_utils25 = require_cjs();
|
|
3894
3891
|
var import_extend = require_extend();
|
|
3895
3892
|
var ENV2 = "development";
|
|
3896
3893
|
var checkIfKeyIsComponent = (key) => {
|
|
3897
|
-
const isFirstKeyString = (0,
|
|
3894
|
+
const isFirstKeyString = (0, import_utils25.isString)(key);
|
|
3898
3895
|
if (!isFirstKeyString)
|
|
3899
3896
|
return;
|
|
3900
3897
|
const firstCharKey = key.slice(0, 1);
|
|
@@ -3902,7 +3899,7 @@ var require_component = __commonJS({
|
|
|
3902
3899
|
};
|
|
3903
3900
|
var addAdditionalExtend = (newExtend, element) => {
|
|
3904
3901
|
const { extend } = element;
|
|
3905
|
-
const preserveExtend = (0,
|
|
3902
|
+
const preserveExtend = (0, import_utils25.isArray)(extend) ? extend : [extend];
|
|
3906
3903
|
return {
|
|
3907
3904
|
...element,
|
|
3908
3905
|
extend: [newExtend].concat(preserveExtend)
|
|
@@ -3925,10 +3922,10 @@ var require_component = __commonJS({
|
|
|
3925
3922
|
};
|
|
3926
3923
|
} else if (extend) {
|
|
3927
3924
|
addAdditionalExtend(extendKey, element);
|
|
3928
|
-
} else if ((0,
|
|
3925
|
+
} else if ((0, import_utils25.isFunction)(element)) {
|
|
3929
3926
|
return {
|
|
3930
3927
|
extend: extendKey,
|
|
3931
|
-
props: { ...(0,
|
|
3928
|
+
props: { ...(0, import_utils25.exec)(element, parent) }
|
|
3932
3929
|
};
|
|
3933
3930
|
}
|
|
3934
3931
|
};
|
|
@@ -3937,10 +3934,12 @@ var require_component = __commonJS({
|
|
|
3937
3934
|
};
|
|
3938
3935
|
var applyComponentFromContext = (element, parent, options) => {
|
|
3939
3936
|
const { context } = element;
|
|
3937
|
+
if (!context || !context.components)
|
|
3938
|
+
return;
|
|
3940
3939
|
const { components } = context;
|
|
3941
3940
|
const { extend } = element;
|
|
3942
|
-
const execExtend = (0,
|
|
3943
|
-
if ((0,
|
|
3941
|
+
const execExtend = (0, import_utils25.exec)(extend, element);
|
|
3942
|
+
if ((0, import_utils25.isString)(execExtend)) {
|
|
3944
3943
|
if (components[execExtend])
|
|
3945
3944
|
element.extend = components[execExtend];
|
|
3946
3945
|
else {
|
|
@@ -3953,29 +3952,29 @@ var require_component = __commonJS({
|
|
|
3953
3952
|
}
|
|
3954
3953
|
};
|
|
3955
3954
|
var isVariant = (param) => {
|
|
3956
|
-
if (!(0,
|
|
3955
|
+
if (!(0, import_utils25.isString)(param))
|
|
3957
3956
|
return;
|
|
3958
3957
|
const firstCharKey = param.slice(0, 1);
|
|
3959
3958
|
return firstCharKey === ".";
|
|
3960
3959
|
};
|
|
3961
3960
|
var hasVariantProp = (element) => {
|
|
3962
3961
|
const { props: props6 } = element;
|
|
3963
|
-
if ((0,
|
|
3962
|
+
if ((0, import_utils25.isObject)(props6) && (0, import_utils25.isString)(props6.variant))
|
|
3964
3963
|
return true;
|
|
3965
3964
|
};
|
|
3966
3965
|
var overwriteVariant = (element, variant, variantProps) => {
|
|
3967
3966
|
let variantElement = element[variant];
|
|
3968
3967
|
if (!variantElement)
|
|
3969
3968
|
return;
|
|
3970
|
-
const props6 = (0,
|
|
3971
|
-
if ((0,
|
|
3969
|
+
const props6 = (0, import_utils25.isObject)(variantProps) ? variantProps : {};
|
|
3970
|
+
if ((0, import_utils25.isString)(variantElement)) {
|
|
3972
3971
|
variantElement = {
|
|
3973
3972
|
extend: [{ props: props6 }, variantElement]
|
|
3974
3973
|
};
|
|
3975
3974
|
} else if (variantElement.extend) {
|
|
3976
3975
|
variantElement = addAdditionalExtend({ props: props6 }, variantElement);
|
|
3977
3976
|
}
|
|
3978
|
-
return (0,
|
|
3977
|
+
return (0, import_utils25.overwriteDeep)(element, (0, import_extend.applyExtend)(variantElement));
|
|
3979
3978
|
};
|
|
3980
3979
|
var applyVariant = (element) => {
|
|
3981
3980
|
const { props: props6 } = element;
|
|
@@ -4050,8 +4049,8 @@ var require_iterate = __commonJS({
|
|
|
4050
4049
|
throughUpdatedExec: () => throughUpdatedExec
|
|
4051
4050
|
});
|
|
4052
4051
|
module2.exports = __toCommonJS2(iterate_exports);
|
|
4053
|
-
var
|
|
4054
|
-
var
|
|
4052
|
+
var import_utils25 = require_cjs();
|
|
4053
|
+
var import_utils26 = require_utils();
|
|
4055
4054
|
var import_methods = require_methods2();
|
|
4056
4055
|
var throughInitialExec = (element, exclude = {}) => {
|
|
4057
4056
|
const { __ref: ref } = element;
|
|
@@ -4059,13 +4058,13 @@ var require_iterate = __commonJS({
|
|
|
4059
4058
|
if (exclude[param])
|
|
4060
4059
|
continue;
|
|
4061
4060
|
const prop = element[param];
|
|
4062
|
-
if ((0,
|
|
4061
|
+
if ((0, import_utils25.isFunction)(prop) && !(0, import_methods.isMethod)(param) && !(0, import_utils26.isVariant)(param)) {
|
|
4063
4062
|
ref.__exec[param] = prop;
|
|
4064
4063
|
element[param] = prop(element, element.state);
|
|
4065
4064
|
}
|
|
4066
4065
|
}
|
|
4067
4066
|
};
|
|
4068
|
-
var throughUpdatedExec = (element, options = { excludes:
|
|
4067
|
+
var throughUpdatedExec = (element, options = { excludes: import_utils26.METHODS_EXL }) => {
|
|
4069
4068
|
const { __ref: ref } = element;
|
|
4070
4069
|
const changes = {};
|
|
4071
4070
|
for (const param in ref.__exec) {
|
|
@@ -4074,13 +4073,13 @@ var require_iterate = __commonJS({
|
|
|
4074
4073
|
if (isDefinedParam)
|
|
4075
4074
|
continue;
|
|
4076
4075
|
const newExec = ref.__exec[param](element, element.state, element.context);
|
|
4077
|
-
const execReturnsString = (0,
|
|
4076
|
+
const execReturnsString = (0, import_utils25.isString)(newExec) || (0, import_utils25.isNumber)(newExec);
|
|
4078
4077
|
if (prop && prop.node && execReturnsString) {
|
|
4079
|
-
(0,
|
|
4078
|
+
(0, import_utils26.overwrite)(prop, { text: newExec }, options);
|
|
4080
4079
|
} else if (newExec !== prop) {
|
|
4081
|
-
if ((0,
|
|
4082
|
-
const { extend, ...newElem } = (0,
|
|
4083
|
-
(0,
|
|
4080
|
+
if ((0, import_utils26.checkIfKeyIsComponent)(param)) {
|
|
4081
|
+
const { extend, ...newElem } = (0, import_utils26.extendizeByKey)(newExec, element, param);
|
|
4082
|
+
(0, import_utils26.overwrite)(prop, newElem, options);
|
|
4084
4083
|
} else {
|
|
4085
4084
|
ref.__cached[param] = changes[param] = prop;
|
|
4086
4085
|
element[param] = newExec;
|
|
@@ -4092,16 +4091,16 @@ var require_iterate = __commonJS({
|
|
|
4092
4091
|
var throughInitialDefine = (element) => {
|
|
4093
4092
|
const { define: define2, context, __ref: ref } = element;
|
|
4094
4093
|
let defineObj = {};
|
|
4095
|
-
const hasGlobalDefine = context && (0,
|
|
4096
|
-
if ((0,
|
|
4094
|
+
const hasGlobalDefine = context && (0, import_utils25.isObject)(context.define);
|
|
4095
|
+
if ((0, import_utils25.isObject)(define2))
|
|
4097
4096
|
defineObj = { ...define2 };
|
|
4098
4097
|
if (hasGlobalDefine)
|
|
4099
4098
|
defineObj = { ...defineObj, ...context.define };
|
|
4100
4099
|
for (const param in defineObj) {
|
|
4101
4100
|
let elementProp = element[param];
|
|
4102
|
-
if ((0,
|
|
4101
|
+
if ((0, import_utils25.isFunction)(elementProp) && !(0, import_methods.isMethod)(param) && !(0, import_utils26.isVariant)(param)) {
|
|
4103
4102
|
ref.__exec[param] = elementProp;
|
|
4104
|
-
const execParam2 = elementProp = (0,
|
|
4103
|
+
const execParam2 = elementProp = (0, import_utils25.exec)(elementProp, element);
|
|
4105
4104
|
if (execParam2) {
|
|
4106
4105
|
elementProp = element[param] = execParam2.parse ? execParam2.parse() : execParam2;
|
|
4107
4106
|
ref.__defineCache[param] = elementProp;
|
|
@@ -4117,15 +4116,15 @@ var require_iterate = __commonJS({
|
|
|
4117
4116
|
const { context, define: define2, __ref: ref } = element;
|
|
4118
4117
|
const changes = {};
|
|
4119
4118
|
let obj = {};
|
|
4120
|
-
if ((0,
|
|
4119
|
+
if ((0, import_utils25.isObject)(define2))
|
|
4121
4120
|
obj = { ...define2 };
|
|
4122
|
-
if ((0,
|
|
4121
|
+
if ((0, import_utils25.isObject)(context && context.define))
|
|
4123
4122
|
obj = { ...obj, ...context.define };
|
|
4124
4123
|
for (const param in obj) {
|
|
4125
4124
|
const execParam = ref.__exec[param];
|
|
4126
4125
|
if (execParam)
|
|
4127
4126
|
ref.__defineCache[param] = execParam(element, element.state, element.context);
|
|
4128
|
-
const cached = (0,
|
|
4127
|
+
const cached = (0, import_utils25.exec)(ref.__defineCache[param], element);
|
|
4129
4128
|
const newExecParam = obj[param](cached, element, element.state, element.context);
|
|
4130
4129
|
if (newExecParam)
|
|
4131
4130
|
element[param] = newExecParam;
|
|
@@ -4161,18 +4160,20 @@ var require_applyParam = __commonJS({
|
|
|
4161
4160
|
applyParam: () => applyParam
|
|
4162
4161
|
});
|
|
4163
4162
|
module2.exports = __toCommonJS2(applyParam_exports);
|
|
4164
|
-
var
|
|
4163
|
+
var import_utils25 = require_cjs();
|
|
4165
4164
|
var import_mixins = require_mixins();
|
|
4166
4165
|
var applyParam = (param, element, options) => {
|
|
4167
|
-
const { node: node2, context } = element;
|
|
4166
|
+
const { node: node2, context, __ref: ref } = element;
|
|
4168
4167
|
const prop = element[param];
|
|
4169
4168
|
const DOMQLProperty = import_mixins.registry[param];
|
|
4170
4169
|
const DOMQLPropertyFromContext = context && context.registry && context.registry[param];
|
|
4171
4170
|
const isGlobalTransformer = DOMQLPropertyFromContext || DOMQLProperty;
|
|
4172
4171
|
const hasDefine = element.define && element.define[param];
|
|
4173
4172
|
const hasContextDefine = context && context.define && context.define[param];
|
|
4173
|
+
if (!ref.__if)
|
|
4174
|
+
return;
|
|
4174
4175
|
if (isGlobalTransformer && !hasContextDefine) {
|
|
4175
|
-
if ((0,
|
|
4176
|
+
if ((0, import_utils25.isFunction)(isGlobalTransformer)) {
|
|
4176
4177
|
isGlobalTransformer(prop, element, node2, options);
|
|
4177
4178
|
return;
|
|
4178
4179
|
}
|
|
@@ -4219,15 +4220,15 @@ var require_node2 = __commonJS({
|
|
|
4219
4220
|
default: () => node_default
|
|
4220
4221
|
});
|
|
4221
4222
|
module2.exports = __toCommonJS2(node_exports);
|
|
4222
|
-
var
|
|
4223
|
+
var import_utils25 = require_cjs();
|
|
4223
4224
|
var import_event = require_cjs4();
|
|
4224
4225
|
var import_render = require_cjs5();
|
|
4225
4226
|
var import_methods = require_methods2();
|
|
4226
|
-
var import_create = __toESM2(
|
|
4227
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
4227
4228
|
var import_iterate = require_iterate();
|
|
4228
4229
|
var import_mixins = require_mixins();
|
|
4229
4230
|
var import_applyParam = require_applyParam();
|
|
4230
|
-
var
|
|
4231
|
+
var import_utils26 = require_utils();
|
|
4231
4232
|
var ENV2 = "development";
|
|
4232
4233
|
var createNode = (element, options) => {
|
|
4233
4234
|
let { node: node2, tag, __ref: ref } = element;
|
|
@@ -4244,25 +4245,23 @@ var require_node2 = __commonJS({
|
|
|
4244
4245
|
}
|
|
4245
4246
|
if (ENV2 === "test" || ENV2 === "development" || options.alowRefReference) {
|
|
4246
4247
|
node2.ref = element;
|
|
4247
|
-
if ((0,
|
|
4248
|
+
if ((0, import_utils25.isFunction)(node2.setAttribute))
|
|
4248
4249
|
node2.setAttribute("key", element.key);
|
|
4249
4250
|
}
|
|
4250
|
-
if (!ref.__if)
|
|
4251
|
-
return element;
|
|
4252
4251
|
if (element.tag !== "string" || element.tag !== "fragment") {
|
|
4253
4252
|
(0, import_iterate.throughInitialDefine)(element);
|
|
4254
4253
|
(0, import_iterate.throughInitialExec)(element);
|
|
4255
|
-
if (isNewNode && (0,
|
|
4254
|
+
if (isNewNode && (0, import_utils25.isObject)(element.on))
|
|
4256
4255
|
(0, import_event.applyEventsOnNode)(element);
|
|
4257
4256
|
for (const param in element) {
|
|
4258
4257
|
const prop = element[param];
|
|
4259
|
-
if ((0,
|
|
4258
|
+
if ((0, import_utils25.isUndefined)(prop) || (0, import_methods.isMethod)(param) || (0, import_utils26.isVariant)(param) || (0, import_utils25.isObject)(import_mixins.registry[param]))
|
|
4260
4259
|
continue;
|
|
4261
4260
|
const isElement = (0, import_applyParam.applyParam)(param, element, options);
|
|
4262
4261
|
if (isElement) {
|
|
4263
4262
|
const { hasDefine, hasContextDefine } = isElement;
|
|
4264
4263
|
if (element[param] && !hasDefine && !hasContextDefine) {
|
|
4265
|
-
(0, import_create.default)((0,
|
|
4264
|
+
(0, import_create.default)((0, import_utils25.exec)(prop, element), element, param, options);
|
|
4266
4265
|
}
|
|
4267
4266
|
}
|
|
4268
4267
|
}
|
|
@@ -4857,7 +4856,7 @@ var require_object3 = __commonJS({
|
|
|
4857
4856
|
flattenRecursive: () => flattenRecursive,
|
|
4858
4857
|
isEqualDeep: () => isEqualDeep2,
|
|
4859
4858
|
map: () => map2,
|
|
4860
|
-
merge: () =>
|
|
4859
|
+
merge: () => merge5,
|
|
4861
4860
|
mergeArrayExclude: () => mergeArrayExclude,
|
|
4862
4861
|
mergeIfExisted: () => mergeIfExisted,
|
|
4863
4862
|
objectToString: () => objectToString,
|
|
@@ -4887,7 +4886,7 @@ var require_object3 = __commonJS({
|
|
|
4887
4886
|
obj[e] = exec5(extention[e], element);
|
|
4888
4887
|
}
|
|
4889
4888
|
};
|
|
4890
|
-
var
|
|
4889
|
+
var merge5 = (element, obj, excludeFrom = []) => {
|
|
4891
4890
|
for (const e in obj) {
|
|
4892
4891
|
if (e === "__proto__")
|
|
4893
4892
|
continue;
|
|
@@ -5389,7 +5388,7 @@ var require_methods3 = __commonJS({
|
|
|
5389
5388
|
DEFAULT_METHODS: () => DEFAULT_METHODS
|
|
5390
5389
|
});
|
|
5391
5390
|
module2.exports = __toCommonJS2(methods_exports);
|
|
5392
|
-
var
|
|
5391
|
+
var import_utils25 = require_cjs10();
|
|
5393
5392
|
var DEFAULT_METHODS = {
|
|
5394
5393
|
key: {},
|
|
5395
5394
|
tag: {},
|
|
@@ -5410,7 +5409,7 @@ var require_methods3 = __commonJS({
|
|
|
5410
5409
|
text: (element, state) => {
|
|
5411
5410
|
element.ref.text = {
|
|
5412
5411
|
tag: "text",
|
|
5413
|
-
text: (0,
|
|
5412
|
+
text: (0, import_utils25.exec)(element.text, element, state)
|
|
5414
5413
|
};
|
|
5415
5414
|
},
|
|
5416
5415
|
innerHTML: {},
|
|
@@ -6061,7 +6060,7 @@ var require_object4 = __commonJS({
|
|
|
6061
6060
|
flattenRecursive: () => flattenRecursive,
|
|
6062
6061
|
isEqualDeep: () => isEqualDeep2,
|
|
6063
6062
|
map: () => map2,
|
|
6064
|
-
merge: () =>
|
|
6063
|
+
merge: () => merge5,
|
|
6065
6064
|
mergeArrayExclude: () => mergeArrayExclude,
|
|
6066
6065
|
mergeIfExisted: () => mergeIfExisted,
|
|
6067
6066
|
objectToString: () => objectToString,
|
|
@@ -6091,7 +6090,7 @@ var require_object4 = __commonJS({
|
|
|
6091
6090
|
obj[e] = exec5(extention[e], element);
|
|
6092
6091
|
}
|
|
6093
6092
|
};
|
|
6094
|
-
var
|
|
6093
|
+
var merge5 = (element, obj, excludeFrom = []) => {
|
|
6095
6094
|
for (const e in obj) {
|
|
6096
6095
|
if (e === "__proto__")
|
|
6097
6096
|
continue;
|
|
@@ -6597,12 +6596,12 @@ var require_on2 = __commonJS({
|
|
|
6597
6596
|
triggerEventOnUpdate: () => triggerEventOnUpdate
|
|
6598
6597
|
});
|
|
6599
6598
|
module2.exports = __toCommonJS2(on_exports);
|
|
6600
|
-
var
|
|
6599
|
+
var import_utils25 = require_cjs13();
|
|
6601
6600
|
var applyEvent = (param, element, state, context, options) => {
|
|
6602
6601
|
return param(element, state || element.state, context || element.context, options);
|
|
6603
6602
|
};
|
|
6604
6603
|
var triggerEventOn = (param, element, options) => {
|
|
6605
|
-
if (element.on && (0,
|
|
6604
|
+
if (element.on && (0, import_utils25.isFunction)(element.on[param])) {
|
|
6606
6605
|
const { state, context } = element;
|
|
6607
6606
|
return applyEvent(element.on[param], element, state, context, options);
|
|
6608
6607
|
}
|
|
@@ -6611,7 +6610,7 @@ var require_on2 = __commonJS({
|
|
|
6611
6610
|
return param(updatedObj, element, state || element.state, context || element.context, options);
|
|
6612
6611
|
};
|
|
6613
6612
|
var triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
6614
|
-
if (element.on && (0,
|
|
6613
|
+
if (element.on && (0, import_utils25.isFunction)(element.on[param])) {
|
|
6615
6614
|
const { state, context } = element;
|
|
6616
6615
|
return applyEventUpdate(element.on[param], updatedObj, element, state, context, options);
|
|
6617
6616
|
}
|
|
@@ -6622,7 +6621,7 @@ var require_on2 = __commonJS({
|
|
|
6622
6621
|
if (param === "init" || param === "beforeClassAssign" || param === "render" || param === "renderRouter" || param === "attachNode" || param === "stateInit" || param === "stateCreated" || param === "initStateUpdated" || param === "stateUpdated" || param === "initUpdate" || param === "update")
|
|
6623
6622
|
continue;
|
|
6624
6623
|
const appliedFunction = element.on[param];
|
|
6625
|
-
if ((0,
|
|
6624
|
+
if ((0, import_utils25.isFunction)(appliedFunction)) {
|
|
6626
6625
|
const { state, context } = element;
|
|
6627
6626
|
node2.addEventListener(param, (event) => appliedFunction(event, element, state, context));
|
|
6628
6627
|
}
|
|
@@ -6658,10 +6657,10 @@ var require_can2 = __commonJS({
|
|
|
6658
6657
|
});
|
|
6659
6658
|
module2.exports = __toCommonJS2(can_exports);
|
|
6660
6659
|
var import_report = require_cjs12();
|
|
6661
|
-
var
|
|
6660
|
+
var import_utils25 = require_cjs13();
|
|
6662
6661
|
var canRender = (element) => {
|
|
6663
6662
|
const tag = element.tag || "div";
|
|
6664
|
-
return (0,
|
|
6663
|
+
return (0, import_utils25.isValidHtmlTag)(tag) || (0, import_report.report)("HTMLInvalidTag");
|
|
6665
6664
|
};
|
|
6666
6665
|
}
|
|
6667
6666
|
});
|
|
@@ -6751,8 +6750,8 @@ var require_cacheNode = __commonJS({
|
|
|
6751
6750
|
module2.exports = __toCommonJS2(cacheNode_exports);
|
|
6752
6751
|
var import_report = require_cjs12();
|
|
6753
6752
|
var import_event = require_cjs14();
|
|
6754
|
-
var
|
|
6755
|
-
var
|
|
6753
|
+
var import_utils25 = require_cjs13();
|
|
6754
|
+
var import_cache2 = require_cjs15();
|
|
6756
6755
|
var createHTMLNode = (element) => {
|
|
6757
6756
|
const { tag } = element;
|
|
6758
6757
|
if (tag) {
|
|
@@ -6770,15 +6769,15 @@ var require_cacheNode = __commonJS({
|
|
|
6770
6769
|
};
|
|
6771
6770
|
var detectTag = (element) => {
|
|
6772
6771
|
let { tag, key } = element;
|
|
6773
|
-
tag = (0,
|
|
6772
|
+
tag = (0, import_utils25.exec)(tag, element);
|
|
6774
6773
|
if (tag === true)
|
|
6775
6774
|
tag = key;
|
|
6776
|
-
if ((0,
|
|
6777
|
-
const tagExists = (0,
|
|
6775
|
+
if ((0, import_utils25.isString)(tag)) {
|
|
6776
|
+
const tagExists = (0, import_utils25.isValidHtmlTag)(tag);
|
|
6778
6777
|
if (tagExists)
|
|
6779
6778
|
return tag;
|
|
6780
6779
|
} else {
|
|
6781
|
-
const isKeyATag = (0,
|
|
6780
|
+
const isKeyATag = (0, import_utils25.isValidHtmlTag)(key);
|
|
6782
6781
|
if (isKeyATag)
|
|
6783
6782
|
return key;
|
|
6784
6783
|
}
|
|
@@ -6789,9 +6788,9 @@ var require_cacheNode = __commonJS({
|
|
|
6789
6788
|
if (!(0, import_event.canRender)(element)) {
|
|
6790
6789
|
return (0, import_report.report)("HTMLInvalidTag", element.tag, element);
|
|
6791
6790
|
}
|
|
6792
|
-
let cachedTag =
|
|
6791
|
+
let cachedTag = import_cache2.cache[tag];
|
|
6793
6792
|
if (!cachedTag)
|
|
6794
|
-
cachedTag =
|
|
6793
|
+
cachedTag = import_cache2.cache[tag] = createHTMLNode(element);
|
|
6795
6794
|
const clonedNode = cachedTag.cloneNode(true);
|
|
6796
6795
|
if (tag === "string")
|
|
6797
6796
|
clonedNode.nodeValue = element.text;
|
|
@@ -6861,19 +6860,19 @@ var require_update2 = __commonJS({
|
|
|
6861
6860
|
default: () => update_default
|
|
6862
6861
|
});
|
|
6863
6862
|
module2.exports = __toCommonJS2(update_exports);
|
|
6864
|
-
var
|
|
6863
|
+
var import_utils25 = require_cjs();
|
|
6865
6864
|
var import_event = require_cjs4();
|
|
6866
6865
|
var import_methods = require_methods2();
|
|
6867
6866
|
var import_props = require_props();
|
|
6868
6867
|
var import_state3 = require_cjs6();
|
|
6869
|
-
var
|
|
6870
|
-
var import_create = __toESM2(
|
|
6868
|
+
var import_utils26 = require_utils();
|
|
6869
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
6871
6870
|
var import_iterate = require_iterate();
|
|
6872
6871
|
var import_mixins = require_mixins();
|
|
6873
6872
|
var import_applyParam = require_applyParam();
|
|
6874
6873
|
var import_options3 = __toESM2(require_options(), 1);
|
|
6875
6874
|
var snapshot = {
|
|
6876
|
-
snapshotId:
|
|
6875
|
+
snapshotId: import_utils25.createSnapshotId
|
|
6877
6876
|
};
|
|
6878
6877
|
var UPDATE_DEFAULT_OPTIONS = {
|
|
6879
6878
|
stackChanges: false,
|
|
@@ -6881,7 +6880,7 @@ var require_update2 = __commonJS({
|
|
|
6881
6880
|
preventRecursive: false,
|
|
6882
6881
|
currentSnapshot: false,
|
|
6883
6882
|
calleeElement: false,
|
|
6884
|
-
excludes:
|
|
6883
|
+
excludes: import_utils26.METHODS_EXL
|
|
6885
6884
|
};
|
|
6886
6885
|
var update = function(params = {}, options = UPDATE_DEFAULT_OPTIONS) {
|
|
6887
6886
|
const element = this;
|
|
@@ -6890,14 +6889,14 @@ var require_update2 = __commonJS({
|
|
|
6890
6889
|
if (preventInheritAtCurrentState && preventInheritAtCurrentState.__element === element)
|
|
6891
6890
|
return;
|
|
6892
6891
|
if (!excludes)
|
|
6893
|
-
(0,
|
|
6892
|
+
(0, import_utils25.merge)(options, UPDATE_DEFAULT_OPTIONS);
|
|
6894
6893
|
let ref = element.__ref;
|
|
6895
6894
|
if (!ref)
|
|
6896
6895
|
ref = element.__ref = {};
|
|
6897
6896
|
const [snapshotOnCallee, calleeElement, snapshotHasUpdated] = captureSnapshot(element, options);
|
|
6898
6897
|
if (snapshotHasUpdated)
|
|
6899
6898
|
return;
|
|
6900
|
-
if ((0,
|
|
6899
|
+
if ((0, import_utils25.isString)(params) || (0, import_utils25.isNumber)(params)) {
|
|
6901
6900
|
params = { text: params };
|
|
6902
6901
|
}
|
|
6903
6902
|
const ifFails = checkIfOnUpdate(element, parent, options);
|
|
@@ -6908,7 +6907,7 @@ var require_update2 = __commonJS({
|
|
|
6908
6907
|
return;
|
|
6909
6908
|
if (ref.__if && !options.preventPropsUpdate) {
|
|
6910
6909
|
const hasParentProps = parent.props && (parent.props[key] || parent.props.childProps);
|
|
6911
|
-
const hasFunctionInProps = ref.__props.filter((v) => (0,
|
|
6910
|
+
const hasFunctionInProps = ref.__props.filter((v) => (0, import_utils25.isFunction)(v));
|
|
6912
6911
|
const props6 = params.props || hasParentProps || hasFunctionInProps.length;
|
|
6913
6912
|
if (props6)
|
|
6914
6913
|
(0, import_props.updateProps)(props6, element, parent);
|
|
@@ -6921,11 +6920,11 @@ var require_update2 = __commonJS({
|
|
|
6921
6920
|
if (initUpdateReturns === false)
|
|
6922
6921
|
return element;
|
|
6923
6922
|
}
|
|
6924
|
-
const overwriteChanges = (0,
|
|
6923
|
+
const overwriteChanges = (0, import_utils25.overwriteDeep)(element, params, import_utils26.METHODS_EXL);
|
|
6925
6924
|
const execChanges = (0, import_iterate.throughUpdatedExec)(element, { ignore: UPDATE_DEFAULT_OPTIONS });
|
|
6926
6925
|
const definedChanges = (0, import_iterate.throughUpdatedDefine)(element);
|
|
6927
6926
|
if (options.stackChanges && element.__stackChanges) {
|
|
6928
|
-
const stackChanges = (0,
|
|
6927
|
+
const stackChanges = (0, import_utils25.merge)(definedChanges, (0, import_utils25.merge)(execChanges, overwriteChanges));
|
|
6929
6928
|
element.__stackChanges.push(stackChanges);
|
|
6930
6929
|
}
|
|
6931
6930
|
if (!ref.__if)
|
|
@@ -6936,16 +6935,16 @@ var require_update2 = __commonJS({
|
|
|
6936
6935
|
for (const param in element) {
|
|
6937
6936
|
const prop = element[param];
|
|
6938
6937
|
const hasOnlyUpdateFalsy = options.onlyUpdate && (options.onlyUpdate !== param || !element.lookup(options.onlyUpdate));
|
|
6939
|
-
const isInPreventUpdate = (0,
|
|
6940
|
-
const isInPreventDefineUpdate = (0,
|
|
6941
|
-
if ((0,
|
|
6938
|
+
const isInPreventUpdate = (0, import_utils25.isArray)(options.preventUpdate) && options.preventUpdate.includes(param);
|
|
6939
|
+
const isInPreventDefineUpdate = (0, import_utils25.isArray)(options.preventDefineUpdate) && options.preventDefineUpdate.includes(param);
|
|
6940
|
+
if ((0, import_utils25.isUndefined)(prop) || hasOnlyUpdateFalsy || isInPreventUpdate || isInPreventDefineUpdate || options.preventDefineUpdate === true || options.preventDefineUpdate === param || options.preventContentUpdate && param === "content" || (options.preventStateUpdate && param) === "state" || (0, import_methods.isMethod)(param) || (0, import_utils25.isObject)(import_mixins.registry[param]) || (0, import_utils26.isVariant)(param))
|
|
6942
6941
|
continue;
|
|
6943
6942
|
if (options.preventStateUpdate === "once")
|
|
6944
6943
|
options.preventStateUpdate = false;
|
|
6945
6944
|
const isElement = (0, import_applyParam.applyParam)(param, element, options);
|
|
6946
6945
|
if (isElement) {
|
|
6947
6946
|
const { hasDefine, hasContextDefine } = isElement;
|
|
6948
|
-
const canUpdate = (0,
|
|
6947
|
+
const canUpdate = (0, import_utils25.isObject)(prop) && !hasDefine && !hasContextDefine && !options.preventRecursive;
|
|
6949
6948
|
if (!canUpdate)
|
|
6950
6949
|
continue;
|
|
6951
6950
|
const childUpdateCall = () => update.call(prop, params[prop], {
|
|
@@ -6954,7 +6953,7 @@ var require_update2 = __commonJS({
|
|
|
6954
6953
|
calleeElement
|
|
6955
6954
|
});
|
|
6956
6955
|
if (element.props && element.props.lazyLoad || options.lazyLoad) {
|
|
6957
|
-
|
|
6956
|
+
import_utils25.window.requestAnimationFrame(() => childUpdateCall());
|
|
6958
6957
|
} else
|
|
6959
6958
|
childUpdateCall();
|
|
6960
6959
|
}
|
|
@@ -6978,7 +6977,7 @@ var require_update2 = __commonJS({
|
|
|
6978
6977
|
return [snapshotOnCallee, calleeElement];
|
|
6979
6978
|
};
|
|
6980
6979
|
var checkIfOnUpdate = (element, parent, options) => {
|
|
6981
|
-
if (!(0,
|
|
6980
|
+
if (!(0, import_utils25.isFunction)(element.if) || !element.state || !parent)
|
|
6982
6981
|
return;
|
|
6983
6982
|
const ref = element.__ref;
|
|
6984
6983
|
const ifPassed = element.if(element, element.state, element.context, options);
|
|
@@ -6995,7 +6994,7 @@ var require_update2 = __commonJS({
|
|
|
6995
6994
|
element.state = ref.__state;
|
|
6996
6995
|
}
|
|
6997
6996
|
const created = (0, import_create.default)(element, parent, element.key, import_options3.default.create);
|
|
6998
|
-
if (options.preventUpdate !== true && element.on && (0,
|
|
6997
|
+
if (options.preventUpdate !== true && element.on && (0, import_utils25.isFunction)(element.on.update)) {
|
|
6999
6998
|
(0, import_event.applyEvent)(element.on.update, created, created.state);
|
|
7000
6999
|
}
|
|
7001
7000
|
return created;
|
|
@@ -7016,9 +7015,9 @@ var require_update2 = __commonJS({
|
|
|
7016
7015
|
return;
|
|
7017
7016
|
}
|
|
7018
7017
|
const { isHoisted, execStateFunction, stateFunctionOverwrite } = options;
|
|
7019
|
-
const shouldForceStateUpdate = (0,
|
|
7018
|
+
const shouldForceStateUpdate = (0, import_utils25.isFunction)(stateKey) && (!isHoisted && execStateFunction && stateFunctionOverwrite);
|
|
7020
7019
|
if (shouldForceStateUpdate) {
|
|
7021
|
-
const execState = (0,
|
|
7020
|
+
const execState = (0, import_utils25.exec)(stateKey, element);
|
|
7022
7021
|
state.set(execState, {
|
|
7023
7022
|
...options,
|
|
7024
7023
|
preventUpdate: true
|
|
@@ -7090,7 +7089,7 @@ var require_set2 = __commonJS({
|
|
|
7090
7089
|
addMethods: () => addMethods
|
|
7091
7090
|
});
|
|
7092
7091
|
module2.exports = __toCommonJS2(set_exports);
|
|
7093
|
-
var
|
|
7092
|
+
var import_utils25 = require_cjs();
|
|
7094
7093
|
var import_set = __toESM2(require_set(), 1);
|
|
7095
7094
|
var import_update = __toESM2(require_update2(), 1);
|
|
7096
7095
|
var import__ = require_methods2();
|
|
@@ -7111,7 +7110,7 @@ var require_set2 = __commonJS({
|
|
|
7111
7110
|
nextElement: import__.nextElement.bind(element),
|
|
7112
7111
|
previousElement: import__.previousElement.bind(element)
|
|
7113
7112
|
};
|
|
7114
|
-
if ((0,
|
|
7113
|
+
if ((0, import_utils25.isDevelopment)())
|
|
7115
7114
|
proto.log = import__.log.bind(element);
|
|
7116
7115
|
Object.setPrototypeOf(element, proto);
|
|
7117
7116
|
};
|
|
@@ -7119,7 +7118,7 @@ var require_set2 = __commonJS({
|
|
|
7119
7118
|
});
|
|
7120
7119
|
|
|
7121
7120
|
// ../../../domql/packages/element/dist/cjs/create.js
|
|
7122
|
-
var
|
|
7121
|
+
var require_create4 = __commonJS({
|
|
7123
7122
|
"../../../domql/packages/element/dist/cjs/create.js"(exports, module2) {
|
|
7124
7123
|
"use strict";
|
|
7125
7124
|
var __create2 = Object.create;
|
|
@@ -7155,7 +7154,6 @@ var require_create3 = __commonJS({
|
|
|
7155
7154
|
});
|
|
7156
7155
|
module2.exports = __toCommonJS2(create_exports);
|
|
7157
7156
|
var import_node = __toESM2(require_node2(), 1);
|
|
7158
|
-
var import_utils28 = require_cjs();
|
|
7159
7157
|
var import_tree = require_tree();
|
|
7160
7158
|
var import_registry = require_cjs11();
|
|
7161
7159
|
var import_event = require_cjs4();
|
|
@@ -7169,21 +7167,54 @@ var require_create3 = __commonJS({
|
|
|
7169
7167
|
var import_set = require_set2();
|
|
7170
7168
|
var import_classList = require_classList();
|
|
7171
7169
|
var import_iterate = require_iterate();
|
|
7170
|
+
var import_utils25 = require_cjs();
|
|
7172
7171
|
var import_options3 = __toESM2(require_options(), 1);
|
|
7173
7172
|
var import_component = require_component();
|
|
7174
7173
|
var ENV2 = "development";
|
|
7175
7174
|
var create2 = (element, parent, key, options = import_options3.default.create || {}) => {
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7175
|
+
cacheOptions(element, options);
|
|
7176
|
+
if (checkIfPrimitive(element)) {
|
|
7177
|
+
return applyValueAsText(element, parent, key);
|
|
7178
|
+
}
|
|
7179
|
+
element = redefineElement(element, parent, key, options);
|
|
7180
|
+
parent = redefineParent(element, parent, key);
|
|
7181
|
+
key = createKey(element, parent, key);
|
|
7182
|
+
const ref = addRef(element, parent, key);
|
|
7183
|
+
applyContext(element, parent, options);
|
|
7184
|
+
(0, import_component.applyComponentFromContext)(element, parent, options);
|
|
7185
|
+
(0, import_extend.applyExtend)(element, parent, options);
|
|
7186
|
+
element.key = key;
|
|
7187
|
+
if (options.onlyResolveExtends) {
|
|
7188
|
+
return onlyResolveExtends(element, parent, options);
|
|
7189
|
+
}
|
|
7190
|
+
replaceOptions(element, parent, options);
|
|
7191
|
+
addCaching(element, parent);
|
|
7192
|
+
(0, import_set.addMethods)(element, parent);
|
|
7193
|
+
(0, import_state3.createState)(element, parent);
|
|
7194
|
+
createIfConditionFlag(element, parent);
|
|
7195
|
+
if (element.node && ref.__if) {
|
|
7196
|
+
return (0, import_render.assignNode)(element, parent, key);
|
|
7179
7197
|
}
|
|
7198
|
+
(0, import_props.createProps)(element, parent);
|
|
7199
|
+
(0, import_component.applyVariant)(element, parent);
|
|
7200
|
+
const onInit = (0, import_event.triggerEventOn)("init", element, options);
|
|
7201
|
+
if (onInit === false)
|
|
7202
|
+
return element;
|
|
7203
|
+
(0, import_event.triggerEventOn)("beforeClassAssign", element, options);
|
|
7204
|
+
(0, import_classList.assignKeyAsClassname)(element);
|
|
7205
|
+
renderElement(element, parent, options);
|
|
7206
|
+
addElementIntoParentChildren(element, parent);
|
|
7207
|
+
(0, import_event.triggerEventOn)("complete", element, options);
|
|
7208
|
+
return element;
|
|
7209
|
+
};
|
|
7210
|
+
var createBasedOnType = (element, parent, key, options) => {
|
|
7180
7211
|
if (element === void 0) {
|
|
7181
7212
|
if (ENV2 === "test" || ENV2 === "development") {
|
|
7182
7213
|
console.warn(key, "element is undefined in", parent && parent.__ref && parent.__ref.path);
|
|
7183
7214
|
}
|
|
7184
|
-
|
|
7215
|
+
return {};
|
|
7185
7216
|
}
|
|
7186
|
-
if ((0,
|
|
7217
|
+
if ((0, import_utils25.isString)(key) && key.slice(0, 2 === "__")) {
|
|
7187
7218
|
if (ENV2 === "test" || ENV2 === "development") {
|
|
7188
7219
|
console.warn(key, "seems like to be in __ref");
|
|
7189
7220
|
}
|
|
@@ -7191,65 +7222,58 @@ var require_create3 = __commonJS({
|
|
|
7191
7222
|
if (element === null)
|
|
7192
7223
|
return;
|
|
7193
7224
|
if (element === true)
|
|
7194
|
-
|
|
7225
|
+
return { text: true };
|
|
7195
7226
|
if (element.__hash) {
|
|
7196
|
-
|
|
7227
|
+
return { extend: element };
|
|
7197
7228
|
}
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7229
|
+
return element;
|
|
7230
|
+
};
|
|
7231
|
+
var redefineElement = (element, parent, key, options) => {
|
|
7232
|
+
const elementWrapper = createBasedOnType(element, parent, key, options);
|
|
7233
|
+
if ((0, import_component.checkIfKeyIsComponent)(key)) {
|
|
7234
|
+
return (0, import_component.applyKeyComponentAsExtend)(elementWrapper, parent, key);
|
|
7202
7235
|
}
|
|
7203
|
-
if (
|
|
7204
|
-
|
|
7236
|
+
if (checkIfMedia(key)) {
|
|
7237
|
+
return applyMediaProps2(elementWrapper, parent, key);
|
|
7205
7238
|
}
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7239
|
+
return elementWrapper;
|
|
7240
|
+
};
|
|
7241
|
+
var redefineParent = (element, parent, key, options) => {
|
|
7242
|
+
if (!parent)
|
|
7243
|
+
return import_tree.ROOT;
|
|
7244
|
+
if ((0, import_utils25.isNode)(parent)) {
|
|
7245
|
+
const parentNodeWrapper = { key: ":root", node: parent };
|
|
7246
|
+
import_tree.ROOT[`${key}_parent`] = parentNodeWrapper;
|
|
7247
|
+
return parentNodeWrapper;
|
|
7209
7248
|
}
|
|
7210
|
-
|
|
7211
|
-
|
|
7249
|
+
return parent;
|
|
7250
|
+
};
|
|
7251
|
+
var cacheOptions = (element, options) => {
|
|
7252
|
+
if (options && !import_options3.default.create) {
|
|
7253
|
+
import_options3.default.create = options;
|
|
7254
|
+
import_options3.default.create.context = element.context || options.context;
|
|
7212
7255
|
}
|
|
7256
|
+
};
|
|
7257
|
+
var createKey = (element, parent, key) => {
|
|
7258
|
+
return (key || element.key || (0, import_utils25.generateKey)()).toString();
|
|
7259
|
+
};
|
|
7260
|
+
var addRef = (element, parent) => {
|
|
7213
7261
|
if (element.__ref)
|
|
7214
7262
|
element.__ref.origin = element;
|
|
7215
7263
|
else
|
|
7216
7264
|
element.__ref = { origin: element };
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
if (context && context.components) {
|
|
7221
|
-
(0, import_component.applyComponentFromContext)(element, parent, options);
|
|
7222
|
-
}
|
|
7223
|
-
(0, import_extend.applyExtend)(element, parent, options);
|
|
7224
|
-
element.key = assignedKey;
|
|
7225
|
-
if (options.onlyResolveExtends) {
|
|
7226
|
-
return resolveExtends(element, parent, options);
|
|
7227
|
-
}
|
|
7265
|
+
return element.__ref;
|
|
7266
|
+
};
|
|
7267
|
+
var replaceOptions = (element, parent, options) => {
|
|
7228
7268
|
if (Object.keys(options).length) {
|
|
7229
7269
|
import_mixins.registry.defaultOptions = options;
|
|
7230
7270
|
if (options.ignoreChildExtend)
|
|
7231
7271
|
delete options.ignoreChildExtend;
|
|
7232
7272
|
}
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
element.state = (0, import_state3.createState)(element, parent);
|
|
7236
|
-
checkIf(element, parent);
|
|
7237
|
-
if (element.node && __ref.__if) {
|
|
7238
|
-
return (0, import_render.assignNode)(element, parent, assignedKey);
|
|
7239
|
-
}
|
|
7240
|
-
if (__ref.__if)
|
|
7241
|
-
(0, import_props.createProps)(element, parent);
|
|
7242
|
-
(0, import_component.applyVariant)(element, parent);
|
|
7243
|
-
const initReturns = (0, import_event.triggerEventOn)("init", element, options);
|
|
7244
|
-
if (initReturns === false)
|
|
7245
|
-
return element;
|
|
7246
|
-
(0, import_event.triggerEventOn)("beforeClassAssign", element, options);
|
|
7247
|
-
(0, import_classList.assignClass)(element);
|
|
7248
|
-
renderElement(element, parent, options);
|
|
7273
|
+
};
|
|
7274
|
+
var addElementIntoParentChildren = (element, parent) => {
|
|
7249
7275
|
if (parent.__ref && parent.__ref.__children)
|
|
7250
7276
|
parent.__ref.__children.push(element.key);
|
|
7251
|
-
(0, import_event.triggerEventOn)("complete", element, options);
|
|
7252
|
-
return element;
|
|
7253
7277
|
};
|
|
7254
7278
|
var renderElement = (element, parent, options) => {
|
|
7255
7279
|
const { __ref: ref, key } = element;
|
|
@@ -7261,7 +7285,7 @@ var require_create3 = __commonJS({
|
|
|
7261
7285
|
(0, import_event.triggerEventOn)("render", element, options);
|
|
7262
7286
|
};
|
|
7263
7287
|
var checkIfPrimitive = (element) => {
|
|
7264
|
-
return (0,
|
|
7288
|
+
return (0, import_utils25.is)(element)("string", "number");
|
|
7265
7289
|
};
|
|
7266
7290
|
var applyValueAsText = (element, parent, key) => {
|
|
7267
7291
|
const extendTag = element.extend && element.extend.tag;
|
|
@@ -7278,9 +7302,9 @@ var require_create3 = __commonJS({
|
|
|
7278
7302
|
if (!element.context)
|
|
7279
7303
|
element.context = parent.context || options.context || import_tree.ROOT.context;
|
|
7280
7304
|
};
|
|
7281
|
-
var
|
|
7305
|
+
var createIfConditionFlag = (element, parent) => {
|
|
7282
7306
|
const { __ref: ref } = element;
|
|
7283
|
-
if ((0,
|
|
7307
|
+
if ((0, import_utils25.isFunction)(element.if)) {
|
|
7284
7308
|
const ifPassed = element.if(element, element.state);
|
|
7285
7309
|
if (!ifPassed) {
|
|
7286
7310
|
const ifFragment = (0, import_node2.cacheNode)({ tag: "fragment" });
|
|
@@ -7323,7 +7347,7 @@ var require_create3 = __commonJS({
|
|
|
7323
7347
|
ref.__path = parentRef.__path.concat(element.key);
|
|
7324
7348
|
}
|
|
7325
7349
|
};
|
|
7326
|
-
var
|
|
7350
|
+
var onlyResolveExtends = (element, parent, options) => {
|
|
7327
7351
|
const { __ref } = element;
|
|
7328
7352
|
element.tag = (0, import_node2.detectTag)(element);
|
|
7329
7353
|
if (!__ref.__exec)
|
|
@@ -7332,15 +7356,13 @@ var require_create3 = __commonJS({
|
|
|
7332
7356
|
__ref.__attr = {};
|
|
7333
7357
|
if (!element.props)
|
|
7334
7358
|
element.props = {};
|
|
7335
|
-
|
|
7336
|
-
element.state = {};
|
|
7337
|
-
(0, import_state3.createState)(element, parent, { skipApplyMethods: true });
|
|
7359
|
+
(0, import_state3.createState)(element, parent, { skipApplyMethods: true, ...options });
|
|
7338
7360
|
(0, import_props.createProps)(element, parent);
|
|
7339
7361
|
(0, import_component.applyVariant)(element, parent);
|
|
7340
7362
|
(0, import_iterate.throughInitialExec)(element, options.propsExcludedFromExec);
|
|
7341
7363
|
for (const param in element) {
|
|
7342
7364
|
const prop = element[param];
|
|
7343
|
-
if ((0,
|
|
7365
|
+
if ((0, import_utils25.isUndefined)(prop) || (0, import_methods.isMethod)(param) || (0, import_utils25.isObject)(import_mixins.registry[param]) || (0, import_component.isVariant)(param))
|
|
7344
7366
|
continue;
|
|
7345
7367
|
const hasDefine = element.define && element.define[param];
|
|
7346
7368
|
const contextHasDefine = element.context && element.context.define && element.context.define[param];
|
|
@@ -7348,16 +7370,13 @@ var require_create3 = __commonJS({
|
|
|
7348
7370
|
if (import_mixins.registry[param] && !optionsHasDefine) {
|
|
7349
7371
|
continue;
|
|
7350
7372
|
} else if (element[param] && !hasDefine && !optionsHasDefine && !contextHasDefine) {
|
|
7351
|
-
create2((0,
|
|
7373
|
+
create2((0, import_utils25.exec)(prop, element), element, param, options);
|
|
7352
7374
|
}
|
|
7353
7375
|
}
|
|
7354
|
-
delete element.parent;
|
|
7355
7376
|
delete element.update;
|
|
7356
7377
|
delete element.__element;
|
|
7357
7378
|
delete element.props.update;
|
|
7358
7379
|
delete element.props.__element;
|
|
7359
|
-
delete element.state.__element;
|
|
7360
|
-
delete element.state.__element;
|
|
7361
7380
|
if (!options.keepRef)
|
|
7362
7381
|
delete element.__ref;
|
|
7363
7382
|
return element;
|
|
@@ -7468,7 +7487,7 @@ var require_cjs17 = __commonJS({
|
|
|
7468
7487
|
});
|
|
7469
7488
|
module2.exports = __toCommonJS2(element_exports);
|
|
7470
7489
|
var import_tree = require_tree();
|
|
7471
|
-
var import_create = __toESM2(
|
|
7490
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
7472
7491
|
var import_node = __toESM2(require_node2(), 1);
|
|
7473
7492
|
var import_define3 = __toESM2(require_define(), 1);
|
|
7474
7493
|
var import_update = __toESM2(require_update2(), 1);
|
|
@@ -7946,7 +7965,7 @@ var require_object5 = __commonJS({
|
|
|
7946
7965
|
flattenRecursive: () => flattenRecursive,
|
|
7947
7966
|
isEqualDeep: () => isEqualDeep2,
|
|
7948
7967
|
map: () => map2,
|
|
7949
|
-
merge: () =>
|
|
7968
|
+
merge: () => merge5,
|
|
7950
7969
|
mergeArrayExclude: () => mergeArrayExclude,
|
|
7951
7970
|
mergeIfExisted: () => mergeIfExisted,
|
|
7952
7971
|
objectToString: () => objectToString,
|
|
@@ -7976,7 +7995,7 @@ var require_object5 = __commonJS({
|
|
|
7976
7995
|
obj[e] = exec5(extention[e], element);
|
|
7977
7996
|
}
|
|
7978
7997
|
};
|
|
7979
|
-
var
|
|
7998
|
+
var merge5 = (element, obj, excludeFrom = []) => {
|
|
7980
7999
|
for (const e in obj) {
|
|
7981
8000
|
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
|
|
7982
8001
|
if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
|
|
@@ -8712,7 +8731,7 @@ var require_cjs20 = __commonJS({
|
|
|
8712
8731
|
mod
|
|
8713
8732
|
));
|
|
8714
8733
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
8715
|
-
var
|
|
8734
|
+
var require_cjs25 = __commonJS2({
|
|
8716
8735
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports2, module22) {
|
|
8717
8736
|
"use strict";
|
|
8718
8737
|
var __defProp22 = Object.defineProperty;
|
|
@@ -9164,7 +9183,7 @@ var require_cjs20 = __commonJS({
|
|
|
9164
9183
|
flattenRecursive: () => flattenRecursive,
|
|
9165
9184
|
isEqualDeep: () => isEqualDeep2,
|
|
9166
9185
|
map: () => map2,
|
|
9167
|
-
merge: () =>
|
|
9186
|
+
merge: () => merge5,
|
|
9168
9187
|
mergeArrayExclude: () => mergeArrayExclude,
|
|
9169
9188
|
mergeIfExisted: () => mergeIfExisted,
|
|
9170
9189
|
objectToString: () => objectToString,
|
|
@@ -9194,7 +9213,7 @@ var require_cjs20 = __commonJS({
|
|
|
9194
9213
|
obj[e] = exec5(extention[e], element);
|
|
9195
9214
|
}
|
|
9196
9215
|
};
|
|
9197
|
-
var
|
|
9216
|
+
var merge5 = (element, obj, excludeFrom = []) => {
|
|
9198
9217
|
for (const e in obj) {
|
|
9199
9218
|
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
|
|
9200
9219
|
if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
|
|
@@ -9852,7 +9871,7 @@ var require_cjs20 = __commonJS({
|
|
|
9852
9871
|
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
9853
9872
|
}
|
|
9854
9873
|
});
|
|
9855
|
-
var
|
|
9874
|
+
var require_cjs26 = __commonJS2({
|
|
9856
9875
|
"../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module22) {
|
|
9857
9876
|
"use strict";
|
|
9858
9877
|
var __defProp22 = Object.defineProperty;
|
|
@@ -10034,8 +10053,8 @@ var require_cjs20 = __commonJS({
|
|
|
10034
10053
|
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
10035
10054
|
setVariables: () => setVariables
|
|
10036
10055
|
});
|
|
10037
|
-
var import_globals = __toESM2(
|
|
10038
|
-
var
|
|
10056
|
+
var import_globals = __toESM2(require_cjs25(), 1);
|
|
10057
|
+
var import_utils25 = __toESM2(require_cjs26(), 1);
|
|
10039
10058
|
var ENV2 = "development";
|
|
10040
10059
|
var colorStringToRgbaArray = (color) => {
|
|
10041
10060
|
if (color === "")
|
|
@@ -10163,9 +10182,9 @@ var require_cjs20 = __commonJS({
|
|
|
10163
10182
|
return `rgba(${arr})`;
|
|
10164
10183
|
};
|
|
10165
10184
|
var getRgbTone = (rgb, tone) => {
|
|
10166
|
-
if ((0,
|
|
10185
|
+
if ((0, import_utils25.isString)(rgb))
|
|
10167
10186
|
rgb = rgb.split(", ").map((v) => parseFloat(v));
|
|
10168
|
-
if ((0,
|
|
10187
|
+
if ((0, import_utils25.isNumber)(tone))
|
|
10169
10188
|
tone += "";
|
|
10170
10189
|
const toHex = rgbArrayToHex(rgb);
|
|
10171
10190
|
const abs2 = tone.slice(0, 1);
|
|
@@ -10228,9 +10247,9 @@ var require_cjs20 = __commonJS({
|
|
|
10228
10247
|
const keys = Object.keys(LIBRARY);
|
|
10229
10248
|
return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
|
|
10230
10249
|
};
|
|
10231
|
-
var import_utils52 = __toESM2(
|
|
10232
|
-
var import_utils32 = __toESM2(
|
|
10233
|
-
var
|
|
10250
|
+
var import_utils52 = __toESM2(require_cjs26(), 1);
|
|
10251
|
+
var import_utils32 = __toESM2(require_cjs26());
|
|
10252
|
+
var import_utils26 = __toESM2(require_cjs26());
|
|
10234
10253
|
var toCamelCase2 = (str) => {
|
|
10235
10254
|
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
10236
10255
|
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
@@ -10245,7 +10264,7 @@ var require_cjs20 = __commonJS({
|
|
|
10245
10264
|
if ((0, import_utils32.isArray)(val))
|
|
10246
10265
|
return val;
|
|
10247
10266
|
};
|
|
10248
|
-
var import_utils42 = __toESM2(
|
|
10267
|
+
var import_utils42 = __toESM2(require_cjs26(), 1);
|
|
10249
10268
|
var defaultConfig_exports = {};
|
|
10250
10269
|
__export2(defaultConfig_exports, {
|
|
10251
10270
|
ANIMATION: () => ANIMATION2,
|
|
@@ -10606,7 +10625,7 @@ var require_cjs20 = __commonJS({
|
|
|
10606
10625
|
return sequence[findLetter];
|
|
10607
10626
|
});
|
|
10608
10627
|
};
|
|
10609
|
-
var import_utils72 = __toESM2(
|
|
10628
|
+
var import_utils72 = __toESM2(require_cjs26(), 1);
|
|
10610
10629
|
var setVariables = (result, key) => {
|
|
10611
10630
|
const CONFIG22 = getActiveConfig4();
|
|
10612
10631
|
const { CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
@@ -10644,7 +10663,7 @@ var require_cjs20 = __commonJS({
|
|
|
10644
10663
|
}
|
|
10645
10664
|
}
|
|
10646
10665
|
};
|
|
10647
|
-
var import_utils82 = __toESM2(
|
|
10666
|
+
var import_utils82 = __toESM2(require_cjs26(), 1);
|
|
10648
10667
|
var generateSprite = (icons) => {
|
|
10649
10668
|
const CONFIG22 = getActiveConfig4();
|
|
10650
10669
|
let sprite = "";
|
|
@@ -10731,7 +10750,7 @@ var require_cjs20 = __commonJS({
|
|
|
10731
10750
|
setSVG: () => setSVG,
|
|
10732
10751
|
setTheme: () => setTheme
|
|
10733
10752
|
});
|
|
10734
|
-
var import_utils92 = __toESM2(
|
|
10753
|
+
var import_utils92 = __toESM2(require_cjs26(), 1);
|
|
10735
10754
|
var getColor3 = (value2, key, config) => {
|
|
10736
10755
|
const CONFIG22 = config || getActiveConfig4();
|
|
10737
10756
|
if (!(0, import_utils92.isString)(value2)) {
|
|
@@ -10862,7 +10881,7 @@ var require_cjs20 = __commonJS({
|
|
|
10862
10881
|
value: val.value || val
|
|
10863
10882
|
};
|
|
10864
10883
|
};
|
|
10865
|
-
var import_utils112 = __toESM2(
|
|
10884
|
+
var import_utils112 = __toESM2(require_cjs26(), 1);
|
|
10866
10885
|
var setThemeValue = (theme) => {
|
|
10867
10886
|
const value2 = {};
|
|
10868
10887
|
const { state, media, helpers, ...rest } = theme;
|
|
@@ -11076,7 +11095,7 @@ var require_cjs20 = __commonJS({
|
|
|
11076
11095
|
const r = recursiveTheme(value2);
|
|
11077
11096
|
return r;
|
|
11078
11097
|
};
|
|
11079
|
-
var import_utils122 = __toESM2(
|
|
11098
|
+
var import_utils122 = __toESM2(require_cjs26(), 1);
|
|
11080
11099
|
var setFont = (val, key) => {
|
|
11081
11100
|
const CSSvar = `--font-${key}`;
|
|
11082
11101
|
const fontFace = val[0] ? getFontFaceEach(key, val) : setCustomFontMedia(key, val.url);
|
|
@@ -11099,7 +11118,7 @@ var require_cjs20 = __commonJS({
|
|
|
11099
11118
|
const str = `${value2.join(", ")}, ${FONT_FAMILY_TYPES2[type]}`;
|
|
11100
11119
|
return { var: CSSvar, value: str, arr: value2, type };
|
|
11101
11120
|
};
|
|
11102
|
-
var import_utils152 = __toESM2(
|
|
11121
|
+
var import_utils152 = __toESM2(require_cjs26(), 1);
|
|
11103
11122
|
var runThroughMedia = (props6) => {
|
|
11104
11123
|
const CONFIG22 = getActiveConfig4();
|
|
11105
11124
|
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG22;
|
|
@@ -11166,7 +11185,7 @@ var require_cjs20 = __commonJS({
|
|
|
11166
11185
|
TYPOGRAPHY2
|
|
11167
11186
|
);
|
|
11168
11187
|
};
|
|
11169
|
-
var import_utils182 = __toESM2(
|
|
11188
|
+
var import_utils182 = __toESM2(require_cjs26(), 1);
|
|
11170
11189
|
var runThroughMedia2 = (sequenceProps) => {
|
|
11171
11190
|
for (const prop in sequenceProps) {
|
|
11172
11191
|
const mediaProps = sequenceProps[prop];
|
|
@@ -11288,7 +11307,7 @@ var require_cjs20 = __commonJS({
|
|
|
11288
11307
|
TIMING2
|
|
11289
11308
|
);
|
|
11290
11309
|
};
|
|
11291
|
-
var import_utils222 = __toESM2(
|
|
11310
|
+
var import_utils222 = __toESM2(require_cjs26(), 1);
|
|
11292
11311
|
var applyDocument = () => {
|
|
11293
11312
|
const CONFIG22 = getActiveConfig4();
|
|
11294
11313
|
const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG22;
|
|
@@ -11299,7 +11318,7 @@ var require_cjs20 = __commonJS({
|
|
|
11299
11318
|
lineHeight: TYPOGRAPHY2.lineHeight
|
|
11300
11319
|
});
|
|
11301
11320
|
};
|
|
11302
|
-
var import_globals2 = __toESM2(
|
|
11321
|
+
var import_globals2 = __toESM2(require_cjs25(), 1);
|
|
11303
11322
|
var DEF_OPTIONS = {
|
|
11304
11323
|
document: import_globals2.document
|
|
11305
11324
|
};
|
|
@@ -11372,7 +11391,7 @@ var require_cjs20 = __commonJS({
|
|
|
11372
11391
|
}
|
|
11373
11392
|
}
|
|
11374
11393
|
};
|
|
11375
|
-
var import_utils252 = __toESM2(
|
|
11394
|
+
var import_utils252 = __toESM2(require_cjs26(), 1);
|
|
11376
11395
|
var applyReset = (reset = {}) => {
|
|
11377
11396
|
const CONFIG22 = getActiveConfig4();
|
|
11378
11397
|
const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG22;
|
|
@@ -11432,7 +11451,7 @@ var require_cjs20 = __commonJS({
|
|
|
11432
11451
|
});
|
|
11433
11452
|
}
|
|
11434
11453
|
};
|
|
11435
|
-
var import_utils262 = __toESM2(
|
|
11454
|
+
var import_utils262 = __toESM2(require_cjs26(), 1);
|
|
11436
11455
|
var isBorderStyle = (str) => [
|
|
11437
11456
|
"none",
|
|
11438
11457
|
"hidden",
|
|
@@ -11531,9 +11550,9 @@ var require_cjs20 = __commonJS({
|
|
|
11531
11550
|
return;
|
|
11532
11551
|
return arr.map(transformTransition).join(",");
|
|
11533
11552
|
};
|
|
11534
|
-
var
|
|
11553
|
+
var import_utils27 = __toESM2(require_cjs26(), 1);
|
|
11535
11554
|
var setCases = (val, key) => {
|
|
11536
|
-
if ((0,
|
|
11555
|
+
if ((0, import_utils27.isFunction)(val))
|
|
11537
11556
|
return val();
|
|
11538
11557
|
return val;
|
|
11539
11558
|
};
|
|
@@ -11752,8 +11771,8 @@ var require_cjs22 = __commonJS({
|
|
|
11752
11771
|
router: () => router2
|
|
11753
11772
|
});
|
|
11754
11773
|
module2.exports = __toCommonJS2(router_exports);
|
|
11755
|
-
var
|
|
11756
|
-
var getActiveRoute = (level = 0, route =
|
|
11774
|
+
var import_utils25 = require_cjs19();
|
|
11775
|
+
var getActiveRoute = (level = 0, route = import_utils25.window.location.pathname) => {
|
|
11757
11776
|
const routeArray = route.split("/");
|
|
11758
11777
|
const activeRoute = routeArray[level + 1];
|
|
11759
11778
|
if (activeRoute)
|
|
@@ -11767,7 +11786,7 @@ var require_cjs22 = __commonJS({
|
|
|
11767
11786
|
initialRender: false,
|
|
11768
11787
|
scrollToTop: true,
|
|
11769
11788
|
scrollToNode: false,
|
|
11770
|
-
scrollNode:
|
|
11789
|
+
scrollNode: import_utils25.document && import_utils25.document.documentElement,
|
|
11771
11790
|
scrollBody: false,
|
|
11772
11791
|
useFragment: false,
|
|
11773
11792
|
updateState: true,
|
|
@@ -11782,13 +11801,13 @@ var require_cjs22 = __commonJS({
|
|
|
11782
11801
|
const route = getActiveRoute(options.level, pathname);
|
|
11783
11802
|
const content = element.routes[route || "/"] || element.routes["/*"];
|
|
11784
11803
|
const scrollNode = options.scrollToNode ? rootNode : options.scrollNode;
|
|
11785
|
-
const hashChanged = hash2 && hash2 !==
|
|
11804
|
+
const hashChanged = hash2 && hash2 !== import_utils25.window.location.hash.slice(1);
|
|
11786
11805
|
const pathChanged = pathname !== lastPathname;
|
|
11787
11806
|
lastPathname = pathname;
|
|
11788
11807
|
if (!content)
|
|
11789
11808
|
return;
|
|
11790
11809
|
if (options.pushState) {
|
|
11791
|
-
|
|
11810
|
+
import_utils25.window.history.pushState(state, null, pathname + (hash2 ? `#${hash2}` : ""));
|
|
11792
11811
|
}
|
|
11793
11812
|
if (pathChanged || !hashChanged) {
|
|
11794
11813
|
if (options.updateState) {
|
|
@@ -11814,7 +11833,7 @@ var require_cjs22 = __commonJS({
|
|
|
11814
11833
|
});
|
|
11815
11834
|
}
|
|
11816
11835
|
if (hash2) {
|
|
11817
|
-
const activeNode =
|
|
11836
|
+
const activeNode = import_utils25.document.getElementById(hash2);
|
|
11818
11837
|
if (activeNode) {
|
|
11819
11838
|
const top = activeNode.getBoundingClientRect().top + rootNode.scrollTop - options.scrollToOffset || 0;
|
|
11820
11839
|
scrollNode.scrollTo({
|
|
@@ -11829,780 +11848,47 @@ var require_cjs22 = __commonJS({
|
|
|
11829
11848
|
}
|
|
11830
11849
|
});
|
|
11831
11850
|
|
|
11832
|
-
// ../../node_modules
|
|
11833
|
-
var
|
|
11834
|
-
"../../node_modules
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
11843
|
-
};
|
|
11844
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
11845
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
11846
|
-
for (let key of __getOwnPropNames2(from2))
|
|
11847
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
11848
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
11851
|
+
// ../../node_modules/moment/moment.js
|
|
11852
|
+
var require_moment = __commonJS({
|
|
11853
|
+
"../../node_modules/moment/moment.js"(exports, module2) {
|
|
11854
|
+
(function(global, factory) {
|
|
11855
|
+
typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
|
|
11856
|
+
})(exports, function() {
|
|
11857
|
+
"use strict";
|
|
11858
|
+
var hookCallback;
|
|
11859
|
+
function hooks() {
|
|
11860
|
+
return hookCallback.apply(null, arguments);
|
|
11849
11861
|
}
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
11853
|
-
var ignore_exports = {};
|
|
11854
|
-
__export2(ignore_exports, {
|
|
11855
|
-
IGNORE_STATE_PARAMS: () => IGNORE_STATE_PARAMS
|
|
11856
|
-
});
|
|
11857
|
-
module2.exports = __toCommonJS2(ignore_exports);
|
|
11858
|
-
var IGNORE_STATE_PARAMS = [
|
|
11859
|
-
"update",
|
|
11860
|
-
"parse",
|
|
11861
|
-
"clean",
|
|
11862
|
-
"create",
|
|
11863
|
-
"destroy",
|
|
11864
|
-
"add",
|
|
11865
|
-
"toggle",
|
|
11866
|
-
"remove",
|
|
11867
|
-
"apply",
|
|
11868
|
-
"set",
|
|
11869
|
-
"rootUpdate",
|
|
11870
|
-
"parentUpdate",
|
|
11871
|
-
"parent",
|
|
11872
|
-
"__element",
|
|
11873
|
-
"__depends",
|
|
11874
|
-
"__ref",
|
|
11875
|
-
"__children",
|
|
11876
|
-
"__root"
|
|
11877
|
-
];
|
|
11878
|
-
}
|
|
11879
|
-
});
|
|
11880
|
-
|
|
11881
|
-
// ../../node_modules/@domql/event/dist/cjs/on.js
|
|
11882
|
-
var require_on3 = __commonJS({
|
|
11883
|
-
"../../node_modules/@domql/event/dist/cjs/on.js"(exports, module2) {
|
|
11884
|
-
"use strict";
|
|
11885
|
-
var __defProp2 = Object.defineProperty;
|
|
11886
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
11887
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
11888
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
11889
|
-
var __export2 = (target, all) => {
|
|
11890
|
-
for (var name in all)
|
|
11891
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
11892
|
-
};
|
|
11893
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
11894
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
11895
|
-
for (let key of __getOwnPropNames2(from2))
|
|
11896
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
11897
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
11862
|
+
function setHookCallback(callback) {
|
|
11863
|
+
hookCallback = callback;
|
|
11898
11864
|
}
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
11902
|
-
var on_exports = {};
|
|
11903
|
-
__export2(on_exports, {
|
|
11904
|
-
applyEvent: () => applyEvent,
|
|
11905
|
-
applyEventUpdate: () => applyEventUpdate,
|
|
11906
|
-
applyEventsOnNode: () => applyEventsOnNode,
|
|
11907
|
-
triggerEventOn: () => triggerEventOn,
|
|
11908
|
-
triggerEventOnUpdate: () => triggerEventOnUpdate
|
|
11909
|
-
});
|
|
11910
|
-
module2.exports = __toCommonJS2(on_exports);
|
|
11911
|
-
var import_utils28 = require_cjs19();
|
|
11912
|
-
var applyEvent = (param, element, state, context, options) => {
|
|
11913
|
-
return param(element, state || element.state, context || element.context, options);
|
|
11914
|
-
};
|
|
11915
|
-
var triggerEventOn = (param, element, options) => {
|
|
11916
|
-
if (element.on && (0, import_utils28.isFunction)(element.on[param])) {
|
|
11917
|
-
const { state, context } = element;
|
|
11918
|
-
return applyEvent(element.on[param], element, state, context, options);
|
|
11865
|
+
function isArray8(input) {
|
|
11866
|
+
return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]";
|
|
11919
11867
|
}
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
return param(updatedObj, element, state || element.state, context || element.context, options);
|
|
11923
|
-
};
|
|
11924
|
-
var triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
11925
|
-
if (element.on && (0, import_utils28.isFunction)(element.on[param])) {
|
|
11926
|
-
const { state, context } = element;
|
|
11927
|
-
return applyEventUpdate(element.on[param], updatedObj, element, state, context, options);
|
|
11868
|
+
function isObject14(input) {
|
|
11869
|
+
return input != null && Object.prototype.toString.call(input) === "[object Object]";
|
|
11928
11870
|
}
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
if (
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11871
|
+
function hasOwnProp(a, b) {
|
|
11872
|
+
return Object.prototype.hasOwnProperty.call(a, b);
|
|
11873
|
+
}
|
|
11874
|
+
function isObjectEmpty(obj) {
|
|
11875
|
+
if (Object.getOwnPropertyNames) {
|
|
11876
|
+
return Object.getOwnPropertyNames(obj).length === 0;
|
|
11877
|
+
} else {
|
|
11878
|
+
var k;
|
|
11879
|
+
for (k in obj) {
|
|
11880
|
+
if (hasOwnProp(obj, k)) {
|
|
11881
|
+
return false;
|
|
11882
|
+
}
|
|
11883
|
+
}
|
|
11884
|
+
return true;
|
|
11939
11885
|
}
|
|
11940
11886
|
}
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
});
|
|
11944
|
-
|
|
11945
|
-
// ../../node_modules/@domql/event/dist/cjs/can.js
|
|
11946
|
-
var require_can3 = __commonJS({
|
|
11947
|
-
"../../node_modules/@domql/event/dist/cjs/can.js"(exports, module2) {
|
|
11948
|
-
"use strict";
|
|
11949
|
-
var __defProp2 = Object.defineProperty;
|
|
11950
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
11951
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
11952
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
11953
|
-
var __export2 = (target, all) => {
|
|
11954
|
-
for (var name in all)
|
|
11955
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
11956
|
-
};
|
|
11957
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
11958
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
11959
|
-
for (let key of __getOwnPropNames2(from2))
|
|
11960
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
11961
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
11887
|
+
function isUndefined3(input) {
|
|
11888
|
+
return input === void 0;
|
|
11962
11889
|
}
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
11966
|
-
var can_exports = {};
|
|
11967
|
-
__export2(can_exports, {
|
|
11968
|
-
canRender: () => canRender
|
|
11969
|
-
});
|
|
11970
|
-
module2.exports = __toCommonJS2(can_exports);
|
|
11971
|
-
var import_report = require_cjs21();
|
|
11972
|
-
var import_utils28 = require_cjs19();
|
|
11973
|
-
var canRender = (element) => {
|
|
11974
|
-
const tag = element.tag || "div";
|
|
11975
|
-
return (0, import_utils28.isValidHtmlTag)(tag) || (0, import_report.report)("HTMLInvalidTag");
|
|
11976
|
-
};
|
|
11977
|
-
}
|
|
11978
|
-
});
|
|
11979
|
-
|
|
11980
|
-
// ../../node_modules/@domql/event/dist/cjs/index.js
|
|
11981
|
-
var require_cjs23 = __commonJS({
|
|
11982
|
-
"../../node_modules/@domql/event/dist/cjs/index.js"(exports, module2) {
|
|
11983
|
-
"use strict";
|
|
11984
|
-
var __defProp2 = Object.defineProperty;
|
|
11985
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
11986
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
11987
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
11988
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
11989
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
11990
|
-
for (let key of __getOwnPropNames2(from2))
|
|
11991
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
11992
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
11993
|
-
}
|
|
11994
|
-
return to;
|
|
11995
|
-
};
|
|
11996
|
-
var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
11997
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
11998
|
-
var event_exports = {};
|
|
11999
|
-
module2.exports = __toCommonJS2(event_exports);
|
|
12000
|
-
__reExport2(event_exports, require_on3(), module2.exports);
|
|
12001
|
-
__reExport2(event_exports, require_can3(), module2.exports);
|
|
12002
|
-
}
|
|
12003
|
-
});
|
|
12004
|
-
|
|
12005
|
-
// ../../node_modules/@domql/state/dist/cjs/methods.js
|
|
12006
|
-
var require_methods4 = __commonJS({
|
|
12007
|
-
"../../node_modules/@domql/state/dist/cjs/methods.js"(exports, module2) {
|
|
12008
|
-
"use strict";
|
|
12009
|
-
var __defProp2 = Object.defineProperty;
|
|
12010
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
12011
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
12012
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
12013
|
-
var __export2 = (target, all) => {
|
|
12014
|
-
for (var name in all)
|
|
12015
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
12016
|
-
};
|
|
12017
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
12018
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
12019
|
-
for (let key of __getOwnPropNames2(from2))
|
|
12020
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
12021
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
12022
|
-
}
|
|
12023
|
-
return to;
|
|
12024
|
-
};
|
|
12025
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
12026
|
-
var methods_exports = {};
|
|
12027
|
-
__export2(methods_exports, {
|
|
12028
|
-
add: () => add,
|
|
12029
|
-
apply: () => apply,
|
|
12030
|
-
clean: () => clean,
|
|
12031
|
-
destroy: () => destroy,
|
|
12032
|
-
parentUpdate: () => parentUpdate,
|
|
12033
|
-
parse: () => parse3,
|
|
12034
|
-
remove: () => remove,
|
|
12035
|
-
rootUpdate: () => rootUpdate,
|
|
12036
|
-
set: () => set5,
|
|
12037
|
-
toggle: () => toggle
|
|
12038
|
-
});
|
|
12039
|
-
module2.exports = __toCommonJS2(methods_exports);
|
|
12040
|
-
var import_utils28 = require_cjs19();
|
|
12041
|
-
var import_ignore = require_ignore3();
|
|
12042
|
-
var parse3 = function() {
|
|
12043
|
-
const state = this;
|
|
12044
|
-
if ((0, import_utils28.isObject)(state)) {
|
|
12045
|
-
const obj = {};
|
|
12046
|
-
for (const param in state) {
|
|
12047
|
-
if (!import_ignore.IGNORE_STATE_PARAMS.includes(param)) {
|
|
12048
|
-
obj[param] = state[param];
|
|
12049
|
-
}
|
|
12050
|
-
}
|
|
12051
|
-
return obj;
|
|
12052
|
-
} else if ((0, import_utils28.isArray)(state)) {
|
|
12053
|
-
return state.filter((item) => !import_ignore.IGNORE_STATE_PARAMS.includes(item));
|
|
12054
|
-
}
|
|
12055
|
-
};
|
|
12056
|
-
var clean = function(options = {}) {
|
|
12057
|
-
const state = this;
|
|
12058
|
-
for (const param in state) {
|
|
12059
|
-
if (!import_ignore.IGNORE_STATE_PARAMS.includes(param)) {
|
|
12060
|
-
delete state[param];
|
|
12061
|
-
}
|
|
12062
|
-
}
|
|
12063
|
-
if (!options.preventStateUpdate) {
|
|
12064
|
-
state.update(state, { replace: true, options });
|
|
12065
|
-
}
|
|
12066
|
-
return state;
|
|
12067
|
-
};
|
|
12068
|
-
var destroy = function(options = {}) {
|
|
12069
|
-
const state = this;
|
|
12070
|
-
const element = state.__element;
|
|
12071
|
-
const stateKey = element.__ref.__state;
|
|
12072
|
-
if ((0, import_utils28.isString)(stateKey)) {
|
|
12073
|
-
element.parent.state.remove(stateKey, { isHoisted: true, ...options });
|
|
12074
|
-
return element.state;
|
|
12075
|
-
}
|
|
12076
|
-
delete element.state;
|
|
12077
|
-
element.state = state.parent;
|
|
12078
|
-
if (state.parent) {
|
|
12079
|
-
delete state.parent.__children[element.key];
|
|
12080
|
-
}
|
|
12081
|
-
if (state.__children) {
|
|
12082
|
-
for (const key in state.__children) {
|
|
12083
|
-
const child = state.__children[key];
|
|
12084
|
-
if (child.state) {
|
|
12085
|
-
child.parent = state.parent;
|
|
12086
|
-
}
|
|
12087
|
-
}
|
|
12088
|
-
}
|
|
12089
|
-
element.state.update({}, { isHoisted: true, ...options });
|
|
12090
|
-
return element.state;
|
|
12091
|
-
};
|
|
12092
|
-
var parentUpdate = function(obj, options = {}) {
|
|
12093
|
-
const state = this;
|
|
12094
|
-
if (!state || !state.parent)
|
|
12095
|
-
return;
|
|
12096
|
-
return state.parent.update(obj, { isHoisted: true, ...options });
|
|
12097
|
-
};
|
|
12098
|
-
var rootUpdate = function(obj, options = {}) {
|
|
12099
|
-
const state = this;
|
|
12100
|
-
if (!state)
|
|
12101
|
-
return;
|
|
12102
|
-
const rootState = state.__element.__ref.__root.state;
|
|
12103
|
-
return rootState.update(obj, { isHoisted: false, options });
|
|
12104
|
-
};
|
|
12105
|
-
var add = function(value2, options = {}) {
|
|
12106
|
-
const state = this;
|
|
12107
|
-
if ((0, import_utils28.isArray)(state)) {
|
|
12108
|
-
state.push(value2);
|
|
12109
|
-
state.update(state.parse(), { overwrite: "replace", ...options });
|
|
12110
|
-
} else if ((0, import_utils28.isObject)(state)) {
|
|
12111
|
-
const key = Object.keys(state).length;
|
|
12112
|
-
state.update({ [key]: value2 }, options);
|
|
12113
|
-
}
|
|
12114
|
-
};
|
|
12115
|
-
var toggle = function(key, options = {}) {
|
|
12116
|
-
const state = this;
|
|
12117
|
-
state.update({ [key]: !state[key] }, options);
|
|
12118
|
-
};
|
|
12119
|
-
var remove = function(key, options = {}) {
|
|
12120
|
-
const state = this;
|
|
12121
|
-
if ((0, import_utils28.isArray)(state))
|
|
12122
|
-
(0, import_utils28.removeFromArray)(state, key);
|
|
12123
|
-
if ((0, import_utils28.isObject)(state))
|
|
12124
|
-
(0, import_utils28.removeFromObject)(state, key);
|
|
12125
|
-
return state.update(state.parse(), { replace: true, ...options });
|
|
12126
|
-
};
|
|
12127
|
-
var set5 = function(value2, options = {}) {
|
|
12128
|
-
const state = this;
|
|
12129
|
-
return state.clean({ preventStateUpdate: true }).update(value2, { replace: true, ...options });
|
|
12130
|
-
};
|
|
12131
|
-
var apply = function(func, options = {}) {
|
|
12132
|
-
const state = this;
|
|
12133
|
-
if ((0, import_utils28.isFunction)(func)) {
|
|
12134
|
-
func(state);
|
|
12135
|
-
return state.update(state, { replace: true, ...options });
|
|
12136
|
-
}
|
|
12137
|
-
};
|
|
12138
|
-
}
|
|
12139
|
-
});
|
|
12140
|
-
|
|
12141
|
-
// ../../node_modules/@domql/state/dist/cjs/inherit.js
|
|
12142
|
-
var require_inherit3 = __commonJS({
|
|
12143
|
-
"../../node_modules/@domql/state/dist/cjs/inherit.js"(exports, module2) {
|
|
12144
|
-
"use strict";
|
|
12145
|
-
var __defProp2 = Object.defineProperty;
|
|
12146
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
12147
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
12148
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
12149
|
-
var __export2 = (target, all) => {
|
|
12150
|
-
for (var name in all)
|
|
12151
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
12152
|
-
};
|
|
12153
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
12154
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
12155
|
-
for (let key of __getOwnPropNames2(from2))
|
|
12156
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
12157
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
12158
|
-
}
|
|
12159
|
-
return to;
|
|
12160
|
-
};
|
|
12161
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
12162
|
-
var inherit_exports = {};
|
|
12163
|
-
__export2(inherit_exports, {
|
|
12164
|
-
checkIfInherits: () => checkIfInherits,
|
|
12165
|
-
createChangesByKey: () => createChangesByKey,
|
|
12166
|
-
createInheritedState: () => createInheritedState,
|
|
12167
|
-
findInheritedState: () => findInheritedState,
|
|
12168
|
-
getChildStateInKey: () => getChildStateInKey3,
|
|
12169
|
-
getParentStateInKey: () => getParentStateInKey,
|
|
12170
|
-
isState: () => isState3
|
|
12171
|
-
});
|
|
12172
|
-
module2.exports = __toCommonJS2(inherit_exports);
|
|
12173
|
-
var import_utils28 = require_cjs19();
|
|
12174
|
-
var import_ignore = require_ignore3();
|
|
12175
|
-
var getParentStateInKey = (stateKey, parentState) => {
|
|
12176
|
-
if (!stateKey.includes("../"))
|
|
12177
|
-
return;
|
|
12178
|
-
const arr = stateKey.split("../");
|
|
12179
|
-
const arrLength = arr.length - 1;
|
|
12180
|
-
for (let i2 = 0; i2 < arrLength; i2++) {
|
|
12181
|
-
if (!parentState.parent)
|
|
12182
|
-
return null;
|
|
12183
|
-
parentState = parentState.parent;
|
|
12184
|
-
}
|
|
12185
|
-
return parentState;
|
|
12186
|
-
};
|
|
12187
|
-
var getChildStateInKey3 = (stateKey, parentState, options = {}) => {
|
|
12188
|
-
const arr = stateKey.split("/");
|
|
12189
|
-
const arrLength = arr.length - 1;
|
|
12190
|
-
for (let i2 = 0; i2 < arrLength; i2++) {
|
|
12191
|
-
const childKey = arr[i2];
|
|
12192
|
-
const grandChildKey = arr[i2 + 1];
|
|
12193
|
-
if (childKey === "__proto__" || grandChildKey === "__proto__")
|
|
12194
|
-
return;
|
|
12195
|
-
let childInParent = parentState[childKey];
|
|
12196
|
-
if (!childInParent)
|
|
12197
|
-
childInParent = parentState[childKey] = {};
|
|
12198
|
-
if (!childInParent[grandChildKey])
|
|
12199
|
-
childInParent[grandChildKey] = {};
|
|
12200
|
-
stateKey = grandChildKey;
|
|
12201
|
-
parentState = childInParent;
|
|
12202
|
-
}
|
|
12203
|
-
if (options.returnParent)
|
|
12204
|
-
return parentState;
|
|
12205
|
-
return parentState[stateKey];
|
|
12206
|
-
};
|
|
12207
|
-
var findInheritedState = (element, parent, options = {}) => {
|
|
12208
|
-
const ref = element.__ref;
|
|
12209
|
-
let stateKey = ref.__state;
|
|
12210
|
-
if (!checkIfInherits(element))
|
|
12211
|
-
return;
|
|
12212
|
-
let parentState = parent.state;
|
|
12213
|
-
const findGrandParentState = getParentStateInKey(stateKey, parent.state);
|
|
12214
|
-
if (findGrandParentState) {
|
|
12215
|
-
parentState = findGrandParentState;
|
|
12216
|
-
stateKey = stateKey.replaceAll("../", "");
|
|
12217
|
-
}
|
|
12218
|
-
if (!parentState)
|
|
12219
|
-
return;
|
|
12220
|
-
return getChildStateInKey3(stateKey, parentState, options);
|
|
12221
|
-
};
|
|
12222
|
-
var createInheritedState = (element, parent) => {
|
|
12223
|
-
const ref = element.__ref;
|
|
12224
|
-
const inheritedState = findInheritedState(element, parent);
|
|
12225
|
-
if (!inheritedState)
|
|
12226
|
-
return element.state;
|
|
12227
|
-
if ((0, import_utils28.is)(inheritedState)("object", "array")) {
|
|
12228
|
-
return (0, import_utils28.deepClone)(inheritedState, import_ignore.IGNORE_STATE_PARAMS);
|
|
12229
|
-
} else if ((0, import_utils28.is)(inheritedState)("string", "number")) {
|
|
12230
|
-
ref.__stateType = "string";
|
|
12231
|
-
return { value: inheritedState };
|
|
12232
|
-
}
|
|
12233
|
-
console.warn(ref.__state, "is not present. Replacing with", {});
|
|
12234
|
-
};
|
|
12235
|
-
var checkIfInherits = (element) => {
|
|
12236
|
-
const ref = element.__ref;
|
|
12237
|
-
const stateKey = ref.__state;
|
|
12238
|
-
if (!stateKey || (0, import_utils28.isNot)(stateKey)("number", "string"))
|
|
12239
|
-
return false;
|
|
12240
|
-
return true;
|
|
12241
|
-
};
|
|
12242
|
-
var isState3 = function(state) {
|
|
12243
|
-
if (!(0, import_utils28.isObjectLike)(state))
|
|
12244
|
-
return false;
|
|
12245
|
-
return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.toggle && state.add && state.apply && state.__element && state.__children;
|
|
12246
|
-
};
|
|
12247
|
-
var createChangesByKey = (path, value2) => {
|
|
12248
|
-
if (!path) {
|
|
12249
|
-
return value2 || {};
|
|
12250
|
-
}
|
|
12251
|
-
const keys = path.split("/");
|
|
12252
|
-
const obj = {};
|
|
12253
|
-
let ref = obj;
|
|
12254
|
-
keys.forEach((key, index) => {
|
|
12255
|
-
ref[key] = index === keys.length - 1 ? value2 || {} : {};
|
|
12256
|
-
ref = ref[key];
|
|
12257
|
-
});
|
|
12258
|
-
return obj;
|
|
12259
|
-
};
|
|
12260
|
-
}
|
|
12261
|
-
});
|
|
12262
|
-
|
|
12263
|
-
// ../../node_modules/@domql/state/dist/cjs/updateState.js
|
|
12264
|
-
var require_updateState2 = __commonJS({
|
|
12265
|
-
"../../node_modules/@domql/state/dist/cjs/updateState.js"(exports, module2) {
|
|
12266
|
-
"use strict";
|
|
12267
|
-
var __defProp2 = Object.defineProperty;
|
|
12268
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
12269
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
12270
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
12271
|
-
var __export2 = (target, all) => {
|
|
12272
|
-
for (var name in all)
|
|
12273
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
12274
|
-
};
|
|
12275
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
12276
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
12277
|
-
for (let key of __getOwnPropNames2(from2))
|
|
12278
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
12279
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
12280
|
-
}
|
|
12281
|
-
return to;
|
|
12282
|
-
};
|
|
12283
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
12284
|
-
var updateState_exports = {};
|
|
12285
|
-
__export2(updateState_exports, {
|
|
12286
|
-
updateState: () => updateState
|
|
12287
|
-
});
|
|
12288
|
-
module2.exports = __toCommonJS2(updateState_exports);
|
|
12289
|
-
var import_report = require_cjs21();
|
|
12290
|
-
var import_event = require_cjs23();
|
|
12291
|
-
var import_ignore = require_ignore3();
|
|
12292
|
-
var import_utils28 = require_cjs19();
|
|
12293
|
-
var import_inherit = require_inherit3();
|
|
12294
|
-
var STATE_UPDATE_OPTIONS = {
|
|
12295
|
-
overwrite: true,
|
|
12296
|
-
preventHoistElementUpdate: false,
|
|
12297
|
-
updateByState: true,
|
|
12298
|
-
execStateFunction: true,
|
|
12299
|
-
isHoisted: true,
|
|
12300
|
-
stateFunctionOverwrite: true
|
|
12301
|
-
};
|
|
12302
|
-
var updateState = function(obj, options = STATE_UPDATE_OPTIONS) {
|
|
12303
|
-
const state = this;
|
|
12304
|
-
const element = state.__element;
|
|
12305
|
-
if (!options.updateByState)
|
|
12306
|
-
(0, import_utils28.merge)(options, STATE_UPDATE_OPTIONS);
|
|
12307
|
-
if (!state.__element)
|
|
12308
|
-
(0, import_report.report)("ElementOnStateIsNotDefined");
|
|
12309
|
-
if (options.preventInheritAtCurrentState === true) {
|
|
12310
|
-
options.preventInheritAtCurrentState = state;
|
|
12311
|
-
} else if (options.preventInheritAtCurrentState)
|
|
12312
|
-
return;
|
|
12313
|
-
if (!options.preventInitStateUpdateListener) {
|
|
12314
|
-
const initStateUpdateReturns = (0, import_event.triggerEventOnUpdate)("initStateUpdated", obj, element, options);
|
|
12315
|
-
if (initStateUpdateReturns === false)
|
|
12316
|
-
return element;
|
|
12317
|
-
}
|
|
12318
|
-
applyOverwrite(state, obj, options);
|
|
12319
|
-
const updateIsHoisted = hoistStateUpdate(state, obj, options);
|
|
12320
|
-
if (updateIsHoisted)
|
|
12321
|
-
return state;
|
|
12322
|
-
updateDependentState(state, obj, options);
|
|
12323
|
-
applyElementUpdate(state, obj, options);
|
|
12324
|
-
if (!options.preventStateUpdateListener) {
|
|
12325
|
-
(0, import_event.triggerEventOnUpdate)("stateUpdated", obj, element, options);
|
|
12326
|
-
}
|
|
12327
|
-
return state;
|
|
12328
|
-
};
|
|
12329
|
-
var applyOverwrite = (state, obj, options) => {
|
|
12330
|
-
const { overwrite } = options;
|
|
12331
|
-
if (!overwrite)
|
|
12332
|
-
return;
|
|
12333
|
-
const shallow = overwrite === "shallow";
|
|
12334
|
-
const merge22 = overwrite === "merge";
|
|
12335
|
-
if (merge22) {
|
|
12336
|
-
(0, import_utils28.deepMerge)(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
12337
|
-
return;
|
|
12338
|
-
}
|
|
12339
|
-
const overwriteFunc = shallow ? import_utils28.overwriteShallow : import_utils28.overwriteDeep;
|
|
12340
|
-
overwriteFunc(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
12341
|
-
};
|
|
12342
|
-
var hoistStateUpdate = (state, obj, options) => {
|
|
12343
|
-
const element = state.__element;
|
|
12344
|
-
const { parent, __ref: ref } = element;
|
|
12345
|
-
const stateKey = ref.__state;
|
|
12346
|
-
if (!stateKey)
|
|
12347
|
-
return;
|
|
12348
|
-
const asksForInherit = (0, import_inherit.checkIfInherits)(element);
|
|
12349
|
-
const inheritedState = (0, import_inherit.findInheritedState)(element, parent, { returnParent: true });
|
|
12350
|
-
const shouldPropagateState = asksForInherit && inheritedState && !options.stopStatePropagation;
|
|
12351
|
-
if (!shouldPropagateState)
|
|
12352
|
-
return;
|
|
12353
|
-
const isStringState = ref.__stateType === "string";
|
|
12354
|
-
const value2 = isStringState ? state.value : state.parse();
|
|
12355
|
-
const passedValue = isStringState ? state.value : obj;
|
|
12356
|
-
const findGrandParentState = (0, import_inherit.getParentStateInKey)(stateKey, parent.state);
|
|
12357
|
-
const changesValue = (0, import_inherit.createChangesByKey)(stateKey, passedValue);
|
|
12358
|
-
const targetParent = findGrandParentState || parent.state;
|
|
12359
|
-
if (options.replace)
|
|
12360
|
-
targetParent[stateKey] = value2;
|
|
12361
|
-
targetParent.update(changesValue, {
|
|
12362
|
-
execStateFunction: false,
|
|
12363
|
-
stateFunctionOverwrite: false,
|
|
12364
|
-
isHoisted: true,
|
|
12365
|
-
...options,
|
|
12366
|
-
preventUpdate: options.preventHoistElementUpdate,
|
|
12367
|
-
overwrite: !options.replace
|
|
12368
|
-
});
|
|
12369
|
-
const hasNotUpdated = options.preventUpdate !== true || !options.preventHoistElementUpdate;
|
|
12370
|
-
if (!options.preventStateUpdateListener && hasNotUpdated) {
|
|
12371
|
-
(0, import_event.triggerEventOnUpdate)("stateUpdated", obj, element, options);
|
|
12372
|
-
}
|
|
12373
|
-
return true;
|
|
12374
|
-
};
|
|
12375
|
-
var updateDependentState = (state, obj, options) => {
|
|
12376
|
-
if (!state.__depends)
|
|
12377
|
-
return;
|
|
12378
|
-
for (const el in state.__depends) {
|
|
12379
|
-
const dependentState = state.__depends[el];
|
|
12380
|
-
dependentState.clean().update(state.parse(), options);
|
|
12381
|
-
}
|
|
12382
|
-
};
|
|
12383
|
-
var applyElementUpdate = (state, obj, options) => {
|
|
12384
|
-
const element = state.__element;
|
|
12385
|
-
if (options.preventUpdate !== true) {
|
|
12386
|
-
element.update({}, {
|
|
12387
|
-
...options,
|
|
12388
|
-
updateByState: true
|
|
12389
|
-
});
|
|
12390
|
-
} else if (options.preventUpdate === "recursive") {
|
|
12391
|
-
element.update({}, {
|
|
12392
|
-
...options,
|
|
12393
|
-
isHoisted: false,
|
|
12394
|
-
updateByState: true,
|
|
12395
|
-
preventUpdate: true
|
|
12396
|
-
});
|
|
12397
|
-
}
|
|
12398
|
-
};
|
|
12399
|
-
}
|
|
12400
|
-
});
|
|
12401
|
-
|
|
12402
|
-
// ../../node_modules/@domql/state/dist/cjs/createState.js
|
|
12403
|
-
var require_createState2 = __commonJS({
|
|
12404
|
-
"../../node_modules/@domql/state/dist/cjs/createState.js"(exports, module2) {
|
|
12405
|
-
"use strict";
|
|
12406
|
-
var __defProp2 = Object.defineProperty;
|
|
12407
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
12408
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
12409
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
12410
|
-
var __export2 = (target, all) => {
|
|
12411
|
-
for (var name in all)
|
|
12412
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
12413
|
-
};
|
|
12414
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
12415
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
12416
|
-
for (let key of __getOwnPropNames2(from2))
|
|
12417
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
12418
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
12419
|
-
}
|
|
12420
|
-
return to;
|
|
12421
|
-
};
|
|
12422
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
12423
|
-
var createState_exports = {};
|
|
12424
|
-
__export2(createState_exports, {
|
|
12425
|
-
createState: () => createState
|
|
12426
|
-
});
|
|
12427
|
-
module2.exports = __toCommonJS2(createState_exports);
|
|
12428
|
-
var import_event = require_cjs23();
|
|
12429
|
-
var import_utils28 = require_cjs19();
|
|
12430
|
-
var import_ignore = require_ignore3();
|
|
12431
|
-
var import_methods = require_methods4();
|
|
12432
|
-
var import_updateState = require_updateState2();
|
|
12433
|
-
var import_inherit = require_inherit3();
|
|
12434
|
-
var createState = function(element, parent, options) {
|
|
12435
|
-
const skipApplyMethods = Boolean(options && options.skipApplyMethods);
|
|
12436
|
-
const objectizeState = checkForTypes(element);
|
|
12437
|
-
if (objectizeState === false)
|
|
12438
|
-
return parent.state || {};
|
|
12439
|
-
else
|
|
12440
|
-
element.state = (0, import_utils28.deepClone)(objectizeState, import_ignore.IGNORE_STATE_PARAMS);
|
|
12441
|
-
const whatInitReturns = (0, import_event.triggerEventOn)("stateInit", element, options);
|
|
12442
|
-
if (whatInitReturns === false)
|
|
12443
|
-
return element.state;
|
|
12444
|
-
if ((0, import_inherit.checkIfInherits)(element)) {
|
|
12445
|
-
const inheritedState = (0, import_inherit.createInheritedState)(element, parent);
|
|
12446
|
-
element.state = inheritedState || {};
|
|
12447
|
-
}
|
|
12448
|
-
const dependentState = applyDependentState(element, element.state);
|
|
12449
|
-
if (dependentState)
|
|
12450
|
-
element.state = dependentState;
|
|
12451
|
-
if (skipApplyMethods) {
|
|
12452
|
-
if (element.parent && element.parent.state) {
|
|
12453
|
-
element.state.parent = element.parent.state;
|
|
12454
|
-
} else {
|
|
12455
|
-
element.state.parent = {};
|
|
12456
|
-
}
|
|
12457
|
-
return element.state;
|
|
12458
|
-
}
|
|
12459
|
-
applyMethods(element);
|
|
12460
|
-
(0, import_event.triggerEventOn)("stateCreated", element);
|
|
12461
|
-
return element.state;
|
|
12462
|
-
};
|
|
12463
|
-
var applyDependentState = (element, state) => {
|
|
12464
|
-
const { __ref: ref } = state;
|
|
12465
|
-
if (!ref)
|
|
12466
|
-
return;
|
|
12467
|
-
const dependentState = (0, import_utils28.deepClone)(ref, import_ignore.IGNORE_STATE_PARAMS);
|
|
12468
|
-
const newDepends = { [element.key]: dependentState };
|
|
12469
|
-
ref.__depends = (0, import_utils28.isObject)(ref.__depends) ? { ...ref.__depends, ...newDepends } : newDepends;
|
|
12470
|
-
return dependentState;
|
|
12471
|
-
};
|
|
12472
|
-
var checkForTypes = (element) => {
|
|
12473
|
-
const { state, __ref: ref } = element;
|
|
12474
|
-
if ((0, import_utils28.isFunction)(state)) {
|
|
12475
|
-
ref.__state = state;
|
|
12476
|
-
return (0, import_utils28.exec)(state, element);
|
|
12477
|
-
}
|
|
12478
|
-
if ((0, import_utils28.is)(state)("string", "number")) {
|
|
12479
|
-
ref.__state = state;
|
|
12480
|
-
return {};
|
|
12481
|
-
}
|
|
12482
|
-
if (state === true) {
|
|
12483
|
-
ref.__state = element.key;
|
|
12484
|
-
return {};
|
|
12485
|
-
}
|
|
12486
|
-
if (state) {
|
|
12487
|
-
ref.__hasRootState = true;
|
|
12488
|
-
return state;
|
|
12489
|
-
}
|
|
12490
|
-
return false;
|
|
12491
|
-
};
|
|
12492
|
-
var addProtoToArray = (state, proto) => {
|
|
12493
|
-
for (const key in proto) {
|
|
12494
|
-
Object.defineProperty(state, key, {
|
|
12495
|
-
value: proto[key],
|
|
12496
|
-
enumerable: false,
|
|
12497
|
-
// Set this to true if you want the method to appear in for...in loops
|
|
12498
|
-
configurable: true,
|
|
12499
|
-
// Set this to true if you want to allow redefining/removing the property later
|
|
12500
|
-
writable: true
|
|
12501
|
-
// Set this to true if you want to allow changing the function later
|
|
12502
|
-
});
|
|
12503
|
-
}
|
|
12504
|
-
};
|
|
12505
|
-
var applyMethods = (element) => {
|
|
12506
|
-
const state = element.state;
|
|
12507
|
-
const ref = element.__ref;
|
|
12508
|
-
const proto = {
|
|
12509
|
-
clean: import_methods.clean.bind(state),
|
|
12510
|
-
parse: import_methods.parse.bind(state),
|
|
12511
|
-
destroy: import_methods.destroy.bind(state),
|
|
12512
|
-
update: import_updateState.updateState.bind(state),
|
|
12513
|
-
rootUpdate: import_methods.rootUpdate.bind(state),
|
|
12514
|
-
parentUpdate: import_methods.parentUpdate.bind(state),
|
|
12515
|
-
create: createState.bind(state),
|
|
12516
|
-
add: import_methods.add.bind(state),
|
|
12517
|
-
toggle: import_methods.toggle.bind(state),
|
|
12518
|
-
remove: import_methods.remove.bind(state),
|
|
12519
|
-
apply: import_methods.apply.bind(state),
|
|
12520
|
-
set: import_methods.set.bind(state),
|
|
12521
|
-
parent: element.parent.state,
|
|
12522
|
-
__element: element,
|
|
12523
|
-
__children: {},
|
|
12524
|
-
__root: ref.__root ? ref.__root.state : state
|
|
12525
|
-
};
|
|
12526
|
-
if ((0, import_utils28.isArray)(state)) {
|
|
12527
|
-
addProtoToArray(state, proto);
|
|
12528
|
-
} else {
|
|
12529
|
-
Object.setPrototypeOf(state, proto);
|
|
12530
|
-
}
|
|
12531
|
-
if (state.parent)
|
|
12532
|
-
state.parent.__children[element.key] = state;
|
|
12533
|
-
};
|
|
12534
|
-
}
|
|
12535
|
-
});
|
|
12536
|
-
|
|
12537
|
-
// ../../node_modules/@domql/state/dist/cjs/index.js
|
|
12538
|
-
var require_cjs24 = __commonJS({
|
|
12539
|
-
"../../node_modules/@domql/state/dist/cjs/index.js"(exports, module2) {
|
|
12540
|
-
"use strict";
|
|
12541
|
-
var __defProp2 = Object.defineProperty;
|
|
12542
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
12543
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
12544
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
12545
|
-
var __copyProps2 = (to, from2, except, desc) => {
|
|
12546
|
-
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
12547
|
-
for (let key of __getOwnPropNames2(from2))
|
|
12548
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
12549
|
-
__defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
|
12550
|
-
}
|
|
12551
|
-
return to;
|
|
12552
|
-
};
|
|
12553
|
-
var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
12554
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
12555
|
-
var state_exports = {};
|
|
12556
|
-
module2.exports = __toCommonJS2(state_exports);
|
|
12557
|
-
__reExport2(state_exports, require_ignore3(), module2.exports);
|
|
12558
|
-
__reExport2(state_exports, require_createState2(), module2.exports);
|
|
12559
|
-
__reExport2(state_exports, require_updateState2(), module2.exports);
|
|
12560
|
-
__reExport2(state_exports, require_methods4(), module2.exports);
|
|
12561
|
-
__reExport2(state_exports, require_inherit3(), module2.exports);
|
|
12562
|
-
}
|
|
12563
|
-
});
|
|
12564
|
-
|
|
12565
|
-
// ../../node_modules/moment/moment.js
|
|
12566
|
-
var require_moment = __commonJS({
|
|
12567
|
-
"../../node_modules/moment/moment.js"(exports, module2) {
|
|
12568
|
-
(function(global, factory) {
|
|
12569
|
-
typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
|
|
12570
|
-
})(exports, function() {
|
|
12571
|
-
"use strict";
|
|
12572
|
-
var hookCallback;
|
|
12573
|
-
function hooks() {
|
|
12574
|
-
return hookCallback.apply(null, arguments);
|
|
12575
|
-
}
|
|
12576
|
-
function setHookCallback(callback) {
|
|
12577
|
-
hookCallback = callback;
|
|
12578
|
-
}
|
|
12579
|
-
function isArray8(input) {
|
|
12580
|
-
return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]";
|
|
12581
|
-
}
|
|
12582
|
-
function isObject14(input) {
|
|
12583
|
-
return input != null && Object.prototype.toString.call(input) === "[object Object]";
|
|
12584
|
-
}
|
|
12585
|
-
function hasOwnProp(a, b) {
|
|
12586
|
-
return Object.prototype.hasOwnProperty.call(a, b);
|
|
12587
|
-
}
|
|
12588
|
-
function isObjectEmpty(obj) {
|
|
12589
|
-
if (Object.getOwnPropertyNames) {
|
|
12590
|
-
return Object.getOwnPropertyNames(obj).length === 0;
|
|
12591
|
-
} else {
|
|
12592
|
-
var k;
|
|
12593
|
-
for (k in obj) {
|
|
12594
|
-
if (hasOwnProp(obj, k)) {
|
|
12595
|
-
return false;
|
|
12596
|
-
}
|
|
12597
|
-
}
|
|
12598
|
-
return true;
|
|
12599
|
-
}
|
|
12600
|
-
}
|
|
12601
|
-
function isUndefined3(input) {
|
|
12602
|
-
return input === void 0;
|
|
12603
|
-
}
|
|
12604
|
-
function isNumber2(input) {
|
|
12605
|
-
return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]";
|
|
11890
|
+
function isNumber2(input) {
|
|
11891
|
+
return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]";
|
|
12606
11892
|
}
|
|
12607
11893
|
function isDate(input) {
|
|
12608
11894
|
return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
|
|
@@ -16742,7 +16028,7 @@ var require_headless_datepicker = __commonJS({
|
|
|
16742
16028
|
});
|
|
16743
16029
|
|
|
16744
16030
|
// ../../node_modules/@domql/globals/dist/cjs/index.js
|
|
16745
|
-
var
|
|
16031
|
+
var require_cjs23 = __commonJS({
|
|
16746
16032
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
16747
16033
|
"use strict";
|
|
16748
16034
|
var __defProp2 = Object.defineProperty;
|
|
@@ -16778,7 +16064,7 @@ var require_cjs25 = __commonJS({
|
|
|
16778
16064
|
});
|
|
16779
16065
|
|
|
16780
16066
|
// ../fetch/dist/cjs/index.js
|
|
16781
|
-
var
|
|
16067
|
+
var require_cjs24 = __commonJS({
|
|
16782
16068
|
"../fetch/dist/cjs/index.js"(exports, module2) {
|
|
16783
16069
|
"use strict";
|
|
16784
16070
|
var __create2 = Object.create;
|
|
@@ -16817,7 +16103,7 @@ var require_cjs26 = __commonJS({
|
|
|
16817
16103
|
});
|
|
16818
16104
|
module2.exports = __toCommonJS2(fetch_exports);
|
|
16819
16105
|
var utils2 = __toESM2(require_cjs19(), 1);
|
|
16820
|
-
var globals2 = __toESM2(
|
|
16106
|
+
var globals2 = __toESM2(require_cjs23(), 1);
|
|
16821
16107
|
var { overwriteDeep, deepDestringify } = utils2;
|
|
16822
16108
|
var { window: window4 } = globals2;
|
|
16823
16109
|
var IS_DEVELOPMENT = window4 && window4.location ? window4.location.host.includes("dev.") || window4.location.host.includes("symbo.ls") : true;
|
|
@@ -16884,7 +16170,7 @@ __export(src_exports, {
|
|
|
16884
16170
|
});
|
|
16885
16171
|
module.exports = __toCommonJS(src_exports);
|
|
16886
16172
|
var import_domql = __toESM(require_cjs18(), 1);
|
|
16887
|
-
var
|
|
16173
|
+
var import_utils24 = __toESM(require_cjs19(), 1);
|
|
16888
16174
|
|
|
16889
16175
|
// src/utilImports.js
|
|
16890
16176
|
var utilImports_exports = {};
|
|
@@ -18200,7 +17486,7 @@ var insertStyles = function insertStyles2(cache2, serialized, isStringTag) {
|
|
|
18200
17486
|
}
|
|
18201
17487
|
};
|
|
18202
17488
|
|
|
18203
|
-
//
|
|
17489
|
+
// ../../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
18204
17490
|
function insertWithoutScoping(cache2, serialized) {
|
|
18205
17491
|
if (cache2.inserted[serialized.name] === void 0) {
|
|
18206
17492
|
return cache2.insert("", serialized, cache2.sheet, true);
|
|
@@ -18407,6 +17693,8 @@ __export(domql_exports, {
|
|
|
18407
17693
|
Button: () => Button,
|
|
18408
17694
|
ButtonSet: () => ButtonSet,
|
|
18409
17695
|
Caption: () => Caption,
|
|
17696
|
+
Card: () => Card,
|
|
17697
|
+
Chat: () => Chat,
|
|
18410
17698
|
CheckBoxWithLabel: () => CheckBoxWithLabel,
|
|
18411
17699
|
Checkbox: () => Checkbox,
|
|
18412
17700
|
Circle: () => Circle,
|
|
@@ -18483,6 +17771,7 @@ __export(domql_exports, {
|
|
|
18483
17771
|
Subhead: () => Subhead,
|
|
18484
17772
|
Svg: () => Svg,
|
|
18485
17773
|
Tab: () => Tab,
|
|
17774
|
+
Table: () => Table,
|
|
18486
17775
|
Text: () => Text,
|
|
18487
17776
|
Textarea: () => Textarea,
|
|
18488
17777
|
Theme: () => Theme,
|
|
@@ -18502,6 +17791,7 @@ __export(domql_exports, {
|
|
|
18502
17791
|
UploadModalLabel: () => UploadModalLabel,
|
|
18503
17792
|
UploadProgress: () => UploadProgress,
|
|
18504
17793
|
UploadResult: () => UploadResult,
|
|
17794
|
+
User: () => User,
|
|
18505
17795
|
Video: () => Video,
|
|
18506
17796
|
XYZ: () => XYZ,
|
|
18507
17797
|
calendar: () => calendar,
|
|
@@ -19369,7 +18659,7 @@ var Overflow = {
|
|
|
19369
18659
|
};
|
|
19370
18660
|
|
|
19371
18661
|
// ../../uikit/domql/Atoms/Collection.js
|
|
19372
|
-
var import_state = __toESM(
|
|
18662
|
+
var import_state = __toESM(require_cjs6());
|
|
19373
18663
|
var import_utils6 = __toESM(require_cjs19());
|
|
19374
18664
|
var Collection = {
|
|
19375
18665
|
define: {
|
|
@@ -21005,159 +20295,45 @@ var depth2 = {
|
|
|
21005
20295
|
};
|
|
21006
20296
|
|
|
21007
20297
|
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/InteractiveComponent.js
|
|
21008
|
-
var Focusable2 = {
|
|
21009
|
-
props: {
|
|
21010
|
-
border: "none",
|
|
21011
|
-
outline: "solid, 0, blue .3",
|
|
21012
|
-
":focus-visible": {
|
|
21013
|
-
opacity: 1,
|
|
21014
|
-
outline: "solid, X, blue .3"
|
|
21015
|
-
}
|
|
21016
|
-
},
|
|
21017
|
-
attr: {
|
|
21018
|
-
placeholder: ({ props: props6 }) => props6.placeholder,
|
|
21019
|
-
tabIndex: ({ props: props6 }) => props6.tabIndex
|
|
21020
|
-
}
|
|
21021
|
-
};
|
|
21022
|
-
|
|
21023
|
-
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Collection.js
|
|
21024
|
-
var import_state2 = __toESM(require_cjs24());
|
|
21025
|
-
var import_utils12 = __toESM(require_cjs19());
|
|
21026
|
-
|
|
21027
|
-
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Position.js
|
|
21028
|
-
var import_scratch17 = __toESM(require_cjs20());
|
|
21029
|
-
|
|
21030
|
-
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Shape/index.js
|
|
21031
|
-
var import_utils13 = __toESM(require_cjs19());
|
|
21032
|
-
var import_scratch18 = __toESM(require_cjs20());
|
|
21033
|
-
|
|
21034
|
-
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Text.js
|
|
21035
|
-
var import_scratch19 = __toESM(require_cjs20());
|
|
21036
|
-
|
|
21037
|
-
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Animation.js
|
|
21038
|
-
var import_scratch20 = __toESM(require_cjs20());
|
|
21039
|
-
var import_utils15 = __toESM(require_cjs19());
|
|
21040
|
-
|
|
21041
|
-
// ../../uikit/domql/Field/node_modules/@symbo.ls/emotion/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
21042
|
-
function insertWithoutScoping2(cache2, serialized) {
|
|
21043
|
-
if (cache2.inserted[serialized.name] === void 0) {
|
|
21044
|
-
return cache2.insert("", serialized, cache2.sheet, true);
|
|
21045
|
-
}
|
|
21046
|
-
}
|
|
21047
|
-
function merge4(registered, css, className) {
|
|
21048
|
-
var registeredStyles = [];
|
|
21049
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
21050
|
-
if (registeredStyles.length < 2) {
|
|
21051
|
-
return className;
|
|
21052
|
-
}
|
|
21053
|
-
return rawClassName + css(registeredStyles);
|
|
21054
|
-
}
|
|
21055
|
-
var createEmotion4 = function createEmotion5(options) {
|
|
21056
|
-
var cache2 = createCache(options);
|
|
21057
|
-
cache2.sheet.speedy = function(value2) {
|
|
21058
|
-
if (this.ctr !== 0) {
|
|
21059
|
-
throw new Error("speedy must be changed before any rules are inserted");
|
|
21060
|
-
}
|
|
21061
|
-
this.isSpeedy = value2;
|
|
21062
|
-
};
|
|
21063
|
-
cache2.compat = true;
|
|
21064
|
-
var css = function css2() {
|
|
21065
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21066
|
-
args[_key] = arguments[_key];
|
|
21067
|
-
}
|
|
21068
|
-
var serialized = serializeStyles(args, cache2.registered, void 0);
|
|
21069
|
-
insertStyles(cache2, serialized, false);
|
|
21070
|
-
return cache2.key + "-" + serialized.name;
|
|
21071
|
-
};
|
|
21072
|
-
var keyframes3 = function keyframes4() {
|
|
21073
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
21074
|
-
args[_key2] = arguments[_key2];
|
|
21075
|
-
}
|
|
21076
|
-
var serialized = serializeStyles(args, cache2.registered);
|
|
21077
|
-
var animation = "animation-" + serialized.name;
|
|
21078
|
-
insertWithoutScoping2(cache2, {
|
|
21079
|
-
name: serialized.name,
|
|
21080
|
-
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
|
|
21081
|
-
});
|
|
21082
|
-
return animation;
|
|
21083
|
-
};
|
|
21084
|
-
var injectGlobal = function injectGlobal2() {
|
|
21085
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
21086
|
-
args[_key3] = arguments[_key3];
|
|
21087
|
-
}
|
|
21088
|
-
var serialized = serializeStyles(args, cache2.registered);
|
|
21089
|
-
insertWithoutScoping2(cache2, serialized);
|
|
21090
|
-
};
|
|
21091
|
-
var cx = function cx2() {
|
|
21092
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
21093
|
-
args[_key4] = arguments[_key4];
|
|
21094
|
-
}
|
|
21095
|
-
return merge4(cache2.registered, css, classnames3(args));
|
|
21096
|
-
};
|
|
21097
|
-
return {
|
|
21098
|
-
css,
|
|
21099
|
-
cx,
|
|
21100
|
-
injectGlobal,
|
|
21101
|
-
keyframes: keyframes3,
|
|
21102
|
-
hydrate: function hydrate(ids) {
|
|
21103
|
-
ids.forEach(function(key) {
|
|
21104
|
-
cache2.inserted[key] = true;
|
|
21105
|
-
});
|
|
21106
|
-
},
|
|
21107
|
-
flush: function flush() {
|
|
21108
|
-
cache2.registered = {};
|
|
21109
|
-
cache2.inserted = {};
|
|
21110
|
-
cache2.sheet.flush();
|
|
21111
|
-
},
|
|
21112
|
-
// $FlowFixMe
|
|
21113
|
-
sheet: cache2.sheet,
|
|
21114
|
-
cache: cache2,
|
|
21115
|
-
getRegisteredStyles: getRegisteredStyles.bind(null, cache2.registered),
|
|
21116
|
-
merge: merge4.bind(null, cache2.registered, css)
|
|
21117
|
-
};
|
|
21118
|
-
};
|
|
21119
|
-
var classnames3 = function classnames4(args) {
|
|
21120
|
-
var cls = "";
|
|
21121
|
-
for (var i2 = 0; i2 < args.length; i2++) {
|
|
21122
|
-
var arg = args[i2];
|
|
21123
|
-
if (arg == null)
|
|
21124
|
-
continue;
|
|
21125
|
-
var toAdd = void 0;
|
|
21126
|
-
switch (typeof arg) {
|
|
21127
|
-
case "boolean":
|
|
21128
|
-
break;
|
|
21129
|
-
case "object": {
|
|
21130
|
-
if (Array.isArray(arg)) {
|
|
21131
|
-
toAdd = classnames4(arg);
|
|
21132
|
-
} else {
|
|
21133
|
-
toAdd = "";
|
|
21134
|
-
for (var k in arg) {
|
|
21135
|
-
if (arg[k] && k) {
|
|
21136
|
-
toAdd && (toAdd += " ");
|
|
21137
|
-
toAdd += k;
|
|
21138
|
-
}
|
|
21139
|
-
}
|
|
21140
|
-
}
|
|
21141
|
-
break;
|
|
21142
|
-
}
|
|
21143
|
-
default: {
|
|
21144
|
-
toAdd = arg;
|
|
21145
|
-
}
|
|
21146
|
-
}
|
|
21147
|
-
if (toAdd) {
|
|
21148
|
-
cls && (cls += " ");
|
|
21149
|
-
cls += toAdd;
|
|
20298
|
+
var Focusable2 = {
|
|
20299
|
+
props: {
|
|
20300
|
+
border: "none",
|
|
20301
|
+
outline: "solid, 0, blue .3",
|
|
20302
|
+
":focus-visible": {
|
|
20303
|
+
opacity: 1,
|
|
20304
|
+
outline: "solid, X, blue .3"
|
|
21150
20305
|
}
|
|
20306
|
+
},
|
|
20307
|
+
attr: {
|
|
20308
|
+
placeholder: ({ props: props6 }) => props6.placeholder,
|
|
20309
|
+
tabIndex: ({ props: props6 }) => props6.tabIndex
|
|
21151
20310
|
}
|
|
21152
|
-
return cls;
|
|
21153
20311
|
};
|
|
21154
20312
|
|
|
20313
|
+
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Collection.js
|
|
20314
|
+
var import_state2 = __toESM(require_cjs6());
|
|
20315
|
+
var import_utils12 = __toESM(require_cjs19());
|
|
20316
|
+
|
|
20317
|
+
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Position.js
|
|
20318
|
+
var import_scratch17 = __toESM(require_cjs20());
|
|
20319
|
+
|
|
20320
|
+
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Shape/index.js
|
|
20321
|
+
var import_utils13 = __toESM(require_cjs19());
|
|
20322
|
+
var import_scratch18 = __toESM(require_cjs20());
|
|
20323
|
+
|
|
20324
|
+
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Text.js
|
|
20325
|
+
var import_scratch19 = __toESM(require_cjs20());
|
|
20326
|
+
|
|
20327
|
+
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Animation.js
|
|
20328
|
+
var import_scratch20 = __toESM(require_cjs20());
|
|
20329
|
+
var import_utils14 = __toESM(require_cjs19());
|
|
20330
|
+
|
|
21155
20331
|
// ../../uikit/domql/Field/node_modules/@symbo.ls/emotion/index.js
|
|
21156
|
-
var
|
|
20332
|
+
var createEmotion4 = (key = "smbls", container) => {
|
|
21157
20333
|
const cleanKey = key.replaceAll(/\./g, "-");
|
|
21158
|
-
return
|
|
20334
|
+
return createEmotion({ key: cleanKey, container });
|
|
21159
20335
|
};
|
|
21160
|
-
var emotion2 =
|
|
20336
|
+
var emotion2 = createEmotion4();
|
|
21161
20337
|
|
|
21162
20338
|
// ../../uikit/domql/Field/node_modules/@symbo.ls/atoms/Animation.js
|
|
21163
20339
|
var { keyframes: keyframes2 } = emotion2;
|
|
@@ -21218,7 +20394,7 @@ var Video = {
|
|
|
21218
20394
|
};
|
|
21219
20395
|
|
|
21220
20396
|
// ../../uikit/domql/Range/index.js
|
|
21221
|
-
var
|
|
20397
|
+
var import_utils15 = __toESM(require_cjs19());
|
|
21222
20398
|
var import_scratch21 = __toESM(require_cjs20());
|
|
21223
20399
|
var props4 = {
|
|
21224
20400
|
appearance: "none",
|
|
@@ -21286,7 +20462,7 @@ var Range = {
|
|
|
21286
20462
|
};
|
|
21287
20463
|
var listenProp = (el, prop, def) => {
|
|
21288
20464
|
const val = el.props && el.props[prop];
|
|
21289
|
-
const r = (0,
|
|
20465
|
+
const r = (0, import_utils15.isFunction)(val) ? val(el, el.state) : val !== void 0 ? val : def !== void 0 ? def : 50;
|
|
21290
20466
|
return r + "";
|
|
21291
20467
|
};
|
|
21292
20468
|
var RangeWithButtons = {
|
|
@@ -21295,7 +20471,7 @@ var RangeWithButtons = {
|
|
|
21295
20471
|
props: { theme: "tertiary", icon: "minus" },
|
|
21296
20472
|
on: {
|
|
21297
20473
|
click: (ev, el, s) => {
|
|
21298
|
-
el.props && (0,
|
|
20474
|
+
el.props && (0, import_utils15.isFunction)(el.props.onClick) && el.props.onClick(ev, el, s);
|
|
21299
20475
|
}
|
|
21300
20476
|
}
|
|
21301
20477
|
},
|
|
@@ -21316,8 +20492,8 @@ var RangeWithButtons = {
|
|
|
21316
20492
|
step: (el, s) => listenProp(el, "step", 1)
|
|
21317
20493
|
},
|
|
21318
20494
|
on: {
|
|
21319
|
-
input: (ev, el, s) => el.props && (0,
|
|
21320
|
-
change: (ev, el, s) => el.props && (0,
|
|
20495
|
+
input: (ev, el, s) => el.props && (0, import_utils15.isFunction)(el.props.onInput) && el.props.onInput(ev, el, el.state),
|
|
20496
|
+
change: (ev, el, s) => el.props && (0, import_utils15.isFunction)(el.props.onChange) && el.props.onChange(ev, el, el.state)
|
|
21321
20497
|
}
|
|
21322
20498
|
},
|
|
21323
20499
|
plus: {
|
|
@@ -21325,7 +20501,7 @@ var RangeWithButtons = {
|
|
|
21325
20501
|
props: { theme: "tertiary", icon: "plus" },
|
|
21326
20502
|
on: {
|
|
21327
20503
|
click: (ev, el, s) => {
|
|
21328
|
-
el.props && (0,
|
|
20504
|
+
el.props && (0, import_utils15.isFunction)(el.props.onClick) && el.props.onClick(ev, el, el.state);
|
|
21329
20505
|
}
|
|
21330
20506
|
}
|
|
21331
20507
|
}
|
|
@@ -21352,7 +20528,7 @@ var style_default = {
|
|
|
21352
20528
|
|
|
21353
20529
|
// ../../uikit/domql/Slider/index.js
|
|
21354
20530
|
var import_scratch22 = __toESM(require_cjs20());
|
|
21355
|
-
var
|
|
20531
|
+
var import_utils16 = __toESM(require_cjs19());
|
|
21356
20532
|
(0, import_scratch22.set)({
|
|
21357
20533
|
theme: {
|
|
21358
20534
|
sliderThumb: {
|
|
@@ -21384,7 +20560,7 @@ var RangeSlider = {
|
|
|
21384
20560
|
};
|
|
21385
20561
|
var listenProp2 = (el, prop, def) => {
|
|
21386
20562
|
const val = el && el.props && el.props[prop];
|
|
21387
|
-
const r = ((0,
|
|
20563
|
+
const r = ((0, import_utils16.isFunction)(val) ? val() : val) || (def !== void 0 ? def : 50);
|
|
21388
20564
|
return r;
|
|
21389
20565
|
};
|
|
21390
20566
|
var Slider = {
|
|
@@ -21395,10 +20571,10 @@ var Slider = {
|
|
|
21395
20571
|
},
|
|
21396
20572
|
on: {
|
|
21397
20573
|
click: (ev, el, s) => {
|
|
21398
|
-
el.props && (0,
|
|
20574
|
+
el.props && (0, import_utils16.isFunction)(el.props.click) && el.props.click(ev, el, s);
|
|
21399
20575
|
const input = el.parent.input;
|
|
21400
20576
|
const props6 = input.props;
|
|
21401
|
-
const value2 = (0,
|
|
20577
|
+
const value2 = (0, import_utils16.isFunction)(props6.value) ? props6.value() : props6.value;
|
|
21402
20578
|
input.node.value = value2;
|
|
21403
20579
|
}
|
|
21404
20580
|
}
|
|
@@ -21421,8 +20597,8 @@ var Slider = {
|
|
|
21421
20597
|
step: (el, s) => listenProp2(el, "step", 1)
|
|
21422
20598
|
},
|
|
21423
20599
|
on: {
|
|
21424
|
-
input: (ev, el, s) => el.props && (0,
|
|
21425
|
-
change: (ev, el, s) => el.props && (0,
|
|
20600
|
+
input: (ev, el, s) => el.props && (0, import_utils16.isFunction)(el.props.input) && el.props.input(ev, el, s),
|
|
20601
|
+
change: (ev, el, s) => el.props && (0, import_utils16.isFunction)(el.props.change) && el.props.change(ev, el, s)
|
|
21426
20602
|
}
|
|
21427
20603
|
},
|
|
21428
20604
|
button1: {
|
|
@@ -21432,10 +20608,10 @@ var Slider = {
|
|
|
21432
20608
|
},
|
|
21433
20609
|
on: {
|
|
21434
20610
|
click: (ev, el, s) => {
|
|
21435
|
-
el.props && (0,
|
|
20611
|
+
el.props && (0, import_utils16.isFunction)(el.props.click) && el.props.click(ev, el, s);
|
|
21436
20612
|
const input = el.parent.input;
|
|
21437
20613
|
const props6 = input.props;
|
|
21438
|
-
const value2 = (0,
|
|
20614
|
+
const value2 = (0, import_utils16.isFunction)(props6.value) ? props6.value() : props6.value;
|
|
21439
20615
|
input.node.value = value2;
|
|
21440
20616
|
}
|
|
21441
20617
|
}
|
|
@@ -21845,8 +21021,8 @@ var Pills = {
|
|
|
21845
21021
|
}
|
|
21846
21022
|
}),
|
|
21847
21023
|
on: {
|
|
21848
|
-
click: (e, el
|
|
21849
|
-
|
|
21024
|
+
click: (e, el) => {
|
|
21025
|
+
el.state.update({ active: parseInt(el.key) });
|
|
21850
21026
|
}
|
|
21851
21027
|
}
|
|
21852
21028
|
},
|
|
@@ -22030,6 +21206,20 @@ var Steps = {
|
|
|
22030
21206
|
$setPropsCollection: ({ props: props6 }) => props6.options
|
|
22031
21207
|
};
|
|
22032
21208
|
|
|
21209
|
+
// ../../uikit/domql/Table/index.js
|
|
21210
|
+
var Table = {};
|
|
21211
|
+
|
|
21212
|
+
// ../../uikit/domql/Chat/index.js
|
|
21213
|
+
var Chat = {
|
|
21214
|
+
text: "chat here"
|
|
21215
|
+
};
|
|
21216
|
+
|
|
21217
|
+
// ../../uikit/domql/Card/index.js
|
|
21218
|
+
var Card = {};
|
|
21219
|
+
|
|
21220
|
+
// ../../uikit/domql/User/index.js
|
|
21221
|
+
var User = {};
|
|
21222
|
+
|
|
22033
21223
|
// src/define.js
|
|
22034
21224
|
var defaultDefine = {
|
|
22035
21225
|
routes: (param) => param,
|
|
@@ -22054,26 +21244,26 @@ var defaultDefine = {
|
|
|
22054
21244
|
|
|
22055
21245
|
// src/router.js
|
|
22056
21246
|
var import_router2 = __toESM(require_cjs22(), 1);
|
|
22057
|
-
var
|
|
21247
|
+
var import_utils17 = __toESM(require_cjs19(), 1);
|
|
22058
21248
|
var DEFAULT_ROUTING_OPTIONS = {
|
|
22059
21249
|
initRouter: true,
|
|
22060
21250
|
injectRouterInLinkComponent: true,
|
|
22061
21251
|
popState: true
|
|
22062
21252
|
};
|
|
22063
21253
|
var initRouter = (element, options) => {
|
|
22064
|
-
let routerOptions = (0,
|
|
21254
|
+
let routerOptions = (0, import_utils17.merge)(options.router || {}, DEFAULT_ROUTING_OPTIONS);
|
|
22065
21255
|
if (routerOptions === false)
|
|
22066
21256
|
return;
|
|
22067
21257
|
if (routerOptions === true)
|
|
22068
21258
|
routerOptions = DEFAULT_ROUTING_OPTIONS;
|
|
22069
21259
|
const router2 = options.snippets && options.snippets.router ? options.snippets.router : import_router2.router;
|
|
22070
21260
|
const onRouterRenderDefault = (el, s) => {
|
|
22071
|
-
const { pathname, hash: hash2 } =
|
|
21261
|
+
const { pathname, hash: hash2 } = import_utils17.window.location;
|
|
22072
21262
|
const url2 = pathname + hash2;
|
|
22073
21263
|
if (el.routes)
|
|
22074
21264
|
router2(url2, el, {}, { initialRender: true });
|
|
22075
21265
|
};
|
|
22076
|
-
const hasRenderRouter = element.on && !(0,
|
|
21266
|
+
const hasRenderRouter = element.on && !(0, import_utils17.isUndefined)(element.on.renderRouter);
|
|
22077
21267
|
if (routerOptions.initRouter && !hasRenderRouter) {
|
|
22078
21268
|
if (element.on) {
|
|
22079
21269
|
element.on.renderRouter = onRouterRenderDefault;
|
|
@@ -22095,21 +21285,21 @@ var popStateRouter = (element, options) => {
|
|
|
22095
21285
|
if (!routerOptions.popState)
|
|
22096
21286
|
return;
|
|
22097
21287
|
const router2 = options.snippets && options.snippets.router ? options.snippets.router : import_router2.router;
|
|
22098
|
-
|
|
22099
|
-
const { pathname, hash: hash2 } =
|
|
21288
|
+
import_utils17.window.onpopstate = (e) => {
|
|
21289
|
+
const { pathname, hash: hash2 } = import_utils17.window.location;
|
|
22100
21290
|
const url2 = pathname + hash2;
|
|
22101
21291
|
router2(url2, element, {}, { pushState: false, level: 0 });
|
|
22102
21292
|
};
|
|
22103
21293
|
};
|
|
22104
21294
|
var injectRouterInLinkComponent = (routerOptions) => {
|
|
22105
21295
|
if (routerOptions.injectRouterInLinkComponent) {
|
|
22106
|
-
return (0,
|
|
21296
|
+
return (0, import_utils17.deepMerge)(Link, RouterLink);
|
|
22107
21297
|
}
|
|
22108
21298
|
};
|
|
22109
21299
|
|
|
22110
21300
|
// src/ferchOnCreate.js
|
|
22111
|
-
var
|
|
22112
|
-
var import_fetch = __toESM(
|
|
21301
|
+
var import_utils18 = __toESM(require_cjs19(), 1);
|
|
21302
|
+
var import_fetch = __toESM(require_cjs24(), 1);
|
|
22113
21303
|
var fetchSync = async (key, options) => {
|
|
22114
21304
|
if (key && options.editor) {
|
|
22115
21305
|
try {
|
|
@@ -22124,10 +21314,10 @@ var fetchAsync = (app, key, options, callback) => {
|
|
|
22124
21314
|
if (key && options.editor) {
|
|
22125
21315
|
try {
|
|
22126
21316
|
const defaultCallback = (data) => {
|
|
22127
|
-
if ((0,
|
|
21317
|
+
if ((0, import_utils18.isObject)(data.designsystem)) {
|
|
22128
21318
|
options.utils.init(data.designsystem);
|
|
22129
21319
|
}
|
|
22130
|
-
if ((0,
|
|
21320
|
+
if ((0, import_utils18.isObject)(data.state)) {
|
|
22131
21321
|
app.state.set(data.state);
|
|
22132
21322
|
}
|
|
22133
21323
|
};
|
|
@@ -22140,10 +21330,10 @@ var fetchAsync = (app, key, options, callback) => {
|
|
|
22140
21330
|
};
|
|
22141
21331
|
|
|
22142
21332
|
// ../../node_modules/@domql/emotion/index.js
|
|
22143
|
-
var
|
|
21333
|
+
var import_utils20 = __toESM(require_cjs19());
|
|
22144
21334
|
|
|
22145
21335
|
// ../../node_modules/@domql/classlist/index.js
|
|
22146
|
-
var
|
|
21336
|
+
var import_utils19 = __toESM(require_cjs19());
|
|
22147
21337
|
var classify = (obj, element) => {
|
|
22148
21338
|
let className = "";
|
|
22149
21339
|
for (const item in obj) {
|
|
@@ -22153,7 +21343,7 @@ var classify = (obj, element) => {
|
|
|
22153
21343
|
else if (typeof param === "string")
|
|
22154
21344
|
className += ` ${param}`;
|
|
22155
21345
|
else if (typeof param === "function") {
|
|
22156
|
-
className += ` ${(0,
|
|
21346
|
+
className += ` ${(0, import_utils19.exec)(param, element)}`;
|
|
22157
21347
|
}
|
|
22158
21348
|
}
|
|
22159
21349
|
return className;
|
|
@@ -22164,9 +21354,9 @@ var classList = (params, element) => {
|
|
|
22164
21354
|
const { key } = element;
|
|
22165
21355
|
if (params === true)
|
|
22166
21356
|
params = element.class = { key };
|
|
22167
|
-
if ((0,
|
|
21357
|
+
if ((0, import_utils19.isString)(params))
|
|
22168
21358
|
params = element.class = { default: params };
|
|
22169
|
-
if ((0,
|
|
21359
|
+
if ((0, import_utils19.isObject)(params))
|
|
22170
21360
|
params = classify(params, element);
|
|
22171
21361
|
const className = params.replace(/\s+/g, " ").trim();
|
|
22172
21362
|
if (element.ref)
|
|
@@ -22179,126 +21369,12 @@ var applyClassListOnNode = (params, element, node2) => {
|
|
|
22179
21369
|
return className;
|
|
22180
21370
|
};
|
|
22181
21371
|
|
|
22182
|
-
// ../../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
22183
|
-
function insertWithoutScoping3(cache2, serialized) {
|
|
22184
|
-
if (cache2.inserted[serialized.name] === void 0) {
|
|
22185
|
-
return cache2.insert("", serialized, cache2.sheet, true);
|
|
22186
|
-
}
|
|
22187
|
-
}
|
|
22188
|
-
function merge6(registered, css, className) {
|
|
22189
|
-
var registeredStyles = [];
|
|
22190
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
22191
|
-
if (registeredStyles.length < 2) {
|
|
22192
|
-
return className;
|
|
22193
|
-
}
|
|
22194
|
-
return rawClassName + css(registeredStyles);
|
|
22195
|
-
}
|
|
22196
|
-
var createEmotion7 = function createEmotion8(options) {
|
|
22197
|
-
var cache2 = createCache(options);
|
|
22198
|
-
cache2.sheet.speedy = function(value2) {
|
|
22199
|
-
if (this.ctr !== 0) {
|
|
22200
|
-
throw new Error("speedy must be changed before any rules are inserted");
|
|
22201
|
-
}
|
|
22202
|
-
this.isSpeedy = value2;
|
|
22203
|
-
};
|
|
22204
|
-
cache2.compat = true;
|
|
22205
|
-
var css = function css2() {
|
|
22206
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22207
|
-
args[_key] = arguments[_key];
|
|
22208
|
-
}
|
|
22209
|
-
var serialized = serializeStyles(args, cache2.registered, void 0);
|
|
22210
|
-
insertStyles(cache2, serialized, false);
|
|
22211
|
-
return cache2.key + "-" + serialized.name;
|
|
22212
|
-
};
|
|
22213
|
-
var keyframes3 = function keyframes4() {
|
|
22214
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
22215
|
-
args[_key2] = arguments[_key2];
|
|
22216
|
-
}
|
|
22217
|
-
var serialized = serializeStyles(args, cache2.registered);
|
|
22218
|
-
var animation = "animation-" + serialized.name;
|
|
22219
|
-
insertWithoutScoping3(cache2, {
|
|
22220
|
-
name: serialized.name,
|
|
22221
|
-
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
|
|
22222
|
-
});
|
|
22223
|
-
return animation;
|
|
22224
|
-
};
|
|
22225
|
-
var injectGlobal = function injectGlobal2() {
|
|
22226
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
22227
|
-
args[_key3] = arguments[_key3];
|
|
22228
|
-
}
|
|
22229
|
-
var serialized = serializeStyles(args, cache2.registered);
|
|
22230
|
-
insertWithoutScoping3(cache2, serialized);
|
|
22231
|
-
};
|
|
22232
|
-
var cx = function cx2() {
|
|
22233
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
22234
|
-
args[_key4] = arguments[_key4];
|
|
22235
|
-
}
|
|
22236
|
-
return merge6(cache2.registered, css, classnames5(args));
|
|
22237
|
-
};
|
|
22238
|
-
return {
|
|
22239
|
-
css,
|
|
22240
|
-
cx,
|
|
22241
|
-
injectGlobal,
|
|
22242
|
-
keyframes: keyframes3,
|
|
22243
|
-
hydrate: function hydrate(ids) {
|
|
22244
|
-
ids.forEach(function(key) {
|
|
22245
|
-
cache2.inserted[key] = true;
|
|
22246
|
-
});
|
|
22247
|
-
},
|
|
22248
|
-
flush: function flush() {
|
|
22249
|
-
cache2.registered = {};
|
|
22250
|
-
cache2.inserted = {};
|
|
22251
|
-
cache2.sheet.flush();
|
|
22252
|
-
},
|
|
22253
|
-
// $FlowFixMe
|
|
22254
|
-
sheet: cache2.sheet,
|
|
22255
|
-
cache: cache2,
|
|
22256
|
-
getRegisteredStyles: getRegisteredStyles.bind(null, cache2.registered),
|
|
22257
|
-
merge: merge6.bind(null, cache2.registered, css)
|
|
22258
|
-
};
|
|
22259
|
-
};
|
|
22260
|
-
var classnames5 = function classnames6(args) {
|
|
22261
|
-
var cls = "";
|
|
22262
|
-
for (var i2 = 0; i2 < args.length; i2++) {
|
|
22263
|
-
var arg = args[i2];
|
|
22264
|
-
if (arg == null)
|
|
22265
|
-
continue;
|
|
22266
|
-
var toAdd = void 0;
|
|
22267
|
-
switch (typeof arg) {
|
|
22268
|
-
case "boolean":
|
|
22269
|
-
break;
|
|
22270
|
-
case "object": {
|
|
22271
|
-
if (Array.isArray(arg)) {
|
|
22272
|
-
toAdd = classnames6(arg);
|
|
22273
|
-
} else {
|
|
22274
|
-
toAdd = "";
|
|
22275
|
-
for (var k in arg) {
|
|
22276
|
-
if (arg[k] && k) {
|
|
22277
|
-
toAdd && (toAdd += " ");
|
|
22278
|
-
toAdd += k;
|
|
22279
|
-
}
|
|
22280
|
-
}
|
|
22281
|
-
}
|
|
22282
|
-
break;
|
|
22283
|
-
}
|
|
22284
|
-
default: {
|
|
22285
|
-
toAdd = arg;
|
|
22286
|
-
}
|
|
22287
|
-
}
|
|
22288
|
-
if (toAdd) {
|
|
22289
|
-
cls && (cls += " ");
|
|
22290
|
-
cls += toAdd;
|
|
22291
|
-
}
|
|
22292
|
-
}
|
|
22293
|
-
return cls;
|
|
22294
|
-
};
|
|
22295
|
-
|
|
22296
21372
|
// ../../node_modules/@domql/emotion/index.js
|
|
22297
21373
|
var transformEmotionStyle = (emotion4) => {
|
|
22298
21374
|
return (params, element, state) => {
|
|
22299
|
-
const execParams = (0,
|
|
21375
|
+
const execParams = (0, import_utils20.exec)(params, element);
|
|
22300
21376
|
if (params) {
|
|
22301
|
-
if ((0,
|
|
21377
|
+
if ((0, import_utils20.isObjectLike)(element.class))
|
|
22302
21378
|
element.class.elementStyle = execParams;
|
|
22303
21379
|
else
|
|
22304
21380
|
element.class = { elementStyle: execParams };
|
|
@@ -22312,18 +21388,18 @@ var transformEmotionClass = (emotion4) => {
|
|
|
22312
21388
|
return;
|
|
22313
21389
|
const { __ref } = element;
|
|
22314
21390
|
const { __class, __classNames } = __ref;
|
|
22315
|
-
if (!(0,
|
|
21391
|
+
if (!(0, import_utils20.isObjectLike)(params))
|
|
22316
21392
|
return;
|
|
22317
21393
|
for (const key in params) {
|
|
22318
|
-
const prop = (0,
|
|
21394
|
+
const prop = (0, import_utils20.exec)(params[key], element);
|
|
22319
21395
|
if (!prop) {
|
|
22320
21396
|
delete __class[key];
|
|
22321
21397
|
delete __classNames[key];
|
|
22322
21398
|
continue;
|
|
22323
21399
|
}
|
|
22324
|
-
const isEqual = (0,
|
|
21400
|
+
const isEqual = (0, import_utils20.isEqualDeep)(__class[key], prop);
|
|
22325
21401
|
if (!isEqual) {
|
|
22326
|
-
if (!(0,
|
|
21402
|
+
if (!(0, import_utils20.isProduction)() && (0, import_utils20.isObject)(prop))
|
|
22327
21403
|
prop.label = key || element.key;
|
|
22328
21404
|
const CSSed = emotion4.css(prop);
|
|
22329
21405
|
__class[key] = prop;
|
|
@@ -22335,133 +21411,19 @@ var transformEmotionClass = (emotion4) => {
|
|
|
22335
21411
|
};
|
|
22336
21412
|
var transformDOMQLEmotion = (emotion4, options) => {
|
|
22337
21413
|
if (!emotion4)
|
|
22338
|
-
emotion4 =
|
|
21414
|
+
emotion4 = createEmotion(options || { key: "smbls" });
|
|
22339
21415
|
return {
|
|
22340
21416
|
style: transformEmotionStyle(emotion4),
|
|
22341
21417
|
class: transformEmotionClass(emotion4)
|
|
22342
21418
|
};
|
|
22343
21419
|
};
|
|
22344
21420
|
|
|
22345
|
-
// node_modules/@symbo.ls/emotion/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
22346
|
-
function insertWithoutScoping4(cache2, serialized) {
|
|
22347
|
-
if (cache2.inserted[serialized.name] === void 0) {
|
|
22348
|
-
return cache2.insert("", serialized, cache2.sheet, true);
|
|
22349
|
-
}
|
|
22350
|
-
}
|
|
22351
|
-
function merge7(registered, css, className) {
|
|
22352
|
-
var registeredStyles = [];
|
|
22353
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
22354
|
-
if (registeredStyles.length < 2) {
|
|
22355
|
-
return className;
|
|
22356
|
-
}
|
|
22357
|
-
return rawClassName + css(registeredStyles);
|
|
22358
|
-
}
|
|
22359
|
-
var createEmotion9 = function createEmotion10(options) {
|
|
22360
|
-
var cache2 = createCache(options);
|
|
22361
|
-
cache2.sheet.speedy = function(value2) {
|
|
22362
|
-
if (this.ctr !== 0) {
|
|
22363
|
-
throw new Error("speedy must be changed before any rules are inserted");
|
|
22364
|
-
}
|
|
22365
|
-
this.isSpeedy = value2;
|
|
22366
|
-
};
|
|
22367
|
-
cache2.compat = true;
|
|
22368
|
-
var css = function css2() {
|
|
22369
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22370
|
-
args[_key] = arguments[_key];
|
|
22371
|
-
}
|
|
22372
|
-
var serialized = serializeStyles(args, cache2.registered, void 0);
|
|
22373
|
-
insertStyles(cache2, serialized, false);
|
|
22374
|
-
return cache2.key + "-" + serialized.name;
|
|
22375
|
-
};
|
|
22376
|
-
var keyframes3 = function keyframes4() {
|
|
22377
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
22378
|
-
args[_key2] = arguments[_key2];
|
|
22379
|
-
}
|
|
22380
|
-
var serialized = serializeStyles(args, cache2.registered);
|
|
22381
|
-
var animation = "animation-" + serialized.name;
|
|
22382
|
-
insertWithoutScoping4(cache2, {
|
|
22383
|
-
name: serialized.name,
|
|
22384
|
-
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
|
|
22385
|
-
});
|
|
22386
|
-
return animation;
|
|
22387
|
-
};
|
|
22388
|
-
var injectGlobal = function injectGlobal2() {
|
|
22389
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
22390
|
-
args[_key3] = arguments[_key3];
|
|
22391
|
-
}
|
|
22392
|
-
var serialized = serializeStyles(args, cache2.registered);
|
|
22393
|
-
insertWithoutScoping4(cache2, serialized);
|
|
22394
|
-
};
|
|
22395
|
-
var cx = function cx2() {
|
|
22396
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
22397
|
-
args[_key4] = arguments[_key4];
|
|
22398
|
-
}
|
|
22399
|
-
return merge7(cache2.registered, css, classnames7(args));
|
|
22400
|
-
};
|
|
22401
|
-
return {
|
|
22402
|
-
css,
|
|
22403
|
-
cx,
|
|
22404
|
-
injectGlobal,
|
|
22405
|
-
keyframes: keyframes3,
|
|
22406
|
-
hydrate: function hydrate(ids) {
|
|
22407
|
-
ids.forEach(function(key) {
|
|
22408
|
-
cache2.inserted[key] = true;
|
|
22409
|
-
});
|
|
22410
|
-
},
|
|
22411
|
-
flush: function flush() {
|
|
22412
|
-
cache2.registered = {};
|
|
22413
|
-
cache2.inserted = {};
|
|
22414
|
-
cache2.sheet.flush();
|
|
22415
|
-
},
|
|
22416
|
-
// $FlowFixMe
|
|
22417
|
-
sheet: cache2.sheet,
|
|
22418
|
-
cache: cache2,
|
|
22419
|
-
getRegisteredStyles: getRegisteredStyles.bind(null, cache2.registered),
|
|
22420
|
-
merge: merge7.bind(null, cache2.registered, css)
|
|
22421
|
-
};
|
|
22422
|
-
};
|
|
22423
|
-
var classnames7 = function classnames8(args) {
|
|
22424
|
-
var cls = "";
|
|
22425
|
-
for (var i2 = 0; i2 < args.length; i2++) {
|
|
22426
|
-
var arg = args[i2];
|
|
22427
|
-
if (arg == null)
|
|
22428
|
-
continue;
|
|
22429
|
-
var toAdd = void 0;
|
|
22430
|
-
switch (typeof arg) {
|
|
22431
|
-
case "boolean":
|
|
22432
|
-
break;
|
|
22433
|
-
case "object": {
|
|
22434
|
-
if (Array.isArray(arg)) {
|
|
22435
|
-
toAdd = classnames8(arg);
|
|
22436
|
-
} else {
|
|
22437
|
-
toAdd = "";
|
|
22438
|
-
for (var k in arg) {
|
|
22439
|
-
if (arg[k] && k) {
|
|
22440
|
-
toAdd && (toAdd += " ");
|
|
22441
|
-
toAdd += k;
|
|
22442
|
-
}
|
|
22443
|
-
}
|
|
22444
|
-
}
|
|
22445
|
-
break;
|
|
22446
|
-
}
|
|
22447
|
-
default: {
|
|
22448
|
-
toAdd = arg;
|
|
22449
|
-
}
|
|
22450
|
-
}
|
|
22451
|
-
if (toAdd) {
|
|
22452
|
-
cls && (cls += " ");
|
|
22453
|
-
cls += toAdd;
|
|
22454
|
-
}
|
|
22455
|
-
}
|
|
22456
|
-
return cls;
|
|
22457
|
-
};
|
|
22458
|
-
|
|
22459
21421
|
// node_modules/@symbo.ls/emotion/index.js
|
|
22460
|
-
var
|
|
21422
|
+
var createEmotion5 = (key = "smbls", container) => {
|
|
22461
21423
|
const cleanKey = key.replaceAll(/\./g, "-");
|
|
22462
|
-
return
|
|
21424
|
+
return createEmotion({ key: cleanKey, container });
|
|
22463
21425
|
};
|
|
22464
|
-
var emotion3 =
|
|
21426
|
+
var emotion3 = createEmotion5();
|
|
22465
21427
|
|
|
22466
21428
|
// src/options.js
|
|
22467
21429
|
var options_default = {
|
|
@@ -22508,13 +21470,13 @@ var initEmotion = (key, options = options_default) => {
|
|
|
22508
21470
|
};
|
|
22509
21471
|
|
|
22510
21472
|
// ../socket-ui/byld-socket.js
|
|
22511
|
-
var
|
|
21473
|
+
var import_utils22 = __toESM(require_cjs19());
|
|
22512
21474
|
var import_router3 = __toESM(require_cjs22());
|
|
22513
21475
|
var import_scratch23 = __toESM(require_cjs20());
|
|
22514
21476
|
|
|
22515
21477
|
// ../socket/client.js
|
|
22516
21478
|
var utils = __toESM(require_cjs19(), 1);
|
|
22517
|
-
var globals = __toESM(
|
|
21479
|
+
var globals = __toESM(require_cjs23(), 1);
|
|
22518
21480
|
|
|
22519
21481
|
// ../../node_modules/engine.io-parser/build/esm/commons.js
|
|
22520
21482
|
var PACKET_TYPES = /* @__PURE__ */ Object.create(null);
|
|
@@ -25906,7 +24868,7 @@ var send = (event = "change", changes, options) => {
|
|
|
25906
24868
|
};
|
|
25907
24869
|
|
|
25908
24870
|
// ../socket-ui/devFocus.js
|
|
25909
|
-
var
|
|
24871
|
+
var import_utils21 = __toESM(require_cjs19());
|
|
25910
24872
|
var DevFocus = {
|
|
25911
24873
|
props: {
|
|
25912
24874
|
".preventSelect": {
|
|
@@ -25960,7 +24922,7 @@ var DevFocus = {
|
|
|
25960
24922
|
on: {
|
|
25961
24923
|
init: ({ context }) => {
|
|
25962
24924
|
const { components } = context;
|
|
25963
|
-
if ((0,
|
|
24925
|
+
if ((0, import_utils21.isObject)(components)) {
|
|
25964
24926
|
const { Content, ...rest } = components;
|
|
25965
24927
|
for (const key in rest) {
|
|
25966
24928
|
if (domql_exports[key])
|
|
@@ -26073,7 +25035,7 @@ var COLOR = {
|
|
|
26073
25035
|
ANIMATION
|
|
26074
25036
|
});
|
|
26075
25037
|
var connectedToSymbols = (clientsCount, element, state) => {
|
|
26076
|
-
if ((0,
|
|
25038
|
+
if ((0, import_utils22.isNumber)(clientsCount) && clientsCount > 1) {
|
|
26077
25039
|
if (!state.connected) {
|
|
26078
25040
|
state.notifications.connected = {
|
|
26079
25041
|
title: "Connected",
|
|
@@ -26181,13 +25143,13 @@ var Sync = {
|
|
|
26181
25143
|
};
|
|
26182
25144
|
|
|
26183
25145
|
// src/syncExtend.js
|
|
26184
|
-
var
|
|
25146
|
+
var import_utils23 = __toESM(require_cjs19(), 1);
|
|
26185
25147
|
var applySyncDebug = (extend, options) => {
|
|
26186
25148
|
const { editor } = options;
|
|
26187
25149
|
if (!editor)
|
|
26188
25150
|
return extend;
|
|
26189
|
-
const inspect = (0,
|
|
26190
|
-
const liveSync = (0,
|
|
25151
|
+
const inspect = (0, import_utils23.isUndefined)(editor.inspect) ? (0, import_utils23.isDevelopment)() : editor.inspect;
|
|
25152
|
+
const liveSync = (0, import_utils23.isUndefined)(editor.liveSync) ? (0, import_utils23.isDevelopment)() : editor.liveSync;
|
|
26191
25153
|
if (inspect)
|
|
26192
25154
|
extend.push(DevFocus);
|
|
26193
25155
|
if (liveSync)
|
|
@@ -26198,7 +25160,7 @@ var applyInspectListener = (root, options) => {
|
|
|
26198
25160
|
const { editor } = options;
|
|
26199
25161
|
if (!editor)
|
|
26200
25162
|
return;
|
|
26201
|
-
const inspect = (0,
|
|
25163
|
+
const inspect = (0, import_utils23.isUndefined)(editor.inspect) ? (0, import_utils23.isDevelopment)() : editor.inspect;
|
|
26202
25164
|
if (inspect)
|
|
26203
25165
|
inspectOnKey(root);
|
|
26204
25166
|
};
|
|
@@ -26206,16 +25168,18 @@ var applyInspectListener = (root, options) => {
|
|
|
26206
25168
|
// src/index.js
|
|
26207
25169
|
var SYMBOLS_KEY = process.env.SYMBOLS_KEY;
|
|
26208
25170
|
var mergeWithLocalFile2 = (options, optionsExternalFile) => {
|
|
26209
|
-
const rcfile = (0,
|
|
26210
|
-
return (0,
|
|
25171
|
+
const rcfile = (0, import_utils24.isObject)(optionsExternalFile) ? optionsExternalFile : dynamic_default || {};
|
|
25172
|
+
return (0, import_utils24.deepMerge)(options, rcfile);
|
|
26211
25173
|
};
|
|
26212
25174
|
var create = async (App, options = options_default, optionsExternalFile) => {
|
|
26213
|
-
const appIsKey = (0,
|
|
25175
|
+
const appIsKey = (0, import_utils24.isString)(App);
|
|
26214
25176
|
options = mergeWithLocalFile2(options, optionsExternalFile);
|
|
26215
25177
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
26216
25178
|
if (appIsKey)
|
|
26217
25179
|
App = {};
|
|
26218
25180
|
await fetchSync(key, options);
|
|
25181
|
+
if (typeof document === "undefined")
|
|
25182
|
+
document = {};
|
|
26219
25183
|
const doc = options.parent || options.document || document;
|
|
26220
25184
|
const [scratchSystem2, emotion4, registry] = initEmotion(key, options);
|
|
26221
25185
|
const state = options.state || {};
|
|
@@ -26260,12 +25224,20 @@ var create = async (App, options = options_default, optionsExternalFile) => {
|
|
|
26260
25224
|
return domqlApp;
|
|
26261
25225
|
};
|
|
26262
25226
|
var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
26263
|
-
const appIsKey = (0,
|
|
25227
|
+
const appIsKey = (0, import_utils24.isString)(App);
|
|
26264
25228
|
options = mergeWithLocalFile2(options, optionsExternalFile);
|
|
26265
25229
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
26266
25230
|
if (appIsKey)
|
|
26267
25231
|
App = {};
|
|
26268
|
-
|
|
25232
|
+
if (typeof document === "undefined")
|
|
25233
|
+
document = { body: {} };
|
|
25234
|
+
let parent;
|
|
25235
|
+
if (options.parent)
|
|
25236
|
+
parent = options.parent;
|
|
25237
|
+
else if (options.document)
|
|
25238
|
+
parent = options.document;
|
|
25239
|
+
else
|
|
25240
|
+
parent = document.body;
|
|
26269
25241
|
const [scratchSystem2, emotion4, registry] = initEmotion(key, options);
|
|
26270
25242
|
const state = options.state || {};
|
|
26271
25243
|
const pages = options.pages || {};
|
|
@@ -26290,9 +25262,9 @@ var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
|
26290
25262
|
registry,
|
|
26291
25263
|
emotion: emotion4,
|
|
26292
25264
|
//routerOptions,
|
|
26293
|
-
document
|
|
25265
|
+
document
|
|
26294
25266
|
}
|
|
26295
|
-
},
|
|
25267
|
+
}, parent, key, {
|
|
26296
25268
|
//extend: [uikit.Box],
|
|
26297
25269
|
verbose: options.verbose,
|
|
26298
25270
|
...options.domqlOptions
|