aptechka 0.82.5 → 0.83.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.
Files changed (141) hide show
  1. package/lib/{Animation-DxtCzFP3.js → Animation-BzTjZIE-.js} +2 -2
  2. package/lib/{Animation-jmvFcNfM.cjs → Animation-C39Ah-LM.cjs} +1 -1
  3. package/lib/{Composed-DtS09lSU.js → Composed-C-mnUGX6.js} +2 -2
  4. package/lib/{Composed-CSeUTRCg.cjs → Composed-RFcm2x5c.cjs} +1 -1
  5. package/lib/{Damped-DMnIOXpC.js → Damped-CRusiRIV.js} +2 -2
  6. package/lib/{Damped-77Urmi3q.cjs → Damped-Prr0iKu1.cjs} +1 -1
  7. package/lib/{DerivedArray-B8A0-8uT.cjs → DerivedArray-DdCR-Oy7.cjs} +1 -1
  8. package/lib/{DerivedArray-DG9iR0mf.js → DerivedArray-opbeygTL.js} +1 -1
  9. package/lib/{DragControls-BlL26P1V.cjs → DragControls-8rNZwQrs.cjs} +1 -1
  10. package/lib/{DragControls-DCC8iEOR.js → DragControls-DBNdMBA4.js} +4 -4
  11. package/lib/{LocalLinks-Bua7BGRF.cjs → LocalLinks-BxhSFv_Q.cjs} +1 -1
  12. package/lib/{LocalLinks-TQkTpAMx.js → LocalLinks-DRAQ-fxE.js} +3 -3
  13. package/lib/{PageAnnouncerElement-sfh0_4vl.js → PageAnnouncerElement-0LxZjtVH.js} +1 -1
  14. package/lib/{PageAnnouncerElement-C4k2kDJ5.cjs → PageAnnouncerElement-AQ0Ja6HM.cjs} +1 -1
  15. package/lib/{PageScroll-cQ3B5-6N.js → PageScroll-0LxFblry.js} +1 -1
  16. package/lib/{PageScroll-C7QBpx0G.cjs → PageScroll-BXJUQwG7.cjs} +1 -1
  17. package/lib/{SourceElement-TzgPNQOd.cjs → SourceElement-BHqPFbna.cjs} +1 -1
  18. package/lib/{SourceElement-BQ7g2KWK.js → SourceElement-DjbHjynf.js} +2 -2
  19. package/lib/{Store-1JrMCgdX.cjs → Store-Blf4msDz.cjs} +1 -1
  20. package/lib/{Store-CgQ3ReoB.js → Store-ZThXYBQd.js} +1 -1
  21. package/lib/{Tweened-lT68VACv.js → Tweened-Bw1Cn1PJ.js} +2 -2
  22. package/lib/{Tweened-CXQrFQth.cjs → Tweened-DWtk9E-O.cjs} +1 -1
  23. package/lib/{Viewport-Cx50Hufs.cjs → Viewport-BxCr0GlB.cjs} +1 -1
  24. package/lib/{Viewport-DGnJ31b4.js → Viewport-Dt-d9DPi.js} +2 -2
  25. package/lib/accordion/index.cjs +1 -1
  26. package/lib/accordion/index.js +1 -1
  27. package/lib/animation/index.cjs +1 -1
  28. package/lib/animation/index.js +3 -3
  29. package/lib/api-fetcher/index.cjs +1 -0
  30. package/lib/api-fetcher/index.d.ts +16 -0
  31. package/lib/api-fetcher/index.js +100 -0
  32. package/lib/attribute/index.cjs +1 -1
  33. package/lib/attribute/index.js +3 -3
  34. package/lib/billboard/index.cjs +1 -1
  35. package/lib/billboard/index.js +2 -2
  36. package/lib/canvas/index.cjs +1 -1
  37. package/lib/canvas/index.js +2 -2
  38. package/lib/controls/index.cjs +1 -1
  39. package/lib/controls/index.js +1 -1
  40. package/lib/css-property/index.cjs +1 -1
  41. package/lib/css-property/index.js +3 -3
  42. package/lib/css-value-parser/index.cjs +1 -1
  43. package/lib/css-value-parser/index.js +1 -1
  44. package/lib/dev/index.cjs +1 -1
  45. package/lib/dev/index.js +2 -2
  46. package/lib/device/index.cjs +1 -1
  47. package/lib/device/index.js +1 -1
  48. package/lib/dom-BETkVSSZ.js +82 -0
  49. package/lib/dom-CBLlqORw.cjs +1 -0
  50. package/lib/element-linked-store/index.cjs +1 -1
  51. package/lib/element-linked-store/index.js +2 -2
  52. package/lib/element-resizer/index.cjs +1 -1
  53. package/lib/element-resizer/index.js +2 -2
  54. package/lib/en3/index.cjs +1 -1
  55. package/lib/en3/index.js +2 -2
  56. package/lib/iframe/index.cjs +1 -1
  57. package/lib/iframe/index.js +3 -3
  58. package/lib/image/index.cjs +1 -1
  59. package/lib/image/index.js +4 -4
  60. package/lib/{index-CKTweR3M.cjs → index-OE2INULi.cjs} +1 -1
  61. package/lib/{index-LReFyN6i.js → index-e9eDuagL.js} +1 -1
  62. package/lib/intersector/index.cjs +1 -1
  63. package/lib/intersector/index.js +2 -2
  64. package/lib/jsx/index.cjs +1 -1
  65. package/lib/jsx/index.js +6 -6
  66. package/lib/ladder/index.cjs +1 -1
  67. package/lib/ladder/index.js +2 -2
  68. package/lib/layout-box/index.cjs +1 -1
  69. package/lib/layout-box/index.js +2 -2
  70. package/lib/loading/index.cjs +1 -1
  71. package/lib/loading/index.js +1 -1
  72. package/lib/local-links/index.cjs +1 -1
  73. package/lib/local-links/index.js +1 -1
  74. package/lib/masonry-layout/index.cjs +1 -1
  75. package/lib/masonry-layout/index.js +2 -2
  76. package/lib/media/index.cjs +1 -1
  77. package/lib/media/index.js +2 -2
  78. package/lib/morph/index.cjs +1 -1
  79. package/lib/morph/index.js +294 -301
  80. package/lib/{morph-BQErz7qP.js → morph-D_ybmXWR.js} +8 -8
  81. package/lib/need_redo_tweaker/index.cjs +1 -1
  82. package/lib/need_redo_tweaker/index.js +3 -3
  83. package/lib/page-announcer/index.cjs +1 -1
  84. package/lib/page-announcer/index.js +1 -1
  85. package/lib/page-scroll/index.cjs +1 -1
  86. package/lib/page-scroll/index.js +1 -1
  87. package/lib/pixel-perfect/index.cjs +1 -1
  88. package/lib/pixel-perfect/index.js +3 -3
  89. package/lib/pointer/index.cjs +1 -1
  90. package/lib/pointer/index.js +4 -4
  91. package/lib/popover/index.cjs +1 -1
  92. package/lib/popover/index.js +3 -3
  93. package/lib/radio/index.cjs +1 -1
  94. package/lib/radio/index.js +1 -1
  95. package/lib/render-1u700s93.js +212 -0
  96. package/lib/render-BIOfUddT.cjs +1 -0
  97. package/lib/router/index.cjs +1 -1
  98. package/lib/router/index.js +6 -6
  99. package/lib/scroll/index.cjs +1 -1
  100. package/lib/scroll/index.js +8 -8
  101. package/lib/{scroll-DxcPU0vk.cjs → scroll-BA2WnUrb.cjs} +1 -1
  102. package/lib/{scroll-jcbHDexr.js → scroll-DY5senkF.js} +2 -2
  103. package/lib/scroll-entries/index.cjs +1 -1
  104. package/lib/scroll-entries/index.js +1 -1
  105. package/lib/scroll-kit/index.cjs +1 -1
  106. package/lib/scroll-kit/index.js +4 -4
  107. package/lib/sequence/index.cjs +1 -1
  108. package/lib/sequence/index.js +3 -3
  109. package/lib/size-element/index.cjs +1 -1
  110. package/lib/size-element/index.js +1 -1
  111. package/lib/slicer/index.cjs +1 -1
  112. package/lib/slicer/index.js +1 -1
  113. package/lib/source/index.cjs +1 -1
  114. package/lib/source/index.js +1 -1
  115. package/lib/spa/index.cjs +1 -1
  116. package/lib/spa/index.js +6 -6
  117. package/lib/store/index.cjs +1 -1
  118. package/lib/store/index.js +3 -3
  119. package/lib/{stylesheet-BcwbfhBp.cjs → stylesheet-5_o7PFzM.cjs} +1 -1
  120. package/lib/{stylesheet-DbHOxtjw.js → stylesheet-DdBzowZY.js} +1 -1
  121. package/lib/ticker/index.cjs +1 -1
  122. package/lib/ticker/index.js +2 -2
  123. package/lib/url-CHgcNwJ1.cjs +1 -0
  124. package/lib/url-CYgo5vrG.js +113 -0
  125. package/lib/utils/dom.d.ts +3 -0
  126. package/lib/utils/index.cjs +1 -1
  127. package/lib/utils/index.js +142 -137
  128. package/lib/utils/url.d.ts +6 -0
  129. package/lib/video/index.cjs +1 -1
  130. package/lib/video/index.js +3 -3
  131. package/lib/window-resizer/index.cjs +1 -1
  132. package/lib/window-resizer/index.js +1 -1
  133. package/lib/youtube/index.cjs +1 -1
  134. package/lib/youtube/index.js +3 -3
  135. package/package.json +13 -5
  136. package/lib/dom-BIeVMHfK.js +0 -57
  137. package/lib/dom-hTEdqeoj.cjs +0 -1
  138. package/lib/render-B3Hf-O7M.js +0 -205
  139. package/lib/render-BWjKu0M_.cjs +0 -1
  140. package/lib/url-CPgw9bd5.cjs +0 -1
  141. package/lib/url-DAl-mgbC.js +0 -97
@@ -1,42 +1,43 @@
1
- var Ee = Object.defineProperty, ve = Object.defineProperties;
2
- var Le = Object.getOwnPropertyDescriptors;
3
- var te = Object.getOwnPropertySymbols;
4
- var Se = Object.prototype.hasOwnProperty, ye = Object.prototype.propertyIsEnumerable;
5
- var ee = (h, e) => (e = Symbol[h]) ? e : Symbol.for("Symbol." + h), ae = (h) => {
6
- throw TypeError(h);
1
+ var ge = Object.defineProperty, Ee = Object.defineProperties;
2
+ var ve = Object.getOwnPropertyDescriptors;
3
+ var Zt = Object.getOwnPropertySymbols;
4
+ var Le = Object.prototype.hasOwnProperty, Se = Object.prototype.propertyIsEnumerable;
5
+ var _t = (o, e) => (e = Symbol[o]) ? e : Symbol.for("Symbol." + o), ee = (o) => {
6
+ throw TypeError(o);
7
7
  };
8
- var se = (h, e, s) => e in h ? Ee(h, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : h[e] = s, Ht = (h, e) => {
8
+ var te = (o, e, s) => e in o ? ge(o, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[e] = s, Ut = (o, e) => {
9
9
  for (var s in e || (e = {}))
10
- Se.call(e, s) && se(h, s, e[s]);
11
- if (te)
12
- for (var s of te(e))
13
- ye.call(e, s) && se(h, s, e[s]);
14
- return h;
15
- }, Dt = (h, e) => ve(h, Le(e));
16
- var zt = (h, e, s) => e.has(h) || ae("Cannot " + s);
17
- var t = (h, e, s) => (zt(h, e, "read from private field"), s ? s.call(h) : e.get(h)), l = (h, e, s) => e.has(h) ? ae("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(h) : e.set(h, s), n = (h, e, s, a) => (zt(h, e, "write to private field"), a ? a.call(h, s) : e.set(h, s), s), g = (h, e, s) => (zt(h, e, "access private method"), s);
18
- var J = (h, e, s) => new Promise((a, o) => {
19
- var L = (c) => {
10
+ Le.call(e, s) && te(o, s, e[s]);
11
+ if (Zt)
12
+ for (var s of Zt(e))
13
+ Se.call(e, s) && te(o, s, e[s]);
14
+ return o;
15
+ }, Dt = (o, e) => Ee(o, ve(e));
16
+ var zt = (o, e, s) => e.has(o) || ee("Cannot " + s);
17
+ var t = (o, e, s) => (zt(o, e, "read from private field"), s ? s.call(o) : e.get(o)), h = (o, e, s) => e.has(o) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, s), n = (o, e, s, a) => (zt(o, e, "write to private field"), a ? a.call(o, s) : e.set(o, s), s), y = (o, e, s) => (zt(o, e, "access private method"), s);
18
+ var J = (o, e, s) => new Promise((a, l) => {
19
+ var v = (c) => {
20
20
  try {
21
- p(s.next(c));
22
- } catch (E) {
23
- o(E);
21
+ f(s.next(c));
22
+ } catch (p) {
23
+ l(p);
24
24
  }
25
- }, y = (c) => {
25
+ }, S = (c) => {
26
26
  try {
27
- p(s.throw(c));
28
- } catch (E) {
29
- o(E);
27
+ f(s.throw(c));
28
+ } catch (p) {
29
+ l(p);
30
30
  }
31
- }, p = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(L, y);
32
- p((s = s.apply(h, e)).next());
31
+ }, f = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(v, S);
32
+ f((s = s.apply(o, e)).next());
33
33
  });
34
- var ie = (h, e, s) => (e = h[ee("asyncIterator")]) ? e.call(h) : (h = h[ee("iterator")](), e = {}, s = (a, o) => (o = h[a]) && (e[a] = (L) => new Promise((y, p, c) => (L = o.call(h, L), c = L.done, Promise.resolve(L.value).then((E) => y({ value: E, done: c }), p)))), s("next"), s("return"), e);
35
- import { i as oe } from "../index-LReFyN6i.js";
34
+ var se = (o, e, s) => (e = o[_t("asyncIterator")]) ? e.call(o) : (o = o[_t("iterator")](), e = {}, s = (a, l) => (l = o[a]) && (e[a] = (v) => new Promise((S, f, c) => (v = l.call(o, v), c = v.done, Promise.resolve(v.value).then((p) => S({ value: p, done: c }), f)))), s("next"), s("return"), e);
35
+ import { i as oe } from "../index-e9eDuagL.js";
36
+ import { i as ye, e as ae, c as ie } from "../dom-BETkVSSZ.js";
36
37
  import { d as q } from "../events-CsVF98U6.js";
37
- import { w as be, s as we } from "../scroll-jcbHDexr.js";
38
+ import { w as we, s as be } from "../scroll-DY5senkF.js";
38
39
  import "construct-style-sheets-polyfill";
39
- import { a as Pe, c as qt, s as Ae } from "../url-DAl-mgbC.js";
40
+ import { a as Pe, c as qt, d as Ae } from "../url-CYgo5vrG.js";
40
41
  import { cssValueParser as ke } from "../css-value-parser/index.js";
41
42
  import { c as he } from "../string-BlMQbe8b.js";
42
43
  class le extends HTMLElement {
@@ -51,44 +52,44 @@ class le extends HTMLElement {
51
52
  }
52
53
  }
53
54
  oe && !customElements.get("morph-announcer") && customElements.define("morph-announcer", le);
54
- var N, i, D, it, ce, gt, rt;
55
+ var M, i, D, it, ce, gt, rt;
55
56
  class It {
56
57
  constructor(e, s) {
57
- l(this, D);
58
- l(this, N);
59
- l(this, i);
60
- l(this, gt, (e) => {
61
- e.preventDefault(), g(this, D, ce).call(this);
58
+ h(this, D);
59
+ h(this, M);
60
+ h(this, i);
61
+ h(this, gt, (e) => {
62
+ e.preventDefault(), y(this, D, ce).call(this);
62
63
  });
63
- l(this, rt, () => {
64
+ h(this, rt, () => {
64
65
  const e = t(this, i).hasAttribute("data-revalidate");
65
- t(this, N).prefetch(t(this, D, it), e), t(this, i).removeEventListener("pointerenter", t(this, rt));
66
+ t(this, M).prefetch(t(this, D, it), e), t(this, i).removeEventListener("pointerenter", t(this, rt));
66
67
  });
67
- n(this, N, s), n(this, i, e), t(this, i).addEventListener("click", t(this, gt)), this.checkCurrent(location.href.replace(location.origin, "")), t(this, i).hasAttribute("data-prefetch") && t(this, i).addEventListener("pointerenter", t(this, rt));
68
+ n(this, M, s), n(this, i, e), t(this, i).addEventListener("click", t(this, gt)), this.checkCurrent(location.href.replace(location.origin, "")), t(this, i).hasAttribute("data-prefetch") && t(this, i).addEventListener("pointerenter", t(this, rt));
68
69
  }
69
70
  get element() {
70
71
  return t(this, i);
71
72
  }
72
73
  checkCurrent(e) {
73
- var E, st;
74
- const s = t(this, N).normalizePath(e), a = t(this, N).normalizePath(t(this, D, it));
75
- t(this, i).hasAttribute("data-include") && s.pathname.includes(a.pathname) ? t(this, i).classList.add("current") : a.pathname === s.pathname ? t(this, i).classList.add("current") : (E = t(this, i).getAttribute("data-associated-paths")) != null && E.split(",").find((A) => s.pathname.includes(A)) ? t(this, i).classList.add("current") : t(this, i).classList.remove("current"), s.path === a.path ? t(this, i).classList.add("exact") : t(this, i).classList.remove("exact");
76
- const [o, L] = (st = t(this, D, it).split("#")[0]) == null ? void 0 : st.split("?"), y = new URLSearchParams(L), p = new URLSearchParams(location.search);
74
+ var p, st;
75
+ const s = t(this, M).normalizePath(e), a = t(this, M).normalizePath(t(this, D, it));
76
+ t(this, i).hasAttribute("data-include") && s.pathname.includes(a.pathname) ? t(this, i).classList.add("current") : a.pathname === s.pathname ? t(this, i).classList.add("current") : (p = t(this, i).getAttribute("data-associated-paths")) != null && p.split(",").find((A) => s.pathname.includes(A)) ? t(this, i).classList.add("current") : t(this, i).classList.remove("current"), s.path === a.path ? t(this, i).classList.add("exact") : t(this, i).classList.remove("exact");
77
+ const [l, v] = (st = t(this, D, it).split("#")[0]) == null ? void 0 : st.split("?"), S = new URLSearchParams(v), f = new URLSearchParams(location.search);
77
78
  let c = 0;
78
- for (const [A] of p)
79
- y.has(A) && p.get(A) === y.get(A) && c++;
79
+ for (const [A] of f)
80
+ S.has(A) && f.get(A) === S.get(A) && c++;
80
81
  c ? (t(this, i).classList.toggle(
81
82
  "all-params-matched",
82
- p.size === c
83
+ f.size === c
83
84
  ), t(this, i).classList.toggle(
84
85
  "some-params-matched",
85
- p.size !== c
86
- )) : !p.size && t(this, i).hasAttribute("data-match-no-params") ? t(this, i).classList.add("all-params-matched") : (t(this, i).classList.remove("all-params-matched"), t(this, i).classList.remove("some-params-matched"));
86
+ f.size !== c
87
+ )) : !f.size && t(this, i).hasAttribute("data-match-no-params") ? t(this, i).classList.add("all-params-matched") : (t(this, i).classList.remove("all-params-matched"), t(this, i).classList.remove("some-params-matched"));
87
88
  for (const A in t(this, i).dataset) {
88
89
  const at = he(A);
89
90
  if (at.startsWith("match-param-")) {
90
- const z = at.split("match-param-")[1], w = t(this, i).dataset[A], G = `param-${z}-matched`;
91
- p.has(z) && p.get(z) === w || !p.has(z) && (w === "" || w === "*" || w === "all" || w === "any" || w === "vse") ? t(this, i).classList.add(G) : t(this, i).classList.remove(G);
91
+ const z = at.split("match-param-")[1], b = t(this, i).dataset[A], G = `param-${z}-matched`;
92
+ f.has(z) && f.get(z) === b || !f.has(z) && (b === "" || b === "*" || b === "all" || b === "any" || b === "vse") ? t(this, i).classList.add(G) : t(this, i).classList.remove(G);
92
93
  }
93
94
  }
94
95
  }
@@ -96,44 +97,44 @@ class It {
96
97
  t(this, i).removeEventListener("click", t(this, gt)), t(this, i).removeEventListener("pointerenter", t(this, rt)), t(this, i).classList.remove("current", "exact");
97
98
  }
98
99
  }
99
- N = new WeakMap(), i = new WeakMap(), D = new WeakSet(), it = function() {
100
+ M = new WeakMap(), i = new WeakMap(), D = new WeakSet(), it = function() {
100
101
  const e = new URL(t(this, i).href);
101
- return t(this, N).normalizePath(
102
+ return t(this, M).normalizePath(
102
103
  e.pathname + e.search + e.hash
103
104
  ).path;
104
105
  }, ce = function() {
105
106
  var s;
106
107
  if (document.documentElement.classList.contains("click-disabled"))
107
108
  return;
108
- if (t(this, i).hasAttribute("data-back") && t(this, N).previousURL)
109
+ if (t(this, i).hasAttribute("data-back") && t(this, M).previousURL)
109
110
  history.back();
110
111
  else {
111
112
  const a = t(this, i).getAttribute(
112
113
  "data-history-action"
113
- ) || "push", o = t(this, i).hasAttribute("data-center-scroll"), L = getComputedStyle(t(this, i)).getPropertyValue("--offset-scroll").trim(), y = L ? ke.parse(L) : void 0, p = t(this, i).hasAttribute("data-revalidate") || t(this, i).hasAttribute("data-pagination-more-link") || t(this, i).hasAttribute("data-pagination-set-link") || t(this, i).hasAttribute("data-pagination-next-link") || t(this, i).hasAttribute("data-pagination-prev-link"), c = t(this, i).hasAttribute(
114
+ ) || "push", l = t(this, i).hasAttribute("data-center-scroll"), v = getComputedStyle(t(this, i)).getPropertyValue("--offset-scroll").trim(), S = v ? ke.parse(v) : void 0, f = t(this, i).hasAttribute("data-revalidate") || t(this, i).hasAttribute("data-pagination-more-link") || t(this, i).hasAttribute("data-pagination-set-link") || t(this, i).hasAttribute("data-pagination-next-link") || t(this, i).hasAttribute("data-pagination-prev-link"), c = t(this, i).hasAttribute(
114
115
  "data-keep-search-parameters"
115
- ), E = t(this, i).hasAttribute("data-keep-scroll-position") || t(this, i).hasAttribute("data-pagination-more-link"), st = t(this, i).getAttribute(
116
+ ), p = t(this, i).hasAttribute("data-keep-scroll-position") || t(this, i).hasAttribute("data-pagination-more-link"), st = t(this, i).getAttribute(
116
117
  "data-scroll-behaviour"
117
- ), A = (s = t(this, i).getAttribute("data-submorph") || t(this, i).getAttribute("data-submorph-append")) == null ? void 0 : s.split(",").map((w) => w.trim()), at = t(this, i).hasAttribute("data-clear-state");
118
+ ), A = (s = t(this, i).getAttribute("data-submorph") || t(this, i).getAttribute("data-submorph-append")) == null ? void 0 : s.split(",").map((b) => b.trim()), at = t(this, i).hasAttribute("data-clear-state");
118
119
  let z = t(this, D, it);
119
120
  if (t(this, i).hasAttribute("data-toggle-params")) {
120
- const [w, G] = t(this, D, it).split("?"), At = new URLSearchParams(G), F = new URLSearchParams(location.search), d = new URLSearchParams();
121
+ const [b, G] = t(this, D, it).split("?"), At = new URLSearchParams(G), F = new URLSearchParams(location.search), d = new URLSearchParams();
121
122
  for (const [R] of At)
122
123
  (!F.has(R) || F.has(R) && F.get(R) !== At.get(R)) && d.append(R, At.get(R));
123
124
  if (t(this, i).hasAttribute("data-merge-params"))
124
125
  for (const [R] of F)
125
126
  At.has(R) || d.append(R, F.get(R));
126
- z = `${w}?${d.toString()}`;
127
+ z = `${b}?${d.toString()}`;
127
128
  }
128
- t(this, N).navigate(z, {
129
+ t(this, M).navigate(z, {
129
130
  historyAction: a,
130
- centerScroll: o,
131
- offsetScroll: y,
132
- revalidate: p,
131
+ centerScroll: l,
132
+ offsetScroll: S,
133
+ revalidate: f,
133
134
  keepSearchParameters: c,
134
135
  submorph: A,
135
136
  clearState: at,
136
- keepScrollPosition: E,
137
+ keepScrollPosition: p,
137
138
  scrollBehaviour: st,
138
139
  submorphAppend: t(this, i).hasAttribute("data-submorph-append"),
139
140
  mergeParams: t(this, i).hasAttribute("data-merge-params") && !t(this, i).hasAttribute("data-toggle-params"),
@@ -146,27 +147,27 @@ N = new WeakMap(), i = new WeakMap(), D = new WeakSet(), it = function() {
146
147
  var C, nt, Et, Wt, vt;
147
148
  class Re {
148
149
  constructor(e) {
149
- l(this, Et);
150
- l(this, C);
151
- l(this, nt, []);
152
- l(this, vt, () => {
153
- g(this, Et, Wt).call(this);
150
+ h(this, Et);
151
+ h(this, C);
152
+ h(this, nt, []);
153
+ h(this, vt, () => {
154
+ y(this, Et, Wt).call(this);
154
155
  });
155
156
  n(this, C, e);
156
157
  for (const s in t(this, C).dataset) {
157
158
  const a = he(s);
158
159
  if (a.startsWith("param-")) {
159
- const o = a.split("param-")[1], L = t(this, C).dataset[s];
160
+ const l = a.split("param-")[1], v = t(this, C).dataset[s];
160
161
  t(this, nt).push({
161
- name: o,
162
- value: L
162
+ name: l,
163
+ value: v
163
164
  });
164
165
  }
165
166
  }
166
167
  document.addEventListener(
167
168
  "morphURLParametersChange",
168
169
  t(this, vt)
169
- ), g(this, Et, Wt).call(this);
170
+ ), y(this, Et, Wt).call(this);
170
171
  }
171
172
  destroy() {
172
173
  document.removeEventListener(
@@ -177,33 +178,33 @@ class Re {
177
178
  }
178
179
  C = new WeakMap(), nt = new WeakMap(), Et = new WeakSet(), Wt = function() {
179
180
  const e = new URLSearchParams(location.search);
180
- let s = !!t(this, nt).find((o) => e.has(o.name) && (e.get(o.name) === o.value || o.value === "*" || o.value === "all" || o.value === "any" || o.value === "vse" || e.get(o.name) === "*" || e.get(o.name) === "all" || e.get(o.name) === "any" || e.get(o.name) === "vse"));
181
- !s && t(this, C).hasAttribute("data-match-no-params") && (s = !t(this, nt).filter((o) => e.has(o.name)).length);
181
+ let s = !!t(this, nt).find((l) => e.has(l.name) && (e.get(l.name) === l.value || l.value === "*" || l.value === "all" || l.value === "any" || l.value === "vse" || e.get(l.name) === "*" || e.get(l.name) === "all" || e.get(l.name) === "any" || e.get(l.name) === "vse"));
182
+ !s && t(this, C).hasAttribute("data-match-no-params") && (s = !t(this, nt).filter((l) => e.has(l.name)).length);
182
183
  const a = t(this, C).getAttribute("data-hide-class");
183
184
  s ? a ? t(this, C).classList.remove(a) : t(this, C).style.display = "" : a ? t(this, C).classList.add(a) : t(this, C).style.display = "none";
184
185
  }, vt = new WeakMap();
185
186
  const Ce = new DOMParser();
186
- var I, Q, H, W, Z, K, ot, _, Y, Lt, ht;
187
+ var I, Q, U, W, Z, K, ot, _, Y, Lt, ht;
187
188
  class re {
188
189
  constructor(e, s) {
189
- l(this, I);
190
- l(this, Q);
191
- l(this, H, { x: 0, y: 0 });
192
- l(this, W, null);
193
- l(this, Z, null);
194
- l(this, K, null);
195
- l(this, ot, null);
196
- l(this, _, null);
197
- l(this, Y, null);
198
- l(this, Lt);
199
- l(this, ht, !1);
190
+ h(this, I);
191
+ h(this, Q);
192
+ h(this, U, { x: 0, y: 0 });
193
+ h(this, W, null);
194
+ h(this, Z, null);
195
+ h(this, K, null);
196
+ h(this, ot, null);
197
+ h(this, _, null);
198
+ h(this, Y, null);
199
+ h(this, Lt);
200
+ h(this, ht, !1);
200
201
  n(this, I, e), n(this, Q, s);
201
202
  }
202
203
  get pathname() {
203
204
  return t(this, Q);
204
205
  }
205
206
  get scrollState() {
206
- return t(this, H);
207
+ return t(this, U);
207
208
  }
208
209
  get document() {
209
210
  return t(this, K);
@@ -225,29 +226,29 @@ class re {
225
226
  }
226
227
  fetch(e, s, a) {
227
228
  return J(this, null, function* () {
228
- var o;
229
+ var l;
229
230
  if (!a && !t(this, ht)) {
230
- const p = ((o = t(this, W)) == null ? void 0 : o.documentElement.getAttribute("data-cache")) && s !== e, c = t(this, W) && t(this, I).isPopstateNavigation;
231
- if (t(this, Y) || p || c)
231
+ const f = ((l = t(this, W)) == null ? void 0 : l.documentElement.getAttribute("data-cache")) && s !== e, c = t(this, W) && t(this, I).isPopstateNavigation;
232
+ if (t(this, Y) || f || c)
232
233
  return t(this, Y);
233
234
  }
234
- return n(this, Y, new Promise((L) => J(this, null, function* () {
235
+ return n(this, Y, new Promise((v) => J(this, null, function* () {
235
236
  try {
236
237
  n(this, _, new AbortController());
237
- const p = yield (yield fetch(e, {
238
+ const f = yield (yield fetch(e, {
238
239
  signal: t(this, _).signal,
239
- headers: Ht({
240
+ headers: Ut({
240
241
  "X-MORPH": "true",
241
- "X-MORPH-RAVALIDATE": a ? "true" : "false",
242
+ "X-MORPH-REVALIDATE": a ? "true" : "false",
242
243
  "X-MORPH-CURRENT-PATH": encodeURIComponent(s),
243
244
  "X-MORPH-NEW-PATH": encodeURIComponent(e)
244
245
  }, t(this, Lt))
245
- })).text(), c = Ce.parseFromString(p, "text/html");
246
+ })).text(), c = Ce.parseFromString(f, "text/html");
246
247
  this.setInitialDocument(c), n(this, ht, !1);
247
- } catch (y) {
248
- console.warn(y);
248
+ } catch (S) {
249
+ console.warn(S);
249
250
  } finally {
250
- n(this, _, null), n(this, Y, null), L();
251
+ n(this, _, null), n(this, Y, null), v();
251
252
  }
252
253
  }))), t(this, Y);
253
254
  });
@@ -266,7 +267,7 @@ class re {
266
267
  return e;
267
268
  }
268
269
  clearScrollState() {
269
- t(this, H).x = 0, t(this, H).y = 0;
270
+ t(this, U).x = 0, t(this, U).y = 0;
270
271
  }
271
272
  clearDocumentState() {
272
273
  n(this, Z, null);
@@ -274,12 +275,12 @@ class re {
274
275
  saveScrollState() {
275
276
  t(this, W).documentElement.hasAttribute(
276
277
  "data-no-scroll-restoration"
277
- ) ? (t(this, H).x = 0, t(this, H).y = 0) : (t(this, H).x = t(this, I).scrollValue.left, t(this, H).y = t(this, I).scrollValue.top);
278
+ ) ? (t(this, U).x = 0, t(this, U).y = 0) : (t(this, U).x = t(this, I).scrollValue.left, t(this, U).y = t(this, I).scrollValue.top);
278
279
  }
279
280
  restoreScrollPosition() {
280
281
  t(this, I).scrollElement.scroll({
281
- top: t(this, H).y,
282
- left: t(this, H).x,
282
+ top: t(this, U).y,
283
+ left: t(this, U).x,
283
284
  behavior: "instant"
284
285
  });
285
286
  }
@@ -303,43 +304,43 @@ class re {
303
304
  return n(this, ot, null), e;
304
305
  }
305
306
  }
306
- I = new WeakMap(), Q = new WeakMap(), H = new WeakMap(), W = new WeakMap(), Z = new WeakMap(), K = new WeakMap(), ot = new WeakMap(), _ = new WeakMap(), Y = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap();
307
- var x, lt, b, $, f, tt, V, j, M, St, O, yt, et, ct, dt, bt, ut, wt, m, Vt, Pt, ft, Ot, de, Ft, Xt, Bt, Tt, Mt, mt;
307
+ I = new WeakMap(), Q = new WeakMap(), U = new WeakMap(), W = new WeakMap(), Z = new WeakMap(), K = new WeakMap(), ot = new WeakMap(), _ = new WeakMap(), Y = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap();
308
+ var T, lt, w, $, u, tt, V, j, x, St, O, yt, et, ct, dt, wt, mt, bt, Pt, E, ft, Vt, Ot, Ft, Nt, xt, ut;
308
309
  const pt = class pt {
309
310
  constructor(e) {
310
- l(this, m);
311
- l(this, x, null);
312
- l(this, lt, null);
313
- l(this, b, []);
314
- l(this, $);
315
- l(this, f, null);
316
- l(this, tt);
317
- l(this, V, []);
318
- l(this, j, !1);
319
- l(this, M, null);
320
- l(this, St, !1);
321
- l(this, O, /* @__PURE__ */ new Map());
322
- l(this, yt, []);
323
- l(this, et, null);
324
- l(this, ct, 0);
325
- l(this, dt, 0);
326
- l(this, bt);
327
- l(this, ut);
328
- l(this, wt);
329
- l(this, Pt, (e) => {
311
+ h(this, E);
312
+ h(this, T, null);
313
+ h(this, lt, null);
314
+ h(this, w, []);
315
+ h(this, $);
316
+ h(this, u, null);
317
+ h(this, tt);
318
+ h(this, V, []);
319
+ h(this, j, !1);
320
+ h(this, x, null);
321
+ h(this, St, !1);
322
+ h(this, O, /* @__PURE__ */ new Map());
323
+ h(this, yt, []);
324
+ h(this, et, null);
325
+ h(this, ct, 0);
326
+ h(this, dt, 0);
327
+ h(this, wt);
328
+ h(this, mt);
329
+ h(this, bt);
330
+ h(this, Pt, (e) => {
330
331
  var s, a;
331
332
  return (((s = e.getAttribute("href")) == null ? void 0 : s.startsWith("/")) || ((a = e.getAttribute("href")) == null ? void 0 : a.startsWith("?"))) && !e.hasAttribute("download") && !e.hasAttribute("data-morph-skip") && !e.closest("[data-morph-skip]") && e.getAttribute("target") !== "_blank";
332
333
  });
333
- l(this, Mt, (e) => J(this, null, function* () {
334
+ h(this, xt, (e) => J(this, null, function* () {
334
335
  e.preventDefault(), n(this, j, !0), yield this.navigate(location.href.replace(location.origin, ""), {
335
336
  historyAction: "none",
336
- submorph: t(this, ut) ? void 0 : t(this, bt),
337
- revalidate: t(this, ut),
338
- keepScrollPosition: t(this, wt)
337
+ submorph: t(this, mt) ? void 0 : t(this, wt),
338
+ revalidate: t(this, mt),
339
+ keepScrollPosition: t(this, bt)
339
340
  }), n(this, j, !1);
340
341
  }));
341
- l(this, mt, () => {
342
- const { left: e, top: s } = this.scrollValue, a = s - t(this, dt), o = e - t(this, ct);
342
+ h(this, ut, () => {
343
+ const { left: e, top: s } = this.scrollValue, a = s - t(this, dt), l = e - t(this, ct);
343
344
  n(this, dt, s), n(this, ct, e), document.documentElement.classList.toggle("scroll-y", s > 0), document.documentElement.classList.toggle("scroll-x", e > 0), document.documentElement.classList.toggle(
344
345
  "scroll-y-forward",
345
346
  a > 0
@@ -348,10 +349,10 @@ const pt = class pt {
348
349
  a < 0
349
350
  ), document.documentElement.classList.toggle(
350
351
  "scroll-x-forward",
351
- o > 0
352
+ l > 0
352
353
  ), document.documentElement.classList.toggle(
353
354
  "scroll-x-backward",
354
- o < 0
355
+ l < 0
355
356
  ), q(document, "morphScroll", {
356
357
  detail: {
357
358
  left: e,
@@ -360,78 +361,78 @@ const pt = class pt {
360
361
  });
361
362
  });
362
363
  if (oe && !pt.instance) {
363
- pt.instance = this, n(this, x, {
364
+ pt.instance = this, n(this, T, {
364
365
  base: Pe(e == null ? void 0 : e.base),
365
366
  waitForHeadToLoad: (e == null ? void 0 : e.waitForHeadToLoad) !== !1,
366
367
  trailingSlash: (e == null ? void 0 : e.trailingSlash) || !1,
367
368
  scrollSelector: e == null ? void 0 : e.scrollSelector,
368
369
  morphInsideScrollContainer: (e == null ? void 0 : e.morphInsideScrollContainer) || !1
369
- }), n(this, lt, g(this, m, Ot).call(this, document.body));
370
+ }), n(this, lt, y(this, E, Vt).call(this, document.body));
370
371
  const s = this.normalizePath(
371
372
  location.pathname + location.search + location.hash
372
373
  );
373
- n(this, f, s);
374
- const a = new re(this, t(this, f).pathname);
375
- a.setInitialDocument(document), t(this, O).set(t(this, f).pathname, a), document.documentElement.setAttribute(
374
+ n(this, u, s);
375
+ const a = new re(this, t(this, u).pathname);
376
+ a.setInitialDocument(document), t(this, O).set(t(this, u).pathname, a), document.documentElement.setAttribute(
376
377
  "data-current-pathname",
377
- t(this, f).pathname
378
+ t(this, u).pathname
378
379
  ), document.documentElement.setAttribute(
379
380
  "data-current-leaf",
380
381
  s.leaf
381
- ), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this, Mt)), qt({
382
+ ), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this, xt)), qt({
382
383
  action: "replace",
383
384
  pathname: s.pathname,
384
385
  searchParameters: s.parameters,
385
386
  hash: s.hash
386
- }), n(this, et, new le()), g(this, m, Bt).call(this, document);
387
+ }), n(this, et, new le()), y(this, E, Ft).call(this, document);
387
388
  }
388
389
  }
389
390
  get currentURL() {
390
- return t(this, f);
391
+ return t(this, u);
391
392
  }
392
393
  get previousURL() {
393
394
  return t(this, tt);
394
395
  }
395
396
  get links() {
396
- return t(this, b);
397
+ return t(this, w);
397
398
  }
398
399
  get scrollElement() {
399
- return t(this, M);
400
+ return t(this, x);
400
401
  }
401
402
  get isPopstateNavigation() {
402
403
  return t(this, j);
403
404
  }
404
405
  get scrollValue() {
405
406
  let e = 0, s = 0;
406
- return t(this, St) ? (e = window.scrollY, s = window.scrollX) : (e = t(this, M).scrollTop, s = t(this, M).scrollLeft), { top: e, left: s };
407
+ return t(this, St) ? (e = window.scrollY, s = window.scrollX) : (e = t(this, x).scrollTop, s = t(this, x).scrollLeft), { top: e, left: s };
407
408
  }
408
409
  get isNavigating() {
409
410
  return !!t(this, V).length;
410
411
  }
411
412
  saveState(e) {
412
- const s = t(this, O).get(t(this, f).path);
413
+ const s = t(this, O).get(t(this, u).path);
413
414
  s && s.saveState(e);
414
415
  }
415
416
  getState() {
416
- const e = t(this, O).get(t(this, f).path);
417
+ const e = t(this, O).get(t(this, u).path);
417
418
  return e == null ? void 0 : e.clearState();
418
419
  }
419
420
  normalizePath(e, s) {
420
421
  return Ae(e, {
421
- base: t(this, x).base,
422
- trailingSlash: t(this, x).trailingSlash,
422
+ base: t(this, T).base,
423
+ trailingSlash: t(this, T).trailingSlash,
423
424
  mergeParams: s != null && s.mergeParams ? location.search : "",
424
425
  removeParams: s == null ? void 0 : s.removeParams
425
426
  });
426
427
  }
427
428
  prefetch(e, s) {
428
429
  return J(this, null, function* () {
429
- var o;
430
+ var l;
430
431
  if (t(this, V).length)
431
432
  return;
432
- e = ((o = this.pathnameModifier) == null ? void 0 : o.call(this, e)) || e;
433
- const a = g(this, m, ft).call(this, e);
434
- a == null || a.fetch(e, t(this, f).path, s);
433
+ e = ((l = this.pathnameModifier) == null ? void 0 : l.call(this, e)) || e;
434
+ const a = y(this, E, ft).call(this, e);
435
+ a == null || a.fetch(e, t(this, u).path, s);
435
436
  });
436
437
  }
437
438
  excludeHeadChild(e) {
@@ -440,60 +441,60 @@ const pt = class pt {
440
441
  setHeaders(e) {
441
442
  }
442
443
  needRavalidation(e) {
443
- const s = this.normalizePath(e), a = g(this, m, ft).call(this, s.path);
444
+ const s = this.normalizePath(e), a = y(this, E, ft).call(this, s.path);
444
445
  a == null || a.needRavalidation();
445
446
  }
446
447
  navigate(At) {
447
448
  return J(this, arguments, function* (e, {
448
449
  historyAction: s = "push",
449
450
  centerScroll: a,
450
- offsetScroll: o,
451
- scrollBehaviour: L,
452
- revalidate: y,
453
- keepSearchParameters: p,
451
+ offsetScroll: l,
452
+ scrollBehaviour: v,
453
+ revalidate: S,
454
+ keepSearchParameters: f,
454
455
  submorph: c,
455
- submorphAppend: E,
456
+ submorphAppend: p,
456
457
  clearState: st,
457
458
  keepScrollPosition: A,
458
459
  mergeParams: at,
459
460
  removeParams: z,
460
- detail: w,
461
+ detail: b,
461
462
  scrollTo: G
462
463
  } = {}) {
463
- var R, Kt, Yt, $t;
464
+ var R, Xt, Bt, Kt;
464
465
  if (t(this, V).length)
465
466
  return;
466
- n(this, bt, c), n(this, ut, y), n(this, wt, A);
467
+ n(this, wt, c), n(this, mt, S), n(this, bt, A);
467
468
  const F = ((R = this.pathnameModifier) == null ? void 0 : R.call(this, e)) || e, d = this.normalizePath(F, {
468
469
  mergeParams: at,
469
470
  removeParams: z
470
471
  });
471
- if (!y && (((Kt = t(this, $)) == null ? void 0 : Kt.pathname) === d.pathname || t(this, f).pathname === d.pathname)) {
472
- A || g(this, m, Tt).call(this, d.hash || 0, {
472
+ if (!S && (((Xt = t(this, $)) == null ? void 0 : Xt.pathname) === d.pathname || t(this, u).pathname === d.pathname)) {
473
+ A || y(this, E, Nt).call(this, d.hash || 0, {
473
474
  centerScroll: a,
474
- offsetScroll: o,
475
+ offsetScroll: l,
475
476
  behavior: "smooth"
476
477
  }), q(document, "morphSamePath", {
477
478
  detail: {
478
- detail: w
479
+ detail: b
479
480
  }
480
- }), ((Yt = t(this, f)) == null ? void 0 : Yt.parameters) !== d.parameters && (n(this, tt, t(this, f)), n(this, f, d), qt({
481
- action: (($t = t(this, f)) == null ? void 0 : $t.hash) !== d.hash ? "replace" : s,
481
+ }), ((Bt = t(this, u)) == null ? void 0 : Bt.parameters) !== d.parameters && (n(this, tt, t(this, u)), n(this, u, d), qt({
482
+ action: ((Kt = t(this, u)) == null ? void 0 : Kt.hash) !== d.hash ? "replace" : s,
482
483
  pathname: d.pathname,
483
484
  searchParameters: d.parameters,
484
485
  hash: d.hash
485
486
  }), q(document, "morphURLParametersChange", {
486
487
  detail: {
487
- newURL: t(this, f),
488
+ newURL: t(this, u),
488
489
  previousURL: t(this, tt),
489
- detail: w
490
+ detail: b
490
491
  }
491
- })), t(this, b).forEach((X) => {
492
+ })), t(this, w).forEach((X) => {
492
493
  X.checkCurrent(d.path);
493
494
  });
494
495
  return;
495
496
  } else
496
- t(this, b).forEach((X) => {
497
+ t(this, w).forEach((X) => {
497
498
  X.checkCurrent(d.path);
498
499
  });
499
500
  n(this, $, d);
@@ -502,95 +503,106 @@ const pt = class pt {
502
503
  if (this.preprocessor)
503
504
  try {
504
505
  yield new Promise((r, P) => {
505
- var T;
506
- (T = this.preprocessor) == null || T.call(this, {
506
+ var N;
507
+ (N = this.preprocessor) == null || N.call(this, {
507
508
  url: d,
508
509
  resolve: r,
509
510
  reject: P,
510
511
  submorph: c,
511
- detail: w
512
+ detail: b
512
513
  });
513
514
  });
514
515
  } catch (r) {
515
516
  r ? console.error(r) : console.log("Route change canceled"), X = !1;
516
517
  }
517
518
  if (!X || t(this, $).pathname !== d.pathname) {
518
- t(this, b).forEach((r) => {
519
- r.checkCurrent(t(this, f).path);
519
+ t(this, w).forEach((r) => {
520
+ r.checkCurrent(t(this, u).path);
520
521
  });
521
522
  return;
522
523
  }
523
- const jt = {
524
+ const Yt = {
524
525
  url: d,
525
526
  submorph: c,
526
- detail: w
527
+ detail: b
527
528
  };
528
- c ? E || c.forEach((r) => {
529
+ c ? p || c.forEach((r) => {
529
530
  document.querySelectorAll(r).forEach((P) => {
530
531
  P.classList.add("out"), P.setAttribute("data-morph-out", "");
531
532
  });
532
533
  }) : t(this, lt).forEach((r) => {
533
- var P, T;
534
- (P = r.firstElementChild) == null || P.classList.add("out"), (T = r.firstElementChild) == null || T.setAttribute("data-morph-out", "");
534
+ var P, N;
535
+ (P = r.firstElementChild) == null || P.classList.add("out"), (N = r.firstElementChild) == null || N.setAttribute("data-morph-out", "");
535
536
  }), q(document, "morphNavigation", {
536
- detail: jt
537
+ detail: Yt
537
538
  });
538
- const Ut = g(this, m, ft).call(this, t(this, f).pathname), S = g(this, m, ft).call(this, d.pathname);
539
+ const Ht = y(this, E, ft).call(this, t(this, u).pathname), L = y(this, E, ft).call(this, d.pathname);
539
540
  if (t(this, O).forEach((r) => {
540
541
  r.pathname !== d.pathname && r.abort();
541
- }), yield S == null ? void 0 : S.fetch(F, t(this, f).path, y), t(this, $).pathname !== d.pathname) {
542
- t(this, b).forEach((r) => {
543
- r.checkCurrent(t(this, f).path);
542
+ }), yield L == null ? void 0 : L.fetch(F, t(this, u).path, S), t(this, $).pathname !== d.pathname) {
543
+ t(this, w).forEach((r) => {
544
+ r.checkCurrent(t(this, u).path);
544
545
  });
545
546
  return;
546
547
  }
547
- Ut.clearState(), Ut.saveScrollState(), Ut.saveDocumentState(), (!t(this, j) || y) && (S.clearScrollState(), S.clearDocumentState()), st && S.clearState(), S.cloneDocument(), t(this, et).textContent = S.title, document.body.appendChild(t(this, et));
548
- const kt = Dt(Ht({}, jt), {
549
- document: S.document
548
+ Ht.clearState(), Ht.saveScrollState(), Ht.saveDocumentState(), (!t(this, j) || S) && (L.clearScrollState(), L.clearDocumentState()), st && L.clearState(), L.cloneDocument(), t(this, et).textContent = L.title, document.body.appendChild(t(this, et));
549
+ const kt = Dt(Ut({}, Yt), {
550
+ document: L.document
550
551
  });
551
- E || kt.document.querySelectorAll("[data-morph-out]").forEach((r) => {
552
+ p || kt.document.querySelectorAll("[data-morph-out]").forEach((r) => {
552
553
  r.classList.remove("out");
553
554
  }), q(document, "morphStart", {
554
555
  detail: kt
555
556
  });
556
- const Gt = Array.from(document.head.children), Jt = Array.from(S.document.head.children), Qt = g(this, m, de).call(this, Gt, Jt), ue = g(this, m, Ft).call(this, Gt, Qt), Rt = g(this, m, Ft).call(this, Jt, Qt).filter((r) => !this.excludeHeadChild(r));
557
+ const $t = Array.from(document.head.children), jt = Array.from(L.document.head.children), Gt = ye(
558
+ $t,
559
+ jt
560
+ ), de = ae(
561
+ $t,
562
+ Gt
563
+ ), Rt = ae(
564
+ jt,
565
+ Gt
566
+ ).filter((r) => !this.excludeHeadChild(r));
557
567
  Rt.forEach((r, P) => {
558
- r.tagName === "SCRIPT" && (Rt[P] = g(this, m, Vt).call(this, r));
568
+ r.tagName === "SCRIPT" && (Rt[P] = ie(
569
+ r
570
+ ));
559
571
  }), Rt.forEach((r) => {
560
572
  document.head.appendChild(r);
561
573
  });
562
- const Nt = Rt.filter((r) => {
574
+ const Mt = Rt.filter((r) => {
563
575
  if (r.hasAttribute("data-no-waiting"))
564
576
  return !1;
565
- if (g(this, m, Xt).call(this, r))
577
+ if (y(this, E, Ot).call(this, r))
566
578
  return !0;
567
579
  });
568
- t(this, x).waitForHeadToLoad && Nt.length && (yield new Promise((r) => J(this, null, function* () {
580
+ t(this, T).waitForHeadToLoad && Mt.length && (yield new Promise((r) => J(this, null, function* () {
569
581
  let P = 0;
570
582
  try {
571
- for (var T = ie(Nt), fe, B, U; fe = !(B = yield T.next()).done; fe = !1) {
583
+ for (var N = se(Mt), ue, B, H; ue = !(B = yield N.next()).done; ue = !1) {
572
584
  const Ct = B.value;
573
585
  Ct.onload = () => {
574
- P++, P === Nt.length && r();
586
+ P++, P === Mt.length && r();
575
587
  };
576
588
  }
577
589
  } catch (B) {
578
- U = [B];
590
+ H = [B];
579
591
  } finally {
580
592
  try {
581
- fe && (B = T.return) && (yield B.call(T));
593
+ ue && (B = N.return) && (yield B.call(N));
582
594
  } finally {
583
- if (U)
584
- throw U[0];
595
+ if (H)
596
+ throw H[0];
585
597
  }
586
598
  }
587
- }))), yield be(10);
588
- const Zt = [];
589
- E || ue.forEach((r) => {
590
- r.hasAttribute("data-permanent") || (g(this, m, Xt).call(this, r) ? Zt.push(r) : r.remove());
599
+ }))), yield we(10);
600
+ const Jt = [];
601
+ p || de.forEach((r) => {
602
+ r.hasAttribute("data-permanent") || (y(this, E, Ot).call(this, r) ? Jt.push(r) : r.remove());
591
603
  });
592
- const me = g(this, m, Ot).call(this, S.document.body);
593
- !t(this, x).morphInsideScrollContainer && !c && g(this, m, Bt).call(this, S.document), document.documentElement.setAttribute(
604
+ const me = y(this, E, Vt).call(this, L.document.body);
605
+ !t(this, T).morphInsideScrollContainer && !c && y(this, E, Ft).call(this, L.document), document.documentElement.setAttribute(
594
606
  "data-current-pathname",
595
607
  d.pathname
596
608
  ), document.documentElement.setAttribute(
@@ -599,102 +611,102 @@ const pt = class pt {
599
611
  ), qt({
600
612
  action: s,
601
613
  pathname: d.pathname,
602
- searchParameters: d.parameters || (p ? location.search : ""),
614
+ searchParameters: d.parameters || (f ? location.search : ""),
603
615
  hash: d.hash
604
- }), t(this, et).remove(), n(this, tt, t(this, f)), n(this, f, d);
605
- const xt = [];
616
+ }), t(this, et).remove(), n(this, tt, t(this, u)), n(this, u, d);
617
+ const Tt = [];
606
618
  t(this, lt).forEach((r, P) => {
607
- const T = me[P], fe = getComputedStyle(r).getPropertyValue("--morph-duration");
608
- let B = [], U = [];
609
- c ? (c.forEach((u) => {
610
- const v = r.querySelector(u), k = T.querySelector(u);
611
- v && k && (U.push(v), B.push(k));
612
- }), U.forEach((u) => {
613
- u.parentElement && xt.push(u.parentElement);
614
- })) : (B.push(...T.childNodes), U.push(...r.childNodes), xt.push(r));
619
+ const N = me[P], ue = getComputedStyle(r).getPropertyValue("--morph-duration");
620
+ let B = [], H = [];
621
+ c ? (c.forEach((m) => {
622
+ const g = r.querySelector(m), k = N.querySelector(m);
623
+ g && k && (H.push(g), B.push(k));
624
+ }), H.forEach((m) => {
625
+ m.parentElement && Tt.push(m.parentElement);
626
+ })) : (B.push(...N.childNodes), H.push(...r.childNodes), Tt.push(r));
615
627
  const Ct = [];
616
- E || U.forEach((u) => {
617
- u instanceof HTMLElement && (this.destroyOldLinks(u), u.classList.add("old"), u.querySelectorAll(
628
+ p || H.forEach((m) => {
629
+ m instanceof HTMLElement && (this.destroyOldLinks(m), m.classList.add("old"), m.querySelectorAll(
618
630
  "[data-morph-transfer]"
619
631
  ).forEach((k) => {
620
- const ge = k.getAttribute("data-morph-transfer");
632
+ const pe = k.getAttribute("data-morph-transfer");
621
633
  Ct.push({
622
634
  element: k,
623
- selector: ge
635
+ selector: pe
624
636
  });
625
637
  }));
626
- }), B.forEach((u) => {
627
- u instanceof HTMLElement && (Ct.forEach((v) => {
628
- const k = u.querySelector(v.selector);
638
+ }), B.forEach((m) => {
639
+ m instanceof HTMLElement && (Ct.forEach((g) => {
640
+ const k = m.querySelector(g.selector);
629
641
  k && k.replaceWith(
630
- S.document.importNode(v.element, !0)
642
+ L.document.importNode(g.element, !0)
631
643
  );
632
- }), this.findNewLinks(u), u.classList.add("new"));
633
- }), c ? E ? B.forEach((u, v) => {
634
- U[v] instanceof HTMLElement && U[v].append(...u.childNodes);
635
- }) : B.forEach((u, v) => {
644
+ }), this.findNewLinks(m), m.classList.add("new"));
645
+ }), c ? p ? B.forEach((m, g) => {
646
+ H[g] instanceof HTMLElement && H[g].append(...m.childNodes);
647
+ }) : B.forEach((m, g) => {
636
648
  var k;
637
- (k = U[v].parentElement) == null || k.insertBefore(
638
- u,
639
- U[v]
649
+ (k = H[g].parentElement) == null || k.insertBefore(
650
+ m,
651
+ H[g]
640
652
  );
641
653
  }) : r.prepend(...B), setTimeout(() => {
642
- E || U.forEach((u) => {
643
- u instanceof HTMLElement && u.classList.add("old-idle");
644
- }), B.forEach((u) => {
645
- var v;
646
- u instanceof HTMLElement && ((v = u.parentElement) == null || v.style.setProperty(
654
+ p || H.forEach((m) => {
655
+ m instanceof HTMLElement && m.classList.add("old-idle");
656
+ }), B.forEach((m) => {
657
+ var g;
658
+ m instanceof HTMLElement && ((g = m.parentElement) == null || g.style.setProperty(
647
659
  "--new-content-height",
648
- u.offsetHeight + "px"
649
- ), u.classList.add("new-idle"));
660
+ m.offsetHeight + "px"
661
+ ), m.classList.add("new-idle"));
650
662
  });
651
663
  }, 0);
652
- const _t = Dt(Ht({}, kt), {
664
+ const Qt = Dt(Ut({}, kt), {
653
665
  morphElement: r
654
666
  });
655
667
  q(document, "morphNewChildrenAdded", {
656
- detail: _t
668
+ detail: Qt
657
669
  });
658
- const pe = new Promise((u) => {
670
+ const fe = new Promise((m) => {
659
671
  setTimeout(
660
672
  () => {
661
- E || U.forEach((v) => {
662
- v.remove();
663
- }), B.forEach((v) => {
673
+ p || H.forEach((g) => {
674
+ g.remove();
675
+ }), B.forEach((g) => {
664
676
  var k;
665
- v instanceof HTMLElement && ((k = v.parentElement) == null || k.style.removeProperty(
677
+ g instanceof HTMLElement && ((k = g.parentElement) == null || k.style.removeProperty(
666
678
  "--new-content-height"
667
- ), v.classList.remove("new-idle", "new"));
668
- }), E || q(document, "morphOldChildrenRemoved", {
669
- detail: _t
670
- }), u();
679
+ ), g.classList.remove("new-idle", "new"));
680
+ }), p || q(document, "morphOldChildrenRemoved", {
681
+ detail: Qt
682
+ }), m();
671
683
  },
672
- (parseFloat(fe) || 0) * 1e3 + 10
684
+ (parseFloat(ue) || 0) * 1e3 + 10
673
685
  );
674
686
  });
675
- t(this, V).push(pe);
687
+ t(this, V).push(fe);
676
688
  }), this.isPopstateNavigation ? document.documentElement.style.setProperty(
677
689
  "--new-document-scroll-position",
678
- (this.scrollValue.top - S.scrollState.y) * 1 + "px"
690
+ (this.scrollValue.top - L.scrollState.y) * 1 + "px"
679
691
  ) : document.documentElement.style.setProperty(
680
692
  "--new-document-scroll-position",
681
693
  this.scrollValue.top + "px"
682
694
  ), q(document, "morphBeforeNavigationScroll", {
683
- detail: S.scrollState
684
- }), G ? (S.clearScrollState(), g(this, m, Tt).call(this, G, {
695
+ detail: L.scrollState
696
+ }), G ? (L.clearScrollState(), y(this, E, Nt).call(this, G, {
685
697
  centerScroll: a,
686
- offsetScroll: o,
687
- behavior: L
688
- })) : d.hash ? (S.clearScrollState(), g(this, m, Tt).call(this, d.hash, {
698
+ offsetScroll: l,
699
+ behavior: v
700
+ })) : d.hash ? (L.clearScrollState(), y(this, E, Nt).call(this, d.hash, {
689
701
  centerScroll: a,
690
- offsetScroll: o,
691
- behavior: L
692
- })) : t(this, j) ? S.restoreScrollPosition() : A || S.renewScrollPosition(), yield Promise.all(t(this, V)), E || Zt.forEach((r) => r.remove()), n(this, V, []), xt.forEach((r) => {
693
- r.querySelectorAll("script").forEach((T) => {
694
- T.replaceWith(g(this, m, Vt).call(this, T));
702
+ offsetScroll: l,
703
+ behavior: v
704
+ })) : t(this, j) ? L.restoreScrollPosition() : A || L.renewScrollPosition(), yield Promise.all(t(this, V)), p || Jt.forEach((r) => r.remove()), n(this, V, []), Tt.forEach((r) => {
705
+ r.querySelectorAll("script").forEach((N) => {
706
+ N.replaceWith(ie(N));
695
707
  });
696
- }), t(this, b).forEach((r) => {
697
- r.checkCurrent(t(this, f).path);
708
+ }), t(this, w).forEach((r) => {
709
+ r.checkCurrent(t(this, u).path);
698
710
  }), this.findParamsDependent(), q(document, "morphComplete", {
699
711
  detail: kt
700
712
  }), document.documentElement.style.removeProperty(
@@ -707,7 +719,7 @@ const pt = class pt {
707
719
  });
708
720
  }
709
721
  addLink(e) {
710
- t(this, b).push(new It(e, this));
722
+ t(this, w).push(new It(e, this));
711
723
  }
712
724
  addLinks(e) {
713
725
  e.forEach((s) => {
@@ -715,16 +727,16 @@ const pt = class pt {
715
727
  });
716
728
  }
717
729
  removeLink(e) {
718
- n(this, b, t(this, b).filter((s) => s.element === e ? (s.destroy(), !1) : !0));
730
+ n(this, w, t(this, w).filter((s) => s.element === e ? (s.destroy(), !1) : !0));
719
731
  }
720
732
  destroyOldLinks(e) {
721
- n(this, b, t(this, b).filter((s) => e.contains(s.element) ? (s.destroy(), !1) : !0));
733
+ n(this, w, t(this, w).filter((s) => e.contains(s.element) ? (s.destroy(), !1) : !0));
722
734
  }
723
735
  findNewLinks(e) {
724
736
  const s = [...e.querySelectorAll("a")].filter(
725
737
  t(this, Pt)
726
738
  );
727
- t(this, b).push(
739
+ t(this, w).push(
728
740
  ...s.map((a) => new It(a, this))
729
741
  );
730
742
  }
@@ -732,7 +744,7 @@ const pt = class pt {
732
744
  const e = [
733
745
  ...document.documentElement.querySelectorAll("a")
734
746
  ].filter(t(this, Pt));
735
- t(this, b).forEach((s) => s.destroy()), n(this, b, e.map((s) => new It(s, this)));
747
+ t(this, w).forEach((s) => s.destroy()), n(this, w, e.map((s) => new It(s, this)));
736
748
  }
737
749
  findParamsDependent() {
738
750
  const e = [
@@ -745,49 +757,30 @@ const pt = class pt {
745
757
  ));
746
758
  }
747
759
  };
748
- x = new WeakMap(), lt = new WeakMap(), b = new WeakMap(), $ = new WeakMap(), f = new WeakMap(), tt = new WeakMap(), V = new WeakMap(), j = new WeakMap(), M = new WeakMap(), St = new WeakMap(), O = new WeakMap(), yt = new WeakMap(), et = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), bt = new WeakMap(), ut = new WeakMap(), wt = new WeakMap(), m = new WeakSet(), Vt = function(e) {
749
- const s = document.createElement("script");
750
- for (let a = 0; a < e.attributes.length; a++) {
751
- const o = e.attributes[a];
752
- s.setAttribute(o.name, o.value);
753
- }
754
- return e.hasAttribute("src") || (s.innerHTML = e.innerHTML), s;
755
- }, Pt = new WeakMap(), ft = function(e) {
760
+ T = new WeakMap(), lt = new WeakMap(), w = new WeakMap(), $ = new WeakMap(), u = new WeakMap(), tt = new WeakMap(), V = new WeakMap(), j = new WeakMap(), x = new WeakMap(), St = new WeakMap(), O = new WeakMap(), yt = new WeakMap(), et = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), wt = new WeakMap(), mt = new WeakMap(), bt = new WeakMap(), Pt = new WeakMap(), E = new WeakSet(), ft = function(e) {
756
761
  const s = this.normalizePath(e);
757
762
  let a = t(this, O).get(s.pathname);
758
763
  return a || (a = new re(this, s.pathname), t(this, O).set(s.pathname, a)), a;
759
- }, Ot = function(e) {
764
+ }, Vt = function(e) {
760
765
  const s = [...e.querySelectorAll("[data-morph]")];
761
766
  return s.length ? s : [e];
762
- }, de = function(e, s) {
763
- return e.filter(
764
- (a) => s.find(
765
- (o) => o.outerHTML === a.outerHTML
766
- )
767
- );
768
- }, Ft = function(e, s) {
769
- return e.filter(
770
- (a) => !s.find(
771
- (o) => o.outerHTML === a.outerHTML
772
- )
773
- );
774
- }, Xt = function(e) {
767
+ }, Ot = function(e) {
775
768
  return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
776
- }, Bt = function(e) {
769
+ }, Ft = function(e) {
777
770
  var s, a;
778
- (s = t(this, M)) == null || s.removeEventListener(
771
+ (s = t(this, x)) == null || s.removeEventListener(
779
772
  "scroll",
780
- t(this, mt)
781
- ), n(this, dt, 0), n(this, ct, 0), n(this, M, t(this, x).scrollSelector && e.querySelector(t(this, x).scrollSelector) || window), n(this, St, t(this, M) === window), (a = t(this, M)) == null || a.addEventListener("scroll", t(this, mt)), t(this, mt).call(this);
782
- }, Tt = function(e, s) {
773
+ t(this, ut)
774
+ ), n(this, dt, 0), n(this, ct, 0), n(this, x, t(this, T).scrollSelector && e.querySelector(t(this, T).scrollSelector) || window), n(this, St, t(this, x) === window), (a = t(this, x)) == null || a.addEventListener("scroll", t(this, ut)), t(this, ut).call(this);
775
+ }, Nt = function(e, s) {
783
776
  const a = typeof e == "string" ? document.getElementById(e) : e;
784
- (typeof a == "number" || a) && we(a, {
785
- scrollElement: t(this, M),
777
+ (typeof a == "number" || a) && be(a, {
778
+ scrollElement: t(this, x),
786
779
  behavior: (s == null ? void 0 : s.behavior) || "instant",
787
780
  center: s == null ? void 0 : s.centerScroll,
788
781
  offset: s == null ? void 0 : s.offsetScroll
789
782
  });
790
- }, Mt = new WeakMap(), mt = new WeakMap(), pt.instance = null;
783
+ }, xt = new WeakMap(), ut = new WeakMap(), pt.instance = null;
791
784
  let ne = pt;
792
785
  export {
793
786
  ne as Morph