@arabold/docs-mcp-server 1.29.0 → 1.31.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.
@@ -1,4 +1,71 @@
1
- var flushPending = !1, flushing = !1, queue = [], lastFlushedIndex = -1;
1
+ function src_default$1(e) {
2
+ e.directive("collapse", t), t.inline = (n, { modifiers: i }) => {
3
+ i.includes("min") && (n._x_doShow = () => {
4
+ }, n._x_doHide = () => {
5
+ });
6
+ };
7
+ function t(n, { modifiers: i }) {
8
+ let r = modifierValue$1(i, "duration", 250) / 1e3, a = modifierValue$1(i, "min", 0), s = !i.includes("min");
9
+ n._x_isShown || (n.style.height = `${a}px`), !n._x_isShown && s && (n.hidden = !0), n._x_isShown || (n.style.overflow = "hidden");
10
+ let o = (c, u) => {
11
+ let d = e.setStyles(c, u);
12
+ return u.height ? () => {
13
+ } : d;
14
+ }, l = {
15
+ transitionProperty: "height",
16
+ transitionDuration: `${r}s`,
17
+ transitionTimingFunction: "cubic-bezier(0.4, 0.0, 0.2, 1)"
18
+ };
19
+ n._x_transition = {
20
+ in(c = () => {
21
+ }, u = () => {
22
+ }) {
23
+ s && (n.hidden = !1), s && (n.style.display = null);
24
+ let d = n.getBoundingClientRect().height;
25
+ n.style.height = "auto";
26
+ let h = n.getBoundingClientRect().height;
27
+ d === h && (d = a), e.transition(n, e.setStyles, {
28
+ during: l,
29
+ start: { height: d + "px" },
30
+ end: { height: h + "px" }
31
+ }, () => n._x_isShown = !0, () => {
32
+ Math.abs(n.getBoundingClientRect().height - h) < 1 && (n.style.overflow = null);
33
+ });
34
+ },
35
+ out(c = () => {
36
+ }, u = () => {
37
+ }) {
38
+ let d = n.getBoundingClientRect().height;
39
+ e.transition(n, o, {
40
+ during: l,
41
+ start: { height: d + "px" },
42
+ end: { height: a + "px" }
43
+ }, () => n.style.overflow = "hidden", () => {
44
+ n._x_isShown = !1, n.style.height == `${a}px` && s && (n.style.display = "none", n.hidden = !0);
45
+ });
46
+ }
47
+ };
48
+ }
49
+ }
50
+ function modifierValue$1(e, t, n) {
51
+ if (e.indexOf(t) === -1)
52
+ return n;
53
+ const i = e[e.indexOf(t) + 1];
54
+ if (!i)
55
+ return n;
56
+ if (t === "duration") {
57
+ let r = i.match(/([0-9]+)ms/);
58
+ if (r)
59
+ return r[1];
60
+ }
61
+ if (t === "min") {
62
+ let r = i.match(/([0-9]+)px/);
63
+ if (r)
64
+ return r[1];
65
+ }
66
+ return i;
67
+ }
68
+ var module_default$1 = src_default$1, flushPending = !1, flushing = !1, queue = [], lastFlushedIndex = -1;
2
69
  function scheduler(e) {
3
70
  queueJob(e);
4
71
  }
@@ -660,14 +727,14 @@ function registerTransitionsFromClassString(e, t, n) {
660
727
  function registerTransitionsFromHelper(e, t, n) {
661
728
  registerTransitionObject(e, setStyles);
662
729
  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);
663
- t.includes("in") && !i && (t = t.filter((y, _) => _ < t.indexOf("out"))), t.includes("out") && !i && (t = t.filter((y, _) => _ > t.indexOf("out")));
664
- 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, f = modifierValue(t, "origin", "center"), p = "opacity, transform", g = modifierValue(t, "duration", 150) / 1e3, v = modifierValue(t, "duration", 75) / 1e3, h = "cubic-bezier(0.4, 0.0, 0.2, 1)";
730
+ t.includes("in") && !i && (t = t.filter((E, g) => g < t.indexOf("out"))), t.includes("out") && !i && (t = t.filter((E, g) => g > t.indexOf("out")));
731
+ 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"), b = "opacity, transform", v = modifierValue(t, "duration", 150) / 1e3, x = modifierValue(t, "duration", 75) / 1e3, m = "cubic-bezier(0.4, 0.0, 0.2, 1)";
665
732
  r && (e._x_transition.enter.during = {
666
- transformOrigin: f,
733
+ transformOrigin: h,
667
734
  transitionDelay: `${d}s`,
668
- transitionProperty: p,
669
- transitionDuration: `${g}s`,
670
- transitionTimingFunction: h
735
+ transitionProperty: b,
736
+ transitionDuration: `${v}s`,
737
+ transitionTimingFunction: m
671
738
  }, e._x_transition.enter.start = {
672
739
  opacity: c,
673
740
  transform: `scale(${u})`
@@ -675,11 +742,11 @@ function registerTransitionsFromHelper(e, t, n) {
675
742
  opacity: 1,
676
743
  transform: "scale(1)"
677
744
  }), a && (e._x_transition.leave.during = {
678
- transformOrigin: f,
745
+ transformOrigin: h,
679
746
  transitionDelay: `${d}s`,
680
- transitionProperty: p,
681
- transitionDuration: `${v}s`,
682
- transitionTimingFunction: h
747
+ transitionProperty: b,
748
+ transitionDuration: `${x}s`,
749
+ transitionTimingFunction: m
683
750
  }, e._x_transition.leave.start = {
684
751
  opacity: 1,
685
752
  transform: "scale(1)"
@@ -1376,10 +1443,10 @@ function createIterableMethod(e, t, n) {
1376
1443
  return !t && track(a, "iterate", l ? MAP_KEY_ITERATE_KEY : ITERATE_KEY), {
1377
1444
  // iterator protocol
1378
1445
  next() {
1379
- const { value: d, done: f } = c.next();
1380
- return f ? { value: d, done: f } : {
1446
+ const { value: d, done: h } = c.next();
1447
+ return h ? { value: d, done: h } : {
1381
1448
  value: o ? [u(d[0]), u(d[1])] : u(d),
1382
- done: f
1449
+ done: h
1383
1450
  };
1384
1451
  },
1385
1452
  // iterable protocol
@@ -1616,25 +1683,25 @@ directive("modelable", (e, { expression: t }, { effect: n, evaluateLater: i, cle
1616
1683
  if (!e._x_model)
1617
1684
  return;
1618
1685
  e._x_removeModelListeners.default();
1619
- let u = e._x_model.get, d = e._x_model.set, f = entangle(
1686
+ let u = e._x_model.get, d = e._x_model.set, h = entangle(
1620
1687
  {
1621
1688
  get() {
1622
1689
  return u();
1623
1690
  },
1624
- set(p) {
1625
- d(p);
1691
+ set(b) {
1692
+ d(b);
1626
1693
  }
1627
1694
  },
1628
1695
  {
1629
1696
  get() {
1630
1697
  return s();
1631
1698
  },
1632
- set(p) {
1633
- l(p);
1699
+ set(b) {
1700
+ l(b);
1634
1701
  }
1635
1702
  }
1636
1703
  );
1637
- r(f);
1704
+ r(h);
1638
1705
  });
1639
1706
  });
1640
1707
  directive("teleport", (e, { modifiers: t, expression: n }, { cleanup: i }) => {
@@ -1773,42 +1840,42 @@ directive("model", (e, { modifiers: t, expression: n }, { effect: i, cleanup: r
1773
1840
  typeof n == "string" ? o = evaluateLater(a, `${n} = __placeholder`) : typeof n == "function" && typeof n() == "string" ? o = evaluateLater(a, `${n()} = __placeholder`) : o = () => {
1774
1841
  };
1775
1842
  let l = () => {
1776
- let f;
1777
- return s((p) => f = p), isGetterSetter(f) ? f.get() : f;
1778
- }, c = (f) => {
1779
- let p;
1780
- s((g) => p = g), isGetterSetter(p) ? p.set(f) : o(() => {
1843
+ let h;
1844
+ return s((b) => h = b), isGetterSetter(h) ? h.get() : h;
1845
+ }, c = (h) => {
1846
+ let b;
1847
+ s((v) => b = v), isGetterSetter(b) ? b.set(h) : o(() => {
1781
1848
  }, {
1782
- scope: { __placeholder: f }
1849
+ scope: { __placeholder: h }
1783
1850
  });
1784
1851
  };
1785
1852
  typeof n == "string" && e.type === "radio" && mutateDom(() => {
1786
1853
  e.hasAttribute("name") || e.setAttribute("name", n);
1787
1854
  });
1788
1855
  let u = e.tagName.toLowerCase() === "select" || ["checkbox", "radio"].includes(e.type) || t.includes("lazy") ? "change" : "input", d = isCloning ? () => {
1789
- } : on(e, u, t, (f) => {
1790
- c(getInputValue(e, t, f, l()));
1856
+ } : on(e, u, t, (h) => {
1857
+ c(getInputValue(e, t, h, l()));
1791
1858
  });
1792
1859
  if (t.includes("fill") && ([void 0, null, ""].includes(l()) || isCheckbox(e) && Array.isArray(l()) || e.tagName.toLowerCase() === "select" && e.multiple) && c(
1793
1860
  getInputValue(e, t, { target: e }, l())
1794
1861
  ), e._x_removeModelListeners || (e._x_removeModelListeners = {}), e._x_removeModelListeners.default = d, r(() => e._x_removeModelListeners.default()), e.form) {
1795
- let f = on(e.form, "reset", [], (p) => {
1862
+ let h = on(e.form, "reset", [], (b) => {
1796
1863
  nextTick(() => e._x_model && e._x_model.set(getInputValue(e, t, { target: e }, l())));
1797
1864
  });
1798
- r(() => f());
1865
+ r(() => h());
1799
1866
  }
1800
1867
  e._x_model = {
1801
1868
  get() {
1802
1869
  return l();
1803
1870
  },
1804
- set(f) {
1805
- c(f);
1871
+ set(h) {
1872
+ c(h);
1806
1873
  }
1807
- }, e._x_forceModelUpdate = (f) => {
1808
- f === void 0 && typeof n == "string" && n.match(/\./) && (f = ""), window.fromModel = !0, mutateDom(() => bind(e, "value", f)), delete window.fromModel;
1874
+ }, e._x_forceModelUpdate = (h) => {
1875
+ h === void 0 && typeof n == "string" && n.match(/\./) && (h = ""), window.fromModel = !0, mutateDom(() => bind(e, "value", h)), delete window.fromModel;
1809
1876
  }, i(() => {
1810
- let f = l();
1811
- t.includes("unintrusive") && document.activeElement.isSameNode(e) || e._x_forceModelUpdate(f);
1877
+ let h = l();
1878
+ t.includes("unintrusive") && document.activeElement.isSameNode(e) || e._x_forceModelUpdate(h);
1812
1879
  });
1813
1880
  });
1814
1881
  function getInputValue(e, t, n, i) {
@@ -1966,66 +2033,66 @@ directive("for", (e, { expression: t }, { effect: n, cleanup: i }) => {
1966
2033
  function loop(e, t, n, i) {
1967
2034
  let r = (s) => typeof s == "object" && !Array.isArray(s), a = e;
1968
2035
  n((s) => {
1969
- isNumeric3(s) && s >= 0 && (s = Array.from(Array(s).keys(), (h) => h + 1)), s === void 0 && (s = []);
2036
+ isNumeric3(s) && s >= 0 && (s = Array.from(Array(s).keys(), (m) => m + 1)), s === void 0 && (s = []);
1970
2037
  let o = e._x_lookup, l = e._x_prevKeys, c = [], u = [];
1971
2038
  if (r(s))
1972
- s = Object.entries(s).map(([h, y]) => {
1973
- let _ = getIterationScopeVariables(t, y, h, s);
1974
- i((b) => {
1975
- u.includes(b) && warn("Duplicate key on x-for", e), u.push(b);
1976
- }, { scope: { index: h, ..._ } }), c.push(_);
2039
+ s = Object.entries(s).map(([m, E]) => {
2040
+ let g = getIterationScopeVariables(t, E, m, s);
2041
+ i((y) => {
2042
+ u.includes(y) && warn("Duplicate key on x-for", e), u.push(y);
2043
+ }, { scope: { index: m, ...g } }), c.push(g);
1977
2044
  });
1978
2045
  else
1979
- for (let h = 0; h < s.length; h++) {
1980
- let y = getIterationScopeVariables(t, s[h], h, s);
1981
- i((_) => {
1982
- u.includes(_) && warn("Duplicate key on x-for", e), u.push(_);
1983
- }, { scope: { index: h, ...y } }), c.push(y);
2046
+ for (let m = 0; m < s.length; m++) {
2047
+ let E = getIterationScopeVariables(t, s[m], m, s);
2048
+ i((g) => {
2049
+ u.includes(g) && warn("Duplicate key on x-for", e), u.push(g);
2050
+ }, { scope: { index: m, ...E } }), c.push(E);
1984
2051
  }
1985
- let d = [], f = [], p = [], g = [];
1986
- for (let h = 0; h < l.length; h++) {
1987
- let y = l[h];
1988
- u.indexOf(y) === -1 && p.push(y);
1989
- }
1990
- l = l.filter((h) => !p.includes(h));
1991
- let v = "template";
1992
- for (let h = 0; h < u.length; h++) {
1993
- let y = u[h], _ = l.indexOf(y);
1994
- if (_ === -1)
1995
- l.splice(h, 0, y), d.push([v, h]);
1996
- else if (_ !== h) {
1997
- let b = l.splice(h, 1)[0], m = l.splice(_ - 1, 1)[0];
1998
- l.splice(h, 0, m), l.splice(_, 0, b), f.push([b, m]);
2052
+ let d = [], h = [], b = [], v = [];
2053
+ for (let m = 0; m < l.length; m++) {
2054
+ let E = l[m];
2055
+ u.indexOf(E) === -1 && b.push(E);
2056
+ }
2057
+ l = l.filter((m) => !b.includes(m));
2058
+ let x = "template";
2059
+ for (let m = 0; m < u.length; m++) {
2060
+ let E = u[m], g = l.indexOf(E);
2061
+ if (g === -1)
2062
+ l.splice(m, 0, E), d.push([x, m]);
2063
+ else if (g !== m) {
2064
+ let y = l.splice(m, 1)[0], f = l.splice(g - 1, 1)[0];
2065
+ l.splice(m, 0, f), l.splice(g, 0, y), h.push([y, f]);
1999
2066
  } else
2000
- g.push(y);
2001
- v = y;
2067
+ v.push(E);
2068
+ x = E;
2002
2069
  }
2003
- for (let h = 0; h < p.length; h++) {
2004
- let y = p[h];
2005
- y in o && (mutateDom(() => {
2006
- destroyTree(o[y]), o[y].remove();
2007
- }), delete o[y]);
2070
+ for (let m = 0; m < b.length; m++) {
2071
+ let E = b[m];
2072
+ E in o && (mutateDom(() => {
2073
+ destroyTree(o[E]), o[E].remove();
2074
+ }), delete o[E]);
2008
2075
  }
2009
- for (let h = 0; h < f.length; h++) {
2010
- let [y, _] = f[h], b = o[y], m = o[_], w = document.createElement("div");
2076
+ for (let m = 0; m < h.length; m++) {
2077
+ let [E, g] = h[m], y = o[E], f = o[g], p = document.createElement("div");
2011
2078
  mutateDom(() => {
2012
- m || warn('x-for ":key" is undefined or invalid', a, _, o), m.after(w), b.after(m), m._x_currentIfEl && m.after(m._x_currentIfEl), w.before(b), b._x_currentIfEl && b.after(b._x_currentIfEl), w.remove();
2013
- }), m._x_refreshXForScope(c[u.indexOf(_)]);
2014
- }
2015
- for (let h = 0; h < d.length; h++) {
2016
- let [y, _] = d[h], b = y === "template" ? a : o[y];
2017
- b._x_currentIfEl && (b = b._x_currentIfEl);
2018
- let m = c[_], w = u[_], E = document.importNode(a.content, !0).firstElementChild, x = reactive(m);
2019
- addScopeToNode(E, x, a), E._x_refreshXForScope = (S) => {
2020
- Object.entries(S).forEach(([A, D]) => {
2021
- x[A] = D;
2079
+ f || warn('x-for ":key" is undefined or invalid', a, g, o), f.after(p), y.after(f), f._x_currentIfEl && f.after(f._x_currentIfEl), p.before(y), y._x_currentIfEl && y.after(y._x_currentIfEl), p.remove();
2080
+ }), f._x_refreshXForScope(c[u.indexOf(g)]);
2081
+ }
2082
+ for (let m = 0; m < d.length; m++) {
2083
+ let [E, g] = d[m], y = E === "template" ? a : o[E];
2084
+ y._x_currentIfEl && (y = y._x_currentIfEl);
2085
+ let f = c[g], p = u[g], _ = document.importNode(a.content, !0).firstElementChild, w = reactive(f);
2086
+ addScopeToNode(_, w, a), _._x_refreshXForScope = (D) => {
2087
+ Object.entries(D).forEach(([A, C]) => {
2088
+ w[A] = C;
2022
2089
  });
2023
2090
  }, mutateDom(() => {
2024
- b.after(E), skipDuringClone(() => initTree(E))();
2025
- }), typeof w == "object" && warn("x-for key cannot be an object, it must be a string or an integer", a), o[w] = E;
2091
+ y.after(_), skipDuringClone(() => initTree(_))();
2092
+ }), typeof p == "object" && warn("x-for key cannot be an object, it must be a string or an integer", a), o[p] = _;
2026
2093
  }
2027
- for (let h = 0; h < g.length; h++)
2028
- o[g[h]]._x_refreshXForScope(c[u.indexOf(g[h])]);
2094
+ for (let m = 0; m < v.length; m++)
2095
+ o[v[m]]._x_refreshXForScope(c[u.indexOf(v[m])]);
2029
2096
  a._x_prevKeys = u;
2030
2097
  });
2031
2098
  }
@@ -2591,13 +2658,13 @@ function getBoundingClientRect(e, t, n) {
2591
2658
  t === void 0 && (t = !1), n === void 0 && (n = !1);
2592
2659
  var i = e.getBoundingClientRect(), r = 1, a = 1;
2593
2660
  t && isHTMLElement(e) && (r = e.offsetWidth > 0 && round(i.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && round(i.height) / e.offsetHeight || 1);
2594
- 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, f = i.height / a;
2661
+ 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;
2595
2662
  return {
2596
2663
  width: d,
2597
- height: f,
2664
+ height: h,
2598
2665
  top: u,
2599
2666
  right: c + d,
2600
- bottom: u + f,
2667
+ bottom: u + h,
2601
2668
  left: c,
2602
2669
  x: c,
2603
2670
  y: u
@@ -2709,8 +2776,8 @@ var toPaddingObject = function(t, n) {
2709
2776
  function arrow(e) {
2710
2777
  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";
2711
2778
  if (!(!a || !s)) {
2712
- var d = toPaddingObject(r.padding, n), f = getLayoutRect(a), p = l === "y" ? top : left, g = l === "y" ? bottom : right, v = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], h = s[l] - n.rects.reference[l], y = getOffsetParent(a), _ = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, b = v / 2 - h / 2, m = d[p], w = _ - f[u] - d[g], E = _ / 2 - f[u] / 2 + b, x = within(m, E, w), S = l;
2713
- n.modifiersData[i] = (t = {}, t[S] = x, t.centerOffset = x - E, t);
2779
+ var d = toPaddingObject(r.padding, n), h = getLayoutRect(a), b = l === "y" ? top : left, v = l === "y" ? bottom : right, x = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], m = s[l] - n.rects.reference[l], E = getOffsetParent(a), g = E ? l === "y" ? E.clientHeight || 0 : E.clientWidth || 0 : 0, y = x / 2 - m / 2, f = d[b], p = g - h[u] - d[v], _ = g / 2 - h[u] / 2 + y, w = within(f, _, p), D = l;
2780
+ n.modifiersData[i] = (t = {}, t[D] = w, t.centerOffset = w - _, t);
2714
2781
  }
2715
2782
  }
2716
2783
  function effect$1(e) {
@@ -2743,48 +2810,48 @@ function roundOffsetsByDPR(e, t) {
2743
2810
  };
2744
2811
  }
2745
2812
  function mapToStyles(e) {
2746
- 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, f = s.x, p = f === void 0 ? 0 : f, g = s.y, v = g === void 0 ? 0 : g, h = typeof u == "function" ? u({
2747
- x: p,
2748
- y: v
2813
+ 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, b = h === void 0 ? 0 : h, v = s.y, x = v === void 0 ? 0 : v, m = typeof u == "function" ? u({
2814
+ x: b,
2815
+ y: x
2749
2816
  }) : {
2750
- x: p,
2751
- y: v
2817
+ x: b,
2818
+ y: x
2752
2819
  };
2753
- p = h.x, v = h.y;
2754
- var y = s.hasOwnProperty("x"), _ = s.hasOwnProperty("y"), b = left, m = top, w = window;
2820
+ b = m.x, x = m.y;
2821
+ var E = s.hasOwnProperty("x"), g = s.hasOwnProperty("y"), y = left, f = top, p = window;
2755
2822
  if (c) {
2756
- var E = getOffsetParent(n), x = "clientHeight", S = "clientWidth";
2757
- if (E === getWindow(n) && (E = getDocumentElement(n), getComputedStyle$1(E).position !== "static" && o === "absolute" && (x = "scrollHeight", S = "scrollWidth")), E = E, r === top || (r === left || r === right) && a === end) {
2758
- m = bottom;
2759
- var A = d && E === w && w.visualViewport ? w.visualViewport.height : (
2823
+ var _ = getOffsetParent(n), w = "clientHeight", D = "clientWidth";
2824
+ if (_ === getWindow(n) && (_ = getDocumentElement(n), getComputedStyle$1(_).position !== "static" && o === "absolute" && (w = "scrollHeight", D = "scrollWidth")), _ = _, r === top || (r === left || r === right) && a === end) {
2825
+ f = bottom;
2826
+ var A = d && _ === p && p.visualViewport ? p.visualViewport.height : (
2760
2827
  // $FlowFixMe[prop-missing]
2761
- E[x]
2828
+ _[w]
2762
2829
  );
2763
- v -= A - i.height, v *= l ? 1 : -1;
2830
+ x -= A - i.height, x *= l ? 1 : -1;
2764
2831
  }
2765
2832
  if (r === left || (r === top || r === bottom) && a === end) {
2766
- b = right;
2767
- var D = d && E === w && w.visualViewport ? w.visualViewport.width : (
2833
+ y = right;
2834
+ var C = d && _ === p && p.visualViewport ? p.visualViewport.width : (
2768
2835
  // $FlowFixMe[prop-missing]
2769
- E[S]
2836
+ _[D]
2770
2837
  );
2771
- p -= D - i.width, p *= l ? 1 : -1;
2838
+ b -= C - i.width, b *= l ? 1 : -1;
2772
2839
  }
2773
2840
  }
2774
- var O = Object.assign({
2841
+ var S = Object.assign({
2775
2842
  position: o
2776
- }, c && unsetSides), H = u === !0 ? roundOffsetsByDPR({
2777
- x: p,
2778
- y: v
2843
+ }, c && unsetSides), O = u === !0 ? roundOffsetsByDPR({
2844
+ x: b,
2845
+ y: x
2779
2846
  }, getWindow(n)) : {
2780
- x: p,
2781
- y: v
2847
+ x: b,
2848
+ y: x
2782
2849
  };
2783
- if (p = H.x, v = H.y, l) {
2850
+ if (b = O.x, x = O.y, l) {
2784
2851
  var T;
2785
- return Object.assign({}, O, (T = {}, T[m] = _ ? "0" : "", T[b] = y ? "0" : "", T.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + v + "px)" : "translate3d(" + p + "px, " + v + "px, 0)", T));
2852
+ return Object.assign({}, S, (T = {}, T[f] = g ? "0" : "", T[y] = E ? "0" : "", T.transform = (p.devicePixelRatio || 1) <= 1 ? "translate(" + b + "px, " + x + "px)" : "translate3d(" + b + "px, " + x + "px, 0)", T));
2786
2853
  }
2787
- return Object.assign({}, O, (t = {}, t[m] = _ ? v + "px" : "", t[b] = y ? p + "px" : "", t.transform = "", t));
2854
+ return Object.assign({}, S, (t = {}, t[f] = g ? x + "px" : "", t[y] = E ? b + "px" : "", t.transform = "", t));
2788
2855
  }
2789
2856
  function computeStyles(e) {
2790
2857
  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 = {
@@ -2984,43 +3051,43 @@ function computeOffsets(e) {
2984
3051
  }
2985
3052
  function detectOverflow(e, t) {
2986
3053
  t === void 0 && (t = {});
2987
- 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, f = d === void 0 ? popper : d, p = n.altBoundary, g = p === void 0 ? !1 : p, v = n.padding, h = v === void 0 ? 0 : v, y = mergePaddingObject(typeof h != "number" ? h : expandToHashMap(h, basePlacements)), _ = f === popper ? reference : popper, b = e.rects.popper, m = e.elements[g ? _ : f], w = getClippingRect(isElement(m) ? m : m.contextElement || getDocumentElement(e.elements.popper), l, u, s), E = getBoundingClientRect(e.elements.reference), x = computeOffsets({
2988
- reference: E,
2989
- element: b,
3054
+ 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, b = n.altBoundary, v = b === void 0 ? !1 : b, x = n.padding, m = x === void 0 ? 0 : x, E = mergePaddingObject(typeof m != "number" ? m : expandToHashMap(m, basePlacements)), g = h === popper ? reference : popper, y = e.rects.popper, f = e.elements[v ? g : h], p = getClippingRect(isElement(f) ? f : f.contextElement || getDocumentElement(e.elements.popper), l, u, s), _ = getBoundingClientRect(e.elements.reference), w = computeOffsets({
3055
+ reference: _,
3056
+ element: y,
2990
3057
  placement: r
2991
- }), S = rectToClientRect(Object.assign({}, b, x)), A = f === popper ? S : E, D = {
2992
- top: w.top - A.top + y.top,
2993
- bottom: A.bottom - w.bottom + y.bottom,
2994
- left: w.left - A.left + y.left,
2995
- right: A.right - w.right + y.right
2996
- }, O = e.modifiersData.offset;
2997
- if (f === popper && O) {
2998
- var H = O[r];
2999
- Object.keys(D).forEach(function(T) {
3000
- var F = [right, bottom].indexOf(T) >= 0 ? 1 : -1, I = [top, bottom].indexOf(T) >= 0 ? "y" : "x";
3001
- D[T] += H[I] * F;
3058
+ }), D = rectToClientRect(Object.assign({}, y, w)), A = h === popper ? D : _, C = {
3059
+ top: p.top - A.top + E.top,
3060
+ bottom: A.bottom - p.bottom + E.bottom,
3061
+ left: p.left - A.left + E.left,
3062
+ right: A.right - p.right + E.right
3063
+ }, S = e.modifiersData.offset;
3064
+ if (h === popper && S) {
3065
+ var O = S[r];
3066
+ Object.keys(C).forEach(function(T) {
3067
+ var L = [right, bottom].indexOf(T) >= 0 ? 1 : -1, R = [top, bottom].indexOf(T) >= 0 ? "y" : "x";
3068
+ C[T] += O[R] * L;
3002
3069
  });
3003
3070
  }
3004
- return D;
3071
+ return C;
3005
3072
  }
3006
3073
  function computeAutoPlacement(e, t) {
3007
3074
  t === void 0 && (t = {});
3008
- 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(g) {
3009
- return getVariation(g) === u;
3010
- }) : basePlacements, f = d.filter(function(g) {
3011
- return c.indexOf(g) >= 0;
3075
+ 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) {
3076
+ return getVariation(v) === u;
3077
+ }) : basePlacements, h = d.filter(function(v) {
3078
+ return c.indexOf(v) >= 0;
3012
3079
  });
3013
- f.length === 0 && (f = d);
3014
- var p = f.reduce(function(g, v) {
3015
- return g[v] = detectOverflow(e, {
3016
- placement: v,
3080
+ h.length === 0 && (h = d);
3081
+ var b = h.reduce(function(v, x) {
3082
+ return v[x] = detectOverflow(e, {
3083
+ placement: x,
3017
3084
  boundary: r,
3018
3085
  rootBoundary: a,
3019
3086
  padding: s
3020
- })[getBasePlacement(v)], g;
3087
+ })[getBasePlacement(x)], v;
3021
3088
  }, {});
3022
- return Object.keys(p).sort(function(g, v) {
3023
- return p[g] - p[v];
3089
+ return Object.keys(b).sort(function(v, x) {
3090
+ return b[v] - b[x];
3024
3091
  });
3025
3092
  }
3026
3093
  function getExpandedFallbackPlacements(e) {
@@ -3032,44 +3099,44 @@ function getExpandedFallbackPlacements(e) {
3032
3099
  function flip(e) {
3033
3100
  var t = e.state, n = e.options, i = e.name;
3034
3101
  if (!t.modifiersData[i]._skip) {
3035
- 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, f = n.altBoundary, p = n.flipVariations, g = p === void 0 ? !0 : p, v = n.allowedAutoPlacements, h = t.options.placement, y = getBasePlacement(h), _ = y === h, b = l || (_ || !g ? [getOppositePlacement(h)] : getExpandedFallbackPlacements(h)), m = [h].concat(b).reduce(function(V, B) {
3102
+ 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, b = n.flipVariations, v = b === void 0 ? !0 : b, x = n.allowedAutoPlacements, m = t.options.placement, E = getBasePlacement(m), g = E === m, y = l || (g || !v ? [getOppositePlacement(m)] : getExpandedFallbackPlacements(m)), f = [m].concat(y).reduce(function(V, B) {
3036
3103
  return V.concat(getBasePlacement(B) === auto ? computeAutoPlacement(t, {
3037
3104
  placement: B,
3038
3105
  boundary: u,
3039
3106
  rootBoundary: d,
3040
3107
  padding: c,
3041
- flipVariations: g,
3042
- allowedAutoPlacements: v
3108
+ flipVariations: v,
3109
+ allowedAutoPlacements: x
3043
3110
  }) : B);
3044
- }, []), w = t.rects.reference, E = t.rects.popper, x = /* @__PURE__ */ new Map(), S = !0, A = m[0], D = 0; D < m.length; D++) {
3045
- var O = m[D], H = getBasePlacement(O), T = getVariation(O) === start, F = [top, bottom].indexOf(H) >= 0, I = F ? "width" : "height", R = detectOverflow(t, {
3046
- placement: O,
3111
+ }, []), p = t.rects.reference, _ = t.rects.popper, w = /* @__PURE__ */ new Map(), D = !0, A = f[0], C = 0; C < f.length; C++) {
3112
+ var S = f[C], O = getBasePlacement(S), T = getVariation(S) === start, L = [top, bottom].indexOf(O) >= 0, R = L ? "width" : "height", H = detectOverflow(t, {
3113
+ placement: S,
3047
3114
  boundary: u,
3048
3115
  rootBoundary: d,
3049
- altBoundary: f,
3116
+ altBoundary: h,
3050
3117
  padding: c
3051
- }), k = F ? T ? right : left : T ? bottom : top;
3052
- w[I] > E[I] && (k = getOppositePlacement(k));
3053
- var W = getOppositePlacement(k), $ = [];
3054
- if (a && $.push(R[H] <= 0), o && $.push(R[k] <= 0, R[W] <= 0), $.every(function(V) {
3118
+ }), I = L ? T ? right : left : T ? bottom : top;
3119
+ p[R] > _[R] && (I = getOppositePlacement(I));
3120
+ var W = getOppositePlacement(I), $ = [];
3121
+ if (a && $.push(H[O] <= 0), o && $.push(H[I] <= 0, H[W] <= 0), $.every(function(V) {
3055
3122
  return V;
3056
3123
  })) {
3057
- A = O, S = !1;
3124
+ A = S, D = !1;
3058
3125
  break;
3059
3126
  }
3060
- x.set(O, $);
3061
- }
3062
- if (S)
3063
- for (var q = g ? 3 : 1, N = function(B) {
3064
- var C = m.find(function(L) {
3065
- var M = x.get(L);
3066
- if (M)
3067
- return M.slice(0, B).every(function(K) {
3127
+ w.set(S, $);
3128
+ }
3129
+ if (D)
3130
+ for (var q = v ? 3 : 1, N = function(B) {
3131
+ var k = f.find(function(M) {
3132
+ var F = w.get(M);
3133
+ if (F)
3134
+ return F.slice(0, B).every(function(K) {
3068
3135
  return K;
3069
3136
  });
3070
3137
  });
3071
- if (C)
3072
- return A = C, "break";
3138
+ if (k)
3139
+ return A = k, "break";
3073
3140
  }, P = q; P > 0; P--) {
3074
3141
  var j = N(P);
3075
3142
  if (j === "break") break;
@@ -3170,36 +3237,36 @@ function getAltAxis(e) {
3170
3237
  return e === "x" ? "y" : "x";
3171
3238
  }
3172
3239
  function preventOverflow(e) {
3173
- 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, f = n.tether, p = f === void 0 ? !0 : f, g = n.tetherOffset, v = g === void 0 ? 0 : g, h = detectOverflow(t, {
3240
+ 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, b = h === void 0 ? !0 : h, v = n.tetherOffset, x = v === void 0 ? 0 : v, m = detectOverflow(t, {
3174
3241
  boundary: l,
3175
3242
  rootBoundary: c,
3176
3243
  padding: d,
3177
3244
  altBoundary: u
3178
- }), y = getBasePlacement(t.placement), _ = getVariation(t.placement), b = !_, m = getMainAxisFromPlacement(y), w = getAltAxis(m), E = t.modifiersData.popperOffsets, x = t.rects.reference, S = t.rects.popper, A = typeof v == "function" ? v(Object.assign({}, t.rects, {
3245
+ }), E = getBasePlacement(t.placement), g = getVariation(t.placement), y = !g, f = getMainAxisFromPlacement(E), p = getAltAxis(f), _ = t.modifiersData.popperOffsets, w = t.rects.reference, D = t.rects.popper, A = typeof x == "function" ? x(Object.assign({}, t.rects, {
3179
3246
  placement: t.placement
3180
- })) : v, D = typeof A == "number" ? {
3247
+ })) : x, C = typeof A == "number" ? {
3181
3248
  mainAxis: A,
3182
3249
  altAxis: A
3183
3250
  } : Object.assign({
3184
3251
  mainAxis: 0,
3185
3252
  altAxis: 0
3186
- }, A), O = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = {
3253
+ }, A), S = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, O = {
3187
3254
  x: 0,
3188
3255
  y: 0
3189
3256
  };
3190
- if (E) {
3257
+ if (_) {
3191
3258
  if (a) {
3192
- var T, F = m === "y" ? top : left, I = m === "y" ? bottom : right, R = m === "y" ? "height" : "width", k = E[m], W = k + h[F], $ = k - h[I], q = p ? -S[R] / 2 : 0, N = _ === start ? x[R] : S[R], P = _ === start ? -S[R] : -x[R], j = t.elements.arrow, V = p && j ? getLayoutRect(j) : {
3259
+ var T, L = f === "y" ? top : left, R = f === "y" ? bottom : right, H = f === "y" ? "height" : "width", I = _[f], W = I + m[L], $ = I - m[R], q = b ? -D[H] / 2 : 0, N = g === start ? w[H] : D[H], P = g === start ? -D[H] : -w[H], j = t.elements.arrow, V = b && j ? getLayoutRect(j) : {
3193
3260
  width: 0,
3194
3261
  height: 0
3195
- }, B = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), C = B[F], L = B[I], M = within(0, x[R], V[R]), K = b ? x[R] / 2 - q - M - C - D.mainAxis : N - M - C - D.mainAxis, ae = b ? -x[R] / 2 + q + M + L + D.mainAxis : P + M + L + D.mainAxis, Y = t.elements.arrow && getOffsetParent(t.elements.arrow), se = Y ? m === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, J = (T = O?.[m]) != null ? T : 0, oe = k + K - J - se, le = k + ae - J, G = within(p ? min(W, oe) : W, k, p ? max($, le) : $);
3196
- E[m] = G, H[m] = G - k;
3262
+ }, B = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), k = B[L], M = B[R], F = within(0, w[H], V[H]), K = y ? w[H] / 2 - q - F - k - C.mainAxis : N - F - k - C.mainAxis, ae = y ? -w[H] / 2 + q + F + M + C.mainAxis : P + F + M + C.mainAxis, Y = t.elements.arrow && getOffsetParent(t.elements.arrow), se = Y ? f === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, J = (T = S?.[f]) != null ? T : 0, oe = I + K - J - se, le = I + ae - J, G = within(b ? min(W, oe) : W, I, b ? max($, le) : $);
3263
+ _[f] = G, O[f] = G - I;
3197
3264
  }
3198
3265
  if (o) {
3199
- var Z, ce = m === "x" ? top : left, ue = m === "x" ? bottom : right, z = E[w], U = w === "y" ? "height" : "width", Q = z + h[ce], ee = z - h[ue], X = [top, left].indexOf(y) !== -1, te = (Z = O?.[w]) != null ? Z : 0, ne = X ? Q : z - x[U] - S[U] - te + D.altAxis, ie = X ? z + x[U] + S[U] - te - D.altAxis : ee, re = p && X ? withinMaxClamp(ne, z, ie) : within(p ? ne : Q, z, p ? ie : ee);
3200
- E[w] = re, H[w] = re - z;
3266
+ var Z, ce = f === "x" ? top : left, ue = f === "x" ? bottom : right, z = _[p], U = p === "y" ? "height" : "width", Q = z + m[ce], ee = z - m[ue], X = [top, left].indexOf(E) !== -1, te = (Z = S?.[p]) != null ? Z : 0, ne = X ? Q : z - w[U] - D[U] - te + C.altAxis, ie = X ? z + w[U] + D[U] - te - C.altAxis : ee, re = b && X ? withinMaxClamp(ne, z, ie) : within(b ? ne : Q, z, b ? ie : ee);
3267
+ _[p] = re, O[p] = re - z;
3201
3268
  }
3202
- t.modifiersData[i] = H;
3269
+ t.modifiersData[i] = O;
3203
3270
  }
3204
3271
  }
3205
3272
  const preventOverflow$1 = {
@@ -3316,18 +3383,18 @@ function popperGenerator(e) {
3316
3383
  },
3317
3384
  attributes: {},
3318
3385
  styles: {}
3319
- }, d = [], f = !1, p = {
3386
+ }, d = [], h = !1, b = {
3320
3387
  state: u,
3321
- setOptions: function(y) {
3322
- var _ = typeof y == "function" ? y(u.options) : y;
3323
- v(), u.options = Object.assign({}, a, u.options, _), u.scrollParents = {
3388
+ setOptions: function(E) {
3389
+ var g = typeof E == "function" ? E(u.options) : E;
3390
+ x(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = {
3324
3391
  reference: isElement(o) ? listScrollParents(o) : o.contextElement ? listScrollParents(o.contextElement) : [],
3325
3392
  popper: listScrollParents(l)
3326
3393
  };
3327
- var b = orderModifiers(mergeByName([].concat(i, u.options.modifiers)));
3328
- return u.orderedModifiers = b.filter(function(m) {
3329
- return m.enabled;
3330
- }), g(), p.update();
3394
+ var y = orderModifiers(mergeByName([].concat(i, u.options.modifiers)));
3395
+ return u.orderedModifiers = y.filter(function(f) {
3396
+ return f.enabled;
3397
+ }), v(), b.update();
3331
3398
  },
3332
3399
  // Sync update – it will always be executed, even if not necessary. This
3333
3400
  // is useful for low frequency updates where sync behavior simplifies the
@@ -3335,26 +3402,26 @@ function popperGenerator(e) {
3335
3402
  // For high frequency updates (e.g. `resize` and `scroll` events), always
3336
3403
  // prefer the async Popper#update method
3337
3404
  forceUpdate: function() {
3338
- if (!f) {
3339
- var y = u.elements, _ = y.reference, b = y.popper;
3340
- if (areValidElements(_, b)) {
3405
+ if (!h) {
3406
+ var E = u.elements, g = E.reference, y = E.popper;
3407
+ if (areValidElements(g, y)) {
3341
3408
  u.rects = {
3342
- reference: getCompositeRect(_, getOffsetParent(b), u.options.strategy === "fixed"),
3343
- popper: getLayoutRect(b)
3344
- }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(D) {
3345
- return u.modifiersData[D.name] = Object.assign({}, D.data);
3409
+ reference: getCompositeRect(g, getOffsetParent(y), u.options.strategy === "fixed"),
3410
+ popper: getLayoutRect(y)
3411
+ }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(C) {
3412
+ return u.modifiersData[C.name] = Object.assign({}, C.data);
3346
3413
  });
3347
- for (var m = 0; m < u.orderedModifiers.length; m++) {
3414
+ for (var f = 0; f < u.orderedModifiers.length; f++) {
3348
3415
  if (u.reset === !0) {
3349
- u.reset = !1, m = -1;
3416
+ u.reset = !1, f = -1;
3350
3417
  continue;
3351
3418
  }
3352
- var w = u.orderedModifiers[m], E = w.fn, x = w.options, S = x === void 0 ? {} : x, A = w.name;
3353
- typeof E == "function" && (u = E({
3419
+ var p = u.orderedModifiers[f], _ = p.fn, w = p.options, D = w === void 0 ? {} : w, A = p.name;
3420
+ typeof _ == "function" && (u = _({
3354
3421
  state: u,
3355
- options: S,
3422
+ options: D,
3356
3423
  name: A,
3357
- instance: p
3424
+ instance: b
3358
3425
  }) || u);
3359
3426
  }
3360
3427
  }
@@ -3363,40 +3430,40 @@ function popperGenerator(e) {
3363
3430
  // Async and optimistically optimized update – it will not be executed if
3364
3431
  // not necessary (debounced to run at most once-per-tick)
3365
3432
  update: debounce(function() {
3366
- return new Promise(function(h) {
3367
- p.forceUpdate(), h(u);
3433
+ return new Promise(function(m) {
3434
+ b.forceUpdate(), m(u);
3368
3435
  });
3369
3436
  }),
3370
3437
  destroy: function() {
3371
- v(), f = !0;
3438
+ x(), h = !0;
3372
3439
  }
3373
3440
  };
3374
3441
  if (!areValidElements(o, l))
3375
- return p;
3376
- p.setOptions(c).then(function(h) {
3377
- !f && c.onFirstUpdate && c.onFirstUpdate(h);
3442
+ return b;
3443
+ b.setOptions(c).then(function(m) {
3444
+ !h && c.onFirstUpdate && c.onFirstUpdate(m);
3378
3445
  });
3379
- function g() {
3380
- u.orderedModifiers.forEach(function(h) {
3381
- var y = h.name, _ = h.options, b = _ === void 0 ? {} : _, m = h.effect;
3382
- if (typeof m == "function") {
3383
- var w = m({
3446
+ function v() {
3447
+ u.orderedModifiers.forEach(function(m) {
3448
+ var E = m.name, g = m.options, y = g === void 0 ? {} : g, f = m.effect;
3449
+ if (typeof f == "function") {
3450
+ var p = f({
3384
3451
  state: u,
3385
- name: y,
3386
- instance: p,
3387
- options: b
3388
- }), E = function() {
3452
+ name: E,
3453
+ instance: b,
3454
+ options: y
3455
+ }), _ = function() {
3389
3456
  };
3390
- d.push(w || E);
3457
+ d.push(p || _);
3391
3458
  }
3392
3459
  });
3393
3460
  }
3394
- function v() {
3395
- d.forEach(function(h) {
3396
- return h();
3461
+ function x() {
3462
+ d.forEach(function(m) {
3463
+ return m();
3397
3464
  }), d = [];
3398
3465
  }
3399
- return p;
3466
+ return b;
3400
3467
  };
3401
3468
  }
3402
3469
  var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1], createPopper = /* @__PURE__ */ popperGenerator({
@@ -4864,8 +4931,8 @@ function parseFormatString(e) {
4864
4931
  parser: function(s, o) {
4865
4932
  var l = s.split(reNonDateParts).reduce(function(c, u, d) {
4866
4933
  if (u.length > 0 && n[d]) {
4867
- var f = n[d][0];
4868
- f === "M" ? c.m = u : f !== "D" && (c[f] = u);
4934
+ var h = n[d][0];
4935
+ h === "M" ? c.m = u : h !== "D" && (c[h] = u);
4869
4936
  }
4870
4937
  return c;
4871
4938
  }, {});
@@ -5017,60 +5084,60 @@ function validateViewId(e, t) {
5017
5084
  return i >= 0 && i <= n ? i : t;
5018
5085
  }
5019
5086
  function processOptions(e, t) {
5020
- 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, f = a.pickLevel, p = a.startView, g = a.weekStart;
5087
+ 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, b = a.startView, v = a.weekStart;
5021
5088
  if (n.language) {
5022
- var v;
5023
- if (n.language !== o && (r[n.language] ? v = n.language : (v = n.language.split("-")[0], r[v] === void 0 && (v = !1))), delete n.language, v) {
5024
- o = i.language = v;
5025
- var h = l || r[defaultLang];
5089
+ var x;
5090
+ if (n.language !== o && (r[n.language] ? x = n.language : (x = n.language.split("-")[0], r[x] === void 0 && (x = !1))), delete n.language, x) {
5091
+ o = i.language = x;
5092
+ var m = l || r[defaultLang];
5026
5093
  l = Object.assign({
5027
5094
  format: defaultFormat,
5028
5095
  weekStart: defaultWeekStart
5029
- }, r[defaultLang]), o !== defaultLang && Object.assign(l, r[o]), i.locale = l, s === h.format && (s = i.format = l.format), g === h.weekStart && (g = i.weekStart = l.weekStart, i.weekEnd = calcEndOfWeek(l.weekStart));
5096
+ }, r[defaultLang]), o !== defaultLang && Object.assign(l, r[o]), i.locale = l, s === m.format && (s = i.format = l.format), v === m.weekStart && (v = i.weekStart = l.weekStart, i.weekEnd = calcEndOfWeek(l.weekStart));
5030
5097
  }
5031
5098
  }
5032
5099
  if (n.format) {
5033
- var y = typeof n.format.toDisplay == "function", _ = typeof n.format.toValue == "function", b = reFormatTokens.test(n.format);
5034
- (y && _ || b) && (s = i.format = n.format), delete n.format;
5100
+ var E = typeof n.format.toDisplay == "function", g = typeof n.format.toValue == "function", y = reFormatTokens.test(n.format);
5101
+ (E && g || y) && (s = i.format = n.format), delete n.format;
5035
5102
  }
5036
- var m = d, w = c;
5037
- if (n.minDate !== void 0 && (m = n.minDate === null ? dateValue(0, 0, 1) : validateDate(n.minDate, s, l, m), delete n.minDate), n.maxDate !== void 0 && (w = n.maxDate === null ? void 0 : validateDate(n.maxDate, s, l, w), delete n.maxDate), w < m ? (d = i.minDate = w, c = i.maxDate = m) : (d !== m && (d = i.minDate = m), c !== w && (c = i.maxDate = w)), n.datesDisabled && (i.datesDisabled = n.datesDisabled.reduce(function(I, R) {
5038
- var k = parseDate(R, s, l);
5039
- return k !== void 0 ? pushUnique(I, k) : I;
5103
+ var f = d, p = c;
5104
+ 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(R, H) {
5105
+ var I = parseDate(H, s, l);
5106
+ return I !== void 0 ? pushUnique(R, I) : R;
5040
5107
  }, []), delete n.datesDisabled), n.defaultViewDate !== void 0) {
5041
- var E = parseDate(n.defaultViewDate, s, l);
5042
- E !== void 0 && (i.defaultViewDate = E), delete n.defaultViewDate;
5108
+ var _ = parseDate(n.defaultViewDate, s, l);
5109
+ _ !== void 0 && (i.defaultViewDate = _), delete n.defaultViewDate;
5043
5110
  }
5044
5111
  if (n.weekStart !== void 0) {
5045
- var x = Number(n.weekStart) % 7;
5046
- isNaN(x) || (g = i.weekStart = x, i.weekEnd = calcEndOfWeek(x)), delete n.weekStart;
5112
+ var w = Number(n.weekStart) % 7;
5113
+ isNaN(w) || (v = i.weekStart = w, i.weekEnd = calcEndOfWeek(w)), delete n.weekStart;
5047
5114
  }
5048
5115
  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) {
5049
- var S = parseInt(n.maxNumberOfDates, 10);
5050
- S >= 0 && (i.maxNumberOfDates = S, i.multidate = S !== 1), delete n.maxNumberOfDates;
5116
+ var D = parseInt(n.maxNumberOfDates, 10);
5117
+ D >= 0 && (i.maxNumberOfDates = D, i.multidate = D !== 1), delete n.maxNumberOfDates;
5051
5118
  }
5052
5119
  n.dateDelimiter && (i.dateDelimiter = String(n.dateDelimiter), delete n.dateDelimiter);
5053
- var A = f;
5054
- n.pickLevel !== void 0 && (A = validateViewId(n.pickLevel, 2), delete n.pickLevel), A !== f && (f = i.pickLevel = A);
5055
- var D = u;
5056
- n.maxView !== void 0 && (D = validateViewId(n.maxView, u), delete n.maxView), D = f > D ? f : D, D !== u && (u = i.maxView = D);
5057
- var O = p;
5058
- if (n.startView !== void 0 && (O = validateViewId(n.startView, O), delete n.startView), O < f ? O = f : O > u && (O = u), O !== p && (i.startView = O), n.prevArrow) {
5059
- var H = parseHTML(n.prevArrow);
5060
- H.childNodes.length > 0 && (i.prevArrow = H.childNodes), delete n.prevArrow;
5120
+ var A = h;
5121
+ n.pickLevel !== void 0 && (A = validateViewId(n.pickLevel, 2), delete n.pickLevel), A !== h && (h = i.pickLevel = A);
5122
+ var C = u;
5123
+ n.maxView !== void 0 && (C = validateViewId(n.maxView, u), delete n.maxView), C = h > C ? h : C, C !== u && (u = i.maxView = C);
5124
+ var S = b;
5125
+ if (n.startView !== void 0 && (S = validateViewId(n.startView, S), delete n.startView), S < h ? S = h : S > u && (S = u), S !== b && (i.startView = S), n.prevArrow) {
5126
+ var O = parseHTML(n.prevArrow);
5127
+ O.childNodes.length > 0 && (i.prevArrow = O.childNodes), delete n.prevArrow;
5061
5128
  }
5062
5129
  if (n.nextArrow) {
5063
5130
  var T = parseHTML(n.nextArrow);
5064
5131
  T.childNodes.length > 0 && (i.nextArrow = T.childNodes), delete n.nextArrow;
5065
5132
  }
5066
5133
  if (n.disableTouchKeyboard !== void 0 && (i.disableTouchKeyboard = "ontouchstart" in document && !!n.disableTouchKeyboard, delete n.disableTouchKeyboard), n.orientation) {
5067
- var F = n.orientation.toLowerCase().split(/\s+/g);
5134
+ var L = n.orientation.toLowerCase().split(/\s+/g);
5068
5135
  i.orientation = {
5069
- x: F.find(function(I) {
5070
- return I === "left" || I === "right";
5136
+ x: L.find(function(R) {
5137
+ return R === "left" || R === "right";
5071
5138
  }) || "auto",
5072
- y: F.find(function(I) {
5073
- return I === "top" || I === "bottom";
5139
+ y: L.find(function(R) {
5140
+ return R === "top" || R === "bottom";
5074
5141
  }) || "auto"
5075
5142
  }, delete n.orientation;
5076
5143
  }
@@ -5082,8 +5149,8 @@ function processOptions(e, t) {
5082
5149
  }
5083
5150
  delete n.todayBtnMode;
5084
5151
  }
5085
- return Object.keys(n).forEach(function(I) {
5086
- n[I] !== void 0 && hasProperty(defaultOptions, I) && (i[I] = n[I]);
5152
+ return Object.keys(n).forEach(function(R) {
5153
+ n[R] !== void 0 && hasProperty(defaultOptions, R) && (i[R] = n[R]);
5087
5154
  }), i;
5088
5155
  }
5089
5156
  var pickerTemplate = optimizeTemplateHTML(`<div class="datepicker hidden">
@@ -5227,8 +5294,8 @@ var pickerTemplate = optimizeTemplateHTML(`<div class="datepicker hidden">
5227
5294
  Array.from(this.grid.children).forEach(function(s, o) {
5228
5295
  var l = s.classList, c = addDays(i.start, o), u = new Date(c), d = u.getDay();
5229
5296
  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) {
5230
- var f = _slicedToArray(i.range, 2), p = f[0], g = f[1];
5231
- c > p && c < g && (l.add("range", "bg-neutral-tertiary-medium"), l.remove("rounded-base", "rounded-s-base", "rounded-e-base")), c === p && (l.add("range-start", "bg-brand", "rounded-s-base"), l.remove("rounded-base", "rounded-e-base")), c === g && (l.add("range-end", "bg-neutral-tertiary-medium", "rounded-e-base"), l.remove("rounded-base", "rounded-s-base"));
5297
+ var h = _slicedToArray(i.range, 2), b = h[0], v = h[1];
5298
+ c > b && c < v && (l.add("range", "bg-neutral-tertiary-medium"), l.remove("rounded-base", "rounded-s-base", "rounded-e-base")), c === b && (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"));
5232
5299
  }
5233
5300
  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);
5234
5301
  });
@@ -5328,12 +5395,12 @@ var MonthsView = /* @__PURE__ */ (function(e) {
5328
5395
  this.disabled = [], this.picker.setViewSwitchLabel(this.year), this.picker.setPrevBtnDisabled(this.year <= this.minYear), this.picker.setNextBtnDisabled(this.year >= this.maxYear);
5329
5396
  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);
5330
5397
  Array.from(this.grid.children).forEach(function(c, u) {
5331
- var d = c.classList, f = dateValue(i.year, u, 1);
5332
- 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 = f), c.textContent = i.monthNames[u], (a || s && u < i.minMonth || o && u > i.maxMonth) && d.add("disabled"), l) {
5333
- var p = _slicedToArray(l, 2), g = p[0], v = p[1];
5334
- u > g && u < v && d.add("range"), u === g && d.add("range-start"), u === v && d.add("range-end");
5398
+ var d = c.classList, h = dateValue(i.year, u, 1);
5399
+ 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) {
5400
+ var b = _slicedToArray(l, 2), v = b[0], x = b[1];
5401
+ u > v && u < x && d.add("range"), u === v && d.add("range-start"), u === x && d.add("range-end");
5335
5402
  }
5336
- 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, f);
5403
+ 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);
5337
5404
  });
5338
5405
  }
5339
5406
  // Update the view UI by applying the changes of selected and focused items
@@ -5552,19 +5619,19 @@ function getTextDirection(e) {
5552
5619
  var Picker = /* @__PURE__ */ (function() {
5553
5620
  function e(t) {
5554
5621
  _classCallCheck(this, e), this.datepicker = t;
5555
- 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], f = c[2], p = _slicedToArray(o.firstChild.children, 2), g = p[0], v = p[1], h = {
5622
+ 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], b = _slicedToArray(o.firstChild.children, 2), v = b[0], x = b[1], m = {
5556
5623
  title: l,
5557
5624
  prevBtn: u,
5558
5625
  viewSwitch: d,
5559
- nextBtn: f,
5560
- todayBtn: g,
5561
- clearBtn: v
5626
+ nextBtn: h,
5627
+ todayBtn: v,
5628
+ clearBtn: x
5562
5629
  };
5563
- this.main = s, this.controls = h;
5564
- var y = t.inline ? "inline" : "dropdown";
5565
- i.classList.add("datepicker-".concat(y)), y === "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), {
5630
+ this.main = s, this.controls = m;
5631
+ var E = t.inline ? "inline" : "dropdown";
5632
+ i.classList.add("datepicker-".concat(E)), E === "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), {
5566
5633
  capture: !0
5567
- }], [s, "click", onClickView.bind(null, t)], [h.viewSwitch, "click", onClickViewSwitch.bind(null, t)], [h.prevBtn, "click", onClickPrevBtn.bind(null, t)], [h.nextBtn, "click", onClickNextBtn.bind(null, t)], [h.todayBtn, "click", onClickTodayBtn.bind(null, t)], [h.clearBtn, "click", onClickClearBtn.bind(null, t)]]), this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {
5634
+ }], [s, "click", onClickView.bind(null, t)], [m.viewSwitch, "click", onClickViewSwitch.bind(null, t)], [m.prevBtn, "click", onClickPrevBtn.bind(null, t)], [m.nextBtn, "click", onClickNextBtn.bind(null, t)], [m.todayBtn, "click", onClickTodayBtn.bind(null, t)], [m.clearBtn, "click", onClickClearBtn.bind(null, t)]]), this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {
5568
5635
  id: 2,
5569
5636
  name: "years",
5570
5637
  cellClass: "year",
@@ -5609,8 +5676,8 @@ var Picker = /* @__PURE__ */ (function() {
5609
5676
  }, {
5610
5677
  key: "place",
5611
5678
  value: function() {
5612
- 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, f = l.getBoundingClientRect(), p = f.left, g = f.top, v = f.width, h = o.getBoundingClientRect(), y = h.left, _ = h.top, b = h.width, m = h.height, w = s.orientation, E = w.x, x = w.y, S, A, D;
5613
- l === document.body ? (S = window.scrollY, A = y + window.scrollX, D = _ + S) : (S = l.scrollTop, A = y - p, D = _ - g + S), E === "auto" && (A < 0 ? (E = "left", A = 10) : A + u > v ? E = "right" : E = getTextDirection(o) === "rtl" ? "right" : "left"), E === "right" && (A -= u - b), x === "auto" && (x = D - d < S ? "bottom" : "top"), x === "top" ? D -= d : D += m, i.remove("datepicker-orient-top", "datepicker-orient-bottom", "datepicker-orient-right", "datepicker-orient-left"), i.add("datepicker-orient-".concat(x), "datepicker-orient-".concat(E)), r.top = D && "".concat(D, "px"), r.left = A && "".concat(A, "px");
5679
+ 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(), b = h.left, v = h.top, x = h.width, m = o.getBoundingClientRect(), E = m.left, g = m.top, y = m.width, f = m.height, p = s.orientation, _ = p.x, w = p.y, D, A, C;
5680
+ l === document.body ? (D = window.scrollY, A = E + window.scrollX, C = g + D) : (D = l.scrollTop, A = E - b, C = g - v + D), _ === "auto" && (A < 0 ? (_ = "left", A = 10) : A + u > x ? _ = "right" : _ = getTextDirection(o) === "rtl" ? "right" : "left"), _ === "right" && (A -= u - y), w === "auto" && (w = C - d < D ? "bottom" : "top"), w === "top" ? C -= d : C += 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 = C && "".concat(C, "px"), r.left = A && "".concat(A, "px");
5614
5681
  }
5615
5682
  }, {
5616
5683
  key: "setViewSwitchLabel",
@@ -5678,8 +5745,8 @@ function moveByArrowKey(e, t, n, i) {
5678
5745
  break;
5679
5746
  case 1:
5680
5747
  o = addMonths(o, i ? n * 4 : n), l = addMonths, c = function(d) {
5681
- var f = new Date(d), p = a.year, g = a.disabled;
5682
- return f.getFullYear() === p && g.includes(f.getMonth());
5748
+ var h = new Date(d), b = a.year, v = a.disabled;
5749
+ return h.getFullYear() === b && v.includes(h.getMonth());
5683
5750
  };
5684
5751
  break;
5685
5752
  default:
@@ -5870,12 +5937,12 @@ var Datepicker$1 = /* @__PURE__ */ (function() {
5870
5937
  this.dates = [];
5871
5938
  var d = processInputDates(this, o);
5872
5939
  d && d.length > 0 && (this.dates = d), s && (s.value = stringifyDates(this.dates, r));
5873
- var f = this.picker = new Picker(this);
5940
+ var h = this.picker = new Picker(this);
5874
5941
  if (a)
5875
5942
  this.show();
5876
5943
  else {
5877
- var p = onClickOutside.bind(null, this), g = [[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", p], [document, "touchstart", p], [window, "resize", f.place.bind(f)]];
5878
- registerListeners(this, g);
5944
+ var b = 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", b], [document, "touchstart", b], [window, "resize", h.place.bind(h)]];
5945
+ registerListeners(this, v);
5879
5946
  }
5880
5947
  }
5881
5948
  return _createClass(e, [{
@@ -7263,68 +7330,68 @@ var htmx = (function() {
7263
7330
  // @ts-ignore
7264
7331
  end: u ? u.selectionEnd : null
7265
7332
  };
7266
- const f = makeSettleInfo(e);
7333
+ const h = makeSettleInfo(e);
7267
7334
  if (n.swapStyle === "textContent")
7268
7335
  e.textContent = t;
7269
7336
  else {
7270
- let g = makeFragment(t);
7271
- if (f.title = i.title || g.title, i.historyRequest && (g = g.querySelector("[hx-history-elt],[data-hx-history-elt]") || g), i.selectOOB) {
7272
- const v = i.selectOOB.split(",");
7273
- for (let h = 0; h < v.length; h++) {
7274
- const y = v[h].split(":", 2);
7275
- let _ = y[0].trim();
7276
- _.indexOf("#") === 0 && (_ = _.substring(1));
7277
- const b = y[1] || "true", m = g.querySelector("#" + _);
7278
- m && oobSwap(b, m, f, c);
7337
+ let v = makeFragment(t);
7338
+ if (h.title = i.title || v.title, i.historyRequest && (v = v.querySelector("[hx-history-elt],[data-hx-history-elt]") || v), i.selectOOB) {
7339
+ const x = i.selectOOB.split(",");
7340
+ for (let m = 0; m < x.length; m++) {
7341
+ const E = x[m].split(":", 2);
7342
+ let g = E[0].trim();
7343
+ g.indexOf("#") === 0 && (g = g.substring(1));
7344
+ const y = E[1] || "true", f = v.querySelector("#" + g);
7345
+ f && oobSwap(y, f, h, c);
7279
7346
  }
7280
7347
  }
7281
- if (findAndSwapOobElements(g, f, c), forEach(
7282
- findAll(g, "template"),
7348
+ if (findAndSwapOobElements(v, h, c), forEach(
7349
+ findAll(v, "template"),
7283
7350
  /** @param {HTMLTemplateElement} template */
7284
- function(v) {
7285
- v.content && findAndSwapOobElements(v.content, f, c) && v.remove();
7351
+ function(x) {
7352
+ x.content && findAndSwapOobElements(x.content, h, c) && x.remove();
7286
7353
  }
7287
7354
  ), i.select) {
7288
- const v = getDocument().createDocumentFragment();
7289
- forEach(g.querySelectorAll(i.select), function(h) {
7290
- v.appendChild(h);
7291
- }), g = v;
7355
+ const x = getDocument().createDocumentFragment();
7356
+ forEach(v.querySelectorAll(i.select), function(m) {
7357
+ x.appendChild(m);
7358
+ }), v = x;
7292
7359
  }
7293
- handlePreservedElements(g), swapWithStyle(n.swapStyle, i.contextElement, e, g, f), restorePreservedElements();
7360
+ handlePreservedElements(v), swapWithStyle(n.swapStyle, i.contextElement, e, v, h), restorePreservedElements();
7294
7361
  }
7295
7362
  if (d.elt && !bodyContains(d.elt) && getRawAttribute(d.elt, "id")) {
7296
- const g = document.getElementById(getRawAttribute(d.elt, "id")), v = { preventScroll: n.focusScroll !== void 0 ? !n.focusScroll : !htmx.config.defaultFocusScroll };
7297
- if (g) {
7298
- if (d.start && g.setSelectionRange)
7363
+ const v = document.getElementById(getRawAttribute(d.elt, "id")), x = { preventScroll: n.focusScroll !== void 0 ? !n.focusScroll : !htmx.config.defaultFocusScroll };
7364
+ if (v) {
7365
+ if (d.start && v.setSelectionRange)
7299
7366
  try {
7300
- g.setSelectionRange(d.start, d.end);
7367
+ v.setSelectionRange(d.start, d.end);
7301
7368
  } catch {
7302
7369
  }
7303
- g.focus(v);
7370
+ v.focus(x);
7304
7371
  }
7305
7372
  }
7306
- e.classList.remove(htmx.config.swappingClass), forEach(f.elts, function(g) {
7307
- g.classList && g.classList.add(htmx.config.settlingClass), triggerEvent(g, "htmx:afterSwap", i.eventInfo);
7308
- }), maybeCall(i.afterSwapCallback), n.ignoreTitle || handleTitle(f.title);
7309
- const p = function() {
7310
- if (forEach(f.tasks, function(g) {
7311
- g.call();
7312
- }), forEach(f.elts, function(g) {
7313
- g.classList && g.classList.remove(htmx.config.settlingClass), triggerEvent(g, "htmx:afterSettle", i.eventInfo);
7373
+ e.classList.remove(htmx.config.swappingClass), forEach(h.elts, function(v) {
7374
+ v.classList && v.classList.add(htmx.config.settlingClass), triggerEvent(v, "htmx:afterSwap", i.eventInfo);
7375
+ }), maybeCall(i.afterSwapCallback), n.ignoreTitle || handleTitle(h.title);
7376
+ const b = function() {
7377
+ if (forEach(h.tasks, function(v) {
7378
+ v.call();
7379
+ }), forEach(h.elts, function(v) {
7380
+ v.classList && v.classList.remove(htmx.config.settlingClass), triggerEvent(v, "htmx:afterSettle", i.eventInfo);
7314
7381
  }), i.anchor) {
7315
- const g = asElement(resolveTarget("#" + i.anchor));
7316
- g && g.scrollIntoView({ block: "start", behavior: "auto" });
7382
+ const v = asElement(resolveTarget("#" + i.anchor));
7383
+ v && v.scrollIntoView({ block: "start", behavior: "auto" });
7317
7384
  }
7318
- updateScrollState(f.elts, n), maybeCall(i.afterSettleCallback), maybeCall(r);
7385
+ updateScrollState(h.elts, n), maybeCall(i.afterSettleCallback), maybeCall(r);
7319
7386
  };
7320
- n.settleDelay > 0 ? getWindow().setTimeout(p, n.settleDelay) : p();
7387
+ n.settleDelay > 0 ? getWindow().setTimeout(b, n.settleDelay) : b();
7321
7388
  }, o = htmx.config.globalViewTransitions;
7322
7389
  n.hasOwnProperty("transition") && (o = n.transition);
7323
7390
  const l = i.contextElement || getDocument();
7324
7391
  if (o && triggerEvent(l, "htmx:beforeTransition", i.eventInfo) && typeof Promise < "u" && // @ts-ignore experimental feature atm
7325
7392
  document.startViewTransition) {
7326
- const c = new Promise(function(d, f) {
7327
- r = d, a = f;
7393
+ const c = new Promise(function(d, h) {
7394
+ r = d, a = h;
7328
7395
  }), u = s;
7329
7396
  s = function() {
7330
7397
  document.startViewTransition(function() {
@@ -7450,8 +7517,8 @@ var htmx = (function() {
7450
7517
  var s = consumeUntil(r, WHITESPACE_OR_COMMA);
7451
7518
  if (s === "closest" || s === "find" || s === "next" || s === "previous") {
7452
7519
  r.shift();
7453
- const p = consumeCSSSelector(r);
7454
- p.length > 0 && (s += " " + p);
7520
+ const b = consumeCSSSelector(r);
7521
+ b.length > 0 && (s += " " + b);
7455
7522
  }
7456
7523
  }
7457
7524
  c.from = s;
@@ -7569,10 +7636,10 @@ var htmx = (function() {
7569
7636
  a.triggeredOnce = !0;
7570
7637
  }
7571
7638
  if (i.changed) {
7572
- const d = c.target, f = d.value, p = a.lastValue.get(i);
7573
- if (p.has(d) && p.get(d) === f)
7639
+ const d = c.target, h = d.value, b = a.lastValue.get(i);
7640
+ if (b.has(d) && b.get(d) === h)
7574
7641
  return;
7575
- p.set(d, f);
7642
+ b.set(d, h);
7576
7643
  }
7577
7644
  if (a.delayed && clearTimeout(a.delayed), a.throttle)
7578
7645
  return;
@@ -8280,8 +8347,8 @@ var htmx = (function() {
8280
8347
  function issueAjaxRequest(e, t, n, i, r, a) {
8281
8348
  let s = null, o = null;
8282
8349
  if (r = r ?? {}, r.returnPromise && typeof Promise < "u")
8283
- var l = new Promise(function(C, L) {
8284
- s = C, o = L;
8350
+ var l = new Promise(function(k, M) {
8351
+ s = k, o = M;
8285
8352
  });
8286
8353
  n == null && (n = getDocument().body);
8287
8354
  const c = r.handler || handleAjaxResponse, u = r.select || null;
@@ -8290,115 +8357,115 @@ var htmx = (function() {
8290
8357
  const d = r.targetOverride || asElement(getTarget(n));
8291
8358
  if (d == null || d == DUMMY_ELT)
8292
8359
  return triggerErrorEvent(n, "htmx:targetError", { target: getClosestAttributeValue(n, "hx-target") }), maybeCall(o), l;
8293
- let f = getInternalData(n);
8294
- const p = f.lastButtonClicked;
8295
- if (p) {
8296
- const C = getRawAttribute(p, "formaction");
8297
- C != null && (t = C);
8298
- const L = getRawAttribute(p, "formmethod");
8299
- if (L != null)
8300
- if (VERBS.includes(L.toLowerCase()))
8360
+ let h = getInternalData(n);
8361
+ const b = h.lastButtonClicked;
8362
+ if (b) {
8363
+ const k = getRawAttribute(b, "formaction");
8364
+ k != null && (t = k);
8365
+ const M = getRawAttribute(b, "formmethod");
8366
+ if (M != null)
8367
+ if (VERBS.includes(M.toLowerCase()))
8301
8368
  e = /** @type HttpVerb */
8302
- L;
8369
+ M;
8303
8370
  else
8304
8371
  return maybeCall(s), l;
8305
8372
  }
8306
- const g = getClosestAttributeValue(n, "hx-confirm");
8307
- if (a === void 0 && triggerEvent(n, "htmx:confirm", { target: d, elt: n, path: t, verb: e, triggeringEvent: i, etc: r, issueRequest: function(M) {
8308
- return issueAjaxRequest(e, t, n, i, r, !!M);
8309
- }, question: g }) === !1)
8373
+ const v = getClosestAttributeValue(n, "hx-confirm");
8374
+ if (a === void 0 && triggerEvent(n, "htmx:confirm", { target: d, elt: n, path: t, verb: e, triggeringEvent: i, etc: r, issueRequest: function(F) {
8375
+ return issueAjaxRequest(e, t, n, i, r, !!F);
8376
+ }, question: v }) === !1)
8310
8377
  return maybeCall(s), l;
8311
- let v = n, h = getClosestAttributeValue(n, "hx-sync"), y = null, _ = !1;
8312
- if (h) {
8313
- const C = h.split(":"), L = C[0].trim();
8314
- if (L === "this" ? v = findThisElement(n, "hx-sync") : v = asElement(querySelectorExt(n, L)), h = (C[1] || "drop").trim(), f = getInternalData(v), h === "drop" && f.xhr && f.abortable !== !0)
8378
+ let x = n, m = getClosestAttributeValue(n, "hx-sync"), E = null, g = !1;
8379
+ if (m) {
8380
+ const k = m.split(":"), M = k[0].trim();
8381
+ if (M === "this" ? x = findThisElement(n, "hx-sync") : x = asElement(querySelectorExt(n, M)), m = (k[1] || "drop").trim(), h = getInternalData(x), m === "drop" && h.xhr && h.abortable !== !0)
8315
8382
  return maybeCall(s), l;
8316
- if (h === "abort") {
8317
- if (f.xhr)
8383
+ if (m === "abort") {
8384
+ if (h.xhr)
8318
8385
  return maybeCall(s), l;
8319
- _ = !0;
8320
- } else h === "replace" ? triggerEvent(v, "htmx:abort") : h.indexOf("queue") === 0 && (y = (h.split(" ")[1] || "last").trim());
8386
+ g = !0;
8387
+ } else m === "replace" ? triggerEvent(x, "htmx:abort") : m.indexOf("queue") === 0 && (E = (m.split(" ")[1] || "last").trim());
8321
8388
  }
8322
- if (f.xhr)
8323
- if (f.abortable)
8324
- triggerEvent(v, "htmx:abort");
8389
+ if (h.xhr)
8390
+ if (h.abortable)
8391
+ triggerEvent(x, "htmx:abort");
8325
8392
  else {
8326
- if (y == null) {
8393
+ if (E == null) {
8327
8394
  if (i) {
8328
- const C = getInternalData(i);
8329
- C && C.triggerSpec && C.triggerSpec.queue && (y = C.triggerSpec.queue);
8395
+ const k = getInternalData(i);
8396
+ k && k.triggerSpec && k.triggerSpec.queue && (E = k.triggerSpec.queue);
8330
8397
  }
8331
- y == null && (y = "last");
8398
+ E == null && (E = "last");
8332
8399
  }
8333
- return f.queuedRequests == null && (f.queuedRequests = []), y === "first" && f.queuedRequests.length === 0 ? f.queuedRequests.push(function() {
8400
+ return h.queuedRequests == null && (h.queuedRequests = []), E === "first" && h.queuedRequests.length === 0 ? h.queuedRequests.push(function() {
8334
8401
  issueAjaxRequest(e, t, n, i, r);
8335
- }) : y === "all" ? f.queuedRequests.push(function() {
8402
+ }) : E === "all" ? h.queuedRequests.push(function() {
8336
8403
  issueAjaxRequest(e, t, n, i, r);
8337
- }) : y === "last" && (f.queuedRequests = [], f.queuedRequests.push(function() {
8404
+ }) : E === "last" && (h.queuedRequests = [], h.queuedRequests.push(function() {
8338
8405
  issueAjaxRequest(e, t, n, i, r);
8339
8406
  })), maybeCall(s), l;
8340
8407
  }
8341
- const b = new XMLHttpRequest();
8342
- f.xhr = b, f.abortable = _;
8343
- const m = function() {
8344
- f.xhr = null, f.abortable = !1, f.queuedRequests != null && f.queuedRequests.length > 0 && f.queuedRequests.shift()();
8345
- }, w = getClosestAttributeValue(n, "hx-prompt");
8346
- if (w) {
8347
- var E = prompt(w);
8348
- if (E === null || !triggerEvent(n, "htmx:prompt", { prompt: E, target: d }))
8349
- return maybeCall(s), m(), l;
8350
- }
8351
- if (g && !a && !confirm(g))
8352
- return maybeCall(s), m(), l;
8353
- let x = getHeaders(n, d, E);
8354
- e !== "get" && !usesFormData(n) && (x["Content-Type"] = "application/x-www-form-urlencoded"), r.headers && (x = mergeObjects(x, r.headers));
8355
- const S = getInputValues(n, e);
8356
- let A = S.errors;
8357
- const D = S.formData;
8358
- r.values && overrideFormData(D, formDataFromObject(r.values));
8359
- const O = formDataFromObject(getExpressionVars(n, i)), H = overrideFormData(D, O);
8360
- let T = filterValues(H, n);
8408
+ const y = new XMLHttpRequest();
8409
+ h.xhr = y, h.abortable = g;
8410
+ const f = function() {
8411
+ h.xhr = null, h.abortable = !1, h.queuedRequests != null && h.queuedRequests.length > 0 && h.queuedRequests.shift()();
8412
+ }, p = getClosestAttributeValue(n, "hx-prompt");
8413
+ if (p) {
8414
+ var _ = prompt(p);
8415
+ if (_ === null || !triggerEvent(n, "htmx:prompt", { prompt: _, target: d }))
8416
+ return maybeCall(s), f(), l;
8417
+ }
8418
+ if (v && !a && !confirm(v))
8419
+ return maybeCall(s), f(), l;
8420
+ let w = getHeaders(n, d, _);
8421
+ e !== "get" && !usesFormData(n) && (w["Content-Type"] = "application/x-www-form-urlencoded"), r.headers && (w = mergeObjects(w, r.headers));
8422
+ const D = getInputValues(n, e);
8423
+ let A = D.errors;
8424
+ const C = D.formData;
8425
+ r.values && overrideFormData(C, formDataFromObject(r.values));
8426
+ const S = formDataFromObject(getExpressionVars(n, i)), O = overrideFormData(C, S);
8427
+ let T = filterValues(O, n);
8361
8428
  htmx.config.getCacheBusterParam && e === "get" && T.set("org.htmx.cache-buster", getRawAttribute(d, "id") || "true"), (t == null || t === "") && (t = location.href);
8362
- const F = getValuesForElement(n, "hx-request"), I = getInternalData(n).boosted;
8363
- let R = htmx.config.methodsThatUseUrlParams.indexOf(e) >= 0;
8364
- const k = {
8365
- boosted: I,
8366
- useUrlParams: R,
8429
+ const L = getValuesForElement(n, "hx-request"), R = getInternalData(n).boosted;
8430
+ let H = htmx.config.methodsThatUseUrlParams.indexOf(e) >= 0;
8431
+ const I = {
8432
+ boosted: R,
8433
+ useUrlParams: H,
8367
8434
  formData: T,
8368
8435
  parameters: formDataProxy(T),
8369
- unfilteredFormData: H,
8370
- unfilteredParameters: formDataProxy(H),
8371
- headers: x,
8436
+ unfilteredFormData: O,
8437
+ unfilteredParameters: formDataProxy(O),
8438
+ headers: w,
8372
8439
  elt: n,
8373
8440
  target: d,
8374
8441
  verb: e,
8375
8442
  errors: A,
8376
- withCredentials: r.credentials || F.credentials || htmx.config.withCredentials,
8377
- timeout: r.timeout || F.timeout || htmx.config.timeout,
8443
+ withCredentials: r.credentials || L.credentials || htmx.config.withCredentials,
8444
+ timeout: r.timeout || L.timeout || htmx.config.timeout,
8378
8445
  path: t,
8379
8446
  triggeringEvent: i
8380
8447
  };
8381
- if (!triggerEvent(n, "htmx:configRequest", k))
8382
- return maybeCall(s), m(), l;
8383
- if (t = k.path, e = k.verb, x = k.headers, T = formDataFromObject(k.parameters), A = k.errors, R = k.useUrlParams, A && A.length > 0)
8384
- return triggerEvent(n, "htmx:validation:halted", k), maybeCall(s), m(), l;
8448
+ if (!triggerEvent(n, "htmx:configRequest", I))
8449
+ return maybeCall(s), f(), l;
8450
+ if (t = I.path, e = I.verb, w = I.headers, T = formDataFromObject(I.parameters), A = I.errors, H = I.useUrlParams, A && A.length > 0)
8451
+ return triggerEvent(n, "htmx:validation:halted", I), maybeCall(s), f(), l;
8385
8452
  const W = t.split("#"), $ = W[0], q = W[1];
8386
8453
  let N = t;
8387
- if (R && (N = $, !T.keys().next().done && (N.indexOf("?") < 0 ? N += "?" : N += "&", N += urlEncode(T), q && (N += "#" + q))), !verifyPath(n, N, k))
8388
- return triggerErrorEvent(n, "htmx:invalidPath", k), maybeCall(o), m(), l;
8389
- if (b.open(e.toUpperCase(), N, !0), b.overrideMimeType("text/html"), b.withCredentials = k.withCredentials, b.timeout = k.timeout, !F.noHeaders) {
8390
- for (const C in x)
8391
- if (x.hasOwnProperty(C)) {
8392
- const L = x[C];
8393
- safelySetHeaderValue(b, C, L);
8454
+ if (H && (N = $, !T.keys().next().done && (N.indexOf("?") < 0 ? N += "?" : N += "&", N += urlEncode(T), q && (N += "#" + q))), !verifyPath(n, N, I))
8455
+ return triggerErrorEvent(n, "htmx:invalidPath", I), maybeCall(o), f(), l;
8456
+ if (y.open(e.toUpperCase(), N, !0), y.overrideMimeType("text/html"), y.withCredentials = I.withCredentials, y.timeout = I.timeout, !L.noHeaders) {
8457
+ for (const k in w)
8458
+ if (w.hasOwnProperty(k)) {
8459
+ const M = w[k];
8460
+ safelySetHeaderValue(y, k, M);
8394
8461
  }
8395
8462
  }
8396
8463
  const P = {
8397
- xhr: b,
8464
+ xhr: y,
8398
8465
  target: d,
8399
- requestConfig: k,
8466
+ requestConfig: I,
8400
8467
  etc: r,
8401
- boosted: I,
8468
+ boosted: R,
8402
8469
  select: u,
8403
8470
  pathInfo: {
8404
8471
  requestPath: t,
@@ -8407,45 +8474,45 @@ var htmx = (function() {
8407
8474
  anchor: q
8408
8475
  }
8409
8476
  };
8410
- if (b.onload = function() {
8477
+ if (y.onload = function() {
8411
8478
  try {
8412
- const C = hierarchyForElt(n);
8413
- if (P.pathInfo.responsePath = getPathFromResponse(b), c(n, P), P.keepIndicators !== !0 && removeRequestIndicators(j, V), triggerEvent(n, "htmx:afterRequest", P), triggerEvent(n, "htmx:afterOnLoad", P), !bodyContains(n)) {
8414
- let L = null;
8415
- for (; C.length > 0 && L == null; ) {
8416
- const M = C.shift();
8417
- bodyContains(M) && (L = M);
8479
+ const k = hierarchyForElt(n);
8480
+ if (P.pathInfo.responsePath = getPathFromResponse(y), c(n, P), P.keepIndicators !== !0 && removeRequestIndicators(j, V), triggerEvent(n, "htmx:afterRequest", P), triggerEvent(n, "htmx:afterOnLoad", P), !bodyContains(n)) {
8481
+ let M = null;
8482
+ for (; k.length > 0 && M == null; ) {
8483
+ const F = k.shift();
8484
+ bodyContains(F) && (M = F);
8418
8485
  }
8419
- L && (triggerEvent(L, "htmx:afterRequest", P), triggerEvent(L, "htmx:afterOnLoad", P));
8486
+ M && (triggerEvent(M, "htmx:afterRequest", P), triggerEvent(M, "htmx:afterOnLoad", P));
8420
8487
  }
8421
8488
  maybeCall(s);
8422
- } catch (C) {
8423
- throw triggerErrorEvent(n, "htmx:onLoadError", mergeObjects({ error: C }, P)), C;
8489
+ } catch (k) {
8490
+ throw triggerErrorEvent(n, "htmx:onLoadError", mergeObjects({ error: k }, P)), k;
8424
8491
  } finally {
8425
- m();
8492
+ f();
8426
8493
  }
8427
- }, b.onerror = function() {
8428
- removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:sendError", P), maybeCall(o), m();
8429
- }, b.onabort = function() {
8430
- removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:sendAbort", P), maybeCall(o), m();
8431
- }, b.ontimeout = function() {
8432
- removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:timeout", P), maybeCall(o), m();
8494
+ }, y.onerror = function() {
8495
+ removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:sendError", P), maybeCall(o), f();
8496
+ }, y.onabort = function() {
8497
+ removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:sendAbort", P), maybeCall(o), f();
8498
+ }, y.ontimeout = function() {
8499
+ removeRequestIndicators(j, V), triggerErrorEvent(n, "htmx:afterRequest", P), triggerErrorEvent(n, "htmx:timeout", P), maybeCall(o), f();
8433
8500
  }, !triggerEvent(n, "htmx:beforeRequest", P))
8434
- return maybeCall(s), m(), l;
8501
+ return maybeCall(s), f(), l;
8435
8502
  var j = addRequestIndicatorClasses(n), V = disableElements(n);
8436
- forEach(["loadstart", "loadend", "progress", "abort"], function(C) {
8437
- forEach([b, b.upload], function(L) {
8438
- L.addEventListener(C, function(M) {
8439
- triggerEvent(n, "htmx:xhr:" + C, {
8440
- lengthComputable: M.lengthComputable,
8441
- loaded: M.loaded,
8442
- total: M.total
8503
+ forEach(["loadstart", "loadend", "progress", "abort"], function(k) {
8504
+ forEach([y, y.upload], function(M) {
8505
+ M.addEventListener(k, function(F) {
8506
+ triggerEvent(n, "htmx:xhr:" + k, {
8507
+ lengthComputable: F.lengthComputable,
8508
+ loaded: F.loaded,
8509
+ total: F.total
8443
8510
  });
8444
8511
  });
8445
8512
  });
8446
8513
  }), triggerEvent(n, "htmx:beforeSend", P);
8447
- const B = R ? null : encodeParamsForBody(b, n, T);
8448
- return b.send(B), l;
8514
+ const B = H ? null : encodeParamsForBody(y, n, T);
8515
+ return y.send(B), l;
8449
8516
  }
8450
8517
  function determineHistoryUpdates(e, t) {
8451
8518
  const n = t.xhr;
@@ -8496,9 +8563,9 @@ var htmx = (function() {
8496
8563
  const r = t.etc, a = t.select;
8497
8564
  if (!triggerEvent(e, "htmx:beforeOnLoad", t)) return;
8498
8565
  if (hasHeader(n, /HX-Trigger:/i) && handleTriggerHeader(n, "HX-Trigger", e), hasHeader(n, /HX-Location:/i)) {
8499
- let _ = n.getResponseHeader("HX-Location");
8566
+ let g = n.getResponseHeader("HX-Location");
8500
8567
  var s = {};
8501
- _.indexOf("{") === 0 && (s = parseJSON(_), _ = s.path, delete s.path), s.push = s.push || "true", ajaxHelper("get", _, s);
8568
+ g.indexOf("{") === 0 && (s = parseJSON(g), g = s.path, delete s.path), s.push = s.push || "true", ajaxHelper("get", g, s);
8502
8569
  return;
8503
8570
  }
8504
8571
  const o = hasHeader(n, /HX-Refresh:/i) && n.getResponseHeader("HX-Refresh") === "true";
@@ -8511,42 +8578,42 @@ var htmx = (function() {
8511
8578
  return;
8512
8579
  }
8513
8580
  const l = determineHistoryUpdates(e, t), c = resolveResponseHandling(n), u = c.swap;
8514
- let d = !!c.error, f = htmx.config.ignoreTitle || c.ignoreTitle, p = c.select;
8581
+ let d = !!c.error, h = htmx.config.ignoreTitle || c.ignoreTitle, b = c.select;
8515
8582
  c.target && (t.target = resolveRetarget(e, c.target));
8516
- var g = r.swapOverride;
8517
- g == null && c.swapOverride && (g = c.swapOverride), hasHeader(n, /HX-Retarget:/i) && (t.target = resolveRetarget(e, n.getResponseHeader("HX-Retarget"))), hasHeader(n, /HX-Reswap:/i) && (g = n.getResponseHeader("HX-Reswap"));
8518
- var v = n.response, h = mergeObjects({
8583
+ var v = r.swapOverride;
8584
+ 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"));
8585
+ var x = n.response, m = mergeObjects({
8519
8586
  shouldSwap: u,
8520
- serverResponse: v,
8587
+ serverResponse: x,
8521
8588
  isError: d,
8522
- ignoreTitle: f,
8523
- selectOverride: p,
8524
- swapOverride: g
8589
+ ignoreTitle: h,
8590
+ selectOverride: b,
8591
+ swapOverride: v
8525
8592
  }, t);
8526
- if (!(c.event && !triggerEvent(i, c.event, h)) && triggerEvent(i, "htmx:beforeSwap", h)) {
8527
- if (i = h.target, v = h.serverResponse, d = h.isError, f = h.ignoreTitle, p = h.selectOverride, g = h.swapOverride, t.target = i, t.failed = d, t.successful = !d, h.shouldSwap) {
8528
- n.status === 286 && cancelPolling(e), withExtensions(e, function(m) {
8529
- v = m.transformResponse(v, n, e);
8593
+ if (!(c.event && !triggerEvent(i, c.event, m)) && triggerEvent(i, "htmx:beforeSwap", m)) {
8594
+ if (i = m.target, x = m.serverResponse, d = m.isError, h = m.ignoreTitle, b = m.selectOverride, v = m.swapOverride, t.target = i, t.failed = d, t.successful = !d, m.shouldSwap) {
8595
+ n.status === 286 && cancelPolling(e), withExtensions(e, function(f) {
8596
+ x = f.transformResponse(x, n, e);
8530
8597
  }), l.type && saveCurrentPageToHistory();
8531
- var y = getSwapSpecification(e, g);
8532
- y.hasOwnProperty("ignoreTitle") || (y.ignoreTitle = f), i.classList.add(htmx.config.swappingClass), a && (p = a), hasHeader(n, /HX-Reselect:/i) && (p = n.getResponseHeader("HX-Reselect"));
8533
- const _ = r.selectOOB || getClosestAttributeValue(e, "hx-select-oob"), b = getClosestAttributeValue(e, "hx-select");
8534
- swap(i, v, y, {
8535
- select: p === "unset" ? null : p || b,
8536
- selectOOB: _,
8598
+ var E = getSwapSpecification(e, v);
8599
+ E.hasOwnProperty("ignoreTitle") || (E.ignoreTitle = h), i.classList.add(htmx.config.swappingClass), a && (b = a), hasHeader(n, /HX-Reselect:/i) && (b = n.getResponseHeader("HX-Reselect"));
8600
+ const g = r.selectOOB || getClosestAttributeValue(e, "hx-select-oob"), y = getClosestAttributeValue(e, "hx-select");
8601
+ swap(i, x, E, {
8602
+ select: b === "unset" ? null : b || y,
8603
+ selectOOB: g,
8537
8604
  eventInfo: t,
8538
8605
  anchor: t.pathInfo.anchor,
8539
8606
  contextElement: e,
8540
8607
  afterSwapCallback: function() {
8541
8608
  if (hasHeader(n, /HX-Trigger-After-Swap:/i)) {
8542
- let m = e;
8543
- bodyContains(e) || (m = getDocument().body), handleTriggerHeader(n, "HX-Trigger-After-Swap", m);
8609
+ let f = e;
8610
+ bodyContains(e) || (f = getDocument().body), handleTriggerHeader(n, "HX-Trigger-After-Swap", f);
8544
8611
  }
8545
8612
  },
8546
8613
  afterSettleCallback: function() {
8547
8614
  if (hasHeader(n, /HX-Trigger-After-Settle:/i)) {
8548
- let m = e;
8549
- bodyContains(e) || (m = getDocument().body), handleTriggerHeader(n, "HX-Trigger-After-Settle", m);
8615
+ let f = e;
8616
+ bodyContains(e) || (f = getDocument().body), handleTriggerHeader(n, "HX-Trigger-After-Settle", f);
8550
8617
  }
8551
8618
  },
8552
8619
  beforeSwapCallback: function() {
@@ -8655,6 +8722,549 @@ var htmx = (function() {
8655
8722
  triggerEvent(e, "htmx:load", {}), e = null;
8656
8723
  }, 0);
8657
8724
  }), htmx;
8725
+ })(), Idiomorph = (function() {
8726
+ const e = () => {
8727
+ }, t = {
8728
+ morphStyle: "outerHTML",
8729
+ callbacks: {
8730
+ beforeNodeAdded: e,
8731
+ afterNodeAdded: e,
8732
+ beforeNodeMorphed: e,
8733
+ afterNodeMorphed: e,
8734
+ beforeNodeRemoved: e,
8735
+ afterNodeRemoved: e,
8736
+ beforeAttributeUpdated: e
8737
+ },
8738
+ head: {
8739
+ style: "merge",
8740
+ shouldPreserve: (h) => h.getAttribute("im-preserve") === "true",
8741
+ shouldReAppend: (h) => h.getAttribute("im-re-append") === "true",
8742
+ shouldRemove: e,
8743
+ afterHeadMorphed: e
8744
+ },
8745
+ restoreFocus: !0
8746
+ };
8747
+ function n(h, b, v = {}) {
8748
+ h = u(h);
8749
+ const x = d(b), m = c(h, x, v), E = r(m, () => o(
8750
+ m,
8751
+ h,
8752
+ x,
8753
+ /** @param {MorphContext} ctx */
8754
+ (g) => g.morphStyle === "innerHTML" ? (a(g, h, x), Array.from(h.childNodes)) : i(g, h, x)
8755
+ ));
8756
+ return m.pantry.remove(), E;
8757
+ }
8758
+ function i(h, b, v) {
8759
+ const x = d(b);
8760
+ return a(
8761
+ h,
8762
+ x,
8763
+ v,
8764
+ // these two optional params are the secret sauce
8765
+ b,
8766
+ // start point for iteration
8767
+ b.nextSibling
8768
+ // end point for iteration
8769
+ ), Array.from(x.childNodes);
8770
+ }
8771
+ function r(h, b) {
8772
+ if (!h.config.restoreFocus) return b();
8773
+ let v = (
8774
+ /** @type {HTMLInputElement|HTMLTextAreaElement|null} */
8775
+ document.activeElement
8776
+ );
8777
+ if (!(v instanceof HTMLInputElement || v instanceof HTMLTextAreaElement))
8778
+ return b();
8779
+ const { id: x, selectionStart: m, selectionEnd: E } = v, g = b();
8780
+ return x && x !== document.activeElement?.getAttribute("id") && (v = h.target.querySelector(`[id="${x}"]`), v?.focus()), v && !v.selectionEnd && E && v.setSelectionRange(m, E), g;
8781
+ }
8782
+ const a = /* @__PURE__ */ (function() {
8783
+ function h(f, p, _, w = null, D = null) {
8784
+ p instanceof HTMLTemplateElement && _ instanceof HTMLTemplateElement && (p = p.content, _ = _.content), w ||= p.firstChild;
8785
+ for (const A of _.childNodes) {
8786
+ if (w && w != D) {
8787
+ const S = v(
8788
+ f,
8789
+ A,
8790
+ w,
8791
+ D
8792
+ );
8793
+ if (S) {
8794
+ S !== w && m(f, w, S), s(S, A, f), w = S.nextSibling;
8795
+ continue;
8796
+ }
8797
+ }
8798
+ if (A instanceof Element) {
8799
+ const S = (
8800
+ /** @type {String} */
8801
+ A.getAttribute("id")
8802
+ );
8803
+ if (f.persistentIds.has(S)) {
8804
+ const O = E(
8805
+ p,
8806
+ S,
8807
+ w,
8808
+ f
8809
+ );
8810
+ s(O, A, f), w = O.nextSibling;
8811
+ continue;
8812
+ }
8813
+ }
8814
+ const C = b(
8815
+ p,
8816
+ A,
8817
+ w,
8818
+ f
8819
+ );
8820
+ C && (w = C.nextSibling);
8821
+ }
8822
+ for (; w && w != D; ) {
8823
+ const A = w;
8824
+ w = w.nextSibling, x(f, A);
8825
+ }
8826
+ }
8827
+ function b(f, p, _, w) {
8828
+ if (w.callbacks.beforeNodeAdded(p) === !1) return null;
8829
+ if (w.idMap.has(p)) {
8830
+ const D = document.createElement(
8831
+ /** @type {Element} */
8832
+ p.tagName
8833
+ );
8834
+ return f.insertBefore(D, _), s(D, p, w), w.callbacks.afterNodeAdded(D), D;
8835
+ } else {
8836
+ const D = document.importNode(p, !0);
8837
+ return f.insertBefore(D, _), w.callbacks.afterNodeAdded(D), D;
8838
+ }
8839
+ }
8840
+ const v = /* @__PURE__ */ (function() {
8841
+ function f(w, D, A, C) {
8842
+ let S = null, O = D.nextSibling, T = 0, L = A;
8843
+ for (; L && L != C; ) {
8844
+ if (_(L, D)) {
8845
+ if (p(w, L, D))
8846
+ return L;
8847
+ S === null && (w.idMap.has(L) || (S = L));
8848
+ }
8849
+ if (S === null && O && _(L, O) && (T++, O = O.nextSibling, T >= 2 && (S = void 0)), w.activeElementAndParents.includes(L)) break;
8850
+ L = L.nextSibling;
8851
+ }
8852
+ return S || null;
8853
+ }
8854
+ function p(w, D, A) {
8855
+ let C = w.idMap.get(D), S = w.idMap.get(A);
8856
+ if (!S || !C) return !1;
8857
+ for (const O of C)
8858
+ if (S.has(O))
8859
+ return !0;
8860
+ return !1;
8861
+ }
8862
+ function _(w, D) {
8863
+ const A = (
8864
+ /** @type {Element} */
8865
+ w
8866
+ ), C = (
8867
+ /** @type {Element} */
8868
+ D
8869
+ );
8870
+ return A.nodeType === C.nodeType && A.tagName === C.tagName && // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.
8871
+ // We'll still match an anonymous node with an IDed newElt, though, because if it got this far,
8872
+ // its not persistent, and new nodes can't have any hidden state.
8873
+ // 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
8874
+ (!A.getAttribute?.("id") || A.getAttribute?.("id") === C.getAttribute?.("id"));
8875
+ }
8876
+ return f;
8877
+ })();
8878
+ function x(f, p) {
8879
+ if (f.idMap.has(p))
8880
+ y(f.pantry, p, null);
8881
+ else {
8882
+ if (f.callbacks.beforeNodeRemoved(p) === !1) return;
8883
+ p.parentNode?.removeChild(p), f.callbacks.afterNodeRemoved(p);
8884
+ }
8885
+ }
8886
+ function m(f, p, _) {
8887
+ let w = p;
8888
+ for (; w && w !== _; ) {
8889
+ let D = (
8890
+ /** @type {Node} */
8891
+ w
8892
+ );
8893
+ w = w.nextSibling, x(f, D);
8894
+ }
8895
+ return w;
8896
+ }
8897
+ function E(f, p, _, w) {
8898
+ const D = (
8899
+ /** @type {Element} - will always be found */
8900
+ // ctx.target.id unsafe because of form input shadowing
8901
+ // ctx.target could be a document fragment which doesn't have `getAttribute`
8902
+ w.target.getAttribute?.("id") === p && w.target || w.target.querySelector(`[id="${p}"]`) || w.pantry.querySelector(`[id="${p}"]`)
8903
+ );
8904
+ return g(D, w), y(f, D, _), D;
8905
+ }
8906
+ function g(f, p) {
8907
+ const _ = (
8908
+ /** @type {String} */
8909
+ f.getAttribute("id")
8910
+ );
8911
+ for (; f = f.parentNode; ) {
8912
+ let w = p.idMap.get(f);
8913
+ w && (w.delete(_), w.size || p.idMap.delete(f));
8914
+ }
8915
+ }
8916
+ function y(f, p, _) {
8917
+ if (f.moveBefore)
8918
+ try {
8919
+ f.moveBefore(p, _);
8920
+ } catch {
8921
+ f.insertBefore(p, _);
8922
+ }
8923
+ else
8924
+ f.insertBefore(p, _);
8925
+ }
8926
+ return h;
8927
+ })(), s = /* @__PURE__ */ (function() {
8928
+ function h(g, y, f) {
8929
+ return f.ignoreActive && g === document.activeElement ? null : (f.callbacks.beforeNodeMorphed(g, y) === !1 || (g instanceof HTMLHeadElement && f.head.ignore || (g instanceof HTMLHeadElement && f.head.style !== "morph" ? l(
8930
+ g,
8931
+ /** @type {HTMLHeadElement} */
8932
+ y,
8933
+ f
8934
+ ) : (b(g, y, f), E(g, f) || a(f, g, y))), f.callbacks.afterNodeMorphed(g, y)), g);
8935
+ }
8936
+ function b(g, y, f) {
8937
+ let p = y.nodeType;
8938
+ if (p === 1) {
8939
+ const _ = (
8940
+ /** @type {Element} */
8941
+ g
8942
+ ), w = (
8943
+ /** @type {Element} */
8944
+ y
8945
+ ), D = _.attributes, A = w.attributes;
8946
+ for (const C of A)
8947
+ m(C.name, _, "update", f) || _.getAttribute(C.name) !== C.value && _.setAttribute(C.name, C.value);
8948
+ for (let C = D.length - 1; 0 <= C; C--) {
8949
+ const S = D[C];
8950
+ if (S && !w.hasAttribute(S.name)) {
8951
+ if (m(S.name, _, "remove", f))
8952
+ continue;
8953
+ _.removeAttribute(S.name);
8954
+ }
8955
+ }
8956
+ E(_, f) || v(_, w, f);
8957
+ }
8958
+ (p === 8 || p === 3) && g.nodeValue !== y.nodeValue && (g.nodeValue = y.nodeValue);
8959
+ }
8960
+ function v(g, y, f) {
8961
+ if (g instanceof HTMLInputElement && y instanceof HTMLInputElement && y.type !== "file") {
8962
+ let p = y.value, _ = g.value;
8963
+ x(g, y, "checked", f), x(g, y, "disabled", f), y.hasAttribute("value") ? _ !== p && (m("value", g, "update", f) || (g.setAttribute("value", p), g.value = p)) : m("value", g, "remove", f) || (g.value = "", g.removeAttribute("value"));
8964
+ } else if (g instanceof HTMLOptionElement && y instanceof HTMLOptionElement)
8965
+ x(g, y, "selected", f);
8966
+ else if (g instanceof HTMLTextAreaElement && y instanceof HTMLTextAreaElement) {
8967
+ let p = y.value, _ = g.value;
8968
+ if (m("value", g, "update", f))
8969
+ return;
8970
+ p !== _ && (g.value = p), g.firstChild && g.firstChild.nodeValue !== p && (g.firstChild.nodeValue = p);
8971
+ }
8972
+ }
8973
+ function x(g, y, f, p) {
8974
+ const _ = y[f], w = g[f];
8975
+ if (_ !== w) {
8976
+ const D = m(
8977
+ f,
8978
+ g,
8979
+ "update",
8980
+ p
8981
+ );
8982
+ D || (g[f] = y[f]), _ ? D || g.setAttribute(f, "") : m(f, g, "remove", p) || g.removeAttribute(f);
8983
+ }
8984
+ }
8985
+ function m(g, y, f, p) {
8986
+ return g === "value" && p.ignoreActiveValue && y === document.activeElement ? !0 : p.callbacks.beforeAttributeUpdated(g, y, f) === !1;
8987
+ }
8988
+ function E(g, y) {
8989
+ return !!y.ignoreActiveValue && g === document.activeElement && g !== document.body;
8990
+ }
8991
+ return h;
8992
+ })();
8993
+ function o(h, b, v, x) {
8994
+ if (h.head.block) {
8995
+ const m = b.querySelector("head"), E = v.querySelector("head");
8996
+ if (m && E) {
8997
+ const g = l(m, E, h);
8998
+ return Promise.all(g).then(() => {
8999
+ const y = Object.assign(h, {
9000
+ head: {
9001
+ block: !1,
9002
+ ignore: !0
9003
+ }
9004
+ });
9005
+ return x(y);
9006
+ });
9007
+ }
9008
+ }
9009
+ return x(h);
9010
+ }
9011
+ function l(h, b, v) {
9012
+ let x = [], m = [], E = [], g = [], y = /* @__PURE__ */ new Map();
9013
+ for (const p of b.children)
9014
+ y.set(p.outerHTML, p);
9015
+ for (const p of h.children) {
9016
+ let _ = y.has(p.outerHTML), w = v.head.shouldReAppend(p), D = v.head.shouldPreserve(p);
9017
+ _ || D ? w ? m.push(p) : (y.delete(p.outerHTML), E.push(p)) : v.head.style === "append" ? w && (m.push(p), g.push(p)) : v.head.shouldRemove(p) !== !1 && m.push(p);
9018
+ }
9019
+ g.push(...y.values());
9020
+ let f = [];
9021
+ for (const p of g) {
9022
+ let _ = (
9023
+ /** @type {ChildNode} */
9024
+ document.createRange().createContextualFragment(p.outerHTML).firstChild
9025
+ );
9026
+ if (v.callbacks.beforeNodeAdded(_) !== !1) {
9027
+ if ("href" in _ && _.href || "src" in _ && _.src) {
9028
+ let w, D = new Promise(function(A) {
9029
+ w = A;
9030
+ });
9031
+ _.addEventListener("load", function() {
9032
+ w();
9033
+ }), f.push(D);
9034
+ }
9035
+ h.appendChild(_), v.callbacks.afterNodeAdded(_), x.push(_);
9036
+ }
9037
+ }
9038
+ for (const p of m)
9039
+ v.callbacks.beforeNodeRemoved(p) !== !1 && (h.removeChild(p), v.callbacks.afterNodeRemoved(p));
9040
+ return v.head.afterHeadMorphed(h, {
9041
+ added: x,
9042
+ kept: E,
9043
+ removed: m
9044
+ }), f;
9045
+ }
9046
+ const c = /* @__PURE__ */ (function() {
9047
+ function h(f, p, _) {
9048
+ const { persistentIds: w, idMap: D } = g(f, p), A = b(_), C = A.morphStyle || "outerHTML";
9049
+ if (!["innerHTML", "outerHTML"].includes(C))
9050
+ throw `Do not understand how to morph style ${C}`;
9051
+ return {
9052
+ target: f,
9053
+ newContent: p,
9054
+ config: A,
9055
+ morphStyle: C,
9056
+ ignoreActive: A.ignoreActive,
9057
+ ignoreActiveValue: A.ignoreActiveValue,
9058
+ restoreFocus: A.restoreFocus,
9059
+ idMap: D,
9060
+ persistentIds: w,
9061
+ pantry: v(),
9062
+ activeElementAndParents: x(f),
9063
+ callbacks: A.callbacks,
9064
+ head: A.head
9065
+ };
9066
+ }
9067
+ function b(f) {
9068
+ let p = Object.assign({}, t);
9069
+ return Object.assign(p, f), p.callbacks = Object.assign(
9070
+ {},
9071
+ t.callbacks,
9072
+ f.callbacks
9073
+ ), p.head = Object.assign({}, t.head, f.head), p;
9074
+ }
9075
+ function v() {
9076
+ const f = document.createElement("div");
9077
+ return f.hidden = !0, document.body.insertAdjacentElement("afterend", f), f;
9078
+ }
9079
+ function x(f) {
9080
+ let p = [], _ = document.activeElement;
9081
+ if (_?.tagName !== "BODY" && f.contains(_))
9082
+ for (; _ && (p.push(_), _ !== f); )
9083
+ _ = _.parentElement;
9084
+ return p;
9085
+ }
9086
+ function m(f) {
9087
+ let p = Array.from(f.querySelectorAll("[id]"));
9088
+ return f.getAttribute?.("id") && p.push(f), p;
9089
+ }
9090
+ function E(f, p, _, w) {
9091
+ for (const D of w) {
9092
+ const A = (
9093
+ /** @type {String} */
9094
+ D.getAttribute("id")
9095
+ );
9096
+ if (p.has(A)) {
9097
+ let C = D;
9098
+ for (; C; ) {
9099
+ let S = f.get(C);
9100
+ if (S == null && (S = /* @__PURE__ */ new Set(), f.set(C, S)), S.add(A), C === _) break;
9101
+ C = C.parentElement;
9102
+ }
9103
+ }
9104
+ }
9105
+ }
9106
+ function g(f, p) {
9107
+ const _ = m(f), w = m(p), D = y(_, w);
9108
+ let A = /* @__PURE__ */ new Map();
9109
+ E(A, D, f, _);
9110
+ const C = p.__idiomorphRoot || p;
9111
+ return E(A, D, C, w), { persistentIds: D, idMap: A };
9112
+ }
9113
+ function y(f, p) {
9114
+ let _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
9115
+ for (const { id: A, tagName: C } of f)
9116
+ w.has(A) ? _.add(A) : w.set(A, C);
9117
+ let D = /* @__PURE__ */ new Set();
9118
+ for (const { id: A, tagName: C } of p)
9119
+ D.has(A) ? _.add(A) : w.get(A) === C && D.add(A);
9120
+ for (const A of _)
9121
+ D.delete(A);
9122
+ return D;
9123
+ }
9124
+ return h;
9125
+ })(), { normalizeElement: u, normalizeParent: d } = /* @__PURE__ */ (function() {
9126
+ const h = /* @__PURE__ */ new WeakSet();
9127
+ function b(E) {
9128
+ return E instanceof Document ? E.documentElement : E;
9129
+ }
9130
+ function v(E) {
9131
+ if (E == null)
9132
+ return document.createElement("div");
9133
+ if (typeof E == "string")
9134
+ return v(m(E));
9135
+ if (h.has(
9136
+ /** @type {Element} */
9137
+ E
9138
+ ))
9139
+ return (
9140
+ /** @type {Element} */
9141
+ E
9142
+ );
9143
+ if (E instanceof Node) {
9144
+ if (E.parentNode)
9145
+ return (
9146
+ /** @type {any} */
9147
+ new x(E)
9148
+ );
9149
+ {
9150
+ const g = document.createElement("div");
9151
+ return g.append(E), g;
9152
+ }
9153
+ } else {
9154
+ const g = document.createElement("div");
9155
+ for (const y of [...E])
9156
+ g.append(y);
9157
+ return g;
9158
+ }
9159
+ }
9160
+ class x {
9161
+ /** @param {Node} node */
9162
+ constructor(g) {
9163
+ this.originalNode = g, this.realParentNode = /** @type {Element} */
9164
+ g.parentNode, this.previousSibling = g.previousSibling, this.nextSibling = g.nextSibling;
9165
+ }
9166
+ /** @returns {Node[]} */
9167
+ get childNodes() {
9168
+ const g = [];
9169
+ let y = this.previousSibling ? this.previousSibling.nextSibling : this.realParentNode.firstChild;
9170
+ for (; y && y != this.nextSibling; )
9171
+ g.push(y), y = y.nextSibling;
9172
+ return g;
9173
+ }
9174
+ /**
9175
+ * @param {string} selector
9176
+ * @returns {Element[]}
9177
+ */
9178
+ querySelectorAll(g) {
9179
+ return this.childNodes.reduce(
9180
+ (y, f) => {
9181
+ if (f instanceof Element) {
9182
+ f.matches(g) && y.push(f);
9183
+ const p = f.querySelectorAll(g);
9184
+ for (let _ = 0; _ < p.length; _++)
9185
+ y.push(p[_]);
9186
+ }
9187
+ return y;
9188
+ },
9189
+ /** @type {Element[]} */
9190
+ []
9191
+ );
9192
+ }
9193
+ /**
9194
+ * @param {Node} node
9195
+ * @param {Node} referenceNode
9196
+ * @returns {Node}
9197
+ */
9198
+ insertBefore(g, y) {
9199
+ return this.realParentNode.insertBefore(g, y);
9200
+ }
9201
+ /**
9202
+ * @param {Node} node
9203
+ * @param {Node} referenceNode
9204
+ * @returns {Node}
9205
+ */
9206
+ moveBefore(g, y) {
9207
+ return this.realParentNode.moveBefore(g, y);
9208
+ }
9209
+ /**
9210
+ * for later use with populateIdMapWithTree to halt upwards iteration
9211
+ * @returns {Node}
9212
+ */
9213
+ get __idiomorphRoot() {
9214
+ return this.originalNode;
9215
+ }
9216
+ }
9217
+ function m(E) {
9218
+ let g = new DOMParser(), y = E.replace(
9219
+ /<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,
9220
+ ""
9221
+ );
9222
+ if (y.match(/<\/html>/) || y.match(/<\/head>/) || y.match(/<\/body>/)) {
9223
+ let f = g.parseFromString(E, "text/html");
9224
+ if (y.match(/<\/html>/))
9225
+ return h.add(f), f;
9226
+ {
9227
+ let p = f.firstChild;
9228
+ return p && h.add(p), p;
9229
+ }
9230
+ } else {
9231
+ let p = (
9232
+ /** @type {HTMLTemplateElement} */
9233
+ g.parseFromString(
9234
+ "<body><template>" + E + "</template></body>",
9235
+ "text/html"
9236
+ ).body.querySelector("template").content
9237
+ );
9238
+ return h.add(p), p;
9239
+ }
9240
+ }
9241
+ return { normalizeElement: b, normalizeParent: v };
9242
+ })();
9243
+ return {
9244
+ morph: n,
9245
+ defaults: t
9246
+ };
9247
+ })();
9248
+ (function() {
9249
+ function e(t) {
9250
+ if (t === "morph" || t === "morph:outerHTML")
9251
+ return { morphStyle: "outerHTML" };
9252
+ if (t === "morph:innerHTML")
9253
+ return { morphStyle: "innerHTML" };
9254
+ if (t.startsWith("morph:"))
9255
+ return Function("return (" + t.slice(6) + ")")();
9256
+ }
9257
+ htmx.defineExtension("morph", {
9258
+ isInlineSwap: function(t) {
9259
+ let n = e(t);
9260
+ return n?.morphStyle === "outerHTML" || n?.morphStyle == null;
9261
+ },
9262
+ handleSwap: function(t, n, i) {
9263
+ let r = e(t);
9264
+ if (r)
9265
+ return Idiomorph.morph(n, i.children, r);
9266
+ }
9267
+ });
8658
9268
  })();
8659
9269
  const ServerEventName = {
8660
9270
  JOB_STATUS_CHANGE: "job-status-change",
@@ -8779,7 +9389,10 @@ const VERSION_PREFIX_PATTERN = /^v/i, normalizeVersionTag = (e) => {
8779
9389
  }, fallbackReleaseLabel = (e) => {
8780
9390
  const t = getComparableVersion(e);
8781
9391
  return t ? `v${t}` : null;
8782
- }, LATEST_RELEASE_ENDPOINT = "https://api.github.com/repos/arabold/docs-mcp-server/releases/latest", LATEST_RELEASE_FALLBACK_URL = "https://github.com/arabold/docs-mcp-server/releases/latest";
9392
+ };
9393
+ module_default.plugin(module_default$1);
9394
+ window.Alpine = module_default;
9395
+ const LATEST_RELEASE_ENDPOINT = "https://api.github.com/repos/arabold/docs-mcp-server/releases/latest", LATEST_RELEASE_FALLBACK_URL = "https://github.com/arabold/docs-mcp-server/releases/latest";
8783
9396
  document.addEventListener("alpine:init", () => {
8784
9397
  module_default.data("versionUpdate", (e) => ({
8785
9398
  currentVersion: typeof e?.currentVersion == "string" ? e.currentVersion : null,
@@ -8818,12 +9431,6 @@ document.addEventListener("alpine:init", () => {
8818
9431
  }
8819
9432
  }));
8820
9433
  });
8821
- module_default.store("confirmingAction", {
8822
- type: null,
8823
- id: null,
8824
- timeoutId: null,
8825
- isDeleting: !1
8826
- });
8827
9434
  module_default.store("toast", {
8828
9435
  visible: !1,
8829
9436
  message: "",
@@ -8842,21 +9449,6 @@ module_default.store("toast", {
8842
9449
  });
8843
9450
  module_default.start();
8844
9451
  initFlowbite();
8845
- document.addEventListener("job-list-refresh", () => {
8846
- htmx.ajax("get", "/web/jobs", "#job-queue");
8847
- });
8848
- document.addEventListener("job-status-change", () => {
8849
- htmx.ajax("get", "/web/jobs", "#job-queue");
8850
- });
8851
- document.addEventListener("job-progress", () => {
8852
- htmx.ajax("get", "/web/jobs", "#job-queue");
8853
- });
8854
- document.addEventListener("job-list-change", () => {
8855
- htmx.ajax("get", "/web/jobs", "#job-queue");
8856
- });
8857
- document.addEventListener("library-change", () => {
8858
- htmx.ajax("get", "/web/libraries", "#library-list");
8859
- });
8860
9452
  const eventClient = new EventClient();
8861
9453
  eventClient.subscribe((e) => {
8862
9454
  console.log(`📋 Received event: ${e.type}`, e.payload), document.body.dispatchEvent(
@@ -8869,23 +9461,42 @@ eventClient.connect();
8869
9461
  window.addEventListener("beforeunload", () => {
8870
9462
  eventClient.disconnect();
8871
9463
  });
8872
- document.addEventListener("version-list-refresh", (e) => {
8873
- const n = e.detail?.library;
8874
- n && htmx.ajax(
8875
- "get",
8876
- `/web/libraries/${encodeURIComponent(n)}/versions`,
8877
- "#version-list"
8878
- );
9464
+ const confirmationTimeouts = /* @__PURE__ */ new Map();
9465
+ function startConfirmationTimeout(e, t = 3e3) {
9466
+ clearConfirmationTimeout(e);
9467
+ const n = Date.now() + t, i = window.setTimeout(() => {
9468
+ confirmationTimeouts.delete(e);
9469
+ const r = document.getElementById(e);
9470
+ if (r) {
9471
+ const a = module_default.$data(r);
9472
+ a && (a.confirming = !1);
9473
+ }
9474
+ }, t);
9475
+ confirmationTimeouts.set(e, { timeoutId: i, expiresAt: n });
9476
+ }
9477
+ function clearConfirmationTimeout(e) {
9478
+ const t = confirmationTimeouts.get(e);
9479
+ t && (clearTimeout(t.timeoutId), confirmationTimeouts.delete(e));
9480
+ }
9481
+ function hasActiveConfirmation(e) {
9482
+ const t = confirmationTimeouts.get(e);
9483
+ return t !== void 0 && t.expiresAt > Date.now();
9484
+ }
9485
+ const confirmationManager = {
9486
+ start: startConfirmationTimeout,
9487
+ clear: clearConfirmationTimeout,
9488
+ isActive: hasActiveConfirmation
9489
+ };
9490
+ window.confirmationManager = confirmationManager;
9491
+ document.body.addEventListener("htmx:beforeSwap", (e) => {
9492
+ const n = e.detail?.target;
9493
+ n && module_default.destroyTree(n);
8879
9494
  });
8880
9495
  document.body.addEventListener("htmx:afterSwap", (e) => {
8881
- e.target instanceof HTMLElement && module_default.initTree(e.target);
8882
- const t = e.detail;
8883
- if (t?.xhr?.status === 204 && t?.requestConfig?.verb === "delete" && e.target?.id?.startsWith("row-")) {
8884
- const i = e.target.id.match(/^row-([^-]+)-/), r = i ? i[1] : null;
8885
- r ? document.dispatchEvent(
8886
- new CustomEvent("version-list-refresh", { detail: { library: r } })
8887
- ) : window.location.reload();
8888
- }
9496
+ const n = e.detail?.target;
9497
+ n && (n.querySelectorAll("[x-data][id]").forEach((i) => {
9498
+ i.id && hasActiveConfirmation(i.id) && (i.dataset.confirming = "true");
9499
+ }), module_default.initTree(n));
8889
9500
  });
8890
9501
  document.body.addEventListener("htmx:responseError", (e) => {
8891
9502
  const n = e.detail?.xhr;