aptechka 0.81.1 → 0.82.1

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