@paroicms/content-loading-plugin 0.1.0 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/content-loading-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Content loading plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -31,8 +31,9 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@paroicms/public-anywhere-lib": "0.5.0",
34
- "@paroicms/public-server-lib": "0.12.0",
34
+ "@paroicms/public-server-lib": "0.12.1",
35
35
  "@solid-primitives/i18n": "~2.1.1",
36
+ "@solidjs/router": "~0.14.1",
36
37
  "@types/node": "~20.12.8",
37
38
  "rimraf": "~6.0.1",
38
39
  "sass": "~1.77.8",
@@ -8,20 +8,20 @@ const T = 1, z = 2, De = {
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var y = null;
11
+ var w = null;
12
12
  let ue = null, mt = null, b = null, R = null, k = null, re = 0;
13
13
  function Be(e, t) {
14
- const n = b, r = y, o = e.length === 0, i = t === void 0 ? r : t, a = o ? De : {
14
+ const n = b, r = w, o = e.length === 0, i = t === void 0 ? r : t, a = o ? De : {
15
15
  owned: null,
16
16
  cleanups: null,
17
17
  context: i ? i.context : null,
18
18
  owner: i
19
19
  }, s = o ? e : () => e(() => I(() => oe(a)));
20
- y = a, b = null;
20
+ w = a, b = null;
21
21
  try {
22
22
  return N(s, !0);
23
23
  } finally {
24
- b = n, y = r;
24
+ b = n, w = r;
25
25
  }
26
26
  }
27
27
  function x(e, t) {
@@ -80,28 +80,28 @@ function K(e, t, n) {
80
80
  };
81
81
  }
82
82
  function Me(e) {
83
- return y === null || (y.cleanups === null ? y.cleanups = [e] : y.cleanups.push(e)), e;
83
+ return w === null || (w.cleanups === null ? w.cleanups = [e] : w.cleanups.push(e)), e;
84
84
  }
85
85
  function je() {
86
- return y;
86
+ return w;
87
87
  }
88
88
  function qe(e, t) {
89
- const n = y, r = b;
90
- y = e, b = null;
89
+ const n = w, r = b;
90
+ w = e, b = null;
91
91
  try {
92
92
  return N(t, !0);
93
93
  } catch (o) {
94
94
  Ae(o);
95
95
  } finally {
96
- y = n, b = r;
96
+ w = n, b = r;
97
97
  }
98
98
  }
99
99
  function wt(e) {
100
- const t = b, n = y;
100
+ const t = b, n = w;
101
101
  return Promise.resolve().then(() => {
102
- b = t, y = n;
102
+ b = t, w = n;
103
103
  let r;
104
- return N(e, !1), b = y = null, r ? r.done : void 0;
104
+ return N(e, !1), b = w = null, r ? r.done : void 0;
105
105
  });
106
106
  }
107
107
  function Ve(e, t) {
@@ -114,7 +114,7 @@ function Ve(e, t) {
114
114
  }
115
115
  function We(e) {
116
116
  let t;
117
- return y && y.context && (t = y.context[e.id]) !== void 0 ? t : e.defaultValue;
117
+ return w && w.context && (t = w.context[e.id]) !== void 0 ? t : e.defaultValue;
118
118
  }
119
119
  function Se(e) {
120
120
  const t = E(e), n = E(() => me(t()));
@@ -157,14 +157,14 @@ function H(e) {
157
157
  }
158
158
  function vt(e, t, n) {
159
159
  let r;
160
- const o = y, i = b;
161
- b = y = e;
160
+ const o = w, i = b;
161
+ b = w = e;
162
162
  try {
163
163
  r = e.fn(t);
164
164
  } catch (a) {
165
165
  return e.pure && (e.state = T, e.owned && e.owned.forEach(oe), e.owned = null), e.updatedAt = n + 1, Ae(a);
166
166
  } finally {
167
- b = i, y = o;
167
+ b = i, w = o;
168
168
  }
169
169
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Ke(e, r) : e.value = r, e.updatedAt = n);
170
170
  }
@@ -178,11 +178,11 @@ function $e(e, t, n, r = T, o) {
178
178
  sourceSlots: null,
179
179
  cleanups: null,
180
180
  value: t,
181
- owner: y,
182
- context: y ? y.context : null,
181
+ owner: w,
182
+ context: w ? w.context : null,
183
183
  pure: n
184
184
  };
185
- return y === null || y !== De && (y.owned ? y.owned.push(i) : y.owned = [i]), i;
185
+ return w === null || w !== De && (w.owned ? w.owned.push(i) : w.owned = [i]), i;
186
186
  }
187
187
  function ee(e) {
188
188
  if (e.state === 0)
@@ -276,7 +276,7 @@ function $t(e) {
276
276
  cause: e
277
277
  });
278
278
  }
279
- function Ae(e, t = y) {
279
+ function Ae(e, t = w) {
280
280
  throw $t(e);
281
281
  }
282
282
  function me(e) {
@@ -295,8 +295,8 @@ function me(e) {
295
295
  function At(e, t) {
296
296
  return function(r) {
297
297
  let o;
298
- return O(() => o = I(() => (y.context = {
299
- ...y.context,
298
+ return O(() => o = I(() => (w.context = {
299
+ ...w.context,
300
300
  [e]: r.value
301
301
  }, Se(() => r.children))), void 0), o;
302
302
  };
@@ -399,7 +399,7 @@ function Ct(...e) {
399
399
  }
400
400
  return o;
401
401
  }
402
- const Lt = (e) => `Stale read from <${e}>.`;
402
+ const Pt = (e) => `Stale read from <${e}>.`;
403
403
  function q(e) {
404
404
  const t = e.keyed, n = E(() => e.when, void 0, {
405
405
  equals: (r, o) => t ? r === o : !r == !o
@@ -410,14 +410,14 @@ function q(e) {
410
410
  const o = e.children;
411
411
  return typeof o == "function" && o.length > 0 ? I(() => o(t ? r : () => {
412
412
  if (!I(n))
413
- throw Lt("Show");
413
+ throw Pt("Show");
414
414
  return e.when;
415
415
  })) : o;
416
416
  }
417
417
  return e.fallback;
418
418
  }, void 0, void 0);
419
419
  }
420
- function Pt(e, t, n) {
420
+ function Lt(e, t, n) {
421
421
  let r = n.length, o = t.length, i = r, a = 0, s = 0, c = t[o - 1].nextSibling, l = null;
422
422
  for (; a < o || s < i; ) {
423
423
  if (t[a] === n[s]) {
@@ -450,9 +450,9 @@ function Pt(e, t, n) {
450
450
  for (; ++h < o && h < i && !((m = l.get(t[h])) == null || m !== u + p); )
451
451
  p++;
452
452
  if (p > u - s) {
453
- const v = t[a];
453
+ const y = t[a];
454
454
  for (; s < u; )
455
- e.insertBefore(n[s++], v);
455
+ e.insertBefore(n[s++], y);
456
456
  } else
457
457
  e.replaceChild(n[s++], t[a++]);
458
458
  } else
@@ -466,7 +466,7 @@ const xe = "_$DX_DELEGATE";
466
466
  function Ee(e, t, n, r = {}) {
467
467
  let o;
468
468
  return Be((i) => {
469
- o = i, t === document ? e() : P(t, e(), t.firstChild ? null : void 0, n);
469
+ o = i, t === document ? e() : L(t, e(), t.firstChild ? null : void 0, n);
470
470
  }, r.owner), () => {
471
471
  o(), t.textContent = "";
472
472
  };
@@ -495,7 +495,7 @@ function Qe(e, t) {
495
495
  function xt(e, t, n) {
496
496
  return I(() => e(t, n));
497
497
  }
498
- function P(e, t, n, r) {
498
+ function L(e, t, n, r) {
499
499
  if (n !== void 0 && !r && (r = []), typeof t != "function")
500
500
  return ne(e, t, r, n);
501
501
  O((o) => ne(e, t(), o, n), r);
@@ -553,7 +553,7 @@ function ne(e, t, n, r, o) {
553
553
  if (n = j(e, n, r), a)
554
554
  return n;
555
555
  } else
556
- c ? n.length === 0 ? _e(e, s, r) : Pt(e, n, s) : (n && j(e), _e(e, s));
556
+ c ? n.length === 0 ? _e(e, s, r) : Lt(e, n, s) : (n && j(e), _e(e, s));
557
557
  n = s;
558
558
  } else if (t.nodeType) {
559
559
  if (Array.isArray(n)) {
@@ -643,7 +643,7 @@ function J(e, t = {}) {
643
643
  return e == null ? void 0 : kt(e, t);
644
644
  }
645
645
  var Tt = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
646
- const Oe = W(Tt.VITE_API_PORT, { varName: "VITE_API_PORT" }), Je = Oe ? `//${document.location.hostname}:${Oe}/api/plugin/content-loading` : `//${document.location.host}/api/plugin/content-loading`, Ye = "/assets/plugin/content-loading/0.0.1";
646
+ const Oe = W(Tt.VITE_API_PORT, { varName: "VITE_API_PORT" }), Je = Oe ? `//${document.location.hostname}:${Oe}/api/plugin/content-loading` : `//${document.location.host}/api/plugin/content-loading`, Ye = "/assets/plugin/content-loading/0.1.0";
647
647
  async function Nt(e) {
648
648
  const t = `${Je}${e}`, n = await fetch(t);
649
649
  if (n.status !== 200)
@@ -744,26 +744,26 @@ function Yt({
744
744
  if (l >= o)
745
745
  return;
746
746
  const u = (() => {
747
- var v = Ht();
748
- return v.$$click = m, P(v, () => c("infiniteLoading.loadMore")), v;
747
+ var y = Ht();
748
+ return y.$$click = m, L(y, () => c("infiniteLoading.loadMore")), y;
749
749
  })(), h = (() => {
750
- var v = Xt();
751
- return P(v, u), v;
750
+ var y = Xt();
751
+ return L(y, u), y;
752
752
  })(), p = (() => {
753
- var v = Qt();
754
- return ie(v, "src", `${Ye}/spinner.svg`), v;
753
+ var y = Qt();
754
+ return ie(y, "src", `${Ye}/spinner.svg`), y;
755
755
  })();
756
756
  n.appendChild(h);
757
757
  async function m() {
758
758
  n.appendChild(p);
759
- const v = await Zt({
759
+ const y = await Zt({
760
760
  limit: t,
761
761
  newStart: l,
762
762
  parentId: i,
763
763
  templateName: a,
764
764
  labeledById: s
765
765
  });
766
- for (const f of v)
766
+ for (const f of y)
767
767
  n.insertBefore(f, h);
768
768
  l += t, l >= o && h.remove(), p.remove();
769
769
  }
@@ -870,12 +870,12 @@ function sn(e, t, n) {
870
870
  params: {}
871
871
  }, h = (p) => n === void 0 ? void 0 : n[p];
872
872
  for (let p = 0; p < a; p++) {
873
- const m = i[p], v = c[p], f = m[0] === ":", d = f ? m.slice(1) : m;
874
- if (f && he(v, h(d)))
875
- u.params[d] = v;
876
- else if (f || !he(v, m))
873
+ const m = i[p], y = c[p], f = m[0] === ":", d = f ? m.slice(1) : m;
874
+ if (f && he(y, h(d)))
875
+ u.params[d] = y;
876
+ else if (f || !he(y, m))
877
877
  return null;
878
- u.path += `/${v}`;
878
+ u.path += `/${y}`;
879
879
  }
880
880
  if (o) {
881
881
  const p = l ? c.slice(-l).join("/") : "";
@@ -924,24 +924,24 @@ function ot(e) {
924
924
  }
925
925
  const ln = 100, st = Ve(), it = Ve(), Ce = () => rn(We(st), "<A> and 'use' router primitives can be only used inside a Route."), at = () => Ce().navigatorFactory(), cn = () => Ce().location, un = () => Ce().params;
926
926
  function fn(e, t = "") {
927
- const { component: n, load: r, children: o, info: i } = e, a = !o || Array.isArray(o) && !o.length, s = {
927
+ const { component: n, preload: r, load: o, children: i, info: a } = e, s = !i || Array.isArray(i) && !i.length, c = {
928
928
  key: e,
929
929
  component: n,
930
- load: r,
931
- info: i
930
+ preload: r || o,
931
+ info: a
932
932
  };
933
- return lt(e.path).reduce((c, l) => {
934
- for (const u of ot(l)) {
935
- const h = on(t, u);
936
- let p = a ? h : h.split("/*", 1)[0];
937
- p = p.split("/").map((m) => m.startsWith(":") || m.startsWith("*") ? m : encodeURIComponent(m)).join("/"), c.push({
938
- ...s,
939
- originalPath: l,
940
- pattern: p,
941
- matcher: sn(p, !a, e.matchFilters)
933
+ return lt(e.path).reduce((l, u) => {
934
+ for (const h of ot(u)) {
935
+ const p = on(t, h);
936
+ let m = s ? p : p.split("/*", 1)[0];
937
+ m = m.split("/").map((y) => y.startsWith(":") || y.startsWith("*") ? y : encodeURIComponent(y)).join("/"), l.push({
938
+ ...c,
939
+ originalPath: u,
940
+ pattern: m,
941
+ matcher: sn(m, !s, e.matchFilters)
942
942
  });
943
943
  }
944
- return c;
944
+ return l;
945
945
  }, []);
946
946
  }
947
947
  function hn(e, t = 0) {
@@ -1031,35 +1031,35 @@ function pn() {
1031
1031
  return B;
1032
1032
  }
1033
1033
  function gn(e, t, n, r = {}) {
1034
- const { signal: [o, i], utils: a = {} } = e, s = a.parsePath || ((w) => w), c = a.renderPath || ((w) => w), l = a.beforeLeave || et(), u = Y("", r.base || "");
1034
+ const { signal: [o, i], utils: a = {} } = e, s = a.parsePath || ((v) => v), c = a.renderPath || ((v) => v), l = a.beforeLeave || et(), u = Y("", r.base || "");
1035
1035
  if (u === void 0)
1036
1036
  throw new Error(`${u} is not a valid base path`);
1037
1037
  u && !o().value && i({ value: u, replace: !0, scroll: !1 });
1038
1038
  const [h, p] = x(!1);
1039
1039
  let m;
1040
- const v = (w, $) => {
1041
- $.value === f() && $.state === S() || (m === void 0 && p(!0), B = w, m = $, wt(() => {
1040
+ const y = (v, $) => {
1041
+ $.value === f() && $.state === S() || (m === void 0 && p(!0), B = v, m = $, wt(() => {
1042
1042
  m === $ && (d(m.value), g(m.state), F[1]([]));
1043
1043
  }).finally(() => {
1044
1044
  m === $ && yt(() => {
1045
- B = void 0, w === "navigate" && dt(m), p(!1), m = void 0;
1045
+ B = void 0, v === "navigate" && dt(m), p(!1), m = void 0;
1046
1046
  });
1047
1047
  }));
1048
- }, [f, d] = x(o().value), [S, g] = x(o().state), U = dn(f, S), L = [], F = x([]), V = E(() => typeof r.transformUrl == "function" ? de(t(), r.transformUrl(U.pathname)) : de(t(), U.pathname)), ut = rt(() => {
1049
- const w = V(), $ = {};
1050
- for (let _ = 0; _ < w.length; _++)
1051
- Object.assign($, w[_].params);
1048
+ }, [f, d] = x(o().value), [S, g] = x(o().state), U = dn(f, S), P = [], F = x([]), V = E(() => typeof r.transformUrl == "function" ? de(t(), r.transformUrl(U.pathname)) : de(t(), U.pathname)), ut = rt(() => {
1049
+ const v = V(), $ = {};
1050
+ for (let _ = 0; _ < v.length; _++)
1051
+ Object.assign($, v[_].params);
1052
1052
  return $;
1053
- }), Le = {
1053
+ }), Pe = {
1054
1054
  pattern: u,
1055
1055
  path: () => u,
1056
1056
  outlet: () => null,
1057
- resolvePath(w) {
1058
- return Y(u, w);
1057
+ resolvePath(v) {
1058
+ return Y(u, v);
1059
1059
  }
1060
1060
  };
1061
- return O(K(o, (w) => v("native", w), { defer: !0 })), {
1062
- base: Le,
1061
+ return O(K(o, (v) => y("native", v), { defer: !0 })), {
1062
+ base: Pe,
1063
1063
  location: U,
1064
1064
  params: ut,
1065
1065
  isRouting: h,
@@ -1072,7 +1072,7 @@ function gn(e, t, n, r = {}) {
1072
1072
  singleFlight: r.singleFlight === void 0 ? !0 : r.singleFlight,
1073
1073
  submissions: F
1074
1074
  };
1075
- function ft(w, $, _) {
1075
+ function ft(v, $, _) {
1076
1076
  I(() => {
1077
1077
  if (typeof $ == "number") {
1078
1078
  $ && (a.go ? a.go($) : console.warn("Router integration does not support relative routing"));
@@ -1083,43 +1083,43 @@ function gn(e, t, n, r = {}) {
1083
1083
  resolve: !0,
1084
1084
  scroll: !0,
1085
1085
  ..._
1086
- }, D = ce ? w.resolvePath($) : Y("", $);
1086
+ }, D = ce ? v.resolvePath($) : Y("", $);
1087
1087
  if (D === void 0)
1088
1088
  throw new Error(`Path '${$}' is not a routable path`);
1089
- if (L.length >= ln)
1089
+ if (P.length >= ln)
1090
1090
  throw new Error("Too many redirects");
1091
- const Pe = f();
1092
- (D !== Pe || X !== S()) && (Ot || l.confirm(D, _) && (L.push({ value: Pe, replace: le, scroll: M, state: S() }), v("navigate", {
1091
+ const Le = f();
1092
+ (D !== Le || X !== S()) && (Ot || l.confirm(D, _) && (P.push({ value: Le, replace: le, scroll: M, state: S() }), y("navigate", {
1093
1093
  value: D,
1094
1094
  state: X
1095
1095
  })));
1096
1096
  });
1097
1097
  }
1098
- function ht(w) {
1099
- return w = w || We(it) || Le, ($, _) => ft(w, $, _);
1098
+ function ht(v) {
1099
+ return v = v || We(it) || Pe, ($, _) => ft(v, $, _);
1100
1100
  }
1101
- function dt(w) {
1102
- const $ = L[0];
1101
+ function dt(v) {
1102
+ const $ = P[0];
1103
1103
  $ && (i({
1104
- ...w,
1104
+ ...v,
1105
1105
  replace: $.replace,
1106
1106
  scroll: $.scroll
1107
- }), L.length = 0);
1107
+ }), P.length = 0);
1108
1108
  }
1109
- function pt(w, $ = {}) {
1110
- const _ = de(t(), w.pathname), le = B;
1109
+ function pt(v, $ = {}) {
1110
+ const _ = de(t(), v.pathname), le = B;
1111
1111
  B = "preload";
1112
1112
  for (let ce in _) {
1113
1113
  const { route: M, params: X } = _[ce];
1114
1114
  M.component && M.component.preload && M.component.preload();
1115
- const { load: D } = M;
1115
+ const { preload: D } = M;
1116
1116
  $.preloadData && D && qe(n(), () => D({
1117
1117
  params: X,
1118
1118
  location: {
1119
- pathname: w.pathname,
1120
- search: w.search,
1121
- hash: w.hash,
1122
- query: nt(w),
1119
+ pathname: v.pathname,
1120
+ search: v.search,
1121
+ hash: v.hash,
1122
+ query: nt(v),
1123
1123
  state: null,
1124
1124
  key: ""
1125
1125
  },
@@ -1130,7 +1130,7 @@ function gn(e, t, n, r = {}) {
1130
1130
  }
1131
1131
  }
1132
1132
  function mn(e, t, n, r) {
1133
- const { base: o, location: i, params: a } = e, { pattern: s, component: c, load: l } = r().route, u = E(() => r().path);
1133
+ const { base: o, location: i, params: a } = e, { pattern: s, component: c, preload: l } = r().route, u = E(() => r().path);
1134
1134
  c && c.preload && c.preload();
1135
1135
  const h = l ? l({ params: a, location: i, intent: B || "initial" }) : void 0;
1136
1136
  return {
@@ -1168,8 +1168,8 @@ const yn = (e) => (t) => {
1168
1168
  get root() {
1169
1169
  return t.root;
1170
1170
  },
1171
- get load() {
1172
- return t.rootLoad;
1171
+ get preload() {
1172
+ return t.rootPreload || t.rootLoad;
1173
1173
  },
1174
1174
  get children() {
1175
1175
  return [E(() => (i = je()) && null), A(vn, {
@@ -1184,8 +1184,8 @@ const yn = (e) => (t) => {
1184
1184
  });
1185
1185
  };
1186
1186
  function wn(e) {
1187
- const t = e.routerState.location, n = e.routerState.params, r = E(() => e.load && I(() => {
1188
- e.load({
1187
+ const t = e.routerState.location, n = e.routerState.params, r = E(() => e.preload && I(() => {
1188
+ e.preload({
1189
1189
  params: n,
1190
1190
  location: t,
1191
1191
  intent: pn() || "initial"
@@ -1295,8 +1295,8 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
1295
1295
  const S = c(d), g = S ? d.href.baseVal : d.href;
1296
1296
  if ((S ? d.target.baseVal : d.target) || !g && !d.hasAttribute("state"))
1297
1297
  return;
1298
- const L = (d.getAttribute("rel") || "").split(/\s+/);
1299
- if (d.hasAttribute("download") || L && L.includes("external"))
1298
+ const P = (d.getAttribute("rel") || "").split(/\s+/);
1299
+ if (d.hasAttribute("download") || P && P.includes("external"))
1300
1300
  return;
1301
1301
  const F = S ? new URL(g, document.baseURI) : new URL(g);
1302
1302
  if (!(F.origin !== window.location.origin || i && F.pathname && !F.pathname.toLowerCase().startsWith(i.toLowerCase())))
@@ -1306,12 +1306,12 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
1306
1306
  const d = l(f);
1307
1307
  if (!d)
1308
1308
  return;
1309
- const [S, g] = d, U = o.parsePath(g.pathname + g.search + g.hash), L = S.getAttribute("state");
1309
+ const [S, g] = d, U = o.parsePath(g.pathname + g.search + g.hash), P = S.getAttribute("state");
1310
1310
  f.preventDefault(), a(U, {
1311
1311
  resolve: !1,
1312
1312
  replace: S.hasAttribute("replace"),
1313
1313
  scroll: !S.hasAttribute("noscroll"),
1314
- state: L && JSON.parse(L)
1314
+ state: P && JSON.parse(P)
1315
1315
  });
1316
1316
  }
1317
1317
  function h(f) {
@@ -1337,7 +1337,7 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
1337
1337
  const [, S] = d;
1338
1338
  s[S.pathname] && (clearTimeout(s[S.pathname]), delete s[S.pathname]);
1339
1339
  }
1340
- function v(f) {
1340
+ function y(f) {
1341
1341
  if (f.defaultPrevented)
1342
1342
  return;
1343
1343
  let d = f.submitter && f.submitter.hasAttribute("formaction") ? f.submitter.getAttribute("formaction") : f.target.getAttribute("action");
@@ -1353,16 +1353,16 @@ function Cn(e = !0, t = !1, n = "/_server", r) {
1353
1353
  const S = Rn.get(d);
1354
1354
  if (S) {
1355
1355
  f.preventDefault();
1356
- const g = new FormData(f.target);
1357
- f.submitter && f.submitter.name && g.append(f.submitter.name, f.submitter.value), S.call({ r: o, f: f.target }, g);
1356
+ const g = new FormData(f.target, f.submitter);
1357
+ S.call({ r: o, f: f.target }, f.target.enctype === "multipart/form-data" ? g : new URLSearchParams(g));
1358
1358
  }
1359
1359
  }
1360
- se(["click", "submit"]), document.addEventListener("click", u), e && (document.addEventListener("mouseover", p), document.addEventListener("mouseout", m), document.addEventListener("focusin", h), document.addEventListener("touchstart", h)), document.addEventListener("submit", v), Me(() => {
1361
- document.removeEventListener("click", u), e && (document.removeEventListener("mouseover", p), document.removeEventListener("mouseout", m), document.removeEventListener("focusin", h), document.removeEventListener("touchstart", h)), document.removeEventListener("submit", v);
1360
+ se(["click", "submit"]), document.addEventListener("click", u), e && (document.addEventListener("mouseover", p), document.addEventListener("mouseout", m), document.addEventListener("focusin", h), document.addEventListener("touchstart", h)), document.addEventListener("submit", y), Me(() => {
1361
+ document.removeEventListener("click", u), e && (document.removeEventListener("mouseover", p), document.removeEventListener("mouseout", m), document.removeEventListener("focusin", h), document.removeEventListener("touchstart", h)), document.removeEventListener("submit", y);
1362
1362
  });
1363
1363
  };
1364
1364
  }
1365
- function Ln(e) {
1365
+ function Pn(e) {
1366
1366
  const t = e.replace(/^.*?#/, "");
1367
1367
  if (!t.startsWith("/")) {
1368
1368
  const [, n = "/"] = window.location.hash.split("#", 2);
@@ -1370,7 +1370,7 @@ function Ln(e) {
1370
1370
  }
1371
1371
  return t;
1372
1372
  }
1373
- function Pn(e) {
1373
+ function Ln(e) {
1374
1374
  const t = () => window.location.hash.slice(1), n = et();
1375
1375
  return $n({
1376
1376
  get: t,
@@ -1384,7 +1384,7 @@ function Pn(e) {
1384
1384
  utils: {
1385
1385
  go: (r) => window.history.go(r),
1386
1386
  renderPath: (r) => `#${r}`,
1387
- parsePath: Ln,
1387
+ parsePath: Pn,
1388
1388
  beforeLeave: n
1389
1389
  }
1390
1390
  })(e);
@@ -1437,7 +1437,7 @@ const kn = (e) => {
1437
1437
  };
1438
1438
  return (() => {
1439
1439
  var a = Un(), s = a.firstChild, c = s.nextSibling;
1440
- return a.addEventListener("submit", i), s.addEventListener("change", (l) => r(l.currentTarget.value)), P(c, () => o("searchApp.search")), O((l) => {
1440
+ return a.addEventListener("submit", i), s.addEventListener("change", (l) => r(l.currentTarget.value)), L(c, () => o("searchApp.search")), O((l) => {
1441
1441
  var u = In.SearchForm, h = o("searchApp.search");
1442
1442
  return u !== l.e && Qe(a, l.e = u), h !== l.t && ie(s, "placeholder", l.t = h), l;
1443
1443
  }, {
@@ -1476,7 +1476,7 @@ function Ne({
1476
1476
  }
1477
1477
  }
1478
1478
  }
1479
- async function v() {
1479
+ async function y() {
1480
1480
  if (!o.searchString)
1481
1481
  return;
1482
1482
  const f = s();
@@ -1493,18 +1493,18 @@ function Ne({
1493
1493
  }
1494
1494
  return (() => {
1495
1495
  var f = Te();
1496
- return P(f, A(kn, {
1496
+ return L(f, A(kn, {
1497
1497
  language: e,
1498
1498
  get value() {
1499
1499
  return E(() => !!o.searchString)() ? decodeURIComponent(o.searchString) : void 0;
1500
1500
  }
1501
- }), null), P(f, A(q, {
1501
+ }), null), L(f, A(q, {
1502
1502
  get when() {
1503
1503
  return o.searchString;
1504
1504
  },
1505
1505
  get children() {
1506
1506
  var d = Tn();
1507
- return P(d, (() => {
1507
+ return L(d, (() => {
1508
1508
  var S = E(() => !!h());
1509
1509
  return () => S() ? (() => {
1510
1510
  var g = Nn();
@@ -1515,8 +1515,8 @@ function Ne({
1515
1515
  },
1516
1516
  get fallback() {
1517
1517
  return (() => {
1518
- var g = Dn(), U = g.firstChild, L = U.nextSibling;
1519
- return P(g, () => r("searchApp.nothingGet"), U), P(L, () => o.searchString), g;
1518
+ var g = Dn(), U = g.firstChild, P = U.nextSibling;
1519
+ return L(g, () => r("searchApp.nothingGet"), U), L(P, () => o.searchString), g;
1520
1520
  })();
1521
1521
  },
1522
1522
  get children() {
@@ -1529,7 +1529,7 @@ function Ne({
1529
1529
  },
1530
1530
  get children() {
1531
1531
  var g = Fn();
1532
- return g.$$click = v, P(g, () => r("infiniteLoading.loadMore")), g;
1532
+ return g.$$click = y, L(g, () => r("infiniteLoading.loadMore")), g;
1533
1533
  }
1534
1534
  })];
1535
1535
  }
@@ -1546,7 +1546,7 @@ function Bn(e, {
1546
1546
  if (!t)
1547
1547
  throw new Error("Missing language");
1548
1548
  const n = J(e.dataset.limit), r = W(e.dataset.template);
1549
- n === void 0 || r === void 0 || Ee(() => A(Pn, {
1549
+ n === void 0 || r === void 0 || Ee(() => A(Ln, {
1550
1550
  explicitLinks: !0,
1551
1551
  get children() {
1552
1552
  return [A(pe, {
@@ -1595,7 +1595,7 @@ function qn({
1595
1595
  m.target === r && n(!1);
1596
1596
  };
1597
1597
  var p = r;
1598
- return typeof p == "function" ? xt(p, l) : r = l, u.addEventListener("submit", c), P(u, s, h), P(h, () => a("searchApp.search")), l;
1598
+ return typeof p == "function" ? xt(p, l) : r = l, u.addEventListener("submit", c), L(u, s, h), L(h, () => a("searchApp.search")), l;
1599
1599
  })();
1600
1600
  }
1601
1601
  se(["click"]);