altcha 2.1.0-beta.3 → 2.1.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.
- package/README.md +14 -0
- package/dist/altcha.i18n.js +520 -518
- package/dist/altcha.i18n.umd.js +4 -4
- package/dist/altcha.js +521 -519
- package/dist/altcha.umd.cjs +4 -4
- package/dist_external/altcha.css +1 -1
- package/dist_external/altcha.js +470 -468
- package/dist_external/altcha.umd.cjs +3 -3
- package/package.json +9 -1
package/dist/altcha.js
CHANGED
|
@@ -3,7 +3,7 @@ var Fn = (e) => {
|
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var qo = (e, t, r) => t in e ? jo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
-
var
|
|
6
|
+
var Ee = (e, t, r) => qo(e, typeof t != "symbol" ? t + "" : t, r), Mn = (e, t, r) => t.has(e) || Fn("Cannot " + r);
|
|
7
7
|
var se = (e, t, r) => (Mn(e, t, "read from private field"), r ? r.call(e) : t.get(e)), $r = (e, t, r) => t.has(e) ? Fn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Sr = (e, t, r, i) => (Mn(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r);
|
|
8
8
|
const ti = `(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
|
|
9
9
|
`, Vn = typeof self < "u" && self.Blob && new Blob([ti], { type: "text/javascript;charset=utf-8" });
|
|
@@ -31,11 +31,11 @@ function Bo(e) {
|
|
|
31
31
|
const Ho = "5";
|
|
32
32
|
var ei;
|
|
33
33
|
typeof window < "u" && ((ei = window.__svelte ?? (window.__svelte = {})).v ?? (ei.v = /* @__PURE__ */ new Set())).add(Ho);
|
|
34
|
-
const Go = 1,
|
|
34
|
+
const Go = 1, Wo = 4, Yo = 8, Zo = 16, zo = 1, Jo = 2, qr = "[", ri = "[!", ni = "]", yt = {}, ue = Symbol(), Ko = "http://www.w3.org/1999/xhtml", Un = !1;
|
|
35
35
|
function ii(e) {
|
|
36
36
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
37
37
|
}
|
|
38
|
-
var oi = Array.isArray, Xo = Array.prototype.indexOf, Qo = Array.from,
|
|
38
|
+
var oi = Array.isArray, Xo = Array.prototype.indexOf, Qo = Array.from, ir = Object.keys, Vt = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, ea = Object.getOwnPropertyDescriptors, ta = Object.prototype, ra = Array.prototype, ai = Object.getPrototypeOf, jn = Object.isExtensible;
|
|
39
39
|
const wt = () => {
|
|
40
40
|
};
|
|
41
41
|
function li(e) {
|
|
@@ -51,7 +51,7 @@ function na(e, t, r = !1) {
|
|
|
51
51
|
t
|
|
52
52
|
) : e;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const Ce = 2, si = 4, cr = 8, Br = 16, Fe = 32, ot = 64, or = 128, ve = 256, ar = 512, fe = 1024, De = 2048, at = 4096, Et = 8192, dr = 16384, ia = 32768, Hr = 65536, oa = 1 << 19, ui = 1 << 20, Lr = 1 << 21, Ft = Symbol("$state"), fi = Symbol("legacy props"), aa = Symbol("");
|
|
55
55
|
function la(e) {
|
|
56
56
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
57
57
|
}
|
|
@@ -79,7 +79,7 @@ function va() {
|
|
|
79
79
|
function ga() {
|
|
80
80
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function hr(e) {
|
|
83
83
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
84
84
|
}
|
|
85
85
|
let M = !1;
|
|
@@ -87,21 +87,21 @@ function bt(e) {
|
|
|
87
87
|
M = e;
|
|
88
88
|
}
|
|
89
89
|
let F;
|
|
90
|
-
function
|
|
90
|
+
function We(e) {
|
|
91
91
|
if (e === null)
|
|
92
|
-
throw
|
|
92
|
+
throw hr(), yt;
|
|
93
93
|
return F = e;
|
|
94
94
|
}
|
|
95
95
|
function Ct() {
|
|
96
|
-
return
|
|
96
|
+
return We(
|
|
97
97
|
/** @type {TemplateNode} */
|
|
98
98
|
/* @__PURE__ */ ze(F)
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Y(e) {
|
|
102
102
|
if (M) {
|
|
103
103
|
if (/* @__PURE__ */ ze(F) !== null)
|
|
104
|
-
throw
|
|
104
|
+
throw hr(), yt;
|
|
105
105
|
F = e;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -126,7 +126,7 @@ function pa() {
|
|
|
126
126
|
}
|
|
127
127
|
let ma = !1;
|
|
128
128
|
function He(e) {
|
|
129
|
-
if (typeof e != "object" || e === null ||
|
|
129
|
+
if (typeof e != "object" || e === null || Ft in e)
|
|
130
130
|
return e;
|
|
131
131
|
const t = ai(e);
|
|
132
132
|
if (t !== ta && t !== ra)
|
|
@@ -147,7 +147,7 @@ function He(e) {
|
|
|
147
147
|
defineProperty(s, c, d) {
|
|
148
148
|
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && ha();
|
|
149
149
|
var _ = r.get(c);
|
|
150
|
-
return _ === void 0 ? (_ = u(() => /* @__PURE__ */ P(d.value)), r.set(c, _)) :
|
|
150
|
+
return _ === void 0 ? (_ = u(() => /* @__PURE__ */ P(d.value)), r.set(c, _)) : b(
|
|
151
151
|
_,
|
|
152
152
|
u(() => He(d.value))
|
|
153
153
|
), !0;
|
|
@@ -165,20 +165,20 @@ function He(e) {
|
|
|
165
165
|
/** @type {Source<number>} */
|
|
166
166
|
r.get("length")
|
|
167
167
|
), h = Number(c);
|
|
168
|
-
Number.isInteger(h) && h < _.v &&
|
|
168
|
+
Number.isInteger(h) && h < _.v && b(_, h);
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
b(d, ue), Tr(a);
|
|
171
171
|
}
|
|
172
172
|
return !0;
|
|
173
173
|
},
|
|
174
174
|
get(s, c, d) {
|
|
175
175
|
var w;
|
|
176
|
-
if (c ===
|
|
176
|
+
if (c === Ft)
|
|
177
177
|
return e;
|
|
178
178
|
var _ = r.get(c), h = c in s;
|
|
179
179
|
if (_ === void 0 && (!h || (w = rt(s, c)) != null && w.writable) && (_ = u(() => /* @__PURE__ */ P(He(h ? s[c] : ue))), r.set(c, _)), _ !== void 0) {
|
|
180
|
-
var
|
|
181
|
-
return
|
|
180
|
+
var m = l(_);
|
|
181
|
+
return m === ue ? void 0 : m;
|
|
182
182
|
}
|
|
183
183
|
return Reflect.get(s, c, d);
|
|
184
184
|
},
|
|
@@ -188,23 +188,23 @@ function He(e) {
|
|
|
188
188
|
var _ = r.get(c);
|
|
189
189
|
_ && (d.value = l(_));
|
|
190
190
|
} else if (d === void 0) {
|
|
191
|
-
var h = r.get(c),
|
|
192
|
-
if (h !== void 0 &&
|
|
191
|
+
var h = r.get(c), m = h == null ? void 0 : h.v;
|
|
192
|
+
if (h !== void 0 && m !== ue)
|
|
193
193
|
return {
|
|
194
194
|
enumerable: !0,
|
|
195
195
|
configurable: !0,
|
|
196
|
-
value:
|
|
196
|
+
value: m,
|
|
197
197
|
writable: !0
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
return d;
|
|
201
201
|
},
|
|
202
202
|
has(s, c) {
|
|
203
|
-
var
|
|
204
|
-
if (c ===
|
|
203
|
+
var m;
|
|
204
|
+
if (c === Ft)
|
|
205
205
|
return !0;
|
|
206
206
|
var d = r.get(c), _ = d !== void 0 && d.v !== ue || Reflect.has(s, c);
|
|
207
|
-
if (d !== void 0 || N !== null && (!_ || (
|
|
207
|
+
if (d !== void 0 || N !== null && (!_ || (m = rt(s, c)) != null && m.writable)) {
|
|
208
208
|
d === void 0 && (d = u(() => /* @__PURE__ */ P(_ ? He(s[c]) : ue)), r.set(c, d));
|
|
209
209
|
var h = l(d);
|
|
210
210
|
if (h === ue)
|
|
@@ -214,28 +214,28 @@ function He(e) {
|
|
|
214
214
|
},
|
|
215
215
|
set(s, c, d, _) {
|
|
216
216
|
var K;
|
|
217
|
-
var h = r.get(c),
|
|
217
|
+
var h = r.get(c), m = c in s;
|
|
218
218
|
if (i && c === "length")
|
|
219
219
|
for (var w = d; w < /** @type {Source<number>} */
|
|
220
220
|
h.v; w += 1) {
|
|
221
221
|
var S = r.get(w + "");
|
|
222
|
-
S !== void 0 ?
|
|
222
|
+
S !== void 0 ? b(S, ue) : w in s && (S = u(() => /* @__PURE__ */ P(ue)), r.set(w + "", S));
|
|
223
223
|
}
|
|
224
|
-
h === void 0 ? (!
|
|
224
|
+
h === void 0 ? (!m || (K = rt(s, c)) != null && K.writable) && (h = u(() => /* @__PURE__ */ P(void 0)), b(
|
|
225
225
|
h,
|
|
226
226
|
u(() => He(d))
|
|
227
|
-
), r.set(c, h)) : (
|
|
227
|
+
), r.set(c, h)) : (m = h.v !== ue, b(
|
|
228
228
|
h,
|
|
229
229
|
u(() => He(d))
|
|
230
230
|
));
|
|
231
|
-
var
|
|
232
|
-
if (
|
|
231
|
+
var E = Reflect.getOwnPropertyDescriptor(s, c);
|
|
232
|
+
if (E != null && E.set && E.set.call(_, d), !m) {
|
|
233
233
|
if (i && typeof c == "string") {
|
|
234
|
-
var
|
|
234
|
+
var U = (
|
|
235
235
|
/** @type {Source<number>} */
|
|
236
236
|
r.get("length")
|
|
237
237
|
), ce = Number(c);
|
|
238
|
-
Number.isInteger(ce) && ce >=
|
|
238
|
+
Number.isInteger(ce) && ce >= U.v && b(U, ce + 1);
|
|
239
239
|
}
|
|
240
240
|
Tr(a);
|
|
241
241
|
}
|
|
@@ -244,8 +244,8 @@ function He(e) {
|
|
|
244
244
|
ownKeys(s) {
|
|
245
245
|
l(a);
|
|
246
246
|
var c = Reflect.ownKeys(s).filter((h) => {
|
|
247
|
-
var
|
|
248
|
-
return
|
|
247
|
+
var m = r.get(h);
|
|
248
|
+
return m === void 0 || m.v !== ue;
|
|
249
249
|
});
|
|
250
250
|
for (var [d, _] of r)
|
|
251
251
|
_.v !== ue && !(d in s) && c.push(d);
|
|
@@ -258,7 +258,7 @@ function He(e) {
|
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
260
|
function Tr(e, t = 1) {
|
|
261
|
-
|
|
261
|
+
b(e, e.v + t);
|
|
262
262
|
}
|
|
263
263
|
var qn, ci, di, hi;
|
|
264
264
|
function Or() {
|
|
@@ -268,7 +268,7 @@ function Or() {
|
|
|
268
268
|
di = rt(t, "firstChild").get, hi = rt(t, "nextSibling").get, jn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), jn(r) && (r.__t = void 0);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function vr(e = "") {
|
|
272
272
|
return document.createTextNode(e);
|
|
273
273
|
}
|
|
274
274
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -286,9 +286,9 @@ function Z(e, t) {
|
|
|
286
286
|
/** @type {TemplateNode} */
|
|
287
287
|
/* @__PURE__ */ _e(F)
|
|
288
288
|
);
|
|
289
|
-
return r === null && (r = F.appendChild(
|
|
289
|
+
return r === null && (r = F.appendChild(vr())), We(r), r;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Lt(e, t) {
|
|
292
292
|
if (!M) {
|
|
293
293
|
var r = (
|
|
294
294
|
/** @type {DocumentFragment} */
|
|
@@ -310,10 +310,10 @@ function z(e, t = 1, r = !1) {
|
|
|
310
310
|
return i;
|
|
311
311
|
var o = i == null ? void 0 : i.nodeType;
|
|
312
312
|
if (r && o !== 3) {
|
|
313
|
-
var u =
|
|
314
|
-
return i === null ? a == null || a.after(u) : i.before(u),
|
|
313
|
+
var u = vr();
|
|
314
|
+
return i === null ? a == null || a.after(u) : i.before(u), We(u), u;
|
|
315
315
|
}
|
|
316
|
-
return
|
|
316
|
+
return We(i), /** @type {TemplateNode} */
|
|
317
317
|
i;
|
|
318
318
|
}
|
|
319
319
|
function _a(e) {
|
|
@@ -329,8 +329,8 @@ function Gr(e) {
|
|
|
329
329
|
return !gi(e, this.v);
|
|
330
330
|
}
|
|
331
331
|
// @__NO_SIDE_EFFECTS__
|
|
332
|
-
function
|
|
333
|
-
var t =
|
|
332
|
+
function gr(e) {
|
|
333
|
+
var t = Ce | De, r = D !== null && (D.f & Ce) !== 0 ? (
|
|
334
334
|
/** @type {Derived} */
|
|
335
335
|
D
|
|
336
336
|
) : null;
|
|
@@ -352,13 +352,13 @@ function vr(e) {
|
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
354
|
// @__NO_SIDE_EFFECTS__
|
|
355
|
-
function
|
|
356
|
-
const t = /* @__PURE__ */
|
|
355
|
+
function Ot(e) {
|
|
356
|
+
const t = /* @__PURE__ */ gr(e);
|
|
357
357
|
return Ri(t), t;
|
|
358
358
|
}
|
|
359
359
|
// @__NO_SIDE_EFFECTS__
|
|
360
360
|
function ba(e) {
|
|
361
|
-
const t = /* @__PURE__ */
|
|
361
|
+
const t = /* @__PURE__ */ gr(e);
|
|
362
362
|
return t.equals = Gr, t;
|
|
363
363
|
}
|
|
364
364
|
function pi(e) {
|
|
@@ -366,7 +366,7 @@ function pi(e) {
|
|
|
366
366
|
if (t !== null) {
|
|
367
367
|
e.effects = null;
|
|
368
368
|
for (var r = 0; r < t.length; r += 1)
|
|
369
|
-
|
|
369
|
+
Ye(
|
|
370
370
|
/** @type {Effect} */
|
|
371
371
|
t[r]
|
|
372
372
|
);
|
|
@@ -374,7 +374,7 @@ function pi(e) {
|
|
|
374
374
|
}
|
|
375
375
|
function ya(e) {
|
|
376
376
|
for (var t = e.parent; t !== null; ) {
|
|
377
|
-
if ((t.f &
|
|
377
|
+
if ((t.f & Ce) === 0)
|
|
378
378
|
return (
|
|
379
379
|
/** @type {Effect} */
|
|
380
380
|
t
|
|
@@ -395,10 +395,10 @@ function mi(e) {
|
|
|
395
395
|
}
|
|
396
396
|
function _i(e) {
|
|
397
397
|
var t = mi(e), r = (Ge || (e.f & ve) !== 0) && e.deps !== null ? at : fe;
|
|
398
|
-
|
|
398
|
+
xe(e, r), e.equals(t) || (e.v = t, e.wv = Si());
|
|
399
399
|
}
|
|
400
400
|
function wa(e) {
|
|
401
|
-
N === null && D === null && ua(), D !== null && (D.f & ve) !== 0 && N === null && sa(),
|
|
401
|
+
N === null && D === null && ua(), D !== null && (D.f & ve) !== 0 && N === null && sa(), Bt && la();
|
|
402
402
|
}
|
|
403
403
|
function Ea(e, t) {
|
|
404
404
|
var r = t.last;
|
|
@@ -425,11 +425,11 @@ function lt(e, t, r, i = !0) {
|
|
|
425
425
|
try {
|
|
426
426
|
Jr(o), o.f |= ia;
|
|
427
427
|
} catch (c) {
|
|
428
|
-
throw
|
|
428
|
+
throw Ye(o), c;
|
|
429
429
|
}
|
|
430
|
-
else t !== null &&
|
|
431
|
-
var u = r && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & (ui |
|
|
432
|
-
if (!u && i && (a !== null && Ea(o, a), D !== null && (D.f &
|
|
430
|
+
else t !== null && mr(o);
|
|
431
|
+
var u = r && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & (ui | or)) === 0;
|
|
432
|
+
if (!u && i && (a !== null && Ea(o, a), D !== null && (D.f & Ce) !== 0)) {
|
|
433
433
|
var s = (
|
|
434
434
|
/** @type {Derived} */
|
|
435
435
|
D
|
|
@@ -438,9 +438,9 @@ function lt(e, t, r, i = !0) {
|
|
|
438
438
|
}
|
|
439
439
|
return o;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
const t = lt(
|
|
443
|
-
return
|
|
441
|
+
function Wr(e) {
|
|
442
|
+
const t = lt(cr, null, !1);
|
|
443
|
+
return xe(t, fe), t.teardown = e, t;
|
|
444
444
|
}
|
|
445
445
|
function Pr(e) {
|
|
446
446
|
wa();
|
|
@@ -456,44 +456,44 @@ function Pr(e) {
|
|
|
456
456
|
reaction: D
|
|
457
457
|
});
|
|
458
458
|
} else {
|
|
459
|
-
var i =
|
|
459
|
+
var i = Yr(e);
|
|
460
460
|
return i;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
function Ca(e) {
|
|
464
464
|
const t = lt(ot, e, !0);
|
|
465
465
|
return () => {
|
|
466
|
-
|
|
466
|
+
Ye(t);
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
function xa(e) {
|
|
470
470
|
const t = lt(ot, e, !0);
|
|
471
471
|
return (r = {}) => new Promise((i) => {
|
|
472
472
|
r.outro ? Mr(t, () => {
|
|
473
|
-
|
|
474
|
-
}) : (
|
|
473
|
+
Ye(t), i(void 0);
|
|
474
|
+
}) : (Ye(t), i(void 0));
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function Yr(e) {
|
|
478
478
|
return lt(si, e, !1);
|
|
479
479
|
}
|
|
480
480
|
function Zr(e) {
|
|
481
|
-
return lt(
|
|
481
|
+
return lt(cr, e, !0);
|
|
482
482
|
}
|
|
483
|
-
function $e(e, t = [], r =
|
|
483
|
+
function $e(e, t = [], r = gr) {
|
|
484
484
|
const i = t.map(r);
|
|
485
485
|
return bi(() => e(...i.map(l)));
|
|
486
486
|
}
|
|
487
487
|
function bi(e, t = 0) {
|
|
488
|
-
return lt(
|
|
488
|
+
return lt(cr | Br | t, e, !0);
|
|
489
489
|
}
|
|
490
490
|
function Fr(e, t = !0) {
|
|
491
|
-
return lt(
|
|
491
|
+
return lt(cr | Fe, e, !0, t);
|
|
492
492
|
}
|
|
493
493
|
function yi(e) {
|
|
494
494
|
var t = e.teardown;
|
|
495
495
|
if (t !== null) {
|
|
496
|
-
const r =
|
|
496
|
+
const r = Bt, i = D;
|
|
497
497
|
Hn(!0), Ne(null);
|
|
498
498
|
try {
|
|
499
499
|
t.call(null);
|
|
@@ -506,22 +506,22 @@ function wi(e, t = !1) {
|
|
|
506
506
|
var r = e.first;
|
|
507
507
|
for (e.first = e.last = null; r !== null; ) {
|
|
508
508
|
var i = r.next;
|
|
509
|
-
(r.f & ot) !== 0 ? r.parent = null :
|
|
509
|
+
(r.f & ot) !== 0 ? r.parent = null : Ye(r, t), r = i;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
function ka(e) {
|
|
513
513
|
for (var t = e.first; t !== null; ) {
|
|
514
514
|
var r = t.next;
|
|
515
|
-
(t.f & Fe) === 0 &&
|
|
515
|
+
(t.f & Fe) === 0 && Ye(t), t = r;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Ye(e, t = !0) {
|
|
519
519
|
var r = !1;
|
|
520
520
|
(t || (e.f & oa) !== 0) && e.nodes_start !== null && (Ei(
|
|
521
521
|
e.nodes_start,
|
|
522
522
|
/** @type {TemplateNode} */
|
|
523
523
|
e.nodes_end
|
|
524
|
-
), r = !0), wi(e, t && !r),
|
|
524
|
+
), r = !0), wi(e, t && !r), fr(e, 0), xe(e, dr);
|
|
525
525
|
var i = e.transitions;
|
|
526
526
|
if (i !== null)
|
|
527
527
|
for (const o of i)
|
|
@@ -546,7 +546,7 @@ function Ci(e) {
|
|
|
546
546
|
function Mr(e, t) {
|
|
547
547
|
var r = [];
|
|
548
548
|
xi(e, r, !0), Aa(r, () => {
|
|
549
|
-
|
|
549
|
+
Ye(e), t && t();
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
function Aa(e, t) {
|
|
@@ -574,7 +574,7 @@ function Bn(e) {
|
|
|
574
574
|
}
|
|
575
575
|
function ki(e, t) {
|
|
576
576
|
if ((e.f & Et) !== 0) {
|
|
577
|
-
e.f ^= Et, (e.f & fe) === 0 && (e.f ^= fe),
|
|
577
|
+
e.f ^= Et, (e.f & fe) === 0 && (e.f ^= fe), Ht(e) && (xe(e, De), mr(e));
|
|
578
578
|
for (var r = e.first; r !== null; ) {
|
|
579
579
|
var i = r.next, a = (r.f & Hr) !== 0 || (r.f & Fe) !== 0;
|
|
580
580
|
ki(r, a ? t : !1), r = i;
|
|
@@ -585,29 +585,29 @@ function ki(e, t) {
|
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
const Ia = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
|
|
588
|
-
let
|
|
588
|
+
let Ut = [], jt = [];
|
|
589
589
|
function Ai() {
|
|
590
|
-
var e = Vt;
|
|
591
|
-
Vt = [], li(e);
|
|
592
|
-
}
|
|
593
|
-
function Ii() {
|
|
594
590
|
var e = Ut;
|
|
595
591
|
Ut = [], li(e);
|
|
596
592
|
}
|
|
593
|
+
function Ii() {
|
|
594
|
+
var e = jt;
|
|
595
|
+
jt = [], li(e);
|
|
596
|
+
}
|
|
597
597
|
function zr(e) {
|
|
598
|
-
|
|
598
|
+
Ut.length === 0 && queueMicrotask(Ai), Ut.push(e);
|
|
599
599
|
}
|
|
600
600
|
function Ra(e) {
|
|
601
|
-
|
|
601
|
+
jt.length === 0 && Ia(Ii), jt.push(e);
|
|
602
602
|
}
|
|
603
603
|
function $a() {
|
|
604
|
-
|
|
604
|
+
Ut.length > 0 && Ai(), jt.length > 0 && Ii();
|
|
605
605
|
}
|
|
606
|
-
let
|
|
606
|
+
let tr = !1, lr = !1, sr = null, nt = !1, Bt = !1;
|
|
607
607
|
function Hn(e) {
|
|
608
|
-
|
|
608
|
+
Bt = e;
|
|
609
609
|
}
|
|
610
|
-
let
|
|
610
|
+
let Mt = [];
|
|
611
611
|
let D = null, Se = !1;
|
|
612
612
|
function Ne(e) {
|
|
613
613
|
D = e;
|
|
@@ -624,11 +624,11 @@ let ne = null, he = 0, pe = null;
|
|
|
624
624
|
function Sa(e) {
|
|
625
625
|
pe = e;
|
|
626
626
|
}
|
|
627
|
-
let $i = 1,
|
|
627
|
+
let $i = 1, ur = 0, Ge = !1;
|
|
628
628
|
function Si() {
|
|
629
629
|
return ++$i;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Ht(e) {
|
|
632
632
|
var h;
|
|
633
633
|
var t = e.f;
|
|
634
634
|
if ((t & De) !== 0)
|
|
@@ -636,7 +636,7 @@ function Bt(e) {
|
|
|
636
636
|
if ((t & at) !== 0) {
|
|
637
637
|
var r = e.deps, i = (t & ve) !== 0;
|
|
638
638
|
if (r !== null) {
|
|
639
|
-
var a, o, u = (t &
|
|
639
|
+
var a, o, u = (t & ar) !== 0, s = i && N !== null && !Ge, c = r.length;
|
|
640
640
|
if (u || s) {
|
|
641
641
|
var d = (
|
|
642
642
|
/** @type {Derived} */
|
|
@@ -644,10 +644,10 @@ function Bt(e) {
|
|
|
644
644
|
), _ = d.parent;
|
|
645
645
|
for (a = 0; a < c; a++)
|
|
646
646
|
o = r[a], (u || !((h = o == null ? void 0 : o.reactions) != null && h.includes(d))) && (o.reactions ?? (o.reactions = [])).push(d);
|
|
647
|
-
u && (d.f ^=
|
|
647
|
+
u && (d.f ^= ar), s && _ !== null && (_.f & ve) === 0 && (d.f ^= ve);
|
|
648
648
|
}
|
|
649
649
|
for (a = 0; a < c; a++)
|
|
650
|
-
if (o = r[a],
|
|
650
|
+
if (o = r[a], Ht(
|
|
651
651
|
/** @type {Derived} */
|
|
652
652
|
o
|
|
653
653
|
) && _i(
|
|
@@ -656,33 +656,33 @@ function Bt(e) {
|
|
|
656
656
|
), o.wv > e.wv)
|
|
657
657
|
return !0;
|
|
658
658
|
}
|
|
659
|
-
(!i || N !== null && !Ge) &&
|
|
659
|
+
(!i || N !== null && !Ge) && xe(e, fe);
|
|
660
660
|
}
|
|
661
661
|
return !1;
|
|
662
662
|
}
|
|
663
663
|
function Ta(e, t) {
|
|
664
664
|
for (var r = t; r !== null; ) {
|
|
665
|
-
if ((r.f &
|
|
665
|
+
if ((r.f & or) !== 0)
|
|
666
666
|
try {
|
|
667
667
|
r.fn(e);
|
|
668
668
|
return;
|
|
669
669
|
} catch {
|
|
670
|
-
r.f ^=
|
|
670
|
+
r.f ^= or;
|
|
671
671
|
}
|
|
672
672
|
r = r.parent;
|
|
673
673
|
}
|
|
674
|
-
throw
|
|
674
|
+
throw tr = !1, e;
|
|
675
675
|
}
|
|
676
676
|
function Gn(e) {
|
|
677
|
-
return (e.f &
|
|
677
|
+
return (e.f & dr) === 0 && (e.parent === null || (e.parent.f & or) === 0);
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
if (
|
|
681
|
-
if (r === null && (
|
|
679
|
+
function pr(e, t, r, i) {
|
|
680
|
+
if (tr) {
|
|
681
|
+
if (r === null && (tr = !1), Gn(t))
|
|
682
682
|
throw e;
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
|
-
if (r !== null && (
|
|
685
|
+
if (r !== null && (tr = !0), Ta(e, t), Gn(t))
|
|
686
686
|
throw e;
|
|
687
687
|
}
|
|
688
688
|
function Ti(e, t, r = !0) {
|
|
@@ -690,12 +690,12 @@ function Ti(e, t, r = !0) {
|
|
|
690
690
|
if (i !== null)
|
|
691
691
|
for (var a = 0; a < i.length; a++) {
|
|
692
692
|
var o = i[a];
|
|
693
|
-
ie != null && ie.includes(e) || ((o.f &
|
|
693
|
+
ie != null && ie.includes(e) || ((o.f & Ce) !== 0 ? Ti(
|
|
694
694
|
/** @type {Derived} */
|
|
695
695
|
o,
|
|
696
696
|
t,
|
|
697
697
|
!1
|
|
698
|
-
) : t === o && (r ?
|
|
698
|
+
) : t === o && (r ? xe(o, De) : (o.f & fe) !== 0 && xe(o, at), mr(
|
|
699
699
|
/** @type {Effect} */
|
|
700
700
|
o
|
|
701
701
|
)));
|
|
@@ -705,35 +705,35 @@ function Di(e) {
|
|
|
705
705
|
var w;
|
|
706
706
|
var t = ne, r = he, i = pe, a = D, o = Ge, u = ie, s = oe, c = Se, d = e.f;
|
|
707
707
|
ne = /** @type {null | Value[]} */
|
|
708
|
-
null, he = 0, pe = null, Ge = (d & ve) !== 0 && (Se || !nt || D === null), D = (d & (Fe | ot)) === 0 ? e : null, ie = null,
|
|
708
|
+
null, he = 0, pe = null, Ge = (d & ve) !== 0 && (Se || !nt || D === null), D = (d & (Fe | ot)) === 0 ? e : null, ie = null, Wn(e.ctx), Se = !1, ur++, e.f |= Lr;
|
|
709
709
|
try {
|
|
710
710
|
var _ = (
|
|
711
711
|
/** @type {Function} */
|
|
712
712
|
(0, e.fn)()
|
|
713
713
|
), h = e.deps;
|
|
714
714
|
if (ne !== null) {
|
|
715
|
-
var
|
|
716
|
-
if (
|
|
717
|
-
for (h.length = he + ne.length,
|
|
718
|
-
h[he +
|
|
715
|
+
var m;
|
|
716
|
+
if (fr(e, he), h !== null && he > 0)
|
|
717
|
+
for (h.length = he + ne.length, m = 0; m < ne.length; m++)
|
|
718
|
+
h[he + m] = ne[m];
|
|
719
719
|
else
|
|
720
720
|
e.deps = h = ne;
|
|
721
721
|
if (!Ge)
|
|
722
|
-
for (
|
|
723
|
-
((w = h[
|
|
724
|
-
} else h !== null && he < h.length && (
|
|
725
|
-
if (Mi() && pe !== null && !Se && h !== null && (e.f & (
|
|
726
|
-
for (
|
|
727
|
-
pe.length;
|
|
722
|
+
for (m = he; m < h.length; m++)
|
|
723
|
+
((w = h[m]).reactions ?? (w.reactions = [])).push(e);
|
|
724
|
+
} else h !== null && he < h.length && (fr(e, he), h.length = he);
|
|
725
|
+
if (Mi() && pe !== null && !Se && h !== null && (e.f & (Ce | at | De)) === 0)
|
|
726
|
+
for (m = 0; m < /** @type {Source[]} */
|
|
727
|
+
pe.length; m++)
|
|
728
728
|
Ti(
|
|
729
|
-
pe[
|
|
729
|
+
pe[m],
|
|
730
730
|
/** @type {Effect} */
|
|
731
731
|
e
|
|
732
732
|
);
|
|
733
|
-
return a !== null && a !== e && (
|
|
733
|
+
return a !== null && a !== e && (ur++, pe !== null && (i === null ? i = pe : i.push(.../** @type {Source[]} */
|
|
734
734
|
pe))), _;
|
|
735
735
|
} finally {
|
|
736
|
-
ne = t, he = r, pe = i, D = a, Ge = o, ie = u,
|
|
736
|
+
ne = t, he = r, pe = i, D = a, Ge = o, ie = u, Wn(s), Se = c, e.f ^= Lr;
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
function Da(e, t) {
|
|
@@ -745,19 +745,19 @@ function Da(e, t) {
|
|
|
745
745
|
a === 0 ? r = t.reactions = null : (r[i] = r[a], r.pop());
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
r === null && (t.f &
|
|
748
|
+
r === null && (t.f & Ce) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
749
749
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
750
750
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
751
|
-
(ne === null || !ne.includes(t)) && (
|
|
751
|
+
(ne === null || !ne.includes(t)) && (xe(t, at), (t.f & (ve | ar)) === 0 && (t.f ^= ar), pi(
|
|
752
752
|
/** @type {Derived} **/
|
|
753
753
|
t
|
|
754
|
-
),
|
|
754
|
+
), fr(
|
|
755
755
|
/** @type {Derived} **/
|
|
756
756
|
t,
|
|
757
757
|
0
|
|
758
758
|
));
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function fr(e, t) {
|
|
761
761
|
var r = e.deps;
|
|
762
762
|
if (r !== null)
|
|
763
763
|
for (var i = t; i < r.length; i++)
|
|
@@ -765,8 +765,8 @@ function ur(e, t) {
|
|
|
765
765
|
}
|
|
766
766
|
function Jr(e) {
|
|
767
767
|
var t = e.f;
|
|
768
|
-
if ((t &
|
|
769
|
-
|
|
768
|
+
if ((t & dr) === 0) {
|
|
769
|
+
xe(e, fe);
|
|
770
770
|
var r = N, i = oe, a = nt;
|
|
771
771
|
N = e, nt = !0;
|
|
772
772
|
try {
|
|
@@ -776,7 +776,7 @@ function Jr(e) {
|
|
|
776
776
|
var u = e.deps, s;
|
|
777
777
|
Un && ma && e.f & De;
|
|
778
778
|
} catch (c) {
|
|
779
|
-
|
|
779
|
+
pr(c, e, r, i || e.ctx);
|
|
780
780
|
} finally {
|
|
781
781
|
nt = a, N = r;
|
|
782
782
|
}
|
|
@@ -786,8 +786,8 @@ function Na() {
|
|
|
786
786
|
try {
|
|
787
787
|
fa();
|
|
788
788
|
} catch (e) {
|
|
789
|
-
if (
|
|
790
|
-
|
|
789
|
+
if (sr !== null)
|
|
790
|
+
pr(e, sr, null);
|
|
791
791
|
else
|
|
792
792
|
throw e;
|
|
793
793
|
}
|
|
@@ -796,18 +796,18 @@ function Ni() {
|
|
|
796
796
|
var e = nt;
|
|
797
797
|
try {
|
|
798
798
|
var t = 0;
|
|
799
|
-
for (nt = !0;
|
|
799
|
+
for (nt = !0; Mt.length > 0; ) {
|
|
800
800
|
t++ > 1e3 && Na();
|
|
801
|
-
var r =
|
|
802
|
-
|
|
801
|
+
var r = Mt, i = r.length;
|
|
802
|
+
Mt = [];
|
|
803
803
|
for (var a = 0; a < i; a++) {
|
|
804
804
|
var o = Oa(r[a]);
|
|
805
805
|
La(o);
|
|
806
806
|
}
|
|
807
|
-
|
|
807
|
+
qt.clear();
|
|
808
808
|
}
|
|
809
809
|
} finally {
|
|
810
|
-
|
|
810
|
+
lr = !1, nt = e, sr = null;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
function La(e) {
|
|
@@ -815,17 +815,17 @@ function La(e) {
|
|
|
815
815
|
if (t !== 0)
|
|
816
816
|
for (var r = 0; r < t; r++) {
|
|
817
817
|
var i = e[r];
|
|
818
|
-
if ((i.f & (
|
|
818
|
+
if ((i.f & (dr | Et)) === 0)
|
|
819
819
|
try {
|
|
820
|
-
|
|
820
|
+
Ht(i) && (Jr(i), i.deps === null && i.first === null && i.nodes_start === null && (i.teardown === null ? Ci(i) : i.fn = null));
|
|
821
821
|
} catch (a) {
|
|
822
|
-
|
|
822
|
+
pr(a, i, null, i.ctx);
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
828
|
-
for (var t =
|
|
826
|
+
function mr(e) {
|
|
827
|
+
lr || (lr = !0, queueMicrotask(Ni));
|
|
828
|
+
for (var t = sr = e; t.parent !== null; ) {
|
|
829
829
|
t = t.parent;
|
|
830
830
|
var r = t.f;
|
|
831
831
|
if ((r & (ot | Fe)) !== 0) {
|
|
@@ -833,7 +833,7 @@ function pr(e) {
|
|
|
833
833
|
t.f ^= fe;
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
|
|
836
|
+
Mt.push(t);
|
|
837
837
|
}
|
|
838
838
|
function Oa(e) {
|
|
839
839
|
for (var t = [], r = e; r !== null; ) {
|
|
@@ -845,9 +845,9 @@ function Oa(e) {
|
|
|
845
845
|
r.f ^= fe;
|
|
846
846
|
else
|
|
847
847
|
try {
|
|
848
|
-
|
|
848
|
+
Ht(r) && Jr(r);
|
|
849
849
|
} catch (c) {
|
|
850
|
-
|
|
850
|
+
pr(c, r, null, r.ctx);
|
|
851
851
|
}
|
|
852
852
|
var u = r.first;
|
|
853
853
|
if (u !== null) {
|
|
@@ -861,25 +861,25 @@ function Oa(e) {
|
|
|
861
861
|
}
|
|
862
862
|
return t;
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function k(e) {
|
|
865
865
|
for (var t; ; ) {
|
|
866
|
-
if ($a(),
|
|
866
|
+
if ($a(), Mt.length === 0)
|
|
867
867
|
return (
|
|
868
868
|
/** @type {T} */
|
|
869
869
|
t
|
|
870
870
|
);
|
|
871
|
-
|
|
871
|
+
lr = !0, Ni();
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
async function Dr() {
|
|
875
|
-
await Promise.resolve(),
|
|
875
|
+
await Promise.resolve(), k();
|
|
876
876
|
}
|
|
877
877
|
function l(e) {
|
|
878
|
-
var t = e.f, r = (t &
|
|
878
|
+
var t = e.f, r = (t & Ce) !== 0;
|
|
879
879
|
if (D !== null && !Se) {
|
|
880
880
|
if (!(ie != null && ie.includes(e))) {
|
|
881
881
|
var i = D.deps;
|
|
882
|
-
e.rv <
|
|
882
|
+
e.rv < ur && (e.rv = ur, ne === null && i !== null && i[he] === e ? he++ : ne === null ? ne = [e] : (!Ge || !ne.includes(e)) && ne.push(e));
|
|
883
883
|
}
|
|
884
884
|
} else if (r && /** @type {Derived} */
|
|
885
885
|
e.deps === null && /** @type {Derived} */
|
|
@@ -891,7 +891,7 @@ function l(e) {
|
|
|
891
891
|
o !== null && (o.f & ve) === 0 && (a.f ^= ve);
|
|
892
892
|
}
|
|
893
893
|
return r && (a = /** @type {Derived} */
|
|
894
|
-
e,
|
|
894
|
+
e, Ht(a) && _i(a)), Bt && qt.has(e) ? qt.get(e) : e.v;
|
|
895
895
|
}
|
|
896
896
|
function it(e) {
|
|
897
897
|
var t = Se;
|
|
@@ -902,10 +902,10 @@ function it(e) {
|
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
const Pa = -7169;
|
|
905
|
-
function
|
|
905
|
+
function xe(e, t) {
|
|
906
906
|
e.f = e.f & Pa | t;
|
|
907
907
|
}
|
|
908
|
-
const
|
|
908
|
+
const qt = /* @__PURE__ */ new Map();
|
|
909
909
|
function Li(e, t) {
|
|
910
910
|
var r = {
|
|
911
911
|
f: 0,
|
|
@@ -928,18 +928,18 @@ function Kr(e, t = !1) {
|
|
|
928
928
|
const r = Li(e);
|
|
929
929
|
return t || (r.equals = Gr), r;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
D !== null && !Se && Mi() && (D.f & (
|
|
931
|
+
function b(e, t, r = !1) {
|
|
932
|
+
D !== null && !Se && Mi() && (D.f & (Ce | Br)) !== 0 && !(ie != null && ie.includes(e)) && ga();
|
|
933
933
|
let i = r ? He(t) : t;
|
|
934
934
|
return Fa(e, i);
|
|
935
935
|
}
|
|
936
936
|
function Fa(e, t) {
|
|
937
937
|
if (!e.equals(t)) {
|
|
938
938
|
var r = e.v;
|
|
939
|
-
|
|
939
|
+
Bt ? qt.set(e, t) : qt.set(e, r), e.v = t, (e.f & Ce) !== 0 && ((e.f & De) !== 0 && mi(
|
|
940
940
|
/** @type {Derived} */
|
|
941
941
|
e
|
|
942
|
-
),
|
|
942
|
+
), xe(e, (e.f & ve) === 0 ? fe : at)), e.wv = Si(), Oi(e, De), N !== null && (N.f & fe) !== 0 && (N.f & (Fe | ot)) === 0 && (pe === null ? Sa([e]) : pe.push(e));
|
|
943
943
|
}
|
|
944
944
|
return t;
|
|
945
945
|
}
|
|
@@ -948,18 +948,18 @@ function Oi(e, t) {
|
|
|
948
948
|
if (r !== null)
|
|
949
949
|
for (var i = r.length, a = 0; a < i; a++) {
|
|
950
950
|
var o = r[a], u = o.f;
|
|
951
|
-
(u & De) === 0 && (
|
|
951
|
+
(u & De) === 0 && (xe(o, t), (u & (fe | ve)) !== 0 && ((u & Ce) !== 0 ? Oi(
|
|
952
952
|
/** @type {Derived} */
|
|
953
953
|
o,
|
|
954
954
|
at
|
|
955
|
-
) :
|
|
955
|
+
) : mr(
|
|
956
956
|
/** @type {Effect} */
|
|
957
957
|
o
|
|
958
958
|
)));
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
let oe = null;
|
|
962
|
-
function
|
|
962
|
+
function Wn(e) {
|
|
963
963
|
oe = e;
|
|
964
964
|
}
|
|
965
965
|
function Pi(e, t = !1, r) {
|
|
@@ -973,7 +973,7 @@ function Pi(e, t = !1, r) {
|
|
|
973
973
|
x: null,
|
|
974
974
|
l: null
|
|
975
975
|
};
|
|
976
|
-
|
|
976
|
+
Wr(() => {
|
|
977
977
|
i.d = !0;
|
|
978
978
|
});
|
|
979
979
|
}
|
|
@@ -988,7 +988,7 @@ function Fi(e) {
|
|
|
988
988
|
try {
|
|
989
989
|
for (var a = 0; a < u.length; a++) {
|
|
990
990
|
var o = u[a];
|
|
991
|
-
Ze(o.effect), Ne(o.reaction),
|
|
991
|
+
Ze(o.effect), Ne(o.reaction), Yr(o.fn);
|
|
992
992
|
}
|
|
993
993
|
} finally {
|
|
994
994
|
Ze(r), Ne(i);
|
|
@@ -1014,9 +1014,9 @@ function Ua(e, t) {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
let
|
|
1017
|
+
let Yn = !1;
|
|
1018
1018
|
function Vi() {
|
|
1019
|
-
|
|
1019
|
+
Yn || (Yn = !0, document.addEventListener(
|
|
1020
1020
|
"reset",
|
|
1021
1021
|
(e) => {
|
|
1022
1022
|
Promise.resolve().then(() => {
|
|
@@ -1053,7 +1053,7 @@ function ja(e, t, r, i = r) {
|
|
|
1053
1053
|
const ji = /* @__PURE__ */ new Set(), Vr = /* @__PURE__ */ new Set();
|
|
1054
1054
|
function qa(e, t, r, i = {}) {
|
|
1055
1055
|
function a(o) {
|
|
1056
|
-
if (i.capture ||
|
|
1056
|
+
if (i.capture || Pt.call(t, o), !o.cancelBubble)
|
|
1057
1057
|
return Ui(() => r == null ? void 0 : r.call(this, o));
|
|
1058
1058
|
}
|
|
1059
1059
|
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? zr(() => {
|
|
@@ -1062,7 +1062,7 @@ function qa(e, t, r, i = {}) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
function Be(e, t, r, i, a) {
|
|
1064
1064
|
var o = { capture: i, passive: a }, u = qa(e, t, r, o);
|
|
1065
|
-
(t === document.body || t === window || t === document) &&
|
|
1065
|
+
(t === document.body || t === window || t === document) && Wr(() => {
|
|
1066
1066
|
t.removeEventListener(e, u, o);
|
|
1067
1067
|
});
|
|
1068
1068
|
}
|
|
@@ -1072,7 +1072,7 @@ function Ba(e) {
|
|
|
1072
1072
|
for (var r of Vr)
|
|
1073
1073
|
r(e);
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Pt(e) {
|
|
1076
1076
|
var K;
|
|
1077
1077
|
var t = this, r = (
|
|
1078
1078
|
/** @type {Node} */
|
|
@@ -1095,7 +1095,7 @@ function Ot(e) {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
if (o = /** @type {Element} */
|
|
1097
1097
|
a[u] || e.target, o !== t) {
|
|
1098
|
-
|
|
1098
|
+
Vt(e, "currentTarget", {
|
|
1099
1099
|
configurable: !0,
|
|
1100
1100
|
get() {
|
|
1101
1101
|
return o || r;
|
|
@@ -1104,33 +1104,33 @@ function Ot(e) {
|
|
|
1104
1104
|
var _ = D, h = N;
|
|
1105
1105
|
Ne(null), Ze(null);
|
|
1106
1106
|
try {
|
|
1107
|
-
for (var
|
|
1107
|
+
for (var m, w = []; o !== null; ) {
|
|
1108
1108
|
var S = o.assignedSlot || o.parentNode || /** @type {any} */
|
|
1109
1109
|
o.host || null;
|
|
1110
1110
|
try {
|
|
1111
|
-
var
|
|
1112
|
-
if (
|
|
1111
|
+
var E = o["__" + i];
|
|
1112
|
+
if (E != null && (!/** @type {any} */
|
|
1113
1113
|
o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1114
1114
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1115
1115
|
e.target === o))
|
|
1116
|
-
if (oi(
|
|
1117
|
-
var [
|
|
1118
|
-
|
|
1116
|
+
if (oi(E)) {
|
|
1117
|
+
var [U, ...ce] = E;
|
|
1118
|
+
U.apply(o, [e, ...ce]);
|
|
1119
1119
|
} else
|
|
1120
|
-
|
|
1120
|
+
E.call(o, e);
|
|
1121
1121
|
} catch (te) {
|
|
1122
|
-
|
|
1122
|
+
m ? w.push(te) : m = te;
|
|
1123
1123
|
}
|
|
1124
1124
|
if (e.cancelBubble || S === t || S === null)
|
|
1125
1125
|
break;
|
|
1126
1126
|
o = S;
|
|
1127
1127
|
}
|
|
1128
|
-
if (
|
|
1128
|
+
if (m) {
|
|
1129
1129
|
for (let te of w)
|
|
1130
1130
|
queueMicrotask(() => {
|
|
1131
1131
|
throw te;
|
|
1132
1132
|
});
|
|
1133
|
-
throw
|
|
1133
|
+
throw m;
|
|
1134
1134
|
}
|
|
1135
1135
|
} finally {
|
|
1136
1136
|
e.__root = t, delete e.currentTarget, Ne(_), Ze(h);
|
|
@@ -1149,7 +1149,7 @@ function Te(e, t) {
|
|
|
1149
1149
|
r.nodes_start === null && (r.nodes_start = e, r.nodes_end = t);
|
|
1150
1150
|
}
|
|
1151
1151
|
// @__NO_SIDE_EFFECTS__
|
|
1152
|
-
function
|
|
1152
|
+
function ke(e, t) {
|
|
1153
1153
|
var r = (t & zo) !== 0, i = (t & Jo) !== 0, a, o = !e.startsWith("<!>");
|
|
1154
1154
|
return () => {
|
|
1155
1155
|
if (M)
|
|
@@ -1175,7 +1175,7 @@ function xe(e, t) {
|
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
1177
|
// @__NO_SIDE_EFFECTS__
|
|
1178
|
-
function
|
|
1178
|
+
function _r(e, t, r = "svg") {
|
|
1179
1179
|
var i = !e.startsWith("<!>"), a = `<${r}>${i ? e : "<!>" + e}</${r}>`, o;
|
|
1180
1180
|
return () => {
|
|
1181
1181
|
if (M)
|
|
@@ -1198,10 +1198,10 @@ function mr(e, t, r = "svg") {
|
|
|
1198
1198
|
return Te(c, c), c;
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Xt() {
|
|
1202
1202
|
if (M)
|
|
1203
1203
|
return Te(F, null), F;
|
|
1204
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r =
|
|
1204
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = vr();
|
|
1205
1205
|
return e.append(t, r), Te(t, r), e;
|
|
1206
1206
|
}
|
|
1207
1207
|
function j(e, t) {
|
|
@@ -1234,14 +1234,14 @@ function Ga(e, t) {
|
|
|
1234
1234
|
/* @__PURE__ */ ze(o);
|
|
1235
1235
|
if (!o)
|
|
1236
1236
|
throw yt;
|
|
1237
|
-
bt(!0),
|
|
1237
|
+
bt(!0), We(
|
|
1238
1238
|
/** @type {Comment} */
|
|
1239
1239
|
o
|
|
1240
1240
|
), Ct();
|
|
1241
1241
|
const u = Bi(e, { ...t, anchor: o });
|
|
1242
1242
|
if (F === null || F.nodeType !== 8 || /** @type {Comment} */
|
|
1243
1243
|
F.data !== ni)
|
|
1244
|
-
throw
|
|
1244
|
+
throw hr(), yt;
|
|
1245
1245
|
return bt(!1), /** @type {Exports} */
|
|
1246
1246
|
u;
|
|
1247
1247
|
} catch (u) {
|
|
@@ -1249,35 +1249,35 @@ function Ga(e, t) {
|
|
|
1249
1249
|
return t.recover === !1 && ca(), Or(), _a(r), bt(!1), qi(e, t);
|
|
1250
1250
|
throw u;
|
|
1251
1251
|
} finally {
|
|
1252
|
-
bt(i),
|
|
1252
|
+
bt(i), We(a);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
const mt = /* @__PURE__ */ new Map();
|
|
1256
1256
|
function Bi(e, { target: t, anchor: r, props: i = {}, events: a, context: o, intro: u = !0 }) {
|
|
1257
1257
|
Or();
|
|
1258
1258
|
var s = /* @__PURE__ */ new Set(), c = (h) => {
|
|
1259
|
-
for (var
|
|
1260
|
-
var w = h[
|
|
1259
|
+
for (var m = 0; m < h.length; m++) {
|
|
1260
|
+
var w = h[m];
|
|
1261
1261
|
if (!s.has(w)) {
|
|
1262
1262
|
s.add(w);
|
|
1263
1263
|
var S = Va(w);
|
|
1264
|
-
t.addEventListener(w,
|
|
1265
|
-
var
|
|
1266
|
-
|
|
1264
|
+
t.addEventListener(w, Pt, { passive: S });
|
|
1265
|
+
var E = mt.get(w);
|
|
1266
|
+
E === void 0 ? (document.addEventListener(w, Pt, { passive: S }), mt.set(w, 1)) : mt.set(w, E + 1);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
};
|
|
1270
1270
|
c(Qo(ji)), Vr.add(c);
|
|
1271
1271
|
var d = void 0, _ = xa(() => {
|
|
1272
|
-
var h = r ?? t.appendChild(
|
|
1272
|
+
var h = r ?? t.appendChild(vr());
|
|
1273
1273
|
return Fr(() => {
|
|
1274
1274
|
if (o) {
|
|
1275
1275
|
Pi({});
|
|
1276
|
-
var
|
|
1276
|
+
var m = (
|
|
1277
1277
|
/** @type {ComponentContext} */
|
|
1278
1278
|
oe
|
|
1279
1279
|
);
|
|
1280
|
-
|
|
1280
|
+
m.c = o;
|
|
1281
1281
|
}
|
|
1282
1282
|
a && (i.$$events = a), M && Te(
|
|
1283
1283
|
/** @type {TemplateNode} */
|
|
@@ -1286,13 +1286,13 @@ function Bi(e, { target: t, anchor: r, props: i = {}, events: a, context: o, int
|
|
|
1286
1286
|
), d = e(h, i) || {}, M && (N.nodes_end = F), o && Fi();
|
|
1287
1287
|
}), () => {
|
|
1288
1288
|
var S;
|
|
1289
|
-
for (var
|
|
1290
|
-
t.removeEventListener(
|
|
1289
|
+
for (var m of s) {
|
|
1290
|
+
t.removeEventListener(m, Pt);
|
|
1291
1291
|
var w = (
|
|
1292
1292
|
/** @type {number} */
|
|
1293
|
-
mt.get(
|
|
1293
|
+
mt.get(m)
|
|
1294
1294
|
);
|
|
1295
|
-
--w === 0 ? (document.removeEventListener(
|
|
1295
|
+
--w === 0 ? (document.removeEventListener(m, Pt), mt.delete(m)) : mt.set(m, w);
|
|
1296
1296
|
}
|
|
1297
1297
|
Vr.delete(c), h !== r && ((S = h.parentNode) == null || S.removeChild(h));
|
|
1298
1298
|
};
|
|
@@ -1300,28 +1300,28 @@ function Bi(e, { target: t, anchor: r, props: i = {}, events: a, context: o, int
|
|
|
1300
1300
|
return Ur.set(d, _), d;
|
|
1301
1301
|
}
|
|
1302
1302
|
let Ur = /* @__PURE__ */ new WeakMap();
|
|
1303
|
-
function
|
|
1303
|
+
function Wa(e, t) {
|
|
1304
1304
|
const r = Ur.get(e);
|
|
1305
1305
|
return r ? (Ur.delete(e), r(t)) : Promise.resolve();
|
|
1306
1306
|
}
|
|
1307
1307
|
function J(e, t, [r, i] = [0, 0]) {
|
|
1308
1308
|
M && r === 0 && Ct();
|
|
1309
1309
|
var a = e, o = null, u = null, s = ue, c = r > 0 ? Hr : 0, d = !1;
|
|
1310
|
-
const _ = (
|
|
1311
|
-
d = !0, h(w,
|
|
1312
|
-
}, h = (
|
|
1313
|
-
if (s === (s =
|
|
1310
|
+
const _ = (m, w = !0) => {
|
|
1311
|
+
d = !0, h(w, m);
|
|
1312
|
+
}, h = (m, w) => {
|
|
1313
|
+
if (s === (s = m)) return;
|
|
1314
1314
|
let S = !1;
|
|
1315
1315
|
if (M && i !== -1) {
|
|
1316
1316
|
if (r === 0) {
|
|
1317
|
-
const
|
|
1317
|
+
const U = (
|
|
1318
1318
|
/** @type {Comment} */
|
|
1319
1319
|
a.data
|
|
1320
1320
|
);
|
|
1321
|
-
|
|
1321
|
+
U === qr ? i = 0 : U === ri ? i = 1 / 0 : (i = parseInt(U.substring(1)), i !== i && (i = s ? 1 / 0 : -1));
|
|
1322
1322
|
}
|
|
1323
|
-
const
|
|
1324
|
-
!!s ===
|
|
1323
|
+
const E = i > r;
|
|
1324
|
+
!!s === E && (a = pa(), We(a), bt(!1), S = !0, i = -1);
|
|
1325
1325
|
}
|
|
1326
1326
|
s ? (o ? Bn(o) : w && (o = Fr(() => w(a))), u && Mr(u, () => {
|
|
1327
1327
|
u = null;
|
|
@@ -1356,8 +1356,8 @@ function tt(e, t, r = !1, i = !1, a = !1) {
|
|
|
1356
1356
|
d = c, c = /** @type {TemplateNode} */
|
|
1357
1357
|
/* @__PURE__ */ ze(c);
|
|
1358
1358
|
if (c === null)
|
|
1359
|
-
throw
|
|
1360
|
-
Te(F, d), o =
|
|
1359
|
+
throw hr(), yt;
|
|
1360
|
+
Te(F, d), o = We(c);
|
|
1361
1361
|
return;
|
|
1362
1362
|
}
|
|
1363
1363
|
var _ = u + "";
|
|
@@ -1380,7 +1380,7 @@ function tt(e, t, r = !1, i = !1, a = !1) {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Ya(e, t, r, i, a) {
|
|
1384
1384
|
var s;
|
|
1385
1385
|
M && Ct();
|
|
1386
1386
|
var o = (s = t.$$slots) == null ? void 0 : s[r], u = !1;
|
|
@@ -1479,10 +1479,10 @@ function el(e, t, r = t) {
|
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
1481
1481
|
function Kn(e, t) {
|
|
1482
|
-
return e === t || (e == null ? void 0 : e[
|
|
1482
|
+
return e === t || (e == null ? void 0 : e[Ft]) === t;
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1485
|
-
return
|
|
1484
|
+
function Qt(e = {}, t, r, i) {
|
|
1485
|
+
return Yr(() => {
|
|
1486
1486
|
var a, o;
|
|
1487
1487
|
return Zr(() => {
|
|
1488
1488
|
a = o, o = [], it(() => {
|
|
@@ -1507,7 +1507,7 @@ function Gi(e) {
|
|
|
1507
1507
|
function tl(e) {
|
|
1508
1508
|
oe === null && ii(), Gi(() => () => it(e));
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Wi(e, t, r) {
|
|
1511
1511
|
if (e == null)
|
|
1512
1512
|
return t(void 0), wt;
|
|
1513
1513
|
const i = it(
|
|
@@ -1552,11 +1552,11 @@ function rl(e, t = wt) {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
return { set: a, update: o, subscribe: u };
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function rr(e) {
|
|
1556
1556
|
let t;
|
|
1557
|
-
return
|
|
1557
|
+
return Wi(e, (r) => t = r)(), t;
|
|
1558
1558
|
}
|
|
1559
|
-
let
|
|
1559
|
+
let er = !1, jr = Symbol();
|
|
1560
1560
|
function nl(e, t, r) {
|
|
1561
1561
|
const i = r[t] ?? (r[t] = {
|
|
1562
1562
|
store: null,
|
|
@@ -1568,19 +1568,19 @@ function nl(e, t, r) {
|
|
|
1568
1568
|
i.source.v = void 0, i.unsubscribe = wt;
|
|
1569
1569
|
else {
|
|
1570
1570
|
var a = !0;
|
|
1571
|
-
i.unsubscribe =
|
|
1572
|
-
a ? i.source.v = o :
|
|
1571
|
+
i.unsubscribe = Wi(e, (o) => {
|
|
1572
|
+
a ? i.source.v = o : b(i.source, o);
|
|
1573
1573
|
}), a = !1;
|
|
1574
1574
|
}
|
|
1575
|
-
return e && jr in r ?
|
|
1575
|
+
return e && jr in r ? rr(e) : l(i.source);
|
|
1576
1576
|
}
|
|
1577
1577
|
function il() {
|
|
1578
1578
|
const e = {};
|
|
1579
1579
|
function t() {
|
|
1580
|
-
|
|
1580
|
+
Wr(() => {
|
|
1581
1581
|
for (var r in e)
|
|
1582
1582
|
e[r].unsubscribe();
|
|
1583
|
-
|
|
1583
|
+
Vt(e, jr, {
|
|
1584
1584
|
enumerable: !1,
|
|
1585
1585
|
value: !0
|
|
1586
1586
|
});
|
|
@@ -1589,11 +1589,11 @@ function il() {
|
|
|
1589
1589
|
return [e, t];
|
|
1590
1590
|
}
|
|
1591
1591
|
function ol(e) {
|
|
1592
|
-
var t =
|
|
1592
|
+
var t = er;
|
|
1593
1593
|
try {
|
|
1594
|
-
return
|
|
1594
|
+
return er = !1, [e(), er];
|
|
1595
1595
|
} finally {
|
|
1596
|
-
|
|
1596
|
+
er = t;
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
1599
|
function Xn(e) {
|
|
@@ -1602,45 +1602,45 @@ function Xn(e) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
function I(e, t, r, i) {
|
|
1604
1604
|
var st;
|
|
1605
|
-
var a = (r & Go) !== 0, o = !0, u = (r &
|
|
1605
|
+
var a = (r & Go) !== 0, o = !0, u = (r & Yo) !== 0, s = (r & Zo) !== 0, c = !1, d;
|
|
1606
1606
|
u ? [d, c] = ol(() => (
|
|
1607
1607
|
/** @type {V} */
|
|
1608
1608
|
e[t]
|
|
1609
1609
|
)) : d = /** @type {V} */
|
|
1610
1610
|
e[t];
|
|
1611
|
-
var _ =
|
|
1611
|
+
var _ = Ft in e || fi in e, h = u && (((st = rt(e, t)) == null ? void 0 : st.set) ?? (_ && t in e && ((q) => e[t] = q))) || void 0, m = (
|
|
1612
1612
|
/** @type {V} */
|
|
1613
1613
|
i
|
|
1614
|
-
), w = !0, S = !1,
|
|
1614
|
+
), w = !0, S = !1, E = () => (S = !0, w && (w = !1, s ? m = it(
|
|
1615
1615
|
/** @type {() => V} */
|
|
1616
1616
|
i
|
|
1617
|
-
) :
|
|
1618
|
-
i),
|
|
1619
|
-
d === void 0 && i !== void 0 && (h && o && da(), d =
|
|
1620
|
-
var
|
|
1621
|
-
if (
|
|
1617
|
+
) : m = /** @type {V} */
|
|
1618
|
+
i), m);
|
|
1619
|
+
d === void 0 && i !== void 0 && (h && o && da(), d = E(), h && h(d));
|
|
1620
|
+
var U;
|
|
1621
|
+
if (U = () => {
|
|
1622
1622
|
var q = (
|
|
1623
1623
|
/** @type {V} */
|
|
1624
1624
|
e[t]
|
|
1625
1625
|
);
|
|
1626
|
-
return q === void 0 ?
|
|
1627
|
-
}, (r &
|
|
1628
|
-
return
|
|
1626
|
+
return q === void 0 ? E() : (w = !0, S = !1, q);
|
|
1627
|
+
}, (r & Wo) === 0)
|
|
1628
|
+
return U;
|
|
1629
1629
|
if (h) {
|
|
1630
1630
|
var ce = e.$$legacy;
|
|
1631
1631
|
return function(q, ae) {
|
|
1632
|
-
return arguments.length > 0 ? ((!ae || ce || c) && h(ae ?
|
|
1632
|
+
return arguments.length > 0 ? ((!ae || ce || c) && h(ae ? U() : q), q) : U();
|
|
1633
1633
|
};
|
|
1634
1634
|
}
|
|
1635
|
-
var K = !1, te = /* @__PURE__ */ Kr(d), X = /* @__PURE__ */
|
|
1636
|
-
var q =
|
|
1635
|
+
var K = !1, te = /* @__PURE__ */ Kr(d), X = /* @__PURE__ */ gr(() => {
|
|
1636
|
+
var q = U(), ae = l(te);
|
|
1637
1637
|
return K ? (K = !1, ae) : te.v = q;
|
|
1638
1638
|
});
|
|
1639
1639
|
return u && l(X), a || (X.equals = Gr), function(q, ae) {
|
|
1640
1640
|
if (arguments.length > 0) {
|
|
1641
1641
|
const be = ae ? l(X) : u ? He(q) : q;
|
|
1642
1642
|
if (!X.equals(be)) {
|
|
1643
|
-
if (K = !0,
|
|
1643
|
+
if (K = !0, b(te, be), S && m !== void 0 && (m = be), Xn(X))
|
|
1644
1644
|
return q;
|
|
1645
1645
|
it(() => l(X));
|
|
1646
1646
|
}
|
|
@@ -1679,7 +1679,7 @@ class ll {
|
|
|
1679
1679
|
return s === fi ? !0 : (l(r.get(s) ?? i(s, Reflect.get(u, s))), Reflect.has(u, s));
|
|
1680
1680
|
},
|
|
1681
1681
|
set(u, s, c) {
|
|
1682
|
-
return
|
|
1682
|
+
return b(r.get(s) ?? i(s, c), c), Reflect.set(u, s, c);
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
1685
|
);
|
|
@@ -1690,9 +1690,9 @@ class ll {
|
|
|
1690
1690
|
context: t.context,
|
|
1691
1691
|
intro: t.intro ?? !1,
|
|
1692
1692
|
recover: t.recover
|
|
1693
|
-
})), (!((o = t == null ? void 0 : t.props) != null && o.$$host) || t.sync === !1) &&
|
|
1693
|
+
})), (!((o = t == null ? void 0 : t.props) != null && o.$$host) || t.sync === !1) && k(), Sr(this, Pe, a.$$events);
|
|
1694
1694
|
for (const u of Object.keys(se(this, me)))
|
|
1695
|
-
u === "$set" || u === "$destroy" || u === "$on" ||
|
|
1695
|
+
u === "$set" || u === "$destroy" || u === "$on" || Vt(this, u, {
|
|
1696
1696
|
get() {
|
|
1697
1697
|
return se(this, me)[u];
|
|
1698
1698
|
},
|
|
@@ -1706,7 +1706,7 @@ class ll {
|
|
|
1706
1706
|
(u) => {
|
|
1707
1707
|
Object.assign(a, u);
|
|
1708
1708
|
}, se(this, me).$destroy = () => {
|
|
1709
|
-
|
|
1709
|
+
Wa(se(this, me));
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
1712
|
/** @param {Record<string, any>} props */
|
|
@@ -1733,8 +1733,8 @@ class ll {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
Pe = new WeakMap(), me = new WeakMap();
|
|
1736
|
-
let
|
|
1737
|
-
typeof HTMLElement == "function" && (
|
|
1736
|
+
let Yi;
|
|
1737
|
+
typeof HTMLElement == "function" && (Yi = class extends HTMLElement {
|
|
1738
1738
|
/**
|
|
1739
1739
|
* @param {*} $$componentCtor
|
|
1740
1740
|
* @param {*} $$slots
|
|
@@ -1743,25 +1743,25 @@ typeof HTMLElement == "function" && (Wi = class extends HTMLElement {
|
|
|
1743
1743
|
constructor(t, r, i) {
|
|
1744
1744
|
super();
|
|
1745
1745
|
/** The Svelte component constructor */
|
|
1746
|
-
|
|
1746
|
+
Ee(this, "$$ctor");
|
|
1747
1747
|
/** Slots */
|
|
1748
|
-
|
|
1748
|
+
Ee(this, "$$s");
|
|
1749
1749
|
/** @type {any} The Svelte component instance */
|
|
1750
|
-
|
|
1750
|
+
Ee(this, "$$c");
|
|
1751
1751
|
/** Whether or not the custom element is connected */
|
|
1752
|
-
|
|
1752
|
+
Ee(this, "$$cn", !1);
|
|
1753
1753
|
/** @type {Record<string, any>} Component props data */
|
|
1754
|
-
|
|
1754
|
+
Ee(this, "$$d", {});
|
|
1755
1755
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1756
|
-
|
|
1756
|
+
Ee(this, "$$r", !1);
|
|
1757
1757
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1758
|
-
|
|
1758
|
+
Ee(this, "$$p_d", {});
|
|
1759
1759
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1760
|
-
|
|
1760
|
+
Ee(this, "$$l", {});
|
|
1761
1761
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1762
|
-
|
|
1762
|
+
Ee(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1763
1763
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1764
|
-
|
|
1764
|
+
Ee(this, "$$me");
|
|
1765
1765
|
this.$$ctor = t, this.$$s = r, i && this.attachShadow({ mode: "open" });
|
|
1766
1766
|
}
|
|
1767
1767
|
/**
|
|
@@ -1802,7 +1802,7 @@ typeof HTMLElement == "function" && (Wi = class extends HTMLElement {
|
|
|
1802
1802
|
a in i && (a === "default" && !this.$$d.children ? (this.$$d.children = t(a), r.default = !0) : r[a] = t(a));
|
|
1803
1803
|
for (const a of this.attributes) {
|
|
1804
1804
|
const o = this.$$g_p(a.name);
|
|
1805
|
-
o in this.$$d || (this.$$d[o] =
|
|
1805
|
+
o in this.$$d || (this.$$d[o] = nr(o, a.value, this.$$p_d, "toProp"));
|
|
1806
1806
|
}
|
|
1807
1807
|
for (const a in this.$$p_d)
|
|
1808
1808
|
!(a in this.$$d) && this[a] !== void 0 && (this.$$d[a] = this[a], delete this[a]);
|
|
@@ -1818,10 +1818,10 @@ typeof HTMLElement == "function" && (Wi = class extends HTMLElement {
|
|
|
1818
1818
|
Zr(() => {
|
|
1819
1819
|
var a;
|
|
1820
1820
|
this.$$r = !0;
|
|
1821
|
-
for (const o of
|
|
1821
|
+
for (const o of ir(this.$$c)) {
|
|
1822
1822
|
if (!((a = this.$$p_d[o]) != null && a.reflect)) continue;
|
|
1823
1823
|
this.$$d[o] = this.$$c[o];
|
|
1824
|
-
const u =
|
|
1824
|
+
const u = nr(
|
|
1825
1825
|
o,
|
|
1826
1826
|
this.$$d[o],
|
|
1827
1827
|
this.$$p_d,
|
|
@@ -1849,7 +1849,7 @@ typeof HTMLElement == "function" && (Wi = class extends HTMLElement {
|
|
|
1849
1849
|
*/
|
|
1850
1850
|
attributeChangedCallback(t, r, i) {
|
|
1851
1851
|
var a;
|
|
1852
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
1852
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = nr(t, i, this.$$p_d, "toProp"), (a = this.$$c) == null || a.$set({ [t]: this.$$d[t] }));
|
|
1853
1853
|
}
|
|
1854
1854
|
disconnectedCallback() {
|
|
1855
1855
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1860,12 +1860,12 @@ typeof HTMLElement == "function" && (Wi = class extends HTMLElement {
|
|
|
1860
1860
|
* @param {string} attribute_name
|
|
1861
1861
|
*/
|
|
1862
1862
|
$$g_p(t) {
|
|
1863
|
-
return
|
|
1863
|
+
return ir(this.$$p_d).find(
|
|
1864
1864
|
(r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
|
|
1865
1865
|
) || t;
|
|
1866
1866
|
}
|
|
1867
1867
|
});
|
|
1868
|
-
function
|
|
1868
|
+
function nr(e, t, r, i) {
|
|
1869
1869
|
var o;
|
|
1870
1870
|
const a = (o = r[e]) == null ? void 0 : o.type;
|
|
1871
1871
|
if (t = a === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e])
|
|
@@ -1906,24 +1906,24 @@ function sl(e) {
|
|
|
1906
1906
|
}), t;
|
|
1907
1907
|
}
|
|
1908
1908
|
function ul(e, t, r, i, a, o) {
|
|
1909
|
-
let u = class extends
|
|
1909
|
+
let u = class extends Yi {
|
|
1910
1910
|
constructor() {
|
|
1911
1911
|
super(e, r, a), this.$$p_d = t;
|
|
1912
1912
|
}
|
|
1913
1913
|
static get observedAttributes() {
|
|
1914
|
-
return
|
|
1914
|
+
return ir(t).map(
|
|
1915
1915
|
(s) => (t[s].attribute || s).toLowerCase()
|
|
1916
1916
|
);
|
|
1917
1917
|
}
|
|
1918
1918
|
};
|
|
1919
|
-
return
|
|
1920
|
-
|
|
1919
|
+
return ir(t).forEach((s) => {
|
|
1920
|
+
Vt(u.prototype, s, {
|
|
1921
1921
|
get() {
|
|
1922
1922
|
return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
|
|
1923
1923
|
},
|
|
1924
1924
|
set(c) {
|
|
1925
1925
|
var h;
|
|
1926
|
-
c =
|
|
1926
|
+
c = nr(s, c, t), this.$$d[s] = c;
|
|
1927
1927
|
var d = this.$$c;
|
|
1928
1928
|
if (d) {
|
|
1929
1929
|
var _ = (h = rt(d, s)) == null ? void 0 : h.get;
|
|
@@ -1932,7 +1932,7 @@ function ul(e, t, r, i, a, o) {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
});
|
|
1934
1934
|
}), i.forEach((s) => {
|
|
1935
|
-
|
|
1935
|
+
Vt(u.prototype, s, {
|
|
1936
1936
|
get() {
|
|
1937
1937
|
var c;
|
|
1938
1938
|
return (c = this.$$c) == null ? void 0 : c[s];
|
|
@@ -2051,14 +2051,14 @@ async function gl(e, t = "", r = 1e6, i = 0) {
|
|
|
2051
2051
|
controller: o
|
|
2052
2052
|
};
|
|
2053
2053
|
}
|
|
2054
|
-
var
|
|
2054
|
+
var C = /* @__PURE__ */ ((e) => (e.CODE = "code", e.ERROR = "error", e.VERIFIED = "verified", e.VERIFYING = "verifying", e.UNVERIFIED = "unverified", e.EXPIRED = "expired", e))(C || {}), ee = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.READY = "ready", e))(ee || {});
|
|
2055
2055
|
globalThis.altchaPlugins = globalThis.altchaPlugins || [];
|
|
2056
2056
|
globalThis.altchaI18n = globalThis.altchaI18n || {
|
|
2057
|
-
get: (e) =>
|
|
2057
|
+
get: (e) => rr(globalThis.altchaI18n.store)[e],
|
|
2058
2058
|
set: (e, t) => {
|
|
2059
|
-
Object.assign(
|
|
2059
|
+
Object.assign(rr(globalThis.altchaI18n.store), {
|
|
2060
2060
|
[e]: t
|
|
2061
|
-
}), globalThis.altchaI18n.store.set(
|
|
2061
|
+
}), globalThis.altchaI18n.store.set(rr(globalThis.altchaI18n.store));
|
|
2062
2062
|
},
|
|
2063
2063
|
store: rl({})
|
|
2064
2064
|
};
|
|
@@ -2096,41 +2096,41 @@ function _l(e, t) {
|
|
|
2096
2096
|
function bl(e, t, r, i, a, o, u, s) {
|
|
2097
2097
|
var c;
|
|
2098
2098
|
[
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
].includes(l(t)) ? r() !== !1 && ((c = l(i)) == null ? void 0 : c.reportValidity()) === !1 ?
|
|
2099
|
+
C.UNVERIFIED,
|
|
2100
|
+
C.ERROR,
|
|
2101
|
+
C.EXPIRED,
|
|
2102
|
+
C.CODE
|
|
2103
|
+
].includes(l(t)) ? r() !== !1 && ((c = l(i)) == null ? void 0 : c.reportValidity()) === !1 ? b(a, !1) : o() ? u() : s() : b(a, !0);
|
|
2104
2104
|
}
|
|
2105
|
-
var yl = /* @__PURE__ */
|
|
2105
|
+
var yl = /* @__PURE__ */ _r('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'), wl = /* @__PURE__ */ ke('<input type="hidden">'), El = /* @__PURE__ */ ke('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'), Cl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'), xl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'), kl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'), Al = /* @__PURE__ */ ke('<button type="button" class="altcha-code-challenge-audio"><!></button>'), Il = /* @__PURE__ */ ke("<audio hidden autoplay><source></audio>"), Rl = /* @__PURE__ */ ke('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'), $l = /* @__PURE__ */ ke("<div><!></div>"), Sl = /* @__PURE__ */ ke("<div><!></div>"), Tl = /* @__PURE__ */ ke('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'), Dl = /* @__PURE__ */ ke('<div class="altcha-footer"><div><!></div></div>'), Nl = /* @__PURE__ */ ke('<div class="altcha-anchor-arrow"></div>'), Ll = /* @__PURE__ */ ke('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>', 1);
|
|
2106
2106
|
function Ol(e, t) {
|
|
2107
2107
|
var On, Pn;
|
|
2108
2108
|
Pi(t, !0);
|
|
2109
2109
|
const [r, i] = il(), a = () => nl(Qi, "$altchaI18nStore", r);
|
|
2110
|
-
let o = I(t, "auto", 7, void 0), u = I(t, "blockspam", 7, void 0), s = I(t, "challengeurl", 7, void 0), c = I(t, "challengejson", 7, void 0), d = I(t, "credentials", 7, void 0), _ = I(t, "customfetch", 7, void 0), h = I(t, "debug", 7, !1),
|
|
2110
|
+
let o = I(t, "auto", 7, void 0), u = I(t, "blockspam", 7, void 0), s = I(t, "challengeurl", 7, void 0), c = I(t, "challengejson", 7, void 0), d = I(t, "credentials", 7, void 0), _ = I(t, "customfetch", 7, void 0), h = I(t, "debug", 7, !1), m = I(t, "delay", 7, 0), w = I(t, "disableautofocus", 7, !1), S = I(t, "expire", 7, void 0), E = I(t, "floating", 7, void 0), U = I(t, "floatinganchor", 7, void 0), ce = I(t, "floatingoffset", 7, void 0), K = I(t, "floatingpersist", 7, !1), te = I(t, "hidefooter", 7, !1), X = I(t, "hidelogo", 7, !1), st = I(t, "id", 7, void 0), q = I(t, "language", 7, void 0), ae = I(t, "name", 7, "altcha"), be = I(t, "maxnumber", 7, 1e6), xt = I(t, "mockerror", 7, !1), Me = I(t, "obfuscated", 7, void 0), ye = I(t, "overlay", 7, void 0), kt = I(t, "overlaycontent", 7, void 0), Gt = I(t, "plugins", 7, void 0), At = I(t, "refetchonexpire", 7, !0), Je = I(t, "sentinel", 7, void 0), Ae = I(t, "spamfilter", 7, !1), ut = I(t, "strings", 7, void 0), ge = I(t, "test", 7, !1), re = I(t, "verifyurl", 7, void 0), ft = I(t, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), It = I(t, "workerurl", 7, void 0);
|
|
2111
2111
|
const { altchaI18n: Xi } = globalThis, Qi = Xi.store, Qr = ["SHA-256", "SHA-384", "SHA-512"], eo = "https://altcha.org/", Ve = (n, f) => {
|
|
2112
2112
|
t.$$host.dispatchEvent(new CustomEvent(n, { detail: f }));
|
|
2113
|
-
}, en = (Pn = (On = document.documentElement.lang) == null ? void 0 : On.split("-")) == null ? void 0 : Pn[0],
|
|
2113
|
+
}, en = (Pn = (On = document.documentElement.lang) == null ? void 0 : On.split("-")) == null ? void 0 : Pn[0], br = /* @__PURE__ */ Ot(() => {
|
|
2114
2114
|
var n;
|
|
2115
2115
|
return s() && new URL(s(), location.origin).host.endsWith(".altcha.org") && !!((n = s()) != null && n.includes("apiKey=ckey_"));
|
|
2116
|
-
}),
|
|
2116
|
+
}), yr = /* @__PURE__ */ Ot(() => c() ? pn(c()) : void 0), to = /* @__PURE__ */ Ot(() => ut() ? pn(ut()) : {}), O = /* @__PURE__ */ Ot(() => ({
|
|
2117
2117
|
...on(a()),
|
|
2118
2118
|
...l(to)
|
|
2119
|
-
})), tn = /* @__PURE__ */
|
|
2120
|
-
let Rt = /* @__PURE__ */ P(!1), H = /* @__PURE__ */ P(null), R = /* @__PURE__ */ P(He(
|
|
2119
|
+
})), tn = /* @__PURE__ */ Ot(() => `${st() || ae()}_checkbox_${Math.round(Math.random() * 1e8)}`);
|
|
2120
|
+
let Rt = /* @__PURE__ */ P(!1), H = /* @__PURE__ */ P(null), R = /* @__PURE__ */ P(He(C.UNVERIFIED)), V = /* @__PURE__ */ P(void 0), $t = /* @__PURE__ */ P(null), Ue = /* @__PURE__ */ P(null), de = /* @__PURE__ */ P(null), wr = /* @__PURE__ */ P(null), ct = /* @__PURE__ */ P(null), L = /* @__PURE__ */ P(null), dt = /* @__PURE__ */ P(null), Ke = /* @__PURE__ */ P(null), Ie = null, G = /* @__PURE__ */ P(null), Xe = /* @__PURE__ */ P(!1), je = [], Er = /* @__PURE__ */ P(!1), Le = /* @__PURE__ */ P(null);
|
|
2121
2121
|
Pr(() => {
|
|
2122
2122
|
go(l(Ke));
|
|
2123
2123
|
}), Pr(() => {
|
|
2124
2124
|
po(l(R));
|
|
2125
2125
|
}), tl(() => {
|
|
2126
|
-
ro(),
|
|
2126
|
+
ro(), b(dt, null), l(L) && (l(L).removeEventListener("submit", cn), l(L).removeEventListener("reset", dn), l(L).removeEventListener("focusin", fn), b(L, null)), Ie && (clearTimeout(Ie), Ie = null), document.removeEventListener("click", sn), document.removeEventListener("scroll", un), window.removeEventListener("resize", gn);
|
|
2127
2127
|
}), Gi(() => {
|
|
2128
2128
|
var n;
|
|
2129
|
-
$("mounted", "2.1.0
|
|
2129
|
+
$("mounted", "2.1.0"), $("workers", ft()), ao(), $("plugins", je.length ? je.map((f) => f.constructor.pluginName).join(", ") : "none"), ge() && $("using test mode"), S() && xr(S()), o() !== void 0 && $("auto", o()), E() !== void 0 && _n(E()), b(L, (n = l(V)) == null ? void 0 : n.closest("form"), !0), l(L) && (l(L).addEventListener("submit", cn, { capture: !0 }), l(L).addEventListener("reset", dn), (o() === "onfocus" || K() === "focus") && l(L).addEventListener("focusin", fn)), ye() && bn(!0), o() === "onload" && (Me() ? St() : Oe()), l(br) && (te() || X()) && $("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
|
|
2130
2130
|
Ve("load");
|
|
2131
2131
|
});
|
|
2132
2132
|
});
|
|
2133
|
-
function
|
|
2133
|
+
function Wt(n, f) {
|
|
2134
2134
|
return btoa(JSON.stringify({
|
|
2135
2135
|
algorithm: n.algorithm,
|
|
2136
2136
|
challenge: n.challenge,
|
|
@@ -2146,20 +2146,20 @@ function Ol(e, t) {
|
|
|
2146
2146
|
n.destroy();
|
|
2147
2147
|
}
|
|
2148
2148
|
function rn() {
|
|
2149
|
-
s() && At() && l(R) ===
|
|
2149
|
+
s() && At() && l(R) === C.VERIFIED ? Oe() : Qe(C.EXPIRED, l(O).expired);
|
|
2150
2150
|
}
|
|
2151
2151
|
async function no() {
|
|
2152
2152
|
var n;
|
|
2153
2153
|
if (xt())
|
|
2154
2154
|
throw $("mocking error"), new Error("Mocked error.");
|
|
2155
|
-
if (l(
|
|
2156
|
-
return $("using provided json data"), l(
|
|
2155
|
+
if (l(yr))
|
|
2156
|
+
return $("using provided json data"), l(yr);
|
|
2157
2157
|
if (ge())
|
|
2158
2158
|
return $("generating test challenge", { test: ge() }), cl(typeof ge() != "boolean" ? +ge() : void 0);
|
|
2159
2159
|
{
|
|
2160
2160
|
if (!s() && l(L)) {
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2161
|
+
const A = l(L).getAttribute("action");
|
|
2162
|
+
A != null && A.includes("/form/") && s(A + "/altcha");
|
|
2163
2163
|
}
|
|
2164
2164
|
if (!s())
|
|
2165
2165
|
throw new Error("Attribute challengeurl not set.");
|
|
@@ -2172,25 +2172,25 @@ function Ol(e, t) {
|
|
|
2172
2172
|
throw new Error("Custom fetch function did not return a response.");
|
|
2173
2173
|
if (v.status !== 200)
|
|
2174
2174
|
throw new Error(`Server responded with ${v.status}.`);
|
|
2175
|
-
const
|
|
2176
|
-
if (
|
|
2177
|
-
const
|
|
2178
|
-
B > 0 &&
|
|
2175
|
+
const p = v.headers.get("X-Altcha-Config"), g = await v.json(), x = new URLSearchParams((n = g.salt.split("?")) == null ? void 0 : n[1]), y = x.get("expires") || x.get("expire");
|
|
2176
|
+
if (y) {
|
|
2177
|
+
const A = new Date(+y * 1e3), B = isNaN(A.getTime()) ? 0 : A.getTime() - Date.now();
|
|
2178
|
+
B > 0 && xr(B);
|
|
2179
2179
|
}
|
|
2180
|
-
if (
|
|
2180
|
+
if (p)
|
|
2181
2181
|
try {
|
|
2182
|
-
const
|
|
2183
|
-
|
|
2184
|
-
} catch (
|
|
2185
|
-
$("unable to configure from X-Altcha-Config",
|
|
2182
|
+
const A = JSON.parse(p);
|
|
2183
|
+
A && typeof A == "object" && (A.verifyurl && !A.verifyurl.startsWith("fn:") && (A.verifyurl = ln(A.verifyurl)), En(A));
|
|
2184
|
+
} catch (A) {
|
|
2185
|
+
$("unable to configure from X-Altcha-Config", A);
|
|
2186
2186
|
}
|
|
2187
2187
|
return g;
|
|
2188
2188
|
}
|
|
2189
2189
|
}
|
|
2190
2190
|
function io(n) {
|
|
2191
|
-
var v,
|
|
2191
|
+
var v, p;
|
|
2192
2192
|
const f = (v = l(L)) == null ? void 0 : v.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
2193
|
-
return ((
|
|
2193
|
+
return ((p = f == null ? void 0 : f.value) == null ? void 0 : p.slice(f.value.indexOf("@"))) || void 0;
|
|
2194
2194
|
}
|
|
2195
2195
|
function nn() {
|
|
2196
2196
|
let n = fetch;
|
|
@@ -2207,11 +2207,11 @@ function Ol(e, t) {
|
|
|
2207
2207
|
document.documentElement.lang || "",
|
|
2208
2208
|
...navigator.languages
|
|
2209
2209
|
]) {
|
|
2210
|
-
const v = Object.keys(n).map((g) => g.toLowerCase()),
|
|
2211
|
-
(g,
|
|
2210
|
+
const v = Object.keys(n).map((g) => g.toLowerCase()), p = f.reduce(
|
|
2211
|
+
(g, x) => (x = x.toLowerCase(), g || (n[x] ? x : null) || v.find((y) => x.split("-")[0] === y.split("-")[0]) || null),
|
|
2212
2212
|
null
|
|
2213
2213
|
);
|
|
2214
|
-
return n[
|
|
2214
|
+
return n[p || "en"];
|
|
2215
2215
|
}
|
|
2216
2216
|
function oo() {
|
|
2217
2217
|
return Ae() === "ipAddress" ? {
|
|
@@ -2241,28 +2241,28 @@ function Ol(e, t) {
|
|
|
2241
2241
|
function an(n) {
|
|
2242
2242
|
var v;
|
|
2243
2243
|
return [
|
|
2244
|
-
...((v = l(L)) == null ? void 0 : v.querySelectorAll(n != null && n.length ? n.map((
|
|
2244
|
+
...((v = l(L)) == null ? void 0 : v.querySelectorAll(n != null && n.length ? n.map((p) => `input[name="${p}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
2245
2245
|
].reduce(
|
|
2246
|
-
(
|
|
2247
|
-
const
|
|
2248
|
-
return
|
|
2249
|
-
`) :
|
|
2246
|
+
(p, g) => {
|
|
2247
|
+
const x = g.name, y = g.value;
|
|
2248
|
+
return x && y && (p[x] = /\n/.test(y) ? y.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
2249
|
+
`) : y), p;
|
|
2250
2250
|
},
|
|
2251
2251
|
{}
|
|
2252
2252
|
);
|
|
2253
2253
|
}
|
|
2254
2254
|
function ln(n, f) {
|
|
2255
|
-
const v = new URL(s() || location.origin),
|
|
2256
|
-
if (
|
|
2255
|
+
const v = new URL(s() || location.origin), p = new URL(n, v);
|
|
2256
|
+
if (p.search || (p.search = v.search), f)
|
|
2257
2257
|
for (const g in f)
|
|
2258
|
-
f[g] !== void 0 && f[g] !== null &&
|
|
2259
|
-
return
|
|
2258
|
+
f[g] !== void 0 && f[g] !== null && p.searchParams.set(g, f[g]);
|
|
2259
|
+
return p.toString();
|
|
2260
2260
|
}
|
|
2261
2261
|
function ao() {
|
|
2262
|
-
const n =
|
|
2262
|
+
const n = Gt() !== void 0 ? Gt().split(",") : void 0;
|
|
2263
2263
|
for (const f of globalThis.altchaPlugins)
|
|
2264
2264
|
(!n || n.includes(f.pluginName)) && je.push(new f({
|
|
2265
|
-
el: l(
|
|
2265
|
+
el: l(V),
|
|
2266
2266
|
clarify: St,
|
|
2267
2267
|
dispatch: Ve,
|
|
2268
2268
|
getConfiguration: Cn,
|
|
@@ -2280,79 +2280,79 @@ function Ol(e, t) {
|
|
|
2280
2280
|
(h() || n.some((f) => f instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${ae()}]`, ...n);
|
|
2281
2281
|
}
|
|
2282
2282
|
function lo() {
|
|
2283
|
-
|
|
2283
|
+
b(G, ee.PAUSED, !0);
|
|
2284
2284
|
}
|
|
2285
2285
|
function so(n) {
|
|
2286
|
-
|
|
2286
|
+
b(G, ee.ERROR, !0);
|
|
2287
2287
|
}
|
|
2288
2288
|
function uo() {
|
|
2289
|
-
|
|
2289
|
+
b(G, ee.READY, !0);
|
|
2290
2290
|
}
|
|
2291
2291
|
function fo() {
|
|
2292
|
-
|
|
2292
|
+
b(G, ee.LOADING, !0);
|
|
2293
2293
|
}
|
|
2294
2294
|
function co() {
|
|
2295
|
-
|
|
2295
|
+
b(G, ee.PLAYING, !0);
|
|
2296
2296
|
}
|
|
2297
2297
|
function ho() {
|
|
2298
|
-
|
|
2298
|
+
b(G, ee.PAUSED, !0);
|
|
2299
2299
|
}
|
|
2300
2300
|
function vo(n) {
|
|
2301
2301
|
var f;
|
|
2302
2302
|
if (n.preventDefault(), n.stopPropagation(), l(H)) {
|
|
2303
|
-
const v = new FormData(n.target),
|
|
2303
|
+
const v = new FormData(n.target), p = String(v.get("code"));
|
|
2304
2304
|
if ((f = re()) != null && f.startsWith("fn:")) {
|
|
2305
2305
|
const g = re().replace(/^fn:/, "");
|
|
2306
2306
|
if ($(`calling ${g} function instead of verifyurl`), !(g in globalThis))
|
|
2307
2307
|
throw new Error(`Global function "${g}" is undefined.`);
|
|
2308
2308
|
return globalThis[g]({
|
|
2309
2309
|
challenge: l(H).challenge,
|
|
2310
|
-
code:
|
|
2310
|
+
code: p,
|
|
2311
2311
|
solution: l(H).solution
|
|
2312
2312
|
});
|
|
2313
2313
|
}
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
var
|
|
2317
|
-
(
|
|
2318
|
-
})) : (Qe(),
|
|
2314
|
+
b(Xe, !0), mn(Wt(l(H).challenge, l(H).solution), p).then(({ reason: g, verified: x }) => {
|
|
2315
|
+
x ? (b(H, null), Re(C.VERIFIED), $("verified"), Dr().then(() => {
|
|
2316
|
+
var y;
|
|
2317
|
+
(y = l(wr)) == null || y.focus(), Ve("verified", { payload: l(Le) }), o() === "onsubmit" ? Cr(l(dt)) : ye() && Tt();
|
|
2318
|
+
})) : (Qe(), b(Ke, g || "Verification failed", !0));
|
|
2319
2319
|
}).catch((g) => {
|
|
2320
|
-
|
|
2320
|
+
b(H, null), Re(C.ERROR, g), $("sentinel verification failed:", g);
|
|
2321
2321
|
}).finally(() => {
|
|
2322
|
-
|
|
2322
|
+
b(Xe, !1);
|
|
2323
2323
|
});
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
2326
|
function sn(n) {
|
|
2327
2327
|
var v;
|
|
2328
2328
|
const f = n.target;
|
|
2329
|
-
|
|
2329
|
+
E() && f && !l(V).contains(f) && (l(R) === C.VERIFIED && K() === !1 || l(R) === C.VERIFIED && K() === "focus" && !((v = l(L)) != null && v.matches(":focus-within")) || o() === "off" && l(R) === C.UNVERIFIED) && Tt();
|
|
2330
2330
|
}
|
|
2331
2331
|
function un() {
|
|
2332
|
-
|
|
2332
|
+
E() && l(R) !== C.UNVERIFIED && Dt();
|
|
2333
2333
|
}
|
|
2334
2334
|
function go(n) {
|
|
2335
2335
|
for (const f of je)
|
|
2336
2336
|
typeof f.onErrorChange == "function" && f.onErrorChange(l(Ke));
|
|
2337
2337
|
}
|
|
2338
2338
|
function fn(n) {
|
|
2339
|
-
l(R) ===
|
|
2339
|
+
l(R) === C.UNVERIFIED ? Oe() : E() && K() === "focus" && l(R) === C.VERIFIED && Yt();
|
|
2340
2340
|
}
|
|
2341
2341
|
function cn(n) {
|
|
2342
|
-
var
|
|
2342
|
+
var p;
|
|
2343
2343
|
const f = n.target;
|
|
2344
|
-
f != null && f.hasAttribute("data-code-challenge-form") || (
|
|
2345
|
-
|
|
2346
|
-
})) : l(R) !==
|
|
2344
|
+
f != null && f.hasAttribute("data-code-challenge-form") || (b(dt, n.submitter, !0), l(L) && o() === "onsubmit" ? ((p = l(dt)) == null || p.blur(), l(R) === C.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), Oe().then(() => {
|
|
2345
|
+
Cr(l(dt));
|
|
2346
|
+
})) : l(R) !== C.VERIFIED && (n.preventDefault(), n.stopPropagation(), l(R) === C.VERIFYING && hn())) : l(L) && E() && o() === "off" && l(R) === C.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), Yt()));
|
|
2347
2347
|
}
|
|
2348
2348
|
function dn() {
|
|
2349
2349
|
Qe();
|
|
2350
2350
|
}
|
|
2351
2351
|
function hn() {
|
|
2352
|
-
l(R) ===
|
|
2352
|
+
l(R) === C.VERIFYING && l(O).waitAlert && alert(l(O).waitAlert);
|
|
2353
2353
|
}
|
|
2354
2354
|
function vn() {
|
|
2355
|
-
l(Ue) ? l(Ue).paused ? (l(Ue).currentTime = 0, l(Ue).play()) : l(Ue).pause() : (
|
|
2355
|
+
l(Ue) ? l(Ue).paused ? (l(Ue).currentTime = 0, l(Ue).play()) : l(Ue).pause() : (b(Er, !0), requestAnimationFrame(() => {
|
|
2356
2356
|
var n;
|
|
2357
2357
|
(n = l(Ue)) == null || n.play();
|
|
2358
2358
|
}));
|
|
@@ -2360,12 +2360,12 @@ function Ol(e, t) {
|
|
|
2360
2360
|
function po(n) {
|
|
2361
2361
|
for (const f of je)
|
|
2362
2362
|
typeof f.onStateChange == "function" && f.onStateChange(l(R));
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
}),
|
|
2363
|
+
E() && l(R) !== C.UNVERIFIED && requestAnimationFrame(() => {
|
|
2364
|
+
Dt();
|
|
2365
|
+
}), b(Rt, l(R) === C.VERIFIED), ye() && l(de) && (l(R) !== C.UNVERIFIED ? Yt() : Tt());
|
|
2366
2366
|
}
|
|
2367
2367
|
function gn() {
|
|
2368
|
-
|
|
2368
|
+
E() && Dt();
|
|
2369
2369
|
}
|
|
2370
2370
|
function pn(n) {
|
|
2371
2371
|
return JSON.parse(n);
|
|
@@ -2378,17 +2378,17 @@ function Ol(e, t) {
|
|
|
2378
2378
|
if (Ae() !== !1) {
|
|
2379
2379
|
const {
|
|
2380
2380
|
blockedCountries: g,
|
|
2381
|
-
classifier:
|
|
2382
|
-
disableRules:
|
|
2383
|
-
email:
|
|
2381
|
+
classifier: x,
|
|
2382
|
+
disableRules: y,
|
|
2383
|
+
email: A,
|
|
2384
2384
|
expectedLanguages: B,
|
|
2385
2385
|
expectedCountries: Q,
|
|
2386
2386
|
fields: le,
|
|
2387
2387
|
ipAddress: qe,
|
|
2388
2388
|
text: Ar,
|
|
2389
|
-
timeZone:
|
|
2389
|
+
timeZone: Jt
|
|
2390
2390
|
} = oo();
|
|
2391
|
-
f.blockedCountries = g, f.classifier =
|
|
2391
|
+
f.blockedCountries = g, f.classifier = x, f.disableRules = y, f.email = A === !1 ? void 0 : io(A), f.expectedCountries = Q, f.expectedLanguages = B || (en ? [en] : void 0), f.fields = le === !1 ? void 0 : an(le), f.ipAddress = qe === !1 ? void 0 : qe || "auto", f.text = Ar, f.timeZone = Jt === !1 ? void 0 : Jt || Qn();
|
|
2392
2392
|
}
|
|
2393
2393
|
const v = await nn()(re(), {
|
|
2394
2394
|
body: JSON.stringify(f),
|
|
@@ -2399,8 +2399,8 @@ function Ol(e, t) {
|
|
|
2399
2399
|
throw new Error("Custom fetch function did not return a response.");
|
|
2400
2400
|
if (v.status !== 200)
|
|
2401
2401
|
throw new Error(`Server responded with ${v.status}.`);
|
|
2402
|
-
const
|
|
2403
|
-
if (
|
|
2402
|
+
const p = await v.json();
|
|
2403
|
+
if (p != null && p.payload && b(Le, p.payload, !0), Ve("serververification", p), u() && p.classification === "BAD")
|
|
2404
2404
|
throw new Error("SpamFilter returned negative classification.");
|
|
2405
2405
|
}
|
|
2406
2406
|
async function mn(n, f) {
|
|
@@ -2409,37 +2409,39 @@ function Ol(e, t) {
|
|
|
2409
2409
|
$("requesting sentinel verification from", re());
|
|
2410
2410
|
const v = { code: f, payload: n };
|
|
2411
2411
|
Je() && (v.fields = Je().fields ? an() : void 0, v.timeZone = Je().timeZone ? Qn() : void 0);
|
|
2412
|
-
const
|
|
2412
|
+
const p = await fetch(re(), {
|
|
2413
2413
|
body: JSON.stringify(v),
|
|
2414
2414
|
headers: { "content-type": "application/json" },
|
|
2415
2415
|
method: "POST"
|
|
2416
2416
|
});
|
|
2417
|
-
if (!
|
|
2417
|
+
if (!p || !(p instanceof Response))
|
|
2418
2418
|
throw new Error("Fetch function did not return a response.");
|
|
2419
|
-
if (
|
|
2420
|
-
throw new Error(`Server responded with ${
|
|
2421
|
-
const g = await
|
|
2422
|
-
return g != null && g.payload &&
|
|
2419
|
+
if (p.status !== 200)
|
|
2420
|
+
throw new Error(`Server responded with ${p.status}.`);
|
|
2421
|
+
const g = await p.json();
|
|
2422
|
+
return g != null && g.payload && b(Le, g.payload, !0), Ve("sentinelverification", g), g;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function Cr(n) {
|
|
2425
2425
|
var f;
|
|
2426
2426
|
l(L) && "requestSubmit" in l(L) ? l(L).requestSubmit(n) : (f = l(L)) != null && f.reportValidity() && (n ? n.click() : l(L).submit());
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function xr(n) {
|
|
2429
2429
|
$("expire", n), Ie && (clearTimeout(Ie), Ie = null), n < 1 ? rn() : Ie = setTimeout(rn, n);
|
|
2430
2430
|
}
|
|
2431
2431
|
function _n(n) {
|
|
2432
|
-
$("floating", n),
|
|
2432
|
+
$("floating", n), E() !== n && (l(V).style.left = "", l(V).style.top = ""), E(n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : E()), E() ? (o() || o("onsubmit"), document.addEventListener("scroll", un), document.addEventListener("click", sn), window.addEventListener("resize", gn)) : o() === "onsubmit" && o(void 0);
|
|
2433
2433
|
}
|
|
2434
2434
|
function bn(n) {
|
|
2435
|
-
var f, v
|
|
2436
|
-
if (
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2435
|
+
var f, v;
|
|
2436
|
+
if ($("overlay", n), ye(n), n) {
|
|
2437
|
+
if (o() || o("onsubmit"), l(de) && l(V).parentElement && l(de).replaceWith(l(V).parentElement), (v = (f = l(V)) == null ? void 0 : f.parentElement) != null && v.parentElement) {
|
|
2438
|
+
b(de, document.createElement("div"), !0), l(V).parentElement.parentElement.appendChild(l(de));
|
|
2439
|
+
const p = document.createElement("div"), g = document.createElement("button");
|
|
2440
|
+
g.type = "button", g.innerHTML = "×", g.addEventListener("click", (x) => {
|
|
2441
|
+
x.preventDefault(), Qe();
|
|
2442
|
+
}), l(de).classList.add("altcha-overlay-backdrop"), g.classList.add("altcha-overlay-close-button"), p.classList.add("altcha-overlay"), l(de).append(p), p.append(g), kt() && p.append(...document.querySelectorAll(kt())), p.append(l(V).parentElement);
|
|
2443
|
+
}
|
|
2444
|
+
} else l(de) && l(V).parentElement && (l(de).replaceWith(l(V).parentElement), l(V).style.display = "block");
|
|
2443
2445
|
}
|
|
2444
2446
|
function yn(n) {
|
|
2445
2447
|
if (!n.algorithm)
|
|
@@ -2474,19 +2476,19 @@ function Ol(e, t) {
|
|
|
2474
2476
|
};
|
|
2475
2477
|
}
|
|
2476
2478
|
async function _o(n, f = typeof ge() == "number" ? ge() : n.maxNumber || n.maxnumber || be(), v = Math.ceil(ft())) {
|
|
2477
|
-
const
|
|
2479
|
+
const p = [];
|
|
2478
2480
|
v = Math.min(16, f, Math.max(1, v));
|
|
2479
|
-
for (let
|
|
2480
|
-
|
|
2481
|
-
const g = Math.ceil(f / v),
|
|
2482
|
-
const B =
|
|
2481
|
+
for (let y = 0; y < v; y++)
|
|
2482
|
+
p.push(altchaCreateWorker(It()));
|
|
2483
|
+
const g = Math.ceil(f / v), x = await Promise.all(p.map((y, A) => {
|
|
2484
|
+
const B = A * g;
|
|
2483
2485
|
return new Promise((Q) => {
|
|
2484
|
-
|
|
2486
|
+
y.addEventListener("message", (le) => {
|
|
2485
2487
|
if (le.data)
|
|
2486
|
-
for (const qe of
|
|
2487
|
-
qe !==
|
|
2488
|
+
for (const qe of p)
|
|
2489
|
+
qe !== y && qe.postMessage({ type: "abort" });
|
|
2488
2490
|
Q(le.data);
|
|
2489
|
-
}),
|
|
2491
|
+
}), y.postMessage({
|
|
2490
2492
|
payload: n,
|
|
2491
2493
|
max: B + g,
|
|
2492
2494
|
start: B,
|
|
@@ -2494,25 +2496,25 @@ function Ol(e, t) {
|
|
|
2494
2496
|
});
|
|
2495
2497
|
});
|
|
2496
2498
|
}));
|
|
2497
|
-
for (const
|
|
2498
|
-
|
|
2499
|
-
return
|
|
2499
|
+
for (const y of p)
|
|
2500
|
+
y.terminate();
|
|
2501
|
+
return x.find((y) => !!y) || null;
|
|
2500
2502
|
}
|
|
2501
2503
|
async function St() {
|
|
2502
2504
|
if (!Me()) {
|
|
2503
|
-
Re(
|
|
2505
|
+
Re(C.ERROR);
|
|
2504
2506
|
return;
|
|
2505
2507
|
}
|
|
2506
2508
|
const n = je.find((f) => f.constructor.pluginName === "obfuscation");
|
|
2507
2509
|
if (!n || !("clarify" in n)) {
|
|
2508
|
-
Re(
|
|
2510
|
+
Re(C.ERROR), $("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
|
|
2509
2511
|
return;
|
|
2510
2512
|
}
|
|
2511
2513
|
if ("clarify" in n && typeof n.clarify == "function")
|
|
2512
2514
|
return n.clarify();
|
|
2513
2515
|
}
|
|
2514
2516
|
function En(n) {
|
|
2515
|
-
n.obfuscated !== void 0 && Me(n.obfuscated), n.auto !== void 0 && (o(n.auto), o() === "onload" && (Me() ? St() : Oe())), n.blockspam !== void 0 && u(!!n.blockspam), n.customfetch !== void 0 && _(n.customfetch), n.floatinganchor !== void 0 &&
|
|
2517
|
+
n.obfuscated !== void 0 && Me(n.obfuscated), n.auto !== void 0 && (o(n.auto), o() === "onload" && (Me() ? St() : Oe())), n.blockspam !== void 0 && u(!!n.blockspam), n.customfetch !== void 0 && _(n.customfetch), n.floatinganchor !== void 0 && U(n.floatinganchor), n.delay !== void 0 && m(n.delay), n.floatingoffset !== void 0 && ce(n.floatingoffset), n.floating !== void 0 && _n(n.floating), n.expire !== void 0 && (xr(n.expire), S(n.expire)), n.challenge && (c(typeof n.challenge == "string" ? n.challenge : JSON.stringify(n.challenge)), yn(l(yr))), n.challengeurl !== void 0 && s(n.challengeurl), n.debug !== void 0 && h(!!n.debug), n.hidefooter !== void 0 && te(!!n.hidefooter), n.hidelogo !== void 0 && X(!!n.hidelogo), n.language !== void 0 && ut(on(a(), [n.language])), n.maxnumber !== void 0 && be(+n.maxnumber), n.mockerror !== void 0 && xt(!!n.mockerror), n.name !== void 0 && ae(n.name), n.overlaycontent !== void 0 && kt(n.overlaycontent), n.overlay !== void 0 && bn(n.overlay), n.refetchonexpire !== void 0 && At(!!n.refetchonexpire), n.sentinel !== void 0 && typeof n.sentinel == "object" && Je(n.sentinel), n.spamfilter !== void 0 && Ae(typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && ut(typeof n.strings == "string" ? n.strings : JSON.stringify(n.strings)), n.test !== void 0 && ge(typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && re(n.verifyurl), n.workers !== void 0 && ft(+n.workers), n.workerurl !== void 0 && It(n.workerurl);
|
|
2516
2518
|
}
|
|
2517
2519
|
function Cn() {
|
|
2518
2520
|
return {
|
|
@@ -2520,10 +2522,10 @@ function Ol(e, t) {
|
|
|
2520
2522
|
blockspam: u(),
|
|
2521
2523
|
challengeurl: s(),
|
|
2522
2524
|
debug: h(),
|
|
2523
|
-
delay:
|
|
2525
|
+
delay: m(),
|
|
2524
2526
|
expire: S(),
|
|
2525
|
-
floating:
|
|
2526
|
-
floatinganchor:
|
|
2527
|
+
floating: E(),
|
|
2528
|
+
floatinganchor: U(),
|
|
2527
2529
|
floatingoffset: ce(),
|
|
2528
2530
|
hidefooter: te(),
|
|
2529
2531
|
hidelogo: X(),
|
|
@@ -2531,7 +2533,7 @@ function Ol(e, t) {
|
|
|
2531
2533
|
maxnumber: be(),
|
|
2532
2534
|
mockerror: xt(),
|
|
2533
2535
|
obfuscated: Me(),
|
|
2534
|
-
overlay:
|
|
2536
|
+
overlay: ye(),
|
|
2535
2537
|
refetchonexpire: At(),
|
|
2536
2538
|
spamfilter: Ae(),
|
|
2537
2539
|
strings: l(O),
|
|
@@ -2550,73 +2552,73 @@ function Ol(e, t) {
|
|
|
2550
2552
|
function kn() {
|
|
2551
2553
|
return l(R);
|
|
2552
2554
|
}
|
|
2553
|
-
function
|
|
2554
|
-
l(
|
|
2555
|
+
function Tt() {
|
|
2556
|
+
l(V).style.display = "none", ye() && l(de) && (l(de).style.display = "none");
|
|
2555
2557
|
}
|
|
2556
|
-
function
|
|
2558
|
+
function Dt(n = 20) {
|
|
2557
2559
|
var f;
|
|
2558
|
-
if (l(
|
|
2559
|
-
if (l(ct) ||
|
|
2560
|
-
const v = parseInt(ce(), 10) || 12,
|
|
2561
|
-
if (
|
|
2560
|
+
if (l(V))
|
|
2561
|
+
if (l(ct) || b(ct, (U() ? document.querySelector(U()) : (f = l(L)) == null ? void 0 : f.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || l(L), !0), l(ct)) {
|
|
2562
|
+
const v = parseInt(ce(), 10) || 12, p = l(ct).getBoundingClientRect(), g = l(V).getBoundingClientRect(), x = document.documentElement.clientHeight, y = document.documentElement.clientWidth, A = E() === "auto" ? p.bottom + g.height + v + n > x : E() === "top", B = Math.max(n, Math.min(y - n - g.width, p.left + p.width / 2 - g.width / 2));
|
|
2563
|
+
if (A ? l(V).style.top = `${p.top - (g.height + v)}px` : l(V).style.top = `${p.bottom + v}px`, l(V).style.left = `${B}px`, l(V).setAttribute("data-floating", A ? "top" : "bottom"), l($t)) {
|
|
2562
2564
|
const Q = l($t).getBoundingClientRect();
|
|
2563
|
-
l($t).style.left =
|
|
2565
|
+
l($t).style.left = p.left - B + p.width / 2 - Q.width / 2 + "px";
|
|
2564
2566
|
}
|
|
2565
2567
|
} else
|
|
2566
2568
|
$("unable to find floating anchor element");
|
|
2567
2569
|
}
|
|
2568
|
-
function Qe(n =
|
|
2569
|
-
Ie && (clearTimeout(Ie), Ie = null),
|
|
2570
|
+
function Qe(n = C.UNVERIFIED, f = null) {
|
|
2571
|
+
Ie && (clearTimeout(Ie), Ie = null), b(Rt, !1), b(Le, null), b(H, null), b(Er, !1), b(G, null), Re(n, f);
|
|
2570
2572
|
}
|
|
2571
2573
|
function An(n) {
|
|
2572
|
-
|
|
2574
|
+
b(ct, n, !0);
|
|
2573
2575
|
}
|
|
2574
2576
|
function Re(n, f = null) {
|
|
2575
|
-
|
|
2577
|
+
b(R, n, !0), b(Ke, f, !0), Ve("statechange", {
|
|
2576
2578
|
payload: l(Le),
|
|
2577
2579
|
state: l(R)
|
|
2578
2580
|
});
|
|
2579
2581
|
}
|
|
2580
|
-
function
|
|
2581
|
-
l(
|
|
2582
|
+
function Yt() {
|
|
2583
|
+
l(V).style.display = "block", E() && Dt(), ye() && l(de) && (l(de).style.display = "flex");
|
|
2582
2584
|
}
|
|
2583
2585
|
async function Oe() {
|
|
2584
|
-
return Qe(
|
|
2586
|
+
return Qe(C.VERIFYING), await new Promise((n) => setTimeout(n, m() || 0)), no().then((n) => (yn(n), $("challenge", n), wn(n))).then(({ data: n, solution: f }) => {
|
|
2585
2587
|
var v;
|
|
2586
2588
|
if ($("solution", f), !f || n && "challenge" in n && !("clearText" in f))
|
|
2587
2589
|
if ((f == null ? void 0 : f.number) !== void 0 && "challenge" in n)
|
|
2588
2590
|
if (re() && "codeChallenge" in n)
|
|
2589
|
-
["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(((v = document.activeElement) == null ? void 0 : v.tagName) || "") && w() === !1 && document.activeElement.blur(),
|
|
2591
|
+
["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(((v = document.activeElement) == null ? void 0 : v.tagName) || "") && w() === !1 && document.activeElement.blur(), b(H, { challenge: n, solution: f }, !0);
|
|
2590
2592
|
else {
|
|
2591
2593
|
if (re() && Je() !== void 0)
|
|
2592
|
-
return mn(
|
|
2594
|
+
return mn(Wt(n, f));
|
|
2593
2595
|
if (re())
|
|
2594
|
-
return mo(
|
|
2595
|
-
|
|
2596
|
+
return mo(Wt(n, f));
|
|
2597
|
+
b(Le, Wt(n, f), !0), $("payload", l(Le));
|
|
2596
2598
|
}
|
|
2597
2599
|
else
|
|
2598
2600
|
throw $("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
2599
2601
|
}).then(() => {
|
|
2600
|
-
l(H) ? (Re(
|
|
2602
|
+
l(H) ? (Re(C.CODE), Dr().then(() => {
|
|
2601
2603
|
Ve("code", { codeChallenge: l(H) });
|
|
2602
|
-
})) : (Re(
|
|
2603
|
-
Ve("verified", { payload: l(Le) }), o() === "onsubmit" ?
|
|
2604
|
+
})) : (Re(C.VERIFIED), $("verified"), Dr().then(() => {
|
|
2605
|
+
Ve("verified", { payload: l(Le) }), o() === "onsubmit" ? Cr(l(dt)) : ye() && Tt();
|
|
2604
2606
|
}));
|
|
2605
2607
|
}).catch((n) => {
|
|
2606
|
-
$(n), Re(
|
|
2608
|
+
$(n), Re(C.ERROR, n.message);
|
|
2607
2609
|
});
|
|
2608
2610
|
}
|
|
2609
|
-
var In = Ll(), Rn =
|
|
2610
|
-
|
|
2611
|
-
var ht = z(Rn, 2), kr = Z(ht),
|
|
2611
|
+
var In = Ll(), Rn = Lt(In);
|
|
2612
|
+
Ya(Rn, t, "default", {});
|
|
2613
|
+
var ht = z(Rn, 2), kr = Z(ht), Zt = Z(kr);
|
|
2612
2614
|
let $n;
|
|
2613
|
-
var Sn = Z(
|
|
2615
|
+
var Sn = Z(Zt);
|
|
2614
2616
|
{
|
|
2615
2617
|
var yo = (n) => {
|
|
2616
2618
|
Nr(n);
|
|
2617
2619
|
};
|
|
2618
2620
|
J(Sn, (n) => {
|
|
2619
|
-
l(R) ===
|
|
2621
|
+
l(R) === C.VERIFYING && n(yo);
|
|
2620
2622
|
});
|
|
2621
2623
|
}
|
|
2622
2624
|
var et = z(Sn, 2);
|
|
@@ -2629,50 +2631,50 @@ function Ol(e, t) {
|
|
|
2629
2631
|
Me,
|
|
2630
2632
|
St,
|
|
2631
2633
|
Oe
|
|
2632
|
-
],
|
|
2633
|
-
var
|
|
2634
|
+
], Qt(et, (n) => b(wr, n), () => l(wr)), Y(Zt);
|
|
2635
|
+
var zt = z(Zt, 2), wo = Z(zt);
|
|
2634
2636
|
{
|
|
2635
2637
|
var Eo = (n) => {
|
|
2636
|
-
var f =
|
|
2638
|
+
var f = Xt(), v = Lt(f);
|
|
2637
2639
|
tt(v, () => l(O).verified), j(n, f);
|
|
2638
2640
|
}, Co = (n, f) => {
|
|
2639
2641
|
{
|
|
2640
2642
|
var v = (g) => {
|
|
2641
|
-
var
|
|
2642
|
-
tt(
|
|
2643
|
-
},
|
|
2643
|
+
var x = Xt(), y = Lt(x);
|
|
2644
|
+
tt(y, () => l(O).verifying), j(g, x);
|
|
2645
|
+
}, p = (g, x) => {
|
|
2644
2646
|
{
|
|
2645
|
-
var
|
|
2646
|
-
var Q =
|
|
2647
|
+
var y = (B) => {
|
|
2648
|
+
var Q = Xt(), le = Lt(Q);
|
|
2647
2649
|
tt(le, () => l(O).verificationRequired), j(B, Q);
|
|
2648
|
-
},
|
|
2649
|
-
var Q =
|
|
2650
|
+
}, A = (B) => {
|
|
2651
|
+
var Q = Xt(), le = Lt(Q);
|
|
2650
2652
|
tt(le, () => l(O).label), j(B, Q);
|
|
2651
2653
|
};
|
|
2652
2654
|
J(
|
|
2653
2655
|
g,
|
|
2654
2656
|
(B) => {
|
|
2655
|
-
l(R) ===
|
|
2657
|
+
l(R) === C.CODE ? B(y) : B(A, !1);
|
|
2656
2658
|
},
|
|
2657
|
-
|
|
2659
|
+
x
|
|
2658
2660
|
);
|
|
2659
2661
|
}
|
|
2660
2662
|
};
|
|
2661
2663
|
J(
|
|
2662
2664
|
n,
|
|
2663
2665
|
(g) => {
|
|
2664
|
-
l(R) ===
|
|
2666
|
+
l(R) === C.VERIFYING ? g(v) : g(p, !1);
|
|
2665
2667
|
},
|
|
2666
2668
|
f
|
|
2667
2669
|
);
|
|
2668
2670
|
}
|
|
2669
2671
|
};
|
|
2670
2672
|
J(wo, (n) => {
|
|
2671
|
-
l(R) ===
|
|
2673
|
+
l(R) === C.VERIFIED ? n(Eo) : n(Co, !1);
|
|
2672
2674
|
});
|
|
2673
2675
|
}
|
|
2674
|
-
|
|
2675
|
-
var Tn = z(
|
|
2676
|
+
Y(zt);
|
|
2677
|
+
var Tn = z(zt, 2);
|
|
2676
2678
|
{
|
|
2677
2679
|
var xo = (n) => {
|
|
2678
2680
|
var f = wl();
|
|
@@ -2681,35 +2683,35 @@ function Ol(e, t) {
|
|
|
2681
2683
|
}), j(n, f);
|
|
2682
2684
|
};
|
|
2683
2685
|
J(Tn, (n) => {
|
|
2684
|
-
l(R) ===
|
|
2686
|
+
l(R) === C.VERIFIED && n(xo);
|
|
2685
2687
|
});
|
|
2686
2688
|
}
|
|
2687
2689
|
var Dn = z(Tn, 2);
|
|
2688
2690
|
{
|
|
2689
2691
|
var ko = (n) => {
|
|
2690
2692
|
var f = El(), v = Z(f);
|
|
2691
|
-
T(v, "href", eo),
|
|
2693
|
+
T(v, "href", eo), Y(f), $e(() => T(v, "aria-label", l(O).ariaLinkLabel)), j(n, f);
|
|
2692
2694
|
};
|
|
2693
2695
|
J(Dn, (n) => {
|
|
2694
|
-
(X() !== !0 || l(
|
|
2696
|
+
(X() !== !0 || l(br)) && n(ko);
|
|
2695
2697
|
});
|
|
2696
2698
|
}
|
|
2697
2699
|
var Ao = z(Dn, 2);
|
|
2698
2700
|
{
|
|
2699
2701
|
var Io = (n) => {
|
|
2700
|
-
var f = Rl(), v = z(Z(f), 2),
|
|
2702
|
+
var f = Rl(), v = z(Z(f), 2), p = Z(v), g = z(p, 2);
|
|
2701
2703
|
Ua(g, !w()), g.__keydown = [
|
|
2702
2704
|
ml,
|
|
2703
2705
|
vn
|
|
2704
2706
|
];
|
|
2705
|
-
var
|
|
2707
|
+
var x = z(g, 2), y = Z(x), A = Z(y);
|
|
2706
2708
|
{
|
|
2707
|
-
var B = (
|
|
2708
|
-
var
|
|
2709
|
-
|
|
2710
|
-
var
|
|
2709
|
+
var B = (we) => {
|
|
2710
|
+
var W = Al();
|
|
2711
|
+
W.__click = vn;
|
|
2712
|
+
var Kt = Z(W);
|
|
2711
2713
|
{
|
|
2712
|
-
var
|
|
2714
|
+
var Nt = (vt) => {
|
|
2713
2715
|
Nr(vt, () => 20);
|
|
2714
2716
|
}, Oo = (vt, Po) => {
|
|
2715
2717
|
{
|
|
@@ -2743,45 +2745,45 @@ function Ol(e, t) {
|
|
|
2743
2745
|
);
|
|
2744
2746
|
}
|
|
2745
2747
|
};
|
|
2746
|
-
J(
|
|
2747
|
-
l(G) === ee.LOADING ? vt(
|
|
2748
|
+
J(Kt, (vt) => {
|
|
2749
|
+
l(G) === ee.LOADING ? vt(Nt) : vt(Oo, !1);
|
|
2748
2750
|
});
|
|
2749
2751
|
}
|
|
2750
|
-
W
|
|
2751
|
-
T(
|
|
2752
|
-
}), j(
|
|
2752
|
+
Y(W), $e(() => {
|
|
2753
|
+
T(W, "title", l(O).getAudioChallenge), W.disabled = l(G) === ee.LOADING || l(G) === ee.ERROR || l(Xe), T(W, "aria-label", l(G) === ee.LOADING ? l(O).loading : l(O).getAudioChallenge);
|
|
2754
|
+
}), j(we, W);
|
|
2753
2755
|
};
|
|
2754
|
-
J(
|
|
2755
|
-
l(H).challenge.codeChallenge.audio &&
|
|
2756
|
+
J(A, (we) => {
|
|
2757
|
+
l(H).challenge.codeChallenge.audio && we(B);
|
|
2756
2758
|
});
|
|
2757
2759
|
}
|
|
2758
|
-
var Q = z(
|
|
2759
|
-
Q.__click = [_l, Oe],
|
|
2760
|
-
var le = z(
|
|
2760
|
+
var Q = z(A, 2);
|
|
2761
|
+
Q.__click = [_l, Oe], Y(y);
|
|
2762
|
+
var le = z(y, 2), qe = Z(le);
|
|
2761
2763
|
{
|
|
2762
|
-
var Ar = (
|
|
2763
|
-
Nr(
|
|
2764
|
+
var Ar = (we) => {
|
|
2765
|
+
Nr(we, () => 16);
|
|
2764
2766
|
};
|
|
2765
|
-
J(qe, (
|
|
2766
|
-
l(Xe) &&
|
|
2767
|
+
J(qe, (we) => {
|
|
2768
|
+
l(Xe) && we(Ar);
|
|
2767
2769
|
});
|
|
2768
2770
|
}
|
|
2769
|
-
var
|
|
2770
|
-
|
|
2771
|
-
var No = z(
|
|
2771
|
+
var Jt = z(qe);
|
|
2772
|
+
Y(le), Y(x);
|
|
2773
|
+
var No = z(x, 2);
|
|
2772
2774
|
{
|
|
2773
|
-
var Lo = (
|
|
2774
|
-
var
|
|
2775
|
-
W
|
|
2775
|
+
var Lo = (we) => {
|
|
2776
|
+
var W = Il(), Kt = Z(W);
|
|
2777
|
+
Y(W), Qt(W, (Nt) => b(Ue, Nt), () => l(Ue)), $e((Nt) => T(Kt, "src", Nt), [
|
|
2776
2778
|
() => ln(l(H).challenge.codeChallenge.audio, { language: q() })
|
|
2777
|
-
]), Be("loadstart",
|
|
2779
|
+
]), Be("loadstart", W, fo), Be("canplay", W, uo), Be("pause", W, ho), Be("playing", W, co), Be("ended", W, lo), Be("error", Kt, so), j(we, W);
|
|
2778
2780
|
};
|
|
2779
|
-
J(No, (
|
|
2780
|
-
l(H).challenge.codeChallenge.audio && l(
|
|
2781
|
+
J(No, (we) => {
|
|
2782
|
+
l(H).challenge.codeChallenge.audio && l(Er) && we(Lo);
|
|
2781
2783
|
});
|
|
2782
2784
|
}
|
|
2783
|
-
|
|
2784
|
-
T(f, "aria-label", l(O).verificationRequired), T(
|
|
2785
|
+
Y(v), Y(f), $e(() => {
|
|
2786
|
+
T(f, "aria-label", l(O).verificationRequired), T(p, "src", l(H).challenge.codeChallenge.image), T(g, "minlength", l(H).challenge.codeChallenge.length || 1), T(g, "maxlength", l(H).challenge.codeChallenge.length), T(g, "placeholder", l(O).enterCode), T(g, "aria-label", l(G) === ee.LOADING ? l(O).loading : l(G) === ee.PLAYING ? "" : l(O).enterCodeAria), T(g, "aria-live", l(G) ? "assertive" : "polite"), T(g, "aria-busy", l(G) === ee.LOADING), g.disabled = l(Xe), T(Q, "aria-label", l(O).reload), T(Q, "title", l(O).reload), Q.disabled = l(Xe), le.disabled = l(Xe), T(le, "aria-label", l(O).verify), Ha(Jt, ` ${l(O).verify ?? ""}`);
|
|
2785
2787
|
}), Be("submit", v, vo, !0), j(n, f);
|
|
2786
2788
|
};
|
|
2787
2789
|
J(Ao, (n) => {
|
|
@@ -2789,59 +2791,59 @@ function Ol(e, t) {
|
|
|
2789
2791
|
(f = l(H)) != null && f.challenge.codeChallenge && n(Io);
|
|
2790
2792
|
});
|
|
2791
2793
|
}
|
|
2792
|
-
|
|
2794
|
+
Y(kr);
|
|
2793
2795
|
var Nn = z(kr, 2);
|
|
2794
2796
|
{
|
|
2795
2797
|
var Ro = (n) => {
|
|
2796
2798
|
var f = Tl(), v = z(Z(f), 2);
|
|
2797
2799
|
{
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2800
|
-
tt(
|
|
2801
|
-
}, g = (
|
|
2802
|
-
var
|
|
2803
|
-
tt(
|
|
2800
|
+
var p = (x) => {
|
|
2801
|
+
var y = $l(), A = Z(y);
|
|
2802
|
+
tt(A, () => l(O).expired), Y(y), $e(() => T(y, "title", l(Ke))), j(x, y);
|
|
2803
|
+
}, g = (x) => {
|
|
2804
|
+
var y = Sl(), A = Z(y);
|
|
2805
|
+
tt(A, () => l(O).error), Y(y), $e(() => T(y, "title", l(Ke))), j(x, y);
|
|
2804
2806
|
};
|
|
2805
|
-
J(v, (
|
|
2806
|
-
l(R) ===
|
|
2807
|
+
J(v, (x) => {
|
|
2808
|
+
l(R) === C.EXPIRED ? x(p) : x(g, !1);
|
|
2807
2809
|
});
|
|
2808
2810
|
}
|
|
2809
|
-
|
|
2811
|
+
Y(f), j(n, f);
|
|
2810
2812
|
};
|
|
2811
2813
|
J(Nn, (n) => {
|
|
2812
|
-
(l(Ke) || l(R) ===
|
|
2814
|
+
(l(Ke) || l(R) === C.EXPIRED) && n(Ro);
|
|
2813
2815
|
});
|
|
2814
2816
|
}
|
|
2815
2817
|
var Ln = z(Nn, 2);
|
|
2816
2818
|
{
|
|
2817
2819
|
var $o = (n) => {
|
|
2818
|
-
var f = Dl(), v = Z(f),
|
|
2819
|
-
tt(
|
|
2820
|
+
var f = Dl(), v = Z(f), p = Z(v);
|
|
2821
|
+
tt(p, () => l(O).footer), Y(v), Y(f), j(n, f);
|
|
2820
2822
|
};
|
|
2821
2823
|
J(Ln, (n) => {
|
|
2822
|
-
l(O).footer && (te() !== !0 || l(
|
|
2824
|
+
l(O).footer && (te() !== !0 || l(br)) && n($o);
|
|
2823
2825
|
});
|
|
2824
2826
|
}
|
|
2825
2827
|
var So = z(Ln, 2);
|
|
2826
2828
|
{
|
|
2827
2829
|
var To = (n) => {
|
|
2828
2830
|
var f = Nl();
|
|
2829
|
-
|
|
2831
|
+
Qt(f, (v) => b($t, v), () => l($t)), j(n, f);
|
|
2830
2832
|
};
|
|
2831
2833
|
J(So, (n) => {
|
|
2832
|
-
|
|
2834
|
+
E() && n(To);
|
|
2833
2835
|
});
|
|
2834
2836
|
}
|
|
2835
|
-
|
|
2837
|
+
Y(ht), Qt(ht, (n) => b(V, n), () => l(V)), $e(
|
|
2836
2838
|
(n) => {
|
|
2837
|
-
T(ht, "data-state", l(R)), T(ht, "data-floating",
|
|
2839
|
+
T(ht, "data-state", l(R)), T(ht, "data-floating", E()), T(ht, "data-overlay", ye()), $n = za(Zt, 1, "altcha-checkbox", null, $n, n), T(et, "id", l(tn)), et.required = o() !== "onsubmit" && (!E() || o() !== "off"), T(zt, "for", l(tn));
|
|
2838
2840
|
},
|
|
2839
2841
|
[
|
|
2840
2842
|
() => ({
|
|
2841
|
-
"altcha-checkbox-verifying": l(R) ===
|
|
2843
|
+
"altcha-checkbox-verifying": l(R) === C.VERIFYING
|
|
2842
2844
|
})
|
|
2843
2845
|
]
|
|
2844
|
-
), Be("invalid", et, hn), el(et, () => l(Rt), (n) =>
|
|
2846
|
+
), Be("invalid", et, hn), el(et, () => l(Rt), (n) => b(Rt, n)), j(e, In);
|
|
2845
2847
|
var Do = Fi({
|
|
2846
2848
|
clarify: St,
|
|
2847
2849
|
configure: En,
|
|
@@ -2849,210 +2851,210 @@ function Ol(e, t) {
|
|
|
2849
2851
|
getFloatingAnchor: xn,
|
|
2850
2852
|
getPlugin: bo,
|
|
2851
2853
|
getState: kn,
|
|
2852
|
-
hide:
|
|
2853
|
-
repositionFloating:
|
|
2854
|
+
hide: Tt,
|
|
2855
|
+
repositionFloating: Dt,
|
|
2854
2856
|
reset: Qe,
|
|
2855
2857
|
setFloatingAnchor: An,
|
|
2856
2858
|
setState: Re,
|
|
2857
|
-
show:
|
|
2859
|
+
show: Yt,
|
|
2858
2860
|
verify: Oe,
|
|
2859
2861
|
get auto() {
|
|
2860
2862
|
return o();
|
|
2861
2863
|
},
|
|
2862
2864
|
set auto(n = void 0) {
|
|
2863
|
-
o(n),
|
|
2865
|
+
o(n), k();
|
|
2864
2866
|
},
|
|
2865
2867
|
get blockspam() {
|
|
2866
2868
|
return u();
|
|
2867
2869
|
},
|
|
2868
2870
|
set blockspam(n = void 0) {
|
|
2869
|
-
u(n),
|
|
2871
|
+
u(n), k();
|
|
2870
2872
|
},
|
|
2871
2873
|
get challengeurl() {
|
|
2872
2874
|
return s();
|
|
2873
2875
|
},
|
|
2874
2876
|
set challengeurl(n = void 0) {
|
|
2875
|
-
s(n),
|
|
2877
|
+
s(n), k();
|
|
2876
2878
|
},
|
|
2877
2879
|
get challengejson() {
|
|
2878
2880
|
return c();
|
|
2879
2881
|
},
|
|
2880
2882
|
set challengejson(n = void 0) {
|
|
2881
|
-
c(n),
|
|
2883
|
+
c(n), k();
|
|
2882
2884
|
},
|
|
2883
2885
|
get credentials() {
|
|
2884
2886
|
return d();
|
|
2885
2887
|
},
|
|
2886
2888
|
set credentials(n = void 0) {
|
|
2887
|
-
d(n),
|
|
2889
|
+
d(n), k();
|
|
2888
2890
|
},
|
|
2889
2891
|
get customfetch() {
|
|
2890
2892
|
return _();
|
|
2891
2893
|
},
|
|
2892
2894
|
set customfetch(n = void 0) {
|
|
2893
|
-
_(n),
|
|
2895
|
+
_(n), k();
|
|
2894
2896
|
},
|
|
2895
2897
|
get debug() {
|
|
2896
2898
|
return h();
|
|
2897
2899
|
},
|
|
2898
2900
|
set debug(n = !1) {
|
|
2899
|
-
h(n),
|
|
2901
|
+
h(n), k();
|
|
2900
2902
|
},
|
|
2901
2903
|
get delay() {
|
|
2902
|
-
return
|
|
2904
|
+
return m();
|
|
2903
2905
|
},
|
|
2904
2906
|
set delay(n = 0) {
|
|
2905
|
-
|
|
2907
|
+
m(n), k();
|
|
2906
2908
|
},
|
|
2907
2909
|
get disableautofocus() {
|
|
2908
2910
|
return w();
|
|
2909
2911
|
},
|
|
2910
2912
|
set disableautofocus(n = !1) {
|
|
2911
|
-
w(n),
|
|
2913
|
+
w(n), k();
|
|
2912
2914
|
},
|
|
2913
2915
|
get expire() {
|
|
2914
2916
|
return S();
|
|
2915
2917
|
},
|
|
2916
2918
|
set expire(n = void 0) {
|
|
2917
|
-
S(n),
|
|
2919
|
+
S(n), k();
|
|
2918
2920
|
},
|
|
2919
2921
|
get floating() {
|
|
2920
|
-
return
|
|
2922
|
+
return E();
|
|
2921
2923
|
},
|
|
2922
2924
|
set floating(n = void 0) {
|
|
2923
|
-
|
|
2925
|
+
E(n), k();
|
|
2924
2926
|
},
|
|
2925
2927
|
get floatinganchor() {
|
|
2926
|
-
return
|
|
2928
|
+
return U();
|
|
2927
2929
|
},
|
|
2928
2930
|
set floatinganchor(n = void 0) {
|
|
2929
|
-
|
|
2931
|
+
U(n), k();
|
|
2930
2932
|
},
|
|
2931
2933
|
get floatingoffset() {
|
|
2932
2934
|
return ce();
|
|
2933
2935
|
},
|
|
2934
2936
|
set floatingoffset(n = void 0) {
|
|
2935
|
-
ce(n),
|
|
2937
|
+
ce(n), k();
|
|
2936
2938
|
},
|
|
2937
2939
|
get floatingpersist() {
|
|
2938
2940
|
return K();
|
|
2939
2941
|
},
|
|
2940
2942
|
set floatingpersist(n = !1) {
|
|
2941
|
-
K(n),
|
|
2943
|
+
K(n), k();
|
|
2942
2944
|
},
|
|
2943
2945
|
get hidefooter() {
|
|
2944
2946
|
return te();
|
|
2945
2947
|
},
|
|
2946
2948
|
set hidefooter(n = !1) {
|
|
2947
|
-
te(n),
|
|
2949
|
+
te(n), k();
|
|
2948
2950
|
},
|
|
2949
2951
|
get hidelogo() {
|
|
2950
2952
|
return X();
|
|
2951
2953
|
},
|
|
2952
2954
|
set hidelogo(n = !1) {
|
|
2953
|
-
X(n),
|
|
2955
|
+
X(n), k();
|
|
2954
2956
|
},
|
|
2955
2957
|
get id() {
|
|
2956
2958
|
return st();
|
|
2957
2959
|
},
|
|
2958
2960
|
set id(n = void 0) {
|
|
2959
|
-
st(n),
|
|
2961
|
+
st(n), k();
|
|
2960
2962
|
},
|
|
2961
2963
|
get language() {
|
|
2962
2964
|
return q();
|
|
2963
2965
|
},
|
|
2964
2966
|
set language(n = void 0) {
|
|
2965
|
-
q(n),
|
|
2967
|
+
q(n), k();
|
|
2966
2968
|
},
|
|
2967
2969
|
get name() {
|
|
2968
2970
|
return ae();
|
|
2969
2971
|
},
|
|
2970
2972
|
set name(n = "altcha") {
|
|
2971
|
-
ae(n),
|
|
2973
|
+
ae(n), k();
|
|
2972
2974
|
},
|
|
2973
2975
|
get maxnumber() {
|
|
2974
2976
|
return be();
|
|
2975
2977
|
},
|
|
2976
2978
|
set maxnumber(n = 1e6) {
|
|
2977
|
-
be(n),
|
|
2979
|
+
be(n), k();
|
|
2978
2980
|
},
|
|
2979
2981
|
get mockerror() {
|
|
2980
2982
|
return xt();
|
|
2981
2983
|
},
|
|
2982
2984
|
set mockerror(n = !1) {
|
|
2983
|
-
xt(n),
|
|
2985
|
+
xt(n), k();
|
|
2984
2986
|
},
|
|
2985
2987
|
get obfuscated() {
|
|
2986
2988
|
return Me();
|
|
2987
2989
|
},
|
|
2988
2990
|
set obfuscated(n = void 0) {
|
|
2989
|
-
Me(n),
|
|
2991
|
+
Me(n), k();
|
|
2990
2992
|
},
|
|
2991
2993
|
get overlay() {
|
|
2992
|
-
return
|
|
2994
|
+
return ye();
|
|
2993
2995
|
},
|
|
2994
2996
|
set overlay(n = void 0) {
|
|
2995
|
-
|
|
2997
|
+
ye(n), k();
|
|
2996
2998
|
},
|
|
2997
2999
|
get overlaycontent() {
|
|
2998
3000
|
return kt();
|
|
2999
3001
|
},
|
|
3000
3002
|
set overlaycontent(n = void 0) {
|
|
3001
|
-
kt(n),
|
|
3003
|
+
kt(n), k();
|
|
3002
3004
|
},
|
|
3003
3005
|
get plugins() {
|
|
3004
|
-
return
|
|
3006
|
+
return Gt();
|
|
3005
3007
|
},
|
|
3006
3008
|
set plugins(n = void 0) {
|
|
3007
|
-
|
|
3009
|
+
Gt(n), k();
|
|
3008
3010
|
},
|
|
3009
3011
|
get refetchonexpire() {
|
|
3010
3012
|
return At();
|
|
3011
3013
|
},
|
|
3012
3014
|
set refetchonexpire(n = !0) {
|
|
3013
|
-
At(n),
|
|
3015
|
+
At(n), k();
|
|
3014
3016
|
},
|
|
3015
3017
|
get sentinel() {
|
|
3016
3018
|
return Je();
|
|
3017
3019
|
},
|
|
3018
3020
|
set sentinel(n = void 0) {
|
|
3019
|
-
Je(n),
|
|
3021
|
+
Je(n), k();
|
|
3020
3022
|
},
|
|
3021
3023
|
get spamfilter() {
|
|
3022
3024
|
return Ae();
|
|
3023
3025
|
},
|
|
3024
3026
|
set spamfilter(n = !1) {
|
|
3025
|
-
Ae(n),
|
|
3027
|
+
Ae(n), k();
|
|
3026
3028
|
},
|
|
3027
3029
|
get strings() {
|
|
3028
3030
|
return ut();
|
|
3029
3031
|
},
|
|
3030
3032
|
set strings(n = void 0) {
|
|
3031
|
-
ut(n),
|
|
3033
|
+
ut(n), k();
|
|
3032
3034
|
},
|
|
3033
3035
|
get test() {
|
|
3034
3036
|
return ge();
|
|
3035
3037
|
},
|
|
3036
3038
|
set test(n = !1) {
|
|
3037
|
-
ge(n),
|
|
3039
|
+
ge(n), k();
|
|
3038
3040
|
},
|
|
3039
3041
|
get verifyurl() {
|
|
3040
3042
|
return re();
|
|
3041
3043
|
},
|
|
3042
3044
|
set verifyurl(n = void 0) {
|
|
3043
|
-
re(n),
|
|
3045
|
+
re(n), k();
|
|
3044
3046
|
},
|
|
3045
3047
|
get workers() {
|
|
3046
3048
|
return ft();
|
|
3047
3049
|
},
|
|
3048
3050
|
set workers(n = Math.min(16, navigator.hardwareConcurrency || 8)) {
|
|
3049
|
-
ft(n),
|
|
3051
|
+
ft(n), k();
|
|
3050
3052
|
},
|
|
3051
3053
|
get workerurl() {
|
|
3052
3054
|
return It();
|
|
3053
3055
|
},
|
|
3054
3056
|
set workerurl(n = void 0) {
|
|
3055
|
-
It(n),
|
|
3057
|
+
It(n), k();
|
|
3056
3058
|
}
|
|
3057
3059
|
});
|
|
3058
3060
|
return i(), Do;
|
|
@@ -3113,7 +3115,7 @@ customElements.define("altcha-widget", ul(
|
|
|
3113
3115
|
],
|
|
3114
3116
|
!1
|
|
3115
3117
|
));
|
|
3116
|
-
const Ji = '@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:
|
|
3118
|
+
const Ji = '@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';
|
|
3117
3119
|
function Ki(e, t = "__altcha-css") {
|
|
3118
3120
|
if (!document.getElementById(t)) {
|
|
3119
3121
|
const r = document.createElement("style");
|