@paroicms/content-loading-plugin 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const yt = (e, t) => e === t, me = Symbol("solid-proxy"), z = {
|
|
2
|
+
equals: yt
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const T = 1,
|
|
4
|
+
let Be = Qe;
|
|
5
|
+
const T = 1, ee = 2, Me = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var w = null;
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const n = b, r = w, o = e.length === 0, i = t === void 0 ? r : t, a = o ?
|
|
12
|
+
let fe = null, wt = null, b = null, R = null, k = null, oe = 0;
|
|
13
|
+
function De(e, t) {
|
|
14
|
+
const n = b, r = w, o = e.length === 0, i = t === void 0 ? r : t, a = o ? Me : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
18
18
|
owner: i
|
|
19
|
-
}, s = o ? e : () => e(() => I(() =>
|
|
19
|
+
}, s = o ? e : () => e(() => I(() => se(a)));
|
|
20
20
|
w = a, b = null;
|
|
21
21
|
try {
|
|
22
22
|
return N(s, !0);
|
|
@@ -25,30 +25,30 @@ function Be(e, t) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function x(e, t) {
|
|
28
|
-
t = t ? Object.assign({},
|
|
28
|
+
t = t ? Object.assign({}, z, t) : z;
|
|
29
29
|
const n = {
|
|
30
30
|
value: e,
|
|
31
31
|
observers: null,
|
|
32
32
|
observerSlots: null,
|
|
33
33
|
comparator: t.equals || void 0
|
|
34
|
-
}, r = (o) => (typeof o == "function" && (o = o(n.value)),
|
|
35
|
-
return [
|
|
34
|
+
}, r = (o) => (typeof o == "function" && (o = o(n.value)), Xe(n, o));
|
|
35
|
+
return [He.bind(n), r];
|
|
36
36
|
}
|
|
37
37
|
function _(e, t, n) {
|
|
38
|
-
const r =
|
|
38
|
+
const r = Ae(e, t, !1, T);
|
|
39
39
|
H(r);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
const r =
|
|
41
|
+
function Se(e, t, n) {
|
|
42
|
+
Be = At;
|
|
43
|
+
const r = Ae(e, t, !1, T);
|
|
44
44
|
r.user = !0, k ? k.push(r) : H(r);
|
|
45
45
|
}
|
|
46
46
|
function E(e, t, n) {
|
|
47
|
-
n = n ? Object.assign({},
|
|
48
|
-
const r =
|
|
49
|
-
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, H(r),
|
|
47
|
+
n = n ? Object.assign({}, z, n) : z;
|
|
48
|
+
const r = Ae(e, t, !0, 0);
|
|
49
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, H(r), He.bind(r);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function vt(e) {
|
|
52
52
|
return N(e, !1);
|
|
53
53
|
}
|
|
54
54
|
function I(e) {
|
|
@@ -76,24 +76,24 @@ function K(e, t, n) {
|
|
|
76
76
|
return o = s, c;
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function qe(e) {
|
|
80
80
|
return w === null || (w.cleanups === null ? w.cleanups = [e] : w.cleanups.push(e)), e;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ve() {
|
|
83
83
|
return w;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function We(e, t) {
|
|
86
86
|
const n = w, r = b;
|
|
87
87
|
w = e, b = null;
|
|
88
88
|
try {
|
|
89
89
|
return N(t, !0);
|
|
90
90
|
} catch (o) {
|
|
91
|
-
|
|
91
|
+
Ee(o);
|
|
92
92
|
} finally {
|
|
93
93
|
w = n, b = r;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function bt(e) {
|
|
97
97
|
const t = b, n = w;
|
|
98
98
|
return Promise.resolve().then(() => {
|
|
99
99
|
b = t, w = n;
|
|
@@ -101,31 +101,31 @@ function wt(e) {
|
|
|
101
101
|
return N(e, !1), b = w = null, r ? r.done : void 0;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Ge(e, t) {
|
|
105
105
|
const n = Symbol("context");
|
|
106
106
|
return {
|
|
107
107
|
id: n,
|
|
108
|
-
Provider:
|
|
108
|
+
Provider: Rt(n),
|
|
109
109
|
defaultValue: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Ke(e) {
|
|
113
113
|
let t;
|
|
114
114
|
return w && w.context && (t = w.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
const t = E(e), n = E(() =>
|
|
116
|
+
function $e(e) {
|
|
117
|
+
const t = E(e), n = E(() => ye(t()));
|
|
118
118
|
return n.toArray = () => {
|
|
119
119
|
const r = n();
|
|
120
120
|
return Array.isArray(r) ? r : r != null ? [r] : [];
|
|
121
121
|
}, n;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function He() {
|
|
124
124
|
if (this.sources && this.state)
|
|
125
125
|
if (this.state === T) H(this);
|
|
126
126
|
else {
|
|
127
127
|
const e = R;
|
|
128
|
-
R = null, N(() =>
|
|
128
|
+
R = null, N(() => ne(this), !1), R = e;
|
|
129
129
|
}
|
|
130
130
|
if (b) {
|
|
131
131
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -133,12 +133,12 @@ function Ge() {
|
|
|
133
133
|
}
|
|
134
134
|
return this.value;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Xe(e, t, n) {
|
|
137
137
|
let r = e.value;
|
|
138
138
|
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && N(() => {
|
|
139
139
|
for (let o = 0; o < e.observers.length; o += 1) {
|
|
140
|
-
const i = e.observers[o], a =
|
|
141
|
-
a &&
|
|
140
|
+
const i = e.observers[o], a = fe && fe.running;
|
|
141
|
+
a && fe.disposed.has(i), (a ? !i.tState : !i.state) && (i.pure ? R.push(i) : k.push(i), i.observers && Je(i)), a || (i.state = T);
|
|
142
142
|
}
|
|
143
143
|
if (R.length > 1e6)
|
|
144
144
|
throw R = [], new Error();
|
|
@@ -146,28 +146,28 @@ function Ke(e, t, n) {
|
|
|
146
146
|
}
|
|
147
147
|
function H(e) {
|
|
148
148
|
if (!e.fn) return;
|
|
149
|
-
|
|
150
|
-
const t =
|
|
151
|
-
|
|
149
|
+
se(e);
|
|
150
|
+
const t = oe;
|
|
151
|
+
St(
|
|
152
152
|
e,
|
|
153
153
|
e.value,
|
|
154
154
|
t
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function St(e, t, n) {
|
|
158
158
|
let r;
|
|
159
159
|
const o = w, i = b;
|
|
160
160
|
b = w = e;
|
|
161
161
|
try {
|
|
162
162
|
r = e.fn(t);
|
|
163
163
|
} catch (a) {
|
|
164
|
-
return e.pure && (e.state = T, e.owned && e.owned.forEach(
|
|
164
|
+
return e.pure && (e.state = T, e.owned && e.owned.forEach(se), e.owned = null), e.updatedAt = n + 1, Ee(a);
|
|
165
165
|
} finally {
|
|
166
166
|
b = i, w = o;
|
|
167
167
|
}
|
|
168
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
168
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Xe(e, r) : e.value = r, e.updatedAt = n);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ae(e, t, n, r = T, o) {
|
|
171
171
|
const i = {
|
|
172
172
|
fn: e,
|
|
173
173
|
state: r,
|
|
@@ -181,67 +181,67 @@ function $e(e, t, n, r = T, o) {
|
|
|
181
181
|
context: w ? w.context : null,
|
|
182
182
|
pure: n
|
|
183
183
|
};
|
|
184
|
-
return w === null || w !==
|
|
184
|
+
return w === null || w !== Me && (w.owned ? w.owned.push(i) : w.owned = [i]), i;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function te(e) {
|
|
187
187
|
if (e.state === 0) return;
|
|
188
|
-
if (e.state ===
|
|
188
|
+
if (e.state === ee) return ne(e);
|
|
189
189
|
if (e.suspense && I(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
190
190
|
const t = [e];
|
|
191
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
191
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < oe); )
|
|
192
192
|
e.state && t.push(e);
|
|
193
193
|
for (let n = t.length - 1; n >= 0; n--)
|
|
194
194
|
if (e = t[n], e.state === T)
|
|
195
195
|
H(e);
|
|
196
|
-
else if (e.state ===
|
|
196
|
+
else if (e.state === ee) {
|
|
197
197
|
const r = R;
|
|
198
|
-
R = null, N(() =>
|
|
198
|
+
R = null, N(() => ne(e, t[0]), !1), R = r;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
function N(e, t) {
|
|
202
202
|
if (R) return e();
|
|
203
203
|
let n = !1;
|
|
204
|
-
t || (R = []), k ? n = !0 : k = [],
|
|
204
|
+
t || (R = []), k ? n = !0 : k = [], oe++;
|
|
205
205
|
try {
|
|
206
206
|
const r = e();
|
|
207
|
-
return
|
|
207
|
+
return $t(n), r;
|
|
208
208
|
} catch (r) {
|
|
209
|
-
n || (k = null), R = null,
|
|
209
|
+
n || (k = null), R = null, Ee(r);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
if (R && (
|
|
212
|
+
function $t(e) {
|
|
213
|
+
if (R && (Qe(R), R = null), e) return;
|
|
214
214
|
const t = k;
|
|
215
|
-
k = null, t.length && N(() =>
|
|
215
|
+
k = null, t.length && N(() => Be(t), !1);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
for (let t = 0; t < e.length; t++)
|
|
217
|
+
function Qe(e) {
|
|
218
|
+
for (let t = 0; t < e.length; t++) te(e[t]);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function At(e) {
|
|
221
221
|
let t, n = 0;
|
|
222
222
|
for (t = 0; t < e.length; t++) {
|
|
223
223
|
const r = e[t];
|
|
224
|
-
r.user ? e[n++] = r :
|
|
224
|
+
r.user ? e[n++] = r : te(r);
|
|
225
225
|
}
|
|
226
|
-
for (t = 0; t < n; t++)
|
|
226
|
+
for (t = 0; t < n; t++) te(e[t]);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function ne(e, t) {
|
|
229
229
|
e.state = 0;
|
|
230
230
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
231
231
|
const r = e.sources[n];
|
|
232
232
|
if (r.sources) {
|
|
233
233
|
const o = r.state;
|
|
234
|
-
o === T ? r !== t && (!r.updatedAt || r.updatedAt <
|
|
234
|
+
o === T ? r !== t && (!r.updatedAt || r.updatedAt < oe) && te(r) : o === ee && ne(r, t);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Je(e) {
|
|
239
239
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
240
240
|
const n = e.observers[t];
|
|
241
|
-
n.state || (n.state =
|
|
241
|
+
n.state || (n.state = ee, n.pure ? R.push(n) : k.push(n), n.observers && Je(n));
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function se(e) {
|
|
245
245
|
let t;
|
|
246
246
|
if (e.sources)
|
|
247
247
|
for (; e.sources.length; ) {
|
|
@@ -252,7 +252,7 @@ function oe(e) {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
if (e.owned) {
|
|
255
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
255
|
+
for (t = e.owned.length - 1; t >= 0; t--) se(e.owned[t]);
|
|
256
256
|
e.owned = null;
|
|
257
257
|
}
|
|
258
258
|
if (e.cleanups) {
|
|
@@ -261,34 +261,34 @@ function oe(e) {
|
|
|
261
261
|
}
|
|
262
262
|
e.state = 0;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Et(e) {
|
|
265
265
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
266
266
|
cause: e
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
throw
|
|
269
|
+
function Ee(e, t = w) {
|
|
270
|
+
throw Et(e);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
if (typeof e == "function" && !e.length) return
|
|
272
|
+
function ye(e) {
|
|
273
|
+
if (typeof e == "function" && !e.length) return ye(e());
|
|
274
274
|
if (Array.isArray(e)) {
|
|
275
275
|
const t = [];
|
|
276
276
|
for (let n = 0; n < e.length; n++) {
|
|
277
|
-
const r =
|
|
277
|
+
const r = ye(e[n]);
|
|
278
278
|
Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
|
|
279
279
|
}
|
|
280
280
|
return t;
|
|
281
281
|
}
|
|
282
282
|
return e;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Rt(e, t) {
|
|
285
285
|
return function(r) {
|
|
286
286
|
let o;
|
|
287
287
|
return _(
|
|
288
288
|
() => o = I(() => (w.context = {
|
|
289
289
|
...w.context,
|
|
290
290
|
[e]: r.value
|
|
291
|
-
},
|
|
291
|
+
}, $e(() => r.children))),
|
|
292
292
|
void 0
|
|
293
293
|
), o;
|
|
294
294
|
};
|
|
@@ -296,18 +296,18 @@ function At(e, t) {
|
|
|
296
296
|
function A(e, t) {
|
|
297
297
|
return I(() => e(t || {}));
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function J() {
|
|
300
300
|
return !0;
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const Ct = {
|
|
303
303
|
get(e, t, n) {
|
|
304
|
-
return t ===
|
|
304
|
+
return t === me ? n : e.get(t);
|
|
305
305
|
},
|
|
306
306
|
has(e, t) {
|
|
307
|
-
return t ===
|
|
307
|
+
return t === me ? !0 : e.has(t);
|
|
308
308
|
},
|
|
309
|
-
set:
|
|
310
|
-
deleteProperty:
|
|
309
|
+
set: J,
|
|
310
|
+
deleteProperty: J,
|
|
311
311
|
getOwnPropertyDescriptor(e, t) {
|
|
312
312
|
return {
|
|
313
313
|
configurable: !0,
|
|
@@ -315,51 +315,51 @@ const Et = {
|
|
|
315
315
|
get() {
|
|
316
316
|
return e.get(t);
|
|
317
317
|
},
|
|
318
|
-
set:
|
|
319
|
-
deleteProperty:
|
|
318
|
+
set: J,
|
|
319
|
+
deleteProperty: J
|
|
320
320
|
};
|
|
321
321
|
},
|
|
322
322
|
ownKeys(e) {
|
|
323
323
|
return e.keys();
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
|
-
function
|
|
326
|
+
function he(e) {
|
|
327
327
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Lt() {
|
|
330
330
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
331
331
|
const n = this[e]();
|
|
332
332
|
if (n !== void 0) return n;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Pt(...e) {
|
|
336
336
|
let t = !1;
|
|
337
337
|
for (let a = 0; a < e.length; a++) {
|
|
338
338
|
const s = e[a];
|
|
339
|
-
t = t || !!s &&
|
|
339
|
+
t = t || !!s && me in s, e[a] = typeof s == "function" ? (t = !0, E(s)) : s;
|
|
340
340
|
}
|
|
341
341
|
if (t)
|
|
342
342
|
return new Proxy(
|
|
343
343
|
{
|
|
344
344
|
get(a) {
|
|
345
345
|
for (let s = e.length - 1; s >= 0; s--) {
|
|
346
|
-
const c =
|
|
346
|
+
const c = he(e[s])[a];
|
|
347
347
|
if (c !== void 0) return c;
|
|
348
348
|
}
|
|
349
349
|
},
|
|
350
350
|
has(a) {
|
|
351
351
|
for (let s = e.length - 1; s >= 0; s--)
|
|
352
|
-
if (a in
|
|
352
|
+
if (a in he(e[s])) return !0;
|
|
353
353
|
return !1;
|
|
354
354
|
},
|
|
355
355
|
keys() {
|
|
356
356
|
const a = [];
|
|
357
357
|
for (let s = 0; s < e.length; s++)
|
|
358
|
-
a.push(...Object.keys(
|
|
358
|
+
a.push(...Object.keys(he(e[s])));
|
|
359
359
|
return [...new Set(a)];
|
|
360
360
|
}
|
|
361
361
|
},
|
|
362
|
-
|
|
362
|
+
Ct
|
|
363
363
|
);
|
|
364
364
|
const n = {}, r = /* @__PURE__ */ Object.create(null);
|
|
365
365
|
for (let a = e.length - 1; a >= 0; a--) {
|
|
@@ -374,7 +374,7 @@ function Ct(...e) {
|
|
|
374
374
|
r[u] = h.get ? {
|
|
375
375
|
enumerable: !0,
|
|
376
376
|
configurable: !0,
|
|
377
|
-
get:
|
|
377
|
+
get: Lt.bind(n[u] = [h.get.bind(s)])
|
|
378
378
|
} : h.value !== void 0 ? h : void 0;
|
|
379
379
|
else {
|
|
380
380
|
const p = n[u];
|
|
@@ -389,8 +389,8 @@ function Ct(...e) {
|
|
|
389
389
|
}
|
|
390
390
|
return o;
|
|
391
391
|
}
|
|
392
|
-
const
|
|
393
|
-
function
|
|
392
|
+
const xt = (e) => `Stale read from <${e}>.`;
|
|
393
|
+
function D(e) {
|
|
394
394
|
const t = e.keyed, n = E(() => e.when, void 0, {
|
|
395
395
|
equals: (r, o) => t ? r === o : !r == !o
|
|
396
396
|
});
|
|
@@ -402,7 +402,7 @@ function q(e) {
|
|
|
402
402
|
return typeof o == "function" && o.length > 0 ? I(
|
|
403
403
|
() => o(
|
|
404
404
|
t ? r : () => {
|
|
405
|
-
if (!I(n)) throw
|
|
405
|
+
if (!I(n)) throw xt("Show");
|
|
406
406
|
return e.when;
|
|
407
407
|
}
|
|
408
408
|
)
|
|
@@ -414,7 +414,7 @@ function q(e) {
|
|
|
414
414
|
void 0
|
|
415
415
|
);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Ot(e, t, n) {
|
|
418
418
|
let r = n.length, o = t.length, i = r, a = 0, s = 0, c = t[o - 1].nextSibling, l = null;
|
|
419
419
|
for (; a < o || s < i; ) {
|
|
420
420
|
if (t[a] === n[s]) {
|
|
@@ -453,10 +453,10 @@ function Pt(e, t, n) {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
function
|
|
456
|
+
const _e = "_$DX_DELEGATE";
|
|
457
|
+
function Re(e, t, n, r = {}) {
|
|
458
458
|
let o;
|
|
459
|
-
return
|
|
459
|
+
return De((i) => {
|
|
460
460
|
o = i, t === document ? e() : P(t, e(), t.firstChild ? null : void 0, n);
|
|
461
461
|
}, r.owner), () => {
|
|
462
462
|
o(), t.textContent = "";
|
|
@@ -470,27 +470,27 @@ function C(e, t, n) {
|
|
|
470
470
|
}, i = () => (r || (r = o())).cloneNode(!0);
|
|
471
471
|
return i.cloneNode = i, i;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const n = t[
|
|
473
|
+
function ie(e, t = window.document) {
|
|
474
|
+
const n = t[_e] || (t[_e] = /* @__PURE__ */ new Set());
|
|
475
475
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
476
476
|
const i = e[r];
|
|
477
|
-
n.has(i) || (n.add(i), t.addEventListener(i,
|
|
477
|
+
n.has(i) || (n.add(i), t.addEventListener(i, It));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function ae(e, t, n) {
|
|
481
481
|
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Ye(e, t) {
|
|
484
484
|
t == null ? e.removeAttribute("class") : e.className = t;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function _t(e, t, n) {
|
|
487
487
|
return I(() => e(t, n));
|
|
488
488
|
}
|
|
489
489
|
function P(e, t, n, r) {
|
|
490
|
-
if (n !== void 0 && !r && (r = []), typeof t != "function") return
|
|
491
|
-
_((o) =>
|
|
490
|
+
if (n !== void 0 && !r && (r = []), typeof t != "function") return re(e, t, r, n);
|
|
491
|
+
_((o) => re(e, t(), o, n), r);
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function It(e) {
|
|
494
494
|
const t = `$$${e.type}`;
|
|
495
495
|
let n = e.composedPath && e.composedPath()[0] || e.target;
|
|
496
496
|
for (e.target !== n && Object.defineProperty(e, "target", {
|
|
@@ -510,7 +510,7 @@ function Ot(e) {
|
|
|
510
510
|
n = n._$host || n.parentNode || n.host;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function re(e, t, n, r, o) {
|
|
514
514
|
for (; typeof n == "function"; ) n = n();
|
|
515
515
|
if (t === n) return n;
|
|
516
516
|
const i = typeof t, a = r !== void 0;
|
|
@@ -519,48 +519,48 @@ function ne(e, t, n, r, o) {
|
|
|
519
519
|
return n;
|
|
520
520
|
if (a) {
|
|
521
521
|
let s = n[0];
|
|
522
|
-
s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n =
|
|
522
|
+
s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n = M(e, n, r, s);
|
|
523
523
|
} else
|
|
524
524
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
525
525
|
} else if (t == null || i === "boolean")
|
|
526
|
-
n =
|
|
526
|
+
n = M(e, n, r);
|
|
527
527
|
else {
|
|
528
528
|
if (i === "function")
|
|
529
529
|
return _(() => {
|
|
530
530
|
let s = t();
|
|
531
531
|
for (; typeof s == "function"; ) s = s();
|
|
532
|
-
n =
|
|
532
|
+
n = re(e, s, n, r);
|
|
533
533
|
}), () => n;
|
|
534
534
|
if (Array.isArray(t)) {
|
|
535
535
|
const s = [], c = n && Array.isArray(n);
|
|
536
|
-
if (
|
|
537
|
-
return _(() => n =
|
|
536
|
+
if (we(s, t, n, o))
|
|
537
|
+
return _(() => n = re(e, s, n, r, !0)), () => n;
|
|
538
538
|
if (s.length === 0) {
|
|
539
|
-
if (n =
|
|
540
|
-
} else c ? n.length === 0 ?
|
|
539
|
+
if (n = M(e, n, r), a) return n;
|
|
540
|
+
} else c ? n.length === 0 ? Ie(e, s, r) : Ot(e, n, s) : (n && M(e), Ie(e, s));
|
|
541
541
|
n = s;
|
|
542
542
|
} else if (t.nodeType) {
|
|
543
543
|
if (Array.isArray(n)) {
|
|
544
|
-
if (a) return n =
|
|
545
|
-
|
|
544
|
+
if (a) return n = M(e, n, r, t);
|
|
545
|
+
M(e, n, null, t);
|
|
546
546
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
547
547
|
n = t;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
return n;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function we(e, t, n, r) {
|
|
553
553
|
let o = !1;
|
|
554
554
|
for (let i = 0, a = t.length; i < a; i++) {
|
|
555
555
|
let s = t[i], c = n && n[e.length], l;
|
|
556
556
|
if (!(s == null || s === !0 || s === !1)) if ((l = typeof s) == "object" && s.nodeType)
|
|
557
557
|
e.push(s);
|
|
558
558
|
else if (Array.isArray(s))
|
|
559
|
-
o =
|
|
559
|
+
o = we(e, s, c) || o;
|
|
560
560
|
else if (l === "function")
|
|
561
561
|
if (r) {
|
|
562
562
|
for (; typeof s == "function"; ) s = s();
|
|
563
|
-
o =
|
|
563
|
+
o = we(
|
|
564
564
|
e,
|
|
565
565
|
Array.isArray(s) ? s : [s],
|
|
566
566
|
Array.isArray(c) ? c : [c]
|
|
@@ -574,10 +574,10 @@ function ye(e, t, n, r) {
|
|
|
574
574
|
}
|
|
575
575
|
return o;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function Ie(e, t, n = null) {
|
|
578
578
|
for (let r = 0, o = t.length; r < o; r++) e.insertBefore(t[r], n);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function M(e, t, n, r) {
|
|
581
581
|
if (n === void 0) return e.textContent = "";
|
|
582
582
|
const o = r || document.createTextNode("");
|
|
583
583
|
if (t.length) {
|
|
@@ -592,62 +592,62 @@ function D(e, t, n, r) {
|
|
|
592
592
|
} else e.insertBefore(o, n);
|
|
593
593
|
return [o];
|
|
594
594
|
}
|
|
595
|
-
const
|
|
596
|
-
function
|
|
595
|
+
const Ut = !1;
|
|
596
|
+
function ve(e) {
|
|
597
597
|
return e.varName ? ` for '${e.varName}'` : "";
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function kt(e) {
|
|
600
600
|
return (
|
|
601
601
|
// use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
602
602
|
!isNaN(e) && !isNaN(parseFloat(e))
|
|
603
603
|
);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Tt(e, t = {}) {
|
|
606
606
|
if (e == null || e === "" && !t.allowEmpty)
|
|
607
|
-
throw new Error(`Missing string value${
|
|
607
|
+
throw new Error(`Missing string value${ve(t)}`);
|
|
608
608
|
return typeof e == "string" ? e : e.toString();
|
|
609
609
|
}
|
|
610
610
|
function W(e, t = {}) {
|
|
611
|
-
return e == null || e === "" && !t.allowEmpty ? void 0 :
|
|
611
|
+
return e == null || e === "" && !t.allowEmpty ? void 0 : Tt(e, t);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Nt(e, t = {}) {
|
|
614
614
|
if (typeof e == "number")
|
|
615
615
|
return e;
|
|
616
616
|
if (e == null)
|
|
617
|
-
throw new Error(`Missing number value${
|
|
618
|
-
if (typeof e == "string" &&
|
|
617
|
+
throw new Error(`Missing number value${ve(t)}`);
|
|
618
|
+
if (typeof e == "string" && kt(e))
|
|
619
619
|
return Number(e);
|
|
620
|
-
throw new Error(`Cannot convert to number the value of type '${typeof e}'${
|
|
620
|
+
throw new Error(`Cannot convert to number the value of type '${typeof e}'${ve(t)}`);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return e == null ? void 0 :
|
|
622
|
+
function Y(e, t = {}) {
|
|
623
|
+
return e == null ? void 0 : Nt(e, t);
|
|
624
624
|
}
|
|
625
|
-
const
|
|
626
|
-
async function
|
|
627
|
-
const t = `${
|
|
625
|
+
const Ue = W(void 0, { varName: "VITE_API_PORT" }), Ze = Ue ? `//${document.location.hostname}:${Ue}/api/plugin/content-loading` : `//${document.location.host}/api/plugin/content-loading`, ze = "/assets/plugin/content-loading/0.1.2";
|
|
626
|
+
async function Ft(e) {
|
|
627
|
+
const t = `${Ze}${e}`, n = await fetch(t);
|
|
628
628
|
if (n.status !== 200) throw new Error(`api error ${n.status}`);
|
|
629
629
|
return await n.text();
|
|
630
630
|
}
|
|
631
|
-
var
|
|
632
|
-
function
|
|
631
|
+
var et = (e) => e != null && (e = Object.getPrototypeOf(e), e === Array.prototype || e === Object.prototype);
|
|
632
|
+
function tt(e, t, n) {
|
|
633
633
|
for (const [r, o] of Object.entries(t)) {
|
|
634
634
|
const i = `${n}.${r}`;
|
|
635
|
-
e[i] = o,
|
|
635
|
+
e[i] = o, et(o) && tt(e, o, i);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function jt(e) {
|
|
639
639
|
const t = { ...e };
|
|
640
640
|
for (const [n, r] of Object.entries(e))
|
|
641
|
-
|
|
641
|
+
et(r) && tt(t, r, n);
|
|
642
642
|
return t;
|
|
643
643
|
}
|
|
644
|
-
var
|
|
644
|
+
var Bt = (e, t) => {
|
|
645
645
|
if (t)
|
|
646
646
|
for (const [n, r] of Object.entries(t))
|
|
647
647
|
e = e.replace(new RegExp(`{{\\s*${n}\\s*}}`, "g"), r);
|
|
648
648
|
return e;
|
|
649
|
-
},
|
|
650
|
-
function
|
|
649
|
+
}, Mt = (e) => e;
|
|
650
|
+
function Dt(e, t = Mt) {
|
|
651
651
|
return (n, ...r) => {
|
|
652
652
|
n[0] === "." && (n = n.slice(1));
|
|
653
653
|
const o = e()?.[n];
|
|
@@ -661,38 +661,38 @@ function Bt(e, t = jt) {
|
|
|
661
661
|
}
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
-
const
|
|
664
|
+
const qt = {
|
|
665
665
|
nothingGet: "No results found for",
|
|
666
666
|
search: "Search"
|
|
667
|
-
}, Dt = {
|
|
668
|
-
loadMore: "Load more"
|
|
669
|
-
}, qt = {
|
|
670
|
-
searchApp: Mt,
|
|
671
|
-
infiniteLoading: Dt
|
|
672
667
|
}, Vt = {
|
|
668
|
+
loadMore: "Load more"
|
|
669
|
+
}, Wt = {
|
|
670
|
+
searchApp: qt,
|
|
671
|
+
infiniteLoading: Vt
|
|
672
|
+
}, Gt = {
|
|
673
673
|
nothingGet: "Aucun résultat trouvé pour",
|
|
674
674
|
search: "Rechercher"
|
|
675
|
-
},
|
|
675
|
+
}, Kt = {
|
|
676
676
|
loadMore: "Charger la suite"
|
|
677
|
-
},
|
|
678
|
-
searchApp:
|
|
679
|
-
infiniteLoading:
|
|
680
|
-
},
|
|
681
|
-
function
|
|
677
|
+
}, Ht = {
|
|
678
|
+
searchApp: Gt,
|
|
679
|
+
infiniteLoading: Kt
|
|
680
|
+
}, ke = { en: Wt, fr: Ht };
|
|
681
|
+
function le(e) {
|
|
682
682
|
const t = E(() => {
|
|
683
|
-
const r = e in
|
|
684
|
-
return
|
|
683
|
+
const r = e in ke ? e : "en";
|
|
684
|
+
return jt(ke[r]);
|
|
685
685
|
});
|
|
686
|
-
return { t:
|
|
686
|
+
return { t: Dt(t, Bt) };
|
|
687
687
|
}
|
|
688
|
-
var
|
|
689
|
-
function
|
|
688
|
+
var Xt = /* @__PURE__ */ C("<button class=InfiniteLoading-btn type=button>"), Qt = /* @__PURE__ */ C("<div class=InfiniteLoading-actionArea>"), Jt = /* @__PURE__ */ C("<img class=InfiniteLoading-spinner width=50 height=50 alt=…>");
|
|
689
|
+
function Yt(e, {
|
|
690
690
|
language: t
|
|
691
691
|
}) {
|
|
692
|
-
const n =
|
|
692
|
+
const n = Y(e.dataset.start), r = Y(e.dataset.total), o = Y(e.dataset.limit), i = W(e.dataset.parentId), a = W(e.dataset.template), s = W(e.dataset.labeledById);
|
|
693
693
|
if (!(n === void 0 || r === void 0 || i === void 0 || o === void 0 || a === void 0)) {
|
|
694
694
|
if (!t) throw new Error("Missing language");
|
|
695
|
-
|
|
695
|
+
Zt({
|
|
696
696
|
language: t,
|
|
697
697
|
limit: o,
|
|
698
698
|
parentId: i,
|
|
@@ -704,7 +704,7 @@ function Qt(e, {
|
|
|
704
704
|
});
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function Zt({
|
|
708
708
|
language: e,
|
|
709
709
|
limit: t,
|
|
710
710
|
root: n,
|
|
@@ -716,23 +716,23 @@ function Jt({
|
|
|
716
716
|
}) {
|
|
717
717
|
const {
|
|
718
718
|
t: c
|
|
719
|
-
} =
|
|
719
|
+
} = le(e);
|
|
720
720
|
let l = r;
|
|
721
721
|
if (l >= o) return;
|
|
722
722
|
const u = (() => {
|
|
723
|
-
var y =
|
|
723
|
+
var y = Xt();
|
|
724
724
|
return y.$$click = m, P(y, () => c("infiniteLoading.loadMore")), y;
|
|
725
725
|
})(), h = (() => {
|
|
726
|
-
var y =
|
|
726
|
+
var y = Qt();
|
|
727
727
|
return P(y, u), y;
|
|
728
728
|
})(), p = (() => {
|
|
729
|
-
var y =
|
|
730
|
-
return
|
|
729
|
+
var y = Jt();
|
|
730
|
+
return ae(y, "src", `${ze}/spinner.svg`), y;
|
|
731
731
|
})();
|
|
732
732
|
n.appendChild(h);
|
|
733
733
|
async function m() {
|
|
734
734
|
n.appendChild(p);
|
|
735
|
-
const y = await
|
|
735
|
+
const y = await zt({
|
|
736
736
|
limit: t,
|
|
737
737
|
newStart: l,
|
|
738
738
|
parentId: i,
|
|
@@ -744,18 +744,18 @@ function Jt({
|
|
|
744
744
|
l += t, l >= o && h.remove(), p.remove();
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
async function
|
|
747
|
+
async function zt({
|
|
748
748
|
limit: e,
|
|
749
749
|
newStart: t,
|
|
750
750
|
parentId: n,
|
|
751
751
|
templateName: r,
|
|
752
752
|
labeledById: o
|
|
753
753
|
}) {
|
|
754
|
-
const i = o ? `?labeled=${encodeURIComponent(o)}` : "", a = `/partials?templateName=${encodeURIComponent(r)}&children-of=${encodeURIComponent(n)}&start=${encodeURIComponent(t)}&limit=${encodeURIComponent(e)}${i}`, s = await
|
|
754
|
+
const i = o ? `?labeled=${encodeURIComponent(o)}` : "", a = `/partials?templateName=${encodeURIComponent(r)}&children-of=${encodeURIComponent(n)}&start=${encodeURIComponent(t)}&limit=${encodeURIComponent(e)}${i}`, s = await Ft(a), c = document.createElement("div");
|
|
755
755
|
return c.innerHTML = s, [...c.children];
|
|
756
756
|
}
|
|
757
|
-
|
|
758
|
-
function
|
|
757
|
+
ie(["click"]);
|
|
758
|
+
function nt() {
|
|
759
759
|
let e = /* @__PURE__ */ new Set();
|
|
760
760
|
function t(o) {
|
|
761
761
|
return e.add(o), () => e.delete(o);
|
|
@@ -785,23 +785,23 @@ function et() {
|
|
|
785
785
|
confirm: r
|
|
786
786
|
};
|
|
787
787
|
}
|
|
788
|
-
let
|
|
789
|
-
function
|
|
790
|
-
(!window.history.state || window.history.state._depth == null) && window.history.replaceState({ ...window.history.state, _depth: window.history.length - 1 }, ""),
|
|
788
|
+
let be;
|
|
789
|
+
function Ce() {
|
|
790
|
+
(!window.history.state || window.history.state._depth == null) && window.history.replaceState({ ...window.history.state, _depth: window.history.length - 1 }, ""), be = window.history.state._depth;
|
|
791
791
|
}
|
|
792
|
-
|
|
793
|
-
function
|
|
792
|
+
Ce();
|
|
793
|
+
function en(e) {
|
|
794
794
|
return {
|
|
795
795
|
...e,
|
|
796
796
|
_depth: window.history.state && window.history.state._depth
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function tn(e, t) {
|
|
800
800
|
let n = !1;
|
|
801
801
|
return () => {
|
|
802
|
-
const r =
|
|
803
|
-
|
|
804
|
-
const o = r == null ? null :
|
|
802
|
+
const r = be;
|
|
803
|
+
Ce();
|
|
804
|
+
const o = r == null ? null : be - r;
|
|
805
805
|
if (n) {
|
|
806
806
|
n = !1;
|
|
807
807
|
return;
|
|
@@ -809,33 +809,33 @@ function zt(e, t) {
|
|
|
809
809
|
o && t(o) ? (n = !0, window.history.go(-o)) : e();
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
|
-
const
|
|
812
|
+
const nn = /^(?:[a-z0-9]+:)?\/\//i, rn = /^\/+|(\/)\/+$/g, rt = "http://sr";
|
|
813
813
|
function G(e, t = !1) {
|
|
814
|
-
const n = e.replace(
|
|
814
|
+
const n = e.replace(rn, "$1");
|
|
815
815
|
return n ? t || /^[?#]/.test(n) ? n : "/" + n : "";
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
if (
|
|
817
|
+
function Z(e, t, n) {
|
|
818
|
+
if (nn.test(t))
|
|
819
819
|
return;
|
|
820
820
|
const r = G(e), o = n && G(n);
|
|
821
821
|
let i = "";
|
|
822
822
|
return !o || t.startsWith("/") ? i = r : o.toLowerCase().indexOf(r.toLowerCase()) !== 0 ? i = r + o : i = o, (i || "/") + G(t, !i);
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function on(e, t) {
|
|
825
825
|
if (e == null)
|
|
826
826
|
throw new Error(t);
|
|
827
827
|
return e;
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function sn(e, t) {
|
|
830
830
|
return G(e).replace(/\/*(\*.*)?$/g, "") + G(t);
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function ot(e) {
|
|
833
833
|
const t = {};
|
|
834
834
|
return e.searchParams.forEach((n, r) => {
|
|
835
835
|
t[r] = n;
|
|
836
836
|
}), t;
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function an(e, t, n) {
|
|
839
839
|
const [r, o] = e.split("/*", 2), i = r.split("/").filter(Boolean), a = i.length;
|
|
840
840
|
return (s) => {
|
|
841
841
|
const c = s.split("/").filter(Boolean), l = c.length - a;
|
|
@@ -847,15 +847,15 @@ function on(e, t, n) {
|
|
|
847
847
|
}, h = (p) => n === void 0 ? void 0 : n[p];
|
|
848
848
|
for (let p = 0; p < a; p++) {
|
|
849
849
|
const m = i[p], y = c[p], f = m[0] === ":", d = f ? m.slice(1) : m;
|
|
850
|
-
if (f &&
|
|
850
|
+
if (f && de(y, h(d)))
|
|
851
851
|
u.params[d] = y;
|
|
852
|
-
else if (f || !
|
|
852
|
+
else if (f || !de(y, m))
|
|
853
853
|
return null;
|
|
854
854
|
u.path += `/${y}`;
|
|
855
855
|
}
|
|
856
856
|
if (o) {
|
|
857
857
|
const p = l ? c.slice(-l).join("/") : "";
|
|
858
|
-
if (
|
|
858
|
+
if (de(p, h(o)))
|
|
859
859
|
u.params[o] = p;
|
|
860
860
|
else
|
|
861
861
|
return null;
|
|
@@ -863,19 +863,19 @@ function on(e, t, n) {
|
|
|
863
863
|
return u;
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function de(e, t) {
|
|
867
867
|
const n = (r) => r.localeCompare(e, void 0, { sensitivity: "base" }) === 0;
|
|
868
868
|
return t === void 0 ? !0 : typeof t == "string" ? n(t) : typeof t == "function" ? t(e) : Array.isArray(t) ? t.some(n) : t instanceof RegExp ? t.test(e) : !1;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function ln(e) {
|
|
871
871
|
const [t, n] = e.pattern.split("/*", 2), r = t.split("/").filter(Boolean);
|
|
872
872
|
return r.reduce((o, i) => o + (i.startsWith(":") ? 2 : 3), r.length - (n === void 0 ? 0 : 1));
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
874
|
+
function st(e) {
|
|
875
|
+
const t = /* @__PURE__ */ new Map(), n = Ve();
|
|
876
876
|
return new Proxy({}, {
|
|
877
877
|
get(r, o) {
|
|
878
|
-
return t.has(o) ||
|
|
878
|
+
return t.has(o) || We(n, () => t.set(o, E(() => e()[o]))), t.get(o)();
|
|
879
879
|
},
|
|
880
880
|
getOwnPropertyDescriptor() {
|
|
881
881
|
return {
|
|
@@ -888,7 +888,7 @@ function rt(e) {
|
|
|
888
888
|
}
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function it(e) {
|
|
892
892
|
let t = /(\/?\:[^\/]+)\?/.exec(e);
|
|
893
893
|
if (!t)
|
|
894
894
|
return [e];
|
|
@@ -896,34 +896,34 @@ function ot(e) {
|
|
|
896
896
|
const o = [n, n += t[1]];
|
|
897
897
|
for (; t = /^(\/\:[^\/]+)\?/.exec(r); )
|
|
898
898
|
o.push(n += t[1]), r = r.slice(t[0].length);
|
|
899
|
-
return
|
|
899
|
+
return it(r).reduce((i, a) => [...i, ...o.map((s) => s + a)], []);
|
|
900
900
|
}
|
|
901
|
-
const
|
|
902
|
-
function
|
|
901
|
+
const cn = 100, at = Ge(), lt = Ge(), Le = () => on(Ke(at), "<A> and 'use' router primitives can be only used inside a Route."), ct = () => Le().navigatorFactory(), un = () => Le().location, fn = () => Le().params;
|
|
902
|
+
function hn(e, t = "") {
|
|
903
903
|
const { component: n, preload: r, load: o, children: i, info: a } = e, s = !i || Array.isArray(i) && !i.length, c = {
|
|
904
904
|
key: e,
|
|
905
905
|
component: n,
|
|
906
906
|
preload: r || o,
|
|
907
907
|
info: a
|
|
908
908
|
};
|
|
909
|
-
return
|
|
910
|
-
for (const h of
|
|
911
|
-
const p =
|
|
909
|
+
return ut(e.path).reduce((l, u) => {
|
|
910
|
+
for (const h of it(u)) {
|
|
911
|
+
const p = sn(t, h);
|
|
912
912
|
let m = s ? p : p.split("/*", 1)[0];
|
|
913
913
|
m = m.split("/").map((y) => y.startsWith(":") || y.startsWith("*") ? y : encodeURIComponent(y)).join("/"), l.push({
|
|
914
914
|
...c,
|
|
915
915
|
originalPath: u,
|
|
916
916
|
pattern: m,
|
|
917
|
-
matcher:
|
|
917
|
+
matcher: an(m, !s, e.matchFilters)
|
|
918
918
|
});
|
|
919
919
|
}
|
|
920
920
|
return l;
|
|
921
921
|
}, []);
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function dn(e, t = 0) {
|
|
924
924
|
return {
|
|
925
925
|
routes: e,
|
|
926
|
-
score:
|
|
926
|
+
score: ln(e[e.length - 1]) * 1e4 - t,
|
|
927
927
|
matcher(n) {
|
|
928
928
|
const r = [];
|
|
929
929
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
@@ -939,23 +939,23 @@ function fn(e, t = 0) {
|
|
|
939
939
|
}
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ut(e) {
|
|
943
943
|
return Array.isArray(e) ? e : [e];
|
|
944
944
|
}
|
|
945
|
-
function
|
|
946
|
-
const o =
|
|
945
|
+
function ft(e, t = "", n = [], r = []) {
|
|
946
|
+
const o = ut(e);
|
|
947
947
|
for (let i = 0, a = o.length; i < a; i++) {
|
|
948
948
|
const s = o[i];
|
|
949
949
|
if (s && typeof s == "object") {
|
|
950
950
|
s.hasOwnProperty("path") || (s.path = "");
|
|
951
|
-
const c =
|
|
951
|
+
const c = hn(s, t);
|
|
952
952
|
for (const l of c) {
|
|
953
953
|
n.push(l);
|
|
954
954
|
const u = Array.isArray(s.children) && s.children.length === 0;
|
|
955
955
|
if (s.children && !u)
|
|
956
|
-
|
|
956
|
+
ft(s.children, l.pattern, n, r);
|
|
957
957
|
else {
|
|
958
|
-
const h =
|
|
958
|
+
const h = dn([...n], r.length);
|
|
959
959
|
r.push(h);
|
|
960
960
|
}
|
|
961
961
|
n.pop();
|
|
@@ -964,7 +964,7 @@ function ct(e, t = "", n = [], r = []) {
|
|
|
964
964
|
}
|
|
965
965
|
return n.length ? r : r.sort((i, a) => a.score - i.score);
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function pe(e, t) {
|
|
968
968
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
969
969
|
const o = e[n].matcher(t);
|
|
970
970
|
if (o)
|
|
@@ -972,8 +972,8 @@ function de(e, t) {
|
|
|
972
972
|
}
|
|
973
973
|
return [];
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
const n = new URL(
|
|
975
|
+
function pn(e, t) {
|
|
976
|
+
const n = new URL(rt), r = E((c) => {
|
|
977
977
|
const l = e();
|
|
978
978
|
try {
|
|
979
979
|
return new URL(l, n);
|
|
@@ -999,82 +999,84 @@ function hn(e, t) {
|
|
|
999
999
|
get key() {
|
|
1000
1000
|
return s();
|
|
1001
1001
|
},
|
|
1002
|
-
query:
|
|
1002
|
+
query: st(K(i, () => ot(r())))
|
|
1003
1003
|
};
|
|
1004
1004
|
}
|
|
1005
|
-
let
|
|
1006
|
-
function
|
|
1007
|
-
return
|
|
1005
|
+
let j;
|
|
1006
|
+
function gn() {
|
|
1007
|
+
return j;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const { signal: [o, i], utils: a = {} } = e, s = a.parsePath || ((v) => v), c = a.renderPath || ((v) => v), l = a.beforeLeave ||
|
|
1009
|
+
function mn(e, t, n, r = {}) {
|
|
1010
|
+
const { signal: [o, i], utils: a = {} } = e, s = a.parsePath || ((v) => v), c = a.renderPath || ((v) => v), l = a.beforeLeave || nt(), u = Z("", r.base || "");
|
|
1011
1011
|
if (u === void 0)
|
|
1012
1012
|
throw new Error(`${u} is not a valid base path`);
|
|
1013
1013
|
u && !o().value && i({ value: u, replace: !0, scroll: !1 });
|
|
1014
1014
|
const [h, p] = x(!1);
|
|
1015
1015
|
let m;
|
|
1016
1016
|
const y = (v, $) => {
|
|
1017
|
-
$.value === f() && $.state === S() || (m === void 0 && p(!0),
|
|
1017
|
+
$.value === f() && $.state === S() || (m === void 0 && p(!0), j = v, m = $, bt(() => {
|
|
1018
1018
|
m === $ && (d(m.value), g(m.state), F[1]([]));
|
|
1019
1019
|
}).finally(() => {
|
|
1020
|
-
m === $ &&
|
|
1021
|
-
|
|
1020
|
+
m === $ && vt(() => {
|
|
1021
|
+
j = void 0, v === "navigate" && gt(m), p(!1), m = void 0;
|
|
1022
1022
|
});
|
|
1023
1023
|
}));
|
|
1024
|
-
}, [f, d] = x(o().value), [S, g] = x(o().state), U =
|
|
1025
|
-
const v =
|
|
1024
|
+
}, [f, d] = x(o().value), [S, g] = x(o().state), U = pn(f, S), L = [], F = x([]), q = E(() => typeof r.transformUrl == "function" ? pe(t(), r.transformUrl(U.pathname)) : pe(t(), U.pathname)), ht = st(() => {
|
|
1025
|
+
const v = q(), $ = {};
|
|
1026
1026
|
for (let O = 0; O < v.length; O++)
|
|
1027
1027
|
Object.assign($, v[O].params);
|
|
1028
1028
|
return $;
|
|
1029
|
-
}),
|
|
1029
|
+
}), Pe = {
|
|
1030
1030
|
pattern: u,
|
|
1031
1031
|
path: () => u,
|
|
1032
1032
|
outlet: () => null,
|
|
1033
1033
|
resolvePath(v) {
|
|
1034
|
-
return
|
|
1034
|
+
return Z(u, v);
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
1037
1037
|
return _(K(o, (v) => y("native", v), { defer: !0 })), {
|
|
1038
|
-
base:
|
|
1038
|
+
base: Pe,
|
|
1039
1039
|
location: U,
|
|
1040
|
-
params:
|
|
1040
|
+
params: ht,
|
|
1041
1041
|
isRouting: h,
|
|
1042
1042
|
renderPath: c,
|
|
1043
1043
|
parsePath: s,
|
|
1044
|
-
navigatorFactory:
|
|
1045
|
-
matches:
|
|
1044
|
+
navigatorFactory: pt,
|
|
1045
|
+
matches: q,
|
|
1046
1046
|
beforeLeave: l,
|
|
1047
|
-
preloadRoute:
|
|
1047
|
+
preloadRoute: mt,
|
|
1048
1048
|
singleFlight: r.singleFlight === void 0 ? !0 : r.singleFlight,
|
|
1049
1049
|
submissions: F
|
|
1050
1050
|
};
|
|
1051
|
-
function
|
|
1051
|
+
function dt(v, $, O) {
|
|
1052
1052
|
I(() => {
|
|
1053
1053
|
if (typeof $ == "number") {
|
|
1054
1054
|
$ && (a.go ? a.go($) : console.warn("Router integration does not support relative routing"));
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
|
-
const { replace:
|
|
1057
|
+
const X = !$ || $[0] === "?", { replace: ce, resolve: B, scroll: ue, state: V } = {
|
|
1058
1058
|
replace: !1,
|
|
1059
|
-
resolve: !
|
|
1059
|
+
resolve: !X,
|
|
1060
1060
|
scroll: !0,
|
|
1061
1061
|
...O
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1062
|
+
};
|
|
1063
|
+
let xe;
|
|
1064
|
+
const Q = B ? v.resolvePath($) : Z(X && (xe = o().value) && xe.split("?")[0] || "", $);
|
|
1065
|
+
if (Q === void 0)
|
|
1064
1066
|
throw new Error(`Path '${$}' is not a routable path`);
|
|
1065
|
-
if (L.length >=
|
|
1067
|
+
if (L.length >= cn)
|
|
1066
1068
|
throw new Error("Too many redirects");
|
|
1067
|
-
const
|
|
1068
|
-
(
|
|
1069
|
-
value:
|
|
1070
|
-
state:
|
|
1069
|
+
const Oe = f();
|
|
1070
|
+
(Q !== Oe || V !== S()) && (Ut || l.confirm(Q, O) && (L.push({ value: Oe, replace: ce, scroll: ue, state: S() }), y("navigate", {
|
|
1071
|
+
value: Q,
|
|
1072
|
+
state: V
|
|
1071
1073
|
})));
|
|
1072
1074
|
});
|
|
1073
1075
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return v = v ||
|
|
1076
|
+
function pt(v) {
|
|
1077
|
+
return v = v || Ke(lt) || Pe, ($, O) => dt(v, $, O);
|
|
1076
1078
|
}
|
|
1077
|
-
function
|
|
1079
|
+
function gt(v) {
|
|
1078
1080
|
const $ = L[0];
|
|
1079
1081
|
$ && (i({
|
|
1080
1082
|
...v,
|
|
@@ -1082,33 +1084,33 @@ function pn(e, t, n, r = {}) {
|
|
|
1082
1084
|
scroll: $.scroll
|
|
1083
1085
|
}), L.length = 0);
|
|
1084
1086
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const O =
|
|
1087
|
-
|
|
1087
|
+
function mt(v, $ = {}) {
|
|
1088
|
+
const O = pe(t(), v.pathname), X = j;
|
|
1089
|
+
j = "preload";
|
|
1088
1090
|
for (let ce in O) {
|
|
1089
|
-
const { route:
|
|
1090
|
-
|
|
1091
|
-
const { preload:
|
|
1092
|
-
$.preloadData &&
|
|
1093
|
-
params:
|
|
1091
|
+
const { route: B, params: ue } = O[ce];
|
|
1092
|
+
B.component && B.component.preload && B.component.preload();
|
|
1093
|
+
const { preload: V } = B;
|
|
1094
|
+
$.preloadData && V && We(n(), () => V({
|
|
1095
|
+
params: ue,
|
|
1094
1096
|
location: {
|
|
1095
1097
|
pathname: v.pathname,
|
|
1096
1098
|
search: v.search,
|
|
1097
1099
|
hash: v.hash,
|
|
1098
|
-
query:
|
|
1100
|
+
query: ot(v),
|
|
1099
1101
|
state: null,
|
|
1100
1102
|
key: ""
|
|
1101
1103
|
},
|
|
1102
1104
|
intent: "preload"
|
|
1103
1105
|
}));
|
|
1104
1106
|
}
|
|
1105
|
-
|
|
1107
|
+
j = X;
|
|
1106
1108
|
}
|
|
1107
1109
|
}
|
|
1108
|
-
function
|
|
1110
|
+
function yn(e, t, n, r) {
|
|
1109
1111
|
const { base: o, location: i, params: a } = e, { pattern: s, component: c, preload: l } = r().route, u = E(() => r().path);
|
|
1110
1112
|
c && c.preload && c.preload();
|
|
1111
|
-
const h = l ? l({ params: a, location: i, intent:
|
|
1113
|
+
const h = l ? l({ params: a, location: i, intent: j || "initial" }) : void 0;
|
|
1112
1114
|
return {
|
|
1113
1115
|
parent: t,
|
|
1114
1116
|
pattern: s,
|
|
@@ -1122,24 +1124,24 @@ function gn(e, t, n, r) {
|
|
|
1122
1124
|
}
|
|
1123
1125
|
}) : n(),
|
|
1124
1126
|
resolvePath(m) {
|
|
1125
|
-
return
|
|
1127
|
+
return Z(o.path(), m, u());
|
|
1126
1128
|
}
|
|
1127
1129
|
};
|
|
1128
1130
|
}
|
|
1129
|
-
const
|
|
1131
|
+
const wn = (e) => (t) => {
|
|
1130
1132
|
const {
|
|
1131
1133
|
base: n
|
|
1132
|
-
} = t, r =
|
|
1134
|
+
} = t, r = $e(() => t.children), o = E(() => ft(r(), t.base || ""));
|
|
1133
1135
|
let i;
|
|
1134
|
-
const a =
|
|
1136
|
+
const a = mn(e, o, () => i, {
|
|
1135
1137
|
base: n,
|
|
1136
1138
|
singleFlight: t.singleFlight,
|
|
1137
1139
|
transformUrl: t.transformUrl
|
|
1138
1140
|
});
|
|
1139
|
-
return e.create && e.create(a), A(
|
|
1141
|
+
return e.create && e.create(a), A(at.Provider, {
|
|
1140
1142
|
value: a,
|
|
1141
1143
|
get children() {
|
|
1142
|
-
return A(
|
|
1144
|
+
return A(vn, {
|
|
1143
1145
|
routerState: a,
|
|
1144
1146
|
get root() {
|
|
1145
1147
|
return t.root;
|
|
@@ -1148,7 +1150,7 @@ const mn = (e) => (t) => {
|
|
|
1148
1150
|
return t.rootPreload || t.rootLoad;
|
|
1149
1151
|
},
|
|
1150
1152
|
get children() {
|
|
1151
|
-
return [E(() => (i =
|
|
1153
|
+
return [E(() => (i = Ve()) && null), A(bn, {
|
|
1152
1154
|
routerState: a,
|
|
1153
1155
|
get branches() {
|
|
1154
1156
|
return o();
|
|
@@ -1159,15 +1161,15 @@ const mn = (e) => (t) => {
|
|
|
1159
1161
|
}
|
|
1160
1162
|
});
|
|
1161
1163
|
};
|
|
1162
|
-
function
|
|
1164
|
+
function vn(e) {
|
|
1163
1165
|
const t = e.routerState.location, n = e.routerState.params, r = E(() => e.preload && I(() => {
|
|
1164
1166
|
e.preload({
|
|
1165
1167
|
params: n,
|
|
1166
1168
|
location: t,
|
|
1167
|
-
intent:
|
|
1169
|
+
intent: gn() || "initial"
|
|
1168
1170
|
});
|
|
1169
1171
|
}));
|
|
1170
|
-
return A(
|
|
1172
|
+
return A(D, {
|
|
1171
1173
|
get when() {
|
|
1172
1174
|
return e.root;
|
|
1173
1175
|
},
|
|
@@ -1187,7 +1189,7 @@ function yn(e) {
|
|
|
1187
1189
|
})
|
|
1188
1190
|
});
|
|
1189
1191
|
}
|
|
1190
|
-
function
|
|
1192
|
+
function bn(e) {
|
|
1191
1193
|
const t = [];
|
|
1192
1194
|
let n;
|
|
1193
1195
|
const r = E(K(e.routerState.matches, (o, i, a) => {
|
|
@@ -1195,37 +1197,37 @@ function wn(e) {
|
|
|
1195
1197
|
const c = [];
|
|
1196
1198
|
for (let l = 0, u = o.length; l < u; l++) {
|
|
1197
1199
|
const h = i && i[l], p = o[l];
|
|
1198
|
-
a && h && p.route.key === h.route.key ? c[l] = a[l] : (s = !1, t[l] && t[l](),
|
|
1199
|
-
t[l] = m, c[l] =
|
|
1200
|
+
a && h && p.route.key === h.route.key ? c[l] = a[l] : (s = !1, t[l] && t[l](), De((m) => {
|
|
1201
|
+
t[l] = m, c[l] = yn(e.routerState, c[l - 1] || e.routerState.base, Te(() => r()[l + 1]), () => e.routerState.matches()[l]);
|
|
1200
1202
|
}));
|
|
1201
1203
|
}
|
|
1202
1204
|
return t.splice(o.length).forEach((l) => l()), a && s ? a : (n = c[0], c);
|
|
1203
1205
|
}));
|
|
1204
|
-
return
|
|
1206
|
+
return Te(() => r() && n)();
|
|
1205
1207
|
}
|
|
1206
|
-
const
|
|
1208
|
+
const Te = (e) => () => A(D, {
|
|
1207
1209
|
get when() {
|
|
1208
1210
|
return e();
|
|
1209
1211
|
},
|
|
1210
1212
|
keyed: !0,
|
|
1211
|
-
children: (t) => A(
|
|
1213
|
+
children: (t) => A(lt.Provider, {
|
|
1212
1214
|
value: t,
|
|
1213
1215
|
get children() {
|
|
1214
1216
|
return t.outlet();
|
|
1215
1217
|
}
|
|
1216
1218
|
})
|
|
1217
|
-
}),
|
|
1218
|
-
const t =
|
|
1219
|
-
return
|
|
1219
|
+
}), ge = (e) => {
|
|
1220
|
+
const t = $e(() => e.children);
|
|
1221
|
+
return Pt(e, {
|
|
1220
1222
|
get children() {
|
|
1221
1223
|
return t();
|
|
1222
1224
|
}
|
|
1223
1225
|
});
|
|
1224
1226
|
};
|
|
1225
|
-
function
|
|
1227
|
+
function Sn([e, t], n, r) {
|
|
1226
1228
|
return [e, r ? (o) => t(r(o)) : t];
|
|
1227
1229
|
}
|
|
1228
|
-
function
|
|
1230
|
+
function $n(e) {
|
|
1229
1231
|
if (e === "#")
|
|
1230
1232
|
return null;
|
|
1231
1233
|
try {
|
|
@@ -1234,28 +1236,28 @@ function bn(e) {
|
|
|
1234
1236
|
return null;
|
|
1235
1237
|
}
|
|
1236
1238
|
}
|
|
1237
|
-
function
|
|
1239
|
+
function An(e) {
|
|
1238
1240
|
let t = !1;
|
|
1239
|
-
const n = (o) => typeof o == "string" ? { value: o } : o, r =
|
|
1241
|
+
const n = (o) => typeof o == "string" ? { value: o } : o, r = Sn(x(n(e.get()), {
|
|
1240
1242
|
equals: (o, i) => o.value === i.value && o.state === i.state
|
|
1241
1243
|
}), void 0, (o) => (!t && e.set(o), o));
|
|
1242
|
-
return e.init &&
|
|
1244
|
+
return e.init && qe(e.init((o = e.get()) => {
|
|
1243
1245
|
t = !0, r[1](n(o)), t = !1;
|
|
1244
|
-
})),
|
|
1246
|
+
})), wn({
|
|
1245
1247
|
signal: r,
|
|
1246
1248
|
create: e.create,
|
|
1247
1249
|
utils: e.utils
|
|
1248
1250
|
});
|
|
1249
1251
|
}
|
|
1250
|
-
function
|
|
1252
|
+
function En(e, t, n) {
|
|
1251
1253
|
return e.addEventListener(t, n), () => e.removeEventListener(t, n);
|
|
1252
1254
|
}
|
|
1253
|
-
function
|
|
1254
|
-
const n =
|
|
1255
|
+
function Rn(e, t) {
|
|
1256
|
+
const n = $n(`#${e}`);
|
|
1255
1257
|
n ? n.scrollIntoView() : t && window.scrollTo(0, 0);
|
|
1256
1258
|
}
|
|
1257
|
-
const
|
|
1258
|
-
function
|
|
1259
|
+
const Cn = /* @__PURE__ */ new Map();
|
|
1260
|
+
function Ln(e = !0, t = !1, n = "/_server", r) {
|
|
1259
1261
|
return (o) => {
|
|
1260
1262
|
const i = o.base.path(), a = o.navigatorFactory(o.base);
|
|
1261
1263
|
let s = {};
|
|
@@ -1265,7 +1267,7 @@ function Rn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1265
1267
|
function l(f) {
|
|
1266
1268
|
if (f.defaultPrevented || f.button !== 0 || f.metaKey || f.altKey || f.ctrlKey || f.shiftKey)
|
|
1267
1269
|
return;
|
|
1268
|
-
const d = f.composedPath().find((
|
|
1270
|
+
const d = f.composedPath().find((q) => q instanceof Node && q.nodeName.toUpperCase() === "A");
|
|
1269
1271
|
if (!d || t && !d.hasAttribute("link"))
|
|
1270
1272
|
return;
|
|
1271
1273
|
const S = c(d), g = S ? d.href.baseVal : d.href;
|
|
@@ -1320,25 +1322,25 @@ function Rn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1320
1322
|
if (!d)
|
|
1321
1323
|
return;
|
|
1322
1324
|
if (!d.startsWith("https://action/")) {
|
|
1323
|
-
const g = new URL(d,
|
|
1325
|
+
const g = new URL(d, rt);
|
|
1324
1326
|
if (d = o.parsePath(g.pathname + g.search), !d.startsWith(n))
|
|
1325
1327
|
return;
|
|
1326
1328
|
}
|
|
1327
1329
|
if (f.target.method.toUpperCase() !== "POST")
|
|
1328
1330
|
throw new Error("Only POST forms are supported for Actions");
|
|
1329
|
-
const S =
|
|
1331
|
+
const S = Cn.get(d);
|
|
1330
1332
|
if (S) {
|
|
1331
1333
|
f.preventDefault();
|
|
1332
1334
|
const g = new FormData(f.target, f.submitter);
|
|
1333
1335
|
S.call({ r: o, f: f.target }, f.target.enctype === "multipart/form-data" ? g : new URLSearchParams(g));
|
|
1334
1336
|
}
|
|
1335
1337
|
}
|
|
1336
|
-
|
|
1338
|
+
ie(["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), qe(() => {
|
|
1337
1339
|
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);
|
|
1338
1340
|
});
|
|
1339
1341
|
};
|
|
1340
1342
|
}
|
|
1341
|
-
function
|
|
1343
|
+
function Pn(e) {
|
|
1342
1344
|
const t = e.replace(/^.*?#/, "");
|
|
1343
1345
|
if (!t.startsWith("/")) {
|
|
1344
1346
|
const [, n = "/"] = window.location.hash.split("#", 2);
|
|
@@ -1346,27 +1348,27 @@ function Cn(e) {
|
|
|
1346
1348
|
}
|
|
1347
1349
|
return t;
|
|
1348
1350
|
}
|
|
1349
|
-
function
|
|
1350
|
-
const t = () => window.location.hash.slice(1), n =
|
|
1351
|
-
return
|
|
1351
|
+
function xn(e) {
|
|
1352
|
+
const t = () => window.location.hash.slice(1), n = nt();
|
|
1353
|
+
return An({
|
|
1352
1354
|
get: t,
|
|
1353
1355
|
set({ value: r, replace: o, scroll: i, state: a }) {
|
|
1354
|
-
o ? window.history.replaceState(
|
|
1356
|
+
o ? window.history.replaceState(en(a), "", "#" + r) : window.history.pushState(a, "", "#" + r);
|
|
1355
1357
|
const s = r.indexOf("#"), c = s >= 0 ? r.slice(s + 1) : "";
|
|
1356
|
-
|
|
1358
|
+
Rn(c, i), Ce();
|
|
1357
1359
|
},
|
|
1358
|
-
init: (r) =>
|
|
1359
|
-
create:
|
|
1360
|
+
init: (r) => En(window, "hashchange", tn(r, (o) => !n.confirm(o && o < 0 ? o : t()))),
|
|
1361
|
+
create: Ln(e.preload, e.explicitLinks, e.actionBase),
|
|
1360
1362
|
utils: {
|
|
1361
1363
|
go: (r) => window.history.go(r),
|
|
1362
1364
|
renderPath: (r) => `#${r}`,
|
|
1363
|
-
parsePath:
|
|
1365
|
+
parsePath: Pn,
|
|
1364
1366
|
beforeLeave: n
|
|
1365
1367
|
}
|
|
1366
1368
|
})(e);
|
|
1367
1369
|
}
|
|
1368
|
-
function
|
|
1369
|
-
const t =
|
|
1370
|
+
function On(e) {
|
|
1371
|
+
const t = ct(), n = un(), {
|
|
1370
1372
|
href: r,
|
|
1371
1373
|
state: o
|
|
1372
1374
|
} = e, i = typeof r == "function" ? r({
|
|
@@ -1378,15 +1380,15 @@ function Pn(e) {
|
|
|
1378
1380
|
state: o
|
|
1379
1381
|
}), null;
|
|
1380
1382
|
}
|
|
1381
|
-
const
|
|
1382
|
-
async function
|
|
1383
|
+
const _n = {};
|
|
1384
|
+
async function Ne({
|
|
1383
1385
|
language: e,
|
|
1384
1386
|
text: t,
|
|
1385
1387
|
limit: n,
|
|
1386
1388
|
start: r,
|
|
1387
1389
|
templateName: o
|
|
1388
1390
|
}) {
|
|
1389
|
-
const i = `${
|
|
1391
|
+
const i = `${Ze}/search?language=${encodeURIComponent(
|
|
1390
1392
|
e
|
|
1391
1393
|
)}&q=${encodeURIComponent(t)}&limit=${encodeURIComponent(
|
|
1392
1394
|
n
|
|
@@ -1399,45 +1401,45 @@ async function ke({
|
|
|
1399
1401
|
}
|
|
1400
1402
|
return await a.json();
|
|
1401
1403
|
}
|
|
1402
|
-
const
|
|
1403
|
-
SearchForm:
|
|
1404
|
+
const In = "_SearchForm_1a5n6_1", Un = {
|
|
1405
|
+
SearchForm: In
|
|
1404
1406
|
};
|
|
1405
|
-
var
|
|
1406
|
-
const
|
|
1407
|
-
const t =
|
|
1407
|
+
var kn = /* @__PURE__ */ C("<form><input type=search><button type=submit>");
|
|
1408
|
+
const Tn = (e) => {
|
|
1409
|
+
const t = ct(), [n, r] = x(e.value ?? ""), {
|
|
1408
1410
|
t: o
|
|
1409
|
-
} =
|
|
1410
|
-
|
|
1411
|
+
} = le(e.language);
|
|
1412
|
+
Se(K(() => e.value, () => r(e.value ?? "")));
|
|
1411
1413
|
const i = async (a) => {
|
|
1412
1414
|
a.preventDefault(), t(`/q/${encodeURIComponent(n())}`);
|
|
1413
1415
|
};
|
|
1414
1416
|
return (() => {
|
|
1415
|
-
var a =
|
|
1417
|
+
var a = kn(), s = a.firstChild, c = s.nextSibling;
|
|
1416
1418
|
return a.addEventListener("submit", i), s.addEventListener("change", (l) => r(l.currentTarget.value)), P(c, () => o("searchApp.search")), _((l) => {
|
|
1417
|
-
var u =
|
|
1418
|
-
return u !== l.e &&
|
|
1419
|
+
var u = Un.SearchForm, h = o("searchApp.search");
|
|
1420
|
+
return u !== l.e && Ye(a, l.e = u), h !== l.t && ae(s, "placeholder", l.t = h), l;
|
|
1419
1421
|
}, {
|
|
1420
1422
|
e: void 0,
|
|
1421
1423
|
t: void 0
|
|
1422
1424
|
}), _(() => s.value = n()), a;
|
|
1423
1425
|
})();
|
|
1424
1426
|
};
|
|
1425
|
-
var
|
|
1426
|
-
function
|
|
1427
|
+
var Nn = /* @__PURE__ */ C("<div class=SearchPageResponse>"), Fe = /* @__PURE__ */ C("<div>"), Fn = /* @__PURE__ */ C("<img class=SearchPageResponse-spinner width=80 height=80 alt=…>"), jn = /* @__PURE__ */ C("<button type=button>"), Bn = /* @__PURE__ */ C("<div class=SearchPageResponse-noResultMessage> <span>");
|
|
1428
|
+
function je({
|
|
1427
1429
|
language: e,
|
|
1428
1430
|
limit: t,
|
|
1429
1431
|
templateName: n
|
|
1430
1432
|
}) {
|
|
1431
1433
|
const {
|
|
1432
1434
|
t: r
|
|
1433
|
-
} =
|
|
1434
|
-
|
|
1435
|
+
} = le(e), o = fn(), [i, a] = x(""), [s, c] = x(0), [l, u] = x(0), [h, p] = x(!1);
|
|
1436
|
+
Se(K(() => o.searchString, m));
|
|
1435
1437
|
async function m() {
|
|
1436
1438
|
if (o.searchString) {
|
|
1437
1439
|
p(!0);
|
|
1438
1440
|
try {
|
|
1439
1441
|
a(""), u(0);
|
|
1440
|
-
const f = await
|
|
1442
|
+
const f = await Ne({
|
|
1441
1443
|
language: e,
|
|
1442
1444
|
text: decodeURIComponent(o.searchString),
|
|
1443
1445
|
limit: t,
|
|
@@ -1455,7 +1457,7 @@ function Ne({
|
|
|
1455
1457
|
if (!o.searchString) return;
|
|
1456
1458
|
const f = s();
|
|
1457
1459
|
if (f === void 0 || l() >= f) return;
|
|
1458
|
-
const d = await
|
|
1460
|
+
const d = await Ne({
|
|
1459
1461
|
language: e,
|
|
1460
1462
|
text: decodeURIComponent(o.searchString),
|
|
1461
1463
|
limit: t,
|
|
@@ -1465,43 +1467,43 @@ function Ne({
|
|
|
1465
1467
|
d.html && (a(`${i()}${d.html}`), u(l() + t));
|
|
1466
1468
|
}
|
|
1467
1469
|
return (() => {
|
|
1468
|
-
var f =
|
|
1469
|
-
return P(f, A(
|
|
1470
|
+
var f = Fe();
|
|
1471
|
+
return P(f, A(Tn, {
|
|
1470
1472
|
language: e,
|
|
1471
1473
|
get value() {
|
|
1472
1474
|
return E(() => !!o.searchString)() ? decodeURIComponent(o.searchString) : void 0;
|
|
1473
1475
|
}
|
|
1474
|
-
}), null), P(f, A(
|
|
1476
|
+
}), null), P(f, A(D, {
|
|
1475
1477
|
get when() {
|
|
1476
1478
|
return o.searchString;
|
|
1477
1479
|
},
|
|
1478
1480
|
get children() {
|
|
1479
|
-
var d =
|
|
1481
|
+
var d = Nn();
|
|
1480
1482
|
return P(d, (() => {
|
|
1481
1483
|
var S = E(() => !!h());
|
|
1482
1484
|
return () => S() ? (() => {
|
|
1483
|
-
var g =
|
|
1484
|
-
return
|
|
1485
|
-
})() : A(
|
|
1485
|
+
var g = Fn();
|
|
1486
|
+
return ae(g, "src", `${ze}/spinner.svg`), g;
|
|
1487
|
+
})() : A(D, {
|
|
1486
1488
|
get when() {
|
|
1487
1489
|
return i();
|
|
1488
1490
|
},
|
|
1489
1491
|
get fallback() {
|
|
1490
1492
|
return (() => {
|
|
1491
|
-
var g =
|
|
1493
|
+
var g = Bn(), U = g.firstChild, L = U.nextSibling;
|
|
1492
1494
|
return P(g, () => r("searchApp.nothingGet"), U), P(L, () => o.searchString), g;
|
|
1493
1495
|
})();
|
|
1494
1496
|
},
|
|
1495
1497
|
get children() {
|
|
1496
1498
|
return [(() => {
|
|
1497
|
-
var g =
|
|
1499
|
+
var g = Fe();
|
|
1498
1500
|
return _(() => g.innerHTML = i()), g;
|
|
1499
|
-
})(), A(
|
|
1501
|
+
})(), A(D, {
|
|
1500
1502
|
get when() {
|
|
1501
1503
|
return l() < s();
|
|
1502
1504
|
},
|
|
1503
1505
|
get children() {
|
|
1504
|
-
var g =
|
|
1506
|
+
var g = jn();
|
|
1505
1507
|
return g.$$click = y, P(g, () => r("infiniteLoading.loadMore")), g;
|
|
1506
1508
|
}
|
|
1507
1509
|
})];
|
|
@@ -1509,33 +1511,33 @@ function Ne({
|
|
|
1509
1511
|
});
|
|
1510
1512
|
})()), d;
|
|
1511
1513
|
}
|
|
1512
|
-
}), null), _(() =>
|
|
1514
|
+
}), null), _(() => Ye(f, _n.SiteApp)), f;
|
|
1513
1515
|
})();
|
|
1514
1516
|
}
|
|
1515
|
-
|
|
1516
|
-
function
|
|
1517
|
+
ie(["click"]);
|
|
1518
|
+
function Mn(e, {
|
|
1517
1519
|
language: t
|
|
1518
1520
|
}) {
|
|
1519
1521
|
if (!t) throw new Error("Missing language");
|
|
1520
|
-
const n =
|
|
1521
|
-
n === void 0 || r === void 0 ||
|
|
1522
|
+
const n = Y(e.dataset.limit), r = W(e.dataset.template);
|
|
1523
|
+
n === void 0 || r === void 0 || Re(() => A(xn, {
|
|
1522
1524
|
explicitLinks: !0,
|
|
1523
1525
|
get children() {
|
|
1524
|
-
return [A(
|
|
1526
|
+
return [A(ge, {
|
|
1525
1527
|
path: "/",
|
|
1526
|
-
component: () => A(
|
|
1528
|
+
component: () => A(On, {
|
|
1527
1529
|
href: "/q"
|
|
1528
1530
|
})
|
|
1529
|
-
}), A(
|
|
1531
|
+
}), A(ge, {
|
|
1530
1532
|
path: "/q",
|
|
1531
|
-
component: () => A(
|
|
1533
|
+
component: () => A(je, {
|
|
1532
1534
|
language: t,
|
|
1533
1535
|
templateName: r,
|
|
1534
1536
|
limit: n
|
|
1535
1537
|
})
|
|
1536
|
-
}), A(
|
|
1538
|
+
}), A(ge, {
|
|
1537
1539
|
path: "/q/:searchString",
|
|
1538
|
-
component: () => A(
|
|
1540
|
+
component: () => A(je, {
|
|
1539
1541
|
language: t,
|
|
1540
1542
|
templateName: r,
|
|
1541
1543
|
limit: n
|
|
@@ -1544,8 +1546,8 @@ function jn(e, {
|
|
|
1544
1546
|
}
|
|
1545
1547
|
}), e);
|
|
1546
1548
|
}
|
|
1547
|
-
var
|
|
1548
|
-
function
|
|
1549
|
+
var Dn = /* @__PURE__ */ C("<input class=SearchOpenerOverlay-input type=search required>"), qn = /* @__PURE__ */ C("<div class=SearchOpenerOverlay><form class=SearchOpenerOverlay-form><button class=SearchOpenerOverlay-btn type=submit>");
|
|
1550
|
+
function Vn({
|
|
1549
1551
|
searchURL: e,
|
|
1550
1552
|
language: t,
|
|
1551
1553
|
setSearchFormOverlayIsOpen: n
|
|
@@ -1553,40 +1555,40 @@ function Dn({
|
|
|
1553
1555
|
let r;
|
|
1554
1556
|
const [o, i] = x(""), {
|
|
1555
1557
|
t: a
|
|
1556
|
-
} =
|
|
1557
|
-
var l =
|
|
1558
|
-
return l.addEventListener("change", (u) => i(u.currentTarget.value)), _(() =>
|
|
1558
|
+
} = le(t), s = (() => {
|
|
1559
|
+
var l = Dn();
|
|
1560
|
+
return l.addEventListener("change", (u) => i(u.currentTarget.value)), _(() => ae(l, "placeholder", a("searchApp.search"))), _(() => l.value = o()), l;
|
|
1559
1561
|
})(), c = (l) => {
|
|
1560
1562
|
l.preventDefault(), window.location.href = `${e}#/q/${encodeURIComponent(o())}`, n(!1);
|
|
1561
1563
|
};
|
|
1562
|
-
return
|
|
1564
|
+
return Se(() => {
|
|
1563
1565
|
s.focus();
|
|
1564
1566
|
}), (() => {
|
|
1565
|
-
var l =
|
|
1567
|
+
var l = qn(), u = l.firstChild, h = u.firstChild;
|
|
1566
1568
|
l.$$click = (m) => {
|
|
1567
1569
|
m.target === r && n(!1);
|
|
1568
1570
|
};
|
|
1569
1571
|
var p = r;
|
|
1570
|
-
return typeof p == "function" ?
|
|
1572
|
+
return typeof p == "function" ? _t(p, l) : r = l, u.addEventListener("submit", c), P(u, s, h), P(h, () => a("searchApp.search")), l;
|
|
1571
1573
|
})();
|
|
1572
1574
|
}
|
|
1573
|
-
|
|
1574
|
-
var
|
|
1575
|
-
function
|
|
1575
|
+
ie(["click"]);
|
|
1576
|
+
var Wn = /* @__PURE__ */ C('<button type=button class=SearchOpenerBtn><svg class=SearchOpenerBtn-svg width=20 height=20 version=1.1 id=Capa_1 xmlns=http://www.w3.org/2000/svg viewBox="0 0 490.4 490.4"><title>Search Icon</title><g id=SVGRepo_bgCarrier stroke-width=0></g><g id=SVGRepo_tracerCarrier stroke-linecap=round stroke-linejoin=round></g><g id=SVGRepo_iconCarrier><g><path d="M484.1,454.796l-110.5-110.6c29.8-36.3,47.6-82.8,47.6-133.4c0-116.3-94.3-210.6-210.6-210.6S0,94.496,0,210.796 s94.3,210.6,210.6,210.6c50.8,0,97.4-18,133.8-48l110.5,110.5c12.9,11.8,25,4.2,29.2,0C492.5,475.596,492.5,463.096,484.1,454.796z M41.1,210.796c0-93.6,75.9-169.5,169.5-169.5s169.6,75.9,169.6,169.5s-75.9,169.5-169.5,169.5S41.1,304.396,41.1,210.796z"></path> '), Gn = /* @__PURE__ */ C("<div>");
|
|
1577
|
+
function Kn({
|
|
1576
1578
|
searchIconColor: e,
|
|
1577
1579
|
language: t,
|
|
1578
1580
|
searchURL: n
|
|
1579
1581
|
}) {
|
|
1580
1582
|
const [r, o] = x(!1), i = (() => {
|
|
1581
|
-
var s =
|
|
1583
|
+
var s = Wn(), c = s.firstChild;
|
|
1582
1584
|
return e != null ? c.style.setProperty("fill", e) : c.style.removeProperty("fill"), s;
|
|
1583
|
-
})(), a =
|
|
1584
|
-
return document.body.appendChild(a), i.addEventListener("click", () => o(!0)),
|
|
1585
|
+
})(), a = Gn();
|
|
1586
|
+
return document.body.appendChild(a), i.addEventListener("click", () => o(!0)), Re(() => A(D, {
|
|
1585
1587
|
get when() {
|
|
1586
1588
|
return r();
|
|
1587
1589
|
},
|
|
1588
1590
|
get children() {
|
|
1589
|
-
return A(
|
|
1591
|
+
return A(Vn, {
|
|
1590
1592
|
searchURL: n,
|
|
1591
1593
|
language: t,
|
|
1592
1594
|
setSearchFormOverlayIsOpen: o
|
|
@@ -1594,13 +1596,13 @@ function Wn({
|
|
|
1594
1596
|
}
|
|
1595
1597
|
}), a), i;
|
|
1596
1598
|
}
|
|
1597
|
-
function
|
|
1599
|
+
function Hn(e, {
|
|
1598
1600
|
language: t
|
|
1599
1601
|
}) {
|
|
1600
1602
|
const n = e.dataset.searchUrl, r = e.dataset.iconColor;
|
|
1601
1603
|
if (!t) throw new Error("Missing language");
|
|
1602
1604
|
if (!n) throw new Error("Missing search url");
|
|
1603
|
-
|
|
1605
|
+
Re(() => A(Kn, {
|
|
1604
1606
|
language: t,
|
|
1605
1607
|
searchURL: n,
|
|
1606
1608
|
searchIconColor: r
|
|
@@ -1608,9 +1610,9 @@ function Gn(e, {
|
|
|
1608
1610
|
}
|
|
1609
1611
|
document.addEventListener("DOMContentLoaded", () => {
|
|
1610
1612
|
const e = document.documentElement.lang, t = {
|
|
1611
|
-
searchOpener:
|
|
1612
|
-
searchForm:
|
|
1613
|
-
infiniteLoading:
|
|
1613
|
+
searchOpener: Hn,
|
|
1614
|
+
searchForm: Mn,
|
|
1615
|
+
infiniteLoading: Yt
|
|
1614
1616
|
}, n = document.querySelectorAll("[data-effect]");
|
|
1615
1617
|
for (const r of n) {
|
|
1616
1618
|
const o = r.dataset.effect;
|