altcha 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/dist/altcha.d.ts +14 -2
- package/dist/altcha.js +844 -644
- package/dist/altcha.umd.cjs +2 -2
- package/dist_external/altcha.d.ts +14 -2
- package/dist_external/altcha.js +812 -612
- package/dist_external/altcha.umd.cjs +2 -2
- package/dist_external/worker.js +1 -1
- package/package.json +1 -1
package/dist_external/altcha.js
CHANGED
|
@@ -1,70 +1,116 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Kt = Object.defineProperty;
|
|
2
|
+
var ut = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
function
|
|
5
|
+
var Qt = (n, e, t) => e in n ? Kt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
+
var P = (n, e, t) => Qt(n, typeof e != "symbol" ? e + "" : e, t), ht = (n, e, t) => e.has(n) || ut("Cannot " + t);
|
|
7
|
+
var G = (n, e, t) => (ht(n, e, "read from private field"), t ? t.call(n) : e.get(n)), fe = (n, e, t) => e.has(n) ? ut("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), dt = (n, e, t, r) => (ht(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t);
|
|
8
|
+
function Me() {
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function $t(n, e) {
|
|
11
|
+
for (const t in e) n[t] = e[t];
|
|
12
|
+
return (
|
|
13
|
+
/** @type {T & S} */
|
|
14
|
+
n
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function At(n) {
|
|
11
18
|
return n();
|
|
12
19
|
}
|
|
13
|
-
function
|
|
20
|
+
function mt() {
|
|
14
21
|
return /* @__PURE__ */ Object.create(null);
|
|
15
22
|
}
|
|
16
|
-
function
|
|
17
|
-
n.forEach(
|
|
23
|
+
function Ie(n) {
|
|
24
|
+
n.forEach(At);
|
|
18
25
|
}
|
|
19
|
-
function
|
|
26
|
+
function xt(n) {
|
|
20
27
|
return typeof n == "function";
|
|
21
28
|
}
|
|
22
|
-
function
|
|
29
|
+
function en(n, e) {
|
|
23
30
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
24
31
|
}
|
|
25
|
-
function
|
|
32
|
+
function tn(n) {
|
|
26
33
|
return Object.keys(n).length === 0;
|
|
27
34
|
}
|
|
28
|
-
function
|
|
35
|
+
function nn(n, e, t, r) {
|
|
36
|
+
if (n) {
|
|
37
|
+
const o = Lt(n, e, t, r);
|
|
38
|
+
return n[0](o);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function Lt(n, e, t, r) {
|
|
42
|
+
return n[1] && r ? $t(t.ctx.slice(), n[1](r(e))) : t.ctx;
|
|
43
|
+
}
|
|
44
|
+
function rn(n, e, t, r) {
|
|
45
|
+
if (n[2] && r) {
|
|
46
|
+
const o = n[2](r(t));
|
|
47
|
+
if (e.dirty === void 0)
|
|
48
|
+
return o;
|
|
49
|
+
if (typeof o == "object") {
|
|
50
|
+
const s = [], l = Math.max(e.dirty.length, o.length);
|
|
51
|
+
for (let c = 0; c < l; c += 1)
|
|
52
|
+
s[c] = e.dirty[c] | o[c];
|
|
53
|
+
return s;
|
|
54
|
+
}
|
|
55
|
+
return e.dirty | o;
|
|
56
|
+
}
|
|
57
|
+
return e.dirty;
|
|
58
|
+
}
|
|
59
|
+
function on(n, e, t, r, o, s) {
|
|
60
|
+
if (o) {
|
|
61
|
+
const l = Lt(e, t, r, s);
|
|
62
|
+
n.p(l, o);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function sn(n) {
|
|
66
|
+
if (n.ctx.length > 32) {
|
|
67
|
+
const e = [], t = n.ctx.length / 32;
|
|
68
|
+
for (let r = 0; r < t; r++)
|
|
69
|
+
e[r] = -1;
|
|
70
|
+
return e;
|
|
71
|
+
}
|
|
72
|
+
return -1;
|
|
73
|
+
}
|
|
74
|
+
function I(n, e) {
|
|
29
75
|
n.appendChild(e);
|
|
30
76
|
}
|
|
31
|
-
function
|
|
77
|
+
function B(n, e, t) {
|
|
32
78
|
n.insertBefore(e, t || null);
|
|
33
79
|
}
|
|
34
|
-
function
|
|
80
|
+
function S(n) {
|
|
35
81
|
n.parentNode && n.parentNode.removeChild(n);
|
|
36
82
|
}
|
|
37
|
-
function
|
|
83
|
+
function M(n) {
|
|
38
84
|
return document.createElement(n);
|
|
39
85
|
}
|
|
40
|
-
function
|
|
86
|
+
function re(n) {
|
|
41
87
|
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
42
88
|
}
|
|
43
|
-
function
|
|
89
|
+
function It(n) {
|
|
44
90
|
return document.createTextNode(n);
|
|
45
91
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
92
|
+
function Q() {
|
|
93
|
+
return It(" ");
|
|
48
94
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
95
|
+
function ln() {
|
|
96
|
+
return It("");
|
|
51
97
|
}
|
|
52
|
-
function
|
|
98
|
+
function Pe(n, e, t, r) {
|
|
53
99
|
return n.addEventListener(e, t, r), () => n.removeEventListener(e, t, r);
|
|
54
100
|
}
|
|
55
|
-
function
|
|
101
|
+
function u(n, e, t) {
|
|
56
102
|
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
57
103
|
}
|
|
58
|
-
function
|
|
104
|
+
function cn(n) {
|
|
59
105
|
return Array.from(n.childNodes);
|
|
60
106
|
}
|
|
61
|
-
function
|
|
107
|
+
function gt(n, e, t) {
|
|
62
108
|
n.classList.toggle(e, !!t);
|
|
63
109
|
}
|
|
64
|
-
function
|
|
110
|
+
function an(n, e, { bubbles: t = !1, cancelable: r = !1 } = {}) {
|
|
65
111
|
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: r });
|
|
66
112
|
}
|
|
67
|
-
function
|
|
113
|
+
function fn(n) {
|
|
68
114
|
const e = {};
|
|
69
115
|
return n.childNodes.forEach(
|
|
70
116
|
/** @param {Element} node */
|
|
@@ -73,167 +119,176 @@ function Yt(n) {
|
|
|
73
119
|
}
|
|
74
120
|
), e;
|
|
75
121
|
}
|
|
76
|
-
let
|
|
77
|
-
function
|
|
78
|
-
|
|
122
|
+
let pe;
|
|
123
|
+
function ke(n) {
|
|
124
|
+
pe = n;
|
|
79
125
|
}
|
|
80
|
-
function
|
|
81
|
-
if (!
|
|
82
|
-
return
|
|
126
|
+
function qe() {
|
|
127
|
+
if (!pe) throw new Error("Function called outside component initialization");
|
|
128
|
+
return pe;
|
|
83
129
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
130
|
+
function un(n) {
|
|
131
|
+
qe().$$.on_mount.push(n);
|
|
86
132
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
133
|
+
function hn(n) {
|
|
134
|
+
qe().$$.on_destroy.push(n);
|
|
89
135
|
}
|
|
90
|
-
function
|
|
91
|
-
const n =
|
|
136
|
+
function dn() {
|
|
137
|
+
const n = qe();
|
|
92
138
|
return (e, t, { cancelable: r = !1 } = {}) => {
|
|
93
139
|
const o = n.$$.callbacks[e];
|
|
94
140
|
if (o) {
|
|
95
|
-
const s =
|
|
141
|
+
const s = an(
|
|
96
142
|
/** @type {string} */
|
|
97
143
|
e,
|
|
98
144
|
t,
|
|
99
145
|
{ cancelable: r }
|
|
100
146
|
);
|
|
101
|
-
return o.slice().forEach((
|
|
102
|
-
|
|
147
|
+
return o.slice().forEach((l) => {
|
|
148
|
+
l.call(n, s);
|
|
103
149
|
}), !s.defaultPrevented;
|
|
104
150
|
}
|
|
105
151
|
return !0;
|
|
106
152
|
};
|
|
107
153
|
}
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
const
|
|
111
|
-
let
|
|
112
|
-
function
|
|
113
|
-
|
|
154
|
+
const he = [], Ne = [];
|
|
155
|
+
let de = [];
|
|
156
|
+
const bt = [], Tt = /* @__PURE__ */ Promise.resolve();
|
|
157
|
+
let Oe = !1;
|
|
158
|
+
function Rt() {
|
|
159
|
+
Oe || (Oe = !0, Tt.then(E));
|
|
114
160
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
161
|
+
function mn() {
|
|
162
|
+
return Rt(), Tt;
|
|
117
163
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
164
|
+
function He(n) {
|
|
165
|
+
de.push(n);
|
|
120
166
|
}
|
|
121
|
-
const
|
|
122
|
-
let
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
167
|
+
const Be = /* @__PURE__ */ new Set();
|
|
168
|
+
let ue = 0;
|
|
169
|
+
function E() {
|
|
170
|
+
if (ue !== 0)
|
|
125
171
|
return;
|
|
126
|
-
const n =
|
|
172
|
+
const n = pe;
|
|
127
173
|
do {
|
|
128
174
|
try {
|
|
129
|
-
for (;
|
|
130
|
-
const e =
|
|
131
|
-
|
|
175
|
+
for (; ue < he.length; ) {
|
|
176
|
+
const e = he[ue];
|
|
177
|
+
ue++, ke(e), gn(e.$$);
|
|
132
178
|
}
|
|
133
179
|
} catch (e) {
|
|
134
|
-
throw
|
|
180
|
+
throw he.length = 0, ue = 0, e;
|
|
135
181
|
}
|
|
136
|
-
for (
|
|
137
|
-
for (let e = 0; e <
|
|
138
|
-
const t =
|
|
139
|
-
|
|
182
|
+
for (ke(null), he.length = 0, ue = 0; Ne.length; ) Ne.pop()();
|
|
183
|
+
for (let e = 0; e < de.length; e += 1) {
|
|
184
|
+
const t = de[e];
|
|
185
|
+
Be.has(t) || (Be.add(t), t());
|
|
140
186
|
}
|
|
141
|
-
|
|
142
|
-
} while (
|
|
143
|
-
for (;
|
|
144
|
-
|
|
145
|
-
|
|
187
|
+
de.length = 0;
|
|
188
|
+
} while (he.length);
|
|
189
|
+
for (; bt.length; )
|
|
190
|
+
bt.pop()();
|
|
191
|
+
Oe = !1, Be.clear(), ke(n);
|
|
146
192
|
}
|
|
147
|
-
function
|
|
193
|
+
function gn(n) {
|
|
148
194
|
if (n.fragment !== null) {
|
|
149
|
-
n.update(),
|
|
195
|
+
n.update(), Ie(n.before_update);
|
|
150
196
|
const e = n.dirty;
|
|
151
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(
|
|
197
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(He);
|
|
152
198
|
}
|
|
153
199
|
}
|
|
154
|
-
function
|
|
200
|
+
function bn(n) {
|
|
155
201
|
const e = [], t = [];
|
|
156
|
-
|
|
202
|
+
de.forEach((r) => n.indexOf(r) === -1 ? e.push(r) : t.push(r)), t.forEach((r) => r()), de = e;
|
|
157
203
|
}
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
204
|
+
const De = /* @__PURE__ */ new Set();
|
|
205
|
+
let yn;
|
|
206
|
+
function Ft(n, e) {
|
|
207
|
+
n && n.i && (De.delete(n), n.i(e));
|
|
208
|
+
}
|
|
209
|
+
function wn(n, e, t, r) {
|
|
210
|
+
if (n && n.o) {
|
|
211
|
+
if (De.has(n)) return;
|
|
212
|
+
De.add(n), yn.c.push(() => {
|
|
213
|
+
De.delete(n);
|
|
214
|
+
}), n.o(e);
|
|
215
|
+
}
|
|
161
216
|
}
|
|
162
|
-
function
|
|
217
|
+
function _n(n, e, t) {
|
|
163
218
|
const { fragment: r, after_update: o } = n.$$;
|
|
164
|
-
r && r.m(e, t),
|
|
165
|
-
const s = n.$$.on_mount.map(
|
|
166
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...s) :
|
|
167
|
-
}), o.forEach(
|
|
219
|
+
r && r.m(e, t), He(() => {
|
|
220
|
+
const s = n.$$.on_mount.map(At).filter(xt);
|
|
221
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...s) : Ie(s), n.$$.on_mount = [];
|
|
222
|
+
}), o.forEach(He);
|
|
168
223
|
}
|
|
169
|
-
function
|
|
224
|
+
function En(n, e) {
|
|
170
225
|
const t = n.$$;
|
|
171
|
-
t.fragment !== null && (
|
|
226
|
+
t.fragment !== null && (bn(t.after_update), Ie(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
172
227
|
}
|
|
173
|
-
function
|
|
174
|
-
n.$$.dirty[0] === -1 && (
|
|
228
|
+
function vn(n, e) {
|
|
229
|
+
n.$$.dirty[0] === -1 && (he.push(n), Rt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
175
230
|
}
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
const
|
|
231
|
+
function kn(n, e, t, r, o, s, l = null, c = [-1]) {
|
|
232
|
+
const a = pe;
|
|
233
|
+
ke(n);
|
|
234
|
+
const h = n.$$ = {
|
|
180
235
|
fragment: null,
|
|
181
236
|
ctx: [],
|
|
182
237
|
// state
|
|
183
238
|
props: s,
|
|
184
|
-
update:
|
|
239
|
+
update: Me,
|
|
185
240
|
not_equal: o,
|
|
186
|
-
bound:
|
|
241
|
+
bound: mt(),
|
|
187
242
|
// lifecycle
|
|
188
243
|
on_mount: [],
|
|
189
244
|
on_destroy: [],
|
|
190
245
|
on_disconnect: [],
|
|
191
246
|
before_update: [],
|
|
192
247
|
after_update: [],
|
|
193
|
-
context: new Map(e.context || (
|
|
248
|
+
context: new Map(e.context || (a ? a.$$.context : [])),
|
|
194
249
|
// everything else
|
|
195
|
-
callbacks:
|
|
196
|
-
dirty:
|
|
250
|
+
callbacks: mt(),
|
|
251
|
+
dirty: c,
|
|
197
252
|
skip_bound: !1,
|
|
198
|
-
root: e.target ||
|
|
253
|
+
root: e.target || a.$$.root
|
|
199
254
|
};
|
|
200
|
-
|
|
201
|
-
let
|
|
202
|
-
if (
|
|
203
|
-
const
|
|
204
|
-
return
|
|
205
|
-
}) : [],
|
|
255
|
+
l && l(h.root);
|
|
256
|
+
let w = !1;
|
|
257
|
+
if (h.ctx = t ? t(n, e.props || {}, (x, $, ...k) => {
|
|
258
|
+
const J = k.length ? k[0] : $;
|
|
259
|
+
return h.ctx && o(h.ctx[x], h.ctx[x] = J) && (!h.skip_bound && h.bound[x] && h.bound[x](J), w && vn(n, x)), $;
|
|
260
|
+
}) : [], h.update(), w = !0, Ie(h.before_update), h.fragment = r ? r(h.ctx) : !1, e.target) {
|
|
206
261
|
if (e.hydrate) {
|
|
207
|
-
const
|
|
208
|
-
|
|
262
|
+
const x = cn(e.target);
|
|
263
|
+
h.fragment && h.fragment.l(x), x.forEach(S);
|
|
209
264
|
} else
|
|
210
|
-
|
|
211
|
-
e.intro &&
|
|
265
|
+
h.fragment && h.fragment.c();
|
|
266
|
+
e.intro && Ft(n.$$.fragment), _n(n, e.target, e.anchor), E();
|
|
212
267
|
}
|
|
213
|
-
|
|
268
|
+
ke(a);
|
|
214
269
|
}
|
|
215
|
-
let
|
|
216
|
-
typeof HTMLElement == "function" && (
|
|
270
|
+
let Dt;
|
|
271
|
+
typeof HTMLElement == "function" && (Dt = class extends HTMLElement {
|
|
217
272
|
constructor(e, t, r) {
|
|
218
273
|
super();
|
|
219
274
|
/** The Svelte component constructor */
|
|
220
|
-
|
|
275
|
+
P(this, "$$ctor");
|
|
221
276
|
/** Slots */
|
|
222
|
-
|
|
277
|
+
P(this, "$$s");
|
|
223
278
|
/** The Svelte component instance */
|
|
224
|
-
|
|
279
|
+
P(this, "$$c");
|
|
225
280
|
/** Whether or not the custom element is connected */
|
|
226
|
-
|
|
281
|
+
P(this, "$$cn", !1);
|
|
227
282
|
/** Component props data */
|
|
228
|
-
|
|
283
|
+
P(this, "$$d", {});
|
|
229
284
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
230
|
-
|
|
285
|
+
P(this, "$$r", !1);
|
|
231
286
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
232
|
-
|
|
287
|
+
P(this, "$$p_d", {});
|
|
233
288
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
234
|
-
|
|
289
|
+
P(this, "$$l", {});
|
|
235
290
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
236
|
-
|
|
291
|
+
P(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
237
292
|
this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
|
|
238
293
|
}
|
|
239
294
|
addEventListener(e, t, r) {
|
|
@@ -253,32 +308,32 @@ typeof HTMLElement == "function" && (kt = class extends HTMLElement {
|
|
|
253
308
|
if (this.$$cn = !0, !this.$$c) {
|
|
254
309
|
let e = function(s) {
|
|
255
310
|
return () => {
|
|
256
|
-
let
|
|
311
|
+
let l;
|
|
257
312
|
return {
|
|
258
313
|
c: function() {
|
|
259
|
-
|
|
314
|
+
l = M("slot"), s !== "default" && u(l, "name", s);
|
|
260
315
|
},
|
|
261
316
|
/**
|
|
262
317
|
* @param {HTMLElement} target
|
|
263
318
|
* @param {HTMLElement} [anchor]
|
|
264
319
|
*/
|
|
265
|
-
m: function(
|
|
266
|
-
|
|
320
|
+
m: function(h, w) {
|
|
321
|
+
B(h, l, w);
|
|
267
322
|
},
|
|
268
|
-
d: function(
|
|
269
|
-
|
|
323
|
+
d: function(h) {
|
|
324
|
+
h && S(l);
|
|
270
325
|
}
|
|
271
326
|
};
|
|
272
327
|
};
|
|
273
328
|
};
|
|
274
329
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
275
330
|
return;
|
|
276
|
-
const t = {}, r =
|
|
331
|
+
const t = {}, r = fn(this);
|
|
277
332
|
for (const s of this.$$s)
|
|
278
333
|
s in r && (t[s] = [e(s)]);
|
|
279
334
|
for (const s of this.attributes) {
|
|
280
|
-
const
|
|
281
|
-
|
|
335
|
+
const l = this.$$g_p(s.name);
|
|
336
|
+
l in this.$$d || (this.$$d[l] = Se(l, s.value, this.$$p_d, "toProp"));
|
|
282
337
|
}
|
|
283
338
|
for (const s in this.$$p_d)
|
|
284
339
|
!(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
|
|
@@ -296,21 +351,21 @@ typeof HTMLElement == "function" && (kt = class extends HTMLElement {
|
|
|
296
351
|
this.$$r = !0;
|
|
297
352
|
for (const s in this.$$p_d)
|
|
298
353
|
if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
|
|
299
|
-
const
|
|
354
|
+
const l = Se(
|
|
300
355
|
s,
|
|
301
356
|
this.$$d[s],
|
|
302
357
|
this.$$p_d,
|
|
303
358
|
"toAttribute"
|
|
304
359
|
);
|
|
305
|
-
|
|
360
|
+
l == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, l);
|
|
306
361
|
}
|
|
307
362
|
this.$$r = !1;
|
|
308
363
|
};
|
|
309
364
|
this.$$c.$$.after_update.push(o), o();
|
|
310
365
|
for (const s in this.$$l)
|
|
311
|
-
for (const
|
|
312
|
-
const
|
|
313
|
-
this.$$l_u.set(
|
|
366
|
+
for (const l of this.$$l[s]) {
|
|
367
|
+
const c = this.$$c.$on(s, l);
|
|
368
|
+
this.$$l_u.set(l, c);
|
|
314
369
|
}
|
|
315
370
|
this.$$l = {};
|
|
316
371
|
}
|
|
@@ -319,7 +374,7 @@ typeof HTMLElement == "function" && (kt = class extends HTMLElement {
|
|
|
319
374
|
// and setting attributes through setAttribute etc, this is helpful
|
|
320
375
|
attributeChangedCallback(e, t, r) {
|
|
321
376
|
var o;
|
|
322
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
377
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = Se(e, r, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
|
|
323
378
|
}
|
|
324
379
|
disconnectedCallback() {
|
|
325
380
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -332,7 +387,7 @@ typeof HTMLElement == "function" && (kt = class extends HTMLElement {
|
|
|
332
387
|
) || e;
|
|
333
388
|
}
|
|
334
389
|
});
|
|
335
|
-
function
|
|
390
|
+
function Se(n, e, t, r) {
|
|
336
391
|
var s;
|
|
337
392
|
const o = (s = t[n]) == null ? void 0 : s.type;
|
|
338
393
|
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !r || !t[n])
|
|
@@ -362,38 +417,38 @@ function Te(n, e, t, r) {
|
|
|
362
417
|
return e;
|
|
363
418
|
}
|
|
364
419
|
}
|
|
365
|
-
function
|
|
366
|
-
let
|
|
420
|
+
function pn(n, e, t, r, o, s) {
|
|
421
|
+
let l = class extends Dt {
|
|
367
422
|
constructor() {
|
|
368
423
|
super(n, t, o), this.$$p_d = e;
|
|
369
424
|
}
|
|
370
425
|
static get observedAttributes() {
|
|
371
426
|
return Object.keys(e).map(
|
|
372
|
-
(
|
|
427
|
+
(c) => (e[c].attribute || c).toLowerCase()
|
|
373
428
|
);
|
|
374
429
|
}
|
|
375
430
|
};
|
|
376
|
-
return Object.keys(e).forEach((
|
|
377
|
-
Object.defineProperty(
|
|
431
|
+
return Object.keys(e).forEach((c) => {
|
|
432
|
+
Object.defineProperty(l.prototype, c, {
|
|
378
433
|
get() {
|
|
379
|
-
return this.$$c &&
|
|
434
|
+
return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
|
|
380
435
|
},
|
|
381
|
-
set(
|
|
382
|
-
var
|
|
383
|
-
|
|
436
|
+
set(a) {
|
|
437
|
+
var h;
|
|
438
|
+
a = Se(c, a, e), this.$$d[c] = a, (h = this.$$c) == null || h.$set({ [c]: a });
|
|
384
439
|
}
|
|
385
440
|
});
|
|
386
|
-
}), r.forEach((
|
|
387
|
-
Object.defineProperty(
|
|
441
|
+
}), r.forEach((c) => {
|
|
442
|
+
Object.defineProperty(l.prototype, c, {
|
|
388
443
|
get() {
|
|
389
|
-
var
|
|
390
|
-
return (
|
|
444
|
+
var a;
|
|
445
|
+
return (a = this.$$c) == null ? void 0 : a[c];
|
|
391
446
|
}
|
|
392
447
|
});
|
|
393
448
|
}), n.element = /** @type {any} */
|
|
394
|
-
|
|
449
|
+
l, l;
|
|
395
450
|
}
|
|
396
|
-
class
|
|
451
|
+
class Cn {
|
|
397
452
|
constructor() {
|
|
398
453
|
/**
|
|
399
454
|
* ### PRIVATE API
|
|
@@ -402,7 +457,7 @@ class ln {
|
|
|
402
457
|
*
|
|
403
458
|
* @type {any}
|
|
404
459
|
*/
|
|
405
|
-
|
|
460
|
+
P(this, "$$");
|
|
406
461
|
/**
|
|
407
462
|
* ### PRIVATE API
|
|
408
463
|
*
|
|
@@ -410,11 +465,11 @@ class ln {
|
|
|
410
465
|
*
|
|
411
466
|
* @type {any}
|
|
412
467
|
*/
|
|
413
|
-
|
|
468
|
+
P(this, "$$set");
|
|
414
469
|
}
|
|
415
470
|
/** @returns {void} */
|
|
416
471
|
$destroy() {
|
|
417
|
-
|
|
472
|
+
En(this, 1), this.$destroy = Me;
|
|
418
473
|
}
|
|
419
474
|
/**
|
|
420
475
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -423,8 +478,8 @@ class ln {
|
|
|
423
478
|
* @returns {() => void}
|
|
424
479
|
*/
|
|
425
480
|
$on(e, t) {
|
|
426
|
-
if (!
|
|
427
|
-
return
|
|
481
|
+
if (!xt(t))
|
|
482
|
+
return Me;
|
|
428
483
|
const r = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
429
484
|
return r.push(t), () => {
|
|
430
485
|
const o = r.indexOf(t);
|
|
@@ -436,19 +491,19 @@ class ln {
|
|
|
436
491
|
* @returns {void}
|
|
437
492
|
*/
|
|
438
493
|
$set(e) {
|
|
439
|
-
this.$$set && !
|
|
494
|
+
this.$$set && !tn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
440
495
|
}
|
|
441
496
|
}
|
|
442
|
-
const
|
|
443
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
444
|
-
const
|
|
445
|
-
function
|
|
497
|
+
const An = "4";
|
|
498
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(An);
|
|
499
|
+
const St = new TextEncoder();
|
|
500
|
+
function xn(n) {
|
|
446
501
|
return [...new Uint8Array(n)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
447
502
|
}
|
|
448
|
-
async function
|
|
503
|
+
async function Ln(n, e = "SHA-256", t = 1e5) {
|
|
449
504
|
const r = Date.now().toString(16);
|
|
450
505
|
n || (n = Math.round(Math.random() * t));
|
|
451
|
-
const o = await
|
|
506
|
+
const o = await Mt(r, n, e);
|
|
452
507
|
return {
|
|
453
508
|
algorithm: e,
|
|
454
509
|
challenge: o,
|
|
@@ -456,25 +511,25 @@ async function un(n, e = "SHA-256", t = 1e5) {
|
|
|
456
511
|
signature: ""
|
|
457
512
|
};
|
|
458
513
|
}
|
|
459
|
-
async function
|
|
460
|
-
return
|
|
514
|
+
async function Mt(n, e, t) {
|
|
515
|
+
return xn(
|
|
461
516
|
await crypto.subtle.digest(
|
|
462
517
|
t.toUpperCase(),
|
|
463
|
-
|
|
518
|
+
St.encode(n + e)
|
|
464
519
|
)
|
|
465
520
|
);
|
|
466
521
|
}
|
|
467
|
-
function
|
|
468
|
-
const s = new AbortController(),
|
|
522
|
+
function In(n, e, t = "SHA-256", r = 1e6, o = 0) {
|
|
523
|
+
const s = new AbortController(), l = Date.now();
|
|
469
524
|
return {
|
|
470
525
|
promise: (async () => {
|
|
471
|
-
for (let
|
|
526
|
+
for (let a = o; a <= r; a += 1) {
|
|
472
527
|
if (s.signal.aborted)
|
|
473
528
|
return null;
|
|
474
|
-
if (await
|
|
529
|
+
if (await Mt(e, a, t) === n)
|
|
475
530
|
return {
|
|
476
|
-
number:
|
|
477
|
-
took: Date.now() -
|
|
531
|
+
number: a,
|
|
532
|
+
took: Date.now() - l
|
|
478
533
|
};
|
|
479
534
|
}
|
|
480
535
|
return null;
|
|
@@ -482,39 +537,100 @@ function hn(n, e, t = "SHA-256", r = 1e6, o = 0) {
|
|
|
482
537
|
controller: s
|
|
483
538
|
};
|
|
484
539
|
}
|
|
485
|
-
function
|
|
540
|
+
function Nt() {
|
|
486
541
|
try {
|
|
487
542
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
488
543
|
} catch {
|
|
489
544
|
}
|
|
490
545
|
}
|
|
491
|
-
|
|
492
|
-
|
|
546
|
+
function Tn(n) {
|
|
547
|
+
const e = atob(n), t = new Uint8Array(e.length);
|
|
548
|
+
for (let r = 0; r < e.length; r++)
|
|
549
|
+
t[r] = e.charCodeAt(r);
|
|
550
|
+
return t;
|
|
551
|
+
}
|
|
552
|
+
function Rn(n, e = 12) {
|
|
553
|
+
const t = new Uint8Array(e);
|
|
554
|
+
for (let r = 0; r < e; r++)
|
|
555
|
+
t[r] = n % 256, n = Math.floor(n / 256);
|
|
556
|
+
return t;
|
|
557
|
+
}
|
|
558
|
+
async function Fn(n, e = "", t = 1e6, r = 0) {
|
|
559
|
+
const o = "AES-GCM", s = new AbortController(), l = Date.now(), c = async () => {
|
|
560
|
+
for (let w = r; w <= t; w += 1) {
|
|
561
|
+
if (s.signal.aborted || !a || !h)
|
|
562
|
+
return null;
|
|
563
|
+
try {
|
|
564
|
+
const x = await crypto.subtle.decrypt(
|
|
565
|
+
{
|
|
566
|
+
name: o,
|
|
567
|
+
iv: Rn(w)
|
|
568
|
+
},
|
|
569
|
+
a,
|
|
570
|
+
h
|
|
571
|
+
);
|
|
572
|
+
if (x)
|
|
573
|
+
return {
|
|
574
|
+
clearText: new TextDecoder().decode(x),
|
|
575
|
+
took: Date.now() - l
|
|
576
|
+
};
|
|
577
|
+
} catch {
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
return null;
|
|
581
|
+
};
|
|
582
|
+
let a = null, h = null;
|
|
583
|
+
try {
|
|
584
|
+
h = Tn(n);
|
|
585
|
+
const w = await crypto.subtle.digest(
|
|
586
|
+
"SHA-256",
|
|
587
|
+
St.encode(e)
|
|
588
|
+
);
|
|
589
|
+
a = await crypto.subtle.importKey(
|
|
590
|
+
"raw",
|
|
591
|
+
w,
|
|
592
|
+
o,
|
|
593
|
+
!1,
|
|
594
|
+
["decrypt"]
|
|
595
|
+
);
|
|
596
|
+
} catch {
|
|
597
|
+
return {
|
|
598
|
+
promise: Promise.reject(),
|
|
599
|
+
controller: s
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
return {
|
|
603
|
+
promise: c(),
|
|
604
|
+
controller: s
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
var me, ge, Ce, Ae, xe, Le;
|
|
608
|
+
class Dn {
|
|
493
609
|
constructor(e) {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
this.elForm = e, window.addEventListener("unload",
|
|
610
|
+
P(this, "beaconUrl", null);
|
|
611
|
+
P(this, "error", null);
|
|
612
|
+
P(this, "loadTime", Date.now());
|
|
613
|
+
P(this, "submitTime", null);
|
|
614
|
+
P(this, "startTime", null);
|
|
615
|
+
P(this, "viewTimeThresholdMs", 1500);
|
|
616
|
+
fe(this, me, {});
|
|
617
|
+
fe(this, ge, null);
|
|
618
|
+
fe(this, Ce, this.onFormChange.bind(this));
|
|
619
|
+
fe(this, Ae, this.onFormFocus.bind(this));
|
|
620
|
+
fe(this, xe, this.onFormSubmit.bind(this));
|
|
621
|
+
fe(this, Le, this.onUnload.bind(this));
|
|
622
|
+
this.elForm = e, window.addEventListener("unload", G(this, Le)), this.elForm.addEventListener("change", G(this, Ce)), this.elForm.addEventListener("focusin", G(this, Ae)), this.elForm.addEventListener("submit", G(this, xe));
|
|
507
623
|
}
|
|
508
624
|
data() {
|
|
509
|
-
const e = Object.entries(
|
|
625
|
+
const e = Object.entries(G(this, me));
|
|
510
626
|
return {
|
|
511
627
|
correction: e.length && e.filter(([t, r]) => r > 1).length / e.length || 0,
|
|
512
|
-
dropoff: !this.submitTime && !this.error &&
|
|
628
|
+
dropoff: !this.submitTime && !this.error && G(this, ge) ? G(this, ge) : null,
|
|
513
629
|
error: this.error,
|
|
514
630
|
mobile: this.isMobile(),
|
|
515
631
|
start: this.startTime,
|
|
516
632
|
submit: this.submitTime,
|
|
517
|
-
tz:
|
|
633
|
+
tz: Nt()
|
|
518
634
|
};
|
|
519
635
|
}
|
|
520
636
|
dataAsBase64() {
|
|
@@ -528,7 +644,7 @@ class dn {
|
|
|
528
644
|
return "";
|
|
529
645
|
}
|
|
530
646
|
destroy() {
|
|
531
|
-
window.removeEventListener("unload",
|
|
647
|
+
window.removeEventListener("unload", G(this, Le)), this.elForm.removeEventListener("change", G(this, Ce)), this.elForm.removeEventListener("focusin", G(this, Ae)), this.elForm.removeEventListener("submit", G(this, xe));
|
|
532
648
|
}
|
|
533
649
|
end() {
|
|
534
650
|
this.submitTime || (this.submitTime = Date.now());
|
|
@@ -556,7 +672,7 @@ class dn {
|
|
|
556
672
|
const t = e.target;
|
|
557
673
|
if (this.startTime || this.start(), t && this.isInput(t)) {
|
|
558
674
|
const r = this.getFieldName(t);
|
|
559
|
-
r &&
|
|
675
|
+
r && dt(this, ge, r);
|
|
560
676
|
}
|
|
561
677
|
}
|
|
562
678
|
onFormSubmit() {
|
|
@@ -582,61 +698,61 @@ class dn {
|
|
|
582
698
|
this.error = e === null ? null : String(e);
|
|
583
699
|
}
|
|
584
700
|
trackFieldChange(e) {
|
|
585
|
-
|
|
701
|
+
G(this, me)[e] = (G(this, me)[e] || 0) + 1;
|
|
586
702
|
}
|
|
587
703
|
}
|
|
588
|
-
|
|
589
|
-
var
|
|
590
|
-
function
|
|
704
|
+
me = new WeakMap(), ge = new WeakMap(), Ce = new WeakMap(), Ae = new WeakMap(), xe = new WeakMap(), Le = new WeakMap();
|
|
705
|
+
var y = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.VERIFIED = "verified", n.VERIFYING = "verifying", n.UNVERIFIED = "unverified", n.EXPIRED = "expired", n))(y || {});
|
|
706
|
+
function yt(n) {
|
|
591
707
|
let e, t, r;
|
|
592
708
|
return {
|
|
593
709
|
c() {
|
|
594
|
-
e =
|
|
710
|
+
e = re("svg"), t = re("path"), r = re("path"), u(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"), u(t, "fill", "currentColor"), u(t, "opacity", ".25"), u(r, "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"), u(r, "fill", "currentColor"), u(r, "class", "altcha-spinner"), u(e, "width", "24"), u(e, "height", "24"), u(e, "viewBox", "0 0 24 24"), u(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
595
711
|
},
|
|
596
712
|
m(o, s) {
|
|
597
|
-
|
|
713
|
+
B(o, e, s), I(e, t), I(e, r);
|
|
598
714
|
},
|
|
599
715
|
d(o) {
|
|
600
|
-
o &&
|
|
716
|
+
o && S(e);
|
|
601
717
|
}
|
|
602
718
|
};
|
|
603
719
|
}
|
|
604
|
-
function
|
|
720
|
+
function Sn(n) {
|
|
605
721
|
let e, t = (
|
|
606
722
|
/*_strings*/
|
|
607
723
|
n[13].label + ""
|
|
608
724
|
), r;
|
|
609
725
|
return {
|
|
610
726
|
c() {
|
|
611
|
-
e =
|
|
727
|
+
e = M("label"), u(e, "for", r = /*name*/
|
|
612
728
|
n[4] + "_checkbox");
|
|
613
729
|
},
|
|
614
730
|
m(o, s) {
|
|
615
|
-
|
|
731
|
+
B(o, e, s), e.innerHTML = t;
|
|
616
732
|
},
|
|
617
733
|
p(o, s) {
|
|
618
734
|
s[0] & /*_strings*/
|
|
619
735
|
8192 && t !== (t = /*_strings*/
|
|
620
736
|
o[13].label + "") && (e.innerHTML = t), s[0] & /*name*/
|
|
621
737
|
16 && r !== (r = /*name*/
|
|
622
|
-
o[4] + "_checkbox") &&
|
|
738
|
+
o[4] + "_checkbox") && u(e, "for", r);
|
|
623
739
|
},
|
|
624
740
|
d(o) {
|
|
625
|
-
o &&
|
|
741
|
+
o && S(e);
|
|
626
742
|
}
|
|
627
743
|
};
|
|
628
744
|
}
|
|
629
|
-
function
|
|
745
|
+
function Mn(n) {
|
|
630
746
|
let e, t = (
|
|
631
747
|
/*_strings*/
|
|
632
748
|
n[13].verifying + ""
|
|
633
749
|
);
|
|
634
750
|
return {
|
|
635
751
|
c() {
|
|
636
|
-
e =
|
|
752
|
+
e = M("span");
|
|
637
753
|
},
|
|
638
754
|
m(r, o) {
|
|
639
|
-
|
|
755
|
+
B(r, e, o), e.innerHTML = t;
|
|
640
756
|
},
|
|
641
757
|
p(r, o) {
|
|
642
758
|
o[0] & /*_strings*/
|
|
@@ -644,21 +760,21 @@ function mn(n) {
|
|
|
644
760
|
r[13].verifying + "") && (e.innerHTML = t);
|
|
645
761
|
},
|
|
646
762
|
d(r) {
|
|
647
|
-
r &&
|
|
763
|
+
r && S(e);
|
|
648
764
|
}
|
|
649
765
|
};
|
|
650
766
|
}
|
|
651
|
-
function
|
|
767
|
+
function Nn(n) {
|
|
652
768
|
let e, t = (
|
|
653
769
|
/*_strings*/
|
|
654
770
|
n[13].verified + ""
|
|
655
|
-
), r, o, s,
|
|
771
|
+
), r, o, s, l, c = (
|
|
656
772
|
/*session*/
|
|
657
|
-
n[11] &&
|
|
773
|
+
n[11] && wt(n)
|
|
658
774
|
);
|
|
659
775
|
return {
|
|
660
776
|
c() {
|
|
661
|
-
e =
|
|
777
|
+
e = M("span"), r = Q(), o = M("input"), s = Q(), c && c.c(), l = ln(), u(o, "type", "hidden"), u(
|
|
662
778
|
o,
|
|
663
779
|
"name",
|
|
664
780
|
/*name*/
|
|
@@ -666,37 +782,37 @@ function bn(n) {
|
|
|
666
782
|
), o.value = /*payload*/
|
|
667
783
|
n[6];
|
|
668
784
|
},
|
|
669
|
-
m(
|
|
670
|
-
|
|
785
|
+
m(a, h) {
|
|
786
|
+
B(a, e, h), e.innerHTML = t, B(a, r, h), B(a, o, h), B(a, s, h), c && c.m(a, h), B(a, l, h);
|
|
671
787
|
},
|
|
672
|
-
p(
|
|
673
|
-
|
|
788
|
+
p(a, h) {
|
|
789
|
+
h[0] & /*_strings*/
|
|
674
790
|
8192 && t !== (t = /*_strings*/
|
|
675
|
-
|
|
676
|
-
16 &&
|
|
791
|
+
a[13].verified + "") && (e.innerHTML = t), h[0] & /*name*/
|
|
792
|
+
16 && u(
|
|
677
793
|
o,
|
|
678
794
|
"name",
|
|
679
795
|
/*name*/
|
|
680
|
-
|
|
681
|
-
),
|
|
796
|
+
a[4]
|
|
797
|
+
), h[0] & /*payload*/
|
|
682
798
|
64 && (o.value = /*payload*/
|
|
683
|
-
|
|
684
|
-
|
|
799
|
+
a[6]), /*session*/
|
|
800
|
+
a[11] ? c ? c.p(a, h) : (c = wt(a), c.c(), c.m(l.parentNode, l)) : c && (c.d(1), c = null);
|
|
685
801
|
},
|
|
686
|
-
d(
|
|
687
|
-
|
|
802
|
+
d(a) {
|
|
803
|
+
a && (S(e), S(r), S(o), S(s), S(l)), c && c.d(a);
|
|
688
804
|
}
|
|
689
805
|
};
|
|
690
806
|
}
|
|
691
|
-
function
|
|
807
|
+
function wt(n) {
|
|
692
808
|
let e;
|
|
693
809
|
return {
|
|
694
810
|
c() {
|
|
695
|
-
e =
|
|
811
|
+
e = M("input"), u(e, "type", "hidden"), u(e, "name", "__session"), e.value = /*sessionPayload*/
|
|
696
812
|
n[12];
|
|
697
813
|
},
|
|
698
814
|
m(t, r) {
|
|
699
|
-
|
|
815
|
+
B(t, e, r);
|
|
700
816
|
},
|
|
701
817
|
p(t, r) {
|
|
702
818
|
r[0] & /*sessionPayload*/
|
|
@@ -704,62 +820,62 @@ function ct(n) {
|
|
|
704
820
|
t[12]);
|
|
705
821
|
},
|
|
706
822
|
d(t) {
|
|
707
|
-
t &&
|
|
823
|
+
t && S(e);
|
|
708
824
|
}
|
|
709
825
|
};
|
|
710
826
|
}
|
|
711
|
-
function
|
|
712
|
-
let e, t, r, o, s,
|
|
827
|
+
function _t(n) {
|
|
828
|
+
let e, t, r, o, s, l, c;
|
|
713
829
|
return {
|
|
714
830
|
c() {
|
|
715
|
-
e =
|
|
831
|
+
e = M("div"), t = M("a"), r = re("svg"), o = re("path"), s = re("path"), l = re("path"), u(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"), u(o, "fill", "currentColor"), u(s, "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"), u(s, "fill", "currentColor"), u(l, "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"), u(l, "fill", "currentColor"), u(r, "width", "22"), u(r, "height", "22"), u(r, "viewBox", "0 0 20 20"), u(r, "fill", "none"), u(r, "xmlns", "http://www.w3.org/2000/svg"), u(t, "href", Vt), u(t, "target", "_blank"), u(t, "class", "altcha-logo"), u(t, "aria-label", c = /*_strings*/
|
|
716
832
|
n[13].ariaLinkLabel);
|
|
717
833
|
},
|
|
718
|
-
m(
|
|
719
|
-
|
|
834
|
+
m(a, h) {
|
|
835
|
+
B(a, e, h), I(e, t), I(t, r), I(r, o), I(r, s), I(r, l);
|
|
720
836
|
},
|
|
721
|
-
p(
|
|
722
|
-
|
|
723
|
-
8192 &&
|
|
724
|
-
|
|
837
|
+
p(a, h) {
|
|
838
|
+
h[0] & /*_strings*/
|
|
839
|
+
8192 && c !== (c = /*_strings*/
|
|
840
|
+
a[13].ariaLinkLabel) && u(t, "aria-label", c);
|
|
725
841
|
},
|
|
726
|
-
d(
|
|
727
|
-
|
|
842
|
+
d(a) {
|
|
843
|
+
a && S(e);
|
|
728
844
|
}
|
|
729
845
|
};
|
|
730
846
|
}
|
|
731
|
-
function
|
|
847
|
+
function Et(n) {
|
|
732
848
|
let e, t, r, o;
|
|
733
|
-
function s(
|
|
849
|
+
function s(a, h) {
|
|
734
850
|
return (
|
|
735
851
|
/*state*/
|
|
736
|
-
|
|
852
|
+
a[7] === y.EXPIRED ? jn : Vn
|
|
737
853
|
);
|
|
738
854
|
}
|
|
739
|
-
let
|
|
855
|
+
let l = s(n), c = l(n);
|
|
740
856
|
return {
|
|
741
857
|
c() {
|
|
742
|
-
e =
|
|
858
|
+
e = M("div"), t = re("svg"), r = re("path"), o = Q(), c.c(), u(r, "stroke-linecap", "round"), u(r, "stroke-linejoin", "round"), u(r, "d", "M6 18L18 6M6 6l12 12"), u(t, "width", "14"), u(t, "height", "14"), u(t, "xmlns", "http://www.w3.org/2000/svg"), u(t, "fill", "none"), u(t, "viewBox", "0 0 24 24"), u(t, "stroke-width", "1.5"), u(t, "stroke", "currentColor"), u(e, "class", "altcha-error");
|
|
743
859
|
},
|
|
744
|
-
m(
|
|
745
|
-
|
|
860
|
+
m(a, h) {
|
|
861
|
+
B(a, e, h), I(e, t), I(t, r), I(e, o), c.m(e, null);
|
|
746
862
|
},
|
|
747
|
-
p(
|
|
748
|
-
|
|
863
|
+
p(a, h) {
|
|
864
|
+
l === (l = s(a)) && c ? c.p(a, h) : (c.d(1), c = l(a), c && (c.c(), c.m(e, null)));
|
|
749
865
|
},
|
|
750
|
-
d(
|
|
751
|
-
|
|
866
|
+
d(a) {
|
|
867
|
+
a && S(e), c.d();
|
|
752
868
|
}
|
|
753
869
|
};
|
|
754
870
|
}
|
|
755
|
-
function
|
|
871
|
+
function Vn(n) {
|
|
756
872
|
let e, t = (
|
|
757
873
|
/*_strings*/
|
|
758
874
|
n[13].error + ""
|
|
759
875
|
);
|
|
760
876
|
return {
|
|
761
877
|
c() {
|
|
762
|
-
e =
|
|
878
|
+
e = M("div"), u(
|
|
763
879
|
e,
|
|
764
880
|
"title",
|
|
765
881
|
/*error*/
|
|
@@ -767,13 +883,13 @@ function wn(n) {
|
|
|
767
883
|
);
|
|
768
884
|
},
|
|
769
885
|
m(r, o) {
|
|
770
|
-
|
|
886
|
+
B(r, e, o), e.innerHTML = t;
|
|
771
887
|
},
|
|
772
888
|
p(r, o) {
|
|
773
889
|
o[0] & /*_strings*/
|
|
774
890
|
8192 && t !== (t = /*_strings*/
|
|
775
891
|
r[13].error + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
776
|
-
32 &&
|
|
892
|
+
32 && u(
|
|
777
893
|
e,
|
|
778
894
|
"title",
|
|
779
895
|
/*error*/
|
|
@@ -781,18 +897,18 @@ function wn(n) {
|
|
|
781
897
|
);
|
|
782
898
|
},
|
|
783
899
|
d(r) {
|
|
784
|
-
r &&
|
|
900
|
+
r && S(e);
|
|
785
901
|
}
|
|
786
902
|
};
|
|
787
903
|
}
|
|
788
|
-
function
|
|
904
|
+
function jn(n) {
|
|
789
905
|
let e, t = (
|
|
790
906
|
/*_strings*/
|
|
791
907
|
n[13].expired + ""
|
|
792
908
|
);
|
|
793
909
|
return {
|
|
794
910
|
c() {
|
|
795
|
-
e =
|
|
911
|
+
e = M("div"), u(
|
|
796
912
|
e,
|
|
797
913
|
"title",
|
|
798
914
|
/*error*/
|
|
@@ -800,13 +916,13 @@ function _n(n) {
|
|
|
800
916
|
);
|
|
801
917
|
},
|
|
802
918
|
m(r, o) {
|
|
803
|
-
|
|
919
|
+
B(r, e, o), e.innerHTML = t;
|
|
804
920
|
},
|
|
805
921
|
p(r, o) {
|
|
806
922
|
o[0] & /*_strings*/
|
|
807
923
|
8192 && t !== (t = /*_strings*/
|
|
808
924
|
r[13].expired + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
809
|
-
32 &&
|
|
925
|
+
32 && u(
|
|
810
926
|
e,
|
|
811
927
|
"title",
|
|
812
928
|
/*error*/
|
|
@@ -814,21 +930,21 @@ function _n(n) {
|
|
|
814
930
|
);
|
|
815
931
|
},
|
|
816
932
|
d(r) {
|
|
817
|
-
r &&
|
|
933
|
+
r && S(e);
|
|
818
934
|
}
|
|
819
935
|
};
|
|
820
936
|
}
|
|
821
|
-
function
|
|
937
|
+
function vt(n) {
|
|
822
938
|
let e, t, r = (
|
|
823
939
|
/*_strings*/
|
|
824
940
|
n[13].footer + ""
|
|
825
941
|
);
|
|
826
942
|
return {
|
|
827
943
|
c() {
|
|
828
|
-
e =
|
|
944
|
+
e = M("div"), t = M("div"), u(e, "class", "altcha-footer");
|
|
829
945
|
},
|
|
830
946
|
m(o, s) {
|
|
831
|
-
|
|
947
|
+
B(o, e, s), I(e, t), t.innerHTML = r;
|
|
832
948
|
},
|
|
833
949
|
p(o, s) {
|
|
834
950
|
s[0] & /*_strings*/
|
|
@@ -836,365 +952,415 @@ function dt(n) {
|
|
|
836
952
|
o[13].footer + "") && (t.innerHTML = r);
|
|
837
953
|
},
|
|
838
954
|
d(o) {
|
|
839
|
-
o &&
|
|
955
|
+
o && S(e);
|
|
840
956
|
}
|
|
841
957
|
};
|
|
842
958
|
}
|
|
843
|
-
function
|
|
959
|
+
function kt(n) {
|
|
844
960
|
let e;
|
|
845
961
|
return {
|
|
846
962
|
c() {
|
|
847
|
-
e =
|
|
963
|
+
e = M("div"), u(e, "class", "altcha-anchor-arrow");
|
|
848
964
|
},
|
|
849
965
|
m(t, r) {
|
|
850
|
-
|
|
966
|
+
B(t, e, r), n[46](e);
|
|
851
967
|
},
|
|
852
|
-
p:
|
|
968
|
+
p: Me,
|
|
853
969
|
d(t) {
|
|
854
|
-
t &&
|
|
970
|
+
t && S(e), n[46](null);
|
|
855
971
|
}
|
|
856
972
|
};
|
|
857
973
|
}
|
|
858
|
-
function
|
|
859
|
-
let e, t, r, o, s,
|
|
974
|
+
function Un(n) {
|
|
975
|
+
let e, t, r, o, s, l, c, a, h, w, x, $, k, J, H, ee, te;
|
|
976
|
+
const R = (
|
|
977
|
+
/*#slots*/
|
|
978
|
+
n[44].default
|
|
979
|
+
), O = nn(
|
|
980
|
+
R,
|
|
981
|
+
n,
|
|
982
|
+
/*$$scope*/
|
|
983
|
+
n[43],
|
|
984
|
+
null
|
|
985
|
+
);
|
|
986
|
+
let N = (
|
|
860
987
|
/*state*/
|
|
861
|
-
n[7] ===
|
|
988
|
+
n[7] === y.VERIFYING && yt()
|
|
862
989
|
);
|
|
863
|
-
function
|
|
990
|
+
function oe(d, C) {
|
|
864
991
|
return (
|
|
865
992
|
/*state*/
|
|
866
|
-
d[7] ===
|
|
993
|
+
d[7] === y.VERIFIED ? Nn : (
|
|
867
994
|
/*state*/
|
|
868
|
-
d[7] ===
|
|
995
|
+
d[7] === y.VERIFYING ? Mn : Sn
|
|
869
996
|
)
|
|
870
997
|
);
|
|
871
998
|
}
|
|
872
|
-
let
|
|
999
|
+
let ne = oe(n), Z = ne(n), L = (
|
|
873
1000
|
/*hidelogo*/
|
|
874
1001
|
(n[3] !== !0 || /*isFreeSaaS*/
|
|
875
|
-
n[14]) &&
|
|
876
|
-
),
|
|
1002
|
+
n[14]) && _t(n)
|
|
1003
|
+
), F = (
|
|
877
1004
|
/*error*/
|
|
878
1005
|
(n[5] || /*state*/
|
|
879
|
-
n[7] ===
|
|
880
|
-
),
|
|
1006
|
+
n[7] === y.EXPIRED) && Et(n)
|
|
1007
|
+
), p = (
|
|
881
1008
|
/*_strings*/
|
|
882
1009
|
n[13].footer && /*hidefooter*/
|
|
883
1010
|
(n[2] !== !0 || /*isFreeSaaS*/
|
|
884
|
-
n[14]) &&
|
|
885
|
-
),
|
|
1011
|
+
n[14]) && vt(n)
|
|
1012
|
+
), D = (
|
|
886
1013
|
/*floating*/
|
|
887
|
-
n[1] &&
|
|
1014
|
+
n[1] && kt(n)
|
|
888
1015
|
);
|
|
889
1016
|
return {
|
|
890
1017
|
c() {
|
|
891
|
-
e =
|
|
892
|
-
n[4] + "_checkbox"),
|
|
893
|
-
n[0] !== "onsubmit",
|
|
894
|
-
|
|
1018
|
+
O && O.c(), e = Q(), t = M("div"), r = M("div"), N && N.c(), o = Q(), s = M("div"), l = M("input"), h = Q(), w = M("div"), Z.c(), x = Q(), L && L.c(), $ = Q(), F && F.c(), k = Q(), p && p.c(), J = Q(), D && D.c(), u(l, "type", "checkbox"), u(l, "id", c = /*name*/
|
|
1019
|
+
n[4] + "_checkbox"), l.required = a = /*auto*/
|
|
1020
|
+
n[0] !== "onsubmit", u(s, "class", "altcha-checkbox"), gt(
|
|
1021
|
+
s,
|
|
895
1022
|
"altcha-hidden",
|
|
896
1023
|
/*state*/
|
|
897
|
-
n[7] ===
|
|
898
|
-
),
|
|
899
|
-
|
|
1024
|
+
n[7] === y.VERIFYING
|
|
1025
|
+
), u(w, "class", "altcha-label"), u(r, "class", "altcha-main"), u(t, "class", "altcha"), u(
|
|
1026
|
+
t,
|
|
900
1027
|
"data-state",
|
|
901
1028
|
/*state*/
|
|
902
1029
|
n[7]
|
|
903
|
-
),
|
|
904
|
-
|
|
1030
|
+
), u(
|
|
1031
|
+
t,
|
|
905
1032
|
"data-floating",
|
|
906
1033
|
/*floating*/
|
|
907
1034
|
n[1]
|
|
908
1035
|
);
|
|
909
1036
|
},
|
|
910
|
-
m(d,
|
|
911
|
-
|
|
912
|
-
n[8],
|
|
913
|
-
|
|
914
|
-
|
|
1037
|
+
m(d, C) {
|
|
1038
|
+
O && O.m(d, C), B(d, e, C), B(d, t, C), I(t, r), N && N.m(r, null), I(r, o), I(r, s), I(s, l), l.checked = /*checked*/
|
|
1039
|
+
n[8], I(r, h), I(r, w), Z.m(w, null), I(r, x), L && L.m(r, null), I(t, $), F && F.m(t, null), I(t, k), p && p.m(t, null), I(t, J), D && D.m(t, null), n[47](t), H = !0, ee || (te = [
|
|
1040
|
+
Pe(
|
|
1041
|
+
l,
|
|
915
1042
|
"change",
|
|
916
1043
|
/*input_change_handler*/
|
|
917
|
-
n[
|
|
1044
|
+
n[45]
|
|
918
1045
|
),
|
|
919
|
-
|
|
920
|
-
|
|
1046
|
+
Pe(
|
|
1047
|
+
l,
|
|
921
1048
|
"change",
|
|
922
1049
|
/*onCheckedChange*/
|
|
923
1050
|
n[15]
|
|
924
1051
|
),
|
|
925
|
-
|
|
926
|
-
|
|
1052
|
+
Pe(
|
|
1053
|
+
l,
|
|
927
1054
|
"invalid",
|
|
928
1055
|
/*onInvalid*/
|
|
929
1056
|
n[16]
|
|
930
1057
|
)
|
|
931
|
-
],
|
|
1058
|
+
], ee = !0);
|
|
932
1059
|
},
|
|
933
|
-
p(d,
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1060
|
+
p(d, C) {
|
|
1061
|
+
O && O.p && (!H || C[1] & /*$$scope*/
|
|
1062
|
+
4096) && on(
|
|
1063
|
+
O,
|
|
1064
|
+
R,
|
|
1065
|
+
d,
|
|
1066
|
+
/*$$scope*/
|
|
1067
|
+
d[43],
|
|
1068
|
+
H ? rn(
|
|
1069
|
+
R,
|
|
1070
|
+
/*$$scope*/
|
|
1071
|
+
d[43],
|
|
1072
|
+
C,
|
|
1073
|
+
null
|
|
1074
|
+
) : sn(
|
|
1075
|
+
/*$$scope*/
|
|
1076
|
+
d[43]
|
|
1077
|
+
),
|
|
1078
|
+
null
|
|
1079
|
+
), /*state*/
|
|
1080
|
+
d[7] === y.VERIFYING ? N || (N = yt(), N.c(), N.m(r, o)) : N && (N.d(1), N = null), (!H || C[0] & /*name*/
|
|
1081
|
+
16 && c !== (c = /*name*/
|
|
1082
|
+
d[4] + "_checkbox")) && u(l, "id", c), (!H || C[0] & /*auto*/
|
|
1083
|
+
1 && a !== (a = /*auto*/
|
|
1084
|
+
d[0] !== "onsubmit")) && (l.required = a), C[0] & /*checked*/
|
|
1085
|
+
256 && (l.checked = /*checked*/
|
|
1086
|
+
d[8]), (!H || C[0] & /*state*/
|
|
1087
|
+
128) && gt(
|
|
1088
|
+
s,
|
|
944
1089
|
"altcha-hidden",
|
|
945
1090
|
/*state*/
|
|
946
|
-
d[7] ===
|
|
947
|
-
),
|
|
1091
|
+
d[7] === y.VERIFYING
|
|
1092
|
+
), ne === (ne = oe(d)) && Z ? Z.p(d, C) : (Z.d(1), Z = ne(d), Z && (Z.c(), Z.m(w, null))), /*hidelogo*/
|
|
948
1093
|
d[3] !== !0 || /*isFreeSaaS*/
|
|
949
|
-
d[14] ?
|
|
1094
|
+
d[14] ? L ? L.p(d, C) : (L = _t(d), L.c(), L.m(r, null)) : L && (L.d(1), L = null), /*error*/
|
|
950
1095
|
d[5] || /*state*/
|
|
951
|
-
d[7] ===
|
|
1096
|
+
d[7] === y.EXPIRED ? F ? F.p(d, C) : (F = Et(d), F.c(), F.m(t, k)) : F && (F.d(1), F = null), /*_strings*/
|
|
952
1097
|
d[13].footer && /*hidefooter*/
|
|
953
1098
|
(d[2] !== !0 || /*isFreeSaaS*/
|
|
954
|
-
d[14]) ?
|
|
955
|
-
d[1] ?
|
|
956
|
-
128 &&
|
|
957
|
-
|
|
1099
|
+
d[14]) ? p ? p.p(d, C) : (p = vt(d), p.c(), p.m(t, J)) : p && (p.d(1), p = null), /*floating*/
|
|
1100
|
+
d[1] ? D ? D.p(d, C) : (D = kt(d), D.c(), D.m(t, null)) : D && (D.d(1), D = null), (!H || C[0] & /*state*/
|
|
1101
|
+
128) && u(
|
|
1102
|
+
t,
|
|
958
1103
|
"data-state",
|
|
959
1104
|
/*state*/
|
|
960
1105
|
d[7]
|
|
961
|
-
),
|
|
962
|
-
2 &&
|
|
963
|
-
|
|
1106
|
+
), (!H || C[0] & /*floating*/
|
|
1107
|
+
2) && u(
|
|
1108
|
+
t,
|
|
964
1109
|
"data-floating",
|
|
965
1110
|
/*floating*/
|
|
966
1111
|
d[1]
|
|
967
1112
|
);
|
|
968
1113
|
},
|
|
969
|
-
i
|
|
970
|
-
|
|
1114
|
+
i(d) {
|
|
1115
|
+
H || (Ft(O, d), H = !0);
|
|
1116
|
+
},
|
|
1117
|
+
o(d) {
|
|
1118
|
+
wn(O, d), H = !1;
|
|
1119
|
+
},
|
|
971
1120
|
d(d) {
|
|
972
|
-
d &&
|
|
1121
|
+
d && (S(e), S(t)), O && O.d(d), N && N.d(), Z.d(), L && L.d(), F && F.d(), p && p.d(), D && D.d(), n[47](null), ee = !1, Ie(te);
|
|
973
1122
|
}
|
|
974
1123
|
};
|
|
975
1124
|
}
|
|
976
|
-
const
|
|
977
|
-
function
|
|
1125
|
+
const pt = "Visit Altcha.org", Vt = "https://altcha.org/";
|
|
1126
|
+
function Ct(n) {
|
|
978
1127
|
return JSON.parse(n);
|
|
979
1128
|
}
|
|
980
|
-
function
|
|
981
|
-
var
|
|
982
|
-
let r, o, s,
|
|
983
|
-
const
|
|
984
|
-
let
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
}),
|
|
988
|
-
|
|
1129
|
+
function Pn(n, e, t) {
|
|
1130
|
+
var ct, at;
|
|
1131
|
+
let r, o, s, l, { $$slots: c = {}, $$scope: a } = e, { analytics: h = !1 } = e, { auto: w = void 0 } = e, { beaconurl: x = void 0 } = e, { blockspam: $ = void 0 } = e, { challengeurl: k = void 0 } = e, { challengejson: J = void 0 } = e, { debug: H = !1 } = e, { delay: ee = 0 } = e, { expire: te = void 0 } = e, { floating: R = void 0 } = e, { floatinganchor: O = void 0 } = e, { floatingoffset: N = void 0 } = e, { hidefooter: oe = !1 } = e, { hidelogo: ne = !1 } = e, { name: Z = "altcha" } = e, { maxnumber: L = 1e6 } = e, { mockerror: F = !1 } = e, { obfuscated: p = void 0 } = e, { refetchonexpire: D = !0 } = e, { spamfilter: d = !1 } = e, { strings: C = void 0 } = e, { test: X = !1 } = e, { verifyurl: se = void 0 } = e, { workers: be = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: Te = void 0 } = e;
|
|
1132
|
+
const Ve = dn(), Ze = ["SHA-256", "SHA-384", "SHA-512"], Ge = (at = (ct = document.documentElement.lang) == null ? void 0 : ct.split("-")) == null ? void 0 : at[0];
|
|
1133
|
+
let W = !1, z = null, v, le = null, Re = null, b = null, ie = null, ye = null, K = null, ce = null, q = null, Ye = null, T = y.UNVERIFIED;
|
|
1134
|
+
hn(() => {
|
|
1135
|
+
b && (b.removeEventListener("submit", We), b.removeEventListener("reset", ze), b.removeEventListener("focusin", Xe), b = null), ie && v.removeEventListener("click", Je), q && q.destroy(), K && (clearTimeout(K), K = null), document.removeEventListener("click", nt), document.removeEventListener("scroll", it), window.removeEventListener("resize", ot);
|
|
1136
|
+
}), un(() => {
|
|
1137
|
+
var i, f;
|
|
1138
|
+
A("mounted", "0.8.0"), A("workers", be), X && A("using test mode"), te && Fe(te), w !== void 0 && A("auto", w), R !== void 0 && st(R), b = v.closest("form"), b && (b.addEventListener("submit", We, { capture: !0 }), b.addEventListener("reset", ze), w === "onfocus" && b.addEventListener("focusin", Xe)), ie = ((i = v.parentElement) == null ? void 0 : i.querySelector("[data-clarify-button]")) || ((f = v.parentElement) == null ? void 0 : f.querySelector("button, a")), ie && ie.addEventListener("click", Je), h && $e(), w === "onload" && (p ? _e() : ae()), r && (oe || ne) && A("Attributes hidefooter and hidelogo ignored because usage with free API Keys require attribution.");
|
|
989
1139
|
});
|
|
990
|
-
function
|
|
991
|
-
(
|
|
1140
|
+
function A(...i) {
|
|
1141
|
+
(H || i.some((f) => f instanceof Error)) && console[i[0] instanceof Error ? "error" : "log"]("ALTCHA", ...i);
|
|
992
1142
|
}
|
|
993
|
-
function
|
|
994
|
-
|
|
1143
|
+
function Je(i) {
|
|
1144
|
+
i.preventDefault(), T === y.UNVERIFIED && _e();
|
|
995
1145
|
}
|
|
996
|
-
function
|
|
997
|
-
|
|
998
|
-
g == null || g.requestSubmit();
|
|
999
|
-
})) : B !== _.VERIFIED && (i.preventDefault(), i.stopPropagation(), B === _.VERIFYING && ze()));
|
|
1146
|
+
function Xe(i) {
|
|
1147
|
+
T === y.UNVERIFIED && ae();
|
|
1000
1148
|
}
|
|
1001
|
-
function
|
|
1002
|
-
|
|
1149
|
+
function We(i) {
|
|
1150
|
+
b && q && T === y.VERIFIED && (q.end(), t(12, Ye = q.dataAsBase64())), b && w === "onsubmit" && (T === y.UNVERIFIED ? (i.preventDefault(), i.stopPropagation(), ae().then(() => {
|
|
1151
|
+
b == null || b.requestSubmit();
|
|
1152
|
+
})) : T !== y.VERIFIED && (i.preventDefault(), i.stopPropagation(), T === y.VERIFYING && rt()));
|
|
1003
1153
|
}
|
|
1004
|
-
function
|
|
1154
|
+
function ze() {
|
|
1155
|
+
we();
|
|
1156
|
+
}
|
|
1157
|
+
function Ke(i, f) {
|
|
1005
1158
|
return btoa(JSON.stringify({
|
|
1006
1159
|
algorithm: i.algorithm,
|
|
1007
1160
|
challenge: i.challenge,
|
|
1008
|
-
number:
|
|
1161
|
+
number: f.number,
|
|
1009
1162
|
salt: i.salt,
|
|
1010
1163
|
signature: i.signature,
|
|
1011
|
-
test:
|
|
1012
|
-
took:
|
|
1164
|
+
test: X ? !0 : void 0,
|
|
1165
|
+
took: f.took
|
|
1013
1166
|
}));
|
|
1014
1167
|
}
|
|
1015
|
-
function
|
|
1168
|
+
function Qe(i) {
|
|
1016
1169
|
if (!i.algorithm)
|
|
1017
1170
|
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
1018
1171
|
if (i.signature === void 0)
|
|
1019
1172
|
throw new Error("Invalid challenge. Property signature is missing.");
|
|
1020
|
-
if (!
|
|
1021
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${
|
|
1173
|
+
if (!Ze.includes(i.algorithm.toUpperCase()))
|
|
1174
|
+
throw new Error(`Unknown algorithm value. Allowed values: ${Ze.join(", ")}`);
|
|
1022
1175
|
if (!i.challenge || i.challenge.length < 40)
|
|
1023
1176
|
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
1024
1177
|
if (!i.salt || i.salt.length < 10)
|
|
1025
1178
|
throw new Error("Salt is too short. Min. 10 chars.");
|
|
1026
1179
|
}
|
|
1027
|
-
async function
|
|
1180
|
+
async function jt() {
|
|
1028
1181
|
var i;
|
|
1029
|
-
if (
|
|
1030
|
-
throw
|
|
1182
|
+
if (F)
|
|
1183
|
+
throw A("mocking error"), new Error("Mocked error.");
|
|
1031
1184
|
if (o)
|
|
1032
|
-
return
|
|
1033
|
-
if (
|
|
1034
|
-
return
|
|
1185
|
+
return A("using provided json data"), o;
|
|
1186
|
+
if (X)
|
|
1187
|
+
return A("generating test challenge", { test: X }), Ln(typeof X != "boolean" ? +X : void 0);
|
|
1035
1188
|
{
|
|
1036
|
-
if (!
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1189
|
+
if (!k && b) {
|
|
1190
|
+
const _ = b.getAttribute("action");
|
|
1191
|
+
_ != null && _.includes("/form/") && t(17, k = _ + "/altcha");
|
|
1039
1192
|
}
|
|
1040
|
-
if (!
|
|
1193
|
+
if (!k)
|
|
1041
1194
|
throw new Error("Attribute challengeurl not set.");
|
|
1042
|
-
|
|
1043
|
-
const
|
|
1044
|
-
headers:
|
|
1195
|
+
A("fetching challenge from", k);
|
|
1196
|
+
const f = await fetch(k, {
|
|
1197
|
+
headers: d ? { "x-altcha-spam-filter": "1" } : {}
|
|
1045
1198
|
});
|
|
1046
|
-
if (
|
|
1047
|
-
throw new Error(`Server responded with ${
|
|
1048
|
-
const
|
|
1049
|
-
if (
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1199
|
+
if (f.status !== 200)
|
|
1200
|
+
throw new Error(`Server responded with ${f.status}.`);
|
|
1201
|
+
const m = f.headers.get("Expires"), g = f.headers.get("X-Altcha-Config"), V = await f.json(), j = new URLSearchParams((i = V.salt.split("?")) == null ? void 0 : i[1]), U = j.get("expires") || j.get("expire");
|
|
1202
|
+
if (U) {
|
|
1203
|
+
const _ = new Date(+U * 1e3), Y = isNaN(_.getTime()) ? 0 : _.getTime() - Date.now();
|
|
1204
|
+
Y > 0 && Fe(Y);
|
|
1052
1205
|
}
|
|
1053
|
-
if (
|
|
1206
|
+
if (g)
|
|
1054
1207
|
try {
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
} catch (
|
|
1058
|
-
|
|
1208
|
+
const _ = JSON.parse(g);
|
|
1209
|
+
_ && typeof _ == "object" && (_.verifyurl && (_.verifyurl = new URL(_.verifyurl, new URL(k)).toString()), lt(_));
|
|
1210
|
+
} catch (_) {
|
|
1211
|
+
A("unable to configure from X-Altcha-Config", _);
|
|
1059
1212
|
}
|
|
1060
|
-
if (!
|
|
1061
|
-
const
|
|
1062
|
-
if (
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1213
|
+
if (!te && (m != null && m.length)) {
|
|
1214
|
+
const _ = Date.parse(m);
|
|
1215
|
+
if (_) {
|
|
1216
|
+
const Y = _ - Date.now();
|
|
1217
|
+
Y > 0 && Fe(Y);
|
|
1065
1218
|
}
|
|
1066
1219
|
}
|
|
1067
|
-
return
|
|
1220
|
+
return V;
|
|
1068
1221
|
}
|
|
1069
1222
|
}
|
|
1070
|
-
function
|
|
1071
|
-
if (!
|
|
1072
|
-
if (
|
|
1073
|
-
if (
|
|
1074
|
-
const i =
|
|
1075
|
-
i && t(19,
|
|
1223
|
+
function $e() {
|
|
1224
|
+
if (!q)
|
|
1225
|
+
if (b) {
|
|
1226
|
+
if (A("analytics enabled"), t(11, q = new Dn(b)), x === void 0) {
|
|
1227
|
+
const i = b.getAttribute("action");
|
|
1228
|
+
i && t(19, x = i + "/beacon");
|
|
1076
1229
|
}
|
|
1077
|
-
t(11,
|
|
1230
|
+
t(11, q.beaconUrl = x || null, q);
|
|
1078
1231
|
} else
|
|
1079
|
-
|
|
1232
|
+
A("analytics cannot be enabled - form element not found");
|
|
1080
1233
|
}
|
|
1081
|
-
function
|
|
1082
|
-
|
|
1234
|
+
function et() {
|
|
1235
|
+
k && D && T === y.VERIFIED ? ae() : we(y.EXPIRED, l.expired);
|
|
1083
1236
|
}
|
|
1084
|
-
async function
|
|
1085
|
-
let
|
|
1237
|
+
async function tt(i) {
|
|
1238
|
+
let f = null;
|
|
1086
1239
|
if ("Worker" in window) {
|
|
1087
1240
|
try {
|
|
1088
|
-
|
|
1089
|
-
} catch (
|
|
1090
|
-
|
|
1241
|
+
f = await Ut(i, i.maxnumber);
|
|
1242
|
+
} catch (m) {
|
|
1243
|
+
A(m);
|
|
1091
1244
|
}
|
|
1092
|
-
if ((
|
|
1093
|
-
return { data: i, solution:
|
|
1245
|
+
if ((f == null ? void 0 : f.number) !== void 0 || "obfuscated" in i)
|
|
1246
|
+
return { data: i, solution: f };
|
|
1247
|
+
}
|
|
1248
|
+
if ("obfuscated" in i) {
|
|
1249
|
+
const m = await Fn(i.obfuscated, i.key, i.maxnumber);
|
|
1250
|
+
return { data: i, solution: await m.promise };
|
|
1094
1251
|
}
|
|
1095
1252
|
return {
|
|
1096
1253
|
data: i,
|
|
1097
|
-
solution: await
|
|
1254
|
+
solution: await In(i.challenge, i.salt, i.algorithm, i.maxnumber || L).promise
|
|
1098
1255
|
};
|
|
1099
1256
|
}
|
|
1100
|
-
async function
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
for (let
|
|
1104
|
-
|
|
1105
|
-
const
|
|
1106
|
-
const
|
|
1107
|
-
return new Promise((
|
|
1108
|
-
|
|
1109
|
-
if (
|
|
1110
|
-
for (const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
}),
|
|
1114
|
-
payload:
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
max: he + G,
|
|
1118
|
-
salt: h,
|
|
1119
|
-
start: he
|
|
1120
|
-
},
|
|
1257
|
+
async function Ut(i, f = typeof X == "number" ? X : L, m = Math.ceil(be)) {
|
|
1258
|
+
const g = [];
|
|
1259
|
+
m = Math.min(16, Math.max(1, m));
|
|
1260
|
+
for (let U = 0; U < m; U++)
|
|
1261
|
+
g.push(createAltchaWorker(Te));
|
|
1262
|
+
const V = Math.ceil(f / m), j = await Promise.all(g.map((U, _) => {
|
|
1263
|
+
const Y = _ * V;
|
|
1264
|
+
return new Promise((Ue) => {
|
|
1265
|
+
U.addEventListener("message", (Ee) => {
|
|
1266
|
+
if (Ee.data)
|
|
1267
|
+
for (const ve of g)
|
|
1268
|
+
ve !== U && ve.postMessage({ type: "abort" });
|
|
1269
|
+
Ue(Ee.data);
|
|
1270
|
+
}), U.postMessage({
|
|
1271
|
+
payload: i,
|
|
1272
|
+
max: Y + V,
|
|
1273
|
+
start: Y,
|
|
1121
1274
|
type: "work"
|
|
1122
1275
|
});
|
|
1123
1276
|
});
|
|
1124
1277
|
}));
|
|
1125
|
-
for (const
|
|
1126
|
-
|
|
1127
|
-
return
|
|
1278
|
+
for (const U of g)
|
|
1279
|
+
U.terminate();
|
|
1280
|
+
return j.find((U) => !!U) || null;
|
|
1128
1281
|
}
|
|
1129
|
-
function
|
|
1130
|
-
[
|
|
1282
|
+
function Pt() {
|
|
1283
|
+
[y.UNVERIFIED, y.ERROR, y.EXPIRED].includes(T) ? d && (b == null ? void 0 : b.reportValidity()) === !1 ? t(8, W = !1) : p ? _e() : ae() : t(8, W = !0);
|
|
1131
1284
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1285
|
+
function nt(i) {
|
|
1286
|
+
const f = i.target;
|
|
1287
|
+
R && f && !v.contains(f) && T === y.VERIFIED && t(9, v.style.display = "none", v);
|
|
1135
1288
|
}
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1289
|
+
function it() {
|
|
1290
|
+
R && je();
|
|
1138
1291
|
}
|
|
1139
|
-
function
|
|
1140
|
-
|
|
1292
|
+
function rt() {
|
|
1293
|
+
T === y.VERIFYING && l.waitAlert && alert(l.waitAlert);
|
|
1141
1294
|
}
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1295
|
+
function Bt(i) {
|
|
1296
|
+
var f;
|
|
1297
|
+
if (z) {
|
|
1298
|
+
const m = z.match(/^(mailto|tel|sms|https?):/);
|
|
1299
|
+
let g;
|
|
1300
|
+
if (m) {
|
|
1301
|
+
const [V] = z.slice(z.indexOf(":") + 1).replace(/^\/\//, "").split("?");
|
|
1302
|
+
g = document.createElement("a"), g.href = z, g.innerHTML = V;
|
|
1303
|
+
} else
|
|
1304
|
+
g = document.createTextNode(z);
|
|
1305
|
+
ie && g && (ie.after(g), (f = ie.parentElement) == null || f.removeChild(ie));
|
|
1306
|
+
}
|
|
1144
1307
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1147
|
-
|
|
1308
|
+
function Ot(i) {
|
|
1309
|
+
q && q.trackError(ye);
|
|
1310
|
+
}
|
|
1311
|
+
function Ht(i) {
|
|
1312
|
+
R && T !== y.UNVERIFIED && requestAnimationFrame(() => {
|
|
1313
|
+
je();
|
|
1148
1314
|
});
|
|
1149
1315
|
}
|
|
1150
|
-
function
|
|
1151
|
-
|
|
1316
|
+
function ot() {
|
|
1317
|
+
R && je();
|
|
1152
1318
|
}
|
|
1153
|
-
function
|
|
1154
|
-
|
|
1319
|
+
function Fe(i) {
|
|
1320
|
+
A("expire", i), K && (clearTimeout(K), K = null), i < 1 ? et() : K = setTimeout(et, i);
|
|
1155
1321
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1322
|
+
function st(i) {
|
|
1323
|
+
A("floating", i), R !== i && (t(9, v.style.left = "", v), t(9, v.style.top = "", v)), t(1, R = i === !0 || i === "" ? "auto" : i === !1 || i === "false" ? void 0 : R), R ? (w || t(0, w = "onsubmit"), document.addEventListener("scroll", it), document.addEventListener("click", nt), window.addEventListener("resize", ot)) : w === "onsubmit" && t(0, w = void 0);
|
|
1158
1324
|
}
|
|
1159
|
-
function
|
|
1160
|
-
var
|
|
1161
|
-
const
|
|
1162
|
-
return ((
|
|
1325
|
+
function qt(i) {
|
|
1326
|
+
var m;
|
|
1327
|
+
const f = b == null ? void 0 : b.querySelector(typeof i == "string" ? `input[name="${i}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1328
|
+
return ((m = f == null ? void 0 : f.value) == null ? void 0 : m.slice(f.value.indexOf("@"))) || void 0;
|
|
1163
1329
|
}
|
|
1164
|
-
function
|
|
1330
|
+
function Zt(i) {
|
|
1165
1331
|
return [
|
|
1166
|
-
...(
|
|
1332
|
+
...(b == null ? void 0 : b.querySelectorAll(i != null && i.length ? i.map((m) => `input[name="${m}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1167
1333
|
].reduce(
|
|
1168
|
-
(
|
|
1169
|
-
const
|
|
1170
|
-
return
|
|
1171
|
-
`) :
|
|
1334
|
+
(m, g) => {
|
|
1335
|
+
const V = g.name, j = g.value;
|
|
1336
|
+
return V && j && (m[V] = /\n/.test(j) ? j.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1337
|
+
`) : j), m;
|
|
1172
1338
|
},
|
|
1173
1339
|
{}
|
|
1174
1340
|
);
|
|
1175
1341
|
}
|
|
1176
|
-
async function
|
|
1177
|
-
if (!
|
|
1342
|
+
async function Gt(i) {
|
|
1343
|
+
if (!se)
|
|
1178
1344
|
throw new Error("Attribute verifyurl not set.");
|
|
1179
|
-
|
|
1180
|
-
const
|
|
1181
|
-
if (
|
|
1182
|
-
const { blockedCountries:
|
|
1183
|
-
|
|
1345
|
+
A("requesting server verification from", se);
|
|
1346
|
+
const f = { payload: i };
|
|
1347
|
+
if (d) {
|
|
1348
|
+
const { blockedCountries: V, classifier: j, disableRules: U, email: _, expectedLanguages: Y, expectedCountries: Ue, fields: Ee, ipAddress: ve, text: zt, timeZone: ft } = Yt();
|
|
1349
|
+
f.blockedCountries = V, f.classifier = j, f.disableRules = U, f.email = _ === !1 ? void 0 : qt(_), f.expectedCountries = Ue, f.expectedLanguages = Y || (Ge ? [Ge] : void 0), f.fields = Ee === !1 ? void 0 : Zt(Ee), f.ipAddress = ve === !1 ? void 0 : ve || "auto", f.text = zt, f.timeZone = ft === !1 ? void 0 : ft || Nt();
|
|
1184
1350
|
}
|
|
1185
|
-
const
|
|
1186
|
-
body: JSON.stringify(
|
|
1351
|
+
const m = await fetch(se, {
|
|
1352
|
+
body: JSON.stringify(f),
|
|
1187
1353
|
headers: { "content-type": "application/json" },
|
|
1188
1354
|
method: "POST"
|
|
1189
1355
|
});
|
|
1190
|
-
if (
|
|
1191
|
-
throw new Error(`Server responded with ${
|
|
1192
|
-
const
|
|
1193
|
-
if (
|
|
1356
|
+
if (m.status !== 200)
|
|
1357
|
+
throw new Error(`Server responded with ${m.status}.`);
|
|
1358
|
+
const g = await m.json();
|
|
1359
|
+
if (g != null && g.payload && t(6, ce = g.payload), Ve("serververification", g), $ && g.classification === "BAD")
|
|
1194
1360
|
throw new Error("SpamFilter returned negative classification.");
|
|
1195
1361
|
}
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1362
|
+
function Yt() {
|
|
1363
|
+
return d === "ipAddress" ? {
|
|
1198
1364
|
blockedCountries: void 0,
|
|
1199
1365
|
classifier: void 0,
|
|
1200
1366
|
disableRules: void 0,
|
|
@@ -1205,7 +1371,7 @@ function vn(n, e, t) {
|
|
|
1205
1371
|
ipAddress: void 0,
|
|
1206
1372
|
text: void 0,
|
|
1207
1373
|
timeZone: void 0
|
|
1208
|
-
} : typeof
|
|
1374
|
+
} : typeof d == "object" ? d : {
|
|
1209
1375
|
blockedCountries: void 0,
|
|
1210
1376
|
classifier: void 0,
|
|
1211
1377
|
disableRules: void 0,
|
|
@@ -1218,134 +1384,157 @@ function vn(n, e, t) {
|
|
|
1218
1384
|
timeZone: void 0
|
|
1219
1385
|
};
|
|
1220
1386
|
}
|
|
1221
|
-
function
|
|
1222
|
-
if (
|
|
1223
|
-
if (
|
|
1224
|
-
const
|
|
1225
|
-
if (
|
|
1226
|
-
const
|
|
1227
|
-
t(10,
|
|
1387
|
+
function je(i = 20) {
|
|
1388
|
+
if (v)
|
|
1389
|
+
if (Re || (Re = (O ? document.querySelector(O) : b == null ? void 0 : b.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || b || ie), Re) {
|
|
1390
|
+
const f = parseInt(N, 10) || 12, m = Re.getBoundingClientRect(), g = v.getBoundingClientRect(), V = document.documentElement.clientHeight, j = document.documentElement.clientWidth, U = R === "auto" ? m.bottom + g.height + f + i > V : R === "top", _ = Math.max(i, Math.min(j - i - g.width, m.left + m.width / 2 - g.width / 2));
|
|
1391
|
+
if (U ? t(9, v.style.top = `${m.top - (g.height + f)}px`, v) : t(9, v.style.top = `${m.bottom + f}px`, v), t(9, v.style.left = `${_}px`, v), v.setAttribute("data-floating", U ? "top" : "bottom"), le) {
|
|
1392
|
+
const Y = le.getBoundingClientRect();
|
|
1393
|
+
t(10, le.style.left = m.left - _ + m.width / 2 - Y.width / 2 + "px", le);
|
|
1228
1394
|
}
|
|
1229
1395
|
} else
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
function
|
|
1233
|
-
i.analytics && (t(18,
|
|
1234
|
-
}
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1237
|
-
}
|
|
1238
|
-
async function
|
|
1239
|
-
return
|
|
1240
|
-
if (
|
|
1241
|
-
if (
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1396
|
+
A("unable to find floating anchor element");
|
|
1397
|
+
}
|
|
1398
|
+
function lt(i) {
|
|
1399
|
+
i.analytics && (t(18, h = i.analytics), $e()), i.obfuscated !== void 0 && t(27, p = i.obfuscated), i.auto !== void 0 && (t(0, w = i.auto), w === "onload" && (p ? _e() : ae())), i.beaconurl && (t(19, x = i.beaconurl), q && t(11, q.beaconUrl = x, q)), i.floatinganchor !== void 0 && t(23, O = i.floatinganchor), i.delay !== void 0 && t(21, ee = i.delay), i.floatingoffset !== void 0 && t(24, N = i.floatingoffset), i.floating !== void 0 && st(i.floating), i.expire !== void 0 && (Fe(i.expire), t(22, te = i.expire)), i.challenge && (Qe(i.challenge), o = i.challenge), i.challengeurl !== void 0 && t(17, k = i.challengeurl), i.debug !== void 0 && t(20, H = !!i.debug), i.hidefooter !== void 0 && t(2, oe = !!i.hidefooter), i.hidelogo !== void 0 && t(3, ne = !!i.hidelogo), i.maxnumber !== void 0 && t(25, L = +i.maxnumber), i.mockerror !== void 0 && t(26, F = !!i.mockerror), i.name !== void 0 && t(4, Z = i.name), i.refetchonexpire !== void 0 && t(28, D = !!i.refetchonexpire), i.spamfilter !== void 0 && t(29, d = typeof i.spamfilter == "object" ? i.spamfilter : !!i.spamfilter), i.strings && t(42, s = i.strings), i.test !== void 0 && t(30, X = typeof i.test == "number" ? i.test : !!i.test), i.verifyurl !== void 0 && t(31, se = i.verifyurl), i.workers !== void 0 && t(32, be = +i.workers), i.workerurl !== void 0 && t(33, Te = i.workerurl);
|
|
1400
|
+
}
|
|
1401
|
+
function we(i = y.UNVERIFIED, f = null) {
|
|
1402
|
+
K && (clearTimeout(K), K = null), t(8, W = !1), t(5, ye = f), t(6, ce = null), t(7, T = i);
|
|
1403
|
+
}
|
|
1404
|
+
async function ae() {
|
|
1405
|
+
return we(y.VERIFYING), await new Promise((i) => setTimeout(i, ee || 0)), jt().then((i) => (Qe(i), A("challenge", i), tt(i))).then(({ data: i, solution: f }) => {
|
|
1406
|
+
if (A("solution", f), "challenge" in i && f && !("clearText" in f))
|
|
1407
|
+
if ((f == null ? void 0 : f.number) !== void 0) {
|
|
1408
|
+
if (se)
|
|
1409
|
+
return Gt(Ke(i, f));
|
|
1410
|
+
t(6, ce = Ke(i, f)), A("payload", ce);
|
|
1411
|
+
} else
|
|
1412
|
+
throw A("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1246
1413
|
}).then(() => {
|
|
1247
|
-
|
|
1248
|
-
t(7,
|
|
1414
|
+
mn().then(() => {
|
|
1415
|
+
t(7, T = y.VERIFIED), t(8, W = !0), A("verified"), Ve("verified", { payload: ce });
|
|
1249
1416
|
});
|
|
1250
1417
|
}).catch((i) => {
|
|
1251
|
-
|
|
1418
|
+
A(i), t(7, T = y.ERROR), t(8, W = !1), t(5, ye = i.message);
|
|
1252
1419
|
});
|
|
1253
1420
|
}
|
|
1254
|
-
function
|
|
1255
|
-
|
|
1421
|
+
async function _e() {
|
|
1422
|
+
if (!p) {
|
|
1423
|
+
t(7, T = y.ERROR);
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1426
|
+
we(y.VERIFYING), await new Promise((j) => setTimeout(j, ee || 0));
|
|
1427
|
+
const [i, f] = p.split("?");
|
|
1428
|
+
let g = new URLSearchParams(f || "").get("key") || void 0;
|
|
1429
|
+
if (g) {
|
|
1430
|
+
const j = g.match(/^\(prompt:?(.*)\)$/);
|
|
1431
|
+
j && (g = prompt(j[1] || "Enter Key:") || void 0);
|
|
1432
|
+
}
|
|
1433
|
+
const { solution: V } = await tt({ obfuscated: i, key: g, maxnumber: L });
|
|
1434
|
+
V && "clearText" in V ? (t(41, z = V.clearText), t(7, T = y.VERIFIED), t(8, W = !0), R && v && t(9, v.style.display = "none", v)) : (t(7, T = y.ERROR), t(8, W = !1), t(5, ye = "Unable to decrypt data."));
|
|
1435
|
+
}
|
|
1436
|
+
function Jt() {
|
|
1437
|
+
W = this.checked, t(8, W);
|
|
1256
1438
|
}
|
|
1257
|
-
function
|
|
1258
|
-
|
|
1259
|
-
|
|
1439
|
+
function Xt(i) {
|
|
1440
|
+
Ne[i ? "unshift" : "push"](() => {
|
|
1441
|
+
le = i, t(10, le);
|
|
1260
1442
|
});
|
|
1261
1443
|
}
|
|
1262
|
-
function
|
|
1263
|
-
|
|
1264
|
-
|
|
1444
|
+
function Wt(i) {
|
|
1445
|
+
Ne[i ? "unshift" : "push"](() => {
|
|
1446
|
+
v = i, t(9, v);
|
|
1265
1447
|
});
|
|
1266
1448
|
}
|
|
1267
1449
|
return n.$$set = (i) => {
|
|
1268
|
-
"analytics" in i && t(18,
|
|
1450
|
+
"analytics" in i && t(18, h = i.analytics), "auto" in i && t(0, w = i.auto), "beaconurl" in i && t(19, x = i.beaconurl), "blockspam" in i && t(34, $ = i.blockspam), "challengeurl" in i && t(17, k = i.challengeurl), "challengejson" in i && t(35, J = i.challengejson), "debug" in i && t(20, H = i.debug), "delay" in i && t(21, ee = i.delay), "expire" in i && t(22, te = i.expire), "floating" in i && t(1, R = i.floating), "floatinganchor" in i && t(23, O = i.floatinganchor), "floatingoffset" in i && t(24, N = i.floatingoffset), "hidefooter" in i && t(2, oe = i.hidefooter), "hidelogo" in i && t(3, ne = i.hidelogo), "name" in i && t(4, Z = i.name), "maxnumber" in i && t(25, L = i.maxnumber), "mockerror" in i && t(26, F = i.mockerror), "obfuscated" in i && t(27, p = i.obfuscated), "refetchonexpire" in i && t(28, D = i.refetchonexpire), "spamfilter" in i && t(29, d = i.spamfilter), "strings" in i && t(36, C = i.strings), "test" in i && t(30, X = i.test), "verifyurl" in i && t(31, se = i.verifyurl), "workers" in i && t(32, be = i.workers), "workerurl" in i && t(33, Te = i.workerurl), "$$scope" in i && t(43, a = i.$$scope);
|
|
1269
1451
|
}, n.$$.update = () => {
|
|
1270
1452
|
n.$$.dirty[0] & /*challengeurl*/
|
|
1271
|
-
131072 && t(14, r = !!(
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
ariaLinkLabel:
|
|
1453
|
+
131072 && t(14, r = !!(k != null && k.includes(".altcha.org")) && !!(k != null && k.includes("apiKey=ckey_"))), n.$$.dirty[1] & /*challengejson*/
|
|
1454
|
+
16 && (o = J ? Ct(J) : void 0), n.$$.dirty[1] & /*strings*/
|
|
1455
|
+
32 && t(42, s = C ? Ct(C) : {}), n.$$.dirty[1] & /*parsedStrings*/
|
|
1456
|
+
2048 && t(13, l = {
|
|
1457
|
+
ariaLinkLabel: pt,
|
|
1276
1458
|
error: "Verification failed. Try again later.",
|
|
1277
1459
|
expired: "Verification expired. Try again.",
|
|
1278
|
-
footer: `Protected by <a href="${
|
|
1460
|
+
footer: `Protected by <a href="${Vt}" target="_blank" aria-label="${s.ariaLinkLabel || pt}">ALTCHA</a>`,
|
|
1279
1461
|
label: "I'm not a robot",
|
|
1280
1462
|
verified: "Verified",
|
|
1281
1463
|
verifying: "Verifying...",
|
|
1282
1464
|
waitAlert: "Verifying... please wait.",
|
|
1283
1465
|
...s
|
|
1284
|
-
}), n.$$.dirty[0] & /*
|
|
1285
|
-
192
|
|
1286
|
-
|
|
1287
|
-
|
|
1466
|
+
}), n.$$.dirty[0] & /*state, payload*/
|
|
1467
|
+
192 | n.$$.dirty[1] & /*clarifiedData*/
|
|
1468
|
+
1024 && Ve("statechange", z ? { clarifiedData: z, state: T } : { payload: ce, state: T }), n.$$.dirty[0] & /*error*/
|
|
1469
|
+
32 && Ot(), n.$$.dirty[0] & /*state*/
|
|
1470
|
+
128 && Ht(), n.$$.dirty[1] & /*clarifiedData*/
|
|
1471
|
+
1024 && Bt();
|
|
1288
1472
|
}, [
|
|
1289
|
-
|
|
1290
|
-
b,
|
|
1291
|
-
j,
|
|
1292
|
-
I,
|
|
1473
|
+
w,
|
|
1293
1474
|
R,
|
|
1294
|
-
|
|
1475
|
+
oe,
|
|
1295
1476
|
ne,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
r,
|
|
1304
|
-
Tt,
|
|
1305
|
-
ze,
|
|
1306
|
-
m,
|
|
1307
|
-
f,
|
|
1308
|
-
c,
|
|
1309
|
-
$,
|
|
1477
|
+
Z,
|
|
1478
|
+
ye,
|
|
1479
|
+
ce,
|
|
1480
|
+
T,
|
|
1481
|
+
W,
|
|
1482
|
+
v,
|
|
1483
|
+
le,
|
|
1310
1484
|
q,
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1485
|
+
Ye,
|
|
1486
|
+
l,
|
|
1487
|
+
r,
|
|
1488
|
+
Pt,
|
|
1489
|
+
rt,
|
|
1490
|
+
k,
|
|
1491
|
+
h,
|
|
1315
1492
|
x,
|
|
1316
|
-
|
|
1317
|
-
E,
|
|
1318
|
-
Z,
|
|
1493
|
+
H,
|
|
1319
1494
|
ee,
|
|
1320
|
-
|
|
1321
|
-
ke,
|
|
1495
|
+
te,
|
|
1322
1496
|
O,
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1497
|
+
N,
|
|
1498
|
+
L,
|
|
1499
|
+
F,
|
|
1500
|
+
p,
|
|
1501
|
+
D,
|
|
1502
|
+
d,
|
|
1503
|
+
X,
|
|
1504
|
+
se,
|
|
1505
|
+
be,
|
|
1506
|
+
Te,
|
|
1507
|
+
$,
|
|
1508
|
+
J,
|
|
1509
|
+
C,
|
|
1510
|
+
lt,
|
|
1511
|
+
we,
|
|
1512
|
+
ae,
|
|
1513
|
+
_e,
|
|
1514
|
+
z,
|
|
1328
1515
|
s,
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1516
|
+
a,
|
|
1517
|
+
c,
|
|
1518
|
+
Jt,
|
|
1519
|
+
Xt,
|
|
1520
|
+
Wt
|
|
1332
1521
|
];
|
|
1333
1522
|
}
|
|
1334
|
-
class
|
|
1523
|
+
class Bn extends Cn {
|
|
1335
1524
|
constructor(e) {
|
|
1336
|
-
super(),
|
|
1525
|
+
super(), kn(
|
|
1337
1526
|
this,
|
|
1338
1527
|
e,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1528
|
+
Pn,
|
|
1529
|
+
Un,
|
|
1530
|
+
en,
|
|
1342
1531
|
{
|
|
1343
1532
|
analytics: 18,
|
|
1344
1533
|
auto: 0,
|
|
1345
1534
|
beaconurl: 19,
|
|
1346
|
-
blockspam:
|
|
1535
|
+
blockspam: 34,
|
|
1347
1536
|
challengeurl: 17,
|
|
1348
|
-
challengejson:
|
|
1537
|
+
challengejson: 35,
|
|
1349
1538
|
debug: 20,
|
|
1350
1539
|
delay: 21,
|
|
1351
1540
|
expire: 22,
|
|
@@ -1357,16 +1546,18 @@ class En extends ln {
|
|
|
1357
1546
|
name: 4,
|
|
1358
1547
|
maxnumber: 25,
|
|
1359
1548
|
mockerror: 26,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1549
|
+
obfuscated: 27,
|
|
1550
|
+
refetchonexpire: 28,
|
|
1551
|
+
spamfilter: 29,
|
|
1552
|
+
strings: 36,
|
|
1553
|
+
test: 30,
|
|
1554
|
+
verifyurl: 31,
|
|
1555
|
+
workers: 32,
|
|
1556
|
+
workerurl: 33,
|
|
1557
|
+
configure: 37,
|
|
1558
|
+
reset: 38,
|
|
1559
|
+
verify: 39,
|
|
1560
|
+
clarify: 40
|
|
1370
1561
|
},
|
|
1371
1562
|
null,
|
|
1372
1563
|
[-1, -1, -1]
|
|
@@ -1376,158 +1567,167 @@ class En extends ln {
|
|
|
1376
1567
|
return this.$$.ctx[18];
|
|
1377
1568
|
}
|
|
1378
1569
|
set analytics(e) {
|
|
1379
|
-
this.$$set({ analytics: e }),
|
|
1570
|
+
this.$$set({ analytics: e }), E();
|
|
1380
1571
|
}
|
|
1381
1572
|
get auto() {
|
|
1382
1573
|
return this.$$.ctx[0];
|
|
1383
1574
|
}
|
|
1384
1575
|
set auto(e) {
|
|
1385
|
-
this.$$set({ auto: e }),
|
|
1576
|
+
this.$$set({ auto: e }), E();
|
|
1386
1577
|
}
|
|
1387
1578
|
get beaconurl() {
|
|
1388
1579
|
return this.$$.ctx[19];
|
|
1389
1580
|
}
|
|
1390
1581
|
set beaconurl(e) {
|
|
1391
|
-
this.$$set({ beaconurl: e }),
|
|
1582
|
+
this.$$set({ beaconurl: e }), E();
|
|
1392
1583
|
}
|
|
1393
1584
|
get blockspam() {
|
|
1394
|
-
return this.$$.ctx[
|
|
1585
|
+
return this.$$.ctx[34];
|
|
1395
1586
|
}
|
|
1396
1587
|
set blockspam(e) {
|
|
1397
|
-
this.$$set({ blockspam: e }),
|
|
1588
|
+
this.$$set({ blockspam: e }), E();
|
|
1398
1589
|
}
|
|
1399
1590
|
get challengeurl() {
|
|
1400
1591
|
return this.$$.ctx[17];
|
|
1401
1592
|
}
|
|
1402
1593
|
set challengeurl(e) {
|
|
1403
|
-
this.$$set({ challengeurl: e }),
|
|
1594
|
+
this.$$set({ challengeurl: e }), E();
|
|
1404
1595
|
}
|
|
1405
1596
|
get challengejson() {
|
|
1406
|
-
return this.$$.ctx[
|
|
1597
|
+
return this.$$.ctx[35];
|
|
1407
1598
|
}
|
|
1408
1599
|
set challengejson(e) {
|
|
1409
|
-
this.$$set({ challengejson: e }),
|
|
1600
|
+
this.$$set({ challengejson: e }), E();
|
|
1410
1601
|
}
|
|
1411
1602
|
get debug() {
|
|
1412
1603
|
return this.$$.ctx[20];
|
|
1413
1604
|
}
|
|
1414
1605
|
set debug(e) {
|
|
1415
|
-
this.$$set({ debug: e }),
|
|
1606
|
+
this.$$set({ debug: e }), E();
|
|
1416
1607
|
}
|
|
1417
1608
|
get delay() {
|
|
1418
1609
|
return this.$$.ctx[21];
|
|
1419
1610
|
}
|
|
1420
1611
|
set delay(e) {
|
|
1421
|
-
this.$$set({ delay: e }),
|
|
1612
|
+
this.$$set({ delay: e }), E();
|
|
1422
1613
|
}
|
|
1423
1614
|
get expire() {
|
|
1424
1615
|
return this.$$.ctx[22];
|
|
1425
1616
|
}
|
|
1426
1617
|
set expire(e) {
|
|
1427
|
-
this.$$set({ expire: e }),
|
|
1618
|
+
this.$$set({ expire: e }), E();
|
|
1428
1619
|
}
|
|
1429
1620
|
get floating() {
|
|
1430
1621
|
return this.$$.ctx[1];
|
|
1431
1622
|
}
|
|
1432
1623
|
set floating(e) {
|
|
1433
|
-
this.$$set({ floating: e }),
|
|
1624
|
+
this.$$set({ floating: e }), E();
|
|
1434
1625
|
}
|
|
1435
1626
|
get floatinganchor() {
|
|
1436
1627
|
return this.$$.ctx[23];
|
|
1437
1628
|
}
|
|
1438
1629
|
set floatinganchor(e) {
|
|
1439
|
-
this.$$set({ floatinganchor: e }),
|
|
1630
|
+
this.$$set({ floatinganchor: e }), E();
|
|
1440
1631
|
}
|
|
1441
1632
|
get floatingoffset() {
|
|
1442
1633
|
return this.$$.ctx[24];
|
|
1443
1634
|
}
|
|
1444
1635
|
set floatingoffset(e) {
|
|
1445
|
-
this.$$set({ floatingoffset: e }),
|
|
1636
|
+
this.$$set({ floatingoffset: e }), E();
|
|
1446
1637
|
}
|
|
1447
1638
|
get hidefooter() {
|
|
1448
1639
|
return this.$$.ctx[2];
|
|
1449
1640
|
}
|
|
1450
1641
|
set hidefooter(e) {
|
|
1451
|
-
this.$$set({ hidefooter: e }),
|
|
1642
|
+
this.$$set({ hidefooter: e }), E();
|
|
1452
1643
|
}
|
|
1453
1644
|
get hidelogo() {
|
|
1454
1645
|
return this.$$.ctx[3];
|
|
1455
1646
|
}
|
|
1456
1647
|
set hidelogo(e) {
|
|
1457
|
-
this.$$set({ hidelogo: e }),
|
|
1648
|
+
this.$$set({ hidelogo: e }), E();
|
|
1458
1649
|
}
|
|
1459
1650
|
get name() {
|
|
1460
1651
|
return this.$$.ctx[4];
|
|
1461
1652
|
}
|
|
1462
1653
|
set name(e) {
|
|
1463
|
-
this.$$set({ name: e }),
|
|
1654
|
+
this.$$set({ name: e }), E();
|
|
1464
1655
|
}
|
|
1465
1656
|
get maxnumber() {
|
|
1466
1657
|
return this.$$.ctx[25];
|
|
1467
1658
|
}
|
|
1468
1659
|
set maxnumber(e) {
|
|
1469
|
-
this.$$set({ maxnumber: e }),
|
|
1660
|
+
this.$$set({ maxnumber: e }), E();
|
|
1470
1661
|
}
|
|
1471
1662
|
get mockerror() {
|
|
1472
1663
|
return this.$$.ctx[26];
|
|
1473
1664
|
}
|
|
1474
1665
|
set mockerror(e) {
|
|
1475
|
-
this.$$set({ mockerror: e }),
|
|
1666
|
+
this.$$set({ mockerror: e }), E();
|
|
1476
1667
|
}
|
|
1477
|
-
get
|
|
1668
|
+
get obfuscated() {
|
|
1478
1669
|
return this.$$.ctx[27];
|
|
1479
1670
|
}
|
|
1671
|
+
set obfuscated(e) {
|
|
1672
|
+
this.$$set({ obfuscated: e }), E();
|
|
1673
|
+
}
|
|
1674
|
+
get refetchonexpire() {
|
|
1675
|
+
return this.$$.ctx[28];
|
|
1676
|
+
}
|
|
1480
1677
|
set refetchonexpire(e) {
|
|
1481
|
-
this.$$set({ refetchonexpire: e }),
|
|
1678
|
+
this.$$set({ refetchonexpire: e }), E();
|
|
1482
1679
|
}
|
|
1483
1680
|
get spamfilter() {
|
|
1484
|
-
return this.$$.ctx[
|
|
1681
|
+
return this.$$.ctx[29];
|
|
1485
1682
|
}
|
|
1486
1683
|
set spamfilter(e) {
|
|
1487
|
-
this.$$set({ spamfilter: e }),
|
|
1684
|
+
this.$$set({ spamfilter: e }), E();
|
|
1488
1685
|
}
|
|
1489
1686
|
get strings() {
|
|
1490
|
-
return this.$$.ctx[
|
|
1687
|
+
return this.$$.ctx[36];
|
|
1491
1688
|
}
|
|
1492
1689
|
set strings(e) {
|
|
1493
|
-
this.$$set({ strings: e }),
|
|
1690
|
+
this.$$set({ strings: e }), E();
|
|
1494
1691
|
}
|
|
1495
1692
|
get test() {
|
|
1496
|
-
return this.$$.ctx[
|
|
1693
|
+
return this.$$.ctx[30];
|
|
1497
1694
|
}
|
|
1498
1695
|
set test(e) {
|
|
1499
|
-
this.$$set({ test: e }),
|
|
1696
|
+
this.$$set({ test: e }), E();
|
|
1500
1697
|
}
|
|
1501
1698
|
get verifyurl() {
|
|
1502
|
-
return this.$$.ctx[
|
|
1699
|
+
return this.$$.ctx[31];
|
|
1503
1700
|
}
|
|
1504
1701
|
set verifyurl(e) {
|
|
1505
|
-
this.$$set({ verifyurl: e }),
|
|
1702
|
+
this.$$set({ verifyurl: e }), E();
|
|
1506
1703
|
}
|
|
1507
1704
|
get workers() {
|
|
1508
|
-
return this.$$.ctx[
|
|
1705
|
+
return this.$$.ctx[32];
|
|
1509
1706
|
}
|
|
1510
1707
|
set workers(e) {
|
|
1511
|
-
this.$$set({ workers: e }),
|
|
1708
|
+
this.$$set({ workers: e }), E();
|
|
1512
1709
|
}
|
|
1513
1710
|
get workerurl() {
|
|
1514
|
-
return this.$$.ctx[
|
|
1711
|
+
return this.$$.ctx[33];
|
|
1515
1712
|
}
|
|
1516
1713
|
set workerurl(e) {
|
|
1517
|
-
this.$$set({ workerurl: e }),
|
|
1714
|
+
this.$$set({ workerurl: e }), E();
|
|
1518
1715
|
}
|
|
1519
1716
|
get configure() {
|
|
1520
|
-
return this.$$.ctx[
|
|
1717
|
+
return this.$$.ctx[37];
|
|
1521
1718
|
}
|
|
1522
1719
|
get reset() {
|
|
1523
|
-
return this.$$.ctx[
|
|
1720
|
+
return this.$$.ctx[38];
|
|
1524
1721
|
}
|
|
1525
1722
|
get verify() {
|
|
1526
|
-
return this.$$.ctx[
|
|
1723
|
+
return this.$$.ctx[39];
|
|
1724
|
+
}
|
|
1725
|
+
get clarify() {
|
|
1726
|
+
return this.$$.ctx[40];
|
|
1527
1727
|
}
|
|
1528
1728
|
}
|
|
1529
|
-
customElements.define("altcha-widget",
|
|
1729
|
+
customElements.define("altcha-widget", pn(Bn, { analytics: { type: "Boolean" }, auto: {}, beaconurl: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, obfuscated: {}, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} }, ["default"], ["configure", "reset", "verify", "clarify"], !1));
|
|
1530
1730
|
globalThis.createAltchaWorker = (n) => new Worker(new URL(n || "./worker.js", import.meta.url));
|
|
1531
1731
|
export {
|
|
1532
|
-
|
|
1732
|
+
Bn as Altcha
|
|
1533
1733
|
};
|