altcha 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var jt = Object.defineProperty;
2
2
  var $t = (n, e, t) => e in n ? jt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var Z = (n, e, t) => $t(n, typeof e != "symbol" ? e + "" : e, t);
3
+ var W = (n, e, t) => $t(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  function Ce() {
5
5
  }
6
6
  function Ht(n, e) {
@@ -16,7 +16,7 @@ function ht(n) {
16
16
  function nt() {
17
17
  return /* @__PURE__ */ Object.create(null);
18
18
  }
19
- function Ee(n) {
19
+ function pe(n) {
20
20
  n.forEach(ht);
21
21
  }
22
22
  function dt(n) {
@@ -58,7 +58,7 @@ function Zt(n, e, t, i, o, l) {
58
58
  n.p(s, o);
59
59
  }
60
60
  }
61
- function Gt(n) {
61
+ function Wt(n) {
62
62
  if (n.ctx.length > 32) {
63
63
  const e = [], t = n.ctx.length / 32;
64
64
  for (let i = 0; i < t; i++)
@@ -82,11 +82,11 @@ function F(n) {
82
82
  function K(n) {
83
83
  return document.createElementNS("http://www.w3.org/2000/svg", n);
84
84
  }
85
- function Yt(n) {
85
+ function Gt(n) {
86
86
  return document.createTextNode(n);
87
87
  }
88
88
  function z() {
89
- return Yt(" ");
89
+ return Gt(" ");
90
90
  }
91
91
  function Le(n, e, t, i) {
92
92
  return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
@@ -94,7 +94,7 @@ function Le(n, e, t, i) {
94
94
  function c(n, e, t) {
95
95
  t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
96
96
  }
97
- function Wt(n) {
97
+ function Yt(n) {
98
98
  return Array.from(n.childNodes);
99
99
  }
100
100
  function rt(n, e, t) {
@@ -149,7 +149,7 @@ let ue = [];
149
149
  const it = [], mt = /* @__PURE__ */ Promise.resolve();
150
150
  let Se = !1;
151
151
  function bt() {
152
- Se || (Se = !0, mt.then(E));
152
+ Se || (Se = !0, mt.then(p));
153
153
  }
154
154
  function en() {
155
155
  return bt(), mt;
@@ -159,7 +159,7 @@ function De(n) {
159
159
  }
160
160
  const Re = /* @__PURE__ */ new Set();
161
161
  let fe = 0;
162
- function E() {
162
+ function p() {
163
163
  if (fe !== 0)
164
164
  return;
165
165
  const n = we;
@@ -185,7 +185,7 @@ function E() {
185
185
  }
186
186
  function tn(n) {
187
187
  if (n.fragment !== null) {
188
- n.update(), Ee(n.before_update);
188
+ n.update(), pe(n.before_update);
189
189
  const e = n.dirty;
190
190
  n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(De);
191
191
  }
@@ -194,16 +194,16 @@ function nn(n) {
194
194
  const e = [], t = [];
195
195
  ue.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), ue = e;
196
196
  }
197
- const ve = /* @__PURE__ */ new Set();
197
+ const ke = /* @__PURE__ */ new Set();
198
198
  let rn;
199
199
  function yt(n, e) {
200
- n && n.i && (ve.delete(n), n.i(e));
200
+ n && n.i && (ke.delete(n), n.i(e));
201
201
  }
202
202
  function on(n, e, t, i) {
203
203
  if (n && n.o) {
204
- if (ve.has(n)) return;
205
- ve.add(n), rn.c.push(() => {
206
- ve.delete(n);
204
+ if (ke.has(n)) return;
205
+ ke.add(n), rn.c.push(() => {
206
+ ke.delete(n);
207
207
  }), n.o(e);
208
208
  }
209
209
  }
@@ -211,12 +211,12 @@ function ln(n, e, t) {
211
211
  const { fragment: i, after_update: o } = n.$$;
212
212
  i && i.m(e, t), De(() => {
213
213
  const l = n.$$.on_mount.map(ht).filter(dt);
214
- n.$$.on_destroy ? n.$$.on_destroy.push(...l) : Ee(l), n.$$.on_mount = [];
214
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : pe(l), n.$$.on_mount = [];
215
215
  }), o.forEach(De);
216
216
  }
217
217
  function sn(n, e) {
218
218
  const t = n.$$;
219
- t.fragment !== null && (nn(t.after_update), Ee(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
219
+ t.fragment !== null && (nn(t.after_update), pe(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
220
220
  }
221
221
  function fn(n, e) {
222
222
  n.$$.dirty[0] === -1 && (ce.push(n), bt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
@@ -247,16 +247,16 @@ function cn(n, e, t, i, o, l, s = null, h = [-1]) {
247
247
  };
248
248
  s && s(u.root);
249
249
  let A = !1;
250
- if (u.ctx = t ? t(n, e.props || {}, (b, Y, ...O) => {
251
- const U = O.length ? O[0] : Y;
252
- return u.ctx && o(u.ctx[b], u.ctx[b] = U) && (!u.skip_bound && u.bound[b] && u.bound[b](U), A && fn(n, b)), Y;
253
- }) : [], u.update(), A = !0, Ee(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
250
+ if (u.ctx = t ? t(n, e.props || {}, (_, O, ...U) => {
251
+ const B = U.length ? U[0] : O;
252
+ return u.ctx && o(u.ctx[_], u.ctx[_] = B) && (!u.skip_bound && u.bound[_] && u.bound[_](B), A && fn(n, _)), O;
253
+ }) : [], u.update(), A = !0, pe(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
254
254
  if (e.hydrate) {
255
- const b = Wt(e.target);
256
- u.fragment && u.fragment.l(b), b.forEach(j);
255
+ const _ = Yt(e.target);
256
+ u.fragment && u.fragment.l(_), _.forEach(j);
257
257
  } else
258
258
  u.fragment && u.fragment.c();
259
- e.intro && yt(n.$$.fragment), ln(n, e.target, e.anchor), E();
259
+ e.intro && yt(n.$$.fragment), ln(n, e.target, e.anchor), p();
260
260
  }
261
261
  _e(d);
262
262
  }
@@ -265,23 +265,23 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
265
265
  constructor(e, t, i) {
266
266
  super();
267
267
  /** The Svelte component constructor */
268
- Z(this, "$$ctor");
268
+ W(this, "$$ctor");
269
269
  /** Slots */
270
- Z(this, "$$s");
270
+ W(this, "$$s");
271
271
  /** The Svelte component instance */
272
- Z(this, "$$c");
272
+ W(this, "$$c");
273
273
  /** Whether or not the custom element is connected */
274
- Z(this, "$$cn", !1);
274
+ W(this, "$$cn", !1);
275
275
  /** Component props data */
276
- Z(this, "$$d", {});
276
+ W(this, "$$d", {});
277
277
  /** `true` if currently in the process of reflecting component props back to attributes */
278
- Z(this, "$$r", !1);
278
+ W(this, "$$r", !1);
279
279
  /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
280
- Z(this, "$$p_d", {});
280
+ W(this, "$$p_d", {});
281
281
  /** @type {Record<string, Function[]>} Event listeners */
282
- Z(this, "$$l", {});
282
+ W(this, "$$l", {});
283
283
  /** @type {Map<Function, Function>} Event listener unsubscribe functions */
284
- Z(this, "$$l_u", /* @__PURE__ */ new Map());
284
+ W(this, "$$l_u", /* @__PURE__ */ new Map());
285
285
  this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
286
286
  }
287
287
  addEventListener(e, t, i) {
@@ -454,7 +454,7 @@ class an {
454
454
  *
455
455
  * @type {any}
456
456
  */
457
- Z(this, "$$");
457
+ W(this, "$$");
458
458
  /**
459
459
  * ### PRIVATE API
460
460
  *
@@ -462,7 +462,7 @@ class an {
462
462
  *
463
463
  * @type {any}
464
464
  */
465
- Z(this, "$$set");
465
+ W(this, "$$set");
466
466
  }
467
467
  /** @returns {void} */
468
468
  $destroy() {
@@ -500,7 +500,7 @@ function dn(n) {
500
500
  async function gn(n, e = "SHA-256", t = 1e5) {
501
501
  const i = Date.now().toString(16);
502
502
  n || (n = Math.round(Math.random() * t));
503
- const o = await Et(i, n, e);
503
+ const o = await pt(i, n, e);
504
504
  return {
505
505
  algorithm: e,
506
506
  challenge: o,
@@ -508,7 +508,9 @@ async function gn(n, e = "SHA-256", t = 1e5) {
508
508
  signature: ""
509
509
  };
510
510
  }
511
- async function Et(n, e, t) {
511
+ async function pt(n, e, t) {
512
+ if (typeof crypto > "u" || !("subtle" in crypto) || !("digest" in crypto.subtle))
513
+ throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");
512
514
  return dn(
513
515
  await crypto.subtle.digest(
514
516
  t.toUpperCase(),
@@ -523,7 +525,7 @@ function mn(n, e, t = "SHA-256", i = 1e6, o = 0) {
523
525
  for (let d = o; d <= i; d += 1) {
524
526
  if (l.signal.aborted)
525
527
  return null;
526
- if (await Et(e, d, t) === n)
528
+ if (await pt(e, d, t) === n)
527
529
  return {
528
530
  number: d,
529
531
  took: Date.now() - s
@@ -558,7 +560,7 @@ async function wn(n, e = "", t = 1e6, i = 0) {
558
560
  if (l.signal.aborted || !d || !u)
559
561
  return null;
560
562
  try {
561
- const b = await crypto.subtle.decrypt(
563
+ const _ = await crypto.subtle.decrypt(
562
564
  {
563
565
  name: o,
564
566
  iv: _n(A)
@@ -566,9 +568,9 @@ async function wn(n, e = "", t = 1e6, i = 0) {
566
568
  d,
567
569
  u
568
570
  );
569
- if (b)
571
+ if (_)
570
572
  return {
571
- clearText: new TextDecoder().decode(b),
573
+ clearText: new TextDecoder().decode(_),
572
574
  took: Date.now() - s
573
575
  };
574
576
  } catch {
@@ -616,7 +618,7 @@ function ot(n) {
616
618
  }
617
619
  };
618
620
  }
619
- function En(n) {
621
+ function pn(n) {
620
622
  let e, t = (
621
623
  /*_strings*/
622
624
  n[11].label + ""
@@ -641,7 +643,7 @@ function En(n) {
641
643
  }
642
644
  };
643
645
  }
644
- function pn(n) {
646
+ function En(n) {
645
647
  let e, t = (
646
648
  /*_strings*/
647
649
  n[11].verifying + ""
@@ -663,7 +665,7 @@ function pn(n) {
663
665
  }
664
666
  };
665
667
  }
666
- function kn(n) {
668
+ function vn(n) {
667
669
  let e, t = (
668
670
  /*_strings*/
669
671
  n[11].verified + ""
@@ -703,7 +705,7 @@ function lt(n) {
703
705
  let e, t, i, o, l, s, h;
704
706
  return {
705
707
  c() {
706
- e = F("div"), t = F("a"), i = K("svg"), o = K("path"), l = K("path"), s = K("path"), c(o, "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"), c(o, "fill", "currentColor"), c(l, "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"), c(l, "fill", "currentColor"), c(s, "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"), c(s, "fill", "currentColor"), c(i, "width", "22"), c(i, "height", "22"), c(i, "viewBox", "0 0 20 20"), c(i, "fill", "none"), c(i, "xmlns", "http://www.w3.org/2000/svg"), c(t, "href", pt), c(t, "target", "_blank"), c(t, "class", "altcha-logo"), c(t, "aria-label", h = /*_strings*/
708
+ e = F("div"), t = F("a"), i = K("svg"), o = K("path"), l = K("path"), s = K("path"), c(o, "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"), c(o, "fill", "currentColor"), c(l, "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"), c(l, "fill", "currentColor"), c(s, "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"), c(s, "fill", "currentColor"), c(i, "width", "22"), c(i, "height", "22"), c(i, "viewBox", "0 0 20 20"), c(i, "fill", "none"), c(i, "xmlns", "http://www.w3.org/2000/svg"), c(t, "href", Et), c(t, "target", "_blank"), c(t, "class", "altcha-logo"), c(t, "aria-label", h = /*_strings*/
707
709
  n[11].ariaLinkLabel);
708
710
  },
709
711
  m(d, u) {
@@ -724,7 +726,7 @@ function st(n) {
724
726
  function l(d, u) {
725
727
  return (
726
728
  /*state*/
727
- d[7] === m.EXPIRED ? xn : vn
729
+ d[7] === m.EXPIRED ? xn : kn
728
730
  );
729
731
  }
730
732
  let s = l(n), h = s(n);
@@ -743,7 +745,7 @@ function st(n) {
743
745
  }
744
746
  };
745
747
  }
746
- function vn(n) {
748
+ function kn(n) {
747
749
  let e, t = (
748
750
  /*_strings*/
749
751
  n[11].error + ""
@@ -847,7 +849,7 @@ function ct(n) {
847
849
  };
848
850
  }
849
851
  function Cn(n) {
850
- let e, t, i, o, l, s, h, d, u, A, b, Y, O, U, D, R, X;
852
+ let e, t, i, o, l, s, h, d, u, A, _, O, U, B, D, R, X;
851
853
  const J = (
852
854
  /*#slots*/
853
855
  n[46].default
@@ -862,16 +864,16 @@ function Cn(n) {
862
864
  /*state*/
863
865
  n[7] === m.VERIFYING && ot()
864
866
  );
865
- function Q(a, y) {
867
+ function Q(a, b) {
866
868
  return (
867
869
  /*state*/
868
- a[7] === m.VERIFIED ? kn : (
870
+ a[7] === m.VERIFIED ? vn : (
869
871
  /*state*/
870
- a[7] === m.VERIFYING ? pn : En
872
+ a[7] === m.VERIFYING ? En : pn
871
873
  )
872
874
  );
873
875
  }
874
- let G = Q(n), V = G(n), v = (
876
+ let G = Q(n), V = G(n), k = (
875
877
  /*hidelogo*/
876
878
  (n[3] !== !0 || /*isFreeSaaS*/
877
879
  n[12]) && lt(n)
@@ -884,13 +886,13 @@ function Cn(n) {
884
886
  n[11].footer && /*hidefooter*/
885
887
  (n[2] !== !0 || /*isFreeSaaS*/
886
888
  n[12]) && ft(n)
887
- ), p = (
889
+ ), E = (
888
890
  /*floating*/
889
891
  n[1] && ct(n)
890
892
  );
891
893
  return {
892
894
  c() {
893
- N && N.c(), e = z(), t = F("div"), i = F("div"), T && T.c(), o = z(), l = F("div"), s = F("input"), u = z(), A = F("div"), V.c(), b = z(), v && v.c(), Y = z(), P && P.c(), O = z(), S && S.c(), U = z(), p && p.c(), c(s, "type", "checkbox"), c(s, "id", h = /*name*/
895
+ N && N.c(), e = z(), t = F("div"), i = F("div"), T && T.c(), o = z(), l = F("div"), s = F("input"), u = z(), A = F("div"), V.c(), _ = z(), k && k.c(), O = z(), P && P.c(), U = z(), S && S.c(), B = z(), E && E.c(), c(s, "type", "checkbox"), c(s, "id", h = /*name*/
894
896
  n[4] + "_checkbox"), s.required = d = /*auto*/
895
897
  n[0] !== "onsubmit" && (!/*floating*/
896
898
  n[1] || /*auto*/
@@ -911,9 +913,9 @@ function Cn(n) {
911
913
  n[1]
912
914
  );
913
915
  },
914
- m(a, y) {
915
- N && N.m(a, y), $(a, e, y), $(a, t, y), L(t, i), T && T.m(i, null), L(i, o), L(i, l), L(l, s), s.checked = /*checked*/
916
- n[8], L(i, u), L(i, A), V.m(A, null), L(i, b), v && v.m(i, null), L(t, Y), P && P.m(t, null), L(t, O), S && S.m(t, null), L(t, U), p && p.m(t, null), n[49](t), D = !0, R || (X = [
916
+ m(a, b) {
917
+ N && N.m(a, b), $(a, e, b), $(a, t, b), L(t, i), T && T.m(i, null), L(i, o), L(i, l), L(l, s), s.checked = /*checked*/
918
+ n[8], L(i, u), L(i, A), V.m(A, null), L(i, _), k && k.m(i, null), L(t, O), P && P.m(t, null), L(t, U), S && S.m(t, null), L(t, B), E && E.m(t, null), n[49](t), D = !0, R || (X = [
917
919
  Le(
918
920
  s,
919
921
  "change",
@@ -934,8 +936,8 @@ function Cn(n) {
934
936
  )
935
937
  ], R = !0);
936
938
  },
937
- p(a, y) {
938
- N && N.p && (!D || y[1] & /*$$scope*/
939
+ p(a, b) {
940
+ N && N.p && (!D || b[1] & /*$$scope*/
939
941
  16384) && Zt(
940
942
  N,
941
943
  J,
@@ -946,43 +948,43 @@ function Cn(n) {
946
948
  J,
947
949
  /*$$scope*/
948
950
  a[45],
949
- y,
951
+ b,
950
952
  null
951
- ) : Gt(
953
+ ) : Wt(
952
954
  /*$$scope*/
953
955
  a[45]
954
956
  ),
955
957
  null
956
958
  ), /*state*/
957
- a[7] === m.VERIFYING ? T || (T = ot(), T.c(), T.m(i, o)) : T && (T.d(1), T = null), (!D || y[0] & /*name*/
959
+ a[7] === m.VERIFYING ? T || (T = ot(), T.c(), T.m(i, o)) : T && (T.d(1), T = null), (!D || b[0] & /*name*/
958
960
  16 && h !== (h = /*name*/
959
- a[4] + "_checkbox")) && c(s, "id", h), (!D || y[0] & /*auto, floating*/
961
+ a[4] + "_checkbox")) && c(s, "id", h), (!D || b[0] & /*auto, floating*/
960
962
  3 && d !== (d = /*auto*/
961
963
  a[0] !== "onsubmit" && (!/*floating*/
962
964
  a[1] || /*auto*/
963
- a[0] !== "off"))) && (s.required = d), y[0] & /*checked*/
965
+ a[0] !== "off"))) && (s.required = d), b[0] & /*checked*/
964
966
  256 && (s.checked = /*checked*/
965
- a[8]), (!D || y[0] & /*state*/
967
+ a[8]), (!D || b[0] & /*state*/
966
968
  128) && rt(
967
969
  l,
968
970
  "altcha-hidden",
969
971
  /*state*/
970
972
  a[7] === m.VERIFYING
971
- ), G === (G = Q(a)) && V ? V.p(a, y) : (V.d(1), V = G(a), V && (V.c(), V.m(A, null))), /*hidelogo*/
973
+ ), G === (G = Q(a)) && V ? V.p(a, b) : (V.d(1), V = G(a), V && (V.c(), V.m(A, null))), /*hidelogo*/
972
974
  a[3] !== !0 || /*isFreeSaaS*/
973
- a[12] ? v ? v.p(a, y) : (v = lt(a), v.c(), v.m(i, null)) : v && (v.d(1), v = null), /*error*/
975
+ a[12] ? k ? k.p(a, b) : (k = lt(a), k.c(), k.m(i, null)) : k && (k.d(1), k = null), /*error*/
974
976
  a[5] || /*state*/
975
- a[7] === m.EXPIRED ? P ? P.p(a, y) : (P = st(a), P.c(), P.m(t, O)) : P && (P.d(1), P = null), /*_strings*/
977
+ a[7] === m.EXPIRED ? P ? P.p(a, b) : (P = st(a), P.c(), P.m(t, U)) : P && (P.d(1), P = null), /*_strings*/
976
978
  a[11].footer && /*hidefooter*/
977
979
  (a[2] !== !0 || /*isFreeSaaS*/
978
- a[12]) ? S ? S.p(a, y) : (S = ft(a), S.c(), S.m(t, U)) : S && (S.d(1), S = null), /*floating*/
979
- a[1] ? p ? p.p(a, y) : (p = ct(a), p.c(), p.m(t, null)) : p && (p.d(1), p = null), (!D || y[0] & /*state*/
980
+ a[12]) ? S ? S.p(a, b) : (S = ft(a), S.c(), S.m(t, B)) : S && (S.d(1), S = null), /*floating*/
981
+ a[1] ? E ? E.p(a, b) : (E = ct(a), E.c(), E.m(t, null)) : E && (E.d(1), E = null), (!D || b[0] & /*state*/
980
982
  128) && c(
981
983
  t,
982
984
  "data-state",
983
985
  /*state*/
984
986
  a[7]
985
- ), (!D || y[0] & /*floating*/
987
+ ), (!D || b[0] & /*floating*/
986
988
  2) && c(
987
989
  t,
988
990
  "data-floating",
@@ -997,23 +999,23 @@ function Cn(n) {
997
999
  on(N, a), D = !1;
998
1000
  },
999
1001
  d(a) {
1000
- a && (j(e), j(t)), N && N.d(a), T && T.d(), V.d(), v && v.d(), P && P.d(), S && S.d(), p && p.d(), n[49](null), R = !1, Ee(X);
1002
+ a && (j(e), j(t)), N && N.d(a), T && T.d(), V.d(), k && k.d(), P && P.d(), S && S.d(), E && E.d(), n[49](null), R = !1, pe(X);
1001
1003
  }
1002
1004
  };
1003
1005
  }
1004
- const ut = "Visit Altcha.org", pt = "https://altcha.org/";
1006
+ const ut = "Visit Altcha.org", Et = "https://altcha.org/";
1005
1007
  function at(n) {
1006
1008
  return JSON.parse(n);
1007
1009
  }
1008
1010
  function An(n, e, t) {
1009
1011
  var Qe, et;
1010
- let i, o, l, s, { $$slots: h = {}, $$scope: d } = e, { auto: u = void 0 } = e, { blockspam: A = void 0 } = e, { challengeurl: b = void 0 } = e, { challengejson: Y = void 0 } = e, { debug: O = !1 } = e, { delay: U = 0 } = e, { expire: D = void 0 } = e, { floating: R = void 0 } = e, { floatinganchor: X = void 0 } = e, { floatingoffset: J = void 0 } = e, { hidefooter: N = !1 } = e, { hidelogo: T = !1 } = e, { name: Q = "altcha" } = e, { maxnumber: G = 1e6 } = e, { mockerror: V = !1 } = e, { obfuscated: v = void 0 } = e, { plugins: P = void 0 } = e, { refetchonexpire: S = !0 } = e, { spamfilter: p = !1 } = e, { strings: a = void 0 } = e, { test: y = !1 } = e, { verifyurl: ee = void 0 } = e, { workers: le = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ae = void 0 } = e;
1012
+ let i, o, l, s, { $$slots: h = {}, $$scope: d } = e, { auto: u = void 0 } = e, { blockspam: A = void 0 } = e, { challengeurl: _ = void 0 } = e, { challengejson: O = void 0 } = e, { debug: U = !1 } = e, { delay: B = 0 } = e, { expire: D = void 0 } = e, { floating: R = void 0 } = e, { floatinganchor: X = void 0 } = e, { floatingoffset: J = void 0 } = e, { hidefooter: N = !1 } = e, { hidelogo: T = !1 } = e, { name: Q = "altcha" } = e, { maxnumber: G = 1e6 } = e, { mockerror: V = !1 } = e, { obfuscated: k = void 0 } = e, { plugins: P = void 0 } = e, { refetchonexpire: S = !0 } = e, { spamfilter: E = !1 } = e, { strings: a = void 0 } = e, { test: b = !1 } = e, { verifyurl: ee = void 0 } = e, { workers: le = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ae = void 0 } = e;
1011
1013
  const he = Qt(), Pe = ["SHA-256", "SHA-384", "SHA-512"], Me = (et = (Qe = document.documentElement.lang) == null ? void 0 : Qe.split("-")) == null ? void 0 : et[0];
1012
- let re = !1, x, ie = null, se = null, _ = null, de = null, W = null, oe = null, te = [], C = m.UNVERIFIED;
1014
+ let re = !1, x, ie = null, se = null, y = null, de = null, Y = null, oe = null, te = [], C = m.UNVERIFIED;
1013
1015
  Kt(() => {
1014
- kt(), _ && (_.removeEventListener("submit", He), _.removeEventListener("reset", Oe), _.removeEventListener("focusin", $e), _ = null), W && (clearTimeout(W), W = null), document.removeEventListener("click", Ve), document.removeEventListener("scroll", je), window.removeEventListener("resize", Be);
1016
+ vt(), y && (y.removeEventListener("submit", He), y.removeEventListener("reset", Oe), y.removeEventListener("focusin", $e), y = null), Y && (clearTimeout(Y), Y = null), document.removeEventListener("click", Ve), document.removeEventListener("scroll", je), window.removeEventListener("resize", Be);
1015
1017
  }), zt(() => {
1016
- k("mounted", "1.0.6"), k("workers", le), It(), k("plugins", te.length ? te.map((r) => r.constructor.pluginName).join(", ") : "none"), y && k("using test mode"), D && ke(D), u !== void 0 && k("auto", u), R !== void 0 && qe(R), _ = x.closest("form"), _ && (_.addEventListener("submit", He, { capture: !0 }), _.addEventListener("reset", Oe), u === "onfocus" && _.addEventListener("focusin", $e)), u === "onload" && (v ? ge() : ne()), i && (N || T) && k("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
1018
+ v("mounted", "1.0.6"), v("workers", le), It(), v("plugins", te.length ? te.map((r) => r.constructor.pluginName).join(", ") : "none"), b && v("using test mode"), D && ve(D), u !== void 0 && v("auto", u), R !== void 0 && qe(R), y = x.closest("form"), y && (y.addEventListener("submit", He, { capture: !0 }), y.addEventListener("reset", Oe), u === "onfocus" && y.addEventListener("focusin", $e)), u === "onload" && (k ? ge() : ne()), i && (N || T) && v("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
1017
1019
  he("load");
1018
1020
  });
1019
1021
  });
@@ -1024,67 +1026,67 @@ function An(n, e, t) {
1024
1026
  number: f.number,
1025
1027
  salt: r.salt,
1026
1028
  signature: r.signature,
1027
- test: y ? !0 : void 0,
1029
+ test: b ? !0 : void 0,
1028
1030
  took: f.took
1029
1031
  }));
1030
1032
  }
1031
- function kt() {
1033
+ function vt() {
1032
1034
  for (const r of te)
1033
1035
  r.destroy();
1034
1036
  }
1035
1037
  function Ne() {
1036
- b && S && C === m.VERIFIED ? ne() : me(m.EXPIRED, s.expired);
1038
+ _ && S && C === m.VERIFIED ? ne() : me(m.EXPIRED, s.expired);
1037
1039
  }
1038
- async function vt() {
1040
+ async function kt() {
1039
1041
  var r;
1040
1042
  if (V)
1041
- throw k("mocking error"), new Error("Mocked error.");
1043
+ throw v("mocking error"), new Error("Mocked error.");
1042
1044
  if (o)
1043
- return k("using provided json data"), o;
1044
- if (y)
1045
- return k("generating test challenge", { test: y }), gn(typeof y != "boolean" ? +y : void 0);
1045
+ return v("using provided json data"), o;
1046
+ if (b)
1047
+ return v("generating test challenge", { test: b }), gn(typeof b != "boolean" ? +b : void 0);
1046
1048
  {
1047
- if (!b && _) {
1048
- const w = _.getAttribute("action");
1049
- w != null && w.includes("/form/") && t(15, b = w + "/altcha");
1049
+ if (!_ && y) {
1050
+ const w = y.getAttribute("action");
1051
+ w != null && w.includes("/form/") && t(15, _ = w + "/altcha");
1050
1052
  }
1051
- if (!b)
1053
+ if (!_)
1052
1054
  throw new Error("Attribute challengeurl not set.");
1053
- k("fetching challenge from", b);
1054
- const f = await fetch(b, {
1055
- headers: p ? { "x-altcha-spam-filter": "1" } : {}
1055
+ v("fetching challenge from", _);
1056
+ const f = await fetch(_, {
1057
+ headers: E ? { "x-altcha-spam-filter": "1" } : {}
1056
1058
  });
1057
1059
  if (f.status !== 200)
1058
1060
  throw new Error(`Server responded with ${f.status}.`);
1059
- const g = f.headers.get("Expires"), I = f.headers.get("X-Altcha-Config"), B = await f.json(), H = new URLSearchParams((r = B.salt.split("?")) == null ? void 0 : r[1]), M = H.get("expires") || H.get("expire");
1061
+ const g = f.headers.get("Expires"), I = f.headers.get("X-Altcha-Config"), q = await f.json(), H = new URLSearchParams((r = q.salt.split("?")) == null ? void 0 : r[1]), M = H.get("expires") || H.get("expire");
1060
1062
  if (M) {
1061
- const w = new Date(+M * 1e3), q = isNaN(w.getTime()) ? 0 : w.getTime() - Date.now();
1062
- q > 0 && ke(q);
1063
+ const w = new Date(+M * 1e3), Z = isNaN(w.getTime()) ? 0 : w.getTime() - Date.now();
1064
+ Z > 0 && ve(Z);
1063
1065
  }
1064
1066
  if (I)
1065
1067
  try {
1066
1068
  const w = JSON.parse(I);
1067
- w && typeof w == "object" && (w.verifyurl && (w.verifyurl = new URL(w.verifyurl, new URL(b)).toString()), Ye(w));
1069
+ w && typeof w == "object" && (w.verifyurl && (w.verifyurl = new URL(w.verifyurl, new URL(_)).toString()), Ge(w));
1068
1070
  } catch (w) {
1069
- k("unable to configure from X-Altcha-Config", w);
1071
+ v("unable to configure from X-Altcha-Config", w);
1070
1072
  }
1071
1073
  if (!D && (g != null && g.length)) {
1072
1074
  const w = Date.parse(g);
1073
1075
  if (w) {
1074
- const q = w - Date.now();
1075
- q > 0 && ke(q);
1076
+ const Z = w - Date.now();
1077
+ Z > 0 && ve(Z);
1076
1078
  }
1077
1079
  }
1078
- return B;
1080
+ return q;
1079
1081
  }
1080
1082
  }
1081
1083
  function xt(r) {
1082
1084
  var g;
1083
- const f = _ == null ? void 0 : _.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
1085
+ const f = y == null ? void 0 : y.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
1084
1086
  return ((g = f == null ? void 0 : f.value) == null ? void 0 : g.slice(f.value.indexOf("@"))) || void 0;
1085
1087
  }
1086
1088
  function Ct() {
1087
- return p === "ipAddress" ? {
1089
+ return E === "ipAddress" ? {
1088
1090
  blockedCountries: void 0,
1089
1091
  classifier: void 0,
1090
1092
  disableRules: void 0,
@@ -1095,7 +1097,7 @@ function An(n, e, t) {
1095
1097
  ipAddress: void 0,
1096
1098
  text: void 0,
1097
1099
  timeZone: void 0
1098
- } : typeof p == "object" ? p : {
1100
+ } : typeof E == "object" ? E : {
1099
1101
  blockedCountries: void 0,
1100
1102
  classifier: void 0,
1101
1103
  disableRules: void 0,
@@ -1110,11 +1112,11 @@ function An(n, e, t) {
1110
1112
  }
1111
1113
  function At(r) {
1112
1114
  return [
1113
- ...(_ == null ? void 0 : _.querySelectorAll(r != null && r.length ? r.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
1115
+ ...(y == null ? void 0 : y.querySelectorAll(r != null && r.length ? r.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
1114
1116
  ].reduce(
1115
1117
  (g, I) => {
1116
- const B = I.name, H = I.value;
1117
- return B && H && (g[B] = /\n/.test(H) ? H.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
1118
+ const q = I.name, H = I.value;
1119
+ return q && H && (g[q] = /\n/.test(H) ? H.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
1118
1120
  `) : H), g;
1119
1121
  },
1120
1122
  {}
@@ -1127,29 +1129,29 @@ function An(n, e, t) {
1127
1129
  el: x,
1128
1130
  clarify: ge,
1129
1131
  dispatch: he,
1130
- getConfiguration: We,
1132
+ getConfiguration: Ye,
1131
1133
  getFloatingAnchor: Xe,
1132
1134
  getState: Je,
1133
- log: k,
1135
+ log: v,
1134
1136
  reset: me,
1135
- solve: Ge,
1137
+ solve: We,
1136
1138
  setState: Ke,
1137
1139
  setFloatingAnchor: ze,
1138
1140
  verify: ne
1139
1141
  }));
1140
1142
  }
1141
- function k(...r) {
1142
- (O || r.some((f) => f instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Q}]`, ...r);
1143
+ function v(...r) {
1144
+ (U || r.some((f) => f instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Q}]`, ...r);
1143
1145
  }
1144
1146
  function Lt() {
1145
- [m.UNVERIFIED, m.ERROR, m.EXPIRED].includes(C) ? p && (_ == null ? void 0 : _.reportValidity()) === !1 ? t(8, re = !1) : v ? ge() : ne() : t(8, re = !0);
1147
+ [m.UNVERIFIED, m.ERROR, m.EXPIRED].includes(C) ? E && (y == null ? void 0 : y.reportValidity()) === !1 ? t(8, re = !1) : k ? ge() : ne() : t(8, re = !0);
1146
1148
  }
1147
1149
  function Ve(r) {
1148
1150
  const f = r.target;
1149
1151
  R && f && !x.contains(f) && (C === m.VERIFIED || u === "off" && C === m.UNVERIFIED) && t(9, x.style.display = "none", x);
1150
1152
  }
1151
1153
  function je() {
1152
- R && C !== m.UNVERIFIED && pe();
1154
+ R && C !== m.UNVERIFIED && Ee();
1153
1155
  }
1154
1156
  function Rt(r) {
1155
1157
  for (const f of te)
@@ -1159,9 +1161,9 @@ function An(n, e, t) {
1159
1161
  C === m.UNVERIFIED && ne();
1160
1162
  }
1161
1163
  function He(r) {
1162
- _ && u === "onsubmit" ? C === m.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ne().then(() => {
1163
- _ == null || _.requestSubmit();
1164
- })) : C !== m.VERIFIED && (r.preventDefault(), r.stopPropagation(), C === m.VERIFYING && Ue()) : _ && R && u === "off" && C === m.UNVERIFIED && (r.preventDefault(), r.stopPropagation(), t(9, x.style.display = "block", x), pe());
1164
+ y && u === "onsubmit" ? C === m.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ne().then(() => {
1165
+ y == null || y.requestSubmit();
1166
+ })) : C !== m.VERIFIED && (r.preventDefault(), r.stopPropagation(), C === m.VERIFYING && Ue()) : y && R && u === "off" && C === m.UNVERIFIED && (r.preventDefault(), r.stopPropagation(), t(9, x.style.display = "block", x), Ee());
1165
1167
  }
1166
1168
  function Oe() {
1167
1169
  me();
@@ -1173,31 +1175,31 @@ function An(n, e, t) {
1173
1175
  for (const f of te)
1174
1176
  typeof f.onStateChange == "function" && f.onStateChange(C);
1175
1177
  R && C !== m.UNVERIFIED && requestAnimationFrame(() => {
1176
- pe();
1178
+ Ee();
1177
1179
  }), t(8, re = C === m.VERIFIED);
1178
1180
  }
1179
1181
  function Be() {
1180
- R && pe();
1182
+ R && Ee();
1181
1183
  }
1182
- function pe(r = 20) {
1184
+ function Ee(r = 20) {
1183
1185
  if (x)
1184
- if (se || (se = (X ? document.querySelector(X) : _ == null ? void 0 : _.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || _), se) {
1185
- const f = parseInt(J, 10) || 12, g = se.getBoundingClientRect(), I = x.getBoundingClientRect(), B = document.documentElement.clientHeight, H = document.documentElement.clientWidth, M = R === "auto" ? g.bottom + I.height + f + r > B : R === "top", w = Math.max(r, Math.min(H - r - I.width, g.left + g.width / 2 - I.width / 2));
1186
+ if (se || (se = (X ? document.querySelector(X) : y == null ? void 0 : y.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || y), se) {
1187
+ const f = parseInt(J, 10) || 12, g = se.getBoundingClientRect(), I = x.getBoundingClientRect(), q = document.documentElement.clientHeight, H = document.documentElement.clientWidth, M = R === "auto" ? g.bottom + I.height + f + r > q : R === "top", w = Math.max(r, Math.min(H - r - I.width, g.left + g.width / 2 - I.width / 2));
1186
1188
  if (M ? t(9, x.style.top = `${g.top - (I.height + f)}px`, x) : t(9, x.style.top = `${g.bottom + f}px`, x), t(9, x.style.left = `${w}px`, x), x.setAttribute("data-floating", M ? "top" : "bottom"), ie) {
1187
- const q = ie.getBoundingClientRect();
1188
- t(10, ie.style.left = g.left - w + g.width / 2 - q.width / 2 + "px", ie);
1189
+ const Z = ie.getBoundingClientRect();
1190
+ t(10, ie.style.left = g.left - w + g.width / 2 - Z.width / 2 + "px", ie);
1189
1191
  }
1190
1192
  } else
1191
- k("unable to find floating anchor element");
1193
+ v("unable to find floating anchor element");
1192
1194
  }
1193
1195
  async function Dt(r) {
1194
1196
  if (!ee)
1195
1197
  throw new Error("Attribute verifyurl not set.");
1196
- k("requesting server verification from", ee);
1198
+ v("requesting server verification from", ee);
1197
1199
  const f = { payload: r };
1198
- if (p) {
1199
- const { blockedCountries: B, classifier: H, disableRules: M, email: w, expectedLanguages: q, expectedCountries: Ie, fields: be, ipAddress: ye, text: Vt, timeZone: tt } = Ct();
1200
- f.blockedCountries = B, f.classifier = H, f.disableRules = M, f.email = w === !1 ? void 0 : xt(w), f.expectedCountries = Ie, f.expectedLanguages = q || (Me ? [Me] : void 0), f.fields = be === !1 ? void 0 : At(be), f.ipAddress = ye === !1 ? void 0 : ye || "auto", f.text = Vt, f.timeZone = tt === !1 ? void 0 : tt || bn();
1200
+ if (E) {
1201
+ const { blockedCountries: q, classifier: H, disableRules: M, email: w, expectedLanguages: Z, expectedCountries: Ie, fields: be, ipAddress: ye, text: Vt, timeZone: tt } = Ct();
1202
+ f.blockedCountries = q, f.classifier = H, f.disableRules = M, f.email = w === !1 ? void 0 : xt(w), f.expectedCountries = Ie, f.expectedLanguages = Z || (Me ? [Me] : void 0), f.fields = be === !1 ? void 0 : At(be), f.ipAddress = ye === !1 ? void 0 : ye || "auto", f.text = Vt, f.timeZone = tt === !1 ? void 0 : tt || bn();
1201
1203
  }
1202
1204
  const g = await fetch(ee, {
1203
1205
  body: JSON.stringify(f),
@@ -1210,11 +1212,11 @@ function An(n, e, t) {
1210
1212
  if (I != null && I.payload && t(6, oe = I.payload), he("serververification", I), A && I.classification === "BAD")
1211
1213
  throw new Error("SpamFilter returned negative classification.");
1212
1214
  }
1213
- function ke(r) {
1214
- k("expire", r), W && (clearTimeout(W), W = null), r < 1 ? Ne() : W = setTimeout(Ne, r);
1215
+ function ve(r) {
1216
+ v("expire", r), Y && (clearTimeout(Y), Y = null), r < 1 ? Ne() : Y = setTimeout(Ne, r);
1215
1217
  }
1216
1218
  function qe(r) {
1217
- k("floating", r), R !== r && (t(9, x.style.left = "", x), t(9, x.style.top = "", x)), t(1, R = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : R), R ? (u || t(0, u = "onsubmit"), document.addEventListener("scroll", je), document.addEventListener("click", Ve), window.addEventListener("resize", Be)) : u === "onsubmit" && t(0, u = void 0);
1219
+ v("floating", r), R !== r && (t(9, x.style.left = "", x), t(9, x.style.top = "", x)), t(1, R = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : R), R ? (u || t(0, u = "onsubmit"), document.addEventListener("scroll", je), document.addEventListener("click", Ve), window.addEventListener("resize", Be)) : u === "onsubmit" && t(0, u = void 0);
1218
1220
  }
1219
1221
  function Ze(r) {
1220
1222
  if (!r.algorithm)
@@ -1228,13 +1230,13 @@ function An(n, e, t) {
1228
1230
  if (!r.salt || r.salt.length < 10)
1229
1231
  throw new Error("Salt is too short. Min. 10 chars.");
1230
1232
  }
1231
- async function Ge(r) {
1233
+ async function We(r) {
1232
1234
  let f = null;
1233
1235
  if ("Worker" in window) {
1234
1236
  try {
1235
1237
  f = await Tt(r, r.maxnumber);
1236
1238
  } catch (g) {
1237
- k(g);
1239
+ v(g);
1238
1240
  }
1239
1241
  if ((f == null ? void 0 : f.number) !== void 0 || "obfuscated" in r)
1240
1242
  return { data: r, solution: f };
@@ -1248,13 +1250,13 @@ function An(n, e, t) {
1248
1250
  solution: await mn(r.challenge, r.salt, r.algorithm, r.maxnumber || G).promise
1249
1251
  };
1250
1252
  }
1251
- async function Tt(r, f = typeof y == "number" ? y : G, g = Math.ceil(le)) {
1253
+ async function Tt(r, f = typeof b == "number" ? b : G, g = Math.ceil(le)) {
1252
1254
  const I = [];
1253
1255
  g = Math.min(16, Math.max(1, g));
1254
1256
  for (let M = 0; M < g; M++)
1255
1257
  I.push(altchaCreateWorker(ae));
1256
- const B = Math.ceil(f / g), H = await Promise.all(I.map((M, w) => {
1257
- const q = w * B;
1258
+ const q = Math.ceil(f / g), H = await Promise.all(I.map((M, w) => {
1259
+ const Z = w * q;
1258
1260
  return new Promise((Ie) => {
1259
1261
  M.addEventListener("message", (be) => {
1260
1262
  if (be.data)
@@ -1263,8 +1265,8 @@ function An(n, e, t) {
1263
1265
  Ie(be.data);
1264
1266
  }), M.postMessage({
1265
1267
  payload: r,
1266
- max: q + B,
1267
- start: q,
1268
+ max: Z + q,
1269
+ start: Z,
1268
1270
  type: "work"
1269
1271
  });
1270
1272
  });
@@ -1274,28 +1276,28 @@ function An(n, e, t) {
1274
1276
  return H.find((M) => !!M) || null;
1275
1277
  }
1276
1278
  async function ge() {
1277
- if (!v) {
1279
+ if (!k) {
1278
1280
  t(7, C = m.ERROR);
1279
1281
  return;
1280
1282
  }
1281
1283
  const r = te.find((f) => f.constructor.pluginName === "obfuscation");
1282
1284
  if (!r || !("clarify" in r)) {
1283
- t(7, C = m.ERROR), k("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
1285
+ t(7, C = m.ERROR), v("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
1284
1286
  return;
1285
1287
  }
1286
1288
  if ("clarify" in r && typeof r.clarify == "function")
1287
1289
  return r.clarify();
1288
1290
  }
1289
- function Ye(r) {
1290
- r.obfuscated !== void 0 && t(24, v = r.obfuscated), r.auto !== void 0 && (t(0, u = r.auto), u === "onload" && (v ? ge() : ne())), r.blockspam !== void 0 && t(16, A = !!r.blockspam), r.floatinganchor !== void 0 && t(20, X = r.floatinganchor), r.delay !== void 0 && t(18, U = r.delay), r.floatingoffset !== void 0 && t(21, J = r.floatingoffset), r.floating !== void 0 && qe(r.floating), r.expire !== void 0 && (ke(r.expire), t(19, D = r.expire)), r.challenge && (Ze(r.challenge), o = r.challenge), r.challengeurl !== void 0 && t(15, b = r.challengeurl), r.debug !== void 0 && t(17, O = !!r.debug), r.hidefooter !== void 0 && t(2, N = !!r.hidefooter), r.hidelogo !== void 0 && t(3, T = !!r.hidelogo), r.maxnumber !== void 0 && t(22, G = +r.maxnumber), r.mockerror !== void 0 && t(23, V = !!r.mockerror), r.name !== void 0 && t(4, Q = r.name), r.refetchonexpire !== void 0 && t(25, S = !!r.refetchonexpire), r.spamfilter !== void 0 && t(26, p = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(44, l = r.strings), r.test !== void 0 && t(27, y = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(28, ee = r.verifyurl), r.workers !== void 0 && t(29, le = +r.workers), r.workerurl !== void 0 && t(30, ae = r.workerurl);
1291
+ function Ge(r) {
1292
+ r.obfuscated !== void 0 && t(24, k = r.obfuscated), r.auto !== void 0 && (t(0, u = r.auto), u === "onload" && (k ? ge() : ne())), r.blockspam !== void 0 && t(16, A = !!r.blockspam), r.floatinganchor !== void 0 && t(20, X = r.floatinganchor), r.delay !== void 0 && t(18, B = r.delay), r.floatingoffset !== void 0 && t(21, J = r.floatingoffset), r.floating !== void 0 && qe(r.floating), r.expire !== void 0 && (ve(r.expire), t(19, D = r.expire)), r.challenge && (Ze(r.challenge), o = r.challenge), r.challengeurl !== void 0 && t(15, _ = r.challengeurl), r.debug !== void 0 && t(17, U = !!r.debug), r.hidefooter !== void 0 && t(2, N = !!r.hidefooter), r.hidelogo !== void 0 && t(3, T = !!r.hidelogo), r.maxnumber !== void 0 && t(22, G = +r.maxnumber), r.mockerror !== void 0 && t(23, V = !!r.mockerror), r.name !== void 0 && t(4, Q = r.name), r.refetchonexpire !== void 0 && t(25, S = !!r.refetchonexpire), r.spamfilter !== void 0 && t(26, E = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(44, l = r.strings), r.test !== void 0 && t(27, b = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(28, ee = r.verifyurl), r.workers !== void 0 && t(29, le = +r.workers), r.workerurl !== void 0 && t(30, ae = r.workerurl);
1291
1293
  }
1292
- function We() {
1294
+ function Ye() {
1293
1295
  return {
1294
1296
  auto: u,
1295
1297
  blockspam: A,
1296
- challengeurl: b,
1297
- debug: O,
1298
- delay: U,
1298
+ challengeurl: _,
1299
+ debug: U,
1300
+ delay: B,
1299
1301
  expire: D,
1300
1302
  floating: R,
1301
1303
  floatinganchor: X,
@@ -1305,11 +1307,11 @@ function An(n, e, t) {
1305
1307
  name: Q,
1306
1308
  maxnumber: G,
1307
1309
  mockerror: V,
1308
- obfuscated: v,
1310
+ obfuscated: k,
1309
1311
  refetchonexpire: S,
1310
- spamfilter: p,
1312
+ spamfilter: E,
1311
1313
  strings: s,
1312
- test: y,
1314
+ test: b,
1313
1315
  verifyurl: ee,
1314
1316
  workers: le,
1315
1317
  workerurl: ae
@@ -1325,7 +1327,7 @@ function An(n, e, t) {
1325
1327
  return C;
1326
1328
  }
1327
1329
  function me(r = m.UNVERIFIED, f = null) {
1328
- W && (clearTimeout(W), W = null), t(8, re = !1), t(5, de = f), t(6, oe = null), t(7, C = r);
1330
+ Y && (clearTimeout(Y), Y = null), t(8, re = !1), t(5, de = f), t(6, oe = null), t(7, C = r);
1329
1331
  }
1330
1332
  function ze(r) {
1331
1333
  se = r;
@@ -1334,20 +1336,20 @@ function An(n, e, t) {
1334
1336
  t(7, C = r), t(5, de = f);
1335
1337
  }
1336
1338
  async function ne() {
1337
- return me(m.VERIFYING), await new Promise((r) => setTimeout(r, U || 0)), vt().then((r) => (Ze(r), k("challenge", r), Ge(r))).then(({ data: r, solution: f }) => {
1338
- if (k("solution", f), "challenge" in r && f && !("clearText" in f))
1339
+ return me(m.VERIFYING), await new Promise((r) => setTimeout(r, B || 0)), kt().then((r) => (Ze(r), v("challenge", r), We(r))).then(({ data: r, solution: f }) => {
1340
+ if (v("solution", f), "challenge" in r && f && !("clearText" in f))
1339
1341
  if ((f == null ? void 0 : f.number) !== void 0) {
1340
1342
  if (ee)
1341
1343
  return Dt(Fe(r, f));
1342
- t(6, oe = Fe(r, f)), k("payload", oe);
1344
+ t(6, oe = Fe(r, f)), v("payload", oe);
1343
1345
  } else
1344
- throw k("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
1346
+ throw v("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
1345
1347
  }).then(() => {
1346
- t(7, C = m.VERIFIED), k("verified"), en().then(() => {
1348
+ t(7, C = m.VERIFIED), v("verified"), en().then(() => {
1347
1349
  he("verified", { payload: oe });
1348
1350
  });
1349
1351
  }).catch((r) => {
1350
- k(r), t(7, C = m.ERROR), t(5, de = r.message);
1352
+ v(r), t(7, C = m.ERROR), t(5, de = r.message);
1351
1353
  });
1352
1354
  }
1353
1355
  function Mt() {
@@ -1364,17 +1366,18 @@ function An(n, e, t) {
1364
1366
  });
1365
1367
  }
1366
1368
  return n.$$set = (r) => {
1367
- "auto" in r && t(0, u = r.auto), "blockspam" in r && t(16, A = r.blockspam), "challengeurl" in r && t(15, b = r.challengeurl), "challengejson" in r && t(31, Y = r.challengejson), "debug" in r && t(17, O = r.debug), "delay" in r && t(18, U = r.delay), "expire" in r && t(19, D = r.expire), "floating" in r && t(1, R = r.floating), "floatinganchor" in r && t(20, X = r.floatinganchor), "floatingoffset" in r && t(21, J = r.floatingoffset), "hidefooter" in r && t(2, N = r.hidefooter), "hidelogo" in r && t(3, T = r.hidelogo), "name" in r && t(4, Q = r.name), "maxnumber" in r && t(22, G = r.maxnumber), "mockerror" in r && t(23, V = r.mockerror), "obfuscated" in r && t(24, v = r.obfuscated), "plugins" in r && t(32, P = r.plugins), "refetchonexpire" in r && t(25, S = r.refetchonexpire), "spamfilter" in r && t(26, p = r.spamfilter), "strings" in r && t(33, a = r.strings), "test" in r && t(27, y = r.test), "verifyurl" in r && t(28, ee = r.verifyurl), "workers" in r && t(29, le = r.workers), "workerurl" in r && t(30, ae = r.workerurl), "$$scope" in r && t(45, d = r.$$scope);
1369
+ "auto" in r && t(0, u = r.auto), "blockspam" in r && t(16, A = r.blockspam), "challengeurl" in r && t(15, _ = r.challengeurl), "challengejson" in r && t(31, O = r.challengejson), "debug" in r && t(17, U = r.debug), "delay" in r && t(18, B = r.delay), "expire" in r && t(19, D = r.expire), "floating" in r && t(1, R = r.floating), "floatinganchor" in r && t(20, X = r.floatinganchor), "floatingoffset" in r && t(21, J = r.floatingoffset), "hidefooter" in r && t(2, N = r.hidefooter), "hidelogo" in r && t(3, T = r.hidelogo), "name" in r && t(4, Q = r.name), "maxnumber" in r && t(22, G = r.maxnumber), "mockerror" in r && t(23, V = r.mockerror), "obfuscated" in r && t(24, k = r.obfuscated), "plugins" in r && t(32, P = r.plugins), "refetchonexpire" in r && t(25, S = r.refetchonexpire), "spamfilter" in r && t(26, E = r.spamfilter), "strings" in r && t(33, a = r.strings), "test" in r && t(27, b = r.test), "verifyurl" in r && t(28, ee = r.verifyurl), "workers" in r && t(29, le = r.workers), "workerurl" in r && t(30, ae = r.workerurl), "$$scope" in r && t(45, d = r.$$scope);
1368
1370
  }, n.$$.update = () => {
1369
1371
  n.$$.dirty[0] & /*challengeurl*/
1370
- 32768 && t(12, i = !!(b != null && b.includes(".altcha.org")) && !!(b != null && b.includes("apiKey=ckey_"))), n.$$.dirty[1] & /*challengejson*/
1371
- 1 && (o = Y ? at(Y) : void 0), n.$$.dirty[1] & /*strings*/
1372
+ 32768 | n.$$.dirty[1] & /*challengejson*/
1373
+ 1 && t(12, i = O && new URL(O, location.origin).host.endsWith(".altcha.org") && !!(_ != null && _.includes("apiKey=ckey_"))), n.$$.dirty[1] & /*challengejson*/
1374
+ 1 && (o = O ? at(O) : void 0), n.$$.dirty[1] & /*strings*/
1372
1375
  4 && t(44, l = a ? at(a) : {}), n.$$.dirty[1] & /*parsedStrings*/
1373
1376
  8192 && t(11, s = {
1374
1377
  ariaLinkLabel: ut,
1375
1378
  error: "Verification failed. Try again later.",
1376
1379
  expired: "Verification expired. Try again.",
1377
- footer: `Protected by <a href="${pt}" target="_blank" aria-label="${l.ariaLinkLabel || ut}">ALTCHA</a>`,
1380
+ footer: `Protected by <a href="${Et}" target="_blank" aria-label="${l.ariaLinkLabel || ut}">ALTCHA</a>`,
1378
1381
  label: "I'm not a robot",
1379
1382
  verified: "Verified",
1380
1383
  verifying: "Verifying...",
@@ -1400,28 +1403,28 @@ function An(n, e, t) {
1400
1403
  i,
1401
1404
  Lt,
1402
1405
  Ue,
1403
- b,
1406
+ _,
1404
1407
  A,
1405
- O,
1406
1408
  U,
1409
+ B,
1407
1410
  D,
1408
1411
  X,
1409
1412
  J,
1410
1413
  G,
1411
1414
  V,
1412
- v,
1415
+ k,
1413
1416
  S,
1414
- p,
1415
- y,
1417
+ E,
1418
+ b,
1416
1419
  ee,
1417
1420
  le,
1418
1421
  ae,
1419
- Y,
1422
+ O,
1420
1423
  P,
1421
1424
  a,
1422
1425
  ge,
1426
+ Ge,
1423
1427
  Ye,
1424
- We,
1425
1428
  Xe,
1426
1429
  Pt,
1427
1430
  Je,
@@ -1489,145 +1492,145 @@ class In extends an {
1489
1492
  return this.$$.ctx[0];
1490
1493
  }
1491
1494
  set auto(e) {
1492
- this.$$set({ auto: e }), E();
1495
+ this.$$set({ auto: e }), p();
1493
1496
  }
1494
1497
  get blockspam() {
1495
1498
  return this.$$.ctx[16];
1496
1499
  }
1497
1500
  set blockspam(e) {
1498
- this.$$set({ blockspam: e }), E();
1501
+ this.$$set({ blockspam: e }), p();
1499
1502
  }
1500
1503
  get challengeurl() {
1501
1504
  return this.$$.ctx[15];
1502
1505
  }
1503
1506
  set challengeurl(e) {
1504
- this.$$set({ challengeurl: e }), E();
1507
+ this.$$set({ challengeurl: e }), p();
1505
1508
  }
1506
1509
  get challengejson() {
1507
1510
  return this.$$.ctx[31];
1508
1511
  }
1509
1512
  set challengejson(e) {
1510
- this.$$set({ challengejson: e }), E();
1513
+ this.$$set({ challengejson: e }), p();
1511
1514
  }
1512
1515
  get debug() {
1513
1516
  return this.$$.ctx[17];
1514
1517
  }
1515
1518
  set debug(e) {
1516
- this.$$set({ debug: e }), E();
1519
+ this.$$set({ debug: e }), p();
1517
1520
  }
1518
1521
  get delay() {
1519
1522
  return this.$$.ctx[18];
1520
1523
  }
1521
1524
  set delay(e) {
1522
- this.$$set({ delay: e }), E();
1525
+ this.$$set({ delay: e }), p();
1523
1526
  }
1524
1527
  get expire() {
1525
1528
  return this.$$.ctx[19];
1526
1529
  }
1527
1530
  set expire(e) {
1528
- this.$$set({ expire: e }), E();
1531
+ this.$$set({ expire: e }), p();
1529
1532
  }
1530
1533
  get floating() {
1531
1534
  return this.$$.ctx[1];
1532
1535
  }
1533
1536
  set floating(e) {
1534
- this.$$set({ floating: e }), E();
1537
+ this.$$set({ floating: e }), p();
1535
1538
  }
1536
1539
  get floatinganchor() {
1537
1540
  return this.$$.ctx[20];
1538
1541
  }
1539
1542
  set floatinganchor(e) {
1540
- this.$$set({ floatinganchor: e }), E();
1543
+ this.$$set({ floatinganchor: e }), p();
1541
1544
  }
1542
1545
  get floatingoffset() {
1543
1546
  return this.$$.ctx[21];
1544
1547
  }
1545
1548
  set floatingoffset(e) {
1546
- this.$$set({ floatingoffset: e }), E();
1549
+ this.$$set({ floatingoffset: e }), p();
1547
1550
  }
1548
1551
  get hidefooter() {
1549
1552
  return this.$$.ctx[2];
1550
1553
  }
1551
1554
  set hidefooter(e) {
1552
- this.$$set({ hidefooter: e }), E();
1555
+ this.$$set({ hidefooter: e }), p();
1553
1556
  }
1554
1557
  get hidelogo() {
1555
1558
  return this.$$.ctx[3];
1556
1559
  }
1557
1560
  set hidelogo(e) {
1558
- this.$$set({ hidelogo: e }), E();
1561
+ this.$$set({ hidelogo: e }), p();
1559
1562
  }
1560
1563
  get name() {
1561
1564
  return this.$$.ctx[4];
1562
1565
  }
1563
1566
  set name(e) {
1564
- this.$$set({ name: e }), E();
1567
+ this.$$set({ name: e }), p();
1565
1568
  }
1566
1569
  get maxnumber() {
1567
1570
  return this.$$.ctx[22];
1568
1571
  }
1569
1572
  set maxnumber(e) {
1570
- this.$$set({ maxnumber: e }), E();
1573
+ this.$$set({ maxnumber: e }), p();
1571
1574
  }
1572
1575
  get mockerror() {
1573
1576
  return this.$$.ctx[23];
1574
1577
  }
1575
1578
  set mockerror(e) {
1576
- this.$$set({ mockerror: e }), E();
1579
+ this.$$set({ mockerror: e }), p();
1577
1580
  }
1578
1581
  get obfuscated() {
1579
1582
  return this.$$.ctx[24];
1580
1583
  }
1581
1584
  set obfuscated(e) {
1582
- this.$$set({ obfuscated: e }), E();
1585
+ this.$$set({ obfuscated: e }), p();
1583
1586
  }
1584
1587
  get plugins() {
1585
1588
  return this.$$.ctx[32];
1586
1589
  }
1587
1590
  set plugins(e) {
1588
- this.$$set({ plugins: e }), E();
1591
+ this.$$set({ plugins: e }), p();
1589
1592
  }
1590
1593
  get refetchonexpire() {
1591
1594
  return this.$$.ctx[25];
1592
1595
  }
1593
1596
  set refetchonexpire(e) {
1594
- this.$$set({ refetchonexpire: e }), E();
1597
+ this.$$set({ refetchonexpire: e }), p();
1595
1598
  }
1596
1599
  get spamfilter() {
1597
1600
  return this.$$.ctx[26];
1598
1601
  }
1599
1602
  set spamfilter(e) {
1600
- this.$$set({ spamfilter: e }), E();
1603
+ this.$$set({ spamfilter: e }), p();
1601
1604
  }
1602
1605
  get strings() {
1603
1606
  return this.$$.ctx[33];
1604
1607
  }
1605
1608
  set strings(e) {
1606
- this.$$set({ strings: e }), E();
1609
+ this.$$set({ strings: e }), p();
1607
1610
  }
1608
1611
  get test() {
1609
1612
  return this.$$.ctx[27];
1610
1613
  }
1611
1614
  set test(e) {
1612
- this.$$set({ test: e }), E();
1615
+ this.$$set({ test: e }), p();
1613
1616
  }
1614
1617
  get verifyurl() {
1615
1618
  return this.$$.ctx[28];
1616
1619
  }
1617
1620
  set verifyurl(e) {
1618
- this.$$set({ verifyurl: e }), E();
1621
+ this.$$set({ verifyurl: e }), p();
1619
1622
  }
1620
1623
  get workers() {
1621
1624
  return this.$$.ctx[29];
1622
1625
  }
1623
1626
  set workers(e) {
1624
- this.$$set({ workers: e }), E();
1627
+ this.$$set({ workers: e }), p();
1625
1628
  }
1626
1629
  get workerurl() {
1627
1630
  return this.$$.ctx[30];
1628
1631
  }
1629
1632
  set workerurl(e) {
1630
- this.$$set({ workerurl: e }), E();
1633
+ this.$$set({ workerurl: e }), p();
1631
1634
  }
1632
1635
  get clarify() {
1633
1636
  return this.$$.ctx[34];