aptechka 0.43.4 → 0.44.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 (105) hide show
  1. package/lib/Animation-D1lL_XhF.cjs +1 -0
  2. package/lib/Animation-Je56LXXj.js +106 -0
  3. package/lib/{Damped-DxylD27S.js → Damped-BMmEn7PH.js} +4 -3
  4. package/lib/Damped-BbJjFOLH.cjs +1 -0
  5. package/lib/{Store-Cm3LPXlx.js → Store-D2xCXENW.js} +1 -1
  6. package/lib/Store-DRp_K37w.cjs +1 -0
  7. package/lib/{Tweened-p5hYr6lL.js → Tweened-BNCj14Jz.js} +4 -3
  8. package/lib/Tweened-Dk1UNPSH.cjs +1 -0
  9. package/lib/accordion/index.cjs +1 -1
  10. package/lib/accordion/index.js +45 -45
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +2 -2
  15. package/lib/canvas/index.cjs +1 -1
  16. package/lib/canvas/index.js +11 -11
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +12 -11
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +3 -3
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +7 -6
  23. package/lib/custom-scrollbar/index.cjs +1 -1
  24. package/lib/custom-scrollbar/index.js +13 -12
  25. package/lib/dev/index.cjs +1 -1
  26. package/lib/dev/index.js +7 -6
  27. package/lib/device/index.cjs +1 -1
  28. package/lib/device/index.js +2 -2
  29. package/lib/element-resizer/index.cjs +1 -1
  30. package/lib/element-resizer/index.js +1 -1
  31. package/lib/en3/index.cjs +1 -1
  32. package/lib/en3/index.js +9 -8
  33. package/lib/iframe/index.cjs +1 -1
  34. package/lib/iframe/index.js +6 -5
  35. package/lib/image/index.cjs +1 -1
  36. package/lib/image/index.js +5 -4
  37. package/lib/index-Cqw2NKev.cjs +1 -0
  38. package/lib/index-euf5anj6.js +64 -0
  39. package/lib/intersector/index.cjs +1 -1
  40. package/lib/intersector/index.js +4 -61
  41. package/lib/{jss-CjccJC-K.js → jss-BQSxj7Ls.js} +1 -1
  42. package/lib/jss-B_mh4mIw.cjs +1 -0
  43. package/lib/ladder/index.cjs +1 -1
  44. package/lib/ladder/index.js +35 -34
  45. package/lib/layout-box/index.cjs +1 -1
  46. package/lib/layout-box/index.js +1 -1
  47. package/lib/loading/index.cjs +1 -1
  48. package/lib/loading/index.js +10 -9
  49. package/lib/masonry-layout/index.cjs +1 -1
  50. package/lib/masonry-layout/index.js +17 -16
  51. package/lib/media/index.cjs +1 -1
  52. package/lib/media/index.js +7 -6
  53. package/lib/morph/Morph.d.ts +11 -2
  54. package/lib/morph/MorphAnnouncer.d.ts +0 -1
  55. package/lib/morph/index.cjs +1 -1
  56. package/lib/morph/index.js +263 -211
  57. package/lib/need_redo_tweaker/index.cjs +3 -3
  58. package/lib/need_redo_tweaker/index.js +260 -260
  59. package/lib/pointer/index.cjs +1 -1
  60. package/lib/pointer/index.js +34 -33
  61. package/lib/popover/index.cjs +1 -1
  62. package/lib/popover/index.js +25 -25
  63. package/lib/router/index.cjs +1 -1
  64. package/lib/router/index.js +6 -5
  65. package/lib/scroll/index.cjs +1 -1
  66. package/lib/scroll/index.js +278 -278
  67. package/lib/scroll-segment/index.cjs +1 -1
  68. package/lib/scroll-segment/index.js +57 -56
  69. package/lib/sequence/index.cjs +1 -1
  70. package/lib/sequence/index.js +6 -6
  71. package/lib/size-element/index.cjs +1 -1
  72. package/lib/size-element/index.js +12 -11
  73. package/lib/slicer/SlicerElement.d.ts +2 -2
  74. package/lib/slicer/index.cjs +2 -2
  75. package/lib/slicer/index.js +10 -9
  76. package/lib/source/index.cjs +2 -2
  77. package/lib/source/index.js +2 -2
  78. package/lib/store/index.cjs +1 -1
  79. package/lib/store/index.js +13 -12
  80. package/lib/ticker/index.cjs +1 -1
  81. package/lib/ticker/index.js +1 -1
  82. package/lib/url-CLvdjbII.cjs +1 -0
  83. package/lib/url-CfcHdBT6.js +49 -0
  84. package/lib/utils/index.cjs +1 -1
  85. package/lib/utils/index.d.ts +1 -0
  86. package/lib/utils/index.js +163 -148
  87. package/lib/utils/timeouts.d.ts +5 -0
  88. package/lib/utils/url.d.ts +15 -2
  89. package/lib/video/index.cjs +1 -1
  90. package/lib/video/index.js +7 -6
  91. package/lib/window-resizer/index.cjs +1 -1
  92. package/lib/window-resizer/index.js +1 -1
  93. package/lib/youtube/index.cjs +1 -1
  94. package/lib/youtube/index.js +13 -12
  95. package/package.json +1 -1
  96. package/lib/Animation-CMiBKrwE.cjs +0 -1
  97. package/lib/Animation-DPRlQfW2.js +0 -105
  98. package/lib/Damped-CHZ314Rn.cjs +0 -1
  99. package/lib/Store-C2J4Q87x.cjs +0 -1
  100. package/lib/Tweened-Dn6CMA-p.cjs +0 -1
  101. package/lib/browser-0zX67oeU.js +0 -4
  102. package/lib/browser-CpzFX2xg.cjs +0 -1
  103. package/lib/jss-GJLvaNfT.cjs +0 -1
  104. package/lib/url-CHQeS8b5.cjs +0 -1
  105. package/lib/url-DqQuzXwT.js +0 -37
@@ -1,282 +1,334 @@
1
- var lt = (a, t) => (t = Symbol[a]) ? t : Symbol.for("Symbol." + a), dt = (a) => {
2
- throw TypeError(a);
1
+ var vt = (r, e) => (e = Symbol[r]) ? e : Symbol.for("Symbol." + r), Et = (r) => {
2
+ throw TypeError(r);
3
3
  };
4
- var Z = (a, t, s) => t.has(a) || dt("Cannot " + s);
5
- var e = (a, t, s) => (Z(a, t, "read from private field"), s ? s.call(a) : t.get(a)), r = (a, t, s) => t.has(a) ? dt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s), c = (a, t, s, n) => (Z(a, t, "write to private field"), n ? n.call(a, s) : t.set(a, s), s), y = (a, t, s) => (Z(a, t, "access private method"), s);
6
- var D = (a, t, s) => new Promise((n, l) => {
7
- var d = (m) => {
4
+ var rt = (r, e, s) => e.has(r) || Et("Cannot " + s);
5
+ var t = (r, e, s) => (rt(r, e, "read from private field"), s ? s.call(r) : e.get(r)), o = (r, e, s) => e.has(r) ? Et("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, s), a = (r, e, s, n) => (rt(r, e, "write to private field"), n ? n.call(r, s) : e.set(r, s), s), A = (r, e, s) => (rt(r, e, "access private method"), s);
6
+ var O = (r, e, s) => new Promise((n, c) => {
7
+ var d = (f) => {
8
8
  try {
9
- E(s.next(m));
10
- } catch (P) {
11
- l(P);
9
+ p(s.next(f));
10
+ } catch (C) {
11
+ c(C);
12
12
  }
13
- }, o = (m) => {
13
+ }, b = (f) => {
14
14
  try {
15
- E(s.throw(m));
16
- } catch (P) {
17
- l(P);
15
+ p(s.throw(f));
16
+ } catch (C) {
17
+ c(C);
18
18
  }
19
- }, E = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(d, o);
20
- E((s = s.apply(a, t)).next());
19
+ }, p = (f) => f.done ? n(f.value) : Promise.resolve(f.value).then(d, b);
20
+ p((s = s.apply(r, e)).next());
21
21
  });
22
- var ut = (a, t, s) => (t = a[lt("asyncIterator")]) ? t.call(a) : (a = a[lt("iterator")](), t = {}, s = (n, l) => (l = a[n]) && (t[n] = (d) => new Promise((o, E, m) => (d = l.call(a, d), m = d.done, Promise.resolve(d.value).then((P) => o({ value: P, done: m }), E)))), s("next"), s("return"), t);
23
- import { i as yt } from "../browser-0zX67oeU.js";
24
- import { d as J } from "../events-CsVF98U6.js";
25
- import { n as At, c as mt, s as bt } from "../url-DqQuzXwT.js";
26
- import { loading as ft } from "../loading/index.js";
27
- class Lt extends HTMLElement {
28
- constructor() {
29
- super();
30
- }
31
- connectedCallback() {
32
- const t = {
33
- "aria-live": "assertive",
34
- "aria-atomic": "true",
35
- 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"
36
- };
37
- for (const [s, n] of Object.entries(t))
38
- this.setAttribute(s, n);
39
- }
40
- }
41
- customElements.get("morph-announcer") || customElements.define("morph-announcer", Lt);
42
- var T, h, L, R, F, S, I, H;
43
- class pt {
44
- constructor(t, s) {
45
- r(this, T);
46
- r(this, h);
47
- r(this, L);
48
- r(this, R);
49
- r(this, F);
50
- r(this, S);
51
- r(this, I, (t) => {
52
- t.preventDefault(), e(this, T).links.forEach((s) => {
53
- var n;
54
- e(this, L) === e(s, L) || (n = e(s, S)) != null && n.includes(e(this, L)) ? e(s, h).classList.add("clicked") : e(s, h).classList.remove("clicked");
55
- }), e(this, T).navigate(e(this, L), {
56
- historyAction: e(this, R),
57
- state: e(this, F)
22
+ var St = (r, e, s) => (e = r[vt("asyncIterator")]) ? e.call(r) : (r = r[vt("iterator")](), e = {}, s = (n, c) => (c = r[n]) && (e[n] = (d) => new Promise((b, p, f) => (d = c.call(r, d), f = d.done, Promise.resolve(d.value).then((C) => b({ value: C, done: f }), p)))), s("next"), s("return"), e);
23
+ import { loading as wt } from "../loading/index.js";
24
+ import { i as At } from "../index-euf5anj6.js";
25
+ import { d as st } from "../events-CsVF98U6.js";
26
+ import { n as Dt, c as bt, s as zt } from "../url-CfcHdBT6.js";
27
+ import { f as Rt } from "../dom-CVWzyXPH.js";
28
+ var M, h, L, _, v, B, W, Y, j, x, K, D;
29
+ class yt {
30
+ constructor(e, s) {
31
+ o(this, M);
32
+ o(this, h);
33
+ o(this, L);
34
+ o(this, _);
35
+ o(this, v, null);
36
+ o(this, B, !1);
37
+ o(this, W, !1);
38
+ o(this, Y, !1);
39
+ o(this, j);
40
+ o(this, x);
41
+ o(this, K, (e) => {
42
+ e.preventDefault(), t(this, M).links.forEach((n) => {
43
+ var c;
44
+ t(this, L) === t(n, L) || (c = t(n, x)) != null && c.includes(t(this, L)) ? t(n, h).classList.add("clicked") : t(n, h).classList.remove("clicked");
45
+ });
46
+ let s;
47
+ t(this, v) && (s = {
48
+ x: t(this, v).scrollLeft,
49
+ y: t(this, v).scrollTop,
50
+ selector: t(this, v).id ? "#" + t(this, v).id : ""
51
+ }), t(this, M).navigate(t(this, L), {
52
+ historyAction: t(this, _),
53
+ state: t(this, j),
54
+ saveScrollState: s,
55
+ saveDocumentState: t(this, B),
56
+ restoreDocumentState: t(this, Y),
57
+ restoreScrollState: t(this, W)
58
58
  });
59
59
  });
60
- r(this, H, () => {
61
- e(this, T).prefetch(e(this, L)), e(this, h).removeEventListener("pointerenter", e(this, H));
60
+ o(this, D, () => {
61
+ t(this, M).prefetch(t(this, L)), t(this, h).removeEventListener("pointerenter", t(this, D));
62
62
  });
63
- var d, o;
64
- c(this, T, s), c(this, h, t), c(this, L, e(this, h).getAttribute("href") || "/"), c(this, R, e(this, h).getAttribute(
63
+ var b, p;
64
+ a(this, M, s), a(this, h, e), a(this, L, t(this, h).getAttribute("href") || "/"), a(this, _, t(this, h).getAttribute(
65
65
  "data-history-action"
66
- ) || "push"), c(this, F, e(this, h).getAttribute("data-state") || void 0), e(this, h).addEventListener("click", e(this, I));
67
- const n = s.normalizePath(e(this, L)), l = s.normalizePath(location.pathname);
68
- c(this, S, (d = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : d.split(",").map((E) => s.normalizePath(E.trim()).pathname)), e(this, h).hasAttribute("data-include") ? l.pathname.includes(n.pathname) && e(this, h).classList.add("current") : n.pathname === l.pathname || (o = e(this, S)) != null && o.includes(l.pathname) ? (e(this, h).classList.add("current"), e(this, h).classList.add("clicked")) : e(this, h).classList.remove("clicked"), e(this, h).hasAttribute("data-prefetch") && e(this, h).addEventListener("pointerenter", e(this, H));
66
+ ) || "push");
67
+ const n = t(this, h).getAttribute(
68
+ "data-save-scroll-state"
69
+ );
70
+ typeof n == "string" && (n === "" ? a(this, v, Rt(t(this, h))) : a(this, v, document.getElementById(n))), a(this, B, t(this, h).hasAttribute(
71
+ "data-save-document-state"
72
+ )), a(this, Y, t(this, h).hasAttribute(
73
+ "data-restore-document-state"
74
+ )), a(this, W, t(this, h).hasAttribute(
75
+ "data-restore-scroll-state"
76
+ )), a(this, j, t(this, h).getAttribute("data-state") || void 0), t(this, h).addEventListener("click", t(this, K));
77
+ const c = s.normalizePath(t(this, L)), d = s.normalizePath(location.pathname);
78
+ a(this, x, (b = t(this, h).getAttribute("data-match-paths")) == null ? void 0 : b.split(",").map((f) => s.normalizePath(f.trim()).pathname)), t(this, h).hasAttribute("data-include") ? d.pathname.includes(c.pathname) && t(this, h).classList.add("current") : c.pathname === d.pathname || (p = t(this, x)) != null && p.includes(d.pathname) ? (t(this, h).classList.add("current"), t(this, h).classList.add("clicked")) : t(this, h).classList.remove("clicked"), t(this, h).hasAttribute("data-prefetch") && t(this, h).addEventListener("pointerenter", t(this, D));
69
79
  }
70
80
  get element() {
71
- return e(this, h);
81
+ return t(this, h);
72
82
  }
73
83
  destroy() {
74
- e(this, h).removeEventListener("click", e(this, I)), e(this, h).removeEventListener("pointerenter", e(this, H)), e(this, h).classList.remove("current");
84
+ t(this, h).removeEventListener("click", t(this, K)), t(this, h).removeEventListener("pointerenter", t(this, D)), t(this, h).classList.remove("current");
75
85
  }
76
86
  }
77
- T = new WeakMap(), h = new WeakMap(), L = new WeakMap(), R = new WeakMap(), F = new WeakMap(), S = new WeakMap(), I = new WeakMap(), H = new WeakMap();
78
- var O, _, q, B, N, w, Q, C, A, g, W, Y, M, b, u, $, tt, gt, et, U;
79
- class Ht {
80
- constructor(t) {
81
- r(this, u);
82
- r(this, O, null);
83
- r(this, _, null);
84
- r(this, q, null);
85
- r(this, B, !1);
86
- r(this, N, null);
87
- r(this, w, []);
88
- r(this, Q, new DOMParser());
89
- r(this, C, /* @__PURE__ */ new Map());
90
- r(this, A);
91
- r(this, g, null);
92
- r(this, W);
93
- r(this, Y);
94
- r(this, M, []);
95
- r(this, b, null);
96
- r(this, U, (t) => {
97
- t.state && this.navigate(t.state, { historyAction: "none" });
87
+ M = new WeakMap(), h = new WeakMap(), L = new WeakMap(), _ = new WeakMap(), v = new WeakMap(), B = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), j = new WeakMap(), x = new WeakMap(), K = new WeakMap(), D = new WeakMap();
88
+ class Pt extends HTMLElement {
89
+ connectedCallback() {
90
+ const e = {
91
+ "aria-live": "assertive",
92
+ "aria-atomic": "true",
93
+ 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"
94
+ };
95
+ for (const [s, n] of Object.entries(e))
96
+ this.setAttribute(s, n);
97
+ }
98
+ }
99
+ At && !customElements.get("morph-announcer") && customElements.define("morph-announcer", Pt);
100
+ var V, G, J, Q, z, S, it, k, P, E, U, X, H, w, R, I, T, m, ot, ht, Tt, ct, nt;
101
+ class Yt {
102
+ constructor(e) {
103
+ o(this, m);
104
+ o(this, V, null);
105
+ o(this, G, null);
106
+ o(this, J, null);
107
+ o(this, Q, !1);
108
+ o(this, z, null);
109
+ o(this, S, []);
110
+ o(this, it, new DOMParser());
111
+ o(this, k, /* @__PURE__ */ new Map());
112
+ o(this, P);
113
+ o(this, E, null);
114
+ o(this, U);
115
+ o(this, X);
116
+ o(this, H, []);
117
+ o(this, w);
118
+ o(this, R);
119
+ o(this, I, !1);
120
+ o(this, T, null);
121
+ o(this, nt, (e) => {
122
+ var s;
123
+ (s = e.state) != null && s.path && (a(this, I, !0), this.navigate(e.state.path, { historyAction: "none" }), a(this, I, !1));
98
124
  });
99
- if (yt) {
100
- c(this, O, At(t == null ? void 0 : t.base)), c(this, _, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, q, (t == null ? void 0 : t.cachePages) !== !1), c(this, B, (t == null ? void 0 : t.trailingSlash) || !1), c(this, N, y(this, u, tt).call(this, document.body));
125
+ if (At) {
126
+ a(this, V, Dt(e == null ? void 0 : e.base)), a(this, G, (e == null ? void 0 : e.waitForHeadToLoad) !== !1), a(this, J, (e == null ? void 0 : e.cachePages) !== !1), a(this, Q, (e == null ? void 0 : e.trailingSlash) || !1), a(this, z, A(this, m, ht).call(this, document.body));
101
127
  const s = this.normalizePath(
102
128
  location.pathname + location.hash
103
129
  );
104
- c(this, g, s.pathname), document.documentElement.setAttribute(
130
+ a(this, E, s.pathname), document.documentElement.setAttribute(
105
131
  "data-current-pathname",
106
- e(this, g)
132
+ t(this, E)
107
133
  ), document.documentElement.setAttribute(
108
134
  "data-current-leaf",
109
135
  s.leaf
110
- ), this.findLinks(), addEventListener("popstate", e(this, U)), mt(
111
- "replace",
112
- e(this, g),
113
- s.parameters,
114
- s.hash
115
- ), e(this, N).map((n) => [...n.children]).flat().forEach((n) => {
136
+ ), this.findLinks(), addEventListener("popstate", t(this, nt)), bt({
137
+ action: "replace",
138
+ pathname: t(this, E),
139
+ searchParameters: s.parameters,
140
+ hash: s.hash
141
+ }), t(this, z).map((n) => [...n.children]).flat().forEach((n) => {
116
142
  n instanceof HTMLElement && n.classList.add("current");
117
- }), c(this, b, new Lt());
143
+ }), a(this, T, new Pt());
118
144
  }
119
145
  }
120
146
  get currentPathname() {
121
- return e(this, g);
147
+ return t(this, E);
122
148
  }
123
149
  get previousPathname() {
124
- return e(this, W);
150
+ return t(this, U);
125
151
  }
126
152
  get currentState() {
127
- return e(this, Y);
153
+ return t(this, X);
128
154
  }
129
155
  get links() {
130
- return e(this, w);
156
+ return t(this, S);
131
157
  }
132
- normalizePath(t) {
133
- return bt(t, e(this, O), e(this, B));
158
+ normalizePath(e) {
159
+ return zt(e, {
160
+ base: t(this, V),
161
+ trailingSlash: t(this, Q)
162
+ });
134
163
  }
135
- prefetch(t) {
136
- return D(this, null, function* () {
137
- const s = this.normalizePath(t);
138
- return y(this, u, $).call(this, s.pathname);
164
+ prefetch(e) {
165
+ return O(this, null, function* () {
166
+ const s = this.normalizePath(e);
167
+ return A(this, m, ot).call(this, s.pathname);
139
168
  });
140
169
  }
141
- navigate(l) {
142
- return D(this, arguments, function* (t, { historyAction: s = "push", state: n } = {}) {
143
- var st;
144
- if (e(this, M).length)
170
+ navigate(f) {
171
+ return O(this, arguments, function* (e, {
172
+ historyAction: s = "push",
173
+ state: n,
174
+ saveScrollState: c,
175
+ saveDocumentState: d,
176
+ restoreDocumentState: b,
177
+ restoreScrollState: p
178
+ } = {}) {
179
+ var lt;
180
+ if (t(this, H).length)
145
181
  return;
146
- const d = this.normalizePath(t);
147
- let { pathname: o, hash: E, parameters: m, leaf: P } = d;
148
- if (e(this, A) === o || e(this, g) === o)
182
+ t(this, I) || (b || a(this, R, void 0), p || a(this, w, void 0));
183
+ const C = this.normalizePath(e);
184
+ let { pathname: l, hash: Ct, parameters: Mt, leaf: kt } = C;
185
+ if (t(this, P) === l || t(this, E) === l)
149
186
  return;
150
- c(this, Y, n), c(this, A, o);
151
- const j = e(this, C).has(o);
187
+ a(this, X, n), a(this, P, l);
188
+ const Z = t(this, k).has(l);
152
189
  try {
153
- ft.add("__morph");
154
- let K = !0;
190
+ wt.add("__morph");
191
+ let $ = !0;
155
192
  if (this.preprocessor)
156
193
  try {
157
- yield new Promise((i, f) => {
158
- var v;
159
- (v = this.preprocessor) == null || v.call(this, { pathname: o, resolve: i, reject: f, isCached: j, state: n });
194
+ yield new Promise((i, g) => {
195
+ var y;
196
+ (y = this.preprocessor) == null || y.call(this, { pathname: l, resolve: i, reject: g, isCached: Z, state: n });
160
197
  });
161
198
  } catch (i) {
162
- i ? console.error(i) : console.log("Route change canceled"), K = !1;
199
+ i ? console.error(i) : console.log("Route change canceled"), $ = !1;
163
200
  }
164
- if (!K || e(this, A) !== o)
201
+ if (!$ || t(this, P) !== l)
165
202
  return;
166
- const k = (e(this, C).get(o) || (yield y(this, u, $).call(this, o))).cloneNode(!0);
167
- if (e(this, A) !== o)
203
+ const N = (t(this, R) || t(this, k).get(l) || (yield A(this, m, ot).call(this, l))).cloneNode(!0);
204
+ if (t(this, P) !== l)
168
205
  return;
169
- if (k.title)
170
- e(this, b).textContent = k.title;
206
+ if (a(this, R, d ? document.cloneNode(!0) : void 0), N.title)
207
+ t(this, T).textContent = N.title;
171
208
  else {
172
- const i = k.querySelector("h1"), f = (i == null ? void 0 : i.innerText) || (i == null ? void 0 : i.textContent) || o;
173
- e(this, b).textContent = f;
209
+ const i = N.querySelector("h1"), g = (i == null ? void 0 : i.innerText) || (i == null ? void 0 : i.textContent) || l;
210
+ t(this, T).textContent = g;
174
211
  }
175
- document.body.appendChild(e(this, b));
176
- const it = {
177
- pathname: o,
178
- isCached: j,
212
+ document.body.appendChild(t(this, T));
213
+ const dt = {
214
+ pathname: l,
215
+ isCached: Z,
179
216
  state: n,
180
- newDocument: k
217
+ newDocument: N
181
218
  };
182
- J(document, "morphStart", {
183
- detail: it
219
+ st(document, "morphStart", {
220
+ detail: dt
184
221
  });
185
- const nt = Array.from(document.head.children), at = Array.from(
186
- k.head.children
187
- ), rt = y(this, u, gt).call(this, nt, at), Et = y(this, u, et).call(this, nt, rt), V = y(this, u, et).call(this, at, rt);
188
- V.forEach((i, f) => {
222
+ const ut = Array.from(document.head.children), mt = Array.from(
223
+ N.head.children
224
+ ), ft = A(this, m, Tt).call(this, ut, mt), Ht = A(this, m, ct).call(this, ut, ft), tt = A(this, m, ct).call(this, mt, ft);
225
+ tt.forEach((i, g) => {
189
226
  if (i.tagName === "SCRIPT" && i.getAttribute("src")) {
190
- const v = document.createElement("script");
191
- v.type = "module", v.src = i.getAttribute("src"), V[f] = v;
227
+ const y = document.createElement("script");
228
+ y.type = "module", y.src = i.getAttribute("src"), tt[g] = y;
192
229
  }
193
- }), V.forEach((i) => {
230
+ }), tt.forEach((i) => {
194
231
  document.head.appendChild(i);
195
232
  });
196
- const X = V.filter(
233
+ const at = tt.filter(
197
234
  (i) => !i.hasAttribute("data-no-waiting") && (i.tagName === "STYLE" || i.tagName === "SCRIPT" || i.tagName === "LINK") && i.getAttribute("rel") !== "canonical"
198
235
  );
199
- e(this, _) && X.length && (yield new Promise((i) => D(this, null, function* () {
200
- let f = 0;
236
+ t(this, G) && at.length && (yield new Promise((i) => O(this, null, function* () {
237
+ let g = 0;
201
238
  try {
202
- for (var v = ut(X), ht, x, ct; ht = !(x = yield v.next()).done; ht = !1) {
203
- const G = x.value;
204
- G.onload = () => {
205
- f++, f === X.length && i();
239
+ for (var y = St(at), gt, q, Lt; gt = !(q = yield y.next()).done; gt = !1) {
240
+ const et = q.value;
241
+ et.onload = () => {
242
+ g++, g === at.length && i();
206
243
  };
207
244
  }
208
- } catch (x) {
209
- ct = [x];
245
+ } catch (q) {
246
+ Lt = [q];
210
247
  } finally {
211
248
  try {
212
- ht && (x = v.return) && (yield x.call(v));
249
+ gt && (q = y.return) && (yield q.call(y));
213
250
  } finally {
214
- if (ct)
215
- throw ct[0];
251
+ if (Lt)
252
+ throw Lt[0];
216
253
  }
217
254
  }
218
255
  })));
219
- const ot = [];
220
- Et.forEach((i) => {
221
- i.hasAttribute("data-permanent") || (i.tagName === "SCRIPT" || i.tagName === "STYLE" || i.getAttribute("rel") === "stylesheet" ? ot.push(i) : i.remove());
222
- }), c(this, W, e(this, g)), c(this, g, o), mt(s, o, m, E);
223
- const wt = y(this, u, tt).call(this, k.body);
224
- e(this, N).forEach((i, f) => {
225
- const v = wt[f++], ht = getComputedStyle(i).getPropertyValue("--morph-duration"), x = [...v.childNodes];
226
- if (ht) {
227
- const ct = [...i.childNodes];
228
- ct.forEach((p) => {
229
- p instanceof HTMLElement && p.classList.add("old");
230
- }), x.forEach((p) => {
231
- p instanceof HTMLElement && p.classList.add("new");
232
- }), i.append(...x), setTimeout(() => {
233
- x.forEach((p) => {
234
- p instanceof HTMLElement && p.classList.add("in");
256
+ const pt = [];
257
+ Ht.forEach((i) => {
258
+ i.hasAttribute("data-permanent") || (i.tagName === "SCRIPT" || i.tagName === "STYLE" || i.getAttribute("rel") === "stylesheet" ? pt.push(i) : i.remove());
259
+ }), a(this, U, t(this, E)), a(this, E, l), bt({
260
+ action: s,
261
+ pathname: l,
262
+ searchParameters: Mt,
263
+ hash: Ct
264
+ });
265
+ const Nt = A(this, m, ht).call(this, N.body);
266
+ t(this, z).forEach((i, g) => {
267
+ const y = Nt[g++], gt = getComputedStyle(i).getPropertyValue("--morph-duration"), q = [...y.childNodes];
268
+ if (gt) {
269
+ const Lt = [...i.childNodes];
270
+ if (Lt.forEach((u) => {
271
+ u instanceof HTMLElement && u.classList.add("old");
272
+ }), q.forEach((u) => {
273
+ u instanceof HTMLElement && (u.classList.remove("current"), u.classList.add("new"));
274
+ }), i.prepend(...q), t(this, w)) {
275
+ const u = document.querySelector(
276
+ t(this, w).selector
277
+ );
278
+ u && u.scroll({
279
+ top: t(this, w).y,
280
+ left: t(this, w).x,
281
+ behavior: "auto"
282
+ });
283
+ }
284
+ setTimeout(() => {
285
+ q.forEach((u) => {
286
+ u instanceof HTMLElement && u.classList.add("in");
235
287
  });
236
288
  }, 10);
237
- const G = {
238
- element: i,
239
- pathname: o,
240
- isCached: j,
289
+ const et = {
290
+ morphElement: i,
291
+ pathname: l,
292
+ isCached: Z,
241
293
  state: n
242
294
  };
243
- J(document, "morphNewChildrenAdded", {
244
- detail: G
295
+ st(document, "morphNewChildrenAdded", {
296
+ detail: et
245
297
  });
246
- const vt = new Promise((p) => {
298
+ const xt = new Promise((u) => {
247
299
  setTimeout(() => {
248
- ct.forEach((z) => z.remove()), x.forEach((z) => {
249
- z instanceof HTMLElement && (z.classList.remove("new", "in"), z.classList.add("current"));
250
- }), J(document, "morphOldChildrenRemoved", {
251
- detail: G
252
- }), p();
253
- }, (parseFloat(ht) || 0) * 1e3 + 10);
300
+ Lt.forEach((F) => F.remove()), q.forEach((F) => {
301
+ F instanceof HTMLElement && (F.classList.remove("new", "in"), F.classList.add("current"));
302
+ }), st(document, "morphOldChildrenRemoved", {
303
+ detail: et
304
+ }), u();
305
+ }, (parseFloat(gt) || 0) * 1e3 + 10);
254
306
  });
255
- e(this, M).push(vt);
307
+ t(this, H).push(xt);
256
308
  } else
257
- i.innerHTML = "", i.append(...x);
258
- }), yield Promise.all(e(this, M)), ot.forEach((i) => i.remove()), c(this, M, []), this.findLinks(), document.documentElement.setAttribute("data-current-pathname", o), document.documentElement.setAttribute("data-current-leaf", P), e(this, b).remove(), (st = this.postprocessor) == null || st.call(this, { pathname: o, isCached: j, state: n }), J(document, "morphComplete", {
259
- detail: it
260
- }), ft.complete("__morph");
261
- } catch (K) {
262
- console.error(K);
309
+ i.innerHTML = "", i.append(...q);
310
+ }), yield Promise.all(t(this, H)), pt.forEach((i) => i.remove()), a(this, H, []), a(this, w, c), this.findLinks(), document.documentElement.setAttribute("data-current-pathname", l), document.documentElement.setAttribute("data-current-leaf", kt), t(this, T).remove(), (lt = this.postprocessor) == null || lt.call(this, { pathname: l, isCached: Z, state: n }), st(document, "morphComplete", {
311
+ detail: dt
312
+ }), wt.complete("__morph");
313
+ } catch ($) {
314
+ console.error($);
263
315
  }
264
- c(this, A, void 0);
316
+ a(this, P, void 0);
265
317
  });
266
318
  }
267
- addLink(t) {
268
- e(this, w).push(new pt(t, this));
319
+ addLink(e) {
320
+ t(this, S).push(new yt(e, this));
269
321
  }
270
- addLinks(t) {
271
- t.forEach((s) => {
322
+ addLinks(e) {
323
+ e.forEach((s) => {
272
324
  this.addLink(s);
273
325
  });
274
326
  }
275
- removeLink(t) {
276
- c(this, w, e(this, w).filter((s) => s.element === t ? (s.destroy(), !1) : !0));
327
+ removeLink(e) {
328
+ a(this, S, t(this, S).filter((s) => s.element === e ? (s.destroy(), !1) : !0));
277
329
  }
278
330
  findLinks() {
279
- const t = [
331
+ const e = [
280
332
  ...document.documentElement.querySelectorAll("a")
281
333
  ].filter(
282
334
  (s) => {
@@ -284,33 +336,33 @@ class Ht {
284
336
  return ((n = s.getAttribute("href")) == null ? void 0 : n.startsWith("/")) && !s.hasAttribute("download") && !s.hasAttribute("data-morph-skip") && !s.closest("[data-morph-skip]");
285
337
  }
286
338
  );
287
- e(this, w).forEach((s) => s.destroy()), c(this, w, t.map((s) => new pt(s, this)));
339
+ t(this, S).forEach((s) => s.destroy()), a(this, S, e.map((s) => new yt(s, this)));
288
340
  }
289
341
  }
290
- O = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), B = new WeakMap(), N = new WeakMap(), w = new WeakMap(), Q = new WeakMap(), C = new WeakMap(), A = new WeakMap(), g = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), M = new WeakMap(), b = new WeakMap(), u = new WeakSet(), $ = function(t) {
291
- return D(this, null, function* () {
292
- const s = e(this, C).get(t);
342
+ V = new WeakMap(), G = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), z = new WeakMap(), S = new WeakMap(), it = new WeakMap(), k = new WeakMap(), P = new WeakMap(), E = new WeakMap(), U = new WeakMap(), X = new WeakMap(), H = new WeakMap(), w = new WeakMap(), R = new WeakMap(), I = new WeakMap(), T = new WeakMap(), m = new WeakSet(), ot = function(e) {
343
+ return O(this, null, function* () {
344
+ const s = t(this, k).get(e);
293
345
  if (s)
294
346
  return s;
295
- const l = yield (yield fetch(t)).text(), d = e(this, Q).parseFromString(l, "text/html");
296
- return e(this, q) && e(this, C).set(t, d), d;
347
+ const c = yield (yield fetch(e)).text(), d = t(this, it).parseFromString(c, "text/html");
348
+ return t(this, J) && t(this, k).set(e, d), d;
297
349
  });
298
- }, tt = function(t) {
299
- const s = [...t.querySelectorAll("[data-morph]")];
300
- return s.length ? s : [t];
301
- }, gt = function(t, s) {
302
- return t.filter(
350
+ }, ht = function(e) {
351
+ const s = [...e.querySelectorAll("[data-morph]")];
352
+ return s.length ? s : [e];
353
+ }, Tt = function(e, s) {
354
+ return e.filter(
303
355
  (n) => s.find(
304
- (l) => l.outerHTML === n.outerHTML
356
+ (c) => c.outerHTML === n.outerHTML
305
357
  )
306
358
  );
307
- }, et = function(t, s) {
308
- return t.filter(
359
+ }, ct = function(e, s) {
360
+ return e.filter(
309
361
  (n) => !s.find(
310
- (l) => l.outerHTML === n.outerHTML
362
+ (c) => c.outerHTML === n.outerHTML
311
363
  )
312
364
  );
313
- }, U = new WeakMap();
365
+ }, nt = new WeakMap();
314
366
  export {
315
- Ht as Morph
367
+ Yt as Morph
316
368
  };