altcha 0.9.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  var jt = Object.defineProperty;
2
- var Ht = (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) => Ht(n, typeof e != "symbol" ? e + "" : e, t);
4
- function xe() {
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);
4
+ function Ce() {
5
5
  }
6
- function Ot(n, e) {
6
+ function Ht(n, e) {
7
7
  for (const t in e) n[t] = e[t];
8
8
  return (
9
9
  /** @type {T & S} */
@@ -16,16 +16,16 @@ function ht(n) {
16
16
  function nt() {
17
17
  return /* @__PURE__ */ Object.create(null);
18
18
  }
19
- function pe(n) {
19
+ function Ee(n) {
20
20
  n.forEach(ht);
21
21
  }
22
22
  function dt(n) {
23
23
  return typeof n == "function";
24
24
  }
25
- function Ut(n, e) {
25
+ function Ot(n, e) {
26
26
  return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
27
27
  }
28
- function $t(n) {
28
+ function Ut(n) {
29
29
  return Object.keys(n).length === 0;
30
30
  }
31
31
  function Bt(n, e, t, i) {
@@ -35,7 +35,7 @@ function Bt(n, e, t, i) {
35
35
  }
36
36
  }
37
37
  function gt(n, e, t, i) {
38
- return n[1] && i ? Ot(t.ctx.slice(), n[1](i(e))) : t.ctx;
38
+ return n[1] && i ? Ht(t.ctx.slice(), n[1](i(e))) : t.ctx;
39
39
  }
40
40
  function qt(n, e, t, i) {
41
41
  if (n[2] && i) {
@@ -70,7 +70,7 @@ function Gt(n) {
70
70
  function L(n, e) {
71
71
  n.appendChild(e);
72
72
  }
73
- function H(n, e, t) {
73
+ function $(n, e, t) {
74
74
  n.insertBefore(e, t || null);
75
75
  }
76
76
  function j(n) {
@@ -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(p));
152
+ Se || (Se = !0, mt.then(E));
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 p() {
162
+ function E() {
163
163
  if (fe !== 0)
164
164
  return;
165
165
  const n = we;
@@ -185,7 +185,7 @@ function p() {
185
185
  }
186
186
  function tn(n) {
187
187
  if (n.fragment !== null) {
188
- n.update(), pe(n.before_update);
188
+ n.update(), Ee(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
  }
@@ -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) : pe(l), n.$$.on_mount = [];
214
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : Ee(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), pe(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), Ee(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;
@@ -229,7 +229,7 @@ function cn(n, e, t, i, o, l, s = null, h = [-1]) {
229
229
  ctx: [],
230
230
  // state
231
231
  props: l,
232
- update: xe,
232
+ update: Ce,
233
233
  not_equal: o,
234
234
  bound: nt(),
235
235
  // lifecycle
@@ -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, ...U) => {
251
- const $ = U.length ? U[0] : Y;
252
- return u.ctx && o(u.ctx[b], u.ctx[b] = $) && (!u.skip_bound && u.bound[b] && u.bound[b]($), A && fn(n, b)), Y;
253
- }) : [], u.update(), A = !0, pe(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
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) {
254
254
  if (e.hydrate) {
255
255
  const b = Wt(e.target);
256
256
  u.fragment && u.fragment.l(b), b.forEach(j);
257
257
  } else
258
258
  u.fragment && u.fragment.c();
259
- e.intro && yt(n.$$.fragment), ln(n, e.target, e.anchor), p();
259
+ e.intro && yt(n.$$.fragment), ln(n, e.target, e.anchor), E();
260
260
  }
261
261
  _e(d);
262
262
  }
@@ -296,6 +296,10 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
296
296
  const o = this.$$l_u.get(t);
297
297
  o && (o(), this.$$l_u.delete(t));
298
298
  }
299
+ if (this.$$l[e]) {
300
+ const o = this.$$l[e].indexOf(t);
301
+ o >= 0 && this.$$l[e].splice(o, 1);
302
+ }
299
303
  }
300
304
  async connectedCallback() {
301
305
  if (this.$$cn = !0, !this.$$c) {
@@ -311,7 +315,7 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
311
315
  * @param {HTMLElement} [anchor]
312
316
  */
313
317
  m: function(u, A) {
314
- H(u, s, A);
318
+ $(u, s, A);
315
319
  },
316
320
  d: function(u) {
317
321
  u && j(s);
@@ -326,7 +330,7 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
326
330
  l in i && (t[l] = [e(l)]);
327
331
  for (const l of this.attributes) {
328
332
  const s = this.$$g_p(l.name);
329
- s in this.$$d || (this.$$d[s] = Ce(s, l.value, this.$$p_d, "toProp"));
333
+ s in this.$$d || (this.$$d[s] = xe(s, l.value, this.$$p_d, "toProp"));
330
334
  }
331
335
  for (const l in this.$$p_d)
332
336
  !(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
@@ -344,7 +348,7 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
344
348
  this.$$r = !0;
345
349
  for (const l in this.$$p_d)
346
350
  if (this.$$d[l] = this.$$c.$$.ctx[this.$$c.$$.props[l]], this.$$p_d[l].reflect) {
347
- const s = Ce(
351
+ const s = xe(
348
352
  l,
349
353
  this.$$d[l],
350
354
  this.$$p_d,
@@ -367,7 +371,7 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
367
371
  // and setting attributes through setAttribute etc, this is helpful
368
372
  attributeChangedCallback(e, t, i) {
369
373
  var o;
370
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = Ce(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
374
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = xe(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
371
375
  }
372
376
  disconnectedCallback() {
373
377
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -380,7 +384,7 @@ typeof HTMLElement == "function" && (_t = class extends HTMLElement {
380
384
  ) || e;
381
385
  }
382
386
  });
383
- function Ce(n, e, t, i) {
387
+ function xe(n, e, t, i) {
384
388
  var l;
385
389
  const o = (l = t[n]) == null ? void 0 : l.type;
386
390
  if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
@@ -428,7 +432,7 @@ function un(n, e, t, i, o, l) {
428
432
  },
429
433
  set(d) {
430
434
  var u;
431
- d = Ce(h, d, e), this.$$d[h] = d, (u = this.$$c) == null || u.$set({ [h]: d });
435
+ d = xe(h, d, e), this.$$d[h] = d, (u = this.$$c) == null || u.$set({ [h]: d });
432
436
  }
433
437
  });
434
438
  }), i.forEach((h) => {
@@ -462,7 +466,7 @@ class an {
462
466
  }
463
467
  /** @returns {void} */
464
468
  $destroy() {
465
- sn(this, 1), this.$destroy = xe;
469
+ sn(this, 1), this.$destroy = Ce;
466
470
  }
467
471
  /**
468
472
  * @template {Extract<keyof Events, string>} K
@@ -472,7 +476,7 @@ class an {
472
476
  */
473
477
  $on(e, t) {
474
478
  if (!dt(t))
475
- return xe;
479
+ return Ce;
476
480
  const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
477
481
  return i.push(t), () => {
478
482
  const o = i.indexOf(t);
@@ -484,7 +488,7 @@ class an {
484
488
  * @returns {void}
485
489
  */
486
490
  $set(e) {
487
- this.$$set && !$t(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
491
+ this.$$set && !Ut(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
488
492
  }
489
493
  }
490
494
  const hn = "4";
@@ -496,7 +500,7 @@ function dn(n) {
496
500
  async function gn(n, e = "SHA-256", t = 1e5) {
497
501
  const i = Date.now().toString(16);
498
502
  n || (n = Math.round(Math.random() * t));
499
- const o = await pt(i, n, e);
503
+ const o = await Et(i, n, e);
500
504
  return {
501
505
  algorithm: e,
502
506
  challenge: o,
@@ -504,7 +508,7 @@ async function gn(n, e = "SHA-256", t = 1e5) {
504
508
  signature: ""
505
509
  };
506
510
  }
507
- async function pt(n, e, t) {
511
+ async function Et(n, e, t) {
508
512
  return dn(
509
513
  await crypto.subtle.digest(
510
514
  t.toUpperCase(),
@@ -519,7 +523,7 @@ function mn(n, e, t = "SHA-256", i = 1e6, o = 0) {
519
523
  for (let d = o; d <= i; d += 1) {
520
524
  if (l.signal.aborted)
521
525
  return null;
522
- if (await pt(e, d, t) === n)
526
+ if (await Et(e, d, t) === n)
523
527
  return {
524
528
  number: d,
525
529
  took: Date.now() - s
@@ -605,14 +609,14 @@ function ot(n) {
605
609
  e = K("svg"), t = K("path"), i = K("path"), c(t, "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"), c(t, "fill", "currentColor"), c(t, "opacity", ".25"), c(i, "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"), c(i, "fill", "currentColor"), c(i, "class", "altcha-spinner"), c(e, "width", "24"), c(e, "height", "24"), c(e, "viewBox", "0 0 24 24"), c(e, "xmlns", "http://www.w3.org/2000/svg");
606
610
  },
607
611
  m(o, l) {
608
- H(o, e, l), L(e, t), L(e, i);
612
+ $(o, e, l), L(e, t), L(e, i);
609
613
  },
610
614
  d(o) {
611
615
  o && j(e);
612
616
  }
613
617
  };
614
618
  }
615
- function pn(n) {
619
+ function En(n) {
616
620
  let e, t = (
617
621
  /*_strings*/
618
622
  n[11].label + ""
@@ -623,7 +627,7 @@ function pn(n) {
623
627
  n[4] + "_checkbox");
624
628
  },
625
629
  m(o, l) {
626
- H(o, e, l), e.innerHTML = t;
630
+ $(o, e, l), e.innerHTML = t;
627
631
  },
628
632
  p(o, l) {
629
633
  l[0] & /*_strings*/
@@ -637,7 +641,7 @@ function pn(n) {
637
641
  }
638
642
  };
639
643
  }
640
- function En(n) {
644
+ function pn(n) {
641
645
  let e, t = (
642
646
  /*_strings*/
643
647
  n[11].verifying + ""
@@ -647,7 +651,7 @@ function En(n) {
647
651
  e = F("span");
648
652
  },
649
653
  m(i, o) {
650
- H(i, e, o), e.innerHTML = t;
654
+ $(i, e, o), e.innerHTML = t;
651
655
  },
652
656
  p(i, o) {
653
657
  o[0] & /*_strings*/
@@ -675,7 +679,7 @@ function kn(n) {
675
679
  n[6];
676
680
  },
677
681
  m(l, s) {
678
- H(l, e, s), e.innerHTML = t, H(l, i, s), H(l, o, s);
682
+ $(l, e, s), e.innerHTML = t, $(l, i, s), $(l, o, s);
679
683
  },
680
684
  p(l, s) {
681
685
  s[0] & /*_strings*/
@@ -699,11 +703,11 @@ function lt(n) {
699
703
  let e, t, i, o, l, s, h;
700
704
  return {
701
705
  c() {
702
- 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*/
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*/
703
707
  n[11].ariaLinkLabel);
704
708
  },
705
709
  m(d, u) {
706
- H(d, e, u), L(e, t), L(t, i), L(i, o), L(i, l), L(i, s);
710
+ $(d, e, u), L(e, t), L(t, i), L(i, o), L(i, l), L(i, s);
707
711
  },
708
712
  p(d, u) {
709
713
  u[0] & /*_strings*/
@@ -720,7 +724,7 @@ function st(n) {
720
724
  function l(d, u) {
721
725
  return (
722
726
  /*state*/
723
- d[7] === m.EXPIRED ? Cn : vn
727
+ d[7] === m.EXPIRED ? xn : vn
724
728
  );
725
729
  }
726
730
  let s = l(n), h = s(n);
@@ -729,7 +733,7 @@ function st(n) {
729
733
  e = F("div"), t = K("svg"), i = K("path"), o = z(), h.c(), c(i, "stroke-linecap", "round"), c(i, "stroke-linejoin", "round"), c(i, "d", "M6 18L18 6M6 6l12 12"), c(t, "width", "14"), c(t, "height", "14"), c(t, "xmlns", "http://www.w3.org/2000/svg"), c(t, "fill", "none"), c(t, "viewBox", "0 0 24 24"), c(t, "stroke-width", "1.5"), c(t, "stroke", "currentColor"), c(e, "class", "altcha-error");
730
734
  },
731
735
  m(d, u) {
732
- H(d, e, u), L(e, t), L(t, i), L(e, o), h.m(e, null);
736
+ $(d, e, u), L(e, t), L(t, i), L(e, o), h.m(e, null);
733
737
  },
734
738
  p(d, u) {
735
739
  s === (s = l(d)) && h ? h.p(d, u) : (h.d(1), h = s(d), h && (h.c(), h.m(e, null)));
@@ -754,7 +758,7 @@ function vn(n) {
754
758
  );
755
759
  },
756
760
  m(i, o) {
757
- H(i, e, o), e.innerHTML = t;
761
+ $(i, e, o), e.innerHTML = t;
758
762
  },
759
763
  p(i, o) {
760
764
  o[0] & /*_strings*/
@@ -772,7 +776,7 @@ function vn(n) {
772
776
  }
773
777
  };
774
778
  }
775
- function Cn(n) {
779
+ function xn(n) {
776
780
  let e, t = (
777
781
  /*_strings*/
778
782
  n[11].expired + ""
@@ -787,7 +791,7 @@ function Cn(n) {
787
791
  );
788
792
  },
789
793
  m(i, o) {
790
- H(i, e, o), e.innerHTML = t;
794
+ $(i, e, o), e.innerHTML = t;
791
795
  },
792
796
  p(i, o) {
793
797
  o[0] & /*_strings*/
@@ -815,7 +819,7 @@ function ft(n) {
815
819
  e = F("div"), t = F("div"), c(e, "class", "altcha-footer");
816
820
  },
817
821
  m(o, l) {
818
- H(o, e, l), L(e, t), t.innerHTML = i;
822
+ $(o, e, l), L(e, t), t.innerHTML = i;
819
823
  },
820
824
  p(o, l) {
821
825
  l[0] & /*_strings*/
@@ -834,16 +838,16 @@ function ct(n) {
834
838
  e = F("div"), c(e, "class", "altcha-anchor-arrow");
835
839
  },
836
840
  m(t, i) {
837
- H(t, e, i), n[48](e);
841
+ $(t, e, i), n[48](e);
838
842
  },
839
- p: xe,
843
+ p: Ce,
840
844
  d(t) {
841
845
  t && j(e), n[48](null);
842
846
  }
843
847
  };
844
848
  }
845
- function xn(n) {
846
- let e, t, i, o, l, s, h, d, u, A, b, Y, U, $, D, R, X;
849
+ function Cn(n) {
850
+ let e, t, i, o, l, s, h, d, u, A, b, Y, O, U, D, R, X;
847
851
  const J = (
848
852
  /*#slots*/
849
853
  n[46].default
@@ -863,7 +867,7 @@ function xn(n) {
863
867
  /*state*/
864
868
  a[7] === m.VERIFIED ? kn : (
865
869
  /*state*/
866
- a[7] === m.VERIFYING ? En : pn
870
+ a[7] === m.VERIFYING ? pn : En
867
871
  )
868
872
  );
869
873
  }
@@ -880,13 +884,13 @@ function xn(n) {
880
884
  n[11].footer && /*hidefooter*/
881
885
  (n[2] !== !0 || /*isFreeSaaS*/
882
886
  n[12]) && ft(n)
883
- ), E = (
887
+ ), p = (
884
888
  /*floating*/
885
889
  n[1] && ct(n)
886
890
  );
887
891
  return {
888
892
  c() {
889
- 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(), U = z(), S && S.c(), $ = z(), E && E.c(), c(s, "type", "checkbox"), c(s, "id", h = /*name*/
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*/
890
894
  n[4] + "_checkbox"), s.required = d = /*auto*/
891
895
  n[0] !== "onsubmit" && (!/*floating*/
892
896
  n[1] || /*auto*/
@@ -908,8 +912,8 @@ function xn(n) {
908
912
  );
909
913
  },
910
914
  m(a, y) {
911
- N && N.m(a, y), H(a, e, y), H(a, t, y), L(t, i), T && T.m(i, null), L(i, o), L(i, l), L(l, s), s.checked = /*checked*/
912
- 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, U), S && S.m(t, null), L(t, $), E && E.m(t, null), n[49](t), D = !0, R || (X = [
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 = [
913
917
  Le(
914
918
  s,
915
919
  "change",
@@ -968,11 +972,11 @@ function xn(n) {
968
972
  a[3] !== !0 || /*isFreeSaaS*/
969
973
  a[12] ? v ? v.p(a, y) : (v = lt(a), v.c(), v.m(i, null)) : v && (v.d(1), v = null), /*error*/
970
974
  a[5] || /*state*/
971
- a[7] === m.EXPIRED ? P ? P.p(a, y) : (P = st(a), P.c(), P.m(t, U)) : P && (P.d(1), P = null), /*_strings*/
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*/
972
976
  a[11].footer && /*hidefooter*/
973
977
  (a[2] !== !0 || /*isFreeSaaS*/
974
- a[12]) ? S ? S.p(a, y) : (S = ft(a), S.c(), S.m(t, $)) : S && (S.d(1), S = null), /*floating*/
975
- a[1] ? E ? E.p(a, y) : (E = ct(a), E.c(), E.m(t, null)) : E && (E.d(1), E = null), (!D || y[0] & /*state*/
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*/
976
980
  128) && c(
977
981
  t,
978
982
  "data-state",
@@ -993,23 +997,23 @@ function xn(n) {
993
997
  on(N, a), D = !1;
994
998
  },
995
999
  d(a) {
996
- a && (j(e), j(t)), N && N.d(a), T && T.d(), V.d(), v && v.d(), P && P.d(), S && S.d(), E && E.d(), n[49](null), R = !1, pe(X);
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);
997
1001
  }
998
1002
  };
999
1003
  }
1000
- const ut = "Visit Altcha.org", Et = "https://altcha.org/";
1004
+ const ut = "Visit Altcha.org", pt = "https://altcha.org/";
1001
1005
  function at(n) {
1002
1006
  return JSON.parse(n);
1003
1007
  }
1004
1008
  function An(n, e, t) {
1005
1009
  var Qe, et;
1006
- 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: U = !1 } = e, { delay: $ = 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: E = !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;
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;
1007
1011
  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];
1008
- let re = !1, C, ie = null, se = null, _ = null, de = null, W = null, oe = null, te = [], x = m.UNVERIFIED;
1012
+ let re = !1, x, ie = null, se = null, _ = null, de = null, W = null, oe = null, te = [], C = m.UNVERIFIED;
1009
1013
  Kt(() => {
1010
- kt(), _ && (_.removeEventListener("submit", Oe), _.removeEventListener("reset", Ue), _.removeEventListener("focusin", He), _ = null), W && (clearTimeout(W), W = null), document.removeEventListener("click", Ve), document.removeEventListener("scroll", je), window.removeEventListener("resize", Be);
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);
1011
1015
  }), zt(() => {
1012
- k("mounted", "0.9.0"), 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), _ = C.closest("form"), _ && (_.addEventListener("submit", Oe, { capture: !0 }), _.addEventListener("reset", Ue), u === "onfocus" && _.addEventListener("focusin", He)), u === "onload" && (v ? ge() : ne()), i && (N || T) && k("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
1016
+ k("mounted", "1.0.1"), 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(() => {
1013
1017
  he("load");
1014
1018
  });
1015
1019
  });
@@ -1029,7 +1033,7 @@ function An(n, e, t) {
1029
1033
  r.destroy();
1030
1034
  }
1031
1035
  function Ne() {
1032
- b && S && x === m.VERIFIED ? ne() : me(m.EXPIRED, s.expired);
1036
+ b && S && C === m.VERIFIED ? ne() : me(m.EXPIRED, s.expired);
1033
1037
  }
1034
1038
  async function vt() {
1035
1039
  var r;
@@ -1048,11 +1052,11 @@ function An(n, e, t) {
1048
1052
  throw new Error("Attribute challengeurl not set.");
1049
1053
  k("fetching challenge from", b);
1050
1054
  const f = await fetch(b, {
1051
- headers: E ? { "x-altcha-spam-filter": "1" } : {}
1055
+ headers: p ? { "x-altcha-spam-filter": "1" } : {}
1052
1056
  });
1053
1057
  if (f.status !== 200)
1054
1058
  throw new Error(`Server responded with ${f.status}.`);
1055
- const g = f.headers.get("Expires"), I = f.headers.get("X-Altcha-Config"), B = await f.json(), O = new URLSearchParams((r = B.salt.split("?")) == null ? void 0 : r[1]), M = O.get("expires") || O.get("expire");
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");
1056
1060
  if (M) {
1057
1061
  const w = new Date(+M * 1e3), q = isNaN(w.getTime()) ? 0 : w.getTime() - Date.now();
1058
1062
  q > 0 && ke(q);
@@ -1074,13 +1078,13 @@ function An(n, e, t) {
1074
1078
  return B;
1075
1079
  }
1076
1080
  }
1077
- function Ct(r) {
1081
+ function xt(r) {
1078
1082
  var g;
1079
1083
  const f = _ == null ? void 0 : _.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
1080
1084
  return ((g = f == null ? void 0 : f.value) == null ? void 0 : g.slice(f.value.indexOf("@"))) || void 0;
1081
1085
  }
1082
- function xt() {
1083
- return E === "ipAddress" ? {
1086
+ function Ct() {
1087
+ return p === "ipAddress" ? {
1084
1088
  blockedCountries: void 0,
1085
1089
  classifier: void 0,
1086
1090
  disableRules: void 0,
@@ -1091,7 +1095,7 @@ function An(n, e, t) {
1091
1095
  ipAddress: void 0,
1092
1096
  text: void 0,
1093
1097
  timeZone: void 0
1094
- } : typeof E == "object" ? E : {
1098
+ } : typeof p == "object" ? p : {
1095
1099
  blockedCountries: void 0,
1096
1100
  classifier: void 0,
1097
1101
  disableRules: void 0,
@@ -1109,9 +1113,9 @@ function An(n, e, t) {
1109
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])')) || []
1110
1114
  ].reduce(
1111
1115
  (g, I) => {
1112
- const B = I.name, O = I.value;
1113
- return B && O && (g[B] = /\n/.test(O) ? O.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
1114
- `) : O), g;
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
+ `) : H), g;
1115
1119
  },
1116
1120
  {}
1117
1121
  );
@@ -1120,7 +1124,7 @@ function An(n, e, t) {
1120
1124
  const r = P !== void 0 ? P.split(",") : void 0;
1121
1125
  for (const f of globalThis.altchaPlugins)
1122
1126
  (!r || r.includes(f.pluginName)) && te.push(new f({
1123
- el: C,
1127
+ el: x,
1124
1128
  clarify: ge,
1125
1129
  dispatch: he,
1126
1130
  getConfiguration: We,
@@ -1135,51 +1139,51 @@ function An(n, e, t) {
1135
1139
  }));
1136
1140
  }
1137
1141
  function k(...r) {
1138
- (U || r.some((f) => f instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Q}]`, ...r);
1142
+ (O || r.some((f) => f instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Q}]`, ...r);
1139
1143
  }
1140
1144
  function Lt() {
1141
- [m.UNVERIFIED, m.ERROR, m.EXPIRED].includes(x) ? E && (_ == null ? void 0 : _.reportValidity()) === !1 ? t(8, re = !1) : v ? ge() : ne() : t(8, re = !0);
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);
1142
1146
  }
1143
1147
  function Ve(r) {
1144
1148
  const f = r.target;
1145
- R && f && !C.contains(f) && (x === m.VERIFIED || u === "off" && x === m.UNVERIFIED) && t(9, C.style.display = "none", C);
1149
+ R && f && !x.contains(f) && (C === m.VERIFIED || u === "off" && C === m.UNVERIFIED) && t(9, x.style.display = "none", x);
1146
1150
  }
1147
1151
  function je() {
1148
- R && x !== m.UNVERIFIED && Ee();
1152
+ R && C !== m.UNVERIFIED && pe();
1149
1153
  }
1150
1154
  function Rt(r) {
1151
1155
  for (const f of te)
1152
1156
  typeof f.onErrorChange == "function" && f.onErrorChange(de);
1153
1157
  }
1154
- function He(r) {
1155
- x === m.UNVERIFIED && ne();
1158
+ function $e(r) {
1159
+ C === m.UNVERIFIED && ne();
1156
1160
  }
1157
- function Oe(r) {
1158
- _ && u === "onsubmit" ? x === m.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ne().then(() => {
1161
+ function He(r) {
1162
+ _ && u === "onsubmit" ? C === m.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ne().then(() => {
1159
1163
  _ == null || _.requestSubmit();
1160
- })) : x !== m.VERIFIED && (r.preventDefault(), r.stopPropagation(), x === m.VERIFYING && $e()) : _ && R && u === "off" && x === m.UNVERIFIED && (r.preventDefault(), r.stopPropagation(), t(9, C.style.display = "block", C), Ee());
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());
1161
1165
  }
1162
- function Ue() {
1166
+ function Oe() {
1163
1167
  me();
1164
1168
  }
1165
- function $e() {
1166
- x === m.VERIFYING && s.waitAlert && alert(s.waitAlert);
1169
+ function Ue() {
1170
+ C === m.VERIFYING && s.waitAlert && alert(s.waitAlert);
1167
1171
  }
1168
1172
  function St(r) {
1169
1173
  for (const f of te)
1170
- typeof f.onStateChange == "function" && f.onStateChange(x);
1171
- R && x !== m.UNVERIFIED && requestAnimationFrame(() => {
1172
- Ee();
1173
- }), t(8, re = x === m.VERIFIED);
1174
+ typeof f.onStateChange == "function" && f.onStateChange(C);
1175
+ R && C !== m.UNVERIFIED && requestAnimationFrame(() => {
1176
+ pe();
1177
+ }), t(8, re = C === m.VERIFIED);
1174
1178
  }
1175
1179
  function Be() {
1176
- R && Ee();
1180
+ R && pe();
1177
1181
  }
1178
- function Ee(r = 20) {
1179
- if (C)
1182
+ function pe(r = 20) {
1183
+ if (x)
1180
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) {
1181
- const f = parseInt(J, 10) || 12, g = se.getBoundingClientRect(), I = C.getBoundingClientRect(), B = document.documentElement.clientHeight, O = document.documentElement.clientWidth, M = R === "auto" ? g.bottom + I.height + f + r > B : R === "top", w = Math.max(r, Math.min(O - r - I.width, g.left + g.width / 2 - I.width / 2));
1182
- if (M ? t(9, C.style.top = `${g.top - (I.height + f)}px`, C) : t(9, C.style.top = `${g.bottom + f}px`, C), t(9, C.style.left = `${w}px`, C), C.setAttribute("data-floating", M ? "top" : "bottom"), ie) {
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 (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) {
1183
1187
  const q = ie.getBoundingClientRect();
1184
1188
  t(10, ie.style.left = g.left - w + g.width / 2 - q.width / 2 + "px", ie);
1185
1189
  }
@@ -1191,9 +1195,9 @@ function An(n, e, t) {
1191
1195
  throw new Error("Attribute verifyurl not set.");
1192
1196
  k("requesting server verification from", ee);
1193
1197
  const f = { payload: r };
1194
- if (E) {
1195
- const { blockedCountries: B, classifier: O, disableRules: M, email: w, expectedLanguages: q, expectedCountries: Ie, fields: be, ipAddress: ye, text: Vt, timeZone: tt } = xt();
1196
- f.blockedCountries = B, f.classifier = O, f.disableRules = M, f.email = w === !1 ? void 0 : Ct(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();
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();
1197
1201
  }
1198
1202
  const g = await fetch(ee, {
1199
1203
  body: JSON.stringify(f),
@@ -1210,7 +1214,7 @@ function An(n, e, t) {
1210
1214
  k("expire", r), W && (clearTimeout(W), W = null), r < 1 ? Ne() : W = setTimeout(Ne, r);
1211
1215
  }
1212
1216
  function qe(r) {
1213
- k("floating", r), R !== r && (t(9, C.style.left = "", C), t(9, C.style.top = "", C)), 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);
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);
1214
1218
  }
1215
1219
  function Ze(r) {
1216
1220
  if (!r.algorithm)
@@ -1249,7 +1253,7 @@ function An(n, e, t) {
1249
1253
  g = Math.min(16, Math.max(1, g));
1250
1254
  for (let M = 0; M < g; M++)
1251
1255
  I.push(altchaCreateWorker(ae));
1252
- const B = Math.ceil(f / g), O = await Promise.all(I.map((M, w) => {
1256
+ const B = Math.ceil(f / g), H = await Promise.all(I.map((M, w) => {
1253
1257
  const q = w * B;
1254
1258
  return new Promise((Ie) => {
1255
1259
  M.addEventListener("message", (be) => {
@@ -1267,31 +1271,31 @@ function An(n, e, t) {
1267
1271
  }));
1268
1272
  for (const M of I)
1269
1273
  M.terminate();
1270
- return O.find((M) => !!M) || null;
1274
+ return H.find((M) => !!M) || null;
1271
1275
  }
1272
1276
  async function ge() {
1273
1277
  if (!v) {
1274
- t(7, x = m.ERROR);
1278
+ t(7, C = m.ERROR);
1275
1279
  return;
1276
1280
  }
1277
1281
  const r = te.find((f) => f.constructor.pluginName === "obfuscation");
1278
1282
  if (!r || !("clarify" in r)) {
1279
- t(7, x = m.ERROR), k("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
1283
+ t(7, C = m.ERROR), k("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
1280
1284
  return;
1281
1285
  }
1282
1286
  if ("clarify" in r && typeof r.clarify == "function")
1283
1287
  return r.clarify();
1284
1288
  }
1285
1289
  function Ye(r) {
1286
- 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, $ = 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, 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, 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);
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);
1287
1291
  }
1288
1292
  function We() {
1289
1293
  return {
1290
1294
  auto: u,
1291
1295
  blockspam: A,
1292
1296
  challengeurl: b,
1293
- debug: U,
1294
- delay: $,
1297
+ debug: O,
1298
+ delay: U,
1295
1299
  expire: D,
1296
1300
  floating: R,
1297
1301
  floatinganchor: X,
@@ -1303,7 +1307,7 @@ function An(n, e, t) {
1303
1307
  mockerror: V,
1304
1308
  obfuscated: v,
1305
1309
  refetchonexpire: S,
1306
- spamfilter: E,
1310
+ spamfilter: p,
1307
1311
  strings: s,
1308
1312
  test: y,
1309
1313
  verifyurl: ee,
@@ -1318,19 +1322,19 @@ function An(n, e, t) {
1318
1322
  return te.find((f) => f.constructor.pluginName === r);
1319
1323
  }
1320
1324
  function Je() {
1321
- return x;
1325
+ return C;
1322
1326
  }
1323
1327
  function me(r = m.UNVERIFIED, f = null) {
1324
- W && (clearTimeout(W), W = null), t(8, re = !1), t(5, de = f), t(6, oe = null), t(7, x = r);
1328
+ W && (clearTimeout(W), W = null), t(8, re = !1), t(5, de = f), t(6, oe = null), t(7, C = r);
1325
1329
  }
1326
1330
  function ze(r) {
1327
1331
  se = r;
1328
1332
  }
1329
1333
  function Ke(r, f = null) {
1330
- t(7, x = r), t(5, de = f);
1334
+ t(7, C = r), t(5, de = f);
1331
1335
  }
1332
1336
  async function ne() {
1333
- return me(m.VERIFYING), await new Promise((r) => setTimeout(r, $ || 0)), vt().then((r) => (Ze(r), k("challenge", r), Ge(r))).then(({ data: r, solution: f }) => {
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 }) => {
1334
1338
  if (k("solution", f), "challenge" in r && f && !("clearText" in f))
1335
1339
  if ((f == null ? void 0 : f.number) !== void 0) {
1336
1340
  if (ee)
@@ -1340,10 +1344,10 @@ function An(n, e, t) {
1340
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.");
1341
1345
  }).then(() => {
1342
1346
  en().then(() => {
1343
- t(7, x = m.VERIFIED), k("verified"), he("verified", { payload: oe });
1347
+ t(7, C = m.VERIFIED), k("verified"), he("verified", { payload: oe });
1344
1348
  });
1345
1349
  }).catch((r) => {
1346
- k(r), t(7, x = m.ERROR), t(5, de = r.message);
1350
+ k(r), t(7, C = m.ERROR), t(5, de = r.message);
1347
1351
  });
1348
1352
  }
1349
1353
  function Mt() {
@@ -1356,11 +1360,11 @@ function An(n, e, t) {
1356
1360
  }
1357
1361
  function Nt(r) {
1358
1362
  Ae[r ? "unshift" : "push"](() => {
1359
- C = r, t(9, C);
1363
+ x = r, t(9, x);
1360
1364
  });
1361
1365
  }
1362
1366
  return n.$$set = (r) => {
1363
- "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, U = r.debug), "delay" in r && t(18, $ = 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, E = 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);
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);
1364
1368
  }, n.$$.update = () => {
1365
1369
  n.$$.dirty[0] & /*challengeurl*/
1366
1370
  32768 && t(12, i = !!(b != null && b.includes(".altcha.org")) && !!(b != null && b.includes("apiKey=ckey_"))), n.$$.dirty[1] & /*challengejson*/
@@ -1370,14 +1374,14 @@ function An(n, e, t) {
1370
1374
  ariaLinkLabel: ut,
1371
1375
  error: "Verification failed. Try again later.",
1372
1376
  expired: "Verification expired. Try again.",
1373
- footer: `Protected by <a href="${Et}" target="_blank" aria-label="${l.ariaLinkLabel || ut}">ALTCHA</a>`,
1377
+ footer: `Protected by <a href="${pt}" target="_blank" aria-label="${l.ariaLinkLabel || ut}">ALTCHA</a>`,
1374
1378
  label: "I'm not a robot",
1375
1379
  verified: "Verified",
1376
1380
  verifying: "Verifying...",
1377
1381
  waitAlert: "Verifying... please wait.",
1378
1382
  ...l
1379
1383
  }), n.$$.dirty[0] & /*payload, state*/
1380
- 192 && he("statechange", { payload: oe, state: x }), n.$$.dirty[0] & /*error*/
1384
+ 192 && he("statechange", { payload: oe, state: C }), n.$$.dirty[0] & /*error*/
1381
1385
  32 && Rt(), n.$$.dirty[0] & /*state*/
1382
1386
  128 && St();
1383
1387
  }, [
@@ -1388,18 +1392,18 @@ function An(n, e, t) {
1388
1392
  Q,
1389
1393
  de,
1390
1394
  oe,
1391
- x,
1392
- re,
1393
1395
  C,
1396
+ re,
1397
+ x,
1394
1398
  ie,
1395
1399
  s,
1396
1400
  i,
1397
1401
  Lt,
1398
- $e,
1402
+ Ue,
1399
1403
  b,
1400
1404
  A,
1405
+ O,
1401
1406
  U,
1402
- $,
1403
1407
  D,
1404
1408
  X,
1405
1409
  J,
@@ -1407,7 +1411,7 @@ function An(n, e, t) {
1407
1411
  V,
1408
1412
  v,
1409
1413
  S,
1410
- E,
1414
+ p,
1411
1415
  y,
1412
1416
  ee,
1413
1417
  le,
@@ -1439,8 +1443,8 @@ class In extends an {
1439
1443
  this,
1440
1444
  e,
1441
1445
  An,
1442
- xn,
1443
- Ut,
1446
+ Cn,
1447
+ Ot,
1444
1448
  {
1445
1449
  auto: 0,
1446
1450
  blockspam: 16,
@@ -1485,145 +1489,145 @@ class In extends an {
1485
1489
  return this.$$.ctx[0];
1486
1490
  }
1487
1491
  set auto(e) {
1488
- this.$$set({ auto: e }), p();
1492
+ this.$$set({ auto: e }), E();
1489
1493
  }
1490
1494
  get blockspam() {
1491
1495
  return this.$$.ctx[16];
1492
1496
  }
1493
1497
  set blockspam(e) {
1494
- this.$$set({ blockspam: e }), p();
1498
+ this.$$set({ blockspam: e }), E();
1495
1499
  }
1496
1500
  get challengeurl() {
1497
1501
  return this.$$.ctx[15];
1498
1502
  }
1499
1503
  set challengeurl(e) {
1500
- this.$$set({ challengeurl: e }), p();
1504
+ this.$$set({ challengeurl: e }), E();
1501
1505
  }
1502
1506
  get challengejson() {
1503
1507
  return this.$$.ctx[31];
1504
1508
  }
1505
1509
  set challengejson(e) {
1506
- this.$$set({ challengejson: e }), p();
1510
+ this.$$set({ challengejson: e }), E();
1507
1511
  }
1508
1512
  get debug() {
1509
1513
  return this.$$.ctx[17];
1510
1514
  }
1511
1515
  set debug(e) {
1512
- this.$$set({ debug: e }), p();
1516
+ this.$$set({ debug: e }), E();
1513
1517
  }
1514
1518
  get delay() {
1515
1519
  return this.$$.ctx[18];
1516
1520
  }
1517
1521
  set delay(e) {
1518
- this.$$set({ delay: e }), p();
1522
+ this.$$set({ delay: e }), E();
1519
1523
  }
1520
1524
  get expire() {
1521
1525
  return this.$$.ctx[19];
1522
1526
  }
1523
1527
  set expire(e) {
1524
- this.$$set({ expire: e }), p();
1528
+ this.$$set({ expire: e }), E();
1525
1529
  }
1526
1530
  get floating() {
1527
1531
  return this.$$.ctx[1];
1528
1532
  }
1529
1533
  set floating(e) {
1530
- this.$$set({ floating: e }), p();
1534
+ this.$$set({ floating: e }), E();
1531
1535
  }
1532
1536
  get floatinganchor() {
1533
1537
  return this.$$.ctx[20];
1534
1538
  }
1535
1539
  set floatinganchor(e) {
1536
- this.$$set({ floatinganchor: e }), p();
1540
+ this.$$set({ floatinganchor: e }), E();
1537
1541
  }
1538
1542
  get floatingoffset() {
1539
1543
  return this.$$.ctx[21];
1540
1544
  }
1541
1545
  set floatingoffset(e) {
1542
- this.$$set({ floatingoffset: e }), p();
1546
+ this.$$set({ floatingoffset: e }), E();
1543
1547
  }
1544
1548
  get hidefooter() {
1545
1549
  return this.$$.ctx[2];
1546
1550
  }
1547
1551
  set hidefooter(e) {
1548
- this.$$set({ hidefooter: e }), p();
1552
+ this.$$set({ hidefooter: e }), E();
1549
1553
  }
1550
1554
  get hidelogo() {
1551
1555
  return this.$$.ctx[3];
1552
1556
  }
1553
1557
  set hidelogo(e) {
1554
- this.$$set({ hidelogo: e }), p();
1558
+ this.$$set({ hidelogo: e }), E();
1555
1559
  }
1556
1560
  get name() {
1557
1561
  return this.$$.ctx[4];
1558
1562
  }
1559
1563
  set name(e) {
1560
- this.$$set({ name: e }), p();
1564
+ this.$$set({ name: e }), E();
1561
1565
  }
1562
1566
  get maxnumber() {
1563
1567
  return this.$$.ctx[22];
1564
1568
  }
1565
1569
  set maxnumber(e) {
1566
- this.$$set({ maxnumber: e }), p();
1570
+ this.$$set({ maxnumber: e }), E();
1567
1571
  }
1568
1572
  get mockerror() {
1569
1573
  return this.$$.ctx[23];
1570
1574
  }
1571
1575
  set mockerror(e) {
1572
- this.$$set({ mockerror: e }), p();
1576
+ this.$$set({ mockerror: e }), E();
1573
1577
  }
1574
1578
  get obfuscated() {
1575
1579
  return this.$$.ctx[24];
1576
1580
  }
1577
1581
  set obfuscated(e) {
1578
- this.$$set({ obfuscated: e }), p();
1582
+ this.$$set({ obfuscated: e }), E();
1579
1583
  }
1580
1584
  get plugins() {
1581
1585
  return this.$$.ctx[32];
1582
1586
  }
1583
1587
  set plugins(e) {
1584
- this.$$set({ plugins: e }), p();
1588
+ this.$$set({ plugins: e }), E();
1585
1589
  }
1586
1590
  get refetchonexpire() {
1587
1591
  return this.$$.ctx[25];
1588
1592
  }
1589
1593
  set refetchonexpire(e) {
1590
- this.$$set({ refetchonexpire: e }), p();
1594
+ this.$$set({ refetchonexpire: e }), E();
1591
1595
  }
1592
1596
  get spamfilter() {
1593
1597
  return this.$$.ctx[26];
1594
1598
  }
1595
1599
  set spamfilter(e) {
1596
- this.$$set({ spamfilter: e }), p();
1600
+ this.$$set({ spamfilter: e }), E();
1597
1601
  }
1598
1602
  get strings() {
1599
1603
  return this.$$.ctx[33];
1600
1604
  }
1601
1605
  set strings(e) {
1602
- this.$$set({ strings: e }), p();
1606
+ this.$$set({ strings: e }), E();
1603
1607
  }
1604
1608
  get test() {
1605
1609
  return this.$$.ctx[27];
1606
1610
  }
1607
1611
  set test(e) {
1608
- this.$$set({ test: e }), p();
1612
+ this.$$set({ test: e }), E();
1609
1613
  }
1610
1614
  get verifyurl() {
1611
1615
  return this.$$.ctx[28];
1612
1616
  }
1613
1617
  set verifyurl(e) {
1614
- this.$$set({ verifyurl: e }), p();
1618
+ this.$$set({ verifyurl: e }), E();
1615
1619
  }
1616
1620
  get workers() {
1617
1621
  return this.$$.ctx[29];
1618
1622
  }
1619
1623
  set workers(e) {
1620
- this.$$set({ workers: e }), p();
1624
+ this.$$set({ workers: e }), E();
1621
1625
  }
1622
1626
  get workerurl() {
1623
1627
  return this.$$.ctx[30];
1624
1628
  }
1625
1629
  set workerurl(e) {
1626
- this.$$set({ workerurl: e }), p();
1630
+ this.$$set({ workerurl: e }), E();
1627
1631
  }
1628
1632
  get clarify() {
1629
1633
  return this.$$.ctx[34];