@arabold/docs-mcp-server 2.2.1 → 2.3.0
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/README.md +15 -0
- package/dist/assets/main.css +1 -1
- package/dist/assets/main.js +708 -705
- package/dist/assets/main.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{main-C6In2ps7.js → main-CCLTqj8g.js} +1529 -446
- package/dist/main-CCLTqj8g.js.map +1 -0
- package/dist/{utils-ntayxPjd.js → utils-CUTutkx-.js} +12 -12
- package/dist/{utils-ntayxPjd.js.map → utils-CUTutkx-.js.map} +1 -1
- package/package.json +17 -17
- package/public/assets/main.css +1 -1
- package/public/assets/main.js +708 -705
- package/public/assets/main.js.map +1 -1
- package/dist/main-C6In2ps7.js.map +0 -1
package/public/assets/main.js
CHANGED
|
@@ -23,13 +23,13 @@ function src_default$1(e) {
|
|
|
23
23
|
s && (n.hidden = !1), s && (n.style.display = null);
|
|
24
24
|
let d = n.getBoundingClientRect().height;
|
|
25
25
|
n.style.height = "auto";
|
|
26
|
-
let
|
|
27
|
-
d ===
|
|
26
|
+
let h = n.getBoundingClientRect().height;
|
|
27
|
+
d === h && (d = a), e.transition(n, e.setStyles, {
|
|
28
28
|
during: l,
|
|
29
29
|
start: { height: d + "px" },
|
|
30
|
-
end: { height:
|
|
30
|
+
end: { height: h + "px" }
|
|
31
31
|
}, () => n._x_isShown = !0, () => {
|
|
32
|
-
Math.abs(n.getBoundingClientRect().height -
|
|
32
|
+
Math.abs(n.getBoundingClientRect().height - h) < 1 && (n.style.overflow = null);
|
|
33
33
|
});
|
|
34
34
|
},
|
|
35
35
|
out(c = () => {
|
|
@@ -122,17 +122,17 @@ function elementBoundEffect(e) {
|
|
|
122
122
|
}];
|
|
123
123
|
}
|
|
124
124
|
function watch(e, t) {
|
|
125
|
-
let n = !0, i, r = effect$3(() => {
|
|
126
|
-
let
|
|
127
|
-
if (
|
|
128
|
-
let
|
|
125
|
+
let n = !0, i, r, a = effect$3(() => {
|
|
126
|
+
let s = e(), o = JSON.stringify(s);
|
|
127
|
+
if (!n && (typeof s == "object" || s !== i)) {
|
|
128
|
+
let l = typeof i == "object" ? JSON.parse(r) : i;
|
|
129
129
|
queueMicrotask(() => {
|
|
130
|
-
t(
|
|
130
|
+
t(s, l);
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
i =
|
|
133
|
+
i = s, r = o, n = !1;
|
|
134
134
|
});
|
|
135
|
-
return () => release(
|
|
135
|
+
return () => release(a);
|
|
136
136
|
}
|
|
137
137
|
async function transaction(e) {
|
|
138
138
|
startTransaction();
|
|
@@ -246,6 +246,9 @@ function closestDataStack(e) {
|
|
|
246
246
|
function mergeProxies(e) {
|
|
247
247
|
return new Proxy({ objects: e }, mergeProxyTrap);
|
|
248
248
|
}
|
|
249
|
+
function keyInPrototypeChain(e, t) {
|
|
250
|
+
return e === null || e === Object.prototype ? null : Object.prototype.hasOwnProperty.call(e, t) ? e : keyInPrototypeChain(Object.getPrototypeOf(e), t);
|
|
251
|
+
}
|
|
249
252
|
var mergeProxyTrap = {
|
|
250
253
|
ownKeys({ objects: e }) {
|
|
251
254
|
return Array.from(
|
|
@@ -267,9 +270,12 @@ var mergeProxyTrap = {
|
|
|
267
270
|
);
|
|
268
271
|
},
|
|
269
272
|
set({ objects: e }, t, n, i) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
+
let r;
|
|
274
|
+
for (const s of e)
|
|
275
|
+
if (r = keyInPrototypeChain(s, t), r)
|
|
276
|
+
break;
|
|
277
|
+
r || (r = e[e.length - 1]);
|
|
278
|
+
const a = Object.getOwnPropertyDescriptor(r, t);
|
|
273
279
|
return a?.set && a?.get ? a.set.call(i, n) || !0 : Reflect.set(r, t, n);
|
|
274
280
|
}
|
|
275
281
|
};
|
|
@@ -379,7 +385,8 @@ function evaluate(e, t, n = {}) {
|
|
|
379
385
|
function evaluateLater(...e) {
|
|
380
386
|
return theEvaluatorFunction(...e);
|
|
381
387
|
}
|
|
382
|
-
var theEvaluatorFunction =
|
|
388
|
+
var theEvaluatorFunction = () => {
|
|
389
|
+
};
|
|
383
390
|
function setEvaluator(e) {
|
|
384
391
|
theEvaluatorFunction = e;
|
|
385
392
|
}
|
|
@@ -568,8 +575,8 @@ function toParsedDirectives(e, t) {
|
|
|
568
575
|
var DEFAULT = "DEFAULT", directiveOrder = [
|
|
569
576
|
"ignore",
|
|
570
577
|
"ref",
|
|
571
|
-
"data",
|
|
572
578
|
"id",
|
|
579
|
+
"data",
|
|
573
580
|
"anchor",
|
|
574
581
|
"bind",
|
|
575
582
|
"init",
|
|
@@ -586,14 +593,16 @@ function byPriority(e, t) {
|
|
|
586
593
|
let n = directiveOrder.indexOf(e.type) === -1 ? DEFAULT : e.type, i = directiveOrder.indexOf(t.type) === -1 ? DEFAULT : t.type;
|
|
587
594
|
return directiveOrder.indexOf(n) - directiveOrder.indexOf(i);
|
|
588
595
|
}
|
|
589
|
-
function dispatch(e, t, n = {}) {
|
|
590
|
-
e.dispatchEvent(
|
|
596
|
+
function dispatch(e, t, n = {}, i = {}) {
|
|
597
|
+
return e.dispatchEvent(
|
|
591
598
|
new CustomEvent(t, {
|
|
592
599
|
detail: n,
|
|
593
600
|
bubbles: !0,
|
|
594
601
|
// Allows events to pass the shadow DOM barrier.
|
|
595
602
|
composed: !0,
|
|
596
|
-
cancelable: !0
|
|
603
|
+
cancelable: !0,
|
|
604
|
+
// Allows overriding the default event options.
|
|
605
|
+
...i
|
|
597
606
|
})
|
|
598
607
|
);
|
|
599
608
|
}
|
|
@@ -647,7 +656,9 @@ function findClosest(e, t) {
|
|
|
647
656
|
if (e) {
|
|
648
657
|
if (t(e))
|
|
649
658
|
return e;
|
|
650
|
-
if (e._x_teleportBack
|
|
659
|
+
if (e._x_teleportBack)
|
|
660
|
+
return findClosest(e._x_teleportBack, t);
|
|
661
|
+
if (e.parentNode instanceof ShadowRoot)
|
|
651
662
|
return findClosest(e.parentNode.host, t);
|
|
652
663
|
if (e.parentElement)
|
|
653
664
|
return findClosest(e.parentElement, t);
|
|
@@ -709,20 +720,23 @@ function holdNextTicks() {
|
|
|
709
720
|
function setClasses(e, t) {
|
|
710
721
|
return Array.isArray(t) ? setClassesFromString(e, t.join(" ")) : typeof t == "object" && t !== null ? setClassesFromObject(e, t) : typeof t == "function" ? setClasses(e, t()) : setClassesFromString(e, t);
|
|
711
722
|
}
|
|
723
|
+
function splitClasses(e) {
|
|
724
|
+
return e.split(/\s/).filter(Boolean);
|
|
725
|
+
}
|
|
712
726
|
function setClassesFromString(e, t) {
|
|
713
|
-
let n = (r) => r
|
|
727
|
+
let n = (r) => splitClasses(r).filter((a) => !e.classList.contains(a)).filter(Boolean), i = (r) => (e.classList.add(...r), () => {
|
|
714
728
|
e.classList.remove(...r);
|
|
715
729
|
});
|
|
716
730
|
return t = t === !0 ? t = "" : t || "", i(n(t));
|
|
717
731
|
}
|
|
718
732
|
function setClassesFromObject(e, t) {
|
|
719
|
-
let n =
|
|
720
|
-
return
|
|
721
|
-
e.classList.contains(
|
|
722
|
-
}),
|
|
723
|
-
e.classList.contains(
|
|
733
|
+
let n = Object.entries(t).flatMap(([s, o]) => o ? splitClasses(s) : !1).filter(Boolean), i = Object.entries(t).flatMap(([s, o]) => o ? !1 : splitClasses(s)).filter(Boolean), r = [], a = [];
|
|
734
|
+
return i.forEach((s) => {
|
|
735
|
+
e.classList.contains(s) && (e.classList.remove(s), a.push(s));
|
|
736
|
+
}), n.forEach((s) => {
|
|
737
|
+
e.classList.contains(s) || (e.classList.add(s), r.push(s));
|
|
724
738
|
}), () => {
|
|
725
|
-
|
|
739
|
+
a.forEach((s) => e.classList.add(s)), r.forEach((s) => e.classList.remove(s));
|
|
726
740
|
};
|
|
727
741
|
}
|
|
728
742
|
function setStyles(e, t) {
|
|
@@ -782,14 +796,14 @@ function registerTransitionsFromClassString(e, t, n) {
|
|
|
782
796
|
function registerTransitionsFromHelper(e, t, n) {
|
|
783
797
|
registerTransitionObject(e, setStyles);
|
|
784
798
|
let i = !t.includes("in") && !t.includes("out") && !n, r = i || t.includes("in") || ["enter"].includes(n), a = i || t.includes("out") || ["leave"].includes(n);
|
|
785
|
-
t.includes("in") && !i && (t = t.filter((
|
|
786
|
-
let s = !t.includes("opacity") && !t.includes("scale"), o = s || t.includes("opacity"), l = s || t.includes("scale"), c = o ? 0 : 1, u = l ? modifierValue(t, "scale", 95) / 100 : 1, d = modifierValue(t, "delay", 0) / 1e3,
|
|
799
|
+
t.includes("in") && !i && (t = t.filter((x, m) => m < t.indexOf("out"))), t.includes("out") && !i && (t = t.filter((x, m) => m > t.indexOf("out")));
|
|
800
|
+
let s = !t.includes("opacity") && !t.includes("scale"), o = s || t.includes("opacity"), l = s || t.includes("scale"), c = o ? 0 : 1, u = l ? modifierValue(t, "scale", 95) / 100 : 1, d = modifierValue(t, "delay", 0) / 1e3, h = modifierValue(t, "origin", "center"), y = "opacity, transform", v = modifierValue(t, "duration", 150) / 1e3, g = modifierValue(t, "duration", 75) / 1e3, b = "cubic-bezier(0.4, 0.0, 0.2, 1)";
|
|
787
801
|
r && (e._x_transition.enter.during = {
|
|
788
|
-
transformOrigin:
|
|
802
|
+
transformOrigin: h,
|
|
789
803
|
transitionDelay: `${d}s`,
|
|
790
|
-
transitionProperty:
|
|
804
|
+
transitionProperty: y,
|
|
791
805
|
transitionDuration: `${v}s`,
|
|
792
|
-
transitionTimingFunction:
|
|
806
|
+
transitionTimingFunction: b
|
|
793
807
|
}, e._x_transition.enter.start = {
|
|
794
808
|
opacity: c,
|
|
795
809
|
transform: `scale(${u})`
|
|
@@ -797,11 +811,11 @@ function registerTransitionsFromHelper(e, t, n) {
|
|
|
797
811
|
opacity: 1,
|
|
798
812
|
transform: "scale(1)"
|
|
799
813
|
}), a && (e._x_transition.leave.during = {
|
|
800
|
-
transformOrigin:
|
|
814
|
+
transformOrigin: h,
|
|
801
815
|
transitionDelay: `${d}s`,
|
|
802
|
-
transitionProperty:
|
|
803
|
-
transitionDuration: `${
|
|
804
|
-
transitionTimingFunction:
|
|
816
|
+
transitionProperty: y,
|
|
817
|
+
transitionDuration: `${g}s`,
|
|
818
|
+
transitionTimingFunction: b
|
|
805
819
|
}, e._x_transition.leave.start = {
|
|
806
820
|
opacity: 1,
|
|
807
821
|
transform: "scale(1)"
|
|
@@ -1002,7 +1016,7 @@ function bind(e, t, n, i = []) {
|
|
|
1002
1016
|
}
|
|
1003
1017
|
function bindInputValue(e, t) {
|
|
1004
1018
|
if (isRadio(e))
|
|
1005
|
-
e.attributes.value === void 0 && (e.value = t)
|
|
1019
|
+
e.attributes.value === void 0 && (e.value = t);
|
|
1006
1020
|
else if (isCheckbox(e))
|
|
1007
1021
|
Number.isInteger(t) ? e.value = t : !Array.isArray(t) && typeof t != "boolean" && ![null, void 0].includes(t) ? e.value = String(t) : Array.isArray(t) ? e.checked = t.some((n) => checkedAttrLooseCompare(n, e.value)) : e.checked = !!t;
|
|
1008
1022
|
else if (e.tagName === "SELECT")
|
|
@@ -1209,7 +1223,7 @@ var Alpine = {
|
|
|
1209
1223
|
get transaction() {
|
|
1210
1224
|
return transaction;
|
|
1211
1225
|
},
|
|
1212
|
-
version: "3.15.
|
|
1226
|
+
version: "3.15.12",
|
|
1213
1227
|
flushAndStopDeferringMutations,
|
|
1214
1228
|
dontAutoEvaluateFunctions,
|
|
1215
1229
|
disableEffectScheduling,
|
|
@@ -1505,10 +1519,10 @@ function createIterableMethod(e, t, n) {
|
|
|
1505
1519
|
return !t && track(a, "iterate", l ? MAP_KEY_ITERATE_KEY : ITERATE_KEY), {
|
|
1506
1520
|
// iterator protocol
|
|
1507
1521
|
next() {
|
|
1508
|
-
const { value: d, done:
|
|
1509
|
-
return
|
|
1522
|
+
const { value: d, done: h } = c.next();
|
|
1523
|
+
return h ? { value: d, done: h } : {
|
|
1510
1524
|
value: o ? [u(d[0]), u(d[1])] : u(d),
|
|
1511
|
-
done:
|
|
1525
|
+
done: h
|
|
1512
1526
|
};
|
|
1513
1527
|
},
|
|
1514
1528
|
// iterable protocol
|
|
@@ -1745,25 +1759,25 @@ directive("modelable", (e, { expression: t }, { effect: n, evaluateLater: i, cle
|
|
|
1745
1759
|
if (!e._x_model)
|
|
1746
1760
|
return;
|
|
1747
1761
|
e._x_removeModelListeners.default();
|
|
1748
|
-
let u = e._x_model.get, d = e._x_model.
|
|
1762
|
+
let u = e._x_model.get, d = e._x_model.setWithModifiers, h = entangle(
|
|
1749
1763
|
{
|
|
1750
1764
|
get() {
|
|
1751
1765
|
return u();
|
|
1752
1766
|
},
|
|
1753
|
-
set(
|
|
1754
|
-
d(
|
|
1767
|
+
set(y) {
|
|
1768
|
+
d(y);
|
|
1755
1769
|
}
|
|
1756
1770
|
},
|
|
1757
1771
|
{
|
|
1758
1772
|
get() {
|
|
1759
1773
|
return s();
|
|
1760
1774
|
},
|
|
1761
|
-
set(
|
|
1762
|
-
l(
|
|
1775
|
+
set(y) {
|
|
1776
|
+
l(y);
|
|
1763
1777
|
}
|
|
1764
1778
|
}
|
|
1765
1779
|
);
|
|
1766
|
-
r(
|
|
1780
|
+
r(h);
|
|
1767
1781
|
});
|
|
1768
1782
|
});
|
|
1769
1783
|
directive("teleport", (e, { modifiers: t, expression: n }, { cleanup: i }) => {
|
|
@@ -1778,8 +1792,8 @@ directive("teleport", (e, { modifiers: t, expression: n }, { cleanup: i }) => {
|
|
|
1778
1792
|
c.includes("prepend") ? l.parentNode.insertBefore(o, l) : c.includes("append") ? l.parentNode.insertBefore(o, l.nextSibling) : l.appendChild(o);
|
|
1779
1793
|
};
|
|
1780
1794
|
mutateDom(() => {
|
|
1781
|
-
|
|
1782
|
-
initTree(a);
|
|
1795
|
+
skipDuringClone(() => {
|
|
1796
|
+
s(a, r, t), initTree(a);
|
|
1783
1797
|
})();
|
|
1784
1798
|
}), e._x_teleportPutBack = () => {
|
|
1785
1799
|
let o = getTarget(n);
|
|
@@ -1810,15 +1824,7 @@ directive("effect", skipDuringClone((e, { expression: t }, { effect: n }) => {
|
|
|
1810
1824
|
}));
|
|
1811
1825
|
function on(e, t, n, i) {
|
|
1812
1826
|
let r = e, a = (l) => i(l), s = {}, o = (l, c) => (u) => c(l, u);
|
|
1813
|
-
|
|
1814
|
-
let l = n[n.indexOf("debounce") + 1] || "invalid-wait", c = isNumeric(l.split("ms")[0]) ? Number(l.split("ms")[0]) : 250;
|
|
1815
|
-
a = debounce$1(a, c);
|
|
1816
|
-
}
|
|
1817
|
-
if (n.includes("throttle")) {
|
|
1818
|
-
let l = n[n.indexOf("throttle") + 1] || "invalid-wait", c = isNumeric(l.split("ms")[0]) ? Number(l.split("ms")[0]) : 250;
|
|
1819
|
-
a = throttle(a, c);
|
|
1820
|
-
}
|
|
1821
|
-
return n.includes("prevent") && (a = o(a, (l, c) => {
|
|
1827
|
+
return n.includes("dot") && (t = dotSyntax(t)), n.includes("camel") && (t = camelCase2(t)), n.includes("capture") && (s.capture = !0), n.includes("window") && (r = window), n.includes("document") && (r = document), n.includes("passive") && (s.passive = n[n.indexOf("passive") + 1] !== "false"), a = addDebounceOrThrottle(n, a), n.includes("prevent") && (a = o(a, (l, c) => {
|
|
1822
1828
|
c.preventDefault(), l(c);
|
|
1823
1829
|
})), n.includes("stop") && (a = o(a, (l, c) => {
|
|
1824
1830
|
c.stopPropagation(), l(c);
|
|
@@ -1836,6 +1842,17 @@ function on(e, t, n, i) {
|
|
|
1836
1842
|
r.removeEventListener(t, a, s);
|
|
1837
1843
|
};
|
|
1838
1844
|
}
|
|
1845
|
+
function addDebounceOrThrottle(e, t) {
|
|
1846
|
+
if (e.includes("debounce")) {
|
|
1847
|
+
let n = e[e.indexOf("debounce") + 1] || "invalid-wait", i = isNumeric(n.split("ms")[0]) ? Number(n.split("ms")[0]) : 250;
|
|
1848
|
+
t = debounce$1(t, i);
|
|
1849
|
+
}
|
|
1850
|
+
if (e.includes("throttle")) {
|
|
1851
|
+
let n = e[e.indexOf("throttle") + 1] || "invalid-wait", i = isNumeric(n.split("ms")[0]) ? Number(n.split("ms")[0]) : 250;
|
|
1852
|
+
t = throttle(t, i);
|
|
1853
|
+
}
|
|
1854
|
+
return t;
|
|
1855
|
+
}
|
|
1839
1856
|
function dotSyntax(e) {
|
|
1840
1857
|
return e.replace(/-/g, ".");
|
|
1841
1858
|
}
|
|
@@ -1899,62 +1916,67 @@ function keyToModifiers(e) {
|
|
|
1899
1916
|
}
|
|
1900
1917
|
directive("model", (e, { modifiers: t, expression: n }, { effect: i, cleanup: r }) => {
|
|
1901
1918
|
let a = e;
|
|
1902
|
-
t.includes("parent") && (a = e
|
|
1919
|
+
t.includes("parent") && (a = findClosest(e, (g) => g !== e));
|
|
1903
1920
|
let s = evaluateLater(a, n), o;
|
|
1904
1921
|
typeof n == "string" ? o = evaluateLater(a, `${n} = __placeholder`) : typeof n == "function" && typeof n() == "string" ? o = evaluateLater(a, `${n()} = __placeholder`) : o = () => {
|
|
1905
1922
|
};
|
|
1906
1923
|
let l = () => {
|
|
1907
|
-
let
|
|
1908
|
-
return s((
|
|
1909
|
-
}, c = (
|
|
1910
|
-
let
|
|
1911
|
-
s((
|
|
1924
|
+
let g;
|
|
1925
|
+
return s((b) => g = b), isGetterSetter(g) ? g.get() : g;
|
|
1926
|
+
}, c = (g) => {
|
|
1927
|
+
let b;
|
|
1928
|
+
s((x) => b = x), isGetterSetter(b) ? b.set(g) : o(() => {
|
|
1912
1929
|
}, {
|
|
1913
|
-
scope: { __placeholder:
|
|
1930
|
+
scope: { __placeholder: g }
|
|
1914
1931
|
});
|
|
1915
1932
|
};
|
|
1916
1933
|
typeof n == "string" && e.type === "radio" && mutateDom(() => {
|
|
1917
1934
|
e.hasAttribute("name") || e.setAttribute("name", n);
|
|
1918
1935
|
});
|
|
1919
|
-
let u = t.includes("change") || t.includes("lazy"), d = t.includes("blur"),
|
|
1936
|
+
let u = t.includes("change") || t.includes("lazy"), d = t.includes("blur"), h = t.includes("enter"), y = u || d || h, v;
|
|
1920
1937
|
if (isCloning)
|
|
1921
1938
|
v = () => {
|
|
1922
1939
|
};
|
|
1923
|
-
else if (
|
|
1924
|
-
let
|
|
1925
|
-
if (u &&
|
|
1926
|
-
let
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1940
|
+
else if (y) {
|
|
1941
|
+
let g = [], b = (x) => c(getInputValue(e, t, x, l()));
|
|
1942
|
+
if (u && g.push(on(e, "change", t, b)), d && (g.push(on(e, "blur", t, b)), e.form)) {
|
|
1943
|
+
let x = e.form, m = () => b({ target: e });
|
|
1944
|
+
x._x_pendingModelUpdates || (x._x_pendingModelUpdates = []), x._x_pendingModelUpdates.push(m), r(() => {
|
|
1945
|
+
x._x_pendingModelUpdates && x._x_pendingModelUpdates.splice(x._x_pendingModelUpdates.indexOf(m), 1);
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
h && g.push(on(e, "keydown", t, (x) => {
|
|
1949
|
+
x.key === "Enter" && b(x);
|
|
1950
|
+
})), v = () => g.forEach((x) => x());
|
|
1932
1951
|
} else {
|
|
1933
|
-
let
|
|
1934
|
-
v = on(e,
|
|
1935
|
-
c(getInputValue(e, t,
|
|
1952
|
+
let g = e.tagName.toLowerCase() === "select" || ["checkbox", "radio"].includes(e.type) ? "change" : "input";
|
|
1953
|
+
v = on(e, g, t, (b) => {
|
|
1954
|
+
c(getInputValue(e, t, b, l()));
|
|
1936
1955
|
});
|
|
1937
1956
|
}
|
|
1938
1957
|
if (t.includes("fill") && ([void 0, null, ""].includes(l()) || isCheckbox(e) && Array.isArray(l()) || e.tagName.toLowerCase() === "select" && e.multiple) && c(
|
|
1939
1958
|
getInputValue(e, t, { target: e }, l())
|
|
1940
1959
|
), e._x_removeModelListeners || (e._x_removeModelListeners = {}), e._x_removeModelListeners.default = v, r(() => e._x_removeModelListeners.default()), e.form) {
|
|
1941
|
-
let
|
|
1960
|
+
let g = on(e.form, "reset", [], (b) => {
|
|
1942
1961
|
nextTick(() => e._x_model && e._x_model.set(getInputValue(e, t, { target: e }, l())));
|
|
1943
1962
|
});
|
|
1944
|
-
r(() =>
|
|
1963
|
+
r(() => g());
|
|
1945
1964
|
}
|
|
1946
1965
|
e._x_model = {
|
|
1947
1966
|
get() {
|
|
1948
1967
|
return l();
|
|
1949
1968
|
},
|
|
1950
|
-
set(
|
|
1951
|
-
c(
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
|
|
1969
|
+
set(g) {
|
|
1970
|
+
c(g);
|
|
1971
|
+
},
|
|
1972
|
+
setWithModifiers: addDebounceOrThrottle(t, c)
|
|
1973
|
+
}, e._x_forceModelUpdate = (g) => {
|
|
1974
|
+
g === void 0 && typeof n == "string" && n.match(/\./) && (g = ""), mutateDom(() => {
|
|
1975
|
+
isCheckbox(e) ? Array.isArray(g) ? e.checked = g.some((b) => b == e.value) : e.checked = !!g : isRadio(e) ? typeof g == "boolean" ? e.checked = safeParseBoolean(e.value) === g : e.checked = e.value == g : bind(e, "value", g);
|
|
1976
|
+
});
|
|
1955
1977
|
}, i(() => {
|
|
1956
|
-
let
|
|
1957
|
-
t.includes("unintrusive") && document.activeElement.isSameNode(e) || e._x_forceModelUpdate(
|
|
1978
|
+
let g = l();
|
|
1979
|
+
t.includes("unintrusive") && document.activeElement.isSameNode(e) || e._x_forceModelUpdate(g);
|
|
1958
1980
|
});
|
|
1959
1981
|
});
|
|
1960
1982
|
function getInputValue(e, t, n, i) {
|
|
@@ -2014,7 +2036,7 @@ directive("html", (e, { expression: t }, { effect: n, evaluateLater: i }) => {
|
|
|
2014
2036
|
n(() => {
|
|
2015
2037
|
r((a) => {
|
|
2016
2038
|
mutateDom(() => {
|
|
2017
|
-
e.innerHTML = a, e._x_ignoreSelf = !0, initTree(e), delete e._x_ignoreSelf;
|
|
2039
|
+
e.innerHTML = a ?? "", e._x_ignoreSelf = !0, initTree(e), delete e._x_ignoreSelf;
|
|
2018
2040
|
});
|
|
2019
2041
|
});
|
|
2020
2042
|
});
|
|
@@ -2101,78 +2123,49 @@ directive("for", (e, { expression: t }, { effect: n, cleanup: i }) => {
|
|
|
2101
2123
|
// the x-bind:key expression is stored for our use instead of evaluated.
|
|
2102
2124
|
e._x_keyExpression || "index"
|
|
2103
2125
|
);
|
|
2104
|
-
e.
|
|
2105
|
-
|
|
2106
|
-
() => {
|
|
2126
|
+
e._x_lookup = /* @__PURE__ */ new Map(), n(() => loop(e, r, a, s)), i(() => {
|
|
2127
|
+
e._x_lookup.forEach(
|
|
2128
|
+
(o) => mutateDom(() => {
|
|
2107
2129
|
destroyTree(o), o.remove();
|
|
2108
|
-
}
|
|
2109
|
-
)
|
|
2130
|
+
})
|
|
2131
|
+
), delete e._x_lookup;
|
|
2110
2132
|
});
|
|
2111
2133
|
});
|
|
2134
|
+
function refreshScope(e) {
|
|
2135
|
+
return (t) => {
|
|
2136
|
+
Object.entries(t).forEach(([n, i]) => {
|
|
2137
|
+
e[n] = i;
|
|
2138
|
+
});
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2112
2141
|
function loop(e, t, n, i) {
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2142
|
+
n((r) => {
|
|
2143
|
+
isNumeric3(r) && (r = Array.from({ length: r }, (c, u) => u + 1)), r == null && (r = []), r instanceof Set && (r = Array.from(r)), r instanceof Map && (r = Array.from(r));
|
|
2144
|
+
let a = e._x_lookup, s = /* @__PURE__ */ new Map();
|
|
2145
|
+
e._x_lookup = s;
|
|
2146
|
+
let o = isObject2(r), l = Object.entries(r).map(([c, u]) => {
|
|
2147
|
+
o || (c = parseInt(c));
|
|
2148
|
+
let d = getIterationScopeVariables(t, u, c, r), h;
|
|
2149
|
+
return i((y) => {
|
|
2150
|
+
typeof y == "object" && warn("x-for key cannot be an object, it must be a string or an integer", e), a.has(y) && (s.set(y, a.get(y)), a.delete(y)), h = y;
|
|
2151
|
+
}, { scope: { index: c, ...d } }), [h, d];
|
|
2152
|
+
});
|
|
2153
|
+
mutateDom(() => {
|
|
2154
|
+
a.forEach((d) => {
|
|
2155
|
+
destroyTree(d), d.remove();
|
|
2123
2156
|
});
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
}
|
|
2136
|
-
l = l.filter((h) => !x.includes(h));
|
|
2137
|
-
let y = "template";
|
|
2138
|
-
for (let h = 0; h < u.length; h++) {
|
|
2139
|
-
let b = u[h], m = l.indexOf(b);
|
|
2140
|
-
if (m === -1)
|
|
2141
|
-
l.splice(h, 0, b), d.push([y, h]);
|
|
2142
|
-
else if (m !== h) {
|
|
2143
|
-
let _ = l.splice(h, 1)[0], f = l.splice(m - 1, 1)[0];
|
|
2144
|
-
l.splice(h, 0, f), l.splice(m, 0, _), p.push([_, f]);
|
|
2145
|
-
} else
|
|
2146
|
-
v.push(b);
|
|
2147
|
-
y = b;
|
|
2148
|
-
}
|
|
2149
|
-
for (let h = 0; h < x.length; h++) {
|
|
2150
|
-
let b = x[h];
|
|
2151
|
-
b in o && (mutateDom(() => {
|
|
2152
|
-
destroyTree(o[b]), o[b].remove();
|
|
2153
|
-
}), delete o[b]);
|
|
2154
|
-
}
|
|
2155
|
-
for (let h = 0; h < p.length; h++) {
|
|
2156
|
-
let [b, m] = p[h], _ = o[b], f = o[m], g = document.createElement("div");
|
|
2157
|
-
mutateDom(() => {
|
|
2158
|
-
f || warn('x-for ":key" is undefined or invalid', a, m, o), f.after(g), _.after(f), f._x_currentIfEl && f.after(f._x_currentIfEl), g.before(_), _._x_currentIfEl && _.after(_._x_currentIfEl), g.remove();
|
|
2159
|
-
}), f._x_refreshXForScope(c[u.indexOf(m)]);
|
|
2160
|
-
}
|
|
2161
|
-
for (let h = 0; h < d.length; h++) {
|
|
2162
|
-
let [b, m] = d[h], _ = b === "template" ? a : o[b];
|
|
2163
|
-
_._x_currentIfEl && (_ = _._x_currentIfEl);
|
|
2164
|
-
let f = c[m], g = u[m], w = document.importNode(a.content, !0).firstElementChild, E = reactive(f);
|
|
2165
|
-
addScopeToNode(w, E, a), w._x_refreshXForScope = (D) => {
|
|
2166
|
-
Object.entries(D).forEach(([A, C]) => {
|
|
2167
|
-
E[A] = C;
|
|
2168
|
-
});
|
|
2169
|
-
}, mutateDom(() => {
|
|
2170
|
-
_.after(w), skipDuringClone(() => initTree(w))();
|
|
2171
|
-
}), typeof g == "object" && warn("x-for key cannot be an object, it must be a string or an integer", a), o[g] = w;
|
|
2172
|
-
}
|
|
2173
|
-
for (let h = 0; h < v.length; h++)
|
|
2174
|
-
o[v[h]]._x_refreshXForScope(c[u.indexOf(v[h])]);
|
|
2175
|
-
a._x_prevKeys = u;
|
|
2157
|
+
let c = /* @__PURE__ */ new Set(), u = e;
|
|
2158
|
+
l.forEach(([d, h]) => {
|
|
2159
|
+
if (s.has(d)) {
|
|
2160
|
+
let g = s.get(d);
|
|
2161
|
+
g._x_refreshXForScope(h), u.nextElementSibling !== g && (u.nextElementSibling && g.replaceWith(u.nextElementSibling), u.after(g)), u = g, g._x_currentIfEl && (g.nextElementSibling !== g._x_currentIfEl && u.after(g._x_currentIfEl), u = g._x_currentIfEl);
|
|
2162
|
+
return;
|
|
2163
|
+
}
|
|
2164
|
+
e.content.children.length > 1 && warn("x-for templates require a single root element, additional elements will be ignored.", e);
|
|
2165
|
+
let y = document.importNode(e.content, !0).firstElementChild, v = reactive(h);
|
|
2166
|
+
addScopeToNode(y, v, e), y._x_refreshXForScope = refreshScope(v), s.set(d, y), c.add(y), u.after(y), u = y;
|
|
2167
|
+
}), skipDuringClone(() => c.forEach((d) => initTree(d)))();
|
|
2168
|
+
});
|
|
2176
2169
|
});
|
|
2177
2170
|
}
|
|
2178
2171
|
function parseForExpression(e) {
|
|
@@ -2193,13 +2186,16 @@ function getIterationScopeVariables(e, t, n, i) {
|
|
|
2193
2186
|
}) : r[e.item] = t, e.index && (r[e.index] = n), e.collection && (r[e.collection] = i), r;
|
|
2194
2187
|
}
|
|
2195
2188
|
function isNumeric3(e) {
|
|
2196
|
-
return
|
|
2189
|
+
return typeof e != "object" && !isNaN(e);
|
|
2190
|
+
}
|
|
2191
|
+
function isObject2(e) {
|
|
2192
|
+
return typeof e == "object" && !Array.isArray(e);
|
|
2197
2193
|
}
|
|
2198
2194
|
function handler3() {
|
|
2199
2195
|
}
|
|
2200
2196
|
handler3.inline = (e, { expression: t }, { cleanup: n }) => {
|
|
2201
2197
|
let i = closestRoot(e);
|
|
2202
|
-
i._x_refs || (i._x_refs = {}), i._x_refs[t] = e, n(() => delete i._x_refs[t]);
|
|
2198
|
+
i && (i._x_refs || (i._x_refs = {}), i._x_refs[t] = e, n(() => delete i._x_refs[t]));
|
|
2203
2199
|
};
|
|
2204
2200
|
directive("ref", handler3);
|
|
2205
2201
|
directive("if", (e, { expression: t }, { effect: n, cleanup: i }) => {
|
|
@@ -2738,13 +2734,13 @@ function getBoundingClientRect(e, t, n) {
|
|
|
2738
2734
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2739
2735
|
var i = e.getBoundingClientRect(), r = 1, a = 1;
|
|
2740
2736
|
t && isHTMLElement(e) && (r = e.offsetWidth > 0 && round(i.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && round(i.height) / e.offsetHeight || 1);
|
|
2741
|
-
var s = isElement(e) ? getWindow(e) : window, o = s.visualViewport, l = !isLayoutViewport() && n, c = (i.left + (l && o ? o.offsetLeft : 0)) / r, u = (i.top + (l && o ? o.offsetTop : 0)) / a, d = i.width / r,
|
|
2737
|
+
var s = isElement(e) ? getWindow(e) : window, o = s.visualViewport, l = !isLayoutViewport() && n, c = (i.left + (l && o ? o.offsetLeft : 0)) / r, u = (i.top + (l && o ? o.offsetTop : 0)) / a, d = i.width / r, h = i.height / a;
|
|
2742
2738
|
return {
|
|
2743
2739
|
width: d,
|
|
2744
|
-
height:
|
|
2740
|
+
height: h,
|
|
2745
2741
|
top: u,
|
|
2746
2742
|
right: c + d,
|
|
2747
|
-
bottom: u +
|
|
2743
|
+
bottom: u + h,
|
|
2748
2744
|
left: c,
|
|
2749
2745
|
x: c,
|
|
2750
2746
|
y: u
|
|
@@ -2856,8 +2852,8 @@ var toPaddingObject = function(t, n) {
|
|
|
2856
2852
|
function arrow(e) {
|
|
2857
2853
|
var t, n = e.state, i = e.name, r = e.options, a = n.elements.arrow, s = n.modifiersData.popperOffsets, o = getBasePlacement(n.placement), l = getMainAxisFromPlacement(o), c = [left, right].indexOf(o) >= 0, u = c ? "height" : "width";
|
|
2858
2854
|
if (!(!a || !s)) {
|
|
2859
|
-
var d = toPaddingObject(r.padding, n),
|
|
2860
|
-
n.modifiersData[i] = (t = {}, t[
|
|
2855
|
+
var d = toPaddingObject(r.padding, n), h = getLayoutRect(a), y = l === "y" ? top : left, v = l === "y" ? bottom : right, g = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], b = s[l] - n.rects.reference[l], x = getOffsetParent(a), m = x ? l === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, E = g / 2 - b / 2, f = d[y], p = m - h[u] - d[v], _ = m / 2 - h[u] / 2 + E, w = within(f, _, p), C = l;
|
|
2856
|
+
n.modifiersData[i] = (t = {}, t[C] = w, t.centerOffset = w - _, t);
|
|
2861
2857
|
}
|
|
2862
2858
|
}
|
|
2863
2859
|
function effect$1(e) {
|
|
@@ -2890,48 +2886,48 @@ function roundOffsetsByDPR(e, t) {
|
|
|
2890
2886
|
};
|
|
2891
2887
|
}
|
|
2892
2888
|
function mapToStyles(e) {
|
|
2893
|
-
var t, n = e.popper, i = e.popperRect, r = e.placement, a = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, c = e.adaptive, u = e.roundOffsets, d = e.isFixed,
|
|
2894
|
-
x,
|
|
2895
|
-
y
|
|
2889
|
+
var t, n = e.popper, i = e.popperRect, r = e.placement, a = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, c = e.adaptive, u = e.roundOffsets, d = e.isFixed, h = s.x, y = h === void 0 ? 0 : h, v = s.y, g = v === void 0 ? 0 : v, b = typeof u == "function" ? u({
|
|
2890
|
+
x: y,
|
|
2891
|
+
y: g
|
|
2896
2892
|
}) : {
|
|
2897
|
-
x,
|
|
2898
|
-
y
|
|
2893
|
+
x: y,
|
|
2894
|
+
y: g
|
|
2899
2895
|
};
|
|
2900
|
-
|
|
2901
|
-
var
|
|
2896
|
+
y = b.x, g = b.y;
|
|
2897
|
+
var x = s.hasOwnProperty("x"), m = s.hasOwnProperty("y"), E = left, f = top, p = window;
|
|
2902
2898
|
if (c) {
|
|
2903
|
-
var
|
|
2904
|
-
if (
|
|
2899
|
+
var _ = getOffsetParent(n), w = "clientHeight", C = "clientWidth";
|
|
2900
|
+
if (_ === getWindow(n) && (_ = getDocumentElement(n), getComputedStyle$1(_).position !== "static" && o === "absolute" && (w = "scrollHeight", C = "scrollWidth")), _ = _, r === top || (r === left || r === right) && a === end) {
|
|
2905
2901
|
f = bottom;
|
|
2906
|
-
var A = d &&
|
|
2902
|
+
var A = d && _ === p && p.visualViewport ? p.visualViewport.height : (
|
|
2907
2903
|
// $FlowFixMe[prop-missing]
|
|
2908
|
-
w
|
|
2904
|
+
_[w]
|
|
2909
2905
|
);
|
|
2910
|
-
|
|
2906
|
+
g -= A - i.height, g *= l ? 1 : -1;
|
|
2911
2907
|
}
|
|
2912
2908
|
if (r === left || (r === top || r === bottom) && a === end) {
|
|
2913
|
-
|
|
2914
|
-
var
|
|
2909
|
+
E = right;
|
|
2910
|
+
var D = d && _ === p && p.visualViewport ? p.visualViewport.width : (
|
|
2915
2911
|
// $FlowFixMe[prop-missing]
|
|
2916
|
-
|
|
2912
|
+
_[C]
|
|
2917
2913
|
);
|
|
2918
|
-
|
|
2914
|
+
y -= D - i.width, y *= l ? 1 : -1;
|
|
2919
2915
|
}
|
|
2920
2916
|
}
|
|
2921
2917
|
var S = Object.assign({
|
|
2922
2918
|
position: o
|
|
2923
2919
|
}, c && unsetSides), O = u === !0 ? roundOffsetsByDPR({
|
|
2924
|
-
x,
|
|
2925
|
-
y
|
|
2920
|
+
x: y,
|
|
2921
|
+
y: g
|
|
2926
2922
|
}, getWindow(n)) : {
|
|
2927
|
-
x,
|
|
2928
|
-
y
|
|
2923
|
+
x: y,
|
|
2924
|
+
y: g
|
|
2929
2925
|
};
|
|
2930
|
-
if (
|
|
2931
|
-
var
|
|
2932
|
-
return Object.assign({}, S, (
|
|
2926
|
+
if (y = O.x, g = O.y, l) {
|
|
2927
|
+
var k;
|
|
2928
|
+
return Object.assign({}, S, (k = {}, k[f] = m ? "0" : "", k[E] = x ? "0" : "", k.transform = (p.devicePixelRatio || 1) <= 1 ? "translate(" + y + "px, " + g + "px)" : "translate3d(" + y + "px, " + g + "px, 0)", k));
|
|
2933
2929
|
}
|
|
2934
|
-
return Object.assign({}, S, (t = {}, t[f] = m ?
|
|
2930
|
+
return Object.assign({}, S, (t = {}, t[f] = m ? g + "px" : "", t[E] = x ? y + "px" : "", t.transform = "", t));
|
|
2935
2931
|
}
|
|
2936
2932
|
function computeStyles(e) {
|
|
2937
2933
|
var t = e.state, n = e.options, i = n.gpuAcceleration, r = i === void 0 ? !0 : i, a = n.adaptive, s = a === void 0 ? !0 : a, o = n.roundOffsets, l = o === void 0 ? !0 : o, c = {
|
|
@@ -3131,43 +3127,43 @@ function computeOffsets(e) {
|
|
|
3131
3127
|
}
|
|
3132
3128
|
function detectOverflow(e, t) {
|
|
3133
3129
|
t === void 0 && (t = {});
|
|
3134
|
-
var n = t, i = n.placement, r = i === void 0 ? e.placement : i, a = n.strategy, s = a === void 0 ? e.strategy : a, o = n.boundary, l = o === void 0 ? clippingParents : o, c = n.rootBoundary, u = c === void 0 ? viewport : c, d = n.elementContext,
|
|
3135
|
-
reference:
|
|
3136
|
-
element:
|
|
3130
|
+
var n = t, i = n.placement, r = i === void 0 ? e.placement : i, a = n.strategy, s = a === void 0 ? e.strategy : a, o = n.boundary, l = o === void 0 ? clippingParents : o, c = n.rootBoundary, u = c === void 0 ? viewport : c, d = n.elementContext, h = d === void 0 ? popper : d, y = n.altBoundary, v = y === void 0 ? !1 : y, g = n.padding, b = g === void 0 ? 0 : g, x = mergePaddingObject(typeof b != "number" ? b : expandToHashMap(b, basePlacements)), m = h === popper ? reference : popper, E = e.rects.popper, f = e.elements[v ? m : h], p = getClippingRect(isElement(f) ? f : f.contextElement || getDocumentElement(e.elements.popper), l, u, s), _ = getBoundingClientRect(e.elements.reference), w = computeOffsets({
|
|
3131
|
+
reference: _,
|
|
3132
|
+
element: E,
|
|
3137
3133
|
placement: r
|
|
3138
|
-
}),
|
|
3139
|
-
top:
|
|
3140
|
-
bottom: A.bottom -
|
|
3141
|
-
left:
|
|
3142
|
-
right: A.right -
|
|
3134
|
+
}), C = rectToClientRect(Object.assign({}, E, w)), A = h === popper ? C : _, D = {
|
|
3135
|
+
top: p.top - A.top + x.top,
|
|
3136
|
+
bottom: A.bottom - p.bottom + x.bottom,
|
|
3137
|
+
left: p.left - A.left + x.left,
|
|
3138
|
+
right: A.right - p.right + x.right
|
|
3143
3139
|
}, S = e.modifiersData.offset;
|
|
3144
|
-
if (
|
|
3140
|
+
if (h === popper && S) {
|
|
3145
3141
|
var O = S[r];
|
|
3146
|
-
Object.keys(
|
|
3147
|
-
var L = [right, bottom].indexOf(
|
|
3148
|
-
|
|
3142
|
+
Object.keys(D).forEach(function(k) {
|
|
3143
|
+
var L = [right, bottom].indexOf(k) >= 0 ? 1 : -1, M = [top, bottom].indexOf(k) >= 0 ? "y" : "x";
|
|
3144
|
+
D[k] += O[M] * L;
|
|
3149
3145
|
});
|
|
3150
3146
|
}
|
|
3151
|
-
return
|
|
3147
|
+
return D;
|
|
3152
3148
|
}
|
|
3153
3149
|
function computeAutoPlacement(e, t) {
|
|
3154
3150
|
t === void 0 && (t = {});
|
|
3155
3151
|
var n = t, i = n.placement, r = n.boundary, a = n.rootBoundary, s = n.padding, o = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? placements : l, u = getVariation(i), d = u ? o ? variationPlacements : variationPlacements.filter(function(v) {
|
|
3156
3152
|
return getVariation(v) === u;
|
|
3157
|
-
}) : basePlacements,
|
|
3153
|
+
}) : basePlacements, h = d.filter(function(v) {
|
|
3158
3154
|
return c.indexOf(v) >= 0;
|
|
3159
3155
|
});
|
|
3160
|
-
|
|
3161
|
-
var
|
|
3162
|
-
return v[
|
|
3163
|
-
placement:
|
|
3156
|
+
h.length === 0 && (h = d);
|
|
3157
|
+
var y = h.reduce(function(v, g) {
|
|
3158
|
+
return v[g] = detectOverflow(e, {
|
|
3159
|
+
placement: g,
|
|
3164
3160
|
boundary: r,
|
|
3165
3161
|
rootBoundary: a,
|
|
3166
3162
|
padding: s
|
|
3167
|
-
})[getBasePlacement(
|
|
3163
|
+
})[getBasePlacement(g)], v;
|
|
3168
3164
|
}, {});
|
|
3169
|
-
return Object.keys(
|
|
3170
|
-
return
|
|
3165
|
+
return Object.keys(y).sort(function(v, g) {
|
|
3166
|
+
return y[v] - y[g];
|
|
3171
3167
|
});
|
|
3172
3168
|
}
|
|
3173
3169
|
function getExpandedFallbackPlacements(e) {
|
|
@@ -3179,44 +3175,44 @@ function getExpandedFallbackPlacements(e) {
|
|
|
3179
3175
|
function flip(e) {
|
|
3180
3176
|
var t = e.state, n = e.options, i = e.name;
|
|
3181
3177
|
if (!t.modifiersData[i]._skip) {
|
|
3182
|
-
for (var r = n.mainAxis, a = r === void 0 ? !0 : r, s = n.altAxis, o = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, u = n.boundary, d = n.rootBoundary,
|
|
3178
|
+
for (var r = n.mainAxis, a = r === void 0 ? !0 : r, s = n.altAxis, o = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, u = n.boundary, d = n.rootBoundary, h = n.altBoundary, y = n.flipVariations, v = y === void 0 ? !0 : y, g = n.allowedAutoPlacements, b = t.options.placement, x = getBasePlacement(b), m = x === b, E = l || (m || !v ? [getOppositePlacement(b)] : getExpandedFallbackPlacements(b)), f = [b].concat(E).reduce(function(V, B) {
|
|
3183
3179
|
return V.concat(getBasePlacement(B) === auto ? computeAutoPlacement(t, {
|
|
3184
3180
|
placement: B,
|
|
3185
3181
|
boundary: u,
|
|
3186
3182
|
rootBoundary: d,
|
|
3187
3183
|
padding: c,
|
|
3188
3184
|
flipVariations: v,
|
|
3189
|
-
allowedAutoPlacements:
|
|
3185
|
+
allowedAutoPlacements: g
|
|
3190
3186
|
}) : B);
|
|
3191
|
-
}, []),
|
|
3192
|
-
var S = f[
|
|
3187
|
+
}, []), p = t.rects.reference, _ = t.rects.popper, w = /* @__PURE__ */ new Map(), C = !0, A = f[0], D = 0; D < f.length; D++) {
|
|
3188
|
+
var S = f[D], O = getBasePlacement(S), k = getVariation(S) === start, L = [top, bottom].indexOf(O) >= 0, M = L ? "width" : "height", H = detectOverflow(t, {
|
|
3193
3189
|
placement: S,
|
|
3194
3190
|
boundary: u,
|
|
3195
3191
|
rootBoundary: d,
|
|
3196
|
-
altBoundary:
|
|
3192
|
+
altBoundary: h,
|
|
3197
3193
|
padding: c
|
|
3198
|
-
}), I = L ?
|
|
3199
|
-
|
|
3194
|
+
}), I = L ? k ? right : left : k ? bottom : top;
|
|
3195
|
+
p[M] > _[M] && (I = getOppositePlacement(I));
|
|
3200
3196
|
var W = getOppositePlacement(I), $ = [];
|
|
3201
3197
|
if (a && $.push(H[O] <= 0), o && $.push(H[I] <= 0, H[W] <= 0), $.every(function(V) {
|
|
3202
3198
|
return V;
|
|
3203
3199
|
})) {
|
|
3204
|
-
A = S,
|
|
3200
|
+
A = S, C = !1;
|
|
3205
3201
|
break;
|
|
3206
3202
|
}
|
|
3207
|
-
|
|
3203
|
+
w.set(S, $);
|
|
3208
3204
|
}
|
|
3209
|
-
if (
|
|
3205
|
+
if (C)
|
|
3210
3206
|
for (var q = v ? 3 : 1, N = function(B) {
|
|
3211
|
-
var
|
|
3212
|
-
var F =
|
|
3207
|
+
var T = f.find(function(R) {
|
|
3208
|
+
var F = w.get(R);
|
|
3213
3209
|
if (F)
|
|
3214
|
-
return F.slice(0, B).every(function(
|
|
3215
|
-
return
|
|
3210
|
+
return F.slice(0, B).every(function(Y) {
|
|
3211
|
+
return Y;
|
|
3216
3212
|
});
|
|
3217
3213
|
});
|
|
3218
|
-
if (
|
|
3219
|
-
return A =
|
|
3214
|
+
if (T)
|
|
3215
|
+
return A = T, "break";
|
|
3220
3216
|
}, P = q; P > 0; P--) {
|
|
3221
3217
|
var j = N(P);
|
|
3222
3218
|
if (j === "break") break;
|
|
@@ -3317,14 +3313,14 @@ function getAltAxis(e) {
|
|
|
3317
3313
|
return e === "x" ? "y" : "x";
|
|
3318
3314
|
}
|
|
3319
3315
|
function preventOverflow(e) {
|
|
3320
|
-
var t = e.state, n = e.options, i = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, s = n.altAxis, o = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, u = n.altBoundary, d = n.padding,
|
|
3316
|
+
var t = e.state, n = e.options, i = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, s = n.altAxis, o = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, u = n.altBoundary, d = n.padding, h = n.tether, y = h === void 0 ? !0 : h, v = n.tetherOffset, g = v === void 0 ? 0 : v, b = detectOverflow(t, {
|
|
3321
3317
|
boundary: l,
|
|
3322
3318
|
rootBoundary: c,
|
|
3323
3319
|
padding: d,
|
|
3324
3320
|
altBoundary: u
|
|
3325
|
-
}),
|
|
3321
|
+
}), x = getBasePlacement(t.placement), m = getVariation(t.placement), E = !m, f = getMainAxisFromPlacement(x), p = getAltAxis(f), _ = t.modifiersData.popperOffsets, w = t.rects.reference, C = t.rects.popper, A = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
3326
3322
|
placement: t.placement
|
|
3327
|
-
})) :
|
|
3323
|
+
})) : g, D = typeof A == "number" ? {
|
|
3328
3324
|
mainAxis: A,
|
|
3329
3325
|
altAxis: A
|
|
3330
3326
|
} : Object.assign({
|
|
@@ -3334,17 +3330,17 @@ function preventOverflow(e) {
|
|
|
3334
3330
|
x: 0,
|
|
3335
3331
|
y: 0
|
|
3336
3332
|
};
|
|
3337
|
-
if (
|
|
3333
|
+
if (_) {
|
|
3338
3334
|
if (a) {
|
|
3339
|
-
var
|
|
3335
|
+
var k, L = f === "y" ? top : left, M = f === "y" ? bottom : right, H = f === "y" ? "height" : "width", I = _[f], W = I + b[L], $ = I - b[M], q = y ? -C[H] / 2 : 0, N = m === start ? w[H] : C[H], P = m === start ? -C[H] : -w[H], j = t.elements.arrow, V = y && j ? getLayoutRect(j) : {
|
|
3340
3336
|
width: 0,
|
|
3341
3337
|
height: 0
|
|
3342
|
-
}, B = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(),
|
|
3343
|
-
|
|
3338
|
+
}, B = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), T = B[L], R = B[M], F = within(0, w[H], V[H]), Y = E ? w[H] / 2 - q - F - T - D.mainAxis : N - F - T - D.mainAxis, ae = E ? -w[H] / 2 + q + F + R + D.mainAxis : P + F + R + D.mainAxis, K = t.elements.arrow && getOffsetParent(t.elements.arrow), se = K ? f === "y" ? K.clientTop || 0 : K.clientLeft || 0 : 0, J = (k = S?.[f]) != null ? k : 0, oe = I + Y - J - se, le = I + ae - J, G = within(y ? min(W, oe) : W, I, y ? max($, le) : $);
|
|
3339
|
+
_[f] = G, O[f] = G - I;
|
|
3344
3340
|
}
|
|
3345
3341
|
if (o) {
|
|
3346
|
-
var Z, ce = f === "x" ? top : left, ue = f === "x" ? bottom : right, z =
|
|
3347
|
-
|
|
3342
|
+
var Z, ce = f === "x" ? top : left, ue = f === "x" ? bottom : right, z = _[p], U = p === "y" ? "height" : "width", Q = z + b[ce], ee = z - b[ue], X = [top, left].indexOf(x) !== -1, te = (Z = S?.[p]) != null ? Z : 0, ne = X ? Q : z - w[U] - C[U] - te + D.altAxis, ie = X ? z + w[U] + C[U] - te - D.altAxis : ee, re = y && X ? withinMaxClamp(ne, z, ie) : within(y ? ne : Q, z, y ? ie : ee);
|
|
3343
|
+
_[p] = re, O[p] = re - z;
|
|
3348
3344
|
}
|
|
3349
3345
|
t.modifiersData[i] = O;
|
|
3350
3346
|
}
|
|
@@ -3463,18 +3459,18 @@ function popperGenerator(e) {
|
|
|
3463
3459
|
},
|
|
3464
3460
|
attributes: {},
|
|
3465
3461
|
styles: {}
|
|
3466
|
-
}, d = [],
|
|
3462
|
+
}, d = [], h = !1, y = {
|
|
3467
3463
|
state: u,
|
|
3468
|
-
setOptions: function(
|
|
3469
|
-
var m = typeof
|
|
3470
|
-
|
|
3464
|
+
setOptions: function(x) {
|
|
3465
|
+
var m = typeof x == "function" ? x(u.options) : x;
|
|
3466
|
+
g(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = {
|
|
3471
3467
|
reference: isElement(o) ? listScrollParents(o) : o.contextElement ? listScrollParents(o.contextElement) : [],
|
|
3472
3468
|
popper: listScrollParents(l)
|
|
3473
3469
|
};
|
|
3474
|
-
var
|
|
3475
|
-
return u.orderedModifiers =
|
|
3470
|
+
var E = orderModifiers(mergeByName([].concat(i, u.options.modifiers)));
|
|
3471
|
+
return u.orderedModifiers = E.filter(function(f) {
|
|
3476
3472
|
return f.enabled;
|
|
3477
|
-
}), v(),
|
|
3473
|
+
}), v(), y.update();
|
|
3478
3474
|
},
|
|
3479
3475
|
// Sync update – it will always be executed, even if not necessary. This
|
|
3480
3476
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -3482,26 +3478,26 @@ function popperGenerator(e) {
|
|
|
3482
3478
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
3483
3479
|
// prefer the async Popper#update method
|
|
3484
3480
|
forceUpdate: function() {
|
|
3485
|
-
if (!
|
|
3486
|
-
var
|
|
3487
|
-
if (areValidElements(m,
|
|
3481
|
+
if (!h) {
|
|
3482
|
+
var x = u.elements, m = x.reference, E = x.popper;
|
|
3483
|
+
if (areValidElements(m, E)) {
|
|
3488
3484
|
u.rects = {
|
|
3489
|
-
reference: getCompositeRect(m, getOffsetParent(
|
|
3490
|
-
popper: getLayoutRect(
|
|
3491
|
-
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(
|
|
3492
|
-
return u.modifiersData[
|
|
3485
|
+
reference: getCompositeRect(m, getOffsetParent(E), u.options.strategy === "fixed"),
|
|
3486
|
+
popper: getLayoutRect(E)
|
|
3487
|
+
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(D) {
|
|
3488
|
+
return u.modifiersData[D.name] = Object.assign({}, D.data);
|
|
3493
3489
|
});
|
|
3494
3490
|
for (var f = 0; f < u.orderedModifiers.length; f++) {
|
|
3495
3491
|
if (u.reset === !0) {
|
|
3496
3492
|
u.reset = !1, f = -1;
|
|
3497
3493
|
continue;
|
|
3498
3494
|
}
|
|
3499
|
-
var
|
|
3500
|
-
typeof
|
|
3495
|
+
var p = u.orderedModifiers[f], _ = p.fn, w = p.options, C = w === void 0 ? {} : w, A = p.name;
|
|
3496
|
+
typeof _ == "function" && (u = _({
|
|
3501
3497
|
state: u,
|
|
3502
|
-
options:
|
|
3498
|
+
options: C,
|
|
3503
3499
|
name: A,
|
|
3504
|
-
instance:
|
|
3500
|
+
instance: y
|
|
3505
3501
|
}) || u);
|
|
3506
3502
|
}
|
|
3507
3503
|
}
|
|
@@ -3510,40 +3506,40 @@ function popperGenerator(e) {
|
|
|
3510
3506
|
// Async and optimistically optimized update – it will not be executed if
|
|
3511
3507
|
// not necessary (debounced to run at most once-per-tick)
|
|
3512
3508
|
update: debounce(function() {
|
|
3513
|
-
return new Promise(function(
|
|
3514
|
-
|
|
3509
|
+
return new Promise(function(b) {
|
|
3510
|
+
y.forceUpdate(), b(u);
|
|
3515
3511
|
});
|
|
3516
3512
|
}),
|
|
3517
3513
|
destroy: function() {
|
|
3518
|
-
|
|
3514
|
+
g(), h = !0;
|
|
3519
3515
|
}
|
|
3520
3516
|
};
|
|
3521
3517
|
if (!areValidElements(o, l))
|
|
3522
|
-
return
|
|
3523
|
-
|
|
3524
|
-
!
|
|
3518
|
+
return y;
|
|
3519
|
+
y.setOptions(c).then(function(b) {
|
|
3520
|
+
!h && c.onFirstUpdate && c.onFirstUpdate(b);
|
|
3525
3521
|
});
|
|
3526
3522
|
function v() {
|
|
3527
|
-
u.orderedModifiers.forEach(function(
|
|
3528
|
-
var
|
|
3523
|
+
u.orderedModifiers.forEach(function(b) {
|
|
3524
|
+
var x = b.name, m = b.options, E = m === void 0 ? {} : m, f = b.effect;
|
|
3529
3525
|
if (typeof f == "function") {
|
|
3530
|
-
var
|
|
3526
|
+
var p = f({
|
|
3531
3527
|
state: u,
|
|
3532
|
-
name:
|
|
3533
|
-
instance:
|
|
3534
|
-
options:
|
|
3535
|
-
}),
|
|
3528
|
+
name: x,
|
|
3529
|
+
instance: y,
|
|
3530
|
+
options: E
|
|
3531
|
+
}), _ = function() {
|
|
3536
3532
|
};
|
|
3537
|
-
d.push(
|
|
3533
|
+
d.push(p || _);
|
|
3538
3534
|
}
|
|
3539
3535
|
});
|
|
3540
3536
|
}
|
|
3541
|
-
function
|
|
3542
|
-
d.forEach(function(
|
|
3543
|
-
return
|
|
3537
|
+
function g() {
|
|
3538
|
+
d.forEach(function(b) {
|
|
3539
|
+
return b();
|
|
3544
3540
|
}), d = [];
|
|
3545
3541
|
}
|
|
3546
|
-
return
|
|
3542
|
+
return y;
|
|
3547
3543
|
};
|
|
3548
3544
|
}
|
|
3549
3545
|
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1], createPopper = /* @__PURE__ */ popperGenerator({
|
|
@@ -3805,9 +3801,9 @@ var __assign$8 = function() {
|
|
|
3805
3801
|
}, e.prototype.toggle = function() {
|
|
3806
3802
|
this._isHidden ? this.show() : this.hide(), this._options.onToggle(this);
|
|
3807
3803
|
}, e.prototype.show = function() {
|
|
3808
|
-
this.isHidden && (this._targetEl.classList.add("flex"), this._targetEl.classList.remove("hidden"), this._targetEl.setAttribute("aria-modal", "true"), this._targetEl.setAttribute("role", "dialog"), this._targetEl.removeAttribute("aria-hidden"), this._createBackdrop(), this._isHidden = !1, this._options.closable && this._setupModalCloseEventListeners(), document.body.classList.add("overflow-hidden"), this._options.onShow(this));
|
|
3804
|
+
this.isHidden() && (this._targetEl.classList.add("flex"), this._targetEl.classList.remove("hidden"), this._targetEl.setAttribute("aria-modal", "true"), this._targetEl.setAttribute("role", "dialog"), this._targetEl.removeAttribute("aria-hidden"), this._createBackdrop(), this._isHidden = !1, this._options.closable && this._setupModalCloseEventListeners(), document.body.classList.add("overflow-hidden"), this._options.onShow(this));
|
|
3809
3805
|
}, e.prototype.hide = function() {
|
|
3810
|
-
this.isVisible && (this._targetEl.classList.add("hidden"), this._targetEl.classList.remove("flex"), this._targetEl.setAttribute("aria-hidden", "true"), this._targetEl.removeAttribute("aria-modal"), this._targetEl.removeAttribute("role"), this._destroyBackdropEl(), this._isHidden = !0, document.body.classList.remove("overflow-hidden"), this._options.closable && this._removeModalCloseEventListeners(), this._options.onHide(this));
|
|
3806
|
+
this.isVisible() && (this._targetEl.classList.add("hidden"), this._targetEl.classList.remove("flex"), this._targetEl.setAttribute("aria-hidden", "true"), this._targetEl.removeAttribute("aria-modal"), this._targetEl.removeAttribute("role"), this._destroyBackdropEl(), this._isHidden = !0, document.body.classList.remove("overflow-hidden"), this._options.closable && this._removeModalCloseEventListeners(), this._options.onHide(this));
|
|
3811
3807
|
}, e.prototype.isVisible = function() {
|
|
3812
3808
|
return !this._isHidden;
|
|
3813
3809
|
}, e.prototype.isHidden = function() {
|
|
@@ -5011,8 +5007,8 @@ function parseFormatString(e) {
|
|
|
5011
5007
|
parser: function(s, o) {
|
|
5012
5008
|
var l = s.split(reNonDateParts).reduce(function(c, u, d) {
|
|
5013
5009
|
if (u.length > 0 && n[d]) {
|
|
5014
|
-
var
|
|
5015
|
-
|
|
5010
|
+
var h = n[d][0];
|
|
5011
|
+
h === "M" ? c.m = u : h !== "D" && (c[h] = u);
|
|
5016
5012
|
}
|
|
5017
5013
|
return c;
|
|
5018
5014
|
}, {});
|
|
@@ -5164,51 +5160,51 @@ function validateViewId(e, t) {
|
|
|
5164
5160
|
return i >= 0 && i <= n ? i : t;
|
|
5165
5161
|
}
|
|
5166
5162
|
function processOptions(e, t) {
|
|
5167
|
-
var n = Object.assign({}, e), i = {}, r = t.constructor.locales, a = t.config || {}, s = a.format, o = a.language, l = a.locale, c = a.maxDate, u = a.maxView, d = a.minDate,
|
|
5163
|
+
var n = Object.assign({}, e), i = {}, r = t.constructor.locales, a = t.config || {}, s = a.format, o = a.language, l = a.locale, c = a.maxDate, u = a.maxView, d = a.minDate, h = a.pickLevel, y = a.startView, v = a.weekStart;
|
|
5168
5164
|
if (n.language) {
|
|
5169
|
-
var
|
|
5170
|
-
if (n.language !== o && (r[n.language] ?
|
|
5171
|
-
o = i.language =
|
|
5172
|
-
var
|
|
5165
|
+
var g;
|
|
5166
|
+
if (n.language !== o && (r[n.language] ? g = n.language : (g = n.language.split("-")[0], r[g] === void 0 && (g = !1))), delete n.language, g) {
|
|
5167
|
+
o = i.language = g;
|
|
5168
|
+
var b = l || r[defaultLang];
|
|
5173
5169
|
l = Object.assign({
|
|
5174
5170
|
format: defaultFormat,
|
|
5175
5171
|
weekStart: defaultWeekStart
|
|
5176
|
-
}, r[defaultLang]), o !== defaultLang && Object.assign(l, r[o]), i.locale = l, s ===
|
|
5172
|
+
}, r[defaultLang]), o !== defaultLang && Object.assign(l, r[o]), i.locale = l, s === b.format && (s = i.format = l.format), v === b.weekStart && (v = i.weekStart = l.weekStart, i.weekEnd = calcEndOfWeek(l.weekStart));
|
|
5177
5173
|
}
|
|
5178
5174
|
}
|
|
5179
5175
|
if (n.format) {
|
|
5180
|
-
var
|
|
5181
|
-
(
|
|
5176
|
+
var x = typeof n.format.toDisplay == "function", m = typeof n.format.toValue == "function", E = reFormatTokens.test(n.format);
|
|
5177
|
+
(x && m || E) && (s = i.format = n.format), delete n.format;
|
|
5182
5178
|
}
|
|
5183
|
-
var f = d,
|
|
5184
|
-
if (n.minDate !== void 0 && (f = n.minDate === null ? dateValue(0, 0, 1) : validateDate(n.minDate, s, l, f), delete n.minDate), n.maxDate !== void 0 && (
|
|
5179
|
+
var f = d, p = c;
|
|
5180
|
+
if (n.minDate !== void 0 && (f = n.minDate === null ? dateValue(0, 0, 1) : validateDate(n.minDate, s, l, f), delete n.minDate), n.maxDate !== void 0 && (p = n.maxDate === null ? void 0 : validateDate(n.maxDate, s, l, p), delete n.maxDate), p < f ? (d = i.minDate = p, c = i.maxDate = f) : (d !== f && (d = i.minDate = f), c !== p && (c = i.maxDate = p)), n.datesDisabled && (i.datesDisabled = n.datesDisabled.reduce(function(M, H) {
|
|
5185
5181
|
var I = parseDate(H, s, l);
|
|
5186
5182
|
return I !== void 0 ? pushUnique(M, I) : M;
|
|
5187
5183
|
}, []), delete n.datesDisabled), n.defaultViewDate !== void 0) {
|
|
5188
|
-
var
|
|
5189
|
-
|
|
5184
|
+
var _ = parseDate(n.defaultViewDate, s, l);
|
|
5185
|
+
_ !== void 0 && (i.defaultViewDate = _), delete n.defaultViewDate;
|
|
5190
5186
|
}
|
|
5191
5187
|
if (n.weekStart !== void 0) {
|
|
5192
|
-
var
|
|
5193
|
-
isNaN(
|
|
5188
|
+
var w = Number(n.weekStart) % 7;
|
|
5189
|
+
isNaN(w) || (v = i.weekStart = w, i.weekEnd = calcEndOfWeek(w)), delete n.weekStart;
|
|
5194
5190
|
}
|
|
5195
5191
|
if (n.daysOfWeekDisabled && (i.daysOfWeekDisabled = n.daysOfWeekDisabled.reduce(sanitizeDOW, []), delete n.daysOfWeekDisabled), n.daysOfWeekHighlighted && (i.daysOfWeekHighlighted = n.daysOfWeekHighlighted.reduce(sanitizeDOW, []), delete n.daysOfWeekHighlighted), n.maxNumberOfDates !== void 0) {
|
|
5196
|
-
var
|
|
5197
|
-
|
|
5192
|
+
var C = parseInt(n.maxNumberOfDates, 10);
|
|
5193
|
+
C >= 0 && (i.maxNumberOfDates = C, i.multidate = C !== 1), delete n.maxNumberOfDates;
|
|
5198
5194
|
}
|
|
5199
5195
|
n.dateDelimiter && (i.dateDelimiter = String(n.dateDelimiter), delete n.dateDelimiter);
|
|
5200
|
-
var A =
|
|
5201
|
-
n.pickLevel !== void 0 && (A = validateViewId(n.pickLevel, 2), delete n.pickLevel), A !==
|
|
5202
|
-
var
|
|
5203
|
-
n.maxView !== void 0 && (
|
|
5204
|
-
var S =
|
|
5205
|
-
if (n.startView !== void 0 && (S = validateViewId(n.startView, S), delete n.startView), S <
|
|
5196
|
+
var A = h;
|
|
5197
|
+
n.pickLevel !== void 0 && (A = validateViewId(n.pickLevel, 2), delete n.pickLevel), A !== h && (h = i.pickLevel = A);
|
|
5198
|
+
var D = u;
|
|
5199
|
+
n.maxView !== void 0 && (D = validateViewId(n.maxView, u), delete n.maxView), D = h > D ? h : D, D !== u && (u = i.maxView = D);
|
|
5200
|
+
var S = y;
|
|
5201
|
+
if (n.startView !== void 0 && (S = validateViewId(n.startView, S), delete n.startView), S < h ? S = h : S > u && (S = u), S !== y && (i.startView = S), n.prevArrow) {
|
|
5206
5202
|
var O = parseHTML(n.prevArrow);
|
|
5207
5203
|
O.childNodes.length > 0 && (i.prevArrow = O.childNodes), delete n.prevArrow;
|
|
5208
5204
|
}
|
|
5209
5205
|
if (n.nextArrow) {
|
|
5210
|
-
var
|
|
5211
|
-
|
|
5206
|
+
var k = parseHTML(n.nextArrow);
|
|
5207
|
+
k.childNodes.length > 0 && (i.nextArrow = k.childNodes), delete n.nextArrow;
|
|
5212
5208
|
}
|
|
5213
5209
|
if (n.disableTouchKeyboard !== void 0 && (i.disableTouchKeyboard = "ontouchstart" in document && !!n.disableTouchKeyboard, delete n.disableTouchKeyboard), n.orientation) {
|
|
5214
5210
|
var L = n.orientation.toLowerCase().split(/\s+/g);
|
|
@@ -5374,8 +5370,8 @@ var pickerTemplate = optimizeTemplateHTML(`<div class="datepicker hidden">
|
|
|
5374
5370
|
Array.from(this.grid.children).forEach(function(s, o) {
|
|
5375
5371
|
var l = s.classList, c = addDays(i.start, o), u = new Date(c), d = u.getDay();
|
|
5376
5372
|
if (s.className = "datepicker-cell hover:bg-neutral-tertiary-medium block flex-1 leading-9 border-0 rounded-base cursor-pointer text-center text-body font-medium text-sm ".concat(i.cellClass), s.dataset.date = c, s.textContent = u.getDate(), c < i.first ? l.add("prev", "text-fg-disabled") : c > i.last && l.add("next", "text-fg-disabled"), i.today === c && l.add("today", "bg-gray-100", "dark:bg-gray-600"), (c < i.minDate || c > i.maxDate || i.disabled.includes(c)) && (l.add("disabled", "cursor-not-allowed", "text-fg-disabled"), l.remove("hover:bg-neutral-tertiary-medium", "text-body", "cursor-pointer")), i.daysOfWeekDisabled.includes(d) && (l.add("disabled", "cursor-not-allowed", "text-fg-disabled"), l.remove("hover:bg-neutral-tertiary-medium", "text-body", "cursor-pointer"), pushUnique(i.disabled, c)), i.daysOfWeekHighlighted.includes(d) && l.add("highlighted"), i.range) {
|
|
5377
|
-
var
|
|
5378
|
-
c >
|
|
5373
|
+
var h = _slicedToArray(i.range, 2), y = h[0], v = h[1];
|
|
5374
|
+
c > y && c < v && (l.add("range", "bg-neutral-tertiary-medium"), l.remove("rounded-base", "rounded-s-base", "rounded-e-base")), c === y && (l.add("range-start", "bg-brand", "rounded-s-base"), l.remove("rounded-base", "rounded-e-base")), c === v && (l.add("range-end", "bg-neutral-tertiary-medium", "rounded-e-base"), l.remove("rounded-base", "rounded-s-base"));
|
|
5379
5375
|
}
|
|
5380
5376
|
i.selected.includes(c) && (l.add("selected", "bg-brand", "text-white"), l.remove("text-body", "hover:bg-neutral-tertiary-medium", "bg-neutral-tertiary-medium")), c === i.focused && l.add("focused"), i.beforeShow && i.performBeforeHook(s, c, c);
|
|
5381
5377
|
});
|
|
@@ -5475,12 +5471,12 @@ var MonthsView = /* @__PURE__ */ (function(e) {
|
|
|
5475
5471
|
this.disabled = [], this.picker.setViewSwitchLabel(this.year), this.picker.setPrevBtnDisabled(this.year <= this.minYear), this.picker.setNextBtnDisabled(this.year >= this.maxYear);
|
|
5476
5472
|
var r = this.selected[this.year] || [], a = this.year < this.minYear || this.year > this.maxYear, s = this.year === this.minYear, o = this.year === this.maxYear, l = computeMonthRange(this.range, this.year);
|
|
5477
5473
|
Array.from(this.grid.children).forEach(function(c, u) {
|
|
5478
|
-
var d = c.classList,
|
|
5479
|
-
if (c.className = "datepicker-cell hover:bg-neutral-tertiary-medium block flex-1 leading-9 border-0 rounded-base cursor-pointer text-center text-body font-medium text-sm ".concat(i.cellClass), i.isMinView && (c.dataset.date =
|
|
5480
|
-
var
|
|
5481
|
-
u > v && u <
|
|
5474
|
+
var d = c.classList, h = dateValue(i.year, u, 1);
|
|
5475
|
+
if (c.className = "datepicker-cell hover:bg-neutral-tertiary-medium block flex-1 leading-9 border-0 rounded-base cursor-pointer text-center text-body font-medium text-sm ".concat(i.cellClass), i.isMinView && (c.dataset.date = h), c.textContent = i.monthNames[u], (a || s && u < i.minMonth || o && u > i.maxMonth) && d.add("disabled"), l) {
|
|
5476
|
+
var y = _slicedToArray(l, 2), v = y[0], g = y[1];
|
|
5477
|
+
u > v && u < g && d.add("range"), u === v && d.add("range-start"), u === g && d.add("range-end");
|
|
5482
5478
|
}
|
|
5483
|
-
r.includes(u) && (d.add("selected", "bg-brand", "text-white", "dark:text-white"), d.remove("text-body", "hover:bg-neutral-tertiary-medium", "dark:text-white")), u === i.focused && d.add("focused"), i.beforeShow && i.performBeforeHook(c, u,
|
|
5479
|
+
r.includes(u) && (d.add("selected", "bg-brand", "text-white", "dark:text-white"), d.remove("text-body", "hover:bg-neutral-tertiary-medium", "dark:text-white")), u === i.focused && d.add("focused"), i.beforeShow && i.performBeforeHook(c, u, h);
|
|
5484
5480
|
});
|
|
5485
5481
|
}
|
|
5486
5482
|
// Update the view UI by applying the changes of selected and focused items
|
|
@@ -5699,19 +5695,19 @@ function getTextDirection(e) {
|
|
|
5699
5695
|
var Picker = /* @__PURE__ */ (function() {
|
|
5700
5696
|
function e(t) {
|
|
5701
5697
|
_classCallCheck(this, e), this.datepicker = t;
|
|
5702
|
-
var n = pickerTemplate.replace(/%buttonClass%/g, t.config.buttonClass), i = this.element = parseHTML(n).firstChild, r = _slicedToArray(i.firstChild.children, 3), a = r[0], s = r[1], o = r[2], l = a.firstElementChild, c = _slicedToArray(a.lastElementChild.children, 3), u = c[0], d = c[1],
|
|
5698
|
+
var n = pickerTemplate.replace(/%buttonClass%/g, t.config.buttonClass), i = this.element = parseHTML(n).firstChild, r = _slicedToArray(i.firstChild.children, 3), a = r[0], s = r[1], o = r[2], l = a.firstElementChild, c = _slicedToArray(a.lastElementChild.children, 3), u = c[0], d = c[1], h = c[2], y = _slicedToArray(o.firstChild.children, 2), v = y[0], g = y[1], b = {
|
|
5703
5699
|
title: l,
|
|
5704
5700
|
prevBtn: u,
|
|
5705
5701
|
viewSwitch: d,
|
|
5706
|
-
nextBtn:
|
|
5702
|
+
nextBtn: h,
|
|
5707
5703
|
todayBtn: v,
|
|
5708
|
-
clearBtn:
|
|
5704
|
+
clearBtn: g
|
|
5709
5705
|
};
|
|
5710
|
-
this.main = s, this.controls =
|
|
5711
|
-
var
|
|
5712
|
-
i.classList.add("datepicker-".concat(
|
|
5706
|
+
this.main = s, this.controls = b;
|
|
5707
|
+
var x = t.inline ? "inline" : "dropdown";
|
|
5708
|
+
i.classList.add("datepicker-".concat(x)), x === "dropdown" && i.classList.add("dropdown", "absolute", "top-0", "left-0", "z-50", "pt-2"), processPickerOptions(this, t.config), this.viewDate = computeResetViewDate(t), registerListeners(t, [[i, "click", onClickPicker.bind(null, t), {
|
|
5713
5709
|
capture: !0
|
|
5714
|
-
}], [s, "click", onClickView.bind(null, t)], [
|
|
5710
|
+
}], [s, "click", onClickView.bind(null, t)], [b.viewSwitch, "click", onClickViewSwitch.bind(null, t)], [b.prevBtn, "click", onClickPrevBtn.bind(null, t)], [b.nextBtn, "click", onClickNextBtn.bind(null, t)], [b.todayBtn, "click", onClickTodayBtn.bind(null, t)], [b.clearBtn, "click", onClickClearBtn.bind(null, t)]]), this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {
|
|
5715
5711
|
id: 2,
|
|
5716
5712
|
name: "years",
|
|
5717
5713
|
cellClass: "year",
|
|
@@ -5756,8 +5752,8 @@ var Picker = /* @__PURE__ */ (function() {
|
|
|
5756
5752
|
}, {
|
|
5757
5753
|
key: "place",
|
|
5758
5754
|
value: function() {
|
|
5759
|
-
var n = this.element, i = n.classList, r = n.style, a = this.datepicker, s = a.config, o = a.inputField, l = s.container, c = this.element.getBoundingClientRect(), u = c.width, d = c.height,
|
|
5760
|
-
l === document.body ? (
|
|
5755
|
+
var n = this.element, i = n.classList, r = n.style, a = this.datepicker, s = a.config, o = a.inputField, l = s.container, c = this.element.getBoundingClientRect(), u = c.width, d = c.height, h = l.getBoundingClientRect(), y = h.left, v = h.top, g = h.width, b = o.getBoundingClientRect(), x = b.left, m = b.top, E = b.width, f = b.height, p = s.orientation, _ = p.x, w = p.y, C, A, D;
|
|
5756
|
+
l === document.body ? (C = window.scrollY, A = x + window.scrollX, D = m + C) : (C = l.scrollTop, A = x - y, D = m - v + C), _ === "auto" && (A < 0 ? (_ = "left", A = 10) : A + u > g ? _ = "right" : _ = getTextDirection(o) === "rtl" ? "right" : "left"), _ === "right" && (A -= u - E), w === "auto" && (w = D - d < C ? "bottom" : "top"), w === "top" ? D -= d : D += f, i.remove("datepicker-orient-top", "datepicker-orient-bottom", "datepicker-orient-right", "datepicker-orient-left"), i.add("datepicker-orient-".concat(w), "datepicker-orient-".concat(_)), r.top = D && "".concat(D, "px"), r.left = A && "".concat(A, "px");
|
|
5761
5757
|
}
|
|
5762
5758
|
}, {
|
|
5763
5759
|
key: "setViewSwitchLabel",
|
|
@@ -5825,8 +5821,8 @@ function moveByArrowKey(e, t, n, i) {
|
|
|
5825
5821
|
break;
|
|
5826
5822
|
case 1:
|
|
5827
5823
|
o = addMonths(o, i ? n * 4 : n), l = addMonths, c = function(d) {
|
|
5828
|
-
var
|
|
5829
|
-
return
|
|
5824
|
+
var h = new Date(d), y = a.year, v = a.disabled;
|
|
5825
|
+
return h.getFullYear() === y && v.includes(h.getMonth());
|
|
5830
5826
|
};
|
|
5831
5827
|
break;
|
|
5832
5828
|
default:
|
|
@@ -6017,11 +6013,11 @@ var Datepicker$1 = /* @__PURE__ */ (function() {
|
|
|
6017
6013
|
this.dates = [];
|
|
6018
6014
|
var d = processInputDates(this, o);
|
|
6019
6015
|
d && d.length > 0 && (this.dates = d), s && (s.value = stringifyDates(this.dates, r));
|
|
6020
|
-
var
|
|
6016
|
+
var h = this.picker = new Picker(this);
|
|
6021
6017
|
if (a)
|
|
6022
6018
|
this.show();
|
|
6023
6019
|
else {
|
|
6024
|
-
var
|
|
6020
|
+
var y = onClickOutside.bind(null, this), v = [[s, "keydown", onKeydown.bind(null, this)], [s, "focus", onFocus.bind(null, this)], [s, "mousedown", onMousedown.bind(null, this)], [s, "click", onClickInput.bind(null, this)], [s, "paste", onPaste.bind(null, this)], [document, "mousedown", y], [document, "touchstart", y], [window, "resize", h.place.bind(h)]];
|
|
6025
6021
|
registerListeners(this, v);
|
|
6026
6022
|
}
|
|
6027
6023
|
}
|
|
@@ -6787,7 +6783,7 @@ var htmx = (function() {
|
|
|
6787
6783
|
location,
|
|
6788
6784
|
/** @type {typeof internalEval} */
|
|
6789
6785
|
_: null,
|
|
6790
|
-
version: "2.0.
|
|
6786
|
+
version: "2.0.10"
|
|
6791
6787
|
};
|
|
6792
6788
|
htmx.onLoad = onLoadHelper, htmx.process = processNode, htmx.on = addEventListenerImpl, htmx.off = removeEventListenerImpl, htmx.trigger = triggerEvent, htmx.ajax = ajaxHelper, htmx.find = find, htmx.findAll = findAll, htmx.closest = closest, htmx.remove = removeElement, htmx.addClass = addClassToElement, htmx.removeClass = removeClassFromElement, htmx.toggleClass = toggleClassOnElement, htmx.takeClass = takeClassForElement, htmx.swap = swap, htmx.defineExtension = defineExtension, htmx.removeExtension = removeExtension, htmx.logAll = logAll, htmx.logNone = logNone, htmx.parseInterval = parseInterval, htmx._ = internalEval;
|
|
6793
6789
|
const internalAPI = {
|
|
@@ -6991,8 +6987,12 @@ var htmx = (function() {
|
|
|
6991
6987
|
}
|
|
6992
6988
|
}
|
|
6993
6989
|
function normalizePath(e) {
|
|
6994
|
-
|
|
6995
|
-
|
|
6990
|
+
try {
|
|
6991
|
+
const t = new URL(e, window.location.href);
|
|
6992
|
+
e = t.pathname + t.search;
|
|
6993
|
+
} catch {
|
|
6994
|
+
}
|
|
6995
|
+
return e != "/" && (e = e.replace(/\/+$/, "")), e;
|
|
6996
6996
|
}
|
|
6997
6997
|
function internalEval(str) {
|
|
6998
6998
|
return maybeEval(getDocument().body, function() {
|
|
@@ -7216,7 +7216,7 @@ var htmx = (function() {
|
|
|
7216
7216
|
triggerEvent(d, "htmx:oobAfterSwap", u);
|
|
7217
7217
|
}));
|
|
7218
7218
|
}
|
|
7219
|
-
), t.parentNode.removeChild(t)) : (t.parentNode.removeChild(t), triggerErrorEvent(getDocument().body, "htmx:oobErrorNoTarget", { content: t })), e;
|
|
7219
|
+
), t.parentNode.removeChild(t)) : (t.parentNode.removeChild(t), triggerErrorEvent(getDocument().body, "htmx:oobErrorNoTarget", { content: t, target: r })), e;
|
|
7220
7220
|
}
|
|
7221
7221
|
function restorePreservedElements() {
|
|
7222
7222
|
const e = find("#--htmx-preserve-pantry--");
|
|
@@ -7243,11 +7243,11 @@ var htmx = (function() {
|
|
|
7243
7243
|
forEach(t.querySelectorAll("[id]"), function(i) {
|
|
7244
7244
|
const r = getRawAttribute(i, "id");
|
|
7245
7245
|
if (r && r.length > 0) {
|
|
7246
|
-
const a =
|
|
7247
|
-
if (
|
|
7248
|
-
const
|
|
7249
|
-
cloneAttributes(i,
|
|
7250
|
-
cloneAttributes(i,
|
|
7246
|
+
const a = asParentNode(e), s = a && a.querySelector(CSS.escape(i.tagName) + "#" + CSS.escape(r));
|
|
7247
|
+
if (s && s !== a) {
|
|
7248
|
+
const o = i.cloneNode();
|
|
7249
|
+
cloneAttributes(i, s), n.tasks.push(function() {
|
|
7250
|
+
cloneAttributes(i, o);
|
|
7251
7251
|
});
|
|
7252
7252
|
}
|
|
7253
7253
|
}
|
|
@@ -7410,68 +7410,68 @@ var htmx = (function() {
|
|
|
7410
7410
|
// @ts-ignore
|
|
7411
7411
|
end: u ? u.selectionEnd : null
|
|
7412
7412
|
};
|
|
7413
|
-
const
|
|
7413
|
+
const h = makeSettleInfo(e);
|
|
7414
7414
|
if (n.swapStyle === "textContent")
|
|
7415
7415
|
e.textContent = t;
|
|
7416
7416
|
else {
|
|
7417
7417
|
let v = makeFragment(t);
|
|
7418
|
-
if (
|
|
7419
|
-
const
|
|
7420
|
-
for (let
|
|
7421
|
-
const
|
|
7422
|
-
let m =
|
|
7418
|
+
if (h.title = i.title || v.title, i.historyRequest && (v = v.querySelector("[hx-history-elt],[data-hx-history-elt]") || v), i.selectOOB) {
|
|
7419
|
+
const g = i.selectOOB.split(",");
|
|
7420
|
+
for (let b = 0; b < g.length; b++) {
|
|
7421
|
+
const x = g[b].split(":", 2);
|
|
7422
|
+
let m = x[0].trim();
|
|
7423
7423
|
m.indexOf("#") === 0 && (m = m.substring(1));
|
|
7424
|
-
const
|
|
7425
|
-
f && oobSwap(
|
|
7424
|
+
const E = x[1] || "true", f = v.querySelector("#" + m);
|
|
7425
|
+
f && oobSwap(E, f, h, c);
|
|
7426
7426
|
}
|
|
7427
7427
|
}
|
|
7428
|
-
if (findAndSwapOobElements(v,
|
|
7428
|
+
if (findAndSwapOobElements(v, h, c), forEach(
|
|
7429
7429
|
findAll(v, "template"),
|
|
7430
7430
|
/** @param {HTMLTemplateElement} template */
|
|
7431
|
-
function(
|
|
7432
|
-
|
|
7431
|
+
function(g) {
|
|
7432
|
+
g.content && findAndSwapOobElements(g.content, h, c) && g.remove();
|
|
7433
7433
|
}
|
|
7434
7434
|
), i.select) {
|
|
7435
|
-
const
|
|
7436
|
-
forEach(v.querySelectorAll(i.select), function(
|
|
7437
|
-
|
|
7438
|
-
}), v =
|
|
7435
|
+
const g = getDocument().createDocumentFragment();
|
|
7436
|
+
forEach(v.querySelectorAll(i.select), function(b) {
|
|
7437
|
+
g.appendChild(b);
|
|
7438
|
+
}), v = g;
|
|
7439
7439
|
}
|
|
7440
|
-
handlePreservedElements(v), swapWithStyle(n.swapStyle, i.contextElement, e, v,
|
|
7440
|
+
handlePreservedElements(v), swapWithStyle(n.swapStyle, i.contextElement, e, v, h), restorePreservedElements();
|
|
7441
7441
|
}
|
|
7442
7442
|
if (d.elt && !bodyContains(d.elt) && getRawAttribute(d.elt, "id")) {
|
|
7443
|
-
const v = document.getElementById(getRawAttribute(d.elt, "id")),
|
|
7443
|
+
const v = document.getElementById(getRawAttribute(d.elt, "id")), g = { preventScroll: n.focusScroll !== void 0 ? !n.focusScroll : !htmx.config.defaultFocusScroll };
|
|
7444
7444
|
if (v) {
|
|
7445
7445
|
if (d.start && v.setSelectionRange)
|
|
7446
7446
|
try {
|
|
7447
7447
|
v.setSelectionRange(d.start, d.end);
|
|
7448
7448
|
} catch {
|
|
7449
7449
|
}
|
|
7450
|
-
v.focus(
|
|
7450
|
+
v.focus(g);
|
|
7451
7451
|
}
|
|
7452
7452
|
}
|
|
7453
|
-
e
|
|
7454
|
-
v.classList && v
|
|
7455
|
-
}), maybeCall(i.afterSwapCallback), n.ignoreTitle || handleTitle(
|
|
7456
|
-
const
|
|
7457
|
-
if (forEach(
|
|
7453
|
+
removeClassFromElement(e, htmx.config.swappingClass), forEach(h.elts, function(v) {
|
|
7454
|
+
v.classList && addClassToElement(v, htmx.config.settlingClass), triggerEvent(v, "htmx:afterSwap", i.eventInfo);
|
|
7455
|
+
}), maybeCall(i.afterSwapCallback), n.ignoreTitle || handleTitle(h.title);
|
|
7456
|
+
const y = function() {
|
|
7457
|
+
if (forEach(h.tasks, function(v) {
|
|
7458
7458
|
v.call();
|
|
7459
|
-
}), forEach(
|
|
7460
|
-
v.classList && v
|
|
7459
|
+
}), forEach(h.elts, function(v) {
|
|
7460
|
+
v.classList && removeClassFromElement(v, htmx.config.settlingClass), triggerEvent(v, "htmx:afterSettle", i.eventInfo);
|
|
7461
7461
|
}), i.anchor) {
|
|
7462
7462
|
const v = asElement(resolveTarget("#" + i.anchor));
|
|
7463
7463
|
v && v.scrollIntoView({ block: "start", behavior: "auto" });
|
|
7464
7464
|
}
|
|
7465
|
-
updateScrollState(
|
|
7465
|
+
updateScrollState(h.elts, n), maybeCall(i.afterSettleCallback), maybeCall(r);
|
|
7466
7466
|
};
|
|
7467
|
-
n.settleDelay > 0 ? getWindow().setTimeout(
|
|
7467
|
+
n.settleDelay > 0 ? getWindow().setTimeout(y, n.settleDelay) : y();
|
|
7468
7468
|
}, o = htmx.config.globalViewTransitions;
|
|
7469
7469
|
n.hasOwnProperty("transition") && (o = n.transition);
|
|
7470
7470
|
const l = i.contextElement || getDocument();
|
|
7471
7471
|
if (o && triggerEvent(l, "htmx:beforeTransition", i.eventInfo) && typeof Promise < "u" && // @ts-ignore experimental feature atm
|
|
7472
7472
|
document.startViewTransition) {
|
|
7473
|
-
const c = new Promise(function(d,
|
|
7474
|
-
r = d, a =
|
|
7473
|
+
const c = new Promise(function(d, h) {
|
|
7474
|
+
r = d, a = h;
|
|
7475
7475
|
}), u = s;
|
|
7476
7476
|
s = function() {
|
|
7477
7477
|
document.startViewTransition(function() {
|
|
@@ -7597,8 +7597,8 @@ var htmx = (function() {
|
|
|
7597
7597
|
var s = consumeUntil(r, WHITESPACE_OR_COMMA);
|
|
7598
7598
|
if (s === "closest" || s === "find" || s === "next" || s === "previous") {
|
|
7599
7599
|
r.shift();
|
|
7600
|
-
const
|
|
7601
|
-
|
|
7600
|
+
const y = consumeCSSSelector(r);
|
|
7601
|
+
y.length > 0 && (s += " " + y);
|
|
7602
7602
|
}
|
|
7603
7603
|
}
|
|
7604
7604
|
c.from = s;
|
|
@@ -7716,10 +7716,10 @@ var htmx = (function() {
|
|
|
7716
7716
|
a.triggeredOnce = !0;
|
|
7717
7717
|
}
|
|
7718
7718
|
if (i.changed) {
|
|
7719
|
-
const d = c.target,
|
|
7720
|
-
if (
|
|
7719
|
+
const d = c.target, h = d.value, y = a.lastValue.get(i);
|
|
7720
|
+
if (y.has(d) && y.get(d) === h)
|
|
7721
7721
|
return;
|
|
7722
|
-
|
|
7722
|
+
y.set(d, h);
|
|
7723
7723
|
}
|
|
7724
7724
|
if (a.delayed && clearTimeout(a.delayed), a.throttle)
|
|
7725
7725
|
return;
|
|
@@ -7939,7 +7939,7 @@ var htmx = (function() {
|
|
|
7939
7939
|
function triggerEvent(e, t, n) {
|
|
7940
7940
|
e = resolveTarget(e), n == null && (n = {}), n.elt = e;
|
|
7941
7941
|
const i = makeEvent(t, n);
|
|
7942
|
-
htmx.logger && !ignoreEventForLogging(t) && htmx.logger(e, t, n), n.error && (logError(n.error), triggerEvent(e, "htmx:error", { errorInfo: n }));
|
|
7942
|
+
htmx.logger && !ignoreEventForLogging(t) && htmx.logger(e, t, n), n.error && (logError(n.error + (n.target ? ", " + n.target : "")), triggerEvent(e, "htmx:error", { errorInfo: n }));
|
|
7943
7943
|
let r = e.dispatchEvent(i);
|
|
7944
7944
|
const a = kebabEventName(t);
|
|
7945
7945
|
if (r && a !== t) {
|
|
@@ -8049,7 +8049,7 @@ var htmx = (function() {
|
|
|
8049
8049
|
);
|
|
8050
8050
|
return t == null && (t = [e]), forEach(t, function(n) {
|
|
8051
8051
|
const i = getInternalData(n);
|
|
8052
|
-
i.requestCount = (i.requestCount || 0) + 1,
|
|
8052
|
+
i.requestCount = (i.requestCount || 0) + 1, addClassToElement(n, htmx.config.requestClass);
|
|
8053
8053
|
}), t;
|
|
8054
8054
|
}
|
|
8055
8055
|
function disableElements(e) {
|
|
@@ -8059,7 +8059,7 @@ var htmx = (function() {
|
|
|
8059
8059
|
);
|
|
8060
8060
|
return t == null && (t = []), forEach(t, function(n) {
|
|
8061
8061
|
const i = getInternalData(n);
|
|
8062
|
-
i.requestCount = (i.requestCount || 0) + 1, n.setAttribute("disabled", ""), n.setAttribute("data-disabled-by-htmx", "");
|
|
8062
|
+
i.requestCount = (i.requestCount || 0) + 1, n.hasAttribute("disabled") || (n.setAttribute("disabled", ""), n.setAttribute("data-disabled-by-htmx", ""));
|
|
8063
8063
|
}), t;
|
|
8064
8064
|
}
|
|
8065
8065
|
function removeRequestIndicators(e, t) {
|
|
@@ -8067,9 +8067,9 @@ var htmx = (function() {
|
|
|
8067
8067
|
const i = getInternalData(n);
|
|
8068
8068
|
i.requestCount = (i.requestCount || 1) - 1;
|
|
8069
8069
|
}), forEach(e, function(n) {
|
|
8070
|
-
getInternalData(n).requestCount === 0 &&
|
|
8070
|
+
getInternalData(n).requestCount === 0 && removeClassFromElement(n, htmx.config.requestClass);
|
|
8071
8071
|
}), forEach(t, function(n) {
|
|
8072
|
-
getInternalData(n).requestCount === 0 && (n.removeAttribute("disabled"), n.removeAttribute("data-disabled-by-htmx"));
|
|
8072
|
+
getInternalData(n).requestCount === 0 && n.hasAttribute("data-disabled-by-htmx") && (n.removeAttribute("disabled"), n.removeAttribute("data-disabled-by-htmx"));
|
|
8073
8073
|
});
|
|
8074
8074
|
}
|
|
8075
8075
|
function haveSeenNode(e, t) {
|
|
@@ -8427,8 +8427,8 @@ var htmx = (function() {
|
|
|
8427
8427
|
function issueAjaxRequest(e, t, n, i, r, a) {
|
|
8428
8428
|
let s = null, o = null;
|
|
8429
8429
|
if (r = r ?? {}, r.returnPromise && typeof Promise < "u")
|
|
8430
|
-
var l = new Promise(function(
|
|
8431
|
-
s =
|
|
8430
|
+
var l = new Promise(function(T, R) {
|
|
8431
|
+
s = T, o = R;
|
|
8432
8432
|
});
|
|
8433
8433
|
n == null && (n = getDocument().body);
|
|
8434
8434
|
const c = r.handler || handleAjaxResponse, u = r.select || null;
|
|
@@ -8437,12 +8437,12 @@ var htmx = (function() {
|
|
|
8437
8437
|
const d = r.targetOverride || asElement(getTarget(n));
|
|
8438
8438
|
if (d == null || d == DUMMY_ELT)
|
|
8439
8439
|
return triggerErrorEvent(n, "htmx:targetError", { target: getClosestAttributeValue(n, "hx-target") }), maybeCall(o), l;
|
|
8440
|
-
let
|
|
8441
|
-
const
|
|
8442
|
-
if (
|
|
8443
|
-
const
|
|
8444
|
-
|
|
8445
|
-
const R = getRawAttribute(
|
|
8440
|
+
let h = getInternalData(n);
|
|
8441
|
+
const y = h.lastButtonClicked;
|
|
8442
|
+
if (y) {
|
|
8443
|
+
const T = getRawAttribute(y, "formaction");
|
|
8444
|
+
T != null && (t = T);
|
|
8445
|
+
const R = getRawAttribute(y, "formmethod");
|
|
8446
8446
|
if (R != null)
|
|
8447
8447
|
if (VERBS.includes(R.toLowerCase()))
|
|
8448
8448
|
e = /** @type HttpVerb */
|
|
@@ -8455,67 +8455,67 @@ var htmx = (function() {
|
|
|
8455
8455
|
return issueAjaxRequest(e, t, n, i, r, !!F);
|
|
8456
8456
|
}, question: v }) === !1)
|
|
8457
8457
|
return maybeCall(s), l;
|
|
8458
|
-
let
|
|
8459
|
-
if (
|
|
8460
|
-
const
|
|
8461
|
-
if (R === "this" ?
|
|
8458
|
+
let g = n, b = getClosestAttributeValue(n, "hx-sync"), x = null, m = !1;
|
|
8459
|
+
if (b) {
|
|
8460
|
+
const T = b.split(":"), R = T[0].trim();
|
|
8461
|
+
if (R === "this" ? g = findThisElement(n, "hx-sync") : g = asElement(querySelectorExt(n, R)), b = (T[1] || "drop").trim(), h = getInternalData(g), b === "drop" && h.xhr && h.abortable !== !0)
|
|
8462
8462
|
return maybeCall(s), l;
|
|
8463
|
-
if (
|
|
8464
|
-
if (
|
|
8463
|
+
if (b === "abort") {
|
|
8464
|
+
if (h.xhr)
|
|
8465
8465
|
return maybeCall(s), l;
|
|
8466
8466
|
m = !0;
|
|
8467
|
-
} else
|
|
8467
|
+
} else b === "replace" ? triggerEvent(g, "htmx:abort") : b.indexOf("queue") === 0 && (x = (b.split(" ")[1] || "last").trim());
|
|
8468
8468
|
}
|
|
8469
|
-
if (
|
|
8470
|
-
if (
|
|
8471
|
-
triggerEvent(
|
|
8469
|
+
if (h.xhr)
|
|
8470
|
+
if (h.abortable)
|
|
8471
|
+
triggerEvent(g, "htmx:abort");
|
|
8472
8472
|
else {
|
|
8473
|
-
if (
|
|
8473
|
+
if (x == null) {
|
|
8474
8474
|
if (i) {
|
|
8475
|
-
const
|
|
8476
|
-
|
|
8475
|
+
const T = getInternalData(i);
|
|
8476
|
+
T && T.triggerSpec && T.triggerSpec.queue && (x = T.triggerSpec.queue);
|
|
8477
8477
|
}
|
|
8478
|
-
|
|
8478
|
+
x == null && (x = "last");
|
|
8479
8479
|
}
|
|
8480
|
-
return
|
|
8480
|
+
return h.queuedRequests == null && (h.queuedRequests = []), x === "first" && h.queuedRequests.length === 0 ? h.queuedRequests.push(function() {
|
|
8481
8481
|
issueAjaxRequest(e, t, n, i, r);
|
|
8482
|
-
}) :
|
|
8482
|
+
}) : x === "all" ? h.queuedRequests.push(function() {
|
|
8483
8483
|
issueAjaxRequest(e, t, n, i, r);
|
|
8484
|
-
}) :
|
|
8484
|
+
}) : x === "last" && (h.queuedRequests = [], h.queuedRequests.push(function() {
|
|
8485
8485
|
issueAjaxRequest(e, t, n, i, r);
|
|
8486
8486
|
})), maybeCall(s), l;
|
|
8487
8487
|
}
|
|
8488
|
-
const
|
|
8489
|
-
|
|
8488
|
+
const E = new XMLHttpRequest();
|
|
8489
|
+
h.xhr = E, h.abortable = m;
|
|
8490
8490
|
const f = function() {
|
|
8491
|
-
|
|
8492
|
-
},
|
|
8493
|
-
if (
|
|
8494
|
-
var
|
|
8495
|
-
if (
|
|
8491
|
+
h.xhr = null, h.abortable = !1, h.queuedRequests != null && h.queuedRequests.length > 0 && h.queuedRequests.shift()();
|
|
8492
|
+
}, p = getClosestAttributeValue(n, "hx-prompt");
|
|
8493
|
+
if (p) {
|
|
8494
|
+
var _ = prompt(p);
|
|
8495
|
+
if (_ === null || !triggerEvent(n, "htmx:prompt", { prompt: _, target: d }))
|
|
8496
8496
|
return maybeCall(s), f(), l;
|
|
8497
8497
|
}
|
|
8498
8498
|
if (v && !a && !confirm(v))
|
|
8499
8499
|
return maybeCall(s), f(), l;
|
|
8500
|
-
let
|
|
8501
|
-
e !== "get" && !usesFormData(n) && (
|
|
8502
|
-
const
|
|
8503
|
-
let A =
|
|
8504
|
-
const
|
|
8505
|
-
r.values && overrideFormData(
|
|
8506
|
-
const S = formDataFromObject(getExpressionVars(n, i)), O = overrideFormData(
|
|
8507
|
-
let
|
|
8508
|
-
htmx.config.getCacheBusterParam && e === "get" &&
|
|
8500
|
+
let w = getHeaders(n, d, _);
|
|
8501
|
+
e !== "get" && !usesFormData(n) && (w["Content-Type"] = "application/x-www-form-urlencoded"), r.headers && (w = mergeObjects(w, r.headers));
|
|
8502
|
+
const C = getInputValues(n, e);
|
|
8503
|
+
let A = C.errors;
|
|
8504
|
+
const D = C.formData;
|
|
8505
|
+
r.values && overrideFormData(D, formDataFromObject(r.values));
|
|
8506
|
+
const S = formDataFromObject(getExpressionVars(n, i)), O = overrideFormData(D, S);
|
|
8507
|
+
let k = filterValues(O, n);
|
|
8508
|
+
htmx.config.getCacheBusterParam && e === "get" && k.set("org.htmx.cache-buster", getRawAttribute(d, "id") || "true"), (t == null || t === "") && (t = location.href);
|
|
8509
8509
|
const L = getValuesForElement(n, "hx-request"), M = getInternalData(n).boosted;
|
|
8510
8510
|
let H = htmx.config.methodsThatUseUrlParams.indexOf(e) >= 0;
|
|
8511
8511
|
const I = {
|
|
8512
8512
|
boosted: M,
|
|
8513
8513
|
useUrlParams: H,
|
|
8514
|
-
formData:
|
|
8515
|
-
parameters: formDataProxy(
|
|
8514
|
+
formData: k,
|
|
8515
|
+
parameters: formDataProxy(k),
|
|
8516
8516
|
unfilteredFormData: O,
|
|
8517
8517
|
unfilteredParameters: formDataProxy(O),
|
|
8518
|
-
headers:
|
|
8518
|
+
headers: w,
|
|
8519
8519
|
elt: n,
|
|
8520
8520
|
target: d,
|
|
8521
8521
|
verb: e,
|
|
@@ -8527,21 +8527,21 @@ var htmx = (function() {
|
|
|
8527
8527
|
};
|
|
8528
8528
|
if (!triggerEvent(n, "htmx:configRequest", I))
|
|
8529
8529
|
return maybeCall(s), f(), l;
|
|
8530
|
-
if (t = I.path, e = I.verb,
|
|
8530
|
+
if (t = I.path, e = I.verb, w = I.headers, k = formDataFromObject(I.parameters), A = I.errors, H = I.useUrlParams, A && A.length > 0)
|
|
8531
8531
|
return triggerEvent(n, "htmx:validation:halted", I), maybeCall(s), f(), l;
|
|
8532
8532
|
const W = t.split("#"), $ = W[0], q = W[1];
|
|
8533
8533
|
let N = t;
|
|
8534
|
-
if (H && (N = $, !
|
|
8534
|
+
if (H && (N = $, !k.keys().next().done && (N.indexOf("?") < 0 ? N += "?" : N += "&", N += urlEncode(k), q && (N += "#" + q))), !verifyPath(n, N, I))
|
|
8535
8535
|
return triggerErrorEvent(n, "htmx:invalidPath", I), maybeCall(o), f(), l;
|
|
8536
|
-
if (
|
|
8537
|
-
for (const
|
|
8538
|
-
if (
|
|
8539
|
-
const R =
|
|
8540
|
-
safelySetHeaderValue(
|
|
8536
|
+
if (E.open(e.toUpperCase(), N, !0), E.overrideMimeType("text/html"), E.withCredentials = I.withCredentials, E.timeout = I.timeout, !L.noHeaders) {
|
|
8537
|
+
for (const T in w)
|
|
8538
|
+
if (w.hasOwnProperty(T)) {
|
|
8539
|
+
const R = w[T];
|
|
8540
|
+
safelySetHeaderValue(E, T, R);
|
|
8541
8541
|
}
|
|
8542
8542
|
}
|
|
8543
8543
|
const P = {
|
|
8544
|
-
xhr:
|
|
8544
|
+
xhr: E,
|
|
8545
8545
|
target: d,
|
|
8546
8546
|
requestConfig: I,
|
|
8547
8547
|
etc: r,
|
|
@@ -8554,36 +8554,36 @@ var htmx = (function() {
|
|
|
8554
8554
|
anchor: q
|
|
8555
8555
|
}
|
|
8556
8556
|
};
|
|
8557
|
-
if (
|
|
8557
|
+
if (E.onload = function() {
|
|
8558
8558
|
try {
|
|
8559
|
-
const
|
|
8560
|
-
if (P.pathInfo.responsePath = getPathFromResponse(
|
|
8559
|
+
const T = hierarchyForElt(n);
|
|
8560
|
+
if (P.pathInfo.responsePath = getPathFromResponse(E), c(n, P), P.keepIndicators !== !0 && removeRequestIndicators(j, V), triggerEvent(n, "htmx:afterRequest", P), triggerEvent(n, "htmx:afterOnLoad", P), !bodyContains(n)) {
|
|
8561
8561
|
let R = null;
|
|
8562
|
-
for (;
|
|
8563
|
-
const F =
|
|
8562
|
+
for (; T.length > 0 && R == null; ) {
|
|
8563
|
+
const F = T.shift();
|
|
8564
8564
|
bodyContains(F) && (R = F);
|
|
8565
8565
|
}
|
|
8566
8566
|
R && (triggerEvent(R, "htmx:afterRequest", P), triggerEvent(R, "htmx:afterOnLoad", P));
|
|
8567
8567
|
}
|
|
8568
8568
|
maybeCall(s);
|
|
8569
|
-
} catch (
|
|
8570
|
-
throw triggerErrorEvent(n, "htmx:onLoadError", mergeObjects({ error:
|
|
8569
|
+
} catch (T) {
|
|
8570
|
+
throw triggerErrorEvent(n, "htmx:onLoadError", mergeObjects({ error: T }, P)), T;
|
|
8571
8571
|
} finally {
|
|
8572
8572
|
f();
|
|
8573
8573
|
}
|
|
8574
|
-
},
|
|
8574
|
+
}, E.onerror = function() {
|
|
8575
8575
|
removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:sendError", P), maybeCall(o), f();
|
|
8576
|
-
},
|
|
8576
|
+
}, E.onabort = function() {
|
|
8577
8577
|
removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:sendAbort", P), maybeCall(o), f();
|
|
8578
|
-
},
|
|
8578
|
+
}, E.ontimeout = function() {
|
|
8579
8579
|
removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:timeout", P), maybeCall(o), f();
|
|
8580
8580
|
}, !triggerEvent(n, "htmx:beforeRequest", P))
|
|
8581
8581
|
return maybeCall(s), f(), l;
|
|
8582
8582
|
var j = addRequestIndicatorClasses(n), V = disableElements(n);
|
|
8583
|
-
forEach(["loadstart", "loadend", "progress", "abort"], function(
|
|
8584
|
-
forEach([
|
|
8585
|
-
R.addEventListener(
|
|
8586
|
-
triggerEvent(n, "htmx:xhr:" +
|
|
8583
|
+
forEach(["loadstart", "loadend", "progress", "abort"], function(T) {
|
|
8584
|
+
forEach([E, E.upload], function(R) {
|
|
8585
|
+
R.addEventListener(T, function(F) {
|
|
8586
|
+
triggerEvent(n, "htmx:xhr:" + T, {
|
|
8587
8587
|
lengthComputable: F.lengthComputable,
|
|
8588
8588
|
loaded: F.loaded,
|
|
8589
8589
|
total: F.total
|
|
@@ -8591,8 +8591,8 @@ var htmx = (function() {
|
|
|
8591
8591
|
});
|
|
8592
8592
|
});
|
|
8593
8593
|
}), triggerEvent(n, "htmx:beforeSend", P);
|
|
8594
|
-
const B = H ? null : encodeParamsForBody(
|
|
8595
|
-
return
|
|
8594
|
+
const B = H ? null : encodeParamsForBody(E, n, k);
|
|
8595
|
+
return E.send(B), l;
|
|
8596
8596
|
}
|
|
8597
8597
|
function determineHistoryUpdates(e, t) {
|
|
8598
8598
|
const n = t.xhr;
|
|
@@ -8602,9 +8602,12 @@ var htmx = (function() {
|
|
|
8602
8602
|
type: r,
|
|
8603
8603
|
path: i
|
|
8604
8604
|
};
|
|
8605
|
-
const a = t.pathInfo.finalRequestPath, s = t.pathInfo.responsePath
|
|
8605
|
+
const a = t.pathInfo.finalRequestPath, s = t.pathInfo.responsePath;
|
|
8606
|
+
let o = t.etc.push || getClosestAttributeValue(e, "hx-push-url"), l = t.etc.replace || getClosestAttributeValue(e, "hx-replace-url");
|
|
8607
|
+
o === "false" && (o = null), l === "false" && (l = null);
|
|
8608
|
+
const c = getInternalData(e).boosted;
|
|
8606
8609
|
let u = null, d = null;
|
|
8607
|
-
return o ? (u = "push", d = o) : l ? (u = "replace", d = l) : c && (u = "push", d = s || a), d ?
|
|
8610
|
+
return o ? (u = "push", d = o) : l ? (u = "replace", d = l) : c && (u = "push", d = s || a), d ? (d === "true" && (d = s || a), t.pathInfo.anchor && d.indexOf("#") === -1 && (d = d + "#" + t.pathInfo.anchor), {
|
|
8608
8611
|
type: u,
|
|
8609
8612
|
path: d
|
|
8610
8613
|
}) : {};
|
|
@@ -8645,7 +8648,7 @@ var htmx = (function() {
|
|
|
8645
8648
|
if (hasHeader(n, /HX-Trigger:/i) && handleTriggerHeader(n, "HX-Trigger", e), hasHeader(n, /HX-Location:/i)) {
|
|
8646
8649
|
let m = n.getResponseHeader("HX-Location");
|
|
8647
8650
|
var s = {};
|
|
8648
|
-
m.indexOf("{") === 0 && (s = parseJSON(m), m = s.path, delete s.path), s.push = s.push
|
|
8651
|
+
m.indexOf("{") === 0 && (s = parseJSON(m), m = s.path, delete s.path), s.push = s.push ?? "true", ajaxHelper("get", m, s);
|
|
8649
8652
|
return;
|
|
8650
8653
|
}
|
|
8651
8654
|
const o = hasHeader(n, /HX-Refresh:/i) && n.getResponseHeader("HX-Refresh") === "true";
|
|
@@ -8658,28 +8661,28 @@ var htmx = (function() {
|
|
|
8658
8661
|
return;
|
|
8659
8662
|
}
|
|
8660
8663
|
const l = determineHistoryUpdates(e, t), c = resolveResponseHandling(n), u = c.swap;
|
|
8661
|
-
let d = !!c.error,
|
|
8664
|
+
let d = !!c.error, h = htmx.config.ignoreTitle || c.ignoreTitle, y = c.select;
|
|
8662
8665
|
c.target && (t.target = resolveRetarget(e, c.target));
|
|
8663
8666
|
var v = r.swapOverride;
|
|
8664
8667
|
v == null && c.swapOverride && (v = c.swapOverride), hasHeader(n, /HX-Retarget:/i) && (t.target = resolveRetarget(e, n.getResponseHeader("HX-Retarget"))), hasHeader(n, /HX-Reswap:/i) && (v = n.getResponseHeader("HX-Reswap"));
|
|
8665
|
-
var
|
|
8668
|
+
var g = n.response, b = mergeObjects({
|
|
8666
8669
|
shouldSwap: u,
|
|
8667
|
-
serverResponse:
|
|
8670
|
+
serverResponse: g,
|
|
8668
8671
|
isError: d,
|
|
8669
|
-
ignoreTitle:
|
|
8670
|
-
selectOverride:
|
|
8672
|
+
ignoreTitle: h,
|
|
8673
|
+
selectOverride: y,
|
|
8671
8674
|
swapOverride: v
|
|
8672
8675
|
}, t);
|
|
8673
|
-
if (!(c.event && !triggerEvent(i, c.event,
|
|
8674
|
-
if (i =
|
|
8676
|
+
if (!(c.event && !triggerEvent(i, c.event, b)) && triggerEvent(i, "htmx:beforeSwap", b)) {
|
|
8677
|
+
if (i = b.target, g = b.serverResponse, d = b.isError, h = b.ignoreTitle, y = b.selectOverride, v = b.swapOverride, t.target = i, t.failed = d, t.successful = !d, b.shouldSwap) {
|
|
8675
8678
|
n.status === 286 && cancelPolling(e), withExtensions(e, function(f) {
|
|
8676
|
-
|
|
8679
|
+
g = f.transformResponse(g, n, e);
|
|
8677
8680
|
}), l.type && saveCurrentPageToHistory();
|
|
8678
|
-
var
|
|
8679
|
-
|
|
8680
|
-
const m = r.selectOOB || getClosestAttributeValue(e, "hx-select-oob"),
|
|
8681
|
-
swap(i,
|
|
8682
|
-
select:
|
|
8681
|
+
var x = getSwapSpecification(e, v);
|
|
8682
|
+
x.hasOwnProperty("ignoreTitle") || (x.ignoreTitle = h), addClassToElement(i, htmx.config.swappingClass), a && (y = a), hasHeader(n, /HX-Reselect:/i) && (y = n.getResponseHeader("HX-Reselect"));
|
|
8683
|
+
const m = r.selectOOB || getClosestAttributeValue(e, "hx-select-oob"), E = getClosestAttributeValue(e, "hx-select");
|
|
8684
|
+
swap(i, g, x, {
|
|
8685
|
+
select: y === "unset" ? null : y || E,
|
|
8683
8686
|
selectOOB: m,
|
|
8684
8687
|
eventInfo: t,
|
|
8685
8688
|
anchor: t.pathInfo.anchor,
|
|
@@ -8817,61 +8820,61 @@ var htmx = (function() {
|
|
|
8817
8820
|
},
|
|
8818
8821
|
head: {
|
|
8819
8822
|
style: "merge",
|
|
8820
|
-
shouldPreserve: (
|
|
8821
|
-
shouldReAppend: (
|
|
8823
|
+
shouldPreserve: (h) => h.getAttribute("im-preserve") === "true",
|
|
8824
|
+
shouldReAppend: (h) => h.getAttribute("im-re-append") === "true",
|
|
8822
8825
|
shouldRemove: e,
|
|
8823
8826
|
afterHeadMorphed: e
|
|
8824
8827
|
},
|
|
8825
8828
|
restoreFocus: !0
|
|
8826
8829
|
};
|
|
8827
|
-
function n(
|
|
8828
|
-
|
|
8829
|
-
const
|
|
8830
|
+
function n(h, y, v = {}) {
|
|
8831
|
+
h = u(h);
|
|
8832
|
+
const g = d(y), b = c(h, g, v), x = r(b, () => o(
|
|
8833
|
+
b,
|
|
8830
8834
|
h,
|
|
8831
|
-
|
|
8832
|
-
y,
|
|
8835
|
+
g,
|
|
8833
8836
|
/** @param {MorphContext} ctx */
|
|
8834
|
-
(m) => m.morphStyle === "innerHTML" ? (a(m,
|
|
8837
|
+
(m) => m.morphStyle === "innerHTML" ? (a(m, h, g), Array.from(h.childNodes)) : i(m, h, g)
|
|
8835
8838
|
));
|
|
8836
|
-
return
|
|
8839
|
+
return b.pantry.remove(), x;
|
|
8837
8840
|
}
|
|
8838
|
-
function i(
|
|
8839
|
-
const
|
|
8841
|
+
function i(h, y, v) {
|
|
8842
|
+
const g = d(y);
|
|
8840
8843
|
return a(
|
|
8841
|
-
|
|
8842
|
-
|
|
8844
|
+
h,
|
|
8845
|
+
g,
|
|
8843
8846
|
v,
|
|
8844
8847
|
// these two optional params are the secret sauce
|
|
8845
|
-
|
|
8848
|
+
y,
|
|
8846
8849
|
// start point for iteration
|
|
8847
|
-
|
|
8850
|
+
y.nextSibling
|
|
8848
8851
|
// end point for iteration
|
|
8849
|
-
), Array.from(
|
|
8852
|
+
), Array.from(g.childNodes);
|
|
8850
8853
|
}
|
|
8851
|
-
function r(
|
|
8852
|
-
if (!
|
|
8854
|
+
function r(h, y) {
|
|
8855
|
+
if (!h.config.restoreFocus) return y();
|
|
8853
8856
|
let v = (
|
|
8854
8857
|
/** @type {HTMLInputElement|HTMLTextAreaElement|null} */
|
|
8855
8858
|
document.activeElement
|
|
8856
8859
|
);
|
|
8857
8860
|
if (!(v instanceof HTMLInputElement || v instanceof HTMLTextAreaElement))
|
|
8858
|
-
return
|
|
8859
|
-
const { id:
|
|
8860
|
-
return
|
|
8861
|
+
return y();
|
|
8862
|
+
const { id: g, selectionStart: b, selectionEnd: x } = v, m = y();
|
|
8863
|
+
return g && g !== document.activeElement?.getAttribute("id") && (v = h.target.querySelector(`[id="${g}"]`), v?.focus()), v && !v.selectionEnd && x && v.setSelectionRange(b, x), m;
|
|
8861
8864
|
}
|
|
8862
8865
|
const a = /* @__PURE__ */ (function() {
|
|
8863
|
-
function
|
|
8864
|
-
|
|
8865
|
-
for (const A of
|
|
8866
|
-
if (
|
|
8866
|
+
function h(f, p, _, w = null, C = null) {
|
|
8867
|
+
p instanceof HTMLTemplateElement && _ instanceof HTMLTemplateElement && (p = p.content, _ = _.content), w ||= p.firstChild;
|
|
8868
|
+
for (const A of _.childNodes) {
|
|
8869
|
+
if (w && w != C) {
|
|
8867
8870
|
const S = v(
|
|
8868
8871
|
f,
|
|
8869
8872
|
A,
|
|
8870
|
-
|
|
8871
|
-
|
|
8873
|
+
w,
|
|
8874
|
+
C
|
|
8872
8875
|
);
|
|
8873
8876
|
if (S) {
|
|
8874
|
-
S !==
|
|
8877
|
+
S !== w && b(f, w, S), s(S, A, f), w = S.nextSibling;
|
|
8875
8878
|
continue;
|
|
8876
8879
|
}
|
|
8877
8880
|
}
|
|
@@ -8881,363 +8884,363 @@ var htmx = (function() {
|
|
|
8881
8884
|
A.getAttribute("id")
|
|
8882
8885
|
);
|
|
8883
8886
|
if (f.persistentIds.has(S)) {
|
|
8884
|
-
const O =
|
|
8885
|
-
|
|
8887
|
+
const O = x(
|
|
8888
|
+
p,
|
|
8886
8889
|
S,
|
|
8887
|
-
|
|
8890
|
+
w,
|
|
8888
8891
|
f
|
|
8889
8892
|
);
|
|
8890
|
-
s(O, A, f),
|
|
8893
|
+
s(O, A, f), w = O.nextSibling;
|
|
8891
8894
|
continue;
|
|
8892
8895
|
}
|
|
8893
8896
|
}
|
|
8894
|
-
const
|
|
8895
|
-
|
|
8897
|
+
const D = y(
|
|
8898
|
+
p,
|
|
8896
8899
|
A,
|
|
8897
|
-
|
|
8900
|
+
w,
|
|
8898
8901
|
f
|
|
8899
8902
|
);
|
|
8900
|
-
|
|
8903
|
+
D && (w = D.nextSibling);
|
|
8901
8904
|
}
|
|
8902
|
-
for (;
|
|
8903
|
-
const A =
|
|
8904
|
-
|
|
8905
|
+
for (; w && w != C; ) {
|
|
8906
|
+
const A = w;
|
|
8907
|
+
w = w.nextSibling, g(f, A);
|
|
8905
8908
|
}
|
|
8906
8909
|
}
|
|
8907
|
-
function
|
|
8908
|
-
if (
|
|
8909
|
-
if (
|
|
8910
|
-
const
|
|
8910
|
+
function y(f, p, _, w) {
|
|
8911
|
+
if (w.callbacks.beforeNodeAdded(p) === !1) return null;
|
|
8912
|
+
if (w.idMap.has(p)) {
|
|
8913
|
+
const C = document.createElement(
|
|
8911
8914
|
/** @type {Element} */
|
|
8912
|
-
|
|
8915
|
+
p.tagName
|
|
8913
8916
|
);
|
|
8914
|
-
return f.insertBefore(
|
|
8917
|
+
return f.insertBefore(C, _), s(C, p, w), w.callbacks.afterNodeAdded(C), C;
|
|
8915
8918
|
} else {
|
|
8916
|
-
const
|
|
8917
|
-
return f.insertBefore(
|
|
8919
|
+
const C = document.importNode(p, !0);
|
|
8920
|
+
return f.insertBefore(C, _), w.callbacks.afterNodeAdded(C), C;
|
|
8918
8921
|
}
|
|
8919
8922
|
}
|
|
8920
8923
|
const v = /* @__PURE__ */ (function() {
|
|
8921
|
-
function f(
|
|
8922
|
-
let S = null, O =
|
|
8923
|
-
for (; L && L !=
|
|
8924
|
-
if (
|
|
8925
|
-
if (
|
|
8924
|
+
function f(w, C, A, D) {
|
|
8925
|
+
let S = null, O = C.nextSibling, k = 0, L = A;
|
|
8926
|
+
for (; L && L != D; ) {
|
|
8927
|
+
if (_(L, C)) {
|
|
8928
|
+
if (p(w, L, C))
|
|
8926
8929
|
return L;
|
|
8927
|
-
S === null && (
|
|
8930
|
+
S === null && (w.idMap.has(L) || (S = L));
|
|
8928
8931
|
}
|
|
8929
|
-
if (S === null && O &&
|
|
8932
|
+
if (S === null && O && _(L, O) && (k++, O = O.nextSibling, k >= 2 && (S = void 0)), w.activeElementAndParents.includes(L)) break;
|
|
8930
8933
|
L = L.nextSibling;
|
|
8931
8934
|
}
|
|
8932
8935
|
return S || null;
|
|
8933
8936
|
}
|
|
8934
|
-
function
|
|
8935
|
-
let
|
|
8936
|
-
if (!S || !
|
|
8937
|
-
for (const O of
|
|
8937
|
+
function p(w, C, A) {
|
|
8938
|
+
let D = w.idMap.get(C), S = w.idMap.get(A);
|
|
8939
|
+
if (!S || !D) return !1;
|
|
8940
|
+
for (const O of D)
|
|
8938
8941
|
if (S.has(O))
|
|
8939
8942
|
return !0;
|
|
8940
8943
|
return !1;
|
|
8941
8944
|
}
|
|
8942
|
-
function w
|
|
8945
|
+
function _(w, C) {
|
|
8943
8946
|
const A = (
|
|
8944
8947
|
/** @type {Element} */
|
|
8945
|
-
|
|
8946
|
-
),
|
|
8948
|
+
w
|
|
8949
|
+
), D = (
|
|
8947
8950
|
/** @type {Element} */
|
|
8948
|
-
|
|
8951
|
+
C
|
|
8949
8952
|
);
|
|
8950
|
-
return A.nodeType ===
|
|
8953
|
+
return A.nodeType === D.nodeType && A.tagName === D.tagName && // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.
|
|
8951
8954
|
// We'll still match an anonymous node with an IDed newElt, though, because if it got this far,
|
|
8952
8955
|
// its not persistent, and new nodes can't have any hidden state.
|
|
8953
8956
|
// We can't use .id because of form input shadowing, and we can't count on .getAttribute's presence because it could be a document-fragment
|
|
8954
|
-
(!A.getAttribute?.("id") || A.getAttribute?.("id") ===
|
|
8957
|
+
(!A.getAttribute?.("id") || A.getAttribute?.("id") === D.getAttribute?.("id"));
|
|
8955
8958
|
}
|
|
8956
8959
|
return f;
|
|
8957
8960
|
})();
|
|
8958
|
-
function
|
|
8959
|
-
if (f.idMap.has(
|
|
8960
|
-
|
|
8961
|
+
function g(f, p) {
|
|
8962
|
+
if (f.idMap.has(p))
|
|
8963
|
+
E(f.pantry, p, null);
|
|
8961
8964
|
else {
|
|
8962
|
-
if (f.callbacks.beforeNodeRemoved(
|
|
8963
|
-
|
|
8965
|
+
if (f.callbacks.beforeNodeRemoved(p) === !1) return;
|
|
8966
|
+
p.parentNode?.removeChild(p), f.callbacks.afterNodeRemoved(p);
|
|
8964
8967
|
}
|
|
8965
8968
|
}
|
|
8966
|
-
function
|
|
8967
|
-
let
|
|
8968
|
-
for (;
|
|
8969
|
-
let
|
|
8969
|
+
function b(f, p, _) {
|
|
8970
|
+
let w = p;
|
|
8971
|
+
for (; w && w !== _; ) {
|
|
8972
|
+
let C = (
|
|
8970
8973
|
/** @type {Node} */
|
|
8971
|
-
|
|
8974
|
+
w
|
|
8972
8975
|
);
|
|
8973
|
-
|
|
8976
|
+
w = w.nextSibling, g(f, C);
|
|
8974
8977
|
}
|
|
8975
|
-
return
|
|
8978
|
+
return w;
|
|
8976
8979
|
}
|
|
8977
|
-
function
|
|
8978
|
-
const
|
|
8980
|
+
function x(f, p, _, w) {
|
|
8981
|
+
const C = (
|
|
8979
8982
|
/** @type {Element} - will always be found */
|
|
8980
8983
|
// ctx.target.id unsafe because of form input shadowing
|
|
8981
8984
|
// ctx.target could be a document fragment which doesn't have `getAttribute`
|
|
8982
|
-
|
|
8985
|
+
w.target.getAttribute?.("id") === p && w.target || w.target.querySelector(`[id="${p}"]`) || w.pantry.querySelector(`[id="${p}"]`)
|
|
8983
8986
|
);
|
|
8984
|
-
return m(
|
|
8987
|
+
return m(C, w), E(f, C, _), C;
|
|
8985
8988
|
}
|
|
8986
|
-
function m(f,
|
|
8987
|
-
const
|
|
8989
|
+
function m(f, p) {
|
|
8990
|
+
const _ = (
|
|
8988
8991
|
/** @type {String} */
|
|
8989
8992
|
f.getAttribute("id")
|
|
8990
8993
|
);
|
|
8991
8994
|
for (; f = f.parentNode; ) {
|
|
8992
|
-
let
|
|
8993
|
-
|
|
8995
|
+
let w = p.idMap.get(f);
|
|
8996
|
+
w && (w.delete(_), w.size || p.idMap.delete(f));
|
|
8994
8997
|
}
|
|
8995
8998
|
}
|
|
8996
|
-
function
|
|
8999
|
+
function E(f, p, _) {
|
|
8997
9000
|
if (f.moveBefore)
|
|
8998
9001
|
try {
|
|
8999
|
-
f.moveBefore(
|
|
9002
|
+
f.moveBefore(p, _);
|
|
9000
9003
|
} catch {
|
|
9001
|
-
f.insertBefore(
|
|
9004
|
+
f.insertBefore(p, _);
|
|
9002
9005
|
}
|
|
9003
9006
|
else
|
|
9004
|
-
f.insertBefore(
|
|
9007
|
+
f.insertBefore(p, _);
|
|
9005
9008
|
}
|
|
9006
|
-
return
|
|
9009
|
+
return h;
|
|
9007
9010
|
})(), s = /* @__PURE__ */ (function() {
|
|
9008
|
-
function
|
|
9009
|
-
return f.ignoreActive && m === document.activeElement ? null : (f.callbacks.beforeNodeMorphed(m,
|
|
9011
|
+
function h(m, E, f) {
|
|
9012
|
+
return f.ignoreActive && m === document.activeElement ? null : (f.callbacks.beforeNodeMorphed(m, E) === !1 || (m instanceof HTMLHeadElement && f.head.ignore || (m instanceof HTMLHeadElement && f.head.style !== "morph" ? l(
|
|
9010
9013
|
m,
|
|
9011
9014
|
/** @type {HTMLHeadElement} */
|
|
9012
|
-
|
|
9015
|
+
E,
|
|
9013
9016
|
f
|
|
9014
|
-
) : (
|
|
9017
|
+
) : (y(m, E, f), x(m, f) || a(f, m, E))), f.callbacks.afterNodeMorphed(m, E)), m);
|
|
9015
9018
|
}
|
|
9016
|
-
function
|
|
9017
|
-
let
|
|
9018
|
-
if (
|
|
9019
|
-
const
|
|
9019
|
+
function y(m, E, f) {
|
|
9020
|
+
let p = E.nodeType;
|
|
9021
|
+
if (p === 1) {
|
|
9022
|
+
const _ = (
|
|
9020
9023
|
/** @type {Element} */
|
|
9021
9024
|
m
|
|
9022
|
-
),
|
|
9025
|
+
), w = (
|
|
9023
9026
|
/** @type {Element} */
|
|
9024
|
-
|
|
9025
|
-
),
|
|
9026
|
-
for (const
|
|
9027
|
-
|
|
9028
|
-
for (let
|
|
9029
|
-
const S = D
|
|
9030
|
-
if (S && !
|
|
9031
|
-
if (
|
|
9027
|
+
E
|
|
9028
|
+
), C = _.attributes, A = w.attributes;
|
|
9029
|
+
for (const D of A)
|
|
9030
|
+
b(D.name, _, "update", f) || _.getAttribute(D.name) !== D.value && _.setAttribute(D.name, D.value);
|
|
9031
|
+
for (let D = C.length - 1; 0 <= D; D--) {
|
|
9032
|
+
const S = C[D];
|
|
9033
|
+
if (S && !w.hasAttribute(S.name)) {
|
|
9034
|
+
if (b(S.name, _, "remove", f))
|
|
9032
9035
|
continue;
|
|
9033
|
-
|
|
9036
|
+
_.removeAttribute(S.name);
|
|
9034
9037
|
}
|
|
9035
9038
|
}
|
|
9036
|
-
|
|
9039
|
+
x(_, f) || v(_, w, f);
|
|
9037
9040
|
}
|
|
9038
|
-
(
|
|
9039
|
-
}
|
|
9040
|
-
function v(m,
|
|
9041
|
-
if (m instanceof HTMLInputElement &&
|
|
9042
|
-
let
|
|
9043
|
-
|
|
9044
|
-
} else if (m instanceof HTMLOptionElement &&
|
|
9045
|
-
|
|
9046
|
-
else if (m instanceof HTMLTextAreaElement &&
|
|
9047
|
-
let
|
|
9048
|
-
if (
|
|
9041
|
+
(p === 8 || p === 3) && m.nodeValue !== E.nodeValue && (m.nodeValue = E.nodeValue);
|
|
9042
|
+
}
|
|
9043
|
+
function v(m, E, f) {
|
|
9044
|
+
if (m instanceof HTMLInputElement && E instanceof HTMLInputElement && E.type !== "file") {
|
|
9045
|
+
let p = E.value, _ = m.value;
|
|
9046
|
+
g(m, E, "checked", f), g(m, E, "disabled", f), E.hasAttribute("value") ? _ !== p && (b("value", m, "update", f) || (m.setAttribute("value", p), m.value = p)) : b("value", m, "remove", f) || (m.value = "", m.removeAttribute("value"));
|
|
9047
|
+
} else if (m instanceof HTMLOptionElement && E instanceof HTMLOptionElement)
|
|
9048
|
+
g(m, E, "selected", f);
|
|
9049
|
+
else if (m instanceof HTMLTextAreaElement && E instanceof HTMLTextAreaElement) {
|
|
9050
|
+
let p = E.value, _ = m.value;
|
|
9051
|
+
if (b("value", m, "update", f))
|
|
9049
9052
|
return;
|
|
9050
|
-
|
|
9053
|
+
p !== _ && (m.value = p), m.firstChild && m.firstChild.nodeValue !== p && (m.firstChild.nodeValue = p);
|
|
9051
9054
|
}
|
|
9052
9055
|
}
|
|
9053
|
-
function
|
|
9054
|
-
const
|
|
9055
|
-
if (
|
|
9056
|
-
const
|
|
9056
|
+
function g(m, E, f, p) {
|
|
9057
|
+
const _ = E[f], w = m[f];
|
|
9058
|
+
if (_ !== w) {
|
|
9059
|
+
const C = b(
|
|
9057
9060
|
f,
|
|
9058
9061
|
m,
|
|
9059
9062
|
"update",
|
|
9060
|
-
|
|
9063
|
+
p
|
|
9061
9064
|
);
|
|
9062
|
-
|
|
9065
|
+
C || (m[f] = E[f]), _ ? C || m.setAttribute(f, "") : b(f, m, "remove", p) || m.removeAttribute(f);
|
|
9063
9066
|
}
|
|
9064
9067
|
}
|
|
9065
|
-
function
|
|
9066
|
-
return m === "value" &&
|
|
9068
|
+
function b(m, E, f, p) {
|
|
9069
|
+
return m === "value" && p.ignoreActiveValue && E === document.activeElement ? !0 : p.callbacks.beforeAttributeUpdated(m, E, f) === !1;
|
|
9067
9070
|
}
|
|
9068
|
-
function
|
|
9069
|
-
return !!
|
|
9071
|
+
function x(m, E) {
|
|
9072
|
+
return !!E.ignoreActiveValue && m === document.activeElement && m !== document.body;
|
|
9070
9073
|
}
|
|
9071
|
-
return
|
|
9074
|
+
return h;
|
|
9072
9075
|
})();
|
|
9073
|
-
function o(
|
|
9074
|
-
if (
|
|
9075
|
-
const
|
|
9076
|
-
if (
|
|
9077
|
-
const m = l(
|
|
9076
|
+
function o(h, y, v, g) {
|
|
9077
|
+
if (h.head.block) {
|
|
9078
|
+
const b = y.querySelector("head"), x = v.querySelector("head");
|
|
9079
|
+
if (b && x) {
|
|
9080
|
+
const m = l(b, x, h);
|
|
9078
9081
|
return Promise.all(m).then(() => {
|
|
9079
|
-
const
|
|
9082
|
+
const E = Object.assign(h, {
|
|
9080
9083
|
head: {
|
|
9081
9084
|
block: !1,
|
|
9082
9085
|
ignore: !0
|
|
9083
9086
|
}
|
|
9084
9087
|
});
|
|
9085
|
-
return
|
|
9088
|
+
return g(E);
|
|
9086
9089
|
});
|
|
9087
9090
|
}
|
|
9088
9091
|
}
|
|
9089
|
-
return
|
|
9092
|
+
return g(h);
|
|
9090
9093
|
}
|
|
9091
|
-
function l(
|
|
9092
|
-
let
|
|
9093
|
-
for (const
|
|
9094
|
-
|
|
9095
|
-
for (const
|
|
9096
|
-
let
|
|
9097
|
-
|
|
9094
|
+
function l(h, y, v) {
|
|
9095
|
+
let g = [], b = [], x = [], m = [], E = /* @__PURE__ */ new Map();
|
|
9096
|
+
for (const p of y.children)
|
|
9097
|
+
E.set(p.outerHTML, p);
|
|
9098
|
+
for (const p of h.children) {
|
|
9099
|
+
let _ = E.has(p.outerHTML), w = v.head.shouldReAppend(p), C = v.head.shouldPreserve(p);
|
|
9100
|
+
_ || C ? w ? b.push(p) : (E.delete(p.outerHTML), x.push(p)) : v.head.style === "append" ? w && (b.push(p), m.push(p)) : v.head.shouldRemove(p) !== !1 && b.push(p);
|
|
9098
9101
|
}
|
|
9099
|
-
m.push(...
|
|
9102
|
+
m.push(...E.values());
|
|
9100
9103
|
let f = [];
|
|
9101
|
-
for (const
|
|
9102
|
-
let
|
|
9104
|
+
for (const p of m) {
|
|
9105
|
+
let _ = (
|
|
9103
9106
|
/** @type {ChildNode} */
|
|
9104
|
-
document.createRange().createContextualFragment(
|
|
9107
|
+
document.createRange().createContextualFragment(p.outerHTML).firstChild
|
|
9105
9108
|
);
|
|
9106
|
-
if (v.callbacks.beforeNodeAdded(
|
|
9107
|
-
if ("href" in
|
|
9108
|
-
let
|
|
9109
|
-
|
|
9109
|
+
if (v.callbacks.beforeNodeAdded(_) !== !1) {
|
|
9110
|
+
if ("href" in _ && _.href || "src" in _ && _.src) {
|
|
9111
|
+
let w, C = new Promise(function(A) {
|
|
9112
|
+
w = A;
|
|
9110
9113
|
});
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
}), f.push(
|
|
9114
|
+
_.addEventListener("load", function() {
|
|
9115
|
+
w();
|
|
9116
|
+
}), f.push(C);
|
|
9114
9117
|
}
|
|
9115
|
-
|
|
9118
|
+
h.appendChild(_), v.callbacks.afterNodeAdded(_), g.push(_);
|
|
9116
9119
|
}
|
|
9117
9120
|
}
|
|
9118
|
-
for (const
|
|
9119
|
-
v.callbacks.beforeNodeRemoved(
|
|
9120
|
-
return v.head.afterHeadMorphed(
|
|
9121
|
-
added:
|
|
9122
|
-
kept:
|
|
9123
|
-
removed:
|
|
9121
|
+
for (const p of b)
|
|
9122
|
+
v.callbacks.beforeNodeRemoved(p) !== !1 && (h.removeChild(p), v.callbacks.afterNodeRemoved(p));
|
|
9123
|
+
return v.head.afterHeadMorphed(h, {
|
|
9124
|
+
added: g,
|
|
9125
|
+
kept: x,
|
|
9126
|
+
removed: b
|
|
9124
9127
|
}), f;
|
|
9125
9128
|
}
|
|
9126
9129
|
const c = /* @__PURE__ */ (function() {
|
|
9127
|
-
function
|
|
9128
|
-
const { persistentIds:
|
|
9129
|
-
if (!["innerHTML", "outerHTML"].includes(
|
|
9130
|
-
throw `Do not understand how to morph style ${
|
|
9130
|
+
function h(f, p, _) {
|
|
9131
|
+
const { persistentIds: w, idMap: C } = m(f, p), A = y(_), D = A.morphStyle || "outerHTML";
|
|
9132
|
+
if (!["innerHTML", "outerHTML"].includes(D))
|
|
9133
|
+
throw `Do not understand how to morph style ${D}`;
|
|
9131
9134
|
return {
|
|
9132
9135
|
target: f,
|
|
9133
|
-
newContent:
|
|
9136
|
+
newContent: p,
|
|
9134
9137
|
config: A,
|
|
9135
|
-
morphStyle:
|
|
9138
|
+
morphStyle: D,
|
|
9136
9139
|
ignoreActive: A.ignoreActive,
|
|
9137
9140
|
ignoreActiveValue: A.ignoreActiveValue,
|
|
9138
9141
|
restoreFocus: A.restoreFocus,
|
|
9139
|
-
idMap:
|
|
9140
|
-
persistentIds:
|
|
9142
|
+
idMap: C,
|
|
9143
|
+
persistentIds: w,
|
|
9141
9144
|
pantry: v(),
|
|
9142
|
-
activeElementAndParents:
|
|
9145
|
+
activeElementAndParents: g(f),
|
|
9143
9146
|
callbacks: A.callbacks,
|
|
9144
9147
|
head: A.head
|
|
9145
9148
|
};
|
|
9146
9149
|
}
|
|
9147
|
-
function
|
|
9148
|
-
let
|
|
9149
|
-
return Object.assign(
|
|
9150
|
+
function y(f) {
|
|
9151
|
+
let p = Object.assign({}, t);
|
|
9152
|
+
return Object.assign(p, f), p.callbacks = Object.assign(
|
|
9150
9153
|
{},
|
|
9151
9154
|
t.callbacks,
|
|
9152
9155
|
f.callbacks
|
|
9153
|
-
),
|
|
9156
|
+
), p.head = Object.assign({}, t.head, f.head), p;
|
|
9154
9157
|
}
|
|
9155
9158
|
function v() {
|
|
9156
9159
|
const f = document.createElement("div");
|
|
9157
9160
|
return f.hidden = !0, document.body.insertAdjacentElement("afterend", f), f;
|
|
9158
9161
|
}
|
|
9159
|
-
function
|
|
9160
|
-
let
|
|
9161
|
-
if (
|
|
9162
|
-
for (;
|
|
9163
|
-
|
|
9164
|
-
return
|
|
9165
|
-
}
|
|
9166
|
-
function
|
|
9167
|
-
let
|
|
9168
|
-
return f.getAttribute?.("id") &&
|
|
9169
|
-
}
|
|
9170
|
-
function
|
|
9171
|
-
for (const
|
|
9162
|
+
function g(f) {
|
|
9163
|
+
let p = [], _ = document.activeElement;
|
|
9164
|
+
if (_?.tagName !== "BODY" && f.contains(_))
|
|
9165
|
+
for (; _ && (p.push(_), _ !== f); )
|
|
9166
|
+
_ = _.parentElement;
|
|
9167
|
+
return p;
|
|
9168
|
+
}
|
|
9169
|
+
function b(f) {
|
|
9170
|
+
let p = Array.from(f.querySelectorAll("[id]"));
|
|
9171
|
+
return f.getAttribute?.("id") && p.push(f), p;
|
|
9172
|
+
}
|
|
9173
|
+
function x(f, p, _, w) {
|
|
9174
|
+
for (const C of w) {
|
|
9172
9175
|
const A = (
|
|
9173
9176
|
/** @type {String} */
|
|
9174
|
-
|
|
9177
|
+
C.getAttribute("id")
|
|
9175
9178
|
);
|
|
9176
|
-
if (
|
|
9177
|
-
let
|
|
9178
|
-
for (;
|
|
9179
|
-
let S = f.get(
|
|
9180
|
-
if (S == null && (S = /* @__PURE__ */ new Set(), f.set(
|
|
9181
|
-
|
|
9179
|
+
if (p.has(A)) {
|
|
9180
|
+
let D = C;
|
|
9181
|
+
for (; D; ) {
|
|
9182
|
+
let S = f.get(D);
|
|
9183
|
+
if (S == null && (S = /* @__PURE__ */ new Set(), f.set(D, S)), S.add(A), D === _) break;
|
|
9184
|
+
D = D.parentElement;
|
|
9182
9185
|
}
|
|
9183
9186
|
}
|
|
9184
9187
|
}
|
|
9185
9188
|
}
|
|
9186
|
-
function m(f,
|
|
9187
|
-
const
|
|
9189
|
+
function m(f, p) {
|
|
9190
|
+
const _ = b(f), w = b(p), C = E(_, w);
|
|
9188
9191
|
let A = /* @__PURE__ */ new Map();
|
|
9189
|
-
|
|
9190
|
-
const
|
|
9191
|
-
return
|
|
9192
|
-
}
|
|
9193
|
-
function
|
|
9194
|
-
let
|
|
9195
|
-
for (const { id: A, tagName:
|
|
9196
|
-
|
|
9197
|
-
let
|
|
9198
|
-
for (const { id: A, tagName:
|
|
9199
|
-
|
|
9200
|
-
for (const A of
|
|
9201
|
-
|
|
9202
|
-
return
|
|
9203
|
-
}
|
|
9204
|
-
return
|
|
9192
|
+
x(A, C, f, _);
|
|
9193
|
+
const D = p.__idiomorphRoot || p;
|
|
9194
|
+
return x(A, C, D, w), { persistentIds: C, idMap: A };
|
|
9195
|
+
}
|
|
9196
|
+
function E(f, p) {
|
|
9197
|
+
let _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
|
|
9198
|
+
for (const { id: A, tagName: D } of f)
|
|
9199
|
+
w.has(A) ? _.add(A) : w.set(A, D);
|
|
9200
|
+
let C = /* @__PURE__ */ new Set();
|
|
9201
|
+
for (const { id: A, tagName: D } of p)
|
|
9202
|
+
C.has(A) ? _.add(A) : w.get(A) === D && C.add(A);
|
|
9203
|
+
for (const A of _)
|
|
9204
|
+
C.delete(A);
|
|
9205
|
+
return C;
|
|
9206
|
+
}
|
|
9207
|
+
return h;
|
|
9205
9208
|
})(), { normalizeElement: u, normalizeParent: d } = /* @__PURE__ */ (function() {
|
|
9206
|
-
const
|
|
9207
|
-
function x
|
|
9208
|
-
return
|
|
9209
|
+
const h = /* @__PURE__ */ new WeakSet();
|
|
9210
|
+
function y(x) {
|
|
9211
|
+
return x instanceof Document ? x.documentElement : x;
|
|
9209
9212
|
}
|
|
9210
|
-
function v(
|
|
9211
|
-
if (
|
|
9213
|
+
function v(x) {
|
|
9214
|
+
if (x == null)
|
|
9212
9215
|
return document.createElement("div");
|
|
9213
|
-
if (typeof
|
|
9214
|
-
return v(
|
|
9215
|
-
if (
|
|
9216
|
+
if (typeof x == "string")
|
|
9217
|
+
return v(b(x));
|
|
9218
|
+
if (h.has(
|
|
9216
9219
|
/** @type {Element} */
|
|
9217
|
-
|
|
9220
|
+
x
|
|
9218
9221
|
))
|
|
9219
9222
|
return (
|
|
9220
9223
|
/** @type {Element} */
|
|
9221
|
-
|
|
9224
|
+
x
|
|
9222
9225
|
);
|
|
9223
|
-
if (
|
|
9224
|
-
if (
|
|
9226
|
+
if (x instanceof Node) {
|
|
9227
|
+
if (x.parentNode)
|
|
9225
9228
|
return (
|
|
9226
9229
|
/** @type {any} */
|
|
9227
|
-
new
|
|
9230
|
+
new g(x)
|
|
9228
9231
|
);
|
|
9229
9232
|
{
|
|
9230
9233
|
const m = document.createElement("div");
|
|
9231
|
-
return m.append(
|
|
9234
|
+
return m.append(x), m;
|
|
9232
9235
|
}
|
|
9233
9236
|
} else {
|
|
9234
9237
|
const m = document.createElement("div");
|
|
9235
|
-
for (const
|
|
9236
|
-
m.append(
|
|
9238
|
+
for (const E of [...x])
|
|
9239
|
+
m.append(E);
|
|
9237
9240
|
return m;
|
|
9238
9241
|
}
|
|
9239
9242
|
}
|
|
9240
|
-
class
|
|
9243
|
+
class g {
|
|
9241
9244
|
/** @param {Node} node */
|
|
9242
9245
|
constructor(m) {
|
|
9243
9246
|
this.originalNode = m, this.realParentNode = /** @type {Element} */
|
|
@@ -9246,9 +9249,9 @@ var htmx = (function() {
|
|
|
9246
9249
|
/** @returns {Node[]} */
|
|
9247
9250
|
get childNodes() {
|
|
9248
9251
|
const m = [];
|
|
9249
|
-
let
|
|
9250
|
-
for (;
|
|
9251
|
-
m.push(
|
|
9252
|
+
let E = this.previousSibling ? this.previousSibling.nextSibling : this.realParentNode.firstChild;
|
|
9253
|
+
for (; E && E != this.nextSibling; )
|
|
9254
|
+
m.push(E), E = E.nextSibling;
|
|
9252
9255
|
return m;
|
|
9253
9256
|
}
|
|
9254
9257
|
/**
|
|
@@ -9257,14 +9260,14 @@ var htmx = (function() {
|
|
|
9257
9260
|
*/
|
|
9258
9261
|
querySelectorAll(m) {
|
|
9259
9262
|
return this.childNodes.reduce(
|
|
9260
|
-
(
|
|
9263
|
+
(E, f) => {
|
|
9261
9264
|
if (f instanceof Element) {
|
|
9262
|
-
f.matches(m) &&
|
|
9263
|
-
const
|
|
9264
|
-
for (let
|
|
9265
|
-
|
|
9265
|
+
f.matches(m) && E.push(f);
|
|
9266
|
+
const p = f.querySelectorAll(m);
|
|
9267
|
+
for (let _ = 0; _ < p.length; _++)
|
|
9268
|
+
E.push(p[_]);
|
|
9266
9269
|
}
|
|
9267
|
-
return
|
|
9270
|
+
return E;
|
|
9268
9271
|
},
|
|
9269
9272
|
/** @type {Element[]} */
|
|
9270
9273
|
[]
|
|
@@ -9275,16 +9278,16 @@ var htmx = (function() {
|
|
|
9275
9278
|
* @param {Node} referenceNode
|
|
9276
9279
|
* @returns {Node}
|
|
9277
9280
|
*/
|
|
9278
|
-
insertBefore(m,
|
|
9279
|
-
return this.realParentNode.insertBefore(m,
|
|
9281
|
+
insertBefore(m, E) {
|
|
9282
|
+
return this.realParentNode.insertBefore(m, E);
|
|
9280
9283
|
}
|
|
9281
9284
|
/**
|
|
9282
9285
|
* @param {Node} node
|
|
9283
9286
|
* @param {Node} referenceNode
|
|
9284
9287
|
* @returns {Node}
|
|
9285
9288
|
*/
|
|
9286
|
-
moveBefore(m,
|
|
9287
|
-
return this.realParentNode.moveBefore(m,
|
|
9289
|
+
moveBefore(m, E) {
|
|
9290
|
+
return this.realParentNode.moveBefore(m, E);
|
|
9288
9291
|
}
|
|
9289
9292
|
/**
|
|
9290
9293
|
* for later use with populateIdMapWithTree to halt upwards iteration
|
|
@@ -9294,31 +9297,31 @@ var htmx = (function() {
|
|
|
9294
9297
|
return this.originalNode;
|
|
9295
9298
|
}
|
|
9296
9299
|
}
|
|
9297
|
-
function
|
|
9298
|
-
let m = new DOMParser(),
|
|
9300
|
+
function b(x) {
|
|
9301
|
+
let m = new DOMParser(), E = x.replace(
|
|
9299
9302
|
/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,
|
|
9300
9303
|
""
|
|
9301
9304
|
);
|
|
9302
|
-
if (
|
|
9303
|
-
let f = m.parseFromString(
|
|
9304
|
-
if (
|
|
9305
|
-
return
|
|
9305
|
+
if (E.match(/<\/html>/) || E.match(/<\/head>/) || E.match(/<\/body>/)) {
|
|
9306
|
+
let f = m.parseFromString(x, "text/html");
|
|
9307
|
+
if (E.match(/<\/html>/))
|
|
9308
|
+
return h.add(f), f;
|
|
9306
9309
|
{
|
|
9307
|
-
let
|
|
9308
|
-
return
|
|
9310
|
+
let p = f.firstChild;
|
|
9311
|
+
return p && h.add(p), p;
|
|
9309
9312
|
}
|
|
9310
9313
|
} else {
|
|
9311
|
-
let
|
|
9314
|
+
let p = (
|
|
9312
9315
|
/** @type {HTMLTemplateElement} */
|
|
9313
9316
|
m.parseFromString(
|
|
9314
|
-
"<body><template>" +
|
|
9317
|
+
"<body><template>" + x + "</template></body>",
|
|
9315
9318
|
"text/html"
|
|
9316
9319
|
).body.querySelector("template").content
|
|
9317
9320
|
);
|
|
9318
|
-
return
|
|
9321
|
+
return h.add(p), p;
|
|
9319
9322
|
}
|
|
9320
9323
|
}
|
|
9321
|
-
return { normalizeElement:
|
|
9324
|
+
return { normalizeElement: y, normalizeParent: v };
|
|
9322
9325
|
})();
|
|
9323
9326
|
return {
|
|
9324
9327
|
morph: n,
|